@atom.io/template-react-node-backend 0.0.40 → 0.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
 
2
- > @atom.io/template-react-node-backend@0.0.40 build /home/runner/work/wayforge/wayforge/templates/react-node-backend
2
+ > @atom.io/template-react-node-backend@0.0.41 build /home/runner/work/wayforge/wayforge/templates/react-node-backend
3
3
  > vite build
4
4
 
5
5
  rolldown-vite v7.3.0 building client environment for production...
@@ -8,5 +8,5 @@ rendering chunks...
8
8
  computing gzip size...
9
9
  dist/index.html 0.45 kB │ gzip: 0.29 kB
10
10
  dist/assets/index-CqTfTEH3.css 2.97 kB │ gzip: 1.02 kB
11
- dist/assets/index-CvRiQC6Q.js 499.60 kB │ gzip: 132.89 kB
12
- ✓ built in 1.75s
11
+ dist/assets/index-Cr73pNBI.js 499.60 kB │ gzip: 132.89 kB
12
+ ✓ built in 1.85s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atom.io/template-react-node-backend
2
2
 
3
+ ## 0.0.41
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b211c6c]
8
+ - Updated dependencies [b211c6c]
9
+ - atom.io@0.46.17
10
+
3
11
  ## 0.0.40
4
12
 
5
13
  ### Patch Changes
@@ -9,7 +9,7 @@ Error generating stack: `+e.message+`
9
9
  `).replace(Nd,``)}function Fd(e,t){return t=Pd(t),Pd(e)===t}function X(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||tn(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&tn(e,``+r);break;case`className`:Vt(e,`class`,r);break;case`tabIndex`:Vt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Vt(e,n,r);break;case`style`:an(e,r,o);break;case`data`:if(t!==`object`){Vt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=k(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&X(e,t,`name`,a.name,a,null),X(e,t,`formEncType`,a.formEncType,a,null),X(e,t,`formMethod`,a.formMethod,a,null),X(e,t,`formTarget`,a.formTarget,a,null)):(X(e,t,`encType`,a.encType,a,null),X(e,t,`method`,a.method,a,null),X(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=k(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=ln);break;case`onScroll`:r!=null&&Y(`scroll`,e);break;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=k(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Y(`beforetoggle`,e),Y(`toggle`,e),Bt(e,`popover`,r);break;case`xlinkActuate`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ht(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ht(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ht(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Bt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=sn.get(n)||n,Bt(e,n,r))}}function Id(e,t,n,r,a,o){switch(n){case`style`:an(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?tn(e,r):(typeof r==`number`||typeof r==`bigint`)&&tn(e,``+r);break;case`onScroll`:r!=null&&Y(`scroll`,e);break;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=ln);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Nt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[yt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Bt(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:X(e,t,o,s,n,null)}}a&&X(e,t,`srcSet`,n.srcSet,n,null),r&&X(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:X(e,t,r,d,n,null)}}Xt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:X(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Qt(e,!!r,n,!0):Qt(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:X(e,t,s,c,n,null)}en(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:X(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<bd.length;r++)Y(bd[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:X(e,t,u,r,n,null)}return;default:if(on(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&X(e,t,c,r,n,null))}function Rd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||X(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&X(e,t,p,m,r,f)}}O(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||X(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&X(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Qt(e,!!n,n?[]:``,!1):Qt(e,!!n,t,!0)):Qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:X(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&X(e,t,s,a,r,o)}$t(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:X(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:X(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&X(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:X(e,t,u,p,r,m)}return;default:if(on(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&X(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||X(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Gd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Kd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e===qd?!1:(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Pp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Tt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body);n=i}while(n);Pp(t)}function nf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function rf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rf(n),Et(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(r){if(!e[Tt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}}else if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;if(e=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function df(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Et(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=T.d;T.d={f:xf,r:Sf,D:Z,C:Tf,L:Ef,m:Df,X:Of,S:Q,M:kf};function xf(){var e=bf.f(),t=wu();return e||t}function Sf(e){var t=Ot(e);t!==null&&t.tag===5&&t.type===`form`?As(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Yt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),jt(t),r.head.appendChild(t)))}}function Z(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Tf(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Ef(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Yt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Yt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Yt(n.imageSizes)+`"]`)):i+=`[href="`+Yt(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}_f.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Ld(t,`link`,e),jt(t),r.head.appendChild(t)))}}function Df(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Yt(r)+`"][href="`+Yt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!_f.has(a)&&(e=m({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),jt(r),n.head.appendChild(r)}}}function Q(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=At(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&zf(e,n);var c=o=r.createElement(`link`);jt(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=At(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0},t),(t=_f.get(i))&&Bf(e,t),a=n.createElement(`script`),jt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=At(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Bf(e,t),a=n.createElement(`script`),jt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=ye.current)?yf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=At(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=At(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=At(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function jf(e){return`href="`+Yt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ld(t,`link`,n),jt(t),e.head.appendChild(t))}function Ff(e){return`[src="`+Yt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Yt(n.href)+`"]`);if(r)return t.instance=r,jt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),jt(r),Ld(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,jt(o),o;r=Nf(n),(a=_f.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),jt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,jt(a),a):(r=n,(a=_f.get(o))&&(r=m({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),jt(a),Ld(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Tt]||a[vt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Yf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,jt(a);return}a=t.ownerDocument||t,r=Nf(r),(i=_f.get(i))&&zf(r,i),a=a.createElement(`link`),jt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Yf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function Jf(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xf=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xf=new Map,t.forEach(Qf,e),Xf=null,Yf.call(e))}function Qf(e,t){if(!(t.state.loading&4)){var n=Xf.get(e);if(n)var r=n.get(null);else{n=new Map,Xf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Yf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var $f={$$typeof:ne,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function ep(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=st(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=st(0),this.hiddenUpdates=st(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function tp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ep(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=pi(3,null,null,t),e.current=a,a.stateNode=e,t=fa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function np(e){return e?(e=di,e):di}function rp(e,t,n,r,i,a){i=np(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(yu(n,e,t),qa(n,e,t))}function ip(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ap(e,t){ip(e,t),(e=e.alternate)&&ip(e,t)}function op(e){if(e.tag===13||e.tag===31){var t=ci(e,67108864);t!==null&&yu(t,e,67108864),ap(e,67108864)}}function sp(e){if(e.tag===13||e.tag===31){var t=_u();t=pt(t);var n=ci(e,t);n!==null&&yu(n,e,t),ap(e,t)}}var cp=!0;function lp(e,t,n,r){var i=w.T;w.T=null;var a=T.p;try{T.p=2,dp(e,t,n,r)}finally{T.p=a,w.T=i}}function up(e,t,n,r){var i=w.T;w.T=null;var a=T.p;try{T.p=8,dp(e,t,n,r)}finally{T.p=a,w.T=i}}function dp(e,t,n,r){if(cp){var i=fp(r);if(i===null)Dd(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=Ot(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=nt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}od(a),!(H&6)&&(au=Le()+500,sd(0,!1))}}break;case 31:case 13:s=ci(a,2),s!==null&&yu(s,a,2),wu(),ap(a,2)}if(a=fp(r),a===null&&Dd(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Dd(e,t,r,null,n)}}function fp(e){return e=dn(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=Dt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pp=e,null}function hp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`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`.split(` `);function wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ot(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=Dt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,gt(e.priority,function(){sp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,gt(e.priority,function(){sp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);un=r,n.target.dispatchEvent(r),un=null}else return t=Ot(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(mp(r||n)===null)continue;break}var a=Ot(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[yt]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[yt]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;rp(n,_u(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rp(e.current,2,null,e,null,null),wu(),t[bt]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=ht();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.3`)throw Error(i(527,Rp,`19.2.3`));T.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.3`,rendererPackageName:`react-dom`,currentDispatcherRef:w,reconcilerVersion:`19.2.3`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{Ke=Bp.inject(zp),qe=Bp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=tp(e,1,!1,null,null,n,r,null,o,s,c,Fp),e[bt]=t.current,Td(e),new Ip(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=o((e=>{var t=d().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),y=o(((e,t)=>{t.exports=v()}));y();var ee=_(),b=l(d(),1);function te(e){let t={},n=0;for(let r of e)t[r]=n,t[n]=r,++n;return t}function ne(e){return JSON.parse(e)}var x=e=>JSON.stringify(e);Array.prototype,Boolean.prototype,Number.prototype,Object.prototype,String.prototype,te([`add`,`delete`,`clear`]),Set;function S(e){for(;e.child!==null;)e=e.child;return e}function re(e){for(;e.parent!==null;)e=e.parent;return e}var ie=/^\[object (?:Async|Generator|AsyncGenerator)?Function\]$/;function ae(e){let t=Object.prototype.toString.call(e);return ie.test(t)}function oe(e,t){return ae(e)?e(t):e}var se=class extends Promise{fate;resolve;reject;done=!1;constructor(e){let t,n;super((e,r)=>{t=e,n=r}),this.resolve=t,this.reject=n,this.use(e instanceof Promise?e:new Promise(e))}pass(e,t){e===this.fate&&(this.resolve(t),this.done=!0)}fail(e,t){e===this.fate&&(this.reject(t),this.done=!0)}use(e){if(this!==e)if(e instanceof Promise){let t=e;this.fate=t,t.then(e=>{this.pass(t,e)},e=>{this.fail(t,e)})}else this.resolve(e),this.fate=void 0}},C=class{Subscriber;subscribers=new Map;subscribe(e,t){return this.subscribers.set(e,t),()=>{this.unsubscribe(e)}}unsubscribe(e){this.subscribers.delete(e)}next(e){let t=this.subscribers.values();for(let n of t)n(e)}},ce=class extends C{state;constructor(e){super(),this.state=e}next(e){this.state=e,super.next(e)}},le=class e{_buffer;_index=0;constructor(e){let t;t=typeof e==`number`?e:e.length,this._buffer=Array.from({length:t})}get buffer(){return this._buffer}get index(){return this._index}add(e){this._buffer[this._index]=e,this._index=(this._index+1)%this._buffer.length}copy(){let t=new e([...this._buffer]);return t._index=this._index,t}};function ue(e){let t={key:e.key,type:e.type};return`family`in e&&(t.family=e.family),t}var de=class extends Map{deleted=new Set;changed=new Set;source;constructor(e){super(),this.source=e}get(e){if(super.has(e))return super.get(e);if(!this.deleted.has(e)&&this.source.has(e))return this.source.get(e)}set(e,t){return this.deleted.delete(e),this.source.has(e)&&this.changed.add(e),super.set(e,t)}hasOwn(e){return super.has(e)}has(e){return!this.deleted.has(e)&&(super.has(e)||this.source.has(e))}delete(e){return this.source.has(e)&&(this.deleted.add(e),this.changed.delete(e)),super.delete(e)}clear(){this.deleted=new Set(this.source.keys()),this.changed.clear(),super.clear()}*[Symbol.iterator](){yield*super[Symbol.iterator]();for(let[e,t]of this.source)!this.deleted.has(e)&&!this.changed.has(e)&&(yield[e,t])}*entries(){yield*this[Symbol.iterator]()}*keys(){yield*super.keys();for(let e of this.source.keys())!this.deleted.has(e)&&!this.changed.has(e)&&(yield e)}*values(){for(let[,e]of this[Symbol.iterator]())yield e}forEach(e){for(let[t,n]of this[Symbol.iterator]())e(n,t,this)}get size(){return super.size+this.source.size-this.changed.size-this.deleted.size}},w=class extends Set{deleted=new Set;source;constructor(e){super(),this.source=e}add(e){return this.source.has(e)?(this.deleted.delete(e),this):super.add(e)}hasOwn(e){return super.has(e)}has(e){return!this.deleted.has(e)&&(super.has(e)||this.source.has(e))}delete(e){return this.source.has(e)?(this.deleted.add(e),!0):super.delete(e)}clear(){this.deleted=new Set(this.source),super.clear()}*[Symbol.iterator](){yield*super[Symbol.iterator]();for(let e of this.source)this.deleted.has(e)||(yield e)}*iterateOwn(){yield*super[Symbol.iterator]()}get size(){return super.size+this.source.size-this.deleted.size}},T=class extends Map{deleted=new Set;source;constructor(e){super(),this.source=e}get(e){if(super.has(e))return super.get(e);if(!this.deleted.has(e)&&this.source.has(e)){let t=new w(this.source.get(e));return super.set(e,t),t}}set(e,t){return this.deleted.delete(e),super.set(e,t)}has(e){return!this.deleted.has(e)&&(super.has(e)||this.source.has(e))}delete(e){return this.deleted.add(e),super.delete(e)}},fe=class e{a;b;cardinality;relations=new Map;contents=new Map;isAType;isBType;isContent;makeContentKey=(e,t)=>`${e}:${t}`;warn;getRelatedKeys(e){return this.relations.get(e)}addRelation(e,t){let n=this.relations.get(e),r=this.relations.get(t);n?n.add(t):(n=new Set([t]),this.relations.set(e,n)),r?r.add(e):(r=new Set([e]),this.relations.set(t,r))}deleteRelation(e,t){let n=this.relations.get(e);if(n){n.delete(t),n.size===0&&this.relations.delete(e);let r=this.relations.get(t);r&&(r.delete(e),r.size===0&&this.relations.delete(t))}}replaceRelationsUnsafely(e,t){this.relations.set(e,new Set(t));for(let n of t){let t=new Set().add(e);this.relations.set(n,t)}}replaceRelationsSafely(e,t){let n=this.relations.get(e),r=this.isAType?.(e)?e:void 0,i=r===void 0?e:void 0;if(n)for(let t of n){r??=t,i??=t;let n=this.relations.get(t);n&&(n.size===1?this.relations.delete(t):n.delete(e),this.contents.delete(this.makeContentKey(r,i)))}this.relations.set(e,new Set(t));for(let n of t){let t=this.relations.get(n);t?t.add(e):(t=new Set().add(e),this.relations.set(n,t))}}getContentInternal(e){return this.contents.get(e)}setContent(e,t){this.contents.set(e,t)}deleteContent(e){this.contents.delete(e)}constructor(e,t){if(this.a=e.between[0],this.b=e.between[1],this.cardinality=e.cardinality,this.isAType=t?.isAType??null,this.isBType=t?.isBType??null,this.isContent=t?.isContent??null,t?.makeContentKey&&(this.makeContentKey=t.makeContentKey),!t?.externalStore){let n=t?.source;n===void 0&&(this.relations=new Map(e.relations?.map(([e,t])=>[e,new Set(t)])),this.contents=new Map(e.contents)),n&&(this.relations=new T(n.relations),this.contents=new de(n.contents))}if(t?.externalStore){let n=t.externalStore;this.has=(e,t)=>n.has(e,t),this.addRelation=(e,t)=>{n.addRelation(e,t)},this.deleteRelation=(e,t)=>{n.deleteRelation(e,t)},this.replaceRelationsSafely=(e,t)=>{n.replaceRelationsSafely(e,t)},this.replaceRelationsUnsafely=(e,t)=>{n.replaceRelationsUnsafely(e,t)},this.getRelatedKeys=e=>n.getRelatedKeys(e),n.getContent&&(this.getContentInternal=e=>n.getContent(e),this.setContent=(e,t)=>{n.setContent(e,t)},this.deleteContent=e=>{n.deleteContent(e)});for(let[t,n]of e.relations??[]){let e=this.isAType?.(t)?t:void 0,r=e===void 0?t:void 0;for(let t of n)e??=t,r??=t,this.addRelation(e,r)}for(let[t,n]of e.contents??[])this.setContent(t,n)}t?.warn&&(this.warn=t.warn)}toJSON(){return{between:[this.a,this.b],cardinality:this.cardinality,relations:[...this.relations.entries()].map(([e,t])=>[e,[...t]]),contents:[...this.contents.entries()]}}set(...e){let t,n,r;switch(e.length){case 1:{let i=e[0];t=i[this.a],n=i[this.b],r=void 0;break}case 2:{let i=e[0];typeof i==`string`?[t,n]=e:(t=i[this.a],n=i[this.b],r=e[1]);break}default:t=e[0],n=e[1],r=e[2];break}switch(this.cardinality){case`1:1`:{let e=this.getRelatedKey(t);e&&e!==n&&this.delete(t,e)}case`1:n`:{let e=this.getRelatedKey(n);e&&e!==t&&this.delete(e,n)}break;case`n:n`:}if(r){let e=this.makeContentKey(t,n);this.setContent(e,r)}return this.addRelation(t,n),this}delete(e,t){t=typeof t==`string`?t:e[this.b];let n=typeof e==`string`?e:e[this.a];if(n===void 0&&typeof t==`string`){let e=this.getRelatedKeys(t);if(e)for(let n of e)this.delete(n,t)}else if(typeof n==`string`&&t===void 0){let e=this.getRelatedKeys(n);if(e)for(let t of e)this.delete(n,t)}else if(typeof n==`string`&&typeof t==`string`){this.deleteRelation(n,t);let e=this.makeContentKey(n,t);this.deleteContent(e)}return this}getRelatedKey(e){let t=this.getRelatedKeys(e);if(t){t.size>1&&this.warn?.(`${t.size} related keys were found for key "${e}": (${[...t].map(e=>`"${e}"`).join(`, `)}). Only one related key was expected.`);let n;for(let e of t){n=e;break}return n}}replaceRelations(e,t,n){let r=!Array.isArray(t),i=r?Object.keys(t):t;if(n?.reckless?this.replaceRelationsUnsafely(e,i):this.replaceRelationsSafely(e,i),r)for(let n of i){let r=this.makeContentKey(e,n),i=t[n];this.setContent(r,i)}return this}getContent(e,t){let n=this.makeContentKey(e,t);return this.getContentInternal(n)}getRelationEntries(e){let t=e[this.a],n=e[this.b];if(t!==void 0&&n===void 0){let e=this.getRelatedKeys(t);if(e)return[...e].map(e=>[e,this.getContent(t,e)])}if(t===void 0&&n!==void 0){let e=this.getRelatedKeys(n);if(e)return[...e].map(e=>[e,this.getContent(e,n)])}return[]}has(e,t){return t?this.getRelatedKeys(e)?.has(t)??!1:this.relations.has(e)}overlay(){let t={source:this,makeContentKey:this.makeContentKey};return this.isAType&&(t.isAType=this.isAType),this.isBType&&(t.isBType=this.isBType),this.isContent&&(t.isContent=this.isContent),this.warn&&(t.warn=this.warn),new e({between:[this.a,this.b],cardinality:this.cardinality},t)}incorporate(e){let{relations:t,contents:n}=e;for(let[e,n]of t)if(n instanceof w){let{source:e}=n;for(let t of n.iterateOwn())e.add(t)}else this.relations.set(e,n);for(let e of t.deleted)this.relations.delete(e);for(let[e,t]of n)this.contents.set(e,t);for(let e of n.deleted)this.contents.delete(e)}};function pe(e){return e.startsWith(`🔍 `)}function me(e){return`epoch`in e.transactionMeta}function he(e){return`phase`in e.transactionMeta}var ge=class{parent=null;child=null;valueMap=new Map;defaults=new Map;atoms=new Map;writableSelectors=new Map;readonlySelectors=new Map;atomsThatAreDefault=new Set;selectorAtoms=new fe({between:[`selectorKey`,`atomKey`],cardinality:`n:n`});selectorGraph=new fe({between:[`upstreamSelectorKey`,`downstreamSelectorKey`],cardinality:`n:n`},{makeContentKey:(...e)=>e.sort().join(`:`)});trackers=new Map;families=new Map;joins=new Map;transactions=new Map;transactionMeta={epoch:new Map,actionContinuities:new fe({between:[`continuity`,`action`],cardinality:`1:n`})};timelines=new Map;timelineTopics=new fe({between:[`timelineKey`,`topicKey`],cardinality:`1:n`});disposalTraces=new le(100);molecules=new Map;moleculeGraph=new fe({between:[`upstreamMoleculeKey`,`downstreamMoleculeKey`],cardinality:`n:n`},{makeContentKey:(...e)=>e.sort().join(`:`)});moleculeData=new fe({between:[`moleculeKey`,`stateFamilyKey`],cardinality:`n:n`},{makeContentKey:(...e)=>e.sort().join(`:`)});keyRefsInJoins=new fe({between:[`moleculeKey`,`joinKey`],cardinality:`n:n`},{makeContentKey:(...e)=>e.sort().join(`:`)});miscResources=new Map;on={atomCreation:new C,atomDisposal:new C,selectorCreation:new C,selectorDisposal:new C,timelineCreation:new C,transactionCreation:new C,transactionApplying:new ce(null),operationClose:new C,moleculeCreation:new C,moleculeDisposal:new C};operation={open:!1};config={name:`IMPLICIT_STORE`,lifespan:`ephemeral`,isProduction:!0};loggers=[new Rt(`warn`,(e,t,n)=>!pe(n))];logger={error:(...e)=>{for(let t of this.loggers)t.error(...e)},info:(...e)=>{for(let t of this.loggers)t.info(...e)},warn:(...e)=>{for(let t of this.loggers)t.warn(...e)}};constructor(e,t=null){if(this.config={...t?.config,...e},t!==null){this.operation={...t?.operation},me(t)&&(this.transactionMeta={epoch:new Map(t?.transactionMeta.epoch),actionContinuities:new fe(t?.transactionMeta.actionContinuities.toJSON())});for(let[,e]of t.families)e.internalRoles?.includes(`mutable`)||e.internalRoles?.includes(`join`)||e.install(this);let e=new Set;for(let[,n]of t.atoms)if(!e.has(n.key)&&(n.install(this),n.type===`mutable_atom`)){let r=bt(t,n),i=xt(n);e.add(r.key),e.add(i.key)}for(let[,e]of t.readonlySelectors)e.install(this);for(let[,n]of t.writableSelectors)e.has(n.key)||n.install(this);for(let[,e]of t.transactions)e.install(this);for(let[,e]of t.timelines)e.install(this)}}},E={get STORE(){return globalThis.ATOM_IO_IMPLICIT_STORE??=new ge({name:`IMPLICIT_STORE`,lifespan:`ephemeral`,isProduction:!0}),globalThis.ATOM_IO_IMPLICIT_STORE}},_e=class extends Error{constructor(e,t){super(`${Ft[e.type]} ${x(e.key)} not found in store "${t.config.name}".`)}};function ve(e,t){let n,r=e;for(;r!==null;){switch(t.type){case`atom`:case`mutable_atom`:n=r.atoms.get(t.key);break;case`writable_pure_selector`:case`writable_held_selector`:n=r.writableSelectors.get(t.key);break;case`readonly_pure_selector`:case`readonly_held_selector`:n=r.readonlySelectors.get(t.key);break;case`atom_family`:case`mutable_atom_family`:case`writable_pure_selector_family`:case`readonly_pure_selector_family`:case`writable_held_selector_family`:case`readonly_held_selector_family`:n=r.families.get(t.key);break;case`timeline`:n=r.timelines.get(t.key);break;case`transaction`:n=r.transactions.get(t.key);break}if(n)return n;r=r.child}throw new _e(t,e)}function ye(e,t,n,r){let i=e.disposalTraces.buffer.find(e=>e?.key===x(r));switch(e.logger.error(`❌`,t.type,t.key,`gets a fallback value because key`,r,`is not allocated`,i?`This key was previously disposed:\n${i.trace}`:`(no previous disposal trace found)`),n.type){case`mutable_atom_family`:{if(e.defaults.has(n.key))return e.defaults.get(n.key);let t=new n.class;return e.defaults.set(n.key,t),t.READONLY_VIEW}case`atom_family`:{if(e.defaults.has(n.key))return e.defaults.get(n.key);let t=n.default,i=t(r);return e.defaults.set(n.key,i),i}case`readonly_pure_selector_family`:case`writable_pure_selector_family`:case`readonly_held_selector_family`:case`writable_held_selector_family`:{if(e.defaults.has(n.key))return e.defaults.get(n.key);let t=n.default(r);return e.defaults.set(n.key,t),t}}}function be(e,t){let{type:n,key:r,catch:i}=t;switch(n){case`readonly_pure_selector`:case`writable_pure_selector`:{let a;e.logger.info(`🧮`,n,r,`computing value`);try{a=t.getFrom(e),a instanceof Promise&&(a=a.catch(t=>{if(e.logger.error(`💥`,n,r,`rejected:`,t),i){for(let e of i)if(t instanceof e)return t}throw t}))}catch(a){if(e.logger.error(`💥`,n,r,`rejected:`,a),i){for(let n of i)if(a instanceof n)return Ct(e,t,a)}throw a}return Ct(e,t,a)}case`atom`:{let a;if(ae(t.default))try{a=t.default(),a instanceof Promise&&(a=a.catch(t=>{if(e.logger.error(`💥`,n,r,`rejected:`,t),i){for(let e of i)if(t instanceof e)return t}throw t}))}catch(o){if(e.logger.error(`💥`,n,r,`rejected:`,o),i){for(let n of i)if(o instanceof n)return a=Ct(e,t,o),e.logger.info(`✨`,t.type,r,`computed default`,a),a}throw o}else a=t.default,e.logger.info(`✨`,t.type,r,`using static default`,a);return Ct(e,t,a)}}}function xe(e,t,n){if(e.valueMap.has(t.key))return wt(e,t,n);e.logger.info(`❔`,t.type,t.key,`value not found in cache`);let{key:r}=t;switch(t.type){case`readonly_held_selector`:case`writable_held_selector`:return e.logger.info(`🧮`,t.type,r,`computing value`),t.getFrom(e);case`writable_pure_selector`:case`readonly_pure_selector`:case`atom`:return be(e,t);case`mutable_atom`:{let n=new t.class;return e.logger.info(`✨`,t.type,r,`created new instance`,n),Ct(e,t,n)}}}function Se(e,t){return ve(e,{key:t.family.key,type:`${t.type}_family`})}var Ce={atom_family:`atom`,molecule_family:`molecule`,mutable_atom_family:`mutable_atom`,readonly_held_selector_family:`readonly_held_selector`,readonly_pure_selector_family:`readonly_pure_selector`,writable_held_selector_family:`writable_held_selector`,writable_pure_selector_family:`writable_pure_selector`},we=Symbol(`MUST_CREATE`),Te=Symbol(`DO_NOT_CREATE`);function Ee(e,t,n,r){let i=x(r),a=t.molecules.get(i);if(!a&&t.config.lifespan===`immortal`){let{type:e,key:r}=n;return t.logger.warn(`💣`,`key`,i,`was used to mint a counterfeit token for`,e,`"${r}"`),{counterfeit:!0,key:`${r}(${i})`,type:Ce[e],family:{key:r,subKey:i}}}let o;if(e===we)t.logger.info(`👪`,n.type,n.key,`adds member`,typeof r==`string`?`\`${r}\``:r),o=n.create(r),a&&t.moleculeData.set(i,n.key);else{let{type:e,key:t}=n;return{key:`${t}(${i})`,type:Ce[e],family:{key:t,subKey:i}}}return o}function De(e,...t){let n,r,i,a,o;if(t.length===1){if(o=t[0],`family`in o){let t=Se(e,o);if(i=ve(e,t),a=ne(o.family.subKey),n=ke(e,t,a),`counterfeit`in o)return{token:o,family:i,subKey:a,isNew:!1};n?o=n:(r=Ee(we,e,t,a),o=r)}}else i=ve(e,t[0]),a=t[1],n=ke(e,i,a),n?o=n:(r=Ee(we,e,i,a),o=r);let s=`counterfeit`in o;if(r&&s===!1&&i){let t;switch(o.type){case`readonly_pure_selector`:case`readonly_held_selector`:t=`readable`;break;case`atom`:case`mutable_atom`:case`writable_pure_selector`:case`writable_held_selector`:t=`writable`;break}let n={type:`state_creation`,subType:t,token:o,timestamp:Date.now()};i.subject.next(n);let r=S(e);if(o.family)if(me(r))switch(o.type){case`atom`:case`mutable_atom`:e.on.atomCreation.next(o);break;case`writable_pure_selector`:case`readonly_pure_selector`:case`writable_held_selector`:case`readonly_held_selector`:e.on.selectorCreation.next(o);break}else he(r)&&r.on.transactionApplying.state===null&&r.transactionMeta.update.subEvents.push(n)}return{token:o,family:i,subKey:a,isNew:!!r}}function Oe(e,...t){let{token:n,family:r,subKey:i}=De(e,...t);return`counterfeit`in n&&r&&i?ye(e,n,r,i):xe(e,ve(e,n))}function ke(e,t,n){let r=x(n),i=`${t.key}(${r})`,a=S(e),o;switch(t.type){case`atom_family`:case`mutable_atom_family`:o=a.atoms.get(i);break;case`writable_held_selector_family`:case`writable_pure_selector_family`:o=a.writableSelectors.get(i);break;case`readonly_held_selector_family`:case`readonly_pure_selector_family`:o=a.readonlySelectors.get(i);break}return o&&ue(o)}function Ae(e,t,n){let r=ve(e,t);return ke(e,t,n)||Ee(Te,e,r,n)}function je(e,t,n){let r=t.key,i=`readonly_pure_selector_family`,a={key:r,type:i},o=e.families.get(r);o&&e.config.isProduction===!0&&e.logger.error(`❗`,i,r,`Overwriting an existing ${Ft[o.type]} "${o.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);let s=new C,c=n=>{let i=x(n),a={key:r,subKey:i},o=`${r}(${i})`,s=S(e),c={key:o,get:t.get(n)};return t.catch&&(c.catch=t.catch),st(s,c,a)},l={...a,create:c,internalRoles:n,subject:s,install:e=>je(e,t),default:n=>t.get(n)({get:(...t)=>Oe(e,...t),find:(...t)=>Ae(e,...t),json:t=>bt(e,t)})};return e.families.set(r,l),a}function Me(e,t,n){let r={key:t.key,type:`atom_family`},i=e.families.get(t.key);i&&e.config.isProduction===!0&&e.logger.error(`❗`,`atom_family`,t.key,`Overwriting an existing ${Ft[i.type]} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);let a=new C,o=n=>{let r=x(n),i={key:t.key,subKey:r},a=`${t.key}(${r})`,o=S(e),s=t.default,c={key:a,default:ae(s)?()=>s(n):s};return t.effects&&(c.effects=t.effects(n)),t.catch&&(c.catch=t.catch),Ot(o,c,i)},s={...r,create:o,default:t.default,subject:a,install:e=>Me(e,t),internalRoles:n};return e.families.set(t.key,s),ae(t.default)===!1&&e.defaults.set(t.key,t.default),r}function Ne(e,t,n){let r=t.key,i=`writable_pure_selector_family`,a={key:r,type:i},o=e.families.get(r);o&&e.config.isProduction===!0&&e.logger.error(`❗`,i,r,`Overwriting an existing ${Ft[o.type]} "${o.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);let s=new C,c=n=>{let i=x(n),a={key:r,subKey:i},o=`${r}(${i})`,s=S(e),c={key:o,get:t.get(n),set:t.set(n)};return t.catch&&(c.catch=t.catch),lt(s,c,a)},l={...a,create:c,internalRoles:n,subject:s,install:e=>Ne(e,t),default:n=>t.get(n)({get:(...t)=>Oe(e,...t),find:(...t)=>Ae(e,...t),json:t=>bt(e,t)})};return e.families.set(r,l),a}function Pe(e,...t){let n;if(t.length===1)n=t[0];else{let r=t[0],i=t[1];n=Ae(e,r,i)}try{ve(e,n)}catch{e.logger.error(`❌`,n.type,n.key,`could not be disposed because it was not found in the store "${e.config.name}".`);return}switch(n.type){case`atom`:case`mutable_atom`:At(e,n);break;case`writable_pure_selector`:case`readonly_pure_selector`:case`writable_held_selector`:case`readonly_held_selector`:dt(e,n);break}}function Fe(e,t){if(e.operation.open){let n=performance.now();return e.logger.info(`🚫`,t.type,t.key,`deferring setState at T-${n} until setState for "${e.operation.token.key}" is done`),n}return e.operation={open:!0,done:new Set,prev:new Map,timestamp:Date.now(),token:t,subEvents:[]},e.logger.info(`⭕`,t.type,t.key,`operation start in store "${e.config.name}"${he(e)?` ${e.transactionMeta.phase} "${e.transactionMeta.update.token.key}"`:``}`),e}function Ie(e){e.operation.open&&e.logger.info(`🔴`,e.operation.token.type,e.operation.token.key,`operation done in store "${e.config.name}"`),e.operation={open:!1},e.on.operationClose.next(e.operation)}var Le=(e,t)=>e.operation.open?e.operation.done.has(t):(e.logger.error(`🐞`,`unknown`,t,`isDone called outside of an operation. This is probably a bug in AtomIO.`),!0),Re=(e,t)=>{if(!e.operation.open){e.logger.error(`🐞`,`unknown`,t,`markDone called outside of an operation. This is probably a bug in AtomIO.`);return}e.operation.done.add(t)};function ze(e,t,n,r,i){let{oldValue:a,newValue:o}=n,s=`oldValue`in n,c=ue(t);if(r&&i){t.subject.next({newValue:o});let n={checkpoint:!0,type:`state_creation`,subType:`writable`,token:c,timestamp:Date.now(),value:o};e.operation.subEvents.push(n),i.subject.next(n);let r=S(e);if(c.family)if(me(r))switch(c.type){case`atom`:case`mutable_atom`:e.on.atomCreation.next(c);break;case`writable_pure_selector`:case`writable_held_selector`:e.on.selectorCreation.next(c);break}else he(r)&&r.on.transactionApplying.state===null&&r.transactionMeta.update.subEvents.push(n);return}let{key:l,subject:u,type:d}=t,f;if(f=s?{oldValue:St(a)?a.READONLY_VIEW:a,newValue:St(o)?o.READONLY_VIEW:o}:{newValue:St(o)?o.READONLY_VIEW:o},me(e)){switch(d){case`mutable_atom`:e.logger.info(`📢`,d,l,`is now (`,o,`) subscribers:`,u.subscribers.keys());break;case`atom`:case`writable_pure_selector`:case`writable_held_selector`:e.logger.info(`📢`,d,l,`went (`,a,`->`,o,`) subscribers:`,u.subscribers.keys())}u.next(f)}if(he(e)&&(d===`mutable_atom`||d===`atom`)){if(e.on.transactionApplying.state===null){if(St(o))return;let{timestamp:t}=e.operation,n={type:`atom_update`,token:c,timestamp:t,update:f};e.transactionMeta.update.subEvents.push(n),e.logger.info(`📁`,`atom`,l,`stowed (`,a,`->`,o,`)`);return}if(kt(t,`tracker:signal`)){let t=l.slice(1),n=e.atoms.get(t);xe(e,n,`mut`).do(f.newValue)===null&&Et(e,n)}}}var Be=Symbol(`UNSET`),Ve=(e,t,n)=>{let r,i;if(ae(n)){let a=xe(e,t,`mut`);r=a,i=n(a)}else r=e.valueMap.has(t.key)?wt(e,t,`mut`):t.type===`atom`&&!ae(t.default)?t.default:Be,i=n;return e.logger.info(`⭐`,`atom`,t.key,`setting value`,i),i=Ct(e,t,i),Re(e,t.key),Et(e,t),r===Be?{newValue:i}:{oldValue:r,newValue:i}};function He(e,t){switch(t.type){case`mutable_atom`:return Ve(e,t,new t.class);case`atom`:{let n;return n=ae(t.default)?be(e,t):t.default,Ve(e,t,n)}}}function Ue(e,t){let n;switch(t.type){case`atom`:case`mutable_atom`:n=He(e,t);break;case`writable_held_selector`:{let r=rt(e,t.key);for(let n of r.values())ze(e,t,He(e,n),!1);let i=t.getFrom(e);n={oldValue:i,newValue:i}}break;case`writable_pure_selector`:{let r=be(e,t),i=rt(e,t.key);for(let n of i.values())ze(e,t,He(e,n),!1);n={oldValue:r,newValue:be(e,t)}}break}return n}function We(e,...t){Ze(Ye,e,...t)}var Ge=Symbol(`RESET`);function Ke(e,...t){We(e,...t,Ge)}function qe(e,t,n){let r,i,a,{type:o,key:s}=t;switch(t.type){case`writable_pure_selector`:r=xe(e,t,`mut`),i=oe(n,r),i=Ct(e,t,i);break;case`writable_held_selector`:a=t.const,oe(n,a),r=a,i=a}return e.logger.info(`⭐`,o,s,`setting to`,i),Re(e,s),t.setSelf(i),{oldValue:r,newValue:i}}var Je=(e,t,n)=>{let r;switch(t.type){case`atom`:case`mutable_atom`:r=Ve(e,t,n);break;case`writable_pure_selector`:case`writable_held_selector`:r=qe(e,t,n);break}return r},Ye=Symbol(`OWN_OP`),Xe=Symbol(`JOIN_OP`);function Ze(e,t,...n){let r,i,a,o,s,c;n.length===2?(a=n[0],c=n[1],`family`in a&&(o=Se(t,a),s=ne(a.family.subKey),r=ke(t,o,s),a=r||(i=Ee(we,t,o,s)))):(o=ve(t,n[0]),s=n[1],c=n[2],r=ke(t,o,s),a=r||(i=Ee(we,t,o,s)));let l=c===Ge?`reset`:`set`,u;if(e===Ye){let n=Fe(t,a);if(typeof n==`number`){let r=n,i=t.on.operationClose.subscribe(`waiting to ${l} "${a.key}" at T-${r}`,function(){i(),t.logger.info(`🟢`,a.type,a.key,`resuming deferred`,l,`from T-${r}`),Ze(e,t,a,c)});return}u=n}else u=t;if(`counterfeit`in a&&`family`in a){let e=a.family.subKey,n=t.disposalTraces.buffer.find(t=>t?.key===e);t.logger.error(`❌`,a.type,a.key,`could not be`,l,`because key`,e,`is not allocated.`,n?`this key was previously disposed:${n.trace}`:`(no previous disposal trace found)`);return}let d=ve(u,a),f;f=c===Ge?Ue(u,d):Je(u,d,c),ze(u,d,f,!!i,o),e===Ye&&Ie(u)}var Qe=(e,t)=>S(e).atoms.has(t),$e=(e,t)=>S(e).writableSelectors.has(t),et=(e,t)=>S(e).readonlySelectors.has(t),tt=(e,t)=>Qe(e,t)||$e(e,t)||et(e,t);function nt(e,t){return S(e).selectorGraph.getRelationEntries({downstreamSelectorKey:t}).filter(([e,{source:n}])=>n!==t).map(([e,{source:t}])=>t).filter(t=>tt(e,t))}function rt(e,t,n=new Set){let r=nt(e,t),i=new Map;for(;r.length>0;){let t=r.pop();if(!n.has(t))if(n.add(t),Qe(e,t)){let n=e.atoms.get(t);i.set(n.key,n)}else r.push(...nt(e,t))}return i}function it(e,t,n,r,i){let a=S(e),{type:o,key:s}=r;if(o===`atom`||o===`mutable_atom`)a.selectorAtoms.set({selectorKey:n,atomKey:s}),e.logger.info(`🔍`,t,n,`discovers root atom "${s}"`);else{let r=rt(e,s,i);e.logger.info(`🔍`,t,n,`discovers root atoms: [ ${[...r.values()].map(e=>`"${e.key}"`).join(`, `)} ]`);for(let{key:e}of r.values())a.selectorAtoms=a.selectorAtoms.set({selectorKey:n,atomKey:e})}i.add(s)}function at(e,t,n,r){return{get:(...i)=>{let a=S(e),{token:o,family:s,subKey:c}=De(e,...i),l;return l=`counterfeit`in o&&s&&c?ye(e,o,s,c):xe(e,ve(e,o)),e.logger.info(`🔌`,t,n,`registers dependency ( "${o.key}" =`,l,`)`),a.selectorGraph.set({upstreamSelectorKey:o.key,downstreamSelectorKey:n},{source:o.key}),it(e,t,n,o,r),l},set:(...t)=>{Ze(Xe,S(e),...t)},find:(...t)=>Ae(e,...t),json:t=>bt(e,t)}}function ot(e,t,n){let r=S(e),i=new C,a=new Set,{key:o,const:s}=t,c=`readonly_held_selector`;e.logger.info(`🔨`,c,o,`is being created`);let{get:l,find:u,json:d}=at(r,c,o,a),f=n=>{let r=n.selectorGraph.getRelationEntries({downstreamSelectorKey:o});for(let[e,{source:t}]of r)t!==o&&n.selectorGraph.delete(e,o);return n.selectorAtoms.delete(o),t.get({get:l,find:u,json:d},s),Ct(n,p,s),e.logger.info(`✨`,c,o,`=`,s),a.clear(),s},p={...t,type:c,subject:i,getFrom:f,install:e=>ot(e,t,n)};n&&(p.family=n),r.readonlySelectors.set(o,p);let m={key:o,type:c};return n&&(m.family=n),m}function st(e,t,n){let r=S(e),i=new C,a=new Set,o=t.key,s=`readonly_pure_selector`;e.logger.info(`🔨`,s,o,`is being created`);let{get:c,find:l,json:u}=at(r,s,o,a),d=()=>{let n=S(e),r=n.selectorGraph.getRelationEntries({downstreamSelectorKey:o});for(let[e,{source:t}]of r)t!==o&&n.selectorGraph.delete(e,o);n.selectorAtoms.delete(o);let i=t.get({get:c,find:l,json:u});return e.logger.info(`✨`,s,o,`=`,i),a.clear(),i},f={...t,type:s,subject:i,getFrom:d,install:e=>st(e,t,n)};n&&(f.family=n),r.readonlySelectors.set(o,f);let p={key:o,type:s};return n&&(p.family=n),p}function ct(e,t,n){let r=S(e),i=new C,a=new Set,{key:o,const:s}=t,c=`writable_held_selector`;e.logger.info(`🔨`,c,o,`is being created`);let l=at(r,c,o,a),{find:u,get:d,json:f}=l,p={find:u,get:d,json:f},m=n=>{let r=n.selectorGraph.getRelationEntries({downstreamSelectorKey:o});for(let[e,{source:t}]of r)t!==o&&n.selectorGraph.delete(e,o);return n.selectorAtoms.delete(o),t.get(p,s),Ct(n,g,s),e.logger.info(`✨`,c,o,`=`,s),a.clear(),s},h=()=>{t.set(l,s)},g={...t,type:c,subject:i,getFrom:m,setSelf:h,install:e=>ct(e,t,n)};n&&(g.family=n),r.writableSelectors.set(o,g);let _={key:o,type:c};return n&&(_.family=n),_}function lt(e,t,n){let r=S(e),i=new C,a=new Set,o=t.key,s=`writable_pure_selector`;e.logger.info(`🔨`,s,o,`is being created`);let c=at(r,s,o,a),{find:l,get:u,json:d}=c,f={find:l,get:u,json:d},p=n=>{let r=n.selectorGraph.getRelationEntries({downstreamSelectorKey:o});for(let[e,{source:t}]of r)t!==o&&n.selectorGraph.delete(e,o);n.selectorAtoms.delete(o);let i=t.get(f);return e.logger.info(`✨`,s,o,`=`,i),a.clear(),i},m=e=>{t.set(c,e)},h={...t,type:s,subject:i,getFrom:p,setSelf:m,install:e=>lt(e,t,n)};n&&(h.family=n),r.writableSelectors.set(o,h);let g={key:o,type:s};return n&&(g.family=n),g}function ut(e,t){let n=`set`in t,r=`const`in t;if(r&&n){let n=ct(e,t,void 0);return e.on.selectorCreation.next(n),n}if(r){let n=ot(e,t,void 0);return e.on.selectorCreation.next(n),n}if(n){let n=lt(e,t,void 0);return e.on.selectorCreation.next(n),n}let i=st(e,t,void 0);return e.on.selectorCreation.next(i),i}function dt(e,t){let n=S(e),{key:r,type:i,family:a}=t;if(!a)e.logger.error(`❌`,i,r,`Standalone selectors cannot be disposed.`);else{n.molecules.get(a.subKey)&&n.moleculeData.delete(a.subKey,a.key);let i;switch(t.type){case`writable_held_selector`:n.writableSelectors.delete(r),i={key:a.key,type:`writable_held_selector_family`},ve(e,i).subject.next({type:`state_disposal`,subType:`selector`,token:t,timestamp:Date.now()});break;case`writable_pure_selector`:n.writableSelectors.delete(r),i={key:a.key,type:`writable_pure_selector_family`},ve(e,i).subject.next({type:`state_disposal`,subType:`selector`,token:t,timestamp:Date.now()});break;case`readonly_held_selector`:n.readonlySelectors.delete(r),i={key:a.key,type:`readonly_held_selector_family`},ve(e,i).subject.next({type:`state_disposal`,subType:`selector`,token:t,timestamp:Date.now()});break;case`readonly_pure_selector`:n.readonlySelectors.delete(r),i={key:a.key,type:`readonly_pure_selector_family`},ve(e,i).subject.next({type:`state_disposal`,subType:`selector`,token:t,timestamp:Date.now()});break}n.valueMap.delete(r),n.selectorAtoms.delete(r),n.selectorGraph.delete(r),n.moleculeData.delete(a.key,a.subKey),e.logger.info(`🔥`,t.type,r,`deleted`),he(n)&&n.transactionMeta.phase===`building`?n.transactionMeta.update.subEvents.push({type:`state_disposal`,subType:`selector`,token:t,timestamp:Date.now()}):e.on.selectorDisposal.next(t)}}var ft=(e,t)=>{let n=S(e);return n.operation.open?n.operation.prev.get(t.key):n.valueMap.get(t.key)},pt=(e,t,n)=>n.subject.subscribe(`${t.type}:${t.key}`,r=>{e.logger.info(`📢`,t.type,t.key,`root`,n.key,`went`,r.oldValue,`->`,r.newValue);let i=ft(e,t),a=xe(e,t);e.logger.info(`✨`,t.type,t.key,`went`,i,`->`,a),t.subject.next({newValue:a,oldValue:i})});function mt(e,t,n,r){function i(n){e.operation.open&&a?.type===`atom`&&kt(a,`tracker:signal`)&&`*`+e.operation.token.key===t.key&&`inboundTracker`in r||r(n)}De(e,t);let a=ve(e,t);e.logger.info(`👀`,a.type,a.key,`Adding subscription "${n}"`);let o=a.type===`writable_pure_selector`||a.type===`readonly_pure_selector`,s=new Map,c=i;if(o){xe(e,a);for(let[t,n]of rt(e,a.key))s.set(t,pt(e,a,n));c=function(t){let n=rt(e,a.key);for(let[e,t]of s)n.get(e)?n.delete(e):(t(),s.delete(e));for(let[t,r]of n)s.set(t,pt(e,a,r));i(t)}}let l=a.subject.subscribe(n,c);return()=>{e.logger.info(`🙈`,a.type,a.key,`Removing subscription "${n}"`),l();for(let e of s.values())e()}}var ht=(e,t,n,r)=>{let i=ve(e,t);e.logger.info(`👀`,`timeline`,t.key,`Adding subscription "${n}"`);let a=i.subject.subscribe(n,r);return()=>{e.logger.info(`🙈`,`timeline`,t.key,`Removing subscription "${n}" from timeline`),a()}},gt=class{initializeSignalAtom(e,t){let n=`*${e.key}`;t.atoms.delete(n),t.valueMap.delete(n);let r=e.family?{key:`*${e.family.key}`,subKey:e.family.subKey}:void 0,i=Ot(t,{key:n,default:null},r,[`tracker:signal`]);if(t.parent?.valueMap.has(n)){let e=t.parent.valueMap.get(n);t.valueMap.set(n,e)}return i}unsubscribeFromInnerValue;unsubscribeFromState;captureSignalsFromCore(e,t,n){let r=e.key,i=`tracker-from-core:${n.config.name}:${he(n)?n.transactionMeta.update.token.key:`main`}:${r}`,a=e=>{Ze(Xe,n,t,e)};this.unsubscribeFromInnerValue=Oe(n,e).subscribe(i,a),this.unsubscribeFromState=mt(n,e,i,function(e){e.newValue!==e.oldValue&&(this.unsubscribeFromInnerValue(),this.unsubscribeFromInnerValue=e.newValue.subscribe(i,a))}.bind(this))}supplySignalsToCore(e,t,n){let r=e.key,i=`tracker-to-core:${n.config.name}:${he(n)?n.transactionMeta.update.token.key:`main`}:${r}`;mt(n,t,i,Object.assign(function({newValue:r,oldValue:a}){let o=n.timelineTopics.getRelatedKey(t.key);if(o&&n.timelines.get(o)?.timeTraveling){let t=ht(n,{key:o,type:`timeline`},i,function(i){t(),We(n,e,e=>(i===`redo`&&r?e.do(r):i===`undo`&&a&&e.undo(a),e))});return}We(n,e,e=>(e.do(r),e))},{inboundTracker:!0}))}mutableAtomToken;latestSignalToken;[Symbol.dispose];constructor(e,t){let n=S(t),r=this.initializeSignalAtom(e,n);this.mutableAtomToken=e,this.latestSignalToken=r,this.captureSignalsFromCore(e,r,n),this.supplySignalsToCore(e,r,n),n.trackers.set(e.key,this),this[Symbol.dispose]=()=>{this.unsubscribeFromInnerValue(),this.unsubscribeFromState(),n.trackers.delete(e.key)}}};function _t(e,t,n){e.logger.info(`🔨`,`atom`,t.key,`creating in store "${e.config.name}"`);let r=S(e),{key:i}=t,a=r.atoms.get(i),o=`mutable_atom`;if(a?.type===o&&e.config.isProduction===!0)return e.logger.error(`❌`,o,i,`Tried to create atom, but it already exists in the store.`),ue(a);let s=new C,c={...t,type:o,install:e=>(e.logger.info(`🛠️`,`atom`,i,`installing in store "${e.config.name}"`),_t(e,t,n)),subject:s};n&&(c.family=n),r.atoms.set(c.key,c);let l=ue(c);if(new gt(l,e),n||ut(e,{key:`${i}:JSON`,get:({get:e})=>e(l).toJSON(),set:({set:e},n)=>{e(l,t.class.fromJSON(n))}}),t.effects){let n=0,r=[];for(let i of t.effects){let t=i({resetSelf:()=>{Ke(e,l)},setSelf:t=>{We(e,l,t)},onSet:t=>mt(e,l,`effect[${n}]`,t),token:l,store:re(e)});t&&r.push(t),++n}c.cleanup=()=>{for(let e of r)e()}}return e.on.atomCreation.next(l),l}var vt=class{trackers=new Map;latestSignalAtoms;mutableAtoms;constructor(e,t){this.latestSignalAtoms=ve(t,Me(t,{key:`*${e.key}`,default:null},[`mutable`,`updates`])),this.mutableAtoms=e,this.mutableAtoms.subject.subscribe(`store=${t.config.name}::tracker-atom-family`,e=>{let{type:n,token:r}=e;if(r.family){let e=ne(r.family.subKey);switch(n){case`state_creation`:this.trackers.set(e,new gt(r,t));break;case`state_disposal`:{let t=this.trackers.get(e);t&&(t[Symbol.dispose](),this.trackers.delete(e))}}}})}};function yt(e,t,n){let r={key:t.key,type:`mutable_atom_family`},i=e.families.get(t.key);i&&e.config.isProduction===!0&&e.logger.error(`❗`,`mutable_atom_family`,t.key,`Overwriting an existing ${Ft[i.type]} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);let a=new C,o=n=>{let r=x(n),i={key:t.key,subKey:r},a=`${t.key}(${r})`,o=S(e),s={key:a,class:t.class};return t.effects&&(s.effects=t.effects(n)),_t(o,s,i)},s={...r,create:o,class:t.class,subject:a,install:e=>yt(e,t),internalRoles:n};return e.families.set(t.key,s),Ne(e,{key:`${t.key}:JSON`,get:e=>({get:t})=>t(r,e).toJSON(),set:e=>({set:n},i)=>{n(r,e,t.class.fromJSON(i))}},[`mutable`,`json`]),new vt(s,e),r}var bt=(e,t)=>t.family?Ae(e,ve(S(e),{key:`${t.family.key}:JSON`,type:`writable_pure_selector_family`}),ne(t.family.subKey)):{type:`writable_pure_selector`,key:`${t.key}:JSON`},xt=e=>{let t={type:`atom`,key:`*${e.key}`};return e.family&&(t.family={key:`*${e.family.key}`,subKey:e.family.subKey}),t};function St(e){return typeof e==`object`&&!!e&&`do`in e&&`undo`in e&&`subscribe`in e&&`READONLY_VIEW`in e&&`toJSON`in e}function Ct(e,t,n){let{key:r,subject:i,type:a}=t,o=e.valueMap.get(r);if(o instanceof se&&!o.done){let t=o;return n instanceof Promise?(t.use(n),t):(e.valueMap.set(r,n),n)}if(n instanceof Promise){let o=new se(n);return e.valueMap.set(r,o),o.then(function(n){if(e.valueMap.get(r)===o){switch(Fe(e,t),Ct(e,t,n),a){case`atom`:Et(e,t);break;case`readonly_pure_selector`:case`writable_pure_selector`:Dt(e,r);break}Ie(e),i.next({newValue:n,oldValue:o})}}).catch(n=>{e.logger.error(`💥`,t.type,r,`rejected:`,n)}),o}return e.logger.info(`📝`,t.type,t.key,`writing to cache`,n),e.valueMap.set(r,n),n}function wt(e,t,n){e.logger.info(`📖`,t.type,t.key,`reading cached value`);let r=e.valueMap.get(t.key);if(n===`mut`&&t.type===`mutable_atom`&&he(e)){let n=t,{parent:i}=e;if(e.valueMap.hasOwn(n.key))return r;let a=i.valueMap.get(n.key);e.logger.info(`📃`,`atom`,n.key,`copying`);let o=a.toJSON(),s=n.class.fromJSON(o);e.valueMap.set(n.key,s),new gt(n,i),r=s}return r}function Tt(e,t){let n=e.valueMap.get(t);n instanceof se||(e.operation.open&&e.operation.prev.set(t,n),e.valueMap.delete(t),e.logger.info(`🗑`,`state`,t,`evicted`))}function Et(e,t){let n=S(e),{key:r,type:i}=t,a=n.selectorAtoms.getRelatedKeys(r);if(n.logger.info(`🧹`,i,r,a?`evicting ${a.size} states downstream:`:`no downstream states`,a??`to evict`),a){n.operation.open&&n.logger.info(`🧹`,i,r,`[ ${[...n.operation.done].join(`, `)} ] already done`);for(let e of a)Le(n,e)||(Tt(n,e),Re(n,e))}}function Dt(e,t){let n=S(e),r=n.selectorGraph.getRelationEntries({upstreamSelectorKey:t}).filter(([e,{source:n}])=>n===t);for(let[t]of r)Le(n,t)||(Tt(n,t),Re(n,t),Dt(e,t))}function Ot(e,t,n,r){let i=`atom`,{key:a}=t;e.logger.info(`🔨`,i,a,`is being created`);let o=S(e),s=o.atoms.get(a);if(s?.type===i&&e.config.isProduction===!0)return e.logger.error(`❌`,`atom`,a,`Tried to create atom, but it already exists in the store.`),ue(s);let c=new C,l={...t,type:i,install:e=>(e.logger.info(`🛠️`,i,a,`installing in store "${e.config.name}"`),Ot(e,t,n)),subject:c};n&&(l.family=n),r&&(l.internalRoles=r),o.atoms.set(a,l);let u=ue(l);if(t.effects){let n=0,r=[];for(let i of t.effects){let t=i({resetSelf:()=>{Ke(e,u)},setSelf:t=>{We(e,u,t)},onSet:t=>mt(e,u,`effect[${n}]`,t),token:u,store:re(e)});t&&r.push(t),++n}l.cleanup=()=>{for(let e of r)e()}}return e.on.atomCreation.next(u),u}function kt(e,t){return`internalRoles`in e?e.internalRoles.includes(t):!1}function At(e,t){let n=S(e),{key:r,family:i}=t,a=ve(n,t);if(!i)e.logger.error(`❌`,`atom`,r,`Standalone atoms cannot be disposed.`);else{a.cleanup?.();let o=e.valueMap.get(a.key),s=ve(e,Se(e,t)).subject,c={type:`state_disposal`,subType:`atom`,token:t,value:o,timestamp:Date.now()};s.next(c);let l=he(n);if(n.atoms.delete(r),n.valueMap.delete(r),n.selectorAtoms.delete(r),n.atomsThatAreDefault.delete(r),n.moleculeData.delete(i.key,i.subKey),e.timelineTopics.delete(r),t.type===`mutable_atom`&&(At(e,xt(t)),e.trackers.delete(r)),e.logger.info(`🔥`,`atom`,r,`deleted`),l&&n.transactionMeta.phase===`building`){let e=n.transactionMeta.update.subEvents.at(-1),t=e?.type===`molecule_disposal`&&e.values.some(([e])=>e===a.family?.key),r=kt(a,`tracker:signal`);!t&&!r&&n.transactionMeta.update.subEvents.push(c)}else e.on.atomDisposal.next(t)}}Symbol.dispose;function jt(e){return Ot(E.STORE,e,void 0)}function Mt(e){return Me(E.STORE,e)}function Nt(...e){Pe(E.STORE,...e)}function Pt(...e){return Oe(E.STORE,...e)}var Ft={atom_family:`atom family`,atom:`atom`,continuity:`continuity`,key:`key`,mutable_atom_family:`atom family [m]`,mutable_atom:`atom [m]`,readonly_held_selector_family:`selector family [h]`,readonly_held_selector:`selector [h]`,readonly_pure_selector_family:`selector family`,readonly_pure_selector:`selector`,socket:`socket`,state:`state`,timeline:`timeline`,transaction:`transaction`,unknown:`unknown`,user:`👤`,writable_held_selector_family:`selector family [wh]`,writable_held_selector:`selector [wh]`,writable_pure_selector_family:`selector family [w]`,writable_pure_selector:`selector [w]`},It=(e,t)=>(n,r,i,a,...o)=>{console[e](`${t?`${t} `:``}${n} ${Ft[r]} \`${i}\` ${a}`,...o)},Lt={error:It(`error`),info:It(`info`),warn:It(`warn`)},Rt=class{logLevel;filter;logger;constructor(e,t,n=Lt){this.logLevel=e,this.filter=t,this.logger=n}error=(...e)=>{if(this.logLevel!==null){let t=this.filter?.(...e)??!0;t===!0?this.logger.error(...e):t&&this.logger.error(...t)}};info=(...e)=>{if(this.logLevel===`info`){let t=this.filter?.(...e)??!0;t===!0?this.logger.info(...e):t&&this.logger.info(...t)}};warn=(...e)=>{if(this.logLevel!==`error`&&this.logLevel!==null){let t=this.filter?.(...e)??!0;t===!0?this.logger.warn(...e):t&&this.logger.warn(...t)}}};function zt(...e){Ke(E.STORE,...e)}function Bt(e){return ut(E.STORE,e)}function Vt(...e){We(E.STORE,...e)}var Ht=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),D=l(o(((e,t)=>{t.exports=Ht()}))(),1),Ut=(0,b.createContext)(E.STORE);function Wt(e,...t){let n;if(t.length===2){let r=t[0],i=t[1];n=Ae(e,r,i)}else n=t[0];return n}function Gt(...e){let t=(0,b.useContext)(Ut),n=Wt(t,...e),r=(0,b.useRef)(null);return r.current??=e=>{We(t,n,e)},r.current}function Kt(e,t){if(globalThis.env?.NODE_ENV===`development`){let n=b.useRef(!1);b.useEffect(()=>{let t=n.current;if(t===!1)t=e()??!0,n.current=t;else return()=>{ae(t)&&t(),n.current=!1}},t)}else b.useEffect(e,t)}function qt(...e){let t=(0,b.useContext)(Ut),n=Wt(t,...e),r=(0,b.useId)();if(n.type===`mutable_atom`||n.type===`readonly_held_selector`||n.type===`writable_held_selector`){let[,e]=(0,b.useState)(0),i=(0,b.useRef)(Oe(t,n));return Kt(()=>mt(t,n,`use-o:${r}`,({newValue:t})=>{i.current=t,e(e=>e+1)}),[n.key]),i.current}let i=(0,b.useCallback)(e=>mt(t,n,`use-o:${r}`,e),[n.key]),a=(0,b.useCallback)(()=>Oe(t,n),[n.key]);return(0,b.useSyncExternalStore)(i,a,a)}function Jt(...e){let t=(0,b.useContext)(Ut),n,r,i,[a]=e,o;switch(a.type){case`atom`:case`mutable_atom`:case`readonly_held_selector`:case`readonly_pure_selector`:case`writable_held_selector`:case`writable_pure_selector`:n=qt(a),r=ve(t,a),i=e[1];break;case`atom_family`:case`mutable_atom_family`:case`readonly_held_selector_family`:case`readonly_pure_selector_family`:case`writable_held_selector_family`:case`writable_pure_selector_family`:o=e[1],n=qt(a,o),r=ve(t,Ae(t,a,o)),i=e[2]}let s=i!==void 0,c=`catch`in r&&r.catch.some(e=>n instanceof e),l=(0,b.useRef)({loading:!1,value:null}),u=(0,b.useRef)(i??(n instanceof Promise?`LOADING`:n)),{current:d}=u,{current:f}=l,p=`catch`in r&&r.catch.some(e=>d instanceof e);if(n instanceof Promise){if(d===`LOADING`)return`LOADING`;f=p&&s?l.current={loading:!0,value:i,error:d}:l.current={loading:!0,value:d}}else u.current=n,f.loading===!0?f=c&&s?l.current={loading:!1,value:i,error:n}:l.current={loading:!1,value:n}:c&&s?(f.loading=!1,f.value=i,f.error=n):(f.loading=!1,f.value=n,delete f.error);return f}const Yt=Object.freeze({status:`aborted`});function O(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}const Xt=Symbol(`zod_brand`);var Zt=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Qt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};const $t={};function en(e){return e&&Object.assign($t,e),$t}var tn=s({BIGINT_FORMAT_RANGES:()=>Rn,Class:()=>or,NUMBER_FORMAT_RANGES:()=>Ln,aborted:()=>Kn,allowsEval:()=>En,assert:()=>sn,assertEqual:()=>nn,assertIs:()=>an,assertNever:()=>on,assertNotEqual:()=>rn,assignProp:()=>gn,base64ToUint8Array:()=>er,base64urlToUint8Array:()=>nr,cached:()=>un,captureStackTrace:()=>wn,cleanEnum:()=>$n,cleanRegex:()=>fn,clone:()=>Pn,cloneDef:()=>vn,createTransparentProxy:()=>Fn,defineLazy:()=>A,esc:()=>Sn,escapeRegex:()=>Nn,extend:()=>Vn,finalizeIssue:()=>Yn,floatSafeRemainder:()=>pn,getElementAtPath:()=>yn,getEnumValues:()=>cn,getLengthableOrigin:()=>Zn,getParsedType:()=>An,getSizableOrigin:()=>Xn,hexToUint8Array:()=>ir,isObject:()=>Tn,isPlainObject:()=>Dn,issue:()=>Qn,joinValues:()=>k,jsonStringifyReplacer:()=>ln,merge:()=>Un,mergeDefs:()=>_n,normalizeParams:()=>j,nullish:()=>dn,numKeys:()=>kn,objectClone:()=>hn,omit:()=>Bn,optionalKeys:()=>In,parsedType:()=>N,partial:()=>Wn,pick:()=>zn,prefixIssues:()=>qn,primitiveTypes:()=>Mn,promiseAllObject:()=>bn,propertyKeyTypes:()=>jn,randomString:()=>xn,required:()=>Gn,safeExtend:()=>Hn,shallowClone:()=>On,slugify:()=>Cn,stringifyPrimitive:()=>M,uint8ArrayToBase64:()=>tr,uint8ArrayToBase64url:()=>rr,uint8ArrayToHex:()=>ar,unwrapMessage:()=>Jn},1);function nn(e){return e}function rn(e){return e}function an(e){}function on(e){throw Error(`Unexpected value in exhaustive check`)}function sn(e){}function cn(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function k(e,t=`|`){return e.map(e=>M(e)).join(t)}function ln(e,t){return typeof t==`bigint`?t.toString():t}function un(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function dn(e){return e==null}function fn(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function pn(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var mn=Symbol(`evaluating`);function A(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==mn)return r===void 0&&(r=mn,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function hn(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function gn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _n(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function vn(e){return _n(e._zod.def)}function yn(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function bn(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function xn(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function Sn(e){return JSON.stringify(e)}function Cn(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const wn=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Tn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const En=un(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Dn(e){if(Tn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Tn(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function On(e){return Dn(e)?{...e}:Array.isArray(e)?[...e]:e}function kn(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}const An=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},jn=new Set([`string`,`number`,`symbol`]),Mn=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function Nn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Pn(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function j(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Fn(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function M(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function In(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const Ln={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Rn={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function zn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Pn(e,_n(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return gn(this,`shape`,e),e},checks:[]}))}function Bn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Pn(e,_n(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return gn(this,`shape`,r),r},checks:[]}))}function Vn(e,t){if(!Dn(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Pn(e,_n(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return gn(this,`shape`,n),n}}))}function Hn(e,t){if(!Dn(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Pn(e,_n(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return gn(this,`shape`,n),n}}))}function Un(e,t){return Pn(e,_n(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return gn(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Wn(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Pn(t,_n(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return gn(this,`shape`,i),i},checks:[]}))}function Gn(e,t,n){return Pn(t,_n(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return gn(this,`shape`,i),i}}))}function Kn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function qn(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Jn(e){return typeof e==`string`?e:e?.message}function Yn(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Jn(e.inst?._zod.def?.error?.(e))??Jn(t?.error?.(e))??Jn(n.customError?.(e))??Jn(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Xn(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function Zn(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function N(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Qn(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function $n(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function er(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function tr(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function nr(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return er(t+`=`.repeat((4-t.length%4)%4))}function rr(e){return tr(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function ir(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function ar(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var or=class{constructor(...e){}},sr=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,ln,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})};const cr=O(`$ZodError`,sr),lr=O(`$ZodError`,sr,{Parent:Error});function ur(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function dr(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}function fr(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>r({issues:e},s.path));else if(s.code===`invalid_key`)r({issues:s.issues},s.path);else if(s.code===`invalid_element`)r({issues:s.issues},s.path);else{let e=[...i,...s.path];if(e.length===0){n.errors.push(t(s));continue}let r=n,c=0;for(;c<e.length;){let n=e[c],i=c===e.length-1;typeof n==`string`?(r.properties??={},(a=r.properties)[n]??(a[n]={errors:[]}),r=r.properties[n]):(r.items??=[],(o=r.items)[n]??(o[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(s)),c++}}};return r(e),n}function pr(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function mr(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${pr(e.path)}`);return t.join(`
10
10
  `)}const hr=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Zt;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Yn(e,a,en())));throw wn(t,i?.callee),t}return o.value},gr=hr(lr),_r=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Yn(e,a,en())));throw wn(t,i?.callee),t}return o.value},vr=_r(lr),yr=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Zt;return a.issues.length?{success:!1,error:new(e??cr)(a.issues.map(e=>Yn(e,i,en())))}:{success:!0,data:a.value}},br=yr(lr),xr=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Yn(e,i,en())))}:{success:!0,data:a.value}},Sr=xr(lr),Cr=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return hr(e)(t,n,i)},wr=Cr(lr),Tr=e=>(t,n,r)=>hr(e)(t,n,r),Er=Tr(lr),Dr=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return _r(e)(t,n,i)},Or=Dr(lr),kr=e=>async(t,n,r)=>_r(e)(t,n,r),Ar=kr(lr),jr=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return yr(e)(t,n,i)},Mr=jr(lr),Nr=e=>(t,n,r)=>yr(e)(t,n,r),Pr=Nr(lr),Fr=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return xr(e)(t,n,i)},Ir=Fr(lr),Lr=e=>async(t,n,r)=>xr(e)(t,n,r),Rr=Lr(lr);var zr=s({base64:()=>fi,base64url:()=>pi,bigint:()=>Ci,boolean:()=>Ei,browserEmail:()=>ii,cidrv4:()=>ui,cidrv6:()=>di,cuid:()=>Br,cuid2:()=>Vr,date:()=>vi,datetime:()=>xi,domain:()=>hi,duration:()=>Kr,e164:()=>gi,email:()=>$r,emoji:()=>oi,extendedDuration:()=>qr,guid:()=>Jr,hex:()=>ji,hostname:()=>mi,html5Email:()=>ei,idnEmail:()=>ri,integer:()=>wi,ipv4:()=>si,ipv6:()=>ci,ksuid:()=>Wr,lowercase:()=>ki,mac:()=>li,md5_base64:()=>Fi,md5_base64url:()=>Ii,md5_hex:()=>Pi,nanoid:()=>Gr,null:()=>Di,number:()=>Ti,rfc5322Email:()=>ti,sha1_base64:()=>Ri,sha1_base64url:()=>zi,sha1_hex:()=>Li,sha256_base64:()=>Bi,sha256_base64url:()=>Vi,sha256_hex:()=>P,sha384_base64:()=>Ui,sha384_base64url:()=>Wi,sha384_hex:()=>Hi,sha512_base64:()=>Ki,sha512_base64url:()=>qi,sha512_hex:()=>Gi,string:()=>Si,time:()=>bi,ulid:()=>Hr,undefined:()=>Oi,unicodeEmail:()=>ni,uppercase:()=>Ai,uuid:()=>Yr,uuid4:()=>Xr,uuid6:()=>Zr,uuid7:()=>Qr,xid:()=>Ur},1);const Br=/^[cC][^\s-]{8,}$/,Vr=/^[0-9a-z]+$/,Hr=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ur=/^[0-9a-vA-V]{20}$/,Wr=/^[A-Za-z0-9]{27}$/,Gr=/^[a-zA-Z0-9_-]{21}$/,Kr=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Jr=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Yr=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Xr=Yr(4),Zr=Yr(6),Qr=Yr(7),$r=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ei=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ti=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ni=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ri=ni,ii=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;var ai=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function oi(){return new RegExp(ai,`u`)}const si=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ci=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,li=e=>{let t=Nn(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ui=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,di=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fi=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pi=/^[A-Za-z0-9_-]*$/,mi=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,hi=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,gi=/^\+[1-9]\d{6,14}$/;var _i=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;const vi=RegExp(`^${_i}$`);function yi(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function bi(e){return RegExp(`^${yi(e)}$`)}function xi(e){let t=yi({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${_i}T(?:${r})$`)}const Si=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Ci=/^-?\d+n?$/,wi=/^-?\d+$/,Ti=/^-?\d+(?:\.\d+)?$/,Ei=/^(?:true|false)$/i;var Di=/^null$/i,Oi=/^undefined$/i;const ki=/^[^A-Z]*$/,Ai=/^[^a-z]*$/,ji=/^[0-9a-fA-F]*$/;function Mi(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ni(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const Pi=/^[0-9a-fA-F]{32}$/,Fi=Mi(22,`==`),Ii=Ni(22),Li=/^[0-9a-fA-F]{40}$/,Ri=Mi(27,`=`),zi=Ni(27),P=/^[0-9a-fA-F]{64}$/,Bi=Mi(43,`=`),Vi=Ni(43),Hi=/^[0-9a-fA-F]{96}$/,Ui=Mi(64,``),Wi=Ni(64),Gi=/^[0-9a-fA-F]{128}$/,Ki=Mi(86,`==`),qi=Ni(86),F=O(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])});var Ji={number:`number`,bigint:`bigint`,object:`date`};const Yi=O(`$ZodCheckLessThan`,(e,t)=>{F.init(e,t);let n=Ji[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xi=O(`$ZodCheckGreaterThan`,(e,t)=>{F.init(e,t);let n=Ji[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Zi=O(`$ZodCheckMultipleOf`,(e,t)=>{F.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):pn(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Qi=O(`$ZodCheckNumberFormat`,(e,t)=>{F.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ln[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=wi)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),$i=O(`$ZodCheckBigIntFormat`,(e,t)=>{F.init(e,t);let[n,r]=Rn[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),ea=O(`$ZodCheckMaxSize`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!dn(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Xn(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ta=O(`$ZodCheckMinSize`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!dn(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Xn(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),na=O(`$ZodCheckSizeEquals`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!dn(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Xn(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ra=O(`$ZodCheckMaxLength`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!dn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Zn(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ia=O(`$ZodCheckMinLength`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!dn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Zn(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),aa=O(`$ZodCheckLengthEquals`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!dn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Zn(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),oa=O(`$ZodCheckStringFormat`,(e,t)=>{var n,r;F.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),sa=O(`$ZodCheckRegex`,(e,t)=>{oa.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ca=O(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ki,oa.init(e,t)}),la=O(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Ai,oa.init(e,t)}),ua=O(`$ZodCheckIncludes`,(e,t)=>{F.init(e,t);let n=Nn(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),da=O(`$ZodCheckStartsWith`,(e,t)=>{F.init(e,t);let n=RegExp(`^${Nn(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),fa=O(`$ZodCheckEndsWith`,(e,t)=>{F.init(e,t);let n=RegExp(`.*${Nn(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function pa(e,t,n){e.issues.length&&t.issues.push(...qn(n,e.issues))}const ma=O(`$ZodCheckProperty`,(e,t)=>{F.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>pa(n,e,t.property));pa(n,e,t.property)}}),ha=O(`$ZodCheckMimeType`,(e,t)=>{F.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),ga=O(`$ZodCheckOverwrite`,(e,t)=>{F.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var _a=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
11
11
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
12
- `))}};const va={major:4,minor:3,patch:4},I=O(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=va;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Kn(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Zt;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Kn(e,t))});else{if(e.issues.length===t)continue;r||=Kn(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Kn(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Zt;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Zt;return o.then(e=>t(e,r,a))}return t(o,r,a)}}A(e,`~standard`,()=>({validate:t=>{try{let n=br(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Sr(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),ya=O(`$ZodString`,(e,t)=>{I.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Si(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),L=O(`$ZodStringFormat`,(e,t)=>{oa.init(e,t),ya.init(e,t)}),ba=O(`$ZodGUID`,(e,t)=>{t.pattern??=Jr,L.init(e,t)}),xa=O(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Yr(e)}else t.pattern??=Yr();L.init(e,t)}),Sa=O(`$ZodEmail`,(e,t)=>{t.pattern??=$r,L.init(e,t)}),Ca=O(`$ZodURL`,(e,t)=>{L.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),wa=O(`$ZodEmoji`,(e,t)=>{t.pattern??=oi(),L.init(e,t)}),Ta=O(`$ZodNanoID`,(e,t)=>{t.pattern??=Gr,L.init(e,t)}),Ea=O(`$ZodCUID`,(e,t)=>{t.pattern??=Br,L.init(e,t)}),Da=O(`$ZodCUID2`,(e,t)=>{t.pattern??=Vr,L.init(e,t)}),Oa=O(`$ZodULID`,(e,t)=>{t.pattern??=Hr,L.init(e,t)}),ka=O(`$ZodXID`,(e,t)=>{t.pattern??=Ur,L.init(e,t)}),Aa=O(`$ZodKSUID`,(e,t)=>{t.pattern??=Wr,L.init(e,t)}),ja=O(`$ZodISODateTime`,(e,t)=>{t.pattern??=xi(t),L.init(e,t)}),Ma=O(`$ZodISODate`,(e,t)=>{t.pattern??=vi,L.init(e,t)}),Na=O(`$ZodISOTime`,(e,t)=>{t.pattern??=bi(t),L.init(e,t)}),Pa=O(`$ZodISODuration`,(e,t)=>{t.pattern??=Kr,L.init(e,t)}),Fa=O(`$ZodIPv4`,(e,t)=>{t.pattern??=si,L.init(e,t),e._zod.bag.format=`ipv4`}),Ia=O(`$ZodIPv6`,(e,t)=>{t.pattern??=ci,L.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),La=O(`$ZodMAC`,(e,t)=>{t.pattern??=li(t.delimiter),L.init(e,t),e._zod.bag.format=`mac`}),Ra=O(`$ZodCIDRv4`,(e,t)=>{t.pattern??=ui,L.init(e,t)}),za=O(`$ZodCIDRv6`,(e,t)=>{t.pattern??=di,L.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Ba(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Va=O(`$ZodBase64`,(e,t)=>{t.pattern??=fi,L.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Ba(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Ha(e){if(!pi.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Ba(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const Ua=O(`$ZodBase64URL`,(e,t)=>{t.pattern??=pi,L.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Ha(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Wa=O(`$ZodE164`,(e,t)=>{t.pattern??=gi,L.init(e,t)});function Ga(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const Ka=O(`$ZodJWT`,(e,t)=>{L.init(e,t),e._zod.check=n=>{Ga(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),qa=O(`$ZodCustomStringFormat`,(e,t)=>{L.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Ja=O(`$ZodNumber`,(e,t)=>{I.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ti,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Ya=O(`$ZodNumberFormat`,(e,t)=>{Qi.init(e,t),Ja.init(e,t)}),Xa=O(`$ZodBoolean`,(e,t)=>{I.init(e,t),e._zod.pattern=Ei,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Za=O(`$ZodBigInt`,(e,t)=>{I.init(e,t),e._zod.pattern=Ci,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),Qa=O(`$ZodBigIntFormat`,(e,t)=>{$i.init(e,t),Za.init(e,t)}),$a=O(`$ZodSymbol`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),eo=O(`$ZodUndefined`,(e,t)=>{I.init(e,t),e._zod.pattern=Oi,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),to=O(`$ZodNull`,(e,t)=>{I.init(e,t),e._zod.pattern=Di,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),no=O(`$ZodAny`,(e,t)=>{I.init(e,t),e._zod.parse=e=>e}),ro=O(`$ZodUnknown`,(e,t)=>{I.init(e,t),e._zod.parse=e=>e}),io=O(`$ZodNever`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),ao=O(`$ZodVoid`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),oo=O(`$ZodDate`,(e,t)=>{I.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function so(e,t,n){e.issues.length&&t.issues.push(...qn(n,e.issues)),t.value[n]=e.value}const co=O(`$ZodArray`,(e,t)=>{I.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>so(t,n,e))):so(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function lo(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...qn(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function uo(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=In(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function fo(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>lo(e,n,i,t,u))):lo(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const po=O(`$ZodObject`,(e,t)=>{if(I.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=un(()=>uo(t));A(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Tn,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>lo(n,t,e,s,r))):lo(i,t,e,s,r)}return i?fo(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),mo=O(`$ZodObjectJIT`,(e,t)=>{po.init(e,t);let n=e._zod.parse,r=un(()=>uo(t)),i=e=>{let t=new _a([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Sn(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Sn(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
12
+ `))}};const va={major:4,minor:3,patch:5},I=O(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=va;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Kn(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Zt;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Kn(e,t))});else{if(e.issues.length===t)continue;r||=Kn(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Kn(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Zt;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Zt;return o.then(e=>t(e,r,a))}return t(o,r,a)}}A(e,`~standard`,()=>({validate:t=>{try{let n=br(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Sr(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),ya=O(`$ZodString`,(e,t)=>{I.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Si(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),L=O(`$ZodStringFormat`,(e,t)=>{oa.init(e,t),ya.init(e,t)}),ba=O(`$ZodGUID`,(e,t)=>{t.pattern??=Jr,L.init(e,t)}),xa=O(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Yr(e)}else t.pattern??=Yr();L.init(e,t)}),Sa=O(`$ZodEmail`,(e,t)=>{t.pattern??=$r,L.init(e,t)}),Ca=O(`$ZodURL`,(e,t)=>{L.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),wa=O(`$ZodEmoji`,(e,t)=>{t.pattern??=oi(),L.init(e,t)}),Ta=O(`$ZodNanoID`,(e,t)=>{t.pattern??=Gr,L.init(e,t)}),Ea=O(`$ZodCUID`,(e,t)=>{t.pattern??=Br,L.init(e,t)}),Da=O(`$ZodCUID2`,(e,t)=>{t.pattern??=Vr,L.init(e,t)}),Oa=O(`$ZodULID`,(e,t)=>{t.pattern??=Hr,L.init(e,t)}),ka=O(`$ZodXID`,(e,t)=>{t.pattern??=Ur,L.init(e,t)}),Aa=O(`$ZodKSUID`,(e,t)=>{t.pattern??=Wr,L.init(e,t)}),ja=O(`$ZodISODateTime`,(e,t)=>{t.pattern??=xi(t),L.init(e,t)}),Ma=O(`$ZodISODate`,(e,t)=>{t.pattern??=vi,L.init(e,t)}),Na=O(`$ZodISOTime`,(e,t)=>{t.pattern??=bi(t),L.init(e,t)}),Pa=O(`$ZodISODuration`,(e,t)=>{t.pattern??=Kr,L.init(e,t)}),Fa=O(`$ZodIPv4`,(e,t)=>{t.pattern??=si,L.init(e,t),e._zod.bag.format=`ipv4`}),Ia=O(`$ZodIPv6`,(e,t)=>{t.pattern??=ci,L.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),La=O(`$ZodMAC`,(e,t)=>{t.pattern??=li(t.delimiter),L.init(e,t),e._zod.bag.format=`mac`}),Ra=O(`$ZodCIDRv4`,(e,t)=>{t.pattern??=ui,L.init(e,t)}),za=O(`$ZodCIDRv6`,(e,t)=>{t.pattern??=di,L.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Ba(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Va=O(`$ZodBase64`,(e,t)=>{t.pattern??=fi,L.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Ba(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Ha(e){if(!pi.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Ba(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const Ua=O(`$ZodBase64URL`,(e,t)=>{t.pattern??=pi,L.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Ha(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Wa=O(`$ZodE164`,(e,t)=>{t.pattern??=gi,L.init(e,t)});function Ga(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const Ka=O(`$ZodJWT`,(e,t)=>{L.init(e,t),e._zod.check=n=>{Ga(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),qa=O(`$ZodCustomStringFormat`,(e,t)=>{L.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Ja=O(`$ZodNumber`,(e,t)=>{I.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ti,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Ya=O(`$ZodNumberFormat`,(e,t)=>{Qi.init(e,t),Ja.init(e,t)}),Xa=O(`$ZodBoolean`,(e,t)=>{I.init(e,t),e._zod.pattern=Ei,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Za=O(`$ZodBigInt`,(e,t)=>{I.init(e,t),e._zod.pattern=Ci,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),Qa=O(`$ZodBigIntFormat`,(e,t)=>{$i.init(e,t),Za.init(e,t)}),$a=O(`$ZodSymbol`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),eo=O(`$ZodUndefined`,(e,t)=>{I.init(e,t),e._zod.pattern=Oi,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),to=O(`$ZodNull`,(e,t)=>{I.init(e,t),e._zod.pattern=Di,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),no=O(`$ZodAny`,(e,t)=>{I.init(e,t),e._zod.parse=e=>e}),ro=O(`$ZodUnknown`,(e,t)=>{I.init(e,t),e._zod.parse=e=>e}),io=O(`$ZodNever`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),ao=O(`$ZodVoid`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),oo=O(`$ZodDate`,(e,t)=>{I.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function so(e,t,n){e.issues.length&&t.issues.push(...qn(n,e.issues)),t.value[n]=e.value}const co=O(`$ZodArray`,(e,t)=>{I.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>so(t,n,e))):so(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function lo(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...qn(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function uo(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=In(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function fo(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>lo(e,n,i,t,u))):lo(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const po=O(`$ZodObject`,(e,t)=>{if(I.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=un(()=>uo(t));A(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Tn,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>lo(n,t,e,s,r))):lo(i,t,e,s,r)}return i?fo(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),mo=O(`$ZodObjectJIT`,(e,t)=>{po.init(e,t);let n=e._zod.parse,r=un(()=>uo(t)),i=e=>{let t=new _a([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Sn(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Sn(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
13
13
  if (${n}.issues.length) {
14
14
  if (${o} in input) {
15
15
  payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>vite-react</title>
8
- <script type="module" crossorigin src="/assets/index-CvRiQC6Q.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-Cr73pNBI.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-CqTfTEH3.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atom.io/template-react-node-backend",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -8,8 +8,8 @@
8
8
  "dependencies": {
9
9
  "react": "19.2.3",
10
10
  "react-dom": "19.2.3",
11
- "zod": "4.3.4",
12
- "atom.io": "0.46.16"
11
+ "zod": "4.3.5",
12
+ "atom.io": "0.46.17"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@types/node": "25.0.3",
@@ -23,7 +23,7 @@
23
23
  "eslint-plugin-react-refresh": "0.4.26",
24
24
  "globals": "17.0.0",
25
25
  "typescript": "5.9.3",
26
- "typescript-eslint": "8.51.0",
26
+ "typescript-eslint": "8.52.0",
27
27
  "vite": "npm:rolldown-vite@7.3.0"
28
28
  },
29
29
  "scripts": {