remnote-bridge 0.1.10 → 0.1.12

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.
Files changed (68) hide show
  1. package/dist/cli/addon/addon-manager.js +163 -0
  2. package/dist/cli/addon/registry.js +24 -0
  3. package/dist/cli/commands/addon.js +149 -0
  4. package/dist/cli/commands/clean.js +121 -52
  5. package/dist/cli/commands/connect.js +72 -33
  6. package/dist/cli/commands/disconnect.js +19 -19
  7. package/dist/cli/commands/edit-rem.js +3 -31
  8. package/dist/cli/commands/edit-tree.js +3 -20
  9. package/dist/cli/commands/health.js +19 -18
  10. package/dist/cli/commands/read-context.js +8 -23
  11. package/dist/cli/commands/read-globe.js +3 -20
  12. package/dist/cli/commands/read-rem.js +3 -31
  13. package/dist/cli/commands/read-tree.js +3 -20
  14. package/dist/cli/commands/search.js +97 -21
  15. package/dist/cli/config.js +148 -72
  16. package/dist/cli/daemon/daemon.js +104 -24
  17. package/dist/cli/daemon/dev-server.js +9 -1
  18. package/dist/cli/daemon/pid.js +36 -22
  19. package/dist/cli/daemon/registry.js +160 -0
  20. package/dist/cli/daemon/send-request.js +11 -11
  21. package/dist/cli/daemon/static-server.js +97 -34
  22. package/dist/cli/handlers/context-read-handler.js +5 -3
  23. package/dist/cli/handlers/read-handler.js +4 -3
  24. package/dist/cli/handlers/tree-parser.js +16 -9
  25. package/dist/cli/main.js +51 -9
  26. package/dist/cli/protocol.js +18 -4
  27. package/dist/cli/server/config-server.js +280 -14
  28. package/dist/cli/server/ws-server.js +93 -44
  29. package/dist/cli/utils/output.js +29 -0
  30. package/dist/mcp/instructions.js +103 -10
  31. package/dist/mcp/resources/edit-rem-guide.js +3 -4
  32. package/dist/mcp/resources/error-reference.js +5 -3
  33. package/dist/mcp/resources/rem-object-fields.js +3 -3
  34. package/dist/mcp/tools/infra-tools.js +54 -6
  35. package/dist/mcp/tools/read-tools.js +16 -3
  36. package/package.json +2 -2
  37. package/remnote-plugin/dist/bridge_widget-sandbox.js +17 -17
  38. package/remnote-plugin/dist/bridge_widget.js +17 -17
  39. package/remnote-plugin/dist/index-sandbox.js +31 -31
  40. package/remnote-plugin/dist/index.js +31 -31
  41. package/remnote-plugin/dist/manifest.json +1 -1
  42. package/remnote-plugin/package.json +1 -1
  43. package/remnote-plugin/public/manifest.json +1 -1
  44. package/remnote-plugin/src/bridge/message-router.ts +1 -1
  45. package/remnote-plugin/src/bridge/multi-connection-manager.ts +151 -0
  46. package/remnote-plugin/src/bridge/websocket-client.ts +62 -16
  47. package/remnote-plugin/src/services/index.ts +0 -8
  48. package/remnote-plugin/src/services/read-context.ts +13 -4
  49. package/remnote-plugin/src/services/read-rem.ts +1 -9
  50. package/remnote-plugin/src/services/search.ts +13 -10
  51. package/remnote-plugin/src/settings.ts +9 -7
  52. package/remnote-plugin/src/utils/index.ts +0 -5
  53. package/remnote-plugin/src/widgets/bridge_widget.tsx +105 -20
  54. package/remnote-plugin/src/widgets/index.tsx +41 -44
  55. package/remnote-plugin/webpack.config.js +35 -0
  56. package/skills/remnote-bridge/SKILL.md +14 -9
  57. package/skills/remnote-bridge/instructions/addon.md +134 -0
  58. package/skills/remnote-bridge/instructions/clean.md +110 -0
  59. package/skills/remnote-bridge/instructions/connect.md +80 -37
  60. package/skills/remnote-bridge/instructions/disconnect.md +22 -9
  61. package/skills/remnote-bridge/instructions/edit-rem.md +37 -9
  62. package/skills/remnote-bridge/instructions/health.md +23 -13
  63. package/skills/remnote-bridge/instructions/install-skill.md +58 -0
  64. package/skills/remnote-bridge/instructions/overall.md +76 -21
  65. package/skills/remnote-bridge/instructions/read-context.md +34 -8
  66. package/skills/remnote-bridge/instructions/read-rem.md +10 -10
  67. package/skills/remnote-bridge/instructions/search.md +73 -14
  68. package/skills/remnote-bridge/instructions/setup.md +1 -1
@@ -1,19 +1,19 @@
1
- (()=>{var Pf={216(he,L,Ce){var He=Object.defineProperty,_e=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,$e=(Ie,be,Le)=>be in Ie?He(Ie,be,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ie[be]=Le,P=(Ie,be)=>{for(var Le in be||(be={}))Ct.call(be,Le)&&$e(Ie,Le,be[Le]);if(A)for(var Le of A(be))Me.call(be,Le)&&$e(Ie,Le,be[Le]);return Ie},B=(Ie,be)=>_e(Ie,Ne(be)),c=(Ie,be)=>He(Ie,"name",{value:be,configurable:!0}),Ue=(Ie,be,Le)=>new Promise((_t,ze)=>{var qe=fe=>{try{ne(Le.next(fe))}catch(Pe){ze(Pe)}},Y=fe=>{try{ne(Le.throw(fe))}catch(Pe){ze(Pe)}},ne=fe=>fe.done?_t(fe.value):Promise.resolve(fe.value).then(qe,Y);ne((Le=Le.apply(Ie,be)).next())});c(function(Ie,be){he.exports=be(Ce(999),Ce(874))},"webpackUniversalModuleDefinition")(self,function(Ie,be){return(function(){var Le={944:function(Y){var ne=1e3,fe=ne*60,Pe=fe*60,De=Pe*24,Qe=De*7,M=De*365.25;Y.exports=function(Q,J){J=J||{};var xe=typeof Q;if(xe==="string"&&Q.length>0)return Oe(Q);if(xe==="number"&&isFinite(Q))return J.long?te(Q):Ae(Q);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(Q))};function Oe(Q){if(Q=String(Q),!(Q.length>100)){var J=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(Q);if(J){var xe=parseFloat(J[1]),H=(J[2]||"ms").toLowerCase();switch(H){case"years":case"year":case"yrs":case"yr":case"y":return xe*M;case"weeks":case"week":case"w":return xe*Qe;case"days":case"day":case"d":return xe*De;case"hours":case"hour":case"hrs":case"hr":case"h":return xe*Pe;case"minutes":case"minute":case"mins":case"min":case"m":return xe*fe;case"seconds":case"second":case"secs":case"sec":case"s":return xe*ne;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return xe;default:return}}}}c(Oe,"parse");function Ae(Q){var J=Math.abs(Q);return J>=De?Math.round(Q/De)+"d":J>=Pe?Math.round(Q/Pe)+"h":J>=fe?Math.round(Q/fe)+"m":J>=ne?Math.round(Q/ne)+"s":Q+"ms"}c(Ae,"fmtShort");function te(Q){var J=Math.abs(Q);return J>=De?ie(Q,J,De,"day"):J>=Pe?ie(Q,J,Pe,"hour"):J>=fe?ie(Q,J,fe,"minute"):J>=ne?ie(Q,J,ne,"second"):Q+" ms"}c(te,"fmtLong");function ie(Q,J,xe,H){var se=J>=xe*1.5;return Math.round(Q/xe)+" "+H+(se?"s":"")}c(ie,"plural")},854:function(Y,ne,fe){ne.formatArgs=De,ne.save=Qe,ne.load=M,ne.useColors=Pe,ne.storage=Oe(),ne.destroy=(()=>{let te=!1;return()=>{te||(te=!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`."))}})(),ne.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 Pe(){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(Pe,"useColors");function De(te){if(te[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+te[0]+(this.useColors?"%c ":" ")+"+"+Y.exports.humanize(this.diff),!this.useColors)return;const ie="color: "+this.color;te.splice(1,0,ie,"color: inherit");let Q=0,J=0;te[0].replace(/%[a-zA-Z%]/g,xe=>{xe!=="%%"&&(Q++,xe==="%c"&&(J=Q))}),te.splice(J,0,ie)}c(De,"formatArgs"),ne.log=console.debug||console.log||(()=>{});function Qe(te){try{te?ne.storage.setItem("debug",te):ne.storage.removeItem("debug")}catch{}}c(Qe,"save");function M(){let te;try{te=ne.storage.getItem("debug")}catch{}return!te&&typeof process<"u"&&"env"in process&&(te=process.env.DEBUG),te}c(M,"load");function Oe(){try{return localStorage}catch{}}c(Oe,"localstorage"),Y.exports=fe(892)(ne);const{formatters:Ae}=Y.exports;Ae.j=function(te){try{return JSON.stringify(te)}catch(ie){return"[UnexpectedJSONParseError]: "+ie.message}}},892:function(Y,ne,fe){function Pe(De){M.debug=M,M.default=M,M.coerce=J,M.disable=te,M.enable=Ae,M.enabled=ie,M.humanize=fe(944),M.destroy=xe,Object.keys(De).forEach(H=>{M[H]=De[H]}),M.names=[],M.skips=[],M.formatters={};function Qe(H){let se=0;for(let S=0;S<H.length;S++)se=(se<<5)-se+H.charCodeAt(S),se|=0;return M.colors[Math.abs(se)%M.colors.length]}c(Qe,"selectColor"),M.selectColor=Qe;function M(H){let se,S=null,z,O;function I(...Z){if(!I.enabled)return;const U=I,G=Number(new Date),j=G-(se||G);U.diff=j,U.prev=se,U.curr=G,se=G,Z[0]=M.coerce(Z[0]),typeof Z[0]!="string"&&Z.unshift("%O");let ae=0;Z[0]=Z[0].replace(/%([a-zA-Z%])/g,(D,Mt)=>{if(D==="%%")return"%";ae++;const Pt=M.formatters[Mt];if(typeof Pt=="function"){const Dn=Z[ae];D=Pt.call(U,Dn),Z.splice(ae,1),ae--}return D}),M.formatArgs.call(U,Z),(U.log||M.log).apply(U,Z)}return c(I,"debug"),I.namespace=H,I.useColors=M.useColors(),I.color=M.selectColor(H),I.extend=Oe,I.destroy=M.destroy,Object.defineProperty(I,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(z!==M.namespaces&&(z=M.namespaces,O=M.enabled(H)),O),set:Z=>{S=Z}}),typeof M.init=="function"&&M.init(I),I}c(M,"createDebug");function Oe(H,se){const S=M(this.namespace+(typeof se>"u"?":":se)+H);return S.log=this.log,S}c(Oe,"extend");function Ae(H){M.save(H),M.namespaces=H,M.names=[],M.skips=[];let se;const S=(typeof H=="string"?H:"").split(/[\s,]+/),z=S.length;for(se=0;se<z;se++)S[se]&&(H=S[se].replace(/\*/g,".*?"),H[0]==="-"?M.skips.push(new RegExp("^"+H.slice(1)+"$")):M.names.push(new RegExp("^"+H+"$")))}c(Ae,"enable");function te(){const H=[...M.names.map(Q),...M.skips.map(Q).map(se=>"-"+se)].join(",");return M.enable(""),H}c(te,"disable");function ie(H){if(H[H.length-1]==="*")return!0;let se,S;for(se=0,S=M.skips.length;se<S;se++)if(M.skips[se].test(H))return!1;for(se=0,S=M.names.length;se<S;se++)if(M.names[se].test(H))return!0;return!1}c(ie,"enabled");function Q(H){return H.toString().substring(2,H.toString().length-2).replace(/\.\*\?$/,"*")}c(Q,"toNamespace");function J(H){return H instanceof Error?H.stack||H.message:H}c(J,"coerce");function xe(){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(xe,"destroy"),M.enable(M.load()),M}c(Pe,"setup"),Y.exports=Pe},772:function(Y){"use strict";/*
1
+ (()=>{var Pf={216(le,L,Pe){var ze=Object.defineProperty,xe=Object.defineProperties,Ae=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,Be=(Oe,ke,se)=>ke in Oe?ze(Oe,ke,{enumerable:!0,configurable:!0,writable:!0,value:se}):Oe[ke]=se,P=(Oe,ke)=>{for(var se in ke||(ke={}))xt.call(ke,se)&&Be(Oe,se,ke[se]);if(N)for(var se of N(ke))$e.call(ke,se)&&Be(Oe,se,ke[se]);return Oe},B=(Oe,ke)=>xe(Oe,Ae(ke)),c=(Oe,ke)=>ze(Oe,"name",{value:ke,configurable:!0}),tt=(Oe,ke,se)=>new Promise((nt,Fe)=>{var Ze=ue=>{try{te(se.next(ue))}catch(Re){Fe(Re)}},K=ue=>{try{te(se.throw(ue))}catch(Re){Fe(Re)}},te=ue=>ue.done?nt(ue.value):Promise.resolve(ue.value).then(Ze,K);te((se=se.apply(Oe,ke)).next())});c(function(Oe,ke){le.exports=ke(Pe(999),Pe(874))},"webpackUniversalModuleDefinition")(self,function(Oe,ke){return(function(){var se={944:function(K){var te=1e3,ue=te*60,Re=ue*60,De=Re*24,Qe=De*7,M=De*365.25;K.exports=function(Q,J){J=J||{};var Ee=typeof Q;if(Ee==="string"&&Q.length>0)return Ne(Q);if(Ee==="number"&&isFinite(Q))return J.long?ne(Q):je(Q);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(Q))};function Ne(Q){if(Q=String(Q),!(Q.length>100)){var J=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(Q);if(J){var Ee=parseFloat(J[1]),H=(J[2]||"ms").toLowerCase();switch(H){case"years":case"year":case"yrs":case"yr":case"y":return Ee*M;case"weeks":case"week":case"w":return Ee*Qe;case"days":case"day":case"d":return Ee*De;case"hours":case"hour":case"hrs":case"hr":case"h":return Ee*Re;case"minutes":case"minute":case"mins":case"min":case"m":return Ee*ue;case"seconds":case"second":case"secs":case"sec":case"s":return Ee*te;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return Ee;default:return}}}}c(Ne,"parse");function je(Q){var J=Math.abs(Q);return J>=De?Math.round(Q/De)+"d":J>=Re?Math.round(Q/Re)+"h":J>=ue?Math.round(Q/ue)+"m":J>=te?Math.round(Q/te)+"s":Q+"ms"}c(je,"fmtShort");function ne(Q){var J=Math.abs(Q);return J>=De?ie(Q,J,De,"day"):J>=Re?ie(Q,J,Re,"hour"):J>=ue?ie(Q,J,ue,"minute"):J>=te?ie(Q,J,te,"second"):Q+" ms"}c(ne,"fmtLong");function ie(Q,J,Ee,H){var ce=J>=Ee*1.5;return Math.round(Q/Ee)+" "+H+(ce?"s":"")}c(ie,"plural")},854:function(K,te,ue){te.formatArgs=De,te.save=Qe,te.load=M,te.useColors=Re,te.storage=Ne(),te.destroy=(()=>{let ne=!1;return()=>{ne||(ne=!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`."))}})(),te.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 Re(){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(Re,"useColors");function De(ne){if(ne[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+ne[0]+(this.useColors?"%c ":" ")+"+"+K.exports.humanize(this.diff),!this.useColors)return;const ie="color: "+this.color;ne.splice(1,0,ie,"color: inherit");let Q=0,J=0;ne[0].replace(/%[a-zA-Z%]/g,Ee=>{Ee!=="%%"&&(Q++,Ee==="%c"&&(J=Q))}),ne.splice(J,0,ie)}c(De,"formatArgs"),te.log=console.debug||console.log||(()=>{});function Qe(ne){try{ne?te.storage.setItem("debug",ne):te.storage.removeItem("debug")}catch{}}c(Qe,"save");function M(){let ne;try{ne=te.storage.getItem("debug")}catch{}return!ne&&typeof process<"u"&&"env"in process&&(ne=process.env.DEBUG),ne}c(M,"load");function Ne(){try{return localStorage}catch{}}c(Ne,"localstorage"),K.exports=ue(892)(te);const{formatters:je}=K.exports;je.j=function(ne){try{return JSON.stringify(ne)}catch(ie){return"[UnexpectedJSONParseError]: "+ie.message}}},892:function(K,te,ue){function Re(De){M.debug=M,M.default=M,M.coerce=J,M.disable=ne,M.enable=je,M.enabled=ie,M.humanize=ue(944),M.destroy=Ee,Object.keys(De).forEach(H=>{M[H]=De[H]}),M.names=[],M.skips=[],M.formatters={};function Qe(H){let ce=0;for(let S=0;S<H.length;S++)ce=(ce<<5)-ce+H.charCodeAt(S),ce|=0;return M.colors[Math.abs(ce)%M.colors.length]}c(Qe,"selectColor"),M.selectColor=Qe;function M(H){let ce,S=null,z,O;function b(...Z){if(!b.enabled)return;const U=b,Y=Number(new Date),j=Y-(ce||Y);U.diff=j,U.prev=ce,U.curr=Y,ce=Y,Z[0]=M.coerce(Z[0]),typeof Z[0]!="string"&&Z.unshift("%O");let de=0;Z[0]=Z[0].replace(/%([a-zA-Z%])/g,(A,Mt)=>{if(A==="%%")return"%";de++;const Pt=M.formatters[Mt];if(typeof Pt=="function"){const Dn=Z[de];A=Pt.call(U,Dn),Z.splice(de,1),de--}return A}),M.formatArgs.call(U,Z),(U.log||M.log).apply(U,Z)}return c(b,"debug"),b.namespace=H,b.useColors=M.useColors(),b.color=M.selectColor(H),b.extend=Ne,b.destroy=M.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(z!==M.namespaces&&(z=M.namespaces,O=M.enabled(H)),O),set:Z=>{S=Z}}),typeof M.init=="function"&&M.init(b),b}c(M,"createDebug");function Ne(H,ce){const S=M(this.namespace+(typeof ce>"u"?":":ce)+H);return S.log=this.log,S}c(Ne,"extend");function je(H){M.save(H),M.namespaces=H,M.names=[],M.skips=[];let ce;const S=(typeof H=="string"?H:"").split(/[\s,]+/),z=S.length;for(ce=0;ce<z;ce++)S[ce]&&(H=S[ce].replace(/\*/g,".*?"),H[0]==="-"?M.skips.push(new RegExp("^"+H.slice(1)+"$")):M.names.push(new RegExp("^"+H+"$")))}c(je,"enable");function ne(){const H=[...M.names.map(Q),...M.skips.map(Q).map(ce=>"-"+ce)].join(",");return M.enable(""),H}c(ne,"disable");function ie(H){if(H[H.length-1]==="*")return!0;let ce,S;for(ce=0,S=M.skips.length;ce<S;ce++)if(M.skips[ce].test(H))return!1;for(ce=0,S=M.names.length;ce<S;ce++)if(M.names[ce].test(H))return!0;return!1}c(ie,"enabled");function Q(H){return H.toString().substring(2,H.toString().length-2).replace(/\.\*\?$/,"*")}c(Q,"toNamespace");function J(H){return H instanceof Error?H.stack||H.message:H}c(J,"coerce");function Ee(){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(Ee,"destroy"),M.enable(M.load()),M}c(Re,"setup"),K.exports=Re},772:function(K){"use strict";/*
2
2
  object-assign
3
3
  (c) Sindre Sorhus
4
4
  @license MIT
5
- */var ne=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;function De(M){if(M==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(M)}c(De,"toObject");function Qe(){try{if(!Object.assign)return!1;var M=new String("abc");if(M[5]="de",Object.getOwnPropertyNames(M)[0]==="5")return!1;for(var Oe={},Ae=0;Ae<10;Ae++)Oe["_"+String.fromCharCode(Ae)]=Ae;var te=Object.getOwnPropertyNames(Oe).map(function(Q){return Oe[Q]});if(te.join("")!=="0123456789")return!1;var ie={};return"abcdefghijklmnopqrst".split("").forEach(function(Q){ie[Q]=Q}),Object.keys(Object.assign({},ie)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}c(Qe,"shouldUseNative"),Y.exports=Qe()?Object.assign:function(M,Oe){for(var Ae,te=De(M),ie,Q=1;Q<arguments.length;Q++){Ae=Object(arguments[Q]);for(var J in Ae)fe.call(Ae,J)&&(te[J]=Ae[J]);if(ne){ie=ne(Ae);for(var xe=0;xe<ie.length;xe++)Pe.call(Ae,ie[xe])&&(te[ie[xe]]=Ae[ie[xe]])}}return te}},346:function(Y,ne,fe){"use strict";var Pe;/** @license React v17.0.2
5
+ */var te=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable;function De(M){if(M==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(M)}c(De,"toObject");function Qe(){try{if(!Object.assign)return!1;var M=new String("abc");if(M[5]="de",Object.getOwnPropertyNames(M)[0]==="5")return!1;for(var Ne={},je=0;je<10;je++)Ne["_"+String.fromCharCode(je)]=je;var ne=Object.getOwnPropertyNames(Ne).map(function(Q){return Ne[Q]});if(ne.join("")!=="0123456789")return!1;var ie={};return"abcdefghijklmnopqrst".split("").forEach(function(Q){ie[Q]=Q}),Object.keys(Object.assign({},ie)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}c(Qe,"shouldUseNative"),K.exports=Qe()?Object.assign:function(M,Ne){for(var je,ne=De(M),ie,Q=1;Q<arguments.length;Q++){je=Object(arguments[Q]);for(var J in je)ue.call(je,J)&&(ne[J]=je[J]);if(te){ie=te(je);for(var Ee=0;Ee<ie.length;Ee++)Re.call(je,ie[Ee])&&(ne[ie[Ee]]=je[ie[Ee]])}}return ne}},346:function(K,te,ue){"use strict";var Re;/** @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
- */fe(772);var De=fe(359),Qe=60103;if(Pe=60107,typeof Symbol=="function"&&Symbol.for){var M=Symbol.for;Qe=M("react.element"),Pe=M("react.fragment")}var Oe=De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ae=Object.prototype.hasOwnProperty,te={key:!0,ref:!0,__self:!0,__source:!0};function ie(Q,J,xe){var H,se={},S=null,z=null;xe!==void 0&&(S=""+xe),J.key!==void 0&&(S=""+J.key),J.ref!==void 0&&(z=J.ref);for(H in J)Ae.call(J,H)&&!te.hasOwnProperty(H)&&(se[H]=J[H]);if(Q&&Q.defaultProps)for(H in J=Q.defaultProps,J)se[H]===void 0&&(se[H]=J[H]);return{$$typeof:Qe,type:Q,key:S,ref:z,props:se,_owner:Oe.current}}c(ie,"q"),ne.jsx=ie,ne.jsxs=ie},232:function(Y,ne,fe){"use strict";Y.exports=fe(346)},359:function(Y){"use strict";Y.exports=Ie},318:function(Y){"use strict";Y.exports=be}},_t={};function ze(Y){var ne=_t[Y];if(ne!==void 0)return ne.exports;var fe=_t[Y]={exports:{}};return Le[Y](fe,fe.exports,ze),fe.exports}c(ze,"__webpack_require__"),(function(){ze.n=function(Y){var ne=Y&&Y.__esModule?function(){return Y.default}:function(){return Y};return ze.d(ne,{a:ne}),ne}})(),(function(){ze.d=function(Y,ne){for(var fe in ne)ze.o(ne,fe)&&!ze.o(Y,fe)&&Object.defineProperty(Y,fe,{enumerable:!0,get:ne[fe]})}})(),(function(){ze.o=function(Y,ne){return Object.prototype.hasOwnProperty.call(Y,ne)}})(),(function(){ze.r=function(Y){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Y,"__esModule",{value:!0})}})();var qe={};return(function(){"use strict";ze.r(qe),ze.d(qe,{AppEvents:function(){return I},AppNamespace:function(){return vl},BuiltInPowerupCodes:function(){return Jn},Card:function(){return Mn},CardNamespace:function(){return Gr},CheckboxMatcher:function(){return Fs},ComponentFocusableItemType:function(){return gu},DEPRECATED_RICH_TEXT_ELEMENT_TYPES:function(){return Cn},DEPRECATED_RICH_TEXT_ELEMENT_TYPES_TO_NEW_FORMATTING:function(){return Ti},DEPRECATED_RICH_TEXT_FORMATTING_TYPES:function(){return xu},DateMatcher:function(){return mo},DateMatcherTypesToDisplayValue:function(){return Bs},DateNamespace:function(){return gr},DocumentViewer:function(){return Md},EXAM_SCHEDULER_EXPLANATION_TYPES:function(){return Cu},EditorEvents:function(){return te},EditorNamespace:function(){return Ke},EmbedComponentType:function(){return Jt},EventNamespace:function(){return tr},FocusEvents:function(){return O},FocusNamespace:function(){return ji},FocusPropsType:function(){return yu},GetCardInfoNodeCardFields:function(){return Pi},GlobalEvent:function(){return Oe},KnowledgeBaseNamespace:function(){return Eo},LegacySearchPortalSingleSelectQueryExpression:function(){return Vs},LoadingSpinnerPlugin:function(){return Zd},MessagingEvents:function(){return xe},MessagingNamespace:function(){return xl},MoveUnit:function(){return Su},MultiSelectMatcher:function(){return fl},MultiSelectMatcherTypesToDisplayValue:function(){return Us},NonRelativeMatcherTypes:function(){return Iu},NumberMatcher:function(){return zt},NumberMatcherTypesToDisplayValue:function(){return vo},PDFWebReader:function(){return Fd},PORTAL_TYPE:function(){return Eu},PageType_DUPE_1:function(){return Ci},PluginAccessScopeType:function(){return Xn},PluginActionPermissionLevel:function(){return ks},PluginCommandMenuLocation:function(){return vu},PluginRem:function(){return an},PowerupEvent:function(){return Q},PowerupNamespace:function(){return Pn},PowerupSlotCodeMap:function(){return Si},PreviewRemCards:function(){return Wd},PropertyLocation:function(){return Ds},PropertyType:function(){return bs},QueryExpressionType:function(){return Et},QueryNodeType:function(){return nt},QueryRemType:function(){return Pu},Query_DUPE_2:function(){return So},Queue:function(){return Ud},QueueEvent:function(){return Ae},QueueInteractionScore:function(){return wu},QueueItemType:function(){return Qs},QueueItemTypeHumanReadable:function(){return Ii},QueueItemTypeHumanReadableTextToSpeech:function(){return ml},QueueNamespace:function(){return nr},RICH_TEXT_ELEMENT_TYPE:function(){return _u},RICH_TEXT_FORMATTING:function(){return zn},RNPlugin:function(){return Zi},ReactRNPlugin:function(){return Rc},ReaderNamespace:function(){return en},RegisterPowerupOptions:function(){return Ou},RegisterPropertyOptions:function(){return hl},RelativeDateMatcher:function(){return mr},RelativeDateMatcherToLabel:function(){return Ru},RelativeDateModifier:function(){return yo},RelativeDatePeriod:function(){return zs},RemColor:function(){return ul},RemEvent:function(){return ie},RemHierarchyEditorTree:function(){return Bd},RemNamespace:function(){return wi},RemRichTextEditor:function(){return zd},RemType:function(){return Rs},RemTypeTinyGraph:function(){return Is},RemViewer:function(){return Ld},RichText:function(){return jd},RichTextEditor:function(){return Ad},RichTextNamespace:function(){return Zn},SchedulerExplanationType:function(){return Ns},SchedulerNamespace:function(){return Xr},SearchNamespace:function(){return Rl},SearchPortalCheckboxQueryExpression:function(){return Hs},SearchPortalDateQueryExpression:function(){return qr},SearchPortalGetCardInfoQueryNode:function(){return js},SearchPortalGroupQueryNode:function(){return dl},SearchPortalMultiSelectQueryExpression:function(){return Ws},SearchPortalNumberQueryExpression:function(){return pl},SearchPortalQuery:function(){return Ri},SearchPortalQueryExpression:function(){return $s},SearchPortalRefQueryExpression:function(){return Ls},SearchPortalRemTypeQueryExpression:function(){return ku},SearchPortalSingleSelectQueryExpression:function(){return Je},SearchPortalSlotQueryNode:function(){return As},SearchPortalTextQueryExpression:function(){return Zs},SearchPortalUnaryQueryNode:function(){return cl},SelectSourceType:function(){return Yr},SelectionType:function(){return al},SetRemType:function(){return pu},SettingEvents:function(){return H},SettingsNamespace:function(){return cn},SidebarEvents:function(){return J},SingleSelectMatcher:function(){return go},SingleSelectMatcherTypesToDisplayValue:function(){return bu},SpecialPluginCallback:function(){return Tu},StorageEvents:function(){return se},StorageNamespace:function(){return Ol},TextMatcher:function(){return Ms},TextMatcherTypesToDisplayValue:function(){return ki},TextMatchersAllowedWithoutPrimaryQuery:function(){return Yc},WidgetEvents:function(){return S},WidgetLocation:function(){return fu},WidgetNamespace:function(){return fn},WindowEvents:function(){return z},WindowNamespace:function(){return Oo},createReactiveApi:function(){return hd},declareIndexPlugin:function(){return Yd},filterAsync:function(){return uf},isAppEvent:function(){return Z},numberValidatorSig:function(){return ho},parseManifest:function(){return gp},remTypeTinyGraphToNormal:function(){return mu},remTypeToTinyGraphType:function(){return hu},renderWidget:function(){return Gd},richTextFormatNameCodeMap:function(){return Ps},stringValidatorSig:function(){return Os},useAPIEventListener:function(){return Ic},useGetRemsByIdsReactive:function(){return tf},useLocalStorageState:function(){return of},useOnMessageBroadcast:function(){return qd},usePlugin:function(){return ai},useRunAsync:function(){return af},useSessionStorageState:function(){return rf},useSyncedStorageState:function(){return lf},useTrackerPlugin:function(){return yf}});var Y={};ze.r(Y),ze.d(Y,{VERSION:function(){return Wi},after:function(){return os},all:function(){return Wa},allKeys:function(){return ni},any:function(){return si},assign:function(){return Qi},before:function(){return za},bind:function(){return mc},bindAll:function(){return gc},chain:function(){return La},chunk:function(){return Ed},clone:function(){return Zo},collect:function(){return Lr},compact:function(){return K},compose:function(){return rn},constant:function(){return Zl},contains:function(){return Hn},countBy:function(){return F},create:function(){return $},debounce:function(){return wc},default:function(){return Rf},defaults:function(){return Yl},defer:function(){return Dr},delay:function(){return Fa},detect:function(){return to},difference:function(){return ke},drop:function(){return N},each:function(){return gn},escape:function(){return Xi},every:function(){return Wa},extend:function(){return Gl},extendOwn:function(){return Qi},filter:function(){return Vn},find:function(){return to},findIndex:function(){return Wo},findKey:function(){return eo},findLastIndex:function(){return ls},findWhere:function(){return Ua},first:function(){return b},flatten:function(){return we},foldl:function(){return li},foldr:function(){return xc},forEach:function(){return gn},functions:function(){return Pr},get:function(){return ii},groupBy:function(){return V},has:function(){return Jl},head:function(){return b},identity:function(){return Ki},include:function(){return Hn},includes:function(){return Hn},indexBy:function(){return ye},indexOf:function(){return _c},initial:function(){return E},inject:function(){return li},intersection:function(){return wd},invert:function(){return Cr},invoke:function(){return as},isArguments:function(){return zl},isArray:function(){return rr},isArrayBuffer:function(){return Fl},isBoolean:function(){return ga},isDataView:function(){return Fo},isDate:function(){return oc},isElement:function(){return ic},isEmpty:function(){return cc},isEqual:function(){return Ql},isError:function(){return va},isFinite:function(){return Bl},isFunction:function(){return Dt},isMap:function(){return wt},isMatch:function(){return Hl},isNaN:function(){return Ul},isNull:function(){return rc},isNumber:function(){return ya},isObject:function(){return Rn},isRegExp:function(){return lc},isSet:function(){return ri},isString:function(){return Nt},isSymbol:function(){return wa},isTypedArray:function(){return ka},isUndefined:function(){return ma},isWeakMap:function(){return At},isWeakSet:function(){return Oa},iteratee:function(){return mn},keys:function(){return vt},last:function(){return ve},lastIndexOf:function(){return ss},map:function(){return Lr},mapObject:function(){return Yi},matcher:function(){return Wt},matches:function(){return Wt},max:function(){return o},memoize:function(){return yc},methods:function(){return Pr},min:function(){return s},mixin:function(){return od},negate:function(){return is},noop:function(){return qi},now:function(){return Or},object:function(){return _d},omit:function(){return _},once:function(){return Ar},pairs:function(){return Uo},partial:function(){return rs},partition:function(){return ee},pick:function(){return T},pluck:function(){return e},property:function(){return Ir},propertyOf:function(){return Vt},random:function(){return bn},range:function(){return xd},reduce:function(){return li},reduceRight:function(){return xc},reject:function(){return Za},rest:function(){return N},restArguments:function(){return It},result:function(){return Ji},sample:function(){return m},select:function(){return Vn},shuffle:function(){return y},size:function(){return de},some:function(){return si},sortBy:function(){return w},sortedIndex:function(){return Vo},tail:function(){return N},take:function(){return b},tap:function(){return Xl},template:function(){return ja},templateSettings:function(){return fc},throttle:function(){return vc},times:function(){return or},toArray:function(){return f},toPath:function(){return hn},transpose:function(){return Ec},unescape:function(){return nd},union:function(){return id},uniq:function(){return On},unique:function(){return On},uniqueId:function(){return hc},unzip:function(){return Ec},values:function(){return ot},where:function(){return n},without:function(){return Se},wrap:function(){return Ma},zip:function(){return kf}});var ne=Object.defineProperty,fe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Qe=c((t,r,i)=>r in t?ne(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"__defNormalProp"),M=c((t,r)=>{for(var i in r||(r={}))Pe.call(r,i)&&Qe(t,i,r[i]);if(fe)for(var i of fe(r))De.call(r,i)&&Qe(t,i,r[i]);return t},"__spreadValues");const Oe={GlobalOpenRem:"global.open-rem",URLChange:"global.url-change"},Ae={QueueLoadCard:"queue.load-card",QueueCompleteCard:"queue.complete-card",QueueEnter:"queue.enter",QueueExit:"queue.exit",RevealAnswer:"queue.reveal-answer"},te={EditorSelectionChanged:"editor.selection-changed",EditorTextEdited:"editor.text-edited"},ie={RemChanged:"rem.changed",GlobalRemChanged:"global.rem.changed"},Q={PowerupSlotChanged:"powerup.slot.changed",ClickRemReference:"powerup.click-rem-reference",MouseOverLink:"powerup.mouse-enter-link",MouseOutLink:"powerup.mouse-out-link",SetTodoStatus:"powerup.todo.set-status"},J={ClickSidebarItem:"sidebar.click-item"},xe={MessageBroadcast:"messaging.broadcast"},H={SettingChanged:"setting.changed"},se={StorageSessionChange:"storage.session.changed",StorageSyncedChange:"storage.synced.changed",StorageLocalChange:"storage.local.changed"},S={FakeEmbedComponentDimensionChange:"widget.virtual-embed-dimension-change",FakeEmbedDOMEvent:"widget.virtual-embed-dom-event",StealKeyEvent:"widget.steal-key-event"},z={FocusedPaneChange:"window.focusedPane.changed",CurrentWindowTreeChange:"window.PaneIdWindowTree.changed"},O={FocusedRemChange:"window.focusedRem.changed",FocusedPortalChange:"window.focusedPortal.changed"},I=M(M(M(M(M(M(M(M(M(M(M(M({onActivate:"onActivate",onDeactivate:"onDeactivate",setDarkMode:"setDarkMode",setCustomCSS:"setCustomCSS"},z),xe),J),Q),ie),Oe),Ae),se),S),te),H),O);function Z(t){return Object.values(I).includes(t)}c(Z,"isAppEvent");var U;(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 l(a,d=" | "){return a.map(p=>typeof p=="string"?`'${p}'`:p).join(d)}c(l,"joinValues"),t.joinValues=l,t.jsonStringifyReplacer=(a,d)=>typeof d=="bigint"?d.toString():d})(U||(U={}));var G;(function(t){t.mergeShapes=(r,i)=>P(P({},r),i)})(G||(G={}));const j=U.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ae=c(t=>{switch(typeof t){case"undefined":return j.undefined;case"string":return j.string;case"number":return isNaN(t)?j.nan:j.number;case"boolean":return j.boolean;case"function":return j.function;case"bigint":return j.bigint;case"symbol":return j.symbol;case"object":return Array.isArray(t)?j.array:t===null?j.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?j.promise:typeof Map<"u"&&t instanceof Map?j.map:typeof Set<"u"&&t instanceof Set?j.set:typeof Date<"u"&&t instanceof Date?j.date:j.object;default:return j.unknown}},"getParsedType"),D=U.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"]),Mt=c(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson");class Pt extends Error{constructor(r){super(),this.issues=[],this.addIssue=l=>{this.issues=[...this.issues,l]},this.addIssues=(l=[])=>{this.issues=[...this.issues,...l]};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},l={_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)l._errors.push(i(p));else{let h=l,g=0;for(;g<p.path.length;){const v=p.path[g];g===p.path.length-1?(h[v]=h[v]||{_errors:[]},h[v]._errors.push(i(p))):h[v]=h[v]||{_errors:[]},h=h[v],g++}}},"processError");return a(this),l}toString(){return this.message}get message(){return JSON.stringify(this.issues,U.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=i=>i.message){const i={},l=[];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))):l.push(r(a));return{formErrors:l,fieldErrors:i}}get formErrors(){return this.flatten()}}c(Pt,"ZodError"),Pt.create=t=>new Pt(t);const Dn=c((t,r)=>{let i;switch(t.code){case D.invalid_type:t.received===j.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case D.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,U.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:i=`Unrecognized key(s) in object: ${U.joinValues(t.keys,", ")}`;break;case D.invalid_union:i="Invalid input";break;case D.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${U.joinValues(t.options)}`;break;case D.invalid_enum_value:i=`Invalid enum value. Expected ${U.joinValues(t.options)}, received '${t.received}'`;break;case D.invalid_arguments:i="Invalid function arguments";break;case D.invalid_return_type:i="Invalid function return type";break;case D.invalid_date:i="Invalid date";break;case D.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}"`:U.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case D.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 D.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 D.custom:i="Invalid input";break;case D.invalid_intersection_types:i="Intersection results could not be merged";break;case D.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case D.not_finite:i="Number must be finite";break;default:i=r.defaultError,U.assertNever(t)}return{message:i}},"errorMap");let Va=Dn;function Br(t){Va=t}c(Br,"setErrorMap");function on(){return Va}c(on,"getErrorMap");const no=c(t=>{const{data:r,path:i,errorMaps:l,issueData:a}=t,d=[...i,...a.path||[]],p=B(P({},a),{path:d});let h="";const g=l.filter(v=>!!v).slice().reverse();for(const v of g)h=v(p,{data:r,defaultError:h}).message;return B(P({},a),{path:d,message:a.message||h})},"makeIssue"),Ac=[];function W(t,r){const i=no({issueData:r,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,on(),Dn].filter(l=>!!l)});t.common.issues.push(i)}c(W,"addIssueToContext");class xt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(r,i){const l=[];for(const a of i){if(a.status==="aborted")return pe;a.status==="dirty"&&r.dirty(),l.push(a.value)}return{status:r.value,value:l}}static mergeObjectAsync(r,i){return Ue(this,null,function*(){const l=[];for(const a of i)l.push({key:yield a.key,value:yield a.value});return xt.mergeObjectSync(r,l)})}static mergeObjectSync(r,i){const l={};for(const a of i){const{key:d,value:p}=a;if(d.status==="aborted"||p.status==="aborted")return pe;d.status==="dirty"&&r.dirty(),p.status==="dirty"&&r.dirty(),d.value!=="__proto__"&&(typeof p.value<"u"||a.alwaysSet)&&(l[d.value]=p.value)}return{status:r.value,value:l}}}c(xt,"ParseStatus");const pe=Object.freeze({status:"aborted"}),Yo=c(t=>({status:"dirty",value:t}),"DIRTY"),bt=c(t=>({status:"valid",value:t}),"OK"),qo=c(t=>t.status==="aborted","isAborted"),ro=c(t=>t.status==="dirty","isDirty"),ci=c(t=>t.status==="valid","isValid"),di=c(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");var oe;(function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message})(oe||(oe={}));class $t{constructor(r,i,l,a){this._cachedPath=[],this.parent=r,this.data=i,this._path=l,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($t,"ParseInputLazyPath");const Ur=c((t,r)=>{if(ci(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 Pt(t.common.issues);return this._error=i,this._error}}},"handleResult");function me(t){if(!t)return{};const{errorMap:r,invalid_type_error:i,required_error:l,description:a}=t;if(r&&(i||l))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:l??p.defaultError}:{message:i??p.defaultError},"customMap"),description:a}}c(me,"processCreateParams");class Ee{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 ae(r.data)}_getOrReturnCtx(r,i){return i||{common:r.parent.common,data:r.data,parsedType:ae(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}_processInputParams(r){return{status:new xt,ctx:{common:r.parent.common,data:r.data,parsedType:ae(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}}_parseSync(r){const i=this._parse(r);if(di(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 l=this.safeParse(r,i);if(l.success)return l.data;throw l.error}safeParse(r,i){var l;const a={common:{issues:[],async:(l=i?.async)!==null&&l!==void 0?l:!1,contextualErrorMap:i?.errorMap},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:ae(r)},d=this._parseSync({data:r,path:a.path,parent:a});return Ur(a,d)}parseAsync(r,i){return Ue(this,null,function*(){const l=yield this.safeParseAsync(r,i);if(l.success)return l.data;throw l.error})}safeParseAsync(r,i){return Ue(this,null,function*(){const l={common:{issues:[],contextualErrorMap:i?.errorMap,async:!0},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:ae(r)},a=this._parse({data:r,path:l.path,parent:l}),d=yield di(a)?a:Promise.resolve(a);return Ur(l,d)})}refine(r,i){const l=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(P({code:D.custom},l(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((l,a)=>r(l)?!0:(a.addIssue(typeof i=="function"?i(l,a):i),!1))}_refinement(r){return new qt({schema:this,typeName:re.ZodEffects,effect:{type:"refinement",refinement:r}})}superRefine(r){return this._refinement(r)}optional(){return En.create(this,this._def)}nullable(){return dr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kt.create(this,this._def)}promise(){return Yt.create(this,this._def)}or(r){return ln.create([this,r],this._def)}and(r){return jn.create(this,r,this._def)}transform(r){return new qt(B(P({},me(this._def)),{schema:this,typeName:re.ZodEffects,effect:{type:"transform",transform:r}}))}default(r){const i=typeof r=="function"?r:()=>r;return new Hr(B(P({},me(this._def)),{innerType:this,defaultValue:i,typeName:re.ZodDefault}))}brand(){return new el(P({typeName:re.ZodBranded,type:this},me(this._def)))}catch(r){const i=typeof r=="function"?r:()=>r;return new hi(B(P({},me(this._def)),{innerType:this,catchValue:i,typeName:re.ZodCatch}))}describe(r){const i=this.constructor;return new i(B(P({},this._def),{description:r}))}pipe(r){return $r.create(this,r)}readonly(){return Qr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}c(Ee,"ZodType");const Ha=/^c[^\s-]{8,}$/i,$a=/^[a-z][a-z0-9]*$/,ps=/[0-9A-HJKMNP-TV-Z]{26}/,Qa=/^[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,hs=/^([A-Z0-9_+-]+\.?)*[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xo=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Ka=/^(((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}))$/,io=/^(([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})))$/,oo=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 Ga(t,r){return!!((r==="v4"||!r)&&Ka.test(t)||(r==="v6"||!r)&&io.test(t))}c(Ga,"isValidIP");class Qt extends Ee{constructor(){super(...arguments),this._regex=(r,i,l)=>this.refinement(a=>r.test(a),P({validation:i,code:D.invalid_string},oe.errToObj(l))),this.nonempty=r=>this.min(1,oe.errToObj(r)),this.trim=()=>new Qt(B(P({},this._def),{checks:[...this._def.checks,{kind:"trim"}]})),this.toLowerCase=()=>new Qt(B(P({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]})),this.toUpperCase=()=>new Qt(B(P({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==j.string){const a=this._getOrReturnCtx(r);return W(a,{code:D.invalid_type,expected:j.string,received:a.parsedType}),pe}const i=new xt;let l;for(const a of this._def.checks)if(a.kind==="min")r.data.length<a.value&&(l=this._getOrReturnCtx(r,l),W(l,{code:D.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&&(l=this._getOrReturnCtx(r,l),W(l,{code:D.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)&&(l=this._getOrReturnCtx(r,l),d?W(l,{code:D.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):p&&W(l,{code:D.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")hs.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"email",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")Xo.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"emoji",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")Qa.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"uuid",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")Ha.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"cuid",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")$a.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"cuid2",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")ps.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"ulid",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(r.data)}catch{l=this._getOrReturnCtx(r,l),W(l,{validation:"url",code:D.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"regex",code:D.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)||(l=this._getOrReturnCtx(r,l),W(l,{code:D.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)||(l=this._getOrReturnCtx(r,l),W(l,{code:D.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?r.data.endsWith(a.value)||(l=this._getOrReturnCtx(r,l),W(l,{code:D.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?oo(a).test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{code:D.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="ip"?Ga(r.data,a.version)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"ip",code:D.invalid_string,message:a.message}),i.dirty()):U.assertNever(a);return{status:i.value,value:r.data}}_addCheck(r){return new Qt(B(P({},this._def),{checks:[...this._def.checks,r]}))}email(r){return this._addCheck(P({kind:"email"},oe.errToObj(r)))}url(r){return this._addCheck(P({kind:"url"},oe.errToObj(r)))}emoji(r){return this._addCheck(P({kind:"emoji"},oe.errToObj(r)))}uuid(r){return this._addCheck(P({kind:"uuid"},oe.errToObj(r)))}cuid(r){return this._addCheck(P({kind:"cuid"},oe.errToObj(r)))}cuid2(r){return this._addCheck(P({kind:"cuid2"},oe.errToObj(r)))}ulid(r){return this._addCheck(P({kind:"ulid"},oe.errToObj(r)))}ip(r){return this._addCheck(P({kind:"ip"},oe.errToObj(r)))}datetime(r){var i;return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:r}):this._addCheck(P({kind:"datetime",precision:typeof r?.precision>"u"?null:r?.precision,offset:(i=r?.offset)!==null&&i!==void 0?i:!1},oe.errToObj(r?.message)))}regex(r,i){return this._addCheck(P({kind:"regex",regex:r},oe.errToObj(i)))}includes(r,i){return this._addCheck(P({kind:"includes",value:r,position:i?.position},oe.errToObj(i?.message)))}startsWith(r,i){return this._addCheck(P({kind:"startsWith",value:r},oe.errToObj(i)))}endsWith(r,i){return this._addCheck(P({kind:"endsWith",value:r},oe.errToObj(i)))}min(r,i){return this._addCheck(P({kind:"min",value:r},oe.errToObj(i)))}max(r,i){return this._addCheck(P({kind:"max",value:r},oe.errToObj(i)))}length(r,i){return this._addCheck(P({kind:"length",value:r},oe.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(Qt,"ZodString"),Qt.create=t=>{var r;return new Qt(P({checks:[],typeName:re.ZodString,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},me(t)))};function ms(t,r){const i=(t.toString().split(".")[1]||"").length,l=(r.toString().split(".")[1]||"").length,a=i>l?i:l,d=parseInt(t.toFixed(a).replace(".","")),p=parseInt(r.toFixed(a).replace(".",""));return d%p/Math.pow(10,a)}c(ms,"floatSafeRemainder");class $n extends Ee{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)!==j.number){const a=this._getOrReturnCtx(r);return W(a,{code:D.invalid_type,expected:j.number,received:a.parsedType}),pe}let i;const l=new xt;for(const a of this._def.checks)a.kind==="int"?U.isInteger(r.data)||(i=this._getOrReturnCtx(r,i),W(i,{code:D.invalid_type,expected:"integer",received:"float",message:a.message}),l.dirty()):a.kind==="min"?(a.inclusive?r.data<a.value:r.data<=a.value)&&(i=this._getOrReturnCtx(r,i),W(i,{code:D.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),W(i,{code:D.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="multipleOf"?ms(r.data,a.value)!==0&&(i=this._getOrReturnCtx(r,i),W(i,{code:D.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):a.kind==="finite"?Number.isFinite(r.data)||(i=this._getOrReturnCtx(r,i),W(i,{code:D.not_finite,message:a.message}),l.dirty()):U.assertNever(a);return{status:l.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,oe.toString(i))}gt(r,i){return this.setLimit("min",r,!1,oe.toString(i))}lte(r,i){return this.setLimit("max",r,!0,oe.toString(i))}lt(r,i){return this.setLimit("max",r,!1,oe.toString(i))}setLimit(r,i,l,a){return new $n(B(P({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:l,message:oe.toString(a)}]}))}_addCheck(r){return new $n(B(P({},this._def),{checks:[...this._def.checks,r]}))}int(r){return this._addCheck({kind:"int",message:oe.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:oe.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:oe.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:oe.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:oe.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:oe.toString(i)})}finite(r){return this._addCheck({kind:"finite",message:oe.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:oe.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:oe.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"&&U.isInteger(r.value))}get isFinite(){let r=null,i=null;for(const l of this._def.checks){if(l.kind==="finite"||l.kind==="int"||l.kind==="multipleOf")return!0;l.kind==="min"?(i===null||l.value>i)&&(i=l.value):l.kind==="max"&&(r===null||l.value<r)&&(r=l.value)}return Number.isFinite(i)&&Number.isFinite(r)}}c($n,"ZodNumber"),$n.create=t=>new $n(P({checks:[],typeName:re.ZodNumber,coerce:t?.coerce||!1},me(t)));class vn extends Ee{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)!==j.bigint){const a=this._getOrReturnCtx(r);return W(a,{code:D.invalid_type,expected:j.bigint,received:a.parsedType}),pe}let i;const l=new xt;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),W(i,{code:D.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),W(i,{code:D.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="multipleOf"?r.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(r,i),W(i,{code:D.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):U.assertNever(a);return{status:l.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,oe.toString(i))}gt(r,i){return this.setLimit("min",r,!1,oe.toString(i))}lte(r,i){return this.setLimit("max",r,!0,oe.toString(i))}lt(r,i){return this.setLimit("max",r,!1,oe.toString(i))}setLimit(r,i,l,a){return new vn(B(P({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:l,message:oe.toString(a)}]}))}_addCheck(r){return new vn(B(P({},this._def),{checks:[...this._def.checks,r]}))}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:oe.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:oe.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:oe.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:oe.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:oe.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(vn,"ZodBigInt"),vn.create=t=>{var r;return new vn(P({checks:[],typeName:re.ZodBigInt,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},me(t)))};class ar extends Ee{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==j.boolean){const i=this._getOrReturnCtx(r);return W(i,{code:D.invalid_type,expected:j.boolean,received:i.parsedType}),pe}return bt(r.data)}}c(ar,"ZodBoolean"),ar.create=t=>new ar(P({typeName:re.ZodBoolean,coerce:t?.coerce||!1},me(t)));class An extends Ee{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==j.date){const a=this._getOrReturnCtx(r);return W(a,{code:D.invalid_type,expected:j.date,received:a.parsedType}),pe}if(isNaN(r.data.getTime())){const a=this._getOrReturnCtx(r);return W(a,{code:D.invalid_date}),pe}const i=new xt;let l;for(const a of this._def.checks)a.kind==="min"?r.data.getTime()<a.value&&(l=this._getOrReturnCtx(r,l),W(l,{code:D.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?r.data.getTime()>a.value&&(l=this._getOrReturnCtx(r,l),W(l,{code:D.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):U.assertNever(a);return{status:i.value,value:new Date(r.data.getTime())}}_addCheck(r){return new An(B(P({},this._def),{checks:[...this._def.checks,r]}))}min(r,i){return this._addCheck({kind:"min",value:r.getTime(),message:oe.toString(i)})}max(r,i){return this._addCheck({kind:"max",value:r.getTime(),message:oe.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(An,"ZodDate"),An.create=t=>new An(P({checks:[],coerce:t?.coerce||!1,typeName:re.ZodDate},me(t)));class Zr extends Ee{_parse(r){if(this._getType(r)!==j.symbol){const i=this._getOrReturnCtx(r);return W(i,{code:D.invalid_type,expected:j.symbol,received:i.parsedType}),pe}return bt(r.data)}}c(Zr,"ZodSymbol"),Zr.create=t=>new Zr(P({typeName:re.ZodSymbol},me(t)));class wn extends Ee{_parse(r){if(this._getType(r)!==j.undefined){const i=this._getOrReturnCtx(r);return W(i,{code:D.invalid_type,expected:j.undefined,received:i.parsedType}),pe}return bt(r.data)}}c(wn,"ZodUndefined"),wn.create=t=>new wn(P({typeName:re.ZodUndefined},me(t)));class _n extends Ee{_parse(r){if(this._getType(r)!==j.null){const i=this._getOrReturnCtx(r);return W(i,{code:D.invalid_type,expected:j.null,received:i.parsedType}),pe}return bt(r.data)}}c(_n,"ZodNull"),_n.create=t=>new _n(P({typeName:re.ZodNull},me(t)));class ur extends Ee{constructor(){super(...arguments),this._any=!0}_parse(r){return bt(r.data)}}c(ur,"ZodAny"),ur.create=t=>new ur(P({typeName:re.ZodAny},me(t)));class Qn extends Ee{constructor(){super(...arguments),this._unknown=!0}_parse(r){return bt(r.data)}}c(Qn,"ZodUnknown"),Qn.create=t=>new Qn(P({typeName:re.ZodUnknown},me(t)));class xn extends Ee{_parse(r){const i=this._getOrReturnCtx(r);return W(i,{code:D.invalid_type,expected:j.never,received:i.parsedType}),pe}}c(xn,"ZodNever"),xn.create=t=>new xn(P({typeName:re.ZodNever},me(t)));class Wr extends Ee{_parse(r){if(this._getType(r)!==j.undefined){const i=this._getOrReturnCtx(r);return W(i,{code:D.invalid_type,expected:j.void,received:i.parsedType}),pe}return bt(r.data)}}c(Wr,"ZodVoid"),Wr.create=t=>new Wr(P({typeName:re.ZodVoid},me(t)));class Kt extends Ee{_parse(r){const{ctx:i,status:l}=this._processInputParams(r),a=this._def;if(i.parsedType!==j.array)return W(i,{code:D.invalid_type,expected:j.array,received:i.parsedType}),pe;if(a.exactLength!==null){const p=i.data.length>a.exactLength.value,h=i.data.length<a.exactLength.value;(p||h)&&(W(i,{code:p?D.too_big:D.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}),l.dirty())}if(a.minLength!==null&&i.data.length<a.minLength.value&&(W(i,{code:D.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),l.dirty()),a.maxLength!==null&&i.data.length>a.maxLength.value&&(W(i,{code:D.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),l.dirty()),i.common.async)return Promise.all([...i.data].map((p,h)=>a.type._parseAsync(new $t(i,p,i.path,h)))).then(p=>xt.mergeArray(l,p));const d=[...i.data].map((p,h)=>a.type._parseSync(new $t(i,p,i.path,h)));return xt.mergeArray(l,d)}get element(){return this._def.type}min(r,i){return new Kt(B(P({},this._def),{minLength:{value:r,message:oe.toString(i)}}))}max(r,i){return new Kt(B(P({},this._def),{maxLength:{value:r,message:oe.toString(i)}}))}length(r,i){return new Kt(B(P({},this._def),{exactLength:{value:r,message:oe.toString(i)}}))}nonempty(r){return this.min(1,r)}}c(Kt,"ZodArray"),Kt.create=(t,r)=>new Kt(P({type:t,minLength:null,maxLength:null,exactLength:null,typeName:re.ZodArray},me(r)));function Kn(t){if(t instanceof et){const r={};for(const i in t.shape){const l=t.shape[i];r[i]=En.create(Kn(l))}return new et(B(P({},t._def),{shape:()=>r}))}else return t instanceof Kt?new Kt(B(P({},t._def),{type:Kn(t.element)})):t instanceof En?En.create(Kn(t.unwrap())):t instanceof dr?dr.create(Kn(t.unwrap())):t instanceof Gt?Gt.create(t.items.map(r=>Kn(r))):t}c(Kn,"deepPartialify");class et extends Ee{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=U.objectKeys(r);return this._cached={shape:r,keys:i}}_parse(r){if(this._getType(r)!==j.object){const g=this._getOrReturnCtx(r);return W(g,{code:D.invalid_type,expected:j.object,received:g.parsedType}),pe}const{status:i,ctx:l}=this._processInputParams(r),{shape:a,keys:d}=this._getCached(),p=[];if(!(this._def.catchall instanceof xn&&this._def.unknownKeys==="strip"))for(const g in l.data)d.includes(g)||p.push(g);const h=[];for(const g of d){const v=a[g],X=l.data[g];h.push({key:{status:"valid",value:g},value:v._parse(new $t(l,X,l.path,g)),alwaysSet:g in l.data})}if(this._def.catchall instanceof xn){const g=this._def.unknownKeys;if(g==="passthrough")for(const v of p)h.push({key:{status:"valid",value:v},value:{status:"valid",value:l.data[v]}});else if(g==="strict")p.length>0&&(W(l,{code:D.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 v of p){const X=l.data[v];h.push({key:{status:"valid",value:v},value:g._parse(new $t(l,X,l.path,v)),alwaysSet:v in l.data})}}return l.common.async?Promise.resolve().then(()=>Ue(this,null,function*(){const g=[];for(const v of h){const X=yield v.key;g.push({key:X,value:yield v.value,alwaysSet:v.alwaysSet})}return g})).then(g=>xt.mergeObjectSync(i,g)):xt.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(r){return oe.errToObj,new et(P(B(P({},this._def),{unknownKeys:"strict"}),r!==void 0?{errorMap:(i,l)=>{var a,d,p,h;const g=(p=(d=(a=this._def).errorMap)===null||d===void 0?void 0:d.call(a,i,l).message)!==null&&p!==void 0?p:l.defaultError;return i.code==="unrecognized_keys"?{message:(h=oe.errToObj(r).message)!==null&&h!==void 0?h:g}:{message:g}}}:{}))}strip(){return new et(B(P({},this._def),{unknownKeys:"strip"}))}passthrough(){return new et(B(P({},this._def),{unknownKeys:"passthrough"}))}extend(r){return new et(B(P({},this._def),{shape:()=>P(P({},this._def.shape()),r)}))}merge(r){return new et({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>P(P({},this._def.shape()),r._def.shape()),typeName:re.ZodObject})}setKey(r,i){return this.augment({[r]:i})}catchall(r){return new et(B(P({},this._def),{catchall:r}))}pick(r){const i={};return U.objectKeys(r).forEach(l=>{r[l]&&this.shape[l]&&(i[l]=this.shape[l])}),new et(B(P({},this._def),{shape:()=>i}))}omit(r){const i={};return U.objectKeys(this.shape).forEach(l=>{r[l]||(i[l]=this.shape[l])}),new et(B(P({},this._def),{shape:()=>i}))}deepPartial(){return Kn(this)}partial(r){const i={};return U.objectKeys(this.shape).forEach(l=>{const a=this.shape[l];r&&!r[l]?i[l]=a:i[l]=a.optional()}),new et(B(P({},this._def),{shape:()=>i}))}required(r){const i={};return U.objectKeys(this.shape).forEach(l=>{if(r&&!r[l])i[l]=this.shape[l];else{let a=this.shape[l];for(;a instanceof En;)a=a._def.innerType;i[l]=a}}),new et(B(P({},this._def),{shape:()=>i}))}keyof(){return gs(U.objectKeys(this.shape))}}c(et,"ZodObject"),et.create=(t,r)=>new et(P({shape:()=>t,unknownKeys:"strip",catchall:xn.create(),typeName:re.ZodObject},me(r))),et.strictCreate=(t,r)=>new et(P({shape:()=>t,unknownKeys:"strict",catchall:xn.create(),typeName:re.ZodObject},me(r))),et.lazycreate=(t,r)=>new et(P({shape:t,unknownKeys:"strip",catchall:xn.create(),typeName:re.ZodObject},me(r)));class ln extends Ee{_parse(r){const{ctx:i}=this._processInputParams(r),l=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 Pt(h.ctx.common.issues));return W(i,{code:D.invalid_union,unionErrors:p}),pe}if(c(a,"handleResults"),i.common.async)return Promise.all(l.map(d=>Ue(this,null,function*(){const p=B(P({},i),{common:B(P({},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 l){const v=B(P({},i),{common:B(P({},i.common),{issues:[]}),parent:null}),X=g._parseSync({data:i.data,path:i.path,parent:v});if(X.status==="valid")return X;X.status==="dirty"&&!d&&(d={result:X,ctx:v}),v.common.issues.length&&p.push(v.common.issues)}if(d)return i.common.issues.push(...d.ctx.common.issues),d.result;const h=p.map(g=>new Pt(g));return W(i,{code:D.invalid_union,unionErrors:h}),pe}}get options(){return this._def.options}}c(ln,"ZodUnion"),ln.create=(t,r)=>new ln(P({options:t,typeName:re.ZodUnion},me(r)));const fi=c(t=>t instanceof Gn?fi(t.schema):t instanceof qt?fi(t.innerType()):t instanceof cr?[t.value]:t instanceof Yn?t.options:t instanceof pi?Object.keys(t.enum):t instanceof Hr?fi(t._def.innerType):t instanceof wn?[void 0]:t instanceof _n?[null]:null,"getDiscriminator");class Vr extends Ee{_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==j.object)return W(i,{code:D.invalid_type,expected:j.object,received:i.parsedType}),pe;const l=this.discriminator,a=i.data[l],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}):(W(i,{code:D.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[l]}),pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(r,i,l){const a=new Map;for(const d of i){const p=fi(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 Vr(P({typeName:re.ZodDiscriminatedUnion,discriminator:r,options:i,optionsMap:a},me(l)))}}c(Vr,"ZodDiscriminatedUnion");function Jo(t,r){const i=ae(t),l=ae(r);if(t===r)return{valid:!0,data:t};if(i===j.object&&l===j.object){const a=U.objectKeys(r),d=U.objectKeys(t).filter(h=>a.indexOf(h)!==-1),p=P(P({},t),r);for(const h of d){const g=Jo(t[h],r[h]);if(!g.valid)return{valid:!1};p[h]=g.data}return{valid:!0,data:p}}else if(i===j.array&&l===j.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=Jo(p,h);if(!g.valid)return{valid:!1};a.push(g.data)}return{valid:!0,data:a}}else return i===j.date&&l===j.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}c(Jo,"mergeValues");class jn extends Ee{_parse(r){const{status:i,ctx:l}=this._processInputParams(r),a=c((d,p)=>{if(qo(d)||qo(p))return pe;const h=Jo(d.value,p.value);return h.valid?((ro(d)||ro(p))&&i.dirty(),{status:i.value,value:h.data}):(W(l,{code:D.invalid_intersection_types}),pe)},"handleParsed");return l.common.async?Promise.all([this._def.left._parseAsync({data:l.data,path:l.path,parent:l}),this._def.right._parseAsync({data:l.data,path:l.path,parent:l})]).then(([d,p])=>a(d,p)):a(this._def.left._parseSync({data:l.data,path:l.path,parent:l}),this._def.right._parseSync({data:l.data,path:l.path,parent:l}))}}c(jn,"ZodIntersection"),jn.create=(t,r,i)=>new jn(P({left:t,right:r,typeName:re.ZodIntersection},me(i)));class Gt extends Ee{_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==j.array)return W(l,{code:D.invalid_type,expected:j.array,received:l.parsedType}),pe;if(l.data.length<this._def.items.length)return W(l,{code:D.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),pe;!this._def.rest&&l.data.length>this._def.items.length&&(W(l,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const a=[...l.data].map((d,p)=>{const h=this._def.items[p]||this._def.rest;return h?h._parse(new $t(l,d,l.path,p)):null}).filter(d=>!!d);return l.common.async?Promise.all(a).then(d=>xt.mergeArray(i,d)):xt.mergeArray(i,a)}get items(){return this._def.items}rest(r){return new Gt(B(P({},this._def),{rest:r}))}}c(Gt,"ZodTuple"),Gt.create=(t,r)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gt(P({items:t,typeName:re.ZodTuple,rest:null},me(r)))};class Ln extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==j.object)return W(l,{code:D.invalid_type,expected:j.object,received:l.parsedType}),pe;const a=[],d=this._def.keyType,p=this._def.valueType;for(const h in l.data)a.push({key:d._parse(new $t(l,h,l.path,h)),value:p._parse(new $t(l,l.data[h],l.path,h))});return l.common.async?xt.mergeObjectAsync(i,a):xt.mergeObjectSync(i,a)}get element(){return this._def.valueType}static create(r,i,l){return i instanceof Ee?new Ln(P({keyType:r,valueType:i,typeName:re.ZodRecord},me(l))):new Ln(P({keyType:Qt.create(),valueType:r,typeName:re.ZodRecord},me(i)))}}c(Ln,"ZodRecord");class lo extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==j.map)return W(l,{code:D.invalid_type,expected:j.map,received:l.parsedType}),pe;const a=this._def.keyType,d=this._def.valueType,p=[...l.data.entries()].map(([h,g],v)=>({key:a._parse(new $t(l,h,l.path,[v,"key"])),value:d._parse(new $t(l,g,l.path,[v,"value"]))}));if(l.common.async){const h=new Map;return Promise.resolve().then(()=>Ue(this,null,function*(){for(const g of p){const v=yield g.key,X=yield g.value;if(v.status==="aborted"||X.status==="aborted")return pe;(v.status==="dirty"||X.status==="dirty")&&i.dirty(),h.set(v.value,X.value)}return{status:i.value,value:h}}))}else{const h=new Map;for(const g of p){const v=g.key,X=g.value;if(v.status==="aborted"||X.status==="aborted")return pe;(v.status==="dirty"||X.status==="dirty")&&i.dirty(),h.set(v.value,X.value)}return{status:i.value,value:h}}}}c(lo,"ZodMap"),lo.create=(t,r,i)=>new lo(P({valueType:r,keyType:t,typeName:re.ZodMap},me(i)));class sn extends Ee{_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==j.set)return W(l,{code:D.invalid_type,expected:j.set,received:l.parsedType}),pe;const a=this._def;a.minSize!==null&&l.data.size<a.minSize.value&&(W(l,{code:D.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),i.dirty()),a.maxSize!==null&&l.data.size>a.maxSize.value&&(W(l,{code:D.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 v=new Set;for(const X of g){if(X.status==="aborted")return pe;X.status==="dirty"&&i.dirty(),v.add(X.value)}return{status:i.value,value:v}}c(p,"finalizeSet");const h=[...l.data.values()].map((g,v)=>d._parse(new $t(l,g,l.path,v)));return l.common.async?Promise.all(h).then(g=>p(g)):p(h)}min(r,i){return new sn(B(P({},this._def),{minSize:{value:r,message:oe.toString(i)}}))}max(r,i){return new sn(B(P({},this._def),{maxSize:{value:r,message:oe.toString(i)}}))}size(r,i){return this.min(r,i).max(r,i)}nonempty(r){return this.min(1,r)}}c(sn,"ZodSet"),sn.create=(t,r)=>new sn(P({valueType:t,minSize:null,maxSize:null,typeName:re.ZodSet},me(r)));class Fn extends Ee{constructor(){super(...arguments),this.validate=this.implement}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==j.function)return W(i,{code:D.invalid_type,expected:j.function,received:i.parsedType}),pe;function l(h,g){return no({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,on(),Dn].filter(v=>!!v),issueData:{code:D.invalid_arguments,argumentsError:g}})}c(l,"makeArgsIssue");function a(h,g){return no({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,on(),Dn].filter(v=>!!v),issueData:{code:D.invalid_return_type,returnTypeError:g}})}c(a,"makeReturnsIssue");const d={errorMap:i.common.contextualErrorMap},p=i.data;if(this._def.returns instanceof Yt){const h=this;return bt(function(...g){return Ue(this,null,function*(){const v=new Pt([]),X=yield h._def.args.parseAsync(g,d).catch(Ft=>{throw v.addIssue(l(g,Ft)),v}),Te=yield Reflect.apply(p,this,X);return yield h._def.returns._def.type.parseAsync(Te,d).catch(Ft=>{throw v.addIssue(a(Te,Ft)),v})})})}else{const h=this;return bt(function(...g){const v=h._def.args.safeParse(g,d);if(!v.success)throw new Pt([l(g,v.error)]);const X=Reflect.apply(p,this,v.data),Te=h._def.returns.safeParse(X,d);if(!Te.success)throw new Pt([a(X,Te.error)]);return Te.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...r){return new Fn(B(P({},this._def),{args:Gt.create(r).rest(Qn.create())}))}returns(r){return new Fn(B(P({},this._def),{returns:r}))}implement(r){return this.parse(r)}strictImplement(r){return this.parse(r)}static create(r,i,l){return new Fn(P({args:r||Gt.create([]).rest(Qn.create()),returns:i||Qn.create(),typeName:re.ZodFunction},me(l)))}}c(Fn,"ZodFunction");class Gn extends Ee{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(Gn,"ZodLazy"),Gn.create=(t,r)=>new Gn(P({getter:t,typeName:re.ZodLazy},me(r)));class cr extends Ee{_parse(r){if(r.data!==this._def.value){const i=this._getOrReturnCtx(r);return W(i,{received:i.data,code:D.invalid_literal,expected:this._def.value}),pe}return{status:"valid",value:r.data}}get value(){return this._def.value}}c(cr,"ZodLiteral"),cr.create=(t,r)=>new cr(P({value:t,typeName:re.ZodLiteral},me(r)));function gs(t,r){return new Yn(P({values:t,typeName:re.ZodEnum},me(r)))}c(gs,"createZodEnum");class Yn extends Ee{_parse(r){if(typeof r.data!="string"){const i=this._getOrReturnCtx(r),l=this._def.values;return W(i,{expected:U.joinValues(l),received:i.parsedType,code:D.invalid_type}),pe}if(this._def.values.indexOf(r.data)===-1){const i=this._getOrReturnCtx(r),l=this._def.values;return W(i,{received:i.data,code:D.invalid_enum_value,options:l}),pe}return bt(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 Yn.create(r)}exclude(r){return Yn.create(this.options.filter(i=>!r.includes(i)))}}c(Yn,"ZodEnum"),Yn.create=gs;class pi extends Ee{_parse(r){const i=U.getValidEnumValues(this._def.values),l=this._getOrReturnCtx(r);if(l.parsedType!==j.string&&l.parsedType!==j.number){const a=U.objectValues(i);return W(l,{expected:U.joinValues(a),received:l.parsedType,code:D.invalid_type}),pe}if(i.indexOf(r.data)===-1){const a=U.objectValues(i);return W(l,{received:l.data,code:D.invalid_enum_value,options:a}),pe}return bt(r.data)}get enum(){return this._def.values}}c(pi,"ZodNativeEnum"),pi.create=(t,r)=>new pi(P({values:t,typeName:re.ZodNativeEnum},me(r)));class Yt extends Ee{unwrap(){return this._def.type}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==j.promise&&i.common.async===!1)return W(i,{code:D.invalid_type,expected:j.promise,received:i.parsedType}),pe;const l=i.parsedType===j.promise?i.data:Promise.resolve(i.data);return bt(l.then(a=>this._def.type.parseAsync(a,{path:i.path,errorMap:i.common.contextualErrorMap})))}}c(Yt,"ZodPromise"),Yt.create=(t,r)=>new Yt(P({type:t,typeName:re.ZodPromise},me(r)));class qt extends Ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){const{status:i,ctx:l}=this._processInputParams(r),a=this._def.effect||null,d={addIssue:p=>{W(l,p),p.fatal?i.abort():i.dirty()},get path(){return l.path}};if(d.addIssue=d.addIssue.bind(d),a.type==="preprocess"){const p=a.transform(l.data,d);return l.common.issues.length?{status:"dirty",value:l.data}:l.common.async?Promise.resolve(p).then(h=>this._def.schema._parseAsync({data:h,path:l.path,parent:l})):this._def.schema._parseSync({data:p,path:l.path,parent:l})}if(a.type==="refinement"){const p=c(h=>{const g=a.refinement(h,d);if(l.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(l.common.async===!1){const h=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});return h.status==="aborted"?pe:(h.status==="dirty"&&i.dirty(),p(h.value),{status:i.value,value:h.value})}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(h=>h.status==="aborted"?pe:(h.status==="dirty"&&i.dirty(),p(h.value).then(()=>({status:i.value,value:h.value}))))}if(a.type==="transform")if(l.common.async===!1){const p=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});if(!ci(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:l.data,path:l.path,parent:l}).then(p=>ci(p)?Promise.resolve(a.transform(p.value,d)).then(h=>({status:i.value,value:h})):p);U.assertNever(a)}}c(qt,"ZodEffects"),qt.create=(t,r,i)=>new qt(P({schema:t,typeName:re.ZodEffects,effect:r},me(i))),qt.createWithPreprocess=(t,r,i)=>new qt(P({schema:r,effect:{type:"preprocess",transform:t},typeName:re.ZodEffects},me(i)));class En extends Ee{_parse(r){return this._getType(r)===j.undefined?bt(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}c(En,"ZodOptional"),En.create=(t,r)=>new En(P({innerType:t,typeName:re.ZodOptional},me(r)));class dr extends Ee{_parse(r){return this._getType(r)===j.null?bt(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}c(dr,"ZodNullable"),dr.create=(t,r)=>new dr(P({innerType:t,typeName:re.ZodNullable},me(r)));class Hr extends Ee{_parse(r){const{ctx:i}=this._processInputParams(r);let l=i.data;return i.parsedType===j.undefined&&(l=this._def.defaultValue()),this._def.innerType._parse({data:l,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}c(Hr,"ZodDefault"),Hr.create=(t,r)=>new Hr(P({innerType:t,typeName:re.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default},me(r)));class hi extends Ee{_parse(r){const{ctx:i}=this._processInputParams(r),l=B(P({},i),{common:B(P({},i.common),{issues:[]})}),a=this._def.innerType._parse({data:l.data,path:l.path,parent:P({},l)});return di(a)?a.then(d=>({status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new Pt(l.common.issues)},input:l.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Pt(l.common.issues)},input:l.data})}}removeCatch(){return this._def.innerType}}c(hi,"ZodCatch"),hi.create=(t,r)=>new hi(P({innerType:t,typeName:re.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch},me(r)));class mi extends Ee{_parse(r){if(this._getType(r)!==j.nan){const i=this._getOrReturnCtx(r);return W(i,{code:D.invalid_type,expected:j.nan,received:i.parsedType}),pe}return{status:"valid",value:r.data}}}c(mi,"ZodNaN"),mi.create=t=>new mi(P({typeName:re.ZodNaN},me(t)));const ys=Symbol("zod_brand");class el extends Ee{_parse(r){const{ctx:i}=this._processInputParams(r),l=i.data;return this._def.type._parse({data:l,path:i.path,parent:i})}unwrap(){return this._def.type}}c(el,"ZodBranded");class $r extends Ee{_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.common.async)return c(()=>Ue(this,null,function*(){const a=yield this._def.in._parseAsync({data:l.data,path:l.path,parent:l});return a.status==="aborted"?pe:a.status==="dirty"?(i.dirty(),Yo(a.value)):this._def.out._parseAsync({data:a.value,path:l.path,parent:l})}),"handleAsync")();{const a=this._def.in._parseSync({data:l.data,path:l.path,parent:l});return a.status==="aborted"?pe:a.status==="dirty"?(i.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:l.path,parent:l})}}static create(r,i){return new $r({in:r,out:i,typeName:re.ZodPipeline})}}c($r,"ZodPipeline");class Qr extends Ee{_parse(r){const i=this._def.innerType._parse(r);return ci(i)&&(i.value=Object.freeze(i.value)),i}}c(Qr,"ZodReadonly"),Qr.create=(t,r)=>new Qr(P({innerType:t,typeName:re.ZodReadonly},me(r)));const Sn=c((t,r={},i)=>t?ur.create().superRefine((l,a)=>{var d,p;if(!t(l)){const h=typeof r=="function"?r(l):typeof r=="string"?{message:r}:r,g=(p=(d=h.fatal)!==null&&d!==void 0?d:i)!==null&&p!==void 0?p:!0,v=typeof h=="string"?{message:h}:h;a.addIssue(B(P({code:"custom"},v),{fatal:g}))}}):ur.create(),"custom"),fr={object:et.lazycreate};var re;(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"})(re||(re={}));const pr=c((t,r={message:`Input not instance of ${t.name}`})=>Sn(i=>i instanceof t,r),"instanceOfType"),gi=Qt.create,yi=$n.create,so=mi.create,Ya=vn.create,tl=ar.create,qa=An.create,ao=Zr.create,jc=wn.create,Lc=_n.create,nl=ur.create,Xa=Qn.create,Fc=xn.create,uo=Wr.create,Ja=Kt.create,rl=et.create,vi=et.strictCreate,vs=ln.create,eu=Vr.create,il=jn.create,tu=Gt.create,nu=Ln.create,ru=lo.create,iu=sn.create,ou=Fn.create,ws=Gn.create,Mc=cr.create,_s=Yn.create,zc=pi.create,Xe=Yt.create,Kr=qt.create,Bc=En.create,Uc=dr.create,co=qt.createWithPreprocess,lu=$r.create;var x=Object.freeze({__proto__:null,defaultErrorMap:Dn,setErrorMap:Br,getErrorMap:on,makeIssue:no,EMPTY_PATH:Ac,addIssueToContext:W,ParseStatus:xt,INVALID:pe,DIRTY:Yo,OK:bt,isAborted:qo,isDirty:ro,isValid:ci,isAsync:di,get util(){return U},get objectUtil(){return G},ZodParsedType:j,getParsedType:ae,ZodType:Ee,ZodString:Qt,ZodNumber:$n,ZodBigInt:vn,ZodBoolean:ar,ZodDate:An,ZodSymbol:Zr,ZodUndefined:wn,ZodNull:_n,ZodAny:ur,ZodUnknown:Qn,ZodNever:xn,ZodVoid:Wr,ZodArray:Kt,ZodObject:et,ZodUnion:ln,ZodDiscriminatedUnion:Vr,ZodIntersection:jn,ZodTuple:Gt,ZodRecord:Ln,ZodMap:lo,ZodSet:sn,ZodFunction:Fn,ZodLazy:Gn,ZodLiteral:cr,ZodEnum:Yn,ZodNativeEnum:pi,ZodPromise:Yt,ZodEffects:qt,ZodTransformer:qt,ZodOptional:En,ZodNullable:dr,ZodDefault:Hr,ZodCatch:hi,ZodNaN:mi,BRAND:ys,ZodBranded:el,ZodPipeline:$r,ZodReadonly:Qr,custom:Sn,Schema:Ee,ZodSchema:Ee,late:fr,get ZodFirstPartyTypeKind(){return re},coerce:{string:t=>Qt.create(B(P({},t),{coerce:!0})),number:t=>$n.create(B(P({},t),{coerce:!0})),boolean:t=>ar.create(B(P({},t),{coerce:!0})),bigint:t=>vn.create(B(P({},t),{coerce:!0})),date:t=>An.create(B(P({},t),{coerce:!0}))},any:nl,array:Ja,bigint:Ya,boolean:tl,date:qa,discriminatedUnion:eu,effect:Kr,enum:_s,function:ou,instanceof:pr,intersection:il,lazy:ws,literal:Mc,map:ru,nan:so,nativeEnum:zc,never:Fc,null:Lc,nullable:Uc,number:yi,object:rl,oboolean:c(()=>tl().optional(),"oboolean"),onumber:c(()=>yi().optional(),"onumber"),optional:Bc,ostring:c(()=>gi().optional(),"ostring"),pipeline:lu,preprocess:co,promise:Xe,record:nu,set:iu,strictObject:vi,string:gi,symbol:ao,transformer:Kr,tuple:tu,undefined:jc,union:vs,unknown:Xa,void:uo,NEVER:pe,ZodIssueCode:D,quotelessJson:Mt,ZodError:Pt});function hr(t,r){return(i,l)=>t(i,l,r)}c(hr,"makeNamespacedCall");var xs=Object.defineProperty,ol=c((t,r,i)=>r in t?xs(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"base_defNormalProp"),qn=c((t,r,i)=>(ol(t,typeof r!="symbol"?r+"":r,i),i),"__publicField");class dt{constructor(r,i){qn(this,"_call"),qn(this,"call"),this._call=r,this.call=hr(this._call,i)}}c(dt,"NamespaceBase");function ht(t){return typeof t=="string"?t:t instanceof an?t._id:t}c(ht,"getRemId");const su=c(t=>t.map(ht),"getRemIds");var Zc=Object.defineProperty,au=Object.getOwnPropertySymbols,ll=Object.prototype.hasOwnProperty,Wc=Object.prototype.propertyIsEnumerable,Es=c((t,r,i)=>r in t?Zc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rem_defNormalProp"),Ss=c((t,r)=>{for(var i in r||(r={}))ll.call(r,i)&&Es(t,i,r[i]);if(au)for(var i of au(r))Wc.call(r,i)&&Es(t,i,r[i]);return t},"rem_spreadValues"),k=c((t,r,i)=>(Es(t,typeof r!="symbol"?r+"":r,i),i),"rem_publicField"),R=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"__async");class an{constructor(r,i){k(this,"_id"),k(this,"createdAt"),k(this,"localUpdatedAt"),k(this,"updatedAt"),k(this,"parent"),k(this,"children"),k(this,"type"),k(this,"text"),k(this,"backText"),k(this,"_callMethod"),k(this,"call",(l,a)=>R(this,null,function*(){return yield this._callMethod(l,Ss({remId:this._id},a),_i)})),k(this,"callAndReturnRem",(l,a)=>R(this,null,function*(){const d=yield this.call(l,a);if(d)return new an(d,this._callMethod.bind(this))})),k(this,"callAndReturnManyRem",(l,a)=>R(this,null,function*(){const d=yield this.call(l,a);return d?d.map(p=>new an(p,this._callMethod.bind(this))):[]})),k(this,"setTableFilter",l=>R(this,null,function*(){return yield this.call("setTableFilter",{filter:l})})),k(this,"isTable",()=>R(this,null,function*(){return yield this.call("isTable",{})})),k(this,"allRemInFolderQueue",()=>R(this,null,function*(){return((yield this.call("allRemInFolderQueue",{}))||[]).map(l=>new an(l,this._callMethod.bind(this)))})),k(this,"positionAmongstSiblings",l=>R(this,null,function*(){return this.call("positionAmongstSiblings",{portalId:l})})),k(this,"positionAmongstVisibleSiblings",l=>R(this,null,function*(){return this.call("positionAmongstVisibleSiblings",{portalId:l})})),k(this,"hasPowerup",l=>R(this,null,function*(){return yield this.call("hasPowerup",{powerupCode:l})})),k(this,"getHiddenExplicitlyIncludedState",l=>R(this,null,function*(){return yield this.call("getHiddenExplicitlyIncludedState",{portalId:l})})),k(this,"setHiddenExplicitlyIncludedState",(l,a)=>R(this,null,function*(){return yield this.call("setHiddenExplicitlyIncludedState",{hiddenExplicitlyIncludedState:l,portalId:a})})),k(this,"getLastPracticed",()=>R(this,null,function*(){return yield this.call("getLastPracticed",{})})),k(this,"addPowerup",l=>R(this,null,function*(){return yield this.call("addPowerup",{powerupCode:l})})),k(this,"getLastTimeMovedTo",()=>R(this,null,function*(){return yield this.call("getLastTimeMovedTo",{})})),k(this,"getSchemaVersion",()=>R(this,null,function*(){return yield this.call("getSchemaVersion",{})})),k(this,"embeddedQueueViewMode",()=>R(this,null,function*(){return yield this.call("embeddedQueueViewMode",{})})),k(this,"isCollapsed",l=>R(this,null,function*(){return yield this.call("isCollapsed",{portalId:l})})),k(this,"setIsCollapsed",(l,a)=>R(this,null,function*(){return yield this.call("setIsCollapsed",{isCollapsed:l,portalId:a})})),k(this,"timesSelectedInSearch",()=>R(this,null,function*(){return yield this.call("timesSelectedInSearch",{})})),k(this,"getPortalType",()=>R(this,null,function*(){return yield this.call("getPortalType",{})})),k(this,"getPortalDirectlyIncludedRem",()=>R(this,null,function*(){return yield this.call("getPortalDirectlyIncludedRem",{})})),k(this,"getType",()=>R(this,null,function*(){return yield this.call("getType",{})})),k(this,"setPowerupProperty",(l,a,d)=>R(this,null,function*(){const p=Object.values(Jn).includes(l)?Si[l][a]:a;return yield this.call("setPowerupProperty",{powerupCode:l,powerupSlot:p,value:d})})),k(this,"getPowerupProperty",(l,a)=>R(this,null,function*(){const d=Object.values(Jn).includes(l)?Si[l][a]:a;return yield this.call("getPowerupProperty",{powerupCode:l,powerupSlot:d})})),k(this,"getPowerupPropertyAsRem",(l,a)=>R(this,null,function*(){const d=Object.values(Jn).includes(l)?Si[l][a]:a;return yield this.callAndReturnRem("getPowerupPropertyAsRem",{powerupCode:l,powerupSlot:d})})),k(this,"getTagPropertyAsRem",l=>R(this,null,function*(){return yield this.callAndReturnRem("getTagPropertyAsRem",{propertyId:l})})),k(this,"getPowerupPropertyAsRichText",(l,a)=>R(this,null,function*(){const d=Object.values(Jn).includes(l)?Si[l][a]:a;return yield this.call("getPowerupPropertyAsRichText",{powerupCode:l,powerupSlot:d})})),k(this,"setText",l=>R(this,null,function*(){return yield this.call("setText",{text:l})})),k(this,"setBackText",l=>R(this,null,function*(){return yield this.call("setBackText",{backText:l})})),k(this,"getTagPropertyValue",l=>R(this,null,function*(){return yield this.call("getTagPropertyValue",{propertyId:l})})),k(this,"getPropertyType",()=>R(this,null,function*(){return yield this.call("getPropertyType",{})})),k(this,"setTagPropertyValue",(l,a)=>R(this,null,function*(){return yield this.call("setTagPropertyValue",{propertyId:l,value:a})})),k(this,"removeTag",(l,a=!1)=>R(this,null,function*(){return yield this.call(a?"removeTagAndSlots":"removeTag",{tagId:l})})),k(this,"removePowerup",l=>R(this,null,function*(){return yield this.call("removePowerup",{powerupCode:l})})),k(this,"addTag",l=>R(this,null,function*(){const a=ht(l);return yield this.call("addTag",{tagId:a})})),k(this,"remove",()=>R(this,null,function*(){return yield this.call("remove",{})})),k(this,"getTagRems",()=>R(this,null,function*(){return this.callAndReturnManyRem("getTagRems",{})})),k(this,"addToPortal",l=>R(this,null,function*(){const a=ht(l);return yield this.call("addToPortal",{portalId:a})})),k(this,"removeFromPortal",l=>R(this,null,function*(){const a=ht(l);return yield this.call("removeFromPortal",{portalId:a})})),k(this,"setParent",(l,a)=>R(this,null,function*(){const d=ht(l);return yield this.call("setParent",{parentId:d,positionAmongstSiblings:a})})),k(this,"getOrCreateAliasWithText",l=>R(this,null,function*(){return yield this.callAndReturnRem("getOrCreateAliasWithText",{aliasText:l})})),k(this,"getChildrenRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("getChildrenRem")})),k(this,"allRemInDocumentOrPortal",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("allRemInDocumentOrPortal")})),k(this,"expand",(l,a)=>R(this,null,function*(){const d=ht(l);return yield this.call("expand",{portalId:d,recurse:a})})),k(this,"collapse",l=>R(this,null,function*(){const a=ht(l);return yield this.call("collapse",{portalId:a})})),k(this,"siblingRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("siblingRem")})),k(this,"visibleSiblingRem",l=>R(this,null,function*(){return yield this.callAndReturnManyRem("visibleSiblingRem",{portalId:l})})),k(this,"taggedRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("taggedRem")})),k(this,"ancestorTagRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("ancestorTagRem")})),k(this,"descendantTagRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("descendantTagRem")})),k(this,"getDescendants",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("getDescendants")})),k(this,"getCards",()=>R(this,null,function*(){const l=yield this.call("getCards");return l?.map(a=>new Mn(a,this._callMethod))||[]})),k(this,"getAliases",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("getAliases")})),k(this,"getParentRem",()=>R(this,null,function*(){return yield this.callAndReturnRem("getParentRem")})),k(this,"portalsAndDocumentsIn",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("portalsAndDocumentsIn")})),k(this,"merge",l=>R(this,null,function*(){return yield this.call("merge",{remIdToMergeIntoThisOne:l})})),k(this,"mergeAndSetAlias",l=>R(this,null,function*(){const a=ht(l);return yield this.call("mergeAndSetAlias",{remIdToMergeIntoThisOne:a})})),k(this,"indent",l=>R(this,null,function*(){const a=ht(l);return yield this.call("indent",{portalId:a})})),k(this,"outdent",l=>R(this,null,function*(){const a=ht(l);return yield this.call("outdent",{portalId:a})})),k(this,"setType",l=>R(this,null,function*(){return yield this.call("setType",{type:l})})),k(this,"remsReferencingThis",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("remsReferencingThis")})),k(this,"remsBeingReferenced",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("remsBeingReferenced")})),k(this,"deepRemsBeingReferenced",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("deepRemsBeingReferenced")})),k(this,"getSources",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("getSources")})),k(this,"addSource",l=>R(this,null,function*(){const a=ht(l);return yield this.call("addSource",{sourceId:a})})),k(this,"removeSource",l=>R(this,null,function*(){const a=ht(l);return yield this.call("removeSource",{sourceId:a})})),k(this,"isDocument",()=>R(this,null,function*(){return yield this.call("isDocument")})),k(this,"setIsDocument",l=>R(this,null,function*(){return yield this.call("setIsDocument",{isDocument:l})})),k(this,"isListItem",()=>R(this,null,function*(){return yield this.call("isListItem")})),k(this,"setIsListItem",l=>R(this,null,function*(){return yield this.call("setIsListItem",{isListItem:l})})),k(this,"isCardItem",()=>R(this,null,function*(){return yield this.call("isMultilineCard")})),k(this,"setIsCardItem",l=>R(this,null,function*(){return yield this.call("setIsMultilineCard",{isCardItem:l})})),k(this,"isQuote",()=>R(this,null,function*(){return yield this.call("isQuote")})),k(this,"setIsQuote",l=>R(this,null,function*(){yield this.call("setIsQuote",{isQuote:l})})),k(this,"isCode",()=>R(this,null,function*(){return yield this.call("isCode")})),k(this,"setIsCode",l=>R(this,null,function*(){yield this.call("setIsCode",{isCode:l})})),k(this,"isTodo",()=>R(this,null,function*(){return yield this.call("isTodo")})),k(this,"setIsTodo",l=>R(this,null,function*(){yield this.call("setIsTodo",{isTodo:l})})),k(this,"getTodoStatus",()=>R(this,null,function*(){return yield this.call("getTodoStatus")})),k(this,"setTodoStatus",l=>R(this,null,function*(){return yield this.call("setTodoStatus",{todoStatus:l})})),k(this,"getFontSize",()=>R(this,null,function*(){return yield this.call("getFontSize")})),k(this,"setFontSize",l=>R(this,null,function*(){return yield this.call("setFontSize",{fontSize:l})})),k(this,"getHighlightColor",()=>R(this,null,function*(){return yield this.call("getHighlightColor")})),k(this,"setHighlightColor",l=>R(this,null,function*(){return yield this.call("setHighlightColor",{highlightColor:l})})),k(this,"isPowerup",()=>R(this,null,function*(){return yield this.call("isPowerup")})),k(this,"isPowerupEnum",()=>R(this,null,function*(){return yield this.call("isPowerupEnum")})),k(this,"isPowerupPropertyListItem",()=>R(this,null,function*(){return yield this.call("isPowerupPropertyListItem")})),k(this,"isPowerupSlot",()=>R(this,null,function*(){return yield this.call("isPowerupSlot")})),k(this,"isPowerupProperty",()=>R(this,null,function*(){return yield this.call("isPowerupProperty")})),k(this,"isSlot",()=>R(this,null,function*(){return yield this.call("isSlot")})),k(this,"setIsSlot",l=>R(this,null,function*(){return yield this.call("setIsSlot",{isSlot:l})})),k(this,"isProperty",()=>R(this,null,function*(){return yield this.call("isSlot")})),k(this,"setIsProperty",l=>R(this,null,function*(){return yield this.call("setIsSlot",{isSlot:l})})),k(this,"openRemInContext",l=>R(this,null,function*(){yield this.call("openRemInContext",{portalId:l})})),k(this,"openRemAsPage",()=>R(this,null,function*(){yield this.call("openRemAsPage")})),k(this,"getEnablePractice",()=>R(this,null,function*(){return yield this.call("getEnablePractice")})),k(this,"getPracticeDirection",()=>R(this,null,function*(){return yield this.call("getPracticeDirection")})),k(this,"setEnablePractice",l=>R(this,null,function*(){return yield this.call("setEnablePractice",{enablePractice:l})})),k(this,"setPracticeDirection",l=>R(this,null,function*(){return yield this.call("setPracticeDirection",{direction:l})})),k(this,"copyPortalReferenceToClipboard",()=>R(this,null,function*(){return yield this.call("copyPortalReferenceToClipboard")})),k(this,"copyTagReferenceToClipboard",()=>R(this,null,function*(){return yield this.call("copyTagReferenceToClipboard")})),k(this,"copyReferenceToClipboard",()=>R(this,null,function*(){return yield this.call("copyReferenceToClipboard")})),k(this,"scrollToReaderHighlight",()=>R(this,null,function*(){return yield this.call("scrollToReaderHighlight")})),k(this,"isFolder",()=>R(this,null,function*(){return yield this.call("isFolder")})),k(this,"setIsFolder",l=>R(this,null,function*(){return yield this.call("setIsFolder",{isFolder:l})})),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(an,"RemObject");class wi extends dt{constructor(r){super(r,_i),k(this,"findOne",i=>R(this,null,function*(){if(!i)return;const l=yield this.call("findOne",{remId:i});if(l)return new mt(l,this.call)})),k(this,"createSingleRemWithMarkdown",(i,l)=>R(this,null,function*(){const a=yield this.call("createSingleRemWithMarkdown",{markdown:i,parentId:l});return a&&new mt(a,this.call)})),k(this,"createTreeWithMarkdown",(i,l)=>R(this,null,function*(){return((yield this.call("createTreeWithMarkdown",{markdown:i,parentId:l}))||[]).map(a=>new mt(a,this.call))})),k(this,"findByName",(i,l)=>R(this,null,function*(){const a=yield this.call("findByName",{name:i,parentId:l});if(a)return new mt(a,this.call)})),k(this,"moveRems",(i,l,a,d)=>R(this,null,function*(){const p=su(i),h=ht(l),g=ht(d);yield this.call("moveRems",{portalId:g,remIds:p,newParentId:h,positionAmongstSiblings:a})})),k(this,"getAll",()=>R(this,null,function*(){return((yield this.call("getAll",{}))||[]).map(i=>new mt(i,this._call))})),k(this,"findMany",i=>R(this,null,function*(){const l=su(i),a=yield this.call("findMany",{remIds:l});if(a)return a.map(d=>new mt(d,this._call))})),k(this,"createPortal",()=>R(this,null,function*(){const i=yield this.call("createPortal",{});return i?new mt(i,this._call):void 0})),k(this,"createLinkRem",(i,l=!0)=>R(this,null,function*(){const a=yield this.call("createLinkRem",{url:i,addTitle:l});if(a)return new mt(a,this._call)})),k(this,"createTable",i=>R(this,null,function*(){const l=ht(i),a=yield this.call("createTable",{existingTagId:l});if(a)return new mt(a,this._call)})),k(this,"createRem",()=>R(this,null,function*(){const i=yield this.call("createRem",{});if(i)return new mt(i,this._call)}))}}c(wi,"RemNamespace");const mt=an,_i="rem";var sl=Object.defineProperty,Ts=Object.getOwnPropertySymbols,Xt=Object.prototype.hasOwnProperty,xi=Object.prototype.propertyIsEnumerable,fo=c((t,r,i)=>r in t?sl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"card_defNormalProp"),Ei=c((t,r)=>{for(var i in r||(r={}))Xt.call(r,i)&&fo(t,i,r[i]);if(Ts)for(var i of Ts(r))xi.call(r,i)&&fo(t,i,r[i]);return t},"card_spreadValues"),kt=c((t,r,i)=>(fo(t,typeof r!="symbol"?r+"":r,i),i),"card_publicField"),Tn=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"card_async");const po="card";class Gr extends dt{constructor(r){super(r,po),kt(this,"findOne",i=>Tn(this,null,function*(){if(!i)return;const l=yield this.call("findOne",{id:i});return l?new Mn(l,this._call):void 0})),kt(this,"getAll",()=>Tn(this,null,function*(){const i=yield this.call("getAll",{});return i?.map(l=>new Mn(l,this._call))||[]})),kt(this,"findMany",i=>Tn(this,null,function*(){const l=yield this.call("findMany",{ids:i});return l?.map(a=>new Mn(a,this._call))||[]}))}}c(Gr,"CardNamespace");class Mn extends dt{constructor(r,i){super(i,po),kt(this,"_id"),kt(this,"remId"),kt(this,"type"),kt(this,"createdAt"),kt(this,"repetitionHistory"),kt(this,"nextRepetitionTime"),kt(this,"timesWrongInRow"),kt(this,"lastRepetitionTime"),kt(this,"callCard",(a,d)=>Tn(this,null,function*(){return yield this._call(a,Ei({id:this._id},d),po)})),kt(this,"callRem",(a,d)=>Tn(this,null,function*(){return yield this._call(a,Ei({},d),_i)})),kt(this,"getType",()=>Tn(this,null,function*(){return yield this.callCard("getType",{id:this._id})})),kt(this,"getRem",()=>Tn(this,null,function*(){return yield this.callRem("findOne",{remId:this.remId})})),kt(this,"remove",()=>Tn(this,null,function*(){return yield this.callCard("remove",{})})),kt(this,"updateCardRepetitionStatus",a=>Tn(this,null,function*(){return yield this.callCard("updateCardRepetitionStatus",{score:a})})),this._id=r._id,this.remId=r.remId;const l=r.cardType;this.type=l==="f"?"forward":l==="b"?"backward":{clozeId:l},this.createdAt=r.createdAt,this.repetitionHistory=r.history,this.nextRepetitionTime=r.activeNextTime,this.timesWrongInRow=r.timesWrongInRow}}c(Mn,"Card");var uu=Object.defineProperty,Vc=Object.defineProperties,Hc=Object.getOwnPropertyDescriptors,cu=Object.getOwnPropertySymbols,Cs=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={}))Cs.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"),al=(t=>(t.Rem="Rem",t.Text="Text",t.PDF="PDF",t.WebReader="WebReader",t))(al||{});const Ps={quote:"q",underline:"u",bold:"b",italic:"l"};var ul=(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))(ul||{}),ks=(t=>(t.Read="Read",t.ReadCreate="ReadCreate",t.ReadCreateModify="ReadCreateModify",t.ReadCreateModifyDelete="ReadCreateModifyDelete",t))(ks||{}),Xn=(t=>(t.All="All",t.DescendantsOfName="DescendantsOfName",t.DescendantsOfId="DescendantsOfId",t.Powerup="Powerup",t.FocusedSubtree="FocusedSubtree",t.KnowledgeBaseInfo="KnowledgeBaseInfo",t))(Xn||{}),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||{}),Jn=(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))(Jn||{});const Si={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||{}),Rs=(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))(Rs||{}),Is=(t=>(t[t.DEFAULT_TYPE=0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t[t.PORTAL=3]="PORTAL",t))(Is||{});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 Rs.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||{}),bs=(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))(bs||{}),vu=(t=>(t.PropertyConfigMenu="PropertyConfigMenu",t.QueueMenu="QueueMenu",t.ReaderMenu="ReaderMenu",t.PDFHighlightPopupLocation="PDFHighlightPopupLocation",t.DocumentMenu="DocumentMenu",t))(vu||{});const Os=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()})]),ho=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||{}),Jt=(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))(Jt||{});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"},zn={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"},Cn={UNDERLINE:"u",BOLD:"b",ITALIC:"t",INLINE_CODE:"c",CLOZE:"e",HIDDEN_CLOZE:"z",LINK:"l",HIGHLIGHT:"h",DATE:"d"},xu={LATEX:"x"},Ti={[Cn.UNDERLINE]:zn.UNDERLINE,[Cn.BOLD]:zn.BOLD,[Cn.ITALIC]:zn.ITALIC,[Cn.INLINE_CODE]:zn.INLINE_CODE,[Cn.CLOZE]:zn.CLOZE,[Cn.HIDDEN_CLOZE]:zn.HIDDEN_CLOZE,[Cn.LINK]:zn.DEPRECATED_LINK,[Cn.HIGHLIGHT]:zn.HIGHLIGHT,[Cn.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||{}),Su=(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))(Su||{}),Tu=(t=>(t.SRSScheduleCard="SRSScheduleCard",t.GetNextCard="GetNextCard",t))(Tu||{}),Ns=(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))(Ns||{});const Cu=["pre_exam","maintenance_period","enter_consolidation_period","consolidation_period","exam_not_good","postpone_start"];var Yr=(t=>(t[t.Enum=void 0]="Enum",t.AnyRem="any",t.Relation="relation",t))(Yr||{}),Ci=(t=>(t.Queue="Queue",t))(Ci||{}),Ds=(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))(Ds||{}),Pi=(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))(Pi||{}),Et=(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))(Et||{}),nt=(t=>(t.Or="or",t.And="and",t.Not="not",t.Expression="expression",t.GetSlot="get_slot",t.GetCardInfo="get_card_info",t))(nt||{});const cl=x.object({exp:x.literal("not"),exp1:x.lazy(()=>Ri)}),dl=x.object({exp:x.union([x.literal("and"),x.literal("or")]),exps:x.lazy(()=>Ri.array()),cannotRemove:x.boolean().optional()}),As=x.object({exp:x.literal("get_slot"),slotRemId:x.string(),exps:x.lazy(()=>Ri)}),js=x.object({exp:x.literal("get_card_info"),cardField:x.nativeEnum(Pi),exp1:x.lazy(()=>Ri)}),Ls=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"]),ku=x.object({exp:x.literal("expression"),refType:x.literal("RemType"),remType:Pu});var Fs=(t=>(t.Checked="checked",t.Unchecked="unchecked",t))(Fs||{}),Ms=(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))(Ms||{});const Yc=["contains","is","startsWith","endsWith",""];var zt=(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))(zt||{}),mo=(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))(mo||{}),mr=(t=>(t.Today="today",t.StartOfTheWeek="startoftheweek",t.StartOfTheMonth="startofthemonth",t.StartOfTheYear="startoftheyear",t.EndOfTheWeek="endoftheweek",t.EndOfTheMonth="endofthemonth",t.EndOfTheYear="endoftheyear",t))(mr||{});const Ru={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 fl=(t=>(t.Contains="contains",t.DoesNotContain="doesNotContains",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(fl||{}),go=(t=>(t.Is="is",t.IsNot="notIs",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(go||{});const Iu=Object.values(mo).filter(t=>t!=="relativeToToday");var yo=(t=>(t.Past="past",t.Next="next",t.This="this",t))(yo||{}),zs=(t=>(t.Day="day",t.Week="week",t.Month="month",t.Year="year",t))(zs||{});const ki={"":"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"},Bs={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"},vo={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"},Us={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"},Zs=x.object({exp:x.literal("expression"),refType:x.literal("Text"),text:x.string(),matcherType:x.nativeEnum(Ms)}),pl=x.object({exp:x.literal("expression"),refType:x.literal("NumberExpression"),text:x.string(),matcherType:x.nativeEnum(zt)}),qr=x.object({exp:x.literal("expression"),refType:x.literal("Date"),date:x.string().optional(),optionalDate:x.string().optional(),dateRelativeMatcher:x.nativeEnum(mr).optional(),optionalDateRelativeMatcher:x.nativeEnum(mr).optional(),relativeDateModifier:x.nativeEnum(yo).optional(),relativePeriodOffset:x.number().optional(),relativeDatePeriod:x.nativeEnum(zs).optional(),matcherType:x.nativeEnum(mo)}),Ws=x.object({exp:x.literal("expression"),refType:x.literal("Multi Select"),matcherType:x.nativeEnum(fl),remIds:x.array(x.string()).optional()}),Vs=x.object({exp:x.literal("expression"),refType:x.literal("SingleSelect"),matcherType:x.nativeEnum(go),remId:x.string().optional()}),Hs=x.object({exp:x.literal("expression"),refType:x.literal("Checkbox"),value:x.nativeEnum(Fs)}),Je=x.object({exp:x.literal("expression"),refType:x.literal("Single Select"),matcherType:x.nativeEnum(go),remIds:x.array(x.string()).optional()}),$s=x.lazy(()=>x.union([Ls,Zs,pl,ku,qr,Ws,Je,Vs,Hs,qr])),Ri=x.lazy(()=>x.union([cl,dl,As,js,$s])),hl=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(bs).optional(),propertyLocation:x.nativeEnum(Ds).optional(),selectSourceType:x.nativeEnum(Yr).optional(),dontPublishToSharedArticle:x.boolean().optional()}),Ou=x.union([x.object({slots:hl.array()}),x.object({properties:hl.array()})]);var Qs=(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))(Qs||{});const Ii={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"},ml=Kc(Qc({},Ii),{18:"It looks like you're struggling to learn and retain this card."});var bi=ze(854),Ks=ze.n(bi),gl=Object.defineProperty,yl=Object.getOwnPropertySymbols,Gs=Object.prototype.hasOwnProperty,Nu=Object.prototype.propertyIsEnumerable,Ys=c((t,r,i)=>r in t?gl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"app_defNormalProp"),Du=c((t,r)=>{var i={};for(var l in t)Gs.call(t,l)&&r.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&yl)for(var l of yl(t))r.indexOf(l)<0&&Nu.call(t,l)&&(i[l]=t[l]);return i},"__objRest"),gt=c((t,r,i)=>(Ys(t,typeof r!="symbol"?r+"":r,i),i),"app_publicField"),yt=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"app_async");const Oi="app";class vl extends dt{constructor(r,i){super(r,Oi),gt(this,"plugin"),gt(this,"waitForInitialSync",()=>yt(this,null,function*(){yield this._call("waitForInitialSync",{})})),gt(this,"registerPowerup",l=>yt(this,null,function*(){yield this._call("registerPowerup",l)})),gt(this,"registerWidget",(l,a,d)=>yt(this,null,function*(){yield this._call("registerWidget",{fileName:l,location:a,options:d})})),gt(this,"unregisterWidget",(l,a)=>yt(this,null,function*(){yield this._call("unregisterWidget",{fileName:l,location:a})})),gt(this,"registerCommand",l=>yt(this,null,function*(){const a=l,{action:d}=a,p=Du(a,["action"]),h=l.id;this.plugin.model[h]=d,yield this._call("registerCommand",p)})),gt(this,"registerSidebarButton",l=>yt(this,null,function*(){const{id:a,name:d,action:p}=l;this.plugin.model[a]=p,yield this._call("registerSidebarButton",{id:a,name:d})})),gt(this,"registerRemMenuItem",l=>yt(this,null,function*(){const{id:a,name:d,action:p}=l;this.plugin.model[a]=p,yield this._call("registerRemMenuItem",{id:a,name:d})})),gt(this,"registerMenuItem",l=>yt(this,null,function*(){const{id:a,name:d,action:p,location:h}=l;this.plugin.model[a]=p,yield this._call("registerMenuItem",{id:a,name:d,location:h})})),gt(this,"unregisterMenuItem",l=>yt(this,null,function*(){yield this._call("unregisterMenuItem",{id:l})})),gt(this,"stealKeys",l=>yt(this,null,function*(){yield this._call("stealKeys",{keys:l})})),gt(this,"releaseKeys",l=>yt(this,null,function*(){yield this._call("releaseKeys",{keys:l})})),gt(this,"registerCSS",(l,a)=>yt(this,null,function*(){yield this._call("registerCSS",{id:l,css:a})})),gt(this,"registerStatusBarItem",(l,a)=>yt(this,null,function*(){yield this._call("registerStatusBarItem",{id:l,html:a})})),gt(this,"getOperatingSystem",()=>yt(this,null,function*(){return yield this._call("getOperatingSystem",{})})),gt(this,"getPlatform",()=>yt(this,null,function*(){return yield this._call("getPlatform",{})})),gt(this,"registerCallback",(l,a)=>{this.plugin.model[l]=a}),gt(this,"transaction",l=>yt(this,null,function*(){const a=Math.random().toString();this.registerCallback(a,l);const d=yield this._call("transaction",{id:a});return delete this.plugin.model[a],d})),gt(this,"toast",l=>yt(this,null,function*(){yield this._call("toast",{message:l,options:{}})})),this.plugin=i}}c(vl,"AppNamespace");var qs=Object.defineProperty,qc=c((t,r,i)=>r in t?qs(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"date_defNormalProp"),wo=c((t,r,i)=>(qc(t,typeof r!="symbol"?r+"":r,i),i),"date_publicField"),er=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"date_async");const wl="date";class gr extends dt{constructor(r){super(r,wl),wo(this,"getDailyDoc",i=>er(this,null,function*(){const l=yield this.call("getDailyDoc",{date:i});if(l)return new mt(l,this._call)})),wo(this,"getTodaysDoc",()=>er(this,null,function*(){const i=yield this.call("getTodaysDoc",{});if(i)return new mt(i,this._call)}))}}c(gr,"DateNamespace");var Au=Object.defineProperty,yr=Object.getOwnPropertySymbols,_o=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable,Di=c((t,r,i)=>r in t?Au(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"editor_defNormalProp"),ju=c((t,r)=>{for(var i in r||(r={}))_o.call(r,i)&&Di(t,i,r[i]);if(yr)for(var i of yr(r))Ni.call(r,i)&&Di(t,i,r[i]);return t},"editor_spreadValues"),lt=c((t,r,i)=>(Di(t,typeof r!="symbol"?r+"":r,i),i),"editor_publicField"),tt=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"editor_async");const vr="editor";class Ke extends dt{constructor(r){super(r,vr),lt(this,"setText",i=>tt(this,null,function*(){return this.call("setText",{richText:i})})),lt(this,"copy",()=>tt(this,null,function*(){return this.call("copy",{})})),lt(this,"cut",()=>tt(this,null,function*(){return this.call("cut",{})})),lt(this,"deleteCharacters",(i,l)=>tt(this,null,function*(){return this.call("deleteCharacters",{characters:i,direction:l})})),lt(this,"delete",()=>tt(this,null,function*(){return this.call("delete",{})})),lt(this,"getSelectedRem",()=>tt(this,null,function*(){const i=yield this.getSelection();return i&&i.type===al.Rem?i:void 0})),lt(this,"getSelectedText",()=>tt(this,null,function*(){const i=yield this.getSelection();return i&&i.type===al.Text?i:void 0})),lt(this,"getSelection",()=>tt(this,null,function*(){return this.call("getSelection",{})})),lt(this,"selectRem",(i,l)=>tt(this,null,function*(){return this.call("setSelectedLines",{range:i,portalId:l})})),lt(this,"selectText",i=>tt(this,null,function*(){return this.call("setSelectedRichText",ju({},i))})),lt(this,"collapseSelection",i=>tt(this,null,function*(){return this.call("collapseSelection",{to:i})})),lt(this,"undo",()=>tt(this,null,function*(){return this.call("undo",{})})),lt(this,"redo",()=>tt(this,null,function*(){return this.call("redo",{})})),lt(this,"moveCaret",(i,l)=>tt(this,null,function*(){return this.call("moveCaret",{amount:i,unit:l})})),lt(this,"moveCaretVertical",i=>tt(this,null,function*(){return this.call("moveCaretVertical",{direction:i})})),lt(this,"getCaretPosition",()=>tt(this,null,function*(){return this.call("getCaretPosition",{})})),lt(this,"insertPlainText",i=>tt(this,null,function*(){return this.call("insertPlainText",{string:i})})),lt(this,"insertRichText",i=>tt(this,null,function*(){return this.call("insertRichText",{richText:i})})),lt(this,"insertMarkdown",i=>tt(this,null,function*(){return this.call("insertMarkdown",{markdown:i})})),lt(this,"getFocusedEditorText",()=>tt(this,null,function*(){return this.call("getFocusedEditorText",{})}))}}c(Ke,"EditorNamespace");var st=Object.defineProperty,wr=c((t,r,i)=>r in t?st(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"event_defNormalProp"),St=c((t,r,i)=>(wr(t,typeof r!="symbol"?r+"":r,i),i),"event_publicField");const Bt="event";class tr extends dt{constructor(r,i){super(r,Bt),St(this,"plugin"),St(this,"addListener",(l,a,d)=>{l in this.plugin.listeners||(this.plugin.listeners[l]=new Map),this.plugin.listeners[l].get(a)||this.plugin.listeners[l].set(a,[]),!this.plugin.listeners[l].get(a).includes(d)&&(this.plugin.listeners[l].get(a).push(d),this._call("events.addListener",{eventId:l,listenerKey:a}))}),St(this,"removeListener",(l,a,d)=>{const p=this.plugin.listeners[l];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:l,listenerKey:a}))}}),this.plugin=i}}c(tr,"EventNamespace");var Ai=Object.defineProperty,Ut=c((t,r,i)=>r in t?Ai(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"focus_defNormalProp"),xo=c((t,r,i)=>(Ut(t,typeof r!="symbol"?r+"":r,i),i),"focus_publicField"),Xs=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(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 dt{constructor(r){super(r,Lu),xo(this,"getFocusedRem",()=>Xs(this,null,function*(){const i=yield this.call("getFocusedRem",{});return i?new mt(i,this._call):void 0})),xo(this,"getFocusedPortal",()=>Xs(this,null,function*(){const i=yield this.call("getFocusedPortal",{});return i?new mt(i,this._call):void 0}))}}c(ji,"FocusNamespace");var Fu=Object.defineProperty,Js=c((t,r,i)=>r in t?Fu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"knowledge_base_defNormalProp"),Bn=c((t,r,i)=>(Js(t,typeof r!="symbol"?r+"":r,i),i),"knowledge_base_publicField"),Mu=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"knowledge_base_async");const ea="kb";class Eo{constructor(r){Bn(this,"_call"),Bn(this,"call"),Bn(this,"getCurrentKnowledgeBaseData",()=>Mu(this,null,function*(){return this.call("getCurrentKnowledgeBaseData",{})})),Bn(this,"isPrimaryKnowledgeBase",()=>Mu(this,null,function*(){return this.call("isPrimaryKnowledgeBase",{})})),this._call=r,this.call=hr(this._call,ea)}}c(Eo,"KnowledgeBaseNamespace");var Xc=Object.defineProperty,zu=c((t,r,i)=>r in t?Xc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"messaging_defNormalProp"),ta=c((t,r,i)=>(zu(t,typeof r!="symbol"?r+"":r,i),i),"messaging_publicField"),Jc=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"messaging_async");const _l="messaging";class xl extends dt{constructor(r){super(r,_l),ta(this,"broadcast",i=>Jc(this,null,function*(){return this.call("broadcast",{message:i})}))}}c(xl,"MessagingNamespace");var Bu=Object.defineProperty,Uu=c((t,r,i)=>r in t?Bu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"powerup_defNormalProp"),na=c((t,r,i)=>(Uu(t,typeof r!="symbol"?r+"":r,i),i),"powerup_publicField"),El=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"powerup_async");const ed="powerup";class Pn extends dt{constructor(r){super(r,ed),na(this,"getPowerupByCode",i=>El(this,null,function*(){const l=yield this.call("getPowerupByCode",{powerupCode:i});if(l)return new mt(l,this._call)})),na(this,"getPowerupSlotByCode",(i,l)=>El(this,null,function*(){const a=Object.values(Jn).includes(i)?Si[i][l]:l,d=yield this.call("getPowerupSlotByCode",{powerupCode:i,powerupSlot:a});if(d)return new mt(d,this._call)}))}}c(Pn,"PowerupNamespace");class So{static and(r){return{exp:nt.And,exps:r}}static or(r){return{exp:nt.Or,exps:r}}static not(r){return{exp:nt.Not,exp1:r}}static cardInfo(r,i){return{exp:nt.GetCardInfo,cardField:r,exp1:i}}static tableColumn(r,i){return{exp:nt.GetSlot,slotRemId:r,exps:i}}static hasReferenceTo(r){return{exp:nt.Expression,refType:Et.Reference,remId:r}}static text(r,i){return{exp:nt.Expression,refType:Et.Text,text:i||"",matcherType:r}}static documentsThatContain(r){return{exp:nt.Expression,refType:Et.Portal,remId:r}}static isTaggedWith(r){return{exp:nt.Expression,refType:Et.Tag,remId:r}}static isDirectlyTaggedWith(r){return{exp:nt.Expression,refType:Et.TagWithoutInheritance,remId:r}}static isDescendantOf(r){return{exp:nt.Expression,refType:Et.IsDescendantOf,remId:r}}static isInDocument(r){return{exp:nt.Expression,refType:Et.InDocument,remId:r}}static hasAnyConnectionTo(r){return{exp:nt.Expression,refType:Et.Connection,remId:r}}static hasRemType(r){return{exp:nt.Expression,refType:Et.RemType,remType:r}}static tagWithoutInheritance(r){return{exp:nt.Expression,refType:Et.TagWithoutInheritance,remId:r}}static multiSelect(r,i){return{exp:nt.Expression,refType:Et.MultiSelect,matcherType:r,remIds:i}}static singleSelect(r,i){return{exp:nt.Expression,refType:Et.SingleSelect,matcherType:r,remIds:i}}static checkbox(r){return{exp:nt.Expression,refType:Et.Checkbox,value:r}}static date(r,i,l){return{exp:nt.Expression,refType:Et.Date,matcherType:r,date:typeof i=="string"||i==null?void 0:i.toISOString(),dateRelativeMatcher:typeof i=="string"?i:void 0,optionalDate:typeof l=="string"||l==null?void 0:l.toISOString(),optionalDateRelativeMatcher:typeof l=="string"?l:void 0}}static dateRelativeToToday(r,i,l){return{exp:nt.Expression,refType:Et.Date,matcherType:mo.IsRelativeToToday,relativeDateModifier:r,relativePeriodOffset:l,relativeDatePeriod:i}}static number(r,i){return{exp:nt.Expression,refType:Et.Number,text:i?.toString()||"",matcherType:r}}}c(So,"Query_DUPE_2");var ra=Object.defineProperty,Zu=c((t,r,i)=>r in t?ra(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"queue_defNormalProp"),Ge=c((t,r,i)=>(Zu(t,typeof r!="symbol"?r+"":r,i),i),"queue_publicField"),Rt=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"queue_async");const Wu="queue";class nr extends dt{constructor(r){super(r,Wu),Ge(this,"getAverageTimePerCard",()=>Rt(this,null,function*(){return yield this.call("getAverageTimePerCard",{})})),Ge(this,"getCurrentQueueScreenType",()=>Rt(this,null,function*(){return yield this.call("getCurrentQueueScreenType",{})})),Ge(this,"goBackToPreviousCard",()=>Rt(this,null,function*(){yield this.call("goBackToPreviousCard",{})})),Ge(this,"hasRevealedAnswer",()=>Rt(this,null,function*(){return yield this.call("hasRevealedAnswer",{})})),Ge(this,"showAnswer",()=>Rt(this,null,function*(){yield this.call("showAnswer",{})})),Ge(this,"rateCurrentCard",i=>Rt(this,null,function*(){yield this.call("rateCurrentCard",{score:i})})),Ge(this,"isTypeAnswerEnabled",()=>Rt(this,null,function*(){return yield this.call("isTypeAnswerEnabled",{})})),Ge(this,"getCurrentCard",()=>Rt(this,null,function*(){const i=yield this.call("getCurrentCard",{});return i?new Mn(i,this._call):void 0})),Ge(this,"getNumRemainingCards",()=>Rt(this,null,function*(){return yield this.call("getNumRemainingCards",{})})),Ge(this,"getCurrentStreak",()=>Rt(this,null,function*(){return yield this.call("getCurrentStreak",{})})),Ge(this,"removeCurrentCardFromQueue",(i=!0)=>Rt(this,null,function*(){yield this.call("removeCurrentCardFromQueue",{addToBackStack:i})})),Ge(this,"inLookbackMode",()=>Rt(this,null,function*(){return yield this.call("inLookbackMode",{})}))}}c(nr,"QueueNamespace");var To=Object.defineProperty,Un=c((t,r,i)=>r in t?To(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"reader_defNormalProp"),Vu=c((t,r,i)=>(Un(t,typeof r!="symbol"?r+"":r,i),i),"reader_publicField"),Hu=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"reader_async");class en extends dt{constructor(r){super(r,"reader"),Vu(this,"callAndReturnRem",(i,l)=>Hu(this,null,function*(){const a=yield this.call(i,l||{});if(a)return new mt(a,this._call)}))}addHighlight(){return Hu(this,null,function*(){return this.callAndReturnRem("addHighlight")})}}c(en,"ReaderNamespace");var Sl=Object.defineProperty,Tl=Object.defineProperties,Li=Object.getOwnPropertyDescriptors,Co=Object.getOwnPropertySymbols,ia=Object.prototype.hasOwnProperty,oa=Object.prototype.propertyIsEnumerable,Cl=c((t,r,i)=>r in t?Sl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rich_text_defNormalProp"),Fi=c((t,r)=>{for(var i in r||(r={}))ia.call(r,i)&&Cl(t,i,r[i]);if(Co)for(var i of Co(r))oa.call(r,i)&&Cl(t,i,r[i]);return t},"rich_text_spreadValues"),un=c((t,r)=>Tl(t,Li(r)),"rich_text_spreadProps"),ge=c((t,r,i)=>(Cl(t,typeof r!="symbol"?r+"":r,i),i),"rich_text_publicField"),Be=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"rich_text_async");const $u="richText";class Ot{constructor(r){ge(this,"richText",[]),ge(this,"richTextNamespace"),ge(this,"code",(i,l)=>(this.richText.push({i:"m",code:!0,language:l,text:i}),this)),ge(this,"image",(i,l,a)=>(this.richText.push({i:"i",url:i,width:l,height:a}),this)),ge(this,"rem",i=>{const l={i:"q",_id:ht(i)};return this.richText.push(l),this}),ge(this,"text",(i,l=[])=>{if(l.length===0)return this.richText.push(i),this;const a=Object.fromEntries(l.map(d=>ul[d]?["h",ul[d]]:[Ps[d],!0])||[]);return this.richText.push(un(Fi({i:"m"},a),{text:i})),this}),ge(this,"audio",i=>(this.richText.push({i:"a",url:i,onlyAudio:!0}),this)),ge(this,"latex",(i,l=!1)=>(this.richText.push({i:"x",text:i,block:l}),this)),ge(this,"video",i=>(this.richText.push({i:"a",url:i,onlyAudio:!1}),this)),ge(this,"newline",()=>(this.richText.push(`
13
- `),this)),ge(this,"value",()=>this.richTextNamespace.normalize(this.richText)),this.richTextNamespace=r}}c(Ot,"RichTextBuilder");class Zn extends dt{constructor(r){super(r,$u),ge(this,"indexOfElementAt",(i,l)=>Be(this,null,function*(){return this.call("indexOfElementAt",{richText:i,position:l})})),ge(this,"normalize",i=>Be(this,null,function*(){return this.call("normalize",{richText:i})})),ge(this,"removeTextFormatFromRange",(i,l,a,d)=>Be(this,null,function*(){return this.call("removeTextFormatFromRange",{text:i,start:l,end:a,format:d})})),ge(this,"applyTextFormatToRange",(i,l,a,d)=>Be(this,null,function*(){return this.call("applyTextFormatToRange",{text:i,start:l,end:a,format:d})})),ge(this,"toggleTextFormatOnRange",(i,l,a,d)=>Be(this,null,function*(){return this.call("toggleTextFormatOnRange",{text:i,start:l,end:a,format:d})})),ge(this,"replaceAllRichText",(i,l,a)=>Be(this,null,function*(){return this.call("replaceAllRichText",{richText:i,findText:l,replacementText:a})})),ge(this,"splitRichText",(i,l)=>Be(this,null,function*(){return this.call("splitRichText",{richText:i,splitText:l})})),ge(this,"empty",(i,l)=>Be(this,null,function*(){return this.call("empty",{richText:i,allowSpaces:l})})),ge(this,"indexOf",(i,l,a)=>Be(this,null,function*(){return this.call("indexOf",{richText:i,character:l,startChar:a})})),ge(this,"toHTML",i=>Be(this,null,function*(){return this.call("toHTML",{richText:i})})),ge(this,"length",i=>Be(this,null,function*(){return this.call("length",{richText:i})})),ge(this,"trimEnd",i=>Be(this,null,function*(){return this.call("trimEnd",{richText:i})})),ge(this,"trimStart",i=>Be(this,null,function*(){return this.call("trimStart",{richText:i})})),ge(this,"trim",i=>Be(this,null,function*(){return this.call("trim",{richText:i})})),ge(this,"split",(i,l)=>Be(this,null,function*(){return this.call("split",{richText:i,separationCharacter:l})})),ge(this,"deepGetRemAndAliasIdsFromRichText",i=>Be(this,null,function*(){return this.call("deepGetRemAndAliasIdsFromRichText",{richText:i})})),ge(this,"deepGetRemIdsFromRichText",i=>Be(this,null,function*(){return this.call("deepGetRemIdsFromRichText",{richText:i})})),ge(this,"findAllExternalURLs",i=>Be(this,null,function*(){return this.call("findAllExternalURLs",{richText:i})})),ge(this,"getRemAndAliasIdsFromRichText",i=>Be(this,null,function*(){return this.call("getRemAndAliasIdsFromRichText",{richText:i})})),ge(this,"getRemIdsFromRichText",i=>Be(this,null,function*(){return this.call("getRemIdsFromRichText",{richText:i})})),ge(this,"equals",(i,l)=>Be(this,null,function*(){return this.call("equals",{richText1:i,richText2:l})})),ge(this,"substring",(i,l,a)=>Be(this,null,function*(){return this.call("substring",{richText:i,start:l,end:a})})),ge(this,"charAt",(i,l)=>Be(this,null,function*(){return this.call("charAt",{richText:i,index:l})})),ge(this,"toString",i=>Be(this,null,function*(){return this.call("toString",{richText:i})})),ge(this,"toMarkdown",i=>Be(this,null,function*(){return this.call("toMarkdown",{richText:i})})),ge(this,"parseFromMarkdown",i=>Be(this,null,function*(){return this.call("parseFromMarkdown",{markdown:i})})),ge(this,"parseAndInsertHtml",(i,l)=>Be(this,null,function*(){const a=ht(l);return this.call("parseAndInsertHtml",{html:i,remId:a})}))}get code(){return new Ot(this).code}get image(){return new Ot(this).image}get rem(){return new Ot(this).rem}get text(){return new Ot(this).text}get audio(){return new Ot(this).audio}get latex(){return new Ot(this).latex}get video(){return new Ot(this).video}get newline(){return new Ot(this).newline}}c(Zn,"RichTextNamespace");const Qu="scheduler";class Xr extends dt{constructor(r){super(r,Qu)}registerCustomScheduler(r,i){return this.call("registerCustomScheduler",{name:r,parameters:i})}}c(Xr,"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"),Pl=c((t,r,i)=>(Gu(t,typeof r!="symbol"?r+"":r,i),i),"search_publicField"),kl=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"search_async");const Yu="search";class Rl extends dt{constructor(r){super(r,Yu),Pl(this,"search",(i,l,a)=>kl(this,null,function*(){const d=ht(l);return((yield this.call("search",{queryText:i,searchContextRemId:d,options:a}))||[]).map(p=>new mt(p,this._call))}))}}c(Rl,"SearchNamespace");var qu=Object.defineProperty,Il=Object.getOwnPropertySymbols,bl=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable,Mi=c((t,r,i)=>r in t?qu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"settings_defNormalProp"),ko=c((t,r)=>{for(var i in r||(r={}))bl.call(r,i)&&Mi(t,i,r[i]);if(Il)for(var i of Il(r))Po.call(r,i)&&Mi(t,i,r[i]);return t},"settings_spreadValues"),_r=c((t,r,i)=>(Mi(t,typeof r!="symbol"?r+"":r,i),i),"settings_publicField"),zi=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"settings_async");const Ro="settings";class cn extends dt{constructor(r){super(r,Ro),_r(this,"registerDropdownSetting",i=>zi(this,null,function*(){return this.call("registerDropdownSetting",ko({},i))})),_r(this,"registerBooleanSetting",i=>zi(this,null,function*(){return this.call("registerBooleanSetting",ko({},i))})),_r(this,"registerStringSetting",i=>zi(this,null,function*(){return this.call("registerStringSetting",ko({},i))})),_r(this,"registerNumberSetting",i=>zi(this,null,function*(){return this.call("registerNumberSetting",ko({},i))})),_r(this,"getSetting",i=>zi(this,null,function*(){return yield this.call("getSetting",{settingId:i})}))}}c(cn,"SettingsNamespace");var Io=Object.defineProperty,bo=c((t,r,i)=>r in t?Io(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"storage_defNormalProp"),dn=c((t,r,i)=>(bo(t,typeof r!="symbol"?r+"":r,i),i),"storage_publicField"),xr=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"storage_async");const Bi="storage";class Ol extends dt{constructor(r){super(r,Bi),dn(this,"setSession",(i,l)=>xr(this,null,function*(){return this.call("setSession",{key:i,value:l})})),dn(this,"getSession",i=>xr(this,null,function*(){if(i)return this.call("getSession",{key:i})})),dn(this,"setSynced",(i,l)=>xr(this,null,function*(){return this.call("setSynced",{key:i,value:l})})),dn(this,"getSynced",i=>xr(this,null,function*(){if(i)return this.call("getSynced",{key:i})})),dn(this,"setLocal",(i,l)=>xr(this,null,function*(){return this.call("setLocal",{key:i,value:l})})),dn(this,"getLocal",i=>xr(this,null,function*(){if(i)return this.call("getLocal",{key:i})}))}}c(Ol,"StorageNamespace");var la=Object.defineProperty,at=c((t,r,i)=>r in t?la(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"widget_defNormalProp"),Er=c((t,r,i)=>(at(t,typeof r!="symbol"?r+"":r,i),i),"widget_publicField"),tn=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"widget_async");const Sr="widget";class fn extends dt{constructor(r){super(r,Sr),Er(this,"getWidgetsAtLocation",(i,l)=>tn(this,null,function*(){return this.call("getWidgetsAtLocation",{location:i,remId:l})})),Er(this,"getDimensions",i=>tn(this,null,function*(){return this.call("getDimensions",{widgetInstanceId:i})})),Er(this,"openPopup",(i,l,a)=>tn(this,null,function*(){return this.call("openPopup",{widgetFileName:i,contextData:l,clickOutsideToClose:a})})),Er(this,"closePopup",(i=!0)=>tn(this,null,function*(){return this.call("closePopup",{restoreFocus:i})})),Er(this,"getWidgetContext",()=>tn(this,null,function*(){return this.call("getWidgetContext",{})}))}}c(fn,"WidgetNamespace");var Xu=Object.defineProperty,Ju=c((t,r,i)=>r in t?Xu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"window_defNormalProp"),rt=c((t,r,i)=>(Ju(t,typeof r!="symbol"?r+"":r,i),i),"window_publicField"),it=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"window_async");const Nl="window";class Oo extends dt{constructor(r){super(r,Nl),rt(this,"stealKeys",(i,l)=>it(this,null,function*(){yield this.call("stealKeys",{keys:l,id:i})})),rt(this,"releaseKeys",(i,l)=>it(this,null,function*(){yield this.call("releaseKeys",{keys:l,id:i})})),rt(this,"openFloatingWidget",(i,l,a,d)=>it(this,null,function*(){return yield this.call("openFloatingWidget",{fileName:i,position:l,classContainer:a,closeWhenClickOutside:d})})),rt(this,"closeFloatingWidget",i=>it(this,null,function*(){return yield this.call("closeFloatingWidget",{floatingWidgetId:i})})),rt(this,"isFloatingWidgetOpen",i=>it(this,null,function*(){return yield this.call("isFloatingWidgetOpen",{floatingWidgetId:i})})),rt(this,"setFloatingWidgetPosition",(i,l)=>it(this,null,function*(){return yield this.call("setFloatingWidgetPosition",{floatingWidgetId:i,position:l})})),rt(this,"closeAllFloatingWidgets",()=>it(this,null,function*(){return yield this.call("closeAllFloatingWidgets",{})})),rt(this,"getCurrentWindowTree",()=>it(this,null,function*(){return yield this.call("getCurrentWindowTree",{})})),rt(this,"setRemWindowTree",i=>it(this,null,function*(){return yield this.call("setRemWindowTree",{tree:i})})),rt(this,"getLastFocusedPane",()=>it(this,null,function*(){return yield this.call("getLastFocusedPane",{})})),rt(this,"setCurrentWindowTreeFromString",i=>it(this,null,function*(){return yield this.call("setCurrentWindowTreeFromString",{treeString:i})})),rt(this,"getOpenPaneIds",()=>it(this,null,function*(){return yield this.call("getOpenPaneIds",{})})),rt(this,"getFocusedPaneId",()=>it(this,null,function*(){return yield this.call("getFocusedPaneId",{})})),rt(this,"setFocusedPaneId",i=>it(this,null,function*(){return yield this.call("setFocusedPaneId",{paneId:i})})),rt(this,"getURL",()=>it(this,null,function*(){return yield this.call("getURL",{})})),rt(this,"setURL",i=>it(this,null,function*(){return yield this.call("setURL",{url:i})})),rt(this,"openRem",i=>it(this,null,function*(){return yield this.call("openRem",{remId:i._id})})),rt(this,"getOpenPaneRemIds",()=>it(this,null,function*(){return yield this.call("getOpenPaneRemIds",{})})),rt(this,"getOpenPaneRemId",i=>it(this,null,function*(){if(i)return yield this.call("getOpenPaneRemId",{paneId:i})})),rt(this,"openWidgetInPane",(i,l)=>it(this,null,function*(){return yield this.call("openWidgetInPane",{fileName:i,contextData:l})})),rt(this,"openWidgetInRightSidebar",(i,l)=>it(this,null,function*(){return yield this.call("openWidgetInRightSidebar",{fileName:i,contextData:l})})),rt(this,"isOnPage",i=>it(this,null,function*(){return yield this.call("isOnPage",{page:i})}))}}c(Oo,"WindowNamespace");var Ui=Object.defineProperty,Dl=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,Jr=c((t,r,i)=>r in t?Ui(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"plugin_base_defNormalProp"),ct=c((t,r)=>{for(var i in r||(r={}))No.call(r,i)&&Jr(t,i,r[i]);if(Dl)for(var i of Dl(r))pn.call(r,i)&&Jr(t,i,r[i]);return t},"plugin_base_spreadValues"),ue=c((t,r,i)=>(Jr(t,typeof r!="symbol"?r+"":r,i),i),"plugin_base_publicField"),Ze=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"plugin_base_async");class Zi{constructor(){ue(this,"apiCallPromise",{}),ue(this,"model",{}),ue(this,"listeners",{}),ue(this,"usedMessageIds",1),ue(this,"widgetInstanceId"),ue(this,"inSandbox"),ue(this,"isNative"),ue(this,"rootURL"),ue(this,"mountDiv"),ue(this,"widgetBodyResizeObserver",null),ue(this,"widgetOptions"),ue(this,"manifest"),ue(this,"id"),ue(this,"app",new vl(this._call.bind(this),this)),ue(this,"editor",new Ke(this._call.bind(this))),ue(this,"event",new tr(this._call.bind(this),this)),ue(this,"messaging",new xl(this._call.bind(this))),ue(this,"focus",new ji(this._call.bind(this))),ue(this,"date",new gr(this._call.bind(this))),ue(this,"widget",new fn(this._call.bind(this))),ue(this,"window",new Oo(this._call.bind(this))),ue(this,"powerup",new Pn(this._call.bind(this))),ue(this,"richText",new Zn(this._call.bind(this))),ue(this,"rem",new wi(this._call.bind(this))),ue(this,"card",new Gr(this._call.bind(this))),ue(this,"storage",new Ol(this._call.bind(this))),ue(this,"settings",new cn(this._call.bind(this))),ue(this,"search",new Rl(this._call.bind(this))),ue(this,"kb",new Eo(this._call.bind(this))),ue(this,"scheduler",new Xr(this._call.bind(this))),ue(this,"queue",new nr(this._call.bind(this))),ue(this,"reader",new en(this._call.bind(this))),window.onmessage=r=>{this._receive(r)},this.pluginLogger=Ks()(`plugin:${this.id||"Plugin"}`),this.logApi=Ks()(`plugin:API:${this.id||"Plugin"}`),this.logApi("START"),this.event.addListener(I.onActivate,void 0,this.receiveActivateMessage.bind(this)),this.event.addListener(I.onDeactivate,void 0,this.receiveDeactivateMessage.bind(this)),this.event.addListener(I.setDarkMode,void 0,this.setDarkMode.bind(this)),this.event.addListener(I.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 l=document.getElementsByTagName("head")[0];for(const a of[...l.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,l.appendChild(d)}for(const a of i){const d=document.createElement("link");d.classList.add("custom-css"),d.rel="stylesheet",d.href=a,l.appendChild(d)}}track(r){let i=!1,l=!1,a=!1,d=[];const p=c(()=>{if(i){for(const{event:h,key:g}of d.flatMap(v=>v.reactiveDeps))this.event.removeListener(h,g,p);return}else l?a=!0:(l=!0,c(()=>Ze(this,null,function*(){d=yield hd(this,r,p,()=>{},d||[]),l=!1,a&&(a=!1,p())}),"effect")())},"run");return p(),()=>{i=!0}}loadManifest(){return Ze(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 Ze(this,null,function*(){var i,l,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=(l=r.widgetOptions)==null?void 0:l.dimensions)==null?void 0:a.height,v=(p=(d=r.widgetOptions)==null?void 0:d.dimensions)==null?void 0:p.width;if(v=="auto"&&r.inSandbox&&(h.style.display="inline-block"),(g==="auto"||v==="auto")&&this.autoAdjustWidgetContainerDimension(),r.inSandbox&&(g==="auto"&&(document.documentElement.style.overflowY="hidden"),v==="auto"&&(document.documentElement.style.overflowX="hidden")),r.inSandbox)for(const X of r.styleSheetHREFs){const Te=document.createElement("link");Te.href=X,Te.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(Te)}yield this._call("activateCompleted",{})})}receiveDeactivateMessage(r){return Ze(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,l){return Ze(this,null,function*(){const a=this.usedMessageIds++;typeof l=="string"?r=l+"."+r:typeof l=="object"&&(r=[...l,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 Ze(this,null,function*(){var i,l,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(!Z(d.eventId))throw new Error("Invalid event "+d.eventId);(a=(l=this.listeners[d.eventId])==null?void 0:l.get(d.listenerKey))==null||a.forEach(p=>p(d.args))}}})}autoAdjustWidgetContainerDimension(){return Ze(this,null,function*(){const r=new ResizeObserver(l=>{for(let a of l)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,v=parseFloat(d.getPropertyValue("margin-inline-end"))||0,X={height:a.contentBoxSize[0].blockSize+p+h,width:a.contentBoxSize[0].inlineSize+g+v};this._call("widgetEvents.updateWidgetContainerDimension",X)}}),i=this.inSandbox?this.mountDiv:this.mountDiv.firstChild;i&&(r.observe(i),this.widgetBodyResizeObserver=r)})}createFakeEmbedComponent(r){return Ze(this,null,function*(){return this._call("widgetEvents.createFakeEmbedComponent",r)})}unmountFakeEmbedComponent(r){return Ze(this,null,function*(){return this._call("widgetEvents.unmountFakeEmbedComponent",{id:r})})}updateFakeEmbedComponentRect(r,i){return Ze(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedComponentRect",ct({id:r},i))})}updateFakeEmbedExternalProps(r,i){return Ze(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedExternalProps",{id:r,externalProps:i})})}ping(){return Ze(this,null,function*(){return yield this._call("ping",{})})}}c(Zi,"RNPlugin");var We=ze(232);let Zt=c(t=>crypto.getRandomValues(new Uint8Array(t)),"random"),sa=c((t,r,i)=>{let l=(2<<Math.log(t.length-1)/Math.LN2)-1,a=-~(1.6*l*r/t.length);return(d=r)=>{let p="";for(;;){let h=i(a),g=a;for(;g--;)if(p+=t[h[g]&l]||"",p.length===d)return p}}},"customRandom"),ec=c((t,r=21)=>sa(t,r,Zt),"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 q=ze(359),kn=ze.n(q),Wi="1.13.6",Vi=typeof self=="object"&&self.self===self&&self||typeof Ce.g=="object"&&Ce.g.global===Ce.g&&Ce.g||Function("return this")()||{},Do=Array.prototype,Al=Object.prototype,aa=typeof Symbol<"u"?Symbol.prototype:null,Ao=Do.push,Tr=Do.slice,Hi=Al.toString,jl=Al.hasOwnProperty,Ll=typeof ArrayBuffer<"u",ua=typeof DataView<"u",tc=Array.isArray,jo=Object.keys,ca=Object.create,da=Ll&&ArrayBuffer.isView,nc=isNaN,fa=isFinite,pa=!{toString:null}.propertyIsEnumerable("toString"),ha=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],td=Math.pow(2,53)-1;function It(t,r){return r=r==null?t.length-1:+r,function(){for(var i=Math.max(arguments.length-r,0),l=Array(i),a=0;a<i;a++)l[a]=arguments[a+r];switch(r){case 0:return t.call(this,l);case 1:return t.call(this,arguments[0],l);case 2:return t.call(this,arguments[0],arguments[1],l)}var d=Array(r+1);for(a=0;a<r;a++)d[a]=arguments[a];return d[r]=l,t.apply(this,d)}}c(It,"restArguments");function Rn(t){var r=typeof t;return r==="function"||r==="object"&&!!t}c(Rn,"isObject");function rc(t){return t===null}c(rc,"isNull");function ma(t){return t===void 0}c(ma,"isUndefined");function ga(t){return t===!0||t===!1||Hi.call(t)==="[object Boolean]"}c(ga,"isBoolean");function ic(t){return!!(t&&t.nodeType===1)}c(ic,"isElement");function Ye(t){var r="[object "+t+"]";return function(i){return Hi.call(i)===r}}c(Ye,"tagTester");var Nt=Ye("String"),ya=Ye("Number"),oc=Ye("Date"),lc=Ye("RegExp"),va=Ye("Error"),wa=Ye("Symbol"),Fl=Ye("ArrayBuffer"),_a=Ye("Function"),xa=Vi.document&&Vi.document.childNodes;typeof Int8Array!="object"&&typeof xa!="function"&&(_a=c(function(t){return typeof t=="function"||!1},"isFunction"));var Dt=_a,Lo=Ye("Object"),Ea=ua&&Lo(new DataView(new ArrayBuffer(8))),Ml=typeof Map<"u"&&Lo(new Map),sc=Ye("DataView");function Sa(t){return t!=null&&Dt(t.getInt8)&&Fl(t.buffer)}c(Sa,"ie10IsDataView");var Fo=Ea?Sa:sc,rr=tc||Ye("Array");function Wn(t,r){return t!=null&&jl.call(t,r)}c(Wn,"has");var In=Ye("Arguments");(function(){In(arguments)||(In=c(function(t){return Wn(t,"callee")},"isArguments"))})();var zl=In;function Bl(t){return!wa(t)&&fa(t)&&!isNaN(parseFloat(t))}c(Bl,"isFinite_isFinite");function Ul(t){return ya(t)&&nc(t)}c(Ul,"isNaN_isNaN");function Zl(t){return function(){return t}}c(Zl,"constant");function ti(t){return function(r){var i=t(r);return typeof i=="number"&&i>=0&&i<=td}}c(ti,"createSizePropertyCheck");function Ta(t){return function(r){return r?.[t]}}c(Ta,"shallowProperty");var Wl=Ta("byteLength"),Ca=ti(Wl),Pa=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function ac(t){return da?da(t)&&!Fo(t):Ca(t)&&Pa.test(Hi.call(t))}c(ac,"isTypedArray");var ka=Ll?ac:Zl(!1),jt=Ta("length");function uc(t){for(var r={},i=t.length,l=0;l<i;++l)r[t[l]]=!0;return{contains:function(a){return r[a]===!0},push:function(a){return r[a]=!0,t.push(a)}}}c(uc,"emulatedSet");function Vl(t,r){r=uc(r);var i=ha.length,l=t.constructor,a=Dt(l)&&l.prototype||Al,d="constructor";for(Wn(t,d)&&!r.contains(d)&&r.push(d);i--;)d=ha[i],d in t&&t[d]!==a[d]&&!r.contains(d)&&r.push(d)}c(Vl,"collectNonEnumProps");function vt(t){if(!Rn(t))return[];if(jo)return jo(t);var r=[];for(var i in t)Wn(t,i)&&r.push(i);return pa&&Vl(t,r),r}c(vt,"keys");function cc(t){if(t==null)return!0;var r=jt(t);return typeof r=="number"&&(rr(t)||Nt(t)||zl(t))?r===0:jt(vt(t))===0}c(cc,"isEmpty");function Hl(t,r){var i=vt(r),l=i.length;if(t==null)return!l;for(var a=Object(t),d=0;d<l;d++){var p=i[d];if(r[p]!==a[p]||!(p in a))return!1}return!0}c(Hl,"isMatch");function je(t){if(t instanceof je)return t;if(!(this instanceof je))return new je(t);this._wrapped=t}c(je,"_"),je.VERSION=Wi,je.prototype.value=function(){return this._wrapped},je.prototype.valueOf=je.prototype.toJSON=je.prototype.value,je.prototype.toString=function(){return String(this._wrapped)};function $l(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,Wl(t))}c($l,"toBufferView");var Ra="[object DataView]";function Mo(t,r,i,l){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:zo(t,r,i,l)}c(Mo,"eq");function zo(t,r,i,l){t instanceof je&&(t=t._wrapped),r instanceof je&&(r=r._wrapped);var a=Hi.call(t);if(a!==Hi.call(r))return!1;if(Ea&&a=="[object Object]"&&Fo(t)){if(!Fo(r))return!1;a=Ra}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 aa.valueOf.call(t)===aa.valueOf.call(r);case"[object ArrayBuffer]":case Ra:return zo($l(t),$l(r),i,l)}var d=a==="[object Array]";if(!d&&ka(t)){var p=Wl(t);if(p!==Wl(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&&!(Dt(h)&&h instanceof h&&Dt(g)&&g instanceof g)&&"constructor"in t&&"constructor"in r)return!1}i=i||[],l=l||[];for(var v=i.length;v--;)if(i[v]===t)return l[v]===r;if(i.push(t),l.push(r),d){if(v=t.length,v!==r.length)return!1;for(;v--;)if(!Mo(t[v],r[v],i,l))return!1}else{var X=vt(t),Te;if(v=X.length,vt(r).length!==v)return!1;for(;v--;)if(Te=X[v],!(Wn(r,Te)&&Mo(t[Te],r[Te],i,l)))return!1}return i.pop(),l.pop(),!0}c(zo,"deepEq");function Ql(t,r){return Mo(t,r)}c(Ql,"isEqual");function ni(t){if(!Rn(t))return[];var r=[];for(var i in t)r.push(i);return pa&&Vl(t,r),r}c(ni,"allKeys");function $i(t){var r=jt(t);return function(i){if(i==null)return!1;var l=ni(i);if(jt(l))return!1;for(var a=0;a<r;a++)if(!Dt(i[t[a]]))return!1;return t!==ce||!Dt(i[Kl])}}c($i,"ie11fingerprint");var Kl="forEach",dc="has",Ia=["clear","delete"],Bo=["get",dc,"set"],ba=Ia.concat(Kl,Bo),ce=Ia.concat(Bo),Lt=["add"].concat(Ia,Kl,dc),wt=Ml?$i(ba):Ye("Map"),At=Ml?$i(ce):Ye("WeakMap"),ri=Ml?$i(Lt):Ye("Set"),Oa=Ye("WeakSet");function ot(t){for(var r=vt(t),i=r.length,l=Array(i),a=0;a<i;a++)l[a]=t[r[a]];return l}c(ot,"values");function Uo(t){for(var r=vt(t),i=r.length,l=Array(i),a=0;a<i;a++)l[a]=[r[a],t[r[a]]];return l}c(Uo,"pairs");function Cr(t){for(var r={},i=vt(t),l=0,a=i.length;l<a;l++)r[t[i[l]]]=i[l];return r}c(Cr,"invert");function Pr(t){var r=[];for(var i in t)Dt(t[i])&&r.push(i);return r.sort()}c(Pr,"functions");function ir(t,r){return function(i){var l=arguments.length;if(r&&(i=Object(i)),l<2||i==null)return i;for(var a=1;a<l;a++)for(var d=arguments[a],p=t(d),h=p.length,g=0;g<h;g++){var v=p[g];(!r||i[v]===void 0)&&(i[v]=d[v])}return i}}c(ir,"createAssigner");var Gl=ir(ni),Qi=ir(vt),Yl=ir(ni,!0);function ql(){return function(){}}c(ql,"ctor");function kr(t){if(!Rn(t))return{};if(ca)return ca(t);var r=ql();r.prototype=t;var i=new r;return r.prototype=null,i}c(kr,"baseCreate");function $(t,r){var i=kr(t);return r&&Qi(i,r),i}c($,"create");function Zo(t){return Rn(t)?rr(t)?t.slice():Gl({},t):t}c(Zo,"clone");function Xl(t,r){return r(t),t}c(Xl,"tap");function hn(t){return rr(t)?t:[t]}c(hn,"toPath"),je.toPath=hn;function nn(t){return je.toPath(t)}c(nn,"_toPath_toPath");function Rr(t,r){for(var i=r.length,l=0;l<i;l++){if(t==null)return;t=t[r[l]]}return i?t:void 0}c(Rr,"deepGet");function ii(t,r,i){var l=Rr(t,nn(r));return ma(l)?i:l}c(ii,"get");function Jl(t,r){r=nn(r);for(var i=r.length,l=0;l<i;l++){var a=r[l];if(!Wn(t,a))return!1;t=t[a]}return!!i}c(Jl,"has_has");function Ki(t){return t}c(Ki,"identity");function Wt(t){return t=Qi({},t),function(r){return Hl(r,t)}}c(Wt,"matcher");function Ir(t){return t=nn(t),function(r){return Rr(r,t)}}c(Ir,"property");function br(t,r,i){if(r===void 0)return t;switch(i??3){case 1:return function(l){return t.call(r,l)};case 3:return function(l,a,d){return t.call(r,l,a,d)};case 4:return function(l,a,d,p){return t.call(r,l,a,d,p)}}return function(){return t.apply(r,arguments)}}c(br,"optimizeCb");function Gi(t,r,i){return t==null?Ki:Dt(t)?br(t,r,i):Rn(t)&&!rr(t)?Wt(t):Ir(t)}c(Gi,"baseIteratee");function mn(t,r){return Gi(t,r,1/0)}c(mn,"iteratee"),je.iteratee=mn;function Tt(t,r,i){return je.iteratee!==mn?je.iteratee(t,r):Gi(t,r,i)}c(Tt,"cb");function Yi(t,r,i){r=Tt(r,i);for(var l=vt(t),a=l.length,d={},p=0;p<a;p++){var h=l[p];d[h]=r(t[h],h,t)}return d}c(Yi,"mapObject");function qi(){}c(qi,"noop");function Vt(t){return t==null?qi:function(r){return ii(t,r)}}c(Vt,"propertyOf");function or(t,r,i){var l=Array(Math.max(0,t));r=br(r,i,1);for(var a=0;a<t;a++)l[a]=r(a);return l}c(or,"times");function bn(t,r){return r==null&&(r=t,t=0),t+Math.floor(Math.random()*(r-t+1))}c(bn,"random_random");var Or=Date.now||function(){return new Date().getTime()};function Ht(t){var r=c(function(d){return t[d]},"escaper"),i="(?:"+vt(t).join("|")+")",l=RegExp(i),a=RegExp(i,"g");return function(d){return d=d==null?"":""+d,l.test(d)?d.replace(a,r):d}}c(Ht,"createEscaper");var Na={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Xi=Ht(Na),Da=Cr(Na),nd=Ht(Da),fc=je.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},es=/(.)^/,ts={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Aa=/\\|'|\r|\n|\u2028|\u2029/g;function oi(t){return"\\"+ts[t]}c(oi,"escapeChar");var pc=/^\s*(\w|\$)+\s*$/;function ja(t,r,i){!r&&i&&(r=i),r=Yl({},r,je.templateSettings);var l=RegExp([(r.escape||es).source,(r.interpolate||es).source,(r.evaluate||es).source].join("|")+"|$","g"),a=0,d="__p+='";t.replace(l,function(v,X,Te,Ft,Re){return d+=t.slice(a,Re).replace(Aa,oi),a=Re+v.length,X?d+=`'+
12
+ */ue(772);var De=ue(359),Qe=60103;if(Re=60107,typeof Symbol=="function"&&Symbol.for){var M=Symbol.for;Qe=M("react.element"),Re=M("react.fragment")}var Ne=De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,je=Object.prototype.hasOwnProperty,ne={key:!0,ref:!0,__self:!0,__source:!0};function ie(Q,J,Ee){var H,ce={},S=null,z=null;Ee!==void 0&&(S=""+Ee),J.key!==void 0&&(S=""+J.key),J.ref!==void 0&&(z=J.ref);for(H in J)je.call(J,H)&&!ne.hasOwnProperty(H)&&(ce[H]=J[H]);if(Q&&Q.defaultProps)for(H in J=Q.defaultProps,J)ce[H]===void 0&&(ce[H]=J[H]);return{$$typeof:Qe,type:Q,key:S,ref:z,props:ce,_owner:Ne.current}}c(ie,"q"),te.jsx=ie,te.jsxs=ie},232:function(K,te,ue){"use strict";K.exports=ue(346)},359:function(K){"use strict";K.exports=Oe},318:function(K){"use strict";K.exports=ke}},nt={};function Fe(K){var te=nt[K];if(te!==void 0)return te.exports;var ue=nt[K]={exports:{}};return se[K](ue,ue.exports,Fe),ue.exports}c(Fe,"__webpack_require__"),(function(){Fe.n=function(K){var te=K&&K.__esModule?function(){return K.default}:function(){return K};return Fe.d(te,{a:te}),te}})(),(function(){Fe.d=function(K,te){for(var ue in te)Fe.o(te,ue)&&!Fe.o(K,ue)&&Object.defineProperty(K,ue,{enumerable:!0,get:te[ue]})}})(),(function(){Fe.o=function(K,te){return Object.prototype.hasOwnProperty.call(K,te)}})(),(function(){Fe.r=function(K){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(K,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(K,"__esModule",{value:!0})}})();var Ze={};return(function(){"use strict";Fe.r(Ze),Fe.d(Ze,{AppEvents:function(){return b},AppNamespace:function(){return vl},BuiltInPowerupCodes:function(){return Jn},Card:function(){return Mn},CardNamespace:function(){return Gr},CheckboxMatcher:function(){return Fs},ComponentFocusableItemType:function(){return gu},DEPRECATED_RICH_TEXT_ELEMENT_TYPES:function(){return Cn},DEPRECATED_RICH_TEXT_ELEMENT_TYPES_TO_NEW_FORMATTING:function(){return Ti},DEPRECATED_RICH_TEXT_FORMATTING_TYPES:function(){return xu},DateMatcher:function(){return mo},DateMatcherTypesToDisplayValue:function(){return Bs},DateNamespace:function(){return gr},DocumentViewer:function(){return Md},EXAM_SCHEDULER_EXPLANATION_TYPES:function(){return Cu},EditorEvents:function(){return ne},EditorNamespace:function(){return Ke},EmbedComponentType:function(){return Jt},EventNamespace:function(){return tr},FocusEvents:function(){return O},FocusNamespace:function(){return ji},FocusPropsType:function(){return yu},GetCardInfoNodeCardFields:function(){return Pi},GlobalEvent:function(){return Ne},KnowledgeBaseNamespace:function(){return Eo},LegacySearchPortalSingleSelectQueryExpression:function(){return Vs},LoadingSpinnerPlugin:function(){return Zd},MessagingEvents:function(){return Ee},MessagingNamespace:function(){return xl},MoveUnit:function(){return Su},MultiSelectMatcher:function(){return fl},MultiSelectMatcherTypesToDisplayValue:function(){return Us},NonRelativeMatcherTypes:function(){return bu},NumberMatcher:function(){return zt},NumberMatcherTypesToDisplayValue:function(){return vo},PDFWebReader:function(){return Fd},PORTAL_TYPE:function(){return Eu},PageType_DUPE_1:function(){return Ci},PluginAccessScopeType:function(){return Xn},PluginActionPermissionLevel:function(){return ks},PluginCommandMenuLocation:function(){return vu},PluginRem:function(){return an},PowerupEvent:function(){return Q},PowerupNamespace:function(){return Pn},PowerupSlotCodeMap:function(){return Si},PreviewRemCards:function(){return Wd},PropertyLocation:function(){return Ds},PropertyType:function(){return Is},QueryExpressionType:function(){return St},QueryNodeType:function(){return rt},QueryRemType:function(){return Pu},Query_DUPE_2:function(){return So},Queue:function(){return Ud},QueueEvent:function(){return je},QueueInteractionScore:function(){return wu},QueueItemType:function(){return Qs},QueueItemTypeHumanReadable:function(){return bi},QueueItemTypeHumanReadableTextToSpeech:function(){return ml},QueueNamespace:function(){return nr},RICH_TEXT_ELEMENT_TYPE:function(){return _u},RICH_TEXT_FORMATTING:function(){return zn},RNPlugin:function(){return Zi},ReactRNPlugin:function(){return Rc},ReaderNamespace:function(){return en},RegisterPowerupOptions:function(){return Ou},RegisterPropertyOptions:function(){return hl},RelativeDateMatcher:function(){return mr},RelativeDateMatcherToLabel:function(){return Ru},RelativeDateModifier:function(){return yo},RelativeDatePeriod:function(){return zs},RemColor:function(){return ul},RemEvent:function(){return ie},RemHierarchyEditorTree:function(){return Bd},RemNamespace:function(){return wi},RemRichTextEditor:function(){return zd},RemType:function(){return Rs},RemTypeTinyGraph:function(){return bs},RemViewer:function(){return Ld},RichText:function(){return jd},RichTextEditor:function(){return Ad},RichTextNamespace:function(){return Zn},SchedulerExplanationType:function(){return Ns},SchedulerNamespace:function(){return Xr},SearchNamespace:function(){return Rl},SearchPortalCheckboxQueryExpression:function(){return Hs},SearchPortalDateQueryExpression:function(){return qr},SearchPortalGetCardInfoQueryNode:function(){return js},SearchPortalGroupQueryNode:function(){return dl},SearchPortalMultiSelectQueryExpression:function(){return Ws},SearchPortalNumberQueryExpression:function(){return pl},SearchPortalQuery:function(){return Ri},SearchPortalQueryExpression:function(){return $s},SearchPortalRefQueryExpression:function(){return Ls},SearchPortalRemTypeQueryExpression:function(){return ku},SearchPortalSingleSelectQueryExpression:function(){return Xe},SearchPortalSlotQueryNode:function(){return As},SearchPortalTextQueryExpression:function(){return Zs},SearchPortalUnaryQueryNode:function(){return cl},SelectSourceType:function(){return Yr},SelectionType:function(){return al},SetRemType:function(){return pu},SettingEvents:function(){return H},SettingsNamespace:function(){return cn},SidebarEvents:function(){return J},SingleSelectMatcher:function(){return go},SingleSelectMatcherTypesToDisplayValue:function(){return Iu},SpecialPluginCallback:function(){return Tu},StorageEvents:function(){return ce},StorageNamespace:function(){return Ol},TextMatcher:function(){return Ms},TextMatcherTypesToDisplayValue:function(){return ki},TextMatchersAllowedWithoutPrimaryQuery:function(){return Yc},WidgetEvents:function(){return S},WidgetLocation:function(){return fu},WidgetNamespace:function(){return fn},WindowEvents:function(){return z},WindowNamespace:function(){return Oo},createReactiveApi:function(){return hd},declareIndexPlugin:function(){return Yd},filterAsync:function(){return uf},isAppEvent:function(){return Z},numberValidatorSig:function(){return ho},parseManifest:function(){return gp},remTypeTinyGraphToNormal:function(){return mu},remTypeToTinyGraphType:function(){return hu},renderWidget:function(){return Gd},richTextFormatNameCodeMap:function(){return Ps},stringValidatorSig:function(){return Os},useAPIEventListener:function(){return bc},useGetRemsByIdsReactive:function(){return tf},useLocalStorageState:function(){return of},useOnMessageBroadcast:function(){return qd},usePlugin:function(){return ai},useRunAsync:function(){return af},useSessionStorageState:function(){return rf},useSyncedStorageState:function(){return lf},useTrackerPlugin:function(){return yf}});var K={};Fe.r(K),Fe.d(K,{VERSION:function(){return Wi},after:function(){return os},all:function(){return Wa},allKeys:function(){return ni},any:function(){return si},assign:function(){return Qi},before:function(){return za},bind:function(){return mc},bindAll:function(){return gc},chain:function(){return La},chunk:function(){return Ed},clone:function(){return Zo},collect:function(){return Lr},compact:function(){return G},compose:function(){return rn},constant:function(){return Zl},contains:function(){return Hn},countBy:function(){return F},create:function(){return $},debounce:function(){return wc},default:function(){return Rf},defaults:function(){return Yl},defer:function(){return Dr},delay:function(){return Fa},detect:function(){return to},difference:function(){return be},drop:function(){return D},each:function(){return gn},escape:function(){return Xi},every:function(){return Wa},extend:function(){return Gl},extendOwn:function(){return Qi},filter:function(){return Vn},find:function(){return to},findIndex:function(){return Wo},findKey:function(){return eo},findLastIndex:function(){return ls},findWhere:function(){return Ua},first:function(){return I},flatten:function(){return _e},foldl:function(){return li},foldr:function(){return xc},forEach:function(){return gn},functions:function(){return Pr},get:function(){return ii},groupBy:function(){return V},has:function(){return Jl},head:function(){return I},identity:function(){return Ki},include:function(){return Hn},includes:function(){return Hn},indexBy:function(){return ve},indexOf:function(){return _c},initial:function(){return E},inject:function(){return li},intersection:function(){return wd},invert:function(){return Cr},invoke:function(){return as},isArguments:function(){return zl},isArray:function(){return rr},isArrayBuffer:function(){return Fl},isBoolean:function(){return ga},isDataView:function(){return Fo},isDate:function(){return oc},isElement:function(){return ic},isEmpty:function(){return cc},isEqual:function(){return Ql},isError:function(){return va},isFinite:function(){return Bl},isFunction:function(){return Dt},isMap:function(){return _t},isMatch:function(){return Hl},isNaN:function(){return Ul},isNull:function(){return rc},isNumber:function(){return ya},isObject:function(){return Rn},isRegExp:function(){return lc},isSet:function(){return ri},isString:function(){return Nt},isSymbol:function(){return wa},isTypedArray:function(){return ka},isUndefined:function(){return ma},isWeakMap:function(){return At},isWeakSet:function(){return Oa},iteratee:function(){return mn},keys:function(){return wt},last:function(){return we},lastIndexOf:function(){return ss},map:function(){return Lr},mapObject:function(){return Yi},matcher:function(){return Wt},matches:function(){return Wt},max:function(){return o},memoize:function(){return yc},methods:function(){return Pr},min:function(){return s},mixin:function(){return od},negate:function(){return is},noop:function(){return qi},now:function(){return Or},object:function(){return _d},omit:function(){return _},once:function(){return Ar},pairs:function(){return Uo},partial:function(){return rs},partition:function(){return ee},pick:function(){return T},pluck:function(){return e},property:function(){return br},propertyOf:function(){return Vt},random:function(){return In},range:function(){return xd},reduce:function(){return li},reduceRight:function(){return xc},reject:function(){return Za},rest:function(){return D},restArguments:function(){return bt},result:function(){return Ji},sample:function(){return m},select:function(){return Vn},shuffle:function(){return y},size:function(){return he},some:function(){return si},sortBy:function(){return w},sortedIndex:function(){return Vo},tail:function(){return D},take:function(){return I},tap:function(){return Xl},template:function(){return ja},templateSettings:function(){return fc},throttle:function(){return vc},times:function(){return or},toArray:function(){return f},toPath:function(){return hn},transpose:function(){return Ec},unescape:function(){return nd},union:function(){return id},uniq:function(){return On},unique:function(){return On},uniqueId:function(){return hc},unzip:function(){return Ec},values:function(){return lt},where:function(){return n},without:function(){return Te},wrap:function(){return Ma},zip:function(){return kf}});var te=Object.defineProperty,ue=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Qe=c((t,r,i)=>r in t?te(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"__defNormalProp"),M=c((t,r)=>{for(var i in r||(r={}))Re.call(r,i)&&Qe(t,i,r[i]);if(ue)for(var i of ue(r))De.call(r,i)&&Qe(t,i,r[i]);return t},"__spreadValues");const Ne={GlobalOpenRem:"global.open-rem",URLChange:"global.url-change"},je={QueueLoadCard:"queue.load-card",QueueCompleteCard:"queue.complete-card",QueueEnter:"queue.enter",QueueExit:"queue.exit",RevealAnswer:"queue.reveal-answer"},ne={EditorSelectionChanged:"editor.selection-changed",EditorTextEdited:"editor.text-edited"},ie={RemChanged:"rem.changed",GlobalRemChanged:"global.rem.changed"},Q={PowerupSlotChanged:"powerup.slot.changed",ClickRemReference:"powerup.click-rem-reference",MouseOverLink:"powerup.mouse-enter-link",MouseOutLink:"powerup.mouse-out-link",SetTodoStatus:"powerup.todo.set-status"},J={ClickSidebarItem:"sidebar.click-item"},Ee={MessageBroadcast:"messaging.broadcast"},H={SettingChanged:"setting.changed"},ce={StorageSessionChange:"storage.session.changed",StorageSyncedChange:"storage.synced.changed",StorageLocalChange:"storage.local.changed"},S={FakeEmbedComponentDimensionChange:"widget.virtual-embed-dimension-change",FakeEmbedDOMEvent:"widget.virtual-embed-dom-event",StealKeyEvent:"widget.steal-key-event"},z={FocusedPaneChange:"window.focusedPane.changed",CurrentWindowTreeChange:"window.PaneIdWindowTree.changed"},O={FocusedRemChange:"window.focusedRem.changed",FocusedPortalChange:"window.focusedPortal.changed"},b=M(M(M(M(M(M(M(M(M(M(M(M({onActivate:"onActivate",onDeactivate:"onDeactivate",setDarkMode:"setDarkMode",setCustomCSS:"setCustomCSS"},z),Ee),J),Q),ie),Ne),je),ce),S),ne),H),O);function Z(t){return Object.values(b).includes(t)}c(Z,"isAppEvent");var U;(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 l(a,d=" | "){return a.map(p=>typeof p=="string"?`'${p}'`:p).join(d)}c(l,"joinValues"),t.joinValues=l,t.jsonStringifyReplacer=(a,d)=>typeof d=="bigint"?d.toString():d})(U||(U={}));var Y;(function(t){t.mergeShapes=(r,i)=>P(P({},r),i)})(Y||(Y={}));const j=U.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),de=c(t=>{switch(typeof t){case"undefined":return j.undefined;case"string":return j.string;case"number":return isNaN(t)?j.nan:j.number;case"boolean":return j.boolean;case"function":return j.function;case"bigint":return j.bigint;case"symbol":return j.symbol;case"object":return Array.isArray(t)?j.array:t===null?j.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?j.promise:typeof Map<"u"&&t instanceof Map?j.map:typeof Set<"u"&&t instanceof Set?j.set:typeof Date<"u"&&t instanceof Date?j.date:j.object;default:return j.unknown}},"getParsedType"),A=U.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"]),Mt=c(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson");class Pt extends Error{constructor(r){super(),this.issues=[],this.addIssue=l=>{this.issues=[...this.issues,l]},this.addIssues=(l=[])=>{this.issues=[...this.issues,...l]};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},l={_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)l._errors.push(i(p));else{let h=l,g=0;for(;g<p.path.length;){const v=p.path[g];g===p.path.length-1?(h[v]=h[v]||{_errors:[]},h[v]._errors.push(i(p))):h[v]=h[v]||{_errors:[]},h=h[v],g++}}},"processError");return a(this),l}toString(){return this.message}get message(){return JSON.stringify(this.issues,U.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=i=>i.message){const i={},l=[];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))):l.push(r(a));return{formErrors:l,fieldErrors:i}}get formErrors(){return this.flatten()}}c(Pt,"ZodError"),Pt.create=t=>new Pt(t);const Dn=c((t,r)=>{let i;switch(t.code){case A.invalid_type:t.received===j.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case A.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,U.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:i=`Unrecognized key(s) in object: ${U.joinValues(t.keys,", ")}`;break;case A.invalid_union:i="Invalid input";break;case A.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${U.joinValues(t.options)}`;break;case A.invalid_enum_value:i=`Invalid enum value. Expected ${U.joinValues(t.options)}, received '${t.received}'`;break;case A.invalid_arguments:i="Invalid function arguments";break;case A.invalid_return_type:i="Invalid function return type";break;case A.invalid_date:i="Invalid date";break;case A.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}"`:U.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case A.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 A.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 A.custom:i="Invalid input";break;case A.invalid_intersection_types:i="Intersection results could not be merged";break;case A.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case A.not_finite:i="Number must be finite";break;default:i=r.defaultError,U.assertNever(t)}return{message:i}},"errorMap");let Va=Dn;function Br(t){Va=t}c(Br,"setErrorMap");function on(){return Va}c(on,"getErrorMap");const no=c(t=>{const{data:r,path:i,errorMaps:l,issueData:a}=t,d=[...i,...a.path||[]],p=B(P({},a),{path:d});let h="";const g=l.filter(v=>!!v).slice().reverse();for(const v of g)h=v(p,{data:r,defaultError:h}).message;return B(P({},a),{path:d,message:a.message||h})},"makeIssue"),Ac=[];function W(t,r){const i=no({issueData:r,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,on(),Dn].filter(l=>!!l)});t.common.issues.push(i)}c(W,"addIssueToContext");class Et{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(r,i){const l=[];for(const a of i){if(a.status==="aborted")return me;a.status==="dirty"&&r.dirty(),l.push(a.value)}return{status:r.value,value:l}}static mergeObjectAsync(r,i){return tt(this,null,function*(){const l=[];for(const a of i)l.push({key:yield a.key,value:yield a.value});return Et.mergeObjectSync(r,l)})}static mergeObjectSync(r,i){const l={};for(const a of i){const{key:d,value:p}=a;if(d.status==="aborted"||p.status==="aborted")return me;d.status==="dirty"&&r.dirty(),p.status==="dirty"&&r.dirty(),d.value!=="__proto__"&&(typeof p.value<"u"||a.alwaysSet)&&(l[d.value]=p.value)}return{status:r.value,value:l}}}c(Et,"ParseStatus");const me=Object.freeze({status:"aborted"}),Yo=c(t=>({status:"dirty",value:t}),"DIRTY"),It=c(t=>({status:"valid",value:t}),"OK"),qo=c(t=>t.status==="aborted","isAborted"),ro=c(t=>t.status==="dirty","isDirty"),ci=c(t=>t.status==="valid","isValid"),di=c(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");var oe;(function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message})(oe||(oe={}));class $t{constructor(r,i,l,a){this._cachedPath=[],this.parent=r,this.data=i,this._path=l,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($t,"ParseInputLazyPath");const Ur=c((t,r)=>{if(ci(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 Pt(t.common.issues);return this._error=i,this._error}}},"handleResult");function ge(t){if(!t)return{};const{errorMap:r,invalid_type_error:i,required_error:l,description:a}=t;if(r&&(i||l))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:l??p.defaultError}:{message:i??p.defaultError},"customMap"),description:a}}c(ge,"processCreateParams");class Se{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 de(r.data)}_getOrReturnCtx(r,i){return i||{common:r.parent.common,data:r.data,parsedType:de(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}_processInputParams(r){return{status:new Et,ctx:{common:r.parent.common,data:r.data,parsedType:de(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}}_parseSync(r){const i=this._parse(r);if(di(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 l=this.safeParse(r,i);if(l.success)return l.data;throw l.error}safeParse(r,i){var l;const a={common:{issues:[],async:(l=i?.async)!==null&&l!==void 0?l:!1,contextualErrorMap:i?.errorMap},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:de(r)},d=this._parseSync({data:r,path:a.path,parent:a});return Ur(a,d)}parseAsync(r,i){return tt(this,null,function*(){const l=yield this.safeParseAsync(r,i);if(l.success)return l.data;throw l.error})}safeParseAsync(r,i){return tt(this,null,function*(){const l={common:{issues:[],contextualErrorMap:i?.errorMap,async:!0},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:de(r)},a=this._parse({data:r,path:l.path,parent:l}),d=yield di(a)?a:Promise.resolve(a);return Ur(l,d)})}refine(r,i){const l=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(P({code:A.custom},l(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((l,a)=>r(l)?!0:(a.addIssue(typeof i=="function"?i(l,a):i),!1))}_refinement(r){return new qt({schema:this,typeName:re.ZodEffects,effect:{type:"refinement",refinement:r}})}superRefine(r){return this._refinement(r)}optional(){return En.create(this,this._def)}nullable(){return dr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kt.create(this,this._def)}promise(){return Yt.create(this,this._def)}or(r){return ln.create([this,r],this._def)}and(r){return jn.create(this,r,this._def)}transform(r){return new qt(B(P({},ge(this._def)),{schema:this,typeName:re.ZodEffects,effect:{type:"transform",transform:r}}))}default(r){const i=typeof r=="function"?r:()=>r;return new Hr(B(P({},ge(this._def)),{innerType:this,defaultValue:i,typeName:re.ZodDefault}))}brand(){return new el(P({typeName:re.ZodBranded,type:this},ge(this._def)))}catch(r){const i=typeof r=="function"?r:()=>r;return new hi(B(P({},ge(this._def)),{innerType:this,catchValue:i,typeName:re.ZodCatch}))}describe(r){const i=this.constructor;return new i(B(P({},this._def),{description:r}))}pipe(r){return $r.create(this,r)}readonly(){return Qr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}c(Se,"ZodType");const Ha=/^c[^\s-]{8,}$/i,$a=/^[a-z][a-z0-9]*$/,ps=/[0-9A-HJKMNP-TV-Z]{26}/,Qa=/^[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,hs=/^([A-Z0-9_+-]+\.?)*[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xo=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Ka=/^(((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}))$/,io=/^(([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})))$/,oo=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 Ga(t,r){return!!((r==="v4"||!r)&&Ka.test(t)||(r==="v6"||!r)&&io.test(t))}c(Ga,"isValidIP");class Qt extends Se{constructor(){super(...arguments),this._regex=(r,i,l)=>this.refinement(a=>r.test(a),P({validation:i,code:A.invalid_string},oe.errToObj(l))),this.nonempty=r=>this.min(1,oe.errToObj(r)),this.trim=()=>new Qt(B(P({},this._def),{checks:[...this._def.checks,{kind:"trim"}]})),this.toLowerCase=()=>new Qt(B(P({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]})),this.toUpperCase=()=>new Qt(B(P({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==j.string){const a=this._getOrReturnCtx(r);return W(a,{code:A.invalid_type,expected:j.string,received:a.parsedType}),me}const i=new Et;let l;for(const a of this._def.checks)if(a.kind==="min")r.data.length<a.value&&(l=this._getOrReturnCtx(r,l),W(l,{code:A.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&&(l=this._getOrReturnCtx(r,l),W(l,{code:A.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)&&(l=this._getOrReturnCtx(r,l),d?W(l,{code:A.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):p&&W(l,{code:A.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")hs.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"email",code:A.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")Xo.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"emoji",code:A.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")Qa.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"uuid",code:A.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")Ha.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"cuid",code:A.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")$a.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"cuid2",code:A.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")ps.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"ulid",code:A.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(r.data)}catch{l=this._getOrReturnCtx(r,l),W(l,{validation:"url",code:A.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"regex",code:A.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)||(l=this._getOrReturnCtx(r,l),W(l,{code:A.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)||(l=this._getOrReturnCtx(r,l),W(l,{code:A.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?r.data.endsWith(a.value)||(l=this._getOrReturnCtx(r,l),W(l,{code:A.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?oo(a).test(r.data)||(l=this._getOrReturnCtx(r,l),W(l,{code:A.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="ip"?Ga(r.data,a.version)||(l=this._getOrReturnCtx(r,l),W(l,{validation:"ip",code:A.invalid_string,message:a.message}),i.dirty()):U.assertNever(a);return{status:i.value,value:r.data}}_addCheck(r){return new Qt(B(P({},this._def),{checks:[...this._def.checks,r]}))}email(r){return this._addCheck(P({kind:"email"},oe.errToObj(r)))}url(r){return this._addCheck(P({kind:"url"},oe.errToObj(r)))}emoji(r){return this._addCheck(P({kind:"emoji"},oe.errToObj(r)))}uuid(r){return this._addCheck(P({kind:"uuid"},oe.errToObj(r)))}cuid(r){return this._addCheck(P({kind:"cuid"},oe.errToObj(r)))}cuid2(r){return this._addCheck(P({kind:"cuid2"},oe.errToObj(r)))}ulid(r){return this._addCheck(P({kind:"ulid"},oe.errToObj(r)))}ip(r){return this._addCheck(P({kind:"ip"},oe.errToObj(r)))}datetime(r){var i;return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:r}):this._addCheck(P({kind:"datetime",precision:typeof r?.precision>"u"?null:r?.precision,offset:(i=r?.offset)!==null&&i!==void 0?i:!1},oe.errToObj(r?.message)))}regex(r,i){return this._addCheck(P({kind:"regex",regex:r},oe.errToObj(i)))}includes(r,i){return this._addCheck(P({kind:"includes",value:r,position:i?.position},oe.errToObj(i?.message)))}startsWith(r,i){return this._addCheck(P({kind:"startsWith",value:r},oe.errToObj(i)))}endsWith(r,i){return this._addCheck(P({kind:"endsWith",value:r},oe.errToObj(i)))}min(r,i){return this._addCheck(P({kind:"min",value:r},oe.errToObj(i)))}max(r,i){return this._addCheck(P({kind:"max",value:r},oe.errToObj(i)))}length(r,i){return this._addCheck(P({kind:"length",value:r},oe.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(Qt,"ZodString"),Qt.create=t=>{var r;return new Qt(P({checks:[],typeName:re.ZodString,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},ge(t)))};function ms(t,r){const i=(t.toString().split(".")[1]||"").length,l=(r.toString().split(".")[1]||"").length,a=i>l?i:l,d=parseInt(t.toFixed(a).replace(".","")),p=parseInt(r.toFixed(a).replace(".",""));return d%p/Math.pow(10,a)}c(ms,"floatSafeRemainder");class $n extends Se{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)!==j.number){const a=this._getOrReturnCtx(r);return W(a,{code:A.invalid_type,expected:j.number,received:a.parsedType}),me}let i;const l=new Et;for(const a of this._def.checks)a.kind==="int"?U.isInteger(r.data)||(i=this._getOrReturnCtx(r,i),W(i,{code:A.invalid_type,expected:"integer",received:"float",message:a.message}),l.dirty()):a.kind==="min"?(a.inclusive?r.data<a.value:r.data<=a.value)&&(i=this._getOrReturnCtx(r,i),W(i,{code:A.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),W(i,{code:A.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="multipleOf"?ms(r.data,a.value)!==0&&(i=this._getOrReturnCtx(r,i),W(i,{code:A.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):a.kind==="finite"?Number.isFinite(r.data)||(i=this._getOrReturnCtx(r,i),W(i,{code:A.not_finite,message:a.message}),l.dirty()):U.assertNever(a);return{status:l.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,oe.toString(i))}gt(r,i){return this.setLimit("min",r,!1,oe.toString(i))}lte(r,i){return this.setLimit("max",r,!0,oe.toString(i))}lt(r,i){return this.setLimit("max",r,!1,oe.toString(i))}setLimit(r,i,l,a){return new $n(B(P({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:l,message:oe.toString(a)}]}))}_addCheck(r){return new $n(B(P({},this._def),{checks:[...this._def.checks,r]}))}int(r){return this._addCheck({kind:"int",message:oe.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:oe.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:oe.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:oe.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:oe.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:oe.toString(i)})}finite(r){return this._addCheck({kind:"finite",message:oe.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:oe.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:oe.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"&&U.isInteger(r.value))}get isFinite(){let r=null,i=null;for(const l of this._def.checks){if(l.kind==="finite"||l.kind==="int"||l.kind==="multipleOf")return!0;l.kind==="min"?(i===null||l.value>i)&&(i=l.value):l.kind==="max"&&(r===null||l.value<r)&&(r=l.value)}return Number.isFinite(i)&&Number.isFinite(r)}}c($n,"ZodNumber"),$n.create=t=>new $n(P({checks:[],typeName:re.ZodNumber,coerce:t?.coerce||!1},ge(t)));class vn extends Se{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)!==j.bigint){const a=this._getOrReturnCtx(r);return W(a,{code:A.invalid_type,expected:j.bigint,received:a.parsedType}),me}let i;const l=new Et;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),W(i,{code:A.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),W(i,{code:A.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="multipleOf"?r.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(r,i),W(i,{code:A.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):U.assertNever(a);return{status:l.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,oe.toString(i))}gt(r,i){return this.setLimit("min",r,!1,oe.toString(i))}lte(r,i){return this.setLimit("max",r,!0,oe.toString(i))}lt(r,i){return this.setLimit("max",r,!1,oe.toString(i))}setLimit(r,i,l,a){return new vn(B(P({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:l,message:oe.toString(a)}]}))}_addCheck(r){return new vn(B(P({},this._def),{checks:[...this._def.checks,r]}))}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:oe.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:oe.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:oe.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:oe.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:oe.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(vn,"ZodBigInt"),vn.create=t=>{var r;return new vn(P({checks:[],typeName:re.ZodBigInt,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},ge(t)))};class ar extends Se{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==j.boolean){const i=this._getOrReturnCtx(r);return W(i,{code:A.invalid_type,expected:j.boolean,received:i.parsedType}),me}return It(r.data)}}c(ar,"ZodBoolean"),ar.create=t=>new ar(P({typeName:re.ZodBoolean,coerce:t?.coerce||!1},ge(t)));class An extends Se{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==j.date){const a=this._getOrReturnCtx(r);return W(a,{code:A.invalid_type,expected:j.date,received:a.parsedType}),me}if(isNaN(r.data.getTime())){const a=this._getOrReturnCtx(r);return W(a,{code:A.invalid_date}),me}const i=new Et;let l;for(const a of this._def.checks)a.kind==="min"?r.data.getTime()<a.value&&(l=this._getOrReturnCtx(r,l),W(l,{code:A.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?r.data.getTime()>a.value&&(l=this._getOrReturnCtx(r,l),W(l,{code:A.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):U.assertNever(a);return{status:i.value,value:new Date(r.data.getTime())}}_addCheck(r){return new An(B(P({},this._def),{checks:[...this._def.checks,r]}))}min(r,i){return this._addCheck({kind:"min",value:r.getTime(),message:oe.toString(i)})}max(r,i){return this._addCheck({kind:"max",value:r.getTime(),message:oe.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(An,"ZodDate"),An.create=t=>new An(P({checks:[],coerce:t?.coerce||!1,typeName:re.ZodDate},ge(t)));class Zr extends Se{_parse(r){if(this._getType(r)!==j.symbol){const i=this._getOrReturnCtx(r);return W(i,{code:A.invalid_type,expected:j.symbol,received:i.parsedType}),me}return It(r.data)}}c(Zr,"ZodSymbol"),Zr.create=t=>new Zr(P({typeName:re.ZodSymbol},ge(t)));class wn extends Se{_parse(r){if(this._getType(r)!==j.undefined){const i=this._getOrReturnCtx(r);return W(i,{code:A.invalid_type,expected:j.undefined,received:i.parsedType}),me}return It(r.data)}}c(wn,"ZodUndefined"),wn.create=t=>new wn(P({typeName:re.ZodUndefined},ge(t)));class _n extends Se{_parse(r){if(this._getType(r)!==j.null){const i=this._getOrReturnCtx(r);return W(i,{code:A.invalid_type,expected:j.null,received:i.parsedType}),me}return It(r.data)}}c(_n,"ZodNull"),_n.create=t=>new _n(P({typeName:re.ZodNull},ge(t)));class ur extends Se{constructor(){super(...arguments),this._any=!0}_parse(r){return It(r.data)}}c(ur,"ZodAny"),ur.create=t=>new ur(P({typeName:re.ZodAny},ge(t)));class Qn extends Se{constructor(){super(...arguments),this._unknown=!0}_parse(r){return It(r.data)}}c(Qn,"ZodUnknown"),Qn.create=t=>new Qn(P({typeName:re.ZodUnknown},ge(t)));class xn extends Se{_parse(r){const i=this._getOrReturnCtx(r);return W(i,{code:A.invalid_type,expected:j.never,received:i.parsedType}),me}}c(xn,"ZodNever"),xn.create=t=>new xn(P({typeName:re.ZodNever},ge(t)));class Wr extends Se{_parse(r){if(this._getType(r)!==j.undefined){const i=this._getOrReturnCtx(r);return W(i,{code:A.invalid_type,expected:j.void,received:i.parsedType}),me}return It(r.data)}}c(Wr,"ZodVoid"),Wr.create=t=>new Wr(P({typeName:re.ZodVoid},ge(t)));class Kt extends Se{_parse(r){const{ctx:i,status:l}=this._processInputParams(r),a=this._def;if(i.parsedType!==j.array)return W(i,{code:A.invalid_type,expected:j.array,received:i.parsedType}),me;if(a.exactLength!==null){const p=i.data.length>a.exactLength.value,h=i.data.length<a.exactLength.value;(p||h)&&(W(i,{code:p?A.too_big:A.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}),l.dirty())}if(a.minLength!==null&&i.data.length<a.minLength.value&&(W(i,{code:A.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),l.dirty()),a.maxLength!==null&&i.data.length>a.maxLength.value&&(W(i,{code:A.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),l.dirty()),i.common.async)return Promise.all([...i.data].map((p,h)=>a.type._parseAsync(new $t(i,p,i.path,h)))).then(p=>Et.mergeArray(l,p));const d=[...i.data].map((p,h)=>a.type._parseSync(new $t(i,p,i.path,h)));return Et.mergeArray(l,d)}get element(){return this._def.type}min(r,i){return new Kt(B(P({},this._def),{minLength:{value:r,message:oe.toString(i)}}))}max(r,i){return new Kt(B(P({},this._def),{maxLength:{value:r,message:oe.toString(i)}}))}length(r,i){return new Kt(B(P({},this._def),{exactLength:{value:r,message:oe.toString(i)}}))}nonempty(r){return this.min(1,r)}}c(Kt,"ZodArray"),Kt.create=(t,r)=>new Kt(P({type:t,minLength:null,maxLength:null,exactLength:null,typeName:re.ZodArray},ge(r)));function Kn(t){if(t instanceof Je){const r={};for(const i in t.shape){const l=t.shape[i];r[i]=En.create(Kn(l))}return new Je(B(P({},t._def),{shape:()=>r}))}else return t instanceof Kt?new Kt(B(P({},t._def),{type:Kn(t.element)})):t instanceof En?En.create(Kn(t.unwrap())):t instanceof dr?dr.create(Kn(t.unwrap())):t instanceof Gt?Gt.create(t.items.map(r=>Kn(r))):t}c(Kn,"deepPartialify");class Je extends Se{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=U.objectKeys(r);return this._cached={shape:r,keys:i}}_parse(r){if(this._getType(r)!==j.object){const g=this._getOrReturnCtx(r);return W(g,{code:A.invalid_type,expected:j.object,received:g.parsedType}),me}const{status:i,ctx:l}=this._processInputParams(r),{shape:a,keys:d}=this._getCached(),p=[];if(!(this._def.catchall instanceof xn&&this._def.unknownKeys==="strip"))for(const g in l.data)d.includes(g)||p.push(g);const h=[];for(const g of d){const v=a[g],X=l.data[g];h.push({key:{status:"valid",value:g},value:v._parse(new $t(l,X,l.path,g)),alwaysSet:g in l.data})}if(this._def.catchall instanceof xn){const g=this._def.unknownKeys;if(g==="passthrough")for(const v of p)h.push({key:{status:"valid",value:v},value:{status:"valid",value:l.data[v]}});else if(g==="strict")p.length>0&&(W(l,{code:A.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 v of p){const X=l.data[v];h.push({key:{status:"valid",value:v},value:g._parse(new $t(l,X,l.path,v)),alwaysSet:v in l.data})}}return l.common.async?Promise.resolve().then(()=>tt(this,null,function*(){const g=[];for(const v of h){const X=yield v.key;g.push({key:X,value:yield v.value,alwaysSet:v.alwaysSet})}return g})).then(g=>Et.mergeObjectSync(i,g)):Et.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(r){return oe.errToObj,new Je(P(B(P({},this._def),{unknownKeys:"strict"}),r!==void 0?{errorMap:(i,l)=>{var a,d,p,h;const g=(p=(d=(a=this._def).errorMap)===null||d===void 0?void 0:d.call(a,i,l).message)!==null&&p!==void 0?p:l.defaultError;return i.code==="unrecognized_keys"?{message:(h=oe.errToObj(r).message)!==null&&h!==void 0?h:g}:{message:g}}}:{}))}strip(){return new Je(B(P({},this._def),{unknownKeys:"strip"}))}passthrough(){return new Je(B(P({},this._def),{unknownKeys:"passthrough"}))}extend(r){return new Je(B(P({},this._def),{shape:()=>P(P({},this._def.shape()),r)}))}merge(r){return new Je({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>P(P({},this._def.shape()),r._def.shape()),typeName:re.ZodObject})}setKey(r,i){return this.augment({[r]:i})}catchall(r){return new Je(B(P({},this._def),{catchall:r}))}pick(r){const i={};return U.objectKeys(r).forEach(l=>{r[l]&&this.shape[l]&&(i[l]=this.shape[l])}),new Je(B(P({},this._def),{shape:()=>i}))}omit(r){const i={};return U.objectKeys(this.shape).forEach(l=>{r[l]||(i[l]=this.shape[l])}),new Je(B(P({},this._def),{shape:()=>i}))}deepPartial(){return Kn(this)}partial(r){const i={};return U.objectKeys(this.shape).forEach(l=>{const a=this.shape[l];r&&!r[l]?i[l]=a:i[l]=a.optional()}),new Je(B(P({},this._def),{shape:()=>i}))}required(r){const i={};return U.objectKeys(this.shape).forEach(l=>{if(r&&!r[l])i[l]=this.shape[l];else{let a=this.shape[l];for(;a instanceof En;)a=a._def.innerType;i[l]=a}}),new Je(B(P({},this._def),{shape:()=>i}))}keyof(){return gs(U.objectKeys(this.shape))}}c(Je,"ZodObject"),Je.create=(t,r)=>new Je(P({shape:()=>t,unknownKeys:"strip",catchall:xn.create(),typeName:re.ZodObject},ge(r))),Je.strictCreate=(t,r)=>new Je(P({shape:()=>t,unknownKeys:"strict",catchall:xn.create(),typeName:re.ZodObject},ge(r))),Je.lazycreate=(t,r)=>new Je(P({shape:t,unknownKeys:"strip",catchall:xn.create(),typeName:re.ZodObject},ge(r)));class ln extends Se{_parse(r){const{ctx:i}=this._processInputParams(r),l=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 Pt(h.ctx.common.issues));return W(i,{code:A.invalid_union,unionErrors:p}),me}if(c(a,"handleResults"),i.common.async)return Promise.all(l.map(d=>tt(this,null,function*(){const p=B(P({},i),{common:B(P({},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 l){const v=B(P({},i),{common:B(P({},i.common),{issues:[]}),parent:null}),X=g._parseSync({data:i.data,path:i.path,parent:v});if(X.status==="valid")return X;X.status==="dirty"&&!d&&(d={result:X,ctx:v}),v.common.issues.length&&p.push(v.common.issues)}if(d)return i.common.issues.push(...d.ctx.common.issues),d.result;const h=p.map(g=>new Pt(g));return W(i,{code:A.invalid_union,unionErrors:h}),me}}get options(){return this._def.options}}c(ln,"ZodUnion"),ln.create=(t,r)=>new ln(P({options:t,typeName:re.ZodUnion},ge(r)));const fi=c(t=>t instanceof Gn?fi(t.schema):t instanceof qt?fi(t.innerType()):t instanceof cr?[t.value]:t instanceof Yn?t.options:t instanceof pi?Object.keys(t.enum):t instanceof Hr?fi(t._def.innerType):t instanceof wn?[void 0]:t instanceof _n?[null]:null,"getDiscriminator");class Vr extends Se{_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==j.object)return W(i,{code:A.invalid_type,expected:j.object,received:i.parsedType}),me;const l=this.discriminator,a=i.data[l],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}):(W(i,{code:A.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[l]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(r,i,l){const a=new Map;for(const d of i){const p=fi(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 Vr(P({typeName:re.ZodDiscriminatedUnion,discriminator:r,options:i,optionsMap:a},ge(l)))}}c(Vr,"ZodDiscriminatedUnion");function Jo(t,r){const i=de(t),l=de(r);if(t===r)return{valid:!0,data:t};if(i===j.object&&l===j.object){const a=U.objectKeys(r),d=U.objectKeys(t).filter(h=>a.indexOf(h)!==-1),p=P(P({},t),r);for(const h of d){const g=Jo(t[h],r[h]);if(!g.valid)return{valid:!1};p[h]=g.data}return{valid:!0,data:p}}else if(i===j.array&&l===j.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=Jo(p,h);if(!g.valid)return{valid:!1};a.push(g.data)}return{valid:!0,data:a}}else return i===j.date&&l===j.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}c(Jo,"mergeValues");class jn extends Se{_parse(r){const{status:i,ctx:l}=this._processInputParams(r),a=c((d,p)=>{if(qo(d)||qo(p))return me;const h=Jo(d.value,p.value);return h.valid?((ro(d)||ro(p))&&i.dirty(),{status:i.value,value:h.data}):(W(l,{code:A.invalid_intersection_types}),me)},"handleParsed");return l.common.async?Promise.all([this._def.left._parseAsync({data:l.data,path:l.path,parent:l}),this._def.right._parseAsync({data:l.data,path:l.path,parent:l})]).then(([d,p])=>a(d,p)):a(this._def.left._parseSync({data:l.data,path:l.path,parent:l}),this._def.right._parseSync({data:l.data,path:l.path,parent:l}))}}c(jn,"ZodIntersection"),jn.create=(t,r,i)=>new jn(P({left:t,right:r,typeName:re.ZodIntersection},ge(i)));class Gt extends Se{_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==j.array)return W(l,{code:A.invalid_type,expected:j.array,received:l.parsedType}),me;if(l.data.length<this._def.items.length)return W(l,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&l.data.length>this._def.items.length&&(W(l,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const a=[...l.data].map((d,p)=>{const h=this._def.items[p]||this._def.rest;return h?h._parse(new $t(l,d,l.path,p)):null}).filter(d=>!!d);return l.common.async?Promise.all(a).then(d=>Et.mergeArray(i,d)):Et.mergeArray(i,a)}get items(){return this._def.items}rest(r){return new Gt(B(P({},this._def),{rest:r}))}}c(Gt,"ZodTuple"),Gt.create=(t,r)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gt(P({items:t,typeName:re.ZodTuple,rest:null},ge(r)))};class Ln extends Se{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==j.object)return W(l,{code:A.invalid_type,expected:j.object,received:l.parsedType}),me;const a=[],d=this._def.keyType,p=this._def.valueType;for(const h in l.data)a.push({key:d._parse(new $t(l,h,l.path,h)),value:p._parse(new $t(l,l.data[h],l.path,h))});return l.common.async?Et.mergeObjectAsync(i,a):Et.mergeObjectSync(i,a)}get element(){return this._def.valueType}static create(r,i,l){return i instanceof Se?new Ln(P({keyType:r,valueType:i,typeName:re.ZodRecord},ge(l))):new Ln(P({keyType:Qt.create(),valueType:r,typeName:re.ZodRecord},ge(i)))}}c(Ln,"ZodRecord");class lo extends Se{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==j.map)return W(l,{code:A.invalid_type,expected:j.map,received:l.parsedType}),me;const a=this._def.keyType,d=this._def.valueType,p=[...l.data.entries()].map(([h,g],v)=>({key:a._parse(new $t(l,h,l.path,[v,"key"])),value:d._parse(new $t(l,g,l.path,[v,"value"]))}));if(l.common.async){const h=new Map;return Promise.resolve().then(()=>tt(this,null,function*(){for(const g of p){const v=yield g.key,X=yield g.value;if(v.status==="aborted"||X.status==="aborted")return me;(v.status==="dirty"||X.status==="dirty")&&i.dirty(),h.set(v.value,X.value)}return{status:i.value,value:h}}))}else{const h=new Map;for(const g of p){const v=g.key,X=g.value;if(v.status==="aborted"||X.status==="aborted")return me;(v.status==="dirty"||X.status==="dirty")&&i.dirty(),h.set(v.value,X.value)}return{status:i.value,value:h}}}}c(lo,"ZodMap"),lo.create=(t,r,i)=>new lo(P({valueType:r,keyType:t,typeName:re.ZodMap},ge(i)));class sn extends Se{_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==j.set)return W(l,{code:A.invalid_type,expected:j.set,received:l.parsedType}),me;const a=this._def;a.minSize!==null&&l.data.size<a.minSize.value&&(W(l,{code:A.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),i.dirty()),a.maxSize!==null&&l.data.size>a.maxSize.value&&(W(l,{code:A.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 v=new Set;for(const X of g){if(X.status==="aborted")return me;X.status==="dirty"&&i.dirty(),v.add(X.value)}return{status:i.value,value:v}}c(p,"finalizeSet");const h=[...l.data.values()].map((g,v)=>d._parse(new $t(l,g,l.path,v)));return l.common.async?Promise.all(h).then(g=>p(g)):p(h)}min(r,i){return new sn(B(P({},this._def),{minSize:{value:r,message:oe.toString(i)}}))}max(r,i){return new sn(B(P({},this._def),{maxSize:{value:r,message:oe.toString(i)}}))}size(r,i){return this.min(r,i).max(r,i)}nonempty(r){return this.min(1,r)}}c(sn,"ZodSet"),sn.create=(t,r)=>new sn(P({valueType:t,minSize:null,maxSize:null,typeName:re.ZodSet},ge(r)));class Fn extends Se{constructor(){super(...arguments),this.validate=this.implement}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==j.function)return W(i,{code:A.invalid_type,expected:j.function,received:i.parsedType}),me;function l(h,g){return no({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,on(),Dn].filter(v=>!!v),issueData:{code:A.invalid_arguments,argumentsError:g}})}c(l,"makeArgsIssue");function a(h,g){return no({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,on(),Dn].filter(v=>!!v),issueData:{code:A.invalid_return_type,returnTypeError:g}})}c(a,"makeReturnsIssue");const d={errorMap:i.common.contextualErrorMap},p=i.data;if(this._def.returns instanceof Yt){const h=this;return It(function(...g){return tt(this,null,function*(){const v=new Pt([]),X=yield h._def.args.parseAsync(g,d).catch(Ft=>{throw v.addIssue(l(g,Ft)),v}),Ce=yield Reflect.apply(p,this,X);return yield h._def.returns._def.type.parseAsync(Ce,d).catch(Ft=>{throw v.addIssue(a(Ce,Ft)),v})})})}else{const h=this;return It(function(...g){const v=h._def.args.safeParse(g,d);if(!v.success)throw new Pt([l(g,v.error)]);const X=Reflect.apply(p,this,v.data),Ce=h._def.returns.safeParse(X,d);if(!Ce.success)throw new Pt([a(X,Ce.error)]);return Ce.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...r){return new Fn(B(P({},this._def),{args:Gt.create(r).rest(Qn.create())}))}returns(r){return new Fn(B(P({},this._def),{returns:r}))}implement(r){return this.parse(r)}strictImplement(r){return this.parse(r)}static create(r,i,l){return new Fn(P({args:r||Gt.create([]).rest(Qn.create()),returns:i||Qn.create(),typeName:re.ZodFunction},ge(l)))}}c(Fn,"ZodFunction");class Gn extends Se{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(Gn,"ZodLazy"),Gn.create=(t,r)=>new Gn(P({getter:t,typeName:re.ZodLazy},ge(r)));class cr extends Se{_parse(r){if(r.data!==this._def.value){const i=this._getOrReturnCtx(r);return W(i,{received:i.data,code:A.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:r.data}}get value(){return this._def.value}}c(cr,"ZodLiteral"),cr.create=(t,r)=>new cr(P({value:t,typeName:re.ZodLiteral},ge(r)));function gs(t,r){return new Yn(P({values:t,typeName:re.ZodEnum},ge(r)))}c(gs,"createZodEnum");class Yn extends Se{_parse(r){if(typeof r.data!="string"){const i=this._getOrReturnCtx(r),l=this._def.values;return W(i,{expected:U.joinValues(l),received:i.parsedType,code:A.invalid_type}),me}if(this._def.values.indexOf(r.data)===-1){const i=this._getOrReturnCtx(r),l=this._def.values;return W(i,{received:i.data,code:A.invalid_enum_value,options:l}),me}return It(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 Yn.create(r)}exclude(r){return Yn.create(this.options.filter(i=>!r.includes(i)))}}c(Yn,"ZodEnum"),Yn.create=gs;class pi extends Se{_parse(r){const i=U.getValidEnumValues(this._def.values),l=this._getOrReturnCtx(r);if(l.parsedType!==j.string&&l.parsedType!==j.number){const a=U.objectValues(i);return W(l,{expected:U.joinValues(a),received:l.parsedType,code:A.invalid_type}),me}if(i.indexOf(r.data)===-1){const a=U.objectValues(i);return W(l,{received:l.data,code:A.invalid_enum_value,options:a}),me}return It(r.data)}get enum(){return this._def.values}}c(pi,"ZodNativeEnum"),pi.create=(t,r)=>new pi(P({values:t,typeName:re.ZodNativeEnum},ge(r)));class Yt extends Se{unwrap(){return this._def.type}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==j.promise&&i.common.async===!1)return W(i,{code:A.invalid_type,expected:j.promise,received:i.parsedType}),me;const l=i.parsedType===j.promise?i.data:Promise.resolve(i.data);return It(l.then(a=>this._def.type.parseAsync(a,{path:i.path,errorMap:i.common.contextualErrorMap})))}}c(Yt,"ZodPromise"),Yt.create=(t,r)=>new Yt(P({type:t,typeName:re.ZodPromise},ge(r)));class qt extends Se{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){const{status:i,ctx:l}=this._processInputParams(r),a=this._def.effect||null,d={addIssue:p=>{W(l,p),p.fatal?i.abort():i.dirty()},get path(){return l.path}};if(d.addIssue=d.addIssue.bind(d),a.type==="preprocess"){const p=a.transform(l.data,d);return l.common.issues.length?{status:"dirty",value:l.data}:l.common.async?Promise.resolve(p).then(h=>this._def.schema._parseAsync({data:h,path:l.path,parent:l})):this._def.schema._parseSync({data:p,path:l.path,parent:l})}if(a.type==="refinement"){const p=c(h=>{const g=a.refinement(h,d);if(l.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(l.common.async===!1){const h=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});return h.status==="aborted"?me:(h.status==="dirty"&&i.dirty(),p(h.value),{status:i.value,value:h.value})}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(h=>h.status==="aborted"?me:(h.status==="dirty"&&i.dirty(),p(h.value).then(()=>({status:i.value,value:h.value}))))}if(a.type==="transform")if(l.common.async===!1){const p=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});if(!ci(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:l.data,path:l.path,parent:l}).then(p=>ci(p)?Promise.resolve(a.transform(p.value,d)).then(h=>({status:i.value,value:h})):p);U.assertNever(a)}}c(qt,"ZodEffects"),qt.create=(t,r,i)=>new qt(P({schema:t,typeName:re.ZodEffects,effect:r},ge(i))),qt.createWithPreprocess=(t,r,i)=>new qt(P({schema:r,effect:{type:"preprocess",transform:t},typeName:re.ZodEffects},ge(i)));class En extends Se{_parse(r){return this._getType(r)===j.undefined?It(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}c(En,"ZodOptional"),En.create=(t,r)=>new En(P({innerType:t,typeName:re.ZodOptional},ge(r)));class dr extends Se{_parse(r){return this._getType(r)===j.null?It(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}c(dr,"ZodNullable"),dr.create=(t,r)=>new dr(P({innerType:t,typeName:re.ZodNullable},ge(r)));class Hr extends Se{_parse(r){const{ctx:i}=this._processInputParams(r);let l=i.data;return i.parsedType===j.undefined&&(l=this._def.defaultValue()),this._def.innerType._parse({data:l,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}c(Hr,"ZodDefault"),Hr.create=(t,r)=>new Hr(P({innerType:t,typeName:re.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default},ge(r)));class hi extends Se{_parse(r){const{ctx:i}=this._processInputParams(r),l=B(P({},i),{common:B(P({},i.common),{issues:[]})}),a=this._def.innerType._parse({data:l.data,path:l.path,parent:P({},l)});return di(a)?a.then(d=>({status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new Pt(l.common.issues)},input:l.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Pt(l.common.issues)},input:l.data})}}removeCatch(){return this._def.innerType}}c(hi,"ZodCatch"),hi.create=(t,r)=>new hi(P({innerType:t,typeName:re.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch},ge(r)));class mi extends Se{_parse(r){if(this._getType(r)!==j.nan){const i=this._getOrReturnCtx(r);return W(i,{code:A.invalid_type,expected:j.nan,received:i.parsedType}),me}return{status:"valid",value:r.data}}}c(mi,"ZodNaN"),mi.create=t=>new mi(P({typeName:re.ZodNaN},ge(t)));const ys=Symbol("zod_brand");class el extends Se{_parse(r){const{ctx:i}=this._processInputParams(r),l=i.data;return this._def.type._parse({data:l,path:i.path,parent:i})}unwrap(){return this._def.type}}c(el,"ZodBranded");class $r extends Se{_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.common.async)return c(()=>tt(this,null,function*(){const a=yield this._def.in._parseAsync({data:l.data,path:l.path,parent:l});return a.status==="aborted"?me:a.status==="dirty"?(i.dirty(),Yo(a.value)):this._def.out._parseAsync({data:a.value,path:l.path,parent:l})}),"handleAsync")();{const a=this._def.in._parseSync({data:l.data,path:l.path,parent:l});return a.status==="aborted"?me:a.status==="dirty"?(i.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:l.path,parent:l})}}static create(r,i){return new $r({in:r,out:i,typeName:re.ZodPipeline})}}c($r,"ZodPipeline");class Qr extends Se{_parse(r){const i=this._def.innerType._parse(r);return ci(i)&&(i.value=Object.freeze(i.value)),i}}c(Qr,"ZodReadonly"),Qr.create=(t,r)=>new Qr(P({innerType:t,typeName:re.ZodReadonly},ge(r)));const Sn=c((t,r={},i)=>t?ur.create().superRefine((l,a)=>{var d,p;if(!t(l)){const h=typeof r=="function"?r(l):typeof r=="string"?{message:r}:r,g=(p=(d=h.fatal)!==null&&d!==void 0?d:i)!==null&&p!==void 0?p:!0,v=typeof h=="string"?{message:h}:h;a.addIssue(B(P({code:"custom"},v),{fatal:g}))}}):ur.create(),"custom"),fr={object:Je.lazycreate};var re;(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"})(re||(re={}));const pr=c((t,r={message:`Input not instance of ${t.name}`})=>Sn(i=>i instanceof t,r),"instanceOfType"),gi=Qt.create,yi=$n.create,so=mi.create,Ya=vn.create,tl=ar.create,qa=An.create,ao=Zr.create,jc=wn.create,Lc=_n.create,nl=ur.create,Xa=Qn.create,Fc=xn.create,uo=Wr.create,Ja=Kt.create,rl=Je.create,vi=Je.strictCreate,vs=ln.create,eu=Vr.create,il=jn.create,tu=Gt.create,nu=Ln.create,ru=lo.create,iu=sn.create,ou=Fn.create,ws=Gn.create,Mc=cr.create,_s=Yn.create,zc=pi.create,qe=Yt.create,Kr=qt.create,Bc=En.create,Uc=dr.create,co=qt.createWithPreprocess,lu=$r.create;var x=Object.freeze({__proto__:null,defaultErrorMap:Dn,setErrorMap:Br,getErrorMap:on,makeIssue:no,EMPTY_PATH:Ac,addIssueToContext:W,ParseStatus:Et,INVALID:me,DIRTY:Yo,OK:It,isAborted:qo,isDirty:ro,isValid:ci,isAsync:di,get util(){return U},get objectUtil(){return Y},ZodParsedType:j,getParsedType:de,ZodType:Se,ZodString:Qt,ZodNumber:$n,ZodBigInt:vn,ZodBoolean:ar,ZodDate:An,ZodSymbol:Zr,ZodUndefined:wn,ZodNull:_n,ZodAny:ur,ZodUnknown:Qn,ZodNever:xn,ZodVoid:Wr,ZodArray:Kt,ZodObject:Je,ZodUnion:ln,ZodDiscriminatedUnion:Vr,ZodIntersection:jn,ZodTuple:Gt,ZodRecord:Ln,ZodMap:lo,ZodSet:sn,ZodFunction:Fn,ZodLazy:Gn,ZodLiteral:cr,ZodEnum:Yn,ZodNativeEnum:pi,ZodPromise:Yt,ZodEffects:qt,ZodTransformer:qt,ZodOptional:En,ZodNullable:dr,ZodDefault:Hr,ZodCatch:hi,ZodNaN:mi,BRAND:ys,ZodBranded:el,ZodPipeline:$r,ZodReadonly:Qr,custom:Sn,Schema:Se,ZodSchema:Se,late:fr,get ZodFirstPartyTypeKind(){return re},coerce:{string:t=>Qt.create(B(P({},t),{coerce:!0})),number:t=>$n.create(B(P({},t),{coerce:!0})),boolean:t=>ar.create(B(P({},t),{coerce:!0})),bigint:t=>vn.create(B(P({},t),{coerce:!0})),date:t=>An.create(B(P({},t),{coerce:!0}))},any:nl,array:Ja,bigint:Ya,boolean:tl,date:qa,discriminatedUnion:eu,effect:Kr,enum:_s,function:ou,instanceof:pr,intersection:il,lazy:ws,literal:Mc,map:ru,nan:so,nativeEnum:zc,never:Fc,null:Lc,nullable:Uc,number:yi,object:rl,oboolean:c(()=>tl().optional(),"oboolean"),onumber:c(()=>yi().optional(),"onumber"),optional:Bc,ostring:c(()=>gi().optional(),"ostring"),pipeline:lu,preprocess:co,promise:qe,record:nu,set:iu,strictObject:vi,string:gi,symbol:ao,transformer:Kr,tuple:tu,undefined:jc,union:vs,unknown:Xa,void:uo,NEVER:me,ZodIssueCode:A,quotelessJson:Mt,ZodError:Pt});function hr(t,r){return(i,l)=>t(i,l,r)}c(hr,"makeNamespacedCall");var xs=Object.defineProperty,ol=c((t,r,i)=>r in t?xs(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"base_defNormalProp"),qn=c((t,r,i)=>(ol(t,typeof r!="symbol"?r+"":r,i),i),"__publicField");class ft{constructor(r,i){qn(this,"_call"),qn(this,"call"),this._call=r,this.call=hr(this._call,i)}}c(ft,"NamespaceBase");function mt(t){return typeof t=="string"?t:t instanceof an?t._id:t}c(mt,"getRemId");const su=c(t=>t.map(mt),"getRemIds");var Zc=Object.defineProperty,au=Object.getOwnPropertySymbols,ll=Object.prototype.hasOwnProperty,Wc=Object.prototype.propertyIsEnumerable,Es=c((t,r,i)=>r in t?Zc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rem_defNormalProp"),Ss=c((t,r)=>{for(var i in r||(r={}))ll.call(r,i)&&Es(t,i,r[i]);if(au)for(var i of au(r))Wc.call(r,i)&&Es(t,i,r[i]);return t},"rem_spreadValues"),k=c((t,r,i)=>(Es(t,typeof r!="symbol"?r+"":r,i),i),"rem_publicField"),R=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"__async");class an{constructor(r,i){k(this,"_id"),k(this,"createdAt"),k(this,"localUpdatedAt"),k(this,"updatedAt"),k(this,"parent"),k(this,"children"),k(this,"type"),k(this,"text"),k(this,"backText"),k(this,"_callMethod"),k(this,"call",(l,a)=>R(this,null,function*(){return yield this._callMethod(l,Ss({remId:this._id},a),_i)})),k(this,"callAndReturnRem",(l,a)=>R(this,null,function*(){const d=yield this.call(l,a);if(d)return new an(d,this._callMethod.bind(this))})),k(this,"callAndReturnManyRem",(l,a)=>R(this,null,function*(){const d=yield this.call(l,a);return d?d.map(p=>new an(p,this._callMethod.bind(this))):[]})),k(this,"setTableFilter",l=>R(this,null,function*(){return yield this.call("setTableFilter",{filter:l})})),k(this,"isTable",()=>R(this,null,function*(){return yield this.call("isTable",{})})),k(this,"allRemInFolderQueue",()=>R(this,null,function*(){return((yield this.call("allRemInFolderQueue",{}))||[]).map(l=>new an(l,this._callMethod.bind(this)))})),k(this,"positionAmongstSiblings",l=>R(this,null,function*(){return this.call("positionAmongstSiblings",{portalId:l})})),k(this,"positionAmongstVisibleSiblings",l=>R(this,null,function*(){return this.call("positionAmongstVisibleSiblings",{portalId:l})})),k(this,"hasPowerup",l=>R(this,null,function*(){return yield this.call("hasPowerup",{powerupCode:l})})),k(this,"getHiddenExplicitlyIncludedState",l=>R(this,null,function*(){return yield this.call("getHiddenExplicitlyIncludedState",{portalId:l})})),k(this,"setHiddenExplicitlyIncludedState",(l,a)=>R(this,null,function*(){return yield this.call("setHiddenExplicitlyIncludedState",{hiddenExplicitlyIncludedState:l,portalId:a})})),k(this,"getLastPracticed",()=>R(this,null,function*(){return yield this.call("getLastPracticed",{})})),k(this,"addPowerup",l=>R(this,null,function*(){return yield this.call("addPowerup",{powerupCode:l})})),k(this,"getLastTimeMovedTo",()=>R(this,null,function*(){return yield this.call("getLastTimeMovedTo",{})})),k(this,"getSchemaVersion",()=>R(this,null,function*(){return yield this.call("getSchemaVersion",{})})),k(this,"embeddedQueueViewMode",()=>R(this,null,function*(){return yield this.call("embeddedQueueViewMode",{})})),k(this,"isCollapsed",l=>R(this,null,function*(){return yield this.call("isCollapsed",{portalId:l})})),k(this,"setIsCollapsed",(l,a)=>R(this,null,function*(){return yield this.call("setIsCollapsed",{isCollapsed:l,portalId:a})})),k(this,"timesSelectedInSearch",()=>R(this,null,function*(){return yield this.call("timesSelectedInSearch",{})})),k(this,"getPortalType",()=>R(this,null,function*(){return yield this.call("getPortalType",{})})),k(this,"getPortalDirectlyIncludedRem",()=>R(this,null,function*(){return yield this.call("getPortalDirectlyIncludedRem",{})})),k(this,"getType",()=>R(this,null,function*(){return yield this.call("getType",{})})),k(this,"setPowerupProperty",(l,a,d)=>R(this,null,function*(){const p=Object.values(Jn).includes(l)?Si[l][a]:a;return yield this.call("setPowerupProperty",{powerupCode:l,powerupSlot:p,value:d})})),k(this,"getPowerupProperty",(l,a)=>R(this,null,function*(){const d=Object.values(Jn).includes(l)?Si[l][a]:a;return yield this.call("getPowerupProperty",{powerupCode:l,powerupSlot:d})})),k(this,"getPowerupPropertyAsRem",(l,a)=>R(this,null,function*(){const d=Object.values(Jn).includes(l)?Si[l][a]:a;return yield this.callAndReturnRem("getPowerupPropertyAsRem",{powerupCode:l,powerupSlot:d})})),k(this,"getTagPropertyAsRem",l=>R(this,null,function*(){return yield this.callAndReturnRem("getTagPropertyAsRem",{propertyId:l})})),k(this,"getPowerupPropertyAsRichText",(l,a)=>R(this,null,function*(){const d=Object.values(Jn).includes(l)?Si[l][a]:a;return yield this.call("getPowerupPropertyAsRichText",{powerupCode:l,powerupSlot:d})})),k(this,"setText",l=>R(this,null,function*(){return yield this.call("setText",{text:l})})),k(this,"setBackText",l=>R(this,null,function*(){return yield this.call("setBackText",{backText:l})})),k(this,"getTagPropertyValue",l=>R(this,null,function*(){return yield this.call("getTagPropertyValue",{propertyId:l})})),k(this,"getPropertyType",()=>R(this,null,function*(){return yield this.call("getPropertyType",{})})),k(this,"setTagPropertyValue",(l,a)=>R(this,null,function*(){return yield this.call("setTagPropertyValue",{propertyId:l,value:a})})),k(this,"removeTag",(l,a=!1)=>R(this,null,function*(){return yield this.call(a?"removeTagAndSlots":"removeTag",{tagId:l})})),k(this,"removePowerup",l=>R(this,null,function*(){return yield this.call("removePowerup",{powerupCode:l})})),k(this,"addTag",l=>R(this,null,function*(){const a=mt(l);return yield this.call("addTag",{tagId:a})})),k(this,"remove",()=>R(this,null,function*(){return yield this.call("remove",{})})),k(this,"getTagRems",()=>R(this,null,function*(){return this.callAndReturnManyRem("getTagRems",{})})),k(this,"addToPortal",l=>R(this,null,function*(){const a=mt(l);return yield this.call("addToPortal",{portalId:a})})),k(this,"removeFromPortal",l=>R(this,null,function*(){const a=mt(l);return yield this.call("removeFromPortal",{portalId:a})})),k(this,"setParent",(l,a)=>R(this,null,function*(){const d=mt(l);return yield this.call("setParent",{parentId:d,positionAmongstSiblings:a})})),k(this,"getOrCreateAliasWithText",l=>R(this,null,function*(){return yield this.callAndReturnRem("getOrCreateAliasWithText",{aliasText:l})})),k(this,"getChildrenRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("getChildrenRem")})),k(this,"allRemInDocumentOrPortal",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("allRemInDocumentOrPortal")})),k(this,"expand",(l,a)=>R(this,null,function*(){const d=mt(l);return yield this.call("expand",{portalId:d,recurse:a})})),k(this,"collapse",l=>R(this,null,function*(){const a=mt(l);return yield this.call("collapse",{portalId:a})})),k(this,"siblingRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("siblingRem")})),k(this,"visibleSiblingRem",l=>R(this,null,function*(){return yield this.callAndReturnManyRem("visibleSiblingRem",{portalId:l})})),k(this,"taggedRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("taggedRem")})),k(this,"ancestorTagRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("ancestorTagRem")})),k(this,"descendantTagRem",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("descendantTagRem")})),k(this,"getDescendants",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("getDescendants")})),k(this,"getCards",()=>R(this,null,function*(){const l=yield this.call("getCards");return l?.map(a=>new Mn(a,this._callMethod))||[]})),k(this,"getAliases",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("getAliases")})),k(this,"getParentRem",()=>R(this,null,function*(){return yield this.callAndReturnRem("getParentRem")})),k(this,"portalsAndDocumentsIn",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("portalsAndDocumentsIn")})),k(this,"merge",l=>R(this,null,function*(){return yield this.call("merge",{remIdToMergeIntoThisOne:l})})),k(this,"mergeAndSetAlias",l=>R(this,null,function*(){const a=mt(l);return yield this.call("mergeAndSetAlias",{remIdToMergeIntoThisOne:a})})),k(this,"indent",l=>R(this,null,function*(){const a=mt(l);return yield this.call("indent",{portalId:a})})),k(this,"outdent",l=>R(this,null,function*(){const a=mt(l);return yield this.call("outdent",{portalId:a})})),k(this,"setType",l=>R(this,null,function*(){return yield this.call("setType",{type:l})})),k(this,"remsReferencingThis",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("remsReferencingThis")})),k(this,"remsBeingReferenced",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("remsBeingReferenced")})),k(this,"deepRemsBeingReferenced",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("deepRemsBeingReferenced")})),k(this,"getSources",()=>R(this,null,function*(){return yield this.callAndReturnManyRem("getSources")})),k(this,"addSource",l=>R(this,null,function*(){const a=mt(l);return yield this.call("addSource",{sourceId:a})})),k(this,"removeSource",l=>R(this,null,function*(){const a=mt(l);return yield this.call("removeSource",{sourceId:a})})),k(this,"isDocument",()=>R(this,null,function*(){return yield this.call("isDocument")})),k(this,"setIsDocument",l=>R(this,null,function*(){return yield this.call("setIsDocument",{isDocument:l})})),k(this,"isListItem",()=>R(this,null,function*(){return yield this.call("isListItem")})),k(this,"setIsListItem",l=>R(this,null,function*(){return yield this.call("setIsListItem",{isListItem:l})})),k(this,"isCardItem",()=>R(this,null,function*(){return yield this.call("isMultilineCard")})),k(this,"setIsCardItem",l=>R(this,null,function*(){return yield this.call("setIsMultilineCard",{isCardItem:l})})),k(this,"isQuote",()=>R(this,null,function*(){return yield this.call("isQuote")})),k(this,"setIsQuote",l=>R(this,null,function*(){yield this.call("setIsQuote",{isQuote:l})})),k(this,"isCode",()=>R(this,null,function*(){return yield this.call("isCode")})),k(this,"setIsCode",l=>R(this,null,function*(){yield this.call("setIsCode",{isCode:l})})),k(this,"isTodo",()=>R(this,null,function*(){return yield this.call("isTodo")})),k(this,"setIsTodo",l=>R(this,null,function*(){yield this.call("setIsTodo",{isTodo:l})})),k(this,"getTodoStatus",()=>R(this,null,function*(){return yield this.call("getTodoStatus")})),k(this,"setTodoStatus",l=>R(this,null,function*(){return yield this.call("setTodoStatus",{todoStatus:l})})),k(this,"getFontSize",()=>R(this,null,function*(){return yield this.call("getFontSize")})),k(this,"setFontSize",l=>R(this,null,function*(){return yield this.call("setFontSize",{fontSize:l})})),k(this,"getHighlightColor",()=>R(this,null,function*(){return yield this.call("getHighlightColor")})),k(this,"setHighlightColor",l=>R(this,null,function*(){return yield this.call("setHighlightColor",{highlightColor:l})})),k(this,"isPowerup",()=>R(this,null,function*(){return yield this.call("isPowerup")})),k(this,"isPowerupEnum",()=>R(this,null,function*(){return yield this.call("isPowerupEnum")})),k(this,"isPowerupPropertyListItem",()=>R(this,null,function*(){return yield this.call("isPowerupPropertyListItem")})),k(this,"isPowerupSlot",()=>R(this,null,function*(){return yield this.call("isPowerupSlot")})),k(this,"isPowerupProperty",()=>R(this,null,function*(){return yield this.call("isPowerupProperty")})),k(this,"isSlot",()=>R(this,null,function*(){return yield this.call("isSlot")})),k(this,"setIsSlot",l=>R(this,null,function*(){return yield this.call("setIsSlot",{isSlot:l})})),k(this,"isProperty",()=>R(this,null,function*(){return yield this.call("isSlot")})),k(this,"setIsProperty",l=>R(this,null,function*(){return yield this.call("setIsSlot",{isSlot:l})})),k(this,"openRemInContext",l=>R(this,null,function*(){yield this.call("openRemInContext",{portalId:l})})),k(this,"openRemAsPage",()=>R(this,null,function*(){yield this.call("openRemAsPage")})),k(this,"getEnablePractice",()=>R(this,null,function*(){return yield this.call("getEnablePractice")})),k(this,"getPracticeDirection",()=>R(this,null,function*(){return yield this.call("getPracticeDirection")})),k(this,"setEnablePractice",l=>R(this,null,function*(){return yield this.call("setEnablePractice",{enablePractice:l})})),k(this,"setPracticeDirection",l=>R(this,null,function*(){return yield this.call("setPracticeDirection",{direction:l})})),k(this,"copyPortalReferenceToClipboard",()=>R(this,null,function*(){return yield this.call("copyPortalReferenceToClipboard")})),k(this,"copyTagReferenceToClipboard",()=>R(this,null,function*(){return yield this.call("copyTagReferenceToClipboard")})),k(this,"copyReferenceToClipboard",()=>R(this,null,function*(){return yield this.call("copyReferenceToClipboard")})),k(this,"scrollToReaderHighlight",()=>R(this,null,function*(){return yield this.call("scrollToReaderHighlight")})),k(this,"isFolder",()=>R(this,null,function*(){return yield this.call("isFolder")})),k(this,"setIsFolder",l=>R(this,null,function*(){return yield this.call("setIsFolder",{isFolder:l})})),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(an,"RemObject");class wi extends ft{constructor(r){super(r,_i),k(this,"findOne",i=>R(this,null,function*(){if(!i)return;const l=yield this.call("findOne",{remId:i});if(l)return new gt(l,this.call)})),k(this,"createSingleRemWithMarkdown",(i,l)=>R(this,null,function*(){const a=yield this.call("createSingleRemWithMarkdown",{markdown:i,parentId:l});return a&&new gt(a,this.call)})),k(this,"createTreeWithMarkdown",(i,l)=>R(this,null,function*(){return((yield this.call("createTreeWithMarkdown",{markdown:i,parentId:l}))||[]).map(a=>new gt(a,this.call))})),k(this,"findByName",(i,l)=>R(this,null,function*(){const a=yield this.call("findByName",{name:i,parentId:l});if(a)return new gt(a,this.call)})),k(this,"moveRems",(i,l,a,d)=>R(this,null,function*(){const p=su(i),h=mt(l),g=mt(d);yield this.call("moveRems",{portalId:g,remIds:p,newParentId:h,positionAmongstSiblings:a})})),k(this,"getAll",()=>R(this,null,function*(){return((yield this.call("getAll",{}))||[]).map(i=>new gt(i,this._call))})),k(this,"findMany",i=>R(this,null,function*(){const l=su(i),a=yield this.call("findMany",{remIds:l});if(a)return a.map(d=>new gt(d,this._call))})),k(this,"createPortal",()=>R(this,null,function*(){const i=yield this.call("createPortal",{});return i?new gt(i,this._call):void 0})),k(this,"createLinkRem",(i,l=!0)=>R(this,null,function*(){const a=yield this.call("createLinkRem",{url:i,addTitle:l});if(a)return new gt(a,this._call)})),k(this,"createTable",i=>R(this,null,function*(){const l=mt(i),a=yield this.call("createTable",{existingTagId:l});if(a)return new gt(a,this._call)})),k(this,"createRem",()=>R(this,null,function*(){const i=yield this.call("createRem",{});if(i)return new gt(i,this._call)}))}}c(wi,"RemNamespace");const gt=an,_i="rem";var sl=Object.defineProperty,Ts=Object.getOwnPropertySymbols,Xt=Object.prototype.hasOwnProperty,xi=Object.prototype.propertyIsEnumerable,fo=c((t,r,i)=>r in t?sl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"card_defNormalProp"),Ei=c((t,r)=>{for(var i in r||(r={}))Xt.call(r,i)&&fo(t,i,r[i]);if(Ts)for(var i of Ts(r))xi.call(r,i)&&fo(t,i,r[i]);return t},"card_spreadValues"),kt=c((t,r,i)=>(fo(t,typeof r!="symbol"?r+"":r,i),i),"card_publicField"),Tn=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"card_async");const po="card";class Gr extends ft{constructor(r){super(r,po),kt(this,"findOne",i=>Tn(this,null,function*(){if(!i)return;const l=yield this.call("findOne",{id:i});return l?new Mn(l,this._call):void 0})),kt(this,"getAll",()=>Tn(this,null,function*(){const i=yield this.call("getAll",{});return i?.map(l=>new Mn(l,this._call))||[]})),kt(this,"findMany",i=>Tn(this,null,function*(){const l=yield this.call("findMany",{ids:i});return l?.map(a=>new Mn(a,this._call))||[]}))}}c(Gr,"CardNamespace");class Mn extends ft{constructor(r,i){super(i,po),kt(this,"_id"),kt(this,"remId"),kt(this,"type"),kt(this,"createdAt"),kt(this,"repetitionHistory"),kt(this,"nextRepetitionTime"),kt(this,"timesWrongInRow"),kt(this,"lastRepetitionTime"),kt(this,"callCard",(a,d)=>Tn(this,null,function*(){return yield this._call(a,Ei({id:this._id},d),po)})),kt(this,"callRem",(a,d)=>Tn(this,null,function*(){return yield this._call(a,Ei({},d),_i)})),kt(this,"getType",()=>Tn(this,null,function*(){return yield this.callCard("getType",{id:this._id})})),kt(this,"getRem",()=>Tn(this,null,function*(){return yield this.callRem("findOne",{remId:this.remId})})),kt(this,"remove",()=>Tn(this,null,function*(){return yield this.callCard("remove",{})})),kt(this,"updateCardRepetitionStatus",a=>Tn(this,null,function*(){return yield this.callCard("updateCardRepetitionStatus",{score:a})})),this._id=r._id,this.remId=r.remId;const l=r.cardType;this.type=l==="f"?"forward":l==="b"?"backward":{clozeId:l},this.createdAt=r.createdAt,this.repetitionHistory=r.history,this.nextRepetitionTime=r.activeNextTime,this.timesWrongInRow=r.timesWrongInRow}}c(Mn,"Card");var uu=Object.defineProperty,Vc=Object.defineProperties,Hc=Object.getOwnPropertyDescriptors,cu=Object.getOwnPropertySymbols,Cs=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={}))Cs.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"),al=(t=>(t.Rem="Rem",t.Text="Text",t.PDF="PDF",t.WebReader="WebReader",t))(al||{});const Ps={quote:"q",underline:"u",bold:"b",italic:"l"};var ul=(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))(ul||{}),ks=(t=>(t.Read="Read",t.ReadCreate="ReadCreate",t.ReadCreateModify="ReadCreateModify",t.ReadCreateModifyDelete="ReadCreateModifyDelete",t))(ks||{}),Xn=(t=>(t.All="All",t.DescendantsOfName="DescendantsOfName",t.DescendantsOfId="DescendantsOfId",t.Powerup="Powerup",t.FocusedSubtree="FocusedSubtree",t.KnowledgeBaseInfo="KnowledgeBaseInfo",t))(Xn||{}),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||{}),Jn=(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))(Jn||{});const Si={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||{}),Rs=(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))(Rs||{}),bs=(t=>(t[t.DEFAULT_TYPE=0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t[t.PORTAL=3]="PORTAL",t))(bs||{});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 Rs.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||{}),Is=(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))(Is||{}),vu=(t=>(t.PropertyConfigMenu="PropertyConfigMenu",t.QueueMenu="QueueMenu",t.ReaderMenu="ReaderMenu",t.PDFHighlightPopupLocation="PDFHighlightPopupLocation",t.DocumentMenu="DocumentMenu",t))(vu||{});const Os=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()})]),ho=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||{}),Jt=(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))(Jt||{});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"},zn={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"},Cn={UNDERLINE:"u",BOLD:"b",ITALIC:"t",INLINE_CODE:"c",CLOZE:"e",HIDDEN_CLOZE:"z",LINK:"l",HIGHLIGHT:"h",DATE:"d"},xu={LATEX:"x"},Ti={[Cn.UNDERLINE]:zn.UNDERLINE,[Cn.BOLD]:zn.BOLD,[Cn.ITALIC]:zn.ITALIC,[Cn.INLINE_CODE]:zn.INLINE_CODE,[Cn.CLOZE]:zn.CLOZE,[Cn.HIDDEN_CLOZE]:zn.HIDDEN_CLOZE,[Cn.LINK]:zn.DEPRECATED_LINK,[Cn.HIGHLIGHT]:zn.HIGHLIGHT,[Cn.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||{}),Su=(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))(Su||{}),Tu=(t=>(t.SRSScheduleCard="SRSScheduleCard",t.GetNextCard="GetNextCard",t))(Tu||{}),Ns=(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))(Ns||{});const Cu=["pre_exam","maintenance_period","enter_consolidation_period","consolidation_period","exam_not_good","postpone_start"];var Yr=(t=>(t[t.Enum=void 0]="Enum",t.AnyRem="any",t.Relation="relation",t))(Yr||{}),Ci=(t=>(t.Queue="Queue",t))(Ci||{}),Ds=(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))(Ds||{}),Pi=(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))(Pi||{}),St=(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))(St||{}),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 cl=x.object({exp:x.literal("not"),exp1:x.lazy(()=>Ri)}),dl=x.object({exp:x.union([x.literal("and"),x.literal("or")]),exps:x.lazy(()=>Ri.array()),cannotRemove:x.boolean().optional()}),As=x.object({exp:x.literal("get_slot"),slotRemId:x.string(),exps:x.lazy(()=>Ri)}),js=x.object({exp:x.literal("get_card_info"),cardField:x.nativeEnum(Pi),exp1:x.lazy(()=>Ri)}),Ls=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"]),ku=x.object({exp:x.literal("expression"),refType:x.literal("RemType"),remType:Pu});var Fs=(t=>(t.Checked="checked",t.Unchecked="unchecked",t))(Fs||{}),Ms=(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))(Ms||{});const Yc=["contains","is","startsWith","endsWith",""];var zt=(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))(zt||{}),mo=(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))(mo||{}),mr=(t=>(t.Today="today",t.StartOfTheWeek="startoftheweek",t.StartOfTheMonth="startofthemonth",t.StartOfTheYear="startoftheyear",t.EndOfTheWeek="endoftheweek",t.EndOfTheMonth="endofthemonth",t.EndOfTheYear="endoftheyear",t))(mr||{});const Ru={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 fl=(t=>(t.Contains="contains",t.DoesNotContain="doesNotContains",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(fl||{}),go=(t=>(t.Is="is",t.IsNot="notIs",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(go||{});const bu=Object.values(mo).filter(t=>t!=="relativeToToday");var yo=(t=>(t.Past="past",t.Next="next",t.This="this",t))(yo||{}),zs=(t=>(t.Day="day",t.Week="week",t.Month="month",t.Year="year",t))(zs||{});const ki={"":"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"},Bs={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"},vo={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"},Us={contains:"contains",doesNotContains:"does not contains",empty:"is empty",notEmpty:"is not empty"},Iu={is:"is",notIs:"is not",empty:"is empty",notEmpty:"is not empty"},Zs=x.object({exp:x.literal("expression"),refType:x.literal("Text"),text:x.string(),matcherType:x.nativeEnum(Ms)}),pl=x.object({exp:x.literal("expression"),refType:x.literal("NumberExpression"),text:x.string(),matcherType:x.nativeEnum(zt)}),qr=x.object({exp:x.literal("expression"),refType:x.literal("Date"),date:x.string().optional(),optionalDate:x.string().optional(),dateRelativeMatcher:x.nativeEnum(mr).optional(),optionalDateRelativeMatcher:x.nativeEnum(mr).optional(),relativeDateModifier:x.nativeEnum(yo).optional(),relativePeriodOffset:x.number().optional(),relativeDatePeriod:x.nativeEnum(zs).optional(),matcherType:x.nativeEnum(mo)}),Ws=x.object({exp:x.literal("expression"),refType:x.literal("Multi Select"),matcherType:x.nativeEnum(fl),remIds:x.array(x.string()).optional()}),Vs=x.object({exp:x.literal("expression"),refType:x.literal("SingleSelect"),matcherType:x.nativeEnum(go),remId:x.string().optional()}),Hs=x.object({exp:x.literal("expression"),refType:x.literal("Checkbox"),value:x.nativeEnum(Fs)}),Xe=x.object({exp:x.literal("expression"),refType:x.literal("Single Select"),matcherType:x.nativeEnum(go),remIds:x.array(x.string()).optional()}),$s=x.lazy(()=>x.union([Ls,Zs,pl,ku,qr,Ws,Xe,Vs,Hs,qr])),Ri=x.lazy(()=>x.union([cl,dl,As,js,$s])),hl=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(Is).optional(),propertyLocation:x.nativeEnum(Ds).optional(),selectSourceType:x.nativeEnum(Yr).optional(),dontPublishToSharedArticle:x.boolean().optional()}),Ou=x.union([x.object({slots:hl.array()}),x.object({properties:hl.array()})]);var Qs=(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))(Qs||{});const bi={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"},ml=Kc(Qc({},bi),{18:"It looks like you're struggling to learn and retain this card."});var Ii=Fe(854),Ks=Fe.n(Ii),gl=Object.defineProperty,yl=Object.getOwnPropertySymbols,Gs=Object.prototype.hasOwnProperty,Nu=Object.prototype.propertyIsEnumerable,Ys=c((t,r,i)=>r in t?gl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"app_defNormalProp"),Du=c((t,r)=>{var i={};for(var l in t)Gs.call(t,l)&&r.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&yl)for(var l of yl(t))r.indexOf(l)<0&&Nu.call(t,l)&&(i[l]=t[l]);return i},"__objRest"),yt=c((t,r,i)=>(Ys(t,typeof r!="symbol"?r+"":r,i),i),"app_publicField"),vt=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"app_async");const Oi="app";class vl extends ft{constructor(r,i){super(r,Oi),yt(this,"plugin"),yt(this,"waitForInitialSync",()=>vt(this,null,function*(){yield this._call("waitForInitialSync",{})})),yt(this,"registerPowerup",l=>vt(this,null,function*(){yield this._call("registerPowerup",l)})),yt(this,"registerWidget",(l,a,d)=>vt(this,null,function*(){yield this._call("registerWidget",{fileName:l,location:a,options:d})})),yt(this,"unregisterWidget",(l,a)=>vt(this,null,function*(){yield this._call("unregisterWidget",{fileName:l,location:a})})),yt(this,"registerCommand",l=>vt(this,null,function*(){const a=l,{action:d}=a,p=Du(a,["action"]),h=l.id;this.plugin.model[h]=d,yield this._call("registerCommand",p)})),yt(this,"registerSidebarButton",l=>vt(this,null,function*(){const{id:a,name:d,action:p}=l;this.plugin.model[a]=p,yield this._call("registerSidebarButton",{id:a,name:d})})),yt(this,"registerRemMenuItem",l=>vt(this,null,function*(){const{id:a,name:d,action:p}=l;this.plugin.model[a]=p,yield this._call("registerRemMenuItem",{id:a,name:d})})),yt(this,"registerMenuItem",l=>vt(this,null,function*(){const{id:a,name:d,action:p,location:h}=l;this.plugin.model[a]=p,yield this._call("registerMenuItem",{id:a,name:d,location:h})})),yt(this,"unregisterMenuItem",l=>vt(this,null,function*(){yield this._call("unregisterMenuItem",{id:l})})),yt(this,"stealKeys",l=>vt(this,null,function*(){yield this._call("stealKeys",{keys:l})})),yt(this,"releaseKeys",l=>vt(this,null,function*(){yield this._call("releaseKeys",{keys:l})})),yt(this,"registerCSS",(l,a)=>vt(this,null,function*(){yield this._call("registerCSS",{id:l,css:a})})),yt(this,"registerStatusBarItem",(l,a)=>vt(this,null,function*(){yield this._call("registerStatusBarItem",{id:l,html:a})})),yt(this,"getOperatingSystem",()=>vt(this,null,function*(){return yield this._call("getOperatingSystem",{})})),yt(this,"getPlatform",()=>vt(this,null,function*(){return yield this._call("getPlatform",{})})),yt(this,"registerCallback",(l,a)=>{this.plugin.model[l]=a}),yt(this,"transaction",l=>vt(this,null,function*(){const a=Math.random().toString();this.registerCallback(a,l);const d=yield this._call("transaction",{id:a});return delete this.plugin.model[a],d})),yt(this,"toast",l=>vt(this,null,function*(){yield this._call("toast",{message:l,options:{}})})),this.plugin=i}}c(vl,"AppNamespace");var qs=Object.defineProperty,qc=c((t,r,i)=>r in t?qs(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"date_defNormalProp"),wo=c((t,r,i)=>(qc(t,typeof r!="symbol"?r+"":r,i),i),"date_publicField"),er=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"date_async");const wl="date";class gr extends ft{constructor(r){super(r,wl),wo(this,"getDailyDoc",i=>er(this,null,function*(){const l=yield this.call("getDailyDoc",{date:i});if(l)return new gt(l,this._call)})),wo(this,"getTodaysDoc",()=>er(this,null,function*(){const i=yield this.call("getTodaysDoc",{});if(i)return new gt(i,this._call)}))}}c(gr,"DateNamespace");var Au=Object.defineProperty,yr=Object.getOwnPropertySymbols,_o=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable,Di=c((t,r,i)=>r in t?Au(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"editor_defNormalProp"),ju=c((t,r)=>{for(var i in r||(r={}))_o.call(r,i)&&Di(t,i,r[i]);if(yr)for(var i of yr(r))Ni.call(r,i)&&Di(t,i,r[i]);return t},"editor_spreadValues"),st=c((t,r,i)=>(Di(t,typeof r!="symbol"?r+"":r,i),i),"editor_publicField"),et=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"editor_async");const vr="editor";class Ke extends ft{constructor(r){super(r,vr),st(this,"setText",i=>et(this,null,function*(){return this.call("setText",{richText:i})})),st(this,"copy",()=>et(this,null,function*(){return this.call("copy",{})})),st(this,"cut",()=>et(this,null,function*(){return this.call("cut",{})})),st(this,"deleteCharacters",(i,l)=>et(this,null,function*(){return this.call("deleteCharacters",{characters:i,direction:l})})),st(this,"delete",()=>et(this,null,function*(){return this.call("delete",{})})),st(this,"getSelectedRem",()=>et(this,null,function*(){const i=yield this.getSelection();return i&&i.type===al.Rem?i:void 0})),st(this,"getSelectedText",()=>et(this,null,function*(){const i=yield this.getSelection();return i&&i.type===al.Text?i:void 0})),st(this,"getSelection",()=>et(this,null,function*(){return this.call("getSelection",{})})),st(this,"selectRem",(i,l)=>et(this,null,function*(){return this.call("setSelectedLines",{range:i,portalId:l})})),st(this,"selectText",i=>et(this,null,function*(){return this.call("setSelectedRichText",ju({},i))})),st(this,"collapseSelection",i=>et(this,null,function*(){return this.call("collapseSelection",{to:i})})),st(this,"undo",()=>et(this,null,function*(){return this.call("undo",{})})),st(this,"redo",()=>et(this,null,function*(){return this.call("redo",{})})),st(this,"moveCaret",(i,l)=>et(this,null,function*(){return this.call("moveCaret",{amount:i,unit:l})})),st(this,"moveCaretVertical",i=>et(this,null,function*(){return this.call("moveCaretVertical",{direction:i})})),st(this,"getCaretPosition",()=>et(this,null,function*(){return this.call("getCaretPosition",{})})),st(this,"insertPlainText",i=>et(this,null,function*(){return this.call("insertPlainText",{string:i})})),st(this,"insertRichText",i=>et(this,null,function*(){return this.call("insertRichText",{richText:i})})),st(this,"insertMarkdown",i=>et(this,null,function*(){return this.call("insertMarkdown",{markdown:i})})),st(this,"getFocusedEditorText",()=>et(this,null,function*(){return this.call("getFocusedEditorText",{})}))}}c(Ke,"EditorNamespace");var at=Object.defineProperty,wr=c((t,r,i)=>r in t?at(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"event_defNormalProp"),Tt=c((t,r,i)=>(wr(t,typeof r!="symbol"?r+"":r,i),i),"event_publicField");const Bt="event";class tr extends ft{constructor(r,i){super(r,Bt),Tt(this,"plugin"),Tt(this,"addListener",(l,a,d)=>{l in this.plugin.listeners||(this.plugin.listeners[l]=new Map),this.plugin.listeners[l].get(a)||this.plugin.listeners[l].set(a,[]),!this.plugin.listeners[l].get(a).includes(d)&&(this.plugin.listeners[l].get(a).push(d),this._call("events.addListener",{eventId:l,listenerKey:a}))}),Tt(this,"removeListener",(l,a,d)=>{const p=this.plugin.listeners[l];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:l,listenerKey:a}))}}),this.plugin=i}}c(tr,"EventNamespace");var Ai=Object.defineProperty,Ut=c((t,r,i)=>r in t?Ai(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"focus_defNormalProp"),xo=c((t,r,i)=>(Ut(t,typeof r!="symbol"?r+"":r,i),i),"focus_publicField"),Xs=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(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 ft{constructor(r){super(r,Lu),xo(this,"getFocusedRem",()=>Xs(this,null,function*(){const i=yield this.call("getFocusedRem",{});return i?new gt(i,this._call):void 0})),xo(this,"getFocusedPortal",()=>Xs(this,null,function*(){const i=yield this.call("getFocusedPortal",{});return i?new gt(i,this._call):void 0}))}}c(ji,"FocusNamespace");var Fu=Object.defineProperty,Js=c((t,r,i)=>r in t?Fu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"knowledge_base_defNormalProp"),Bn=c((t,r,i)=>(Js(t,typeof r!="symbol"?r+"":r,i),i),"knowledge_base_publicField"),Mu=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"knowledge_base_async");const ea="kb";class Eo{constructor(r){Bn(this,"_call"),Bn(this,"call"),Bn(this,"getCurrentKnowledgeBaseData",()=>Mu(this,null,function*(){return this.call("getCurrentKnowledgeBaseData",{})})),Bn(this,"isPrimaryKnowledgeBase",()=>Mu(this,null,function*(){return this.call("isPrimaryKnowledgeBase",{})})),this._call=r,this.call=hr(this._call,ea)}}c(Eo,"KnowledgeBaseNamespace");var Xc=Object.defineProperty,zu=c((t,r,i)=>r in t?Xc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"messaging_defNormalProp"),ta=c((t,r,i)=>(zu(t,typeof r!="symbol"?r+"":r,i),i),"messaging_publicField"),Jc=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"messaging_async");const _l="messaging";class xl extends ft{constructor(r){super(r,_l),ta(this,"broadcast",i=>Jc(this,null,function*(){return this.call("broadcast",{message:i})}))}}c(xl,"MessagingNamespace");var Bu=Object.defineProperty,Uu=c((t,r,i)=>r in t?Bu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"powerup_defNormalProp"),na=c((t,r,i)=>(Uu(t,typeof r!="symbol"?r+"":r,i),i),"powerup_publicField"),El=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"powerup_async");const ed="powerup";class Pn extends ft{constructor(r){super(r,ed),na(this,"getPowerupByCode",i=>El(this,null,function*(){const l=yield this.call("getPowerupByCode",{powerupCode:i});if(l)return new gt(l,this._call)})),na(this,"getPowerupSlotByCode",(i,l)=>El(this,null,function*(){const a=Object.values(Jn).includes(i)?Si[i][l]:l,d=yield this.call("getPowerupSlotByCode",{powerupCode:i,powerupSlot:a});if(d)return new gt(d,this._call)}))}}c(Pn,"PowerupNamespace");class So{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:St.Reference,remId:r}}static text(r,i){return{exp:rt.Expression,refType:St.Text,text:i||"",matcherType:r}}static documentsThatContain(r){return{exp:rt.Expression,refType:St.Portal,remId:r}}static isTaggedWith(r){return{exp:rt.Expression,refType:St.Tag,remId:r}}static isDirectlyTaggedWith(r){return{exp:rt.Expression,refType:St.TagWithoutInheritance,remId:r}}static isDescendantOf(r){return{exp:rt.Expression,refType:St.IsDescendantOf,remId:r}}static isInDocument(r){return{exp:rt.Expression,refType:St.InDocument,remId:r}}static hasAnyConnectionTo(r){return{exp:rt.Expression,refType:St.Connection,remId:r}}static hasRemType(r){return{exp:rt.Expression,refType:St.RemType,remType:r}}static tagWithoutInheritance(r){return{exp:rt.Expression,refType:St.TagWithoutInheritance,remId:r}}static multiSelect(r,i){return{exp:rt.Expression,refType:St.MultiSelect,matcherType:r,remIds:i}}static singleSelect(r,i){return{exp:rt.Expression,refType:St.SingleSelect,matcherType:r,remIds:i}}static checkbox(r){return{exp:rt.Expression,refType:St.Checkbox,value:r}}static date(r,i,l){return{exp:rt.Expression,refType:St.Date,matcherType:r,date:typeof i=="string"||i==null?void 0:i.toISOString(),dateRelativeMatcher:typeof i=="string"?i:void 0,optionalDate:typeof l=="string"||l==null?void 0:l.toISOString(),optionalDateRelativeMatcher:typeof l=="string"?l:void 0}}static dateRelativeToToday(r,i,l){return{exp:rt.Expression,refType:St.Date,matcherType:mo.IsRelativeToToday,relativeDateModifier:r,relativePeriodOffset:l,relativeDatePeriod:i}}static number(r,i){return{exp:rt.Expression,refType:St.Number,text:i?.toString()||"",matcherType:r}}}c(So,"Query_DUPE_2");var ra=Object.defineProperty,Zu=c((t,r,i)=>r in t?ra(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"queue_defNormalProp"),Ge=c((t,r,i)=>(Zu(t,typeof r!="symbol"?r+"":r,i),i),"queue_publicField"),Rt=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"queue_async");const Wu="queue";class nr extends ft{constructor(r){super(r,Wu),Ge(this,"getAverageTimePerCard",()=>Rt(this,null,function*(){return yield this.call("getAverageTimePerCard",{})})),Ge(this,"getCurrentQueueScreenType",()=>Rt(this,null,function*(){return yield this.call("getCurrentQueueScreenType",{})})),Ge(this,"goBackToPreviousCard",()=>Rt(this,null,function*(){yield this.call("goBackToPreviousCard",{})})),Ge(this,"hasRevealedAnswer",()=>Rt(this,null,function*(){return yield this.call("hasRevealedAnswer",{})})),Ge(this,"showAnswer",()=>Rt(this,null,function*(){yield this.call("showAnswer",{})})),Ge(this,"rateCurrentCard",i=>Rt(this,null,function*(){yield this.call("rateCurrentCard",{score:i})})),Ge(this,"isTypeAnswerEnabled",()=>Rt(this,null,function*(){return yield this.call("isTypeAnswerEnabled",{})})),Ge(this,"getCurrentCard",()=>Rt(this,null,function*(){const i=yield this.call("getCurrentCard",{});return i?new Mn(i,this._call):void 0})),Ge(this,"getNumRemainingCards",()=>Rt(this,null,function*(){return yield this.call("getNumRemainingCards",{})})),Ge(this,"getCurrentStreak",()=>Rt(this,null,function*(){return yield this.call("getCurrentStreak",{})})),Ge(this,"removeCurrentCardFromQueue",(i=!0)=>Rt(this,null,function*(){yield this.call("removeCurrentCardFromQueue",{addToBackStack:i})})),Ge(this,"inLookbackMode",()=>Rt(this,null,function*(){return yield this.call("inLookbackMode",{})}))}}c(nr,"QueueNamespace");var To=Object.defineProperty,Un=c((t,r,i)=>r in t?To(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"reader_defNormalProp"),Vu=c((t,r,i)=>(Un(t,typeof r!="symbol"?r+"":r,i),i),"reader_publicField"),Hu=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"reader_async");class en extends ft{constructor(r){super(r,"reader"),Vu(this,"callAndReturnRem",(i,l)=>Hu(this,null,function*(){const a=yield this.call(i,l||{});if(a)return new gt(a,this._call)}))}addHighlight(){return Hu(this,null,function*(){return this.callAndReturnRem("addHighlight")})}}c(en,"ReaderNamespace");var Sl=Object.defineProperty,Tl=Object.defineProperties,Li=Object.getOwnPropertyDescriptors,Co=Object.getOwnPropertySymbols,ia=Object.prototype.hasOwnProperty,oa=Object.prototype.propertyIsEnumerable,Cl=c((t,r,i)=>r in t?Sl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rich_text_defNormalProp"),Fi=c((t,r)=>{for(var i in r||(r={}))ia.call(r,i)&&Cl(t,i,r[i]);if(Co)for(var i of Co(r))oa.call(r,i)&&Cl(t,i,r[i]);return t},"rich_text_spreadValues"),un=c((t,r)=>Tl(t,Li(r)),"rich_text_spreadProps"),ye=c((t,r,i)=>(Cl(t,typeof r!="symbol"?r+"":r,i),i),"rich_text_publicField"),Ue=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"rich_text_async");const $u="richText";class Ot{constructor(r){ye(this,"richText",[]),ye(this,"richTextNamespace"),ye(this,"code",(i,l)=>(this.richText.push({i:"m",code:!0,language:l,text:i}),this)),ye(this,"image",(i,l,a)=>(this.richText.push({i:"i",url:i,width:l,height:a}),this)),ye(this,"rem",i=>{const l={i:"q",_id:mt(i)};return this.richText.push(l),this}),ye(this,"text",(i,l=[])=>{if(l.length===0)return this.richText.push(i),this;const a=Object.fromEntries(l.map(d=>ul[d]?["h",ul[d]]:[Ps[d],!0])||[]);return this.richText.push(un(Fi({i:"m"},a),{text:i})),this}),ye(this,"audio",i=>(this.richText.push({i:"a",url:i,onlyAudio:!0}),this)),ye(this,"latex",(i,l=!1)=>(this.richText.push({i:"x",text:i,block:l}),this)),ye(this,"video",i=>(this.richText.push({i:"a",url:i,onlyAudio:!1}),this)),ye(this,"newline",()=>(this.richText.push(`
13
+ `),this)),ye(this,"value",()=>this.richTextNamespace.normalize(this.richText)),this.richTextNamespace=r}}c(Ot,"RichTextBuilder");class Zn extends ft{constructor(r){super(r,$u),ye(this,"indexOfElementAt",(i,l)=>Ue(this,null,function*(){return this.call("indexOfElementAt",{richText:i,position:l})})),ye(this,"normalize",i=>Ue(this,null,function*(){return this.call("normalize",{richText:i})})),ye(this,"removeTextFormatFromRange",(i,l,a,d)=>Ue(this,null,function*(){return this.call("removeTextFormatFromRange",{text:i,start:l,end:a,format:d})})),ye(this,"applyTextFormatToRange",(i,l,a,d)=>Ue(this,null,function*(){return this.call("applyTextFormatToRange",{text:i,start:l,end:a,format:d})})),ye(this,"toggleTextFormatOnRange",(i,l,a,d)=>Ue(this,null,function*(){return this.call("toggleTextFormatOnRange",{text:i,start:l,end:a,format:d})})),ye(this,"replaceAllRichText",(i,l,a)=>Ue(this,null,function*(){return this.call("replaceAllRichText",{richText:i,findText:l,replacementText:a})})),ye(this,"splitRichText",(i,l)=>Ue(this,null,function*(){return this.call("splitRichText",{richText:i,splitText:l})})),ye(this,"empty",(i,l)=>Ue(this,null,function*(){return this.call("empty",{richText:i,allowSpaces:l})})),ye(this,"indexOf",(i,l,a)=>Ue(this,null,function*(){return this.call("indexOf",{richText:i,character:l,startChar:a})})),ye(this,"toHTML",i=>Ue(this,null,function*(){return this.call("toHTML",{richText:i})})),ye(this,"length",i=>Ue(this,null,function*(){return this.call("length",{richText:i})})),ye(this,"trimEnd",i=>Ue(this,null,function*(){return this.call("trimEnd",{richText:i})})),ye(this,"trimStart",i=>Ue(this,null,function*(){return this.call("trimStart",{richText:i})})),ye(this,"trim",i=>Ue(this,null,function*(){return this.call("trim",{richText:i})})),ye(this,"split",(i,l)=>Ue(this,null,function*(){return this.call("split",{richText:i,separationCharacter:l})})),ye(this,"deepGetRemAndAliasIdsFromRichText",i=>Ue(this,null,function*(){return this.call("deepGetRemAndAliasIdsFromRichText",{richText:i})})),ye(this,"deepGetRemIdsFromRichText",i=>Ue(this,null,function*(){return this.call("deepGetRemIdsFromRichText",{richText:i})})),ye(this,"findAllExternalURLs",i=>Ue(this,null,function*(){return this.call("findAllExternalURLs",{richText:i})})),ye(this,"getRemAndAliasIdsFromRichText",i=>Ue(this,null,function*(){return this.call("getRemAndAliasIdsFromRichText",{richText:i})})),ye(this,"getRemIdsFromRichText",i=>Ue(this,null,function*(){return this.call("getRemIdsFromRichText",{richText:i})})),ye(this,"equals",(i,l)=>Ue(this,null,function*(){return this.call("equals",{richText1:i,richText2:l})})),ye(this,"substring",(i,l,a)=>Ue(this,null,function*(){return this.call("substring",{richText:i,start:l,end:a})})),ye(this,"charAt",(i,l)=>Ue(this,null,function*(){return this.call("charAt",{richText:i,index:l})})),ye(this,"toString",i=>Ue(this,null,function*(){return this.call("toString",{richText:i})})),ye(this,"toMarkdown",i=>Ue(this,null,function*(){return this.call("toMarkdown",{richText:i})})),ye(this,"parseFromMarkdown",i=>Ue(this,null,function*(){return this.call("parseFromMarkdown",{markdown:i})})),ye(this,"parseAndInsertHtml",(i,l)=>Ue(this,null,function*(){const a=mt(l);return this.call("parseAndInsertHtml",{html:i,remId:a})}))}get code(){return new Ot(this).code}get image(){return new Ot(this).image}get rem(){return new Ot(this).rem}get text(){return new Ot(this).text}get audio(){return new Ot(this).audio}get latex(){return new Ot(this).latex}get video(){return new Ot(this).video}get newline(){return new Ot(this).newline}}c(Zn,"RichTextNamespace");const Qu="scheduler";class Xr extends ft{constructor(r){super(r,Qu)}registerCustomScheduler(r,i){return this.call("registerCustomScheduler",{name:r,parameters:i})}}c(Xr,"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"),Pl=c((t,r,i)=>(Gu(t,typeof r!="symbol"?r+"":r,i),i),"search_publicField"),kl=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"search_async");const Yu="search";class Rl extends ft{constructor(r){super(r,Yu),Pl(this,"search",(i,l,a)=>kl(this,null,function*(){const d=mt(l);return((yield this.call("search",{queryText:i,searchContextRemId:d,options:a}))||[]).map(p=>new gt(p,this._call))}))}}c(Rl,"SearchNamespace");var qu=Object.defineProperty,bl=Object.getOwnPropertySymbols,Il=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable,Mi=c((t,r,i)=>r in t?qu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"settings_defNormalProp"),ko=c((t,r)=>{for(var i in r||(r={}))Il.call(r,i)&&Mi(t,i,r[i]);if(bl)for(var i of bl(r))Po.call(r,i)&&Mi(t,i,r[i]);return t},"settings_spreadValues"),_r=c((t,r,i)=>(Mi(t,typeof r!="symbol"?r+"":r,i),i),"settings_publicField"),zi=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"settings_async");const Ro="settings";class cn extends ft{constructor(r){super(r,Ro),_r(this,"registerDropdownSetting",i=>zi(this,null,function*(){return this.call("registerDropdownSetting",ko({},i))})),_r(this,"registerBooleanSetting",i=>zi(this,null,function*(){return this.call("registerBooleanSetting",ko({},i))})),_r(this,"registerStringSetting",i=>zi(this,null,function*(){return this.call("registerStringSetting",ko({},i))})),_r(this,"registerNumberSetting",i=>zi(this,null,function*(){return this.call("registerNumberSetting",ko({},i))})),_r(this,"getSetting",i=>zi(this,null,function*(){return yield this.call("getSetting",{settingId:i})}))}}c(cn,"SettingsNamespace");var bo=Object.defineProperty,Io=c((t,r,i)=>r in t?bo(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"storage_defNormalProp"),dn=c((t,r,i)=>(Io(t,typeof r!="symbol"?r+"":r,i),i),"storage_publicField"),xr=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"storage_async");const Bi="storage";class Ol extends ft{constructor(r){super(r,Bi),dn(this,"setSession",(i,l)=>xr(this,null,function*(){return this.call("setSession",{key:i,value:l})})),dn(this,"getSession",i=>xr(this,null,function*(){if(i)return this.call("getSession",{key:i})})),dn(this,"setSynced",(i,l)=>xr(this,null,function*(){return this.call("setSynced",{key:i,value:l})})),dn(this,"getSynced",i=>xr(this,null,function*(){if(i)return this.call("getSynced",{key:i})})),dn(this,"setLocal",(i,l)=>xr(this,null,function*(){return this.call("setLocal",{key:i,value:l})})),dn(this,"getLocal",i=>xr(this,null,function*(){if(i)return this.call("getLocal",{key:i})}))}}c(Ol,"StorageNamespace");var la=Object.defineProperty,ut=c((t,r,i)=>r in t?la(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"widget_defNormalProp"),Er=c((t,r,i)=>(ut(t,typeof r!="symbol"?r+"":r,i),i),"widget_publicField"),tn=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"widget_async");const Sr="widget";class fn extends ft{constructor(r){super(r,Sr),Er(this,"getWidgetsAtLocation",(i,l)=>tn(this,null,function*(){return this.call("getWidgetsAtLocation",{location:i,remId:l})})),Er(this,"getDimensions",i=>tn(this,null,function*(){return this.call("getDimensions",{widgetInstanceId:i})})),Er(this,"openPopup",(i,l,a)=>tn(this,null,function*(){return this.call("openPopup",{widgetFileName:i,contextData:l,clickOutsideToClose:a})})),Er(this,"closePopup",(i=!0)=>tn(this,null,function*(){return this.call("closePopup",{restoreFocus:i})})),Er(this,"getWidgetContext",()=>tn(this,null,function*(){return this.call("getWidgetContext",{})}))}}c(fn,"WidgetNamespace");var Xu=Object.defineProperty,Ju=c((t,r,i)=>r in t?Xu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"window_defNormalProp"),it=c((t,r,i)=>(Ju(t,typeof r!="symbol"?r+"":r,i),i),"window_publicField"),ot=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"window_async");const Nl="window";class Oo extends ft{constructor(r){super(r,Nl),it(this,"stealKeys",(i,l)=>ot(this,null,function*(){yield this.call("stealKeys",{keys:l,id:i})})),it(this,"releaseKeys",(i,l)=>ot(this,null,function*(){yield this.call("releaseKeys",{keys:l,id:i})})),it(this,"openFloatingWidget",(i,l,a,d)=>ot(this,null,function*(){return yield this.call("openFloatingWidget",{fileName:i,position:l,classContainer:a,closeWhenClickOutside:d})})),it(this,"closeFloatingWidget",i=>ot(this,null,function*(){return yield this.call("closeFloatingWidget",{floatingWidgetId:i})})),it(this,"isFloatingWidgetOpen",i=>ot(this,null,function*(){return yield this.call("isFloatingWidgetOpen",{floatingWidgetId:i})})),it(this,"setFloatingWidgetPosition",(i,l)=>ot(this,null,function*(){return yield this.call("setFloatingWidgetPosition",{floatingWidgetId:i,position:l})})),it(this,"closeAllFloatingWidgets",()=>ot(this,null,function*(){return yield this.call("closeAllFloatingWidgets",{})})),it(this,"getCurrentWindowTree",()=>ot(this,null,function*(){return yield this.call("getCurrentWindowTree",{})})),it(this,"setRemWindowTree",i=>ot(this,null,function*(){return yield this.call("setRemWindowTree",{tree:i})})),it(this,"getLastFocusedPane",()=>ot(this,null,function*(){return yield this.call("getLastFocusedPane",{})})),it(this,"setCurrentWindowTreeFromString",i=>ot(this,null,function*(){return yield this.call("setCurrentWindowTreeFromString",{treeString:i})})),it(this,"getOpenPaneIds",()=>ot(this,null,function*(){return yield this.call("getOpenPaneIds",{})})),it(this,"getFocusedPaneId",()=>ot(this,null,function*(){return yield this.call("getFocusedPaneId",{})})),it(this,"setFocusedPaneId",i=>ot(this,null,function*(){return yield this.call("setFocusedPaneId",{paneId:i})})),it(this,"getURL",()=>ot(this,null,function*(){return yield this.call("getURL",{})})),it(this,"setURL",i=>ot(this,null,function*(){return yield this.call("setURL",{url:i})})),it(this,"openRem",i=>ot(this,null,function*(){return yield this.call("openRem",{remId:i._id})})),it(this,"getOpenPaneRemIds",()=>ot(this,null,function*(){return yield this.call("getOpenPaneRemIds",{})})),it(this,"getOpenPaneRemId",i=>ot(this,null,function*(){if(i)return yield this.call("getOpenPaneRemId",{paneId:i})})),it(this,"openWidgetInPane",(i,l)=>ot(this,null,function*(){return yield this.call("openWidgetInPane",{fileName:i,contextData:l})})),it(this,"openWidgetInRightSidebar",(i,l)=>ot(this,null,function*(){return yield this.call("openWidgetInRightSidebar",{fileName:i,contextData:l})})),it(this,"isOnPage",i=>ot(this,null,function*(){return yield this.call("isOnPage",{page:i})}))}}c(Oo,"WindowNamespace");var Ui=Object.defineProperty,Dl=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,Jr=c((t,r,i)=>r in t?Ui(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"plugin_base_defNormalProp"),dt=c((t,r)=>{for(var i in r||(r={}))No.call(r,i)&&Jr(t,i,r[i]);if(Dl)for(var i of Dl(r))pn.call(r,i)&&Jr(t,i,r[i]);return t},"plugin_base_spreadValues"),fe=c((t,r,i)=>(Jr(t,typeof r!="symbol"?r+"":r,i),i),"plugin_base_publicField"),We=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"plugin_base_async");class Zi{constructor(){fe(this,"apiCallPromise",{}),fe(this,"model",{}),fe(this,"listeners",{}),fe(this,"usedMessageIds",1),fe(this,"widgetInstanceId"),fe(this,"inSandbox"),fe(this,"isNative"),fe(this,"rootURL"),fe(this,"mountDiv"),fe(this,"widgetBodyResizeObserver",null),fe(this,"widgetOptions"),fe(this,"manifest"),fe(this,"id"),fe(this,"app",new vl(this._call.bind(this),this)),fe(this,"editor",new Ke(this._call.bind(this))),fe(this,"event",new tr(this._call.bind(this),this)),fe(this,"messaging",new xl(this._call.bind(this))),fe(this,"focus",new ji(this._call.bind(this))),fe(this,"date",new gr(this._call.bind(this))),fe(this,"widget",new fn(this._call.bind(this))),fe(this,"window",new Oo(this._call.bind(this))),fe(this,"powerup",new Pn(this._call.bind(this))),fe(this,"richText",new Zn(this._call.bind(this))),fe(this,"rem",new wi(this._call.bind(this))),fe(this,"card",new Gr(this._call.bind(this))),fe(this,"storage",new Ol(this._call.bind(this))),fe(this,"settings",new cn(this._call.bind(this))),fe(this,"search",new Rl(this._call.bind(this))),fe(this,"kb",new Eo(this._call.bind(this))),fe(this,"scheduler",new Xr(this._call.bind(this))),fe(this,"queue",new nr(this._call.bind(this))),fe(this,"reader",new en(this._call.bind(this))),window.onmessage=r=>{this._receive(r)},this.pluginLogger=Ks()(`plugin:${this.id||"Plugin"}`),this.logApi=Ks()(`plugin:API:${this.id||"Plugin"}`),this.logApi("START"),this.event.addListener(b.onActivate,void 0,this.receiveActivateMessage.bind(this)),this.event.addListener(b.onDeactivate,void 0,this.receiveDeactivateMessage.bind(this)),this.event.addListener(b.setDarkMode,void 0,this.setDarkMode.bind(this)),this.event.addListener(b.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 l=document.getElementsByTagName("head")[0];for(const a of[...l.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,l.appendChild(d)}for(const a of i){const d=document.createElement("link");d.classList.add("custom-css"),d.rel="stylesheet",d.href=a,l.appendChild(d)}}track(r){let i=!1,l=!1,a=!1,d=[];const p=c(()=>{if(i){for(const{event:h,key:g}of d.flatMap(v=>v.reactiveDeps))this.event.removeListener(h,g,p);return}else l?a=!0:(l=!0,c(()=>We(this,null,function*(){d=yield hd(this,r,p,()=>{},d||[]),l=!1,a&&(a=!1,p())}),"effect")())},"run");return p(),()=>{i=!0}}loadManifest(){return We(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 We(this,null,function*(){var i,l,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=(l=r.widgetOptions)==null?void 0:l.dimensions)==null?void 0:a.height,v=(p=(d=r.widgetOptions)==null?void 0:d.dimensions)==null?void 0:p.width;if(v=="auto"&&r.inSandbox&&(h.style.display="inline-block"),(g==="auto"||v==="auto")&&this.autoAdjustWidgetContainerDimension(),r.inSandbox&&(g==="auto"&&(document.documentElement.style.overflowY="hidden"),v==="auto"&&(document.documentElement.style.overflowX="hidden")),r.inSandbox)for(const X of r.styleSheetHREFs){const Ce=document.createElement("link");Ce.href=X,Ce.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(Ce)}yield this._call("activateCompleted",{})})}receiveDeactivateMessage(r){return We(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,l){return We(this,null,function*(){const a=this.usedMessageIds++;typeof l=="string"?r=l+"."+r:typeof l=="object"&&(r=[...l,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 We(this,null,function*(){var i,l,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(!Z(d.eventId))throw new Error("Invalid event "+d.eventId);(a=(l=this.listeners[d.eventId])==null?void 0:l.get(d.listenerKey))==null||a.forEach(p=>p(d.args))}}})}autoAdjustWidgetContainerDimension(){return We(this,null,function*(){const r=new ResizeObserver(l=>{for(let a of l)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,v=parseFloat(d.getPropertyValue("margin-inline-end"))||0,X={height:a.contentBoxSize[0].blockSize+p+h,width:a.contentBoxSize[0].inlineSize+g+v};this._call("widgetEvents.updateWidgetContainerDimension",X)}}),i=this.inSandbox?this.mountDiv:this.mountDiv.firstChild;i&&(r.observe(i),this.widgetBodyResizeObserver=r)})}createFakeEmbedComponent(r){return We(this,null,function*(){return this._call("widgetEvents.createFakeEmbedComponent",r)})}unmountFakeEmbedComponent(r){return We(this,null,function*(){return this._call("widgetEvents.unmountFakeEmbedComponent",{id:r})})}updateFakeEmbedComponentRect(r,i){return We(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedComponentRect",dt({id:r},i))})}updateFakeEmbedExternalProps(r,i){return We(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedExternalProps",{id:r,externalProps:i})})}ping(){return We(this,null,function*(){return yield this._call("ping",{})})}}c(Zi,"RNPlugin");var Ve=Fe(232);let Zt=c(t=>crypto.getRandomValues(new Uint8Array(t)),"random"),sa=c((t,r,i)=>{let l=(2<<Math.log(t.length-1)/Math.LN2)-1,a=-~(1.6*l*r/t.length);return(d=r)=>{let p="";for(;;){let h=i(a),g=a;for(;g--;)if(p+=t[h[g]&l]||"",p.length===d)return p}}},"customRandom"),ec=c((t,r=21)=>sa(t,r,Zt),"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 q=Fe(359),kn=Fe.n(q),Wi="1.13.6",Vi=typeof self=="object"&&self.self===self&&self||typeof Pe.g=="object"&&Pe.g.global===Pe.g&&Pe.g||Function("return this")()||{},Do=Array.prototype,Al=Object.prototype,aa=typeof Symbol<"u"?Symbol.prototype:null,Ao=Do.push,Tr=Do.slice,Hi=Al.toString,jl=Al.hasOwnProperty,Ll=typeof ArrayBuffer<"u",ua=typeof DataView<"u",tc=Array.isArray,jo=Object.keys,ca=Object.create,da=Ll&&ArrayBuffer.isView,nc=isNaN,fa=isFinite,pa=!{toString:null}.propertyIsEnumerable("toString"),ha=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],td=Math.pow(2,53)-1;function bt(t,r){return r=r==null?t.length-1:+r,function(){for(var i=Math.max(arguments.length-r,0),l=Array(i),a=0;a<i;a++)l[a]=arguments[a+r];switch(r){case 0:return t.call(this,l);case 1:return t.call(this,arguments[0],l);case 2:return t.call(this,arguments[0],arguments[1],l)}var d=Array(r+1);for(a=0;a<r;a++)d[a]=arguments[a];return d[r]=l,t.apply(this,d)}}c(bt,"restArguments");function Rn(t){var r=typeof t;return r==="function"||r==="object"&&!!t}c(Rn,"isObject");function rc(t){return t===null}c(rc,"isNull");function ma(t){return t===void 0}c(ma,"isUndefined");function ga(t){return t===!0||t===!1||Hi.call(t)==="[object Boolean]"}c(ga,"isBoolean");function ic(t){return!!(t&&t.nodeType===1)}c(ic,"isElement");function Ye(t){var r="[object "+t+"]";return function(i){return Hi.call(i)===r}}c(Ye,"tagTester");var Nt=Ye("String"),ya=Ye("Number"),oc=Ye("Date"),lc=Ye("RegExp"),va=Ye("Error"),wa=Ye("Symbol"),Fl=Ye("ArrayBuffer"),_a=Ye("Function"),xa=Vi.document&&Vi.document.childNodes;typeof Int8Array!="object"&&typeof xa!="function"&&(_a=c(function(t){return typeof t=="function"||!1},"isFunction"));var Dt=_a,Lo=Ye("Object"),Ea=ua&&Lo(new DataView(new ArrayBuffer(8))),Ml=typeof Map<"u"&&Lo(new Map),sc=Ye("DataView");function Sa(t){return t!=null&&Dt(t.getInt8)&&Fl(t.buffer)}c(Sa,"ie10IsDataView");var Fo=Ea?Sa:sc,rr=tc||Ye("Array");function Wn(t,r){return t!=null&&jl.call(t,r)}c(Wn,"has");var bn=Ye("Arguments");(function(){bn(arguments)||(bn=c(function(t){return Wn(t,"callee")},"isArguments"))})();var zl=bn;function Bl(t){return!wa(t)&&fa(t)&&!isNaN(parseFloat(t))}c(Bl,"isFinite_isFinite");function Ul(t){return ya(t)&&nc(t)}c(Ul,"isNaN_isNaN");function Zl(t){return function(){return t}}c(Zl,"constant");function ti(t){return function(r){var i=t(r);return typeof i=="number"&&i>=0&&i<=td}}c(ti,"createSizePropertyCheck");function Ta(t){return function(r){return r?.[t]}}c(Ta,"shallowProperty");var Wl=Ta("byteLength"),Ca=ti(Wl),Pa=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function ac(t){return da?da(t)&&!Fo(t):Ca(t)&&Pa.test(Hi.call(t))}c(ac,"isTypedArray");var ka=Ll?ac:Zl(!1),jt=Ta("length");function uc(t){for(var r={},i=t.length,l=0;l<i;++l)r[t[l]]=!0;return{contains:function(a){return r[a]===!0},push:function(a){return r[a]=!0,t.push(a)}}}c(uc,"emulatedSet");function Vl(t,r){r=uc(r);var i=ha.length,l=t.constructor,a=Dt(l)&&l.prototype||Al,d="constructor";for(Wn(t,d)&&!r.contains(d)&&r.push(d);i--;)d=ha[i],d in t&&t[d]!==a[d]&&!r.contains(d)&&r.push(d)}c(Vl,"collectNonEnumProps");function wt(t){if(!Rn(t))return[];if(jo)return jo(t);var r=[];for(var i in t)Wn(t,i)&&r.push(i);return pa&&Vl(t,r),r}c(wt,"keys");function cc(t){if(t==null)return!0;var r=jt(t);return typeof r=="number"&&(rr(t)||Nt(t)||zl(t))?r===0:jt(wt(t))===0}c(cc,"isEmpty");function Hl(t,r){var i=wt(r),l=i.length;if(t==null)return!l;for(var a=Object(t),d=0;d<l;d++){var p=i[d];if(r[p]!==a[p]||!(p in a))return!1}return!0}c(Hl,"isMatch");function Le(t){if(t instanceof Le)return t;if(!(this instanceof Le))return new Le(t);this._wrapped=t}c(Le,"_"),Le.VERSION=Wi,Le.prototype.value=function(){return this._wrapped},Le.prototype.valueOf=Le.prototype.toJSON=Le.prototype.value,Le.prototype.toString=function(){return String(this._wrapped)};function $l(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,Wl(t))}c($l,"toBufferView");var Ra="[object DataView]";function Mo(t,r,i,l){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:zo(t,r,i,l)}c(Mo,"eq");function zo(t,r,i,l){t instanceof Le&&(t=t._wrapped),r instanceof Le&&(r=r._wrapped);var a=Hi.call(t);if(a!==Hi.call(r))return!1;if(Ea&&a=="[object Object]"&&Fo(t)){if(!Fo(r))return!1;a=Ra}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 aa.valueOf.call(t)===aa.valueOf.call(r);case"[object ArrayBuffer]":case Ra:return zo($l(t),$l(r),i,l)}var d=a==="[object Array]";if(!d&&ka(t)){var p=Wl(t);if(p!==Wl(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&&!(Dt(h)&&h instanceof h&&Dt(g)&&g instanceof g)&&"constructor"in t&&"constructor"in r)return!1}i=i||[],l=l||[];for(var v=i.length;v--;)if(i[v]===t)return l[v]===r;if(i.push(t),l.push(r),d){if(v=t.length,v!==r.length)return!1;for(;v--;)if(!Mo(t[v],r[v],i,l))return!1}else{var X=wt(t),Ce;if(v=X.length,wt(r).length!==v)return!1;for(;v--;)if(Ce=X[v],!(Wn(r,Ce)&&Mo(t[Ce],r[Ce],i,l)))return!1}return i.pop(),l.pop(),!0}c(zo,"deepEq");function Ql(t,r){return Mo(t,r)}c(Ql,"isEqual");function ni(t){if(!Rn(t))return[];var r=[];for(var i in t)r.push(i);return pa&&Vl(t,r),r}c(ni,"allKeys");function $i(t){var r=jt(t);return function(i){if(i==null)return!1;var l=ni(i);if(jt(l))return!1;for(var a=0;a<r;a++)if(!Dt(i[t[a]]))return!1;return t!==pe||!Dt(i[Kl])}}c($i,"ie11fingerprint");var Kl="forEach",dc="has",ba=["clear","delete"],Bo=["get",dc,"set"],Ia=ba.concat(Kl,Bo),pe=ba.concat(Bo),Lt=["add"].concat(ba,Kl,dc),_t=Ml?$i(Ia):Ye("Map"),At=Ml?$i(pe):Ye("WeakMap"),ri=Ml?$i(Lt):Ye("Set"),Oa=Ye("WeakSet");function lt(t){for(var r=wt(t),i=r.length,l=Array(i),a=0;a<i;a++)l[a]=t[r[a]];return l}c(lt,"values");function Uo(t){for(var r=wt(t),i=r.length,l=Array(i),a=0;a<i;a++)l[a]=[r[a],t[r[a]]];return l}c(Uo,"pairs");function Cr(t){for(var r={},i=wt(t),l=0,a=i.length;l<a;l++)r[t[i[l]]]=i[l];return r}c(Cr,"invert");function Pr(t){var r=[];for(var i in t)Dt(t[i])&&r.push(i);return r.sort()}c(Pr,"functions");function ir(t,r){return function(i){var l=arguments.length;if(r&&(i=Object(i)),l<2||i==null)return i;for(var a=1;a<l;a++)for(var d=arguments[a],p=t(d),h=p.length,g=0;g<h;g++){var v=p[g];(!r||i[v]===void 0)&&(i[v]=d[v])}return i}}c(ir,"createAssigner");var Gl=ir(ni),Qi=ir(wt),Yl=ir(ni,!0);function ql(){return function(){}}c(ql,"ctor");function kr(t){if(!Rn(t))return{};if(ca)return ca(t);var r=ql();r.prototype=t;var i=new r;return r.prototype=null,i}c(kr,"baseCreate");function $(t,r){var i=kr(t);return r&&Qi(i,r),i}c($,"create");function Zo(t){return Rn(t)?rr(t)?t.slice():Gl({},t):t}c(Zo,"clone");function Xl(t,r){return r(t),t}c(Xl,"tap");function hn(t){return rr(t)?t:[t]}c(hn,"toPath"),Le.toPath=hn;function nn(t){return Le.toPath(t)}c(nn,"_toPath_toPath");function Rr(t,r){for(var i=r.length,l=0;l<i;l++){if(t==null)return;t=t[r[l]]}return i?t:void 0}c(Rr,"deepGet");function ii(t,r,i){var l=Rr(t,nn(r));return ma(l)?i:l}c(ii,"get");function Jl(t,r){r=nn(r);for(var i=r.length,l=0;l<i;l++){var a=r[l];if(!Wn(t,a))return!1;t=t[a]}return!!i}c(Jl,"has_has");function Ki(t){return t}c(Ki,"identity");function Wt(t){return t=Qi({},t),function(r){return Hl(r,t)}}c(Wt,"matcher");function br(t){return t=nn(t),function(r){return Rr(r,t)}}c(br,"property");function Ir(t,r,i){if(r===void 0)return t;switch(i??3){case 1:return function(l){return t.call(r,l)};case 3:return function(l,a,d){return t.call(r,l,a,d)};case 4:return function(l,a,d,p){return t.call(r,l,a,d,p)}}return function(){return t.apply(r,arguments)}}c(Ir,"optimizeCb");function Gi(t,r,i){return t==null?Ki:Dt(t)?Ir(t,r,i):Rn(t)&&!rr(t)?Wt(t):br(t)}c(Gi,"baseIteratee");function mn(t,r){return Gi(t,r,1/0)}c(mn,"iteratee"),Le.iteratee=mn;function Ct(t,r,i){return Le.iteratee!==mn?Le.iteratee(t,r):Gi(t,r,i)}c(Ct,"cb");function Yi(t,r,i){r=Ct(r,i);for(var l=wt(t),a=l.length,d={},p=0;p<a;p++){var h=l[p];d[h]=r(t[h],h,t)}return d}c(Yi,"mapObject");function qi(){}c(qi,"noop");function Vt(t){return t==null?qi:function(r){return ii(t,r)}}c(Vt,"propertyOf");function or(t,r,i){var l=Array(Math.max(0,t));r=Ir(r,i,1);for(var a=0;a<t;a++)l[a]=r(a);return l}c(or,"times");function In(t,r){return r==null&&(r=t,t=0),t+Math.floor(Math.random()*(r-t+1))}c(In,"random_random");var Or=Date.now||function(){return new Date().getTime()};function Ht(t){var r=c(function(d){return t[d]},"escaper"),i="(?:"+wt(t).join("|")+")",l=RegExp(i),a=RegExp(i,"g");return function(d){return d=d==null?"":""+d,l.test(d)?d.replace(a,r):d}}c(Ht,"createEscaper");var Na={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Xi=Ht(Na),Da=Cr(Na),nd=Ht(Da),fc=Le.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},es=/(.)^/,ts={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Aa=/\\|'|\r|\n|\u2028|\u2029/g;function oi(t){return"\\"+ts[t]}c(oi,"escapeChar");var pc=/^\s*(\w|\$)+\s*$/;function ja(t,r,i){!r&&i&&(r=i),r=Yl({},r,Le.templateSettings);var l=RegExp([(r.escape||es).source,(r.interpolate||es).source,(r.evaluate||es).source].join("|")+"|$","g"),a=0,d="__p+='";t.replace(l,function(v,X,Ce,Ft,Ie){return d+=t.slice(a,Ie).replace(Aa,oi),a=Ie+v.length,X?d+=`'+
14
14
  ((__t=(`+X+`))==null?'':_.escape(__t))+
15
- '`:Te?d+=`'+
16
- ((__t=(`+Te+`))==null?'':__t)+
15
+ '`:Ce?d+=`'+
16
+ ((__t=(`+Ce+`))==null?'':__t)+
17
17
  '`:Ft&&(d+=`';
18
18
  `+Ft+`
19
19
  __p+='`),v}),d+=`';
@@ -21,45 +21,45 @@ __p+='`),v}),d+=`';
21
21
  `+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
- `;var h;try{h=new Function(p,"_",d)}catch(v){throw v.source=d,v}var g=c(function(v){return h.call(this,v,je)},"template");return g.source="function("+p+`){
25
- `+d+"}",g}c(ja,"template");function Ji(t,r,i){r=nn(r);var l=r.length;if(!l)return Dt(i)?i.call(t):i;for(var a=0;a<l;a++){var d=t?.[r[a]];d===void 0&&(d=i,a=l),t=Dt(d)?d.call(t):d}return t}c(Ji,"result");var rd=0;function hc(t){var r=++rd+"";return t?t+r:r}c(hc,"uniqueId");function La(t){var r=je(t);return r._chain=!0,r}c(La,"chain");function ns(t,r,i,l,a){if(!(l instanceof r))return t.apply(i,a);var d=kr(t.prototype),p=t.apply(d,a);return Rn(p)?p:d}c(ns,"executeBound");var lr=It(function(t,r){var i=lr.placeholder,l=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 ns(t,l,this,this,p)},"bound");return l});lr.placeholder=je;var rs=lr,mc=It(function(t,r,i){if(!Dt(t))throw new TypeError("Bind must be called on a function");var l=It(function(a){return ns(t,l,r,this,i.concat(a))});return l}),ft=ti(jt);function Nr(t,r,i,l){if(l=l||[],!r&&r!==0)r=1/0;else if(r<=0)return l.concat(t);for(var a=l.length,d=0,p=jt(t);d<p;d++){var h=t[d];if(ft(h)&&(rr(h)||zl(h)))if(r>1)Nr(h,r-1,i,l),a=l.length;else for(var g=0,v=h.length;g<v;)l[a++]=h[g++];else i||(l[a++]=h)}return l}c(Nr,"flatten");var gc=It(function(t,r){r=Nr(r,!1,!1);var i=r.length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var l=r[i];t[l]=mc(t[l],t)}return t});function yc(t,r){var i=c(function(l){var a=i.cache,d=""+(r?r.apply(this,arguments):l);return Wn(a,d)||(a[d]=t.apply(this,arguments)),a[d]},"memoize");return i.cache={},i}c(yc,"memoize");var Fa=It(function(t,r,i){return setTimeout(function(){return t.apply(null,i)},r)}),Dr=rs(Fa,je,1);function vc(t,r,i){var l,a,d,p,h=0;i||(i={});var g=c(function(){h=i.leading===!1?0:Or(),l=null,p=t.apply(a,d),l||(a=d=null)},"later"),v=c(function(){var X=Or();!h&&i.leading===!1&&(h=X);var Te=r-(X-h);return a=this,d=arguments,Te<=0||Te>r?(l&&(clearTimeout(l),l=null),h=X,p=t.apply(a,d),l||(a=d=null)):!l&&i.trailing!==!1&&(l=setTimeout(g,Te)),p},"throttled");return v.cancel=function(){clearTimeout(l),h=0,l=a=d=null},v}c(vc,"throttle");function wc(t,r,i){var l,a,d,p,h,g=c(function(){var X=Or()-a;r>X?l=setTimeout(g,r-X):(l=null,i||(p=t.apply(h,d)),l||(d=h=null))},"later"),v=It(function(X){return h=this,d=X,a=Or(),l||(l=setTimeout(g,r),i&&(p=t.apply(h,d))),p});return v.cancel=function(){clearTimeout(l),l=d=h=null},v}c(wc,"debounce");function Ma(t,r){return rs(r,t)}c(Ma,"wrap");function is(t){return function(){return!t.apply(this,arguments)}}c(is,"negate");function rn(){var t=arguments,r=t.length-1;return function(){for(var i=r,l=t[r].apply(this,arguments);i--;)l=t[i].call(this,l);return l}}c(rn,"compose");function os(t,r){return function(){if(--t<1)return r.apply(this,arguments)}}c(os,"after");function za(t,r){var i;return function(){return--t>0&&(i=r.apply(this,arguments)),t<=1&&(r=null),i}}c(za,"before");var Ar=rs(za,2);function eo(t,r,i){r=Tt(r,i);for(var l=vt(t),a,d=0,p=l.length;d<p;d++)if(a=l[d],r(t[a],a,t))return a}c(eo,"findKey");function jr(t){return function(r,i,l){i=Tt(i,l);for(var a=jt(r),d=t>0?0:a-1;d>=0&&d<a;d+=t)if(i(r[d],d,r))return d;return-1}}c(jr,"createPredicateIndexFinder");var Wo=jr(1),ls=jr(-1);function Vo(t,r,i,l){i=Tt(i,l,1);for(var a=i(r),d=0,p=jt(t);d<p;){var h=Math.floor((d+p)/2);i(t[h])<a?d=h+1:p=h}return d}c(Vo,"sortedIndex");function Ba(t,r,i){return function(l,a,d){var p=0,h=jt(l);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(l,a),l[d]===a?d:-1;if(a!==a)return d=r(Tr.call(l,p,h),Ul),d>=0?d+p:-1;for(d=t>0?p:h-1;d>=0&&d<h;d+=t)if(l[d]===a)return d;return-1}}c(Ba,"createIndexFinder");var _c=Ba(1,Wo,Vo),ss=Ba(-1,ls);function to(t,r,i){var l=ft(t)?Wo:eo,a=l(t,r,i);if(a!==void 0&&a!==-1)return t[a]}c(to,"find");function Ua(t,r){return to(t,Wt(r))}c(Ua,"findWhere");function gn(t,r,i){r=br(r,i);var l,a;if(ft(t))for(l=0,a=t.length;l<a;l++)r(t[l],l,t);else{var d=vt(t);for(l=0,a=d.length;l<a;l++)r(t[d[l]],d[l],t)}return t}c(gn,"each");function Lr(t,r,i){r=Tt(r,i);for(var l=!ft(t)&&vt(t),a=(l||t).length,d=Array(a),p=0;p<a;p++){var h=l?l[p]:p;d[p]=r(t[h],h,t)}return d}c(Lr,"map");function Ho(t){var r=c(function(i,l,a,d){var p=!ft(i)&&vt(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 v=p?p[g]:g;a=l(a,i[v],v,i)}return a},"reducer");return function(i,l,a,d){var p=arguments.length>=3;return r(i,br(l,d,4),a,p)}}c(Ho,"createReduce");var li=Ho(1),xc=Ho(-1);function Vn(t,r,i){var l=[];return r=Tt(r,i),gn(t,function(a,d,p){r(a,d,p)&&l.push(a)}),l}c(Vn,"filter");function Za(t,r,i){return Vn(t,is(Tt(r)),i)}c(Za,"reject");function Wa(t,r,i){r=Tt(r,i);for(var l=!ft(t)&&vt(t),a=(l||t).length,d=0;d<a;d++){var p=l?l[d]:d;if(!r(t[p],p,t))return!1}return!0}c(Wa,"every");function si(t,r,i){r=Tt(r,i);for(var l=!ft(t)&&vt(t),a=(l||t).length,d=0;d<a;d++){var p=l?l[d]:d;if(r(t[p],p,t))return!0}return!1}c(si,"some");function Hn(t,r,i,l){return ft(t)||(t=ot(t)),(typeof i!="number"||l)&&(i=0),_c(t,r,i)>=0}c(Hn,"contains");var as=It(function(t,r,i){var l,a;return Dt(r)?a=r:(r=nn(r),l=r.slice(0,-1),r=r[r.length-1]),Lr(t,function(d){var p=a;if(!p){if(l&&l.length&&(d=Rr(d,l)),d==null)return;p=d[r]}return p==null?p:p.apply(d,i)})});function e(t,r){return Lr(t,Ir(r))}c(e,"pluck");function n(t,r){return Vn(t,Wt(r))}c(n,"where");function o(t,r,i){var l=-1/0,a=-1/0,d,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=ft(t)?t:ot(t);for(var h=0,g=t.length;h<g;h++)d=t[h],d!=null&&d>l&&(l=d)}else r=Tt(r,i),gn(t,function(v,X,Te){p=r(v,X,Te),(p>a||p===-1/0&&l===-1/0)&&(l=v,a=p)});return l}c(o,"max");function s(t,r,i){var l=1/0,a=1/0,d,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=ft(t)?t:ot(t);for(var h=0,g=t.length;h<g;h++)d=t[h],d!=null&&d<l&&(l=d)}else r=Tt(r,i),gn(t,function(v,X,Te){p=r(v,X,Te),(p<a||p===1/0&&l===1/0)&&(l=v,a=p)});return l}c(s,"min");var u=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function f(t){return t?rr(t)?Tr.call(t):Nt(t)?t.match(u):ft(t)?Lr(t,Ki):ot(t):[]}c(f,"toArray");function m(t,r,i){if(r==null||i)return ft(t)||(t=ot(t)),t[bn(t.length-1)];var l=f(t),a=jt(l);r=Math.max(Math.min(r,a),0);for(var d=a-1,p=0;p<r;p++){var h=bn(p,d),g=l[p];l[p]=l[h],l[h]=g}return l.slice(0,r)}c(m,"sample");function y(t){return m(t,1/0)}c(y,"shuffle");function w(t,r,i){var l=0;return r=Tt(r,i),e(Lr(t,function(a,d,p){return{value:a,index:l++,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(w,"sortBy");function C(t,r){return function(i,l,a){var d=r?[[],[]]:{};return l=Tt(l,a),gn(i,function(p,h){var g=l(p,h,i);t(d,p,g)}),d}}c(C,"group");var V=C(function(t,r,i){Wn(t,i)?t[i].push(r):t[i]=[r]}),ye=C(function(t,r,i){t[i]=r}),F=C(function(t,r,i){Wn(t,i)?t[i]++:t[i]=1}),ee=C(function(t,r,i){t[i?0:1].push(r)},!0);function de(t){return t==null?0:ft(t)?t.length:vt(t).length}c(de,"size");function le(t,r,i){return r in i}c(le,"keyInObj");var T=It(function(t,r){var i={},l=r[0];if(t==null)return i;Dt(l)?(r.length>1&&(l=br(l,r[1])),r=ni(t)):(l=le,r=Nr(r,!1,!1),t=Object(t));for(var a=0,d=r.length;a<d;a++){var p=r[a],h=t[p];l(h,p,t)&&(i[p]=h)}return i}),_=It(function(t,r){var i=r[0],l;return Dt(i)?(i=is(i),r.length>1&&(l=r[1])):(r=Lr(Nr(r,!1,!1),String),i=c(function(a,d){return!Hn(r,d)},"iteratee")),T(t,i,l)});function E(t,r,i){return Tr.call(t,0,Math.max(0,t.length-(r==null||i?1:r)))}c(E,"initial");function b(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[0]:E(t,t.length-r)}c(b,"first");function N(t,r,i){return Tr.call(t,r==null||i?1:r)}c(N,"rest");function ve(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[t.length-1]:N(t,Math.max(0,t.length-r))}c(ve,"last");function K(t){return Vn(t,Boolean)}c(K,"compact");function we(t,r){return Nr(t,r,!1)}c(we,"flatten_flatten");var ke=It(function(t,r){return r=Nr(r,!0,!0),Vn(t,function(i){return!Hn(r,i)})}),Se=It(function(t,r){return ke(t,r)});function On(t,r,i,l){ga(r)||(l=i,i=r,r=!1),i!=null&&(i=Tt(i,l));for(var a=[],d=[],p=0,h=jt(t);p<h;p++){var g=t[p],v=i?i(g,p,t):g;r&&!i?((!p||d!==v)&&a.push(g),d=v):i?Hn(d,v)||(d.push(v),a.push(g)):Hn(a,g)||a.push(g)}return a}c(On,"uniq");var id=It(function(t){return On(Nr(t,!0,!0))});function wd(t){for(var r=[],i=arguments.length,l=0,a=jt(t);l<a;l++){var d=t[l];if(!Hn(r,d)){var p;for(p=1;p<i&&Hn(arguments[p],d);p++);p===i&&r.push(d)}}return r}c(wd,"intersection");function Ec(t){for(var r=t&&o(t,jt).length||0,i=Array(r),l=0;l<r;l++)i[l]=e(t,l);return i}c(Ec,"unzip");var kf=It(Ec);function _d(t,r){for(var i={},l=0,a=jt(t);l<a;l++)r?i[t[l]]=r[l]:i[t[l][0]]=t[l][1];return i}c(_d,"object");function xd(t,r,i){r==null&&(r=t||0,t=0),i||(i=r<t?-1:1);for(var l=Math.max(Math.ceil((r-t)/i),0),a=Array(l),d=0;d<l;d++,t+=i)a[d]=t;return a}c(xd,"range");function Ed(t,r){if(r==null||r<1)return[];for(var i=[],l=0,a=t.length;l<a;)i.push(Tr.call(t,l,l+=r));return i}c(Ed,"chunk");function Sc(t,r){return t._chain?je(r).chain():r}c(Sc,"chainResult");function od(t){return gn(Pr(t),function(r){var i=je[r]=t[r];je.prototype[r]=function(){var l=[this._wrapped];return Ao.apply(l,arguments),Sc(this,i.apply(je,l))}}),je}c(od,"mixin"),gn(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=Do[t];je.prototype[t]=function(){var i=this._wrapped;return i!=null&&(r.apply(i,arguments),(t==="shift"||t==="splice")&&i.length===0&&delete i[0]),Sc(this,i)}}),gn(["concat","join","slice"],function(t){var r=Do[t];je.prototype[t]=function(){var i=this._wrapped;return i!=null&&(i=r.apply(i,arguments)),Sc(this,i)}});var Rf=je,ld=od(Y);ld._=ld;var sd=ld,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 Sd{constructor(r){ad(this,"tree",new Map),ad(this,"rootNode"),ad(this,"handleScroll",i=>{if(!i.target)return;const l=i.target;this.tree.get(l)&&l.querySelectorAll(".js-fake-embed").forEach(a=>{const d=this.tree.get(a);d&&d.callback&&d.callback(l)})}),this.rootNode=r}addListener(r,i){var l;if(!((l=this.rootNode)!=null&&l.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 l=r;for(;l;){const a=this.tree.get(l);if(!a)break;const d=l.parentElement?this.tree.get(l.parentElement):null;if(l!==this.rootNode&&!d||d&&!d.children.has(l)||(d&&d?.children.delete(l),a.children.size!==0)||(l.removeEventListener("scroll",this.handleScroll),this.tree.delete(l),!d))break;l=d.node}}}c(Sd,"AncestorScrollDetector");const ud=(0,q.createContext)({}),Of=c(({root:t,children:r})=>{const i=(0,q.useMemo)(()=>new Sd(t),[]);return(0,We.jsx)(ud.Provider,{value:i,children:r})},"AncestorScrollDetectorProvider"),Nf=c(()=>(0,q.useContext)(ud),"useAncestorScrollDetector"),Td=(0,q.createContext)(null),Df=c(({plugin:t,children:r})=>(0,We.jsx)(Td.Provider,{value:t,children:r}),"PluginProvider"),ai=c(()=>{const t=(0,q.useContext)(Td);if(!t)throw new Error("You must wrap any RemNote API hooks in a <PluginProvider/>");return t},"usePlugin"),Cd=(0,q.createContext)(null),Af=c(({pluginRoot:t,children:r})=>(0,We.jsx)(Cd.Provider,{value:t,children:r}),"PluginRootProvider"),jf=c(()=>(0,q.useContext)(Cd),"usePluginRootDivRef");function Pd(t){return{all:t=t||new Map,on:function(r,i){var l=t.get(r);l?l.push(i):t.set(r,[i])},off:function(r,i){var l=t.get(r);l&&(i?l.splice(l.indexOf(i)>>>0,1):t.set(r,[]))},emit:function(r,i){var l=t.get(r);l&&l.slice().map(function(a){a(i)}),(l=t.get("*"))&&l.slice().map(function(a){a(r,i)})}}}c(Pd,"mitt");const Tc=Pd();var Cc=(t=>(t.PluginBodyResizeOrTreeRenders="PluginBodyResizeOrTreeRenders",t))(Cc||{});const Lf=c((t,r)=>{(0,q.useEffect)(()=>(Tc.on(t,r),()=>Tc.off(t,r)),[t,r])},"useEvent");function kd(t){const r=q.useRef(t),i=q.useRef(0);return sd.isEqual(t,r.current)||(r.current=t,i.current+=1),q.useMemo(()=>r.current,[i.current])}c(kd,"useDeepCompareMemoize");function Rd(t,r){return q.useEffect(t,kd(r))}c(Rd,"useDeepCompareEffectNoCheck");var Ff=Object.defineProperty,Mf=Object.defineProperties,zf=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,Id=Object.prototype.hasOwnProperty,bd=Object.prototype.propertyIsEnumerable,Od=c((t,r,i)=>r in t?Ff(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"FakeEmbed_defNormalProp"),sr=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"),Bf=c((t,r)=>Mf(t,zf(r)),"FakeEmbed_spreadProps"),Uf=c((t,r)=>{var i={};for(var l in t)Id.call(t,l)&&r.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&Pc)for(var l of Pc(t))r.indexOf(l)<0&&bd.call(t,l)&&(i[l]=t[l]);return i},"FakeEmbed_objRest"),Zf=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(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"),kc=c((t,r)=>{const i=Wf(r),l=Vf(r);return i?t*i/100:l||null},"dimensionToNumber"),Hf=c(({maxWidth:t,maxHeight:r,width:i,height:l,constraintWidth:a,constraintHeight:d})=>{const p=typeof i=="string"&&i!=="auto"?kc(a,i):i,h=typeof t=="string"?kc(a,t):t,g=typeof l=="string"&&l!=="auto"?kc(d,l):l,v=typeof r=="string"?kc(d,r):r;return{width:p,maxWidth:h,height:g,maxHeight:v}},"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:l=null,height:a="auto",width:d="auto",constraintRef:p="parent"})=>{var h,g,v,X,Te,Ft;((g=(h=window?.Env)==null?void 0:h.deploy)!=null&&g.isDevelopment||(X=(v=window?.Env)==null?void 0:v.deploy)!=null&&X.isStaging||(Ft=(Te=window?.Env)==null?void 0:Te.app)!=null&&Ft.isCypress)&&(console.error("You imported the wrong component!"),alert("You imported the wrong component!"));const Re=(0,q.useRef)(null),Ve=ai(),ds=jf(),yn=(0,q.useRef)(),[fs,yp]=(0,q.useState)(!1),md=Nf(),Dc=(0,q.useRef)(),ui=(0,q.useRef)({height:a,width:d,maxHeight:i,maxWidth:l}),$o=(0,q.useRef)(),xf=(0,q.useCallback)(Fe=>{!Re.current||Fe.height===void 0||Fe.width===void 0||Ve.isNative||(Re.current.style.height=Fe.height+"px",Re.current.style.width=Fe.width+"px")},[]),Ef=c(Fe=>{var ut;Fe.type=="wheel"?vp(Fe):(ut=Re.current)==null||ut.dispatchEvent(new Event(Fe.type,Bf(sr({},Fe),{bubbles:!0})))},"onDOMEvent"),vp=(0,q.useCallback)(Fe=>{if(!(!Re.current||Fe.deltaY===void 0||Fe.deltaX===void 0)){if(Fe.deltaY){let ut=Re.current;for(;ut&&!Nd(ut);)ut=ut.parentElement;ut&&(ut.scrollTop+=Fe.deltaY)}if(Fe.deltaX){let ut=Re.current;for(;ut&&!Dd(ut);)ut=ut.parentElement;ut&&(ut.scrollLeft+=Fe.deltaX)}}},[]),Sf=c(()=>{if(!yn.current||!Ve)return;const Fe=Dc.current?Hf({constraintWidth:Dc.current.constraintWidth,constraintHeight:Dc.current.constraintHeight,height:ui.current.height,width:ui.current.width,maxHeight:ui.current.maxHeight,maxWidth:ui.current.maxWidth}):{height:ui.current.height,width:ui.current.width,maxHeight:ui.current.maxHeight,maxWidth:ui.current.maxWidth};Ve.updateFakeEmbedComponentRect(yn.current,Fe)},"updateDimensions"),Tf=c(()=>{var Fe;if(!(Ve!=null&&Ve.inSandbox)||!Re.current||!yn.current)return;const{top:ut,left:Qo}=Re.current.getBoundingClientRect(),Ko=((Fe=ds?.current)==null?void 0:Fe.getBoundingClientRect())||{top:0,left:0},zr=ut-Ko.top,Go=Qo-Ko.left;$o.current&&$o?.current.top===zr&&$o?.current.left===Go||($o.current={left:Go,top:zr},Ve.updateFakeEmbedComponentRect(yn.current,{top:zr,left:Go}))},"handleResizeOrScrollEvent");(0,q.useEffect)(()=>{if(Ve||console.error("You must wrap your components in a <PluginProvider/> or a renderWidget call."),!Ve||!Re.current)return;gd();const Fe=ei();return Zf(void 0,null,function*(){var ut;const{top:Qo,left:Ko}=Re.current.getBoundingClientRect();$o.current={top:Qo,left:Ko};const zr=((ut=ds?.current)==null?void 0:ut.getBoundingClientRect())||{top:0,left:0},Go=Qo-zr.top,yd=Ko-zr.left;Ve.event.addListener(I.FakeEmbedComponentDimensionChange,Fe,xf),Ve.event.addListener(I.FakeEmbedDOMEvent,Fe,Ef),Ve.isNative&&window.nativePluginDivs.set("virtual-"+Fe,Re.current),yield Ve.createFakeEmbedComponent({id:Fe,type:t,top:Go,left:yd,externalProps:r}),yn.current=Fe,yp(!0)}),()=>{yn.current&&(Ve.unmountFakeEmbedComponent(yn.current),Ve.isNative&&window.nativePluginDivs.delete("virtual-"+Fe),Ve.event.removeListener(I.FakeEmbedComponentDimensionChange,yn.current,xf),Ve.event.removeListener(I.FakeEmbedDOMEvent,yn.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(),yn.current&&Ve.updateFakeEmbedExternalProps(yn.current,r)}return c(Cf,"updateExternalProps"),Rd(Cf,[r]),(0,q.useEffect)(()=>{fs&&(ui.current={maxHeight:i,maxWidth:l,height:a,width:d},Sf())},[i,l,d,a,fs]),(0,q.useEffect)(()=>{var Fe;if(Ve!=null&&Ve.inSandbox&&yn.current&&fs&&p){const ut=p==="parent"?(Fe=Re.current)==null?void 0:Fe.parentElement:p.current;if(!ut)return;const Qo=new ResizeObserver(Ko=>{for(const zr of Ko)if(zr.contentBoxSize){const Go=zr.contentBoxSize[0].inlineSize,yd=zr.contentBoxSize[0].blockSize;Dc.current={constraintHeight:yd,constraintWidth:Go},Sf()}});return Qo.observe(ut),()=>Qo.disconnect()}else return},[p,fs]),Lf(Cc.PluginBodyResizeOrTreeRenders,Tf),(0,q.useLayoutEffect)(()=>{if(!(!fs||!Re.current||!md))return md.addListener(Re.current,sd.debounce(Tf,10)),()=>{Re.current&&md.removeListener(Re.current)}},[fs]),(0,q.useEffect)(()=>()=>{Ve&&yn.current&&Ve.unmountFakeEmbedComponent(yn.current)},[]),(0,We.jsx)("div",{ref:Re,className:"js-fake-embed"})},"FakeEmbedHost"),Fr=c(t=>{const r=t,{width:i,maxHeight:l,constraintRef:a,height:d,maxWidth:p,componentType:h}=r,g=Uf(r,["width","maxHeight","constraintRef","height","maxWidth","componentType"]);return(0,We.jsx)($f,{componentType:h,externalProps:g,width:i,height:d,maxHeight:l,maxWidth:p,constraintRef:a})},"FakeEmbedHostConcrete");class Ad extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.RichTextEditor},this.props))}}c(Ad,"RichTextEditor");class jd extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.RichText},this.props))}}c(jd,"RichText");class Ld extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.RemViewer},this.props))}}c(Ld,"RemViewer");class Fd extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.PDFWebReader},this.props))}}c(Fd,"PDFWebReader");class Md extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.DocumentViewer},this.props))}}c(Md,"DocumentViewer");class zd extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.RemRichTextEditor},this.props))}}c(zd,"RemRichTextEditor");class Bd extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.RemHierarchyEditorTree},this.props))}}c(Bd,"RemHierarchyEditorTree");class Ud extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.Queue},this.props))}}c(Ud,"Queue");class Zd extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.LoadingSpinner},this.props))}}c(Zd,"LoadingSpinnerPlugin");class Wd extends q.Component{render(){return(0,We.jsx)(Fr,sr({componentType:Jt.PreviewRemCards},this.props))}}c(Wd,"PreviewRemCards");function cd(t){var r,i,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(i=cd(t[r]))&&(l&&(l+=" "),l+=i);else for(r in t)t[r]&&(l&&(l+=" "),l+=r);return l}c(cd,"r");function Vd(){for(var t,r,i=0,l="";i<arguments.length;)(t=arguments[i++])&&(r=cd(t))&&(l&&(l+=" "),l+=r);return l}c(Vd,"clsx");var Qf=Vd,Kf=ze(318),Hd=ze.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((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"PluginRenderer_async");const qf=c(({plugin:t,children:r})=>{const i=(0,q.useRef)(null);(0,q.useEffect)(()=>{if(!i.current||!t.inSandbox)return;const h=new ResizeObserver(()=>{i.current&&Tc.emit(Cc.PluginBodyResizeOrTreeRenders)}),g=new MutationObserver(v=>{for(const X of v)(X.type==="attributes"||X.type==="childList")&&Tc.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 l=t.inSandbox?{current:document.getElementsByTagName("html")[0]}:i,a=t.inSandbox?document.getElementsByTagName("html")[0]:t.mountDiv,d=t.inSandbox?Of:Kd,p=(0,We.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,We.jsx)(Df,{plugin:t,children:(0,We.jsx)(Af,{pluginRoot:l,children:(0,We.jsx)(d,{root:a,children:p})})})},"PluginWrapper");function Kd(t){return(0,We.jsx)(ud.Provider,{value:null,children:t.children})}c(Kd,"NoScrollDetector");class Rc extends Zi{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(Rc,"ReactRNPlugin");const Gd=c(t=>{const r=c(i=>{const l=c((d,p,h)=>Hd().render((0,We.jsxs)(q.StrictMode,{children:[(0,We.jsx)(qf,{plugin:d,children:(0,We.jsx)(t,{})}),(0,We.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),l(window.__plugin,window.__plugin.mountDiv,window.__plugin.rootURL)):window.__plugin=new Rc(l,a),window.__plugin):new Rc(l,a)},"makePlugin");try{const i=new URL(IMPORT_META.url).searchParams,l=i.get("widgetName"),a=i.get("pluginId");window.nativePluginRenderers.set(`${a}.${l}`,r)}catch{r(!0)}},"renderWidget");function Yd(t,r){function i(){const l=ai();return(0,q.useEffect)(()=>(l&&t(l),()=>{l&&r(l)}),[l]),null}c(i,"IndexWidget"),Gd(i)}c(Yd,"declareIndexPlugin");function qd(t){return Ic(I.MessageBroadcast,void 0,t)}c(qd,"useOnMessageBroadcast");function Ic(t,r,i){const l=ai();(0,q.useEffect)(()=>(l.event.addListener(t,r,i),()=>{l.event.removeListener(t,r,i)}),[t,r,i])}c(Ic,"useAPIEventListener");var Xf=Object.defineProperty,Xd=Object.getOwnPropertySymbols,Jf=Object.prototype.hasOwnProperty,ep=Object.prototype.propertyIsEnumerable,Jd=c((t,r,i)=>r in t?Xf(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(Xd)for(var i of Xd(r))ep.call(r,i)&&Jd(t,i,r[i]);return t},"rem_hooks_spreadValues"),np=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(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(l=>!i.has(l))}c(dd,"rem_hooks_difference");function ef(t){return t.filter(r=>r)}c(ef,"rem_hooks_compact");function tf(t){const r=ai(),i=ef(t||[]),[l,a]=(0,q.useState)({}),[d,p]=(0,q.useState)(i.map(Te=>l[Te])),h=c((Te,Ft)=>{Ft&&a(Re=>{const Ve=tp({},Re);return Ve[Te]=Ft,p(i.map(ds=>Ve[ds])),Ve})},"setRem"),g=c(Te=>np(this,null,function*(){h(Te,yield r.rem.findOne(Te))}),"refetchRem"),v=(0,q.useRef)([]),X=(0,q.useRef)(new Map);return(0,q.useEffect)(()=>{const Te=dd(i,v.current),Ft=dd(v.current,i);for(const Re of Te){const Ve=c(()=>g(Re),"listener");X.current.set(Re,Ve),r.event.addListener(I.RemChanged,Re,Ve),g(Re)}for(const Re of Ft)r.event.removeListener(I.RemChanged,Re,X.current.get(Re));p(i.map(Re=>l[Re])),v.current=i},[i.length,...i]),(0,q.useEffect)(()=>()=>{for(const Te of v.current)r.event.removeListener(I.RemChanged,Te,X.current.get(Te))},[]),d}c(tf,"useGetRemsByIdsReactive");var nf=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(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,l,a,d){const[p,h]=(0,q.useState)(d),g=c(()=>nf(this,null,function*(){r&&h((yield l(r))||d)}),"refetchValue");return(0,q.useEffect)(()=>{g()},[r]),Ic(i,r,v=>{h(v)}),[p,c(v=>nf(this,null,function*(){yield a(r,v)}),"setValue")]}c(bc,"useStorageStateInternal");function rf(t,r){const i=ai();return bc(i,t,I.StorageSessionChange,i.storage.getSession,i.storage.setSession,r)}c(rf,"useSessionStorageState");function of(t,r){const i=ai();return bc(i,t,I.StorageLocalChange,i.storage.getLocal,i.storage.setLocal,r)}c(of,"useLocalStorageState");function lf(t,r){const i=ai();return bc(i,t,I.StorageSyncedChange,i.storage.getSynced,i.storage.setSynced,r)}c(lf,"useSyncedStorageState");var sf=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(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,l]=(0,q.useState)(void 0);return(0,q.useEffect)(()=>{sf(this,null,function*(){return l(yield t())})},r),i}c(af,"useRunAsync");function uf(t,r){return sf(this,null,function*(){const i=[],l=yield Promise.all(t.map(a=>r(a)));for(const[a,d]of sd.zip(l,t))a&&i.push(d);return i})}c(uf,"filterAsync");const rp=["card","editor","focus","messaging","powerup","rem","richText","settings","storage","widget","window","search"],pt=c(t=>({event:I.RemChanged,key:typeof t=="string"?t:typeof t=="object"?t._id:void 0}),"remReactiveDep"),Mr=c(t=>({event:t,key:void 0}),"noKeyDep"),cf={allRemInDocumentOrPortal:{resultDeps:t=>t.map(pt)},deepRemsBeingReferenced:{resultDeps:t=>t.map(pt)},getAliases:{resultDeps:t=>t.map(pt)},getDescendants:{resultDeps:t=>t.map(pt)},getSources:{resultDeps:t=>t.map(pt)},getTagRems:{resultDeps:t=>t.map(pt)},getParentRem:{resultDeps:t=>[pt(t)]},getChildrenRem:{resultDeps:t=>t.map(pt)},getPortalDirectlyIncludedRem:{resultDeps:t=>t.map(pt)},portalsAndDocumentsIn:{resultDeps:t=>t.map(pt)},remsBeingReferenced:{resultDeps:t=>t.map(pt)},remsReferencingThis:{resultDeps:t=>t.map(pt)},siblingRem:{resultDeps:t=>t.map(pt)},taggedRem:{resultDeps:t=>t.map(pt)}},df={rem:{findByName:{resultDeps:t=>[pt(t)]},findOne:{argsDeps:t=>[pt(t[0])]},findMany:{argsDeps:t=>t[0].map(pt)},getAll:{resultDeps:t=>t.map(pt)}},powerup:{getPowerupSlotByCode:{resultDeps:t=>[pt(t)]},getPowerupByCode:{resultDeps:t=>[pt(t)]}},settings:{getSetting:{argsDeps:t=>[{event:I.SettingChanged,key:t[0]}]}},card:{},storage:{getLocal:{argsDeps:t=>[{event:I.StorageLocalChange,key:t[0]}]},getSession:{argsDeps:t=>[{event:I.StorageSessionChange,key:t[0]}]},getSynced:{argsDeps:t=>[{event:I.StorageSyncedChange,key:t[0]}]}},window:{getCurrentWindowTree:{argsDeps:()=>[Mr(I.CurrentWindowTreeChange)]},getFocusedPaneId:{argsDeps:()=>[Mr(I.FocusedPaneChange)]}},editor:{getFocusedEditorText:{argsDeps:()=>[Mr(I.FocusedRemChange),Mr(I.EditorTextEdited)]},getSelection:{argsDeps:()=>[Mr(I.EditorSelectionChanged)]},getSelectedRem:{argsDeps:()=>[Mr(I.EditorSelectionChanged)]},getSelectedText:{argsDeps:()=>[Mr(I.EditorSelectionChanged)]},getCaretPosition:{argsDeps:()=>[Mr(I.EditorSelectionChanged)]}},focus:{getFocusedRem:{argsDeps:()=>[Mr(I.FocusedRemChange)],resultDeps:t=>[pt(t)]},getFocusedPortal:{argsDeps:()=>[Mr(I.FocusedPortalChange)],resultDeps:t=>[pt(t)]}}};var Oc=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"useTracker_async");const us=!1;function ff(t){return rp.includes(t)}c(ff,"isNamespacedProp");const ip=c((t,r)=>Array.isArray(t)&&t[0]instanceof an?(us&&console.log("wrapping result array in Rem proxy"),t.map(i=>fd(i,r))):t&&t instanceof an?(us&&console.log("wrapping result in Rem proxy"),fd(t,r)):t,"wrapResult"),pf=c((t,r,i,l)=>new Proxy(t,{apply:(a,d,p)=>Oc(void 0,null,function*(){const h=yield a.apply(d,p);return l(r,d,i,p,h),ip(h,l)})}),"wrapFunctionCall");function fd(t,r){return new Proxy(t,{get(i,l){var a;return typeof i[l]=="function"&&(a=cf)!=null&&a[l]?pf(i[l],void 0,l,r):i[l]}})}c(fd,"interceptReactiveRemCalls");function hf(t,r,i){return new Proxy(r,{get(l,a){var d,p;return typeof a=="string"&&typeof l[a]=="function"&&(p=(d=df)==null?void 0:d[t])!=null&&p[a]?pf(l[a],t,a,i):l[a]}})}c(hf,"interceptReactiveAPICalls");function mf(t,r){return new Proxy(t,{get(i,l){return ff(l)?hf(l,i[l],r):i[l]}})}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,l,a,d,p)=>{var h,g,v,X,Te,Ft;const Re=i?(g=(h=df)==null?void 0:h[i])==null?void 0:g[a]:(v=cf)==null?void 0:v[a],Ve=[...((X=Re.thisDeps)==null?void 0:X.call(Re,l))||[],...((Te=Re.argsDeps)==null?void 0:Te.call(Re,d))||[],...((Ft=Re.resultDeps)==null?void 0:Ft.call(Re,p))||[]];r.push({methodName:a,args:d,reactiveDeps:Ve})}),subscriptions:r}},"wrapApiWithListen"),hd=c((t,r,i,l,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);us&&console.log("useReactiveAPI result",p),l(p)}),"changeHandler")(),gf(t,i,a,d.subscriptions),d.subscriptions}),"createReactiveApi");function gf(t,r,i,l){const a=pd(i||[]),d=pd(l);i?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!d.has(Nc(h))){const{event:g,key:v}=h;us&&console.log("removeListener",g,v),t.event.removeListener(g,v,r)}}),l?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!a.has(Nc(h))){const{event:g,key:v}=h;us&&console.log("addListener",g,v),t.event.addListener(g,v,r)}})}c(gf,"updateListeners");function yf(t,r=[]){const i=ai(),[l,a]=kn().useState(),d=(0,q.useRef)(!1),p=(0,q.useRef)(!1),h=(0,q.useRef)(),g=(0,q.useRef)(t);g.current=t;const v=c(()=>{us&&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,v,a,h.current||[]),d.current=!1,p.current&&(p.current=!1,v())}),"effect")())},"run");return kn().useEffect(v,r),l}c(yf,"useTrackerPlugin");const lp=/^[-_a-zA-Z0-9]+$/,sp=x.nativeEnum(ks),_p=x.nativeEnum(Xn),cs=x.object({level:sp}),ap=x.object({type:x.literal(Xn.KnowledgeBaseInfo)}).merge(cs),up=x.object({type:x.literal(Xn.All)}).merge(cs),cp=x.object({type:x.literal(Xn.DescendantsOfName),remName:x.string()}).merge(cs),dp=x.object({type:x.literal(Xn.DescendantsOfId),remId:x.string()}).merge(cs),fp=x.object({type:x.literal(Xn.Powerup),powerupCode:x.string()}).merge(cs),pp=x.object({type:x.literal(Xn.FocusedSubtree)}).merge(cs),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=>lp.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()})),xp=c(t=>`${t.field}: ${t.message}`,"formatValidationError"),_f=c(t=>{const r=t.errors,i=[];for(const l of r){const{code:a,message:d,path:p}=l,h={field:p.join(".")?p.join("."):"Root Object",message:`${d} (${a})`};"expected"in l&&(h.expected=l.expected),"received"in l&&(h.received=l.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")})(),qe})()})},575(he){"use strict";/*
24
+ `;var h;try{h=new Function(p,"_",d)}catch(v){throw v.source=d,v}var g=c(function(v){return h.call(this,v,Le)},"template");return g.source="function("+p+`){
25
+ `+d+"}",g}c(ja,"template");function Ji(t,r,i){r=nn(r);var l=r.length;if(!l)return Dt(i)?i.call(t):i;for(var a=0;a<l;a++){var d=t?.[r[a]];d===void 0&&(d=i,a=l),t=Dt(d)?d.call(t):d}return t}c(Ji,"result");var rd=0;function hc(t){var r=++rd+"";return t?t+r:r}c(hc,"uniqueId");function La(t){var r=Le(t);return r._chain=!0,r}c(La,"chain");function ns(t,r,i,l,a){if(!(l instanceof r))return t.apply(i,a);var d=kr(t.prototype),p=t.apply(d,a);return Rn(p)?p:d}c(ns,"executeBound");var lr=bt(function(t,r){var i=lr.placeholder,l=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 ns(t,l,this,this,p)},"bound");return l});lr.placeholder=Le;var rs=lr,mc=bt(function(t,r,i){if(!Dt(t))throw new TypeError("Bind must be called on a function");var l=bt(function(a){return ns(t,l,r,this,i.concat(a))});return l}),pt=ti(jt);function Nr(t,r,i,l){if(l=l||[],!r&&r!==0)r=1/0;else if(r<=0)return l.concat(t);for(var a=l.length,d=0,p=jt(t);d<p;d++){var h=t[d];if(pt(h)&&(rr(h)||zl(h)))if(r>1)Nr(h,r-1,i,l),a=l.length;else for(var g=0,v=h.length;g<v;)l[a++]=h[g++];else i||(l[a++]=h)}return l}c(Nr,"flatten");var gc=bt(function(t,r){r=Nr(r,!1,!1);var i=r.length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var l=r[i];t[l]=mc(t[l],t)}return t});function yc(t,r){var i=c(function(l){var a=i.cache,d=""+(r?r.apply(this,arguments):l);return Wn(a,d)||(a[d]=t.apply(this,arguments)),a[d]},"memoize");return i.cache={},i}c(yc,"memoize");var Fa=bt(function(t,r,i){return setTimeout(function(){return t.apply(null,i)},r)}),Dr=rs(Fa,Le,1);function vc(t,r,i){var l,a,d,p,h=0;i||(i={});var g=c(function(){h=i.leading===!1?0:Or(),l=null,p=t.apply(a,d),l||(a=d=null)},"later"),v=c(function(){var X=Or();!h&&i.leading===!1&&(h=X);var Ce=r-(X-h);return a=this,d=arguments,Ce<=0||Ce>r?(l&&(clearTimeout(l),l=null),h=X,p=t.apply(a,d),l||(a=d=null)):!l&&i.trailing!==!1&&(l=setTimeout(g,Ce)),p},"throttled");return v.cancel=function(){clearTimeout(l),h=0,l=a=d=null},v}c(vc,"throttle");function wc(t,r,i){var l,a,d,p,h,g=c(function(){var X=Or()-a;r>X?l=setTimeout(g,r-X):(l=null,i||(p=t.apply(h,d)),l||(d=h=null))},"later"),v=bt(function(X){return h=this,d=X,a=Or(),l||(l=setTimeout(g,r),i&&(p=t.apply(h,d))),p});return v.cancel=function(){clearTimeout(l),l=d=h=null},v}c(wc,"debounce");function Ma(t,r){return rs(r,t)}c(Ma,"wrap");function is(t){return function(){return!t.apply(this,arguments)}}c(is,"negate");function rn(){var t=arguments,r=t.length-1;return function(){for(var i=r,l=t[r].apply(this,arguments);i--;)l=t[i].call(this,l);return l}}c(rn,"compose");function os(t,r){return function(){if(--t<1)return r.apply(this,arguments)}}c(os,"after");function za(t,r){var i;return function(){return--t>0&&(i=r.apply(this,arguments)),t<=1&&(r=null),i}}c(za,"before");var Ar=rs(za,2);function eo(t,r,i){r=Ct(r,i);for(var l=wt(t),a,d=0,p=l.length;d<p;d++)if(a=l[d],r(t[a],a,t))return a}c(eo,"findKey");function jr(t){return function(r,i,l){i=Ct(i,l);for(var a=jt(r),d=t>0?0:a-1;d>=0&&d<a;d+=t)if(i(r[d],d,r))return d;return-1}}c(jr,"createPredicateIndexFinder");var Wo=jr(1),ls=jr(-1);function Vo(t,r,i,l){i=Ct(i,l,1);for(var a=i(r),d=0,p=jt(t);d<p;){var h=Math.floor((d+p)/2);i(t[h])<a?d=h+1:p=h}return d}c(Vo,"sortedIndex");function Ba(t,r,i){return function(l,a,d){var p=0,h=jt(l);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(l,a),l[d]===a?d:-1;if(a!==a)return d=r(Tr.call(l,p,h),Ul),d>=0?d+p:-1;for(d=t>0?p:h-1;d>=0&&d<h;d+=t)if(l[d]===a)return d;return-1}}c(Ba,"createIndexFinder");var _c=Ba(1,Wo,Vo),ss=Ba(-1,ls);function to(t,r,i){var l=pt(t)?Wo:eo,a=l(t,r,i);if(a!==void 0&&a!==-1)return t[a]}c(to,"find");function Ua(t,r){return to(t,Wt(r))}c(Ua,"findWhere");function gn(t,r,i){r=Ir(r,i);var l,a;if(pt(t))for(l=0,a=t.length;l<a;l++)r(t[l],l,t);else{var d=wt(t);for(l=0,a=d.length;l<a;l++)r(t[d[l]],d[l],t)}return t}c(gn,"each");function Lr(t,r,i){r=Ct(r,i);for(var l=!pt(t)&&wt(t),a=(l||t).length,d=Array(a),p=0;p<a;p++){var h=l?l[p]:p;d[p]=r(t[h],h,t)}return d}c(Lr,"map");function Ho(t){var r=c(function(i,l,a,d){var p=!pt(i)&&wt(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 v=p?p[g]:g;a=l(a,i[v],v,i)}return a},"reducer");return function(i,l,a,d){var p=arguments.length>=3;return r(i,Ir(l,d,4),a,p)}}c(Ho,"createReduce");var li=Ho(1),xc=Ho(-1);function Vn(t,r,i){var l=[];return r=Ct(r,i),gn(t,function(a,d,p){r(a,d,p)&&l.push(a)}),l}c(Vn,"filter");function Za(t,r,i){return Vn(t,is(Ct(r)),i)}c(Za,"reject");function Wa(t,r,i){r=Ct(r,i);for(var l=!pt(t)&&wt(t),a=(l||t).length,d=0;d<a;d++){var p=l?l[d]:d;if(!r(t[p],p,t))return!1}return!0}c(Wa,"every");function si(t,r,i){r=Ct(r,i);for(var l=!pt(t)&&wt(t),a=(l||t).length,d=0;d<a;d++){var p=l?l[d]:d;if(r(t[p],p,t))return!0}return!1}c(si,"some");function Hn(t,r,i,l){return pt(t)||(t=lt(t)),(typeof i!="number"||l)&&(i=0),_c(t,r,i)>=0}c(Hn,"contains");var as=bt(function(t,r,i){var l,a;return Dt(r)?a=r:(r=nn(r),l=r.slice(0,-1),r=r[r.length-1]),Lr(t,function(d){var p=a;if(!p){if(l&&l.length&&(d=Rr(d,l)),d==null)return;p=d[r]}return p==null?p:p.apply(d,i)})});function e(t,r){return Lr(t,br(r))}c(e,"pluck");function n(t,r){return Vn(t,Wt(r))}c(n,"where");function o(t,r,i){var l=-1/0,a=-1/0,d,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=pt(t)?t:lt(t);for(var h=0,g=t.length;h<g;h++)d=t[h],d!=null&&d>l&&(l=d)}else r=Ct(r,i),gn(t,function(v,X,Ce){p=r(v,X,Ce),(p>a||p===-1/0&&l===-1/0)&&(l=v,a=p)});return l}c(o,"max");function s(t,r,i){var l=1/0,a=1/0,d,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=pt(t)?t:lt(t);for(var h=0,g=t.length;h<g;h++)d=t[h],d!=null&&d<l&&(l=d)}else r=Ct(r,i),gn(t,function(v,X,Ce){p=r(v,X,Ce),(p<a||p===1/0&&l===1/0)&&(l=v,a=p)});return l}c(s,"min");var u=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function f(t){return t?rr(t)?Tr.call(t):Nt(t)?t.match(u):pt(t)?Lr(t,Ki):lt(t):[]}c(f,"toArray");function m(t,r,i){if(r==null||i)return pt(t)||(t=lt(t)),t[In(t.length-1)];var l=f(t),a=jt(l);r=Math.max(Math.min(r,a),0);for(var d=a-1,p=0;p<r;p++){var h=In(p,d),g=l[p];l[p]=l[h],l[h]=g}return l.slice(0,r)}c(m,"sample");function y(t){return m(t,1/0)}c(y,"shuffle");function w(t,r,i){var l=0;return r=Ct(r,i),e(Lr(t,function(a,d,p){return{value:a,index:l++,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(w,"sortBy");function C(t,r){return function(i,l,a){var d=r?[[],[]]:{};return l=Ct(l,a),gn(i,function(p,h){var g=l(p,h,i);t(d,p,g)}),d}}c(C,"group");var V=C(function(t,r,i){Wn(t,i)?t[i].push(r):t[i]=[r]}),ve=C(function(t,r,i){t[i]=r}),F=C(function(t,r,i){Wn(t,i)?t[i]++:t[i]=1}),ee=C(function(t,r,i){t[i?0:1].push(r)},!0);function he(t){return t==null?0:pt(t)?t.length:wt(t).length}c(he,"size");function ae(t,r,i){return r in i}c(ae,"keyInObj");var T=bt(function(t,r){var i={},l=r[0];if(t==null)return i;Dt(l)?(r.length>1&&(l=Ir(l,r[1])),r=ni(t)):(l=ae,r=Nr(r,!1,!1),t=Object(t));for(var a=0,d=r.length;a<d;a++){var p=r[a],h=t[p];l(h,p,t)&&(i[p]=h)}return i}),_=bt(function(t,r){var i=r[0],l;return Dt(i)?(i=is(i),r.length>1&&(l=r[1])):(r=Lr(Nr(r,!1,!1),String),i=c(function(a,d){return!Hn(r,d)},"iteratee")),T(t,i,l)});function E(t,r,i){return Tr.call(t,0,Math.max(0,t.length-(r==null||i?1:r)))}c(E,"initial");function I(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[0]:E(t,t.length-r)}c(I,"first");function D(t,r,i){return Tr.call(t,r==null||i?1:r)}c(D,"rest");function we(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[t.length-1]:D(t,Math.max(0,t.length-r))}c(we,"last");function G(t){return Vn(t,Boolean)}c(G,"compact");function _e(t,r){return Nr(t,r,!1)}c(_e,"flatten_flatten");var be=bt(function(t,r){return r=Nr(r,!0,!0),Vn(t,function(i){return!Hn(r,i)})}),Te=bt(function(t,r){return be(t,r)});function On(t,r,i,l){ga(r)||(l=i,i=r,r=!1),i!=null&&(i=Ct(i,l));for(var a=[],d=[],p=0,h=jt(t);p<h;p++){var g=t[p],v=i?i(g,p,t):g;r&&!i?((!p||d!==v)&&a.push(g),d=v):i?Hn(d,v)||(d.push(v),a.push(g)):Hn(a,g)||a.push(g)}return a}c(On,"uniq");var id=bt(function(t){return On(Nr(t,!0,!0))});function wd(t){for(var r=[],i=arguments.length,l=0,a=jt(t);l<a;l++){var d=t[l];if(!Hn(r,d)){var p;for(p=1;p<i&&Hn(arguments[p],d);p++);p===i&&r.push(d)}}return r}c(wd,"intersection");function Ec(t){for(var r=t&&o(t,jt).length||0,i=Array(r),l=0;l<r;l++)i[l]=e(t,l);return i}c(Ec,"unzip");var kf=bt(Ec);function _d(t,r){for(var i={},l=0,a=jt(t);l<a;l++)r?i[t[l]]=r[l]:i[t[l][0]]=t[l][1];return i}c(_d,"object");function xd(t,r,i){r==null&&(r=t||0,t=0),i||(i=r<t?-1:1);for(var l=Math.max(Math.ceil((r-t)/i),0),a=Array(l),d=0;d<l;d++,t+=i)a[d]=t;return a}c(xd,"range");function Ed(t,r){if(r==null||r<1)return[];for(var i=[],l=0,a=t.length;l<a;)i.push(Tr.call(t,l,l+=r));return i}c(Ed,"chunk");function Sc(t,r){return t._chain?Le(r).chain():r}c(Sc,"chainResult");function od(t){return gn(Pr(t),function(r){var i=Le[r]=t[r];Le.prototype[r]=function(){var l=[this._wrapped];return Ao.apply(l,arguments),Sc(this,i.apply(Le,l))}}),Le}c(od,"mixin"),gn(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=Do[t];Le.prototype[t]=function(){var i=this._wrapped;return i!=null&&(r.apply(i,arguments),(t==="shift"||t==="splice")&&i.length===0&&delete i[0]),Sc(this,i)}}),gn(["concat","join","slice"],function(t){var r=Do[t];Le.prototype[t]=function(){var i=this._wrapped;return i!=null&&(i=r.apply(i,arguments)),Sc(this,i)}});var Rf=Le,ld=od(K);ld._=ld;var sd=ld,bf=Object.defineProperty,If=c((t,r,i)=>r in t?bf(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"AncestorScrollDetector_defNormalProp"),ad=c((t,r,i)=>(If(t,typeof r!="symbol"?r+"":r,i),i),"AncestorScrollDetector_publicField");class Sd{constructor(r){ad(this,"tree",new Map),ad(this,"rootNode"),ad(this,"handleScroll",i=>{if(!i.target)return;const l=i.target;this.tree.get(l)&&l.querySelectorAll(".js-fake-embed").forEach(a=>{const d=this.tree.get(a);d&&d.callback&&d.callback(l)})}),this.rootNode=r}addListener(r,i){var l;if(!((l=this.rootNode)!=null&&l.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 l=r;for(;l;){const a=this.tree.get(l);if(!a)break;const d=l.parentElement?this.tree.get(l.parentElement):null;if(l!==this.rootNode&&!d||d&&!d.children.has(l)||(d&&d?.children.delete(l),a.children.size!==0)||(l.removeEventListener("scroll",this.handleScroll),this.tree.delete(l),!d))break;l=d.node}}}c(Sd,"AncestorScrollDetector");const ud=(0,q.createContext)({}),Of=c(({root:t,children:r})=>{const i=(0,q.useMemo)(()=>new Sd(t),[]);return(0,Ve.jsx)(ud.Provider,{value:i,children:r})},"AncestorScrollDetectorProvider"),Nf=c(()=>(0,q.useContext)(ud),"useAncestorScrollDetector"),Td=(0,q.createContext)(null),Df=c(({plugin:t,children:r})=>(0,Ve.jsx)(Td.Provider,{value:t,children:r}),"PluginProvider"),ai=c(()=>{const t=(0,q.useContext)(Td);if(!t)throw new Error("You must wrap any RemNote API hooks in a <PluginProvider/>");return t},"usePlugin"),Cd=(0,q.createContext)(null),Af=c(({pluginRoot:t,children:r})=>(0,Ve.jsx)(Cd.Provider,{value:t,children:r}),"PluginRootProvider"),jf=c(()=>(0,q.useContext)(Cd),"usePluginRootDivRef");function Pd(t){return{all:t=t||new Map,on:function(r,i){var l=t.get(r);l?l.push(i):t.set(r,[i])},off:function(r,i){var l=t.get(r);l&&(i?l.splice(l.indexOf(i)>>>0,1):t.set(r,[]))},emit:function(r,i){var l=t.get(r);l&&l.slice().map(function(a){a(i)}),(l=t.get("*"))&&l.slice().map(function(a){a(r,i)})}}}c(Pd,"mitt");const Tc=Pd();var Cc=(t=>(t.PluginBodyResizeOrTreeRenders="PluginBodyResizeOrTreeRenders",t))(Cc||{});const Lf=c((t,r)=>{(0,q.useEffect)(()=>(Tc.on(t,r),()=>Tc.off(t,r)),[t,r])},"useEvent");function kd(t){const r=q.useRef(t),i=q.useRef(0);return sd.isEqual(t,r.current)||(r.current=t,i.current+=1),q.useMemo(()=>r.current,[i.current])}c(kd,"useDeepCompareMemoize");function Rd(t,r){return q.useEffect(t,kd(r))}c(Rd,"useDeepCompareEffectNoCheck");var Ff=Object.defineProperty,Mf=Object.defineProperties,zf=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,bd=Object.prototype.hasOwnProperty,Id=Object.prototype.propertyIsEnumerable,Od=c((t,r,i)=>r in t?Ff(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"FakeEmbed_defNormalProp"),sr=c((t,r)=>{for(var i in r||(r={}))bd.call(r,i)&&Od(t,i,r[i]);if(Pc)for(var i of Pc(r))Id.call(r,i)&&Od(t,i,r[i]);return t},"FakeEmbed_spreadValues"),Bf=c((t,r)=>Mf(t,zf(r)),"FakeEmbed_spreadProps"),Uf=c((t,r)=>{var i={};for(var l in t)bd.call(t,l)&&r.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&Pc)for(var l of Pc(t))r.indexOf(l)<0&&Id.call(t,l)&&(i[l]=t[l]);return i},"FakeEmbed_objRest"),Zf=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(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"),kc=c((t,r)=>{const i=Wf(r),l=Vf(r);return i?t*i/100:l||null},"dimensionToNumber"),Hf=c(({maxWidth:t,maxHeight:r,width:i,height:l,constraintWidth:a,constraintHeight:d})=>{const p=typeof i=="string"&&i!=="auto"?kc(a,i):i,h=typeof t=="string"?kc(a,t):t,g=typeof l=="string"&&l!=="auto"?kc(d,l):l,v=typeof r=="string"?kc(d,r):r;return{width:p,maxWidth:h,height:g,maxHeight:v}},"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:l=null,height:a="auto",width:d="auto",constraintRef:p="parent"})=>{var h,g,v,X,Ce,Ft;((g=(h=window?.Env)==null?void 0:h.deploy)!=null&&g.isDevelopment||(X=(v=window?.Env)==null?void 0:v.deploy)!=null&&X.isStaging||(Ft=(Ce=window?.Env)==null?void 0:Ce.app)!=null&&Ft.isCypress)&&(console.error("You imported the wrong component!"),alert("You imported the wrong component!"));const Ie=(0,q.useRef)(null),He=ai(),ds=jf(),yn=(0,q.useRef)(),[fs,yp]=(0,q.useState)(!1),md=Nf(),Dc=(0,q.useRef)(),ui=(0,q.useRef)({height:a,width:d,maxHeight:i,maxWidth:l}),$o=(0,q.useRef)(),xf=(0,q.useCallback)(Me=>{!Ie.current||Me.height===void 0||Me.width===void 0||He.isNative||(Ie.current.style.height=Me.height+"px",Ie.current.style.width=Me.width+"px")},[]),Ef=c(Me=>{var ct;Me.type=="wheel"?vp(Me):(ct=Ie.current)==null||ct.dispatchEvent(new Event(Me.type,Bf(sr({},Me),{bubbles:!0})))},"onDOMEvent"),vp=(0,q.useCallback)(Me=>{if(!(!Ie.current||Me.deltaY===void 0||Me.deltaX===void 0)){if(Me.deltaY){let ct=Ie.current;for(;ct&&!Nd(ct);)ct=ct.parentElement;ct&&(ct.scrollTop+=Me.deltaY)}if(Me.deltaX){let ct=Ie.current;for(;ct&&!Dd(ct);)ct=ct.parentElement;ct&&(ct.scrollLeft+=Me.deltaX)}}},[]),Sf=c(()=>{if(!yn.current||!He)return;const Me=Dc.current?Hf({constraintWidth:Dc.current.constraintWidth,constraintHeight:Dc.current.constraintHeight,height:ui.current.height,width:ui.current.width,maxHeight:ui.current.maxHeight,maxWidth:ui.current.maxWidth}):{height:ui.current.height,width:ui.current.width,maxHeight:ui.current.maxHeight,maxWidth:ui.current.maxWidth};He.updateFakeEmbedComponentRect(yn.current,Me)},"updateDimensions"),Tf=c(()=>{var Me;if(!(He!=null&&He.inSandbox)||!Ie.current||!yn.current)return;const{top:ct,left:Qo}=Ie.current.getBoundingClientRect(),Ko=((Me=ds?.current)==null?void 0:Me.getBoundingClientRect())||{top:0,left:0},zr=ct-Ko.top,Go=Qo-Ko.left;$o.current&&$o?.current.top===zr&&$o?.current.left===Go||($o.current={left:Go,top:zr},He.updateFakeEmbedComponentRect(yn.current,{top:zr,left:Go}))},"handleResizeOrScrollEvent");(0,q.useEffect)(()=>{if(He||console.error("You must wrap your components in a <PluginProvider/> or a renderWidget call."),!He||!Ie.current)return;gd();const Me=ei();return Zf(void 0,null,function*(){var ct;const{top:Qo,left:Ko}=Ie.current.getBoundingClientRect();$o.current={top:Qo,left:Ko};const zr=((ct=ds?.current)==null?void 0:ct.getBoundingClientRect())||{top:0,left:0},Go=Qo-zr.top,yd=Ko-zr.left;He.event.addListener(b.FakeEmbedComponentDimensionChange,Me,xf),He.event.addListener(b.FakeEmbedDOMEvent,Me,Ef),He.isNative&&window.nativePluginDivs.set("virtual-"+Me,Ie.current),yield He.createFakeEmbedComponent({id:Me,type:t,top:Go,left:yd,externalProps:r}),yn.current=Me,yp(!0)}),()=>{yn.current&&(He.unmountFakeEmbedComponent(yn.current),He.isNative&&window.nativePluginDivs.delete("virtual-"+Me),He.event.removeListener(b.FakeEmbedComponentDimensionChange,yn.current,xf),He.event.removeListener(b.FakeEmbedDOMEvent,yn.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(),yn.current&&He.updateFakeEmbedExternalProps(yn.current,r)}return c(Cf,"updateExternalProps"),Rd(Cf,[r]),(0,q.useEffect)(()=>{fs&&(ui.current={maxHeight:i,maxWidth:l,height:a,width:d},Sf())},[i,l,d,a,fs]),(0,q.useEffect)(()=>{var Me;if(He!=null&&He.inSandbox&&yn.current&&fs&&p){const ct=p==="parent"?(Me=Ie.current)==null?void 0:Me.parentElement:p.current;if(!ct)return;const Qo=new ResizeObserver(Ko=>{for(const zr of Ko)if(zr.contentBoxSize){const Go=zr.contentBoxSize[0].inlineSize,yd=zr.contentBoxSize[0].blockSize;Dc.current={constraintHeight:yd,constraintWidth:Go},Sf()}});return Qo.observe(ct),()=>Qo.disconnect()}else return},[p,fs]),Lf(Cc.PluginBodyResizeOrTreeRenders,Tf),(0,q.useLayoutEffect)(()=>{if(!(!fs||!Ie.current||!md))return md.addListener(Ie.current,sd.debounce(Tf,10)),()=>{Ie.current&&md.removeListener(Ie.current)}},[fs]),(0,q.useEffect)(()=>()=>{He&&yn.current&&He.unmountFakeEmbedComponent(yn.current)},[]),(0,Ve.jsx)("div",{ref:Ie,className:"js-fake-embed"})},"FakeEmbedHost"),Fr=c(t=>{const r=t,{width:i,maxHeight:l,constraintRef:a,height:d,maxWidth:p,componentType:h}=r,g=Uf(r,["width","maxHeight","constraintRef","height","maxWidth","componentType"]);return(0,Ve.jsx)($f,{componentType:h,externalProps:g,width:i,height:d,maxHeight:l,maxWidth:p,constraintRef:a})},"FakeEmbedHostConcrete");class Ad extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.RichTextEditor},this.props))}}c(Ad,"RichTextEditor");class jd extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.RichText},this.props))}}c(jd,"RichText");class Ld extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.RemViewer},this.props))}}c(Ld,"RemViewer");class Fd extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.PDFWebReader},this.props))}}c(Fd,"PDFWebReader");class Md extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.DocumentViewer},this.props))}}c(Md,"DocumentViewer");class zd extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.RemRichTextEditor},this.props))}}c(zd,"RemRichTextEditor");class Bd extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.RemHierarchyEditorTree},this.props))}}c(Bd,"RemHierarchyEditorTree");class Ud extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.Queue},this.props))}}c(Ud,"Queue");class Zd extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.LoadingSpinner},this.props))}}c(Zd,"LoadingSpinnerPlugin");class Wd extends q.Component{render(){return(0,Ve.jsx)(Fr,sr({componentType:Jt.PreviewRemCards},this.props))}}c(Wd,"PreviewRemCards");function cd(t){var r,i,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(i=cd(t[r]))&&(l&&(l+=" "),l+=i);else for(r in t)t[r]&&(l&&(l+=" "),l+=r);return l}c(cd,"r");function Vd(){for(var t,r,i=0,l="";i<arguments.length;)(t=arguments[i++])&&(r=cd(t))&&(l&&(l+=" "),l+=r);return l}c(Vd,"clsx");var Qf=Vd,Kf=Fe(318),Hd=Fe.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((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"PluginRenderer_async");const qf=c(({plugin:t,children:r})=>{const i=(0,q.useRef)(null);(0,q.useEffect)(()=>{if(!i.current||!t.inSandbox)return;const h=new ResizeObserver(()=>{i.current&&Tc.emit(Cc.PluginBodyResizeOrTreeRenders)}),g=new MutationObserver(v=>{for(const X of v)(X.type==="attributes"||X.type==="childList")&&Tc.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 l=t.inSandbox?{current:document.getElementsByTagName("html")[0]}:i,a=t.inSandbox?document.getElementsByTagName("html")[0]:t.mountDiv,d=t.inSandbox?Of:Kd,p=(0,Ve.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,Ve.jsx)(Df,{plugin:t,children:(0,Ve.jsx)(Af,{pluginRoot:l,children:(0,Ve.jsx)(d,{root:a,children:p})})})},"PluginWrapper");function Kd(t){return(0,Ve.jsx)(ud.Provider,{value:null,children:t.children})}c(Kd,"NoScrollDetector");class Rc extends Zi{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(Rc,"ReactRNPlugin");const Gd=c(t=>{const r=c(i=>{const l=c((d,p,h)=>Hd().render((0,Ve.jsxs)(q.StrictMode,{children:[(0,Ve.jsx)(qf,{plugin:d,children:(0,Ve.jsx)(t,{})}),(0,Ve.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),l(window.__plugin,window.__plugin.mountDiv,window.__plugin.rootURL)):window.__plugin=new Rc(l,a),window.__plugin):new Rc(l,a)},"makePlugin");try{const i=new URL(IMPORT_META.url).searchParams,l=i.get("widgetName"),a=i.get("pluginId");window.nativePluginRenderers.set(`${a}.${l}`,r)}catch{r(!0)}},"renderWidget");function Yd(t,r){function i(){const l=ai();return(0,q.useEffect)(()=>(l&&t(l),()=>{l&&r(l)}),[l]),null}c(i,"IndexWidget"),Gd(i)}c(Yd,"declareIndexPlugin");function qd(t){return bc(b.MessageBroadcast,void 0,t)}c(qd,"useOnMessageBroadcast");function bc(t,r,i){const l=ai();(0,q.useEffect)(()=>(l.event.addListener(t,r,i),()=>{l.event.removeListener(t,r,i)}),[t,r,i])}c(bc,"useAPIEventListener");var Xf=Object.defineProperty,Xd=Object.getOwnPropertySymbols,Jf=Object.prototype.hasOwnProperty,ep=Object.prototype.propertyIsEnumerable,Jd=c((t,r,i)=>r in t?Xf(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(Xd)for(var i of Xd(r))ep.call(r,i)&&Jd(t,i,r[i]);return t},"rem_hooks_spreadValues"),np=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(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(l=>!i.has(l))}c(dd,"rem_hooks_difference");function ef(t){return t.filter(r=>r)}c(ef,"rem_hooks_compact");function tf(t){const r=ai(),i=ef(t||[]),[l,a]=(0,q.useState)({}),[d,p]=(0,q.useState)(i.map(Ce=>l[Ce])),h=c((Ce,Ft)=>{Ft&&a(Ie=>{const He=tp({},Ie);return He[Ce]=Ft,p(i.map(ds=>He[ds])),He})},"setRem"),g=c(Ce=>np(this,null,function*(){h(Ce,yield r.rem.findOne(Ce))}),"refetchRem"),v=(0,q.useRef)([]),X=(0,q.useRef)(new Map);return(0,q.useEffect)(()=>{const Ce=dd(i,v.current),Ft=dd(v.current,i);for(const Ie of Ce){const He=c(()=>g(Ie),"listener");X.current.set(Ie,He),r.event.addListener(b.RemChanged,Ie,He),g(Ie)}for(const Ie of Ft)r.event.removeListener(b.RemChanged,Ie,X.current.get(Ie));p(i.map(Ie=>l[Ie])),v.current=i},[i.length,...i]),(0,q.useEffect)(()=>()=>{for(const Ce of v.current)r.event.removeListener(b.RemChanged,Ce,X.current.get(Ce))},[]),d}c(tf,"useGetRemsByIdsReactive");var nf=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"storage_hooks_async");function Ic(t,r,i,l,a,d){const[p,h]=(0,q.useState)(d),g=c(()=>nf(this,null,function*(){r&&h((yield l(r))||d)}),"refetchValue");return(0,q.useEffect)(()=>{g()},[r]),bc(i,r,v=>{h(v)}),[p,c(v=>nf(this,null,function*(){yield a(r,v)}),"setValue")]}c(Ic,"useStorageStateInternal");function rf(t,r){const i=ai();return Ic(i,t,b.StorageSessionChange,i.storage.getSession,i.storage.setSession,r)}c(rf,"useSessionStorageState");function of(t,r){const i=ai();return Ic(i,t,b.StorageLocalChange,i.storage.getLocal,i.storage.setLocal,r)}c(of,"useLocalStorageState");function lf(t,r){const i=ai();return Ic(i,t,b.StorageSyncedChange,i.storage.getSynced,i.storage.setSynced,r)}c(lf,"useSyncedStorageState");var sf=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(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,l]=(0,q.useState)(void 0);return(0,q.useEffect)(()=>{sf(this,null,function*(){return l(yield t())})},r),i}c(af,"useRunAsync");function uf(t,r){return sf(this,null,function*(){const i=[],l=yield Promise.all(t.map(a=>r(a)));for(const[a,d]of sd.zip(l,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:b.RemChanged,key:typeof t=="string"?t:typeof t=="object"?t._id:void 0}),"remReactiveDep"),Mr=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:b.SettingChanged,key:t[0]}]}},card:{},storage:{getLocal:{argsDeps:t=>[{event:b.StorageLocalChange,key:t[0]}]},getSession:{argsDeps:t=>[{event:b.StorageSessionChange,key:t[0]}]},getSynced:{argsDeps:t=>[{event:b.StorageSyncedChange,key:t[0]}]}},window:{getCurrentWindowTree:{argsDeps:()=>[Mr(b.CurrentWindowTreeChange)]},getFocusedPaneId:{argsDeps:()=>[Mr(b.FocusedPaneChange)]}},editor:{getFocusedEditorText:{argsDeps:()=>[Mr(b.FocusedRemChange),Mr(b.EditorTextEdited)]},getSelection:{argsDeps:()=>[Mr(b.EditorSelectionChanged)]},getSelectedRem:{argsDeps:()=>[Mr(b.EditorSelectionChanged)]},getSelectedText:{argsDeps:()=>[Mr(b.EditorSelectionChanged)]},getCaretPosition:{argsDeps:()=>[Mr(b.EditorSelectionChanged)]}},focus:{getFocusedRem:{argsDeps:()=>[Mr(b.FocusedRemChange)],resultDeps:t=>[ht(t)]},getFocusedPortal:{argsDeps:()=>[Mr(b.FocusedPortalChange)],resultDeps:t=>[ht(t)]}}};var Oc=c((t,r,i)=>new Promise((l,a)=>{var d=c(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=c(g=>g.done?l(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"useTracker_async");const us=!1;function ff(t){return rp.includes(t)}c(ff,"isNamespacedProp");const ip=c((t,r)=>Array.isArray(t)&&t[0]instanceof an?(us&&console.log("wrapping result array in Rem proxy"),t.map(i=>fd(i,r))):t&&t instanceof an?(us&&console.log("wrapping result in Rem proxy"),fd(t,r)):t,"wrapResult"),pf=c((t,r,i,l)=>new Proxy(t,{apply:(a,d,p)=>Oc(void 0,null,function*(){const h=yield a.apply(d,p);return l(r,d,i,p,h),ip(h,l)})}),"wrapFunctionCall");function fd(t,r){return new Proxy(t,{get(i,l){var a;return typeof i[l]=="function"&&(a=cf)!=null&&a[l]?pf(i[l],void 0,l,r):i[l]}})}c(fd,"interceptReactiveRemCalls");function hf(t,r,i){return new Proxy(r,{get(l,a){var d,p;return typeof a=="string"&&typeof l[a]=="function"&&(p=(d=df)==null?void 0:d[t])!=null&&p[a]?pf(l[a],t,a,i):l[a]}})}c(hf,"interceptReactiveAPICalls");function mf(t,r){return new Proxy(t,{get(i,l){return ff(l)?hf(l,i[l],r):i[l]}})}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,l,a,d,p)=>{var h,g,v,X,Ce,Ft;const Ie=i?(g=(h=df)==null?void 0:h[i])==null?void 0:g[a]:(v=cf)==null?void 0:v[a],He=[...((X=Ie.thisDeps)==null?void 0:X.call(Ie,l))||[],...((Ce=Ie.argsDeps)==null?void 0:Ce.call(Ie,d))||[],...((Ft=Ie.resultDeps)==null?void 0:Ft.call(Ie,p))||[]];r.push({methodName:a,args:d,reactiveDeps:He})}),subscriptions:r}},"wrapApiWithListen"),hd=c((t,r,i,l,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);us&&console.log("useReactiveAPI result",p),l(p)}),"changeHandler")(),gf(t,i,a,d.subscriptions),d.subscriptions}),"createReactiveApi");function gf(t,r,i,l){const a=pd(i||[]),d=pd(l);i?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!d.has(Nc(h))){const{event:g,key:v}=h;us&&console.log("removeListener",g,v),t.event.removeListener(g,v,r)}}),l?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!a.has(Nc(h))){const{event:g,key:v}=h;us&&console.log("addListener",g,v),t.event.addListener(g,v,r)}})}c(gf,"updateListeners");function yf(t,r=[]){const i=ai(),[l,a]=kn().useState(),d=(0,q.useRef)(!1),p=(0,q.useRef)(!1),h=(0,q.useRef)(),g=(0,q.useRef)(t);g.current=t;const v=c(()=>{us&&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,v,a,h.current||[]),d.current=!1,p.current&&(p.current=!1,v())}),"effect")())},"run");return kn().useEffect(v,r),l}c(yf,"useTrackerPlugin");const lp=/^[-_a-zA-Z0-9]+$/,sp=x.nativeEnum(ks),_p=x.nativeEnum(Xn),cs=x.object({level:sp}),ap=x.object({type:x.literal(Xn.KnowledgeBaseInfo)}).merge(cs),up=x.object({type:x.literal(Xn.All)}).merge(cs),cp=x.object({type:x.literal(Xn.DescendantsOfName),remName:x.string()}).merge(cs),dp=x.object({type:x.literal(Xn.DescendantsOfId),remId:x.string()}).merge(cs),fp=x.object({type:x.literal(Xn.Powerup),powerupCode:x.string()}).merge(cs),pp=x.object({type:x.literal(Xn.FocusedSubtree)}).merge(cs),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=>lp.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()})),xp=c(t=>`${t.field}: ${t.message}`,"formatValidationError"),_f=c(t=>{const r=t.errors,i=[];for(const l of r){const{code:a,message:d,path:p}=l,h={field:p.join(".")?p.join("."):"Root Object",message:`${d} (${a})`};"expected"in l&&(h.expected=l.expected),"received"in l&&(h.received=l.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")})(),Ze})()})},575(le){"use strict";/*
26
26
  object-assign
27
27
  (c) Sindre Sorhus
28
28
  @license MIT
29
- */var L=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;function _e(A){if(A==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(A)}function Ne(){try{if(!Object.assign)return!1;var A=new String("abc");if(A[5]="de",Object.getOwnPropertyNames(A)[0]==="5")return!1;for(var Ct={},Me=0;Me<10;Me++)Ct["_"+String.fromCharCode(Me)]=Me;var $e=Object.getOwnPropertyNames(Ct).map(function(B){return Ct[B]});if($e.join("")!=="0123456789")return!1;var P={};return"abcdefghijklmnopqrst".split("").forEach(function(B){P[B]=B}),Object.keys(Object.assign({},P)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}he.exports=Ne()?Object.assign:function(A,Ct){for(var Me,$e=_e(A),P,B=1;B<arguments.length;B++){Me=Object(arguments[B]);for(var c in Me)Ce.call(Me,c)&&($e[c]=Me[c]);if(L){P=L(Me);for(var Ue=0;Ue<P.length;Ue++)He.call(Me,P[Ue])&&($e[P[Ue]]=Me[P[Ue]])}}return $e}},638(he,L,Ce){"use strict";/** @license React v17.0.2
29
+ */var L=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable;function xe(N){if(N==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(N)}function Ae(){try{if(!Object.assign)return!1;var N=new String("abc");if(N[5]="de",Object.getOwnPropertyNames(N)[0]==="5")return!1;for(var xt={},$e=0;$e<10;$e++)xt["_"+String.fromCharCode($e)]=$e;var Be=Object.getOwnPropertyNames(xt).map(function(B){return xt[B]});if(Be.join("")!=="0123456789")return!1;var P={};return"abcdefghijklmnopqrst".split("").forEach(function(B){P[B]=B}),Object.keys(Object.assign({},P)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}le.exports=Ae()?Object.assign:function(N,xt){for(var $e,Be=xe(N),P,B=1;B<arguments.length;B++){$e=Object(arguments[B]);for(var c in $e)Pe.call($e,c)&&(Be[c]=$e[c]);if(L){P=L($e);for(var tt=0;tt<P.length;tt++)ze.call($e,P[tt])&&(Be[P[tt]]=$e[P[tt]])}}return Be}},638(le,L,Pe){"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 He=Ce(999),_e=Ce(575),Ne=Ce(825);function A(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(!He)throw Error(A(227));var Ct=new Set,Me={};function $e(e,n){P(e,n),P(e+"Capture",n)}function P(e,n){for(Me[e]=n,e=0;e<n.length;e++)Ct.add(n[e])}var B=!(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]*$/,Ue=Object.prototype.hasOwnProperty,Ie={},be={};function Le(e){return Ue.call(be,e)?!0:Ue.call(Ie,e)?!1:c.test(e)?be[e]=!0:(Ie[e]=!0,!1)}function _t(e,n,o,s){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ze(e,n,o,s){if(n===null||typeof n>"u"||_t(e,n,o,s))return!0;if(s)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 qe(e,n,o,s,u,f,m){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=u,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=m}var Y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Y[e]=new qe(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Y[n]=new qe(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Y[e]=new qe(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Y[e]=new qe(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){Y[e]=new qe(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Y[e]=new qe(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Y[e]=new qe(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Y[e]=new qe(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Y[e]=new qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var ne=/[\-:]([a-z])/g;function fe(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(ne,fe);Y[n]=new qe(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(ne,fe);Y[n]=new qe(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(ne,fe);Y[n]=new qe(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Y[e]=new qe(e,1,!1,e.toLowerCase(),null,!1,!1)}),Y.xlinkHref=new qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Y[e]=new qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Pe(e,n,o,s){var u=Y.hasOwnProperty(n)?Y[n]:null,f=u!==null?u.type===0:s?!1:!(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N");f||(ze(n,o,u,s)&&(o=null),s||u===null?Le(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,s=u.attributeNamespace,o===null?e.removeAttribute(n):(u=u.type,o=u===3||u===4&&o===!0?"":""+o,s?e.setAttributeNS(s,n,o):e.setAttribute(n,o))))}var De=He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Qe=60103,M=60106,Oe=60107,Ae=60108,te=60114,ie=60109,Q=60110,J=60112,xe=60113,H=60120,se=60115,S=60116,z=60121,O=60128,I=60129,Z=60130,U=60131;if(typeof Symbol=="function"&&Symbol.for){var G=Symbol.for;Qe=G("react.element"),M=G("react.portal"),Oe=G("react.fragment"),Ae=G("react.strict_mode"),te=G("react.profiler"),ie=G("react.provider"),Q=G("react.context"),J=G("react.forward_ref"),xe=G("react.suspense"),H=G("react.suspense_list"),se=G("react.memo"),S=G("react.lazy"),z=G("react.block"),G("react.scope"),O=G("react.opaque.id"),I=G("react.debug_trace_mode"),Z=G("react.offscreen"),U=G("react.legacy_hidden")}var j=typeof Symbol=="function"&&Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=j&&e[j]||e["@@iterator"],typeof e=="function"?e:null)}var D;function Mt(e){if(D===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);D=n&&n[1]||""}return`
37
- `+D+e}var Pt=!1;function Dn(e,n){if(!e||Pt)return"";Pt=!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(w){var s=w}Reflect.construct(e,[],n)}else{try{n.call()}catch(w){s=w}e.call(n.prototype)}else{try{throw Error()}catch(w){s=w}e()}}catch(w){if(w&&s&&typeof w.stack=="string"){for(var u=w.stack.split(`
36
+ */var ze=Pe(999),xe=Pe(575),Ae=Pe(825);function N(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(!ze)throw Error(N(227));var xt=new Set,$e={};function Be(e,n){P(e,n),P(e+"Capture",n)}function P(e,n){for($e[e]=n,e=0;e<n.length;e++)xt.add(n[e])}var B=!(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]*$/,tt=Object.prototype.hasOwnProperty,Oe={},ke={};function se(e){return tt.call(ke,e)?!0:tt.call(Oe,e)?!1:c.test(e)?ke[e]=!0:(Oe[e]=!0,!1)}function nt(e,n,o,s){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Fe(e,n,o,s){if(n===null||typeof n>"u"||nt(e,n,o,s))return!0;if(s)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 Ze(e,n,o,s,u,f,m){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=u,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=m}var K={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){K[e]=new Ze(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];K[n]=new Ze(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){K[e]=new Ze(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){K[e]=new Ze(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){K[e]=new Ze(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){K[e]=new Ze(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){K[e]=new Ze(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){K[e]=new Ze(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){K[e]=new Ze(e,5,!1,e.toLowerCase(),null,!1,!1)});var te=/[\-:]([a-z])/g;function ue(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(te,ue);K[n]=new Ze(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(te,ue);K[n]=new Ze(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(te,ue);K[n]=new Ze(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){K[e]=new Ze(e,1,!1,e.toLowerCase(),null,!1,!1)}),K.xlinkHref=new Ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){K[e]=new Ze(e,1,!1,e.toLowerCase(),null,!0,!0)});function Re(e,n,o,s){var u=K.hasOwnProperty(n)?K[n]:null,f=u!==null?u.type===0:s?!1:!(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N");f||(Fe(n,o,u,s)&&(o=null),s||u===null?se(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,s=u.attributeNamespace,o===null?e.removeAttribute(n):(u=u.type,o=u===3||u===4&&o===!0?"":""+o,s?e.setAttributeNS(s,n,o):e.setAttribute(n,o))))}var De=ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Qe=60103,M=60106,Ne=60107,je=60108,ne=60114,ie=60109,Q=60110,J=60112,Ee=60113,H=60120,ce=60115,S=60116,z=60121,O=60128,b=60129,Z=60130,U=60131;if(typeof Symbol=="function"&&Symbol.for){var Y=Symbol.for;Qe=Y("react.element"),M=Y("react.portal"),Ne=Y("react.fragment"),je=Y("react.strict_mode"),ne=Y("react.profiler"),ie=Y("react.provider"),Q=Y("react.context"),J=Y("react.forward_ref"),Ee=Y("react.suspense"),H=Y("react.suspense_list"),ce=Y("react.memo"),S=Y("react.lazy"),z=Y("react.block"),Y("react.scope"),O=Y("react.opaque.id"),b=Y("react.debug_trace_mode"),Z=Y("react.offscreen"),U=Y("react.legacy_hidden")}var j=typeof Symbol=="function"&&Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=j&&e[j]||e["@@iterator"],typeof e=="function"?e:null)}var A;function Mt(e){if(A===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);A=n&&n[1]||""}return`
37
+ `+A+e}var Pt=!1;function Dn(e,n){if(!e||Pt)return"";Pt=!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(w){var s=w}Reflect.construct(e,[],n)}else{try{n.call()}catch(w){s=w}e.call(n.prototype)}else{try{throw Error()}catch(w){s=w}e()}}catch(w){if(w&&s&&typeof w.stack=="string"){for(var u=w.stack.split(`
38
38
  `),f=s.stack.split(`
39
39
  `),m=u.length-1,y=f.length-1;1<=m&&0<=y&&u[m]!==f[y];)y--;for(;1<=m&&0<=y;m--,y--)if(u[m]!==f[y]){if(m!==1||y!==1)do if(m--,y--,0>y||u[m]!==f[y])return`
40
- `+u[m].replace(" at new "," at ");while(1<=m&&0<=y);break}}}finally{Pt=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?Mt(e):""}function Va(e){switch(e.tag){case 5:return Mt(e.type);case 16:return Mt("Lazy");case 13:return Mt("Suspense");case 19:return Mt("SuspenseList");case 0:case 2:case 15:return e=Dn(e.type,!1),e;case 11:return e=Dn(e.type.render,!1),e;case 22:return e=Dn(e.type._render,!1),e;case 1:return e=Dn(e.type,!0),e;default:return""}}function Br(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 Oe:return"Fragment";case M:return"Portal";case te:return"Profiler";case Ae:return"StrictMode";case xe:return"Suspense";case H:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Q:return(e.displayName||"Context")+".Consumer";case ie:return(e._context.displayName||"Context")+".Provider";case J:var n=e.render;return n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case se:return Br(e.type);case z:return Br(e._render);case S:n=e._payload,e=e._init;try{return Br(e(n))}catch{}}return null}function on(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function no(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ac(e){var n=no(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+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){s=""+m,f.call(this,m)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(m){s=""+m},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function W(e){e._valueTracker||(e._valueTracker=Ac(e))}function xt(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),s="";return e&&(s=no(e)?e.checked?"true":"false":e.value),e=s,e!==o?(n.setValue(e),!0):!1}function pe(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 Yo(e,n){var o=n.checked;return _e({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function bt(e,n){var o=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;o=on(n.value!=null?n.value:o),e._wrapperState={initialChecked:s,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function qo(e,n){n=n.checked,n!=null&&Pe(e,"checked",n,!1)}function ro(e,n){qo(e,n);var o=on(n.value),s=n.type;if(o!=null)s==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?di(e,n.type,o):n.hasOwnProperty("defaultValue")&&di(e,n.type,on(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function ci(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="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 di(e,n,o){(n!=="number"||pe(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}function oe(e){var n="";return He.Children.forEach(e,function(o){o!=null&&(n+=o)}),n}function $t(e,n){return e=_e({children:void 0},n),(n=oe(n.children))&&(e.children=n),e}function Ur(e,n,o,s){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&&s&&(e[o].defaultSelected=!0)}else{for(o=""+on(o),n=null,u=0;u<e.length;u++){if(e[u].value===o){e[u].selected=!0,s&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function me(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(A(91));return _e({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ee(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(A(92));if(Array.isArray(o)){if(!(1>=o.length))throw Error(A(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:on(o)}}function Ha(e,n){var o=on(n.value),s=on(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),s!=null&&(e.defaultValue=""+s)}function $a(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}var ps={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Qa(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 hs(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Qa(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xo,Ka=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,s,u){MSApp.execUnsafeLocalFunction(function(){return e(n,o,s,u)})}:e})(function(e,n){if(e.namespaceURI!==ps.svg||"innerHTML"in e)e.innerHTML=n;else{for(Xo=Xo||document.createElement("div"),Xo.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function io(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var oo={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},Ga=["Webkit","ms","Moz","O"];Object.keys(oo).forEach(function(e){Ga.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),oo[n]=oo[e]})});function Qt(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||oo.hasOwnProperty(e)&&oo[e]?(""+n).trim():n+"px"}function ms(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var s=o.indexOf("--")===0,u=Qt(o,n[o],s);o==="float"&&(o="cssFloat"),s?e.setProperty(o,u):e[o]=u}}var $n=_e({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 vn(e,n){if(n){if($n[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(A(60));if(!(typeof n.dangerouslySetInnerHTML=="object"&&"__html"in n.dangerouslySetInnerHTML))throw Error(A(61))}if(n.style!=null&&typeof n.style!="object")throw Error(A(62))}}function ar(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 An(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zr=null,wn=null,_n=null;function ur(e){if(e=_o(e)){if(typeof Zr!="function")throw Error(A(280));var n=e.stateNode;n&&(n=Di(n),Zr(e.stateNode,e.type,n))}}function Qn(e){wn?_n?_n.push(e):_n=[e]:wn=e}function xn(){if(wn){var e=wn,n=_n;if(_n=wn=null,ur(e),n)for(e=0;e<n.length;e++)ur(n[e])}}function Wr(e,n){return e(n)}function Kt(e,n,o,s,u){return e(n,o,s,u)}function Kn(){}var et=Wr,ln=!1,fi=!1;function Vr(){(wn!==null||_n!==null)&&(Kn(),xn())}function Jo(e,n,o){if(fi)return e(n,o);fi=!0;try{return et(e,n,o)}finally{fi=!1,Vr()}}function jn(e,n){var o=e.stateNode;if(o===null)return null;var s=Di(o);if(s===null)return null;o=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(A(231,n,typeof o));return o}var Gt=!1;if(B)try{var Ln={};Object.defineProperty(Ln,"passive",{get:function(){Gt=!0}}),window.addEventListener("test",Ln,Ln),window.removeEventListener("test",Ln,Ln)}catch{Gt=!1}function lo(e,n,o,s,u,f,m,y,w){var C=Array.prototype.slice.call(arguments,3);try{n.apply(o,C)}catch(V){this.onError(V)}}var sn=!1,Fn=null,Gn=!1,cr=null,gs={onError:function(e){sn=!0,Fn=e}};function Yn(e,n,o,s,u,f,m,y,w){sn=!1,Fn=null,lo.apply(gs,arguments)}function pi(e,n,o,s,u,f,m,y,w){if(Yn.apply(this,arguments),sn){if(sn){var C=Fn;sn=!1,Fn=null}else throw Error(A(198));Gn||(Gn=!0,cr=C)}}function Yt(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 qt(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 En(e){if(Yt(e)!==e)throw Error(A(188))}function dr(e){var n=e.alternate;if(!n){if(n=Yt(e),n===null)throw Error(A(188));return n!==e?null:e}for(var o=e,s=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(s=u.return,s!==null){o=s;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return En(u),e;if(f===s)return En(u),n;f=f.sibling}throw Error(A(188))}if(o.return!==s.return)o=u,s=f;else{for(var m=!1,y=u.child;y;){if(y===o){m=!0,o=u,s=f;break}if(y===s){m=!0,s=u,o=f;break}y=y.sibling}if(!m){for(y=f.child;y;){if(y===o){m=!0,o=f,s=u;break}if(y===s){m=!0,s=f,o=u;break}y=y.sibling}if(!m)throw Error(A(189))}}if(o.alternate!==s)throw Error(A(190))}if(o.tag!==3)throw Error(A(188));return o.stateNode.current===o?e:n}function Hr(e){if(e=dr(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 hi(e,n){for(var o=e.alternate;n!==null;){if(n===e||n===o)return!0;n=n.return}return!1}var mi,ys,el,$r,Qr=!1,Sn=[],fr=null,re=null,pr=null,gi=new Map,yi=new Map,so=[],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 tl(e,n,o,s,u){return{blockedOn:e,domEventName:n,eventSystemFlags:o|16,nativeEvent:u,targetContainers:[s]}}function qa(e,n){switch(e){case"focusin":case"focusout":fr=null;break;case"dragenter":case"dragleave":re=null;break;case"mouseover":case"mouseout":pr=null;break;case"pointerover":case"pointerout":gi.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":yi.delete(n.pointerId)}}function ao(e,n,o,s,u,f){return e===null||e.nativeEvent!==f?(e=tl(n,o,s,u,f),n!==null&&(n=_o(n),n!==null&&ys(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function jc(e,n,o,s,u){switch(n){case"focusin":return fr=ao(fr,e,n,o,s,u),!0;case"dragenter":return re=ao(re,e,n,o,s,u),!0;case"mouseover":return pr=ao(pr,e,n,o,s,u),!0;case"pointerover":var f=u.pointerId;return gi.set(f,ao(gi.get(f)||null,e,n,o,s,u)),!0;case"gotpointercapture":return f=u.pointerId,yi.set(f,ao(yi.get(f)||null,e,n,o,s,u)),!0}return!1}function Lc(e){var n=yr(e.target);if(n!==null){var o=Yt(n);if(o!==null){if(n=o.tag,n===13){if(n=qt(o),n!==null){e.blockedOn=n,$r(e.lanePriority,function(){Ne.unstable_runWithPriority(e.priority,function(){el(o)})});return}}else if(n===3&&o.stateNode.hydrate){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function nl(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=k(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null)return n=_o(o),n!==null&&ys(n),e.blockedOn=o,!1;n.shift()}return!0}function Xa(e,n,o){nl(e)&&o.delete(n)}function Fc(){for(Qr=!1;0<Sn.length;){var e=Sn[0];if(e.blockedOn!==null){e=_o(e.blockedOn),e!==null&&mi(e);break}for(var n=e.targetContainers;0<n.length;){var o=k(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null){e.blockedOn=o;break}n.shift()}e.blockedOn===null&&Sn.shift()}fr!==null&&nl(fr)&&(fr=null),re!==null&&nl(re)&&(re=null),pr!==null&&nl(pr)&&(pr=null),gi.forEach(Xa),yi.forEach(Xa)}function uo(e,n){e.blockedOn===n&&(e.blockedOn=null,Qr||(Qr=!0,Ne.unstable_scheduleCallback(Ne.unstable_NormalPriority,Fc)))}function Ja(e){function n(u){return uo(u,e)}if(0<Sn.length){uo(Sn[0],e);for(var o=1;o<Sn.length;o++){var s=Sn[o];s.blockedOn===e&&(s.blockedOn=null)}}for(fr!==null&&uo(fr,e),re!==null&&uo(re,e),pr!==null&&uo(pr,e),gi.forEach(n),yi.forEach(n),o=0;o<so.length;o++)s=so[o],s.blockedOn===e&&(s.blockedOn=null);for(;0<so.length&&(o=so[0],o.blockedOn===null);)Lc(o),o.blockedOn===null&&so.shift()}function rl(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var vi={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionend:rl("Transition","TransitionEnd")},vs={},eu={};B&&(eu=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function il(e){if(vs[e])return vs[e];if(!vi[e])return e;var n=vi[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in eu)return vs[e]=n[o];return e}var tu=il("animationend"),nu=il("animationiteration"),ru=il("animationstart"),iu=il("transitionend"),ou=new Map,ws=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 _s(e,n){for(var o=0;o<e.length;o+=2){var s=e[o],u=e[o+1];u="on"+(u[0].toUpperCase()+u.slice(1)),ws.set(s,n),ou.set(s,u),$e(u,[s])}}var zc=Ne.unstable_now;zc();var Xe=8;function Kr(e){if((1&e)!==0)return Xe=15,1;if((2&e)!==0)return Xe=14,2;if((4&e)!==0)return Xe=13,4;var n=24&e;return n!==0?(Xe=12,n):(e&32)!==0?(Xe=11,32):(n=192&e,n!==0?(Xe=10,n):(e&256)!==0?(Xe=9,256):(n=3584&e,n!==0?(Xe=8,n):(e&4096)!==0?(Xe=7,4096):(n=4186112&e,n!==0?(Xe=6,n):(n=62914560&e,n!==0?(Xe=5,n):e&67108864?(Xe=4,67108864):(e&134217728)!==0?(Xe=3,134217728):(n=805306368&e,n!==0?(Xe=2,n):(1073741824&e)!==0?(Xe=1,1073741824):(Xe=8,e))))))}function Bc(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(A(358,e))}}function co(e,n){var o=e.pendingLanes;if(o===0)return Xe=0;var s=0,u=0,f=e.expiredLanes,m=e.suspendedLanes,y=e.pingedLanes;if(f!==0)s=f,u=Xe=15;else if(f=o&134217727,f!==0){var w=f&~m;w!==0?(s=Kr(w),u=Xe):(y&=f,y!==0&&(s=Kr(y),u=Xe))}else f=o&~m,f!==0?(s=Kr(f),u=Xe):y!==0&&(s=Kr(y),u=Xe);if(s===0)return 0;if(s=31-qn(s),s=o&((0>s?0:1<<s)<<1)-1,n!==0&&n!==s&&(n&m)===0){if(Kr(n),u<=Xe)return n;Xe=u}if(n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0<n;)o=31-qn(n),u=1<<o,s|=e[o],n&=~u;return s}function lu(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=hr(24&~n),e===0?x(10,n):e;case 10:return e=hr(192&~n),e===0?x(8,n):e;case 8:return e=hr(3584&~n),e===0&&(e=hr(4186112&~n),e===0&&(e=512)),e;case 2:return n=hr(805306368&~n),n===0&&(n=268435456),n}throw Error(A(358,e))}function hr(e){return e&-e}function xs(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function ol(e,n,o){e.pendingLanes|=n;var s=n-1;e.suspendedLanes&=s,e.pingedLanes&=s,e=e.eventTimes,n=31-qn(n),e[n]=o}var qn=Math.clz32?Math.clz32:su,dt=Math.log,ht=Math.LN2;function su(e){return e===0?32:31-(dt(e)/ht|0)|0}var Zc=Ne.unstable_UserBlockingPriority,au=Ne.unstable_runWithPriority,ll=!0;function Wc(e,n,o,s){ln||Kn();var u=Ss,f=ln;ln=!0;try{Kt(u,e,n,o,s)}finally{(ln=f)||Vr()}}function Es(e,n,o,s){au(Zc,Ss.bind(null,e,n,o,s))}function Ss(e,n,o,s){if(ll){var u;if((u=(n&4)===0)&&0<Sn.length&&-1<Ya.indexOf(e))e=tl(null,e,n,o,s),Sn.push(e);else{var f=k(e,n,o,s);if(f===null)u&&qa(e,s);else{if(u){if(-1<Ya.indexOf(e)){e=tl(f,e,n,o,s),Sn.push(e);return}if(jc(f,e,n,o,s))return;qa(e,s)}Qs(e,n,s,null,o)}}}}function k(e,n,o,s){var u=An(s);if(u=yr(u),u!==null){var f=Yt(u);if(f===null)u=null;else{var m=f.tag;if(m===13){if(u=qt(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 Qs(e,n,s,u,o),null}var R=null,an=null,wi=null;function mt(){if(wi)return wi;var e,n=an,o=n.length,s,u="value"in R?R.value:R.textContent,f=u.length;for(e=0;e<o&&n[e]===u[e];e++);var m=o-e;for(s=1;s<=m&&n[o-s]===u[f-s];s++);return wi=u.slice(e,1<s?1-s:void 0)}function _i(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 sl(){return!0}function Ts(){return!1}function Xt(e){function n(o,s,u,f,m){this._reactName=o,this._targetInst=u,this.type=s,this.nativeEvent=f,this.target=m,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(o=e[y],this[y]=o?o(f):f[y]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?sl:Ts,this.isPropagationStopped=Ts,this}return _e(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=sl)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=sl)},persist:function(){},isPersistent:sl}),n}var xi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fo=Xt(xi),Ei=_e({},xi,{view:0,detail:0}),kt=Xt(Ei),Tn,po,Gr,Mn=_e({},Ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jn,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!==Gr&&(Gr&&e.type==="mousemove"?(Tn=e.screenX-Gr.screenX,po=e.screenY-Gr.screenY):po=Tn=0,Gr=e),Tn)},movementY:function(e){return"movementY"in e?e.movementY:po}}),uu=Xt(Mn),Vc=_e({},Mn,{dataTransfer:0}),Hc=Xt(Vc),cu=_e({},Ei,{relatedTarget:0}),Cs=Xt(cu),$c=_e({},xi,{animationName:0,elapsedTime:0,pseudoElement:0}),du=Xt($c),Qc=_e({},xi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kc=Xt(Qc),al=_e({},xi,{data:0}),Ps=Xt(al),ul={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ks={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"},Xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fu(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Xn[e])?!!n[e]:!1}function Jn(){return fu}var Si=_e({},Ei,{key:function(e){if(e.key){var n=ul[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=_i(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ks[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jn,charCode:function(e){return e.type==="keypress"?_i(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_i(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pu=Xt(Si),Rs=_e({},Mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Is=Xt(Rs),hu=_e({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jn}),mu=Xt(hu),gu=_e({},xi,{propertyName:0,elapsedTime:0,pseudoElement:0}),yu=Xt(gu),Gc=_e({},Mn,{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}),bs=Xt(Gc),vu=[9,13,27,32],Os=B&&"CompositionEvent"in window,ho=null;B&&"documentMode"in document&&(ho=document.documentMode);var wu=B&&"TextEvent"in window&&!ho,Jt=B&&(!Os||ho&&8<ho&&11>=ho),_u=" ",zn=!1;function Cn(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 xu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ti=!1;function Eu(e,n){switch(e){case"compositionend":return xu(n);case"keypress":return n.which!==32?null:(zn=!0,_u);case"textInput":return e=n.data,e===_u&&zn?null:e;default:return null}}function Su(e,n){if(Ti)return e==="compositionend"||!Os&&Cn(e,n)?(e=mt(),wi=an=R=null,Ti=!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 Jt&&n.locale!=="ko"?null:n.data;default:return null}}var Tu={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 Ns(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Tu[e.type]:n==="textarea"}function Cu(e,n,o,s){Qn(s),n=ml(n,"onChange"),0<n.length&&(o=new fo("onChange","change",null,o,s),e.push({event:o,listeners:n}))}var Yr=null,Ci=null;function Ds(e){Hs(e,0)}function Pi(e){var n=Ni(e);if(xt(n))return e}function Et(e,n){if(e==="change")return n}var nt=!1;if(B){var cl;if(B){var dl="oninput"in document;if(!dl){var As=document.createElement("div");As.setAttribute("oninput","return;"),dl=typeof As.oninput=="function"}cl=dl}else cl=!1;nt=cl&&(!document.documentMode||9<document.documentMode)}function js(){Yr&&(Yr.detachEvent("onpropertychange",Ls),Ci=Yr=null)}function Ls(e){if(e.propertyName==="value"&&Pi(Ci)){var n=[];if(Cu(n,Ci,e,An(e)),e=Ds,ln)e(n);else{ln=!0;try{Wr(e,n)}finally{ln=!1,Vr()}}}}function Pu(e,n,o){e==="focusin"?(js(),Yr=n,Ci=o,Yr.attachEvent("onpropertychange",Ls)):e==="focusout"&&js()}function ku(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pi(Ci)}function Fs(e,n){if(e==="click")return Pi(n)}function Ms(e,n){if(e==="input"||e==="change")return Pi(n)}function Yc(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var zt=typeof Object.is=="function"?Object.is:Yc,mo=Object.prototype.hasOwnProperty;function mr(e,n){if(zt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),s=Object.keys(n);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++)if(!mo.call(n,o[s])||!zt(e[o[s]],n[o[s]]))return!1;return!0}function Ru(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fl(e,n){var o=Ru(e);e=0;for(var s;o;){if(o.nodeType===3){if(s=e+o.textContent.length,e<=n&&s>=n)return{node:o,offset:n-e};e=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Ru(o)}}function go(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?go(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Iu(){for(var e=window,n=pe();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=pe(e.document)}return n}function yo(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 zs=B&&"documentMode"in document&&11>=document.documentMode,ki=null,Bs=null,vo=null,Us=!1;function bu(e,n,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Us||ki==null||ki!==pe(s)||(s=ki,"selectionStart"in s&&yo(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),vo&&mr(vo,s)||(vo=s,s=ml(Bs,"onSelect"),0<s.length&&(n=new fo("onSelect","select",null,n,o),e.push({event:n,listeners:s}),n.target=ki)))}_s("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),_s("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),_s(Mc,2);for(var Zs="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),pl=0;pl<Zs.length;pl++)ws.set(Zs[pl],0);P("onMouseEnter",["mouseout","mouseover"]),P("onMouseLeave",["mouseout","mouseover"]),P("onPointerEnter",["pointerout","pointerover"]),P("onPointerLeave",["pointerout","pointerover"]),$e("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$e("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$e("onBeforeInput",["compositionend","keypress","textInput","paste"]),$e("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ws=new Set("cancel close invalid load scroll toggle".split(" ").concat(qr));function Vs(e,n,o){var s=e.type||"unknown-event";e.currentTarget=o,pi(s,n,void 0,e),e.currentTarget=null}function Hs(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var s=e[o],u=s.event;s=s.listeners;e:{var f=void 0;if(n)for(var m=s.length-1;0<=m;m--){var y=s[m],w=y.instance,C=y.currentTarget;if(y=y.listener,w!==f&&u.isPropagationStopped())break e;Vs(u,y,C),f=w}else for(m=0;m<s.length;m++){if(y=s[m],w=y.instance,C=y.currentTarget,y=y.listener,w!==f&&u.isPropagationStopped())break e;Vs(u,y,C),f=w}}}if(Gn)throw e=cr,Gn=!1,cr=null,e}function Je(e,n){var o=ju(n),s=e+"__bubble";o.has(s)||(Ou(n,e,2,!1),o.add(s))}var $s="_reactListening"+Math.random().toString(36).slice(2);function Ri(e){e[$s]||(e[$s]=!0,Ct.forEach(function(n){Ws.has(n)||hl(n,!1,e,null),hl(n,!0,e,null)}))}function hl(e,n,o,s){var u=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,f=o;if(e==="selectionchange"&&o.nodeType!==9&&(f=o.ownerDocument),s!==null&&!n&&Ws.has(e)){if(e!=="scroll")return;u|=2,f=s}var m=ju(f),y=e+"__"+(n?"capture":"bubble");m.has(y)||(n&&(u|=4),Ou(f,e,u,n),m.add(y))}function Ou(e,n,o,s){var u=ws.get(n);switch(u===void 0?2:u){case 0:u=Wc;break;case 1:u=Es;break;default:u=Ss}o=u.bind(null,n,o,e),u=void 0,!Gt||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),s?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 Qs(e,n,o,s,u){var f=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var m=s.tag;if(m===3||m===4){var y=s.stateNode.containerInfo;if(y===u||y.nodeType===8&&y.parentNode===u)break;if(m===4)for(m=s.return;m!==null;){var w=m.tag;if((w===3||w===4)&&(w=m.stateNode.containerInfo,w===u||w.nodeType===8&&w.parentNode===u))return;m=m.return}for(;y!==null;){if(m=yr(y),m===null)return;if(w=m.tag,w===5||w===6){s=f=m;continue e}y=y.parentNode}}s=s.return}Jo(function(){var C=f,V=An(o),ye=[];e:{var F=ou.get(e);if(F!==void 0){var ee=fo,de=e;switch(e){case"keypress":if(_i(o)===0)break e;case"keydown":case"keyup":ee=pu;break;case"focusin":de="focus",ee=Cs;break;case"focusout":de="blur",ee=Cs;break;case"beforeblur":case"afterblur":ee=Cs;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":ee=uu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Hc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=mu;break;case tu:case nu:case ru:ee=du;break;case iu:ee=yu;break;case"scroll":ee=kt;break;case"wheel":ee=bs;break;case"copy":case"cut":case"paste":ee=Kc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Is}var le=(n&4)!==0,T=!le&&e==="scroll",_=le?F!==null?F+"Capture":null:F;le=[];for(var E=C,b;E!==null;){b=E;var N=b.stateNode;if(b.tag===5&&N!==null&&(b=N,_!==null&&(N=jn(E,_),N!=null&&le.push(Ii(E,N,b)))),T)break;E=E.return}0<le.length&&(F=new ee(F,de,null,o,V),ye.push({event:F,listeners:le}))}}if((n&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",F&&(n&16)===0&&(de=o.relatedTarget||o.fromElement)&&(yr(de)||de[gr]))break e;if((ee||F)&&(F=V.window===V?V:(F=V.ownerDocument)?F.defaultView||F.parentWindow:window,ee?(de=o.relatedTarget||o.toElement,ee=C,de=de?yr(de):null,de!==null&&(T=Yt(de),de!==T||de.tag!==5&&de.tag!==6)&&(de=null)):(ee=null,de=C),ee!==de)){if(le=uu,N="onMouseLeave",_="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(le=Is,N="onPointerLeave",_="onPointerEnter",E="pointer"),T=ee==null?F:Ni(ee),b=de==null?F:Ni(de),F=new le(N,E+"leave",ee,o,V),F.target=T,F.relatedTarget=b,N=null,yr(V)===C&&(le=new le(_,E+"enter",de,o,V),le.target=b,le.relatedTarget=T,N=le),T=N,ee&&de)t:{for(le=ee,_=de,E=0,b=le;b;b=bi(b))E++;for(b=0,N=_;N;N=bi(N))b++;for(;0<E-b;)le=bi(le),E--;for(;0<b-E;)_=bi(_),b--;for(;E--;){if(le===_||_!==null&&le===_.alternate)break t;le=bi(le),_=bi(_)}le=null}else le=null;ee!==null&&Ks(ye,F,ee,le,!1),de!==null&&T!==null&&Ks(ye,T,de,le,!0)}}e:{if(F=C?Ni(C):window,ee=F.nodeName&&F.nodeName.toLowerCase(),ee==="select"||ee==="input"&&F.type==="file")var ve=Et;else if(Ns(F))if(nt)ve=Ms;else{ve=ku;var K=Pu}else(ee=F.nodeName)&&ee.toLowerCase()==="input"&&(F.type==="checkbox"||F.type==="radio")&&(ve=Fs);if(ve&&(ve=ve(e,C))){Cu(ye,ve,o,V);break e}K&&K(e,F,C),e==="focusout"&&(K=F._wrapperState)&&K.controlled&&F.type==="number"&&di(F,"number",F.value)}switch(K=C?Ni(C):window,e){case"focusin":(Ns(K)||K.contentEditable==="true")&&(ki=K,Bs=C,vo=null);break;case"focusout":vo=Bs=ki=null;break;case"mousedown":Us=!0;break;case"contextmenu":case"mouseup":case"dragend":Us=!1,bu(ye,o,V);break;case"selectionchange":if(zs)break;case"keydown":case"keyup":bu(ye,o,V)}var we;if(Os)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Ti?Cn(e,o)&&(ke="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(ke="onCompositionStart");ke&&(Jt&&o.locale!=="ko"&&(Ti||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Ti&&(we=mt()):(R=V,an="value"in R?R.value:R.textContent,Ti=!0)),K=ml(C,ke),0<K.length&&(ke=new Ps(ke,e,null,o,V),ye.push({event:ke,listeners:K}),we?ke.data=we:(we=xu(o),we!==null&&(ke.data=we)))),(we=wu?Eu(e,o):Su(e,o))&&(C=ml(C,"onBeforeInput"),0<C.length&&(V=new Ps("onBeforeInput","beforeinput",null,o,V),ye.push({event:V,listeners:C}),V.data=we))}Hs(ye,n)})}function Ii(e,n,o){return{instance:e,listener:n,currentTarget:o}}function ml(e,n){for(var o=n+"Capture",s=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=jn(e,o),f!=null&&s.unshift(Ii(e,f,u)),f=jn(e,n),f!=null&&s.push(Ii(e,f,u))),e=e.return}return s}function bi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ks(e,n,o,s,u){for(var f=n._reactName,m=[];o!==null&&o!==s;){var y=o,w=y.alternate,C=y.stateNode;if(w!==null&&w===s)break;y.tag===5&&C!==null&&(y=C,u?(w=jn(o,f),w!=null&&m.unshift(Ii(o,w,y))):u||(w=jn(o,f),w!=null&&m.push(Ii(o,w,y)))),o=o.return}m.length!==0&&e.push({event:n,listeners:m})}function gl(){}var yl=null,Gs=null;function Nu(e,n){switch(e){case"button":case"input":case"select":case"textarea":return!!n.autoFocus}return!1}function Ys(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,gt=typeof clearTimeout=="function"?clearTimeout:void 0;function yt(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Oi(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break}return e}function vl(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 qs=0;function qc(e){return{$$typeof:O,toString:e,valueOf:e}}var wo=Math.random().toString(36).slice(2),er="__reactFiber$"+wo,wl="__reactProps$"+wo,gr="__reactContainer$"+wo,Au="__reactEvents$"+wo;function yr(e){var n=e[er];if(n)return n;for(var o=e.parentNode;o;){if(n=o[gr]||o[er]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=vl(e);e!==null;){if(o=e[er])return o;e=vl(e)}return n}e=o,o=e.parentNode}return null}function _o(e){return e=e[er]||e[gr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ni(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Di(e){return e[wl]||null}function ju(e){var n=e[Au];return n===void 0&&(n=e[Au]=new Set),n}var lt=[],tt=-1;function vr(e){return{current:e}}function Ke(e){0>tt||(e.current=lt[tt],lt[tt]=null,tt--)}function st(e,n){tt++,lt[tt]=e.current,e.current=n}var wr={},St=vr(wr),Bt=vr(!1),tr=wr;function Ai(e,n){var o=e.type.contextTypes;if(!o)return wr;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in o)u[f]=n[f];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function Ut(e){return e=e.childContextTypes,e!=null}function xo(){Ke(Bt),Ke(St)}function Xs(e,n,o){if(St.current!==wr)throw Error(A(168));st(St,n),st(Bt,o)}function Lu(e,n,o){var s=e.stateNode;if(e=n.childContextTypes,typeof s.getChildContext!="function")return o;s=s.getChildContext();for(var u in s)if(!(u in e))throw Error(A(108,Br(n)||"Unknown",u));return _e({},o,s)}function ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wr,tr=St.current,st(St,e),st(Bt,Bt.current),!0}function Fu(e,n,o){var s=e.stateNode;if(!s)throw Error(A(169));o?(e=Lu(e,n,tr),s.__reactInternalMemoizedMergedChildContext=e,Ke(Bt),Ke(St),st(St,e)):Ke(Bt),st(Bt,o)}var Js=null,Bn=null,Mu=Ne.unstable_runWithPriority,ea=Ne.unstable_scheduleCallback,Eo=Ne.unstable_cancelCallback,Xc=Ne.unstable_shouldYield,zu=Ne.unstable_requestPaint,ta=Ne.unstable_now,Jc=Ne.unstable_getCurrentPriorityLevel,_l=Ne.unstable_ImmediatePriority,xl=Ne.unstable_UserBlockingPriority,Bu=Ne.unstable_NormalPriority,Uu=Ne.unstable_LowPriority,na=Ne.unstable_IdlePriority,El={},ed=zu!==void 0?zu:function(){},Pn=null,So=null,ra=!1,Zu=ta(),Ge=1e4>Zu?ta:function(){return ta()-Zu};function Rt(){switch(Jc()){case _l:return 99;case xl:return 98;case Bu:return 97;case Uu:return 96;case na:return 95;default:throw Error(A(332))}}function Wu(e){switch(e){case 99:return _l;case 98:return xl;case 97:return Bu;case 96:return Uu;case 95:return na;default:throw Error(A(332))}}function nr(e,n){return e=Wu(e),Mu(e,n)}function To(e,n,o){return e=Wu(e),ea(e,n,o)}function Un(){if(So!==null){var e=So;So=null,Eo(e)}Vu()}function Vu(){if(!ra&&Pn!==null){ra=!0;var e=0;try{var n=Pn;nr(99,function(){for(;e<n.length;e++){var o=n[e];do o=o(!0);while(o!==null)}}),Pn=null}catch(o){throw Pn!==null&&(Pn=Pn.slice(e+1)),ea(_l,Un),o}finally{ra=!1}}}var Hu=De.ReactCurrentBatchConfig;function en(e,n){if(e&&e.defaultProps){n=_e({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}var Sl=vr(null),Tl=null,Li=null,Co=null;function ia(){Co=Li=Tl=null}function oa(e){var n=Sl.current;Ke(Sl),e.type._context._currentValue=n}function Cl(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 Fi(e,n){Tl=e,Co=Li=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(Ye=!0),e.firstContext=null)}function un(e,n){if(Co!==e&&n!==!1&&n!==0)if((typeof n!="number"||n===1073741823)&&(Co=e,n=1073741823),n={context:e,observedBits:n,next:null},Li===null){if(Tl===null)throw Error(A(308));Li=n,Tl.dependencies={lanes:0,firstContext:n,responders:null}}else Li=Li.next=n;return e._currentValue}var ge=!1;function Be(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 Ot(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Zn(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,s=e.alternate;if(s!==null&&(s=s.updateQueue,o===s)){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:s.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:s.shared,effects:s.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function Xr(e,n,o,s){var u=e.updateQueue;ge=!1;var f=u.firstBaseUpdate,m=u.lastBaseUpdate,y=u.shared.pending;if(y!==null){u.shared.pending=null;var w=y,C=w.next;w.next=null,m===null?f=C:m.next=C,m=w;var V=e.alternate;if(V!==null){V=V.updateQueue;var ye=V.lastBaseUpdate;ye!==m&&(ye===null?V.firstBaseUpdate=C:ye.next=C,V.lastBaseUpdate=w)}}if(f!==null){ye=u.baseState,m=0,V=C=w=null;do{y=f.lane;var F=f.eventTime;if((s&y)===y){V!==null&&(V=V.next={eventTime:F,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});e:{var ee=e,de=f;switch(y=n,F=o,de.tag){case 1:if(ee=de.payload,typeof ee=="function"){ye=ee.call(F,ye,y);break e}ye=ee;break e;case 3:ee.flags=ee.flags&-4097|64;case 0:if(ee=de.payload,y=typeof ee=="function"?ee.call(F,ye,y):ee,y==null)break e;ye=_e({},ye,y);break e;case 2:ge=!0}}f.callback!==null&&(e.flags|=32,y=u.effects,y===null?u.effects=[f]:y.push(f))}else F={eventTime:F,lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},V===null?(C=V=F,w=ye):V=V.next=F,m|=y;if(f=f.next,f===null){if(y=u.shared.pending,y===null)break;f=y.next,y.next=null,u.lastBaseUpdate=y,u.shared.pending=null}}while(!0);V===null&&(w=ye),u.baseState=w,u.firstBaseUpdate=C,u.lastBaseUpdate=V,Pr|=m,e.lanes=m,e.memoizedState=ye}}function Ku(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var s=e[n],u=s.callback;if(u!==null){if(s.callback=null,s=o,typeof u!="function")throw Error(A(191,u));u.call(s)}}}var Gu=new He.Component().refs;function Pl(e,n,o,s){n=e.memoizedState,o=o(s,n),o=o==null?n:_e({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var kl={isMounted:function(e){return(e=e._reactInternals)?Yt(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var s=Vt(),u=or(e),f=Ot(s,u);f.payload=n,o!=null&&(f.callback=o),Zn(e,f),bn(e,u,s)},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var s=Vt(),u=or(e),f=Ot(s,u);f.tag=1,f.payload=n,o!=null&&(f.callback=o),Zn(e,f),bn(e,u,s)},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=Vt(),s=or(e),u=Ot(o,s);u.tag=2,n!=null&&(u.callback=n),Zn(e,u),bn(e,s,o)}};function Yu(e,n,o,s,u,f,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,m):n.prototype&&n.prototype.isPureReactComponent?!mr(o,s)||!mr(u,f):!0}function Rl(e,n,o){var s=!1,u=wr,f=n.contextType;return typeof f=="object"&&f!==null?f=un(f):(u=Ut(n)?tr:St.current,s=n.contextTypes,f=(s=s!=null)?Ai(e,u):wr),n=new n(o,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=kl,e.stateNode=n,n._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function qu(e,n,o,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,s),n.state!==e&&kl.enqueueReplaceState(n,n.state,null)}function Il(e,n,o,s){var u=e.stateNode;u.props=o,u.state=e.memoizedState,u.refs=Gu,Be(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=un(f):(f=Ut(n)?tr:St.current,u.context=Ai(e,f)),Xr(e,o,u,s),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(Pl(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&&kl.enqueueReplaceState(u,u.state,null),Xr(e,o,u,s),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4)}var bl=Array.isArray;function Po(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(A(309));var s=o.stateNode}if(!s)throw Error(A(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=s.refs;m===Gu&&(m=s.refs={}),f===null?delete m[u]:m[u]=f},n._stringRef=u,n)}if(typeof e!="string")throw Error(A(284));if(!o._owner)throw Error(A(290,e))}return e}function Mi(e,n){if(e.type!=="textarea")throw Error(A(31,Object.prototype.toString.call(n)==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":n))}function ko(e){function n(T,_){if(e){var E=T.lastEffect;E!==null?(E.nextEffect=_,T.lastEffect=_):T.firstEffect=T.lastEffect=_,_.nextEffect=null,_.flags=8}}function o(T,_){if(!e)return null;for(;_!==null;)n(T,_),_=_.sibling;return null}function s(T,_){for(T=new Map;_!==null;)_.key!==null?T.set(_.key,_):T.set(_.index,_),_=_.sibling;return T}function u(T,_){return T=Ar(T,_),T.index=0,T.sibling=null,T}function f(T,_,E){return T.index=E,e?(E=T.alternate,E!==null?(E=E.index,E<_?(T.flags=2,_):E):(T.flags=2,_)):_}function m(T){return e&&T.alternate===null&&(T.flags=2),T}function y(T,_,E,b){return _===null||_.tag!==6?(_=ls(E,T.mode,b),_.return=T,_):(_=u(_,E),_.return=T,_)}function w(T,_,E,b){return _!==null&&_.elementType===E.type?(b=u(_,E.props),b.ref=Po(T,_,E),b.return=T,b):(b=eo(E.type,E.key,E.props,null,T.mode,b),b.ref=Po(T,_,E),b.return=T,b)}function C(T,_,E,b){return _===null||_.tag!==4||_.stateNode.containerInfo!==E.containerInfo||_.stateNode.implementation!==E.implementation?(_=Vo(E,T.mode,b),_.return=T,_):(_=u(_,E.children||[]),_.return=T,_)}function V(T,_,E,b,N){return _===null||_.tag!==7?(_=jr(E,T.mode,b,N),_.return=T,_):(_=u(_,E),_.return=T,_)}function ye(T,_,E){if(typeof _=="string"||typeof _=="number")return _=ls(""+_,T.mode,E),_.return=T,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Qe:return E=eo(_.type,_.key,_.props,null,T.mode,E),E.ref=Po(T,null,_),E.return=T,E;case M:return _=Vo(_,T.mode,E),_.return=T,_}if(bl(_)||ae(_))return _=jr(_,T.mode,E,null),_.return=T,_;Mi(T,_)}return null}function F(T,_,E,b){var N=_!==null?_.key:null;if(typeof E=="string"||typeof E=="number")return N!==null?null:y(T,_,""+E,b);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Qe:return E.key===N?E.type===Oe?V(T,_,E.props.children,b,N):w(T,_,E,b):null;case M:return E.key===N?C(T,_,E,b):null}if(bl(E)||ae(E))return N!==null?null:V(T,_,E,b,null);Mi(T,E)}return null}function ee(T,_,E,b,N){if(typeof b=="string"||typeof b=="number")return T=T.get(E)||null,y(_,T,""+b,N);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Qe:return T=T.get(b.key===null?E:b.key)||null,b.type===Oe?V(_,T,b.props.children,N,b.key):w(_,T,b,N);case M:return T=T.get(b.key===null?E:b.key)||null,C(_,T,b,N)}if(bl(b)||ae(b))return T=T.get(E)||null,V(_,T,b,N,null);Mi(_,b)}return null}function de(T,_,E,b){for(var N=null,ve=null,K=_,we=_=0,ke=null;K!==null&&we<E.length;we++){K.index>we?(ke=K,K=null):ke=K.sibling;var Se=F(T,K,E[we],b);if(Se===null){K===null&&(K=ke);break}e&&K&&Se.alternate===null&&n(T,K),_=f(Se,_,we),ve===null?N=Se:ve.sibling=Se,ve=Se,K=ke}if(we===E.length)return o(T,K),N;if(K===null){for(;we<E.length;we++)K=ye(T,E[we],b),K!==null&&(_=f(K,_,we),ve===null?N=K:ve.sibling=K,ve=K);return N}for(K=s(T,K);we<E.length;we++)ke=ee(K,T,we,E[we],b),ke!==null&&(e&&ke.alternate!==null&&K.delete(ke.key===null?we:ke.key),_=f(ke,_,we),ve===null?N=ke:ve.sibling=ke,ve=ke);return e&&K.forEach(function(On){return n(T,On)}),N}function le(T,_,E,b){var N=ae(E);if(typeof N!="function")throw Error(A(150));if(E=N.call(E),E==null)throw Error(A(151));for(var ve=N=null,K=_,we=_=0,ke=null,Se=E.next();K!==null&&!Se.done;we++,Se=E.next()){K.index>we?(ke=K,K=null):ke=K.sibling;var On=F(T,K,Se.value,b);if(On===null){K===null&&(K=ke);break}e&&K&&On.alternate===null&&n(T,K),_=f(On,_,we),ve===null?N=On:ve.sibling=On,ve=On,K=ke}if(Se.done)return o(T,K),N;if(K===null){for(;!Se.done;we++,Se=E.next())Se=ye(T,Se.value,b),Se!==null&&(_=f(Se,_,we),ve===null?N=Se:ve.sibling=Se,ve=Se);return N}for(K=s(T,K);!Se.done;we++,Se=E.next())Se=ee(K,T,we,Se.value,b),Se!==null&&(e&&Se.alternate!==null&&K.delete(Se.key===null?we:Se.key),_=f(Se,_,we),ve===null?N=Se:ve.sibling=Se,ve=Se);return e&&K.forEach(function(id){return n(T,id)}),N}return function(T,_,E,b){var N=typeof E=="object"&&E!==null&&E.type===Oe&&E.key===null;N&&(E=E.props.children);var ve=typeof E=="object"&&E!==null;if(ve)switch(E.$$typeof){case Qe:e:{for(ve=E.key,N=_;N!==null;){if(N.key===ve){switch(N.tag){case 7:if(E.type===Oe){o(T,N.sibling),_=u(N,E.props.children),_.return=T,T=_;break e}break;default:if(N.elementType===E.type){o(T,N.sibling),_=u(N,E.props),_.ref=Po(T,N,E),_.return=T,T=_;break e}}o(T,N);break}else n(T,N);N=N.sibling}E.type===Oe?(_=jr(E.props.children,T.mode,b,E.key),_.return=T,T=_):(b=eo(E.type,E.key,E.props,null,T.mode,b),b.ref=Po(T,_,E),b.return=T,T=b)}return m(T);case M:e:{for(N=E.key;_!==null;){if(_.key===N)if(_.tag===4&&_.stateNode.containerInfo===E.containerInfo&&_.stateNode.implementation===E.implementation){o(T,_.sibling),_=u(_,E.children||[]),_.return=T,T=_;break e}else{o(T,_);break}else n(T,_);_=_.sibling}_=Vo(E,T.mode,b),_.return=T,T=_}return m(T)}if(typeof E=="string"||typeof E=="number")return E=""+E,_!==null&&_.tag===6?(o(T,_.sibling),_=u(_,E),_.return=T,T=_):(o(T,_),_=ls(E,T.mode,b),_.return=T,T=_),m(T);if(bl(E))return de(T,_,E,b);if(ae(E))return le(T,_,E,b);if(ve&&Mi(T,E),typeof E>"u"&&!N)switch(T.tag){case 1:case 22:case 0:case 11:case 15:throw Error(A(152,Br(T.type)||"Component"))}return o(T,_)}}var _r=ko(!0),zi=ko(!1),Ro={},cn=vr(Ro),Io=vr(Ro),bo=vr(Ro);function dn(e){if(e===Ro)throw Error(A(174));return e}function xr(e,n){switch(st(bo,n),st(Io,e),st(cn,Ro),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:hs(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=hs(n,e)}Ke(cn),st(cn,n)}function Bi(){Ke(cn),Ke(Io),Ke(bo)}function Ol(e){dn(bo.current);var n=dn(cn.current),o=hs(n,e.type);n!==o&&(st(Io,e),st(cn,o))}function la(e){Io.current===e&&(Ke(cn),Ke(Io))}var at=vr(0);function Er(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 tn=null,Sr=null,fn=!1;function Xu(e,n){var o=rn(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 rt(e){if(fn){var n=Sr;if(n){var o=n;if(!Ju(e,n)){if(n=Oi(o.nextSibling),!n||!Ju(e,n)){e.flags=e.flags&-1025|2,fn=!1,tn=e;return}Xu(tn,o)}tn=e,Sr=Oi(n.firstChild)}else e.flags=e.flags&-1025|2,fn=!1,tn=e}}function it(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tn=e}function Nl(e){if(e!==tn)return!1;if(!fn)return it(e),fn=!0,!1;var n=e.type;if(e.tag!==5||n!=="head"&&n!=="body"&&!Ys(n,e.memoizedProps))for(n=Sr;n;)Xu(e,n),n=Oi(n.nextSibling);if(it(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){Sr=Oi(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}Sr=null}}else Sr=tn?Oi(e.stateNode.nextSibling):null;return!0}function Oo(){Sr=tn=null,fn=!1}var Ui=[];function Dl(){for(var e=0;e<Ui.length;e++)Ui[e]._workInProgressVersionPrimary=null;Ui.length=0}var No=De.ReactCurrentDispatcher,pn=De.ReactCurrentBatchConfig,Jr=0,ct=null,ue=null,Ze=null,Zi=!1,We=!1;function Zt(){throw Error(A(321))}function sa(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!zt(e[o],n[o]))return!1;return!0}function ec(e,n,o,s,u,f){if(Jr=f,ct=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,No.current=e===null||e.memoizedState===null?rc:ma,e=o(s,u),We){f=0;do{if(We=!1,!(25>f))throw Error(A(301));f+=1,Ze=ue=null,n.updateQueue=null,No.current=ga,e=o(s,u)}while(We)}if(No.current=Rn,n=ue!==null&&ue.next!==null,Jr=0,Ze=ue=ct=null,Zi=!1,n)throw Error(A(300));return e}function ei(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?ct.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function q(){if(ue===null){var e=ct.alternate;e=e!==null?e.memoizedState:null}else e=ue.next;var n=Ze===null?ct.memoizedState:Ze.next;if(n!==null)Ze=n,ue=e;else{if(e===null)throw Error(A(310));ue=e,e={memoizedState:ue.memoizedState,baseState:ue.baseState,baseQueue:ue.baseQueue,queue:ue.queue,next:null},Ze===null?ct.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function kn(e,n){return typeof n=="function"?n(e):n}function Wi(e){var n=q(),o=n.queue;if(o===null)throw Error(A(311));o.lastRenderedReducer=e;var s=ue,u=s.baseQueue,f=o.pending;if(f!==null){if(u!==null){var m=u.next;u.next=f.next,f.next=m}s.baseQueue=u=f,o.pending=null}if(u!==null){u=u.next,s=s.baseState;var y=m=f=null,w=u;do{var C=w.lane;if((Jr&C)===C)y!==null&&(y=y.next={lane:0,action:w.action,eagerReducer:w.eagerReducer,eagerState:w.eagerState,next:null}),s=w.eagerReducer===e?w.eagerState:e(s,w.action);else{var V={lane:C,action:w.action,eagerReducer:w.eagerReducer,eagerState:w.eagerState,next:null};y===null?(m=y=V,f=s):y=y.next=V,ct.lanes|=C,Pr|=C}w=w.next}while(w!==null&&w!==u);y===null?f=s:y.next=m,zt(s,n.memoizedState)||(Ye=!0),n.memoizedState=s,n.baseState=f,n.baseQueue=y,o.lastRenderedState=s}return[n.memoizedState,o.dispatch]}function Vi(e){var n=q(),o=n.queue;if(o===null)throw Error(A(311));o.lastRenderedReducer=e;var s=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);zt(f,n.memoizedState)||(Ye=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,s]}function Do(e,n,o){var s=n._getVersion;s=s(n._source);var u=n._workInProgressVersionPrimary;if(u!==null?e=u===s:(e=e.mutableReadLanes,(e=(Jr&e)===e)&&(n._workInProgressVersionPrimary=s,Ui.push(n))),e)return o(n._source);throw Ui.push(n),Error(A(350))}function Al(e,n,o,s){var u=Lt;if(u===null)throw Error(A(349));var f=n._getVersion,m=f(n._source),y=No.current,w=y.useState(function(){return Do(u,n,o)}),C=w[1],V=w[0];w=Ze;var ye=e.memoizedState,F=ye.refs,ee=F.getSnapshot,de=ye.source;ye=ye.subscribe;var le=ct;return e.memoizedState={refs:F,source:n,subscribe:s},y.useEffect(function(){F.getSnapshot=o,F.setSnapshot=C;var T=f(n._source);if(!zt(m,T)){T=o(n._source),zt(V,T)||(C(T),T=or(le),u.mutableReadLanes|=T&u.pendingLanes),T=u.mutableReadLanes,u.entangledLanes|=T;for(var _=u.entanglements,E=T;0<E;){var b=31-qn(E),N=1<<b;_[b]|=T,E&=~N}}},[o,n,s]),y.useEffect(function(){return s(n._source,function(){var T=F.getSnapshot,_=F.setSnapshot;try{_(T(n._source));var E=or(le);u.mutableReadLanes|=E&u.pendingLanes}catch(b){_(function(){throw b})}})},[n,s]),zt(ee,o)&&zt(de,n)&&zt(ye,s)||(e={pending:null,dispatch:null,lastRenderedReducer:kn,lastRenderedState:V},e.dispatch=C=It.bind(null,ct,e),w.queue=e,w.baseQueue=null,V=Do(u,n,o),w.memoizedState=w.baseState=V),V}function aa(e,n,o){var s=q();return Al(s,e,n,o)}function Ao(e){var n=ei();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e=n.queue={pending:null,dispatch:null,lastRenderedReducer:kn,lastRenderedState:e},e=e.dispatch=It.bind(null,ct,e),[n.memoizedState,e]}function Tr(e,n,o,s){return e={tag:e,create:n,destroy:o,deps:s,next:null},n=ct.updateQueue,n===null?(n={lastEffect:null},ct.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(s=o.next,o.next=e,e.next=s,n.lastEffect=e)),e}function Hi(e){var n=ei();return e={current:e},n.memoizedState=e}function jl(){return q().memoizedState}function Ll(e,n,o,s){var u=ei();ct.flags|=e,u.memoizedState=Tr(1|n,o,void 0,s===void 0?null:s)}function ua(e,n,o,s){var u=q();s=s===void 0?null:s;var f=void 0;if(ue!==null){var m=ue.memoizedState;if(f=m.destroy,s!==null&&sa(s,m.deps)){Tr(n,o,f,s);return}}ct.flags|=e,u.memoizedState=Tr(1|n,o,f,s)}function tc(e,n){return Ll(516,4,e,n)}function jo(e,n){return ua(516,4,e,n)}function ca(e,n){return ua(4,2,e,n)}function da(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,ua(4,2,da.bind(null,n,e),o)}function fa(){}function pa(e,n){var o=q();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&sa(n,s[1])?s[0]:(o.memoizedState=[e,n],e)}function ha(e,n){var o=q();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&sa(n,s[1])?s[0]:(e=e(),o.memoizedState=[e,n],e)}function td(e,n){var o=Rt();nr(98>o?98:o,function(){e(!0)}),nr(97<o?97:o,function(){var s=pn.transition;pn.transition=1;try{e(!1),n()}finally{pn.transition=s}})}function It(e,n,o){var s=Vt(),u=or(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===ct||m!==null&&m===ct)We=Zi=!0;else{if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var y=n.lastRenderedState,w=m(y,o);if(f.eagerReducer=m,f.eagerState=w,zt(w,y))return}catch{}bn(e,u,s)}}var Rn={readContext:un,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useOpaqueIdentifier:Zt,unstable_isNewReconciler:!1},rc={readContext:un,useCallback:function(e,n){return ei().memoizedState=[e,n===void 0?null:n],e},useContext:un,useEffect:tc,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Ll(4,2,da.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Ll(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 s=ei();return n=o!==void 0?o(n):n,s.memoizedState=s.baseState=n,e=s.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},e=e.dispatch=It.bind(null,ct,e),[s.memoizedState,e]},useRef:Hi,useState:Ao,useDebugValue:fa,useDeferredValue:function(e){var n=Ao(e),o=n[0],s=n[1];return tc(function(){var u=pn.transition;pn.transition=1;try{s(e)}finally{pn.transition=u}},[e]),o},useTransition:function(){var e=Ao(!1),n=e[0];return e=td.bind(null,e[1]),Hi(e),[e,n]},useMutableSource:function(e,n,o){var s=ei();return s.memoizedState={refs:{getSnapshot:n,setSnapshot:null},source:e,subscribe:o},Al(s,e,n,o)},useOpaqueIdentifier:function(){if(fn){var e=!1,n=qc(function(){throw e||(e=!0,o("r:"+(qs++).toString(36))),Error(A(355))}),o=Ao(n)[1];return(ct.mode&2)===0&&(ct.flags|=516,Tr(5,function(){o("r:"+(qs++).toString(36))},void 0,null)),n}return n="r:"+(qs++).toString(36),Ao(n),n},unstable_isNewReconciler:!1},ma={readContext:un,useCallback:pa,useContext:un,useEffect:jo,useImperativeHandle:nc,useLayoutEffect:ca,useMemo:ha,useReducer:Wi,useRef:jl,useState:function(){return Wi(kn)},useDebugValue:fa,useDeferredValue:function(e){var n=Wi(kn),o=n[0],s=n[1];return jo(function(){var u=pn.transition;pn.transition=1;try{s(e)}finally{pn.transition=u}},[e]),o},useTransition:function(){var e=Wi(kn)[0];return[jl().current,e]},useMutableSource:aa,useOpaqueIdentifier:function(){return Wi(kn)[0]},unstable_isNewReconciler:!1},ga={readContext:un,useCallback:pa,useContext:un,useEffect:jo,useImperativeHandle:nc,useLayoutEffect:ca,useMemo:ha,useReducer:Vi,useRef:jl,useState:function(){return Vi(kn)},useDebugValue:fa,useDeferredValue:function(e){var n=Vi(kn),o=n[0],s=n[1];return jo(function(){var u=pn.transition;pn.transition=1;try{s(e)}finally{pn.transition=u}},[e]),o},useTransition:function(){var e=Vi(kn)[0];return[jl().current,e]},useMutableSource:aa,useOpaqueIdentifier:function(){return Vi(kn)[0]},unstable_isNewReconciler:!1},ic=De.ReactCurrentOwner,Ye=!1;function Nt(e,n,o,s){n.child=e===null?zi(n,null,o,s):_r(n,e.child,o,s)}function ya(e,n,o,s,u){o=o.render;var f=n.ref;return Fi(n,u),s=ec(e,n,o,s,f,u),e!==null&&!Ye?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,In(e,n,u)):(n.flags|=1,Nt(e,n,s,u),n.child)}function oc(e,n,o,s,u,f){if(e===null){var m=o.type;return typeof m=="function"&&!os(m)&&m.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=m,lc(e,n,m,s,u,f)):(e=eo(o.type,null,s,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:mr,o(u,s)&&e.ref===n.ref)?In(e,n,f):(n.flags|=1,e=Ar(m,s),e.ref=n.ref,e.return=n,n.child=e)}function lc(e,n,o,s,u,f){if(e!==null&&mr(e.memoizedProps,s)&&e.ref===n.ref)if(Ye=!1,(f&u)!==0)(e.flags&16384)!==0&&(Ye=!0);else return n.lanes=e.lanes,In(e,n,f);return Fl(e,n,o,s,f)}function va(e,n,o){var s=n.pendingProps,u=s.children,f=e!==null?e.memoizedState:null;if(s.mode==="hidden"||s.mode==="unstable-defer-without-hiding")if((n.mode&4)===0)n.memoizedState={baseLanes:0},ts(n,o);else if((o&1073741824)!==0)n.memoizedState={baseLanes:0},ts(n,f!==null?f.baseLanes:o);else return e=f!==null?f.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e},ts(n,e),null;else f!==null?(s=f.baseLanes|o,n.memoizedState=null):s=o,ts(n,s);return Nt(e,n,u,o),n.child}function wa(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=128)}function Fl(e,n,o,s,u){var f=Ut(o)?tr:St.current;return f=Ai(n,f),Fi(n,u),o=ec(e,n,o,s,f,u),e!==null&&!Ye?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,In(e,n,u)):(n.flags|=1,Nt(e,n,o,u),n.child)}function _a(e,n,o,s,u){if(Ut(o)){var f=!0;ji(n)}else f=!1;if(Fi(n,u),n.stateNode===null)e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),Rl(n,o,s),Il(n,o,s,u),s=!0;else if(e===null){var m=n.stateNode,y=n.memoizedProps;m.props=y;var w=m.context,C=o.contextType;typeof C=="object"&&C!==null?C=un(C):(C=Ut(o)?tr:St.current,C=Ai(n,C));var V=o.getDerivedStateFromProps,ye=typeof V=="function"||typeof m.getSnapshotBeforeUpdate=="function";ye||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==s||w!==C)&&qu(n,m,s,C),ge=!1;var F=n.memoizedState;m.state=F,Xr(n,s,m,u),w=n.memoizedState,y!==s||F!==w||Bt.current||ge?(typeof V=="function"&&(Pl(n,o,V,s),w=n.memoizedState),(y=ge||Yu(n,o,y,s,F,w,C))?(ye||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=s,n.memoizedState=w),m.props=s,m.state=w,m.context=C,s=y):(typeof m.componentDidMount=="function"&&(n.flags|=4),s=!1)}else{m=n.stateNode,$u(e,n),y=n.memoizedProps,C=n.type===n.elementType?y:en(n.type,y),m.props=C,ye=n.pendingProps,F=m.context,w=o.contextType,typeof w=="object"&&w!==null?w=un(w):(w=Ut(o)?tr:St.current,w=Ai(n,w));var ee=o.getDerivedStateFromProps;(V=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==ye||F!==w)&&qu(n,m,s,w),ge=!1,F=n.memoizedState,m.state=F,Xr(n,s,m,u);var de=n.memoizedState;y!==ye||F!==de||Bt.current||ge?(typeof ee=="function"&&(Pl(n,o,ee,s),de=n.memoizedState),(C=ge||Yu(n,o,C,s,F,de,w))?(V||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,de,w),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,de,w)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=256)):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=256),n.memoizedProps=s,n.memoizedState=de),m.props=s,m.state=de,m.context=w,s=C):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=256),s=!1)}return xa(e,n,o,s,f,u)}function xa(e,n,o,s,u,f){wa(e,n);var m=(n.flags&64)!==0;if(!s&&!m)return u&&Fu(n,o,!1),In(e,n,f);s=n.stateNode,ic.current=n;var y=m&&typeof o.getDerivedStateFromError!="function"?null:s.render();return n.flags|=1,e!==null&&m?(n.child=_r(n,e.child,null,f),n.child=_r(n,null,y,f)):Nt(e,n,y,f),n.memoizedState=s.state,u&&Fu(n,o,!0),n.child}function Dt(e){var n=e.stateNode;n.pendingContext?Xs(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Xs(e,n.context,!1),xr(e,n.containerInfo)}var Lo={dehydrated:null,retryLane:0};function Ea(e,n,o){var s=n.pendingProps,u=at.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||s.fallback===void 0||s.unstable_avoidThisFallback===!0||(u|=1),st(at,u&1),e===null?(s.fallback!==void 0&&rt(n),e=s.children,u=s.fallback,f?(e=Ml(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Lo,e):typeof s.unstable_expectedLoadTime=="number"?(e=Ml(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Lo,n.lanes=33554432,e):(o=Wo({mode:"visible",children:e},n.mode,o,null),o.return=n,n.child=o)):e.memoizedState!==null?f?(s=Sa(e,n,s.children,s.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=Lo,s):(o=sc(e,n,s.children,o),n.memoizedState=null,o):f?(s=Sa(e,n,s.children,s.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=Lo,s):(o=sc(e,n,s.children,o),n.memoizedState=null,o)}function Ml(e,n,o,s){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=Wo(n,u,0,null),o=jr(o,u,s,null),f.return=e,o.return=e,f.sibling=o,e.child=f,o}function sc(e,n,o,s){var u=e.child;return e=u.sibling,o=Ar(u,{mode:"visible",children:o}),(n.mode&2)===0&&(o.lanes=s),o.return=n,o.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,n.firstEffect=n.lastEffect=e),n.child=o}function Sa(e,n,o,s,u){var f=n.mode,m=e.child;e=m.sibling;var y={mode:"hidden",children:o};return(f&2)===0&&n.child!==m?(o=n.child,o.childLanes=0,o.pendingProps=y,m=o.lastEffect,m!==null?(n.firstEffect=o.firstEffect,n.lastEffect=m,m.nextEffect=null):n.firstEffect=n.lastEffect=null):o=Ar(m,y),e!==null?s=Ar(e,s):(s=jr(s,f,u,null),s.flags|=2),s.return=n,o.return=n,o.sibling=s,n.child=o,s}function Fo(e,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Cl(e.return,n)}function rr(e,n,o,s,u,f){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:u,lastEffect:f}:(m.isBackwards=n,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=o,m.tailMode=u,m.lastEffect=f)}function Wn(e,n,o){var s=n.pendingProps,u=s.revealOrder,f=s.tail;if(Nt(e,n,s.children,o),s=at.current,(s&2)!==0)s=s&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&&Fo(e,o);else if(e.tag===19)Fo(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}s&=1}if(st(at,s),(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&&Er(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),rr(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&&Er(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}rr(n,!0,o,null,f,n.lastEffect);break;case"together":rr(n,!1,null,null,void 0,n.lastEffect);break;default:n.memoizedState=null}return n.child}function In(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),Pr|=n.lanes,(o&n.childLanes)!==0){if(e!==null&&n.child!==e.child)throw Error(A(153));if(n.child!==null){for(e=n.child,o=Ar(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Ar(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}return null}var zl,Bl,Ul,Zl;zl=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}},Bl=function(){},Ul=function(e,n,o,s){var u=e.memoizedProps;if(u!==s){e=n.stateNode,dn(cn.current);var f=null;switch(o){case"input":u=Yo(e,u),s=Yo(e,s),f=[];break;case"option":u=$t(e,u),s=$t(e,s),f=[];break;case"select":u=_e({},u,{value:void 0}),s=_e({},s,{value:void 0}),f=[];break;case"textarea":u=me(e,u),s=me(e,s),f=[];break;default:typeof u.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=gl)}vn(o,s);var m;o=null;for(C in u)if(!s.hasOwnProperty(C)&&u.hasOwnProperty(C)&&u[C]!=null)if(C==="style"){var y=u[C];for(m in y)y.hasOwnProperty(m)&&(o||(o={}),o[m]="")}else C!=="dangerouslySetInnerHTML"&&C!=="children"&&C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&C!=="autoFocus"&&(Me.hasOwnProperty(C)?f||(f=[]):(f=f||[]).push(C,null));for(C in s){var w=s[C];if(y=u?.[C],s.hasOwnProperty(C)&&w!==y&&(w!=null||y!=null))if(C==="style")if(y){for(m in y)!y.hasOwnProperty(m)||w&&w.hasOwnProperty(m)||(o||(o={}),o[m]="");for(m in w)w.hasOwnProperty(m)&&y[m]!==w[m]&&(o||(o={}),o[m]=w[m])}else o||(f||(f=[]),f.push(C,o)),o=w;else C==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,y=y?y.__html:void 0,w!=null&&y!==w&&(f=f||[]).push(C,w)):C==="children"?typeof w!="string"&&typeof w!="number"||(f=f||[]).push(C,""+w):C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&(Me.hasOwnProperty(C)?(w!=null&&C==="onScroll"&&Je("scroll",e),f||y===w||(f=[])):typeof w=="object"&&w!==null&&w.$$typeof===O?w.toString():(f=f||[]).push(C,w))}o&&(f=f||[]).push("style",o);var C=f;(n.updateQueue=C)&&(n.flags|=4)}},Zl=function(e,n,o,s){o!==s&&(n.flags|=4)};function ti(e,n){if(!fn)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 s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ta(e,n,o){var s=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 Ut(n.type)&&xo(),null;case 3:return Bi(),Ke(Bt),Ke(St),Dl(),s=n.stateNode,s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Nl(n)?n.flags|=4:s.hydrate||(n.flags|=256)),Bl(n),null;case 5:la(n);var u=dn(bo.current);if(o=n.type,e!==null&&n.stateNode!=null)Ul(e,n,o,s,u),e.ref!==n.ref&&(n.flags|=128);else{if(!s){if(n.stateNode===null)throw Error(A(166));return null}if(e=dn(cn.current),Nl(n)){s=n.stateNode,o=n.type;var f=n.memoizedProps;switch(s[er]=n,s[wl]=f,o){case"dialog":Je("cancel",s),Je("close",s);break;case"iframe":case"object":case"embed":Je("load",s);break;case"video":case"audio":for(e=0;e<qr.length;e++)Je(qr[e],s);break;case"source":Je("error",s);break;case"img":case"image":case"link":Je("error",s),Je("load",s);break;case"details":Je("toggle",s);break;case"input":bt(s,f),Je("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!f.multiple},Je("invalid",s);break;case"textarea":Ee(s,f),Je("invalid",s)}vn(o,f),e=null;for(var m in f)f.hasOwnProperty(m)&&(u=f[m],m==="children"?typeof u=="string"?s.textContent!==u&&(e=["children",u]):typeof u=="number"&&s.textContent!==""+u&&(e=["children",""+u]):Me.hasOwnProperty(m)&&u!=null&&m==="onScroll"&&Je("scroll",s));switch(o){case"input":W(s),ci(s,f,!0);break;case"textarea":W(s),$a(s);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(s.onclick=gl)}s=e,n.updateQueue=s,s!==null&&(n.flags|=4)}else{switch(m=u.nodeType===9?u:u.ownerDocument,e===ps.html&&(e=Qa(o)),e===ps.html?o==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=m.createElement(o,{is:s.is}):(e=m.createElement(o),o==="select"&&(m=e,s.multiple?m.multiple=!0:s.size&&(m.size=s.size))):e=m.createElementNS(e,o),e[er]=n,e[wl]=s,zl(e,n,!1,!1),n.stateNode=e,m=ar(o,s),o){case"dialog":Je("cancel",e),Je("close",e),u=s;break;case"iframe":case"object":case"embed":Je("load",e),u=s;break;case"video":case"audio":for(u=0;u<qr.length;u++)Je(qr[u],e);u=s;break;case"source":Je("error",e),u=s;break;case"img":case"image":case"link":Je("error",e),Je("load",e),u=s;break;case"details":Je("toggle",e),u=s;break;case"input":bt(e,s),u=Yo(e,s),Je("invalid",e);break;case"option":u=$t(e,s);break;case"select":e._wrapperState={wasMultiple:!!s.multiple},u=_e({},s,{value:void 0}),Je("invalid",e);break;case"textarea":Ee(e,s),u=me(e,s),Je("invalid",e);break;default:u=s}vn(o,u);var y=u;for(f in y)if(y.hasOwnProperty(f)){var w=y[f];f==="style"?ms(e,w):f==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,w!=null&&Ka(e,w)):f==="children"?typeof w=="string"?(o!=="textarea"||w!=="")&&io(e,w):typeof w=="number"&&io(e,""+w):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Me.hasOwnProperty(f)?w!=null&&f==="onScroll"&&Je("scroll",e):w!=null&&Pe(e,f,w,m))}switch(o){case"input":W(e),ci(e,s,!1);break;case"textarea":W(e),$a(e);break;case"option":s.value!=null&&e.setAttribute("value",""+on(s.value));break;case"select":e.multiple=!!s.multiple,f=s.value,f!=null?Ur(e,!!s.multiple,f,!1):s.defaultValue!=null&&Ur(e,!!s.multiple,s.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=gl)}Nu(o,s)&&(n.flags|=4)}n.ref!==null&&(n.flags|=128)}return null;case 6:if(e&&n.stateNode!=null)Zl(e,n,e.memoizedProps,s);else{if(typeof s!="string"&&n.stateNode===null)throw Error(A(166));o=dn(bo.current),dn(cn.current),Nl(n)?(s=n.stateNode,o=n.memoizedProps,s[er]=n,s.nodeValue!==o&&(n.flags|=4)):(s=(o.nodeType===9?o:o.ownerDocument).createTextNode(s),s[er]=n,n.stateNode=s)}return null;case 13:return Ke(at),s=n.memoizedState,(n.flags&64)!==0?(n.lanes=o,n):(s=s!==null,o=!1,e===null?n.memoizedProps.fallback!==void 0&&Nl(n):o=e.memoizedState!==null,s&&!o&&(n.mode&2)!==0&&(e===null&&n.memoizedProps.unstable_avoidThisFallback!==!0||(at.current&1)!==0?ot===0&&(ot=3):((ot===0||ot===3)&&(ot=4),Lt===null||(Pr&134217727)===0&&(ir&134217727)===0||Xi(Lt,At))),(s||o)&&(n.flags|=4),null);case 4:return Bi(),Bl(n),e===null&&Ri(n.stateNode.containerInfo),null;case 10:return oa(n),null;case 17:return Ut(n.type)&&xo(),null;case 19:if(Ke(at),s=n.memoizedState,s===null)return null;if(f=(n.flags&64)!==0,m=s.rendering,m===null)if(f)ti(s,!1);else{if(ot!==0||e!==null&&(e.flags&64)!==0)for(e=n.child;e!==null;){if(m=Er(e),m!==null){for(n.flags|=64,ti(s,!1),f=m.updateQueue,f!==null&&(n.updateQueue=f,n.flags|=4),s.lastEffect===null&&(n.firstEffect=null),n.lastEffect=s.lastEffect,s=o,o=n.child;o!==null;)f=o,e=s,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 st(at,at.current&1|2),n.child}e=e.sibling}s.tail!==null&&Ge()>ql&&(n.flags|=64,f=!0,ti(s,!1),n.lanes=33554432)}else{if(!f)if(e=Er(m),e!==null){if(n.flags|=64,f=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),ti(s,!0),s.tail===null&&s.tailMode==="hidden"&&!m.alternate&&!fn)return n=n.lastEffect=s.lastEffect,n!==null&&(n.nextEffect=null),null}else 2*Ge()-s.renderingStartTime>ql&&o!==1073741824&&(n.flags|=64,f=!0,ti(s,!1),n.lanes=33554432);s.isBackwards?(m.sibling=n.child,n.child=m):(o=s.last,o!==null?o.sibling=m:n.child=m,s.last=m)}return s.tail!==null?(o=s.tail,s.rendering=o,s.tail=o.sibling,s.lastEffect=n.lastEffect,s.renderingStartTime=Ge(),o.sibling=null,n=at.current,st(at,f?n&1|2:n&1),o):null;case 23:case 24:return Aa(),e!==null&&e.memoizedState!==null!=(n.memoizedState!==null)&&s.mode!=="unstable-defer-without-hiding"&&(n.flags|=4),null}throw Error(A(156,n.tag))}function Wl(e){switch(e.tag){case 1:Ut(e.type)&&xo();var n=e.flags;return n&4096?(e.flags=n&-4097|64,e):null;case 3:if(Bi(),Ke(Bt),Ke(St),Dl(),n=e.flags,(n&64)!==0)throw Error(A(285));return e.flags=n&-4097|64,e;case 5:return la(e),null;case 13:return Ke(at),n=e.flags,n&4096?(e.flags=n&-4097|64,e):null;case 19:return Ke(at),null;case 4:return Bi(),null;case 10:return oa(e),null;case 23:case 24:return Aa(),null;default:return null}}function Ca(e,n){try{var o="",s=n;do o+=Va(s),s=s.return;while(s);var u=o}catch(f){u=`
40
+ `+u[m].replace(" at new "," at ");while(1<=m&&0<=y);break}}}finally{Pt=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?Mt(e):""}function Va(e){switch(e.tag){case 5:return Mt(e.type);case 16:return Mt("Lazy");case 13:return Mt("Suspense");case 19:return Mt("SuspenseList");case 0:case 2:case 15:return e=Dn(e.type,!1),e;case 11:return e=Dn(e.type.render,!1),e;case 22:return e=Dn(e.type._render,!1),e;case 1:return e=Dn(e.type,!0),e;default:return""}}function Br(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 Ne:return"Fragment";case M:return"Portal";case ne:return"Profiler";case je:return"StrictMode";case Ee:return"Suspense";case H:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Q:return(e.displayName||"Context")+".Consumer";case ie:return(e._context.displayName||"Context")+".Provider";case J:var n=e.render;return n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case ce:return Br(e.type);case z:return Br(e._render);case S:n=e._payload,e=e._init;try{return Br(e(n))}catch{}}return null}function on(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function no(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ac(e){var n=no(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+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){s=""+m,f.call(this,m)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(m){s=""+m},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function W(e){e._valueTracker||(e._valueTracker=Ac(e))}function Et(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),s="";return e&&(s=no(e)?e.checked?"true":"false":e.value),e=s,e!==o?(n.setValue(e),!0):!1}function me(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 Yo(e,n){var o=n.checked;return xe({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function It(e,n){var o=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;o=on(n.value!=null?n.value:o),e._wrapperState={initialChecked:s,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function qo(e,n){n=n.checked,n!=null&&Re(e,"checked",n,!1)}function ro(e,n){qo(e,n);var o=on(n.value),s=n.type;if(o!=null)s==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?di(e,n.type,o):n.hasOwnProperty("defaultValue")&&di(e,n.type,on(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function ci(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="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 di(e,n,o){(n!=="number"||me(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}function oe(e){var n="";return ze.Children.forEach(e,function(o){o!=null&&(n+=o)}),n}function $t(e,n){return e=xe({children:void 0},n),(n=oe(n.children))&&(e.children=n),e}function Ur(e,n,o,s){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&&s&&(e[o].defaultSelected=!0)}else{for(o=""+on(o),n=null,u=0;u<e.length;u++){if(e[u].value===o){e[u].selected=!0,s&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function ge(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(N(91));return xe({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Se(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(N(92));if(Array.isArray(o)){if(!(1>=o.length))throw Error(N(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:on(o)}}function Ha(e,n){var o=on(n.value),s=on(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),s!=null&&(e.defaultValue=""+s)}function $a(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}var ps={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Qa(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 hs(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Qa(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xo,Ka=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,s,u){MSApp.execUnsafeLocalFunction(function(){return e(n,o,s,u)})}:e})(function(e,n){if(e.namespaceURI!==ps.svg||"innerHTML"in e)e.innerHTML=n;else{for(Xo=Xo||document.createElement("div"),Xo.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function io(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var oo={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},Ga=["Webkit","ms","Moz","O"];Object.keys(oo).forEach(function(e){Ga.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),oo[n]=oo[e]})});function Qt(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||oo.hasOwnProperty(e)&&oo[e]?(""+n).trim():n+"px"}function ms(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var s=o.indexOf("--")===0,u=Qt(o,n[o],s);o==="float"&&(o="cssFloat"),s?e.setProperty(o,u):e[o]=u}}var $n=xe({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 vn(e,n){if(n){if($n[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(N(60));if(!(typeof n.dangerouslySetInnerHTML=="object"&&"__html"in n.dangerouslySetInnerHTML))throw Error(N(61))}if(n.style!=null&&typeof n.style!="object")throw Error(N(62))}}function ar(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 An(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zr=null,wn=null,_n=null;function ur(e){if(e=_o(e)){if(typeof Zr!="function")throw Error(N(280));var n=e.stateNode;n&&(n=Di(n),Zr(e.stateNode,e.type,n))}}function Qn(e){wn?_n?_n.push(e):_n=[e]:wn=e}function xn(){if(wn){var e=wn,n=_n;if(_n=wn=null,ur(e),n)for(e=0;e<n.length;e++)ur(n[e])}}function Wr(e,n){return e(n)}function Kt(e,n,o,s,u){return e(n,o,s,u)}function Kn(){}var Je=Wr,ln=!1,fi=!1;function Vr(){(wn!==null||_n!==null)&&(Kn(),xn())}function Jo(e,n,o){if(fi)return e(n,o);fi=!0;try{return Je(e,n,o)}finally{fi=!1,Vr()}}function jn(e,n){var o=e.stateNode;if(o===null)return null;var s=Di(o);if(s===null)return null;o=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(N(231,n,typeof o));return o}var Gt=!1;if(B)try{var Ln={};Object.defineProperty(Ln,"passive",{get:function(){Gt=!0}}),window.addEventListener("test",Ln,Ln),window.removeEventListener("test",Ln,Ln)}catch{Gt=!1}function lo(e,n,o,s,u,f,m,y,w){var C=Array.prototype.slice.call(arguments,3);try{n.apply(o,C)}catch(V){this.onError(V)}}var sn=!1,Fn=null,Gn=!1,cr=null,gs={onError:function(e){sn=!0,Fn=e}};function Yn(e,n,o,s,u,f,m,y,w){sn=!1,Fn=null,lo.apply(gs,arguments)}function pi(e,n,o,s,u,f,m,y,w){if(Yn.apply(this,arguments),sn){if(sn){var C=Fn;sn=!1,Fn=null}else throw Error(N(198));Gn||(Gn=!0,cr=C)}}function Yt(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 qt(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 En(e){if(Yt(e)!==e)throw Error(N(188))}function dr(e){var n=e.alternate;if(!n){if(n=Yt(e),n===null)throw Error(N(188));return n!==e?null:e}for(var o=e,s=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(s=u.return,s!==null){o=s;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return En(u),e;if(f===s)return En(u),n;f=f.sibling}throw Error(N(188))}if(o.return!==s.return)o=u,s=f;else{for(var m=!1,y=u.child;y;){if(y===o){m=!0,o=u,s=f;break}if(y===s){m=!0,s=u,o=f;break}y=y.sibling}if(!m){for(y=f.child;y;){if(y===o){m=!0,o=f,s=u;break}if(y===s){m=!0,s=f,o=u;break}y=y.sibling}if(!m)throw Error(N(189))}}if(o.alternate!==s)throw Error(N(190))}if(o.tag!==3)throw Error(N(188));return o.stateNode.current===o?e:n}function Hr(e){if(e=dr(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 hi(e,n){for(var o=e.alternate;n!==null;){if(n===e||n===o)return!0;n=n.return}return!1}var mi,ys,el,$r,Qr=!1,Sn=[],fr=null,re=null,pr=null,gi=new Map,yi=new Map,so=[],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 tl(e,n,o,s,u){return{blockedOn:e,domEventName:n,eventSystemFlags:o|16,nativeEvent:u,targetContainers:[s]}}function qa(e,n){switch(e){case"focusin":case"focusout":fr=null;break;case"dragenter":case"dragleave":re=null;break;case"mouseover":case"mouseout":pr=null;break;case"pointerover":case"pointerout":gi.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":yi.delete(n.pointerId)}}function ao(e,n,o,s,u,f){return e===null||e.nativeEvent!==f?(e=tl(n,o,s,u,f),n!==null&&(n=_o(n),n!==null&&ys(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function jc(e,n,o,s,u){switch(n){case"focusin":return fr=ao(fr,e,n,o,s,u),!0;case"dragenter":return re=ao(re,e,n,o,s,u),!0;case"mouseover":return pr=ao(pr,e,n,o,s,u),!0;case"pointerover":var f=u.pointerId;return gi.set(f,ao(gi.get(f)||null,e,n,o,s,u)),!0;case"gotpointercapture":return f=u.pointerId,yi.set(f,ao(yi.get(f)||null,e,n,o,s,u)),!0}return!1}function Lc(e){var n=yr(e.target);if(n!==null){var o=Yt(n);if(o!==null){if(n=o.tag,n===13){if(n=qt(o),n!==null){e.blockedOn=n,$r(e.lanePriority,function(){Ae.unstable_runWithPriority(e.priority,function(){el(o)})});return}}else if(n===3&&o.stateNode.hydrate){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function nl(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=k(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null)return n=_o(o),n!==null&&ys(n),e.blockedOn=o,!1;n.shift()}return!0}function Xa(e,n,o){nl(e)&&o.delete(n)}function Fc(){for(Qr=!1;0<Sn.length;){var e=Sn[0];if(e.blockedOn!==null){e=_o(e.blockedOn),e!==null&&mi(e);break}for(var n=e.targetContainers;0<n.length;){var o=k(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null){e.blockedOn=o;break}n.shift()}e.blockedOn===null&&Sn.shift()}fr!==null&&nl(fr)&&(fr=null),re!==null&&nl(re)&&(re=null),pr!==null&&nl(pr)&&(pr=null),gi.forEach(Xa),yi.forEach(Xa)}function uo(e,n){e.blockedOn===n&&(e.blockedOn=null,Qr||(Qr=!0,Ae.unstable_scheduleCallback(Ae.unstable_NormalPriority,Fc)))}function Ja(e){function n(u){return uo(u,e)}if(0<Sn.length){uo(Sn[0],e);for(var o=1;o<Sn.length;o++){var s=Sn[o];s.blockedOn===e&&(s.blockedOn=null)}}for(fr!==null&&uo(fr,e),re!==null&&uo(re,e),pr!==null&&uo(pr,e),gi.forEach(n),yi.forEach(n),o=0;o<so.length;o++)s=so[o],s.blockedOn===e&&(s.blockedOn=null);for(;0<so.length&&(o=so[0],o.blockedOn===null);)Lc(o),o.blockedOn===null&&so.shift()}function rl(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var vi={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionend:rl("Transition","TransitionEnd")},vs={},eu={};B&&(eu=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function il(e){if(vs[e])return vs[e];if(!vi[e])return e;var n=vi[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in eu)return vs[e]=n[o];return e}var tu=il("animationend"),nu=il("animationiteration"),ru=il("animationstart"),iu=il("transitionend"),ou=new Map,ws=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 _s(e,n){for(var o=0;o<e.length;o+=2){var s=e[o],u=e[o+1];u="on"+(u[0].toUpperCase()+u.slice(1)),ws.set(s,n),ou.set(s,u),Be(u,[s])}}var zc=Ae.unstable_now;zc();var qe=8;function Kr(e){if((1&e)!==0)return qe=15,1;if((2&e)!==0)return qe=14,2;if((4&e)!==0)return qe=13,4;var n=24&e;return n!==0?(qe=12,n):(e&32)!==0?(qe=11,32):(n=192&e,n!==0?(qe=10,n):(e&256)!==0?(qe=9,256):(n=3584&e,n!==0?(qe=8,n):(e&4096)!==0?(qe=7,4096):(n=4186112&e,n!==0?(qe=6,n):(n=62914560&e,n!==0?(qe=5,n):e&67108864?(qe=4,67108864):(e&134217728)!==0?(qe=3,134217728):(n=805306368&e,n!==0?(qe=2,n):(1073741824&e)!==0?(qe=1,1073741824):(qe=8,e))))))}function Bc(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(N(358,e))}}function co(e,n){var o=e.pendingLanes;if(o===0)return qe=0;var s=0,u=0,f=e.expiredLanes,m=e.suspendedLanes,y=e.pingedLanes;if(f!==0)s=f,u=qe=15;else if(f=o&134217727,f!==0){var w=f&~m;w!==0?(s=Kr(w),u=qe):(y&=f,y!==0&&(s=Kr(y),u=qe))}else f=o&~m,f!==0?(s=Kr(f),u=qe):y!==0&&(s=Kr(y),u=qe);if(s===0)return 0;if(s=31-qn(s),s=o&((0>s?0:1<<s)<<1)-1,n!==0&&n!==s&&(n&m)===0){if(Kr(n),u<=qe)return n;qe=u}if(n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0<n;)o=31-qn(n),u=1<<o,s|=e[o],n&=~u;return s}function lu(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=hr(24&~n),e===0?x(10,n):e;case 10:return e=hr(192&~n),e===0?x(8,n):e;case 8:return e=hr(3584&~n),e===0&&(e=hr(4186112&~n),e===0&&(e=512)),e;case 2:return n=hr(805306368&~n),n===0&&(n=268435456),n}throw Error(N(358,e))}function hr(e){return e&-e}function xs(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function ol(e,n,o){e.pendingLanes|=n;var s=n-1;e.suspendedLanes&=s,e.pingedLanes&=s,e=e.eventTimes,n=31-qn(n),e[n]=o}var qn=Math.clz32?Math.clz32:su,ft=Math.log,mt=Math.LN2;function su(e){return e===0?32:31-(ft(e)/mt|0)|0}var Zc=Ae.unstable_UserBlockingPriority,au=Ae.unstable_runWithPriority,ll=!0;function Wc(e,n,o,s){ln||Kn();var u=Ss,f=ln;ln=!0;try{Kt(u,e,n,o,s)}finally{(ln=f)||Vr()}}function Es(e,n,o,s){au(Zc,Ss.bind(null,e,n,o,s))}function Ss(e,n,o,s){if(ll){var u;if((u=(n&4)===0)&&0<Sn.length&&-1<Ya.indexOf(e))e=tl(null,e,n,o,s),Sn.push(e);else{var f=k(e,n,o,s);if(f===null)u&&qa(e,s);else{if(u){if(-1<Ya.indexOf(e)){e=tl(f,e,n,o,s),Sn.push(e);return}if(jc(f,e,n,o,s))return;qa(e,s)}Qs(e,n,s,null,o)}}}}function k(e,n,o,s){var u=An(s);if(u=yr(u),u!==null){var f=Yt(u);if(f===null)u=null;else{var m=f.tag;if(m===13){if(u=qt(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 Qs(e,n,s,u,o),null}var R=null,an=null,wi=null;function gt(){if(wi)return wi;var e,n=an,o=n.length,s,u="value"in R?R.value:R.textContent,f=u.length;for(e=0;e<o&&n[e]===u[e];e++);var m=o-e;for(s=1;s<=m&&n[o-s]===u[f-s];s++);return wi=u.slice(e,1<s?1-s:void 0)}function _i(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 sl(){return!0}function Ts(){return!1}function Xt(e){function n(o,s,u,f,m){this._reactName=o,this._targetInst=u,this.type=s,this.nativeEvent=f,this.target=m,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(o=e[y],this[y]=o?o(f):f[y]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?sl:Ts,this.isPropagationStopped=Ts,this}return xe(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=sl)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=sl)},persist:function(){},isPersistent:sl}),n}var xi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fo=Xt(xi),Ei=xe({},xi,{view:0,detail:0}),kt=Xt(Ei),Tn,po,Gr,Mn=xe({},Ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jn,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!==Gr&&(Gr&&e.type==="mousemove"?(Tn=e.screenX-Gr.screenX,po=e.screenY-Gr.screenY):po=Tn=0,Gr=e),Tn)},movementY:function(e){return"movementY"in e?e.movementY:po}}),uu=Xt(Mn),Vc=xe({},Mn,{dataTransfer:0}),Hc=Xt(Vc),cu=xe({},Ei,{relatedTarget:0}),Cs=Xt(cu),$c=xe({},xi,{animationName:0,elapsedTime:0,pseudoElement:0}),du=Xt($c),Qc=xe({},xi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kc=Xt(Qc),al=xe({},xi,{data:0}),Ps=Xt(al),ul={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ks={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"},Xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fu(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Xn[e])?!!n[e]:!1}function Jn(){return fu}var Si=xe({},Ei,{key:function(e){if(e.key){var n=ul[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=_i(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ks[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jn,charCode:function(e){return e.type==="keypress"?_i(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_i(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pu=Xt(Si),Rs=xe({},Mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bs=Xt(Rs),hu=xe({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jn}),mu=Xt(hu),gu=xe({},xi,{propertyName:0,elapsedTime:0,pseudoElement:0}),yu=Xt(gu),Gc=xe({},Mn,{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}),Is=Xt(Gc),vu=[9,13,27,32],Os=B&&"CompositionEvent"in window,ho=null;B&&"documentMode"in document&&(ho=document.documentMode);var wu=B&&"TextEvent"in window&&!ho,Jt=B&&(!Os||ho&&8<ho&&11>=ho),_u=" ",zn=!1;function Cn(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 xu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ti=!1;function Eu(e,n){switch(e){case"compositionend":return xu(n);case"keypress":return n.which!==32?null:(zn=!0,_u);case"textInput":return e=n.data,e===_u&&zn?null:e;default:return null}}function Su(e,n){if(Ti)return e==="compositionend"||!Os&&Cn(e,n)?(e=gt(),wi=an=R=null,Ti=!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 Jt&&n.locale!=="ko"?null:n.data;default:return null}}var Tu={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 Ns(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Tu[e.type]:n==="textarea"}function Cu(e,n,o,s){Qn(s),n=ml(n,"onChange"),0<n.length&&(o=new fo("onChange","change",null,o,s),e.push({event:o,listeners:n}))}var Yr=null,Ci=null;function Ds(e){Hs(e,0)}function Pi(e){var n=Ni(e);if(Et(n))return e}function St(e,n){if(e==="change")return n}var rt=!1;if(B){var cl;if(B){var dl="oninput"in document;if(!dl){var As=document.createElement("div");As.setAttribute("oninput","return;"),dl=typeof As.oninput=="function"}cl=dl}else cl=!1;rt=cl&&(!document.documentMode||9<document.documentMode)}function js(){Yr&&(Yr.detachEvent("onpropertychange",Ls),Ci=Yr=null)}function Ls(e){if(e.propertyName==="value"&&Pi(Ci)){var n=[];if(Cu(n,Ci,e,An(e)),e=Ds,ln)e(n);else{ln=!0;try{Wr(e,n)}finally{ln=!1,Vr()}}}}function Pu(e,n,o){e==="focusin"?(js(),Yr=n,Ci=o,Yr.attachEvent("onpropertychange",Ls)):e==="focusout"&&js()}function ku(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pi(Ci)}function Fs(e,n){if(e==="click")return Pi(n)}function Ms(e,n){if(e==="input"||e==="change")return Pi(n)}function Yc(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var zt=typeof Object.is=="function"?Object.is:Yc,mo=Object.prototype.hasOwnProperty;function mr(e,n){if(zt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),s=Object.keys(n);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++)if(!mo.call(n,o[s])||!zt(e[o[s]],n[o[s]]))return!1;return!0}function Ru(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fl(e,n){var o=Ru(e);e=0;for(var s;o;){if(o.nodeType===3){if(s=e+o.textContent.length,e<=n&&s>=n)return{node:o,offset:n-e};e=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Ru(o)}}function go(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?go(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function bu(){for(var e=window,n=me();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=me(e.document)}return n}function yo(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 zs=B&&"documentMode"in document&&11>=document.documentMode,ki=null,Bs=null,vo=null,Us=!1;function Iu(e,n,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Us||ki==null||ki!==me(s)||(s=ki,"selectionStart"in s&&yo(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),vo&&mr(vo,s)||(vo=s,s=ml(Bs,"onSelect"),0<s.length&&(n=new fo("onSelect","select",null,n,o),e.push({event:n,listeners:s}),n.target=ki)))}_s("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),_s("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),_s(Mc,2);for(var Zs="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),pl=0;pl<Zs.length;pl++)ws.set(Zs[pl],0);P("onMouseEnter",["mouseout","mouseover"]),P("onMouseLeave",["mouseout","mouseover"]),P("onPointerEnter",["pointerout","pointerover"]),P("onPointerLeave",["pointerout","pointerover"]),Be("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Be("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Be("onBeforeInput",["compositionend","keypress","textInput","paste"]),Be("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Be("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Be("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ws=new Set("cancel close invalid load scroll toggle".split(" ").concat(qr));function Vs(e,n,o){var s=e.type||"unknown-event";e.currentTarget=o,pi(s,n,void 0,e),e.currentTarget=null}function Hs(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var s=e[o],u=s.event;s=s.listeners;e:{var f=void 0;if(n)for(var m=s.length-1;0<=m;m--){var y=s[m],w=y.instance,C=y.currentTarget;if(y=y.listener,w!==f&&u.isPropagationStopped())break e;Vs(u,y,C),f=w}else for(m=0;m<s.length;m++){if(y=s[m],w=y.instance,C=y.currentTarget,y=y.listener,w!==f&&u.isPropagationStopped())break e;Vs(u,y,C),f=w}}}if(Gn)throw e=cr,Gn=!1,cr=null,e}function Xe(e,n){var o=ju(n),s=e+"__bubble";o.has(s)||(Ou(n,e,2,!1),o.add(s))}var $s="_reactListening"+Math.random().toString(36).slice(2);function Ri(e){e[$s]||(e[$s]=!0,xt.forEach(function(n){Ws.has(n)||hl(n,!1,e,null),hl(n,!0,e,null)}))}function hl(e,n,o,s){var u=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,f=o;if(e==="selectionchange"&&o.nodeType!==9&&(f=o.ownerDocument),s!==null&&!n&&Ws.has(e)){if(e!=="scroll")return;u|=2,f=s}var m=ju(f),y=e+"__"+(n?"capture":"bubble");m.has(y)||(n&&(u|=4),Ou(f,e,u,n),m.add(y))}function Ou(e,n,o,s){var u=ws.get(n);switch(u===void 0?2:u){case 0:u=Wc;break;case 1:u=Es;break;default:u=Ss}o=u.bind(null,n,o,e),u=void 0,!Gt||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),s?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 Qs(e,n,o,s,u){var f=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var m=s.tag;if(m===3||m===4){var y=s.stateNode.containerInfo;if(y===u||y.nodeType===8&&y.parentNode===u)break;if(m===4)for(m=s.return;m!==null;){var w=m.tag;if((w===3||w===4)&&(w=m.stateNode.containerInfo,w===u||w.nodeType===8&&w.parentNode===u))return;m=m.return}for(;y!==null;){if(m=yr(y),m===null)return;if(w=m.tag,w===5||w===6){s=f=m;continue e}y=y.parentNode}}s=s.return}Jo(function(){var C=f,V=An(o),ve=[];e:{var F=ou.get(e);if(F!==void 0){var ee=fo,he=e;switch(e){case"keypress":if(_i(o)===0)break e;case"keydown":case"keyup":ee=pu;break;case"focusin":he="focus",ee=Cs;break;case"focusout":he="blur",ee=Cs;break;case"beforeblur":case"afterblur":ee=Cs;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":ee=uu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Hc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=mu;break;case tu:case nu:case ru:ee=du;break;case iu:ee=yu;break;case"scroll":ee=kt;break;case"wheel":ee=Is;break;case"copy":case"cut":case"paste":ee=Kc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=bs}var ae=(n&4)!==0,T=!ae&&e==="scroll",_=ae?F!==null?F+"Capture":null:F;ae=[];for(var E=C,I;E!==null;){I=E;var D=I.stateNode;if(I.tag===5&&D!==null&&(I=D,_!==null&&(D=jn(E,_),D!=null&&ae.push(bi(E,D,I)))),T)break;E=E.return}0<ae.length&&(F=new ee(F,he,null,o,V),ve.push({event:F,listeners:ae}))}}if((n&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",F&&(n&16)===0&&(he=o.relatedTarget||o.fromElement)&&(yr(he)||he[gr]))break e;if((ee||F)&&(F=V.window===V?V:(F=V.ownerDocument)?F.defaultView||F.parentWindow:window,ee?(he=o.relatedTarget||o.toElement,ee=C,he=he?yr(he):null,he!==null&&(T=Yt(he),he!==T||he.tag!==5&&he.tag!==6)&&(he=null)):(ee=null,he=C),ee!==he)){if(ae=uu,D="onMouseLeave",_="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ae=bs,D="onPointerLeave",_="onPointerEnter",E="pointer"),T=ee==null?F:Ni(ee),I=he==null?F:Ni(he),F=new ae(D,E+"leave",ee,o,V),F.target=T,F.relatedTarget=I,D=null,yr(V)===C&&(ae=new ae(_,E+"enter",he,o,V),ae.target=I,ae.relatedTarget=T,D=ae),T=D,ee&&he)t:{for(ae=ee,_=he,E=0,I=ae;I;I=Ii(I))E++;for(I=0,D=_;D;D=Ii(D))I++;for(;0<E-I;)ae=Ii(ae),E--;for(;0<I-E;)_=Ii(_),I--;for(;E--;){if(ae===_||_!==null&&ae===_.alternate)break t;ae=Ii(ae),_=Ii(_)}ae=null}else ae=null;ee!==null&&Ks(ve,F,ee,ae,!1),he!==null&&T!==null&&Ks(ve,T,he,ae,!0)}}e:{if(F=C?Ni(C):window,ee=F.nodeName&&F.nodeName.toLowerCase(),ee==="select"||ee==="input"&&F.type==="file")var we=St;else if(Ns(F))if(rt)we=Ms;else{we=ku;var G=Pu}else(ee=F.nodeName)&&ee.toLowerCase()==="input"&&(F.type==="checkbox"||F.type==="radio")&&(we=Fs);if(we&&(we=we(e,C))){Cu(ve,we,o,V);break e}G&&G(e,F,C),e==="focusout"&&(G=F._wrapperState)&&G.controlled&&F.type==="number"&&di(F,"number",F.value)}switch(G=C?Ni(C):window,e){case"focusin":(Ns(G)||G.contentEditable==="true")&&(ki=G,Bs=C,vo=null);break;case"focusout":vo=Bs=ki=null;break;case"mousedown":Us=!0;break;case"contextmenu":case"mouseup":case"dragend":Us=!1,Iu(ve,o,V);break;case"selectionchange":if(zs)break;case"keydown":case"keyup":Iu(ve,o,V)}var _e;if(Os)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else Ti?Cn(e,o)&&(be="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(be="onCompositionStart");be&&(Jt&&o.locale!=="ko"&&(Ti||be!=="onCompositionStart"?be==="onCompositionEnd"&&Ti&&(_e=gt()):(R=V,an="value"in R?R.value:R.textContent,Ti=!0)),G=ml(C,be),0<G.length&&(be=new Ps(be,e,null,o,V),ve.push({event:be,listeners:G}),_e?be.data=_e:(_e=xu(o),_e!==null&&(be.data=_e)))),(_e=wu?Eu(e,o):Su(e,o))&&(C=ml(C,"onBeforeInput"),0<C.length&&(V=new Ps("onBeforeInput","beforeinput",null,o,V),ve.push({event:V,listeners:C}),V.data=_e))}Hs(ve,n)})}function bi(e,n,o){return{instance:e,listener:n,currentTarget:o}}function ml(e,n){for(var o=n+"Capture",s=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=jn(e,o),f!=null&&s.unshift(bi(e,f,u)),f=jn(e,n),f!=null&&s.push(bi(e,f,u))),e=e.return}return s}function Ii(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ks(e,n,o,s,u){for(var f=n._reactName,m=[];o!==null&&o!==s;){var y=o,w=y.alternate,C=y.stateNode;if(w!==null&&w===s)break;y.tag===5&&C!==null&&(y=C,u?(w=jn(o,f),w!=null&&m.unshift(bi(o,w,y))):u||(w=jn(o,f),w!=null&&m.push(bi(o,w,y)))),o=o.return}m.length!==0&&e.push({event:n,listeners:m})}function gl(){}var yl=null,Gs=null;function Nu(e,n){switch(e){case"button":case"input":case"select":case"textarea":return!!n.autoFocus}return!1}function Ys(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 vt(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Oi(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break}return e}function vl(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 qs=0;function qc(e){return{$$typeof:O,toString:e,valueOf:e}}var wo=Math.random().toString(36).slice(2),er="__reactFiber$"+wo,wl="__reactProps$"+wo,gr="__reactContainer$"+wo,Au="__reactEvents$"+wo;function yr(e){var n=e[er];if(n)return n;for(var o=e.parentNode;o;){if(n=o[gr]||o[er]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=vl(e);e!==null;){if(o=e[er])return o;e=vl(e)}return n}e=o,o=e.parentNode}return null}function _o(e){return e=e[er]||e[gr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ni(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function Di(e){return e[wl]||null}function ju(e){var n=e[Au];return n===void 0&&(n=e[Au]=new Set),n}var st=[],et=-1;function vr(e){return{current:e}}function Ke(e){0>et||(e.current=st[et],st[et]=null,et--)}function at(e,n){et++,st[et]=e.current,e.current=n}var wr={},Tt=vr(wr),Bt=vr(!1),tr=wr;function Ai(e,n){var o=e.type.contextTypes;if(!o)return wr;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in o)u[f]=n[f];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function Ut(e){return e=e.childContextTypes,e!=null}function xo(){Ke(Bt),Ke(Tt)}function Xs(e,n,o){if(Tt.current!==wr)throw Error(N(168));at(Tt,n),at(Bt,o)}function Lu(e,n,o){var s=e.stateNode;if(e=n.childContextTypes,typeof s.getChildContext!="function")return o;s=s.getChildContext();for(var u in s)if(!(u in e))throw Error(N(108,Br(n)||"Unknown",u));return xe({},o,s)}function ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wr,tr=Tt.current,at(Tt,e),at(Bt,Bt.current),!0}function Fu(e,n,o){var s=e.stateNode;if(!s)throw Error(N(169));o?(e=Lu(e,n,tr),s.__reactInternalMemoizedMergedChildContext=e,Ke(Bt),Ke(Tt),at(Tt,e)):Ke(Bt),at(Bt,o)}var Js=null,Bn=null,Mu=Ae.unstable_runWithPriority,ea=Ae.unstable_scheduleCallback,Eo=Ae.unstable_cancelCallback,Xc=Ae.unstable_shouldYield,zu=Ae.unstable_requestPaint,ta=Ae.unstable_now,Jc=Ae.unstable_getCurrentPriorityLevel,_l=Ae.unstable_ImmediatePriority,xl=Ae.unstable_UserBlockingPriority,Bu=Ae.unstable_NormalPriority,Uu=Ae.unstable_LowPriority,na=Ae.unstable_IdlePriority,El={},ed=zu!==void 0?zu:function(){},Pn=null,So=null,ra=!1,Zu=ta(),Ge=1e4>Zu?ta:function(){return ta()-Zu};function Rt(){switch(Jc()){case _l:return 99;case xl:return 98;case Bu:return 97;case Uu:return 96;case na:return 95;default:throw Error(N(332))}}function Wu(e){switch(e){case 99:return _l;case 98:return xl;case 97:return Bu;case 96:return Uu;case 95:return na;default:throw Error(N(332))}}function nr(e,n){return e=Wu(e),Mu(e,n)}function To(e,n,o){return e=Wu(e),ea(e,n,o)}function Un(){if(So!==null){var e=So;So=null,Eo(e)}Vu()}function Vu(){if(!ra&&Pn!==null){ra=!0;var e=0;try{var n=Pn;nr(99,function(){for(;e<n.length;e++){var o=n[e];do o=o(!0);while(o!==null)}}),Pn=null}catch(o){throw Pn!==null&&(Pn=Pn.slice(e+1)),ea(_l,Un),o}finally{ra=!1}}}var Hu=De.ReactCurrentBatchConfig;function en(e,n){if(e&&e.defaultProps){n=xe({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}var Sl=vr(null),Tl=null,Li=null,Co=null;function ia(){Co=Li=Tl=null}function oa(e){var n=Sl.current;Ke(Sl),e.type._context._currentValue=n}function Cl(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 Fi(e,n){Tl=e,Co=Li=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(Ye=!0),e.firstContext=null)}function un(e,n){if(Co!==e&&n!==!1&&n!==0)if((typeof n!="number"||n===1073741823)&&(Co=e,n=1073741823),n={context:e,observedBits:n,next:null},Li===null){if(Tl===null)throw Error(N(308));Li=n,Tl.dependencies={lanes:0,firstContext:n,responders:null}}else Li=Li.next=n;return e._currentValue}var ye=!1;function Ue(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 Ot(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Zn(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,s=e.alternate;if(s!==null&&(s=s.updateQueue,o===s)){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:s.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:s.shared,effects:s.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function Xr(e,n,o,s){var u=e.updateQueue;ye=!1;var f=u.firstBaseUpdate,m=u.lastBaseUpdate,y=u.shared.pending;if(y!==null){u.shared.pending=null;var w=y,C=w.next;w.next=null,m===null?f=C:m.next=C,m=w;var V=e.alternate;if(V!==null){V=V.updateQueue;var ve=V.lastBaseUpdate;ve!==m&&(ve===null?V.firstBaseUpdate=C:ve.next=C,V.lastBaseUpdate=w)}}if(f!==null){ve=u.baseState,m=0,V=C=w=null;do{y=f.lane;var F=f.eventTime;if((s&y)===y){V!==null&&(V=V.next={eventTime:F,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});e:{var ee=e,he=f;switch(y=n,F=o,he.tag){case 1:if(ee=he.payload,typeof ee=="function"){ve=ee.call(F,ve,y);break e}ve=ee;break e;case 3:ee.flags=ee.flags&-4097|64;case 0:if(ee=he.payload,y=typeof ee=="function"?ee.call(F,ve,y):ee,y==null)break e;ve=xe({},ve,y);break e;case 2:ye=!0}}f.callback!==null&&(e.flags|=32,y=u.effects,y===null?u.effects=[f]:y.push(f))}else F={eventTime:F,lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},V===null?(C=V=F,w=ve):V=V.next=F,m|=y;if(f=f.next,f===null){if(y=u.shared.pending,y===null)break;f=y.next,y.next=null,u.lastBaseUpdate=y,u.shared.pending=null}}while(!0);V===null&&(w=ve),u.baseState=w,u.firstBaseUpdate=C,u.lastBaseUpdate=V,Pr|=m,e.lanes=m,e.memoizedState=ve}}function Ku(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var s=e[n],u=s.callback;if(u!==null){if(s.callback=null,s=o,typeof u!="function")throw Error(N(191,u));u.call(s)}}}var Gu=new ze.Component().refs;function Pl(e,n,o,s){n=e.memoizedState,o=o(s,n),o=o==null?n:xe({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var kl={isMounted:function(e){return(e=e._reactInternals)?Yt(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var s=Vt(),u=or(e),f=Ot(s,u);f.payload=n,o!=null&&(f.callback=o),Zn(e,f),In(e,u,s)},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var s=Vt(),u=or(e),f=Ot(s,u);f.tag=1,f.payload=n,o!=null&&(f.callback=o),Zn(e,f),In(e,u,s)},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=Vt(),s=or(e),u=Ot(o,s);u.tag=2,n!=null&&(u.callback=n),Zn(e,u),In(e,s,o)}};function Yu(e,n,o,s,u,f,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,m):n.prototype&&n.prototype.isPureReactComponent?!mr(o,s)||!mr(u,f):!0}function Rl(e,n,o){var s=!1,u=wr,f=n.contextType;return typeof f=="object"&&f!==null?f=un(f):(u=Ut(n)?tr:Tt.current,s=n.contextTypes,f=(s=s!=null)?Ai(e,u):wr),n=new n(o,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=kl,e.stateNode=n,n._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function qu(e,n,o,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,s),n.state!==e&&kl.enqueueReplaceState(n,n.state,null)}function bl(e,n,o,s){var u=e.stateNode;u.props=o,u.state=e.memoizedState,u.refs=Gu,Ue(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=un(f):(f=Ut(n)?tr:Tt.current,u.context=Ai(e,f)),Xr(e,o,u,s),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(Pl(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&&kl.enqueueReplaceState(u,u.state,null),Xr(e,o,u,s),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4)}var Il=Array.isArray;function Po(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(N(309));var s=o.stateNode}if(!s)throw Error(N(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=s.refs;m===Gu&&(m=s.refs={}),f===null?delete m[u]:m[u]=f},n._stringRef=u,n)}if(typeof e!="string")throw Error(N(284));if(!o._owner)throw Error(N(290,e))}return e}function Mi(e,n){if(e.type!=="textarea")throw Error(N(31,Object.prototype.toString.call(n)==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":n))}function ko(e){function n(T,_){if(e){var E=T.lastEffect;E!==null?(E.nextEffect=_,T.lastEffect=_):T.firstEffect=T.lastEffect=_,_.nextEffect=null,_.flags=8}}function o(T,_){if(!e)return null;for(;_!==null;)n(T,_),_=_.sibling;return null}function s(T,_){for(T=new Map;_!==null;)_.key!==null?T.set(_.key,_):T.set(_.index,_),_=_.sibling;return T}function u(T,_){return T=Ar(T,_),T.index=0,T.sibling=null,T}function f(T,_,E){return T.index=E,e?(E=T.alternate,E!==null?(E=E.index,E<_?(T.flags=2,_):E):(T.flags=2,_)):_}function m(T){return e&&T.alternate===null&&(T.flags=2),T}function y(T,_,E,I){return _===null||_.tag!==6?(_=ls(E,T.mode,I),_.return=T,_):(_=u(_,E),_.return=T,_)}function w(T,_,E,I){return _!==null&&_.elementType===E.type?(I=u(_,E.props),I.ref=Po(T,_,E),I.return=T,I):(I=eo(E.type,E.key,E.props,null,T.mode,I),I.ref=Po(T,_,E),I.return=T,I)}function C(T,_,E,I){return _===null||_.tag!==4||_.stateNode.containerInfo!==E.containerInfo||_.stateNode.implementation!==E.implementation?(_=Vo(E,T.mode,I),_.return=T,_):(_=u(_,E.children||[]),_.return=T,_)}function V(T,_,E,I,D){return _===null||_.tag!==7?(_=jr(E,T.mode,I,D),_.return=T,_):(_=u(_,E),_.return=T,_)}function ve(T,_,E){if(typeof _=="string"||typeof _=="number")return _=ls(""+_,T.mode,E),_.return=T,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Qe:return E=eo(_.type,_.key,_.props,null,T.mode,E),E.ref=Po(T,null,_),E.return=T,E;case M:return _=Vo(_,T.mode,E),_.return=T,_}if(Il(_)||de(_))return _=jr(_,T.mode,E,null),_.return=T,_;Mi(T,_)}return null}function F(T,_,E,I){var D=_!==null?_.key:null;if(typeof E=="string"||typeof E=="number")return D!==null?null:y(T,_,""+E,I);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Qe:return E.key===D?E.type===Ne?V(T,_,E.props.children,I,D):w(T,_,E,I):null;case M:return E.key===D?C(T,_,E,I):null}if(Il(E)||de(E))return D!==null?null:V(T,_,E,I,null);Mi(T,E)}return null}function ee(T,_,E,I,D){if(typeof I=="string"||typeof I=="number")return T=T.get(E)||null,y(_,T,""+I,D);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case Qe:return T=T.get(I.key===null?E:I.key)||null,I.type===Ne?V(_,T,I.props.children,D,I.key):w(_,T,I,D);case M:return T=T.get(I.key===null?E:I.key)||null,C(_,T,I,D)}if(Il(I)||de(I))return T=T.get(E)||null,V(_,T,I,D,null);Mi(_,I)}return null}function he(T,_,E,I){for(var D=null,we=null,G=_,_e=_=0,be=null;G!==null&&_e<E.length;_e++){G.index>_e?(be=G,G=null):be=G.sibling;var Te=F(T,G,E[_e],I);if(Te===null){G===null&&(G=be);break}e&&G&&Te.alternate===null&&n(T,G),_=f(Te,_,_e),we===null?D=Te:we.sibling=Te,we=Te,G=be}if(_e===E.length)return o(T,G),D;if(G===null){for(;_e<E.length;_e++)G=ve(T,E[_e],I),G!==null&&(_=f(G,_,_e),we===null?D=G:we.sibling=G,we=G);return D}for(G=s(T,G);_e<E.length;_e++)be=ee(G,T,_e,E[_e],I),be!==null&&(e&&be.alternate!==null&&G.delete(be.key===null?_e:be.key),_=f(be,_,_e),we===null?D=be:we.sibling=be,we=be);return e&&G.forEach(function(On){return n(T,On)}),D}function ae(T,_,E,I){var D=de(E);if(typeof D!="function")throw Error(N(150));if(E=D.call(E),E==null)throw Error(N(151));for(var we=D=null,G=_,_e=_=0,be=null,Te=E.next();G!==null&&!Te.done;_e++,Te=E.next()){G.index>_e?(be=G,G=null):be=G.sibling;var On=F(T,G,Te.value,I);if(On===null){G===null&&(G=be);break}e&&G&&On.alternate===null&&n(T,G),_=f(On,_,_e),we===null?D=On:we.sibling=On,we=On,G=be}if(Te.done)return o(T,G),D;if(G===null){for(;!Te.done;_e++,Te=E.next())Te=ve(T,Te.value,I),Te!==null&&(_=f(Te,_,_e),we===null?D=Te:we.sibling=Te,we=Te);return D}for(G=s(T,G);!Te.done;_e++,Te=E.next())Te=ee(G,T,_e,Te.value,I),Te!==null&&(e&&Te.alternate!==null&&G.delete(Te.key===null?_e:Te.key),_=f(Te,_,_e),we===null?D=Te:we.sibling=Te,we=Te);return e&&G.forEach(function(id){return n(T,id)}),D}return function(T,_,E,I){var D=typeof E=="object"&&E!==null&&E.type===Ne&&E.key===null;D&&(E=E.props.children);var we=typeof E=="object"&&E!==null;if(we)switch(E.$$typeof){case Qe:e:{for(we=E.key,D=_;D!==null;){if(D.key===we){switch(D.tag){case 7:if(E.type===Ne){o(T,D.sibling),_=u(D,E.props.children),_.return=T,T=_;break e}break;default:if(D.elementType===E.type){o(T,D.sibling),_=u(D,E.props),_.ref=Po(T,D,E),_.return=T,T=_;break e}}o(T,D);break}else n(T,D);D=D.sibling}E.type===Ne?(_=jr(E.props.children,T.mode,I,E.key),_.return=T,T=_):(I=eo(E.type,E.key,E.props,null,T.mode,I),I.ref=Po(T,_,E),I.return=T,T=I)}return m(T);case M:e:{for(D=E.key;_!==null;){if(_.key===D)if(_.tag===4&&_.stateNode.containerInfo===E.containerInfo&&_.stateNode.implementation===E.implementation){o(T,_.sibling),_=u(_,E.children||[]),_.return=T,T=_;break e}else{o(T,_);break}else n(T,_);_=_.sibling}_=Vo(E,T.mode,I),_.return=T,T=_}return m(T)}if(typeof E=="string"||typeof E=="number")return E=""+E,_!==null&&_.tag===6?(o(T,_.sibling),_=u(_,E),_.return=T,T=_):(o(T,_),_=ls(E,T.mode,I),_.return=T,T=_),m(T);if(Il(E))return he(T,_,E,I);if(de(E))return ae(T,_,E,I);if(we&&Mi(T,E),typeof E>"u"&&!D)switch(T.tag){case 1:case 22:case 0:case 11:case 15:throw Error(N(152,Br(T.type)||"Component"))}return o(T,_)}}var _r=ko(!0),zi=ko(!1),Ro={},cn=vr(Ro),bo=vr(Ro),Io=vr(Ro);function dn(e){if(e===Ro)throw Error(N(174));return e}function xr(e,n){switch(at(Io,n),at(bo,e),at(cn,Ro),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:hs(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=hs(n,e)}Ke(cn),at(cn,n)}function Bi(){Ke(cn),Ke(bo),Ke(Io)}function Ol(e){dn(Io.current);var n=dn(cn.current),o=hs(n,e.type);n!==o&&(at(bo,e),at(cn,o))}function la(e){bo.current===e&&(Ke(cn),Ke(bo))}var ut=vr(0);function Er(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 tn=null,Sr=null,fn=!1;function Xu(e,n){var o=rn(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 it(e){if(fn){var n=Sr;if(n){var o=n;if(!Ju(e,n)){if(n=Oi(o.nextSibling),!n||!Ju(e,n)){e.flags=e.flags&-1025|2,fn=!1,tn=e;return}Xu(tn,o)}tn=e,Sr=Oi(n.firstChild)}else e.flags=e.flags&-1025|2,fn=!1,tn=e}}function ot(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tn=e}function Nl(e){if(e!==tn)return!1;if(!fn)return ot(e),fn=!0,!1;var n=e.type;if(e.tag!==5||n!=="head"&&n!=="body"&&!Ys(n,e.memoizedProps))for(n=Sr;n;)Xu(e,n),n=Oi(n.nextSibling);if(ot(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){Sr=Oi(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}Sr=null}}else Sr=tn?Oi(e.stateNode.nextSibling):null;return!0}function Oo(){Sr=tn=null,fn=!1}var Ui=[];function Dl(){for(var e=0;e<Ui.length;e++)Ui[e]._workInProgressVersionPrimary=null;Ui.length=0}var No=De.ReactCurrentDispatcher,pn=De.ReactCurrentBatchConfig,Jr=0,dt=null,fe=null,We=null,Zi=!1,Ve=!1;function Zt(){throw Error(N(321))}function sa(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!zt(e[o],n[o]))return!1;return!0}function ec(e,n,o,s,u,f){if(Jr=f,dt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,No.current=e===null||e.memoizedState===null?rc:ma,e=o(s,u),Ve){f=0;do{if(Ve=!1,!(25>f))throw Error(N(301));f+=1,We=fe=null,n.updateQueue=null,No.current=ga,e=o(s,u)}while(Ve)}if(No.current=Rn,n=fe!==null&&fe.next!==null,Jr=0,We=fe=dt=null,Zi=!1,n)throw Error(N(300));return e}function ei(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?dt.memoizedState=We=e:We=We.next=e,We}function q(){if(fe===null){var e=dt.alternate;e=e!==null?e.memoizedState:null}else e=fe.next;var n=We===null?dt.memoizedState:We.next;if(n!==null)We=n,fe=e;else{if(e===null)throw Error(N(310));fe=e,e={memoizedState:fe.memoizedState,baseState:fe.baseState,baseQueue:fe.baseQueue,queue:fe.queue,next:null},We===null?dt.memoizedState=We=e:We=We.next=e}return We}function kn(e,n){return typeof n=="function"?n(e):n}function Wi(e){var n=q(),o=n.queue;if(o===null)throw Error(N(311));o.lastRenderedReducer=e;var s=fe,u=s.baseQueue,f=o.pending;if(f!==null){if(u!==null){var m=u.next;u.next=f.next,f.next=m}s.baseQueue=u=f,o.pending=null}if(u!==null){u=u.next,s=s.baseState;var y=m=f=null,w=u;do{var C=w.lane;if((Jr&C)===C)y!==null&&(y=y.next={lane:0,action:w.action,eagerReducer:w.eagerReducer,eagerState:w.eagerState,next:null}),s=w.eagerReducer===e?w.eagerState:e(s,w.action);else{var V={lane:C,action:w.action,eagerReducer:w.eagerReducer,eagerState:w.eagerState,next:null};y===null?(m=y=V,f=s):y=y.next=V,dt.lanes|=C,Pr|=C}w=w.next}while(w!==null&&w!==u);y===null?f=s:y.next=m,zt(s,n.memoizedState)||(Ye=!0),n.memoizedState=s,n.baseState=f,n.baseQueue=y,o.lastRenderedState=s}return[n.memoizedState,o.dispatch]}function Vi(e){var n=q(),o=n.queue;if(o===null)throw Error(N(311));o.lastRenderedReducer=e;var s=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);zt(f,n.memoizedState)||(Ye=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,s]}function Do(e,n,o){var s=n._getVersion;s=s(n._source);var u=n._workInProgressVersionPrimary;if(u!==null?e=u===s:(e=e.mutableReadLanes,(e=(Jr&e)===e)&&(n._workInProgressVersionPrimary=s,Ui.push(n))),e)return o(n._source);throw Ui.push(n),Error(N(350))}function Al(e,n,o,s){var u=Lt;if(u===null)throw Error(N(349));var f=n._getVersion,m=f(n._source),y=No.current,w=y.useState(function(){return Do(u,n,o)}),C=w[1],V=w[0];w=We;var ve=e.memoizedState,F=ve.refs,ee=F.getSnapshot,he=ve.source;ve=ve.subscribe;var ae=dt;return e.memoizedState={refs:F,source:n,subscribe:s},y.useEffect(function(){F.getSnapshot=o,F.setSnapshot=C;var T=f(n._source);if(!zt(m,T)){T=o(n._source),zt(V,T)||(C(T),T=or(ae),u.mutableReadLanes|=T&u.pendingLanes),T=u.mutableReadLanes,u.entangledLanes|=T;for(var _=u.entanglements,E=T;0<E;){var I=31-qn(E),D=1<<I;_[I]|=T,E&=~D}}},[o,n,s]),y.useEffect(function(){return s(n._source,function(){var T=F.getSnapshot,_=F.setSnapshot;try{_(T(n._source));var E=or(ae);u.mutableReadLanes|=E&u.pendingLanes}catch(I){_(function(){throw I})}})},[n,s]),zt(ee,o)&&zt(he,n)&&zt(ve,s)||(e={pending:null,dispatch:null,lastRenderedReducer:kn,lastRenderedState:V},e.dispatch=C=bt.bind(null,dt,e),w.queue=e,w.baseQueue=null,V=Do(u,n,o),w.memoizedState=w.baseState=V),V}function aa(e,n,o){var s=q();return Al(s,e,n,o)}function Ao(e){var n=ei();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e=n.queue={pending:null,dispatch:null,lastRenderedReducer:kn,lastRenderedState:e},e=e.dispatch=bt.bind(null,dt,e),[n.memoizedState,e]}function Tr(e,n,o,s){return e={tag:e,create:n,destroy:o,deps:s,next:null},n=dt.updateQueue,n===null?(n={lastEffect:null},dt.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(s=o.next,o.next=e,e.next=s,n.lastEffect=e)),e}function Hi(e){var n=ei();return e={current:e},n.memoizedState=e}function jl(){return q().memoizedState}function Ll(e,n,o,s){var u=ei();dt.flags|=e,u.memoizedState=Tr(1|n,o,void 0,s===void 0?null:s)}function ua(e,n,o,s){var u=q();s=s===void 0?null:s;var f=void 0;if(fe!==null){var m=fe.memoizedState;if(f=m.destroy,s!==null&&sa(s,m.deps)){Tr(n,o,f,s);return}}dt.flags|=e,u.memoizedState=Tr(1|n,o,f,s)}function tc(e,n){return Ll(516,4,e,n)}function jo(e,n){return ua(516,4,e,n)}function ca(e,n){return ua(4,2,e,n)}function da(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,ua(4,2,da.bind(null,n,e),o)}function fa(){}function pa(e,n){var o=q();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&sa(n,s[1])?s[0]:(o.memoizedState=[e,n],e)}function ha(e,n){var o=q();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&sa(n,s[1])?s[0]:(e=e(),o.memoizedState=[e,n],e)}function td(e,n){var o=Rt();nr(98>o?98:o,function(){e(!0)}),nr(97<o?97:o,function(){var s=pn.transition;pn.transition=1;try{e(!1),n()}finally{pn.transition=s}})}function bt(e,n,o){var s=Vt(),u=or(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===dt||m!==null&&m===dt)Ve=Zi=!0;else{if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var y=n.lastRenderedState,w=m(y,o);if(f.eagerReducer=m,f.eagerState=w,zt(w,y))return}catch{}In(e,u,s)}}var Rn={readContext:un,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useOpaqueIdentifier:Zt,unstable_isNewReconciler:!1},rc={readContext:un,useCallback:function(e,n){return ei().memoizedState=[e,n===void 0?null:n],e},useContext:un,useEffect:tc,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Ll(4,2,da.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Ll(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 s=ei();return n=o!==void 0?o(n):n,s.memoizedState=s.baseState=n,e=s.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},e=e.dispatch=bt.bind(null,dt,e),[s.memoizedState,e]},useRef:Hi,useState:Ao,useDebugValue:fa,useDeferredValue:function(e){var n=Ao(e),o=n[0],s=n[1];return tc(function(){var u=pn.transition;pn.transition=1;try{s(e)}finally{pn.transition=u}},[e]),o},useTransition:function(){var e=Ao(!1),n=e[0];return e=td.bind(null,e[1]),Hi(e),[e,n]},useMutableSource:function(e,n,o){var s=ei();return s.memoizedState={refs:{getSnapshot:n,setSnapshot:null},source:e,subscribe:o},Al(s,e,n,o)},useOpaqueIdentifier:function(){if(fn){var e=!1,n=qc(function(){throw e||(e=!0,o("r:"+(qs++).toString(36))),Error(N(355))}),o=Ao(n)[1];return(dt.mode&2)===0&&(dt.flags|=516,Tr(5,function(){o("r:"+(qs++).toString(36))},void 0,null)),n}return n="r:"+(qs++).toString(36),Ao(n),n},unstable_isNewReconciler:!1},ma={readContext:un,useCallback:pa,useContext:un,useEffect:jo,useImperativeHandle:nc,useLayoutEffect:ca,useMemo:ha,useReducer:Wi,useRef:jl,useState:function(){return Wi(kn)},useDebugValue:fa,useDeferredValue:function(e){var n=Wi(kn),o=n[0],s=n[1];return jo(function(){var u=pn.transition;pn.transition=1;try{s(e)}finally{pn.transition=u}},[e]),o},useTransition:function(){var e=Wi(kn)[0];return[jl().current,e]},useMutableSource:aa,useOpaqueIdentifier:function(){return Wi(kn)[0]},unstable_isNewReconciler:!1},ga={readContext:un,useCallback:pa,useContext:un,useEffect:jo,useImperativeHandle:nc,useLayoutEffect:ca,useMemo:ha,useReducer:Vi,useRef:jl,useState:function(){return Vi(kn)},useDebugValue:fa,useDeferredValue:function(e){var n=Vi(kn),o=n[0],s=n[1];return jo(function(){var u=pn.transition;pn.transition=1;try{s(e)}finally{pn.transition=u}},[e]),o},useTransition:function(){var e=Vi(kn)[0];return[jl().current,e]},useMutableSource:aa,useOpaqueIdentifier:function(){return Vi(kn)[0]},unstable_isNewReconciler:!1},ic=De.ReactCurrentOwner,Ye=!1;function Nt(e,n,o,s){n.child=e===null?zi(n,null,o,s):_r(n,e.child,o,s)}function ya(e,n,o,s,u){o=o.render;var f=n.ref;return Fi(n,u),s=ec(e,n,o,s,f,u),e!==null&&!Ye?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,bn(e,n,u)):(n.flags|=1,Nt(e,n,s,u),n.child)}function oc(e,n,o,s,u,f){if(e===null){var m=o.type;return typeof m=="function"&&!os(m)&&m.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=m,lc(e,n,m,s,u,f)):(e=eo(o.type,null,s,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:mr,o(u,s)&&e.ref===n.ref)?bn(e,n,f):(n.flags|=1,e=Ar(m,s),e.ref=n.ref,e.return=n,n.child=e)}function lc(e,n,o,s,u,f){if(e!==null&&mr(e.memoizedProps,s)&&e.ref===n.ref)if(Ye=!1,(f&u)!==0)(e.flags&16384)!==0&&(Ye=!0);else return n.lanes=e.lanes,bn(e,n,f);return Fl(e,n,o,s,f)}function va(e,n,o){var s=n.pendingProps,u=s.children,f=e!==null?e.memoizedState:null;if(s.mode==="hidden"||s.mode==="unstable-defer-without-hiding")if((n.mode&4)===0)n.memoizedState={baseLanes:0},ts(n,o);else if((o&1073741824)!==0)n.memoizedState={baseLanes:0},ts(n,f!==null?f.baseLanes:o);else return e=f!==null?f.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e},ts(n,e),null;else f!==null?(s=f.baseLanes|o,n.memoizedState=null):s=o,ts(n,s);return Nt(e,n,u,o),n.child}function wa(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=128)}function Fl(e,n,o,s,u){var f=Ut(o)?tr:Tt.current;return f=Ai(n,f),Fi(n,u),o=ec(e,n,o,s,f,u),e!==null&&!Ye?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,bn(e,n,u)):(n.flags|=1,Nt(e,n,o,u),n.child)}function _a(e,n,o,s,u){if(Ut(o)){var f=!0;ji(n)}else f=!1;if(Fi(n,u),n.stateNode===null)e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),Rl(n,o,s),bl(n,o,s,u),s=!0;else if(e===null){var m=n.stateNode,y=n.memoizedProps;m.props=y;var w=m.context,C=o.contextType;typeof C=="object"&&C!==null?C=un(C):(C=Ut(o)?tr:Tt.current,C=Ai(n,C));var V=o.getDerivedStateFromProps,ve=typeof V=="function"||typeof m.getSnapshotBeforeUpdate=="function";ve||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==s||w!==C)&&qu(n,m,s,C),ye=!1;var F=n.memoizedState;m.state=F,Xr(n,s,m,u),w=n.memoizedState,y!==s||F!==w||Bt.current||ye?(typeof V=="function"&&(Pl(n,o,V,s),w=n.memoizedState),(y=ye||Yu(n,o,y,s,F,w,C))?(ve||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=s,n.memoizedState=w),m.props=s,m.state=w,m.context=C,s=y):(typeof m.componentDidMount=="function"&&(n.flags|=4),s=!1)}else{m=n.stateNode,$u(e,n),y=n.memoizedProps,C=n.type===n.elementType?y:en(n.type,y),m.props=C,ve=n.pendingProps,F=m.context,w=o.contextType,typeof w=="object"&&w!==null?w=un(w):(w=Ut(o)?tr:Tt.current,w=Ai(n,w));var ee=o.getDerivedStateFromProps;(V=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==ve||F!==w)&&qu(n,m,s,w),ye=!1,F=n.memoizedState,m.state=F,Xr(n,s,m,u);var he=n.memoizedState;y!==ve||F!==he||Bt.current||ye?(typeof ee=="function"&&(Pl(n,o,ee,s),he=n.memoizedState),(C=ye||Yu(n,o,C,s,F,he,w))?(V||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,he,w),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,he,w)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=256)):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=256),n.memoizedProps=s,n.memoizedState=he),m.props=s,m.state=he,m.context=w,s=C):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=256),s=!1)}return xa(e,n,o,s,f,u)}function xa(e,n,o,s,u,f){wa(e,n);var m=(n.flags&64)!==0;if(!s&&!m)return u&&Fu(n,o,!1),bn(e,n,f);s=n.stateNode,ic.current=n;var y=m&&typeof o.getDerivedStateFromError!="function"?null:s.render();return n.flags|=1,e!==null&&m?(n.child=_r(n,e.child,null,f),n.child=_r(n,null,y,f)):Nt(e,n,y,f),n.memoizedState=s.state,u&&Fu(n,o,!0),n.child}function Dt(e){var n=e.stateNode;n.pendingContext?Xs(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Xs(e,n.context,!1),xr(e,n.containerInfo)}var Lo={dehydrated:null,retryLane:0};function Ea(e,n,o){var s=n.pendingProps,u=ut.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||s.fallback===void 0||s.unstable_avoidThisFallback===!0||(u|=1),at(ut,u&1),e===null?(s.fallback!==void 0&&it(n),e=s.children,u=s.fallback,f?(e=Ml(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Lo,e):typeof s.unstable_expectedLoadTime=="number"?(e=Ml(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Lo,n.lanes=33554432,e):(o=Wo({mode:"visible",children:e},n.mode,o,null),o.return=n,n.child=o)):e.memoizedState!==null?f?(s=Sa(e,n,s.children,s.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=Lo,s):(o=sc(e,n,s.children,o),n.memoizedState=null,o):f?(s=Sa(e,n,s.children,s.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=Lo,s):(o=sc(e,n,s.children,o),n.memoizedState=null,o)}function Ml(e,n,o,s){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=Wo(n,u,0,null),o=jr(o,u,s,null),f.return=e,o.return=e,f.sibling=o,e.child=f,o}function sc(e,n,o,s){var u=e.child;return e=u.sibling,o=Ar(u,{mode:"visible",children:o}),(n.mode&2)===0&&(o.lanes=s),o.return=n,o.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,n.firstEffect=n.lastEffect=e),n.child=o}function Sa(e,n,o,s,u){var f=n.mode,m=e.child;e=m.sibling;var y={mode:"hidden",children:o};return(f&2)===0&&n.child!==m?(o=n.child,o.childLanes=0,o.pendingProps=y,m=o.lastEffect,m!==null?(n.firstEffect=o.firstEffect,n.lastEffect=m,m.nextEffect=null):n.firstEffect=n.lastEffect=null):o=Ar(m,y),e!==null?s=Ar(e,s):(s=jr(s,f,u,null),s.flags|=2),s.return=n,o.return=n,o.sibling=s,n.child=o,s}function Fo(e,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Cl(e.return,n)}function rr(e,n,o,s,u,f){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:u,lastEffect:f}:(m.isBackwards=n,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=o,m.tailMode=u,m.lastEffect=f)}function Wn(e,n,o){var s=n.pendingProps,u=s.revealOrder,f=s.tail;if(Nt(e,n,s.children,o),s=ut.current,(s&2)!==0)s=s&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&&Fo(e,o);else if(e.tag===19)Fo(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}s&=1}if(at(ut,s),(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&&Er(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),rr(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&&Er(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}rr(n,!0,o,null,f,n.lastEffect);break;case"together":rr(n,!1,null,null,void 0,n.lastEffect);break;default:n.memoizedState=null}return n.child}function bn(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),Pr|=n.lanes,(o&n.childLanes)!==0){if(e!==null&&n.child!==e.child)throw Error(N(153));if(n.child!==null){for(e=n.child,o=Ar(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Ar(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}return null}var zl,Bl,Ul,Zl;zl=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}},Bl=function(){},Ul=function(e,n,o,s){var u=e.memoizedProps;if(u!==s){e=n.stateNode,dn(cn.current);var f=null;switch(o){case"input":u=Yo(e,u),s=Yo(e,s),f=[];break;case"option":u=$t(e,u),s=$t(e,s),f=[];break;case"select":u=xe({},u,{value:void 0}),s=xe({},s,{value:void 0}),f=[];break;case"textarea":u=ge(e,u),s=ge(e,s),f=[];break;default:typeof u.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=gl)}vn(o,s);var m;o=null;for(C in u)if(!s.hasOwnProperty(C)&&u.hasOwnProperty(C)&&u[C]!=null)if(C==="style"){var y=u[C];for(m in y)y.hasOwnProperty(m)&&(o||(o={}),o[m]="")}else C!=="dangerouslySetInnerHTML"&&C!=="children"&&C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&C!=="autoFocus"&&($e.hasOwnProperty(C)?f||(f=[]):(f=f||[]).push(C,null));for(C in s){var w=s[C];if(y=u?.[C],s.hasOwnProperty(C)&&w!==y&&(w!=null||y!=null))if(C==="style")if(y){for(m in y)!y.hasOwnProperty(m)||w&&w.hasOwnProperty(m)||(o||(o={}),o[m]="");for(m in w)w.hasOwnProperty(m)&&y[m]!==w[m]&&(o||(o={}),o[m]=w[m])}else o||(f||(f=[]),f.push(C,o)),o=w;else C==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,y=y?y.__html:void 0,w!=null&&y!==w&&(f=f||[]).push(C,w)):C==="children"?typeof w!="string"&&typeof w!="number"||(f=f||[]).push(C,""+w):C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&($e.hasOwnProperty(C)?(w!=null&&C==="onScroll"&&Xe("scroll",e),f||y===w||(f=[])):typeof w=="object"&&w!==null&&w.$$typeof===O?w.toString():(f=f||[]).push(C,w))}o&&(f=f||[]).push("style",o);var C=f;(n.updateQueue=C)&&(n.flags|=4)}},Zl=function(e,n,o,s){o!==s&&(n.flags|=4)};function ti(e,n){if(!fn)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 s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ta(e,n,o){var s=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 Ut(n.type)&&xo(),null;case 3:return Bi(),Ke(Bt),Ke(Tt),Dl(),s=n.stateNode,s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Nl(n)?n.flags|=4:s.hydrate||(n.flags|=256)),Bl(n),null;case 5:la(n);var u=dn(Io.current);if(o=n.type,e!==null&&n.stateNode!=null)Ul(e,n,o,s,u),e.ref!==n.ref&&(n.flags|=128);else{if(!s){if(n.stateNode===null)throw Error(N(166));return null}if(e=dn(cn.current),Nl(n)){s=n.stateNode,o=n.type;var f=n.memoizedProps;switch(s[er]=n,s[wl]=f,o){case"dialog":Xe("cancel",s),Xe("close",s);break;case"iframe":case"object":case"embed":Xe("load",s);break;case"video":case"audio":for(e=0;e<qr.length;e++)Xe(qr[e],s);break;case"source":Xe("error",s);break;case"img":case"image":case"link":Xe("error",s),Xe("load",s);break;case"details":Xe("toggle",s);break;case"input":It(s,f),Xe("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!f.multiple},Xe("invalid",s);break;case"textarea":Se(s,f),Xe("invalid",s)}vn(o,f),e=null;for(var m in f)f.hasOwnProperty(m)&&(u=f[m],m==="children"?typeof u=="string"?s.textContent!==u&&(e=["children",u]):typeof u=="number"&&s.textContent!==""+u&&(e=["children",""+u]):$e.hasOwnProperty(m)&&u!=null&&m==="onScroll"&&Xe("scroll",s));switch(o){case"input":W(s),ci(s,f,!0);break;case"textarea":W(s),$a(s);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(s.onclick=gl)}s=e,n.updateQueue=s,s!==null&&(n.flags|=4)}else{switch(m=u.nodeType===9?u:u.ownerDocument,e===ps.html&&(e=Qa(o)),e===ps.html?o==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=m.createElement(o,{is:s.is}):(e=m.createElement(o),o==="select"&&(m=e,s.multiple?m.multiple=!0:s.size&&(m.size=s.size))):e=m.createElementNS(e,o),e[er]=n,e[wl]=s,zl(e,n,!1,!1),n.stateNode=e,m=ar(o,s),o){case"dialog":Xe("cancel",e),Xe("close",e),u=s;break;case"iframe":case"object":case"embed":Xe("load",e),u=s;break;case"video":case"audio":for(u=0;u<qr.length;u++)Xe(qr[u],e);u=s;break;case"source":Xe("error",e),u=s;break;case"img":case"image":case"link":Xe("error",e),Xe("load",e),u=s;break;case"details":Xe("toggle",e),u=s;break;case"input":It(e,s),u=Yo(e,s),Xe("invalid",e);break;case"option":u=$t(e,s);break;case"select":e._wrapperState={wasMultiple:!!s.multiple},u=xe({},s,{value:void 0}),Xe("invalid",e);break;case"textarea":Se(e,s),u=ge(e,s),Xe("invalid",e);break;default:u=s}vn(o,u);var y=u;for(f in y)if(y.hasOwnProperty(f)){var w=y[f];f==="style"?ms(e,w):f==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,w!=null&&Ka(e,w)):f==="children"?typeof w=="string"?(o!=="textarea"||w!=="")&&io(e,w):typeof w=="number"&&io(e,""+w):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&($e.hasOwnProperty(f)?w!=null&&f==="onScroll"&&Xe("scroll",e):w!=null&&Re(e,f,w,m))}switch(o){case"input":W(e),ci(e,s,!1);break;case"textarea":W(e),$a(e);break;case"option":s.value!=null&&e.setAttribute("value",""+on(s.value));break;case"select":e.multiple=!!s.multiple,f=s.value,f!=null?Ur(e,!!s.multiple,f,!1):s.defaultValue!=null&&Ur(e,!!s.multiple,s.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=gl)}Nu(o,s)&&(n.flags|=4)}n.ref!==null&&(n.flags|=128)}return null;case 6:if(e&&n.stateNode!=null)Zl(e,n,e.memoizedProps,s);else{if(typeof s!="string"&&n.stateNode===null)throw Error(N(166));o=dn(Io.current),dn(cn.current),Nl(n)?(s=n.stateNode,o=n.memoizedProps,s[er]=n,s.nodeValue!==o&&(n.flags|=4)):(s=(o.nodeType===9?o:o.ownerDocument).createTextNode(s),s[er]=n,n.stateNode=s)}return null;case 13:return Ke(ut),s=n.memoizedState,(n.flags&64)!==0?(n.lanes=o,n):(s=s!==null,o=!1,e===null?n.memoizedProps.fallback!==void 0&&Nl(n):o=e.memoizedState!==null,s&&!o&&(n.mode&2)!==0&&(e===null&&n.memoizedProps.unstable_avoidThisFallback!==!0||(ut.current&1)!==0?lt===0&&(lt=3):((lt===0||lt===3)&&(lt=4),Lt===null||(Pr&134217727)===0&&(ir&134217727)===0||Xi(Lt,At))),(s||o)&&(n.flags|=4),null);case 4:return Bi(),Bl(n),e===null&&Ri(n.stateNode.containerInfo),null;case 10:return oa(n),null;case 17:return Ut(n.type)&&xo(),null;case 19:if(Ke(ut),s=n.memoizedState,s===null)return null;if(f=(n.flags&64)!==0,m=s.rendering,m===null)if(f)ti(s,!1);else{if(lt!==0||e!==null&&(e.flags&64)!==0)for(e=n.child;e!==null;){if(m=Er(e),m!==null){for(n.flags|=64,ti(s,!1),f=m.updateQueue,f!==null&&(n.updateQueue=f,n.flags|=4),s.lastEffect===null&&(n.firstEffect=null),n.lastEffect=s.lastEffect,s=o,o=n.child;o!==null;)f=o,e=s,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 at(ut,ut.current&1|2),n.child}e=e.sibling}s.tail!==null&&Ge()>ql&&(n.flags|=64,f=!0,ti(s,!1),n.lanes=33554432)}else{if(!f)if(e=Er(m),e!==null){if(n.flags|=64,f=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),ti(s,!0),s.tail===null&&s.tailMode==="hidden"&&!m.alternate&&!fn)return n=n.lastEffect=s.lastEffect,n!==null&&(n.nextEffect=null),null}else 2*Ge()-s.renderingStartTime>ql&&o!==1073741824&&(n.flags|=64,f=!0,ti(s,!1),n.lanes=33554432);s.isBackwards?(m.sibling=n.child,n.child=m):(o=s.last,o!==null?o.sibling=m:n.child=m,s.last=m)}return s.tail!==null?(o=s.tail,s.rendering=o,s.tail=o.sibling,s.lastEffect=n.lastEffect,s.renderingStartTime=Ge(),o.sibling=null,n=ut.current,at(ut,f?n&1|2:n&1),o):null;case 23:case 24:return Aa(),e!==null&&e.memoizedState!==null!=(n.memoizedState!==null)&&s.mode!=="unstable-defer-without-hiding"&&(n.flags|=4),null}throw Error(N(156,n.tag))}function Wl(e){switch(e.tag){case 1:Ut(e.type)&&xo();var n=e.flags;return n&4096?(e.flags=n&-4097|64,e):null;case 3:if(Bi(),Ke(Bt),Ke(Tt),Dl(),n=e.flags,(n&64)!==0)throw Error(N(285));return e.flags=n&-4097|64,e;case 5:return la(e),null;case 13:return Ke(ut),n=e.flags,n&4096?(e.flags=n&-4097|64,e):null;case 19:return Ke(ut),null;case 4:return Bi(),null;case 10:return oa(e),null;case 23:case 24:return Aa(),null;default:return null}}function Ca(e,n){try{var o="",s=n;do o+=Va(s),s=s.return;while(s);var u=o}catch(f){u=`
41
41
  Error generating stack: `+f.message+`
42
- `+f.stack}return{value:e,source:n,stack:u}}function Pa(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var ac=typeof WeakMap=="function"?WeakMap:Map;function ka(e,n,o){o=Ot(-1,o),o.tag=3,o.payload={element:null};var s=n.value;return o.callback=function(){Zo||(Zo=!0,Xl=s),Pa(e,n)},o}function jt(e,n,o){o=Ot(-1,o),o.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var u=n.value;o.payload=function(){return Pa(e,n),s(u)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(o.callback=function(){typeof s!="function"&&(hn===null?hn=new Set([this]):hn.add(this),Pa(e,n));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})}),o}var uc=typeof WeakSet=="function"?WeakSet:Set;function Vl(e){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){Dr(e,o)}else n.current=null}function vt(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,s=e.memoizedState;e=n.stateNode,n=e.getSnapshotBeforeUpdate(n.elementType===n.type?o:en(n.type,o),s),e.__reactInternalSnapshotBeforeUpdate=n}return;case 3:n.flags&256&&yt(n.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(A(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 s=e.create;e.destroy=s()}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;s=u.next,u=u.tag,(u&4)!==0&&(u&1)!==0&&(gc(o,e),Nr(o,e)),e=s}while(e!==n)}return;case 1:e=o.stateNode,o.flags&4&&(n===null?e.componentDidMount():(s=o.elementType===o.type?n.memoizedProps:en(o.type,n.memoizedProps),e.componentDidUpdate(s,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(A(163))}function Hl(e,n){for(var o=e;;){if(o.tag===5){var s=o.stateNode;if(n)s=s.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{s=o.stateNode;var u=o.memoizedProps.style;u=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Qt("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 je(e,n){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(Js,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 s=o,u=s.destroy;if(s=s.tag,u!==void 0)if((s&4)!==0)gc(n,o);else{s=n;try{u()}catch(f){Dr(s,f)}}o=o.next}while(o!==e)}break;case 1:if(Vl(n),e=n.stateNode,typeof e.componentWillUnmount=="function")try{e.props=n.memoizedProps,e.state=n.memoizedState,e.componentWillUnmount()}catch(f){Dr(n,f)}break;case 5:Vl(n);break;case 4:ni(e,n)}}function $l(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 Ra(e){return e.tag===5||e.tag===3||e.tag===4}function Mo(e){e:{for(var n=e.return;n!==null;){if(Ra(n))break e;n=n.return}throw Error(A(160))}var o=n;switch(n=o.stateNode,o.tag){case 5:var s=!1;break;case 3:n=n.containerInfo,s=!0;break;case 4:n=n.containerInfo,s=!0;break;default:throw Error(A(161))}o.flags&16&&(io(n,""),o.flags&=-17);e:t:for(o=e;;){for(;o.sibling===null;){if(o.return===null||Ra(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}}s?zo(e,o,n):Ql(e,o,n)}function zo(e,n,o){var s=e.tag,u=s===5||s===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=gl));else if(s!==4&&(e=e.child,e!==null))for(zo(e,n,o),e=e.sibling;e!==null;)zo(e,n,o),e=e.sibling}function Ql(e,n,o){var s=e.tag,u=s===5||s===6;if(u)e=u?e.stateNode:e.stateNode.instance,n?o.insertBefore(e,n):o.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Ql(e,n,o),e=e.sibling;e!==null;)Ql(e,n,o),e=e.sibling}function ni(e,n){for(var o=n,s=!1,u,f;;){if(!s){s=o.return;e:for(;;){if(s===null)throw Error(A(160));switch(u=s.stateNode,s.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}s=s.return}s=!0}if(o.tag===5||o.tag===6){e:for(var m=e,y=o,w=y;;)if(je(m,w),w.child!==null&&w.tag!==4)w.child.return=w,w=w.child;else{if(w===y)break e;for(;w.sibling===null;){if(w.return===null||w.return===y)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}f?(m=u,y=o.stateNode,m.nodeType===8?m.parentNode.removeChild(y):m.removeChild(y)):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(je(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&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function $i(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 s=o=o.next;do(s.tag&3)===3&&(e=s.destroy,s.destroy=void 0,e!==void 0&&e()),s=s.next;while(s!==o)}return;case 1:return;case 5:if(o=n.stateNode,o!=null){s=n.memoizedProps;var u=e!==null?e.memoizedProps:s;e=n.type;var f=n.updateQueue;if(n.updateQueue=null,f!==null){for(o[wl]=s,e==="input"&&s.type==="radio"&&s.name!=null&&qo(o,s),ar(e,u),n=ar(e,s),u=0;u<f.length;u+=2){var m=f[u],y=f[u+1];m==="style"?ms(o,y):m==="dangerouslySetInnerHTML"?Ka(o,y):m==="children"?io(o,y):Pe(o,m,y,n)}switch(e){case"input":ro(o,s);break;case"textarea":Ha(o,s);break;case"select":e=o._wrapperState.wasMultiple,o._wrapperState.wasMultiple=!!s.multiple,f=s.value,f!=null?Ur(o,!!s.multiple,f,!1):e!==!!s.multiple&&(s.defaultValue!=null?Ur(o,!!s.multiple,s.defaultValue,!0):Ur(o,!!s.multiple,s.multiple?[]:"",!1))}}}return;case 6:if(n.stateNode===null)throw Error(A(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&&(Yl=Ge(),Hl(n.child,!0)),Kl(n);return;case 19:Kl(n);return;case 17:return;case 23:case 24:Hl(n,n.memoizedState!==null);return}throw Error(A(163))}function Kl(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(s){var u=wc.bind(null,e,s);o.has(s)||(o.add(s),s.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 Ia=Math.ceil,Bo=De.ReactCurrentDispatcher,ba=De.ReactCurrentOwner,ce=0,Lt=null,wt=null,At=0,ri=0,Oa=vr(0),ot=0,Uo=null,Cr=0,Pr=0,ir=0,Gl=0,Qi=null,Yl=0,ql=1/0;function kr(){ql=Ge()+500}var $=null,Zo=!1,Xl=null,hn=null,nn=!1,Rr=null,ii=90,Jl=[],Ki=[],Wt=null,Ir=0,br=null,Gi=-1,mn=0,Tt=0,Yi=null,qi=!1;function Vt(){return(ce&48)!==0?Ge():Gi!==-1?Gi:Gi=Ge()}function or(e){if(e=e.mode,(e&2)===0)return 1;if((e&4)===0)return Rt()===99?1:2;if(mn===0&&(mn=Cr),Hu.transition!==0){Tt!==0&&(Tt=Qi!==null?Qi.pendingLanes:0),e=mn;var n=4186112&~Tt;return n&=-n,n===0&&(e=4186112&~e,n=e&-e,n===0&&(n=8192)),n}return e=Rt(),(ce&4)!==0&&e===98?e=x(12,mn):(e=Bc(e),e=x(e,mn)),e}function bn(e,n,o){if(50<Ir)throw Ir=0,br=null,Error(A(185));if(e=Or(e,n),e===null)return null;ol(e,n,o),e===Lt&&(ir|=n,ot===4&&Xi(e,At));var s=Rt();n===1?(ce&8)!==0&&(ce&48)===0?Da(e):(Ht(e,o),ce===0&&(kr(),Un())):((ce&4)===0||s!==98&&s!==99||(Wt===null?Wt=new Set([e]):Wt.add(e)),Ht(e,o)),Qi=e}function Or(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 Ht(e,n){for(var o=e.callbackNode,s=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes;0<m;){var y=31-qn(m),w=1<<y,C=f[y];if(C===-1){if((w&s)===0||(w&u)!==0){C=n,Kr(w);var V=Xe;f[y]=10<=V?C+250:6<=V?C+5e3:-1}}else C<=n&&(e.expiredLanes|=w);m&=~w}if(s=co(e,e===Lt?At:0),n=Xe,s===0)o!==null&&(o!==El&&Eo(o),e.callbackNode=null,e.callbackPriority=0);else{if(o!==null){if(e.callbackPriority===n)return;o!==El&&Eo(o)}n===15?(o=Da.bind(null,e),Pn===null?(Pn=[o],So=ea(_l,Vu)):Pn.push(o),o=El):n===14?o=To(99,Da.bind(null,e)):(o=Uc(n),o=To(o,Na.bind(null,e))),e.callbackPriority=n,e.callbackNode=o}}function Na(e){if(Gi=-1,Tt=mn=0,(ce&48)!==0)throw Error(A(327));var n=e.callbackNode;if(ft()&&e.callbackNode!==n)return null;var o=co(e,e===Lt?At:0);if(o===0)return null;var s=o,u=ce;ce|=16;var f=ja();(Lt!==e||At!==s)&&(kr(),oi(e,s));do try{hc();break}catch(y){pc(e,y)}while(!0);if(ia(),Bo.current=f,ce=u,wt!==null?s=0:(Lt=null,At=0,s=ot),(Cr&ir)!==0)oi(e,0);else if(s!==0){if(s===2&&(ce|=64,e.hydrate&&(e.hydrate=!1,yt(e.containerInfo)),o=lu(e),o!==0&&(s=Ji(e,o))),s===1)throw n=Uo,oi(e,0),Xi(e,o),Ht(e,Ge()),n;switch(e.finishedWork=e.current.alternate,e.finishedLanes=o,s){case 0:case 1:throw Error(A(345));case 2:lr(e);break;case 3:if(Xi(e,o),(o&62914560)===o&&(s=Yl+500-Ge(),10<s)){if(co(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){Vt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Du(lr.bind(null,e),s);break}lr(e);break;case 4:if(Xi(e,o),(o&4186112)===o)break;for(s=e.eventTimes,u=-1;0<o;){var m=31-qn(o);f=1<<m,m=s[m],m>u&&(u=m),o&=~f}if(o=u,o=Ge()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Ia(o/1960))-o,10<o){e.timeoutHandle=Du(lr.bind(null,e),o);break}lr(e);break;case 5:lr(e);break;default:throw Error(A(329))}}return Ht(e,Ge()),e.callbackNode===n?Na.bind(null,e):null}function Xi(e,n){for(n&=~Gl,n&=~ir,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-qn(n),s=1<<o;e[o]=-1,n&=~s}}function Da(e){if((ce&48)!==0)throw Error(A(327));if(ft(),e===Lt&&(e.expiredLanes&At)!==0){var n=At,o=Ji(e,n);(Cr&ir)!==0&&(n=co(e,n),o=Ji(e,n))}else n=co(e,0),o=Ji(e,n);if(e.tag!==0&&o===2&&(ce|=64,e.hydrate&&(e.hydrate=!1,yt(e.containerInfo)),n=lu(e),n!==0&&(o=Ji(e,n))),o===1)throw o=Uo,oi(e,0),Xi(e,n),Ht(e,Ge()),o;return e.finishedWork=e.current.alternate,e.finishedLanes=n,lr(e),Ht(e,Ge()),null}function nd(){if(Wt!==null){var e=Wt;Wt=null,e.forEach(function(n){n.expiredLanes|=24&n.pendingLanes,Ht(n,Ge())})}Un()}function fc(e,n){var o=ce;ce|=1;try{return e(n)}finally{ce=o,ce===0&&(kr(),Un())}}function es(e,n){var o=ce;ce&=-2,ce|=8;try{return e(n)}finally{ce=o,ce===0&&(kr(),Un())}}function ts(e,n){st(Oa,ri),ri|=n,Cr|=n}function Aa(){ri=Oa.current,Ke(Oa)}function oi(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,gt(o)),wt!==null)for(o=wt.return;o!==null;){var s=o;switch(s.tag){case 1:s=s.type.childContextTypes,s!=null&&xo();break;case 3:Bi(),Ke(Bt),Ke(St),Dl();break;case 5:la(s);break;case 4:Bi();break;case 13:Ke(at);break;case 19:Ke(at);break;case 10:oa(s);break;case 23:case 24:Aa()}o=o.return}Lt=e,wt=Ar(e.current,null),At=ri=Cr=n,ot=0,Uo=null,Gl=ir=Pr=0}function pc(e,n){do{var o=wt;try{if(ia(),No.current=Rn,Zi){for(var s=ct.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}Zi=!1}if(Jr=0,Ze=ue=ct=null,We=!1,ba.current=null,o===null||o.return===null){ot=1,Uo=n,wt=null;break}e:{var f=e,m=o.return,y=o,w=n;if(n=At,y.flags|=2048,y.firstEffect=y.lastEffect=null,w!==null&&typeof w=="object"&&typeof w.then=="function"){var C=w;if((y.mode&2)===0){var V=y.alternate;V?(y.updateQueue=V.updateQueue,y.memoizedState=V.memoizedState,y.lanes=V.lanes):(y.updateQueue=null,y.memoizedState=null)}var ye=(at.current&1)!==0,F=m;do{var ee;if(ee=F.tag===13){var de=F.memoizedState;if(de!==null)ee=de.dehydrated!==null;else{var le=F.memoizedProps;ee=le.fallback===void 0?!1:le.unstable_avoidThisFallback!==!0?!0:!ye}}if(ee){var T=F.updateQueue;if(T===null){var _=new Set;_.add(C),F.updateQueue=_}else T.add(C);if((F.mode&2)===0){if(F.flags|=64,y.flags|=16384,y.flags&=-2981,y.tag===1)if(y.alternate===null)y.tag=17;else{var E=Ot(-1,1);E.tag=2,Zn(y,E)}y.lanes|=1;break e}w=void 0,y=n;var b=f.pingCache;if(b===null?(b=f.pingCache=new ac,w=new Set,b.set(C,w)):(w=b.get(C),w===void 0&&(w=new Set,b.set(C,w))),!w.has(y)){w.add(y);var N=vc.bind(null,f,C,y);C.then(N,N)}F.flags|=4096,F.lanes=n;break e}F=F.return}while(F!==null);w=Error((Br(y.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
42
+ `+f.stack}return{value:e,source:n,stack:u}}function Pa(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var ac=typeof WeakMap=="function"?WeakMap:Map;function ka(e,n,o){o=Ot(-1,o),o.tag=3,o.payload={element:null};var s=n.value;return o.callback=function(){Zo||(Zo=!0,Xl=s),Pa(e,n)},o}function jt(e,n,o){o=Ot(-1,o),o.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var u=n.value;o.payload=function(){return Pa(e,n),s(u)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(o.callback=function(){typeof s!="function"&&(hn===null?hn=new Set([this]):hn.add(this),Pa(e,n));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})}),o}var uc=typeof WeakSet=="function"?WeakSet:Set;function Vl(e){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){Dr(e,o)}else n.current=null}function wt(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,s=e.memoizedState;e=n.stateNode,n=e.getSnapshotBeforeUpdate(n.elementType===n.type?o:en(n.type,o),s),e.__reactInternalSnapshotBeforeUpdate=n}return;case 3:n.flags&256&&vt(n.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(N(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 s=e.create;e.destroy=s()}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;s=u.next,u=u.tag,(u&4)!==0&&(u&1)!==0&&(gc(o,e),Nr(o,e)),e=s}while(e!==n)}return;case 1:e=o.stateNode,o.flags&4&&(n===null?e.componentDidMount():(s=o.elementType===o.type?n.memoizedProps:en(o.type,n.memoizedProps),e.componentDidUpdate(s,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(N(163))}function Hl(e,n){for(var o=e;;){if(o.tag===5){var s=o.stateNode;if(n)s=s.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{s=o.stateNode;var u=o.memoizedProps.style;u=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Qt("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 Le(e,n){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(Js,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 s=o,u=s.destroy;if(s=s.tag,u!==void 0)if((s&4)!==0)gc(n,o);else{s=n;try{u()}catch(f){Dr(s,f)}}o=o.next}while(o!==e)}break;case 1:if(Vl(n),e=n.stateNode,typeof e.componentWillUnmount=="function")try{e.props=n.memoizedProps,e.state=n.memoizedState,e.componentWillUnmount()}catch(f){Dr(n,f)}break;case 5:Vl(n);break;case 4:ni(e,n)}}function $l(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 Ra(e){return e.tag===5||e.tag===3||e.tag===4}function Mo(e){e:{for(var n=e.return;n!==null;){if(Ra(n))break e;n=n.return}throw Error(N(160))}var o=n;switch(n=o.stateNode,o.tag){case 5:var s=!1;break;case 3:n=n.containerInfo,s=!0;break;case 4:n=n.containerInfo,s=!0;break;default:throw Error(N(161))}o.flags&16&&(io(n,""),o.flags&=-17);e:t:for(o=e;;){for(;o.sibling===null;){if(o.return===null||Ra(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}}s?zo(e,o,n):Ql(e,o,n)}function zo(e,n,o){var s=e.tag,u=s===5||s===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=gl));else if(s!==4&&(e=e.child,e!==null))for(zo(e,n,o),e=e.sibling;e!==null;)zo(e,n,o),e=e.sibling}function Ql(e,n,o){var s=e.tag,u=s===5||s===6;if(u)e=u?e.stateNode:e.stateNode.instance,n?o.insertBefore(e,n):o.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Ql(e,n,o),e=e.sibling;e!==null;)Ql(e,n,o),e=e.sibling}function ni(e,n){for(var o=n,s=!1,u,f;;){if(!s){s=o.return;e:for(;;){if(s===null)throw Error(N(160));switch(u=s.stateNode,s.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}s=s.return}s=!0}if(o.tag===5||o.tag===6){e:for(var m=e,y=o,w=y;;)if(Le(m,w),w.child!==null&&w.tag!==4)w.child.return=w,w=w.child;else{if(w===y)break e;for(;w.sibling===null;){if(w.return===null||w.return===y)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}f?(m=u,y=o.stateNode,m.nodeType===8?m.parentNode.removeChild(y):m.removeChild(y)):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(Le(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&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function $i(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 s=o=o.next;do(s.tag&3)===3&&(e=s.destroy,s.destroy=void 0,e!==void 0&&e()),s=s.next;while(s!==o)}return;case 1:return;case 5:if(o=n.stateNode,o!=null){s=n.memoizedProps;var u=e!==null?e.memoizedProps:s;e=n.type;var f=n.updateQueue;if(n.updateQueue=null,f!==null){for(o[wl]=s,e==="input"&&s.type==="radio"&&s.name!=null&&qo(o,s),ar(e,u),n=ar(e,s),u=0;u<f.length;u+=2){var m=f[u],y=f[u+1];m==="style"?ms(o,y):m==="dangerouslySetInnerHTML"?Ka(o,y):m==="children"?io(o,y):Re(o,m,y,n)}switch(e){case"input":ro(o,s);break;case"textarea":Ha(o,s);break;case"select":e=o._wrapperState.wasMultiple,o._wrapperState.wasMultiple=!!s.multiple,f=s.value,f!=null?Ur(o,!!s.multiple,f,!1):e!==!!s.multiple&&(s.defaultValue!=null?Ur(o,!!s.multiple,s.defaultValue,!0):Ur(o,!!s.multiple,s.multiple?[]:"",!1))}}}return;case 6:if(n.stateNode===null)throw Error(N(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&&(Yl=Ge(),Hl(n.child,!0)),Kl(n);return;case 19:Kl(n);return;case 17:return;case 23:case 24:Hl(n,n.memoizedState!==null);return}throw Error(N(163))}function Kl(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(s){var u=wc.bind(null,e,s);o.has(s)||(o.add(s),s.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 ba=Math.ceil,Bo=De.ReactCurrentDispatcher,Ia=De.ReactCurrentOwner,pe=0,Lt=null,_t=null,At=0,ri=0,Oa=vr(0),lt=0,Uo=null,Cr=0,Pr=0,ir=0,Gl=0,Qi=null,Yl=0,ql=1/0;function kr(){ql=Ge()+500}var $=null,Zo=!1,Xl=null,hn=null,nn=!1,Rr=null,ii=90,Jl=[],Ki=[],Wt=null,br=0,Ir=null,Gi=-1,mn=0,Ct=0,Yi=null,qi=!1;function Vt(){return(pe&48)!==0?Ge():Gi!==-1?Gi:Gi=Ge()}function or(e){if(e=e.mode,(e&2)===0)return 1;if((e&4)===0)return Rt()===99?1:2;if(mn===0&&(mn=Cr),Hu.transition!==0){Ct!==0&&(Ct=Qi!==null?Qi.pendingLanes:0),e=mn;var n=4186112&~Ct;return n&=-n,n===0&&(e=4186112&~e,n=e&-e,n===0&&(n=8192)),n}return e=Rt(),(pe&4)!==0&&e===98?e=x(12,mn):(e=Bc(e),e=x(e,mn)),e}function In(e,n,o){if(50<br)throw br=0,Ir=null,Error(N(185));if(e=Or(e,n),e===null)return null;ol(e,n,o),e===Lt&&(ir|=n,lt===4&&Xi(e,At));var s=Rt();n===1?(pe&8)!==0&&(pe&48)===0?Da(e):(Ht(e,o),pe===0&&(kr(),Un())):((pe&4)===0||s!==98&&s!==99||(Wt===null?Wt=new Set([e]):Wt.add(e)),Ht(e,o)),Qi=e}function Or(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 Ht(e,n){for(var o=e.callbackNode,s=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes;0<m;){var y=31-qn(m),w=1<<y,C=f[y];if(C===-1){if((w&s)===0||(w&u)!==0){C=n,Kr(w);var V=qe;f[y]=10<=V?C+250:6<=V?C+5e3:-1}}else C<=n&&(e.expiredLanes|=w);m&=~w}if(s=co(e,e===Lt?At:0),n=qe,s===0)o!==null&&(o!==El&&Eo(o),e.callbackNode=null,e.callbackPriority=0);else{if(o!==null){if(e.callbackPriority===n)return;o!==El&&Eo(o)}n===15?(o=Da.bind(null,e),Pn===null?(Pn=[o],So=ea(_l,Vu)):Pn.push(o),o=El):n===14?o=To(99,Da.bind(null,e)):(o=Uc(n),o=To(o,Na.bind(null,e))),e.callbackPriority=n,e.callbackNode=o}}function Na(e){if(Gi=-1,Ct=mn=0,(pe&48)!==0)throw Error(N(327));var n=e.callbackNode;if(pt()&&e.callbackNode!==n)return null;var o=co(e,e===Lt?At:0);if(o===0)return null;var s=o,u=pe;pe|=16;var f=ja();(Lt!==e||At!==s)&&(kr(),oi(e,s));do try{hc();break}catch(y){pc(e,y)}while(!0);if(ia(),Bo.current=f,pe=u,_t!==null?s=0:(Lt=null,At=0,s=lt),(Cr&ir)!==0)oi(e,0);else if(s!==0){if(s===2&&(pe|=64,e.hydrate&&(e.hydrate=!1,vt(e.containerInfo)),o=lu(e),o!==0&&(s=Ji(e,o))),s===1)throw n=Uo,oi(e,0),Xi(e,o),Ht(e,Ge()),n;switch(e.finishedWork=e.current.alternate,e.finishedLanes=o,s){case 0:case 1:throw Error(N(345));case 2:lr(e);break;case 3:if(Xi(e,o),(o&62914560)===o&&(s=Yl+500-Ge(),10<s)){if(co(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){Vt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Du(lr.bind(null,e),s);break}lr(e);break;case 4:if(Xi(e,o),(o&4186112)===o)break;for(s=e.eventTimes,u=-1;0<o;){var m=31-qn(o);f=1<<m,m=s[m],m>u&&(u=m),o&=~f}if(o=u,o=Ge()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*ba(o/1960))-o,10<o){e.timeoutHandle=Du(lr.bind(null,e),o);break}lr(e);break;case 5:lr(e);break;default:throw Error(N(329))}}return Ht(e,Ge()),e.callbackNode===n?Na.bind(null,e):null}function Xi(e,n){for(n&=~Gl,n&=~ir,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-qn(n),s=1<<o;e[o]=-1,n&=~s}}function Da(e){if((pe&48)!==0)throw Error(N(327));if(pt(),e===Lt&&(e.expiredLanes&At)!==0){var n=At,o=Ji(e,n);(Cr&ir)!==0&&(n=co(e,n),o=Ji(e,n))}else n=co(e,0),o=Ji(e,n);if(e.tag!==0&&o===2&&(pe|=64,e.hydrate&&(e.hydrate=!1,vt(e.containerInfo)),n=lu(e),n!==0&&(o=Ji(e,n))),o===1)throw o=Uo,oi(e,0),Xi(e,n),Ht(e,Ge()),o;return e.finishedWork=e.current.alternate,e.finishedLanes=n,lr(e),Ht(e,Ge()),null}function nd(){if(Wt!==null){var e=Wt;Wt=null,e.forEach(function(n){n.expiredLanes|=24&n.pendingLanes,Ht(n,Ge())})}Un()}function fc(e,n){var o=pe;pe|=1;try{return e(n)}finally{pe=o,pe===0&&(kr(),Un())}}function es(e,n){var o=pe;pe&=-2,pe|=8;try{return e(n)}finally{pe=o,pe===0&&(kr(),Un())}}function ts(e,n){at(Oa,ri),ri|=n,Cr|=n}function Aa(){ri=Oa.current,Ke(Oa)}function oi(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,yt(o)),_t!==null)for(o=_t.return;o!==null;){var s=o;switch(s.tag){case 1:s=s.type.childContextTypes,s!=null&&xo();break;case 3:Bi(),Ke(Bt),Ke(Tt),Dl();break;case 5:la(s);break;case 4:Bi();break;case 13:Ke(ut);break;case 19:Ke(ut);break;case 10:oa(s);break;case 23:case 24:Aa()}o=o.return}Lt=e,_t=Ar(e.current,null),At=ri=Cr=n,lt=0,Uo=null,Gl=ir=Pr=0}function pc(e,n){do{var o=_t;try{if(ia(),No.current=Rn,Zi){for(var s=dt.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}Zi=!1}if(Jr=0,We=fe=dt=null,Ve=!1,Ia.current=null,o===null||o.return===null){lt=1,Uo=n,_t=null;break}e:{var f=e,m=o.return,y=o,w=n;if(n=At,y.flags|=2048,y.firstEffect=y.lastEffect=null,w!==null&&typeof w=="object"&&typeof w.then=="function"){var C=w;if((y.mode&2)===0){var V=y.alternate;V?(y.updateQueue=V.updateQueue,y.memoizedState=V.memoizedState,y.lanes=V.lanes):(y.updateQueue=null,y.memoizedState=null)}var ve=(ut.current&1)!==0,F=m;do{var ee;if(ee=F.tag===13){var he=F.memoizedState;if(he!==null)ee=he.dehydrated!==null;else{var ae=F.memoizedProps;ee=ae.fallback===void 0?!1:ae.unstable_avoidThisFallback!==!0?!0:!ve}}if(ee){var T=F.updateQueue;if(T===null){var _=new Set;_.add(C),F.updateQueue=_}else T.add(C);if((F.mode&2)===0){if(F.flags|=64,y.flags|=16384,y.flags&=-2981,y.tag===1)if(y.alternate===null)y.tag=17;else{var E=Ot(-1,1);E.tag=2,Zn(y,E)}y.lanes|=1;break e}w=void 0,y=n;var I=f.pingCache;if(I===null?(I=f.pingCache=new ac,w=new Set,I.set(C,w)):(w=I.get(C),w===void 0&&(w=new Set,I.set(C,w))),!w.has(y)){w.add(y);var D=vc.bind(null,f,C,y);C.then(D,D)}F.flags|=4096,F.lanes=n;break e}F=F.return}while(F!==null);w=Error((Br(y.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.`)}ot!==5&&(ot=2),w=Ca(w,y),F=m;do{switch(F.tag){case 3:f=w,F.flags|=4096,n&=-n,F.lanes|=n;var ve=ka(F,f,n);Qu(F,ve);break e;case 1:f=w;var K=F.type,we=F.stateNode;if((F.flags&64)===0&&(typeof K.getDerivedStateFromError=="function"||we!==null&&typeof we.componentDidCatch=="function"&&(hn===null||!hn.has(we)))){F.flags|=4096,n&=-n,F.lanes|=n;var ke=jt(F,f,n);Qu(F,ke);break e}}F=F.return}while(F!==null)}ns(o)}catch(Se){n=Se,wt===o&&o!==null&&(wt=o=o.return);continue}break}while(!0)}function ja(){var e=Bo.current;return Bo.current=Rn,e===null?Rn:e}function Ji(e,n){var o=ce;ce|=16;var s=ja();Lt===e&&At===n||oi(e,n);do try{rd();break}catch(u){pc(e,u)}while(!0);if(ia(),ce=o,Bo.current=s,wt!==null)throw Error(A(261));return Lt=null,At=0,ot}function rd(){for(;wt!==null;)La(wt)}function hc(){for(;wt!==null&&!Xc();)La(wt)}function La(e){var n=Ma(e.alternate,e,ri);e.memoizedProps=e.pendingProps,n===null?ns(e):wt=n,ba.current=null}function ns(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&2048)===0){if(o=Ta(o,n,ri),o!==null){wt=o;return}if(o=n,o.tag!==24&&o.tag!==23||o.memoizedState===null||(ri&1073741824)!==0||(o.mode&4)===0){for(var s=0,u=o.child;u!==null;)s|=u.lanes|u.childLanes,u=u.sibling;o.childLanes=s}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=Wl(n),o!==null){o.flags&=2047,wt=o;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(n=n.sibling,n!==null){wt=n;return}wt=n=e}while(n!==null);ot===0&&(ot=5)}function lr(e){var n=Rt();return nr(99,rs.bind(null,e,n)),null}function rs(e,n){do ft();while(Rr!==null);if((ce&48)!==0)throw Error(A(327));var o=e.finishedWork;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(A(177));e.callbackNode=null;var s=o.lanes|o.childLanes,u=s,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,y=e.expirationTimes;0<f;){var w=31-qn(f),C=1<<w;u[w]=0,m[w]=-1,y[w]=-1,f&=~C}if(Wt!==null&&(s&24)===0&&Wt.has(e)&&Wt.delete(e),e===Lt&&(wt=Lt=null,At=0),1<o.flags?o.lastEffect!==null?(o.lastEffect.nextEffect=o,s=o.firstEffect):s=o:s=o.firstEffect,s!==null){if(u=ce,ce|=32,ba.current=null,yl=ll,m=Iu(),yo(m)){if("selectionStart"in m)y={start:m.selectionStart,end:m.selectionEnd};else e:if(y=(y=m.ownerDocument)&&y.defaultView||window,(C=y.getSelection&&y.getSelection())&&C.rangeCount!==0){y=C.anchorNode,f=C.anchorOffset,w=C.focusNode,C=C.focusOffset;try{y.nodeType,w.nodeType}catch{y=null;break e}var V=0,ye=-1,F=-1,ee=0,de=0,le=m,T=null;t:for(;;){for(var _;le!==y||f!==0&&le.nodeType!==3||(ye=V+f),le!==w||C!==0&&le.nodeType!==3||(F=V+C),le.nodeType===3&&(V+=le.nodeValue.length),(_=le.firstChild)!==null;)T=le,le=_;for(;;){if(le===m)break t;if(T===y&&++ee===f&&(ye=V),T===w&&++de===C&&(F=V),(_=le.nextSibling)!==null)break;le=T,T=le.parentNode}le=_}y=ye===-1||F===-1?null:{start:ye,end:F}}else y=null;y=y||{start:0,end:0}}else y=null;Gs={focusedElem:m,selectionRange:y},ll=!1,Yi=null,qi=!1,$=s;do try{mc()}catch(Se){if($===null)throw Error(A(330));Dr($,Se),$=$.nextEffect}while($!==null);Yi=null,$=s;do try{for(m=e;$!==null;){var E=$.flags;if(E&16&&io($.stateNode,""),E&128){var b=$.alternate;if(b!==null){var N=b.ref;N!==null&&(typeof N=="function"?N(null):N.current=null)}}switch(E&1038){case 2:Mo($),$.flags&=-3;break;case 6:Mo($),$.flags&=-3,$i($.alternate,$);break;case 1024:$.flags&=-1025;break;case 1028:$.flags&=-1025,$i($.alternate,$);break;case 4:$i($.alternate,$);break;case 8:y=$,ni(m,y);var ve=y.alternate;$l(y),ve!==null&&$l(ve)}$=$.nextEffect}}catch(Se){if($===null)throw Error(A(330));Dr($,Se),$=$.nextEffect}while($!==null);if(N=Gs,b=Iu(),E=N.focusedElem,m=N.selectionRange,b!==E&&E&&E.ownerDocument&&go(E.ownerDocument.documentElement,E)){for(m!==null&&yo(E)&&(b=m.start,N=m.end,N===void 0&&(N=b),"selectionStart"in E?(E.selectionStart=b,E.selectionEnd=Math.min(N,E.value.length)):(N=(b=E.ownerDocument||document)&&b.defaultView||window,N.getSelection&&(N=N.getSelection(),y=E.textContent.length,ve=Math.min(m.start,y),m=m.end===void 0?ve:Math.min(m.end,y),!N.extend&&ve>m&&(y=m,m=ve,ve=y),y=fl(E,ve),f=fl(E,m),y&&f&&(N.rangeCount!==1||N.anchorNode!==y.node||N.anchorOffset!==y.offset||N.focusNode!==f.node||N.focusOffset!==f.offset)&&(b=b.createRange(),b.setStart(y.node,y.offset),N.removeAllRanges(),ve>m?(N.addRange(b),N.extend(f.node,f.offset)):(b.setEnd(f.node,f.offset),N.addRange(b)))))),b=[],N=E;N=N.parentNode;)N.nodeType===1&&b.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<b.length;E++)N=b[E],N.element.scrollLeft=N.left,N.element.scrollTop=N.top}ll=!!yl,Gs=yl=null,e.current=o,$=s;do try{for(E=e;$!==null;){var K=$.flags;if(K&36&&cc(E,$.alternate,$),K&128){b=void 0;var we=$.ref;if(we!==null){var ke=$.stateNode;$.tag,b=ke,typeof we=="function"?we(b):we.current=b}}$=$.nextEffect}}catch(Se){if($===null)throw Error(A(330));Dr($,Se),$=$.nextEffect}while($!==null);$=null,ed(),ce=u}else e.current=o;if(nn)nn=!1,Rr=e,ii=n;else for($=s;$!==null;)n=$.nextEffect,$.nextEffect=null,$.flags&8&&(K=$,K.sibling=null,K.stateNode=null),$=n;if(s=e.pendingLanes,s===0&&(hn=null),s===1?e===br?Ir++:(Ir=0,br=e):Ir=0,o=o.stateNode,Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(Js,o,void 0,(o.current.flags&64)===64)}catch{}if(Ht(e,Ge()),Zo)throw Zo=!1,e=Xl,Xl=null,e;return(ce&8)!==0||Un(),null}function mc(){for(;$!==null;){var e=$.alternate;qi||Yi===null||(($.flags&8)!==0?hi($,Yi)&&(qi=!0):$.tag===13&&dc(e,$)&&hi($,Yi)&&(qi=!0));var n=$.flags;(n&256)!==0&&vt(e,$),(n&512)===0||nn||(nn=!0,To(97,function(){return ft(),null})),$=$.nextEffect}}function ft(){if(ii!==90){var e=97<ii?97:ii;return ii=90,nr(e,yc)}return!1}function Nr(e,n){Jl.push(n,e),nn||(nn=!0,To(97,function(){return ft(),null}))}function gc(e,n){Ki.push(n,e),nn||(nn=!0,To(97,function(){return ft(),null}))}function yc(){if(Rr===null)return!1;var e=Rr;if(Rr=null,(ce&48)!==0)throw Error(A(331));var n=ce;ce|=32;var o=Ki;Ki=[];for(var s=0;s<o.length;s+=2){var u=o[s],f=o[s+1],m=u.destroy;if(u.destroy=void 0,typeof m=="function")try{m()}catch(w){if(f===null)throw Error(A(330));Dr(f,w)}}for(o=Jl,Jl=[],s=0;s<o.length;s+=2){u=o[s],f=o[s+1];try{var y=u.create;u.destroy=y()}catch(w){if(f===null)throw Error(A(330));Dr(f,w)}}for(y=e.current.firstEffect;y!==null;)e=y.nextEffect,y.nextEffect=null,y.flags&8&&(y.sibling=null,y.stateNode=null),y=e;return ce=n,Un(),!0}function Fa(e,n,o){n=Ca(o,n),n=ka(e,n,1),Zn(e,n),n=Vt(),e=Or(e,1),e!==null&&(ol(e,1,n),Ht(e,n))}function Dr(e,n){if(e.tag===3)Fa(e,e,n);else for(var o=e.return;o!==null;){if(o.tag===3){Fa(o,e,n);break}else if(o.tag===1){var s=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(hn===null||!hn.has(s))){e=Ca(n,e);var u=jt(o,e,1);if(Zn(o,u),u=Vt(),o=Or(o,1),o!==null)ol(o,1,u),Ht(o,u);else if(typeof s.componentDidCatch=="function"&&(hn===null||!hn.has(s)))try{s.componentDidCatch(n,e)}catch{}break}}o=o.return}}function vc(e,n,o){var s=e.pingCache;s!==null&&s.delete(n),n=Vt(),e.pingedLanes|=e.suspendedLanes&o,Lt===e&&(At&o)===o&&(ot===4||ot===3&&(At&62914560)===At&&500>Ge()-Yl?oi(e,0):Gl|=o),Ht(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=Rt()===99?1:2:(mn===0&&(mn=Cr),n=hr(62914560&~mn),n===0&&(n=4194304))),o=Vt(),e=Or(e,n),e!==null&&(ol(e,n,o),Ht(e,o))}var Ma;Ma=function(e,n,o){var s=n.lanes;if(e!==null)if(e.memoizedProps!==n.pendingProps||Bt.current)Ye=!0;else if((o&s)!==0)Ye=(e.flags&16384)!==0;else{switch(Ye=!1,n.tag){case 3:Dt(n),Oo();break;case 5:Ol(n);break;case 1:Ut(n.type)&&ji(n);break;case 4:xr(n,n.stateNode.containerInfo);break;case 10:s=n.memoizedProps.value;var u=n.type._context;st(Sl,u._currentValue),u._currentValue=s;break;case 13:if(n.memoizedState!==null)return(o&n.child.childLanes)!==0?Ea(e,n,o):(st(at,at.current&1),n=In(e,n,o),n!==null?n.sibling:null);st(at,at.current&1);break;case 19:if(s=(o&n.childLanes)!==0,(e.flags&64)!==0){if(s)return Wn(e,n,o);n.flags|=64}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),st(at,at.current),s)break;return null;case 23:case 24:return n.lanes=0,va(e,n,o)}return In(e,n,o)}else Ye=!1;switch(n.lanes=0,n.tag){case 2:if(s=n.type,e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,u=Ai(n,St.current),Fi(n,o),u=ec(null,n,s,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,Ut(s)){var f=!0;ji(n)}else f=!1;n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Be(n);var m=s.getDerivedStateFromProps;typeof m=="function"&&Pl(n,s,m,e),u.updater=kl,n.stateNode=u,u._reactInternals=n,Il(n,s,e,o),n=xa(null,n,s,!0,f,o)}else n.tag=0,Nt(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=za(u),e=en(u,e),f){case 0:n=Fl(null,n,u,e,o);break e;case 1:n=_a(null,n,u,e,o);break e;case 11:n=ya(null,n,u,e,o);break e;case 14:n=oc(null,n,u,en(u.type,e),s,o);break e}throw Error(A(306,u,""))}return n;case 0:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:en(s,u),Fl(e,n,s,u,o);case 1:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:en(s,u),_a(e,n,s,u,o);case 3:if(Dt(n),s=n.updateQueue,e===null||s===null)throw Error(A(282));if(s=n.pendingProps,u=n.memoizedState,u=u!==null?u.element:null,$u(e,n),Xr(n,s,null,o),s=n.memoizedState.element,s===u)Oo(),n=In(e,n,o);else{if(u=n.stateNode,(f=u.hydrate)&&(Sr=Oi(n.stateNode.containerInfo.firstChild),tn=n,f=fn=!0),f){if(e=u.mutableSourceEagerHydrationData,e!=null)for(u=0;u<e.length;u+=2)f=e[u],f._workInProgressVersionPrimary=e[u+1],Ui.push(f);for(o=zi(n,null,s,o),n.child=o;o;)o.flags=o.flags&-3|1024,o=o.sibling}else Nt(e,n,s,o),Oo();n=n.child}return n;case 5:return Ol(n),e===null&&rt(n),s=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,m=u.children,Ys(s,u)?m=null:f!==null&&Ys(s,f)&&(n.flags|=16),wa(e,n),Nt(e,n,m,o),n.child;case 6:return e===null&&rt(n),null;case 13:return Ea(e,n,o);case 4:return xr(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=_r(n,null,s,o):Nt(e,n,s,o),n.child;case 11:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:en(s,u),ya(e,n,s,u,o);case 7:return Nt(e,n,n.pendingProps,o),n.child;case 8:return Nt(e,n,n.pendingProps.children,o),n.child;case 12:return Nt(e,n,n.pendingProps.children,o),n.child;case 10:e:{s=n.type._context,u=n.pendingProps,m=n.memoizedProps,f=u.value;var y=n.type._context;if(st(Sl,y._currentValue),y._currentValue=f,m!==null)if(y=m.value,f=zt(y,f)?0:(typeof s._calculateChangedBits=="function"?s._calculateChangedBits(y,f):1073741823)|0,f===0){if(m.children===u.children&&!Bt.current){n=In(e,n,o);break e}}else for(y=n.child,y!==null&&(y.return=n);y!==null;){var w=y.dependencies;if(w!==null){m=y.child;for(var C=w.firstContext;C!==null;){if(C.context===s&&(C.observedBits&f)!==0){y.tag===1&&(C=Ot(-1,o&-o),C.tag=2,Zn(y,C)),y.lanes|=o,C=y.alternate,C!==null&&(C.lanes|=o),Cl(y.return,o),w.lanes|=o;break}C=C.next}}else m=y.tag===10&&y.type===n.type?null:y.child;if(m!==null)m.return=y;else for(m=y;m!==null;){if(m===n){m=null;break}if(y=m.sibling,y!==null){y.return=m.return,m=y;break}m=m.return}y=m}Nt(e,n,u.children,o),n=n.child}return n;case 9:return u=n.type,f=n.pendingProps,s=f.children,Fi(n,o),u=un(u,f.unstable_observedBits),s=s(u),n.flags|=1,Nt(e,n,s,o),n.child;case 14:return u=n.type,f=en(u,n.pendingProps),f=en(u.type,f),oc(e,n,u,f,s,o);case 15:return lc(e,n,n.type,n.pendingProps,s,o);case 17:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:en(s,u),e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),n.tag=1,Ut(s)?(e=!0,ji(n)):e=!1,Fi(n,o),Rl(n,s,u),Il(n,s,u,o),xa(null,n,s,!0,e,o);case 19:return Wn(e,n,o);case 23:return va(e,n,o);case 24:return va(e,n,o)}throw Error(A(156,n.tag))};function is(e,n,o,s){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=s,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(e,n,o,s){return new is(e,n,o,s)}function os(e){return e=e.prototype,!(!e||!e.isReactComponent)}function za(e){if(typeof e=="function")return os(e)?1:0;if(e!=null){if(e=e.$$typeof,e===J)return 11;if(e===se)return 14}return 2}function Ar(e,n){var o=e.alternate;return o===null?(o=rn(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 eo(e,n,o,s,u,f){var m=2;if(s=e,typeof e=="function")os(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case Oe:return jr(o.children,u,f,n);case I:m=8,u|=16;break;case Ae:m=8,u|=1;break;case te:return e=rn(12,o,n,u|8),e.elementType=te,e.type=te,e.lanes=f,e;case xe:return e=rn(13,o,n,u),e.type=xe,e.elementType=xe,e.lanes=f,e;case H:return e=rn(19,o,n,u),e.elementType=H,e.lanes=f,e;case Z:return Wo(o,u,f,n);case U:return e=rn(24,o,n,u),e.elementType=U,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ie:m=10;break e;case Q:m=9;break e;case J:m=11;break e;case se:m=14;break e;case S:m=16,s=null;break e;case z:m=22;break e}throw Error(A(130,e==null?e:typeof e,""))}return n=rn(m,o,n,u),n.elementType=e,n.type=s,n.lanes=f,n}function jr(e,n,o,s){return e=rn(7,e,s,n),e.lanes=o,e}function Wo(e,n,o,s){return e=rn(23,e,s,n),e.elementType=Z,e.lanes=o,e}function ls(e,n,o){return e=rn(6,e,null,n),e.lanes=o,e}function Vo(e,n,o){return n=rn(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Ba(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=xs(0),this.expirationTimes=xs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xs(0),this.mutableSourceEagerHydrationData=null}function _c(e,n,o){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:s==null?null:""+s,children:e,containerInfo:n,implementation:o}}function ss(e,n,o,s){var u=n.current,f=Vt(),m=or(u);e:if(o){o=o._reactInternals;t:{if(Yt(o)!==o||o.tag!==1)throw Error(A(170));var y=o;do{switch(y.tag){case 3:y=y.stateNode.context;break t;case 1:if(Ut(y.type)){y=y.stateNode.__reactInternalMemoizedMergedChildContext;break t}}y=y.return}while(y!==null);throw Error(A(171))}if(o.tag===1){var w=o.type;if(Ut(w)){o=Lu(o,w,y);break e}}o=y}else o=wr;return n.context===null?n.context=o:n.pendingContext=o,n=Ot(f,m),n.payload={element:e},s=s===void 0?null:s,s!==null&&(n.callback=s),Zn(u,n),bn(u,m,f),m}function to(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Ua(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function gn(e,n){Ua(e,n),(e=e.alternate)&&Ua(e,n)}function Lr(){return null}function Ho(e,n,o){var s=o!=null&&o.hydrationOptions!=null&&o.hydrationOptions.mutableSources||null;if(o=new Ba(e,n,o!=null&&o.hydrate===!0),n=rn(3,null,null,n===2?7:n===1?3:0),o.current=n,n.stateNode=o,Be(n),e[gr]=o.current,Ri(e.nodeType===8?e.parentNode:e),s)for(e=0;e<s.length;e++){n=s[e];var u=n._getVersion;u=u(n._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[n,u]:o.mutableSourceEagerHydrationData.push(n,u)}this._internalRoot=o}Ho.prototype.render=function(e){ss(e,this._internalRoot,null,null)},Ho.prototype.unmount=function(){var e=this._internalRoot,n=e.containerInfo;ss(null,e,null,function(){n[gr]=null})};function li(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xc(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 Ho(e,0,n?{hydrate:!0}:void 0)}function Vn(e,n,o,s,u){var f=o._reactRootContainer;if(f){var m=f._internalRoot;if(typeof u=="function"){var y=u;u=function(){var C=to(m);y.call(C)}}ss(n,m,e,u)}else{if(f=o._reactRootContainer=xc(o,s),m=f._internalRoot,typeof u=="function"){var w=u;u=function(){var C=to(m);w.call(C)}}es(function(){ss(n,m,e,u)})}return to(m)}mi=function(e){if(e.tag===13){var n=Vt();bn(e,4,n),gn(e,4)}},ys=function(e){if(e.tag===13){var n=Vt();bn(e,67108864,n),gn(e,67108864)}},el=function(e){if(e.tag===13){var n=Vt(),o=or(e);bn(e,o,n),gn(e,o)}},$r=function(e,n){return n()},Zr=function(e,n,o){switch(n){case"input":if(ro(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 s=o[n];if(s!==e&&s.form===e.form){var u=Di(s);if(!u)throw Error(A(90));xt(s),ro(s,u)}}}break;case"textarea":Ha(e,o);break;case"select":n=o.value,n!=null&&Ur(e,!!o.multiple,n,!1)}},Wr=fc,Kt=function(e,n,o,s,u){var f=ce;ce|=4;try{return nr(98,e.bind(null,n,o,s,u))}finally{ce=f,ce===0&&(kr(),Un())}},Kn=function(){(ce&49)===0&&(nd(),ft())},et=function(e,n){var o=ce;ce|=2;try{return e(n)}finally{ce=o,ce===0&&(kr(),Un())}};function Za(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!li(n))throw Error(A(200));return _c(e,n,null,o)}var Wa={Events:[_o,Ni,Di,Qn,xn,ft,{current:!1}]},si={findFiberByHostInstance:yr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},Hn={bundleType:si.bundleType,version:si.version,rendererPackageName:si.rendererPackageName,rendererConfig:si.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:De.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hr(e),e===null?null:e.stateNode},findFiberByHostInstance:si.findFiberByHostInstance||Lr,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var as=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!as.isDisabled&&as.supportsFiber)try{Js=as.inject(Hn),Bn=as}catch{}}L.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wa,L.createPortal=Za,L.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(A(188)):Error(A(268,Object.keys(e)));return e=Hr(n),e=e===null?null:e.stateNode,e},L.flushSync=function(e,n){var o=ce;if((o&48)!==0)return e(n);ce|=1;try{if(e)return nr(99,e.bind(null,n))}finally{ce=o,Un()}},L.hydrate=function(e,n,o){if(!li(n))throw Error(A(200));return Vn(null,e,n,!0,o)},L.render=function(e,n,o){if(!li(n))throw Error(A(200));return Vn(null,e,n,!1,o)},L.unmountComponentAtNode=function(e){if(!li(e))throw Error(A(40));return e._reactRootContainer?(es(function(){Vn(null,null,e,!1,function(){e._reactRootContainer=null,e[gr]=null})}),!0):!1},L.unstable_batchedUpdates=fc,L.unstable_createPortal=function(e,n){return Za(e,n,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},L.unstable_renderSubtreeIntoContainer=function(e,n,o,s){if(!li(o))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return Vn(e,n,o,!1,s)},L.version="17.0.2"},874(he,L,Ce){"use strict";function He(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(He)}catch(_e){console.error(_e)}}He(),he.exports=Ce(638)},933(he,L,Ce){"use strict";var He;/** @license React v17.0.2
44
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}lt!==5&&(lt=2),w=Ca(w,y),F=m;do{switch(F.tag){case 3:f=w,F.flags|=4096,n&=-n,F.lanes|=n;var we=ka(F,f,n);Qu(F,we);break e;case 1:f=w;var G=F.type,_e=F.stateNode;if((F.flags&64)===0&&(typeof G.getDerivedStateFromError=="function"||_e!==null&&typeof _e.componentDidCatch=="function"&&(hn===null||!hn.has(_e)))){F.flags|=4096,n&=-n,F.lanes|=n;var be=jt(F,f,n);Qu(F,be);break e}}F=F.return}while(F!==null)}ns(o)}catch(Te){n=Te,_t===o&&o!==null&&(_t=o=o.return);continue}break}while(!0)}function ja(){var e=Bo.current;return Bo.current=Rn,e===null?Rn:e}function Ji(e,n){var o=pe;pe|=16;var s=ja();Lt===e&&At===n||oi(e,n);do try{rd();break}catch(u){pc(e,u)}while(!0);if(ia(),pe=o,Bo.current=s,_t!==null)throw Error(N(261));return Lt=null,At=0,lt}function rd(){for(;_t!==null;)La(_t)}function hc(){for(;_t!==null&&!Xc();)La(_t)}function La(e){var n=Ma(e.alternate,e,ri);e.memoizedProps=e.pendingProps,n===null?ns(e):_t=n,Ia.current=null}function ns(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&2048)===0){if(o=Ta(o,n,ri),o!==null){_t=o;return}if(o=n,o.tag!==24&&o.tag!==23||o.memoizedState===null||(ri&1073741824)!==0||(o.mode&4)===0){for(var s=0,u=o.child;u!==null;)s|=u.lanes|u.childLanes,u=u.sibling;o.childLanes=s}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=Wl(n),o!==null){o.flags&=2047,_t=o;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(n=n.sibling,n!==null){_t=n;return}_t=n=e}while(n!==null);lt===0&&(lt=5)}function lr(e){var n=Rt();return nr(99,rs.bind(null,e,n)),null}function rs(e,n){do pt();while(Rr!==null);if((pe&48)!==0)throw Error(N(327));var o=e.finishedWork;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(N(177));e.callbackNode=null;var s=o.lanes|o.childLanes,u=s,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,y=e.expirationTimes;0<f;){var w=31-qn(f),C=1<<w;u[w]=0,m[w]=-1,y[w]=-1,f&=~C}if(Wt!==null&&(s&24)===0&&Wt.has(e)&&Wt.delete(e),e===Lt&&(_t=Lt=null,At=0),1<o.flags?o.lastEffect!==null?(o.lastEffect.nextEffect=o,s=o.firstEffect):s=o:s=o.firstEffect,s!==null){if(u=pe,pe|=32,Ia.current=null,yl=ll,m=bu(),yo(m)){if("selectionStart"in m)y={start:m.selectionStart,end:m.selectionEnd};else e:if(y=(y=m.ownerDocument)&&y.defaultView||window,(C=y.getSelection&&y.getSelection())&&C.rangeCount!==0){y=C.anchorNode,f=C.anchorOffset,w=C.focusNode,C=C.focusOffset;try{y.nodeType,w.nodeType}catch{y=null;break e}var V=0,ve=-1,F=-1,ee=0,he=0,ae=m,T=null;t:for(;;){for(var _;ae!==y||f!==0&&ae.nodeType!==3||(ve=V+f),ae!==w||C!==0&&ae.nodeType!==3||(F=V+C),ae.nodeType===3&&(V+=ae.nodeValue.length),(_=ae.firstChild)!==null;)T=ae,ae=_;for(;;){if(ae===m)break t;if(T===y&&++ee===f&&(ve=V),T===w&&++he===C&&(F=V),(_=ae.nextSibling)!==null)break;ae=T,T=ae.parentNode}ae=_}y=ve===-1||F===-1?null:{start:ve,end:F}}else y=null;y=y||{start:0,end:0}}else y=null;Gs={focusedElem:m,selectionRange:y},ll=!1,Yi=null,qi=!1,$=s;do try{mc()}catch(Te){if($===null)throw Error(N(330));Dr($,Te),$=$.nextEffect}while($!==null);Yi=null,$=s;do try{for(m=e;$!==null;){var E=$.flags;if(E&16&&io($.stateNode,""),E&128){var I=$.alternate;if(I!==null){var D=I.ref;D!==null&&(typeof D=="function"?D(null):D.current=null)}}switch(E&1038){case 2:Mo($),$.flags&=-3;break;case 6:Mo($),$.flags&=-3,$i($.alternate,$);break;case 1024:$.flags&=-1025;break;case 1028:$.flags&=-1025,$i($.alternate,$);break;case 4:$i($.alternate,$);break;case 8:y=$,ni(m,y);var we=y.alternate;$l(y),we!==null&&$l(we)}$=$.nextEffect}}catch(Te){if($===null)throw Error(N(330));Dr($,Te),$=$.nextEffect}while($!==null);if(D=Gs,I=bu(),E=D.focusedElem,m=D.selectionRange,I!==E&&E&&E.ownerDocument&&go(E.ownerDocument.documentElement,E)){for(m!==null&&yo(E)&&(I=m.start,D=m.end,D===void 0&&(D=I),"selectionStart"in E?(E.selectionStart=I,E.selectionEnd=Math.min(D,E.value.length)):(D=(I=E.ownerDocument||document)&&I.defaultView||window,D.getSelection&&(D=D.getSelection(),y=E.textContent.length,we=Math.min(m.start,y),m=m.end===void 0?we:Math.min(m.end,y),!D.extend&&we>m&&(y=m,m=we,we=y),y=fl(E,we),f=fl(E,m),y&&f&&(D.rangeCount!==1||D.anchorNode!==y.node||D.anchorOffset!==y.offset||D.focusNode!==f.node||D.focusOffset!==f.offset)&&(I=I.createRange(),I.setStart(y.node,y.offset),D.removeAllRanges(),we>m?(D.addRange(I),D.extend(f.node,f.offset)):(I.setEnd(f.node,f.offset),D.addRange(I)))))),I=[],D=E;D=D.parentNode;)D.nodeType===1&&I.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<I.length;E++)D=I[E],D.element.scrollLeft=D.left,D.element.scrollTop=D.top}ll=!!yl,Gs=yl=null,e.current=o,$=s;do try{for(E=e;$!==null;){var G=$.flags;if(G&36&&cc(E,$.alternate,$),G&128){I=void 0;var _e=$.ref;if(_e!==null){var be=$.stateNode;$.tag,I=be,typeof _e=="function"?_e(I):_e.current=I}}$=$.nextEffect}}catch(Te){if($===null)throw Error(N(330));Dr($,Te),$=$.nextEffect}while($!==null);$=null,ed(),pe=u}else e.current=o;if(nn)nn=!1,Rr=e,ii=n;else for($=s;$!==null;)n=$.nextEffect,$.nextEffect=null,$.flags&8&&(G=$,G.sibling=null,G.stateNode=null),$=n;if(s=e.pendingLanes,s===0&&(hn=null),s===1?e===Ir?br++:(br=0,Ir=e):br=0,o=o.stateNode,Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(Js,o,void 0,(o.current.flags&64)===64)}catch{}if(Ht(e,Ge()),Zo)throw Zo=!1,e=Xl,Xl=null,e;return(pe&8)!==0||Un(),null}function mc(){for(;$!==null;){var e=$.alternate;qi||Yi===null||(($.flags&8)!==0?hi($,Yi)&&(qi=!0):$.tag===13&&dc(e,$)&&hi($,Yi)&&(qi=!0));var n=$.flags;(n&256)!==0&&wt(e,$),(n&512)===0||nn||(nn=!0,To(97,function(){return pt(),null})),$=$.nextEffect}}function pt(){if(ii!==90){var e=97<ii?97:ii;return ii=90,nr(e,yc)}return!1}function Nr(e,n){Jl.push(n,e),nn||(nn=!0,To(97,function(){return pt(),null}))}function gc(e,n){Ki.push(n,e),nn||(nn=!0,To(97,function(){return pt(),null}))}function yc(){if(Rr===null)return!1;var e=Rr;if(Rr=null,(pe&48)!==0)throw Error(N(331));var n=pe;pe|=32;var o=Ki;Ki=[];for(var s=0;s<o.length;s+=2){var u=o[s],f=o[s+1],m=u.destroy;if(u.destroy=void 0,typeof m=="function")try{m()}catch(w){if(f===null)throw Error(N(330));Dr(f,w)}}for(o=Jl,Jl=[],s=0;s<o.length;s+=2){u=o[s],f=o[s+1];try{var y=u.create;u.destroy=y()}catch(w){if(f===null)throw Error(N(330));Dr(f,w)}}for(y=e.current.firstEffect;y!==null;)e=y.nextEffect,y.nextEffect=null,y.flags&8&&(y.sibling=null,y.stateNode=null),y=e;return pe=n,Un(),!0}function Fa(e,n,o){n=Ca(o,n),n=ka(e,n,1),Zn(e,n),n=Vt(),e=Or(e,1),e!==null&&(ol(e,1,n),Ht(e,n))}function Dr(e,n){if(e.tag===3)Fa(e,e,n);else for(var o=e.return;o!==null;){if(o.tag===3){Fa(o,e,n);break}else if(o.tag===1){var s=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(hn===null||!hn.has(s))){e=Ca(n,e);var u=jt(o,e,1);if(Zn(o,u),u=Vt(),o=Or(o,1),o!==null)ol(o,1,u),Ht(o,u);else if(typeof s.componentDidCatch=="function"&&(hn===null||!hn.has(s)))try{s.componentDidCatch(n,e)}catch{}break}}o=o.return}}function vc(e,n,o){var s=e.pingCache;s!==null&&s.delete(n),n=Vt(),e.pingedLanes|=e.suspendedLanes&o,Lt===e&&(At&o)===o&&(lt===4||lt===3&&(At&62914560)===At&&500>Ge()-Yl?oi(e,0):Gl|=o),Ht(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=Rt()===99?1:2:(mn===0&&(mn=Cr),n=hr(62914560&~mn),n===0&&(n=4194304))),o=Vt(),e=Or(e,n),e!==null&&(ol(e,n,o),Ht(e,o))}var Ma;Ma=function(e,n,o){var s=n.lanes;if(e!==null)if(e.memoizedProps!==n.pendingProps||Bt.current)Ye=!0;else if((o&s)!==0)Ye=(e.flags&16384)!==0;else{switch(Ye=!1,n.tag){case 3:Dt(n),Oo();break;case 5:Ol(n);break;case 1:Ut(n.type)&&ji(n);break;case 4:xr(n,n.stateNode.containerInfo);break;case 10:s=n.memoizedProps.value;var u=n.type._context;at(Sl,u._currentValue),u._currentValue=s;break;case 13:if(n.memoizedState!==null)return(o&n.child.childLanes)!==0?Ea(e,n,o):(at(ut,ut.current&1),n=bn(e,n,o),n!==null?n.sibling:null);at(ut,ut.current&1);break;case 19:if(s=(o&n.childLanes)!==0,(e.flags&64)!==0){if(s)return Wn(e,n,o);n.flags|=64}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),at(ut,ut.current),s)break;return null;case 23:case 24:return n.lanes=0,va(e,n,o)}return bn(e,n,o)}else Ye=!1;switch(n.lanes=0,n.tag){case 2:if(s=n.type,e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,u=Ai(n,Tt.current),Fi(n,o),u=ec(null,n,s,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,Ut(s)){var f=!0;ji(n)}else f=!1;n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Ue(n);var m=s.getDerivedStateFromProps;typeof m=="function"&&Pl(n,s,m,e),u.updater=kl,n.stateNode=u,u._reactInternals=n,bl(n,s,e,o),n=xa(null,n,s,!0,f,o)}else n.tag=0,Nt(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=za(u),e=en(u,e),f){case 0:n=Fl(null,n,u,e,o);break e;case 1:n=_a(null,n,u,e,o);break e;case 11:n=ya(null,n,u,e,o);break e;case 14:n=oc(null,n,u,en(u.type,e),s,o);break e}throw Error(N(306,u,""))}return n;case 0:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:en(s,u),Fl(e,n,s,u,o);case 1:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:en(s,u),_a(e,n,s,u,o);case 3:if(Dt(n),s=n.updateQueue,e===null||s===null)throw Error(N(282));if(s=n.pendingProps,u=n.memoizedState,u=u!==null?u.element:null,$u(e,n),Xr(n,s,null,o),s=n.memoizedState.element,s===u)Oo(),n=bn(e,n,o);else{if(u=n.stateNode,(f=u.hydrate)&&(Sr=Oi(n.stateNode.containerInfo.firstChild),tn=n,f=fn=!0),f){if(e=u.mutableSourceEagerHydrationData,e!=null)for(u=0;u<e.length;u+=2)f=e[u],f._workInProgressVersionPrimary=e[u+1],Ui.push(f);for(o=zi(n,null,s,o),n.child=o;o;)o.flags=o.flags&-3|1024,o=o.sibling}else Nt(e,n,s,o),Oo();n=n.child}return n;case 5:return Ol(n),e===null&&it(n),s=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,m=u.children,Ys(s,u)?m=null:f!==null&&Ys(s,f)&&(n.flags|=16),wa(e,n),Nt(e,n,m,o),n.child;case 6:return e===null&&it(n),null;case 13:return Ea(e,n,o);case 4:return xr(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=_r(n,null,s,o):Nt(e,n,s,o),n.child;case 11:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:en(s,u),ya(e,n,s,u,o);case 7:return Nt(e,n,n.pendingProps,o),n.child;case 8:return Nt(e,n,n.pendingProps.children,o),n.child;case 12:return Nt(e,n,n.pendingProps.children,o),n.child;case 10:e:{s=n.type._context,u=n.pendingProps,m=n.memoizedProps,f=u.value;var y=n.type._context;if(at(Sl,y._currentValue),y._currentValue=f,m!==null)if(y=m.value,f=zt(y,f)?0:(typeof s._calculateChangedBits=="function"?s._calculateChangedBits(y,f):1073741823)|0,f===0){if(m.children===u.children&&!Bt.current){n=bn(e,n,o);break e}}else for(y=n.child,y!==null&&(y.return=n);y!==null;){var w=y.dependencies;if(w!==null){m=y.child;for(var C=w.firstContext;C!==null;){if(C.context===s&&(C.observedBits&f)!==0){y.tag===1&&(C=Ot(-1,o&-o),C.tag=2,Zn(y,C)),y.lanes|=o,C=y.alternate,C!==null&&(C.lanes|=o),Cl(y.return,o),w.lanes|=o;break}C=C.next}}else m=y.tag===10&&y.type===n.type?null:y.child;if(m!==null)m.return=y;else for(m=y;m!==null;){if(m===n){m=null;break}if(y=m.sibling,y!==null){y.return=m.return,m=y;break}m=m.return}y=m}Nt(e,n,u.children,o),n=n.child}return n;case 9:return u=n.type,f=n.pendingProps,s=f.children,Fi(n,o),u=un(u,f.unstable_observedBits),s=s(u),n.flags|=1,Nt(e,n,s,o),n.child;case 14:return u=n.type,f=en(u,n.pendingProps),f=en(u.type,f),oc(e,n,u,f,s,o);case 15:return lc(e,n,n.type,n.pendingProps,s,o);case 17:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:en(s,u),e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),n.tag=1,Ut(s)?(e=!0,ji(n)):e=!1,Fi(n,o),Rl(n,s,u),bl(n,s,u,o),xa(null,n,s,!0,e,o);case 19:return Wn(e,n,o);case 23:return va(e,n,o);case 24:return va(e,n,o)}throw Error(N(156,n.tag))};function is(e,n,o,s){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=s,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(e,n,o,s){return new is(e,n,o,s)}function os(e){return e=e.prototype,!(!e||!e.isReactComponent)}function za(e){if(typeof e=="function")return os(e)?1:0;if(e!=null){if(e=e.$$typeof,e===J)return 11;if(e===ce)return 14}return 2}function Ar(e,n){var o=e.alternate;return o===null?(o=rn(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 eo(e,n,o,s,u,f){var m=2;if(s=e,typeof e=="function")os(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case Ne:return jr(o.children,u,f,n);case b:m=8,u|=16;break;case je:m=8,u|=1;break;case ne:return e=rn(12,o,n,u|8),e.elementType=ne,e.type=ne,e.lanes=f,e;case Ee:return e=rn(13,o,n,u),e.type=Ee,e.elementType=Ee,e.lanes=f,e;case H:return e=rn(19,o,n,u),e.elementType=H,e.lanes=f,e;case Z:return Wo(o,u,f,n);case U:return e=rn(24,o,n,u),e.elementType=U,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ie:m=10;break e;case Q:m=9;break e;case J:m=11;break e;case ce:m=14;break e;case S:m=16,s=null;break e;case z:m=22;break e}throw Error(N(130,e==null?e:typeof e,""))}return n=rn(m,o,n,u),n.elementType=e,n.type=s,n.lanes=f,n}function jr(e,n,o,s){return e=rn(7,e,s,n),e.lanes=o,e}function Wo(e,n,o,s){return e=rn(23,e,s,n),e.elementType=Z,e.lanes=o,e}function ls(e,n,o){return e=rn(6,e,null,n),e.lanes=o,e}function Vo(e,n,o){return n=rn(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Ba(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=xs(0),this.expirationTimes=xs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xs(0),this.mutableSourceEagerHydrationData=null}function _c(e,n,o){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:s==null?null:""+s,children:e,containerInfo:n,implementation:o}}function ss(e,n,o,s){var u=n.current,f=Vt(),m=or(u);e:if(o){o=o._reactInternals;t:{if(Yt(o)!==o||o.tag!==1)throw Error(N(170));var y=o;do{switch(y.tag){case 3:y=y.stateNode.context;break t;case 1:if(Ut(y.type)){y=y.stateNode.__reactInternalMemoizedMergedChildContext;break t}}y=y.return}while(y!==null);throw Error(N(171))}if(o.tag===1){var w=o.type;if(Ut(w)){o=Lu(o,w,y);break e}}o=y}else o=wr;return n.context===null?n.context=o:n.pendingContext=o,n=Ot(f,m),n.payload={element:e},s=s===void 0?null:s,s!==null&&(n.callback=s),Zn(u,n),In(u,m,f),m}function to(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Ua(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function gn(e,n){Ua(e,n),(e=e.alternate)&&Ua(e,n)}function Lr(){return null}function Ho(e,n,o){var s=o!=null&&o.hydrationOptions!=null&&o.hydrationOptions.mutableSources||null;if(o=new Ba(e,n,o!=null&&o.hydrate===!0),n=rn(3,null,null,n===2?7:n===1?3:0),o.current=n,n.stateNode=o,Ue(n),e[gr]=o.current,Ri(e.nodeType===8?e.parentNode:e),s)for(e=0;e<s.length;e++){n=s[e];var u=n._getVersion;u=u(n._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[n,u]:o.mutableSourceEagerHydrationData.push(n,u)}this._internalRoot=o}Ho.prototype.render=function(e){ss(e,this._internalRoot,null,null)},Ho.prototype.unmount=function(){var e=this._internalRoot,n=e.containerInfo;ss(null,e,null,function(){n[gr]=null})};function li(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xc(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 Ho(e,0,n?{hydrate:!0}:void 0)}function Vn(e,n,o,s,u){var f=o._reactRootContainer;if(f){var m=f._internalRoot;if(typeof u=="function"){var y=u;u=function(){var C=to(m);y.call(C)}}ss(n,m,e,u)}else{if(f=o._reactRootContainer=xc(o,s),m=f._internalRoot,typeof u=="function"){var w=u;u=function(){var C=to(m);w.call(C)}}es(function(){ss(n,m,e,u)})}return to(m)}mi=function(e){if(e.tag===13){var n=Vt();In(e,4,n),gn(e,4)}},ys=function(e){if(e.tag===13){var n=Vt();In(e,67108864,n),gn(e,67108864)}},el=function(e){if(e.tag===13){var n=Vt(),o=or(e);In(e,o,n),gn(e,o)}},$r=function(e,n){return n()},Zr=function(e,n,o){switch(n){case"input":if(ro(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 s=o[n];if(s!==e&&s.form===e.form){var u=Di(s);if(!u)throw Error(N(90));Et(s),ro(s,u)}}}break;case"textarea":Ha(e,o);break;case"select":n=o.value,n!=null&&Ur(e,!!o.multiple,n,!1)}},Wr=fc,Kt=function(e,n,o,s,u){var f=pe;pe|=4;try{return nr(98,e.bind(null,n,o,s,u))}finally{pe=f,pe===0&&(kr(),Un())}},Kn=function(){(pe&49)===0&&(nd(),pt())},Je=function(e,n){var o=pe;pe|=2;try{return e(n)}finally{pe=o,pe===0&&(kr(),Un())}};function Za(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!li(n))throw Error(N(200));return _c(e,n,null,o)}var Wa={Events:[_o,Ni,Di,Qn,xn,pt,{current:!1}]},si={findFiberByHostInstance:yr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},Hn={bundleType:si.bundleType,version:si.version,rendererPackageName:si.rendererPackageName,rendererConfig:si.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:De.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hr(e),e===null?null:e.stateNode},findFiberByHostInstance:si.findFiberByHostInstance||Lr,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var as=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!as.isDisabled&&as.supportsFiber)try{Js=as.inject(Hn),Bn=as}catch{}}L.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wa,L.createPortal=Za,L.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(N(188)):Error(N(268,Object.keys(e)));return e=Hr(n),e=e===null?null:e.stateNode,e},L.flushSync=function(e,n){var o=pe;if((o&48)!==0)return e(n);pe|=1;try{if(e)return nr(99,e.bind(null,n))}finally{pe=o,Un()}},L.hydrate=function(e,n,o){if(!li(n))throw Error(N(200));return Vn(null,e,n,!0,o)},L.render=function(e,n,o){if(!li(n))throw Error(N(200));return Vn(null,e,n,!1,o)},L.unmountComponentAtNode=function(e){if(!li(e))throw Error(N(40));return e._reactRootContainer?(es(function(){Vn(null,null,e,!1,function(){e._reactRootContainer=null,e[gr]=null})}),!0):!1},L.unstable_batchedUpdates=fc,L.unstable_createPortal=function(e,n){return Za(e,n,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},L.unstable_renderSubtreeIntoContainer=function(e,n,o,s){if(!li(o))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return Vn(e,n,o,!1,s)},L.version="17.0.2"},874(le,L,Pe){"use strict";function ze(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ze)}catch(xe){console.error(xe)}}ze(),le.exports=Pe(638)},933(le,L,Pe){"use strict";var ze;/** @license React v17.0.2
45
45
  * react-jsx-runtime.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
- */Ce(575);var _e=Ce(999),Ne=60103;if(He=60107,typeof Symbol=="function"&&Symbol.for){var A=Symbol.for;Ne=A("react.element"),He=A("react.fragment")}var Ct=_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Me=Object.prototype.hasOwnProperty,$e={key:!0,ref:!0,__self:!0,__source:!0};function P(B,c,Ue){var Ie,be={},Le=null,_t=null;Ue!==void 0&&(Le=""+Ue),c.key!==void 0&&(Le=""+c.key),c.ref!==void 0&&(_t=c.ref);for(Ie in c)Me.call(c,Ie)&&!$e.hasOwnProperty(Ie)&&(be[Ie]=c[Ie]);if(B&&B.defaultProps)for(Ie in c=B.defaultProps,c)be[Ie]===void 0&&(be[Ie]=c[Ie]);return{$$typeof:Ne,type:B,key:Le,ref:_t,props:be,_owner:Ct.current}}L.jsx=P,L.jsxs=P},926(he,L,Ce){"use strict";/** @license React v17.0.2
51
+ */Pe(575);var xe=Pe(999),Ae=60103;if(ze=60107,typeof Symbol=="function"&&Symbol.for){var N=Symbol.for;Ae=N("react.element"),ze=N("react.fragment")}var xt=xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$e=Object.prototype.hasOwnProperty,Be={key:!0,ref:!0,__self:!0,__source:!0};function P(B,c,tt){var Oe,ke={},se=null,nt=null;tt!==void 0&&(se=""+tt),c.key!==void 0&&(se=""+c.key),c.ref!==void 0&&(nt=c.ref);for(Oe in c)$e.call(c,Oe)&&!Be.hasOwnProperty(Oe)&&(ke[Oe]=c[Oe]);if(B&&B.defaultProps)for(Oe in c=B.defaultProps,c)ke[Oe]===void 0&&(ke[Oe]=c[Oe]);return{$$typeof:Ae,type:B,key:se,ref:nt,props:ke,_owner:xt.current}}L.jsx=P,L.jsxs=P},926(le,L,Pe){"use strict";/** @license React v17.0.2
52
52
  * react.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 He=Ce(575),_e=60103,Ne=60106;L.Fragment=60107,L.StrictMode=60108,L.Profiler=60114;var A=60109,Ct=60110,Me=60112;L.Suspense=60113;var $e=60115,P=60116;if(typeof Symbol=="function"&&Symbol.for){var B=Symbol.for;_e=B("react.element"),Ne=B("react.portal"),L.Fragment=B("react.fragment"),L.StrictMode=B("react.strict_mode"),L.Profiler=B("react.profiler"),A=B("react.provider"),Ct=B("react.context"),Me=B("react.forward_ref"),L.Suspense=B("react.suspense"),$e=B("react.memo"),P=B("react.lazy")}var c=typeof Symbol=="function"&&Symbol.iterator;function Ue(S){return S===null||typeof S!="object"?null:(S=c&&S[c]||S["@@iterator"],typeof S=="function"?S:null)}function Ie(S){for(var z="https://reactjs.org/docs/error-decoder.html?invariant="+S,O=1;O<arguments.length;O++)z+="&args[]="+encodeURIComponent(arguments[O]);return"Minified React error #"+S+"; visit "+z+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var be={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Le={};function _t(S,z,O){this.props=S,this.context=z,this.refs=Le,this.updater=O||be}_t.prototype.isReactComponent={},_t.prototype.setState=function(S,z){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error(Ie(85));this.updater.enqueueSetState(this,S,z,"setState")},_t.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function ze(){}ze.prototype=_t.prototype;function qe(S,z,O){this.props=S,this.context=z,this.refs=Le,this.updater=O||be}var Y=qe.prototype=new ze;Y.constructor=qe,He(Y,_t.prototype),Y.isPureReactComponent=!0;var ne={current:null},fe=Object.prototype.hasOwnProperty,Pe={key:!0,ref:!0,__self:!0,__source:!0};function De(S,z,O){var I,Z={},U=null,G=null;if(z!=null)for(I in z.ref!==void 0&&(G=z.ref),z.key!==void 0&&(U=""+z.key),z)fe.call(z,I)&&!Pe.hasOwnProperty(I)&&(Z[I]=z[I]);var j=arguments.length-2;if(j===1)Z.children=O;else if(1<j){for(var ae=Array(j),D=0;D<j;D++)ae[D]=arguments[D+2];Z.children=ae}if(S&&S.defaultProps)for(I in j=S.defaultProps,j)Z[I]===void 0&&(Z[I]=j[I]);return{$$typeof:_e,type:S,key:U,ref:G,props:Z,_owner:ne.current}}function Qe(S,z){return{$$typeof:_e,type:S.type,key:z,ref:S.ref,props:S.props,_owner:S._owner}}function M(S){return typeof S=="object"&&S!==null&&S.$$typeof===_e}function Oe(S){var z={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(O){return z[O]})}var Ae=/\/+/g;function te(S,z){return typeof S=="object"&&S!==null&&S.key!=null?Oe(""+S.key):z.toString(36)}function ie(S,z,O,I,Z){var U=typeof S;(U==="undefined"||U==="boolean")&&(S=null);var G=!1;if(S===null)G=!0;else switch(U){case"string":case"number":G=!0;break;case"object":switch(S.$$typeof){case _e:case Ne:G=!0}}if(G)return G=S,Z=Z(G),S=I===""?"."+te(G,0):I,Array.isArray(Z)?(O="",S!=null&&(O=S.replace(Ae,"$&/")+"/"),ie(Z,z,O,"",function(D){return D})):Z!=null&&(M(Z)&&(Z=Qe(Z,O+(!Z.key||G&&G.key===Z.key?"":(""+Z.key).replace(Ae,"$&/")+"/")+S)),z.push(Z)),1;if(G=0,I=I===""?".":I+":",Array.isArray(S))for(var j=0;j<S.length;j++){U=S[j];var ae=I+te(U,j);G+=ie(U,z,O,ae,Z)}else if(ae=Ue(S),typeof ae=="function")for(S=ae.call(S),j=0;!(U=S.next()).done;)U=U.value,ae=I+te(U,j++),G+=ie(U,z,O,ae,Z);else if(U==="object")throw z=""+S,Error(Ie(31,z==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":z));return G}function Q(S,z,O){if(S==null)return S;var I=[],Z=0;return ie(S,I,"","",function(U){return z.call(O,U,Z++)}),I}function J(S){if(S._status===-1){var z=S._result;z=z(),S._status=0,S._result=z,z.then(function(O){S._status===0&&(O=O.default,S._status=1,S._result=O)},function(O){S._status===0&&(S._status=2,S._result=O)})}if(S._status===1)return S._result;throw S._result}var xe={current:null};function H(){var S=xe.current;if(S===null)throw Error(Ie(321));return S}var se={ReactCurrentDispatcher:xe,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:ne,IsSomeRendererActing:{current:!1},assign:He};L.Children={map:Q,forEach:function(S,z,O){Q(S,function(){z.apply(this,arguments)},O)},count:function(S){var z=0;return Q(S,function(){z++}),z},toArray:function(S){return Q(S,function(z){return z})||[]},only:function(S){if(!M(S))throw Error(Ie(143));return S}},L.Component=_t,L.PureComponent=qe,L.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,L.cloneElement=function(S,z,O){if(S==null)throw Error(Ie(267,S));var I=He({},S.props),Z=S.key,U=S.ref,G=S._owner;if(z!=null){if(z.ref!==void 0&&(U=z.ref,G=ne.current),z.key!==void 0&&(Z=""+z.key),S.type&&S.type.defaultProps)var j=S.type.defaultProps;for(ae in z)fe.call(z,ae)&&!Pe.hasOwnProperty(ae)&&(I[ae]=z[ae]===void 0&&j!==void 0?j[ae]:z[ae])}var ae=arguments.length-2;if(ae===1)I.children=O;else if(1<ae){j=Array(ae);for(var D=0;D<ae;D++)j[D]=arguments[D+2];I.children=j}return{$$typeof:_e,type:S.type,key:Z,ref:U,props:I,_owner:G}},L.createContext=function(S,z){return z===void 0&&(z=null),S={$$typeof:Ct,_calculateChangedBits:z,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider={$$typeof:A,_context:S},S.Consumer=S},L.createElement=De,L.createFactory=function(S){var z=De.bind(null,S);return z.type=S,z},L.createRef=function(){return{current:null}},L.forwardRef=function(S){return{$$typeof:Me,render:S}},L.isValidElement=M,L.lazy=function(S){return{$$typeof:P,_payload:{_status:-1,_result:S},_init:J}},L.memo=function(S,z){return{$$typeof:$e,type:S,compare:z===void 0?null:z}},L.useCallback=function(S,z){return H().useCallback(S,z)},L.useContext=function(S,z){return H().useContext(S,z)},L.useDebugValue=function(){},L.useEffect=function(S,z){return H().useEffect(S,z)},L.useImperativeHandle=function(S,z,O){return H().useImperativeHandle(S,z,O)},L.useLayoutEffect=function(S,z){return H().useLayoutEffect(S,z)},L.useMemo=function(S,z){return H().useMemo(S,z)},L.useReducer=function(S,z,O){return H().useReducer(S,z,O)},L.useRef=function(S){return H().useRef(S)},L.useState=function(S){return H().useState(S)},L.version="17.0.2"},999(he,L,Ce){"use strict";he.exports=Ce(926)},343(he,L,Ce){"use strict";he.exports=Ce(933)},742(he,L){"use strict";/** @license React v0.20.2
58
+ */var ze=Pe(575),xe=60103,Ae=60106;L.Fragment=60107,L.StrictMode=60108,L.Profiler=60114;var N=60109,xt=60110,$e=60112;L.Suspense=60113;var Be=60115,P=60116;if(typeof Symbol=="function"&&Symbol.for){var B=Symbol.for;xe=B("react.element"),Ae=B("react.portal"),L.Fragment=B("react.fragment"),L.StrictMode=B("react.strict_mode"),L.Profiler=B("react.profiler"),N=B("react.provider"),xt=B("react.context"),$e=B("react.forward_ref"),L.Suspense=B("react.suspense"),Be=B("react.memo"),P=B("react.lazy")}var c=typeof Symbol=="function"&&Symbol.iterator;function tt(S){return S===null||typeof S!="object"?null:(S=c&&S[c]||S["@@iterator"],typeof S=="function"?S:null)}function Oe(S){for(var z="https://reactjs.org/docs/error-decoder.html?invariant="+S,O=1;O<arguments.length;O++)z+="&args[]="+encodeURIComponent(arguments[O]);return"Minified React error #"+S+"; visit "+z+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ke={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},se={};function nt(S,z,O){this.props=S,this.context=z,this.refs=se,this.updater=O||ke}nt.prototype.isReactComponent={},nt.prototype.setState=function(S,z){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error(Oe(85));this.updater.enqueueSetState(this,S,z,"setState")},nt.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function Fe(){}Fe.prototype=nt.prototype;function Ze(S,z,O){this.props=S,this.context=z,this.refs=se,this.updater=O||ke}var K=Ze.prototype=new Fe;K.constructor=Ze,ze(K,nt.prototype),K.isPureReactComponent=!0;var te={current:null},ue=Object.prototype.hasOwnProperty,Re={key:!0,ref:!0,__self:!0,__source:!0};function De(S,z,O){var b,Z={},U=null,Y=null;if(z!=null)for(b in z.ref!==void 0&&(Y=z.ref),z.key!==void 0&&(U=""+z.key),z)ue.call(z,b)&&!Re.hasOwnProperty(b)&&(Z[b]=z[b]);var j=arguments.length-2;if(j===1)Z.children=O;else if(1<j){for(var de=Array(j),A=0;A<j;A++)de[A]=arguments[A+2];Z.children=de}if(S&&S.defaultProps)for(b in j=S.defaultProps,j)Z[b]===void 0&&(Z[b]=j[b]);return{$$typeof:xe,type:S,key:U,ref:Y,props:Z,_owner:te.current}}function Qe(S,z){return{$$typeof:xe,type:S.type,key:z,ref:S.ref,props:S.props,_owner:S._owner}}function M(S){return typeof S=="object"&&S!==null&&S.$$typeof===xe}function Ne(S){var z={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(O){return z[O]})}var je=/\/+/g;function ne(S,z){return typeof S=="object"&&S!==null&&S.key!=null?Ne(""+S.key):z.toString(36)}function ie(S,z,O,b,Z){var U=typeof S;(U==="undefined"||U==="boolean")&&(S=null);var Y=!1;if(S===null)Y=!0;else switch(U){case"string":case"number":Y=!0;break;case"object":switch(S.$$typeof){case xe:case Ae:Y=!0}}if(Y)return Y=S,Z=Z(Y),S=b===""?"."+ne(Y,0):b,Array.isArray(Z)?(O="",S!=null&&(O=S.replace(je,"$&/")+"/"),ie(Z,z,O,"",function(A){return A})):Z!=null&&(M(Z)&&(Z=Qe(Z,O+(!Z.key||Y&&Y.key===Z.key?"":(""+Z.key).replace(je,"$&/")+"/")+S)),z.push(Z)),1;if(Y=0,b=b===""?".":b+":",Array.isArray(S))for(var j=0;j<S.length;j++){U=S[j];var de=b+ne(U,j);Y+=ie(U,z,O,de,Z)}else if(de=tt(S),typeof de=="function")for(S=de.call(S),j=0;!(U=S.next()).done;)U=U.value,de=b+ne(U,j++),Y+=ie(U,z,O,de,Z);else if(U==="object")throw z=""+S,Error(Oe(31,z==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":z));return Y}function Q(S,z,O){if(S==null)return S;var b=[],Z=0;return ie(S,b,"","",function(U){return z.call(O,U,Z++)}),b}function J(S){if(S._status===-1){var z=S._result;z=z(),S._status=0,S._result=z,z.then(function(O){S._status===0&&(O=O.default,S._status=1,S._result=O)},function(O){S._status===0&&(S._status=2,S._result=O)})}if(S._status===1)return S._result;throw S._result}var Ee={current:null};function H(){var S=Ee.current;if(S===null)throw Error(Oe(321));return S}var ce={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:te,IsSomeRendererActing:{current:!1},assign:ze};L.Children={map:Q,forEach:function(S,z,O){Q(S,function(){z.apply(this,arguments)},O)},count:function(S){var z=0;return Q(S,function(){z++}),z},toArray:function(S){return Q(S,function(z){return z})||[]},only:function(S){if(!M(S))throw Error(Oe(143));return S}},L.Component=nt,L.PureComponent=Ze,L.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ce,L.cloneElement=function(S,z,O){if(S==null)throw Error(Oe(267,S));var b=ze({},S.props),Z=S.key,U=S.ref,Y=S._owner;if(z!=null){if(z.ref!==void 0&&(U=z.ref,Y=te.current),z.key!==void 0&&(Z=""+z.key),S.type&&S.type.defaultProps)var j=S.type.defaultProps;for(de in z)ue.call(z,de)&&!Re.hasOwnProperty(de)&&(b[de]=z[de]===void 0&&j!==void 0?j[de]:z[de])}var de=arguments.length-2;if(de===1)b.children=O;else if(1<de){j=Array(de);for(var A=0;A<de;A++)j[A]=arguments[A+2];b.children=j}return{$$typeof:xe,type:S.type,key:Z,ref:U,props:b,_owner:Y}},L.createContext=function(S,z){return z===void 0&&(z=null),S={$$typeof:xt,_calculateChangedBits:z,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider={$$typeof:N,_context:S},S.Consumer=S},L.createElement=De,L.createFactory=function(S){var z=De.bind(null,S);return z.type=S,z},L.createRef=function(){return{current:null}},L.forwardRef=function(S){return{$$typeof:$e,render:S}},L.isValidElement=M,L.lazy=function(S){return{$$typeof:P,_payload:{_status:-1,_result:S},_init:J}},L.memo=function(S,z){return{$$typeof:Be,type:S,compare:z===void 0?null:z}},L.useCallback=function(S,z){return H().useCallback(S,z)},L.useContext=function(S,z){return H().useContext(S,z)},L.useDebugValue=function(){},L.useEffect=function(S,z){return H().useEffect(S,z)},L.useImperativeHandle=function(S,z,O){return H().useImperativeHandle(S,z,O)},L.useLayoutEffect=function(S,z){return H().useLayoutEffect(S,z)},L.useMemo=function(S,z){return H().useMemo(S,z)},L.useReducer=function(S,z,O){return H().useReducer(S,z,O)},L.useRef=function(S){return H().useRef(S)},L.useState=function(S){return H().useState(S)},L.version="17.0.2"},999(le,L,Pe){"use strict";le.exports=Pe(926)},343(le,L,Pe){"use strict";le.exports=Pe(933)},742(le,L){"use strict";/** @license React v0.20.2
59
59
  * scheduler.production.min.js
60
60
  *
61
61
  * Copyright (c) Facebook, Inc. and its affiliates.
62
62
  *
63
63
  * This source code is licensed under the MIT license found in the
64
64
  * LICENSE file in the root directory of this source tree.
65
- */var Ce,He,_e,Ne;if(typeof performance=="object"&&typeof performance.now=="function"){var A=performance;L.unstable_now=function(){return A.now()}}else{var Ct=Date,Me=Ct.now();L.unstable_now=function(){return Ct.now()-Me}}if(typeof window>"u"||typeof MessageChannel!="function"){var $e=null,P=null,B=function(){if($e!==null)try{var O=L.unstable_now();$e(!0,O),$e=null}catch(I){throw setTimeout(B,0),I}};Ce=function(O){$e!==null?setTimeout(Ce,0,O):($e=O,setTimeout(B,0))},He=function(O,I){P=setTimeout(O,I)},_e=function(){clearTimeout(P)},L.unstable_shouldYield=function(){return!1},Ne=L.unstable_forceFrameRate=function(){}}else{var c=window.setTimeout,Ue=window.clearTimeout;if(typeof console<"u"){var Ie=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 Ie!="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 be=!1,Le=null,_t=-1,ze=5,qe=0;L.unstable_shouldYield=function(){return L.unstable_now()>=qe},Ne=function(){},L.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ze=0<O?Math.floor(1e3/O):5};var Y=new MessageChannel,ne=Y.port2;Y.port1.onmessage=function(){if(Le!==null){var O=L.unstable_now();qe=O+ze;try{Le(!0,O)?ne.postMessage(null):(be=!1,Le=null)}catch(I){throw ne.postMessage(null),I}}else be=!1},Ce=function(O){Le=O,be||(be=!0,ne.postMessage(null))},He=function(O,I){_t=c(function(){O(L.unstable_now())},I)},_e=function(){Ue(_t),_t=-1}}function fe(O,I){var Z=O.length;O.push(I);e:for(;;){var U=Z-1>>>1,G=O[U];if(G!==void 0&&0<Qe(G,I))O[U]=I,O[Z]=G,Z=U;else break e}}function Pe(O){return O=O[0],O===void 0?null:O}function De(O){var I=O[0];if(I!==void 0){var Z=O.pop();if(Z!==I){O[0]=Z;e:for(var U=0,G=O.length;U<G;){var j=2*(U+1)-1,ae=O[j],D=j+1,Mt=O[D];if(ae!==void 0&&0>Qe(ae,Z))Mt!==void 0&&0>Qe(Mt,ae)?(O[U]=Mt,O[D]=Z,U=D):(O[U]=ae,O[j]=Z,U=j);else if(Mt!==void 0&&0>Qe(Mt,Z))O[U]=Mt,O[D]=Z,U=D;else break e}}return I}return null}function Qe(O,I){var Z=O.sortIndex-I.sortIndex;return Z!==0?Z:O.id-I.id}var M=[],Oe=[],Ae=1,te=null,ie=3,Q=!1,J=!1,xe=!1;function H(O){for(var I=Pe(Oe);I!==null;){if(I.callback===null)De(Oe);else if(I.startTime<=O)De(Oe),I.sortIndex=I.expirationTime,fe(M,I);else break;I=Pe(Oe)}}function se(O){if(xe=!1,H(O),!J)if(Pe(M)!==null)J=!0,Ce(S);else{var I=Pe(Oe);I!==null&&He(se,I.startTime-O)}}function S(O,I){J=!1,xe&&(xe=!1,_e()),Q=!0;var Z=ie;try{for(H(I),te=Pe(M);te!==null&&(!(te.expirationTime>I)||O&&!L.unstable_shouldYield());){var U=te.callback;if(typeof U=="function"){te.callback=null,ie=te.priorityLevel;var G=U(te.expirationTime<=I);I=L.unstable_now(),typeof G=="function"?te.callback=G:te===Pe(M)&&De(M),H(I)}else De(M);te=Pe(M)}if(te!==null)var j=!0;else{var ae=Pe(Oe);ae!==null&&He(se,ae.startTime-I),j=!1}return j}finally{te=null,ie=Z,Q=!1}}var z=Ne;L.unstable_IdlePriority=5,L.unstable_ImmediatePriority=1,L.unstable_LowPriority=4,L.unstable_NormalPriority=3,L.unstable_Profiling=null,L.unstable_UserBlockingPriority=2,L.unstable_cancelCallback=function(O){O.callback=null},L.unstable_continueExecution=function(){J||Q||(J=!0,Ce(S))},L.unstable_getCurrentPriorityLevel=function(){return ie},L.unstable_getFirstCallbackNode=function(){return Pe(M)},L.unstable_next=function(O){switch(ie){case 1:case 2:case 3:var I=3;break;default:I=ie}var Z=ie;ie=I;try{return O()}finally{ie=Z}},L.unstable_pauseExecution=function(){},L.unstable_requestPaint=z,L.unstable_runWithPriority=function(O,I){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var Z=ie;ie=O;try{return I()}finally{ie=Z}},L.unstable_scheduleCallback=function(O,I,Z){var U=L.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?U+Z:U):Z=U,O){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=Z+G,O={id:Ae++,callback:I,priorityLevel:O,startTime:Z,expirationTime:G,sortIndex:-1},Z>U?(O.sortIndex=Z,fe(Oe,O),Pe(M)===null&&O===Pe(Oe)&&(xe?_e():xe=!0,He(se,Z-U))):(O.sortIndex=G,fe(M,O),J||Q||(J=!0,Ce(S))),O},L.unstable_wrapCallback=function(O){var I=ie;return function(){var Z=ie;ie=I;try{return O.apply(this,arguments)}finally{ie=Z}}}},825(he,L,Ce){"use strict";he.exports=Ce(742)}},vd={};function Nn(he){var L=vd[he];if(L!==void 0)return L.exports;var Ce=vd[he]={exports:{}};return Pf[he](Ce,Ce.exports,Nn),Ce.exports}Nn.n=he=>{var L=he&&he.__esModule?()=>he.default:()=>he;return Nn.d(L,{a:L}),L},Nn.d=(he,L)=>{for(var Ce in L)Nn.o(L,Ce)&&!Nn.o(he,Ce)&&Object.defineProperty(he,Ce,{enumerable:!0,get:L[Ce]})},Nn.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),Nn.o=(he,L)=>Object.prototype.hasOwnProperty.call(he,L);var wp={};(()=>{"use strict";var he=Nn(343),L=Nn(216),Ce=Nn.n(L),He=Nn(999);function _e(){const Ne=(0,L.usePlugin)(),[A,Ct]=(0,He.useState)("disconnected"),[Me,$e]=(0,He.useState)([]);(0,He.useEffect)(()=>{let c=!0;async function Ue(){if(!c)return;const be=await Ne.storage.getSession("bridge-status"),Le=await Ne.storage.getSession("bridge-logs");c&&(Ct(be??"disconnected"),$e(Le??[]))}Ue();const Ie=setInterval(Ue,1e3);return()=>{c=!1,clearInterval(Ie)}},[Ne]);const B={connected:{color:"#22c55e",bg:"#dcfce7",icon:"\u25CF",text:"\u5DF2\u8FDE\u63A5"},connecting:{color:"#f59e0b",bg:"#fef3c7",icon:"\u25D0",text:"\u8FDE\u63A5\u4E2D..."},disconnected:{color:"#ef4444",bg:"#fee2e2",icon:"\u25CB",text:"\u672A\u8FDE\u63A5"}}[A];return(0,he.jsxs)("div",{style:{padding:"12px",fontFamily:"system-ui, sans-serif",fontSize:"13px"},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[(0,he.jsx)("h3",{style:{margin:0,fontSize:"14px",fontWeight:600},children:"RemNote Bridge"}),(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"4px 8px",borderRadius:"12px",backgroundColor:B.bg,color:B.color,fontSize:"12px",fontWeight:500},children:[(0,he.jsx)("span",{children:B.icon}),(0,he.jsx)("span",{children:B.text})]})]}),(0,he.jsxs)("div",{style:{border:"1px solid #e5e7eb",borderRadius:"6px",backgroundColor:"#f9fafb"},children:[(0,he.jsx)("div",{style:{fontSize:"11px",fontWeight:600,padding:"8px 10px",borderBottom:"1px solid #e5e7eb",color:"#6b7280"},children:"\u65E5\u5FD7"}),(0,he.jsx)("div",{style:{maxHeight:"150px",overflowY:"auto"},children:Me.length===0?(0,he.jsx)("div",{style:{padding:"12px",color:"#9ca3af",textAlign:"center"},children:"\u6682\u65E0\u65E5\u5FD7"}):Me.slice().reverse().map((c,Ue)=>(0,he.jsxs)("div",{style:{padding:"6px 10px",borderBottom:Ue<Me.length-1?"1px solid #e5e7eb":"none",fontSize:"11px"},children:[(0,he.jsx)("span",{style:{color:"#9ca3af"},children:new Date(c.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),(0,he.jsx)("span",{style:{marginLeft:"8px",color:c.level==="error"?"#ef4444":c.level==="warn"?"#f59e0b":"#374151"},children:c.message})]},Ue))})]}),(0,he.jsxs)("button",{onClick:()=>window.open("http://127.0.0.1:3003","_blank"),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",width:"100%",marginTop:"12px",padding:"8px 0",background:"#f9fafb",border:"1px solid #e5e7eb",borderRadius:"6px",cursor:"pointer",fontSize:"13px",color:"#374151"},children:[(0,he.jsx)("span",{style:{fontSize:"16px"},children:"\u2699"}),(0,he.jsx)("span",{children:"\u6253\u5F00\u914D\u7F6E\u9875\u9762"})]})]})}(0,L.renderWidget)(_e)})()})();
65
+ */var Pe,ze,xe,Ae;if(typeof performance=="object"&&typeof performance.now=="function"){var N=performance;L.unstable_now=function(){return N.now()}}else{var xt=Date,$e=xt.now();L.unstable_now=function(){return xt.now()-$e}}if(typeof window>"u"||typeof MessageChannel!="function"){var Be=null,P=null,B=function(){if(Be!==null)try{var O=L.unstable_now();Be(!0,O),Be=null}catch(b){throw setTimeout(B,0),b}};Pe=function(O){Be!==null?setTimeout(Pe,0,O):(Be=O,setTimeout(B,0))},ze=function(O,b){P=setTimeout(O,b)},xe=function(){clearTimeout(P)},L.unstable_shouldYield=function(){return!1},Ae=L.unstable_forceFrameRate=function(){}}else{var c=window.setTimeout,tt=window.clearTimeout;if(typeof console<"u"){var Oe=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 Oe!="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 ke=!1,se=null,nt=-1,Fe=5,Ze=0;L.unstable_shouldYield=function(){return L.unstable_now()>=Ze},Ae=function(){},L.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Fe=0<O?Math.floor(1e3/O):5};var K=new MessageChannel,te=K.port2;K.port1.onmessage=function(){if(se!==null){var O=L.unstable_now();Ze=O+Fe;try{se(!0,O)?te.postMessage(null):(ke=!1,se=null)}catch(b){throw te.postMessage(null),b}}else ke=!1},Pe=function(O){se=O,ke||(ke=!0,te.postMessage(null))},ze=function(O,b){nt=c(function(){O(L.unstable_now())},b)},xe=function(){tt(nt),nt=-1}}function ue(O,b){var Z=O.length;O.push(b);e:for(;;){var U=Z-1>>>1,Y=O[U];if(Y!==void 0&&0<Qe(Y,b))O[U]=b,O[Z]=Y,Z=U;else break e}}function Re(O){return O=O[0],O===void 0?null:O}function De(O){var b=O[0];if(b!==void 0){var Z=O.pop();if(Z!==b){O[0]=Z;e:for(var U=0,Y=O.length;U<Y;){var j=2*(U+1)-1,de=O[j],A=j+1,Mt=O[A];if(de!==void 0&&0>Qe(de,Z))Mt!==void 0&&0>Qe(Mt,de)?(O[U]=Mt,O[A]=Z,U=A):(O[U]=de,O[j]=Z,U=j);else if(Mt!==void 0&&0>Qe(Mt,Z))O[U]=Mt,O[A]=Z,U=A;else break e}}return b}return null}function Qe(O,b){var Z=O.sortIndex-b.sortIndex;return Z!==0?Z:O.id-b.id}var M=[],Ne=[],je=1,ne=null,ie=3,Q=!1,J=!1,Ee=!1;function H(O){for(var b=Re(Ne);b!==null;){if(b.callback===null)De(Ne);else if(b.startTime<=O)De(Ne),b.sortIndex=b.expirationTime,ue(M,b);else break;b=Re(Ne)}}function ce(O){if(Ee=!1,H(O),!J)if(Re(M)!==null)J=!0,Pe(S);else{var b=Re(Ne);b!==null&&ze(ce,b.startTime-O)}}function S(O,b){J=!1,Ee&&(Ee=!1,xe()),Q=!0;var Z=ie;try{for(H(b),ne=Re(M);ne!==null&&(!(ne.expirationTime>b)||O&&!L.unstable_shouldYield());){var U=ne.callback;if(typeof U=="function"){ne.callback=null,ie=ne.priorityLevel;var Y=U(ne.expirationTime<=b);b=L.unstable_now(),typeof Y=="function"?ne.callback=Y:ne===Re(M)&&De(M),H(b)}else De(M);ne=Re(M)}if(ne!==null)var j=!0;else{var de=Re(Ne);de!==null&&ze(ce,de.startTime-b),j=!1}return j}finally{ne=null,ie=Z,Q=!1}}var z=Ae;L.unstable_IdlePriority=5,L.unstable_ImmediatePriority=1,L.unstable_LowPriority=4,L.unstable_NormalPriority=3,L.unstable_Profiling=null,L.unstable_UserBlockingPriority=2,L.unstable_cancelCallback=function(O){O.callback=null},L.unstable_continueExecution=function(){J||Q||(J=!0,Pe(S))},L.unstable_getCurrentPriorityLevel=function(){return ie},L.unstable_getFirstCallbackNode=function(){return Re(M)},L.unstable_next=function(O){switch(ie){case 1:case 2:case 3:var b=3;break;default:b=ie}var Z=ie;ie=b;try{return O()}finally{ie=Z}},L.unstable_pauseExecution=function(){},L.unstable_requestPaint=z,L.unstable_runWithPriority=function(O,b){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var Z=ie;ie=O;try{return b()}finally{ie=Z}},L.unstable_scheduleCallback=function(O,b,Z){var U=L.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?U+Z:U):Z=U,O){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=Z+Y,O={id:je++,callback:b,priorityLevel:O,startTime:Z,expirationTime:Y,sortIndex:-1},Z>U?(O.sortIndex=Z,ue(Ne,O),Re(M)===null&&O===Re(Ne)&&(Ee?xe():Ee=!0,ze(ce,Z-U))):(O.sortIndex=Y,ue(M,O),J||Q||(J=!0,Pe(S))),O},L.unstable_wrapCallback=function(O){var b=ie;return function(){var Z=ie;ie=b;try{return O.apply(this,arguments)}finally{ie=Z}}}},825(le,L,Pe){"use strict";le.exports=Pe(742)}},vd={};function Nn(le){var L=vd[le];if(L!==void 0)return L.exports;var Pe=vd[le]={exports:{}};return Pf[le](Pe,Pe.exports,Nn),Pe.exports}Nn.n=le=>{var L=le&&le.__esModule?()=>le.default:()=>le;return Nn.d(L,{a:L}),L},Nn.d=(le,L)=>{for(var Pe in L)Nn.o(L,Pe)&&!Nn.o(le,Pe)&&Object.defineProperty(le,Pe,{enumerable:!0,get:L[Pe]})},Nn.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),Nn.o=(le,L)=>Object.prototype.hasOwnProperty.call(le,L);var wp={};(()=>{"use strict";var le=Nn(343),L=Nn(216),Pe=Nn.n(L),ze=Nn(999);function xe(N){switch(N){case"preempted":return"\u88AB\u5B6A\u751F Plugin \u62A2\u5360\uFF0C\u5DF2\u65AD\u5F00";case"twin_occupied":return"\u5B6A\u751F Plugin \u5DF2\u8FDE\u63A5\uFF0C\u5F53\u524D\u65E0\u6CD5\u8FDE\u63A5";case"other_occupied":return"\u5DF2\u6709\u5176\u4ED6 Plugin \u8FDE\u63A5\uFF0C\u7B49\u5F85\u91CD\u8BD5";default:return"\u8BE5\u5B9E\u4F8B\u672A\u542F\u52A8\uFF0C\u6216\u7AEF\u53E3\u88AB\u5360\u7528"}}function Ae(){const N=(0,L.usePlugin)(),[xt,$e]=(0,ze.useState)([]),[Be,P]=(0,ze.useState)([]),[B,c]=(0,ze.useState)(""),[tt,Oe]=(0,ze.useState)(29102);(0,ze.useEffect)(()=>{let se=!0;async function nt(){if(!se)return;const Ze=await N.storage.getSession("bridge-slots"),K=await N.storage.getSession("bridge-logs"),te=await N.storage.getSession("bridge-instance"),ue=await N.storage.getSession("bridge-config-port");se&&($e(Ze??[]),P(K??[]),c(te??""),Oe(ue??29102))}nt();const Fe=setInterval(nt,1e3);return()=>{se=!1,clearInterval(Fe)}},[N]);const ke=xt.filter(se=>se.status==="connected").length;return(0,le.jsxs)("div",{style:{padding:"12px",fontFamily:"system-ui, sans-serif",fontSize:"13px"},children:[(0,le.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[(0,le.jsxs)("h3",{style:{margin:0,fontSize:"14px",fontWeight:600},children:["RemNote Bridge",B?` (${B})`:""]}),(0,le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"4px 8px",borderRadius:"12px",backgroundColor:ke>0?"#dcfce7":"#fee2e2",color:ke>0?"#22c55e":"#ef4444",fontSize:"12px",fontWeight:500},children:[(0,le.jsx)("span",{children:ke>0?"\u25CF":"\u25CB"}),(0,le.jsx)("span",{children:ke})]})]}),(0,le.jsxs)("div",{style:{border:"1px solid #e5e7eb",borderRadius:"6px",backgroundColor:"#f9fafb",marginBottom:"12px"},children:[(0,le.jsx)("div",{style:{fontSize:"11px",fontWeight:600,padding:"8px 10px",borderBottom:"1px solid #e5e7eb",color:"#6b7280"},children:"\u8FDE\u63A5\u72B6\u6001"}),xt.map(se=>(0,le.jsxs)("div",{children:[(0,le.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 10px",borderBottom:"1px solid #f3f4f6"},children:[(0,le.jsxs)("span",{style:{fontSize:"12px"},children:[se.isTwin?"\u2605 ":" ","\u69FD\u4F4D ",se.slotIndex," (",se.wsPort,")"]}),(0,le.jsx)("span",{style:{fontSize:"11px",color:se.status==="connected"?"#22c55e":se.status==="connecting"?"#f59e0b":"#9ca3af"},children:se.status==="connected"?"\u25CF \u5DF2\u8FDE\u63A5":se.status==="connecting"?"\u25D0 \u8FDE\u63A5\u4E2D...":"\u25CB \u672A\u8FDE\u63A5"})]}),se.status==="disconnected"&&(0,le.jsx)("div",{style:{padding:"2px 10px 6px 26px",fontSize:"10px",color:"#9ca3af"},children:xe(se.disconnectReason)})]},se.slotIndex))]}),(0,le.jsxs)("div",{style:{border:"1px solid #e5e7eb",borderRadius:"6px",backgroundColor:"#f9fafb"},children:[(0,le.jsx)("div",{style:{fontSize:"11px",fontWeight:600,padding:"8px 10px",borderBottom:"1px solid #e5e7eb",color:"#6b7280"},children:"\u65E5\u5FD7"}),(0,le.jsx)("div",{style:{maxHeight:"150px",overflowY:"auto"},children:Be.length===0?(0,le.jsx)("div",{style:{padding:"12px",color:"#9ca3af",textAlign:"center"},children:"\u6682\u65E0\u65E5\u5FD7"}):Be.slice().reverse().map((se,nt)=>(0,le.jsxs)("div",{style:{padding:"6px 10px",borderBottom:nt<Be.length-1?"1px solid #e5e7eb":"none",fontSize:"11px"},children:[(0,le.jsx)("span",{style:{color:"#9ca3af"},children:new Date(se.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),(0,le.jsx)("span",{style:{marginLeft:"8px",color:se.level==="error"?"#ef4444":se.level==="warn"?"#f59e0b":"#374151"},children:se.message})]},nt))})]}),(0,le.jsxs)("button",{onClick:()=>window.open(`http://127.0.0.1:${tt}`,"_blank"),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",width:"100%",marginTop:"12px",padding:"8px 0",background:"#f9fafb",border:"1px solid #e5e7eb",borderRadius:"6px",cursor:"pointer",fontSize:"13px",color:"#374151"},children:[(0,le.jsx)("span",{style:{fontSize:"16px"},children:"\u2699"}),(0,le.jsx)("span",{children:"\u6253\u5F00\u914D\u7F6E\u9875\u9762"})]})]})}(0,L.renderWidget)(Ae)})()})();