@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 +0,0 @@
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 h;const l=(t,e)=>(h||(globalThis[f]??=new Map,h=globalThis[f]),h.has(t)||h.set(t,e()),h.get(t)),b=t=>"string"==typeof t,d=t=>"number"==typeof t,p=t=>"bigint"==typeof t,g=t=>"function"==typeof t,y=t=>(t=>"object"==typeof t&&null!==t)(t)||g(t),S=t(2,((t,e)=>y(t)&&e in t)),_=t(2,((t,e)=>S(t,"_tag")&&t._tag===e)),m=t=>null==t,w=t=>"string"==typeof t||S(t,Symbol.iterator),I=t=>S(t,"then")&&g(t.then),v=t=>`BUG: ${t} - please report an issue at https://github.com/Effect-TS/effect/issues`;class O{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 O(this.self)}}class C{_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 M=Symbol.for("effect/Utils/YieldWrap");class j{#t;constructor(t){this.#t=t}[M](){return this.#t}}function N(t){if("object"==typeof t&&null!==t&&M in t)return t[M]();throw new Error(v("yieldWrapGet"))}const $=l("effect/Utils/isStructuralRegion",(()=>({enabled:!1,tester:void 0}))),k={effect_internal_function:t=>t()},A=!0===k.effect_internal_function((()=>(new Error).stack))?.includes("effect_internal_function")?k.effect_internal_function:t=>{try{return t()}finally{}},x=l(Symbol.for("effect/Hash/randomHashCache"),(()=>new WeakMap)),F=Symbol.for("effect/Hash"),R=t=>{if(!0===$.enabled)return 0;switch(typeof t){case"number":return q(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):D(t)?t[F]():T(t);default:throw new Error(`BUG: unhandled typeof ${typeof t} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},T=t=>(x.has(t)||x.set(t,q(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),x.get(t)),L=t=>e=>53*e^t,J=t=>3221225471&t|t>>>1&1073741824,D=t=>S(t,F),q=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 J(e)},P=t=>{let e=5381,r=t.length;for(;r;)e=33*e^t.charCodeAt(--r);return J(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 J(r)})(t,Object.keys(t)),W=t=>{let e=6151;for(let r=0;r<t.length;r++)e=o(e,L(R(t[r])));return J(e)},H=function(){if(1===arguments.length){const t=arguments[0];return function(e){return Object.defineProperty(t,F,{value:()=>e,enumerable:!1}),e}}const t=arguments[1];return Object.defineProperty(arguments[0],F,{value:()=>t,enumerable:!1}),t},Y=Symbol.for("effect/Equal");function G(){return 1===arguments.length?t=>B(t,arguments[0]):B(arguments[0],arguments[1])}function B(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(V(t)&&V(e))return!(R(t)!==R(e)||!t[Y](e))||!(!$.enabled||!$.tester)&&$.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($.enabled){if(null===t||null===e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every(((t,r)=>B(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)||!B(t[n],e[n]))return!!$.tester&&$.tester(t,e);return!0}}return!!$.tester&&$.tester(t,e)}}return!(!$.enabled||!$.tester)&&$.tester(t,e)}const V=t=>S(t,Y),z=()=>G,K=Symbol.for("nodejs.util.inspect.custom"),Q=t=>{try{if(S(t,"toJSON")&&g(t.toJSON)&&0===t.toJSON.length)return t.toJSON();if(Array.isArray(t))return t.map(Q)}catch{return{}}return it(t)},X=t=>JSON.stringify(t,null,2),Z=(t,e=2)=>{if("string"==typeof t)return t;try{return"object"==typeof t?tt(t,e):String(t)}catch{return String(t)}},tt=(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!==nt.fiberRefs&&rt(e)?e[et](nt.fiberRefs):e):e),e);return r=void 0,n},et=Symbol.for("effect/Inspectable/Redactable"),rt=t=>"object"==typeof t&&null!==t&&et in t,nt=l("effect/Inspectable/redactableState",(()=>({fiberRefs:void 0}))),st=(t,e)=>{const r=nt.fiberRefs;nt.fiberRefs=t;try{return e()}finally{nt.fiberRefs=r}},it=t=>rt(t)&&void 0!==nt.fiberRefs?t[et](nt.fiberRefs):t,at=(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}}},ot="Async",ct="Commit",ut="Failure",ft="OnFailure",ht="OnSuccess",lt="OnSuccessAndFailure",bt="Success",dt="Sync",pt="Tag",gt="UpdateRuntimeFlags",yt="While",St="Iterator",_t="WithRuntime",mt="Yield",wt="RevertFlags",It=()=>"3.21.1",vt=Symbol.for("effect/Effect"),Ot=Symbol.for("effect/Stream"),Ct=Symbol.for("effect/Sink"),Et=Symbol.for("effect/Channel"),Mt={_R:t=>t,_E:t=>t,_A:t=>t,_V:It()},jt={[vt]:Mt,[Ot]:Mt,[Ct]:{_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},[Y](t){return this===t},[F](){return H(this,T(this))},[Symbol.iterator](){return new O(new j(this))},pipe(){return at(this,arguments)}},Nt={[F](){return H(this,U(this))},[Y](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)||!G(this[r],t[r]))return!1;return!0}},$t={...jt,_op:ct},kt={...$t,...Nt},At=function(){function t(){}return t.prototype=$t,t}(),xt=Symbol.for("effect/Option"),Ft={...jt,[xt]:{_A:t=>t},[K](){return this.toJSON()},toString(){return X(this.toJSON())}},Rt=Object.assign(Object.create(Ft),{_tag:"Some",_op:"Some",[Y](t){return Jt(t)&&qt(t)&&G(this.value,t.value)},[F](){return H(this,L(R(this._tag))(R(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:Q(this.value)}}}),Tt=R("None"),Lt=Object.assign(Object.create(Ft),{_tag:"None",_op:"None",[Y]:t=>Jt(t)&&Dt(t),[F]:()=>Tt,toJSON(){return{_id:"Option",_tag:this._tag}}}),Jt=t=>S(t,xt),Dt=t=>"None"===t._tag,qt=t=>"Some"===t._tag,Pt=Object.create(Lt),Ut=t=>{const e=Object.create(Rt);return e.value=t,e},Wt=Symbol.for("effect/Either"),Ht={...jt,[Wt]:{_R:t=>t},[K](){return this.toJSON()},toString(){return X(this.toJSON())}},Yt=Object.assign(Object.create(Ht),{_tag:"Right",_op:"Right",[Y](t){return Bt(t)&&zt(t)&&G(this.right,t.right)},[F](){return L(R(this._tag))(R(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:Q(this.right)}}}),Gt=Object.assign(Object.create(Ht),{_tag:"Left",_op:"Left",[Y](t){return Bt(t)&&Vt(t)&&G(this.left,t.left)},[F](){return L(R(this._tag))(R(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:Q(this.left)}}}),Bt=t=>S(t,Wt),Vt=t=>"Left"===t._tag,zt=t=>"Right"===t._tag,Kt=t=>{const e=Object.create(Yt);return e.right=t,e},Qt=t=>{const e=Object.create(Gt);return e.left=t,e},Xt=Vt,Zt=zt,te=t(2,((t,{onLeft:e,onRight:r})=>Xt(t)?e(t.left):r(t.right))),ee=te({onLeft:e,onRight:e}),re=t(2,((t,e)=>{if(Zt(t))return t.right;throw e(t.left)})),ne=t=>t.length>0,se=()=>Pt,ie=Ut,ae=Dt,oe=qt,ce=t(2,((t,{onNone:e,onSome:r})=>ae(t)?e():r(t.value))),ue=t=>Vt(t)?Pt:Ut(t.right),fe=t(2,((t,e)=>ae(t)?e():t.value)),he=t(2,((t,e)=>ae(t)?ie(e()):t)),le=t=>null==t?se():ie(t),be=fe(i),de=t(2,((t,e)=>ae(t)?se():ie(e(t.value)))),pe=t(2,((t,e)=>ae(t)?se():e(t.value))),ge=(e=>t(2,((t,r)=>!ae(t)&&e(t.value,r))))(z()),ye=t=>(e,r)=>ae(e)?r:ae(r)?e:ie(t(e.value,r.value)),Se=(...t)=>t,_e=t=>new Array(t),me=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})),we=t=>Array.isArray(t)?t:Array.from(t),Ie=t(2,((t,e)=>[e,...t])),ve=t(2,((t,e)=>[...t,e])),Oe=t(2,((t,e)=>we(t).concat(we(e)))),Ce=ne,Ee=ne,Me=(t,e)=>t<0||t>=e.length,je=t(2,((t,e)=>{const r=Math.floor(e);return Me(r,t)?se():ie(t[r])})),Ne=t(2,((t,e)=>{const r=Math.floor(e);if(Me(r,t))throw new Error(`Index ${r} out of bounds`);return t[r]})),$e=je(0),ke=Ne(0),Ae=t=>Ee(t)?ie(xe(t)):se(),xe=t=>t[t.length-1],Fe=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)))),Te=t(2,((t,e)=>{const r=we(t);return r.slice((n=r,Math.floor(Math.min(Math.max(0,e),n.length))),r.length);var n})),Le=t=>Array.from(t).reverse(),Je=t(2,((t,e)=>{const r=Array.from(t);return r.sort(e),r})),De=t(2,((t,e)=>qe(t,e,Se))),qe=t(3,((t,e,r)=>{const n=we(t),s=we(e);if(Ee(n)&&Ee(s)){const t=[r(ke(n),ke(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=z(),Ue=t(2,((t,e)=>{const r=Array.from(t),n=Math.floor(e);return Ee(r)?n>=1?We(r,n):[[],r]:[r,[]]})),We=t(2,((t,e)=>{const r=Math.max(1,Math.floor(e));return r>=t.length?[He(t),[]]:[Ie(t.slice(1,r),ke(t)),t.slice(r)]})),He=t=>t.slice(),Ye=t(3,((t,e,r)=>{const n=we(t),s=we(e);return Ee(n)?Ee(s)?rr(r)(Oe(n,s)):n:s})),Ge=t(2,((t,e)=>Ye(t,e,Pe))),Be=()=>[],Ve=t=>[t],ze=t(2,((t,e)=>t.map(e))),Ke=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),Qe=t(2,((t,e)=>{const r=we(t),n=[];for(let t=0;t<r.length;t++){const s=e(r[t],t);oe(s)&&n.push(s.value)}return n})),Xe=t(2,((t,e)=>{const r=we(t),n=[];for(let t=0;t<r.length;t++)e(r[t],t)&&n.push(r[t]);return n})),Ze=t(3,((t,e,r)=>we(t).reduce(((t,e,n)=>r(t,e,n)),e))),tr=(t,e)=>{const r=[];let n,s=t;for(;oe(n=e(s));){const[t,e]=n.value;r.push(t),s=e}return r},er=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})),rr=t(2,((t,e)=>{const r=we(t);if(Ee(r)){const t=[ke(r)],n=Fe(r);for(const r of n)t.every((t=>!e(r,t)))&&t.push(r);return t}return[]})),nr=t=>rr(t,z()),sr=t(2,((t,e)=>we(t).join(e))),ir=Symbol.for("effect/Context/Tag"),ar=Symbol.for("effect/Context/Reference"),or=Symbol.for("effect/STM"),cr={...jt,_op:"Tag",[or]:Mt,[ir]:{_Service:t=>t,_Identifier:t=>t},toString(){return X(this.toJSON())},toJSON(){return{_id:"Tag",key:this.key,stack:this.stack}},[K](){return this.toJSON()},of:t=>t,context(t){return pr(this,t)}},ur={...cr,[ar]:ar},fr=Symbol.for("effect/Context"),hr={[fr]:{_Services:t=>t},[Y](t){if(br(t)&&this.unsafeMap.size===t.unsafeMap.size){for(const e of this.unsafeMap.keys())if(!t.unsafeMap.has(e)||!G(this.unsafeMap.get(e),t.unsafeMap.get(e)))return!1;return!0}return!1},[F](){return H(this,q(this.unsafeMap.size))},pipe(){return at(this,arguments)},toString(){return X(this.toJSON())},toJSON(){return{_id:"Context",services:Array.from(this.unsafeMap).map(Q)}},[K](){return this.toJSON()}},lr=t=>{const e=Object.create(hr);return e.unsafeMap=t,e},br=t=>S(t,fr),dr=lr(new Map),pr=(t,e)=>lr(new Map([[t.key,e]])),gr=t(3,((t,e,r)=>{const n=new Map(t.unsafeMap);return n.set(e.key,r),lr(n)})),yr=l("effect/Context/defaultValueCache",(()=>new Map)),Sr=t=>{if(yr.has(t.key))return yr.get(t.key);const e=t.defaultValue();return yr.set(t.key,e),e},_r=t(2,((t,e)=>{if(!t.unsafeMap.has(e.key)){if(ar in e)return Sr(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)})),mr=_r,wr=t(2,((t,e)=>t.unsafeMap.has(e.key)?Ut(t.unsafeMap.get(e.key)):S(e,ar)?Ut(Sr(e)):Pt)),Ir=t(2,((t,e)=>{const r=new Map(t.unsafeMap);for(const[t,n]of e.unsafeMap)r.set(t,n);return lr(r)})),vr=t=>{const e=Error.stackTraceLimit;Error.stackTraceLimit=2;const r=new Error;Error.stackTraceLimit=e;const n=Object.create(cr);return Object.defineProperty(n,"stack",{get:()=>r.stack}),n.key=t,n},Or=br,Cr=()=>dr,Er=pr,Mr=gr,jr=mr,Nr=_r,$r=wr,kr=Ir,Ar=(...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)},xr=()=>(t,e)=>{const r=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;function s(){}return Error.stackTraceLimit=r,Object.setPrototypeOf(s,ur),s.key=t,s.defaultValue=e.defaultValue,Object.defineProperty(s,"stack",{get:()=>n.stack}),s},Fr=Symbol.for("effect/Chunk"),Rr=[],Tr=(t=>c(((e,r)=>e.length===r.length&&Gr(e).every(((e,n)=>t(e,Qr(r,n)))))))(G),Lr={[Fr]:{_A:t=>t},toString(){return X(this.toJSON())},toJSON(){return{_id:"Chunk",values:Gr(this).map(Q)}},[K](){return this.toJSON()},[Y](t){return Dr(t)&&Tr(this,t)},[F](){return H(this,W(Gr(this)))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return Rr[Symbol.iterator]();default:return Gr(this)[Symbol.iterator]()}},pipe(){return at(this,arguments)}},Jr=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=qr,e.right=qr;break;case"ISingleton":e.length=1,e.depth=0,e.left=qr,e.right=qr;break;case"ISlice":e.length=t.length,e.depth=t.chunk.depth+1,e.left=qr,e.right=qr}return e},Dr=t=>S(t,Fr),qr=Jr({_tag:"IEmpty"}),Pr=()=>qr,Ur=(...t)=>Kr(t),Wr=t=>Jr({_tag:"ISingleton",a:t}),Hr=t=>Dr(t)?t:zr(we(t)),Yr=(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":Yr(t.left,e,r),Yr(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]=Qr(t,n),n+=1,s+=1;break}}},Gr=t=>{switch(t.backing._tag){case"IEmpty":return Rr;case"IArray":return t.backing.array;default:{const e=new Array(t.length);return Yr(t,e,0),t.backing={_tag:"IArray",array:e},t.left=qr,t.right=qr,t.depth=0,e}}},Br=t=>{switch(t.backing._tag){case"IEmpty":case"ISingleton":return t;case"IArray":return Jr({_tag:"IArray",array:Le(t.backing.array)});case"IConcat":return Jr({_tag:"IConcat",left:Br(t.backing.right),right:Br(t.backing.left)});case"ISlice":return zr(Le(Gr(t)))}},Vr=t(2,((t,e)=>e<0||e>=t.length?se():ie(Qr(t,e)))),zr=t=>0===t.length?Pr():1===t.length?Wr(t[0]):Jr({_tag:"IArray",array:t}),Kr=t=>zr(t),Qr=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?Qr(t.left,e):Qr(t.right,e-t.left.length);case"ISlice":return Qr(t.backing.chunk,e+t.backing.offset)}})),Xr=t(2,((t,e)=>rn(t,Wr(e)))),Zr=t(2,((t,e)=>rn(Wr(e),t))),tn=t(2,((t,e)=>{if(e<=0)return qr;if(e>=t.length)return t;switch(t.backing._tag){case"ISlice":return Jr({_tag:"ISlice",chunk:t.backing.chunk,length:e,offset:t.backing.offset});case"IConcat":return e>t.left.length?Jr({_tag:"IConcat",left:t.left,right:tn(t.right,e-t.left.length)}):tn(t.left,e);default:return Jr({_tag:"ISlice",chunk:t,offset:0,length:e})}})),en=t(2,((t,e)=>{if(e<=0)return t;if(e>=t.length)return qr;switch(t.backing._tag){case"ISlice":return Jr({_tag:"ISlice",chunk:t.backing.chunk,offset:t.backing.offset+e,length:t.backing.length-e});case"IConcat":return e>t.left.length?en(t.right,e-t.left.length):Jr({_tag:"IConcat",left:en(t.left,e),right:t.right});default:return Jr({_tag:"ISlice",chunk:t,offset:e,length:t.length-e})}})),rn=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 Jr({_tag:"IConcat",left:t,right:e});if(r<-1){if(t.left.depth>=t.right.depth){const r=rn(t.right,e);return Jr({_tag:"IConcat",left:t.left,right:r})}{const r=rn(t.right.right,e);if(r.depth===t.depth-3){const e=Jr({_tag:"IConcat",left:t.right.left,right:r});return Jr({_tag:"IConcat",left:t.left,right:e})}{const e=Jr({_tag:"IConcat",left:t.left,right:t.right.left});return Jr({_tag:"IConcat",left:e,right:r})}}}if(e.right.depth>=e.left.depth){const r=rn(t,e.left);return Jr({_tag:"IConcat",left:r,right:e.right})}{const r=rn(t,e.left.left);if(r.depth===e.depth-3){const t=Jr({_tag:"IConcat",left:r,right:e.left.right});return Jr({_tag:"IConcat",left:t,right:e.right})}{const t=Jr({_tag:"IConcat",left:e.left.right,right:e.right});return Jr({_tag:"IConcat",left:r,right:t})}}})),nn=t(2,((t,e)=>zr(Qe(t,e)))),sn=t(2,((t,e)=>zr(Xe(t,e)))),an=t=>0===t.length,on=t=>t.length>0,cn=Vr(0),un=t=>Qr(t,0),fn=un,hn=t(2,((t,e)=>"ISingleton"===t.backing._tag?Wr(e(t.backing.a,0)):zr(o(Gr(t),ze(((t,r)=>e(t,r))))))),ln=t(2,((t,e)=>[tn(t,e),en(t,e)])),bn=t(2,((t,e)=>{let r=0;for(const n of Gr(t)){if(e(n))break;r++}return ln(t,r)})),dn=t=>en(t,1),pn=Ze,gn=Math.pow(2,5),yn=gn-1,Sn=gn/2,_n=gn/4;function mn(t,e){return e>>>t&yn}function wn(t){return 1<<t}function In(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 vn(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 On(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 Cn{_tag="EmptyNode";modify(t,e,r,n,s,i){const a=r(se());return ae(a)?new Cn:(++i.value,new jn(t,n,s,a))}}function En(t){return _(t,"EmptyNode")}function Mn(t,e){return!En(t)&&e===t.edit}class jn{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(G(s,this.key)){const e=r(this.value);return e===this.value?this:ae(e)?(--i.value,new Cn):Mn(this,t)?(this.value=e,this):new jn(t,n,s,e)}const a=r(se());return ae(a)?this:(++i.value,xn(t,e,this.hash,this,n,new jn(t,n,s,a)))}}class Nn{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=Mn(this,t),n=this.updateCollisionList(e,t,this.hash,this.children,r,s,i);return n===this.children?this:n.length>1?new Nn(t,this.hash,n):n[0]}const a=r(se());return ae(a)?this:(++i.value,xn(t,e,this.hash,this,n,new jn(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&&G(i,o.key)){const u=o.value,f=s(u);return f===u?n:ae(f)?(--a.value,On(t,c,n)):vn(t,c,new jn(e,r,i,f),n)}}const c=s(se());return ae(c)?n:(++a.value,vn(t,o,new jn(e,r,i,c),n))}}class $n{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=mn(e,n),u=wn(c),f=In(a,u),h=a&u,l=Mn(this,t);if(!h){const h=(new Cn).modify(t,e+5,r,n,s,i);return h?o.length>=Sn?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 kn(t,o+1,i)}(t,c,h,a,o):new $n(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}(l,f,h,o)):this}const b=o[f],d=b.modify(t,e+5,r,n,s,i);if(b===d)return this;let p,g=a;if(En(d)){if(g&=~u,!g)return new Cn;if(o.length<=2&&(En(y=o[1^f])||"LeafNode"===y._tag||"CollisionNode"===y._tag))return o[1^f];p=On(l,f,o)}else p=vn(l,f,d,o);var y;return l?(this.mask=g,this.children=p,this):new $n(t,g,p)}}class kn{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=mn(e,n),u=o[c],f=(u||new Cn).modify(t,e+5,r,n,s,i);if(u===f)return this;const h=Mn(this,t);let l;if(En(u)&&!En(f))++a,l=vn(h,c,f,o);else if(!En(u)&&En(f)){if(--a,a<=_n)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 $n(t,a,s)}(t,a,c,o);l=vn(h,c,new Cn,o)}else l=vn(h,c,f,o);return h?(this.size=a,this.children=l,this):new kn(t,a,l)}}function An(t,e,r,n,s,i){if(r===s)return new Nn(t,r,[i,n]);const a=mn(e,r),o=mn(e,s);if(a===o)return e=>new $n(t,wn(a)|wn(o),[e]);{const e=a<o?[n,i]:[i,n];return new $n(t,wn(a)|wn(o),e)}}function xn(t,e,r,n,s,i){let a,o=e;for(;;){const e=An(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 Fn="effect/HashMap",Rn=Symbol.for(Fn),Tn={[Rn]:Rn,[Symbol.iterator](){return new Jn(this,((t,e)=>[t,e]))},[F](){let t=R(Fn);for(const e of this)t^=o(R(e[0]),L(R(e[1])));return H(this,t)},[Y](t){if(Yn(t)){if(t._size!==this._size)return!1;for(const e of this){const r=o(t,Vn(e[0],R(e[0])));if(ae(r))return!1;if(!G(e[1],r.value))return!1}return!0}return!1},toString(){return X(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(Q)}},[K](){return this.toJSON()},pipe(){return at(this,arguments)}},Ln=(t,e,r,n)=>{const s=Object.create(Tn);return s._editable=t,s._edit=e,s._root=r,s._size=n,s};class Jn{map;f;v;constructor(t,e){this.map=t,this.f=e,this.v=qn(this.map._root,this.f,void 0)}next(){if(ae(this.v))return{done:!0,value:void 0};const t=this.v.value;return this.v=Dn(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new Jn(this.map,this.f)}}const Dn=t=>t?Pn(t[0],t[1],t[2],t[3],t[4]):se(),qn=(t,e,r)=>{switch(t._tag){case"LeafNode":return oe(t.value)?ie({value:e(t.key,t.value.value),cont:r}):Dn(r);case"CollisionNode":case"ArrayNode":case"IndexedNode":{const n=t.children;return Pn(n.length,n,0,e,r)}default:return Dn(r)}},Pn=(t,e,r,n,s)=>{for(;r<t;){const i=e[r++];if(i&&!En(i))return qn(i,n,[t,e,r,n,s])}return Dn(s)},Un=Ln(!1,0,new Cn,0),Wn=()=>Un,Hn=t=>{const e=ts(Wn());for(const r of t)Kn(e,r[0],r[1]);return es(e)},Yn=t=>S(t,Rn),Gn=t=>t&&En(t._root),Bn=t(2,((t,e)=>Vn(t,e,R(e)))),Vn=t(3,((t,e,r)=>{let n=t._root,s=0;for(;;)switch(n._tag){case"LeafNode":return G(e,n.key)?n.value:se();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&&G(e,n.key))return n.value}}return se();case"IndexedNode":{const t=wn(mn(s,r));if(n.mask&t){n=n.children[In(n.mask,t)],s+=5;break}return se()}case"ArrayNode":if(n=n.children[mn(s,r)],n){s+=5;break}return se();default:return se()}})),zn=t(2,((t,e)=>oe(Vn(t,e,R(e))))),Kn=t(3,((t,e,r)=>rs(t,e,(()=>ie(r))))),Qn=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))),Xn=t=>new Jn(t,(t=>t)),Zn=t=>t._size,ts=t=>Ln(!0,t._edit+1,t._root,t._size),es=t=>(t._editable=!1,t),rs=t(3,((t,e,r)=>ns(t,e,R(e),r))),ns=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,Qn(i,s.value))})),ss=t(2,((t,e)=>rs(t,e,se))),is=t(2,((t,e)=>os(t,Wn(),((t,r,n)=>Kn(t,n,e(r,n)))))),as=t(2,((t,e)=>os(t,void 0,((t,r,n)=>e(r,n))))),os=t(3,((t,e,r)=>{const n=t._root;if("LeafNode"===n._tag)return oe(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?oe(n.value)&&(e=r(e,n.value.value,n.key)):s.push(n.children))}return e})),cs="effect/HashSet",us=Symbol.for(cs),fs={[us]:us,[Symbol.iterator](){return Xn(this._keyMap)},[F](){return H(this,L(R(this._keyMap))(R(cs)))},[Y](t){return!!ls(t)&&Zn(this._keyMap)===Zn(t._keyMap)&&G(this._keyMap,t._keyMap)},toString(){return X(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(Q)}},[K](){return this.toJSON()},pipe(){return at(this,arguments)}},hs=t=>{const e=Object.create(fs);return e._keyMap=t,e},ls=t=>S(t,us),bs=hs(Wn()),ds=()=>bs,ps=t(2,((t,e)=>zn(t._keyMap,e))),gs=t=>hs(ts(t._keyMap)),ys=t=>(t._keyMap._editable=!1,t),Ss=t(2,((t,e)=>{const r=gs(t);return e(r),ys(r)})),_s=t(2,((t,e)=>t._keyMap._editable?(Kn(e,!0)(t._keyMap),t):hs(Kn(e,!0)(t._keyMap)))),ms=t(2,((t,e)=>t._keyMap._editable?(ss(e)(t._keyMap),t):hs(ss(e)(t._keyMap)))),ws=t(2,((t,e)=>Ss(t,(t=>{for(const r of e)ms(t,r)})))),Is=t(2,((t,e)=>Ss(ds(),(r=>{vs(t,(t=>_s(r,t)));for(const t of e)_s(r,t)})))),vs=t(2,((t,e)=>as(t._keyMap,((t,r)=>e(r))))),Os=ds,Cs=t=>{const e=gs(ds());for(const r of t)_s(e,r);return ys(e)},Es=(...t)=>{const e=gs(ds());for(const r of t)_s(e,r);return ys(e)},Ms=ps,js=t=>Zn(t._keyMap),Ns=_s,$s=ms,ks=ws,As=Is,xs=t(3,((t,e,r)=>os(t._keyMap,e,((t,e,n)=>r(t,n))))),Fs=Symbol.for("effect/MutableRef"),Rs={[Fs]:Fs,toString(){return X(this.toJSON())},toJSON(){return{_id:"MutableRef",current:Q(this.current)}},[K](){return this.toJSON()},pipe(){return at(this,arguments)}},Ts=t=>{const e=Object.create(Rs);return e.current=t,e},Ls=t(3,((t,e,r)=>!!G(e,t.current)&&(t.current=r,!0))),Js=t=>t.current,Ds=t(2,((t,e)=>(t.current=e,t))),qs="effect/FiberId",Ps=Symbol.for(qs),Us="None",Ws="Runtime",Hs="Composite",Ys=P(`${qs}-${Us}`);class Gs{[Ps]=Ps;_tag=Us;id=-1;startTimeMillis=-1;[F](){return Ys}[Y](t){return Ks(t)&&t._tag===Us}toString(){return X(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag}}[K](){return this.toJSON()}}class Bs{id;startTimeMillis;[Ps]=Ps;_tag=Ws;constructor(t,e){this.id=t,this.startTimeMillis=e}[F](){return H(this,P(`${qs}-${this._tag}-${this.id}-${this.startTimeMillis}`))}[Y](t){return Ks(t)&&t._tag===Ws&&this.id===t.id&&this.startTimeMillis===t.startTimeMillis}toString(){return X(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,id:this.id,startTimeMillis:this.startTimeMillis}}[K](){return this.toJSON()}}class Vs{left;right;[Ps]=Ps;_tag=Hs;constructor(t,e){this.left=t,this.right=e}_hash;[F](){return o(P(`${qs}-${this._tag}`),L(R(this.left)),L(R(this.right)),H(this))}[Y](t){return Ks(t)&&t._tag===Hs&&G(this.left,t.left)&&G(this.right,t.right)}toString(){return X(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,left:Q(this.left),right:Q(this.right)}}[K](){return this.toJSON()}}const zs=new Gs,Ks=t=>S(t,Ps),Qs=t(2,((t,e)=>t._tag===Us?e:e._tag===Us?t:new Vs(t,e))),Xs=t=>o(t,xs(zs,((t,e)=>Qs(e)(t)))),Zs=t=>{switch(t._tag){case Us:return Os();case Ws:return Es(t.id);case Hs:return o(Zs(t.left),As(Zs(t.right)))}},ti=l(Symbol.for("effect/Fiber/Id/_fiberCounter"),(()=>Ts(0))),ei=t=>Array.from(Zs(t)).map((t=>`#${t}`)).join(","),ri=()=>{const t=Js(ti);return o(ti,Ds(t+1)),new Bs(t,Date.now())},ni="Die",si="Empty",ii="Fail",ai="Interrupt",oi="Parallel",ci="Sequential",ui="effect/Cause",fi=Symbol.for(ui),hi={[fi]:{_E:t=>t},[F](){return o(R(ui),L(R(Fi(this))),H(this))},[Y](t){return Si(t)&&xi(this,t)},pipe(){return at(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:Q(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:Q(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:Q(this.left),right:Q(this.right)}}},toString(){return Hi(this)},[K](){return this.toJSON()}},li=(()=>{const t=Object.create(hi);return t._tag=si,t})(),bi=t=>{const e=Object.create(hi);return e._tag=ii,e.error=t,e},di=t=>{const e=Object.create(hi);return e._tag=ni,e.defect=t,e},pi=t=>{const e=Object.create(hi);return e._tag=ai,e.fiberId=t,e},gi=(t,e)=>{const r=Object.create(hi);return r._tag=oi,r.left=t,r.right=e,r},yi=(t,e)=>{const r=Object.create(hi);return r._tag=ci,r.left=t,r.right=e,r},Si=t=>S(t,fi),_i=t=>t._tag===ni,mi=t=>t._tag===si||Ui(t,!0,((t,e)=>{switch(e._tag){case si:return ie(t);case ni:case ii:case ai:return ie(!1);default:return se()}})),wi=t=>oe(ji(t)),Ii=t=>Wi(void 0,Ji)(t),vi=t=>Br(Ui(t,Pr(),((t,e)=>e._tag===ii?ie(o(t,Zr(e.error))):se()))),Oi=t=>Br(Ui(t,Pr(),((t,e)=>e._tag===ni?ie(o(t,Zr(e.defect))):se()))),Ci=t=>Ui(t,Os(),((t,e)=>e._tag===ai?ie(o(t,Ns(e.fiberId))):se())),Ei=t=>{const e=(t=>Ti(t,(t=>t._tag===ii?ie(t.error):se())))(t);switch(e._tag){case"None":return Kt(t);case"Some":return Qt(e.value)}},Mi=t=>Pi(t,{onEmpty:ie(li),onFail:de(bi),onDie:t=>ie(di(t)),onInterrupt:t=>ie(pi(t)),onSequential:ye(yi),onParallel:ye(gi)}),ji=t=>Ti(t,(t=>t._tag===ai?ie(t.fiberId):se())),Ni=t=>Pi(t,{onEmpty:li,onFail:()=>li,onDie:di,onInterrupt:pi,onSequential:yi,onParallel:gi}),$i=t=>Pi(t,{onEmpty:li,onFail:di,onDie:di,onInterrupt:pi,onSequential:yi,onParallel:gi}),ki=t(2,((t,e)=>Ai(t,(t=>bi(e(t)))))),Ai=t(2,((t,e)=>Pi(t,{onEmpty:li,onFail:t=>e(t),onDie:t=>di(t),onInterrupt:t=>pi(t),onSequential:(t,e)=>yi(t,e),onParallel:(t,e)=>gi(t,e)}))),xi=(t,e)=>{let r=Wr(t),n=Wr(e);for(;on(r)&&on(n);){const[t,e]=o(fn(r),Ui([Os(),Pr()],(([t,e],r)=>{const[n,s]=Li(r);return ie([o(t,As(n)),o(e,rn(s))])}))),[s,i]=o(fn(n),Ui([Os(),Pr()],(([t,e],r)=>{const[n,s]=Li(r);return ie([o(t,As(n)),o(e,rn(s))])})));if(!G(t,s))return!1;r=e,n=i}return!0},Fi=t=>Ri(Wr(t),Pr()),Ri=(t,e)=>{for(;;){const[r,n]=o(t,Ze([Os(),Pr()],(([t,e],r)=>{const[n,s]=Li(r);return[o(t,As(n)),o(e,rn(s))]}))),s=js(r)>0?o(e,Zr(r)):e;if(an(n))return Br(s);t=n,e=s}throw new Error(v("Cause.flattenCauseLoop"))},Ti=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 ci:case oi:r.push(t.right),r.push(t.left)}break;case"Some":return n}}return se()})),Li=t=>{let e=t;const r=[];let n=Os(),s=Pr();for(;void 0!==e;)switch(e._tag){case si:if(0===r.length)return[n,s];e=r.pop();break;case ii:if(n=Ns(n,Ur(e._tag,e.error)),0===r.length)return[n,s];e=r.pop();break;case ni:if(n=Ns(n,Ur(e._tag,e.defect)),0===r.length)return[n,s];e=r.pop();break;case ai:if(n=Ns(n,Ur(e._tag,e.fiberId)),0===r.length)return[n,s];e=r.pop();break;case ci:switch(e.left._tag){case si:e=e.right;break;case ci:e=yi(e.left.left,yi(e.left.right,e.right));break;case oi:e=gi(yi(e.left.left,e.right),yi(e.left.right,e.right));break;default:s=Zr(s,e.right),e=e.left}break;case oi:r.push(e.right),e=e.left}throw new Error(v("Cause.evaluateCauseLoop"))},Ji={emptyCase:n,failCase:s,dieCase:s,interruptCase:n,sequentialCase:(t,e,r)=>e&&r,parallelCase:(t,e,r)=>e&&r},Di="SequentialCase",qi="ParallelCase",Pi=t(2,((t,{onDie:e,onEmpty:r,onFail:n,onInterrupt:s,onParallel:i,onSequential:a})=>Wi(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)}))),Ui=t(3,((t,e,r)=>{let n=e,s=t;const i=[];for(;void 0!==s;){const t=r(n,s);switch(n=oe(t)?t.value:n,s._tag){case ci:case oi:i.push(s.right),s=s.left;break;default:s=void 0}void 0===s&&i.length>0&&(s=i.pop())}return n})),Wi=t(3,((t,e,r)=>{const n=[t],s=[];for(;n.length>0;){const t=n.pop();switch(t._tag){case si:s.push(Kt(r.emptyCase(e)));break;case ii:s.push(Kt(r.failCase(e,t.error)));break;case ni:s.push(Kt(r.dieCase(e,t.defect)));break;case ai:s.push(Kt(r.interruptCase(e,t.fiberId)));break;case ci:n.push(t.right),n.push(t.left),s.push(Qt({_tag:Di}));break;case oi:n.push(t.right),n.push(t.left),s.push(Qt({_tag:qi}))}}const i=[];for(;s.length>0;){const t=s.pop();switch(t._tag){case"Left":switch(t.left._tag){case Di:{const t=i.pop(),n=i.pop(),s=r.sequentialCase(e,t,n);i.push(s);break}case qi:{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()})),Hi=(t,e)=>Ii(t)?"All fibers interrupted without errors.":Xi(t).map((function(t){return!0!==e?.renderErrorCause||void 0===t.cause?t.stack:`${t.stack} {\n${Yi(t.cause," ")}\n}`})).join("\n"),Yi=(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${Yi(t.cause,`${e} `)}\n${e}}`),n},Gi=t=>{const e="object"==typeof t&&null!==t,r=Error.stackTraceLimit;Error.stackTraceLimit=1;const n=new Error(Bi(t),e&&"cause"in t&&void 0!==t.cause?{cause:Gi(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&&(Qi in t&&(n.span=t[Qi]),Object.keys(t).forEach((e=>{e in n||(n[e]=t[e])}))),n.stack=Ki(`${n.name}: ${n.message}`,t instanceof Error&&t.stack?t.stack:"",n.span),n},Bi=t=>{if("string"==typeof t)return t;if("object"==typeof t&&null!==t&&t instanceof Error)return t.message;try{if(S(t,"toString")&&g(t.toString)&&t.toString!==Object.prototype.toString&&t.toString!==globalThis.Array.prototype.toString)return t.toString()}catch{}return tt(t)},Vi=/\((.*)\)/g,zi=l("effect/Tracer/spanToTrace",(()=>new WeakMap)),Ki=(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=zi.get(t);if("function"==typeof r){const e=r();if("string"==typeof e){const r=e.matchAll(Vi);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=be(t.parent),e++}}return n.join("\n")},Qi=Symbol.for("effect/SpanAnnotation"),Xi=t=>Wi(t,void 0,{emptyCase:()=>[],dieCase:(t,e)=>[Gi(e)],failCase:(t,e)=>[Gi(e)],interruptCase:()=>[],parallelCase:(t,e,r)=>[...e,...r],sequentialCase:(t,e,r)=>[...e,...r]}),Zi=t=>t.replace(/[\s="]/g,"_"),ta=t=>e=>`${Zi(e.label)}=${t-e.startTime}ms`,ea=jt,ra=At;class na extends ra{}const sa=Symbol.for("effect/Micro"),ia=Symbol.for("effect/Micro/MicroExit"),aa=Symbol.for("effect/Micro/MicroCause"),oa={_E:e};class ca extends globalThis.Error{_tag;traces;[aa];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=Z(e,0),a=`${s}: ${i}`;r.length>0&&(a+=`\n ${r.join("\n ")}`),super(i),this._tag=t,this.traces=r,this[aa]=oa,this.name=s,this.stack=a}pipe(){return at(this,arguments)}toString(){return this.stack}[K](){return this.stack}}class ua extends ca{error;constructor(t,e=[]){super("Fail",t,e),this.error=t}}class fa extends ca{defect;constructor(t,e=[]){super("Die",t,e),this.defect=t}}class ha extends ca{constructor(t=[]){super("Interrupt","interrupted",t)}}const la=(t=[])=>new ha(t),ba=Symbol.for("effect/Micro/MicroFiber"),da={_A:e,_E:e};class pa{context;interruptible;[ba];_stack=[];_observers=[];_exit;_children;currentOpCount=0;constructor(t,e=!0){this.context=t,this.interruptible=e,this[ba]=da}getRef(t){return(e=this.context).unsafeMap.has((r=t).key)?e.unsafeMap.get(r.key):Sr(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(Wa))}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===va)return;const r=ga.interruptChildren&&ga.interruptChildren(this);if(void 0!==r)return this.evaluate(Ja(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(Qa).shouldYield(this)){e=!0;const t=r;r=Ja(Fa,(()=>t))}if(r=r[_a](this),r===va){const t=this._yielded;return ia in t?(this._yielded=void 0,t):va}}}catch(t){return S(r,_a)?Ha(t):Ha(`MicroFiber.runLoop: Not a valid effect: ${String(r)}`)}}getCont(t){for(;;){const e=this._stack.pop();if(!e)return;const r=e[Ia]&&e[Ia](this);if(r)return{[t]:r};if(e[t])return e}}_yielded=void 0;yieldWith(t){return this._yielded=t,va}children(){return this._children??=new Set}}const ga=l("effect/Micro/fiberMiddleware",(()=>({interruptChildren:void 0}))),ya=Symbol.for("effect/Micro/identifier"),Sa=Symbol.for("effect/Micro/args"),_a=Symbol.for("effect/Micro/evaluate"),ma=Symbol.for("effect/Micro/successCont"),wa=Symbol.for("effect/Micro/failureCont"),Ia=Symbol.for("effect/Micro/ensureCont"),va=Symbol.for("effect/Micro/Yield"),Oa={_A:e,_E:e,_R:e},Ca={...ea,_op:"Micro",[sa]:Oa,pipe(){return at(this,arguments)},[Symbol.iterator](){return new O(new j(this))},toJSON(){return{_id:"Micro",op:this[ya],...Sa in this?{args:this[Sa]}:void 0}},toString(){return X(this)},[K](){return X(this)}};function Ea(){return Ha("Micro.evaluate: Not implemented")}const Ma=t=>({...Ca,[ya]:t.op,[_a]:t.eval??Ea,[ma]:t.contA,[wa]:t.contE,[Ia]:t.ensure}),ja=t=>{const e=Ma(t);return function(){const r=Object.create(e);return r[Sa]=!1===t.single?arguments:arguments[0],r}},Na=t=>{const e={...Ma(t),[ia]:ia,_tag:t.op,get[t.prop](){return this[Sa]},toJSON(){return{_id:"MicroExit",_tag:t.op,[t.prop]:this[Sa]}},[Y](e){return qa(e)&&e._tag===t.op&&G(this[Sa],e[Sa])},[F](){return H(this,L(P(t.op))(R(this[Sa])))}};return function(t){const r=Object.create(e);return r[Sa]=t,r[ma]=void 0,r[wa]=void 0,r[Ia]=void 0,r}},$a=Na({op:"Success",prop:"value",eval(t){const e=t.getCont(ma);return e?e[ma](this[Sa],t):t.yieldWith(this)}}),ka=Na({op:"Failure",prop:"cause",eval(t){let e=t.getCont(wa);for(;"Interrupt"===this[Sa]._tag&&e&&t.interruptible;)e=t.getCont(wa);return e?e[wa](this[Sa],t):t.yieldWith(this)}}),Aa=t=>ka(((t,e=[])=>new ua(t,e))(t)),xa=ja({op:"Suspend",eval(t){return this[Sa]()}}),Fa=ja({op:"Yield",eval(t){let e=!1;return t.getRef(Qa).scheduleTask((()=>{e||t.evaluate(Ya)}),this[Sa]??0),t.yieldWith((()=>{e=!0}))}})(0),Ra=$a(void 0),Ta=t=>xa((()=>{try{return $a(t.try())}catch(e){return Aa(t.catch(e))}})),La=ja({op:"WithMicroFiber",eval(t){return this[Sa](t)}}),Ja=t(2,((t,e)=>{const r=Object.create(Da);return r[Sa]=t,r[ma]=e,r})),Da=Ma({op:"OnSuccess",eval(t){return t._stack.push(this),this[Sa]}}),qa=t=>S(t,ia),Pa=$a,Ua=ka,Wa=Ua(la()),Ha=t=>Ua(((t,e=[])=>new fa(t,e))(t)),Ya=Pa(void 0),Ga="setImmediate"in globalThis?globalThis.setImmediate:t=>setTimeout(t,0);class Ba{tasks=[];running=!1;scheduleTask(t,e){this.tasks.push(t),this.running||(this.running=!0,Ga(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(Ka)}flush(){for(;this.tasks.length>0;)this.runTasks()}}const Va=t(2,((t,e)=>La((r=>{const n=r.context;return r.context=e(n),to(t,(()=>(r.context=n,Ra)))})))),za=t(2,((t,e)=>Va(t,kr(e))));class Ka extends(xr()("effect/Micro/currentMaxOpsBeforeYield",{defaultValue:()=>2048})){}class Qa extends(xr()("effect/Micro/currentScheduler",{defaultValue:()=>new Ba})){}const Xa=t(2,((t,e)=>{const r=Object.create(Za);return r[Sa]=t,r[ma]=e.onSuccess,r[wa]=e.onFailure,r})),Za=Ma({op:"OnSuccessAndFailure",eval(t){return t._stack.push(this),this[Sa]}}),to=t(2,((t,e)=>no((r=>Xa(r(t),{onFailure:t=>Ja(e(Ua(t)),(()=>ka(t))),onSuccess:t=>Ja(e(Pa(t)),(()=>$a(t)))}))))),eo=ja({op:"SetInterruptible",ensure(t){if(t.interruptible=this[Sa],t._interrupted&&t.interruptible)return()=>Wa}}),ro=t=>La((e=>e.interruptible?t:(e.interruptible=!0,e._stack.push(eo(!1)),e._interrupted?Wa:t))),no=t=>La((r=>r.interruptible?(r.interruptible=!1,r._stack.push(eo(!0)),t(ro)):t(e))),so=t=>{const e=new pa(Qa.context(new Ba));return e.evaluate(t),e},io=t=>(t=>new Promise((e=>{so(t).addObserver(e)})))(t).then((t=>{if("Failure"===t._tag)throw t.cause;return t.value})),ao=function(){class t extends globalThis.Error{}return Object.assign(t.prototype,Ca,Nt,{[ya]:"Failure",[_a](){return Aa(this)},toString(){return this.message?`${this.name}: ${this.message}`:this.name},toJSON(){return{...this}},[K](){const t=this.stack;return t?`${this.toString()}\n${t.split("\n").slice(1).join("\n")}`:this.toString()}}),t}(),oo=function(){return class extends ao{constructor(t){super(),t&&Object.assign(this,t)}}}(),co=t=>{class e extends oo{_tag=t}return e.prototype.name=t,e},uo=Symbol.for("effect/Logger"),fo={_Message:t=>t,_Output:t=>t},ho=t=>({[uo]:fo,log:t,pipe(){return at(this,arguments)}}),lo=/^[^\s"=]*$/,bo=(t,e)=>({annotations:r,cause:n,date:s,fiberId:i,logLevel:a,message:o,spans:c})=>{const u=(e,r)=>`${Zi(e)}=${(e=>e.match(lo)?e:t(e))(r)}`,f=(t,e)=>" "+u(t,e);let h=u("timestamp",s.toISOString());h+=f("level",a.label),h+=f("fiber",ei(i));const l=(b=o,Array.isArray(b)?b:[b]);var b;for(let t=0;t<l.length;t++)h+=f("message",Z(l[t],e));(t=>t._tag===si)(n)||(h+=f("cause",Hi(n,{renderErrorCause:!0})));for(const t of c)h+=" "+ta(s.getTime())(t);for(const[t,n]of r)h+=f(t,Z(n,e));return h},po=ho(bo((t=>`"${t.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`)));"object"==typeof process&&null!==process&&"object"==typeof process.stdout&&null!==process.stdout&&process;export{Ns as $,Kn as A,Bn as B,Gn as C,rs as D,is as E,Xn as F,Hn as G,P as H,X as I,W as J,we as K,u as L,Q as M,K as N,er as O,G as P,Wr as Q,on as R,Nt as S,co as T,fn as U,dn as V,Zr as W,lr as X,xs as Y,Ms as Z,$s as _,Zt as a,mt as a$,Te as a0,Ce as a1,Ve as a2,ke as a3,Fe as a4,r as a5,rn as a6,he as a7,de as a8,Xr as a9,Ci as aA,gt as aB,Oi as aC,$i as aD,vi as aE,un as aF,pi as aG,Js as aH,Ds as aI,l as aJ,fe as aK,ot as aL,Hr as aM,Gr as aN,Br as aO,Ze as aP,_e as aQ,yi as aR,I as aS,yt as aT,kr as aU,kt as aV,li as aW,di as aX,wt as aY,Hi as aZ,oe as a_,Pr as aa,ct as ab,Mt as ac,T as ad,j as ae,ht as af,ft as ag,y as ah,Qi as ai,bi as aj,Ei as ak,v as al,dt as am,_t as an,ut as ao,o as ap,L as aq,R as ar,lt as as,bt as at,A as au,ie as av,se as aw,Ts as ax,$t as ay,Ii as az,ue as b,Mi as b$,St as b0,Cr as b1,Be as b2,gi as b3,V as b4,vr as b5,s as b6,sr as b7,ge as b8,$e as b9,xe as bA,Re as bB,ae as bC,be as bD,_ as bE,ks as bF,Os as bG,As as bH,Es as bI,Er as bJ,w as bK,Ls as bL,mi as bM,js as bN,st as bO,pt as bP,Nr as bQ,so as bR,za as bS,Ni as bT,It as bU,Z as bV,N as bW,$r as bX,ho as bY,po as bZ,wi as b_,Ie as ba,ze as bb,Xt as bc,De as bd,ve as be,Ke as bf,Ae as bg,tr as bh,ee as bi,Je as bj,pe as bk,Ne as bl,Cs as bm,C as bn,xr as bo,Mr as bp,Ee as bq,na as br,a as bs,jr as bt,zr as bu,me as bv,nr as bw,Oe as bx,le as by,Ge as bz,io as c,ki as c0,_i as c1,cn as c2,Xi as c3,Or as c4,Ar as c5,Ti as c6,Ue as c7,an as c8,sn as c9,te as ca,Qr as cb,pn as cc,hn as cd,bn as ce,nn as cf,t as d,d as e,p as f,re as g,S as h,e as i,b as j,F as k,Qt as l,ce as m,H as n,U as o,at as p,zs as q,Kt as r,Y as s,Ta as t,Qs as u,ri as v,ei as w,Xs as x,Wn as y,os as z}
@@ -1,157 +0,0 @@
1
- import { g as getOrThrowWith, r as right, l as left, i as identity, a as isRight, b as getRight, m as match, t as try_, T as TaggedError, c as runPromise } from './logger-fiRXhuXK.js';
2
-
3
- /**
4
- * This module provides types and utility functions to create and work with branded types,
5
- * which are TypeScript types with an added type tag to prevent accidental usage of a value in the wrong context.
6
- *
7
- * The `refined` and `nominal` functions are both used to create branded types in TypeScript.
8
- * The main difference between them is that `refined` allows for validation of the data, while `nominal` does not.
9
- *
10
- * The `nominal` function is used to create a new branded type that has the same underlying type as the input, but with a different name.
11
- * This is useful when you want to distinguish between two values of the same type that have different meanings.
12
- * The `nominal` function does not perform any validation of the input data.
13
- *
14
- * On the other hand, the `refined` function is used to create a new branded type that has the same underlying type as the input,
15
- * but with a different name, and it also allows for validation of the input data.
16
- * The `refined` function takes a predicate that is used to validate the input data.
17
- * If the input data fails the validation, a `BrandErrors` is returned, which provides information about the specific validation failure.
18
- *
19
- * @since 2.0.0
20
- */
21
- /**
22
- * @since 2.0.0
23
- * @category symbols
24
- */
25
- const RefinedConstructorsTypeId = /*#__PURE__*/Symbol.for("effect/Brand/Refined");
26
- /**
27
- * Returns a `BrandErrors` that contains a single `RefinementError`.
28
- *
29
- * @since 2.0.0
30
- * @category constructors
31
- */
32
- const error = (message, meta) => [{
33
- message,
34
- meta
35
- }];
36
- function refined(...args) {
37
- const either = args.length === 2 ? unbranded => args[0](unbranded) ? right(unbranded) : left(args[1](unbranded)) : unbranded => {
38
- return match(args[0](unbranded), {
39
- onNone: () => right(unbranded),
40
- onSome: left
41
- });
42
- };
43
- return Object.assign(unbranded => getOrThrowWith(either(unbranded), identity), {
44
- [RefinedConstructorsTypeId]: RefinedConstructorsTypeId,
45
- option: args => getRight(either(args)),
46
- either,
47
- is: args => isRight(either(args))
48
- });
49
- }
50
-
51
- const SVGString = refined(isValidSVG, () => error('SVG data is malformed'));
52
- class BrandValidationError extends TaggedError('BrandValidationError') {
53
- constructor(error, type) {
54
- super(new Error(`Brand validation failed for type ${type}.`, { cause: error }));
55
- }
56
- }
57
- const createValidSVGString = (svg) => try_({
58
- try: () => SVGString(svg),
59
- catch: (error) => new BrandValidationError(error, 'SVGString'),
60
- });
61
- function isValidSVG(svg) {
62
- if (typeof svg !== 'string') {
63
- return false;
64
- }
65
- try {
66
- const parser = new DOMParser();
67
- const doc = parser.parseFromString(svg, 'image/svg+xml');
68
- return doc.documentElement.nodeName === 'svg';
69
- }
70
- catch {
71
- return false;
72
- }
73
- }
74
-
75
- const IconProviderRegistryKey = Symbol.for('LMVZ__iconProviderRegistry');
76
- const inMemoryRegistry = {};
77
- function getRegistry() {
78
- if (typeof window === 'undefined') {
79
- return inMemoryRegistry;
80
- }
81
- return window[IconProviderRegistryKey] ?? (window[IconProviderRegistryKey] = {});
82
- }
83
- function registerIconProvider(id, provider) {
84
- const registry = getRegistry();
85
- const providerName = id;
86
- if (Object.prototype.hasOwnProperty.call(registry, providerName)) {
87
- console.warn(`Icon provider with name "${providerName}" is already registered. Overwriting existing provider.`);
88
- }
89
- registry[providerName] = provider;
90
- }
91
- function getRegisteredIconProvider(id) {
92
- const registry = getRegistry();
93
- if (id) {
94
- return registry[id];
95
- }
96
- const providerNames = Object.keys(registry);
97
- if (providerNames.length === 0) {
98
- return undefined;
99
- }
100
- if (providerNames.length > 1) {
101
- console.warn(`Multiple icon providers registered (${providerNames.join(', ')}). Using the first one: "${providerNames[0]}".`);
102
- }
103
- const firstProviderName = providerNames[0];
104
- if (!firstProviderName) {
105
- return undefined;
106
- }
107
- return registry[firstProviderName];
108
- }
109
-
110
- const emptyDefaultSvg = () => SVGString(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>`);
111
- async function toValidSvgStringWithFallback(value) {
112
- try {
113
- return await runPromise(createValidSVGString(value));
114
- }
115
- catch {
116
- console.error('Invalid SVG string:', value);
117
- return emptyDefaultSvg();
118
- }
119
- }
120
- async function resolveIconSvg(options) {
121
- const { icon, iconset } = options;
122
- const iconSvg = await (async () => {
123
- const provider = getRegisteredIconProvider(iconset);
124
- if (!provider) {
125
- console.warn(`No icon provider registered. Unable to resolve icon "${icon}"${iconset ? ` from set "${iconset}"` : ''}. Using default icon.`);
126
- return;
127
- }
128
- try {
129
- const resolved = await Promise.resolve(provider.resolve(icon));
130
- if (!resolved?.svg) {
131
- console.warn(`Icon "${icon}"${iconset ? ` from set "${iconset}"` : ''} not found in provider. Using default icon.`);
132
- return;
133
- }
134
- const validated = await toValidSvgStringWithFallback(resolved.svg);
135
- if (validated) {
136
- return validated;
137
- }
138
- }
139
- catch (error) {
140
- console.error(`Error resolving icon "${icon}" with provider:`, error);
141
- return;
142
- }
143
- return;
144
- })();
145
- if (iconSvg)
146
- return iconSvg;
147
- console.error(`Icon "${icon}" not found${iconset ? ` in set "${iconset}"` : ''}. Using default icon.`);
148
- return emptyDefaultSvg();
149
- }
150
- function typedIconFromSet(iconset, icon) {
151
- return {
152
- iconset,
153
- icon,
154
- };
155
- }
156
-
157
- export { resolveIconSvg as a, getRegisteredIconProvider as g, isValidSVG as i, registerIconProvider as r, typedIconFromSet as t };
@@ -1 +0,0 @@
1
- import{g as i,r as e,h as t,H as s}from"./p-saW7O-EW.js";import{i as o,a as n}from"./p-Bh2Epkwf.js";import{R as r,A as c}from"./p-Bkfdgg0T.js";import"./p-fiRXhuXK.js";import"./p-B3dnXEPG.js";const m=class extends r{intersectionObserver;ariaValidationController=new c(this);get el(){return i(this)}validationEl;icon;weight="medium";size="md";iconset;iconData;visible=!1;ariaLabel;get ariaHidden(){return!this.ariaLabel}constructor(i){super(),e(this,i),this.addController(this.ariaValidationController)}connectedCallback(){this.waitUntilVisible((()=>{this.visible=!0,this.loadIconPathData()})),super.connectedCallback()}disconnectedCallback(){this.intersectionObserver&&"function"==typeof this.intersectionObserver.disconnect&&this.intersectionObserver.disconnect(),this.intersectionObserver=void 0,super.disconnectedCallback()}async loadIconPathData(){const{icon:i,iconset:e,visible:t}=this;i&&t&&(this.iconData=o(i)?i:await n({icon:i,iconset:e}))}componentDidRender(){this.validationEl=this.el.querySelector("svg"),this.ariaValidationController.revalidateAria(),super.componentDidRender()}render(){return t(s,{key:"6022ed0e30bcdd13455ccaae65784ac70abcb349",role:"img","aria-hidden":`${this.ariaHidden}`,innerHTML:this.iconData})}waitUntilVisible(i,e=50){"undefined"!=typeof window&&window.IntersectionObserver?(this.intersectionObserver=new IntersectionObserver((e=>{e.some((e=>!!e.isIntersecting&&(this.intersectionObserver&&"function"==typeof this.intersectionObserver.disconnect&&this.intersectionObserver.disconnect(),this.intersectionObserver=void 0,i(),!0)))}),{rootMargin:`${e}px`}),this.intersectionObserver.observe(this.el)):i()}static get watchers(){return{icon:[{loadIconPathData:0}],iconset:[{loadIconPathData:0}]}}};m.style=".sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));display:inline-block;line-height:0;svg{display:block}svg path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem));height:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem));height:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}}[size='lg'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem));height:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem))}}[size='inherit'].sc-lmvz-icon-h{svg{width:inherit;height:inherit}}[weight='light'].sc-lmvz-icon-h{svg path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg path{stroke-width:2;fill:var(--lmvz-icon-color)}}";export{m as lmvz_icon}
@@ -1 +0,0 @@
1
- import{r as s,h as t,H as e}from"./p-saW7O-EW.js";const r=class{constructor(t){s(this,t)}text;render(){return t(e,{key:"d128e24bb90891ebd13d13a8e27c06782363cace"},this.text)}};r.style=":host{display:block}";export{r as lmvz_chip}
@@ -1 +0,0 @@
1
- import{g as n,r as o,l as e,i as t,a as r,b as i,m as s,t as c,T as a,c as d}from"./p-fiRXhuXK.js";const f=Symbol.for("effect/Brand/Refined"),u=function(...c){const a=2===c.length?n=>c[0](n)?o(n):e(c[1](n)):n=>s(c[0](n),{onNone:()=>o(n),onSome:e});return Object.assign((o=>n(a(o),t)),{[f]:f,option:n=>i(a(n)),either:a,is:n=>r(a(n))})}(g,(()=>[{message:"SVG data is malformed",meta:undefined}]));class l extends(a("BrandValidationError")){constructor(n,o){super(new Error(`Brand validation failed for type ${o}.`,{cause:n}))}}function g(n){if("string"!=typeof n)return!1;try{return"svg"===(new DOMParser).parseFromString(n,"image/svg+xml").documentElement.nodeName}catch{return!1}}const v=Symbol.for("LMVZ__iconProviderRegistry"),w={};function m(){return"undefined"==typeof window?w:window[v]??(window[v]={})}function p(n,o){const e=m(),t=n;Object.prototype.hasOwnProperty.call(e,t)&&console.warn(`Icon provider with name "${t}" is already registered. Overwriting existing provider.`),e[t]=o}function y(n){const o=m();if(n)return o[n];const e=Object.keys(o);if(0===e.length)return;e.length>1&&console.warn(`Multiple icon providers registered (${e.join(", ")}). Using the first one: "${e[0]}".`);const t=e[0];return t?o[t]:void 0}const $=()=>u('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>');async function h(n){const{icon:o,iconset:e}=n;return await(async()=>{const n=y(e);if(n)try{const t=await Promise.resolve(n.resolve(o));if(!t?.svg)return void console.warn(`Icon "${o}"${e?` from set "${e}"`:""} not found in provider. Using default icon.`);const r=await async function(n){try{return await d((o=n,c({try:()=>u(o),catch:n=>new l(n,"SVGString")})))}catch{return console.error("Invalid SVG string:",n),$()}var o}(t.svg);if(r)return r}catch(n){return void console.error(`Error resolving icon "${o}" with provider:`,n)}else console.warn(`No icon provider registered. Unable to resolve icon "${o}"${e?` from set "${e}"`:""}. Using default icon.`)})()||(console.error(`Icon "${o}" not found${e?` in set "${e}"`:""}. Using default icon.`),$())}function b(n,o){return{iconset:n,icon:o}}export{h as a,y as g,g as i,p as r,b as t}