@lmvz-ds/components 0.18.2 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +45 -100
  3. package/assets/icons/checkmark.svg +4 -0
  4. package/cjs/{aria-loader-CfFuAbJn.js → aria-loader-Cec1zR2g.js} +1 -1
  5. package/cjs/ds.constants-DSnxZ3ia.js +16 -0
  6. package/cjs/icons-BQASWgk-.js +80 -0
  7. package/cjs/{index--7IqZZqn.js → index-3g9Z9sfF.js} +765 -2854
  8. package/cjs/index.cjs.js +12 -12
  9. package/cjs/lmvz-button.cjs.entry.js +4 -4
  10. package/cjs/lmvz-card.cjs.entry.js +1 -1
  11. package/cjs/lmvz-checkbox.cjs.entry.js +113 -0
  12. package/cjs/lmvz-chip.cjs.entry.js +68 -4
  13. package/cjs/lmvz-components.cjs.js +1 -1
  14. package/cjs/lmvz-header_2.cjs.entry.js +3 -3
  15. package/cjs/lmvz-icon.cjs.entry.js +10 -8
  16. package/cjs/lmvz-input.cjs.entry.js +4 -4
  17. package/cjs/lmvz-menuitem.cjs.entry.js +4 -4
  18. package/cjs/lmvz-select.cjs.entry.js +3 -3
  19. package/cjs/loader.cjs.js +1 -1
  20. package/cjs/{logger-Bn2yoZGP.js → logger-DsM6xg6V.js} +3063 -833
  21. package/cjs/{reactive-controller-host-CtaVAiYJ.js → reactive-controller-host-BA4ZhjKA.js} +10 -10
  22. package/cjs/svg-BMBduILB.js +125 -0
  23. package/collection/api/ds.constants.js +2 -0
  24. package/collection/assets/icons/checkmark.svg +4 -0
  25. package/collection/collection-manifest.json +1 -0
  26. package/collection/components/lmvz-button/lmvz-button.css +1 -2
  27. package/collection/components/lmvz-button/lmvz-button.js +6 -3
  28. package/collection/components/lmvz-card/lmvz-card.css +1 -2
  29. package/collection/components/lmvz-checkbox/lmvz-checkbox.css +207 -0
  30. package/collection/components/lmvz-checkbox/lmvz-checkbox.js +424 -0
  31. package/collection/components/lmvz-chip/lmvz-chip.css +84 -1
  32. package/collection/components/lmvz-chip/lmvz-chip.js +110 -13
  33. package/collection/components/lmvz-header/lmvz-header.js +2 -2
  34. package/collection/components/lmvz-icon/lmvz-icon.css +11 -10
  35. package/collection/components/lmvz-icon/lmvz-icon.js +8 -7
  36. package/collection/components/lmvz-input/lmvz-input.js +4 -4
  37. package/collection/components/lmvz-menuitem/lmvz-menuitem.css +1 -1
  38. package/collection/components/lmvz-menuitem/lmvz-menuitem.js +11 -5
  39. package/collection/components/lmvz-select/lmvz-select.js +1 -1
  40. package/collection/index.js +1 -1
  41. package/collection/integration/header-integration/header-integration.js +1 -1
  42. package/collection/utils/aria/aria-validation-controller.js +1 -0
  43. package/collection/utils/icons/icons.js +2 -13
  44. package/collection/utils/icons/icons.unit.js +3 -15
  45. package/collection/utils/reactive-controller-host.js +9 -9
  46. package/components/index.d.ts +2 -0
  47. package/components/index.d.ts.bak +2 -0
  48. package/components/index.js +1 -1
  49. package/components/lmvz-button.js +1 -1
  50. package/components/lmvz-card.js +1 -1
  51. package/components/lmvz-checkbox.d.ts +11 -0
  52. package/components/lmvz-checkbox.d.ts.bak +11 -0
  53. package/components/lmvz-checkbox.js +1 -0
  54. package/components/lmvz-chip.js +1 -1
  55. package/components/lmvz-header.js +1 -1
  56. package/components/lmvz-icon.js +1 -1
  57. package/components/lmvz-input.js +1 -1
  58. package/components/lmvz-menuitem.js +1 -1
  59. package/components/lmvz-select.js +1 -1
  60. package/components/p-0s99QfRy.js +12 -0
  61. package/components/{p-CBLAeife.js → p-BuFx0tTm.js} +1 -1
  62. package/components/p-CGmJG63p.js +1 -0
  63. package/components/p-CcxjkCOx.js +1 -0
  64. package/components/{p-DQEkWkMh.js → p-DIrAQ4IB.js} +1 -1
  65. package/esm/{aria-loader-BF_AYtbb.js → aria-loader-BVolm0lC.js} +1 -1
  66. package/esm/ds.constants-Bmi89ll1.js +9 -0
  67. package/esm/icons-CmuFKDRz.js +75 -0
  68. package/esm/{index-7Ru1khgk.js → index-Dh_9sN0q.js} +389 -2478
  69. package/esm/index.js +5 -11
  70. package/esm/lmvz-button.entry.js +4 -4
  71. package/esm/lmvz-card.entry.js +1 -1
  72. package/esm/lmvz-checkbox.entry.js +111 -0
  73. package/esm/lmvz-chip.entry.js +69 -5
  74. package/esm/lmvz-components.js +1 -1
  75. package/esm/lmvz-header_2.entry.js +3 -3
  76. package/esm/lmvz-icon.entry.js +10 -8
  77. package/esm/lmvz-input.entry.js +4 -4
  78. package/esm/lmvz-menuitem.entry.js +4 -4
  79. package/esm/lmvz-select.entry.js +3 -3
  80. package/esm/loader.js +1 -1
  81. package/esm/{logger-fiRXhuXK.js → logger-CGmJG63p.js} +2870 -765
  82. package/esm/{reactive-controller-host-sR2jJxNG.js → reactive-controller-host-DHcPpJW7.js} +10 -10
  83. package/esm/svg-B2YoIRuh.js +121 -0
  84. package/hydrate/index.js +2383 -42
  85. package/hydrate/index.mjs +2383 -42
  86. package/lmvz-components/index.esm.js +1 -1
  87. package/lmvz-components/lmvz-components.esm.js +1 -1
  88. package/lmvz-components/{p-5aa17cd2.entry.js → p-0f7a4236.entry.js} +1 -1
  89. package/lmvz-components/p-0s99QfRy.js +12 -0
  90. package/lmvz-components/{p-30b99f11.entry.js → p-2f83d7a2.entry.js} +1 -1
  91. package/lmvz-components/{p-6dbb3f13.entry.js → p-32171f4f.entry.js} +1 -1
  92. package/lmvz-components/{p-59383f3a.entry.js → p-400b2318.entry.js} +1 -1
  93. package/lmvz-components/p-851969bd.entry.js +1 -0
  94. package/lmvz-components/p-9f9d845d.entry.js +1 -0
  95. package/lmvz-components/p-Bmi89ll1.js +1 -0
  96. package/lmvz-components/p-CFsC37ww.js +1 -0
  97. package/lmvz-components/p-CGmJG63p.js +1 -0
  98. package/lmvz-components/p-CcxjkCOx.js +1 -0
  99. package/lmvz-components/{p-Bkfdgg0T.js → p-GdMr6Qlp.js} +1 -1
  100. package/lmvz-components/p-a12f95da.entry.js +1 -0
  101. package/lmvz-components/{p-84267405.entry.js → p-ab4437dc.entry.js} +1 -1
  102. package/lmvz-components/{p-7a6bec13.entry.js → p-d0a0e206.entry.js} +1 -1
  103. package/lmvz-components/{p-B3dnXEPG.js → p-dhVSUYqd.js} +1 -1
  104. package/manifest.json +544 -28
  105. package/package.json +5 -1
  106. package/types/api/ds.constants.d.ts +6 -1
  107. package/types/components/lmvz-action/lmvz-action.d.ts +0 -1
  108. package/types/components/lmvz-button/lmvz-button.d.ts +0 -1
  109. package/types/components/lmvz-card/lmvz-card.d.ts +0 -1
  110. package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +39 -0
  111. package/types/components/lmvz-chip/lmvz-chip.d.ts +18 -3
  112. package/types/components/lmvz-header/lmvz-header.d.ts +0 -1
  113. package/types/components/lmvz-icon/lmvz-icon.d.ts +0 -1
  114. package/types/components/lmvz-input/lmvz-input.d.ts +0 -1
  115. package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +0 -1
  116. package/types/components/lmvz-select/lmvz-select.d.ts +0 -1
  117. package/types/components.d.ts +221 -12
  118. package/types/index.d.ts +1 -2
  119. package/types/utils/aria/aria-validation-controller.d.ts +1 -2
  120. package/types/utils/aria/element-activation-controller.d.ts +0 -1
  121. package/types/utils/aria/list-keyboard-controller.d.ts +0 -1
  122. package/types/utils/assets.d.ts +0 -1
  123. package/types/utils/component.d.ts +0 -1
  124. package/types/utils/environment.d.ts +0 -1
  125. package/types/utils/http.d.ts +0 -1
  126. package/types/utils/http.unit.d.ts +0 -1
  127. package/types/utils/icons/icons-registry.d.ts +0 -1
  128. package/types/utils/icons/icons.d.ts +0 -2
  129. package/types/utils/icons/icons.unit.d.ts +0 -1
  130. package/types/utils/icons/public.d.ts +0 -1
  131. package/types/utils/public.d.ts +0 -1
  132. package/types/utils/reactive-controller-host.d.ts +0 -1
  133. package/cjs/icons-swqMn6s2.js +0 -163
  134. package/components/p-DXOTa5VF.js +0 -12
  135. package/components/p-fiRXhuXK.js +0 -1
  136. package/esm/icons-Ca8oMiRa.js +0 -157
  137. package/lmvz-components/p-0a41cc24.entry.js +0 -1
  138. package/lmvz-components/p-5f150890.entry.js +0 -1
  139. package/lmvz-components/p-Bh2Epkwf.js +0 -1
  140. package/lmvz-components/p-DXOTa5VF.js +0 -12
  141. package/lmvz-components/p-fiRXhuXK.js +0 -1
@@ -1 +1 @@
1
- import{B as t,H as i}from"./p-C_bScbrd.js";const o=Symbol("LMVZ__ariaValidationRuntimeState"),e="lmvz:aria-validation-runtime-changed";function n(){const t=globalThis;return t[o]||(t[o]={enabled:!1}),t[o]}function s(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(e))}const a=()=>n().enabled,r=()=>n().verboseLogging??!1,l=(t={})=>{const i=n();i.enabled||(Object.assign(i,t),i.enabled=!0,async function(...t){const i=await async function(){const t=n();if(!t.enabled)return null;if(t.runtime)return t.runtime;t.loadPromise||(t.loadPromise=import("./p-DXOTa5VF.js").catch((()=>null)));const i=await t.loadPromise;return i&&(t.runtime=i),i}();n().enabled&&(i?i.initializeValidationStream(...t):console.warn("Failed to load aria validation runtime"))}().then((()=>{s()})))},h=()=>{const t=n();t.enabled&&(t.enabled=!1,s())};function d(...t){const{enabled:i,runtime:o,loadPromise:e,lazyCondition:s}=n();if(i){if(!s)return a();(function(t,i=[]){const o=t(...i);return(e=o)&&"object"==typeof e&&"function"==typeof e.then?o:Promise.resolve(o);var e})(s).then((t=>{t&&a()}))}function a(){if(o)return o.enqueueValidation(...t);e?e.then((i=>{i?.enqueueValidation?i.enqueueValidation(...t):console.error("Failed to load aria validation runtime")})).catch((()=>{console.error("Failed to enqueue validation due to an error while loading the runtime")})):console.warn("neither runtime nor load promise found for aria validation. This should not happen, as enabling aria validation should have triggered the loading of the runtime.")}}class c{host;config;visibilityObserver;elementQueued=!1;elementValidated=!1;elementLoaded=!1;static knownValidationErrors=[];get disabled(){return!a()}get useVerboseLogging(){return this.config?.verboseLogging||t.isDev||r()}constructor(t,i){this.host=t,this.config=i}onRuntimeConfigChange=()=>{a()&&this.checkLazyValidation()};hostDidLoad(){this.elementLoaded=!0,"undefined"!=typeof window&&window.addEventListener(e,this.onRuntimeConfigChange),this.elementQueued||this.elementValidated||("slot"!==this.config?.validationTiming?this.host.validationEl?.checkVisibility?.()&&"load"===this.config?.validationTiming?this.enqueueValidation():this.observeVisibilityOnce():this.observeSlot())}hostDidUpdate(){this.checkLazyValidation()}hostDisconnected(){this.discardVisibilityObserver(),"undefined"!=typeof window&&window.removeEventListener(e,this.onRuntimeConfigChange)}revalidateAria(){this.enqueueValidation()}observeSlot(){this.host.validationSlot?.addEventListener("slotchange",this.enqueueValidation.bind(this))}observeVisibilityOnce(){window.setTimeout((()=>{this.host.validationEl&&(this.visibilityObserver=new IntersectionObserver((t=>{for(const i of t)i.target===this.host.validationEl&&i.isIntersecting&&(this.checkLazyValidation(),this.discardVisibilityObserver())}),{root:this.host.validationEl?.parentElement,rootMargin:"0px",threshold:.01}),this.visibilityObserver.observe(this.host.validationEl))}))}checkLazyValidation(){this.elementLoaded&&(this.config?.reValidateOnPropChanges||!this.elementQueued&&!this.elementValidated)&&this.host.validationEl?.checkVisibility?.()&&this.enqueueValidation()}enqueueValidation(){a()&&(this.elementQueued=!0,d({context:{include:this.host.validationEl,exclude:c.knownValidationErrors},onComplete:(t,i)=>{this.elementValidated=!0;const o=this.host.tagName||this.host.validationEl?.tagName||"Element";if(t)return console.error("Error running ARIA validation:",t,o),void(this.host.validationEl?.tagName||console.dir(this.host));const e=[o];if(!i?.violations.length)return void(this.useVerboseLogging&&(console.log(...e,"has no ARIA violations"),this.host.validationEl?.tagName||console.dir(this.host)));const n=i.violations.length,s=[...e,i.violations.at(0).id,n>1?`(+${n-1} more)`:""].filter(Boolean).join(" ");this.useVerboseLogging?console.group(s):console.groupCollapsed(s);const a=i.violations.flatMap((t=>(console.dir(t,{showHidden:!0,compact:!1}),t.nodes.map((t=>t.target)))));this.host.validationEl?console.log("element:",this.host.validationEl):console.dir(this.host),console.groupEnd(),c.knownValidationErrors.push(...a)}}))}discardVisibilityObserver(){this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=void 0)}}const u=class extends i{constructor(){super(!1)}controllers=new Set;addController(t){this.controllers.add(t)}removeController(t){this.controllers.delete(t)}get activeControllers(){return Array.from(this.controllers).filter((t=>!t.disabled))}connectedCallback(){this.controllers.size||console.warn("ReactiveControllerHost connected with no controllers registered.",this),this.activeControllers.forEach((t=>t.hostConnected?.()))}disconnectedCallback(){this.activeControllers.forEach((t=>t.hostDisconnected?.()))}componentWillLoad(){this.activeControllers.forEach((t=>t.hostWillLoad?.()))}componentDidLoad(){this.activeControllers.forEach((t=>t.hostDidLoad?.()))}componentWillRender(){this.activeControllers.forEach((t=>t.hostWillRender?.()))}componentDidRender(){this.activeControllers.forEach((t=>t.hostDidRender?.()))}componentWillUpdate(){this.activeControllers.forEach((t=>t.hostWillUpdate?.()))}componentDidUpdate(){this.activeControllers.forEach((t=>t.hostDidUpdate?.()))}};export{e as A,u as R,c as a,h as d,l as e,a as i,d as q,r as u}
1
+ import{B as t,H as i}from"./p-C_bScbrd.js";const o=Symbol("LMVZ__ariaValidationRuntimeState"),e="lmvz:aria-validation-runtime-changed";function n(){const t=globalThis;return t[o]||(t[o]={enabled:!1}),t[o]}function s(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(e))}const a=()=>n().enabled,r=()=>n().verboseLogging??!1,l=(t={})=>{const i=n();i.enabled||(Object.assign(i,t),i.enabled=!0,async function(...t){const i=await async function(){const t=n();if(!t.enabled)return null;if(t.runtime)return t.runtime;t.loadPromise||(t.loadPromise=import("./p-0s99QfRy.js").catch((()=>null)));const i=await t.loadPromise;return i&&(t.runtime=i),i}();n().enabled&&(i?i.initializeValidationStream(...t):console.warn("Failed to load aria validation runtime"))}().then((()=>{s()})))},h=()=>{const t=n();t.enabled&&(t.enabled=!1,s())};function d(...t){const{enabled:i,runtime:o,loadPromise:e,lazyCondition:s}=n();if(i){if(!s)return a();(function(t,i=[]){const o=t(...i);return(e=o)&&"object"==typeof e&&"function"==typeof e.then?o:Promise.resolve(o);var e})(s).then((t=>{t&&a()}))}function a(){if(o)return o.enqueueValidation(...t);e?e.then((i=>{i?.enqueueValidation?i.enqueueValidation(...t):console.error("Failed to load aria validation runtime")})).catch((()=>{console.error("Failed to enqueue validation due to an error while loading the runtime")})):console.warn("neither runtime nor load promise found for aria validation. This should not happen, as enabling aria validation should have triggered the loading of the runtime.")}}class c{host;config;visibilityObserver;elementQueued=!1;elementValidated=!1;elementLoaded=!1;static knownValidationErrors=[];get disabled(){return!a()}get useVerboseLogging(){return this.config?.verboseLogging||t.isDev||r()}constructor(t,i){this.host=t,this.config=i}onRuntimeConfigChange=()=>{a()&&this.checkLazyValidation()};hostDidLoad(){this.elementLoaded=!0,"undefined"!=typeof window&&window.addEventListener(e,this.onRuntimeConfigChange),this.elementQueued||this.elementValidated||("slot"!==this.config?.validationTiming?this.host.validationEl?.checkVisibility?.()&&"load"===this.config?.validationTiming?this.enqueueValidation():this.observeVisibilityOnce():this.observeSlot())}hostDidUpdate(){this.checkLazyValidation()}hostDisconnected(){this.discardVisibilityObserver(),"undefined"!=typeof window&&window.removeEventListener(e,this.onRuntimeConfigChange)}revalidateAria(){this.enqueueValidation()}observeSlot(){this.host.validationSlot?.addEventListener("slotchange",this.enqueueValidation.bind(this))}observeVisibilityOnce(){window.setTimeout((()=>{this.host.validationEl&&(this.visibilityObserver=new IntersectionObserver((t=>{for(const i of t)i.target===this.host.validationEl&&i.isIntersecting&&(this.checkLazyValidation(),this.discardVisibilityObserver())}),{root:this.host.validationEl?.parentElement,rootMargin:"0px",threshold:.01}),this.visibilityObserver.observe(this.host.validationEl))}))}checkLazyValidation(){this.elementLoaded&&(this.config?.reValidateOnPropChanges||!this.elementQueued&&!this.elementValidated)&&this.host.validationEl?.checkVisibility?.()&&this.enqueueValidation()}enqueueValidation(){a()&&(this.elementQueued=!0,d({context:{include:this.host.validationEl,exclude:c.knownValidationErrors},onComplete:(t,i)=>{this.elementValidated=!0;const o=this.host.tagName||this.host.validationEl?.tagName||"Element";if(t)return console.error("Error running ARIA validation:",t,o),void(this.host.validationEl?.tagName||console.dir(this.host));const e=[o];if(!i?.violations.length)return void(this.useVerboseLogging&&(console.log(...e,"has no ARIA violations"),this.host.validationEl?.tagName||console.dir(this.host)));const n=i.violations.length,s=[...e,i.violations.at(0).id,n>1?`(+${n-1} more)`:""].filter(Boolean).join(" ");this.useVerboseLogging?console.group(s):console.groupCollapsed(s);const a=i.violations.flatMap((t=>(console.dir(t,{showHidden:!0,compact:!1}),t.nodes.map((t=>t.target)))));this.host.validationEl?console.log("element:",this.host.validationEl):console.dir(this.host),console.groupEnd(),c.knownValidationErrors.push(...a)}}))}discardVisibilityObserver(){this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=void 0)}}const u=class extends i{constructor(){super(!1)}controllers=new Set;addController(t){this.controllers.add(t)}removeController(t){this.controllers.delete(t)}get activeControllers(){return Array.from(this.controllers).filter((t=>!t.disabled))}connectedCallback(){this.controllers.size||console.warn("ReactiveControllerHost connected with no controllers registered.",this),this.activeControllers.forEach((t=>t.hostConnected?.()))}disconnectedCallback(){this.activeControllers.forEach((t=>t.hostDisconnected?.()))}componentWillLoad(){this.activeControllers.forEach((t=>t.hostWillLoad?.()))}componentDidLoad(){this.activeControllers.forEach((t=>t.hostDidLoad?.()))}componentWillRender(){this.activeControllers.forEach((t=>t.hostWillRender?.()))}componentDidRender(){this.activeControllers.forEach((t=>t.hostDidRender?.()))}componentWillUpdate(){this.activeControllers.forEach((t=>t.hostWillUpdate?.()))}componentDidUpdate(){this.activeControllers.forEach((t=>t.hostDidUpdate?.()))}};export{e as A,u as R,c as a,h as d,l as e,a as i,d as q,r as u}
@@ -0,0 +1 @@
1
+ const t=function(t,e){if("function"==typeof t)return function(){return t(arguments)?e.apply(this,arguments):t=>e(t,...arguments)};switch(t){case 0:case 1:throw new RangeError(`Invalid arity ${t}`);case 2:return function(t,r){return arguments.length>=2?e(t,r):function(r){return e(r,t)}};case 3:return function(t,r,n){return arguments.length>=3?e(t,r,n):function(n){return e(n,t,r)}};case 4:return function(t,r,n,s){return arguments.length>=4?e(t,r,n,s):function(s){return e(s,t,r,n)}};case 5:return function(t,r,n,s,i){return arguments.length>=5?e(t,r,n,s,i):function(i){return e(i,t,r,n,s)}};default:return function(){if(arguments.length>=t)return e.apply(this,arguments);const r=arguments;return function(t){return e(t,...r)}}}},e=t=>t,r=t=>()=>t,n=r(!0),s=r(!1),i=r(void 0),a=i;function o(t,e,r,n,s,i,a,o,c){switch(arguments.length){case 1:return t;case 2:return e(t);case 3:return r(e(t));case 4:return n(r(e(t)));case 5:return s(n(r(e(t))));case 6:return i(s(n(r(e(t)))));case 7:return a(i(s(n(r(e(t))))));case 8:return o(a(i(s(n(r(e(t)))))));case 9:return c(o(a(i(s(n(r(e(t))))))));default:{let t=arguments[0];for(let e=1;e<arguments.length;e++)t=arguments[e](t);return t}}}const c=t=>(e,r)=>e===r||t(e,r),u=t(2,((t,e)=>c(((r,n)=>t(e(r),e(n)))))),f="effect/GlobalValue";let l;const h=(t,e)=>(l||(globalThis[f]??=new Map,l=globalThis[f]),l.has(t)||l.set(t,e()),l.get(t)),b=t=>"string"==typeof t,d=t=>"number"==typeof t,p=t=>"bigint"==typeof t,S=t=>"function"==typeof t,g=t=>(t=>"object"==typeof t&&null!==t)(t)||S(t),y=t(2,((t,e)=>g(t)&&e in t)),_=t(2,((t,e)=>y(t,"_tag")&&t._tag===e)),m=t=>null==t,w=t=>"string"==typeof t||y(t,Symbol.iterator),O=t=>`BUG: ${t} - please report an issue at https://github.com/Effect-TS/effect/issues`;let v=class t{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new t(this.self)}};class j{_state;constructor(t,e,r,n){return m(e)&&m(t)?(e=4294967295*Math.random()>>>0,t=0):m(e)&&(e=t,t=0),m(n)&&m(r)?(n=this._state?this._state[3]:4150755663,r=this._state?this._state[2]:335903614):m(n)&&(n=r,r=0),this._state=new Int32Array([0,0,r>>>0,(1|(n||0))>>>0]),this._next(),E(this._state,this._state[0],this._state[1],t>>>0,e>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=1|t[3]}integer(t){return Math.round(this.number()*Number.MAX_SAFE_INTEGER)%t}number(){return(1*(67108863&this._next())*134217728+1*(134217727&this._next()))/9007199254740992}_next(){const t=this._state[0]>>>0,e=this._state[1]>>>0;!function(t,e,r,n,s){let i=32557*(r>>>16)>>>0,a=19605*(65535&r)>>>0,o=32557*(65535&r)>>>0,c=19605*(r>>>16)+((a>>>16)+(i>>>16))>>>0;a=a<<16>>>0,o=o+a>>>0,o>>>0<a>>>0&&(c=c+1>>>0),i=i<<16>>>0,o=o+i>>>0,o>>>0<i>>>0&&(c=c+1>>>0),c=c+Math.imul(r,1481765933)>>>0,c=c+Math.imul(e,s)>>>0,t[0]=c,t[1]=o}(this._state,t,e,0,1284865837),E(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let r=t>>>18,n=(e>>>18|t<<14)>>>0;r=(r^t)>>>0,n=(n^e)>>>0;const s=(n>>>27|r<<5)>>>0,i=t>>>27;return(s>>>i|s<<((-i>>>0&31)>>>0))>>>0}}function E(t,e,r,n,s){let i=e+n>>>0;const a=r+s>>>0;a>>>0<r>>>0&&(i=i+1|0),t[0]=i,t[1]=a}const C=Symbol.for("effect/Utils/YieldWrap");class I{#t;constructor(t){this.#t=t}[C](){return this.#t}}function k(t){if("object"==typeof t&&null!==t&&C in t)return t[C]();throw new Error(O("yieldWrapGet"))}const N=h("effect/Utils/isStructuralRegion",(()=>({enabled:!1,tester:void 0}))),A={effect_internal_function:t=>t()},M=!0===A.effect_internal_function((()=>(new Error).stack))?.includes("effect_internal_function")?A.effect_internal_function:t=>{try{return t()}finally{}},F=h(Symbol.for("effect/Hash/randomHashCache"),(()=>new WeakMap)),$=Symbol.for("effect/Hash"),R=t=>{if(!0===N.enabled)return 0;switch(typeof t){case"number":return D(t);case"bigint":return P(t.toString(10));case"boolean":case"symbol":return P(String(t));case"string":return P(t);case"undefined":return P("undefined");case"function":case"object":return null===t?P("null"):t instanceof Date?Number.isNaN(t.getTime())?P("Invalid Date"):R(t.toISOString()):t instanceof URL?R(t.href):J(t)?t[$]():x(t);default:throw new Error(`BUG: unhandled typeof ${typeof t} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},x=t=>(F.has(t)||F.set(t,D(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),F.get(t)),L=t=>e=>53*e^t,T=t=>3221225471&t|t>>>1&1073741824,J=t=>y(t,$),D=t=>{if(t!=t||t===1/0)return 0;let e=0|t;for(e!==t&&(e^=4294967295*t);t>4294967295;)e^=t/=4294967295;return T(e)},P=t=>{let e=5381,r=t.length;for(;r;)e=33*e^t.charCodeAt(--r);return T(e)},U=t=>((t,e)=>{let r=12289;for(let n=0;n<e.length;n++)r^=o(P(e[n]),L(R(t[e[n]])));return T(r)})(t,Object.keys(t)),q=t=>{let e=6151;for(let r=0;r<t.length;r++)e=o(e,L(R(t[r])));return T(e)},B=function(){if(1===arguments.length){const t=arguments[0];return function(e){return Object.defineProperty(t,$,{value:()=>e,enumerable:!1}),e}}const t=arguments[1];return Object.defineProperty(arguments[0],$,{value:()=>t,enumerable:!1}),t},V=Symbol.for("effect/Equal");function W(){return 1===arguments.length?t=>H(t,arguments[0]):H(arguments[0],arguments[1])}function H(t,e){if(t===e)return!0;const r=typeof t;if(r!==typeof e)return!1;if("object"===r||"function"===r){if(null!==t&&null!==e){if(Y(t)&&Y(e))return!(R(t)!==R(e)||!t[V](e))||!(!N.enabled||!N.tester)&&N.tester(t,e);if(t instanceof Date&&e instanceof Date){const r=t.getTime(),n=e.getTime();return r===n||Number.isNaN(r)&&Number.isNaN(n)}if(t instanceof URL&&e instanceof URL)return t.href===e.href}if(N.enabled){if(null===t||null===e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every(((t,r)=>H(t,e[r])));if(Object.getPrototypeOf(t)===Object.prototype&&Object.getPrototypeOf(e)===Object.prototype){const r=Object.keys(t),n=Object.keys(e);if(r.length===n.length){for(const n of r)if(!(n in e)||!H(t[n],e[n]))return!!N.tester&&N.tester(t,e);return!0}}return!!N.tester&&N.tester(t,e)}}return!(!N.enabled||!N.tester)&&N.tester(t,e)}const Y=t=>y(t,V),G=()=>W,z=Symbol.for("nodejs.util.inspect.custom"),K=t=>{try{if(y(t,"toJSON")&&S(t.toJSON)&&0===t.toJSON.length)return t.toJSON();if(Array.isArray(t))return t.map(K)}catch{return{}}return st(t)},Q=t=>JSON.stringify(t,null,2),X=(t,e=2)=>{if("string"==typeof t)return t;try{return"object"==typeof t?Z(t,e):String(t)}catch{return String(t)}},Z=(t,e)=>{let r=[];const n=JSON.stringify(t,((t,e)=>"object"==typeof e&&null!==e?r.includes(e)?void 0:r.push(e)&&(void 0!==rt.fiberRefs&&et(e)?e[tt](rt.fiberRefs):e):e),e);return r=void 0,n},tt=Symbol.for("effect/Inspectable/Redactable"),et=t=>"object"==typeof t&&null!==t&&tt in t,rt=h("effect/Inspectable/redactableState",(()=>({fiberRefs:void 0}))),nt=(t,e)=>{const r=rt.fiberRefs;rt.fiberRefs=t;try{return e()}finally{rt.fiberRefs=r}},st=t=>et(t)&&void 0!==rt.fiberRefs?t[tt](rt.fiberRefs):t,it=(t,e)=>{switch(e.length){case 0:return t;case 1:return e[0](t);case 2:return e[1](e[0](t));case 3:return e[2](e[1](e[0](t)));case 4:return e[3](e[2](e[1](e[0](t))));case 5:return e[4](e[3](e[2](e[1](e[0](t)))));case 6:return e[5](e[4](e[3](e[2](e[1](e[0](t))))));case 7:return e[6](e[5](e[4](e[3](e[2](e[1](e[0](t)))))));case 8:return e[7](e[6](e[5](e[4](e[3](e[2](e[1](e[0](t))))))));case 9:return e[8](e[7](e[6](e[5](e[4](e[3](e[2](e[1](e[0](t)))))))));default:{let r=t;for(let t=0,n=e.length;t<n;t++)r=e[t](r);return r}}},at="Async",ot="Commit",ct="Failure",ut="OnFailure",ft="OnSuccess",lt="OnSuccessAndFailure",ht="Success",bt="Sync",dt="Tag",pt="UpdateRuntimeFlags",St="While",gt="Iterator",yt="WithRuntime",_t="Yield",mt="RevertFlags",wt=()=>"3.21.1",Ot=Symbol.for("effect/Effect"),vt=Symbol.for("effect/Stream"),jt=Symbol.for("effect/Sink"),Et=Symbol.for("effect/Channel"),Ct={_R:t=>t,_E:t=>t,_A:t=>t,_V:wt()},It={[Ot]:Ct,[vt]:Ct,[jt]:{_A:t=>t,_In:t=>t,_L:t=>t,_E:t=>t,_R:t=>t},[Et]:{_Env:t=>t,_InErr:t=>t,_InElem:t=>t,_InDone:t=>t,_OutErr:t=>t,_OutElem:t=>t,_OutDone:t=>t},[V](t){return this===t},[$](){return B(this,x(this))},[Symbol.iterator](){return new v(new I(this))},pipe(){return it(this,arguments)}},kt={[$](){return B(this,U(this))},[V](t){const e=Object.keys(this),r=Object.keys(t);if(e.length!==r.length)return!1;for(const r of e)if(!(r in t)||!W(this[r],t[r]))return!1;return!0}},Nt={...It,_op:ot},At={...Nt,...kt},Mt=function(){function t(){}return t.prototype=Nt,t}(),Ft=Symbol.for("effect/Option"),$t={...It,[Ft]:{_A:t=>t},[z](){return this.toJSON()},toString(){return Q(this.toJSON())}},Rt=Object.assign(Object.create($t),{_tag:"Some",_op:"Some",[V](t){return Tt(t)&&Dt(t)&&W(this.value,t.value)},[$](){return B(this,L(R(this._tag))(R(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:K(this.value)}}}),xt=R("None"),Lt=Object.assign(Object.create($t),{_tag:"None",_op:"None",[V]:t=>Tt(t)&&Jt(t),[$]:()=>xt,toJSON(){return{_id:"Option",_tag:this._tag}}}),Tt=t=>y(t,Ft),Jt=t=>"None"===t._tag,Dt=t=>"Some"===t._tag,Pt=Object.create(Lt),Ut=t=>{const e=Object.create(Rt);return e.value=t,e},qt=Symbol.for("effect/Either"),Bt={...It,[qt]:{_R:t=>t},[z](){return this.toJSON()},toString(){return Q(this.toJSON())}},Vt=Object.assign(Object.create(Bt),{_tag:"Right",_op:"Right",[V](t){return Ht(t)&&Gt(t)&&W(this.right,t.right)},[$](){return L(R(this._tag))(R(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:K(this.right)}}}),Wt=Object.assign(Object.create(Bt),{_tag:"Left",_op:"Left",[V](t){return Ht(t)&&Yt(t)&&W(this.left,t.left)},[$](){return L(R(this._tag))(R(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:K(this.left)}}}),Ht=t=>y(t,qt),Yt=t=>"Left"===t._tag,Gt=t=>"Right"===t._tag,zt=t=>{const e=Object.create(Vt);return e.right=t,e},Kt=t=>{const e=Object.create(Wt);return e.left=t,e},Qt=Yt,Xt=Gt,Zt=t(2,((t,{onLeft:e,onRight:r})=>Qt(t)?e(t.left):r(t.right))),te=Zt({onLeft:e,onRight:e}),ee=t(2,((t,e)=>{if(Xt(t))return t.right;throw e(t.left)})),re=t=>t.length>0,ne=()=>Pt,se=Ut,ie=Jt,ae=Dt,oe=t(2,((t,{onNone:e,onSome:r})=>ie(t)?e():r(t.value))),ce=t=>Yt(t)?Pt:Ut(t.right),ue=t(2,((t,e)=>ie(t)?e():t.value)),fe=t(2,((t,e)=>ie(t)?se(e()):t)),le=t=>null==t?ne():se(t),he=ue(i),be=t(2,((t,e)=>ie(t)?ne():se(e(t.value)))),de=t(2,((t,e)=>ie(t)?ne():e(t.value))),pe=(e=>t(2,((t,r)=>!ie(t)&&e(t.value,r))))(G()),Se=t=>(e,r)=>ie(e)?r:ie(r)?e:se(t(e.value,r.value)),ge=(...t)=>t,ye=t=>new Array(t),_e=t(2,((t,e)=>{const r=Math.max(1,Math.floor(t)),n=new Array(r);for(let t=0;t<r;t++)n[t]=e(t);return n})),me=t=>Array.isArray(t)?t:Array.from(t),we=t(2,((t,e)=>[e,...t])),Oe=t(2,((t,e)=>[...t,e])),ve=t(2,((t,e)=>me(t).concat(me(e)))),je=re,Ee=re,Ce=(t,e)=>t<0||t>=e.length,Ie=t(2,((t,e)=>{const r=Math.floor(e);return Ce(r,t)?ne():se(t[r])})),ke=t(2,((t,e)=>{const r=Math.floor(e);if(Ce(r,t))throw new Error(`Index ${r} out of bounds`);return t[r]})),Ne=Ie(0),Ae=ke(0),Me=t=>Ee(t)?se(Fe(t)):ne(),Fe=t=>t[t.length-1],$e=t=>t.slice(1),Re=t(2,((t,e)=>Ue(t,((t,e)=>{let r=0;for(const n of t){if(!e(n,r))break;r++}return r})(t,e)))),xe=t(2,((t,e)=>{const r=me(t);return r.slice(((t,e)=>Math.floor(Math.min(Math.max(0,t),e.length)))(e,r),r.length)})),Le=t=>Array.from(t).reverse(),Te=t(2,((t,e)=>{const r=Array.from(t);return r.sort(e),r})),Je=t(2,((t,e)=>De(t,e,ge))),De=t(3,((t,e,r)=>{const n=me(t),s=me(e);if(Ee(n)&&Ee(s)){const t=[r(Ae(n),Ae(s))],e=Math.min(n.length,s.length);for(let i=1;i<e;i++)t[i]=r(n[i],s[i]);return t}return[]})),Pe=G(),Ue=t(2,((t,e)=>{const r=Array.from(t),n=Math.floor(e);return Ee(r)?n>=1?qe(r,n):[[],r]:[r,[]]})),qe=t(2,((t,e)=>{const r=Math.max(1,Math.floor(e));return r>=t.length?[Be(t),[]]:[we(t.slice(1,r),Ae(t)),t.slice(r)]})),Be=t=>t.slice(),Ve=t(3,((t,e,r)=>{const n=me(t),s=me(e);return Ee(n)?Ee(s)?er(r)(ve(n,s)):n:s})),We=t(2,((t,e)=>Ve(t,e,Pe))),He=()=>[],Ye=t=>[t],Ge=t(2,((t,e)=>t.map(e))),ze=t(2,((t,e)=>{if((t=>0===t.length)(t))return[];const r=[];for(let n=0;n<t.length;n++){const s=e(t[n],n);for(let t=0;t<s.length;t++)r.push(s[t])}return r}))(e),Ke=t(2,((t,e)=>{const r=me(t),n=[];for(let t=0;t<r.length;t++){const s=e(r[t],t);ae(s)&&n.push(s.value)}return n})),Qe=t(2,((t,e)=>{const r=me(t),n=[];for(let t=0;t<r.length;t++)e(r[t],t)&&n.push(r[t]);return n})),Xe=t(3,((t,e,r)=>me(t).reduce(((t,e,n)=>r(t,e,n)),e))),Ze=(t,e)=>{const r=[];let n,s=t;for(;ae(n=e(s));){const[t,e]=n.value;r.push(t),s=e}return r},tr=t=>c(((e,r)=>{if(e.length!==r.length)return!1;for(let n=0;n<e.length;n++)if(!t(e[n],r[n]))return!1;return!0})),er=t(2,((t,e)=>{const r=me(t);if(Ee(r)){const t=[Ae(r)],n=$e(r);for(const r of n)t.every((t=>!e(r,t)))&&t.push(r);return t}return[]})),rr=t=>er(t,G()),nr=t(2,((t,e)=>me(t).join(e))),sr=Symbol.for("effect/Context/Tag"),ir=Symbol.for("effect/Context/Reference"),ar=Symbol.for("effect/STM"),or={...It,_op:"Tag",[ar]:Ct,[sr]:{_Service:t=>t,_Identifier:t=>t},toString(){return Q(this.toJSON())},toJSON(){return{_id:"Tag",key:this.key,stack:this.stack}},[z](){return this.toJSON()},of:t=>t,context(t){return dr(this,t)}},cr={...or,[ir]:ir},ur=Symbol.for("effect/Context"),fr={[ur]:{_Services:t=>t},[V](t){if(hr(t)&&this.unsafeMap.size===t.unsafeMap.size){for(const e of this.unsafeMap.keys())if(!t.unsafeMap.has(e)||!W(this.unsafeMap.get(e),t.unsafeMap.get(e)))return!1;return!0}return!1},[$](){return B(this,D(this.unsafeMap.size))},pipe(){return it(this,arguments)},toString(){return Q(this.toJSON())},toJSON(){return{_id:"Context",services:Array.from(this.unsafeMap).map(K)}},[z](){return this.toJSON()}},lr=t=>{const e=Object.create(fr);return e.unsafeMap=t,e},hr=t=>y(t,ur),br=lr(new Map),dr=(t,e)=>lr(new Map([[t.key,e]])),pr=t(3,((t,e,r)=>{const n=new Map(t.unsafeMap);return n.set(e.key,r),lr(n)})),Sr=h("effect/Context/defaultValueCache",(()=>new Map)),gr=t=>{if(Sr.has(t.key))return Sr.get(t.key);const e=t.defaultValue();return Sr.set(t.key,e),e},yr=t(2,((t,e)=>{if(!t.unsafeMap.has(e.key)){if(ir in e)return gr(e);throw(t=>{const e=new Error("Service not found"+(t.key?`: ${String(t.key)}`:""));if(t.stack){const r=t.stack.split("\n");if(r.length>2){const t=r[2].match(/at (.*)/);t&&(e.message=e.message+` (defined at ${t[1]})`)}}if(e.stack){const t=e.stack.split("\n");t.splice(1,3),e.stack=t.join("\n")}return e})(e)}return t.unsafeMap.get(e.key)})),_r=yr,mr=t(2,((t,e)=>t.unsafeMap.has(e.key)?Ut(t.unsafeMap.get(e.key)):y(e,ir)?Ut(gr(e)):Pt)),wr=t(2,((t,e)=>{const r=new Map(t.unsafeMap);for(const[t,n]of e.unsafeMap)r.set(t,n);return lr(r)})),Or=t=>{const e=Error.stackTraceLimit;Error.stackTraceLimit=2;const r=new Error;Error.stackTraceLimit=e;const n=Object.create(or);return Object.defineProperty(n,"stack",{get:()=>r.stack}),n.key=t,n},vr=hr,jr=()=>br,Er=dr,Cr=pr,Ir=_r,kr=yr,Nr=mr,Ar=wr,Mr=(...t)=>{const e=new Map;for(let r=0;r<t.length;r++)t[r].unsafeMap.forEach(((t,r)=>{e.set(r,t)}));return lr(e)},Fr=()=>(t,e)=>{const r=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;function s(){}return Error.stackTraceLimit=r,Object.setPrototypeOf(s,cr),s.key=t,s.defaultValue=e.defaultValue,Object.defineProperty(s,"stack",{get:()=>n.stack}),s},$r=Symbol.for("effect/Chunk"),Rr=[],xr=(t=>c(((e,r)=>e.length===r.length&&Wr(e).every(((e,n)=>t(e,Kr(r,n)))))))(W),Lr={[$r]:{_A:t=>t},toString(){return Q(this.toJSON())},toJSON(){return{_id:"Chunk",values:Wr(this).map(K)}},[z](){return this.toJSON()},[V](t){return Jr(t)&&xr(this,t)},[$](){return B(this,q(Wr(this)))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return Rr[Symbol.iterator]();default:return Wr(this)[Symbol.iterator]()}},pipe(){return it(this,arguments)}},Tr=t=>{const e=Object.create(Lr);switch(e.backing=t,t._tag){case"IEmpty":e.length=0,e.depth=0,e.left=e,e.right=e;break;case"IConcat":e.length=t.left.length+t.right.length,e.depth=1+Math.max(t.left.depth,t.right.depth),e.left=t.left,e.right=t.right;break;case"IArray":e.length=t.array.length,e.depth=0,e.left=Dr,e.right=Dr;break;case"ISingleton":e.length=1,e.depth=0,e.left=Dr,e.right=Dr;break;case"ISlice":e.length=t.length,e.depth=t.chunk.depth+1,e.left=Dr,e.right=Dr}return e},Jr=t=>y(t,$r),Dr=Tr({_tag:"IEmpty"}),Pr=()=>Dr,Ur=(...t)=>zr(t),qr=t=>Tr({_tag:"ISingleton",a:t}),Br=t=>Jr(t)?t:Gr(me(t)),Vr=(t,e,r)=>{switch(t.backing._tag){case"IArray":!function(t,e,r,n,s){for(let e=0;e<Math.min(t.length,0+s);e++)r[n+e-0]=t[e]}(t.backing.array,0,e,r,t.length);break;case"IConcat":Vr(t.left,e,r),Vr(t.right,e,r+t.left.length);break;case"ISingleton":e[r]=t.backing.a;break;case"ISlice":{let n=0,s=r;for(;n<t.length;)e[s]=Kr(t,n),n+=1,s+=1;break}}},Wr=t=>{switch(t.backing._tag){case"IEmpty":return Rr;case"IArray":return t.backing.array;default:{const e=new Array(t.length);return Vr(t,e,0),t.backing={_tag:"IArray",array:e},t.left=Dr,t.right=Dr,t.depth=0,e}}},Hr=t=>{switch(t.backing._tag){case"IEmpty":case"ISingleton":return t;case"IArray":return Tr({_tag:"IArray",array:Le(t.backing.array)});case"IConcat":return Tr({_tag:"IConcat",left:Hr(t.backing.right),right:Hr(t.backing.left)});case"ISlice":return Gr(Le(Wr(t)))}},Yr=t(2,((t,e)=>e<0||e>=t.length?ne():se(Kr(t,e)))),Gr=t=>0===t.length?Pr():1===t.length?qr(t[0]):Tr({_tag:"IArray",array:t}),zr=t=>Gr(t),Kr=t(2,((t,e)=>{switch(t.backing._tag){case"IEmpty":throw new Error("Index out of bounds");case"ISingleton":if(0!==e)throw new Error("Index out of bounds");return t.backing.a;case"IArray":if(e>=t.length||e<0)throw new Error("Index out of bounds");return t.backing.array[e];case"IConcat":return e<t.left.length?Kr(t.left,e):Kr(t.right,e-t.left.length);case"ISlice":return Kr(t.backing.chunk,e+t.backing.offset)}})),Qr=t(2,((t,e)=>en(t,qr(e)))),Xr=t(2,((t,e)=>en(qr(e),t))),Zr=t(2,((t,e)=>{if(e<=0)return Dr;if(e>=t.length)return t;switch(t.backing._tag){case"ISlice":return Tr({_tag:"ISlice",chunk:t.backing.chunk,length:e,offset:t.backing.offset});case"IConcat":return e>t.left.length?Tr({_tag:"IConcat",left:t.left,right:Zr(t.right,e-t.left.length)}):Zr(t.left,e);default:return Tr({_tag:"ISlice",chunk:t,offset:0,length:e})}})),tn=t(2,((t,e)=>{if(e<=0)return t;if(e>=t.length)return Dr;switch(t.backing._tag){case"ISlice":return Tr({_tag:"ISlice",chunk:t.backing.chunk,offset:t.backing.offset+e,length:t.backing.length-e});case"IConcat":return e>t.left.length?tn(t.right,e-t.left.length):Tr({_tag:"IConcat",left:tn(t.left,e),right:t.right});default:return Tr({_tag:"ISlice",chunk:t,offset:e,length:t.length-e})}})),en=t(2,((t,e)=>{if("IEmpty"===t.backing._tag)return e;if("IEmpty"===e.backing._tag)return t;const r=e.depth-t.depth;if(Math.abs(r)<=1)return Tr({_tag:"IConcat",left:t,right:e});if(r<-1){if(t.left.depth>=t.right.depth){const r=en(t.right,e);return Tr({_tag:"IConcat",left:t.left,right:r})}{const r=en(t.right.right,e);if(r.depth===t.depth-3){const e=Tr({_tag:"IConcat",left:t.right.left,right:r});return Tr({_tag:"IConcat",left:t.left,right:e})}{const e=Tr({_tag:"IConcat",left:t.left,right:t.right.left});return Tr({_tag:"IConcat",left:e,right:r})}}}if(e.right.depth>=e.left.depth){const r=en(t,e.left);return Tr({_tag:"IConcat",left:r,right:e.right})}{const r=en(t,e.left.left);if(r.depth===e.depth-3){const t=Tr({_tag:"IConcat",left:r,right:e.left.right});return Tr({_tag:"IConcat",left:t,right:e.right})}{const t=Tr({_tag:"IConcat",left:e.left.right,right:e.right});return Tr({_tag:"IConcat",left:r,right:t})}}})),rn=t(2,((t,e)=>Gr(Ke(t,e)))),nn=t(2,((t,e)=>Gr(Qe(t,e)))),sn=t=>0===t.length,an=t=>t.length>0,on=Yr(0),cn=t=>Kr(t,0),un=cn,fn=t(2,((t,e)=>"ISingleton"===t.backing._tag?qr(e(t.backing.a,0)):Gr(o(Wr(t),Ge(((t,r)=>e(t,r))))))),ln=t(2,((t,e)=>[Zr(t,e),tn(t,e)])),hn=t(2,((t,e)=>{let r=0;for(const n of Wr(t)){if(e(n))break;r++}return ln(t,r)})),bn=t=>tn(t,1),dn=Xe,pn=Math.pow(2,5),Sn=pn-1,gn=pn/2,yn=pn/4;function _n(t,e){return e>>>t&Sn}function mn(t){return 1<<t}function wn(t,e){return r=t&e-1,r=(r=(858993459&(r-=r>>1&1431655765))+(r>>2&858993459))+(r>>4)&252645135,127&(r+=r>>8)+(r>>16);var r}function On(t,e,r,n){let s=n;if(!t){const t=n.length;s=new Array(t);for(let e=0;e<t;++e)s[e]=n[e]}return s[e]=r,s}function vn(t,e,r){const n=r.length-1;let s=0,i=0,a=r;if(t)s=i=e;else for(a=new Array(n);s<e;)a[i++]=r[s++];for(++s;s<=n;)a[i++]=r[s++];return t&&(a.length=n),a}class jn{_tag="EmptyNode";modify(t,e,r,n,s,i){const a=r(ne());return ie(a)?new jn:(++i.value,new In(t,n,s,a))}}function En(t){return _(t,"EmptyNode")}function Cn(t,e){return!En(t)&&e===t.edit}class In{edit;hash;key;value;_tag="LeafNode";constructor(t,e,r,n){this.edit=t,this.hash=e,this.key=r,this.value=n}modify(t,e,r,n,s,i){if(W(s,this.key)){const e=r(this.value);return e===this.value?this:ie(e)?(--i.value,new jn):Cn(this,t)?(this.value=e,this):new In(t,n,s,e)}const a=r(ne());return ie(a)?this:(++i.value,Fn(t,e,this.hash,this,n,new In(t,n,s,a)))}}class kn{edit;hash;children;_tag="CollisionNode";constructor(t,e,r){this.edit=t,this.hash=e,this.children=r}modify(t,e,r,n,s,i){if(n===this.hash){const e=Cn(this,t),n=this.updateCollisionList(e,t,this.hash,this.children,r,s,i);return n===this.children?this:n.length>1?new kn(t,this.hash,n):n[0]}const a=r(ne());return ie(a)?this:(++i.value,Fn(t,e,this.hash,this,n,new In(t,n,s,a)))}updateCollisionList(t,e,r,n,s,i,a){const o=n.length;for(let c=0;c<o;++c){const o=n[c];if("key"in o&&W(i,o.key)){const u=o.value,f=s(u);return f===u?n:ie(f)?(--a.value,vn(t,c,n)):On(t,c,new In(e,r,i,f),n)}}const c=s(ne());return ie(c)?n:(++a.value,On(t,o,new In(e,r,i,c),n))}}class Nn{edit;mask;children;_tag="IndexedNode";constructor(t,e,r){this.edit=t,this.mask=e,this.children=r}modify(t,e,r,n,s,i){const a=this.mask,o=this.children,c=_n(e,n),u=mn(c),f=wn(a,u),l=a&u,h=Cn(this,t);if(!l){const l=(new jn).modify(t,e+5,r,n,s,i);return l?o.length>=gn?function(t,e,r,n,s){const i=[];let a=n,o=0;for(let t=0;a;++t)1&a&&(i[t]=s[o++]),a>>>=1;return i[e]=r,new An(t,o+1,i)}(t,c,l,a,o):new Nn(t,a|u,function(t,e,r,n){const s=n.length;if(t){let t=s;for(;t>=e;)n[t--]=n[t];return n[e]=r,n}let i=0,a=0;const o=new Array(s+1);for(;i<e;)o[a++]=n[i++];for(o[e]=r;i<s;)o[++a]=n[i++];return o}(h,f,l,o)):this}const b=o[f],d=b.modify(t,e+5,r,n,s,i);if(b===d)return this;let p,S=a;if(En(d)){if(S&=~u,!S)return new jn;if(o.length<=2&&(En(g=o[1^f])||"LeafNode"===g._tag||"CollisionNode"===g._tag))return o[1^f];p=vn(h,f,o)}else p=On(h,f,d,o);var g;return h?(this.mask=S,this.children=p,this):new Nn(t,S,p)}}class An{edit;size;children;_tag="ArrayNode";constructor(t,e,r){this.edit=t,this.size=e,this.children=r}modify(t,e,r,n,s,i){let a=this.size;const o=this.children,c=_n(e,n),u=o[c],f=(u||new jn).modify(t,e+5,r,n,s,i);if(u===f)return this;const l=Cn(this,t);let h;if(En(u)&&!En(f))++a,h=On(l,c,f,o);else if(!En(u)&&En(f)){if(--a,a<=yn)return function(t,e,r,n){const s=new Array(e-1);let i=0,a=0;for(let t=0,e=n.length;t<e;++t)if(t!==r){const e=n[t];e&&!En(e)&&(s[i++]=e,a|=1<<t)}return new Nn(t,a,s)}(t,a,c,o);h=On(l,c,new jn,o)}else h=On(l,c,f,o);return l?(this.size=a,this.children=h,this):new An(t,a,h)}}function Mn(t,e,r,n,s,i){if(r===s)return new kn(t,r,[i,n]);const a=_n(e,r),o=_n(e,s);if(a===o)return e=>new Nn(t,mn(a)|mn(o),[e]);{const e=a<o?[n,i]:[i,n];return new Nn(t,mn(a)|mn(o),e)}}function Fn(t,e,r,n,s,i){let a,o=e;for(;;){const e=Mn(t,o,r,n,s,i);if("function"!=typeof e){let t=e;for(;null!=a;)t=a.value(t),a=a.previous;return t}a={value:e,previous:a},o+=5}}const $n="effect/HashMap",Rn=Symbol.for($n),xn={[Rn]:Rn,[Symbol.iterator](){return new Tn(this,((t,e)=>[t,e]))},[$](){let t=R($n);for(const e of this)t^=o(R(e[0]),L(R(e[1])));return B(this,t)},[V](t){if(Bn(t)){if(t._size!==this._size)return!1;for(const e of this){const r=o(t,Wn(e[0],R(e[0])));if(ie(r))return!1;if(!W(e[1],r.value))return!1}return!0}return!1},toString(){return Q(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(K)}},[z](){return this.toJSON()},pipe(){return it(this,arguments)}},Ln=(t,e,r,n)=>{const s=Object.create(xn);return s._editable=t,s._edit=e,s._root=r,s._size=n,s};class Tn{map;f;v;constructor(t,e){this.map=t,this.f=e,this.v=Dn(this.map._root,this.f,void 0)}next(){if(ie(this.v))return{done:!0,value:void 0};const t=this.v.value;return this.v=Jn(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new Tn(this.map,this.f)}}const Jn=t=>t?Pn(t[0],t[1],t[2],t[3],t[4]):ne(),Dn=(t,e,r)=>{switch(t._tag){case"LeafNode":return ae(t.value)?se({value:e(t.key,t.value.value),cont:r}):Jn(r);case"CollisionNode":case"ArrayNode":case"IndexedNode":{const n=t.children;return Pn(n.length,n,0,e,r)}default:return Jn(r)}},Pn=(t,e,r,n,s)=>{for(;r<t;){const i=e[r++];if(i&&!En(i))return Dn(i,n,[t,e,r,n,s])}return Jn(s)},Un=Ln(!1,0,new jn,0),qn=()=>Un,Bn=t=>y(t,Rn),Vn=t(2,((t,e)=>Wn(t,e,R(e)))),Wn=t(3,((t,e,r)=>{let n=t._root,s=0;for(;;)switch(n._tag){case"LeafNode":return W(e,n.key)?n.value:ne();case"CollisionNode":if(r===n.hash){const t=n.children;for(let r=0,n=t.length;r<n;++r){const n=t[r];if("key"in n&&W(e,n.key))return n.value}}return ne();case"IndexedNode":{const t=mn(_n(s,r));if(n.mask&t){n=n.children[wn(n.mask,t)],s+=5;break}return ne()}case"ArrayNode":if(n=n.children[_n(s,r)],n){s+=5;break}return ne();default:return ne()}})),Hn=t(2,((t,e)=>ae(Wn(t,e,R(e))))),Yn=t(3,((t,e,r)=>Xn(t,e,(()=>se(r))))),Gn=t(3,((t,e,r)=>t._editable?(t._root=e,t._size=r,t):e===t._root?t:Ln(t._editable,t._edit,e,r))),zn=t=>new Tn(t,(t=>t)),Kn=t=>t._size,Qn=t=>Ln(!0,t._edit+1,t._root,t._size),Xn=t(3,((t,e,r)=>Zn(t,e,R(e),r))),Zn=t(4,((t,e,r,n)=>{const s={value:t._size},i=t._root.modify(t._editable?t._edit:NaN,0,n,r,e,s);return o(t,Gn(i,s.value))})),ts=t(2,((t,e)=>Xn(t,e,ne))),es=t(2,((t,e)=>ns(t,qn(),((t,r,n)=>Yn(t,n,e(r,n)))))),rs=t(2,((t,e)=>ns(t,void 0,((t,r,n)=>e(r,n))))),ns=t(3,((t,e,r)=>{const n=t._root;if("LeafNode"===n._tag)return ae(n.value)?r(e,n.value.value,n.key):e;if("EmptyNode"===n._tag)return e;const s=[n.children];let i;for(;i=s.pop();)for(let t=0,n=i.length;t<n;){const n=i[t++];n&&!En(n)&&("LeafNode"===n._tag?ae(n.value)&&(e=r(e,n.value.value,n.key)):s.push(n.children))}return e})),ss="effect/HashSet",is=Symbol.for(ss),as={[is]:is,[Symbol.iterator](){return zn(this._keyMap)},[$](){return B(this,L(R(this._keyMap))(R(ss)))},[V](t){return!!cs(t)&&Kn(this._keyMap)===Kn(t._keyMap)&&W(this._keyMap,t._keyMap)},toString(){return Q(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(K)}},[z](){return this.toJSON()},pipe(){return it(this,arguments)}},os=t=>{const e=Object.create(as);return e._keyMap=t,e},cs=t=>y(t,is),us=os(qn()),fs=()=>us,ls=t(2,((t,e)=>Hn(t._keyMap,e))),hs=t=>os(Qn(t._keyMap)),bs=t=>(t._keyMap._editable=!1,t),ds=t(2,((t,e)=>{const r=hs(t);return e(r),bs(r)})),ps=t(2,((t,e)=>t._keyMap._editable?(Yn(e,!0)(t._keyMap),t):os(Yn(e,!0)(t._keyMap)))),Ss=t(2,((t,e)=>t._keyMap._editable?(ts(e)(t._keyMap),t):os(ts(e)(t._keyMap)))),gs=t(2,((t,e)=>ds(t,(t=>{for(const r of e)Ss(t,r)})))),ys=t(2,((t,e)=>ds(fs(),(r=>{_s(t,(t=>ps(r,t)));for(const t of e)ps(r,t)})))),_s=t(2,((t,e)=>rs(t._keyMap,((t,r)=>e(r))))),ms=fs,ws=t=>{const e=hs(fs());for(const r of t)ps(e,r);return bs(e)},Os=(...t)=>{const e=hs(fs());for(const r of t)ps(e,r);return bs(e)},vs=ls,js=t=>Kn(t._keyMap),Es=ps,Cs=Ss,Is=gs,ks=ys,Ns=t(3,((t,e,r)=>ns(t._keyMap,e,((t,e,n)=>r(t,n))))),As=Symbol.for("effect/MutableRef"),Ms={[As]:As,toString(){return Q(this.toJSON())},toJSON(){return{_id:"MutableRef",current:K(this.current)}},[z](){return this.toJSON()},pipe(){return it(this,arguments)}},Fs=t=>{const e=Object.create(Ms);return e.current=t,e},$s=t(3,((t,e,r)=>!!W(e,t.current)&&(t.current=r,!0))),Rs=t=>t.current,xs=t(2,((t,e)=>(t.current=e,t))),Ls="effect/FiberId",Ts=Symbol.for(Ls),Js="None",Ds="Runtime",Ps="Composite",Us=P(`${Ls}-${Js}`);let qs=class{[Ts]=Ts;_tag=Js;id=-1;startTimeMillis=-1;[$](){return Us}[V](t){return Hs(t)&&t._tag===Js}toString(){return Q(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag}}[z](){return this.toJSON()}};class Bs{id;startTimeMillis;[Ts]=Ts;_tag=Ds;constructor(t,e){this.id=t,this.startTimeMillis=e}[$](){return B(this,P(`${Ls}-${this._tag}-${this.id}-${this.startTimeMillis}`))}[V](t){return Hs(t)&&t._tag===Ds&&this.id===t.id&&this.startTimeMillis===t.startTimeMillis}toString(){return Q(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,id:this.id,startTimeMillis:this.startTimeMillis}}[z](){return this.toJSON()}}class Vs{left;right;[Ts]=Ts;_tag=Ps;constructor(t,e){this.left=t,this.right=e}_hash;[$](){return o(P(`${Ls}-${this._tag}`),L(R(this.left)),L(R(this.right)),B(this))}[V](t){return Hs(t)&&t._tag===Ps&&W(this.left,t.left)&&W(this.right,t.right)}toString(){return Q(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,left:K(this.left),right:K(this.right)}}[z](){return this.toJSON()}}const Ws=new qs,Hs=t=>y(t,Ts),Ys=t(2,((t,e)=>t._tag===Js?e:e._tag===Js?t:new Vs(t,e))),Gs=t=>{switch(t._tag){case Js:return ms();case Ds:return Os(t.id);case Ps:return o(Gs(t.left),ks(Gs(t.right)))}},zs=h(Symbol.for("effect/Fiber/Id/_fiberCounter"),(()=>Fs(0))),Ks=t=>Array.from(Gs(t)).map((t=>`#${t}`)).join(","),Qs=Ws,Xs=Ys,Zs=t=>o(t,Ns(Ws,((t,e)=>Ys(e)(t)))),ti=Ks,ei=()=>{const t=Rs(zs);return o(zs,xs(t+1)),new Bs(t,Date.now())},ri=qn,ni=t=>{const e=Qn(qn());for(const r of t)Yn(e,r[0],r[1]);return(r=e)._editable=!1,r;var r},si=t=>t&&En(t._root),ii=Vn,ai=Yn,oi=zn,ci=Xn,ui=es,fi=ns,li=Symbol.for("effect/List"),hi=t=>me(t),bi=(()=>u(tr(W),hi))(),di={[li]:li,_tag:"Cons",toString(){return Q(this.toJSON())},toJSON(){return{_id:"List",_tag:"Cons",values:hi(this).map(K)}},[z](){return this.toJSON()},[V](t){return _i(t)&&this._tag===t._tag&&bi(this,t)},[$](){return B(this,q(hi(this)))},[Symbol.iterator](){let t=!1,e=this;return{next(){if(t)return this.return();if("Nil"===e._tag)return t=!0,this.return();const r=e.head;return e=e.tail,{done:t,value:r}},return:e=>(t||(t=!0),{done:!0,value:e})}},pipe(){return it(this,arguments)}},pi=(t,e)=>{const r=Object.create(di);return r.head=t,r.tail=e,r},Si=P("Nil"),gi={[li]:li,_tag:"Nil",toString(){return Q(this.toJSON())},toJSON:()=>({_id:"List",_tag:"Nil"}),[z](){return this.toJSON()},[$]:()=>Si,[V](t){return _i(t)&&this._tag===t._tag},[Symbol.iterator]:()=>({next:()=>({done:!0,value:void 0})}),pipe(){return it(this,arguments)}},yi=Object.create(gi),_i=t=>y(t,li),mi=t=>"Nil"===t._tag,wi=t=>"Cons"===t._tag,Oi=(t,e)=>pi(t,e),vi=()=>yi,ji=t=>pi(t,yi),Ei=t(2,((t,e)=>Ii(e,t))),Ci=t(2,((t,e)=>Oi(e,t))),Ii=t(2,((t,e)=>{if(mi(t))return e;if(mi(e))return t;{const r=pi(e.head,t);let n=r,s=e.tail;for(;!mi(s);){const e=pi(s.head,t);n.tail=e,n=e,s=s.tail}return r}})),ki=t(3,((t,e,r)=>{let n=e,s=t;for(;!mi(s);)n=r(n,s.head),s=s.tail;return n})),Ni=t=>{let e=vi(),r=t;for(;!mi(r);)e=Ci(e,r.head),r=r.tail;return e},Ai=function(){function t(t){t&&Object.assign(this,t)}return t.prototype=kt,t}(),Mi=Symbol.for("effect/DifferContextPatch");function Fi(t){return t}const $i={...Ai.prototype,[Mi]:{_Value:Fi,_Patch:Fi}},Ri=Object.create(Object.assign(Object.create($i),{_tag:"Empty"})),xi=()=>Ri,Li=Object.assign(Object.create($i),{_tag:"AndThen"}),Ti=Object.assign(Object.create($i),{_tag:"AddService"}),Ji=(t,e)=>{const r=Object.create(Ti);return r.key=t,r.service=e,r},Di=Object.assign(Object.create($i),{_tag:"RemoveService"}),Pi=t=>{const e=Object.create(Di);return e.key=t,e},Ui=Object.assign(Object.create($i),{_tag:"UpdateService"}),qi=(t,e)=>{const r=Object.create(Ui);return r.key=t,r.update=e,r},Bi=t(2,((t,e)=>((t,e)=>{const r=Object.create(Li);return r.first=t,r.second=e,r})(t,e))),Vi=t(2,((t,e)=>{if("Empty"===t._tag)return e;let r=!1,n=qr(t);const s=new Map(e.unsafeMap);for(;an(n);){const t=un(n),e=bn(n);switch(t._tag){case"Empty":n=e;break;case"AddService":s.set(t.key,t.service),n=e;break;case"AndThen":n=Xr(Xr(e,t.second),t.first);break;case"RemoveService":s.delete(t.key),n=e;break;case"UpdateService":s.set(t.key,t.update(s.get(t.key))),r=!0,n=e}}if(!r)return lr(s);const i=new Map;for(const[t]of e.unsafeMap)s.has(t)&&(i.set(t,s.get(t)),s.delete(t));for(const[t,e]of s)i.set(t,e);return lr(i)})),Wi=Symbol.for("effect/DifferHashSetPatch");function Hi(t){return t}const Yi={...Ai.prototype,[Wi]:{_Value:Hi,_Key:Hi,_Patch:Hi}},Gi=Object.create(Object.assign(Object.create(Yi),{_tag:"Empty"})),zi=()=>Gi,Ki=Object.assign(Object.create(Yi),{_tag:"AndThen"}),Qi=Object.assign(Object.create(Yi),{_tag:"Add"}),Xi=t=>{const e=Object.create(Qi);return e.value=t,e},Zi=Object.assign(Object.create(Yi),{_tag:"Remove"}),ta=t(2,((t,e)=>((t,e)=>{const r=Object.create(Ki);return r.first=t,r.second=e,r})(t,e))),ea=t(2,((t,e)=>{if("Empty"===t._tag)return e;let r=e,n=qr(t);for(;an(n);){const t=un(n),e=bn(n);switch(t._tag){case"Empty":n=e;break;case"AndThen":n=Xr(t.first)(Xr(t.second)(e));break;case"Add":r=Es(t.value)(r),n=e;break;case"Remove":r=Cs(t.value)(r),n=e}}return r})),ra=Symbol.for("effect/DifferReadonlyArrayPatch");function na(t){return t}const sa={...Ai.prototype,[ra]:{_Value:na,_Patch:na}},ia=Object.create(Object.assign(Object.create(sa),{_tag:"Empty"})),aa=()=>ia,oa=Object.assign(Object.create(sa),{_tag:"AndThen"}),ca=Object.assign(Object.create(sa),{_tag:"Append"}),ua=Object.assign(Object.create(sa),{_tag:"Slice"}),fa=Object.assign(Object.create(sa),{_tag:"Update"}),la=(t,e)=>{const r=Object.create(fa);return r.index=t,r.patch=e,r},ha=t(2,((t,e)=>((t,e)=>{const r=Object.create(oa);return r.first=t,r.second=e,r})(t,e))),ba=t(3,((t,e,r)=>{if("Empty"===t._tag)return e;let n=e.slice(),s=Ye(t);for(;je(s);){const t=Ae(s),e=$e(s);switch(t._tag){case"Empty":s=e;break;case"AndThen":e.unshift(t.first,t.second),s=e;break;case"Append":for(const e of t.values)n.push(e);s=e;break;case"Slice":n=n.slice(t.from,t.until),s=e;break;case"Update":n[t.index]=r.patch(t.patch,n[t.index]),s=e}}return n})),da=Symbol.for("effect/Differ"),pa={[da]:{_P:e,_V:e},pipe(){return it(this,arguments)}},Sa=t=>{const e=Object.create(pa);return e.empty=t.empty,e.diff=t.diff,e.combine=t.combine,e.patch=t.patch,e},ga=()=>ya(((t,e)=>e)),ya=t=>Sa({empty:e,combine:(t,r)=>t===e?r:r===e?t:e=>r(t(e)),diff:(t,n)=>W(t,n)?e:r(n),patch:(e,r)=>t(r,e(r))}),_a=255,ma=t=>t&_a,wa=t=>t>>8&_a,Oa=(t,e)=>(t&_a)+((e&t&_a)<<8),va=Oa(0,0),ja=t(2,((t,e)=>Oa(ma(t)&~e,wa(t)))),Ea=t(2,((t,e)=>t|e)),Ca=1,Ia=2,ka=4,Na=16,Aa=32,Ma=t=>xa(t,32),Fa=t(2,((t,e)=>t|e)),$a=t=>Ra(t)&&!Da(t),Ra=t=>xa(t,1),xa=t(2,((t,e)=>!!(t&e))),La=(...t)=>t.reduce(((t,e)=>t|e),0),Ta=La(0),Ja=t=>xa(t,4),Da=t=>xa(t,16),Pa=t(2,((t,e)=>Oa(t^e,e))),Ua=t(2,((t,e)=>t&(~ma(e)>>>0&_a|wa(e))|ma(e)&wa(e))),qa=Sa({empty:va,diff:(t,e)=>Pa(t,e),combine:(t,e)=>Ea(e)(t),patch:(t,e)=>Ua(e,t)}),Ba=t=>Oa(t,0),Va=ja,Wa="Die",Ha="Empty",Ya="Fail",Ga="Interrupt",za="Parallel",Ka="Sequential",Qa="effect/Cause",Xa=Symbol.for(Qa),Za={[Xa]:{_E:t=>t},[$](){return o(R(Qa),L(R(mo(this))),B(this))},[V](t){return ao(t)&&_o(this,t)},pipe(){return it(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:K(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:K(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:K(this.left),right:K(this.right)}}},toString(){return Ao(this)},[z](){return this.toJSON()}},to=(()=>{const t=Object.create(Za);return t._tag=Ha,t})(),eo=t=>{const e=Object.create(Za);return e._tag=Ya,e.error=t,e},ro=t=>{const e=Object.create(Za);return e._tag=Wa,e.defect=t,e},no=t=>{const e=Object.create(Za);return e._tag=Ga,e.fiberId=t,e},so=(t,e)=>{const r=Object.create(Za);return r._tag=za,r.left=t,r.right=e,r},io=(t,e)=>{const r=Object.create(Za);return r._tag=Ka,r.left=t,r.right=e,r},ao=t=>y(t,Xa),oo=t=>t._tag===Wa,co=t=>t._tag===Ha||ko(t,!0,((t,e)=>{switch(e._tag){case Ha:return se(t);case Wa:case Ya:case Ga:return se(!1);default:return ne()}})),uo=t=>ae(po(t)),fo=t=>No(void 0,jo)(t),lo=t=>ko(t,ms(),((t,e)=>e._tag===Ga?se(o(t,Es(e.fiberId))):ne())),ho=t=>{const e=(t=>Oo(t,(t=>t._tag===Ya?se(t.error):ne())))(t);switch(e._tag){case"None":return zt(t);case"Some":return Kt(e.value)}},bo=t=>Io(t,{onEmpty:se(to),onFail:be(eo),onDie:t=>se(ro(t)),onInterrupt:t=>se(no(t)),onSequential:Se(io),onParallel:Se(so)}),po=t=>Oo(t,(t=>t._tag===Ga?se(t.fiberId):ne())),So=t=>Io(t,{onEmpty:to,onFail:()=>to,onDie:ro,onInterrupt:no,onSequential:io,onParallel:so}),go=t(2,((t,e)=>yo(t,(t=>eo(e(t)))))),yo=t(2,((t,e)=>Io(t,{onEmpty:to,onFail:t=>e(t),onDie:t=>ro(t),onInterrupt:t=>no(t),onSequential:(t,e)=>io(t,e),onParallel:(t,e)=>so(t,e)}))),_o=(t,e)=>{let r=qr(t),n=qr(e);for(;an(r)&&an(n);){const[t,e]=o(un(r),ko([ms(),Pr()],(([t,e],r)=>{const[n,s]=vo(r);return se([o(t,ks(n)),o(e,en(s))])}))),[s,i]=o(un(n),ko([ms(),Pr()],(([t,e],r)=>{const[n,s]=vo(r);return se([o(t,ks(n)),o(e,en(s))])})));if(!W(t,s))return!1;r=e,n=i}return!0},mo=t=>wo(qr(t),Pr()),wo=(t,e)=>{for(;;){const[r,n]=o(t,Xe([ms(),Pr()],(([t,e],r)=>{const[n,s]=vo(r);return[o(t,ks(n)),o(e,en(s))]}))),s=js(r)>0?o(e,Xr(r)):e;if(sn(n))return Hr(s);t=n,e=s}throw new Error(O("Cause.flattenCauseLoop"))},Oo=t(2,((t,e)=>{const r=[t];for(;r.length>0;){const t=r.pop(),n=e(t);switch(n._tag){case"None":switch(t._tag){case Ka:case za:r.push(t.right),r.push(t.left)}break;case"Some":return n}}return ne()})),vo=t=>{let e=t;const r=[];let n=ms(),s=Pr();for(;void 0!==e;)switch(e._tag){case Ha:if(0===r.length)return[n,s];e=r.pop();break;case Ya:if(n=Es(n,Ur(e._tag,e.error)),0===r.length)return[n,s];e=r.pop();break;case Wa:if(n=Es(n,Ur(e._tag,e.defect)),0===r.length)return[n,s];e=r.pop();break;case Ga:if(n=Es(n,Ur(e._tag,e.fiberId)),0===r.length)return[n,s];e=r.pop();break;case Ka:switch(e.left._tag){case Ha:e=e.right;break;case Ka:e=io(e.left.left,io(e.left.right,e.right));break;case za:e=so(io(e.left.left,e.right),io(e.left.right,e.right));break;default:s=Xr(s,e.right),e=e.left}break;case za:r.push(e.right),e=e.left}throw new Error(O("Cause.evaluateCauseLoop"))},jo={emptyCase:n,failCase:s,dieCase:s,interruptCase:n,sequentialCase:(t,e,r)=>e&&r,parallelCase:(t,e,r)=>e&&r},Eo="SequentialCase",Co="ParallelCase",Io=t(2,((t,{onDie:e,onEmpty:r,onFail:n,onInterrupt:s,onParallel:i,onSequential:a})=>No(t,void 0,{emptyCase:()=>r,failCase:(t,e)=>n(e),dieCase:(t,r)=>e(r),interruptCase:(t,e)=>s(e),sequentialCase:(t,e,r)=>a(e,r),parallelCase:(t,e,r)=>i(e,r)}))),ko=t(3,((t,e,r)=>{let n=e,s=t;const i=[];for(;void 0!==s;){const t=r(n,s);switch(n=ae(t)?t.value:n,s._tag){case Ka:case za:i.push(s.right),s=s.left;break;default:s=void 0}void 0===s&&i.length>0&&(s=i.pop())}return n})),No=t(3,((t,e,r)=>{const n=[t],s=[];for(;n.length>0;){const t=n.pop();switch(t._tag){case Ha:s.push(zt(r.emptyCase(e)));break;case Ya:s.push(zt(r.failCase(e,t.error)));break;case Wa:s.push(zt(r.dieCase(e,t.defect)));break;case Ga:s.push(zt(r.interruptCase(e,t.fiberId)));break;case Ka:n.push(t.right),n.push(t.left),s.push(Kt({_tag:Eo}));break;case za:n.push(t.right),n.push(t.left),s.push(Kt({_tag:Co}))}}const i=[];for(;s.length>0;){const t=s.pop();switch(t._tag){case"Left":switch(t.left._tag){case Eo:{const t=i.pop(),n=i.pop(),s=r.sequentialCase(e,t,n);i.push(s);break}case Co:{const t=i.pop(),n=i.pop(),s=r.parallelCase(e,t,n);i.push(s);break}}break;case"Right":i.push(t.right)}}if(0===i.length)throw new Error("BUG: Cause.reduceWithContext - please report an issue at https://github.com/Effect-TS/effect/issues");return i.pop()})),Ao=(t,e)=>fo(t)?"All fibers interrupted without errors.":Jo(t).map((function(t){return!0!==e?.renderErrorCause||void 0===t.cause?t.stack:`${t.stack} {\n${Mo(t.cause," ")}\n}`})).join("\n"),Mo=(t,e)=>{const r=t.stack.split("\n");let n=`${e}[cause]: ${r[0]}`;for(let t=1,s=r.length;t<s;t++)n+=`\n${e}${r[t]}`;return t.cause&&(n+=` {\n${Mo(t.cause,`${e} `)}\n${e}}`),n},Fo=t=>{const e="object"==typeof t&&null!==t,r=Error.stackTraceLimit;Error.stackTraceLimit=1;const n=new Error($o(t),e&&"cause"in t&&void 0!==t.cause?{cause:Fo(t.cause)}:void 0);return Error.stackTraceLimit=r,""===n.message&&(n.message="An error has occurred"),Error.stackTraceLimit=r,n.name=t instanceof Error?t.name:"Error",e&&(To in t&&(n.span=t[To]),Object.keys(t).forEach((e=>{e in n||(n[e]=t[e])}))),n.stack=Lo(`${n.name}: ${n.message}`,t instanceof Error&&t.stack?t.stack:"",n.span),n},$o=t=>{if("string"==typeof t)return t;if("object"==typeof t&&null!==t&&t instanceof Error)return t.message;try{if(y(t,"toString")&&S(t.toString)&&t.toString!==Object.prototype.toString&&t.toString!==globalThis.Array.prototype.toString)return t.toString()}catch{}return Z(t)},Ro=/\((.*)\)/g,xo=h("effect/Tracer/spanToTrace",(()=>new WeakMap)),Lo=(t,e,r)=>{const n=[t],s=e.startsWith(t)?e.slice(t.length).split("\n"):e.split("\n");for(let t=1;t<s.length;t++)if(s[t].includes(" at new BaseEffectError")||s[t].includes(" at new YieldableError"))t++;else{if(s[t].includes("Generator.next"))break;if(s[t].includes("effect_internal_function"))break;n.push(s[t].replace(/at .*effect_instruction_i.*\((.*)\)/,"at $1").replace(/EffectPrimitive\.\w+/,"<anonymous>"))}if(r){let t=r,e=0;for(;t&&"Span"===t._tag&&e<10;){const r=xo.get(t);if("function"==typeof r){const e=r();if("string"==typeof e){const r=e.matchAll(Ro);let s=!1;for(const[,e]of r)s=!0,n.push(` at ${t.name} (${e})`);s||n.push(` at ${t.name} (${e.replace(/^at /,"")})`)}else n.push(` at ${t.name}`)}else n.push(` at ${t.name}`);t=he(t.parent),e++}}return n.join("\n")},To=Symbol.for("effect/SpanAnnotation"),Jo=t=>No(t,void 0,{emptyCase:()=>[],dieCase:(t,e)=>[Fo(e)],failCase:(t,e)=>[Fo(e)],interruptCase:()=>[],parallelCase:(t,e,r)=>[...e,...r],sequentialCase:(t,e,r)=>[...e,...r]}),Do="Pending",Po="Done",Uo=Symbol.for("effect/Deferred"),qo={_E:t=>t,_A:t=>t},Bo=t=>({_tag:Po,effect:t});class Vo{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new Vo(this.self)}}const Wo=(t,e)=>{const r=new zo("Blocked");return r.effect_instruction_i0=t,r.effect_instruction_i1=e,r},Ho=t=>{const e=new zo("RunBlocked");return e.effect_instruction_i0=t,e},Yo=Symbol.for("effect/Effect");class Go{patch;op;_op=mt;constructor(t,e){this.patch=t,this.op=e}}class zo{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[Yo]=Ct;constructor(t){this._op=t}[V](t){return this===t}[$](){return B(this,x(this))}pipe(){return it(this,arguments)}toJSON(){return{_id:"Effect",_op:this._op,effect_instruction_i0:K(this.effect_instruction_i0),effect_instruction_i1:K(this.effect_instruction_i1),effect_instruction_i2:K(this.effect_instruction_i2)}}toString(){return Q(this.toJSON())}[z](){return this.toJSON()}[Symbol.iterator](){return new Vo(new I(this))}}class Ko{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[Yo]=Ct;constructor(t){this._op=t,this._tag=t}[V](t){return af(t)&&"Failure"===t._op&&W(this.effect_instruction_i0,t.effect_instruction_i0)}[$](){return o(P(this._tag),L(R(this.effect_instruction_i0)),B(this))}get cause(){return this.effect_instruction_i0}pipe(){return it(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,cause:this.cause.toJSON()}}toString(){return Q(this.toJSON())}[z](){return this.toJSON()}[Symbol.iterator](){return new Vo(new I(this))}}class Qo{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[Yo]=Ct;constructor(t){this._op=t,this._tag=t}[V](t){return af(t)&&"Success"===t._op&&W(this.effect_instruction_i0,t.effect_instruction_i0)}[$](){return o(P(this._tag),L(R(this.effect_instruction_i0)),B(this))}get value(){return this.effect_instruction_i0}pipe(){return it(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,value:K(this.value)}}toString(){return Q(this.toJSON())}[z](){return this.toJSON()}[Symbol.iterator](){return new Vo(new I(this))}}const Xo=t=>y(t,Yo),Zo=t=>{const e=new zo(yt);return e.effect_instruction_i0=t,e},tc=t(3,((t,e,r)=>Hc((n=>wc(t,(t=>wc(dc(Uc((()=>n(e(t))))),(e=>Uc((()=>r(t,e))).pipe(Ec({onFailure:t=>{switch(e._tag){case ct:return gc(io(e.effect_instruction_i0,t));case ht:return gc(t)}},onSuccess:()=>e})))))))))),ec=t(2,((t,e)=>wc(t,(()=>Pc(e))))),rc=t=>ec(t,void 0),nc=function(){const t=new zo(ot);switch(arguments.length){case 2:t.effect_instruction_i0=arguments[0],t.commit=arguments[1];break;case 3:t.effect_instruction_i0=arguments[0],t.effect_instruction_i1=arguments[1],t.commit=arguments[2];break;case 4:t.effect_instruction_i0=arguments[0],t.effect_instruction_i1=arguments[1],t.effect_instruction_i2=arguments[2],t.commit=arguments[3];break;default:throw new Error(O("you're not supposed to end up here"))}return t},sc=(t,e=Qs)=>{const r=new zo(at);let n;return r.effect_instruction_i0=e=>{n=t(e)},r.effect_instruction_i1=e,Tc(r,(()=>Xo(n)?n:Yc))},ic=(t,e=Qs)=>Uc((()=>sc(t,e))),ac=(t,e=Qs)=>nc(t,(function(){let t,r;function n(e){t?t(e):void 0===r&&(r=e)}const s=new zo(at);let i,a;return s.effect_instruction_i0=e=>{t=e,r&&e(r)},s.effect_instruction_i1=e,1!==this.effect_instruction_i0.length?(a=new AbortController,i=M((()=>this.effect_instruction_i0(n,a.signal)))):i=M((()=>this.effect_instruction_i0(n))),i||a?Tc(s,(()=>(a&&a.abort(),i??Yc))):s})),oc=t(2,((t,e)=>{const r=new zo(ut);return r.effect_instruction_i0=t,r.effect_instruction_i1=e,r})),cc=t(2,((t,e)=>Cc(t,{onFailure:e,onSuccess:Pc}))),uc=Symbol.for("effect/OriginalAnnotation"),fc=(t,e)=>ae(e)?new Proxy(t,{has:(t,e)=>e===To||e===uc||e in t,get:(r,n)=>n===To?e.value:n===uc?t:r[n]}):t,lc=t=>g(t)&&!(To in t)?Zo((e=>gc(ro(fc(t,qf(e)))))):gc(ro(t)),hc=t=>yc((()=>ro(new Xu(t)))),bc=t=>Cc(t,{onFailure:t=>Pc(Kt(t)),onSuccess:t=>Pc(zt(t))}),dc=t=>jc(t,{onFailure:df,onSuccess:_f}),pc=t=>g(t)&&!(To in t)?Zo((e=>gc(eo(fc(t,qf(e)))))):gc(eo(t)),Sc=t=>wc(qc(t),pc),gc=t=>{const e=new Ko(ct);return e.effect_instruction_i0=t,e},yc=t=>wc(qc(t),gc),_c=Zo((t=>Pc(t.id()))),mc=t=>Zo((e=>t(e.id()))),wc=t(2,((t,e)=>{const r=new zo(ft);return r.effect_instruction_i0=t,r.effect_instruction_i1=e,r})),Oc=t=>{const e=new zo("OnStep");return e.effect_instruction_i0=t,e},vc=t=>wc(t,e),jc=t(2,((t,e)=>Ec(t,{onFailure:t=>Pc(e.onFailure(t)),onSuccess:t=>Pc(e.onSuccess(t))}))),Ec=t(2,((t,e)=>{const r=new zo(lt);return r.effect_instruction_i0=t,r.effect_instruction_i1=e.onFailure,r.effect_instruction_i2=e.onSuccess,r})),Cc=t(2,((t,e)=>Ec(t,{onFailure:t=>{const r=(t=>Hr(ko(t,Pr(),((t,e)=>e._tag===Wa?se(o(t,Xr(e.defect))):ne()))))(t);if(r.length>0)return gc((t=>Io(t,{onEmpty:to,onFail:ro,onDie:ro,onInterrupt:no,onSequential:io,onParallel:so}))(t));const n=(t=>Hr(ko(t,Pr(),((t,e)=>e._tag===Ya?se(o(t,Xr(e.error))):ne()))))(t);return n.length>0?e.onFailure(cn(n)):gc(t)},onSuccess:e.onSuccess}))),Ic=t(2,((t,e)=>Uc((()=>{const r=me(t),n=ye(r.length);let s=0;return ec(Kc({while:()=>s<r.length,body:()=>e(r[s],s),step:t=>{n[s++]=t}}),n)})))),kc=t(2,((t,e)=>Uc((()=>{const r=me(t);let n=0;return Kc({while:()=>n<r.length,body:()=>e(r[n],n),step:()=>{n++}})})))),Nc=wc(_c,(t=>Ac(t))),Ac=t=>gc(no(t)),Mc=t=>{const e=new zo(pt);return e.effect_instruction_i0=Oa(r=1,r),e.effect_instruction_i1=()=>t,e;var r},Fc=t(2,((t,e)=>Hc((r=>wc(dc(r(t)),(t=>Af(e,t))))))),$c=t(2,((t,e)=>wc(t,(t=>qc((()=>e(t))))))),Rc=t(2,((t,e)=>Cc(t,{onFailure:t=>Sc((()=>e.onFailure(t))),onSuccess:t=>qc((()=>e.onSuccess(t)))}))),xc=t(2,((t,e)=>Ec(t,{onFailure:t=>{const r=ho(t);switch(r._tag){case"Left":return Sc((()=>e(r.left)));case"Right":return gc(r.right)}},onSuccess:Pc}))),Lc=t(2,((t,e)=>Hc((r=>Ec(r(t),{onFailure:t=>{const r=df(t);return Ec(e(r),{onFailure:e=>df(io(t,e)),onSuccess:()=>r})},onSuccess:t=>{const r=_f(t);return nu(e(r),r)}}))))),Tc=t(2,((t,e)=>Lc(t,gf({onFailure:t=>fo(t)?rc(e(lo(t))):Yc,onSuccess:()=>Yc})))),Jc=t=>Dc(t,e),Dc=t(2,((t,e)=>Cc(t,{onFailure:t=>lc(e(t)),onSuccess:Pc}))),Pc=t=>{const e=new Qo(ht);return e.effect_instruction_i0=t,e},Uc=t=>{const e=new zo(ot);return e.commit=t,e},qc=t=>{const e=new zo(bt);return e.effect_instruction_i0=t,e},Bc=t((t=>3===t.length||2===t.length&&!(g(t[1])&&"onlyEffect"in t[1])),((t,e)=>wc(t,(t=>{const r="function"==typeof e?e(t):e;return Xo(r)?ec(r,t):y(n=r,"then")&&S(n.then)?sc((e=>{r.then((()=>e(Pc(t))),(t=>e(pc(new sf(t,"An unknown error occurred in Effect.tap")))))})):Pc(t);var n})))),Vc=t=>Zo((e=>{const r=o(e.getFiberRef(Uu),ue((()=>e.scope())));return t(wu(Uu,se(r)))})),Wc=t=>{const e=new zo(pt);return e.effect_instruction_i0=Ba(1),e.effect_instruction_i1=()=>t,e},Hc=t=>nc(t,(function(){const t=new zo(pt);return t.effect_instruction_i0=Ba(1),t.effect_instruction_i1=t=>Ra(t)?M((()=>this.effect_instruction_i0(Mc))):M((()=>this.effect_instruction_i0(Wc))),t})),Yc=Pc(void 0),Gc=t=>{const e=new zo(pt);return e.effect_instruction_i0=t,e.effect_instruction_i1=void 0,e},zc=t(2,((t,e)=>wc(e,(e=>e?o(t,$c(se)):Pc(ne()))))),Kc=t=>{const e=new zo(St);return e.effect_instruction_i0=t.while,e.effect_instruction_i1=t.body,e.effect_instruction_i2=t.step,e},Qc=t=>Uc((()=>{const e=new zo(gt);return e.effect_instruction_i0=t(),e})),Xc=function(){const t=1===arguments.length?arguments[0]:arguments[1].bind(arguments[0]);return Qc((()=>t(o)))},Zc=(t,...e)=>Object.defineProperty(0===e.length?function(...e){return Qc((()=>t.apply(this,e)))}:function(...r){let n=Qc((()=>t.apply(this,r)));for(const t of e)n=t(n,...r);return n},"length",{value:t.length,configurable:!0}),tu=t=>{const e=new zo(_t);return void 0!==t?.priority?xu(e,t.priority):e},eu=t(2,((t,e)=>wc(t,(t=>$c(e,(e=>[t,e])))))),ru=t(2,((t,e)=>wc(t,(t=>ec(e,t))))),nu=t(2,((t,e)=>wc(t,(()=>e)))),su=t(3,((t,e,r)=>wc(t,(t=>$c(e,(e=>r(t,e))))))),iu=t=>wc(_c,(e=>o(t,au(e)))),au=t(2,((t,e)=>wc(t.interruptAsFork(e),(()=>t.await)))),ou={_tag:"All",syslog:0,label:"ALL",ordinal:Number.MIN_SAFE_INTEGER,pipe(){return it(this,arguments)}},cu={_tag:"Fatal",syslog:2,label:"FATAL",ordinal:5e4,pipe(){return it(this,arguments)}},uu={_tag:"Error",syslog:3,label:"ERROR",ordinal:4e4,pipe(){return it(this,arguments)}},fu={_tag:"Warning",syslog:4,label:"WARN",ordinal:3e4,pipe(){return it(this,arguments)}},lu={_tag:"Info",syslog:6,label:"INFO",ordinal:2e4,pipe(){return it(this,arguments)}},hu={_tag:"Debug",syslog:7,label:"DEBUG",ordinal:1e4,pipe(){return it(this,arguments)}},bu={_tag:"Trace",syslog:7,label:"TRACE",ordinal:0,pipe(){return it(this,arguments)}},du={_tag:"None",syslog:7,label:"OFF",ordinal:Number.MAX_SAFE_INTEGER,pipe(){return it(this,arguments)}},pu=Symbol.for("effect/FiberRef"),Su={_A:t=>t},gu=t=>Zo((e=>_f(e.getFiberRef(t)))),yu=t(2,((t,e)=>wc(gu(t),e))),_u=t(2,((t,e)=>mu(t,(()=>[void 0,e])))),mu=t(2,((t,e)=>Zo((r=>{const[n,s]=e(r.getFiberRef(t));return r.setFiberRef(t,s),Pc(n)})))),wu=t(3,((t,e,r)=>tc(ru(gu(e),_u(e,r)),(()=>t),(t=>_u(e,t))))),Ou=t(3,((t,e,r)=>yu(e,(n=>wu(t,e,r(n)))))),vu=(t,r)=>Iu(t,{differ:ga(),fork:r?.fork??e,join:r?.join}),ju=t=>{const e=Sa({empty:zi(),combine:(t,e)=>ta(e)(t),diff:(t,e)=>((t,e)=>{const[r,n]=Ns([t,zi()],(([t,e],r)=>vs(r)(t)?[Cs(r)(t),e]:[t,ta(Xi(r))(e)]))(e);return Ns(n,((t,e)=>ta((t=>{const e=Object.create(Zi);return e.value=t,e})(e))(t)))(r)})(t,e),patch:(t,e)=>ea(e)(t)});return Iu(t,{differ:e,fork:e.empty})},Eu=t=>{const e=(t=>Sa({empty:aa(),combine:(t,e)=>ha(t,e),diff:(e,r)=>(t=>{let e=0,r=aa();for(;e<t.oldValue.length&&e<t.newValue.length;){const n=t.differ.diff(t.oldValue[e],t.newValue[e]);W(n,t.differ.empty)||(r=ha(r,la(e,n))),e+=1}return e<t.oldValue.length&&(r=ha(r,((t,e)=>{const r=Object.create(ua);return r.from=0,r.until=e,r})(0,e))),e<t.newValue.length&&(r=ha(r,(t=>{const e=Object.create(ca);return e.values=t,e})(xe(e)(t.newValue)))),r})({oldValue:e,newValue:r,differ:t}),patch:(e,r)=>ba(e,r,t)}))(ga());return Iu(t,{differ:e,fork:e.empty})},Cu=t=>{const e=Sa({empty:xi(),combine:(t,e)=>Bi(e)(t),diff:(t,e)=>((t,e)=>{const r=new Map(t.unsafeMap);let n=xi();for(const[t,s]of e.unsafeMap.entries())if(r.has(t)){const e=r.get(t);r.delete(t),W(e,s)||(n=Bi(qi(t,(()=>s)))(n))}else r.delete(t),n=Bi(Ji(t,s))(n);for(const[t]of r.entries())n=Bi(Pi(t))(n);return n})(t,e),patch:(t,e)=>Vi(e)(t)});return Iu(t,{differ:e,fork:e.empty})},Iu=(t,e)=>{const r={...Nt,[pu]:Su,initial:t,commit(){return gu(this)},diff:(t,r)=>e.differ.diff(t,r),combine:(t,r)=>e.differ.combine(t,r),patch:t=>r=>e.differ.patch(t,r),fork:e.fork,join:e.join??((t,e)=>e)};return r},ku=t=>Iu(t,{differ:qa,fork:qa.empty}),Nu=h(Symbol.for("effect/FiberRef/currentContext"),(()=>Cu(jr()))),Au=h(Symbol.for("effect/FiberRef/currentSchedulingPriority"),(()=>vu(0))),Mu=h(Symbol.for("effect/FiberRef/currentMaxOpsBeforeYield"),(()=>vu(2048))),Fu=h(Symbol.for("effect/FiberRef/currentLogAnnotation"),(()=>vu(ri()))),$u=h(Symbol.for("effect/FiberRef/currentLogLevel"),(()=>vu(lu))),Ru=h(Symbol.for("effect/FiberRef/currentLogSpan"),(()=>vu(vi()))),xu=t(2,((t,e)=>wu(t,Au,e))),Lu=h(Symbol.for("effect/FiberRef/currentConcurrency"),(()=>vu("unbounded"))),Tu=h(Symbol.for("effect/FiberRef/currentRequestBatching"),(()=>vu(!0))),Ju=h(Symbol.for("effect/FiberRef/currentUnhandledErrorLogLevel"),(()=>vu(se(hu)))),Du=h(Symbol.for("effect/FiberRef/versionMismatchErrorLogLevel"),(()=>vu(se(fu)))),Pu=h(Symbol.for("effect/FiberRef/currentMetricLabels"),(()=>Eu([]))),Uu=h(Symbol.for("effect/FiberRef/currentForkScopeOverride"),(()=>vu(ne(),{fork:()=>ne(),join:t=>t}))),qu=h(Symbol.for("effect/FiberRef/currentInterruptedCause"),(()=>vu(to,{fork:()=>to,join:t=>t}))),Bu=Symbol.for("effect/Scope"),Vu=Symbol.for("effect/CloseableScope"),Wu=(t,e)=>t.addFinalizer((()=>rc(e))),Hu=(t,e)=>t.addFinalizer(e),Yu=(t,e)=>t.close(e),Gu=(t,e)=>t.fork(e),zu=function(){class t extends globalThis.Error{commit(){return pc(this)}toJSON(){const t={...this};return this.message&&(t.message=this.message),this.cause&&(t.cause=this.cause),t}[z](){return this.toString!==globalThis.Error.prototype.toString?this.stack?`${this.toString()}\n${this.stack.split("\n").slice(1).join("\n")}`:this.toString():"Bun"in globalThis?Ao(eo(this),{renderErrorCause:!0}):this}}return Object.assign(t.prototype,At),t}(),Ku=(t,e)=>{class r extends zu{_tag=e}return Object.assign(r.prototype,t),r.prototype.name=e,r},Qu=Symbol.for("effect/Cause/errors/RuntimeException"),Xu=Ku({[Qu]:Qu},"RuntimeException"),Zu=Symbol.for("effect/Cause/errors/InterruptedException"),tf=t=>y(t,Zu),ef=Symbol.for("effect/Cause/errors/NoSuchElement"),rf=Ku({[ef]:ef},"NoSuchElementException"),nf=Symbol.for("effect/Cause/errors/UnknownException"),sf=function(){class t extends zu{_tag="UnknownException";error;constructor(t,e){super(e??"An unknown error occurred",{cause:t}),this.error=t}}return Object.assign(t.prototype,{[nf]:nf,name:"UnknownException"}),t}(),af=t=>Xo(t)&&"_tag"in t&&("Success"===t._tag||"Failure"===t._tag),of=t=>"Failure"===t._tag,cf=t=>"Success"===t._tag,uf=t(2,((t,e)=>{switch(t._tag){case ct:return df(t.effect_instruction_i0);case ht:return _f(e)}})),ff=t=>uf(t,void 0),lf=(t,e)=>jf(t,e?.parallel?so:io),hf=t=>df(ro(t)),bf=t=>df(eo(t)),df=t=>{const e=new Ko(ct);return e.effect_instruction_i0=t,e},pf=t=>df(no(t)),Sf=t(2,((t,e)=>{switch(t._tag){case ct:return df(t.effect_instruction_i0);case ht:return _f(e(t.effect_instruction_i0))}})),gf=t(2,((t,{onFailure:e,onSuccess:r})=>{switch(t._tag){case ct:return e(t.effect_instruction_i0);case ht:return r(t.effect_instruction_i0)}})),yf=t(2,((t,{onFailure:e,onSuccess:r})=>{switch(t._tag){case ct:return e(t.effect_instruction_i0);case ht:return r(t.effect_instruction_i0)}})),_f=t=>{const e=new Qo(ht);return e.effect_instruction_i0=t,e},mf=_f(void 0),wf=t(2,((t,e)=>vf(t,e,{onSuccess:(t,e)=>[t,e],onFailure:io}))),Of=t(2,((t,e)=>vf(t,e,{onSuccess:(t,e)=>e,onFailure:io}))),vf=t(3,((t,e,{onFailure:r,onSuccess:n})=>{switch(t._tag){case ct:switch(e._tag){case ht:return df(t.effect_instruction_i0);case ct:return df(r(t.effect_instruction_i0,e.effect_instruction_i0))}case ht:switch(e._tag){case ht:return _f(n(t.effect_instruction_i0,e.effect_instruction_i0));case ct:return df(e.effect_instruction_i0)}}})),jf=(t,e)=>{const r=Br(t);return an(r)?o(bn(r),Xe(o(un(r),Sf(qr)),((t,r)=>o(t,vf(r,{onSuccess:(t,e)=>o(t,Xr(e)),onFailure:e})))),Sf(Hr),Sf((t=>Wr(t))),se):ne()},Ef=t=>{var e;return{...Nt,[Uo]:qo,state:Fs((e=[],{_tag:Do,joiners:e})),commit(){return kf(this)},blockingOn:t}},Cf=()=>wc(_c,(t=>If(t))),If=t=>qc((()=>Ef(t))),kf=t=>ic((e=>{const r=Rs(t.state);switch(r._tag){case Po:return e(r.effect);case Do:return r.joiners.push(e),Lf(t,e)}}),t.blockingOn),Nf=t(2,((t,e)=>qc((()=>{const r=Rs(t.state);switch(r._tag){case Po:return!1;case Do:xs(t.state,Bo(e));for(let t=0,n=r.joiners.length;t<n;t++)r.joiners[t](e);return!0}})))),Af=t(2,((t,e)=>Nf(t,e))),Mf=t(2,((t,e)=>Nf(t,gc(e)))),Ff=t(2,((t,e)=>Nf(t,Ac(e)))),$f=t=>qc((()=>Rs(t.state)._tag===Po)),Rf=t(2,((t,e)=>Nf(t,Pc(e)))),xf=(t,e)=>{const r=Rs(t.state);if(r._tag===Do){xs(t.state,Bo(e));for(let t=0,n=r.joiners.length;t<n;t++)r.joiners[t](e)}},Lf=(t,e)=>qc((()=>{const r=Rs(t.state);if(r._tag===Do){const t=r.joiners.indexOf(e);t>=0&&r.joiners.splice(t,1)}})),Tf=Zo((t=>_f(t.currentContext))),Jf=t=>wc(Tf,t),Df=t(2,((t,e)=>wu(Nu,e)(t))),Pf=t(2,((t,e)=>Ou(Nu,(t=>Ar(t,e)))(t))),Uf=t(2,((t,e)=>Jf((r=>Df(t,e(r)))))),qf=t=>{const e=t.currentSpan;return void 0!==e&&"Span"===e._tag?se(e):ne()},Bf=t=>t.replace(/[\s="]/g,"_"),Vf=t=>e=>`${Bf(e.label)}=${t-e.startTime}ms`,Wf=It,Hf=Mt;class Yf extends Hf{}const Gf=Symbol.for("effect/Micro"),zf=Symbol.for("effect/Micro/MicroExit"),Kf=Symbol.for("effect/Micro/MicroCause"),Qf={_E:e};class Xf extends globalThis.Error{_tag;traces;[Kf];constructor(t,e,r){const n=`MicroCause.${t}`;let s,i,a;if(e instanceof globalThis.Error){s=`(${n}) ${e.name}`,i=e.message;const t=i.split("\n").length;a=e.stack?`(${n}) ${e.stack.split("\n").slice(0,t+3).join("\n")}`:`${s}: ${i}`}else s=n,i=X(e,0),a=`${s}: ${i}`;r.length>0&&(a+=`\n ${r.join("\n ")}`),super(i),this._tag=t,this.traces=r,this[Kf]=Qf,this.name=s,this.stack=a}pipe(){return it(this,arguments)}toString(){return this.stack}[z](){return this.stack}}class Zf extends Xf{error;constructor(t,e=[]){super("Fail",t,e),this.error=t}}class tl extends Xf{defect;constructor(t,e=[]){super("Die",t,e),this.defect=t}}class el extends Xf{constructor(t=[]){super("Interrupt","interrupted",t)}}const rl=(t=[])=>new el(t),nl=Symbol.for("effect/Micro/MicroFiber"),sl={_A:e,_E:e};class il{context;interruptible;[nl];_stack=[];_observers=[];_exit;_children;currentOpCount=0;constructor(t,e=!0){this.context=t,this.interruptible=e,this[nl]=sl}getRef(t){return(e=this.context).unsafeMap.has((r=t).key)?e.unsafeMap.get(r.key):gr(r);var e,r}addObserver(t){return this._exit?(t(this._exit),a):(this._observers.push(t),()=>{const e=this._observers.indexOf(t);e>=0&&this._observers.splice(e,1)})}_interrupted=!1;unsafeInterrupt(){this._exit||(this._interrupted=!0,this.interruptible&&this.evaluate($l))}unsafePoll(){return this._exit}evaluate(t){if(this._exit)return;if(void 0!==this._yielded){const t=this._yielded;this._yielded=void 0,t()}const e=this.runLoop(t);if(e===bl)return;const r=al.interruptChildren&&al.interruptChildren(this);if(void 0!==r)return this.evaluate(kl(r,(()=>e)));this._exit=e;for(let t=0;t<this._observers.length;t++)this._observers[t](e);this._observers.length=0}runLoop(t){let e=!1,r=t;this.currentOpCount=0;try{for(;;){if(this.currentOpCount++,!e&&this.getRef(Ul).shouldYield(this)){e=!0;const t=r;r=kl(jl,(()=>t))}if(r=r[ul](this),r===bl){const t=this._yielded;return zf in t?(this._yielded=void 0,t):bl}}}catch(t){return y(r,ul)?Rl(t):Rl(`MicroFiber.runLoop: Not a valid effect: ${String(r)}`)}}getCont(t){for(;;){const e=this._stack.pop();if(!e)return;const r=e[hl]&&e[hl](this);if(r)return{[t]:r};if(e[t])return e}}_yielded=void 0;yieldWith(t){return this._yielded=t,bl}children(){return this._children??=new Set}}const al=h("effect/Micro/fiberMiddleware",(()=>({interruptChildren:void 0}))),ol=Symbol.for("effect/Micro/identifier"),cl=Symbol.for("effect/Micro/args"),ul=Symbol.for("effect/Micro/evaluate"),fl=Symbol.for("effect/Micro/successCont"),ll=Symbol.for("effect/Micro/failureCont"),hl=Symbol.for("effect/Micro/ensureCont"),bl=Symbol.for("effect/Micro/Yield"),dl={_A:e,_E:e,_R:e},pl={...Wf,_op:"Micro",[Gf]:dl,pipe(){return it(this,arguments)},[Symbol.iterator](){return new v(new I(this))},toJSON(){return{_id:"Micro",op:this[ol],...cl in this?{args:this[cl]}:void 0}},toString(){return Q(this)},[z](){return Q(this)}};function Sl(){return Rl("Micro.evaluate: Not implemented")}const gl=t=>({...pl,[ol]:t.op,[ul]:t.eval??Sl,[fl]:t.contA,[ll]:t.contE,[hl]:t.ensure}),yl=t=>{const e=gl(t);return function(){const r=Object.create(e);return r[cl]=!1===t.single?arguments:arguments[0],r}},_l=t=>{const e={...gl(t),[zf]:zf,_tag:t.op,get[t.prop](){return this[cl]},toJSON(){return{_id:"MicroExit",_tag:t.op,[t.prop]:this[cl]}},[V](e){return Al(e)&&e._tag===t.op&&W(this[cl],e[cl])},[$](){return B(this,L(P(t.op))(R(this[cl])))}};return function(t){const r=Object.create(e);return r[cl]=t,r[fl]=void 0,r[ll]=void 0,r[hl]=void 0,r}},ml=_l({op:"Success",prop:"value",eval(t){const e=t.getCont(fl);return e?e[fl](this[cl],t):t.yieldWith(this)}}),wl=_l({op:"Failure",prop:"cause",eval(t){let e=t.getCont(ll);for(;"Interrupt"===this[cl]._tag&&e&&t.interruptible;)e=t.getCont(ll);return e?e[ll](this[cl],t):t.yieldWith(this)}}),Ol=t=>wl(((t,e=[])=>new Zf(t,e))(t)),vl=yl({op:"Suspend",eval(t){return this[cl]()}}),jl=yl({op:"Yield",eval(t){let e=!1;return t.getRef(Ul).scheduleTask((()=>{e||t.evaluate(xl)}),this[cl]??0),t.yieldWith((()=>{e=!0}))}})(0),El=ml(void 0),Cl=t=>vl((()=>{try{return ml(t.try())}catch(e){return Ol(t.catch(e))}})),Il=yl({op:"WithMicroFiber",eval(t){return this[cl](t)}}),kl=t(2,((t,e)=>{const r=Object.create(Nl);return r[cl]=t,r[fl]=e,r})),Nl=gl({op:"OnSuccess",eval(t){return t._stack.push(this),this[cl]}}),Al=t=>y(t,zf),Ml=ml,Fl=wl,$l=Fl(rl()),Rl=t=>Fl(((t,e=[])=>new tl(t,e))(t)),xl=Ml(void 0),Ll="setImmediate"in globalThis?globalThis.setImmediate:t=>setTimeout(t,0);class Tl{tasks=[];running=!1;scheduleTask(t,e){this.tasks.push(t),this.running||(this.running=!0,Ll(this.afterScheduled))}afterScheduled=()=>{this.running=!1,this.runTasks()};runTasks(){const t=this.tasks;this.tasks=[];for(let e=0,r=t.length;e<r;e++)t[e]()}shouldYield(t){return t.currentOpCount>=t.getRef(Pl)}flush(){for(;this.tasks.length>0;)this.runTasks()}}const Jl=t(2,((t,e)=>Il((r=>{const n=r.context;return r.context=e(n),Vl(t,(()=>(r.context=n,El)))})))),Dl=t(2,((t,e)=>Jl(t,Ar(e))));class Pl extends(Fr()("effect/Micro/currentMaxOpsBeforeYield",{defaultValue:()=>2048})){}class Ul extends(Fr()("effect/Micro/currentScheduler",{defaultValue:()=>new Tl})){}const ql=t(2,((t,e)=>{const r=Object.create(Bl);return r[cl]=t,r[fl]=e.onSuccess,r[ll]=e.onFailure,r})),Bl=gl({op:"OnSuccessAndFailure",eval(t){return t._stack.push(this),this[cl]}}),Vl=t(2,((t,e)=>Yl((r=>ql(r(t),{onFailure:t=>kl(e(Fl(t)),(()=>wl(t))),onSuccess:t=>kl(e(Ml(t)),(()=>ml(t)))}))))),Wl=yl({op:"SetInterruptible",ensure(t){if(t.interruptible=this[cl],t._interrupted&&t.interruptible)return()=>$l}}),Hl=t=>Il((e=>e.interruptible?t:(e.interruptible=!0,e._stack.push(Wl(!1)),e._interrupted?$l:t))),Yl=t=>Il((r=>r.interruptible?(r.interruptible=!1,r._stack.push(Wl(!0)),t(Hl)):t(e))),Gl=(t,e)=>{const r=new il(Ul.context(e?.scheduler??new Tl));if(r.evaluate(t),e?.signal)if(e.signal.aborted)r.unsafeInterrupt();else{const t=()=>r.unsafeInterrupt();e.signal.addEventListener("abort",t,{once:!0}),r.addObserver((()=>e.signal.removeEventListener("abort",t)))}return r},zl=t=>{const e=(t=>{const e=new Tl,r=Gl(t,{scheduler:e});return e.flush(),r._exit??Rl(r)})(t);if("Failure"===e._tag)throw e.cause;return e.value},Kl=function(){class t extends globalThis.Error{}return Object.assign(t.prototype,pl,kt,{[ol]:"Failure",[ul](){return Ol(this)},toString(){return this.message?`${this.name}: ${this.message}`:this.name},toJSON(){return{...this}},[z](){const t=this.stack;return t?`${this.toString()}\n${t.split("\n").slice(1).join("\n")}`:this.toString()}}),t}(),Ql=function(){return class extends Kl{constructor(t){super(),t&&Object.assign(this,t)}}}(),Xl=t=>{class e extends Ql{_tag=t}return e.prototype.name=t,e},Zl=Symbol.for("effect/Logger"),th={_Message:t=>t,_Output:t=>t},eh=t=>({[Zl]:th,log:t,pipe(){return it(this,arguments)}}),rh=/^[^\s"=]*$/,nh=(t,e)=>({annotations:r,cause:n,date:s,fiberId:i,logLevel:a,message:o,spans:c})=>{const u=(e,r)=>`${Bf(e)}=${(e=>e.match(rh)?e:t(e))(r)}`,f=(t,e)=>" "+u(t,e);let l=u("timestamp",s.toISOString());l+=f("level",a.label),l+=f("fiber",Ks(i));const h=(b=o,Array.isArray(b)?b:[b]);var b;for(let t=0;t<h.length;t++)l+=f("message",X(h[t],e));(t=>t._tag===Ha)(n)||(l+=f("cause",Ao(n,{renderErrorCause:!0})));for(const t of c)l+=" "+Vf(s.getTime())(t);for(const[t,n]of r)l+=f(t,X(n,e));return l},sh=eh(nh((t=>`"${t.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`)));"object"==typeof process&&null!==process&&"object"==typeof process.stdout&&null!==process.stdout&&process;export{bf as $,Oi as A,fi as B,ai as C,ii as D,en as E,si as F,W as G,ci as H,fe as I,be as J,Qr as K,qr as L,ui as M,z as N,oi as O,Pr as P,Cf as Q,kf as R,Rf as S,Xl as T,Mf as U,$f as V,of as W,cf as X,gf as Y,df as Z,_f as _,Xt as a,Cr as a$,Of as a0,lf as a1,mf as a2,hf as a3,Sf as a4,wf as a5,Y as a6,se as a7,ne as a8,ae as a9,eu as aA,$c as aB,Ye as aC,ni as aD,me as aE,Oe as aF,ze as aG,He as aH,Me as aI,ue as aJ,xc as aK,cc as aL,Ze as aM,te as aN,Rc as aO,Te as aP,de as aQ,ke as aR,ws as aS,R as aT,j as aU,kc as aV,ec as aW,Br as aX,Fr as aY,h as aZ,Cu as a_,K as aa,Q as ab,Xr as ac,Hr as ad,Or as ae,qc as af,Pc as ag,ac as ah,s as ai,Yc as aj,rc as ak,o as al,nr as am,wi as an,pe as ao,Ne as ap,$e as aq,we as ar,Ge as as,wc as at,pc as au,Uc as av,bc as aw,Qt as ax,Je as ay,Ic as az,ce as b,Hc as b$,jr as b0,Zo as b1,Ae as b2,Ee as b3,fu as b4,du as b5,bu as b6,lu as b7,cu as b8,uu as b9,Gr as bA,_e as bB,rr as bC,ve as bD,q as bE,le as bF,tr as bG,We as bH,ye as bI,Fe as bJ,Re as bK,ie as bL,he as bM,Bc as bN,Pu as bO,xf as bP,_ as bQ,Sa as bR,Ns as bS,Is as bT,ms as bU,ks as bV,Os as bW,an as bX,un as bY,bn as bZ,Lc as b_,hu as ba,ou as bb,Fs as bc,Yf as bd,Rs as be,xs as bf,P as bg,Cc as bh,Ec as bi,nu as bj,gc as bk,a as bl,Jf as bm,Df as bn,Ir as bo,yc as bp,tu as bq,L as br,vu as bs,Mu as bt,Au as bu,yu as bv,Lu as bw,Qs as bx,ru as by,vc as bz,zl as c,Wo as c$,Vc as c0,Vu as c1,Bu as c2,ff as c3,dc as c4,io as c5,Xo as c6,Uf as c7,Ar as c8,Er as c9,Fu as cA,js as cB,nt as cC,$a as cD,_t as cE,Ma as cF,at as cG,Fa as cH,Ua as cI,ro as cJ,ut as cK,ft as cL,St as cM,gt as cN,dt as cO,kr as cP,rf as cQ,sc as cR,Gl as cS,Dl as cT,lc as cU,bt as cV,M as cW,mt as cX,So as cY,lt as cZ,yt as c_,ct as ca,ht as cb,Xs as cc,Tu as cd,w as ce,ei as cf,Nu as cg,Uu as ch,$s as ci,Ja as cj,qu as ck,Ef as cl,ku as cm,Va as cn,Na as co,Ca as cp,Pa as cq,Gc as cr,no as cs,Iu as ct,co as cu,Kc as cv,Ju as cw,fo as cx,$u as cy,Ru as cz,t as d,tc as d$,Ho as d0,pt as d1,Go as d2,ot as d3,Ia as d4,Yo as d5,Du as d6,wt as d7,to as d8,hc as d9,ho as dA,bo as dB,go as dC,oo as dD,lo as dE,on as dF,Yu as dG,Hu as dH,Wu as dI,ic as dJ,La as dK,ka as dL,Aa as dM,Jo as dN,vr as dO,Pf as dP,zc as dQ,Mr as dR,Xc as dS,su as dT,Zc as dU,oc as dV,Oo as dW,Jc as dX,Sc as dY,Nc as dZ,jc as d_,X as da,tf as db,ju as dc,k as dd,af as de,Oc as df,Wc as dg,Nr as dh,Gu as di,Ta as dj,eh as dk,ti as dl,Ao as dm,mc as dn,yf as dp,au as dq,so as dr,Wr as ds,wu as dt,sh as du,Mc as dv,uo as dw,iu as dx,pf as dy,eo as dz,d as e,Fc as e0,Ue as e1,sn as e2,Tc as e3,nn as e4,Ff as e5,_c as e6,Zt as e7,Zs as e8,Kr as e9,dn as ea,fn as eb,hn as ec,rn as ed,p as f,ee as g,y as h,e as i,b as j,$ as k,Kt as l,oe as m,B as n,U as o,it as p,ji as q,zt as r,V as s,Cl as t,ki as u,vi as v,Ei as w,mi as x,Ni as y,ri as z}
@@ -0,0 +1 @@
1
+ import{g as t,r as n,l as e,i as r,a,b as s,m as o,c as i,t as c,T as d}from"./p-CGmJG63p.js";const g=Symbol.for("effect/Brand/Refined"),m=function(...i){const c=2===i.length?t=>i[0](t)?n(t):e(i[1](t)):t=>o(i[0](t),{onNone:()=>n(t),onSome:e});return Object.assign((n=>t(c(n),r)),{[g]:g,option:t=>s(c(t)),either:c,is:t=>a(c(t))})}((function(t){if("string"!=typeof t)return!1;try{return"svg"===(new DOMParser).parseFromString(t,"image/svg+xml").documentElement.nodeName}catch{return!1}}),(()=>[{message:"SVG data is malformed",meta:undefined}]));class u extends(d("BrandValidationError")){constructor(t,n){super(new Error(`Brand validation failed for type ${n}.`,{cause:t}))}}const l=t=>c({try:()=>m(function(t){const n="data:image/svg+xml,",e="data:image/svg+xml;base64,",r=t.trim();return r.startsWith(e)?atob(r.slice(26)):r.startsWith(n)?decodeURIComponent(r.slice(19)):r}(t)),catch:t=>new u(t,"SVGString")}),f=()=>m('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>');function v(t){try{return i(l(t))}catch{return console.warn("Invalid SVG string:",t),f()}}function p(t){try{return i(l(t))}catch{return void console.debug("Invalid SVG string:",t)}}export{f as e,p,v as t}
@@ -1 +1 @@
1
- const a=(a,e)=>{a.componentOnReady?a.componentOnReady().then((a=>e(a))):i((()=>e(a)))},e=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],r=a=>((a,e=[])=>{const r={};return e.forEach((e=>{a.hasAttribute(e)&&(null!==a.getAttribute(e)&&(r[e]=a.getAttribute(e)),a.removeAttribute(e))})),r})(a,e),i=a=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(a):"function"==typeof requestAnimationFrame?requestAnimationFrame(a):setTimeout(a);function t(a=document){let e=a.activeElement;if(!e)return null;for(;e?.shadowRoot;){const a=e.shadowRoot.activeElement;if(!a)break;e=a}return e}function n(a){return!!a&&a instanceof HTMLElement&&a.tabIndex>=0&&!a.hasAttribute("disabled")&&"true"!==a.getAttribute("aria-hidden")&&a.checkVisibility()&&null!==a.offsetParent}function o(a,e){if(a instanceof HTMLFormElement)return a;if("string"==typeof a){const e=document.getElementById(a);return e?e instanceof HTMLFormElement?e:(console.warn(`No Form found with selector: "#${a}". Verify that the element with id exists and is actually a <form> element.`,e),null):(console.warn(`No Form found with selector: "#${a}". Verify that the id is correct and the form is rendered in the DOM.`,e),null)}return void 0!==a?(console.warn('The provided "form" element is invalid. Verify that the form is a HTMLFormElement and rendered in the DOM.',e),null):e.closest("form")}export{a,n as c,o as f,t as g,r as i}
1
+ const a=(a,e)=>{a.componentOnReady?a.componentOnReady().then((a=>e(a))):i((()=>e(a)))},e=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],r=a=>((a,e=[])=>{const r={};return e.forEach((e=>{a.hasAttribute(e)&&(null!==a.getAttribute(e)&&(r[e]=a.getAttribute(e)),a.removeAttribute(e))})),r})(a,e),i=a=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(a):"function"==typeof requestAnimationFrame?requestAnimationFrame(a):setTimeout(a);function t(a=document){let e=a.activeElement;if(!e)return null;for(;e?.shadowRoot;){const a=e.shadowRoot.activeElement;if(!a)break;e=a}return e}function n(a){return!!a&&a instanceof HTMLElement&&a.tabIndex>=0&&!a.hasAttribute("disabled")&&"true"!==a.getAttribute("aria-hidden")&&a.checkVisibility()&&null!==a.offsetParent}function o(a,e){if(a instanceof HTMLFormElement)return a;if("string"==typeof a){const e=document.getElementById(a);return e?e instanceof HTMLFormElement?e:(console.warn(`No Form found with selector: "#${a}". Verify that the element with id exists and is actually a <form> element.`,e),null):(console.warn(`No Form found with selector: "#${a}". Verify that the id is correct and the form is rendered in the DOM.`,e),null)}return void 0!==a?(console.warn('The provided "form" element is invalid. Verify that the form is a HTMLFormElement and rendered in the DOM.',e),null):e.closest("form")}export{n as a,a as c,o as f,t as g,r as i}
@@ -41,7 +41,7 @@ async function fetchRuntime() {
41
41
  if (state.runtime)
42
42
  return state.runtime;
43
43
  if (!state.loadPromise) {
44
- state.loadPromise = import('./index-7Ru1khgk.js').catch(() => null);
44
+ state.loadPromise = import('./index-Dh_9sN0q.js').catch(() => null);
45
45
  }
46
46
  const runtime = await state.loadPromise;
47
47
  if (runtime) {
@@ -0,0 +1,9 @@
1
+ const sizes = ['xs', 'sm', 'md', 'lg'];
2
+ const textSizes = [...sizes, 'xl'];
3
+ const inputTypes = ['text', 'email', 'password', 'tel', 'url', 'search', 'number'];
4
+ const iconSizes = [...sizes, 'inherit'];
5
+ const iconWeights = ['thin', 'medium', 'bold', 'filled'];
6
+ const chipTypes = ['active', 'warning', 'success', 'error', 'neutral'];
7
+ const chipSizes = ['default', 'small'];
8
+
9
+ export { chipTypes as a, iconWeights as b, chipSizes as c, inputTypes as d, iconSizes as i, textSizes as t };
@@ -0,0 +1,75 @@
1
+ import { t as toValidSvgStringWithFallback, e as emptyDefaultSvg } from './svg-B2YoIRuh.js';
2
+
3
+ const IconProviderRegistryKey = Symbol.for('LMVZ__iconProviderRegistry');
4
+ const inMemoryRegistry = {};
5
+ function getRegistry() {
6
+ if (typeof window === 'undefined') {
7
+ return inMemoryRegistry;
8
+ }
9
+ return window[IconProviderRegistryKey] ?? (window[IconProviderRegistryKey] = {});
10
+ }
11
+ function registerIconProvider(id, provider) {
12
+ const registry = getRegistry();
13
+ const providerName = id;
14
+ if (Object.prototype.hasOwnProperty.call(registry, providerName)) {
15
+ console.warn(`Icon provider with name "${providerName}" is already registered. Overwriting existing provider.`);
16
+ }
17
+ registry[providerName] = provider;
18
+ }
19
+ function getRegisteredIconProvider(id) {
20
+ const registry = getRegistry();
21
+ if (id) {
22
+ return registry[id];
23
+ }
24
+ const providerNames = Object.keys(registry);
25
+ if (providerNames.length === 0) {
26
+ return undefined;
27
+ }
28
+ if (providerNames.length > 1) {
29
+ console.warn(`Multiple icon providers registered (${providerNames.join(', ')}). Using the first one: "${providerNames[0]}".`);
30
+ }
31
+ const firstProviderName = providerNames[0];
32
+ if (!firstProviderName) {
33
+ return undefined;
34
+ }
35
+ return registry[firstProviderName];
36
+ }
37
+
38
+ async function resolveIconSvg(options) {
39
+ const { icon, iconset } = options;
40
+ const iconSvg = await (async () => {
41
+ const provider = getRegisteredIconProvider(iconset);
42
+ if (!provider) {
43
+ console.warn(`No icon provider registered. Unable to resolve icon "${icon}"${iconset ? ` from set "${iconset}"` : ''}. Using default icon.`);
44
+ return;
45
+ }
46
+ try {
47
+ const resolved = await Promise.resolve(provider.resolve(icon));
48
+ if (!resolved?.svg) {
49
+ console.warn(`Icon "${icon}"${iconset ? ` from set "${iconset}"` : ''} not found in provider. Using default icon.`);
50
+ return;
51
+ }
52
+ const validated = toValidSvgStringWithFallback(resolved.svg);
53
+ if (validated) {
54
+ return validated;
55
+ }
56
+ }
57
+ catch (error) {
58
+ console.error(`Error resolving icon "${icon}" with provider:`, error);
59
+ return;
60
+ }
61
+ return;
62
+ })();
63
+ if (iconSvg)
64
+ return iconSvg;
65
+ console.error(`Icon "${icon}" not found${iconset ? ` in set "${iconset}"` : ''}. Using default icon.`);
66
+ return emptyDefaultSvg();
67
+ }
68
+ function typedIconFromSet(iconset, icon) {
69
+ return {
70
+ iconset,
71
+ icon,
72
+ };
73
+ }
74
+
75
+ export { resolveIconSvg as a, getRegisteredIconProvider as g, registerIconProvider as r, typedIconFromSet as t };