@openlv/modal 0.0.1-beta.9 → 0.0.2

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 (120) hide show
  1. package/dist/ar-CyZSQ56p.js +25 -0
  2. package/dist/ar-CyZSQ56p.js.map +1 -0
  3. package/dist/ar-xpXGBcxc.cjs +3 -0
  4. package/dist/ar-xpXGBcxc.cjs.map +1 -0
  5. package/dist/components/Header.d.ts +3 -4
  6. package/dist/components/ModalRoot.d.ts +4 -3
  7. package/dist/components/UnknownState.d.ts +2 -3
  8. package/dist/components/footer/Footer.d.ts +1 -1
  9. package/dist/components/footer/StatusIndicator.d.ts +1 -1
  10. package/dist/components/settings/a11y/index.d.ts +1 -0
  11. package/dist/components/settings/a11y/theme.d.ts +1 -0
  12. package/dist/components/settings/connection/index.d.ts +4 -0
  13. package/dist/components/settings/connection/signaling.d.ts +1 -0
  14. package/dist/components/settings/connection/transport.d.ts +2 -0
  15. package/dist/components/settings/index.d.ts +12 -1
  16. package/dist/context.d.ts +8 -6
  17. package/dist/element.d.ts +4 -2
  18. package/dist/es-B9xaw9fo.cjs +3 -0
  19. package/dist/es-B9xaw9fo.cjs.map +1 -0
  20. package/dist/es-C2sG0TfH.js +25 -0
  21. package/dist/es-C2sG0TfH.js.map +1 -0
  22. package/dist/{fa-BLBJdY1Z.cjs → fa-DCpZYzOX.cjs} +3 -3
  23. package/dist/fa-DCpZYzOX.cjs.map +1 -0
  24. package/dist/fa-_bXJQdwj.js +25 -0
  25. package/dist/fa-_bXJQdwj.js.map +1 -0
  26. package/dist/flow/ConnectionFlow.d.ts +1 -1
  27. package/dist/flow/HandshakeOpen.d.ts +1 -4
  28. package/dist/flow/InfoScreen.d.ts +1 -1
  29. package/dist/flow/connecting.d.ts +1 -0
  30. package/dist/flow/disconnected/ConnectionGraphic.d.ts +1 -1
  31. package/dist/flow/disconnected/Disconnected.d.ts +2 -3
  32. package/dist/{fr-KRwPr2KB.js → fr-BRQDr1rj.js} +8 -8
  33. package/dist/fr-BRQDr1rj.js.map +1 -0
  34. package/dist/fr-D54ESMxz.cjs +3 -0
  35. package/dist/fr-D54ESMxz.cjs.map +1 -0
  36. package/dist/he-BWZyf3Uy.cjs +3 -0
  37. package/dist/he-BWZyf3Uy.cjs.map +1 -0
  38. package/dist/{he-BJ3Ukwed.js → he-NFIsHMZP.js} +6 -6
  39. package/dist/he-NFIsHMZP.js.map +1 -0
  40. package/dist/hooks/useConnectionState.d.ts +1 -1
  41. package/dist/hooks/useNavigationStack.d.ts +13 -0
  42. package/dist/hooks/usePunchTransition.d.ts +5 -4
  43. package/dist/hooks/useSession.d.ts +4 -4
  44. package/dist/hooks/useSettings.d.ts +13 -16
  45. package/dist/hooks/useTheme.d.ts +4 -0
  46. package/dist/index.cjs.js +6 -6
  47. package/dist/index.cjs.js.map +1 -1
  48. package/dist/index.d.ts +3 -4
  49. package/dist/index.es.js +4181 -1872
  50. package/dist/index.es.js.map +1 -1
  51. package/dist/modal.css +1 -1
  52. package/dist/nl-BRV9i3nM.js +24 -0
  53. package/dist/nl-BRV9i3nM.js.map +1 -0
  54. package/dist/nl-bCeoO8RU.cjs +2 -0
  55. package/dist/nl-bCeoO8RU.cjs.map +1 -0
  56. package/dist/{simple-9RmOY_8k.js → simple-CAAgvkQC.js} +42 -1
  57. package/dist/simple-CAAgvkQC.js.map +1 -0
  58. package/dist/{simple-DJcIRSvc.cjs → simple-DDht1UVo.cjs} +2 -2
  59. package/dist/simple-DDht1UVo.cjs.map +1 -0
  60. package/dist/styles/index.d.ts +5 -2
  61. package/dist/sv-BHh_RkLw.cjs +2 -0
  62. package/dist/sv-BHh_RkLw.cjs.map +1 -0
  63. package/dist/sv-CEyo-XBk.js +24 -0
  64. package/dist/sv-CEyo-XBk.js.map +1 -0
  65. package/dist/theme/index.d.ts +4 -3
  66. package/dist/theme/simple.d.ts +64 -0
  67. package/dist/theme/types.d.ts +6 -3
  68. package/dist/ui/Button.d.ts +12 -9
  69. package/dist/ui/InfoTooltip.d.ts +2 -2
  70. package/dist/ui/Input.d.ts +3 -3
  71. package/dist/ui/Select.d.ts +1 -2
  72. package/dist/ui/Toggle.d.ts +3 -3
  73. package/dist/ui/TransitionContainer.d.ts +9 -0
  74. package/dist/ui/menu/MenuGroup.d.ts +5 -5
  75. package/dist/ui/menu/MenuItem.d.ts +4 -4
  76. package/dist/ui/menu/MenuLink.d.ts +7 -0
  77. package/dist/utils/i18n.d.ts +8 -12
  78. package/dist/zh-cn-Bqo3eRaE.cjs +3 -0
  79. package/dist/zh-cn-Bqo3eRaE.cjs.map +1 -0
  80. package/dist/zh-cn-DJpfZdjA.js +25 -0
  81. package/dist/zh-cn-DJpfZdjA.js.map +1 -0
  82. package/package.json +14 -13
  83. package/dist/ar-BAmzpyRI.js +0 -25
  84. package/dist/ar-BAmzpyRI.js.map +0 -1
  85. package/dist/ar-C5DZ9iQ9.cjs +0 -3
  86. package/dist/ar-C5DZ9iQ9.cjs.map +0 -1
  87. package/dist/components/settings/ConnectionPreferences.d.ts +0 -1
  88. package/dist/components/settings/LanguageSettings.d.ts +0 -1
  89. package/dist/components/settings/Signaling.d.ts +0 -1
  90. package/dist/components/settings/Transport.d.ts +0 -1
  91. package/dist/es-DY71WoiL.js +0 -25
  92. package/dist/es-DY71WoiL.js.map +0 -1
  93. package/dist/es-DjIH1AOp.cjs +0 -3
  94. package/dist/es-DjIH1AOp.cjs.map +0 -1
  95. package/dist/fa-BLBJdY1Z.cjs.map +0 -1
  96. package/dist/fa-CZ8QQ_OY.js +0 -25
  97. package/dist/fa-CZ8QQ_OY.js.map +0 -1
  98. package/dist/fr-C0_FxuuR.cjs +0 -3
  99. package/dist/fr-C0_FxuuR.cjs.map +0 -1
  100. package/dist/fr-KRwPr2KB.js.map +0 -1
  101. package/dist/he-BJ3Ukwed.js.map +0 -1
  102. package/dist/he-CA2tm3_t.cjs +0 -3
  103. package/dist/he-CA2tm3_t.cjs.map +0 -1
  104. package/dist/hooks/useEventEmitter.d.ts +0 -2
  105. package/dist/hooks/useProvider.d.ts +0 -5
  106. package/dist/nl-BcUtTHZo.js +0 -24
  107. package/dist/nl-BcUtTHZo.js.map +0 -1
  108. package/dist/nl-CFDz2-OG.cjs +0 -2
  109. package/dist/nl-CFDz2-OG.cjs.map +0 -1
  110. package/dist/simple-9RmOY_8k.js.map +0 -1
  111. package/dist/simple-DJcIRSvc.cjs.map +0 -1
  112. package/dist/sv-BZZOE8bl.cjs +0 -2
  113. package/dist/sv-BZZOE8bl.cjs.map +0 -1
  114. package/dist/sv-jsZzNYT8.js +0 -24
  115. package/dist/sv-jsZzNYT8.js.map +0 -1
  116. package/dist/types/connection.d.ts +0 -13
  117. package/dist/zh-cn-B-g1waPO.js +0 -25
  118. package/dist/zh-cn-B-g1waPO.js.map +0 -1
  119. package/dist/zh-cn-WuPduNS4.cjs +0 -3
  120. package/dist/zh-cn-WuPduNS4.cjs.map +0 -1
package/dist/index.cjs.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";var qt=Object.defineProperty;var Jt=(e,t,r)=>t in e?qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var we=(e,t,r)=>Jt(e,typeof t!="symbol"?t+"":t,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("preact/jsx-runtime"),d=require("preact/hooks"),g=require("preact"),Qt=require("qrcode-generator");function Xt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Yt=Xt(Qt),Zt=1,$t=e=>{const t=new URLSearchParams;return t.set("h",e.h),t.set("k",e.k),e.p&&t.set("p",e.p),e.s&&t.set("s",e.s),`openlv://${e.sessionId}@${Zt}?${t.toString()}`};function er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var De={exports:{}},Ze;function tr(){return Ze||(Ze=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function a(c,u,f,p,C){if(typeof f!="function")throw new TypeError("The listener must be a function");var v=new o(f,p||c,C),w=r?r+u:u;return c._events[w]?c._events[w].fn?c._events[w]=[c._events[w],v]:c._events[w].push(v):(c._events[w]=v,c._eventsCount++),c}function i(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],f,p;if(this._eventsCount===0)return u;for(p in f=this._events)t.call(f,p)&&u.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},l.prototype.listeners=function(u){var f=r?r+u:u,p=this._events[f];if(!p)return[];if(p.fn)return[p.fn];for(var C=0,v=p.length,w=new Array(v);C<v;C++)w[C]=p[C].fn;return w},l.prototype.listenerCount=function(u){var f=r?r+u:u,p=this._events[f];return p?p.fn?1:p.length:0},l.prototype.emit=function(u,f,p,C,v,w){var P=r?r+u:u;if(!this._events[P])return!1;var h=this._events[P],D=arguments.length,L,m;if(h.fn){switch(h.once&&this.removeListener(u,h.fn,void 0,!0),D){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,f),!0;case 3:return h.fn.call(h.context,f,p),!0;case 4:return h.fn.call(h.context,f,p,C),!0;case 5:return h.fn.call(h.context,f,p,C,v),!0;case 6:return h.fn.call(h.context,f,p,C,v,w),!0}for(m=1,L=new Array(D-1);m<D;m++)L[m-1]=arguments[m];h.fn.apply(h.context,L)}else{var se=h.length,R;for(m=0;m<se;m++)switch(h[m].once&&this.removeListener(u,h[m].fn,void 0,!0),D){case 1:h[m].fn.call(h[m].context);break;case 2:h[m].fn.call(h[m].context,f);break;case 3:h[m].fn.call(h[m].context,f,p);break;case 4:h[m].fn.call(h[m].context,f,p,C);break;default:if(!L)for(R=1,L=new Array(D-1);R<D;R++)L[R-1]=arguments[R];h[m].fn.apply(h[m].context,L)}}return!0},l.prototype.on=function(u,f,p){return a(this,u,f,p,!1)},l.prototype.once=function(u,f,p){return a(this,u,f,p,!0)},l.prototype.removeListener=function(u,f,p,C){var v=r?r+u:u;if(!this._events[v])return this;if(!f)return i(this,v),this;var w=this._events[v];if(w.fn)w.fn===f&&(!C||w.once)&&(!p||w.context===p)&&i(this,v);else{for(var P=0,h=[],D=w.length;P<D;P++)(w[P].fn!==f||C&&!w[P].once||p&&w[P].context!==p)&&h.push(w[P]);h.length?this._events[v]=h.length===1?h[0]:h:i(this,v)}return this},l.prototype.removeAllListeners=function(u){var f;return u?(f=r?r+u:u,this._events[f]&&i(this,f)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(De)),De.exports}tr();const I=Symbol.for("@ts-pattern/matcher"),bt=Symbol.for("@ts-pattern/isVariadic"),Ce="@ts-pattern/anonymous-select-key",Fe=e=>!!(e&&typeof e=="object"),xe=e=>e&&!!e[I],T=(e,t,r)=>{if(xe(e)){const n=e[I](),{matched:o,selections:a}=n.match(t);return o&&a&&Object.keys(a).forEach(i=>r(i,a[i])),o}if(Fe(e)){if(!Fe(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],a=[];for(const i of e.keys()){const l=e[i];xe(l)&&l[bt]?a.push(l):a.length?o.push(l):n.push(l)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+o.length)return!1;const i=t.slice(0,n.length),l=o.length===0?[]:t.slice(-o.length),c=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((u,f)=>T(u,i[f],r))&&o.every((u,f)=>T(u,l[f],r))&&(a.length===0||T(a[0],c,r))}return e.length===t.length&&e.every((i,l)=>T(i,t[l],r))}return Reflect.ownKeys(e).every(n=>{const o=e[n];return(n in t||xe(a=o)&&a[I]().matcherType==="optional")&&T(o,t[n],r);var a})}return Object.is(t,e)},B=e=>{var t,r,n;return Fe(e)?xe(e)?(t=(r=(n=e[I]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?ue(e,B):ue(Object.values(e),B):[]},ue=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function rr(...e){if(e.length===1){const[t]=e;return r=>T(t,r,()=>{})}if(e.length===2){const[t,r]=e;return T(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function O(e){return Object.assign(e,{optional:()=>Je(e),and:t=>_(e,t),or:t=>yt(e,t),select:t=>t===void 0?de(e):de(t,e)})}function Me(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[bt]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var o;return(o=n[r++])!=null?o:n.at(-1)}}}}))(e),{optional:()=>Me(Je(e)),select:t=>Me(t===void 0?de(e):de(t,e))})}function Je(e){return O({[I]:()=>({match:t=>{let r={};const n=(o,a)=>{r[o]=a};return t===void 0?(B(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:T(e,t,n),selections:r}},getSelectionKeys:()=>B(e),matcherType:"optional"})})}const nr=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},or=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},ar=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function _(...e){return O({[I]:()=>({match:t=>{let r={};const n=(o,a)=>{r[o]=a};return{matched:e.every(o=>T(o,t,n)),selections:r}},getSelectionKeys:()=>ue(e,B),matcherType:"and"})})}function yt(...e){return O({[I]:()=>({match:t=>{let r={};const n=(o,a)=>{r[o]=a};return ue(e,B).forEach(o=>n(o,void 0)),{matched:e.some(o=>T(o,t,n)),selections:r}},getSelectionKeys:()=>ue(e,B),matcherType:"or"})})}function b(e){return{[I]:()=>({match:t=>({matched:!!e(t)})})}}function de(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return O({[I]:()=>({match:n=>{let o={[t??Ce]:n};return{matched:r===void 0||T(r,n,(a,i)=>{o[a]=i}),selections:o}},getSelectionKeys:()=>[t??Ce].concat(r===void 0?[]:B(r))})})}function wt(e){return!0}function G(e){return typeof e=="number"}function Q(e){return typeof e=="string"}function X(e){return typeof e=="bigint"}const xt=O(b(wt)),sr=O(b(wt)),ir=xt,Y=e=>Object.assign(O(e),{startsWith:t=>{return Y(_(e,(r=t,b(n=>Q(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Y(_(e,(r=t,b(n=>Q(n)&&n.endsWith(r)))));var r},minLength:t=>Y(_(e,(r=>b(n=>Q(n)&&n.length>=r))(t))),length:t=>Y(_(e,(r=>b(n=>Q(n)&&n.length===r))(t))),maxLength:t=>Y(_(e,(r=>b(n=>Q(n)&&n.length<=r))(t))),includes:t=>{return Y(_(e,(r=t,b(n=>Q(n)&&n.includes(r)))));var r},regex:t=>{return Y(_(e,(r=t,b(n=>Q(n)&&!!n.match(r)))));var r}}),$e=Y(b(Q)),W=e=>Object.assign(O(e),{between:(t,r)=>W(_(e,((n,o)=>b(a=>G(a)&&n<=a&&o>=a))(t,r))),lt:t=>W(_(e,(r=>b(n=>G(n)&&n<r))(t))),gt:t=>W(_(e,(r=>b(n=>G(n)&&n>r))(t))),lte:t=>W(_(e,(r=>b(n=>G(n)&&n<=r))(t))),gte:t=>W(_(e,(r=>b(n=>G(n)&&n>=r))(t))),int:()=>W(_(e,b(t=>G(t)&&Number.isInteger(t)))),finite:()=>W(_(e,b(t=>G(t)&&Number.isFinite(t)))),positive:()=>W(_(e,b(t=>G(t)&&t>0))),negative:()=>W(_(e,b(t=>G(t)&&t<0)))}),lr=W(b(G)),Z=e=>Object.assign(O(e),{between:(t,r)=>Z(_(e,((n,o)=>b(a=>X(a)&&n<=a&&o>=a))(t,r))),lt:t=>Z(_(e,(r=>b(n=>X(n)&&n<r))(t))),gt:t=>Z(_(e,(r=>b(n=>X(n)&&n>r))(t))),lte:t=>Z(_(e,(r=>b(n=>X(n)&&n<=r))(t))),gte:t=>Z(_(e,(r=>b(n=>X(n)&&n>=r))(t))),positive:()=>Z(_(e,b(t=>X(t)&&t>0))),negative:()=>Z(_(e,b(t=>X(t)&&t<0)))}),cr=Z(b(X)),ur=O(b(function(e){return typeof e=="boolean"})),dr=O(b(function(e){return typeof e=="symbol"})),fr=O(b(function(e){return e==null})),gr=O(b(function(e){return e!=null}));var kt={__proto__:null,matcher:I,optional:Je,array:function(...e){return Me({[I]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return B(r).forEach(a=>{n[a]=[]}),{matched:!0,selections:n};const o=(a,i)=>{n[a]=(n[a]||[]).concat([i])};return{matched:t.every(a=>T(r,a,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:B(e[0])})})},set:function(...e){return O({[I]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(a,i)=>{r[a]=(r[a]||[]).concat([i])},o=e[0];return{matched:nr(t,a=>T(o,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:B(e[0])})})},map:function(...e){return O({[I]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(l,c)=>{r[l]=(r[l]||[]).concat([c])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[a,i]=e;return{matched:or(t,(l,c)=>{const u=T(a,c,n),f=T(i,l,n);return u&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...B(e[0]),...B(e[1])]})})},record:function(...e){return O({[I]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const o=(l,c)=>{n[l]=(n[l]||[]).concat([c])},[a,i]=e.length===1?[$e,e[0]]:e;return{matched:ar(t,(l,c)=>{const u=typeof l!="string"||Number.isNaN(Number(l))?null:Number(l),f=u!==null&&T(a,u,o),p=T(a,l,o),C=T(i,c,o);return(p||f)&&C}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...B(e[0]),...B(e[1])]})})},intersection:_,union:yt,not:function(e){return O({[I]:()=>({match:t=>({matched:!T(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:b,select:de,any:xt,unknown:sr,_:ir,string:$e,number:lr,bigint:cr,boolean:ur,symbol:dr,nullish:fr,nonNullable:gr,instanceOf:function(e){return O(b((function(t){return r=>r instanceof t})(e)))},shape:function(e){return O(b(rr(e)))}};let pr=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}};const ze={matched:!1,value:void 0};function U(e){return new hr(e,ze)}let hr=class Ge{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let a=!1,i={};const l=(u,f)=>{a=!0,i[u]=f},c=!n.some(u=>T(u,this.input,l))||o&&!o(this.input)?ze:{matched:!0,value:r(a?Ce in i?i[Ce]:i:this.input,this.input)};return new Ge(this.input,c)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Ge(this.input,n?{matched:!0,value:r(this.input,this.input)}:ze)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=vr){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function vr(e){throw new pr(e)}const ne={STANDBY:"standby",CONNECTING:"connecting",READY:"ready",HANDSHAKE:"handshake",HANDSHAKE_PARTIAL:"handshake-partial",ENCRYPTED:"encrypted"},oe={CREATED:"created",SIGNALING:"signaling",READY:"ready",LINKING:"linking",CONNECTED:"connected",DISCONNECTED:"disconnected"},ee={STANDBY:"standby",CREATING:"creating",CONNECTING:"connecting",CONNECTED:"connected",ERROR:"error"};var Le={exports:{}};var et;function mr(){return et||(et=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(a=o(a,n(l)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var l in a)t.call(a,l)&&a[l]&&(i=o(i,l));return i}function o(a,i){return i?a?a+" "+i:a+i:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Le)),Le.exports}var br=mr();const ae=er(br),yr={close:"Close",yes:"Yes",no:"No",protocol:"Protocol"},wr={connectedSuccessfully:"Connected Successfully!",connecting:"Connecting",ready:"Ready",handshakeClosed:"Handshake Closed",handshakePartial:"Handshake Partial",encrypted:"Encrypted",signalError:"Signal Error",disconnected:"Disconnected"},xr={title:"Settings",language:"Language",connectionPreferences:{title:"Connection preferences",retainSessionHistory:"Retain session history",autoReconnect:"Auto reconnect"},signaling:{title:"Signaling",description:"Signaling is the handshake protocol used to establish a connection.",server:"Server",serverUrl:"Server URL"},transport:{title:"Transport",description:"This is how the connection is maintained.",webrtc:"WebRTC"}},kr={title:"Connect Wallet"},Cr={title:"What is openlv?",scanQrCode:"Scan QR Code",approveOnDevice:"Approve on device",youreConnected:"You're connected!"},_r={prompt:"Click the button below to start a connection",generateQr:"Generate QR",connectionSettings:"Connection settings"},Nr={preparingConnection:"Preparing connection",generatingKeys:"Generating keys...",connecting:"Connecting",waitingForNetwork:"Waiting for network connection...",establishingConnection:"Establishing connection...",mayTakeFewSeconds:"This may take a few seconds...",connectedSuccessfully:"Connected Successfully!",walletConnectedReady:"Your wallet is now connected and ready to use.",disconnected:"Disconnected",connectionClosed:"The connection has been closed."},Sr={clickToCopyUrl:"Click to copy connection URL",copyConnectionUrl:"Copy Connection URL",scanCodeInstruction:`Scan the code above using your mobile wallet.
2
- Or copy the link and paste it into your wallet.`},jr={urlCopied:"Connection URL copied to clipboard!",backToQr:"Back to QR",closeModal:"Close modal"},Ar={common:yr,status:wr,settings:xr,start:kr,info:Cr,disconnected:_r,connectionFlow:Nr,handshake:Sr,modal:jr},Qe=[{tag:"en",name:"English",nativeName:"English"},{tag:"nl",name:"Dutch",nativeName:"Nederlands"},{tag:"es",name:"Spanish",nativeName:"Español"},{tag:"sv",name:"Swedish",nativeName:"Svenska"},{tag:"zh-cn",name:"Chinese (Simplified)",nativeName:"简体中文"},{tag:"fr",name:"French",nativeName:"Français"},{tag:"ar",name:"Arabic",nativeName:"العربية",rtl:!0},{tag:"he",name:"Hebrew",nativeName:"עברית",rtl:!0},{tag:"fa",name:"Persian",nativeName:"فارسی",rtl:!0}],Er=e=>Qe.find(r=>r.tag===e)?.rtl??!1,tt=Qe.map(e=>e.tag),Tr=()=>{if(typeof navigator>"u")return"en";const e=navigator.languages||[navigator.language];for(const t of e){const r=t.toLowerCase();if(tt.includes(r))return r;if(r==="zh"||r.startsWith("zh-hans")||r.startsWith("zh-cn"))return"zh-cn";const[n]=r.split("-");if(tt.includes(n))return n}return"en"},rt=e=>{if(typeof navigator>"u")return 0;const t=navigator.languages||[navigator.language];for(let r=0;r<t.length;r++){const n=t[r].toLowerCase();if(n===e)return t.length-r+1;if(n.startsWith(`${e}-`)||e.startsWith(`${n}-`))return t.length-r;const[o]=n.split("-");if(o===e||e.startsWith(`${o}-`))return t.length-r-.5}return 0},nt=(e,t)=>{if(!e)return;const r=t.split(".").filter(Boolean);if(r.length===0)return;let n=e;for(const o of r){if(typeof n!="object"||n===null)return;n=n[o]}return n},ot=(e,t)=>t?e.replace(/\{(\w+)\}/g,(r,n)=>{const o=t[n];return o===void 0?r:String(o)}):e,Or=e=>{const t=nt(e.primary,e.key);if(typeof t=="string")return ot(t,e.params);const r=nt(e.fallback,e.key);return typeof r=="string"?ot(r,e.params):e.key},Ct=g.createContext(null),Rr=async e=>U(e).with("en",()=>Promise.resolve(null)).with("nl",async()=>Promise.resolve().then(()=>require("./nl-CFDz2-OG.cjs")).then(t=>t.default)).with("es",async()=>Promise.resolve().then(()=>require("./es-DjIH1AOp.cjs")).then(t=>t.default)).with("sv",async()=>Promise.resolve().then(()=>require("./sv-BZZOE8bl.cjs")).then(t=>t.default)).with("fr",async()=>Promise.resolve().then(()=>require("./fr-C0_FxuuR.cjs")).then(t=>t.default)).with("zh-cn",async()=>Promise.resolve().then(()=>require("./zh-cn-WuPduNS4.cjs")).then(t=>t.default)).with("ar",async()=>Promise.resolve().then(()=>require("./ar-C5DZ9iQ9.cjs")).then(t=>t.default)).with("he",async()=>Promise.resolve().then(()=>require("./he-CA2tm3_t.cjs")).then(t=>t.default)).with("fa",async()=>Promise.resolve().then(()=>require("./fa-BLBJdY1Z.cjs")).then(t=>t.default)).exhaustive(),Pr=({children:e,initialLanguageTag:t="en"})=>{const[r,n]=d.useState(t),[o,a]=d.useState(null),[i,l]=d.useState(!1);d.useEffect(()=>{let p=!1;return(async()=>{l(!0);try{const v=await Rr(r);if(p)return;a(v)}finally{p||l(!1)}})(),()=>{p=!0}},[r]);const c=d.useCallback((p,C)=>Or({primary:o,fallback:Ar,key:p,params:C}).split(`
3
- `).map((v,w)=>[v,s.jsx("br",{},w)]),[o]),u=d.useMemo(()=>Er(r),[r]),f=d.useMemo(()=>({languageTag:r,setLanguageTag:n,isLoadingLanguagePack:i,isRtl:u,t:c}),[i,u,r,c]);return s.jsx(Ct.Provider,{value:f,children:e})},M=()=>{const e=d.useContext(Ct);if(!e)throw new Error("TranslationProvider not found");return e},_t=g.createContext({provider:void 0}),Dr=e=>{const t=e?.storage.getSettings().language;return t||Tr()},Lr=({provider:e,onClose:t})=>{const r=d.useMemo(()=>Dr(e),[e]);return s.jsx(Pr,{initialLanguageTag:r,children:s.jsx(_t.Provider,{value:{provider:e},children:s.jsx(Wt,{onClose:t})})})},Br=()=>{const e=d.useContext(_t);if(!e.provider)throw new Error("Provider not found");return e},ge=()=>{const{provider:e}=Br(),[t,r]=d.useState(e?.getState().status||ee.ERROR);if(d.useEffect(()=>{const n=a=>{r(a)};e?.on("status_change",n);const o=e?.getState().status;return o&&r(o),()=>{e?.off("status_change",n)}},[e]),!e)throw new Error("Provider not found");return{provider:e,status:t}},Xe=(...e)=>console.log("%c[modal]%c","color: yellow; font-weight: bold","color: inherit; font-weight: normal",...e),Nt=(e,t,r)=>{d.useEffect(()=>(e?.on(t,r),()=>{e?.off(t,r)}),[e,t])},je=()=>{const{provider:e}=ge(),[t,r]=d.useState(e?.storage.getSettings());Nt(e?.storage.emitter,"settings_change",c=>{r(c)});const n=c=>{if(!t||t.signaling?.p===c)return;const u={...t,signaling:{...t.signaling,p:c}};r(u),e?.storage.setSettings(u)},o=c=>{if(!t||t.signaling?.s[t.signaling?.p]===c)return;const u={...t,signaling:{...t.signaling,s:{...t.signaling.s,[t.signaling.p]:c}}};r(u),e?.storage.setSettings(u)},a=c=>{t&&(r({...t,retainHistory:c}),e?.storage.setSettings({...t,retainHistory:c}))},i=c=>{t&&(r({...t,autoReconnect:c}),e?.storage.setSettings({...t,autoReconnect:c}))},l=c=>{t&&(r({...t,language:c}),e?.storage.setSettings({...t,language:c}))};if(!t)throw new Error("Settings not found");return{settings:t,updateSignalingProtocol:n,updateSignalingServer:o,updateRetainHistory:a,updateAutoReconnect:i,updateLanguage:l}},pe=()=>{const{provider:e}=ge(),[t,r]=d.useState(e?.getSession()),n=t?.getHandshakeParameters(),o=n?$t(n):void 0,[a,i]=d.useState(t?.getState());return Nt(t?.emitter,"state_change",l=>{Xe("session state change: ",l),i(l)}),d.useEffect(()=>{const l=()=>{const u=e?.getSession();u&&r(u)};e?.on("status_change",l);const c=e?.getSession();return c&&r(c),()=>{e?.off("status_change",l)}},[e]),d.useEffect(()=>{const l=c=>{r(c),i(c.getState())};return e?.on("session_started",l),()=>{e?.off("session_started",l)}},[e]),d.useEffect(()=>{t&&i(t.getState())},[t]),{uri:o,status:a}},Ir=()=>{const{provider:e}=ge(),{settings:t}=je();return{start:()=>{const r=t?.signaling?.p,n=t?.signaling?.s[r];if(!r||!n)throw new Error("Invalid protocol or server");return e?.createSession({p:r,s:n})}}},We=({state:e})=>{const{status:t,uri:r}=pe(),{status:n}=ge();return console.error("Unknown state: ",{state:e,sessionStatus:t,providerStatus:n}),s.jsxs("div",{className:"rounded-md bg-(--lv-control-button-secondary-background) p-2 text-(--lv-text-muted)",children:[s.jsxs("div",{children:["Unknown state: ",JSON.stringify(e)]}),s.jsxs("div",{children:["URI: ",r]}),s.jsxs("div",{children:["Session Status: ",JSON.stringify(t)]}),s.jsxs("div",{children:["Provider Status: ",JSON.stringify(n)]})]})},Vr=({onCopy:e})=>{const{t}=M(),{uri:r}=pe(),n=d.useCallback(()=>{r&&e(r)},[r,e]),o=d.useCallback(a=>{const i=Yt.default,l=i(0,"M");return l.addData(a),l.make(),l.createSvgTag({cellSize:5,margin:0,scalable:!0})},[]);return s.jsxs("div",{className:"flex flex-col items-center gap-4 px-2",children:[s.jsxs("div",{className:"w-full space-y-4 rounded-md border border-(--lv-control-button-secondary-border) bg-(--lv-card-background) p-4",children:[r&&s.jsx("div",{className:"relative mx-auto flex w-fit items-center justify-center rounded-lg border border-(--lv-control-button-secondary-border) bg-(--lv-qr-background) p-4",children:s.jsx("button",{className:"h-[200px] w-[200px] cursor-pointer rounded bg-(--lv-qr-background) text-(--lv-qr-color)",onClick:n,title:t("handshake.clickToCopyUrl"),dangerouslySetInnerHTML:{__html:o(r)}})}),s.jsx("div",{className:"w-full",children:s.jsx("button",{type:"button",onClick:n,className:"w-full cursor-pointer rounded-lg border border-(--lv-control-button-secondary-border) bg-(--lv-control-button-secondary-background) px-4 py-2 text-sm text-(--lv-text-primary) transition hover:bg-(--lv-control-button-secondary-hoverBackground) active:bg-(--lv-control-button-secondary-activeBackground)",children:t("handshake.copyConnectionUrl")})})]}),s.jsx("div",{className:"w-full text-sm text-(--lv-text-secondary)",children:s.jsx("span",{children:t("handshake.scanCodeInstruction")})})]})},Fr=()=>typeof document<"u"&&"startViewTransition"in document,Mr=e=>{Fr()?document.startViewTransition(e):e()},Be=()=>s.jsx("div",{className:"flex items-center justify-center",children:s.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent"})}),E={CREATING:"creating",CONNECTING:"connecting",READY:"ready",LINKING:"linking",CONNECTED:"connected",DISCONNECTED:"disconnected",ERROR:"error"},zr=e=>{const[t,r]=d.useState(e),n=d.useRef(e);return d.useEffect(()=>{e!==n.current&&Mr(()=>{r(e),n.current=e})},[e]),{displayState:t}},Gr=e=>e?U(e).with({status:oe.CREATED},()=>E.CREATING).with({status:oe.SIGNALING,signaling:kt.select()},t=>U(t).with({state:ne.STANDBY},()=>E.CONNECTING).with({state:ne.CONNECTING},()=>E.CONNECTING).with({state:ne.READY},()=>E.READY).with({state:ne.HANDSHAKE},()=>E.LINKING).with({state:ne.HANDSHAKE_PARTIAL},()=>E.LINKING).with({state:ne.ENCRYPTED},()=>E.CONNECTED).otherwise(()=>E.CONNECTING)).with({status:oe.READY},()=>E.READY).with({status:oe.LINKING},()=>E.LINKING).with({status:oe.CONNECTED},()=>E.CONNECTED).with({status:oe.DISCONNECTED},()=>E.DISCONNECTED).otherwise(()=>E.ERROR):E.CONNECTING,Wr=({onClose:e,onCopy:t})=>{const{t:r}=M(),{status:n}=pe(),{displayState:o}=zr(Gr(n));return s.jsx("div",{style:{viewTransitionName:"connection-flow"},className:"w-full",children:U(o).with(E.CREATING,()=>s.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[s.jsx(Be,{}),s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"mb-2 font-semibold text-(--lv-text-primary) text-lg",children:r("connectionFlow.preparingConnection")}),s.jsx("p",{className:"text-(--lv-text-muted) text-sm",children:r("connectionFlow.generatingKeys")})]})]})).with(E.CONNECTING,()=>s.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[s.jsx(Be,{}),s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"mb-2 font-semibold text-(--lv-text-primary) text-lg",children:r("connectionFlow.connecting")}),s.jsx("p",{className:"text-(--lv-text-muted) text-sm",children:r("connectionFlow.waitingForNetwork")})]})]})).with(E.READY,()=>s.jsx(Vr,{onCopy:t})).with(E.LINKING,()=>s.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[s.jsx(Be,{}),s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"mb-2 font-semibold text-(--lv-text-primary) text-lg",children:r("connectionFlow.establishingConnection")}),s.jsx("p",{className:"text-(--lv-text-muted) text-sm",children:r("connectionFlow.mayTakeFewSeconds")})]})]})).with(E.CONNECTED,()=>s.jsx("div",{className:"flex flex-col items-center gap-4 p-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"mb-4 text-4xl",children:"✅"}),s.jsx("h3",{className:"mb-2 font-semibold text-(--lv-text-primary) text-lg",children:r("connectionFlow.connectedSuccessfully")}),s.jsx("p",{className:"text-(--lv-text-muted) text-sm",children:r("connectionFlow.walletConnectedReady")})]})})).with(E.DISCONNECTED,()=>s.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"mb-4 text-4xl",children:"🔌"}),s.jsx("h3",{className:"mb-2 font-semibold text-(--lv-text-primary) text-lg",children:r("connectionFlow.disconnected")}),s.jsx("p",{className:"mb-4 text-(--lv-text-muted) text-sm",children:r("connectionFlow.connectionClosed")})]}),s.jsx("button",{type:"button",onClick:e,className:"w-full rounded-lg bg-(--lv-control-button-secondary-background) px-4 py-2 font-semibold text-(--lv-text-primary) text-sm transition hover:bg-(--lv-control-button-primary-background-hover)",children:r("common.close")})]})).otherwise(()=>s.jsx(We,{state:n}))})};function St(e,t){for(var r in t)e[r]=t[r];return e}function Ue(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function jt(e,t){var r=t(),n=d.useState({t:{__:r,u:t}}),o=n[0].t,a=n[1];return d.useLayoutEffect(function(){o.__=r,o.u=t,Ie(o)&&a({t:o})},[e,r,t]),d.useEffect(function(){return Ie(o)&&a({t:o}),e(function(){Ie(o)&&a({t:o})})},[e]),r}function Ie(e){var t,r,n=e.u,o=e.__;try{var a=n();return!((t=o)===(r=a)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}function At(e){e()}function Et(e){return e}function Tt(){return[!1,At]}var Ot=d.useLayoutEffect;function He(e,t){this.props=e,this.context=t}function Ur(e,t){function r(o){var a=this.props.ref,i=a==o.ref;return!i&&a&&(a.call?a(null):a.current=null),t?!t(this.props,o)||!i:Ue(this.props,o)}function n(o){return this.shouldComponentUpdate=r,g.createElement(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n.type=e,n}(He.prototype=new g.Component).isPureReactComponent=!0,He.prototype.shouldComponentUpdate=function(e,t){return Ue(this.props,e)||Ue(this.state,t)};var at=g.options.__b;g.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),at&&at(e)};var Hr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Kr(e){function t(r){var n=St({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Hr,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var st=function(e,t){return e==null?null:g.toChildArray(g.toChildArray(e).map(t))},qr={map:st,forEach:st,count:function(e){return e?g.toChildArray(e).length:0},only:function(e){var t=g.toChildArray(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:g.toChildArray},Jr=g.options.__e;g.options.__e=function(e,t,r,n){if(e.then){for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}Jr(e,t,r,n)};var it=g.options.unmount;function Rt(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=St({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Rt(n,t,r)})),e}function Pt(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Pt(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function ke(){this.__u=0,this.o=null,this.__b=null}function Dt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Qr(e){var t,r,n,o=null;function a(i){if(t||(t=e()).then(function(l){l&&(o=l.default||l),n=!0},function(l){r=l,n=!0}),r)throw r;if(!n)throw t;return o?g.createElement(o,i):null}return a.displayName="Lazy",a.__f=!0,a}function le(){this.i=null,this.l=null}g.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),it&&it(e)},(ke.prototype=new g.Component).__c=function(e,t){var r=t.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var o=Dt(n.__v),a=!1,i=function(){a||(a=!0,r.__R=null,o?o(l):l())};r.__R=i;var l=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=Pt(c,c.__c.__P,c.__c.__O)}var u;for(n.setState({__a:n.__b=null});u=n.o.pop();)u.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(i,i)},ke.prototype.componentWillUnmount=function(){this.o=[]},ke.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Rt(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&g.createElement(g.Fragment,null,e.fallback);return o&&(o.__u&=-33),[g.createElement(g.Fragment,null,t.__a?null:e.children),o]};var lt=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};function Xr(e){return this.getChildContext=function(){return e.context},e.children}function Yr(e){var t=this,r=e.h;if(t.componentWillUnmount=function(){g.render(null,t.v),t.v=null,t.h=null},t.h&&t.h!==r&&t.componentWillUnmount(),!t.v){for(var n=t.__v;n!==null&&!n.__m&&n.__!==null;)n=n.__;t.h=r,t.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:n.__m},contains:function(){return!0},insertBefore:function(o,a){this.childNodes.push(o),t.h.insertBefore(o,a)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.h.removeChild(o)}}}g.render(g.createElement(Xr,{context:t.context},e.__v),t.v)}function Zr(e,t){var r=g.createElement(Yr,{__v:e,h:t});return r.containerInfo=t,r}(le.prototype=new g.Component).__a=function(e){var t=this,r=Dt(t.__v),n=t.l.get(e);return n[0]++,function(o){var a=function(){t.props.revealOrder?(n.push(o),lt(t,e,n)):o()};r?r(a):a()}},le.prototype.render=function(e){this.i=null,this.l=new Map;var t=g.toChildArray(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},le.prototype.componentDidUpdate=le.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){lt(e,r,t)})};var Lt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,$r=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,en=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,tn=/[A-Z0-9]/g,rn=typeof document<"u",nn=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function on(e,t,r){return t.__k==null&&(t.textContent=""),g.render(e,t),typeof r=="function"&&r(),e?e.__c:null}function an(e,t,r){return g.hydrate(e,t),typeof r=="function"&&r(),e?e.__c:null}g.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(g.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ct=g.options.event;function sn(){}function ln(){return this.cancelBubble}function cn(){return this.defaultPrevented}g.options.event=function(e){return ct&&(e=ct(e)),e.persist=sn,e.isPropagationStopped=ln,e.isDefaultPrevented=cn,e.nativeEvent=e};var Ye,un={enumerable:!1,configurable:!0,get:function(){return this.class}},ut=g.options.vnode;g.options.vnode=function(e){typeof e.type=="string"&&(function(t){var r=t.props,n=t.type,o={},a=n.indexOf("-")===-1;for(var i in r){var l=r[i];if(!(i==="value"&&"defaultValue"in r&&l==null||rn&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var c=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&l===!0?l="":c==="translate"&&l==="no"?l=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?i="ondblclick":c!=="onchange"||n!=="input"&&n!=="textarea"||nn(r.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":en.test(i)&&(i=c):c=i="oninput":a&&$r.test(i)?i=i.replace(tn,"-$&").toLowerCase():l===null&&(l=void 0),c==="oninput"&&o[i=c]&&(i="oninputCapture"),o[i]=l}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=g.toChildArray(r.children).forEach(function(u){u.props.selected=o.value.indexOf(u.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=g.toChildArray(r.children).forEach(function(u){u.props.selected=o.multiple?o.defaultValue.indexOf(u.props.value)!=-1:o.defaultValue==u.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",un)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o})(e),e.$$typeof=Lt,ut&&ut(e)};var dt=g.options.__r;g.options.__r=function(e){dt&&dt(e),Ye=e.__c};var ft=g.options.diffed;g.options.diffed=function(e){ft&&ft(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),Ye=null};var dn={ReactCurrentDispatcher:{current:{readContext:function(e){return Ye.__n[e.__c].props.value},useCallback:d.useCallback,useContext:d.useContext,useDebugValue:d.useDebugValue,useDeferredValue:Et,useEffect:d.useEffect,useId:d.useId,useImperativeHandle:d.useImperativeHandle,useInsertionEffect:Ot,useLayoutEffect:d.useLayoutEffect,useMemo:d.useMemo,useReducer:d.useReducer,useRef:d.useRef,useState:d.useState,useSyncExternalStore:jt,useTransition:Tt}}};function fn(e){return g.createElement.bind(null,e)}function Ae(e){return!!e&&e.$$typeof===Lt}function gn(e){return Ae(e)&&e.type===g.Fragment}function pn(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function hn(e){return Ae(e)?g.cloneElement.apply(null,arguments):e}function vn(e){return!!e.__k&&(g.render(null,e),!0)}function mn(e){return e&&(e.base||e.nodeType===1&&e)||null}var bn=function(e,t){return e(t)},yn=function(e,t){return e(t)},wn=g.Fragment,xn=Ae,te={useState:d.useState,useId:d.useId,useReducer:d.useReducer,useEffect:d.useEffect,useLayoutEffect:d.useLayoutEffect,useInsertionEffect:Ot,useTransition:Tt,useDeferredValue:Et,useSyncExternalStore:jt,startTransition:At,useRef:d.useRef,useImperativeHandle:d.useImperativeHandle,useMemo:d.useMemo,useCallback:d.useCallback,useContext:d.useContext,useDebugValue:d.useDebugValue,version:"18.3.1",Children:qr,render:on,hydrate:an,unmountComponentAtNode:vn,createPortal:Zr,createElement:g.createElement,createContext:g.createContext,createFactory:fn,cloneElement:hn,createRef:g.createRef,Fragment:g.Fragment,isValidElement:Ae,isElement:xn,isFragment:gn,isMemo:pn,findDOMNode:mn,Component:g.Component,PureComponent:He,memo:Ur,forwardRef:Kr,flushSync:yn,unstable_batchedUpdates:bn,StrictMode:wn,Suspense:ke,SuspenseList:le,lazy:Qr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:dn},Bt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gt=te.createContext&&te.createContext(Bt),kn=["attr","size","title"];function Cn(e,t){if(e==null)return{};var r=_n(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _n(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _e(){return _e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_e.apply(this,arguments)}function pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pt(Object(r),!0).forEach(function(n){Nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nn(e,t,r){return t=Sn(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sn(e){var t=jn(e,"string");return typeof t=="symbol"?t:t+""}function jn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function It(e){return e&&e.map((t,r)=>te.createElement(t.tag,Ne({key:r},t.attr),It(t.child)))}function Ee(e){return t=>te.createElement(An,_e({attr:Ne({},e.attr)},t),It(e.child))}function An(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=Cn(e,kn),l=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),te.createElement("svg",_e({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:c,style:Ne(Ne({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&te.createElement("title",null,a),e.children)};return gt!==void 0?te.createElement(gt.Consumer,null,r=>t(r)):t(Bt)}function En(e){return Ee({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416.3 256c0-21 13.1-38.9 31.7-46.1-4.9-20.5-13-39.7-23.7-57.1-6.4 2.8-13.2 4.3-20.1 4.3-12.6 0-25.2-4.8-34.9-14.4-14.9-14.9-18.2-36.8-10.2-55-17.3-10.7-36.6-18.8-57-23.7C295 82.5 277 95.7 256 95.7S217 82.5 209.9 64c-20.5 4.9-39.7 13-57.1 23.7 8.1 18.1 4.7 40.1-10.2 55-9.6 9.6-22.3 14.4-34.9 14.4-6.9 0-13.7-1.4-20.1-4.3C77 170.3 68.9 189.5 64 210c18.5 7.1 31.7 25 31.7 46.1 0 21-13.1 38.9-31.6 46.1 4.9 20.5 13 39.7 23.7 57.1 6.4-2.8 13.2-4.2 20-4.2 12.6 0 25.2 4.8 34.9 14.4 14.8 14.8 18.2 36.8 10.2 54.9 17.4 10.7 36.7 18.8 57.1 23.7 7.1-18.5 25-31.6 46-31.6s38.9 13.1 46 31.6c20.5-4.9 39.7-13 57.1-23.7-8-18.1-4.6-40 10.2-54.9 9.6-9.6 22.2-14.4 34.9-14.4 6.8 0 13.7 1.4 20 4.2 10.7-17.4 18.8-36.7 23.7-57.1-18.4-7.2-31.6-25.1-31.6-46.2zm-159.4 79.9c-44.3 0-80-35.9-80-80s35.7-80 80-80 80 35.9 80 80-35.7 80-80 80z"},child:[]}]})(e)}var Tn=/\s+/g,On=e=>typeof e!="string"||!e?e:e.replace(Tn," ").trim(),Se=(...e)=>{const t=[],r=n=>{if(!n&&n!==0&&n!==0n)return;if(Array.isArray(n)){for(let a=0,i=n.length;a<i;a++)r(n[a]);return}const o=typeof n;if(o==="string"||o==="number"||o==="bigint"){if(o==="number"&&n!==n)return;t.push(String(n))}else if(o==="object"){const a=Object.keys(n);for(let i=0,l=a.length;i<l;i++){const c=a[i];n[c]&&t.push(c)}}};for(let n=0,o=e.length;n<o;n++){const a=e[n];a!=null&&r(a)}return t.length>0?On(t.join(" ")):void 0},ht=e=>e===!1?"false":e===!0?"true":e===0?"0":e,V=e=>{if(!e||typeof e!="object")return!0;for(const t in e)return!1;return!0},Rn=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const a=r[o];if(!n.includes(a)||e[a]!==t[a])return!1}return!0},Pn=(e,t)=>{for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const n=t[r];r in e?e[r]=Se(e[r],n):e[r]=n}return e},Vt=(e,t)=>{for(let r=0;r<e.length;r++){const n=e[r];Array.isArray(n)?Vt(n,t):n&&t.push(n)}},Ft=(...e)=>{const t=[];Vt(e,t);const r=[];for(let n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},Ke=(e,t)=>{const r={};for(const n in e){const o=e[n];if(n in t){const a=t[n];Array.isArray(o)||Array.isArray(a)?r[n]=Ft(a,o):typeof o=="object"&&typeof a=="object"&&o&&a?r[n]=Ke(o,a):r[n]=a+" "+o}else r[n]=o}for(const n in t)n in e||(r[n]=t[n]);return r},Dn={twMerge:!0,twMergeConfig:{}};function Ln(){let e=null,t={},r=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(n){e=n},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(n){t=n},get didTwMergeConfigChange(){return r},set didTwMergeConfigChange(n){r=n},reset(){e=null,t={},r=!1}}}var Ve=Ln(),Bn=e=>{const t=(n,o)=>{const{extend:a=null,slots:i={},variants:l={},compoundVariants:c=[],compoundSlots:u=[],defaultVariants:f={}}=n,p={...Dn,...o},C=a?.base?Se(a.base,n?.base):n?.base,v=a?.variants&&!V(a.variants)?Ke(l,a.variants):l,w=a?.defaultVariants&&!V(a.defaultVariants)?{...a.defaultVariants,...f}:f;!V(p.twMergeConfig)&&!Rn(p.twMergeConfig,Ve.cachedTwMergeConfig)&&(Ve.didTwMergeConfigChange=!0,Ve.cachedTwMergeConfig=p.twMergeConfig);const P=V(a?.slots),h=V(i)?{}:{base:Se(n?.base,P&&a?.base),...i},D=P?h:Pn({...a?.slots},V(h)?{base:n?.base}:h),L=V(a?.compoundVariants)?c:Ft(a?.compoundVariants,c),m=R=>{if(V(v)&&V(i)&&P)return e(C,R?.class,R?.className)(p);if(L&&!Array.isArray(L))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof L}`);if(u&&!Array.isArray(u))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof u}`);const he=(y,k=v,x=null,N=null)=>{const S=k[y];if(!S||V(S))return null;const j=N?.[y]??R?.[y];if(j===null)return null;const A=ht(j);if(typeof A=="object")return null;const z=w?.[y],F=A??ht(z);return S[F||"false"]},ve=()=>{if(!v)return null;const y=Object.keys(v),k=[];for(let x=0;x<y.length;x++){const N=he(y[x],v);N&&k.push(N)}return k},$=(y,k)=>{if(!v||typeof v!="object")return null;const x=[];for(const N in v){const S=he(N,v,y,k),j=y==="base"&&typeof S=="string"?S:S&&S[y];j&&x.push(j)}return x},q={};for(const y in R){const k=R[y];k!==void 0&&(q[y]=k)}const me=(y,k)=>{const x=typeof R?.[y]=="object"?{[y]:R[y]?.initial}:{};return{...w,...q,...x,...k}},ie=(y=[],k)=>{const x=[],N=y.length;for(let S=0;S<N;S++){const{class:j,className:A,...z}=y[S];let F=!0;const H=me(null,k);for(const re in z){const K=z[re],ye=H[re];if(Array.isArray(K)){if(!K.includes(ye)){F=!1;break}}else{if((K==null||K===!1)&&(ye==null||ye===!1))continue;if(ye!==K){F=!1;break}}}F&&(j&&x.push(j),A&&x.push(A))}return x},J=y=>{const k=ie(L,y);if(!Array.isArray(k))return k;const x={},N=e;for(let S=0;S<k.length;S++){const j=k[S];if(typeof j=="string")x.base=N(x.base,j)(p);else if(typeof j=="object")for(const A in j)x[A]=N(x[A],j[A])(p)}return x},be=y=>{if(u.length<1)return null;const k={},x=me(null,y);for(let N=0;N<u.length;N++){const{slots:S=[],class:j,className:A,...z}=u[N];if(!V(z)){let F=!0;for(const H in z){const re=x[H],K=z[H];if(re===void 0||(Array.isArray(K)?!K.includes(re):K!==re)){F=!1;break}}if(!F)continue}for(let F=0;F<S.length;F++){const H=S[F];k[H]||(k[H]=[]),k[H].push([j,A])}}return k};if(!V(i)||!P){const y={};if(typeof D=="object"&&!V(D)){const k=e;for(const x in D)y[x]=N=>{const S=J(N),j=be(N);return k(D[x],$(x,N),S?S[x]:void 0,j?j[x]:void 0,N?.class,N?.className)(p)}}return y}return e(C,ve(),ie(L),R?.class,R?.className)(p)},se=()=>{if(!(!v||typeof v!="object"))return Object.keys(v)};return m.variantKeys=se(),m.extend=a,m.base=C,m.slots=D,m.variants=v,m.defaultVariants=w,m.compoundSlots=u,m.compoundVariants=L,m};return{tv:t,createTV:n=>(o,a)=>t(o,a?Ke(n,a):n)}},In=(...e)=>t=>Se(e)||void 0,{tv:Te}=Bn(In);const vt=Te({base:"flex items-center justify-center rounded-lg transition-all duration-100 cursor-pointer active:scale-95",variants:{$variant:{primary:"font-semibold text-sm bg-(--lv-control-button-primary-background) text-(--lv-control-button-primary-color) border-(--lv-control-button-primary-border) hover:bg-(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background)) active:bg-(--lv-control-button-primary-activeBackground,var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background))) disabled:bg-(--lv-control-button-primary-disabledBackground,var(--lv-control-button-primary-background)) disabled:text-(--lv-control-button-primary-disabledColor,var(--lv-control-button-primary-color))",secondary:"border bg-(--lv-control-button-secondary-background) text-(--lv-control-button-secondary-color) border-(--lv-control-button-secondary-border,var(--lv-control-button-secondary-background)) hover:bg-(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background)) active:bg-(--lv-control-button-secondary-activeBackground,var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background))) disabled:bg-(--lv-control-button-secondary-disabledBackground,var(--lv-control-button-secondary-background)) disabled:text-(--lv-control-button-secondary-disabledColor,var(--lv-control-button-secondary-color))",tertiary:"bg-transparent text-(--lv-text-muted) hover:bg-(--lv-control-button-tertiary-hoverBackground,transparent) active:bg-(--lv-control-button-tertiary-activeBackground,var(--lv-control-button-tertiary-hoverBackground,transparent)) disabled:text-(--lv-control-button-tertiary-disabledColor,var(--lv-text-muted))"},$size:{sm:"h-6",md:"h-8",lg:"h-11"},$aspect:{square:"aspect-square",auto:""}},defaultVariants:{$size:"md",$variant:"primary",$aspect:"auto"}});function ce(e){const{children:t,className:r,$variant:n,$size:o,$aspect:a,...i}=e,{href:l,onClick:c}=e;if(l){const f={href:l,onClick:c,className:ae(vt({$variant:n,$size:o,$aspect:a}),r),...i};return g.createElement("a",f,t)}const u={onClick:c,className:ae(vt({$variant:n,$size:o,$aspect:a}),r),...i};return g.createElement("button",u,t)}const Vn=({isApple:e})=>s.jsxs("div",{className:"flex h-full w-full justify-between",children:[s.jsx("div",{className:"grow py-1 pl-1",children:s.jsx("div",{className:"h-full rounded-sm border border-gray-300 bg-gray-400"})}),s.jsx("div",{className:"flex h-full w-3 flex-col items-center justify-center gap-0.5 pr-0.5",children:Array.from({length:e?1:3}).map((t,r)=>s.jsx("div",{className:"h-1.5 w-1.5 rounded-full border border-gray-500"},"dot-t-"+r))})]}),Fn=({isApple:e})=>s.jsxs("div",{className:"flex h-full w-full flex-col justify-between",children:[s.jsx("div",{className:"grow px-1 pt-1",children:s.jsx("div",{className:"h-full rounded-sm border border-gray-200 bg-gray-300"})}),s.jsx("div",{className:"flex h-3 w-full items-center justify-center gap-0.5 pb-0.5",children:Array.from({length:e?1:3}).map((t,r)=>s.jsx("div",{className:"h-1.5 w-1.5 rounded-full border border-gray-400"},"dot-p-"+r))})]}),Mn=()=>s.jsxs("div",{className:"-space-x-4 flex items-end",children:[s.jsx("div",{className:"h-38 w-48 overflow-hidden rounded-lg bg-gray-300",children:s.jsx(Vn,{isApple:!0})}),s.jsx("div",{className:"h-18 w-12 overflow-hidden rounded-lg bg-gray-200",children:s.jsx(Fn,{isApple:!0})})]}),zn=({onSettings:e})=>{const{t}=M(),{start:r}=Ir();return s.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[s.jsx(Mn,{}),s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-sm text-(--lv-text-secondary)",children:t("disconnected.prompt")})}),s.jsxs("div",{className:"flex items-center",children:[s.jsx(ce,{type:"button",onClick:r,className:"z-10 px-6 py-3",$variant:"primary",$size:"lg",children:t("disconnected.generateQr")}),s.jsx(ce,{type:"button","aria-label":t("disconnected.connectionSettings"),"aria-pressed":!1,onClick:e,className:"px-3 ltr:-ml-1 ltr:rounded-l-none rtl:-mr-1 rtl:rounded-r-none",$aspect:"square",$size:"lg",$variant:"secondary",children:s.jsx(En,{className:"h-5 w-5 text-(--lv-text-muted)"})})]})]})},Gn=()=>{const{t:e}=M();return s.jsxs("div",{className:"flex flex-col space-y-2 px-4",children:[s.jsx("div",{className:"min-h-32 w-full rounded-md border border-(--lv-control-button-secondary-border) p-2",children:e("info.scanQrCode")}),s.jsx("div",{className:"w-full rounded-md border border-border p-2",children:e("info.approveOnDevice")}),s.jsx("div",{className:"w-full rounded-md border border-border p-2",children:e("info.youreConnected")})]})},Wn=async e=>{if(!e)return!1;try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select();const r=document.execCommand("copy");return document.body.removeChild(t),r}catch{return!1}},mt=(e,{duration:t=200}={})=>{const[r,n]=d.useState(e),[o,a]=d.useState(null),i=d.useRef(),l=d.useRef(e);return d.useEffect(()=>{if(!Object.is(e,l.current))return i.current&&window.clearTimeout(i.current),a(l.current),n(e),l.current=e,i.current=window.setTimeout(()=>{a(null),i.current=void 0},t),()=>{i.current&&window.clearTimeout(i.current)}},[e,t]),{current:r,previous:o,isTransitioning:o!==null}},Mt="data:image/webp;base64,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",Un=()=>{const{t:e}=M(),{status:t}=pe(),r=t?.status,n=t?.signaling?.state,o=U({sessionState:r,signalState:n}).with({sessionState:"connected"},()=>({icon:"✅",text:e("status.connectedSuccessfully")})).with({sessionState:"signaling",signalState:"standby"},()=>({icon:"🫥",text:e("status.connecting")})).with({sessionState:"signaling",signalState:"connecting"},()=>({icon:"↗️",text:e("status.connecting")})).with({sessionState:"signaling",signalState:"ready"},()=>({icon:"👋",text:e("status.ready")})).with({sessionState:"signaling",signalState:"handshake"},()=>({icon:"🤝",text:e("status.handshakeClosed")})).with({sessionState:"signaling",signalState:"handshake-partial"},()=>({icon:"🤝",text:e("status.handshakePartial")})).with({sessionState:"signaling",signalState:"encrypted"},()=>({icon:"🔒",text:e("status.encrypted")})).with({sessionState:"signaling",signalState:"error"},()=>({icon:"❌",text:e("status.signalError")})).otherwise(()=>{});if(!o)return s.jsx(s.Fragment,{});const{icon:a,text:i}=o;return s.jsxs("div",{className:"group flex items-center gap-2 rounded-md px-2 py-2 hover:bg-(--lv-control-button-secondary-background)",children:[s.jsx("div",{className:"pointer-events-none whitespace-nowrap rounded-md text-xs opacity-0 group-hover:opacity-100",children:i}),s.jsx("div",{children:a})]})},Hn=()=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-11 w-full"}),s.jsxs("div",{className:"absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 px-3 py-2 text-(--lv-text-muted)",children:[s.jsxs("a",{href:"https://github.com/v3xlabs/open-lavatory",target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 p-1 font-semibold text-sm text-(--lv-text-muted)",children:[s.jsx("img",{src:Mt,alt:"Open Lavatory Logo",width:20,height:20,className:"rounded","data-openlv-brand-logo":!0}),s.jsx("span",{children:"openlv"})]}),s.jsx("div",{className:"text-sm text-(--lv-text-muted)",children:s.jsx(Un,{})})]})]});function Kn(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m15 18-6-6 6-6"},child:[]}]})(e)}function zt(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"path",attr:{d:"M12 17h.01"},child:[]}]})(e)}function qn(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 6 6 18"},child:[]},{tag:"path",attr:{d:"m6 6 12 12"},child:[]}]})(e)}const Jn=({title:e,view:t,onClose:r,onBack:n,setView:o})=>{const{t:a}=M();return s.jsxs("div",{className:"flex items-center justify-between px-2 py-2",children:[n?s.jsx(ce,{onClick:n,"aria-label":a(t==="settings"?"modal.backToQr":"modal.closeModal"),$variant:"tertiary",$aspect:"square",$size:"md",children:s.jsx(Kn,{className:"h-6 w-6 text-(--lv-text-muted) rtl:rotate-180"})}):s.jsx(ce,{type:"button",onClick:()=>o("info"),$variant:"tertiary",$aspect:"square",$size:"md",children:s.jsx(zt,{className:"h-5 w-5"})}),s.jsx("h2",{className:"flex items-center justify-center gap-2 font-semibold text-(--lv-text-primary) text-lg",children:e}),s.jsx(ce,{type:"button","aria-label":a("common.close"),"aria-pressed":!1,onClick:r,$variant:"tertiary",$aspect:"square",$size:"md",children:s.jsx(qn,{className:"h-6 w-6 text-(--lv-text-muted)"})})]})},Oe=({title:e,right:t,children:r})=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-end justify-between py-1 pl-2",children:[s.jsx("div",{className:"font-medium text-(--lv-text-primary) text-sm",children:e}),s.jsx("div",{children:t})]}),s.jsx("div",{className:"flex flex-col gap-1 rounded-md bg-(--lv-card-background) p-2",children:r})]}),fe=({label:e,children:t})=>s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("div",{className:"text-sm text-(--lv-text-secondary)",children:e}),s.jsx("div",{children:t})]}),Qn=Te({slots:{root:"flex overflow-hidden rounded-md border border-(--lv-control-button-secondary-border)",box:"px-4 py-2 font-semibold text-xs transition border-l first:border-l-0 border-(--lv-control-button-secondary-border)"},variants:{active:{on:{box:"bg-(--lv-control-button-secondary-background) text-(--lv-text-primary)"},off:{box:"bg-transparent text-(--lv-text-secondary) cursor-pointer"}}},defaultVariants:{active:"off"}}),Xn=Te({base:"w-full rounded-md border border-(--lv-control-button-secondary-border) bg-(--lv-control-button-secondary-background) px-3 py-2 font-semibold text-xs text-(--lv-text-primary) cursor-pointer focus:outline-none focus:ring-2 focus:ring-(--lv-control-button-primary-background) appearance-none bg-[url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23888%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E')] bg-[length:14px] bg-[right_8px_center] bg-no-repeat pr-8"}),Re=({options:e,value:t,onChange:r,dropdownThreshold:n=3})=>{if(e.length>n){const l=Xn();return s.jsx("select",{className:l,value:t,onChange:c=>r(c.target.value),children:e.map(([c,u])=>s.jsx("option",{value:c,children:u},c))})}const{root:a,box:i}=Qn({});return s.jsx("div",{className:a(),children:e.map(([l,c])=>s.jsx("button",{type:"button",onClick:()=>r(l),"aria-pressed":l===t,className:i({active:l===t?"on":"off"}),children:c},l))})},Yn=({value:e,onChange:t})=>{const{t:r}=M();return s.jsx(Re,{options:[["true",r("common.yes")],["false",r("common.no")]],value:e?"true":"false",onChange:n=>t(n==="true")})},Zn=()=>{const{t:e}=M(),{settings:t,updateRetainHistory:r,updateAutoReconnect:n}=je();return s.jsx(Oe,{title:e("settings.connectionPreferences.title"),children:[[e("settings.connectionPreferences.retainSessionHistory"),"retainHistory",t?.retainHistory??!1,r],[e("settings.connectionPreferences.autoReconnect"),"autoReconnect",t?.autoReconnect??!1,n]].map(([o,a,i,l])=>s.jsx(fe,{label:o,children:s.jsx(Yn,{label:o,value:i,onChange:l})},a))})},$n=()=>{const{t:e,languageTag:t,setLanguageTag:r}=M(),{settings:n,updateLanguage:o}=je(),a=d.useMemo(()=>[...Qe].sort((l,c)=>{const u=rt(l.tag);return rt(c.tag)-u}),[]),i=l=>{const c=l;r(c),o(c)};return s.jsx(Oe,{title:e("settings.language"),children:s.jsx(fe,{label:e("settings.language"),children:s.jsx(Re,{options:a.map(l=>[l.tag,l.nativeName]),value:n?.language||t,onChange:i})})})},eo=Te({slots:{root:"group relative",box:"cursor-pointer rounded-md transition-colors flex items-center justify-center hover:[background-color:var(--lv-control-button-tertiary-hoverBackground)] text-(--lv-text-muted)",popover:"-translate-x-1/2 absolute top-full left-1/2 z-10 hidden rounded-md shadow-sm group-hover:block border border-(--lv-control-button-secondary-border) bg-(--lv-body-background) px-2 py-1.5 text-(--lv-text-primary) text-sm",icon:""},variants:{size:{sm:{box:"h-5 w-5 p-1",icon:"h-3 w-3"},md:{box:"h-6 w-6 p-1",icon:"h-4 w-4"},lg:{box:"h-8 w-8 p-1.5",icon:"h-4 w-4"}},variant:{icon:"",text:""}},defaultVariants:{size:"lg"}}),Gt=({variant:e="icon",children:t,size:r="lg"})=>{const{root:n,box:o,popover:a,icon:i}=eo({size:r,variant:e});return s.jsxs("div",{className:n(),children:[s.jsx("div",{className:o(),children:U(e).with("icon",()=>s.jsx(zt,{className:i()})).with("text",()=>s.jsx("div",{children:"Text"})).exhaustive()}),s.jsx("div",{className:a(),children:t})]})},to="h-9 w-full rounded-lg border bg-white px-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200 text-(--lv-text-primary) bg-(--lv-body-background) border-(--lv-control-input-border)",ro=({id:e,value:t,placeholder:r,ariaLabel:n,readOnly:o=!0,onChange:a})=>s.jsx("input",{id:e,className:to,value:t,placeholder:r,"aria-label":n,readOnly:o,onChange:i=>{i.target instanceof HTMLInputElement&&a?.(i.target.value)}}),no=["MQTT","NTFY","GUN"],oo=()=>{const{t:e}=M(),{settings:t,updateSignalingProtocol:r,updateSignalingServer:n}=je();return s.jsx("div",{children:s.jsxs(Oe,{title:e("settings.signaling.title"),right:s.jsx(Gt,{variant:"icon",children:e("settings.signaling.description")}),children:[s.jsx(fe,{label:e("common.protocol"),children:s.jsx(Re,{options:no.map(o=>[o.toLowerCase(),o]),value:t?.signaling.p||"",onChange:r})}),s.jsx(fe,{label:e("settings.signaling.server"),children:s.jsx(ro,{id:"server",value:t?.signaling.s[t?.signaling.p||""]||"",onChange:o=>n(o),placeholder:e("settings.signaling.serverUrl"),ariaLabel:e("settings.signaling.serverUrl"),readOnly:!1})})]})})},ao=["WebRTC"],so=()=>{const{t:e}=M(),[t,r]=d.useState("WebRTC");return s.jsx(Oe,{title:e("settings.transport.title"),right:s.jsx(Gt,{variant:"icon",children:e("settings.transport.description")}),children:s.jsx(fe,{label:e("common.protocol"),children:s.jsx(Re,{options:ao.map(n=>[n,n]),value:t,onChange:n=>r(n)})})})},io=()=>s.jsxs("div",{className:"px-4 pb-2",children:[s.jsx(oo,{}),s.jsx(so,{}),s.jsx(Zn,{}),s.jsx($n,{})]}),lo=()=>{const[e,t]=d.useState("start"),[r,n]=d.useState(!1);return d.useEffect(()=>{if(!r)return;const o=window.setTimeout(()=>n(!1),2e3);return()=>window.clearTimeout(o)},[r]),{view:e,setView:t,copied:r,setCopied:n}},co=e=>{d.useEffect(()=>{const t=r=>{r.key==="Escape"&&e()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e])},uo=()=>{const e=d.useRef(null),[t,r]=d.useState(0),n=d.useRef(!1),o=d.useCallback((a,i=!1)=>{const l=a||e.current;if(!l)return;const c=i?l.scrollHeight:l.getBoundingClientRect().height;c>0&&(r(u=>typeof u=="number"&&Math.abs(u-c)<.5?u:c),n.current=!0)},[]);return d.useLayoutEffect(()=>{const a=e.current;if(!a||typeof ResizeObserver>"u")return;const i=new ResizeObserver(()=>{o()});return i.observe(a),()=>i.disconnect()},[o]),d.useEffect(()=>{if(typeof window>"u")return;const a=()=>{o()};return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[o]),{contentRef:e,height:t,measureHeight:o,setHeight:r}},Wt=({onClose:e=()=>{},onCopy:t})=>{const{view:r,setView:n,copied:o,setCopied:a}=lo(),{uri:i}=pe(),{status:l,provider:c}=ge(),{contentRef:u,height:f,measureHeight:p}=uo(),{current:C,previous:v,isTransitioning:w}=mt(r),{current:P,previous:h,isTransitioning:D}=mt(l),L=d.useCallback(()=>n("settings"),[n]),{t:m,isRtl:se}=M(),R=U(r).with("start",()=>m("start.title")).with("settings",()=>m("settings.title")).with("info",()=>m("info.title")).exhaustive();co(e),d.useEffect(()=>{l===ee.CONNECTED&&e()},[l,e]);const he=d.useCallback(async()=>{i&&await Wn(i)&&a(!0)},[i,a]),ve=d.useRef(!0),$=d.useRef(),q=d.useRef(void 0),[me,ie]=d.useState(!1),J=d.useRef();d.useLayoutEffect(()=>{if(u.current)return ve.current?($.current&&window.clearTimeout($.current),$.current=window.setTimeout(()=>{u.current&&(p(void 0,!0),ve.current=!1)},0)):p(),()=>{$.current&&window.clearTimeout($.current)}},[p,P,C]),d.useEffect(()=>(q.current!==void 0&&f!==q.current&&f>0&&q.current>0&&Math.abs(f-q.current)>.5&&(ie(!0),J.current&&window.clearTimeout(J.current),J.current=window.setTimeout(()=>{ie(!1),J.current=void 0},200)),q.current=f,()=>{J.current&&window.clearTimeout(J.current)}),[f]);const be=()=>{c?.closeSession()},y=U({view:r,status:l}).with({view:"start",status:ee.STANDBY},()=>{}).with({view:"start"},()=>be).with({view:"settings"},()=>()=>n("start")).with({view:"info"},()=>()=>n("start")).otherwise(()=>()=>{be(),e()}),k=A=>U(A).with("start",()=>s.jsx(zn,{onSettings:L})).with("settings",()=>s.jsx(io,{})).with("info",()=>s.jsx(Gn,{})).otherwise(()=>s.jsx(We,{state:A})),x=()=>s.jsxs("div",{className:"modal-transition__container",children:[v&&s.jsx("div",{className:"modal-transition__layer modal-transition__layer--outgoing",children:k(v)}),s.jsx("div",{className:ae("modal-transition__layer",w&&"modal-transition__layer--incoming"),children:k(C)})]}),N=A=>U(A).with(ee.STANDBY,()=>x()).with(kt.union(ee.CREATING,ee.CONNECTING,ee.CONNECTED),()=>s.jsx(Wr,{onClose:e,onCopy:t||he})).otherwise(z=>s.jsx(We,{state:z||"unknown status"}));Xe("view",r);const S={background:"var(--lv-overlay-background, rgba(0,0,0,0.3))",backdropFilter:"var(--lv-overlay-backdrop-filter, blur(4px))"},j={background:"var(--lv-body-background)",color:"var(--lv-body-color, var(--lv-text-primary))",borderRadius:"var(--lv-border-radius, 16px)",boxShadow:"var(--lv-modal-shadow, 0px 12px 32px rgba(0,0,0,0.25))"};return s.jsx("div",{className:"fixed inset-0 z-10000 flex animate-[bg-in_0.15s_ease-in-out] items-end justify-center font-sans md:items-center lg:p-4",onClick:e,role:"presentation","data-openlv-modal-root":!0,dir:se?"rtl":"ltr",style:S,children:s.jsxs("div",{className:ae("relative w-full max-w-[400px] animate-[fade-in_0.15s_ease-in-out] transition-[height] duration-200 ease-out",me||h?"overflow-hidden":void 0),role:"dialog","aria-modal":"true","aria-label":R,onClick:A=>A.stopPropagation(),style:{...typeof f=="number"&&f>0?{height:`${f}px`}:{},...j},children:[s.jsxs("div",{ref:u,children:[s.jsx(Jn,{title:R,view:r,onClose:e,onBack:y,setView:n}),s.jsxs("div",{className:"modal-transition__container",children:[h&&s.jsx("div",{className:"modal-transition__layer modal-transition__layer--outgoing absolute",children:s.jsx("div",{className:"flex flex-col text-center",children:N(h)})}),s.jsx("div",{className:ae("modal-transition__layer",D&&"modal-transition__layer--incoming"),children:s.jsx("div",{className:"flex flex-col text-center",children:N(P)})})]}),s.jsx(Hn,{})]}),s.jsx("div",{className:ae("absolute top-5 rounded-lg bg-blue-500 px-4 py-3 font-medium text-sm text-white transition-all ltr:right-5 rtl:left-5",o?"translate-x-0 opacity-100":"opacity-0 ltr:translate-x-full rtl:-translate-x-full"),children:m("modal.urlCopied")})]})})},fo=async e=>{if(typeof e=="string"){if(e==="simple")return await Promise.resolve().then(()=>require("./simple-DJcIRSvc.cjs")).then(t=>t.simpleTheme);if(e==="openlv")return await Promise.resolve().then(()=>require("./openlv-SMG3Trx9.cjs")).then(t=>t.openlvTheme);throw new Error(`Unknown theme: ${e}`)}return e};function qe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ut=(e,t=[],r={})=>{for(const[n,o]of Object.entries(e)){const a=[...t,n];qe(o)?Ut(o,a,r):r[`--lv-${a.join("-")}`]=o}return r},go=e=>e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,Ht=(e,t)=>{const r={...e};for(const n of Object.keys(t)){const o=e[n],a=t[n];r[n]=qe(o)&&qe(a)?Ht(o,a):a}return r},po=async e=>{const t=await fo(e.theme),r=go(e.mode),n=t[r];if(!n)return"";const o=t.common?Ht(t.common,n):n,a=Ut(o);return Object.entries(a).map(([i,l])=>`${i}: ${l};`).join(`
4
- `)},ho=`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-5{top:calc(var(--spacing)*5)}.top-full{top:100%}.bottom-0{bottom:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.z-10{z-index:10}.z-10000{z-index:10000}.mx-auto{margin-inline:auto}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-11{height:calc(var(--spacing)*11)}.h-18{height:calc(var(--spacing)*18)}.h-38{height:calc(var(--spacing)*38)}.h-\\[200px\\]{height:200px}.h-full{height:100%}.min-h-32{min-height:calc(var(--spacing)*32)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-12{width:calc(var(--spacing)*12)}.w-48{width:calc(var(--spacing)*48)}.w-\\[200px\\]{width:200px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[400px\\]{max-width:400px}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-\\[bg-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out bg-in}.animate-\\[fade-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out fade-in}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.appearance-none{appearance:none}.flex-col{flex-direction:column}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.-space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*-4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*-4)*calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-\\(--lv-control-button-primary-border\\){border-color:var(--lv-control-button-primary-border)}.border-\\(--lv-control-button-secondary-border\\){border-color:var(--lv-control-button-secondary-border)}.border-\\(--lv-control-button-secondary-border\\,var\\(--lv-control-button-secondary-background\\)\\){border-color:var(--lv-control-button-secondary-border,var(--lv-control-button-secondary-background))}.border-\\(--lv-control-input-border\\){border-color:var(--lv-control-input-border)}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-500{border-color:var(--color-gray-500)}.border-t-transparent{border-top-color:#0000}.bg-\\(--lv-body-background\\){background-color:var(--lv-body-background)}.bg-\\(--lv-card-background\\){background-color:var(--lv-card-background)}.bg-\\(--lv-control-button-primary-background\\){background-color:var(--lv-control-button-primary-background)}.bg-\\(--lv-control-button-secondary-background\\){background-color:var(--lv-control-button-secondary-background)}.bg-\\(--lv-qr-background\\){background-color:var(--lv-qr-background)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\;charset\\=US-ASCII\\,\\%3Csvg\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%20width\\%3D\\%2214\\%22\\%20height\\%3D\\%2214\\%22\\%20viewBox\\%3D\\%220\\%200\\%2024\\%2024\\%22\\%20fill\\%3D\\%22none\\%22\\%20stroke\\%3D\\%22\\%23888\\%22\\%20stroke-width\\%3D\\%222\\%22\\%3E\\%3Cpath\\%20d\\%3D\\%22M6\\%209l6\\%206\\%206-6\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]{background-image:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23888%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E)}.bg-\\[length\\:14px\\]{background-size:14px}.bg-\\[right_8px_center\\]{background-position:right 8px center}.bg-no-repeat{background-repeat:no-repeat}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pr-0\\.5{padding-right:calc(var(--spacing)*.5)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-0\\.5{padding-bottom:calc(var(--spacing)*.5)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-2{padding-left:calc(var(--spacing)*2)}.text-center{text-align:center}.font-sans{font-family:var(--font-sans)}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-\\(--lv-control-button-primary-color\\){color:var(--lv-control-button-primary-color)}.text-\\(--lv-control-button-secondary-color\\){color:var(--lv-control-button-secondary-color)}.text-\\(--lv-qr-color\\){color:var(--lv-qr-color)}.text-\\(--lv-text-muted\\){color:var(--lv-text-muted)}.text-\\(--lv-text-primary\\){color:var(--lv-text-primary)}.text-\\(--lv-text-secondary\\){color:var(--lv-text-secondary)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow,.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:block:is(:where(.group):hover *){display:block}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.first\\:border-l-0:first-child{border-left-style:var(--tw-border-style);border-left-width:0}@media(hover:hover){.hover\\:\\[background-color\\:var\\(--lv-control-button-tertiary-hoverBackground\\)\\]:hover{background-color:var(--lv-control-button-tertiary-hoverBackground)}.hover\\:bg-\\(--lv-control-button-primary-background-hover\\):hover{background-color:var(--lv-control-button-primary-background-hover)}.hover\\:bg-\\(--lv-control-button-primary-hoverBackground\\,var\\(--lv-control-button-primary-background\\)\\):hover{background-color:var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background))}.hover\\:bg-\\(--lv-control-button-secondary-background\\):hover{background-color:var(--lv-control-button-secondary-background)}.hover\\:bg-\\(--lv-control-button-secondary-hoverBackground\\):hover{background-color:var(--lv-control-button-secondary-hoverBackground)}.hover\\:bg-\\(--lv-control-button-secondary-hoverBackground\\,var\\(--lv-control-button-secondary-background\\)\\):hover{background-color:var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background))}.hover\\:bg-\\(--lv-control-button-tertiary-hoverBackground\\,transparent\\):hover{background-color:var(--lv-control-button-tertiary-hoverBackground,transparent)}}.focus\\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-\\(--lv-control-button-primary-background\\):focus{--tw-ring-color:var(--lv-control-button-primary-background)}.focus\\:ring-blue-200:focus{--tw-ring-color:var(--color-blue-200)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.active\\:bg-\\(--lv-control-button-primary-activeBackground\\,var\\(--lv-control-button-primary-hoverBackground\\,var\\(--lv-control-button-primary-background\\)\\)\\):active{background-color:var(--lv-control-button-primary-activeBackground,var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background)))}.active\\:bg-\\(--lv-control-button-secondary-activeBackground\\):active{background-color:var(--lv-control-button-secondary-activeBackground)}.active\\:bg-\\(--lv-control-button-secondary-activeBackground\\,var\\(--lv-control-button-secondary-hoverBackground\\,var\\(--lv-control-button-secondary-background\\)\\)\\):active{background-color:var(--lv-control-button-secondary-activeBackground,var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background)))}.active\\:bg-\\(--lv-control-button-tertiary-activeBackground\\,var\\(--lv-control-button-tertiary-hoverBackground\\,transparent\\)\\):active{background-color:var(--lv-control-button-tertiary-activeBackground,var(--lv-control-button-tertiary-hoverBackground,transparent))}.disabled\\:bg-\\(--lv-control-button-primary-disabledBackground\\,var\\(--lv-control-button-primary-background\\)\\):disabled{background-color:var(--lv-control-button-primary-disabledBackground,var(--lv-control-button-primary-background))}.disabled\\:bg-\\(--lv-control-button-secondary-disabledBackground\\,var\\(--lv-control-button-secondary-background\\)\\):disabled{background-color:var(--lv-control-button-secondary-disabledBackground,var(--lv-control-button-secondary-background))}.disabled\\:text-\\(--lv-control-button-primary-disabledColor\\,var\\(--lv-control-button-primary-color\\)\\):disabled{color:var(--lv-control-button-primary-disabledColor,var(--lv-control-button-primary-color))}.disabled\\:text-\\(--lv-control-button-secondary-disabledColor\\,var\\(--lv-control-button-secondary-color\\)\\):disabled{color:var(--lv-control-button-secondary-disabledColor,var(--lv-control-button-secondary-color))}.disabled\\:text-\\(--lv-control-button-tertiary-disabledColor\\,var\\(--lv-text-muted\\)\\):disabled{color:var(--lv-control-button-tertiary-disabledColor,var(--lv-text-muted))}@media(min-width:48rem){.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:p-4{padding:calc(var(--spacing)*4)}}.ltr\\:right-5:where(:dir(ltr),[dir=ltr],[dir=ltr] *){right:calc(var(--spacing)*5)}.ltr\\:-ml-1:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:calc(var(--spacing)*-1)}.ltr\\:translate-x-full:where(:dir(ltr),[dir=ltr],[dir=ltr] *){--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.ltr\\:rounded-l-none:where(:dir(ltr),[dir=ltr],[dir=ltr] *){border-top-left-radius:0;border-bottom-left-radius:0}.rtl\\:left-5:where(:dir(rtl),[dir=rtl],[dir=rtl] *){left:calc(var(--spacing)*5)}.rtl\\:-mr-1:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:calc(var(--spacing)*-1)}.rtl\\:-translate-x-full:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.rtl\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:180deg}.rtl\\:rounded-r-none:where(:dir(rtl),[dir=rtl],[dir=rtl] *){border-top-right-radius:0;border-bottom-right-radius:0}}:root,:host{--color-body-background:var(--lv-body-background);--radius-radius:var(--lv-border-radius)}.border{border-style:solid}@keyframes fade-in{0%{transform:translateY(-2px)scale(.95)}to{transform:translateY(0)scale(1)}}@keyframes bg-in{0%{opacity:0;-webkit-backdrop-filter:blur();backdrop-filter:blur()}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.modal-transition__container{display:grid;position:relative}.modal-transition__layer{will-change:transform,opacity;grid-area:1/1;width:100%}.modal-transition__layer--outgoing{z-index:2;animation:.2s ease-out forwards modal-transition-out;position:absolute}.modal-transition__layer--incoming{animation:.2s ease-out forwards modal-transition-in}[data-openlv-mode=dark] img[data-openlv-brand-logo]{filter:invert()brightness(1.1)}@keyframes modal-transition-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes modal-transition-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.05)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}`,vo=async(e,t)=>{if(e){if(e.querySelector("style[data-openlv-modal]"))return;const n=document.createElement("style");n.setAttribute("data-openlv-modal","true");let o=ho;t&&(o=`:root, :host {
5
- ${await po(t)}
1
+ "use strict";var vn=Object.defineProperty;var pn=(t,e,r)=>e in t?vn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ee=(t,e,r)=>pn(t,typeof e!="symbol"?e+"":e,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const mn=!1,bn=(t,e)=>t===e,ct=Symbol("solid-proxy"),Br=typeof Proxy=="function",wn=Symbol("solid-track"),dt={equals:bn};let Mr=Vr;const Ce=1,ut=2,Or={owned:null,cleanups:null,context:null,owner:null};var O=null;let St=null,yn=null,I=null,W=null,ge=null,bt=0;function at(t,e){const r=I,n=O,o=t.length===0,i=e===void 0?n:e,a=o?Or:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=o?t:()=>t(()=>J(()=>Ge(a)));O=a,I=null;try{return Ze(s,!0)}finally{I=r,O=n}}function D(t,e){e=e?Object.assign({},dt,e):dt;const r={value:t,observers:null,observerSlots:null,comparator:e.equals||void 0},n=o=>(typeof o=="function"&&(o=o(r.value)),Dr(r,o));return[jr.bind(r),n]}function z(t,e,r){const n=zt(t,e,!1,Ce);Je(n)}function oe(t,e,r){Mr=Cn;const n=zt(t,e,!1,Ce);n.user=!0,ge?ge.push(n):Je(n)}function E(t,e,r){r=r?Object.assign({},dt,r):dt;const n=zt(t,e,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,Je(n),jr.bind(n)}function J(t){if(I===null)return t();const e=I;I=null;try{return t()}finally{I=e}}function Ft(t){oe(()=>J(t))}function ie(t){return O===null||(O.cleanups===null?O.cleanups=[t]:O.cleanups.push(t)),t}function Rr(t,e){const r=Symbol("context");return{id:r,Provider:An(r),defaultValue:t}}function Lr(t){let e;return O&&O.context&&(e=O.context[t.id])!==void 0?e:t.defaultValue}function Ir(t){const e=E(t),r=E(()=>Pt(e()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}function jr(){if(this.sources&&this.state)if(this.state===Ce)Je(this);else{const t=W;W=null,Ze(()=>ht(this),!1),W=t}if(I){const t=this.observers;if(!t||t[t.length-1]!==I){const e=t?t.length:0;I.sources?(I.sources.push(this),I.sourceSlots.push(e)):(I.sources=[this],I.sourceSlots=[e]),t?(t.push(I),this.observerSlots.push(I.sources.length-1)):(this.observers=[I],this.observerSlots=[I.sources.length-1])}}return this.value}function Dr(t,e,r){let n=t.value;return(!t.comparator||!t.comparator(n,e))&&(t.value=e,t.observers&&t.observers.length&&Ze(()=>{for(let o=0;o<t.observers.length;o+=1){const i=t.observers[o],a=St&&St.running;a&&St.disposed.has(i),(a?!i.tState:!i.state)&&(i.pure?W.push(i):ge.push(i),i.observers&&Fr(i)),a||(i.state=Ce)}if(W.length>1e6)throw W=[],new Error},!1)),e}function Je(t){if(!t.fn)return;Ge(t);const e=bt;xn(t,t.value,e)}function xn(t,e,r){let n;const o=O,i=I;I=O=t;try{n=t.fn(e)}catch(a){return t.pure&&(t.state=Ce,t.owned&&t.owned.forEach(Ge),t.owned=null),t.updatedAt=r+1,zr(a)}finally{I=i,O=o}(!t.updatedAt||t.updatedAt<=r)&&(t.updatedAt!=null&&"observers"in t?Dr(t,n):t.value=n,t.updatedAt=r)}function zt(t,e,r,n=Ce,o){const i={fn:t,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:O,context:O?O.context:null,pure:r};return O===null||O!==Or&&(O.owned?O.owned.push(i):O.owned=[i]),i}function ft(t){if(t.state===0)return;if(t.state===ut)return ht(t);if(t.suspense&&J(t.suspense.inFallback))return t.suspense.effects.push(t);const e=[t];for(;(t=t.owner)&&(!t.updatedAt||t.updatedAt<bt);)t.state&&e.push(t);for(let r=e.length-1;r>=0;r--)if(t=e[r],t.state===Ce)Je(t);else if(t.state===ut){const n=W;W=null,Ze(()=>ht(t,e[0]),!1),W=n}}function Ze(t,e){if(W)return t();let r=!1;e||(W=[]),ge?r=!0:ge=[],bt++;try{const n=t();return kn(r),n}catch(n){r||(ge=null),W=null,zr(n)}}function kn(t){if(W&&(Vr(W),W=null),t)return;const e=ge;ge=null,e.length&&Ze(()=>Mr(e),!1)}function Vr(t){for(let e=0;e<t.length;e++)ft(t[e])}function Cn(t){let e,r=0;for(e=0;e<t.length;e++){const n=t[e];n.user?t[r++]=n:ft(n)}for(e=0;e<r;e++)ft(t[e])}function ht(t,e){t.state=0;for(let r=0;r<t.sources.length;r+=1){const n=t.sources[r];if(n.sources){const o=n.state;o===Ce?n!==e&&(!n.updatedAt||n.updatedAt<bt)&&ft(n):o===ut&&ht(n,e)}}}function Fr(t){for(let e=0;e<t.observers.length;e+=1){const r=t.observers[e];r.state||(r.state=ut,r.pure?W.push(r):ge.push(r),r.observers&&Fr(r))}}function Ge(t){let e;if(t.sources)for(;t.sources.length;){const r=t.sources.pop(),n=t.sourceSlots.pop(),o=r.observers;if(o&&o.length){const i=o.pop(),a=r.observerSlots.pop();n<o.length&&(i.sourceSlots[a]=n,o[n]=i,r.observerSlots[n]=a)}}if(t.tOwned){for(e=t.tOwned.length-1;e>=0;e--)Ge(t.tOwned[e]);delete t.tOwned}if(t.owned){for(e=t.owned.length-1;e>=0;e--)Ge(t.owned[e]);t.owned=null}if(t.cleanups){for(e=t.cleanups.length-1;e>=0;e--)t.cleanups[e]();t.cleanups=null}t.state=0}function Sn(t){return t instanceof Error?t:new Error(typeof t=="string"?t:"Unknown error",{cause:t})}function zr(t,e=O){throw Sn(t)}function Pt(t){if(typeof t=="function"&&!t.length)return Pt(t());if(Array.isArray(t)){const e=[];for(let r=0;r<t.length;r++){const n=Pt(t[r]);if(Array.isArray(n))if(n.length<32768)e.push.apply(e,n);else for(let o=0;o<n.length;o++)e.push(n[o]);else e.push(n)}return e}return t}function An(t,e){return function(n){let o;return z(()=>o=J(()=>(O.context={...O.context,[t]:n.value},Ir(()=>n.children))),void 0),o}}const $n=Symbol("fallback");function tr(t){for(let e=0;e<t.length;e++)t[e]()}function Tn(t,e,r={}){let n=[],o=[],i=[],a=0,s=e.length>1?[]:null;return ie(()=>tr(i)),()=>{let l=t()||[],d=l.length,u,c;return l[wn],J(()=>{let h,g,b,p,C,k,y,F,_;if(d===0)a!==0&&(tr(i),i=[],n=[],o=[],a=0,s&&(s=[])),r.fallback&&(n=[$n],o[0]=at(ve=>(i[0]=ve,r.fallback())),a=1);else if(a===0){for(o=new Array(d),c=0;c<d;c++)n[c]=l[c],o[c]=at(f);a=d}else{for(b=new Array(d),p=new Array(d),s&&(C=new Array(d)),k=0,y=Math.min(a,d);k<y&&n[k]===l[k];k++);for(y=a-1,F=d-1;y>=k&&F>=k&&n[y]===l[F];y--,F--)b[F]=o[y],p[F]=i[y],s&&(C[F]=s[y]);for(h=new Map,g=new Array(F+1),c=F;c>=k;c--)_=l[c],u=h.get(_),g[c]=u===void 0?-1:u,h.set(_,c);for(u=k;u<=y;u++)_=n[u],c=h.get(_),c!==void 0&&c!==-1?(b[c]=o[u],p[c]=i[u],s&&(C[c]=s[u]),c=g[c],h.set(_,c)):i[u]();for(c=k;c<d;c++)c in b?(o[c]=b[c],i[c]=p[c],s&&(s[c]=C[c],s[c](c))):o[c]=at(f);o=o.slice(0,a=d),n=l.slice(0)}return o});function f(h){if(i[c]=h,s){const[g,b]=D(c);return s[c]=b,e(l[c],g)}return e(l[c])}}}function v(t,e){return J(()=>t(e||{}))}function ot(){return!0}const Nt={get(t,e,r){return e===ct?r:t.get(e)},has(t,e){return e===ct?!0:t.has(e)},set:ot,deleteProperty:ot,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:ot,deleteProperty:ot}},ownKeys(t){return t.keys()}};function At(t){return(t=typeof t=="function"?t():t)?t:{}}function En(){for(let t=0,e=this.length;t<e;++t){const r=this[t]();if(r!==void 0)return r}}function X(...t){let e=!1;for(let a=0;a<t.length;a++){const s=t[a];e=e||!!s&&ct in s,t[a]=typeof s=="function"?(e=!0,E(s)):s}if(Br&&e)return new Proxy({get(a){for(let s=t.length-1;s>=0;s--){const l=At(t[s])[a];if(l!==void 0)return l}},has(a){for(let s=t.length-1;s>=0;s--)if(a in At(t[s]))return!0;return!1},keys(){const a=[];for(let s=0;s<t.length;s++)a.push(...Object.keys(At(t[s])));return[...new Set(a)]}},Nt);const r={},n=Object.create(null);for(let a=t.length-1;a>=0;a--){const s=t[a];if(!s)continue;const l=Object.getOwnPropertyNames(s);for(let d=l.length-1;d>=0;d--){const u=l[d];if(u==="__proto__"||u==="constructor")continue;const c=Object.getOwnPropertyDescriptor(s,u);if(!n[u])n[u]=c.get?{enumerable:!0,configurable:!0,get:En.bind(r[u]=[c.get.bind(s)])}:c.value!==void 0?c:void 0;else{const f=r[u];f&&(c.get?f.push(c.get.bind(s)):c.value!==void 0&&f.push(()=>c.value))}}}const o={},i=Object.keys(n);for(let a=i.length-1;a>=0;a--){const s=i[a],l=n[s];l&&l.get?Object.defineProperty(o,s,l):o[s]=l?l.value:void 0}return o}function wt(t,...e){const r=e.length;if(Br&&ct in t){const o=r>1?e.flat():e[0],i=e.map(a=>new Proxy({get(s){return a.includes(s)?t[s]:void 0},has(s){return a.includes(s)&&s in t},keys(){return a.filter(s=>s in t)}},Nt));return i.push(new Proxy({get(a){return o.includes(a)?void 0:t[a]},has(a){return o.includes(a)?!1:a in t},keys(){return Object.keys(t).filter(a=>!o.includes(a))}},Nt)),i}const n=[];for(let o=0;o<=r;o++)n[o]={};for(const o of Object.getOwnPropertyNames(t)){let i=r;for(let l=0;l<e.length;l++)if(e[l].includes(o)){i=l;break}const a=Object.getOwnPropertyDescriptor(t,o);!a.get&&!a.set&&a.enumerable&&a.writable&&a.configurable?n[i][o]=a.value:Object.defineProperty(n[i],o,a)}return n}const Ur=t=>`Stale read from <${t}>.`;function ke(t){const e="fallback"in t&&{fallback:()=>t.fallback};return E(Tn(()=>t.each,t.children,e||void 0))}function Me(t){const e=t.keyed,r=E(()=>t.when,void 0,void 0),n=e?r:E(r,void 0,{equals:(o,i)=>!o==!i});return E(()=>{const o=n();if(o){const i=t.children;return typeof i=="function"&&i.length>0?J(()=>i(e?o:()=>{if(!J(n))throw Ur("Show");return r()})):i}return t.fallback},void 0,void 0)}function Wr(t){const e=Ir(()=>t.children),r=E(()=>{const n=e(),o=Array.isArray(n)?n:[n];let i=()=>{};for(let a=0;a<o.length;a++){const s=a,l=o[a],d=i,u=E(()=>d()?void 0:l.when,void 0,void 0),c=l.keyed?u:E(u,void 0,{equals:(f,h)=>!f==!h});i=()=>d()||(c()?[s,u,l]:void 0)}return i});return E(()=>{const n=r()();if(!n)return t.fallback;const[o,i,a]=n,s=a.children;return typeof s=="function"&&s.length>0?J(()=>s(a.keyed?i():()=>{if(J(r)()?.[0]!==o)throw Ur("Match");return i()})):s},void 0,void 0)}function Pe(t){return t}const _n=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Pn=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",..._n]),Nn=new Set(["innerHTML","textContent","innerText","children"]),Bn=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Mn=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function On(t,e){const r=Mn[t];return typeof r=="object"?r[e]?r.$:void 0:r}const Rn=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ln=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),In={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Be=t=>E(()=>t());function jn(t,e,r){let n=r.length,o=e.length,i=n,a=0,s=0,l=e[o-1].nextSibling,d=null;for(;a<o||s<i;){if(e[a]===r[s]){a++,s++;continue}for(;e[o-1]===r[i-1];)o--,i--;if(o===a){const u=i<n?s?r[s-1].nextSibling:r[i-s]:l;for(;s<i;)t.insertBefore(r[s++],u)}else if(i===s)for(;a<o;)(!d||!d.has(e[a]))&&e[a].remove(),a++;else if(e[a]===r[i-1]&&r[s]===e[o-1]){const u=e[--o].nextSibling;t.insertBefore(r[s++],e[a++].nextSibling),t.insertBefore(r[--i],u),e[o]=r[i]}else{if(!d){d=new Map;let c=s;for(;c<i;)d.set(r[c],c++)}const u=d.get(e[a]);if(u!=null)if(s<u&&u<i){let c=a,f=1,h;for(;++c<o&&c<i&&!((h=d.get(e[c]))==null||h!==u+f);)f++;if(f>u-s){const g=e[a];for(;s<u;)t.insertBefore(r[s++],g)}else t.replaceChild(r[s++],e[a++])}else a++;else e[a++].remove()}}}const rr="_$DX_DELEGATE";function Dn(t,e,r,n={}){let o;return at(i=>{o=i,e===document?t():m(e,t(),e.firstChild?null:void 0,r)},n.owner),()=>{o(),e.textContent=""}}function x(t,e,r,n){let o;const i=()=>{const s=n?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return s.innerHTML=t,r?s.content.firstChild.firstChild:n?s.firstChild:s.content.firstChild},a=e?()=>J(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return a.cloneNode=a,a}function Se(t,e=window.document){const r=e[rr]||(e[rr]=new Set);for(let n=0,o=t.length;n<o;n++){const i=t[n];r.has(i)||(r.add(i),e.addEventListener(i,Gn))}}function re(t,e,r){r==null?t.removeAttribute(e):t.setAttribute(e,r)}function Vn(t,e,r,n){n==null?t.removeAttributeNS(e,r):t.setAttributeNS(e,r,n)}function Fn(t,e,r){r?t.setAttribute(e,""):t.removeAttribute(e)}function ne(t,e){e==null?t.removeAttribute("class"):t.className=e}function yt(t,e,r,n){if(n)Array.isArray(r)?(t[`$$${e}`]=r[0],t[`$$${e}Data`]=r[1]):t[`$$${e}`]=r;else if(Array.isArray(r)){const o=r[0];t.addEventListener(e,r[0]=i=>o.call(t,r[1],i))}else t.addEventListener(e,r,typeof r!="function"&&r)}function zn(t,e,r={}){const n=Object.keys(e||{}),o=Object.keys(r);let i,a;for(i=0,a=o.length;i<a;i++){const s=o[i];!s||s==="undefined"||e[s]||(nr(t,s,!1),delete r[s])}for(i=0,a=n.length;i<a;i++){const s=n[i],l=!!e[s];!s||s==="undefined"||r[s]===l||!l||(nr(t,s,!0),r[s]=l)}return r}function Bt(t,e,r){if(!e)return r?re(t,"style"):e;const n=t.style;if(typeof e=="string")return n.cssText=e;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),e||(e={});let o,i;for(i in r)e[i]==null&&n.removeProperty(i),delete r[i];for(i in e)o=e[i],o!==r[i]&&(n.setProperty(i,o),r[i]=o);return r}function gt(t,e={},r,n){const o={};return n||z(()=>o.children=qe(t,e.children,o.children)),z(()=>typeof e.ref=="function"&&Gr(e.ref,t)),z(()=>Un(t,e,r,!0,o,!0)),o}function Gr(t,e,r){return J(()=>t(e,r))}function m(t,e,r,n){if(r!==void 0&&!n&&(n=[]),typeof e!="function")return qe(t,e,n,r);z(o=>qe(t,e(),o,r),n)}function Un(t,e,r,n,o={},i=!1){e||(e={});for(const a in o)if(!(a in e)){if(a==="children")continue;o[a]=or(t,a,null,o[a],r,i,e)}for(const a in e){if(a==="children")continue;const s=e[a];o[a]=or(t,a,s,o[a],r,i,e)}}function Wn(t){return t.toLowerCase().replace(/-([a-z])/g,(e,r)=>r.toUpperCase())}function nr(t,e,r){const n=e.trim().split(/\s+/);for(let o=0,i=n.length;o<i;o++)t.classList.toggle(n[o],r)}function or(t,e,r,n,o,i,a){let s,l,d,u,c;if(e==="style")return Bt(t,r,n);if(e==="classList")return zn(t,r,n);if(r===n)return n;if(e==="ref")i||r(t);else if(e.slice(0,3)==="on:"){const f=e.slice(3);n&&t.removeEventListener(f,n,typeof n!="function"&&n),r&&t.addEventListener(f,r,typeof r!="function"&&r)}else if(e.slice(0,10)==="oncapture:"){const f=e.slice(10);n&&t.removeEventListener(f,n,!0),r&&t.addEventListener(f,r,!0)}else if(e.slice(0,2)==="on"){const f=e.slice(2).toLowerCase(),h=Rn.has(f);if(!h&&n){const g=Array.isArray(n)?n[0]:n;t.removeEventListener(f,g)}(h||r)&&(yt(t,f,r,h),h&&Se([f]))}else if(e.slice(0,5)==="attr:")re(t,e.slice(5),r);else if(e.slice(0,5)==="bool:")Fn(t,e.slice(5),r);else if((c=e.slice(0,5)==="prop:")||(d=Nn.has(e))||!o&&((u=On(e,t.tagName))||(l=Pn.has(e)))||(s=t.nodeName.includes("-")||"is"in a))c&&(e=e.slice(5),l=!0),e==="class"||e==="className"?ne(t,r):s&&!l&&!d?t[Wn(e)]=r:t[u||e]=r;else{const f=o&&e.indexOf(":")>-1&&In[e.split(":")[0]];f?Vn(t,f,e,r):re(t,Bn[e]||e,r)}return r}function Gn(t){let e=t.target;const r=`$$${t.type}`,n=t.target,o=t.currentTarget,i=l=>Object.defineProperty(t,"target",{configurable:!0,value:l}),a=()=>{const l=e[r];if(l&&!e.disabled){const d=e[`${r}Data`];if(d!==void 0?l.call(e,d,t):l.call(e,t),t.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(t.target)&&i(e.host),!0},s=()=>{for(;a()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return e||document}}),t.composedPath){const l=t.composedPath();i(l[0]);for(let d=0;d<l.length-2&&(e=l[d],!!a());d++){if(e._$host){e=e._$host,s();break}if(e.parentNode===o)break}}else s();i(n)}function qe(t,e,r,n,o){for(;typeof r=="function";)r=r();if(e===r)return r;const i=typeof e,a=n!==void 0;if(t=a&&r[0]&&r[0].parentNode||t,i==="string"||i==="number"){if(i==="number"&&(e=e.toString(),e===r))return r;if(a){let s=r[0];s&&s.nodeType===3?s.data!==e&&(s.data=e):s=document.createTextNode(e),r=Re(t,r,n,s)}else r!==""&&typeof r=="string"?r=t.firstChild.data=e:r=t.textContent=e}else if(e==null||i==="boolean")r=Re(t,r,n);else{if(i==="function")return z(()=>{let s=e();for(;typeof s=="function";)s=s();r=qe(t,s,r,n)}),()=>r;if(Array.isArray(e)){const s=[],l=r&&Array.isArray(r);if(Mt(s,e,r,o))return z(()=>r=qe(t,s,r,n,!0)),()=>r;if(s.length===0){if(r=Re(t,r,n),a)return r}else l?r.length===0?ir(t,s,n):jn(t,r,s):(r&&Re(t),ir(t,s));r=s}else if(e.nodeType){if(Array.isArray(r)){if(a)return r=Re(t,r,n,e);Re(t,r,null,e)}else r==null||r===""||!t.firstChild?t.appendChild(e):t.replaceChild(e,t.firstChild);r=e}}return r}function Mt(t,e,r,n){let o=!1;for(let i=0,a=e.length;i<a;i++){let s=e[i],l=r&&r[t.length],d;if(!(s==null||s===!0||s===!1))if((d=typeof s)=="object"&&s.nodeType)t.push(s);else if(Array.isArray(s))o=Mt(t,s,l)||o;else if(d==="function")if(n){for(;typeof s=="function";)s=s();o=Mt(t,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||o}else t.push(s),o=!0;else{const u=String(s);l&&l.nodeType===3&&l.data===u?t.push(l):t.push(document.createTextNode(u))}}return o}function ir(t,e,r=null){for(let n=0,o=e.length;n<o;n++)t.insertBefore(e[n],r)}function Re(t,e,r,n){if(r===void 0)return t.textContent="";const o=n||document.createTextNode("");if(e.length){let i=!1;for(let a=e.length-1;a>=0;a--){const s=e[a];if(o!==s){const l=s.parentNode===t;!i&&!a?l?t.replaceChild(o,s):t.insertBefore(o,r):l&&s.remove()}else i=!0}}else t.insertBefore(o,r);return[o]}const qn="http://www.w3.org/2000/svg";function Kn(t,e=!1,r=void 0){return e?document.createElementNS(qn,t):document.createElement(t,{is:r})}function Hn(t,e){const r=E(t);return E(()=>{const n=r();switch(typeof n){case"function":return J(()=>n(e));case"string":const o=Ln.has(n),i=Kn(n,o,J(()=>e.is));return gt(i,e,o),i}})}function Xn(t){const[,e]=wt(t,["component"]);return Hn(()=>t.component,e)}const Qn=1,Jn=t=>{const e=new URLSearchParams;return e.set("h",t.h),e.set("k",t.k),t.p&&e.set("p",t.p),t.s&&e.set("s",t.s),`openlv://${t.sessionId}@${Qn}?${e.toString()}`};function Zn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $t={exports:{}},sr;function Yn(){return sr||(sr=1,(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(l,d,u){this.fn=l,this.context=d,this.once=u||!1}function i(l,d,u,c,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new o(u,c||l,f),g=r?r+d:d;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],h]:l._events[g].push(h):(l._events[g]=h,l._eventsCount++),l}function a(l,d){--l._eventsCount===0?l._events=new n:delete l._events[d]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var d=[],u,c;if(this._eventsCount===0)return d;for(c in u=this._events)e.call(u,c)&&d.push(r?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(u)):d},s.prototype.listeners=function(d){var u=r?r+d:d,c=this._events[u];if(!c)return[];if(c.fn)return[c.fn];for(var f=0,h=c.length,g=new Array(h);f<h;f++)g[f]=c[f].fn;return g},s.prototype.listenerCount=function(d){var u=r?r+d:d,c=this._events[u];return c?c.fn?1:c.length:0},s.prototype.emit=function(d,u,c,f,h,g){var b=r?r+d:d;if(!this._events[b])return!1;var p=this._events[b],C=arguments.length,k,y;if(p.fn){switch(p.once&&this.removeListener(d,p.fn,void 0,!0),C){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,u),!0;case 3:return p.fn.call(p.context,u,c),!0;case 4:return p.fn.call(p.context,u,c,f),!0;case 5:return p.fn.call(p.context,u,c,f,h),!0;case 6:return p.fn.call(p.context,u,c,f,h,g),!0}for(y=1,k=new Array(C-1);y<C;y++)k[y-1]=arguments[y];p.fn.apply(p.context,k)}else{var F=p.length,_;for(y=0;y<F;y++)switch(p[y].once&&this.removeListener(d,p[y].fn,void 0,!0),C){case 1:p[y].fn.call(p[y].context);break;case 2:p[y].fn.call(p[y].context,u);break;case 3:p[y].fn.call(p[y].context,u,c);break;case 4:p[y].fn.call(p[y].context,u,c,f);break;default:if(!k)for(_=1,k=new Array(C-1);_<C;_++)k[_-1]=arguments[_];p[y].fn.apply(p[y].context,k)}}return!0},s.prototype.on=function(d,u,c){return i(this,d,u,c,!1)},s.prototype.once=function(d,u,c){return i(this,d,u,c,!0)},s.prototype.removeListener=function(d,u,c,f){var h=r?r+d:d;if(!this._events[h])return this;if(!u)return a(this,h),this;var g=this._events[h];if(g.fn)g.fn===u&&(!f||g.once)&&(!c||g.context===c)&&a(this,h);else{for(var b=0,p=[],C=g.length;b<C;b++)(g[b].fn!==u||f&&!g[b].once||c&&g[b].context!==c)&&p.push(g[b]);p.length?this._events[h]=p.length===1?p[0]:p:a(this,h)}return this},s.prototype.removeAllListeners=function(d){var u;return d?(u=r?r+d:d,this._events[u]&&a(this,u)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,t.exports=s})($t)),$t.exports}Yn();const H=Symbol.for("@ts-pattern/matcher"),qr=Symbol.for("@ts-pattern/isVariadic"),vt="@ts-pattern/anonymous-select-key",Ot=t=>!!(t&&typeof t=="object"),lt=t=>t&&!!t[H],j=(t,e,r)=>{if(lt(t)){const n=t[H](),{matched:o,selections:i}=n.match(e);return o&&i&&Object.keys(i).forEach(a=>r(a,i[a])),o}if(Ot(t)){if(!Ot(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let n=[],o=[],i=[];for(const a of t.keys()){const s=t[a];lt(s)&&s[qr]?i.push(s):i.length?o.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<n.length+o.length)return!1;const a=e.slice(0,n.length),s=o.length===0?[]:e.slice(-o.length),l=e.slice(n.length,o.length===0?1/0:-o.length);return n.every((d,u)=>j(d,a[u],r))&&o.every((d,u)=>j(d,s[u],r))&&(i.length===0||j(i[0],l,r))}return t.length===e.length&&t.every((a,s)=>j(a,e[s],r))}return Reflect.ownKeys(t).every(n=>{const o=t[n];return(n in e||lt(i=o)&&i[H]().matcherType==="optional")&&j(o,e[n],r);var i})}return Object.is(e,t)},K=t=>{var e,r,n;return Ot(t)?lt(t)?(e=(r=(n=t[H]()).getSelectionKeys)==null?void 0:r.call(n))!=null?e:[]:Array.isArray(t)?Ke(t,K):Ke(Object.values(t),K):[]},Ke=(t,e)=>t.reduce((r,n)=>r.concat(e(n)),[]);function eo(...t){if(t.length===1){const[e]=t;return r=>j(e,r,()=>{})}if(t.length===2){const[e,r]=t;return j(e,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function V(t){return Object.assign(t,{optional:()=>Ut(t),and:e=>B(t,e),or:e=>Kr(t,e),select:e=>e===void 0?He(t):He(e,t)})}function Rt(t){return Object.assign((e=>Object.assign(e,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(e,{[qr]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var o;return(o=n[r++])!=null?o:n.at(-1)}}}}))(t),{optional:()=>Rt(Ut(t)),select:e=>Rt(e===void 0?He(t):He(e,t))})}function Ut(t){return V({[H]:()=>({match:e=>{let r={};const n=(o,i)=>{r[o]=i};return e===void 0?(K(t).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:j(t,e,n),selections:r}},getSelectionKeys:()=>K(t),matcherType:"optional"})})}const to=(t,e)=>{for(const r of t)if(!e(r))return!1;return!0},ro=(t,e)=>{for(const[r,n]of t.entries())if(!e(n,r))return!1;return!0},no=(t,e)=>{const r=Reflect.ownKeys(t);for(const n of r)if(!e(n,t[n]))return!1;return!0};function B(...t){return V({[H]:()=>({match:e=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:t.every(o=>j(o,e,n)),selections:r}},getSelectionKeys:()=>Ke(t,K),matcherType:"and"})})}function Kr(...t){return V({[H]:()=>({match:e=>{let r={};const n=(o,i)=>{r[o]=i};return Ke(t,K).forEach(o=>n(o,void 0)),{matched:t.some(o=>j(o,e,n)),selections:r}},getSelectionKeys:()=>Ke(t,K),matcherType:"or"})})}function S(t){return{[H]:()=>({match:e=>({matched:!!t(e)})})}}function He(...t){const e=typeof t[0]=="string"?t[0]:void 0,r=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return V({[H]:()=>({match:n=>{let o={[e??vt]:n};return{matched:r===void 0||j(r,n,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[e??vt].concat(r===void 0?[]:K(r))})})}function Hr(t){return!0}function de(t){return typeof t=="number"}function me(t){return typeof t=="string"}function be(t){return typeof t=="bigint"}const Xr=V(S(Hr)),oo=V(S(Hr)),io=Xr,we=t=>Object.assign(V(t),{startsWith:e=>{return we(B(t,(r=e,S(n=>me(n)&&n.startsWith(r)))));var r},endsWith:e=>{return we(B(t,(r=e,S(n=>me(n)&&n.endsWith(r)))));var r},minLength:e=>we(B(t,(r=>S(n=>me(n)&&n.length>=r))(e))),length:e=>we(B(t,(r=>S(n=>me(n)&&n.length===r))(e))),maxLength:e=>we(B(t,(r=>S(n=>me(n)&&n.length<=r))(e))),includes:e=>{return we(B(t,(r=e,S(n=>me(n)&&n.includes(r)))));var r},regex:e=>{return we(B(t,(r=e,S(n=>me(n)&&!!n.match(r)))));var r}}),ar=we(S(me)),ue=t=>Object.assign(V(t),{between:(e,r)=>ue(B(t,((n,o)=>S(i=>de(i)&&n<=i&&o>=i))(e,r))),lt:e=>ue(B(t,(r=>S(n=>de(n)&&n<r))(e))),gt:e=>ue(B(t,(r=>S(n=>de(n)&&n>r))(e))),lte:e=>ue(B(t,(r=>S(n=>de(n)&&n<=r))(e))),gte:e=>ue(B(t,(r=>S(n=>de(n)&&n>=r))(e))),int:()=>ue(B(t,S(e=>de(e)&&Number.isInteger(e)))),finite:()=>ue(B(t,S(e=>de(e)&&Number.isFinite(e)))),positive:()=>ue(B(t,S(e=>de(e)&&e>0))),negative:()=>ue(B(t,S(e=>de(e)&&e<0)))}),so=ue(S(de)),ye=t=>Object.assign(V(t),{between:(e,r)=>ye(B(t,((n,o)=>S(i=>be(i)&&n<=i&&o>=i))(e,r))),lt:e=>ye(B(t,(r=>S(n=>be(n)&&n<r))(e))),gt:e=>ye(B(t,(r=>S(n=>be(n)&&n>r))(e))),lte:e=>ye(B(t,(r=>S(n=>be(n)&&n<=r))(e))),gte:e=>ye(B(t,(r=>S(n=>be(n)&&n>=r))(e))),positive:()=>ye(B(t,S(e=>be(e)&&e>0))),negative:()=>ye(B(t,S(e=>be(e)&&e<0)))}),ao=ye(S(be)),lo=V(S(function(t){return typeof t=="boolean"})),co=V(S(function(t){return typeof t=="symbol"})),uo=V(S(function(t){return t==null})),fo=V(S(function(t){return t!=null}));var ho={__proto__:null,matcher:H,optional:Ut,array:function(...t){return Rt({[H]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const r=t[0];let n={};if(e.length===0)return K(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,a)=>{n[i]=(n[i]||[]).concat([a])};return{matched:e.every(i=>j(r,i,o)),selections:n}},getSelectionKeys:()=>t.length===0?[]:K(t[0])})})},set:function(...t){return V({[H]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};if(t.length===0)return{matched:!0};const n=(i,a)=>{r[i]=(r[i]||[]).concat([a])},o=t[0];return{matched:to(e,i=>j(o,i,n)),selections:r}},getSelectionKeys:()=>t.length===0?[]:K(t[0])})})},map:function(...t){return V({[H]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(t.length===0)return{matched:!0};var o;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=t[0])==null?void 0:o.toString()}`);const[i,a]=t;return{matched:ro(e,(s,l)=>{const d=j(i,l,n),u=j(a,s,n);return d&&u}),selections:r}},getSelectionKeys:()=>t.length===0?[]:[...K(t[0]),...K(t[1])]})})},record:function(...t){return V({[H]:()=>({match:e=>{if(e===null||typeof e!="object"||Array.isArray(e))return{matched:!1};var r;if(t.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=t[0])==null?void 0:r.toString()}`);let n={};const o=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[i,a]=t.length===1?[ar,t[0]]:t;return{matched:no(e,(s,l)=>{const d=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),u=d!==null&&j(i,d,o),c=j(i,s,o),f=j(a,l,o);return(c||u)&&f}),selections:n}},getSelectionKeys:()=>t.length===0?[]:[...K(t[0]),...K(t[1])]})})},intersection:B,union:Kr,not:function(t){return V({[H]:()=>({match:e=>({matched:!j(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:S,select:He,any:Xr,unknown:oo,_:io,string:ar,number:so,bigint:ao,boolean:lo,symbol:co,nullish:uo,nonNullable:fo,instanceOf:function(t){return V(S((function(e){return r=>r instanceof e})(t)))},shape:function(t){return V(S(eo(t)))}};class go extends Error{constructor(e){let r;try{r=JSON.stringify(e)}catch{r=e}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=e}}const Lt={matched:!1,value:void 0};function Ne(t){return new pt(t,Lt)}class pt{constructor(e,r){this.input=void 0,this.state=void 0,this.input=e,this.state=r}with(...e){if(this.state.matched)return this;const r=e[e.length-1],n=[e[0]];let o;e.length===3&&typeof e[1]=="function"?o=e[1]:e.length>2&&n.push(...e.slice(1,e.length-1));let i=!1,a={};const s=(d,u)=>{i=!0,a[d]=u},l=!n.some(d=>j(d,this.input,s))||o&&!o(this.input)?Lt:{matched:!0,value:r(i?vt in a?a[vt]:a:this.input,this.input)};return new pt(this.input,l)}when(e,r){if(this.state.matched)return this;const n=!!e(this.input);return new pt(this.input,n?{matched:!0,value:r(this.input,this.input)}:Lt)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=vo){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function vo(t){throw new go(t)}const it={CREATED:"created",SIGNALING:"signaling",READY:"ready",LINKING:"linking"},le={STANDBY:"standby",CREATING:"creating",CONNECTING:"connecting",CONNECTED:"connected",ERROR:"error"};var Tt={exports:{}};var lr;function po(){return lr||(lr=1,(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,n(s)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)e.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(Tt)),Tt.exports}var mo=po();const xe=Zn(mo),bo=async t=>{if(typeof t=="string"){if(t==="simple")return await Promise.resolve().then(()=>require("./simple-DDht1UVo.cjs")).then(e=>e.simpleTheme);if(t==="openlv")return await Promise.resolve().then(()=>require("./openlv-SMG3Trx9.cjs")).then(e=>e.openlvTheme);throw new Error(`Unknown theme: ${t}`)}return t},It=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Qr=(t,e=[],r={})=>{for(const[n,o]of Object.entries(t)){const i=[...e,n];It(o)?Qr(o,i,r):r[`--lv-${i.join("-")}`]=o}return r},wo=(t="auto",e="system")=>t==="light"||t==="dark"?t:e==="system"?globalThis.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,Jr=(t,e)=>{const r={...t};for(const n of Object.keys(e)){const o=t[n],i=e[n];r[n]=It(o)&&It(i)?Jr(o,i):i}return r},yo=async(t,e="system")=>{const r=await bo(t.theme),n=wo(t.mode,e),o=r[n];if(!o)return"";const i=r.common?Jr(r.common,o):o,a=Qr(i);return Object.entries(a).map(([s,l])=>`${s}: ${l};`).join(`
2
+ `)},cr=`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-divide-x-reverse:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.bottom-0{bottom:calc(var(--spacing) * 0)}.left-1\\/2{left:50%}.z-10{z-index:10}.z-10000{z-index:10000}.mx-auto{margin-inline:auto}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-18{height:calc(var(--spacing) * 18)}.h-38{height:calc(var(--spacing) * 38)}.h-\\[200px\\]{height:200px}.h-full{height:100%}.min-h-32{min-height:calc(var(--spacing) * 32)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-48{width:calc(var(--spacing) * 48)}.w-\\[200px\\]{width:200px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[400px\\]{max-width:400px}.flex-1{flex:1}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.animate-\\[bg-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out bg-in}.animate-\\[fade-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out fade-in}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.-space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -4) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -4) * calc(1 - var(--tw-space-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-\\(--lv-control-button-secondary-border\\)>:not(:last-child)){border-color:var(--lv-control-button-secondary-border)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\(--lv-control-button-primary-border\\){border-color:var(--lv-control-button-primary-border)}.border-\\(--lv-control-button-secondary-border\\){border-color:var(--lv-control-button-secondary-border)}.border-\\(--lv-control-button-secondary-border\\,var\\(--lv-control-button-secondary-background\\)\\){border-color:var(--lv-control-button-secondary-border,var(--lv-control-button-secondary-background))}.border-\\(--lv-control-input-border\\){border-color:var(--lv-control-input-border)}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-500{border-color:var(--color-gray-500)}.border-t-transparent{border-top-color:#0000}.bg-\\(--lv-body-background\\){background-color:var(--lv-body-background)}.bg-\\(--lv-card-background\\){background-color:var(--lv-card-background)}.bg-\\(--lv-control-button-primary-background\\){background-color:var(--lv-control-button-primary-background)}.bg-\\(--lv-control-button-secondary-background\\){background-color:var(--lv-control-button-secondary-background)}.bg-\\(--lv-qr-background\\){background-color:var(--lv-qr-background)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\;charset\\=US-ASCII\\,\\%3Csvg\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%20width\\%3D\\%2214\\%22\\%20height\\%3D\\%2214\\%22\\%20viewBox\\%3D\\%220\\%200\\%2024\\%2024\\%22\\%20fill\\%3D\\%22none\\%22\\%20stroke\\%3D\\%22\\%23888\\%22\\%20stroke-width\\%3D\\%222\\%22\\%3E\\%3Cpath\\%20d\\%3D\\%22M6\\%209l6\\%206\\%206-6\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]{background-image:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23888%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E)}.bg-\\[length\\:14px\\]{background-size:14px}.bg-\\[right_8px_center\\]{background-position:right 8px center}.bg-no-repeat{background-repeat:no-repeat}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.ps-1{padding-inline-start:calc(var(--spacing) * 1)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pr-0\\.5{padding-right:calc(var(--spacing) * .5)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-0\\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-start{text-align:start}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-\\(--lv-control-button-primary-color\\){color:var(--lv-control-button-primary-color)}.text-\\(--lv-control-button-secondary-color\\){color:var(--lv-control-button-secondary-color)}.text-\\(--lv-qr-color\\){color:var(--lv-qr-color)}.text-\\(--lv-text-muted\\){color:var(--lv-text-muted)}.text-\\(--lv-text-primary\\){color:var(--lv-text-primary)}.text-\\(--lv-text-secondary\\){color:var(--lv-text-secondary)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow,.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:block:is(:where(.group):hover *){display:block}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.first\\:rounded-t-sm:first-child{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.first\\:border-l-0:first-child{border-left-style:var(--tw-border-style);border-left-width:0}.first\\:pt-1\\.5:first-child{padding-top:calc(var(--spacing) * 1.5)}.first\\:pt-2:first-child{padding-top:calc(var(--spacing) * 2)}.last\\:rounded-b-sm:last-child{border-bottom-right-radius:var(--radius-sm);border-bottom-left-radius:var(--radius-sm)}.last\\:pb-2:last-child{padding-bottom:calc(var(--spacing) * 2)}@media(hover:hover){.hover\\:\\[background-color\\:var\\(--lv-control-button-tertiary-hoverBackground\\)\\]:hover{background-color:var(--lv-control-button-tertiary-hoverBackground)}.hover\\:bg-\\(--lv-card-background\\):hover{background-color:var(--lv-card-background)}.hover\\:bg-\\(--lv-control-button-primary-background-hover\\):hover{background-color:var(--lv-control-button-primary-background-hover)}.hover\\:bg-\\(--lv-control-button-primary-hoverBackground\\,var\\(--lv-control-button-primary-background\\)\\):hover{background-color:var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background))}.hover\\:bg-\\(--lv-control-button-secondary-background\\):hover{background-color:var(--lv-control-button-secondary-background)}.hover\\:bg-\\(--lv-control-button-secondary-hoverBackground\\):hover{background-color:var(--lv-control-button-secondary-hoverBackground)}.hover\\:bg-\\(--lv-control-button-secondary-hoverBackground\\,var\\(--lv-control-button-secondary-background\\)\\):hover{background-color:var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background))}.hover\\:bg-\\(--lv-control-button-tertiary-hoverBackground\\):hover{background-color:var(--lv-control-button-tertiary-hoverBackground)}.hover\\:bg-\\(--lv-control-button-tertiary-hoverBackground\\,transparent\\):hover{background-color:var(--lv-control-button-tertiary-hoverBackground,transparent)}}.focus\\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-\\(--lv-control-button-primary-background\\):focus{--tw-ring-color:var(--lv-control-button-primary-background)}.focus\\:ring-blue-200:focus{--tw-ring-color:var(--color-blue-200)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:bg-\\(--lv-control-button-primary-activeBackground\\,var\\(--lv-control-button-primary-hoverBackground\\,var\\(--lv-control-button-primary-background\\)\\)\\):active{background-color:var(--lv-control-button-primary-activeBackground,var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background)))}.active\\:bg-\\(--lv-control-button-secondary-activeBackground\\):active{background-color:var(--lv-control-button-secondary-activeBackground)}.active\\:bg-\\(--lv-control-button-secondary-activeBackground\\,var\\(--lv-control-button-secondary-hoverBackground\\,var\\(--lv-control-button-secondary-background\\)\\)\\):active{background-color:var(--lv-control-button-secondary-activeBackground,var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background)))}.active\\:bg-\\(--lv-control-button-tertiary-activeBackground\\,var\\(--lv-control-button-tertiary-hoverBackground\\,transparent\\)\\):active{background-color:var(--lv-control-button-tertiary-activeBackground,var(--lv-control-button-tertiary-hoverBackground,transparent))}.disabled\\:bg-\\(--lv-control-button-primary-disabledBackground\\,var\\(--lv-control-button-primary-background\\)\\):disabled{background-color:var(--lv-control-button-primary-disabledBackground,var(--lv-control-button-primary-background))}.disabled\\:bg-\\(--lv-control-button-secondary-disabledBackground\\,var\\(--lv-control-button-secondary-background\\)\\):disabled{background-color:var(--lv-control-button-secondary-disabledBackground,var(--lv-control-button-secondary-background))}.disabled\\:text-\\(--lv-control-button-primary-disabledColor\\,var\\(--lv-control-button-primary-color\\)\\):disabled{color:var(--lv-control-button-primary-disabledColor,var(--lv-control-button-primary-color))}.disabled\\:text-\\(--lv-control-button-secondary-disabledColor\\,var\\(--lv-control-button-secondary-color\\)\\):disabled{color:var(--lv-control-button-secondary-disabledColor,var(--lv-control-button-secondary-color))}.disabled\\:text-\\(--lv-control-button-tertiary-disabledColor\\,var\\(--lv-text-muted\\)\\):disabled{color:var(--lv-control-button-tertiary-disabledColor,var(--lv-text-muted))}@media(min-width:48rem){.md\\:flex{display:flex}.md\\:w-3\\/5{width:60%}.md\\:items-center{align-items:center}:where(.md\\:divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.md\\:divide-y-0>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(0px * var(--tw-divide-y-reverse));border-bottom-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)))}}@media(min-width:64rem){.lg\\:p-4{padding:calc(var(--spacing) * 4)}}.ltr\\:right-5:where(:dir(ltr),[dir=ltr],[dir=ltr] *){right:calc(var(--spacing) * 5)}.ltr\\:-ml-1:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:calc(var(--spacing) * -1)}.ltr\\:translate-x-full:where(:dir(ltr),[dir=ltr],[dir=ltr] *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.ltr\\:rounded-l-none:where(:dir(ltr),[dir=ltr],[dir=ltr] *){border-top-left-radius:0;border-bottom-left-radius:0}.rtl\\:left-5:where(:dir(rtl),[dir=rtl],[dir=rtl] *){left:calc(var(--spacing) * 5)}.rtl\\:-mr-1:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:calc(var(--spacing) * -1)}.rtl\\:-translate-x-full:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.rtl\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:180deg}.rtl\\:rounded-r-none:where(:dir(rtl),[dir=rtl],[dir=rtl] *){border-top-right-radius:0;border-bottom-right-radius:0}}:root,:host{--color-body-background:var(--lv-body-background);--radius-radius:var(--lv-border-radius);font-family:var(--lv-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji")}.border{border-style:solid}@keyframes fade-in{0%{transform:translateY(-2px)scale(.95)}to{transform:translateY(0)scale(1)}}@keyframes bg-in{0%{opacity:0;-webkit-backdrop-filter:blur();backdrop-filter:blur()}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.modal-transition__container{display:grid;position:relative}.modal-transition__layer{will-change:transform,opacity;grid-area:1/1;width:100%}.modal-transition__layer--outgoing{z-index:1;animation:.15s ease-out forwards modal-transition-out;position:absolute}.modal-transition__layer--incoming{z-index:2;animation:.2s ease-out forwards modal-transition-in}[data-openlv-theme-mode=dark] img[data-openlv-brand-logo]{filter:invert()brightness(1.1)}@media(prefers-color-scheme:dark){[data-openlv-theme-mode=system] img[data-openlv-brand-logo]{filter:invert()brightness(1.1)}}@keyframes modal-transition-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes modal-transition-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@keyframes spin{to{transform:rotate(360deg)}}`,dr=async(t,e,r="system")=>{let n=t.querySelector("style[data-openlv-modal]");n||(n=document.createElement("style"),n.dataset.openlvModal="true",t.append(n));const o={...e,theme:e?.theme??"simple"};if(o){const i=await yo(o,r);n.textContent=`:root, :host {
3
+ ${i}
6
4
  }
7
- `+o),n.textContent=o,e.appendChild(n)}};class Pe extends HTMLElement{constructor(r){super();we(this,"shadow");we(this,"renderRequested",!1);we(this,"parameters");this.parameters=r,this.shadow=this.attachShadow({mode:"open"}),vo(this.shadow,this.parameters.theme)}connectedCallback(){this.requestRender()}disconnectedCallback(){g.render(null,this.shadow)}showModal(){this.style.display="block"}hideModal(){this.style.display="none"}requestRender(){this.renderRequested||(this.renderRequested=!0,queueMicrotask(()=>{this.renderRequested=!1,this.performRender()}))}performRender(){g.render(g.h(Lr,this.parameters),this.shadow)}}const mo=(e="idle")=>{const[t,r]=d.useState({state:e}),n=d.useCallback((i,l)=>{r(c=>({...c,state:i,...l}))},[]),o=d.useCallback(i=>{r(i)},[]),a=d.useCallback(()=>{r({state:"idle"})},[]);return{connectionInfo:t,updateState:n,updateConnectionInfo:o,reset:a}},Kt=(e="openlv-modal")=>{if(typeof window>"u")return e;const t=window.customElements;return t?(t.get(e)||t.define(e,Pe),e):(console.warn("OpenLV modal: custom elements are not supported in this environment."),e)},bo=e=>{const t=document.querySelector("openlv-modal");if(t&&t.remove(),!t){Kt();const r=new Pe({onClose(){Xe("modal closed"),r.remove(),e.onClose?.()},provider:e.provider,theme:e.theme});document.body.appendChild(r),r.showModal()}};exports.ModalRoot=Wt;exports.OPENLV_ICON_128=Mt;exports.OpenLVModalElement=Pe;exports.default=Pe;exports.registerOpenLVModal=Kt;exports.triggerOpenModal=bo;exports.useConnectionState=mo;
5
+ `+cr}else n.textContent=cr};class xt extends HTMLElement{constructor(r){super();ee(this,"shadow");ee(this,"renderRequested",!1);ee(this,"parameters");ee(this,"themeCleanup");ee(this,"disposeRender");this.parameters=r,this.shadow=this.attachShadow({mode:"open"});const n=r.provider.storage.getSettings()?.theme??"system";dr(this.shadow,r.theme,n)}connectedCallback(){this.requestRender(),this.themeCleanup?.(),this.setupThemeListener()}disconnectedCallback(){this.disposeRender?.(),this.disposeRender=void 0,this.themeCleanup?.()}setupThemeListener(){const r=()=>{const o=this.parameters.provider.storage.getSettings()?.theme??"system";dr(this.shadow,this.parameters.theme,o)};this.parameters.provider.storage.emitter.on("settings_change",r);const n=globalThis.matchMedia("(prefers-color-scheme: dark)");n.addEventListener("change",r),this.themeCleanup=()=>{this.parameters.provider.storage.emitter.off("settings_change",r),n.removeEventListener("change",r)}}showModal(){this.style.display="block"}hideModal(){this.style.display="none"}requestRender(){this.renderRequested||(this.renderRequested=!0,queueMicrotask(()=>{this.renderRequested=!1,this.performRender()}))}performRender(){this.disposeRender?.(),this.disposeRender=Dn(()=>{const r=this;return v(Lo,X(()=>r.parameters))},this.shadow)}}const xo={close:"Close",yes:"Yes",no:"No",protocol:"Protocol"},ko={connectedSuccessfully:"Connected Successfully!",connecting:"Connecting",ready:"Ready",handshakeClosed:"Handshake Closed",handshakePartial:"Handshake Partial",encrypted:"Encrypted",signalError:"Signal Error",disconnected:"Disconnected"},Co={title:"Settings",language:"Language",connection:{title:"Connection",description:"Configure how you connect to your wallet."},theme:{title:"Appearance",mode:"Theme",light:"Light",dark:"Dark",system:"System"},connectionPreferences:{title:"Connection preferences",retainSessionHistory:"Retain session history",autoReconnect:"Auto reconnect"},signaling:{title:"Signaling",description:"Signaling is the handshake protocol used to establish a connection.",server:"Server",serverUrl:"Server URL"},transport:{title:"Transport",description:"This is how the connection is maintained.",webrtc:"WebRTC",iceServers:{title:"ICE Servers",stun:"STUN Servers",turn:"TURN Servers",addStun:"Add STUN Server",addTurn:"Add TURN Server",username:"Username",credential:"Password"}},appearance:"Appearance"},So={title:"Connect Wallet"},Ao={title:"What is openlv?",scanQrCode:"Scan QR Code",approveOnDevice:"Approve on device",youreConnected:"You're connected!"},$o={prompt:"Click the button below to start a connection",generateQr:"Generate QR",connectionSettings:"Connection settings"},To={preparingConnection:"Preparing connection",generatingKeys:"Generating keys...",connecting:"Connecting",waitingForNetwork:"Waiting for network connection...",establishingConnection:"Establishing connection...",mayTakeFewSeconds:"This may take a few seconds...",connectedSuccessfully:"Connected Successfully!",walletConnectedReady:"Your wallet is now connected and ready to use.",disconnected:"Disconnected",connectionClosed:"The connection has been closed."},Eo={clickToCopyUrl:"Click to copy connection URL",copyConnectionUrl:"Copy Connection URL",scanCodeInstruction:`Scan the code above using your mobile wallet.
6
+ Or copy the link and paste it into your wallet.`},_o={urlCopied:"Connection URL copied to clipboard!",backToQr:"Back to QR",closeModal:"Close modal"},Po={common:xo,status:ko,settings:Co,start:So,info:Ao,disconnected:$o,connectionFlow:To,handshake:Eo,modal:_o};var No=x("<br>");const Wt=[{tag:"en",name:"English",nativeName:"English"},{tag:"nl",name:"Dutch",nativeName:"Nederlands"},{tag:"es",name:"Spanish",nativeName:"Español"},{tag:"sv",name:"Swedish",nativeName:"Svenska"},{tag:"zh-cn",name:"Chinese (Simplified)",nativeName:"简体中文"},{tag:"fr",name:"French",nativeName:"Français"},{tag:"ar",name:"Arabic",nativeName:"العربية",rtl:!0},{tag:"he",name:"Hebrew",nativeName:"עברית",rtl:!0},{tag:"fa",name:"Persian",nativeName:"فارسی",rtl:!0}],Bo=t=>Wt.find(r=>r.tag===t)?.rtl??!1;new Set(Wt.map(t=>t.tag));const ur=t=>{if(typeof navigator>"u")return 0;const e=navigator.languages||[navigator.language];for(let r=0;r<e.length;r++){const n=e[r].toLowerCase();if(n===t)return e.length-r+1;if(n.startsWith(`${t}-`)||t.startsWith(`${n}-`))return e.length-r;const[o]=n.split("-");if(o===t||t.startsWith(`${o}-`))return e.length-r-.5}return 0},fr=(t,e)=>{if(!t)return;const r=e.split(".").filter(Boolean);if(r.length===0)return;let n=t;for(const o of r){if(typeof n!="object"||n===null)return;n=n[o]}return n},hr=(t,e)=>e?t.replaceAll(/\{(\w+)\}/g,(r,n)=>{const o=e[n];return o===void 0?r:String(o)}):t,Mo=t=>{const e=fr(t.primary,t.key);if(typeof e=="string")return hr(e,t.params);const r=fr(t.fallback,t.key);return typeof r=="string"?hr(r,t.params):t.key},Zr=Rr(void 0),Oo=async t=>Ne(t).with("en",()=>Promise.resolve(void 0)).with("nl",async()=>Promise.resolve().then(()=>require("./nl-bCeoO8RU.cjs")).then(e=>e.default)).with("es",async()=>Promise.resolve().then(()=>require("./es-B9xaw9fo.cjs")).then(e=>e.default)).with("sv",async()=>Promise.resolve().then(()=>require("./sv-BHh_RkLw.cjs")).then(e=>e.default)).with("fr",async()=>Promise.resolve().then(()=>require("./fr-D54ESMxz.cjs")).then(e=>e.default)).with("zh-cn",async()=>Promise.resolve().then(()=>require("./zh-cn-Bqo3eRaE.cjs")).then(e=>e.default)).with("ar",async()=>Promise.resolve().then(()=>require("./ar-xpXGBcxc.cjs")).then(e=>e.default)).with("he",async()=>Promise.resolve().then(()=>require("./he-BWZyf3Uy.cjs")).then(e=>e.default)).with("fa",async()=>Promise.resolve().then(()=>require("./fa-DCpZYzOX.cjs")).then(e=>e.default)).exhaustive(),Ro=t=>{const{provider:e}=je(),r=e.storage.getSettings().language,[n,o]=D(r??"en"),[i,a]=D(void 0),[s,l]=D(!1);oe(()=>{let h=!1;(async()=>{l(!0);try{const b=await Oo(n());if(h)return;a(b)}finally{h||l(!1)}})(),ie(()=>{h=!0})});const d=(h,g)=>{const b=Mo({primary:i(),fallback:Po,key:h,params:g}),p=b.split(`
7
+ `);return p.length<=1?b:Be(()=>p.map((C,k)=>[C,Be(()=>Be(()=>k<p.length-1)()?No():null)]))},u=E(()=>Bo(n())),f={languageTag:n,setLanguageTag:h=>{o(h)},isLoadingLanguagePack:s,isRtl:u,t:d};return v(Zr.Provider,{value:f,get children(){return t.children}})},Z=()=>{const t=Lr(Zr);if(!t)throw new Error("TranslationProvider not found");return t},Yr=Rr(void 0),Lo=t=>{const{provider:e,theme:r}=t;return v(Yr.Provider,{value:{provider:e,themeConfig:r},get children(){return v(Ro,{get children(){return v(un,{get onClose(){return t.onClose}})}})}})},je=()=>{const t=Lr(Yr);if(!t)throw new Error("Modal context not found");return t},Ye=()=>{const{provider:t}=je(),e=E(()=>t.getSession(),void 0,{name:"session"}),[r,n]=D(e()?.getState());console.log("session status",r());const o=s=>{console.log("session state change",s),n(s)};Ft(()=>{e()?.emitter.on("state_change",o)}),ie(()=>{e()?.emitter.off("state_change",o)});const i=E(()=>e()?.getHandshakeParameters());return{uri:E(()=>{const s=i();return s?Jn(s):void 0}),status:r}},Io=()=>{const{provider:t}=je();return{start:()=>{const e=t.storage.getSettings(),r=e?.signaling?.p,n=r?e?.signaling?.s?.[r]:void 0;if(!r||!n)throw new Error("Invalid protocol or server");return t.createSession({p:r,s:n})}}};var jo=x('<div class="rounded-md bg-(--lv-control-button-secondary-background) p-2 text-(--lv-text-muted)"><div>Unknown state:</div><div>URI:</div><div>Session Status:');const jt=t=>{const{uri:e,status:r}=Ye();return console.error("Unknown state:",{state:t.state}),(()=>{var n=jo(),o=n.firstChild;o.firstChild;var i=o.nextSibling;i.firstChild;var a=i.nextSibling;return a.firstChild,m(o,()=>JSON.stringify(t.state),null),m(i,e,null),m(a,()=>JSON.stringify(r()),null),n})()};const ze={newline:10,reset:27};function Do(t){if(!Number.isSafeInteger(t))throw new Error(`integer expected: ${t}`)}function Vo(t){if(!Number.isSafeInteger(t)||t<1||t>40)throw new Error(`Invalid version=${t}. Expected number [1..40]`)}function Ee(t,e){return t.toString(2).padStart(e,"0")}function gr(t,e){const r=t%e;return r>=0?r:e+r}function fe(t,e){return new Array(t).fill(e)}function Et(t){return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}function vr(t){let e=0,r=0;for(const i of t)e=Math.max(e,i.length),r+=i.length;const n=new Uint8Array(r);let o=0;for(let i=0;i<e;i++)for(const a of t)i<a.length&&(n[o++]=a[i]);return n}function Fo(){let t,e=1/0;return{add(r,n){r>=e||(t=n,e=r)},get:()=>t,score:()=>e}}function pr(t){return Object.freeze({has:e=>t.includes(e),decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("alphabet.decode input should be array of strings");return e.map(r=>{if(typeof r!="string")throw new Error(`alphabet.decode: not string element=${r}`);const n=t.indexOf(r);if(n===-1)throw new Error(`Unknown letter: "${r}". Allowed: ${t}`);return n})},encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return e.map(r=>{if(Do(r),r<0||r>=t.length)throw new Error(`Digit index outside alphabet: ${r} (alphabet: ${t.length})`);return t[r]})}})}function mr(t){if(t.length!==32)throw new Error("expects 32 element matrix");const e=[1431655765,858993459,252645135,16711935,65535];for(let r=0;r<5;r++){const n=e[r]>>>0,o=1<<r,i=o<<1;for(let a=0;a<32;a+=i)for(let s=0;s<o;s++){const l=a+s,d=l+o,u=t[l]>>>0,c=t[d]>>>0,f=(u>>>o^c)&n;t[l]=(u^f<<o)>>>0,t[d]=(c^f)>>>0}}}const Ue=t=>1<<(t&31)>>>0,_e=(t,e)=>e===0?0:e===32?4294967295:(1<<e)-1<<t>>>0;class q{constructor(e,r){ee(this,"defined");ee(this,"value");ee(this,"tailMask");ee(this,"words");ee(this,"fullWords");ee(this,"height");ee(this,"width");const{height:n,width:o}=q.size(e);if(!Number.isSafeInteger(n)||n<=0)throw new Error(`Bitmap: invalid height=${n}, expected positive safe integer dimension`);if(!Number.isSafeInteger(o)||o<=0)throw new Error(`Bitmap: invalid width=${o}, expected positive safe integer dimension`);if(this.height=n,this.width=o,this.tailMask=_e(0,o&31||32),this.words=Math.ceil(o/32)|0,this.fullWords=Math.floor(o/32)|0,this.value=new Uint32Array(this.words*n),this.defined=new Uint32Array(this.value.length),r){if(r.length!==n)throw new Error(`Bitmap: data height mismatch: exp=${n} got=${r.length}`);for(let i=0;i<n;i++){const a=r[i];if(!a||a.length!==o)throw new Error(`Bitmap: data width mismatch at y=${i}: exp=${o} got=${a?.length}`);for(let s=0;s<o;s++)this.set(s,i,a[s])}}}static size(e,r){if(typeof e=="number"&&(e={height:e,width:e}),!Number.isSafeInteger(e.height)&&e.height!==1/0)throw new Error(`Bitmap: invalid height=${e.height} (${typeof e.height})`);if(!Number.isSafeInteger(e.width)&&e.width!==1/0)throw new Error(`Bitmap: invalid width=${e.width} (${typeof e.width})`);return r!==void 0&&(e={width:Math.min(e.width,r.width),height:Math.min(e.height,r.height)}),e}static fromString(e){e=e.replace(/^\n+/g,"").replace(/\n+$/g,"");const r=e.split(String.fromCharCode(ze.newline)),n=r.length;let o;const i=[];for(const a of r){const s=a.split("").map(l=>{if(l==="X")return!0;if(l===" ")return!1;if(l!=="?")throw new Error(`Bitmap.fromString: unknown symbol=${l}`)});if(o!==void 0&&s.length!==o)throw new Error(`Bitmap.fromString different row sizes: width=${o} cur=${s.length}`);o=s.length,i.push(s)}return o===void 0&&(o=0),new q({height:n,width:o},i)}point(e){return this.get(e.x,e.y)}isInside(e){return 0<=e.x&&e.x<this.width&&0<=e.y&&e.y<this.height}size(e){if(!e)return{height:this.height,width:this.width};const{x:r,y:n}=this.xy(e);return{height:this.height-n,width:this.width-r}}xy(e){if(typeof e=="number"&&(e={x:e,y:e}),!Number.isSafeInteger(e.x))throw new Error(`Bitmap: invalid x=${e.x}`);if(!Number.isSafeInteger(e.y))throw new Error(`Bitmap: invalid y=${e.y}`);return e.x=gr(e.x,this.width),e.y=gr(e.y,this.height),e}wordIndex(e,r){return r*this.words+(e>>>5)}bitIndex(e,r){return{word:this.wordIndex(e,r),bit:e&31}}isDefined(e,r){const n=this.wordIndex(e,r),o=Ue(e);return(this.defined[n]&o)!==0}get(e,r){const n=this.wordIndex(e,r),o=Ue(e);return(this.value[n]&o)!==0}maskWord(e,r,n){const{defined:o,value:i}=this;o[e]|=r,i[e]=i[e]&~r|-n&r}set(e,r,n){n!==void 0&&this.maskWord(this.wordIndex(e,r),Ue(e),n)}fillRectConst(e,r,n,o,i){if(n<=0||o<=0||i===void 0)return;const{value:a,defined:s,words:l}=this,d=e>>>5,u=e+n-1>>>5,c=e&31,f=e+n-1&31;for(let h=0;h<o;h++){const g=(r+h)*l;if(d===u){const b=_e(c,f-c+1);this.maskWord(g+d,b,i);continue}this.maskWord(g+d,_e(c,32-c),i);for(let b=d+1;b<u;b++)s[g+b]=4294967295,a[g+b]=i?4294967295:0;this.maskWord(g+u,_e(0,f+1),i)}}rectWords(e,r,n,o,i){for(let a=0;a<o;a++){const s=r+a;for(let l=0;l<n;){const d=e+l,{bit:u,word:c}=this.bitIndex(d,s),f=Math.min(32-u,n-l);i(c,d,l,a,f),l+=f}}}rect(e,r,n){const{x:o,y:i}=this.xy(e),{height:a,width:s}=q.size(r,this.size({x:o,y:i}));if(typeof n!="function")return this.fillRectConst(o,i,s,a,n),this;const{defined:l,value:d}=this;return this.rectWords(o,i,s,a,(u,c,f,h,g)=>{let b=0,p=d[u];for(let C=0;C<g;C++){const k=Ue(c+C),y=n({x:f+C,y:h},(p&k)!==0);y!==void 0&&(b|=k,p=p&~k|-y&k)}l[u]|=b,d[u]=p}),this}rectRead(e,r,n){const{x:o,y:i}=this.xy(e),{height:a,width:s}=q.size(r,this.size({x:o,y:i})),{value:l}=this;return this.rectWords(o,i,s,a,(d,u,c,f,h)=>{const g=l[d];for(let b=0;b<h;b++){const p=Ue(u+b);n({x:c+b,y:f},(g&p)!==0)}}),this}hLine(e,r,n){return this.rect(e,{width:r,height:1},n)}vLine(e,r,n){return this.rect(e,{width:1,height:r},n)}border(e=2,r){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`Bitmap.border: invalid size=${e}`);const n=this.height+2*e,o=this.width+2*e,i=new q({height:n,width:o});return i.rect(0,1/0,r),i.embed({x:e,y:e},this),i}embed(e,r){const{x:n,y:o}=this.xy(e),{height:i,width:a}=q.size(r.size(),this.size({x:n,y:o}));if(a<=0||i<=0)return this;const{value:s,defined:l}=this,{words:d,value:u}=r;for(let c=0;c<i;c++){const f=c*d;for(let h=0;h<a;){const g=n+h,{word:b,bit:p}=this.bitIndex(g,o+c),{word:C,bit:k}=r.bitIndex(h,c),y=Math.min(32-p,a-h),F=u[C],_=k&&C+1<f+d?u[C+1]:0,ve=k?(F>>>k|_<<32-k)>>>0:F,he=_e(p,y),De=(ve&_e(0,y))<<p>>>0;l[b]|=he,s[b]=s[b]&~he|De,h+=y}}return this}rectSlice(e,r=this.size()){const{x:n,y:o}=this.xy(e),{height:i,width:a}=q.size(r,this.size({x:n,y:o})),s=new q({height:i,width:a});return this.rectRead({x:n,y:o},{height:i,width:a},(l,d)=>{this.isDefined(n+l.x,o+l.y)&&s.set(l.x,l.y,d)}),s}transpose(){const{height:e,width:r,value:n,defined:o,words:i}=this,a=new q({height:r,width:e}),{words:s,value:l,defined:d,tailMask:u}=a,c=new Uint32Array(32),f=new Uint32Array(32);for(let h=0;h<e;h+=32)for(let g=0;g<i;g++){const b=Math.min(32,e-h);for(let p=0;p<b;p++){const C=this.wordIndex(32*g,h+p);c[p]=n[C],f[p]=o[C]}c.fill(0,b),f.fill(0,b),mr(c),mr(f);for(let p=0;p<32;p++){const C=g*32+p;if(C>=r)break;const k=a.wordIndex(h,C),y=h>>>5===s-1?u:4294967295;l[k]=c[p]&y,d[k]=f[p]&y}}return a}negate(){const e=this.defined.length;for(let r=0;r<e;r++)this.value[r]=~this.value[r],this.defined[r]=4294967295;return this}scale(e){if(!Number.isSafeInteger(e)||e>1024)throw new Error(`invalid scale factor: ${e}`);const{height:r,width:n}=this;return new q({height:e*r,width:e*n}).rect({x:0,y:0},1/0,({x:i,y:a})=>this.get(i/e|0,a/e|0))}clone(){const e=new q(this.size());return e.defined.set(this.defined),e.value.set(this.value),e}assertDrawn(){const{height:e,width:r,defined:n,tailMask:o,fullWords:i,words:a}=this;if(!(!e||!r))for(let s=0;s<e;s++){const l=s*a;for(let d=0;d<i;d++)if(n[l+d]!==4294967295)throw new Error("Invalid color type=undefined");if(a!==i&&(n[l+i]&o)!==o)throw new Error("Invalid color type=undefined")}}countPatternInRow(e,r,...n){if(!Number.isSafeInteger(r)||r<=0||r>=32)throw new Error("wrong patternLen");const o=(1<<r)-1,{height:i,width:a,value:s,words:l}=this;if(!Number.isSafeInteger(e)||e<0||e>=i)return 0;let d=0;const u=this.wordIndex(0,e);for(let c=0,f=0;c<l;c++){const h=s[u+c],g=c===l-1&&a&31||32;for(let b=0;b<g;b++)if(f=(f<<1|h>>>b&1)&o,!(c*32+b+1<r)){for(const p of n)if(f===p){d++;break}}}return d}getRuns(e,r){const{height:n,width:o,value:i,words:a}=this;if(o===0||!Number.isSafeInteger(e)||e<0||e>=n)return;let s=0,l;const d=this.wordIndex(0,e);for(let u=0;u<a;u++){const c=i[d+u],f=u===a-1&&o&31||32;for(let h=0;h<f;h++){const g=(c&1<<h)!==0;if(g===l){s++;continue}l!==void 0&&r(s,l),l=g,s=1}}l!==void 0&&r(s,l)}popcnt(){const{height:e,width:r,words:n,fullWords:o,tailMask:i}=this;if(!e||!r)return 0;let a=0;for(let s=0;s<e;s++){const l=s*n;for(let d=0;d<o;d++)a+=Et(this.value[l+d]);n!==o&&(a+=Et(this.value[l+o]&i))}return a}countBoxes2x2(e){const{height:r,width:n,words:o}=this;if(n<2||!Number.isSafeInteger(e)||e<0||e+1>=r)return 0;const i=this.wordIndex(0,e),a=this.wordIndex(0,e+1),l=(n&31)===0?2147483647:_e(0,n-1&31);let d=0;for(let u=0;u<o;u++){const c=this.value[i+u],f=this.value[a+u],h=~(c^f)>>>0,g=u+1<o?this.value[i+u+1]>>>0:0,b=~(c^(c>>>1|(g&1)<<31)>>>0)>>>0,p=u+1<o?this.value[a+u+1]>>>0:0,C=~(f^(f>>>1|(p&1)<<31)>>>0)>>>0;let k=(h&b&C)>>>0;u===o-1&&(k&=l),d+=Et(k)}return d}toString(){const e=String.fromCharCode(ze.newline);let r="";for(let n=0;n<this.height;n++){let o="";for(let i=0;i<this.width;i++){const a=this.get(i,n);o+=this.isDefined(i,n)?a?"X":" ":"?"}r+=o+(n+1===this.height?"":e)}return r}toRaw(){const e=Array.from({length:this.height},()=>new Array(this.width));for(let r=0;r<this.height;r++){const n=e[r];for(let o=0;o<this.width;o++)n[o]=this.get(o,r)}return e}toASCII(){const{height:e,width:r}=this;let n="";for(let o=0;o<e;o+=2){for(let i=0;i<r;i++){const a=this.get(i,o),s=o+1>=e?!0:this.get(i,o+1);!a&&!s?n+="█":!a&&s?n+="▀":a&&!s?n+="▄":a&&s&&(n+=" ")}n+=String.fromCharCode(ze.newline)}return n}toTerm(){const e=String.fromCharCode(ze.reset),r=e+"[0m",n=e+"[1;47m "+r,o=e+"[40m "+r,i=String.fromCharCode(ze.newline);let a="";for(let s=0;s<this.height;s++){for(let l=0;l<this.width;l++){const d=this.get(l,s);a+=d?o:n}a+=i}return a}toSVG(e=!0){let r=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,n="",o;return this.rectRead(0,1/0,(i,a)=>{if(!a)return;const{x:s,y:l}=i;if(!e){r+=`<rect x="${s}" y="${l}" width="1" height="1" />`;return}let d=`M${s} ${l}`;if(o){const c=`m${s-o.x} ${l-o.y}`;c.length<=d.length&&(d=c)}const u=s<10?`H${s}`:"h-1";n+=`${d}h1v1${u}Z`,o=i}),e&&(r+=`<path d="${n}"/>`),r+="</svg>",r}toGIF(){const e=s=>[s&255,s>>>8&255],r=[...e(this.width),...e(this.height)],n=[];this.rectRead(0,1/0,(s,l)=>n.push(+(l===!0)));const o=126,i=[71,73,70,56,55,97,...r,246,0,0,255,255,255,...fe(381,0),44,0,0,0,0,...r,0,7],a=Math.floor(n.length/o);for(let s=0;s<a;s++)i.push(o+1,128,...n.slice(o*s,o*(s+1)).map(l=>+l));return i.push(n.length%o+1,128,...n.slice(a*o).map(s=>+s)),i.push(1,129,0,59),new Uint8Array(i)}toImage(e=!1){const{height:r,width:n}=this.size(),o=new Uint8Array(r*n*(e?3:4));let i=0;for(let a=0;a<r;a++)for(let s=0;s<n;s++){const l=this.get(s,a)?0:255;o[i++]=l,o[i++]=l,o[i++]=l,e||(o[i++]=255)}return{height:r,width:n,data:o}}}const br=Object.freeze(["low","medium","quartile","high"]),wr=Object.freeze(["numeric","alphanumeric","byte","kanji","eci"]),zo=[26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],Uo={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},Wo={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},U=Object.freeze({size:Object.freeze({encode:t=>21+4*(t-1),decode:t=>(t-17)/4}),sizeType:t=>Math.floor((t+7)/17),alignmentPatterns(t){if(t===1)return[];const e=6,r=U.size.encode(t)-e-1,n=r-e,o=Math.ceil(n/28);let i=Math.floor(n/o);i%2?i+=1:n%o*2>=o&&(i+=2);const a=[e];for(let s=1;s<o;s++)a.push(r-(o-s)*i);return a.push(r),a},ECCode:Object.freeze({low:1,medium:0,quartile:3,high:2}),formatMask:21522,formatBits(t,e){const r=U.ECCode[t]<<3|e;let n=r;for(let o=0;o<10;o++)n=n<<1^(n>>9)*1335;return(r<<10|n)^U.formatMask},versionBits(t){let e=t;for(let r=0;r<12;r++)e=e<<1^(e>>11)*7973;return t<<12|e},alphabet:Object.freeze({numeric:pr("0123456789"),alphanumerc:pr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")}),lengthBits(t,e){return{numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]}[e][U.sizeType(t)]},modeBits:Object.freeze({numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"}),capacity(t,e){const r=zo[t-1],n=Uo[e][t-1],o=Wo[e][t-1],i=Math.floor(r/o)-n,a=o-r%o;return{words:n,numBlocks:o,shortBlocks:a,blockLen:i,capacity:(r-n*o)*8,total:(n+i)*o+o-a}}}),Gt=Object.freeze([(t,e)=>(t+e)%2==0,(t,e)=>e%2==0,(t,e)=>t%3==0,(t,e)=>(t+e)%3==0,(t,e)=>(Math.floor(e/2)+Math.floor(t/3))%2==0,(t,e)=>t*e%2+t*e%3==0,(t,e)=>(t*e%2+t*e%3)%2==0,(t,e)=>((t+e)%2+t*e%3)%2==0]),w={tables:(t=>{const e=fe(256,0),r=fe(256,0);for(let n=0,o=1;n<256;n++)e[n]=o,r[o]=n,o<<=1,o&256&&(o^=t);return{exp:e,log:r}})(285),exp:t=>w.tables.exp[t],log(t){if(t===0)throw new Error(`GF.log: invalid arg=${t}`);return w.tables.log[t]%255},mul(t,e){return t===0||e===0?0:w.tables.exp[(w.tables.log[t]+w.tables.log[e])%255]},add:(t,e)=>t^e,pow:(t,e)=>w.tables.exp[w.tables.log[t]*e%255],inv(t){if(t===0)throw new Error(`GF.inverse: invalid arg=${t}`);return w.tables.exp[255-w.tables.log[t]]},polynomial(t){if(t.length==0)throw new Error("GF.polymomial: invalid length");if(t[0]!==0)return t;let e=0;for(;e<t.length-1&&t[e]==0;e++);return t.slice(e)},monomial(t,e){if(t<0)throw new Error(`GF.monomial: invalid degree=${t}`);if(e==0)return[0];let r=fe(t+1,0);return r[0]=e,w.polynomial(r)},degree:t=>t.length-1,coefficient:(t,e)=>t[w.degree(t)-e],mulPoly(t,e){if(t[0]===0||e[0]===0)return[0];const r=fe(t.length+e.length-1,0);for(let n=0;n<t.length;n++)for(let o=0;o<e.length;o++)r[n+o]=w.add(r[n+o],w.mul(t[n],e[o]));return w.polynomial(r)},mulPolyScalar(t,e){if(e==0)return[0];if(e==1)return t;const r=fe(t.length,0);for(let n=0;n<t.length;n++)r[n]=w.mul(t[n],e);return w.polynomial(r)},mulPolyMonomial(t,e,r){if(e<0)throw new Error("GF.mulPolyMonomial: invalid degree");if(r==0)return[0];const n=fe(t.length+e,0);for(let o=0;o<t.length;o++)n[o]=w.mul(t[o],r);return w.polynomial(n)},addPoly(t,e){if(t[0]===0)return e;if(e[0]===0)return t;let r=t,n=e;r.length>n.length&&([r,n]=[n,r]);let o=fe(n.length,0),i=n.length-r.length,a=n.slice(0,i);for(let s=0;s<a.length;s++)o[s]=a[s];for(let s=i;s<n.length;s++)o[s]=w.add(r[s-i],n[s]);return w.polynomial(o)},remainderPoly(t,e){const r=Array.from(t);for(let n=0;n<t.length-e.length+1;n++){const o=r[n];if(o!==0)for(let i=1;i<e.length;i++)e[i]!==0&&(r[n+i]=w.add(r[n+i],w.mul(e[i],o)))}return r.slice(t.length-e.length+1,r.length)},divisorPoly(t){let e=[1];for(let r=0;r<t;r++)e=w.mulPoly(e,[1,w.pow(2,r)]);return e},evalPoly(t,e){if(e==0)return w.coefficient(t,0);let r=t[0];for(let n=1;n<t.length;n++)r=w.add(w.mul(e,r),t[n]);return r},euclidian(t,e,r){w.degree(t)<w.degree(e)&&([t,e]=[e,t]);let n=t,o=e,i=[0],a=[1];for(;2*w.degree(o)>=r;){let d=n,u=i;if(n=o,i=a,n[0]===0)throw new Error("rLast[0] === 0");o=d;let c=[0];const f=w.inv(n[0]);for(;w.degree(o)>=w.degree(n)&&o[0]!==0;){const h=w.degree(o)-w.degree(n),g=w.mul(o[0],f);c=w.addPoly(c,w.monomial(h,g)),o=w.addPoly(o,w.mulPolyMonomial(n,h,g))}if(c=w.mulPoly(c,i),a=w.addPoly(c,u),w.degree(o)>=w.degree(n))throw new Error(`Division failed r: ${o}, rLast: ${n}`)}const s=w.coefficient(a,0);if(s==0)throw new Error("sigmaTilde(0) was zero");const l=w.inv(s);return[w.mulPolyScalar(a,l),w.mulPolyScalar(o,l)]}};function Go(t){return{encode(e){const r=w.divisorPoly(t),n=Array.from(e);return n.push(...r.slice(0,-1).fill(0)),Uint8Array.from(w.remainderPoly(n,r))},decode(e){const r=e.slice(),n=w.polynomial(Array.from(e));let o=fe(t,0),i=!1;for(let c=0;c<t;c++){const f=w.evalPoly(n,w.exp(c));o[o.length-1-c]=f,f!==0&&(i=!0)}if(!i)return r;o=w.polynomial(o);const a=w.monomial(t,1),[s,l]=w.euclidian(a,o,t),d=fe(w.degree(s),0);let u=0;for(let c=1;c<256&&u<d.length;c++)w.evalPoly(s,c)===0&&(d[u++]=w.inv(c));if(u!==d.length)throw new Error("RS.decode: invalid errors number");for(let c=0;c<d.length;c++){const f=r.length-1-w.log(d[c]);if(f<0)throw new Error("RS.decode: invalid error location");const h=w.inv(d[c]);let g=1;for(let b=0;b<d.length;b++)c!==b&&(g=w.mul(g,w.add(1,w.mul(d[b],h))));r[f]=w.add(r[f],w.mul(w.evalPoly(l,h),w.inv(g)))}return r}}}function qo(t,e){const{words:r,shortBlocks:n,numBlocks:o,blockLen:i,total:a}=U.capacity(t,e),s=Go(r);return{encode(l){const d=[],u=[];for(let g=0;g<o;g++){const b=g<n,p=i+(b?0:1);d.push(l.subarray(0,p)),u.push(s.encode(l.subarray(0,p))),l=l.subarray(p)}const c=vr(d),f=vr(u),h=new Uint8Array(c.length+f.length);return h.set(c),h.set(f,c.length),h},decode(l){if(l.length!==a)throw new Error(`interleave.decode: len(data)=${l.length}, total=${a}`);const d=[];for(let f=0;f<o;f++){const h=f<n;d.push(new Uint8Array(r+i+(h?0:1)))}let u=0;for(let f=0;f<i;f++)for(let h=0;h<o;h++)d[h][f]=l[u++];for(let f=n;f<o;f++)d[f][i]=l[u++];for(let f=i;f<i+r;f++)for(let h=0;h<o;h++){const g=h<n;d[h][f+(g?0:1)]=l[u++]}const c=[];for(const f of d)c.push(...Array.from(s.decode(f)).slice(0,-r));return Uint8Array.from(c)}}}function Ko(t,e,r,n=!1){const o=U.size.encode(t);let i=new q(o+2);const a=new q(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);i=i.embed(0,a).embed({x:-a.width,y:0},a).embed({x:0,y:-a.height},a),i=i.rectSlice(1,o);const s=new q(1).rect(0,1,!0).border(1,!1).border(1,!0),l=U.alignmentPatterns(t);for(const d of l)for(const u of l)i.isDefined(u,d)||i.embed({x:u-2,y:d-2},s);i=i.hLine({x:0,y:6},1/0,({x:d})=>i.isDefined(d,6)?void 0:d%2==0).vLine({x:6,y:0},1/0,({y:d})=>i.isDefined(6,d)?void 0:d%2==0);{const d=U.formatBits(e,r),u=c=>!n&&(d>>c&1)==1;for(let c=0;c<6;c++)i.set(8,c,u(c));for(let c=6;c<8;c++)i.set(8,c+1,u(c));for(let c=8;c<15;c++)i.set(8,o-15+c,u(c));for(let c=0;c<8;c++)i.set(o-c-1,8,u(c));for(let c=8;c<9;c++)i.set(15-c-1+1,8,u(c));for(let c=9;c<15;c++)i.set(15-c-1,8,u(c));i.set(8,o-8,!n)}if(t>=7){const d=U.versionBits(t);for(let u=0;u<18;u+=1){const c=!n&&(d>>u&1)==1,f=Math.floor(u/3),h=u%3+o-8-3;i.set(h,f,c),i.set(f,h,c)}}return i}function Ho(t,e,r){const n=t,o=n.height,i=Gt[e];let a=-1,s=o-1;for(let l=o-1;l>0;l-=2){for(l==6&&(l=5);;s+=a){for(let d=0;d<2;d+=1){const u=l-d;n.isDefined(u,s)||r(u,s,i(u,s))}if(s+a<0||s+a>=o)break}a=-a}}function Xo(t){let e="numeric";for(let r of t)if(!U.alphabet.numeric.has(r)&&(e="alphanumeric",!U.alphabet.alphanumerc.has(r)))return"byte";return e}function Qo(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function yr(t,e,r,n,o=Qo){let i="",a=r.length;if(n==="numeric"){const f=U.alphabet.numeric.decode(r.split("")),h=f.length;for(let g=0;g<h-2;g+=3)i+=Ee(f[g]*100+f[g+1]*10+f[g+2],10);h%3===1?i+=Ee(f[h-1],4):h%3===2&&(i+=Ee(f[h-2]*10+f[h-1],7))}else if(n==="alphanumeric"){const f=U.alphabet.alphanumerc.decode(r.split("")),h=f.length;for(let g=0;g<h-1;g+=2)i+=Ee(f[g]*45+f[g+1],11);h%2==1&&(i+=Ee(f[h-1],6))}else if(n==="byte"){const f=o(r);a=f.length,i=Array.from(f).map(h=>Ee(h,8)).join("")}else throw new Error("encode: unsupported type");const{capacity:s}=U.capacity(t,e),l=Ee(a,U.lengthBits(t,n));let d=U.modeBits[n]+l+i;if(d.length>s)throw new Error("Capacity overflow");d+="0".repeat(Math.min(4,Math.max(0,s-d.length))),d.length%8&&(d+="0".repeat(8-d.length%8));const u="1110110000010001";for(let f=0;d.length!==s;f++)d+=u[f%u.length];const c=Uint8Array.from(d.match(/(.{8})/g).map(f=>+`0b${f}`));return qo(t,e).encode(c)}function xr(t,e,r,n,o=!1){const i=Ko(t,e,n,o);let a=0;const s=8*r.length;if(Ho(i,n,(l,d,u)=>{let c=!1;a<s&&(c=(r[a>>>3]>>(7-a&7)&1)!==0,a++),i.set(l,d,c!==u)}),a!==s)throw new Error("QR: bytes left after draw");return i}const en=t=>{const e=t.map(r=>r?"1":"0").join("");return{len:e.length,n:+`0b${e}`}},tn=[!0,!1,!0,!0,!0,!1,!0],rn=[!1,!1,!1,!1],st=en([...tn,...rn]),kr=en([...rn,...tn]);function Jo(t){const e=t,{width:r,height:n}=e,o=e.transpose();let i=0;for(let f=0;f<n;f++)e.getRuns(f,h=>{h>=5&&(i+=3+(h-5))});for(let f=0;f<r;f++)o.getRuns(f,h=>{h>=5&&(i+=3+(h-5))});let a=0;for(let f=0;f<n-1;f++)a+=3*e.countBoxes2x2(f);let s=0;for(let f=0;f<n;f++)s+=40*e.countPatternInRow(f,st.len,st.n,kr.n);for(let f=0;f<r;f++)s+=40*o.countPatternInRow(f,st.len,st.n,kr.n);const l=n*r,d=e.popcnt(),c=10*Math.ceil(Math.max(0,Math.abs(d*100-l*50)-l*5)/(l*5));return i+a+s+c}function Zo(t,e,r,n){if(n===void 0){const o=Fo();for(let i=0;i<Gt.length;i++)o.add(Jo(xr(t,e,r,i,!0)),i);n=o.get()}if(n===void 0)throw new Error("Cannot find mask");return xr(t,e,r,n)}function Yo(t){if(!br.includes(t))throw new Error(`Invalid error correction mode=${t}. Expected: ${br}`)}function ei(t){if(!wr.includes(t))throw new Error(`Encoding: invalid mode=${t}. Expected: ${wr}`);if(t==="kanji"||t==="eci")throw new Error(`Encoding: ${t} is not supported (yet?).`)}function ti(t){if(![0,1,2,3,4,5,6,7].includes(t)||!Gt[t])throw new Error(`Invalid mask=${t}. Expected number [0..7]`)}function ri(t,e="raw",r={}){const n=r,o=n.ecc!==void 0?n.ecc:"medium";Yo(o);const i=n.encoding!==void 0?n.encoding:Xo(t);ei(i),n.mask!==void 0&&ti(n.mask);let a=n.version,s,l=new Error("Unknown error");if(a!==void 0)Vo(a),s=yr(a,o,t,i,n.textEncoder);else for(let c=1;c<=40;c++)try{s=yr(c,o,t,i,n.textEncoder),a=c;break}catch(f){l=f}if(!a||!s)throw l;let d=Zo(a,o,s,n.mask);d.assertDrawn();const u=n.border===void 0?2:n.border;if(!Number.isSafeInteger(u)||u<=0)throw new Error(`invalid border=${u}`);if(d=d.border(u,!1),n.scale!==void 0&&(d=d.scale(n.scale)),e==="raw")return d.toRaw();if(e==="ascii")return d.toASCII();if(e==="svg")return d.toSVG(n.optimize);if(e==="gif")return d.toGIF();if(e==="term")return d.toTerm();throw new Error(`Unknown output: ${e}`)}const nn=async t=>{if(!t)return!1;try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch(e){console.error("Failed to copy to clipboard",e)}try{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.left="-999999px",e.style.top="-999999px",document.body.append(e),e.focus(),e.select();const r=document.execCommand("copy");return e.remove(),r}catch{return!1}};var ni=x('<div class="flex flex-col items-center gap-4 px-2"><div class="w-full space-y-4 rounded-md border border-(--lv-control-button-secondary-border) bg-(--lv-card-background) p-4"><div class=w-full><button type=button class="w-full cursor-pointer rounded-lg border border-(--lv-control-button-secondary-border) bg-(--lv-control-button-secondary-background) px-4 py-2 text-sm text-(--lv-text-primary) transition hover:bg-(--lv-control-button-secondary-hoverBackground) active:bg-(--lv-control-button-secondary-activeBackground)"></button></div></div><div class="w-full text-sm text-(--lv-text-secondary)"><span>'),oi=x('<div class="relative mx-auto flex w-fit items-center justify-center rounded-lg border border-(--lv-control-button-secondary-border) bg-(--lv-qr-background) p-2"><button type=button class="h-[200px] w-[200px] cursor-pointer rounded bg-(--lv-qr-background) text-(--lv-qr-color)">');const ii=t=>ri(t,"svg",{optimize:!0,encoding:"byte",border:2}),si=()=>{const{t}=Z(),{uri:e}=Ye(),r=()=>{const n=e();n&&nn(n)};return(()=>{var n=ni(),o=n.firstChild,i=o.firstChild,a=i.firstChild,s=o.nextSibling,l=s.firstChild;return m(o,v(Me,{get when(){return e()},children:d=>(()=>{var u=oi(),c=u.firstChild;return c.$$click=r,z(f=>{var h=String(t("handshake.clickToCopyUrl")),g=ii(d());return h!==f.e&&re(c,"title",f.e=h),g!==f.t&&(c.innerHTML=f.t=g),f},{e:void 0,t:void 0}),u})()}),i),a.$$click=r,m(a,()=>t("handshake.copyConnectionUrl")),m(l,()=>t("handshake.scanCodeInstruction")),n})()};Se(["click"]);var ai=x('<div class="flex items-center justify-center"><div class="h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent">'),Cr=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="text-(--lv-text-muted) text-sm">'),li=x("<div>");const Sr=()=>ai(),ci=()=>{const{status:t}=Ye(),{t:e}=Z();return(()=>{var r=li();return m(r,v(Wr,{get children(){return[v(Pe,{get when(){return[it.CREATED,it.SIGNALING].includes(t()?.status??"")},get children(){var n=Cr(),o=n.firstChild,i=o.firstChild,a=i.nextSibling;return m(n,v(Sr,{}),o),m(i,()=>e("connectionFlow.connecting")),m(a,()=>e("connectionFlow.waitingForNetwork")),n}}),v(Pe,{get when(){return t()?.status===it.READY},get children(){return v(si,{})}}),v(Pe,{get when(){return t()?.status===it.LINKING},get children(){var n=Cr(),o=n.firstChild,i=o.firstChild,a=i.nextSibling;return m(n,v(Sr,{}),o),m(i,()=>e("connectionFlow.establishingConnection")),m(a,()=>e("connectionFlow.mayTakeFewSeconds")),n}})]}})),r})()};var di=x('<div class="flex items-center justify-center"><div class="h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent">'),ui=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="text-(--lv-text-muted) text-sm">'),fi=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><div class="mb-4 text-4xl">✅</div><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="text-(--lv-text-muted) text-sm">'),hi=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><div class="mb-4 text-4xl">🔌</div><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="mb-4 text-(--lv-text-muted) text-sm"></p></div><button type=button class="w-full rounded-lg bg-(--lv-control-button-secondary-background) px-4 py-2 font-semibold text-(--lv-text-primary) text-sm transition hover:bg-(--lv-control-button-primary-background-hover)">'),gi=x("<div class=w-full style=view-transition-name:connection-flow>");const vi=()=>di(),pi=t=>{const{t:e}=Z(),{provider:r}=je(),[n,o]=D(r.getState().status);return Ft(()=>{r.on("status_change",o)}),ie(()=>{r.off("status_change",o)}),(()=>{var i=gi();return m(i,v(Wr,{get fallback(){return v(jt,{get state(){return n()}})},get children(){return[v(Pe,{get when(){return n()===le.CREATING},get children(){var a=ui(),s=a.firstChild,l=s.firstChild,d=l.nextSibling;return m(a,v(vi,{}),s),m(l,()=>e("connectionFlow.preparingConnection")),m(d,()=>e("connectionFlow.generatingKeys")),a}}),v(Pe,{get when(){return n()===le.CONNECTING},get children(){return v(ci,{})}}),v(Pe,{get when(){return n()===le.CONNECTED},get children(){var a=fi(),s=a.firstChild,l=s.firstChild,d=l.nextSibling,u=d.nextSibling;return m(d,()=>e("connectionFlow.connectedSuccessfully")),m(u,()=>e("connectionFlow.walletConnectedReady")),a}}),v(Pe,{get when(){return n()===le.ERROR},get children(){var a=hi(),s=a.firstChild,l=s.firstChild,d=l.nextSibling,u=d.nextSibling,c=s.nextSibling;return m(d,()=>e("connectionFlow.disconnected")),m(u,()=>e("connectionFlow.connectionClosed")),yt(c,"click",t.onClose,!0),m(c,()=>e("common.close")),a}})]}})),i})()};Se(["click"]);var mi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},Le=mi,bi=x("<svg>"),wi=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},yi=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim(),xi=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),Ar=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ki=t=>{const e=xi(t);return e.charAt(0).toUpperCase()+e.slice(1)},Ci=t=>{const[e,r]=wt(t,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]);return(()=>{var n=bi();return gt(n,X(Le,{get width(){return e.size??Le.width},get height(){return e.size??Le.height},get stroke(){return e.color??Le.stroke},get"stroke-width"(){return Be(()=>!!e.absoluteStrokeWidth)()?Number(e.strokeWidth??Le["stroke-width"])*24/Number(e.size):Number(e.strokeWidth??Le["stroke-width"])},get class(){return yi("lucide","lucide-icon",...e.name!=null?[`lucide-${Ar(ki(e.name))}`,`lucide-${Ar(e.name)}`]:[],e.class!=null?e.class:"")},get"aria-hidden"(){return!e.children&&!wi(r)?"true":void 0}},r),!0,!0),m(n,v(ke,{get each(){return e.iconNode},children:([o,i])=>v(Xn,X({component:o},i))})),n})()},Ae=Ci,Si=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ai=t=>v(Ae,X(t,{iconNode:Si,name:"chevron-left"})),$i=Ai,Ti=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ei=t=>v(Ae,X(t,{iconNode:Ti,name:"chevron-right"})),_i=Ei,Pi=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ni=t=>v(Ae,X(t,{iconNode:Pi,name:"circle-question-mark"})),on=Ni,Bi=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Mi=t=>v(Ae,X(t,{iconNode:Bi,name:"plus"})),Oi=Mi,Ri=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Li=t=>v(Ae,X(t,{iconNode:Ri,name:"qr-code"})),Ii=Li,ji=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Di=t=>v(Ae,X(t,{iconNode:ji,name:"settings"})),Vi=Di,Fi=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],zi=t=>v(Ae,X(t,{iconNode:Fi,name:"trash-2"})),Ui=zi,Wi=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gi=t=>v(Ae,X(t,{iconNode:Wi,name:"x"})),qi=Gi,Ki=/\s+/g,Hi=t=>typeof t!="string"||!t?t:t.replace(Ki," ").trim(),mt=(...t)=>{const e=[],r=n=>{if(!n&&n!==0&&n!==0n)return;if(Array.isArray(n)){for(let i=0,a=n.length;i<a;i++)r(n[i]);return}const o=typeof n;if(o==="string"||o==="number"||o==="bigint"){if(o==="number"&&n!==n)return;e.push(String(n))}else if(o==="object"){const i=Object.keys(n);for(let a=0,s=i.length;a<s;a++){const l=i[a];n[l]&&e.push(l)}}};for(let n=0,o=t.length;n<o;n++){const i=t[n];i!=null&&r(i)}return e.length>0?Hi(e.join(" ")):void 0},$r=t=>t===!1?"false":t===!0?"true":t===0?"0":t,te=t=>{if(!t||typeof t!="object")return!0;for(const e in t)return!1;return!0},Xi=(t,e)=>{if(t===e)return!0;if(!t||!e)return!1;const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!n.includes(i)||t[i]!==e[i])return!1}return!0},Qi=(t,e)=>{for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=e[r];r in t?t[r]=mt(t[r],n):t[r]=n}return t},sn=(t,e)=>{for(let r=0;r<t.length;r++){const n=t[r];Array.isArray(n)?sn(n,e):n&&e.push(n)}},an=(...t)=>{const e=[];sn(t,e);const r=[];for(let n=0;n<e.length;n++)e[n]&&r.push(e[n]);return r},Dt=(t,e)=>{const r={};for(const n in t){const o=t[n];if(n in e){const i=e[n];Array.isArray(o)||Array.isArray(i)?r[n]=an(i,o):typeof o=="object"&&typeof i=="object"&&o&&i?r[n]=Dt(o,i):r[n]=i+" "+o}else r[n]=o}for(const n in e)n in t||(r[n]=e[n]);return r},Ji={twMerge:!0,twMergeConfig:{}};function Zi(){let t=null,e={},r=!1;return{get cachedTwMerge(){return t},set cachedTwMerge(n){t=n},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(n){e=n},get didTwMergeConfigChange(){return r},set didTwMergeConfigChange(n){r=n},reset(){t=null,e={},r=!1}}}var _t=Zi(),Yi=t=>{const e=(n,o)=>{const{extend:i=null,slots:a={},variants:s={},compoundVariants:l=[],compoundSlots:d=[],defaultVariants:u={}}=n,c={...Ji,...o},f=i?.base?mt(i.base,n?.base):n?.base,h=i?.variants&&!te(i.variants)?Dt(s,i.variants):s,g=i?.defaultVariants&&!te(i.defaultVariants)?{...i.defaultVariants,...u}:u;!te(c.twMergeConfig)&&!Xi(c.twMergeConfig,_t.cachedTwMergeConfig)&&(_t.didTwMergeConfigChange=!0,_t.cachedTwMergeConfig=c.twMergeConfig);const b=te(i?.slots),p=te(a)?{}:{base:mt(n?.base,b&&i?.base),...a},C=b?p:Qi({...i?.slots},te(p)?{base:n?.base}:p),k=te(i?.compoundVariants)?l:an(i?.compoundVariants,l),y=_=>{if(te(h)&&te(a)&&b)return t(f,_?.class,_?.className)(c);if(k&&!Array.isArray(k))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof k}`);if(d&&!Array.isArray(d))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof d}`);const ve=(A,$=h,T=null,M=null)=>{const P=$[A];if(!P||te(P))return null;const R=M?.[A]??_?.[A];if(R===null)return null;const Q=$r(R);if(typeof Q=="object")return null;const ce=g?.[A],G=Q??$r(ce);return P[G||"false"]},he=()=>{if(!h)return null;const A=Object.keys(h),$=[];for(let T=0;T<A.length;T++){const M=ve(A[T],h);M&&$.push(M)}return $},De=(A,$)=>{if(!h||typeof h!="object")return null;const T=[];for(const M in h){const P=ve(M,h,A,$),R=A==="base"&&typeof P=="string"?P:P&&P[A];R&&T.push(R)}return T},tt={};for(const A in _){const $=_[A];$!==void 0&&(tt[A]=$)}const Ve=(A,$)=>{const T=typeof _?.[A]=="object"?{[A]:_[A]?.initial}:{};return{...g,...tt,...T,...$}},rt=(A=[],$)=>{const T=[],M=A.length;for(let P=0;P<M;P++){const{class:R,className:Q,...ce}=A[P];let G=!0;const se=Ve(null,$);for(const pe in ce){const ae=ce[pe],Oe=se[pe];if(Array.isArray(ae)){if(!ae.includes(Oe)){G=!1;break}}else{if((ae==null||ae===!1)&&(Oe==null||Oe===!1))continue;if(Oe!==ae){G=!1;break}}}G&&(R&&T.push(R),Q&&T.push(Q))}return T},nt=A=>{const $=rt(k,A);if(!Array.isArray($))return $;const T={},M=t;for(let P=0;P<$.length;P++){const R=$[P];if(typeof R=="string")T.base=M(T.base,R)(c);else if(typeof R=="object")for(const Q in R)T[Q]=M(T[Q],R[Q])(c)}return T},$e=A=>{if(d.length<1)return null;const $={},T=Ve(null,A);for(let M=0;M<d.length;M++){const{slots:P=[],class:R,className:Q,...ce}=d[M];if(!te(ce)){let G=!0;for(const se in ce){const pe=T[se],ae=ce[se];if(pe===void 0||(Array.isArray(ae)?!ae.includes(pe):ae!==pe)){G=!1;break}}if(!G)continue}for(let G=0;G<P.length;G++){const se=P[G];$[se]||($[se]=[]),$[se].push([R,Q])}}return $};if(!te(a)||!b){const A={};if(typeof C=="object"&&!te(C)){const $=t;for(const T in C)A[T]=M=>{const P=nt(M),R=$e(M);return $(C[T],De(T,M),P?P[T]:void 0,R?R[T]:void 0,M?.class,M?.className)(c)}}return A}return t(f,he(),rt(k),_?.class,_?.className)(c)},F=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return y.variantKeys=F(),y.extend=i,y.base=f,y.slots=C,y.variants=h,y.defaultVariants=g,y.compoundSlots=d,y.compoundVariants=k,y};return{tv:e,createTV:n=>(o,i)=>e(o,i?Dt(n,i):n)}},es=(...t)=>e=>mt(t)||void 0,{tv:kt}=Yi(es),ts=x("<a>"),rs=x("<button type=button>");const Tr=kt({base:"flex items-center justify-center rounded-lg transition-all duration-100 cursor-pointer active:scale-95",variants:{$variant:{primary:"font-semibold text-sm bg-(--lv-control-button-primary-background) text-(--lv-control-button-primary-color) border-(--lv-control-button-primary-border) hover:bg-(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background)) active:bg-(--lv-control-button-primary-activeBackground,var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background))) disabled:bg-(--lv-control-button-primary-disabledBackground,var(--lv-control-button-primary-background)) disabled:text-(--lv-control-button-primary-disabledColor,var(--lv-control-button-primary-color))",secondary:"border bg-(--lv-control-button-secondary-background) text-(--lv-control-button-secondary-color) border-(--lv-control-button-secondary-border,var(--lv-control-button-secondary-background)) hover:bg-(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background)) active:bg-(--lv-control-button-secondary-activeBackground,var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background))) disabled:bg-(--lv-control-button-secondary-disabledBackground,var(--lv-control-button-secondary-background)) disabled:text-(--lv-control-button-secondary-disabledColor,var(--lv-control-button-secondary-color))",tertiary:"bg-transparent text-(--lv-text-muted) hover:bg-(--lv-control-button-tertiary-hoverBackground,transparent) active:bg-(--lv-control-button-tertiary-activeBackground,var(--lv-control-button-tertiary-hoverBackground,transparent)) disabled:text-(--lv-control-button-tertiary-disabledColor,var(--lv-text-muted))"},$size:{sm:"h-6",md:"h-8",lg:"h-11"},$aspect:{square:"aspect-square",auto:""}},defaultVariants:{$size:"md",$variant:"primary",$aspect:"auto"}}),Ie=t=>{const[e,r]=wt(t,["children","class","$variant","$size","$aspect","href","onClick"]);return e.href?(()=>{var n=ts();return gt(n,X({get href(){return e.href},get onClick(){return e.onClick},get class(){return xe(Tr({$variant:e.$variant,$size:e.$size,$aspect:e.$aspect}),e.class)}},r),!1,!0),m(n,()=>e.children),n})():(()=>{var n=rs();return gt(n,X({get onClick(){return e.onClick},get class(){return xe(Tr({$variant:e.$variant,$size:e.$size,$aspect:e.$aspect}),e.class)}},r),!1,!0),m(n,()=>e.children),n})()};var ns=x('<div class="flex h-full w-full justify-between"><div class="grow py-1 ps-1"><div class="h-full rounded-sm border border-gray-300 bg-gray-400"></div></div><div class="flex h-full w-3 flex-col items-center justify-center gap-0.5 pr-0.5">'),os=x('<div class="h-1.5 w-1.5 rounded-full border border-gray-500">'),is=x('<div class="flex h-full w-full flex-col justify-between"><div class="grow px-1 pt-1"><div class="h-full rounded-sm border border-gray-200 bg-gray-300"></div></div><div class="flex h-3 w-full items-center justify-center gap-0.5 pb-0.5">'),ss=x('<div class="h-1.5 w-1.5 rounded-full border border-gray-400">'),as=x('<div class="-space-x-4 flex items-end"><div class="h-38 w-48 overflow-hidden rounded-lg bg-gray-300"></div><div class="h-18 w-12 overflow-hidden rounded-lg bg-gray-200">');const ln=t=>t?1:3,ls=t=>(()=>{var e=ns(),r=e.firstChild,n=r.nextSibling;return m(n,v(ke,{get each(){return Array.from({length:ln(t.isApple)})},children:()=>os()})),e})(),cs=t=>(()=>{var e=is(),r=e.firstChild,n=r.nextSibling;return m(n,v(ke,{get each(){return Array.from({length:ln(t.isApple)})},children:()=>ss()})),e})(),ds=()=>(()=>{var e=as(),r=e.firstChild,n=r.nextSibling;return m(r,v(ls,{isApple:!0})),m(n,v(cs,{isApple:!0})),e})();var us=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><p class="text-sm text-(--lv-text-secondary)"></p></div><div class="flex items-center">');const fs=t=>{const{t:e}=Z(),{start:r}=Io();return(()=>{var n=us(),o=n.firstChild,i=o.firstChild,a=o.nextSibling;return m(n,v(ds,{}),o),m(i,()=>e("disconnected.prompt")),m(a,v(Ie,{type:"button",onClick:r,class:"z-10 px-6 py-3",$variant:"primary",$size:"lg",get children(){return e("disconnected.generateQr")}}),null),m(a,v(Ie,{type:"button",get"aria-label"(){return String(e("disconnected.connectionSettings"))},"aria-pressed":!1,get onClick(){return t.onSettings},class:"px-3 ltr:-ml-1 ltr:rounded-l-none rtl:-mr-1 rtl:rounded-r-none",$aspect:"square",$size:"lg",$variant:"secondary",get children(){return v(Vi,{class:"h-5 w-5 text-(--lv-text-muted)"})}}),null),n})()};var hs=x('<div class="flex flex-col space-y-2 px-4 text-start"><div class="min-h-32 w-full rounded-md border border-(--lv-control-button-secondary-border) md:flex justify-start divide-y md:divide-y-0 md:divide-x divide-(--lv-control-button-secondary-border)"><div class="p-2 w-full md:w-3/5"></div><div class="flex justify-center items-center grow"></div></div><div class="w-full rounded-md border border-(--lv-control-button-secondary-border) md:flex justify-start divide-y md:divide-y-0 md:divide-x divide-(--lv-control-button-secondary-border)"><div class="p-2 w-full md:w-3/5"></div><div class></div></div><div class="w-full rounded-md border border-(--lv-control-button-secondary-border) md:flex justify-start divide-y md:divide-y-0 md:divide-x divide-(--lv-control-button-secondary-border)"><div class="p-2 w-full md:w-3/5"></div><div class>');const gs=()=>{const{t}=Z();return(()=>{var e=hs(),r=e.firstChild,n=r.firstChild,o=n.nextSibling,i=r.nextSibling,a=i.firstChild,s=i.nextSibling,l=s.firstChild;return m(n,()=>t("info.scanQrCode")),m(o,v(Ii,{class:"w-10 h-10"})),m(a,()=>t("info.approveOnDevice")),m(l,()=>t("info.youreConnected")),e})()},Vt=(t,{duration:e=200}={})=>{const r=typeof t=="function"?t:()=>t,n=r(),[o,i]=D(n),[a,s]=D(void 0);let l,d=n;return oe(()=>{const u=r();Object.is(u,d)||(l&&globalThis.clearTimeout(l),s(()=>d),i(()=>u),d=u,l=globalThis.setTimeout(()=>{s(()=>{}),l=void 0},e),ie(()=>{l&&globalThis.clearTimeout(l)}))}),{current:o,previous:a,isTransitioning:()=>a()!==void 0}},et=()=>{const{provider:t}=je(),[e,r]=D(t.storage.getSettings()),n=u=>{r(u),t.storage.setSettings(u)};return{settings:e,setSettings:n,setLanguage:u=>{n({...e(),language:u})},setThemeMode:u=>{n({...e(),theme:u})},setSignalingProtocol:u=>{n({...e(),signaling:{p:u,s:e()?.signaling?.s??{}}})},setSignalingOptions:u=>{const c=e()?.signaling?.p;if(!c)return;const f=e()?.signaling?.s??{};n({...e(),signaling:{p:c,s:{...f,[c]:u.url}}})},setRetainSessionHistory:u=>{n({...e(),retainHistory:u})},setAutoReconnect:u=>{n({...e(),autoReconnect:u})}}},cn=()=>{const{settings:t}=et(),e=E(()=>t().theme),r=E(()=>"light");return{theme:e,mode:r}},dn="data:image/webp;base64,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";var vs=x('<div class="group flex items-center gap-2 rounded-md px-2 py-2 hover:bg-(--lv-control-button-secondary-background)"><div class="pointer-events-none whitespace-nowrap rounded-md text-xs opacity-0 group-hover:opacity-100"></div><div>');const ps=()=>{const{t}=Z(),{status:e}=Ye(),r=E(()=>{const n=e()?.status,o=e()?.signaling?.state;return Ne({sessionState:n,signalState:o}).with({sessionState:"connected"},()=>({icon:"✅",text:t("status.connectedSuccessfully")})).with({sessionState:"signaling",signalState:"standby"},()=>({icon:"🫥",text:t("status.connecting")})).with({sessionState:"signaling",signalState:"connecting"},()=>({icon:"↗️",text:t("status.connecting")})).with({sessionState:"signaling",signalState:"ready"},()=>({icon:"👋",text:t("status.ready")})).with({sessionState:"signaling",signalState:"handshake"},()=>({icon:"🤝",text:t("status.handshakeClosed")})).with({sessionState:"signaling",signalState:"handshake-partial"},()=>({icon:"🤝",text:t("status.handshakePartial")})).with({sessionState:"signaling",signalState:"encrypted"},()=>({icon:"🔒",text:t("status.encrypted")})).with({sessionState:"signaling",signalState:"error"},()=>({icon:"❌",text:t("status.signalError")})).otherwise(()=>{})});return v(Me,{get when(){return r()},children:n=>(()=>{var o=vs(),i=o.firstChild,a=i.nextSibling;return m(i,()=>n().text),m(a,()=>n().icon),o})()})};var ms=x('<div class="h-11 w-full">'),bs=x('<div class="absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 px-3 py-2 text-(--lv-text-muted)"><a href=https://github.com/v3xlabs/open-lavatory target=_blank rel=noreferrer class="flex items-center gap-2 p-1 font-semibold text-sm text-(--lv-text-muted)"><img alt="Open Lavatory Logo"width=20 height=20 class=rounded data-openlv-brand-logo><span>openlv</span></a><div class="text-sm text-(--lv-text-muted)">');const ws=()=>[ms(),(()=>{var t=bs(),e=t.firstChild,r=e.firstChild,n=e.nextSibling;return re(r,"src",dn),m(n,v(ps,{})),t})()];var ys=x('<div class="flex items-center justify-between px-2 py-2"><h2 class="flex items-center justify-center gap-2 font-semibold text-(--lv-text-primary) text-lg">');const xs=t=>{const{t:e}=Z();return(()=>{var r=ys(),n=r.firstChild;return m(r,(()=>{var o=Be(()=>!!t.onBack);return()=>o()?v(Ie,{get onClick(){return t.onBack},get"aria-label"(){return String(t.view==="settings"?e("modal.backToQr"):e("modal.closeModal"))},$variant:"tertiary",$aspect:"square",$size:"md",get children(){return v($i,{class:"h-6 w-6 text-(--lv-text-muted) rtl:rotate-180"})}}):v(Ie,{type:"button",onClick:()=>t.setView("info"),$variant:"tertiary",$aspect:"square",$size:"md",get children(){return v(on,{class:"h-5 w-5"})}})})(),n),m(n,()=>t.title),m(r,v(Ie,{type:"button",get"aria-label"(){return String(e("common.close"))},"aria-pressed":!1,get onClick(){return t.onClose},$variant:"tertiary",$aspect:"square",$size:"md",get children(){return v(qi,{class:"h-6 w-6 text-(--lv-text-muted)"})}}),null),r})()},ks=(t,{transitionDuration:e=200}={})=>{const[r,n]=D([t]),[o,i]=D(0),a=E(()=>r()[o()]??t),{current:s,previous:l,isTransitioning:d}=Vt(a,{duration:e});return{screen:s,previousScreen:l,isTransitioning:d,navigate:f=>{const h=o(),g=r(),b=g[h];if(Object.is(b,f))return;const p=g.slice(0,h+1);p.push(f),n(p),i(p.length-1)},goBack:()=>{i(f=>Math.max(0,f-1))},isAtRoot:()=>o()===0}};var Cs=x('<div class="modal-transition__layer modal-transition__layer--outgoing">'),Ss=x("<div><div>");const As=t=>(()=>{var e=Ss(),r=e.firstChild;return m(e,v(Me,{get when(){return t.previous!==void 0},get children(){var n=Cs();return m(n,()=>t.render(t.previous)),n}}),r),m(r,()=>t.render(t.current)),z(n=>{var o=xe("modal-transition__container",t.class),i=xe("modal-transition__layer",t.isTransitioning&&"modal-transition__layer--incoming");return o!==n.e&&ne(e,n.e=o),i!==n.t&&ne(r,n.t=i),n},{e:void 0,t:void 0}),e})();var $s=x('<div><div class="flex items-end justify-between py-1 pl-2"><div class="font-medium text-(--lv-text-primary) text-sm"></div><div></div></div><div class="flex flex-col gap-1 rounded-md bg-(--lv-card-background)">');const Xe=t=>(()=>{var e=$s(),r=e.firstChild,n=r.firstChild,o=n.nextSibling,i=r.nextSibling;return m(n,()=>t.title),m(o,()=>t.right),m(i,()=>t.children),e})();var Ts=x('<div class="flex items-baseline justify-between gap-2 px-2 py-1 first:pt-2 last:pb-2"><div class="text-sm text-(--lv-text-secondary) text-start"></div><div>');const Qe=t=>(()=>{var e=Ts(),r=e.firstChild,n=r.nextSibling;return m(r,()=>t.label),m(n,()=>t.children),e})();var Es=x("<select>"),_s=x("<div>"),Ps=x("<button type=button>"),Ns=x("<option>");const Bs=kt({slots:{root:"flex overflow-hidden rounded-md border border-(--lv-control-button-secondary-border)",box:"px-4 py-2 font-semibold text-xs transition border-l first:border-l-0 border-(--lv-control-button-secondary-border)"},variants:{active:{on:{box:"bg-(--lv-control-button-secondary-background) text-(--lv-text-primary)"},off:{box:"bg-transparent text-(--lv-text-secondary) cursor-pointer"}}},defaultVariants:{active:"off"}}),Ms=kt({base:"w-full rounded-md border border-(--lv-control-button-secondary-border) bg-(--lv-control-button-secondary-background) px-3 py-2 font-semibold text-xs text-(--lv-text-primary) cursor-pointer focus:outline-none focus:ring-2 focus:ring-(--lv-control-button-primary-background) appearance-none bg-[url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23888%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E')] bg-[length:14px] bg-[right_8px_center] bg-no-repeat pr-8"}),Ct=t=>{const e=Ms(),{root:r,box:n}=Bs({});return v(Me,{get when(){return t.options.length>(t.dropdownThreshold??3)},get fallback(){return(()=>{var o=_s();return m(o,v(ke,{get each(){return t.options},children:([i,a])=>(()=>{var s=Ps();return s.$$click=()=>t.onChange(i),m(s,a),z(l=>{var d=i===t.value,u=n({active:i===t.value?"on":"off"});return d!==l.e&&re(s,"aria-pressed",l.e=d),u!==l.t&&ne(s,l.t=u),l},{e:void 0,t:void 0}),s})()})),z(()=>ne(o,r())),o})()},get children(){var o=Es();return o.addEventListener("change",i=>t.onChange(i.currentTarget.value)),ne(o,e),m(o,v(ke,{get each(){return t.options},children:([i,a])=>(()=>{var s=Ns();return s.value=i,m(s,a),s})()})),z(()=>o.value=t.value),o}})};Se(["click"]);const Os=()=>{const{t}=Z(),e=cn(),r=()=>e.mode()==="auto",n=()=>e.mode()==="auto"?"system":e.mode(),o=i=>{};return v(Me,{get when(){return r()},get children(){return v(Qe,{get label(){return t("settings.theme.mode")},get children(){return v(Ct,{get options(){return[["light",t("settings.theme.light")],["dark",t("settings.theme.dark")],["system",t("settings.theme.system")]]},get value(){return n()},onChange:i=>o()})}})}})},Rs=()=>{const{t,languageTag:e,setLanguageTag:r}=Z(),{settings:n,setLanguage:o}=et(),i=E(()=>[...Wt].sort((s,l)=>{const d=ur(s.tag);return ur(l.tag)-d})),a=s=>{const l=s;r(l),o(l)};return v(Xe,{get title(){return t("settings.appearance")},get children(){return[v(Qe,{get label(){return t("settings.language")},get children(){return v(Ct,{get options(){return i().map(s=>[s.tag,s.nativeName])},get value(){return n()?.language||e()},onChange:a})}}),v(Os,{})]}})};var Ls=x("<div><div></div><div>"),Is=x("<div>Text");const js=kt({slots:{root:"group relative",box:"cursor-pointer rounded-md transition-colors flex items-center justify-center hover:[background-color:var(--lv-control-button-tertiary-hoverBackground)] text-(--lv-text-muted)",popover:"-translate-x-1/2 absolute top-full left-1/2 z-10 hidden rounded-md shadow-sm group-hover:block border border-(--lv-control-button-secondary-border) bg-(--lv-body-background) px-2 py-1.5 text-(--lv-text-primary) text-sm",icon:""},variants:{size:{sm:{box:"h-5 w-5 p-1",icon:"h-3 w-3"},md:{box:"h-6 w-6 p-1",icon:"h-4 w-4"},lg:{box:"h-8 w-8 p-1.5",icon:"h-4 w-4"}},variant:{icon:"",text:""}},defaultVariants:{size:"lg"}}),Er=t=>{const e=X({variant:"icon",size:"lg"},t),{root:r,box:n,popover:o,icon:i}=js({size:e.size,variant:e.variant});return(()=>{var a=Ls(),s=a.firstChild,l=s.nextSibling;return m(s,()=>Ne(e.variant).with("icon",()=>v(on,{get class(){return i()}})).with("text",()=>Is()).exhaustive()),m(l,()=>e.children),z(d=>{var u=r(),c=n(),f=o();return u!==d.e&&ne(a,d.e=u),c!==d.t&&ne(s,d.t=c),f!==d.a&&ne(l,d.a=f),d},{e:void 0,t:void 0,a:void 0}),a})()};var Ds=x('<span class="text-sm text-(--lv-text-muted)">'),Vs=x('<button type=button class="flex w-full cursor-pointer items-center justify-between gap-2 first:rounded-t-sm last:rounded-b-sm px-2 py-1 first:pt-1.5 last:pb-2 hover:bg-(--lv-control-button-tertiary-hoverBackground)"><div class="text-sm text-(--lv-text-secondary) flex items-center gap-1"></div><div class="flex items-center gap-1">');const _r=t=>(()=>{var e=Vs(),r=e.firstChild,n=r.nextSibling;return yt(e,"click",t.onClick,!0),m(r,()=>t.label),m(n,v(Me,{get when(){return t.value},get children(){var o=Ds();return m(o,()=>t.value),o}}),null),m(n,v(_i,{class:"h-4 w-4 text-(--lv-text-muted) rtl:rotate-180"}),null),e})();Se(["click"]);const Fs=t=>{const{t:e}=Z();return v(Ct,{get options(){return[["true",String(e("common.yes"))],["false",String(e("common.no"))]]},get value(){return t.value?"true":"false"},onChange:r=>t.onChange(r==="true")})},zs=t=>{const{t:e}=Z(),{settings:r,setRetainSessionHistory:n,setAutoReconnect:o}=et();return v(Xe,{get title(){return e("settings.connectionPreferences.title")},get children(){return[v(_r,{get label(){return[Be(()=>e("settings.signaling.title")),v(Er,{variant:"icon",get children(){return e("settings.signaling.description")}})]},onClick:()=>t.onNavigate("signaling"),get value(){return r()?.signaling?.p}}),v(_r,{get label(){return[Be(()=>e("settings.transport.title")),v(Er,{variant:"icon",get children(){return e("settings.transport.description")}})]},onClick:()=>t.onNavigate("transport"),value:"WebRTC"}),v(ke,{get each(){return[[e("settings.connectionPreferences.retainSessionHistory"),r()?.retainHistory??!1,n],[e("settings.connectionPreferences.autoReconnect"),r()?.autoReconnect??!1,o]]},children:([i,a,s])=>v(Qe,{label:i,get children(){return v(Fs,{label:i,value:a,onChange:s})}})})]}})};var Us=x('<input class="h-9 w-full rounded-lg border bg-white px-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200 text-(--lv-text-primary) bg-(--lv-body-background) border-(--lv-control-input-border)">');const We=t=>{const e=X({readOnly:!0},t),[r]=wt(e,["id","value","placeholder","ariaLabel","readOnly","onChange"]);return(()=>{var n=Us();return n.$$input=o=>{r.onChange?.(o.currentTarget.value)},z(o=>{var i=r.id,a=r.placeholder,s=r.ariaLabel,l=r.readOnly;return i!==o.e&&re(n,"id",o.e=i),a!==o.t&&re(n,"placeholder",o.t=a),s!==o.a&&re(n,"aria-label",o.a=s),l!==o.o&&(n.readOnly=o.o=l),o},{e:void 0,t:void 0,a:void 0,o:void 0}),z(()=>n.value=r.value),n})()};Se(["input"]);var Ws=x('<div><div class="p-2 text-sm text-(--lv-text-secondary) text-start">');const Gs=["mqtt","ntfy","gun"],qs=()=>{const{t}=Z(),{settings:e,setSignalingProtocol:r,setSignalingOptions:n}=et(),o=E(()=>e()?.signaling?.p),i=E(()=>{const a=o();return a?e()?.signaling?.s?.[a]??"":""});return(()=>{var a=Ws(),s=a.firstChild;return m(a,v(Xe,{get title(){return t("settings.signaling.title")},get children(){return[v(Qe,{get label(){return t("common.protocol")},get children(){return v(Ct,{get options(){return Gs.map(l=>[l.toLowerCase(),l.toUpperCase()])},get value(){return o()??""},onChange:l=>r(l)})}}),v(Qe,{get label(){return t("settings.signaling.server")},get children(){return v(We,{id:"server",get value(){return i()},onChange:l=>n({url:l}),get placeholder(){return String(t("settings.signaling.serverUrl"))},get ariaLabel(){return String(t("settings.signaling.serverUrl"))},readOnly:!1})}})]}}),s),m(s,()=>t("settings.signaling.description")),a})()};var Ks=x('<div class="flex items-center gap-2"><div class=flex-1>'),Hs=x('<button type=button class="flex w-full cursor-pointer items-center justify-center gap-1 rounded-md border border-dashed border-(--lv-control-input-border) py-2 text-sm text-(--lv-text-muted) hover:bg-(--lv-card-background)">'),Xs=x('<div class="flex flex-col gap-2 p-2">'),Qs=x('<div class="flex flex-col gap-3 p-2">'),Js=x('<div class="p-2 text-sm text-(--lv-text-secondary) text-start">'),Zs=x('<div class="flex flex-col gap-2 rounded-md border border-(--lv-control-input-border) p-2"><div class="grid grid-cols-2 gap-2">');const Pr=t=>(()=>{var e=Ks(),r=e.firstChild;return m(r,()=>t.children),m(e,v(Ie,{get onClick(){return t.onRemove},$variant:"tertiary",$aspect:"square",$size:"sm",get children(){return v(Ui,{class:"h-4 w-4 text-(--lv-text-muted)"})}}),null),e})(),Nr=t=>(()=>{var e=Hs();return yt(e,"click",t.onClick,!0),m(e,v(Oi,{class:"h-4 w-4"}),null),m(e,()=>t.label,null),e})(),Ys=()=>{const{t}=Z();et();const[e,r]=D([]),[n,o]=D([]),i=()=>{o([...n(),""])},a=c=>{o(n().filter((f,h)=>h!==c))},s=(c,f)=>{o(n().map((h,g)=>g===c?f:h))},l=()=>{r([...e(),{urls:""}])},d=c=>{r(e().filter((f,h)=>h!==c))},u=(c,f,h)=>{r(e().map((g,b)=>b===c?{...g,[f]:h}:g))};return[v(Xe,{get title(){return t("settings.transport.iceServers.stun")},get children(){var c=Xs();return m(c,v(ke,{get each(){return n()},children:(f,h)=>v(Pr,{onRemove:()=>a(h()),get children(){return v(We,{value:f,onChange:g=>s(h(),g),placeholder:"stun:stun.l.google.com:19302",readOnly:!1})}})}),null),m(c,v(Nr,{get label(){return t("settings.transport.iceServers.addStun")},onClick:i}),null),c}}),v(Xe,{get title(){return t("settings.transport.iceServers.turn")},get children(){var c=Qs();return m(c,v(ke,{get each(){return e()},children:(f,h)=>(()=>{var g=Zs(),b=g.firstChild;return m(g,v(Pr,{onRemove:()=>d(h()),get children(){return v(We,{get value(){return f.urls},onChange:p=>u(h(),"urls",p),placeholder:"turn:relay.example.com:443",readOnly:!1})}}),b),m(b,v(We,{get value(){return f.username??""},onChange:p=>u(h(),"username",p),placeholder:"Username",readOnly:!1}),null),m(b,v(We,{get value(){return f.credential??""},onChange:p=>u(h(),"credential",p),placeholder:"Password",readOnly:!1}),null),g})()}),null),m(c,v(Nr,{get label(){return t("settings.transport.iceServers.addTurn")},onClick:l}),null),c}}),(()=>{var c=Js();return m(c,()=>t("settings.transport.description")),c})()]};Se(["click"]);var ea=x('<div class="px-4 pb-2">');const ta=t=>{switch(t){case"main":return"settings.title";case"signaling":return"settings.signaling.title";case"transport":return"settings.transport.title"}},ra=t=>{const{screen:e,previousScreen:r,isTransitioning:n,navigate:o,goBack:i,isAtRoot:a}=ks("main"),s={goBack:i,get isAtRoot(){return a()}};oe(()=>{t.navigationRef&&(t.navigationRef.current=s)}),oe(()=>{t.onTitleChange?.(ta(e()))});const l=d=>{switch(d){case"main":return[v(zs,{onNavigate:o}),v(Rs,{})];case"signaling":return v(qs,{});case"transport":return v(Ys,{})}};return(()=>{var d=ea();return m(d,v(As,{get current(){return e()},get previous(){return r()},get isTransitioning(){return n()},render:l})),d})()};var na=x("<div class=modal-transition__container><div>"),oa=x('<div class="modal-transition__layer modal-transition__layer--outgoing">'),ia=x('<div class="fixed inset-0 z-10000 flex animate-[bg-in_0.15s_ease-in-out] items-end justify-center md:items-center lg:p-4"role=presentation data-openlv-modal-root><div role=dialog aria-modal=true><div><div class=modal-transition__container><div><div class="flex flex-col text-center"></div></div></div></div><div>');const sa=()=>{const[t,e]=D("start"),[r,n]=D(!1);return oe(()=>{if(!r())return;const o=globalThis.setTimeout(()=>n(!1),2e3);ie(()=>globalThis.clearTimeout(o))}),{view:t,setView:e,copied:r,setCopied:n}},aa=t=>{oe(()=>{const e=r=>{r.key==="Escape"&&t()};document.addEventListener("keydown",e),ie(()=>document.removeEventListener("keydown",e))})},la=()=>{const[t,e]=D(),[r,n]=D(0),o=(a,s=!1)=>{const l=a||t();if(!l||!l.getBoundingClientRect)return;const d=s?l.scrollHeight:l.getBoundingClientRect().height;d>0&&n(u=>typeof u=="number"&&Math.abs(u-d)<.5?u:d)};oe(()=>{const a=t();if(!a||typeof ResizeObserver>"u")return;const s=new ResizeObserver(()=>{o()});s.observe(a),ie(()=>s.disconnect())});const i=()=>o();return oe(()=>{globalThis.window!==void 0&&(window.addEventListener("resize",i),ie(()=>window.removeEventListener("resize",i)))}),{setContentRef:e,contentNode:t,height:r,measureHeight:o}},un=t=>{const{view:e,setView:r,copied:n,setCopied:o}=sa(),{uri:i,status:a}=Ye(),{provider:s}=je(),{setContentRef:l,contentNode:d,height:u,measureHeight:c}=la(),{current:f,previous:h,isTransitioning:g}=Vt(e),{current:b,previous:p,isTransitioning:C}=Vt(a),k=()=>r("settings"),{t:y,isRtl:F,languageTag:_}=Z(),ve=cn(),he={current:null},[De,tt]=D("settings.title"),Ve=E(()=>Ne(e()).with("start",()=>y("start.title")).with("settings",()=>y(De())).with("info",()=>y("info.title")).exhaustive());aa(t.onClose),oe(()=>{a()?.status===le.CONNECTED&&t.onClose()});const rt=async()=>{const N=i();N&&await nn(N)&&o(!0)};let nt=!0,$e,A,$;const[T,M]=D(!1);oe(()=>{b(),f(),d()&&(nt?($e&&globalThis.clearTimeout($e),$e=globalThis.setTimeout(()=>{d()&&(c(void 0,!0),nt=!1)},0)):c(),ie(()=>{$e&&globalThis.clearTimeout($e)}))}),oe(()=>{const N=u();A!==void 0&&N!==A&&N>0&&A>0&&Math.abs(N-A)>.5&&(M(!0),$&&globalThis.clearTimeout($),$=globalThis.setTimeout(()=>{M(!1),$=void 0},200)),A=N,ie(()=>{$&&globalThis.clearTimeout($)})});const[P,R]=D(s.getState().status);Ft(()=>{s.on("status_change",R)}),ie(()=>{s.off("status_change",R)});const Q=E(()=>!(e()==="start"&&P()===le.STANDBY)),ce=()=>{Ne({view:e(),status:P()}).with({view:"start",status:le.STANDBY},()=>{}).with({view:"start"},()=>{s.closeSession()}).with({view:"settings"},()=>{he.current&&!he.current.isAtRoot?he.current.goBack():r("start")}).with({view:"info"},()=>{r("start")}).otherwise(()=>{s.closeSession(),t.onClose()})},G=N=>Ne(N).with("start",()=>v(fs,{onSettings:k})).with("settings",()=>v(ra,{onTitleChange:tt,navigationRef:he})).with("info",()=>v(gs,{})).otherwise(()=>v(jt,{state:N})),se=()=>(()=>{var N=na(),Y=N.firstChild;return m(N,v(Me,{get when(){return h()},children:Te=>(()=>{var Fe=oa();return m(Fe,()=>G(Te())),Fe})()}),Y),m(Y,()=>G(f())),z(()=>ne(Y,xe("modal-transition__layer",g()&&"modal-transition__layer--incoming"))),N})(),pe=N=>Ne(N).with(le.STANDBY,()=>se()).with(ho.union(le.CREATING,le.CONNECTING,le.CONNECTED),()=>v(pi,{get onClose(){return t.onClose},onCopy:rt})).otherwise(Y=>v(jt,{state:Y||"unknown status"})),ae={background:"var(--lv-overlay-background, rgba(0,0,0,0.3))","backdrop-filter":"var(--lv-overlay-backdrop-filter, blur(4px))"},Oe={background:"var(--lv-body-background)",color:"var(--lv-body-color, var(--lv-text-primary))","border-radius":"var(--lv-border-radius, 16px)","box-shadow":"var(--lv-modal-shadow, 0px 12px 32px rgba(0,0,0,0.25))"};return(()=>{var N=ia(),Y=N.firstChild,Te=Y.firstChild,Fe=Te.firstChild,qt=Fe.firstChild,hn=qt.firstChild,Kt=Te.nextSibling;return N.$$mouseup=L=>{L.target===L.currentTarget&&t.onClose()},Bt(N,ae),Y.$$click=L=>L.stopPropagation(),Gr(l,Te),m(Te,v(xs,{get title(){return String(Ve())},get view(){return e()},get onClose(){return t.onClose},get onBack(){return Q()?ce:void 0},setView:r}),Fe),m(hn,()=>pe(P())),m(Te,v(ws,{}),null),m(Kt,()=>y("modal.urlCopied")),z(L=>{var Ht=ve.mode(),Xt=_(),Qt=F()?"rtl":"ltr",Jt=xe("relative w-full max-w-[400px] animate-[fade-in_0.15s_ease-in-out] transition-[height] duration-200 ease-out",T()||p()?"overflow-hidden":void 0),Zt=String(Ve()),gn={...typeof u()=="number"&&u()>0?{height:`${u()}px`}:{},...Oe},Yt=xe("modal-transition__layer",C()&&"modal-transition__layer--incoming"),er=xe("absolute top-5 rounded-lg bg-blue-500 px-4 py-3 font-medium text-sm text-white transition-all ltr:right-5 rtl:left-5",n()?"translate-x-0 opacity-100":"opacity-0 ltr:translate-x-full rtl:-translate-x-full");return Ht!==L.e&&re(N,"data-openlv-theme-mode",L.e=Ht),Xt!==L.t&&re(N,"lang",L.t=Xt),Qt!==L.a&&re(N,"dir",L.a=Qt),Jt!==L.o&&ne(Y,L.o=Jt),Zt!==L.i&&re(Y,"aria-label",L.i=Zt),L.n=Bt(Y,gn,L.n),Yt!==L.s&&ne(qt,L.s=Yt),er!==L.h&&ne(Kt,L.h=er),L},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),N})()};Se(["mouseup","click"]);const ca=(...t)=>console.log("%c[modal]%c","color: yellow; font-weight: bold","color: inherit; font-weight: normal",...t),fn=(t="openlv-modal")=>{if(globalThis.window===void 0)return t;const e=globalThis.customElements;return e?(e.get(t)||e.define(t,xt),t):(console.warn("OpenLV modal: custom elements are not supported in this environment."),t)},da=t=>{const e=document.querySelector("openlv-modal");if(e&&e.remove(),!e){fn();const r=new xt({onClose(){ca("modal closed"),r.remove(),t.onClose?.()},provider:t.provider,theme:t.theme});document.body.append(r)}};exports.ModalRoot=un;exports.OPENLV_ICON_128=dn;exports.OpenLVModalElement=xt;exports.default=xt;exports.registerOpenLVModal=fn;exports.triggerOpenModal=da;
8
8
  //# sourceMappingURL=index.cjs.js.map