@ticketlayer/elements 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +16 -15
  2. package/dist/cjs/{index-DfzcrE9-.js → index-I9CoYv3k.js} +277 -1798
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/money-BtmM2gt-.js +118 -0
  6. package/dist/cjs/{order-summary-ZMkJ5bez.js → order-summary-X3TlZxc2.js} +34 -0
  7. package/dist/cjs/ticketlayer-elements.cjs.js +3 -3
  8. package/dist/cjs/tl-buy-modal.cjs.entry.js +3 -3
  9. package/dist/cjs/tl-buy-tickets-button.cjs.entry.js +10 -7
  10. package/dist/cjs/tl-buy-tickets-wrapper.cjs.entry.js +2 -2
  11. package/dist/cjs/tl-cart-badge.cjs.entry.js +2 -2
  12. package/dist/cjs/tl-cart-drawer.cjs.entry.js +2 -2
  13. package/dist/cjs/tl-cart.cjs.entry.js +10 -4
  14. package/dist/cjs/tl-checkout-wrapper.cjs.entry.js +2 -2
  15. package/dist/cjs/tl-event-card.cjs.entry.js +4 -3
  16. package/dist/cjs/tl-event-list.cjs.entry.js +2 -2
  17. package/dist/cjs/tl-login.cjs.entry.js +4 -3
  18. package/dist/cjs/tl-my-orders.cjs.entry.js +4 -3
  19. package/dist/cjs/tl-occurrence-selector_2.cjs.entry.js +454 -122
  20. package/dist/cjs/tl-order-confirmation.cjs.entry.js +11 -8
  21. package/dist/cjs/tl-order-tickets_2.cjs.entry.js +3 -3
  22. package/dist/cjs/tl-promo-code.cjs.entry.js +4 -3
  23. package/dist/cjs/tl-seat-map.cjs.entry.js +2 -2
  24. package/dist/collection/collection-manifest.json +2 -1
  25. package/dist/collection/components/tl-buy-modal/tl-buy-modal.css +12 -13
  26. package/dist/collection/components/tl-buy-modal/tl-buy-modal.js +1 -1
  27. package/dist/collection/components/tl-buy-tickets-button/tl-buy-tickets-button.css +4 -4
  28. package/dist/collection/components/tl-buy-tickets-button/tl-buy-tickets-button.js +11 -8
  29. package/dist/collection/components/tl-buy-tickets-wrapper/tl-buy-tickets-wrapper.css +2 -2
  30. package/dist/collection/components/tl-cart/tl-cart.css +52 -51
  31. package/dist/collection/components/tl-cart/tl-cart.js +10 -4
  32. package/dist/collection/components/tl-cart-badge/tl-cart-badge.css +11 -11
  33. package/dist/collection/components/tl-cart-drawer/tl-cart-drawer.css +6 -6
  34. package/dist/collection/components/tl-checkout-wrapper/tl-checkout-wrapper.css +2 -2
  35. package/dist/collection/components/tl-event-card/tl-event-card.css +22 -22
  36. package/dist/collection/components/tl-event-card/tl-event-card.js +1 -1
  37. package/dist/collection/components/tl-event-list/tl-event-list.css +17 -17
  38. package/dist/collection/components/tl-login/tl-login.css +26 -26
  39. package/dist/collection/components/tl-login/tl-login.js +1 -1
  40. package/dist/collection/components/tl-my-orders/tl-my-orders.css +40 -40
  41. package/dist/collection/components/tl-occurrence-selector/tl-occurrence-selector.css +54 -65
  42. package/dist/collection/components/tl-occurrence-selector/tl-occurrence-selector.js +2 -2
  43. package/dist/collection/components/tl-order-confirmation/tl-order-confirmation.css +38 -38
  44. package/dist/collection/components/tl-order-confirmation/tl-order-confirmation.js +8 -6
  45. package/dist/collection/components/tl-order-tickets/tl-order-tickets.css +9 -9
  46. package/dist/collection/components/tl-promo-code/tl-promo-code.css +25 -25
  47. package/dist/collection/components/tl-promo-code/tl-promo-code.js +1 -1
  48. package/dist/collection/components/tl-seat-map/tl-seat-map.css +10 -10
  49. package/dist/collection/components/tl-ticket/tl-ticket.css +13 -13
  50. package/dist/collection/components/tl-ticket/tl-ticket.js +1 -1
  51. package/dist/collection/components/tl-ticket-selector/tl-ticket-selector.css +74 -49
  52. package/dist/collection/components/tl-ticket-selector/tl-ticket-selector.js +73 -127
  53. package/dist/collection/utils/cart-totals.js +9 -0
  54. package/dist/collection/utils/order-summary.js +36 -0
  55. package/dist/components/money.js +1 -0
  56. package/dist/components/order-summary.js +1 -1
  57. package/dist/components/tl-buy-modal.js +1 -1
  58. package/dist/components/tl-buy-tickets-button.js +1 -1
  59. package/dist/components/tl-buy-tickets-wrapper2.js +1 -1
  60. package/dist/components/tl-cart-badge.js +1 -1
  61. package/dist/components/tl-cart-drawer.js +1 -1
  62. package/dist/components/tl-cart2.js +1 -1
  63. package/dist/components/tl-checkout-wrapper2.js +1 -1
  64. package/dist/components/tl-event-card2.js +1 -1
  65. package/dist/components/tl-event-list.js +1 -1
  66. package/dist/components/tl-login2.js +1 -1
  67. package/dist/components/tl-my-orders.js +1 -1
  68. package/dist/components/tl-occurrence-selector2.js +1 -1
  69. package/dist/components/tl-order-confirmation.js +1 -1
  70. package/dist/components/tl-order-tickets2.js +1 -1
  71. package/dist/components/tl-promo-code.js +1 -1
  72. package/dist/components/tl-seat-map.js +1 -1
  73. package/dist/components/tl-ticket-selector2.js +1 -1
  74. package/dist/components/tl-ticket2.js +1 -1
  75. package/dist/elements.docs.d.ts +26 -0
  76. package/dist/elements.docs.json +35 -17
  77. package/dist/esm/{index-Ba-RZTFI.js → index-OoYV1faY.js} +277 -1798
  78. package/dist/esm/index.js +1 -1
  79. package/dist/esm/loader.js +3 -3
  80. package/dist/esm/money-4ig0-WB6.js +112 -0
  81. package/dist/esm/{order-summary-BGekdjN9.js → order-summary-DiDtvfZM.js} +34 -1
  82. package/dist/esm/ticketlayer-elements.js +4 -4
  83. package/dist/esm/tl-buy-modal.entry.js +3 -3
  84. package/dist/esm/tl-buy-tickets-button.entry.js +10 -7
  85. package/dist/esm/tl-buy-tickets-wrapper.entry.js +2 -2
  86. package/dist/esm/tl-cart-badge.entry.js +2 -2
  87. package/dist/esm/tl-cart-drawer.entry.js +2 -2
  88. package/dist/esm/tl-cart.entry.js +10 -4
  89. package/dist/esm/tl-checkout-wrapper.entry.js +2 -2
  90. package/dist/esm/tl-event-card.entry.js +4 -3
  91. package/dist/esm/tl-event-list.entry.js +2 -2
  92. package/dist/esm/tl-login.entry.js +4 -3
  93. package/dist/esm/tl-my-orders.entry.js +4 -3
  94. package/dist/esm/tl-occurrence-selector_2.entry.js +455 -123
  95. package/dist/esm/tl-order-confirmation.entry.js +11 -8
  96. package/dist/esm/tl-order-tickets_2.entry.js +3 -3
  97. package/dist/esm/tl-promo-code.entry.js +4 -3
  98. package/dist/esm/tl-seat-map.entry.js +2 -2
  99. package/dist/ticketlayer-elements/index.esm.js +1 -1
  100. package/dist/ticketlayer-elements/p-0814420f.entry.js +1 -0
  101. package/dist/ticketlayer-elements/p-0acabc26.entry.js +1 -0
  102. package/dist/ticketlayer-elements/{p-9372ff1f.entry.js → p-109a3feb.entry.js} +1 -1
  103. package/dist/ticketlayer-elements/{p-41d22d7c.entry.js → p-1a4ba71c.entry.js} +1 -1
  104. package/dist/ticketlayer-elements/p-318965c1.entry.js +1 -0
  105. package/dist/ticketlayer-elements/p-347c7fd1.entry.js +1 -0
  106. package/dist/ticketlayer-elements/p-3649c26d.entry.js +1 -0
  107. package/dist/ticketlayer-elements/p-40260cc9.entry.js +1 -0
  108. package/dist/ticketlayer-elements/p-4ig0-WB6.js +1 -0
  109. package/dist/ticketlayer-elements/p-55fd2f9f.entry.js +1 -0
  110. package/dist/ticketlayer-elements/p-62ee659b.entry.js +1 -0
  111. package/dist/ticketlayer-elements/{p-f446310d.entry.js → p-7d4ecc2b.entry.js} +1 -1
  112. package/dist/ticketlayer-elements/p-7f0abf95.entry.js +1 -0
  113. package/dist/ticketlayer-elements/p-BXpVGW51.js +1 -0
  114. package/dist/ticketlayer-elements/p-OoYV1faY.js +3 -0
  115. package/dist/ticketlayer-elements/p-a3c1b26c.entry.js +1 -0
  116. package/dist/ticketlayer-elements/p-ac264adc.entry.js +1 -0
  117. package/dist/ticketlayer-elements/{p-82752e3b.entry.js → p-aeb4c6fb.entry.js} +1 -1
  118. package/dist/ticketlayer-elements/{p-9c9072c8.entry.js → p-ba62541f.entry.js} +1 -1
  119. package/dist/ticketlayer-elements/ticketlayer-elements.css +1 -1
  120. package/dist/ticketlayer-elements/ticketlayer-elements.esm.js +1 -1
  121. package/dist/types/components/tl-cart/tl-cart.d.ts +10 -0
  122. package/dist/types/components/tl-ticket-selector/tl-ticket-selector.d.ts +40 -29
  123. package/dist/types/components.d.ts +165 -36
  124. package/dist/types/stencil-public-runtime.d.ts +97 -57
  125. package/dist/types/utils/cart-totals.d.ts +10 -0
  126. package/dist/types/utils/order-summary.d.ts +34 -0
  127. package/elements.catalogue.json +91 -22
  128. package/loader/index.d.ts +1 -1
  129. package/package.json +31 -32
  130. package/dist/ticketlayer-elements/p-0291df4c.entry.js +0 -1
  131. package/dist/ticketlayer-elements/p-11273f8f.entry.js +0 -1
  132. package/dist/ticketlayer-elements/p-340ab4f5.entry.js +0 -1
  133. package/dist/ticketlayer-elements/p-7ff43848.entry.js +0 -1
  134. package/dist/ticketlayer-elements/p-976770f3.entry.js +0 -1
  135. package/dist/ticketlayer-elements/p-9a903ff6.entry.js +0 -1
  136. package/dist/ticketlayer-elements/p-BGekdjN9.js +0 -1
  137. package/dist/ticketlayer-elements/p-Ba-RZTFI.js +0 -2
  138. package/dist/ticketlayer-elements/p-a5c90b68.entry.js +0 -1
  139. package/dist/ticketlayer-elements/p-b6d479ad.entry.js +0 -1
  140. package/dist/ticketlayer-elements/p-eb640760.entry.js +0 -1
  141. package/dist/ticketlayer-elements/p-f5846f61.entry.js +0 -1
  142. package/dist/ticketlayer-elements/p-fb9444c4.entry.js +0 -1
@@ -1,2 +0,0 @@
1
- const t=()=>{},e=":root{--tl-font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;--tl-font-family-mono:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;--tl-primary:#6366f1;--tl-primary-foreground:#ffffff;--tl-secondary:#f3f4f6;--tl-secondary-foreground:#111827;--tl-background:#ffffff;--tl-foreground:#111827;--tl-muted:#f9fafb;--tl-muted-foreground:#6b7280;--tl-border:#e5e7eb;--tl-success:#10b981;--tl-success-foreground:#ffffff;--tl-warning:#f59e0b;--tl-warning-foreground:#ffffff;--tl-error:#ef4444;--tl-error-foreground:#ffffff;--tl-radius-sm:0.25rem;--tl-radius-md:0.5rem;--tl-radius-lg:0.75rem;--tl-spacing-1:0.25rem;--tl-spacing-2:0.5rem;--tl-spacing-3:0.75rem;--tl-spacing-4:1rem;--tl-spacing-6:1.5rem;--tl-spacing-8:2rem}";var n,s,i,r,o,l,f,c,u,a,h,p,d,v,m,g,b,w=Object.create,y=Object.defineProperty,$=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,O=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,k=t=>{throw TypeError(t)},M=(t,e)=>function(){return e||(0,t[S(t)[0]])((e={exports:{}}).exports,e),e.exports},E=(t,e,n)=>e.has(t)||k("Cannot "+n),x=(t,e,n)=>(E(t,e,"read from private field"),n?n.call(t):e.get(t)),N=(t,e,n)=>e.has(t)?k("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),R=(t,e,n)=>(E(t,e,"write to private field"),e.set(t,n),n),P=(t,e,n)=>(E(t,e,"access private method"),n),C=M({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=s(t,n)),e instanceof RegExp&&(e=s(e,n));var r=i(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function s(t,e){var n=e.match(t);return n?n[0]:null}function i(t,e,n){var s,i,r,o,l,f=n.indexOf(t),c=n.indexOf(e,f+1),u=f;if(f>=0&&c>0){if(t===e)return[f,c];for(s=[],r=n.length;u>=0&&!l;)u==f?(s.push(u),f=n.indexOf(t,u+1)):1==s.length?l=[s.pop(),c]:((i=s.pop())<r&&(r=i,o=c),c=n.indexOf(e,u+1)),u=f<c&&f>=0?f:c;s.length&&(l=[r,o])}return l}e.exports=n,n.range=i}}),W=M({"node_modules/brace-expansion/index.js"(t,e){var n=C();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),v(function(t){return t.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(l)}(t),!0).map(c)):[]};var s="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function f(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function c(t){return t.split(s).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(l).join(".")}function u(t){if(!t)return[""];var e=[],s=n("{","}",t);if(!s)return t.split(",");var i=s.body,r=s.post,o=s.pre.split(",");o[o.length-1]+="{"+i+"}";var l=u(r);return r.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),e.push.apply(e,o),e}function a(t){return"{"+t+"}"}function h(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function d(t,e){return t>=e}function v(t,e){var s=[],i=n("{","}",t);if(!i)return[t];var o=i.pre,l=i.post.length?v(i.post,!1):[""];if(/\$$/.test(i.pre))for(var c=0;c<l.length;c++)s.push(W=o+"{"+i.body+"}"+l[c]);else{var m,g,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),w=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),y=b||w,$=i.body.indexOf(",")>=0;if(!y&&!$)return i.post.match(/,(?!,).*\}/)?v(t=i.pre+"{"+i.body+r+i.post):[t];if(y)m=i.body.split(/\.\./);else if(1===(m=u(i.body)).length&&1===(m=v(m[0],!1).map(a)).length)return l.map((function(t){return i.pre+m[0]+t}));if(y){var S=f(m[0]),O=f(m[1]),j=Math.max(m[0].length,m[1].length),k=3==m.length?Math.abs(f(m[2])):1,M=p;O<S&&(k*=-1,M=d);var E=m.some(h);g=[];for(var x=S;M(x,O);x+=k){var N;if(w)"\\"===(N=String.fromCharCode(x))&&(N="");else if(N=x+"",E){var R=j-N.length;if(R>0){var P=Array(R+1).join("0");N=x<0?"-"+P+N.slice(1):P+N}}g.push(N)}}else{g=[];for(var C=0;C<m.length;C++)g.push.apply(g,v(m[C],!1))}for(C=0;C<g.length;C++)for(c=0;c<l.length;c++){var W=o+g[C]+l[c];(!e||y||W)&&s.push(W)}}return s}}}),A=(t,e)=>{var n;Object.entries(null!=(n=e.i.t)?n:{}).map((([n,[s]])=>{if(31&s||32&s){const s=t[n],i=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(t,n,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):s}}))},L=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},T=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.l=t,512&e.i.u&&A(t,e))},z=(t,e)=>e in t,F=(t,e)=>(0,console.error)(t,e),_=new Map,D=new Map,I="slot-fb{display:contents}slot-fb[hidden]{display:none}",U="undefined"!=typeof window?window:{},B={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)},G=t=>Promise.resolve(t),H=(()=>{try{return!!U.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),Z=!!H&&(()=>!!U.document&&Object.getOwnPropertyDescriptor(U.document.adoptedStyleSheets,"length").writable)(),V=!1,q=[],Y=[],J=(t,e)=>n=>{t.push(n),V||(V=!0,e&&4&B.u?X(Q):B.raf(Q))},K=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){F(t)}t.length=0},Q=()=>{K(q),K(Y),(V=q.length>0)&&B.raf(Q)},X=t=>G().then(t),tt=J(Y,!0),et=t=>"object"==(t=typeof t)||"function"===t,nt=((t,e,n)=>(n=null!=t?w(O(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of S(e))j.call(t,n)||undefined===n||y(t,n,{get:()=>e[n],enumerable:!(s=$(e,n))||s.enumerable});return t})(y(n,"default",{value:t,enumerable:!0}),t)))(W()),st=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},it={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},rt=t=>t.replace(/[[\]\\-]/g,"\\$&"),ot=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),lt=t=>t.join(""),ft=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const s=[],i=[];let r=n+1,o=!1,l=!1,f=!1,c=!1,u=n,a="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==n+1){if("]"===e&&o&&!f){u=r+1;break}if(o=!0,"\\"!==e||f){if("["===e&&!f)for(const[e,[o,f,c]]of Object.entries(it))if(t.startsWith(e,r)){if(a)return["$.",!1,t.length-n,!0];r+=e.length,c?i.push(o):s.push(o),l=l||f;continue t}f=!1,a?(e>a?s.push(rt(a)+"-"+rt(e)):e===a&&s.push(rt(e)),a="",r++):t.startsWith("-]",r+1)?(s.push(rt(e+"-")),r+=2):t.startsWith("-",r+1)?(a=e,r+=2):(s.push(rt(e)),r++)}else f=!0,r++}else c=!0,r++}if(u<r)return["",!1,0,!1];if(!s.length&&!i.length)return["$.",!1,t.length-n,!0];if(0===i.length&&1===s.length&&/^\\?.$/.test(s[0])&&!c){const t=2===s[0].length?s[0].slice(-1):s[0];return[ot(t),!1,u-n,!1]}const h="["+(c?"^":"")+lt(s)+"]",p="["+(c?"":"^")+lt(i)+"]";return[s.length&&i.length?"("+h+"|"+p+")":s.length?h:p,l,u-n,!0]},ct=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),ut=new Set(["!","?","+","*","@"]),at=t=>ut.has(t),ht="(?!\\.)",pt=new Set(["[","."]),dt=new Set(["..","."]),vt=new Set("().*{}+?[]^$\\!"),mt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),gt="[^/]",bt=gt+"*?",wt=gt+"+?",yt=class t{constructor(t,e,d={}){N(this,p),((t,e,n)=>{((t,e,n)=>{e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),N(this,n),N(this,s),N(this,i,!1),N(this,r,[]),N(this,o),N(this,l),N(this,f),N(this,c,!1),N(this,u),N(this,a),N(this,h,!1),this.type=t,t&&R(this,s,!0),R(this,o,e),R(this,n,x(this,o)?x(x(this,o),n):this),R(this,u,x(this,n)===this?d:x(x(this,n),u)),R(this,f,x(this,n)===this?[]:x(x(this,n),f)),"!"!==t||x(x(this,n),c)||x(this,f).push(this),R(this,l,x(this,o)?x(x(this,o),r).length:0)}get hasMagic(){if(void 0!==x(this,s))return x(this,s);for(const t of x(this,r))if("string"!=typeof t&&(t.type||t.hasMagic))return R(this,s,!0);return x(this,s)}toString(){return void 0!==x(this,a)?x(this,a):R(this,a,this.type?this.type+"("+x(this,r).map((t=>t+"")).join("|")+")":x(this,r).map((t=>t+"")).join(""))}push(...e){for(const n of e)if(""!==n){if("string"!=typeof n&&!(n instanceof t&&x(n,o)===this))throw Error("invalid part: "+n);x(this,r).push(n)}}toJSON(){var t;const e=null===this.type?x(this,r).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...x(this,r).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===x(this,n)||x(x(this,n),c)&&"!"===(null==(t=x(this,o))?void 0:t.type))&&e.push({}),e}isStart(){var e;if(x(this,n)===this)return!0;if(!(null==(e=x(this,o))?void 0:e.isStart()))return!1;if(0===x(this,l))return!0;const s=x(this,o);for(let e=0;e<x(this,l);e++){const n=x(s,r)[e];if(!(n instanceof t&&"!"===n.type))return!1}return!0}isEnd(){var t,e,s;if(x(this,n)===this)return!0;if("!"===(null==(t=x(this,o))?void 0:t.type))return!0;if(!(null==(e=x(this,o))?void 0:e.isEnd()))return!1;if(!this.type)return null==(s=x(this,o))?void 0:s.isEnd();const i=x(this,o)?x(x(this,o),r).length:0;return x(this,l)===i-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(e){const n=new t(this.type,e);for(const t of x(this,r))n.copyIn(t);return n}static fromGlob(e,n={}){var s;const i=new t(null,void 0,n);return P(s=t,v,m).call(s,e,i,0,n),i}toMMPattern(){if(this!==x(this,n))return x(this,n).toMMPattern();const t=""+this,[e,i,r,o]=this.toRegExpSource();if(!(r||x(this,s)||x(this,u).nocase&&!x(this,u).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const l=(x(this,u).nocase?"i":"")+(o?"u":"");return Object.assign(RegExp(`^${e}$`,l),{_src:e,_glob:t})}get options(){return x(this,u)}toRegExpSource(e){var l;const f=null!=e?e:!!x(this,u).dot;if(x(this,n)===this&&P(this,p,d).call(this),!this.type){const u=this.isStart()&&this.isEnd(),a=x(this,r).map((n=>{var r;const[o,l,f,c]="string"==typeof n?P(r=t,v,b).call(r,n,x(this,s),u):n.toRegExpSource(e);return R(this,s,x(this,s)||f),R(this,i,x(this,i)||c),o})).join("");let h="";if(this.isStart()&&"string"==typeof x(this,r)[0]&&(1!==x(this,r).length||!dt.has(x(this,r)[0]))){const t=pt,n=f&&t.has(a.charAt(0))||a.startsWith("\\.")&&t.has(a.charAt(2))||a.startsWith("\\.\\.")&&t.has(a.charAt(4)),s=!f&&!e&&t.has(a.charAt(0));h=n?"(?!(?:^|/)\\.\\.?(?:$|/))":s?ht:""}let p="";return this.isEnd()&&x(x(this,n),c)&&"!"===(null==(l=x(this,o))?void 0:l.type)&&(p="(?:$|\\/)"),[h+a+p,ct(a),R(this,s,!!x(this,s)),x(this,i)]}const a="*"===this.type||"+"===this.type,m="!"===this.type?"(?:(?!(?:":"(?:";let w=P(this,p,g).call(this,f);if(this.isStart()&&this.isEnd()&&!w&&"!"!==this.type){const t=""+this;return R(this,r,[t]),this.type=null,R(this,s,void 0),[t,ct(""+this),!1,!1]}let y=!a||e||f?"":P(this,p,g).call(this,!0);y===w&&(y=""),y&&(w=`(?:${w})(?:${y})*?`);let $="";return $="!"===this.type&&x(this,h)?(this.isStart()&&!f?ht:"")+wt:m+w+("!"===this.type?"))"+(!this.isStart()||f||e?"":ht)+bt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&y?")":"*"===this.type&&y?")?":")"+this.type),[$,ct(w),R(this,s,!!x(this,s)),x(this,i)]}};n=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,f=new WeakMap,c=new WeakMap,u=new WeakMap,a=new WeakMap,h=new WeakMap,p=new WeakSet,d=function(){if(this!==x(this,n))throw Error("should only call on root");if(x(this,c))return this;let t;for(R(this,c,!0);t=x(this,f).pop();){if("!"!==t.type)continue;let e=t,n=x(e,o);for(;n;){for(let s=x(e,l)+1;!n.type&&s<x(n,r).length;s++)for(const e of x(t,r)){if("string"==typeof e)throw Error("string part in extglob AST??");e.copyIn(x(n,r)[s])}e=n,n=x(e,o)}}return this},v=new WeakSet,m=function(t,e,n,i){var o,l;let f=!1,c=!1,u=-1,a=!1;if(null===e.type){let s=n,r="";for(;s<t.length;){const n=t.charAt(s++);if(f||"\\"===n)f=!f,r+=n;else if(c)s===u+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||s===u+2&&a||(c=!1),r+=n;else if("["!==n)if(i.noext||!at(n)||"("!==t.charAt(s))r+=n;else{e.push(r),r="";const l=new yt(n,e);s=P(o=yt,v,m).call(o,t,l,s,i),e.push(l)}else c=!0,u=s,a=!1,r+=n}return e.push(r),s}let p=n+1,d=new yt(null,e);const g=[];let b="";for(;p<t.length;){const n=t.charAt(p++);if(f||"\\"===n)f=!f,b+=n;else if(c)p===u+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||p===u+2&&a||(c=!1),b+=n;else if("["!==n)if(at(n)&&"("===t.charAt(p)){d.push(b),b="";const e=new yt(n,d);d.push(e),p=P(l=yt,v,m).call(l,t,e,p,i)}else if("|"!==n){if(")"===n)return""===b&&0===x(e,r).length&&R(e,h,!0),d.push(b),b="",e.push(...g,d),p;b+=n}else d.push(b),b="",g.push(d),d=new yt(null,e);else c=!0,u=p,a=!1,b+=n}return e.type=null,R(e,s,void 0),R(e,r,[t.substring(n-1)]),p},g=function(t){return x(this,r).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[n,s,r,o]=e.toRegExpSource(t);return R(this,i,x(this,i)||o),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},b=function(t,e,n=!1){let s=!1,i="",r=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(s)s=!1,i+=(vt.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,s,l,f]=ft(t,o);if(l){i+=n,r=r||s,o+=l-1,e=e||f;continue}}"*"!==l?"?"!==l?i+=mt(l):(i+=gt,e=!0):(i+=n&&"*"===t?wt:bt,e=!0)}else o===t.length-1?i+="\\\\":s=!0}return[i,ct(t),!!e,r]},N(yt,v);var $t=yt,St=(t,e,n={})=>(st(e),!(!n.nocomment&&"#"===e.charAt(0))&&new qt(e,n).match(t)),Ot=/^\*+([^+@!?\*\[\(]*)$/,jt=t=>e=>!e.startsWith(".")&&e.endsWith(t),kt=t=>e=>e.endsWith(t),Mt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Et=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),xt=/^\*+\.\*+$/,Nt=t=>!t.startsWith(".")&&t.includes("."),Rt=t=>"."!==t&&".."!==t&&t.includes("."),Pt=/^\.\*+$/,Ct=t=>"."!==t&&".."!==t&&t.startsWith("."),Wt=/^\*+$/,At=t=>0!==t.length&&!t.startsWith("."),Lt=t=>0!==t.length&&"."!==t&&".."!==t,Tt=/^\?+([^+@!?\*\[\(]*)?$/,zt=([t,e=""])=>{const n=It([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Ft=([t,e=""])=>{const n=Ut([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},_t=([t,e=""])=>{const n=Ut([t]);return e?t=>n(t)&&t.endsWith(e):n},Dt=([t,e=""])=>{const n=It([t]);return e?t=>n(t)&&t.endsWith(e):n},It=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Ut=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Bt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";St.sep="win32"===Bt?"\\":"/";var Gt=Symbol("globstar **");St.GLOBSTAR=Gt,St.filter=(t,e={})=>n=>St(n,t,e);var Ht=(t,e={})=>Object.assign({},t,e);St.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return St;const e=St;return Object.assign(((n,s,i={})=>e(n,s,Ht(t,i))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Ht(t,n))}static defaults(n){return e.defaults(Ht(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,s={}){super(e,n,Ht(t,s))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Ht(t,s))}},unescape:(n,s={})=>e.unescape(n,Ht(t,s)),escape:(n,s={})=>e.escape(n,Ht(t,s)),filter:(n,s={})=>e.filter(n,Ht(t,s)),defaults:n=>e.defaults(Ht(t,n)),makeRe:(n,s={})=>e.makeRe(n,Ht(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Ht(t,s)),match:(n,s,i={})=>e.match(n,s,Ht(t,i)),sep:e.sep,GLOBSTAR:Gt})};var Zt=(t,e={})=>(st(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,nt.default)(t));St.braceExpand=Zt,St.makeRe=(t,e={})=>new qt(t,e).makeRe(),St.match=(t,e,n={})=>{const s=new qt(e,n);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};var Vt=/[?*]|[+@!]\(.*?\)|\[|\]/,qt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){st(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||Bt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Vt.test(t[2])||Vt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,s),this.set=s.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const s=t[n];1===n&&""===s&&""===t[0]||"."!==s&&""!==s||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const s=t[n-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;-1!==(s=n.indexOf("**",s+1));){let i=s;for(;"**"===n[i+1];)i++;i>s&&n.splice(s+1,i-s);const r=n[s+2],o=n[s+3];if(".."!==n[s+1])continue;if(!r||"."===r||".."===r||!o||"."===o||".."===o)continue;e=!0,n.splice(s,1);const l=n.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const s=n[t];1===t&&""===s&&""===n[0]||"."!==s&&""!==s||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const t=n[i-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(i-1,2,...1===i&&"**"===n[i+1]?["."]:[]),0===n.length&&n.push(""),i-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);s&&(t[e]=s,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let s=0,i=0,r=[],o="";for(;s<t.length&&i<e.length;)if(t[s]===e[i])r.push("b"===o?e[i]:t[s]),s++,i++;else if(n&&"**"===t[s]&&e[i]===t[s+1])r.push(t[s]),s++;else if(n&&"**"===e[i]&&t[s]===e[i+1])r.push(e[i]),i++;else if("*"!==t[s]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s])return!1;if("a"===o)return!1;o="b",r.push(e[i]),s++,i++}else{if("b"===o)return!1;o="a",r.push(t[s]),s++,i++}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const s=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),i="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=s?3:n?0:void 0,o=!i&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:i?0:void 0;if("number"==typeof r&&"number"==typeof o){const[n,s]=[t[r],e[o]];n.toLowerCase()===s.toLowerCase()&&(e[o]=n,o>r?e=e.slice(o):r>o&&(t=t.slice(r)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,o=0,l=t.length,f=e.length;r<l&&o<f;r++,o++){this.debug("matchOne loop");var c=e[o],u=t[r];if(this.debug(e,c,u),!1===c)return!1;if(c===Gt){this.debug("GLOBSTAR",[e,c,u]);var a=r,h=o+1;if(h===f){for(this.debug("** at the end");r<l;r++)if("."===t[r]||".."===t[r]||!s.dot&&"."===t[r].charAt(0))return!1;return!0}for(;a<l;){var p=t[a];if(this.debug("\nglobstar while",t,a,e,h,p),this.matchOne(t.slice(a),e.slice(h),n))return this.debug("globstar found match!",a,l,p),!0;if("."===p||".."===p||!s.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,a,e,h);break}this.debug("globstar swallow a segment, and continue"),a++}return!(!n||(this.debug("\n>>> no match, partial?",t,a,e,h),a!==l))}let i;if("string"==typeof c?(i=u===c,this.debug("string match",c,u,i)):(i=c.test(u),this.debug("pattern match",c,u,i)),!i)return!1}if(r===l&&o===f)return!0;if(r===l)return n;if(o===f)return r===l-1&&""===t[r];throw Error("wtf?")}braceExpand(){return Zt(this.pattern,this.options)}parse(t){st(t);const e=this.options;if("**"===t)return Gt;if(""===t)return"";let n,s=null;(n=t.match(Wt))?s=e.dot?Lt:At:(n=t.match(Ot))?s=(e.nocase?e.dot?Et:Mt:e.dot?kt:jt)(n[1]):(n=t.match(Tt))?s=(e.nocase?e.dot?Ft:zt:e.dot?_t:Dt)(n):(n=t.match(xt))?s=e.dot?Rt:Nt:(n=t.match(Pt))&&(s=Ct);const i=$t.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:s}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let i=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))s.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Gt?Gt:t._src}));return e.forEach(((t,s)=>{const i=e[s+1],r=e[s-1];t===Gt&&r!==Gt&&(void 0===r?void 0!==i&&i!==Gt?e[s+1]="(?:\\/|"+n+"\\/)?"+i:e[s]=n:void 0===i?e[s-1]=r+"(?:\\/|"+n+")?":i!==Gt&&(e[s-1]=r+"(?:\\/|\\/"+n+"\\/)"+i,e[s+1]=Gt))})),e.filter((t=>t!==Gt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];i="^"+r+i+o+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=RegExp(i,[...s].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const i=this.set;this.debug(this.pattern,"set",i);let r=s[s.length-1];if(!r)for(let t=s.length-2;!r&&t>=0;t--)r=s[t];for(let t=0;t<i.length;t++){const o=i[t];let l=s;if(n.matchBase&&1===o.length&&(l=[r]),this.matchOne(l,o,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return St.defaults(t).Minimatch}};function Yt(t){var e,n,s;return null!=(s=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?s:void 0}St.AST=$t,St.Minimatch=qt,St.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),St.unescape=ct,((t,e)=>{for(var n in e)y(t,n,{get:e[n],enumerable:!0})})({},{err:()=>Kt,map:()=>Qt,ok:()=>Jt,unwrap:()=>te,unwrapErr:()=>ee});var Jt=t=>({isOk:!0,isErr:!1,value:t}),Kt=t=>({isOk:!1,isErr:!0,value:t});function Qt(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>Jt(t))):Jt(n)}if(t.isErr)return Kt(t.value);throw"should never get here"}var Xt,te=t=>{if(t.isOk)return t.value;throw t.value},ee=t=>{if(t.isErr)return t.value;throw t.value};function ne(){var t;const n=this.attachShadow({mode:"open"});if(void 0===Xt&&(Xt=null!=(t=function(t){if(!H)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(e))?t:null),Xt)Z?n.adoptedStyleSheets.push(Xt):n.adoptedStyleSheets=[...n.adoptedStyleSheets,Xt];else if(!H){const t=document.createElement("style");t.innerHTML=e,n.prepend(t)}}var se=t=>{const e=fe(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&ie(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!re(t,le(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&fe(t,"childNodes").length&&se(t)}};function ie(t,e,n){let s,i=0,r=[];for(;i<t.length;i++){if(s=t[i],s["s-sr"]&&(!e||s["s-hn"]===e)&&(void 0===n||le(s)===n)&&(r.push(s),void 0!==n))return r;r=[...r,...ie(s.childNodes,e,n)]}return r}var re=(t,e,n=!0)=>{const s=[];(n&&t["s-sr"]||!t["s-sr"])&&s.push(t);let i=t;for(;i=i.nextSibling;)le(i)!==e||!n&&i["s-sr"]||s.push(i);return s},oe=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,le=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function fe(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var ce=new WeakMap,ue=t=>"sc-"+t.p,ae=(t,e,...n)=>{let s=null,i=null,r=null,o=!1,l=!1;const f=[],c=e=>{for(let n=0;n<e.length;n++)s=e[n],Array.isArray(s)?c(s):null!=s&&"boolean"!=typeof s&&((o="function"!=typeof t&&!et(s))&&(s+=""),o&&l?f[f.length-1].v+=s:f.push(o?he(null,s):s),l=o)};if(c(n),e){e.key&&(i=e.key),e.name&&(r=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=he(t,null);return u.m=e,f.length>0&&(u.$=f),u.S=i,u.O=r,u},he=(t,e)=>({u:0,j:t,v:e,k:null,$:null,m:null,S:null,O:null}),pe={},de=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};de("::slotted"),de(":host"),de(":host-context");var ve,me,ge=(t,e)=>null==t||et(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,be=t=>{var e;return null==(e=L(t))?void 0:e.$hostElement$},we=(t,e)=>{const n=be(t);return{emit:t=>ye(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},ye=(t,e,n)=>{const s=B.ce(e,n);return t.dispatchEvent(s),s},$e=(t,e,n,s,i,r)=>{if(n===s)return;let o=z(t,e),l=e.toLowerCase();if("class"===e){const e=t.classList,i=Oe(n);let r=Oe(s);e.remove(...i.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!i.includes(t))))}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if("ref"===e)s&&s(t);else if(o||"o"!==e[0]||"n"!==e[1]){const l=et(s);if((o||l&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const i=null==s?"":s;"list"===e?o=!1:null!=n&&t[e]==i||("function"==typeof t.__lookupSetter__(e)?t[e]=i:t.setAttribute(e,i))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!o||4&r||i)&&!l&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}else if(e="-"===e[2]?e.slice(3):z(U,l)?l.slice(2):l[2]+e.slice(3),n||s){const i=e.endsWith(je);e=e.replace(ke,""),n&&B.rel(t,e,n,i),s&&B.ael(t,e,s,i)}},Se=/\s/,Oe=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Se):[]),je="Capture",ke=RegExp(je+"$"),Me=(t,e,n)=>{const s=11===e.k.nodeType&&e.k.host?e.k.host:e.k,i=t&&t.m||{},r=e.m||{};for(const t of Ee(Object.keys(i)))t in r||$e(s,t,i[t],void 0,n,e.u);for(const t of Ee(Object.keys(r)))$e(s,t,i[t],r[t],n,e.u)};function Ee(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var xe=!1,Ne=!1,Re=!1,Pe=!1,Ce=(t,e,n)=>{var s;const i=e.$[n];let r,o,l,f=0;if(xe||(Re=!0,"slot"===i.j&&(i.u|=i.$?2:1)),null!==i.v)r=i.k=U.document.createTextNode(i.v);else if(1&i.u)r=i.k=U.document.createTextNode(""),Me(null,i,Pe);else{if(Pe||(Pe="svg"===i.j),!U.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(r=i.k=U.document.createElementNS(Pe?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!xe&&2&i.u?"slot-fb":i.j),Pe&&"foreignObject"===i.j&&(Pe=!1),Me(null,i,Pe),i.$){const e="template"===i.j?r.content:r;for(f=0;f<i.$.length;++f)o=Ce(t,i,f),o&&e.appendChild(o)}"svg"===i.j?Pe=!1:"foreignObject"===r.tagName&&(Pe=!0)}return r["s-hn"]=me,3&i.u&&(r["s-sr"]=!0,r["s-cr"]=ve,r["s-sn"]=i.O||"",r["s-rf"]=null==(s=i.m)?void 0:s.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],s=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const i=this["s-cr"].parentElement;return(i.__childNodes?i.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const s=t[n]["s-nr"]||void 0;s&&s.isConnected&&e.push(s)}return e})(i.childNodes)).forEach((t=>{s===le(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(r),l=t&&t.$&&t.$[n],l&&l.j===i.j&&t.k&&We(t.k)),r},We=t=>{B.u|=1;const e=t.closest(me.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),s=Array.from(t.__childNodes||t.childNodes);for(const t of n?s.reverse():s)null!=t["s-sh"]&&(Be(e,t,null!=n?n:null),t["s-sh"]=void 0,Re=!0)}B.u&=-2},Ae=(t,e)=>{B.u|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===me&&n.push(e)}for(let t=n.length-1;t>=0;t--){const s=n[t];s["s-hn"]!==me&&s["s-ol"]&&(Be(Fe(s).parentNode,s,Fe(s)),s["s-ol"].remove(),s["s-ol"]=void 0,s["s-sh"]=void 0,Re=!0),e&&Ae(s,e)}B.u&=-2},Le=(t,e,n,s,i,r)=>{let o,l=t["s-cr"]&&t["s-cr"].parentNode||t;for(l.shadowRoot&&l.tagName===me&&(l=l.shadowRoot),"template"===n.j&&(l=l.content);i<=r;++i)s[i]&&(o=Ce(null,n,i),o&&(s[i].k=o,Be(l,o,Fe(e))))},Te=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.k;Ue(e),t&&(Ne=!0,t["s-ol"]?t["s-ol"].remove():Ae(t,!0),t.remove())}}},ze=(t,e,n=!1)=>t.j===e.j&&("slot"===t.j?t.O===e.O:n?(n&&!t.S&&e.S&&(t.S=e.S),!0):t.S===e.S),Fe=t=>t&&t["s-ol"]||t,_e=(t,e,n=!1)=>{const s=e.k=t.k,i=t.$,r=e.$,o=e.j,l=e.v;let f;null===l?(Pe="svg"===o||"foreignObject"!==o&&Pe,"slot"!==o||xe||t.O!==e.O&&(e.k["s-sn"]=e.O||"",We(e.k.parentElement)),Me(t,e,Pe),null!==i&&null!==r?((t,e,n,s,i=!1)=>{let r,o,l=0,f=0,c=0,u=0,a=e.length-1,h=e[0],p=e[a],d=s.length-1,v=s[0],m=s[d];const g="template"===n.j?t.content:t;for(;l<=a&&f<=d;)if(null==h)h=e[++l];else if(null==p)p=e[--a];else if(null==v)v=s[++f];else if(null==m)m=s[--d];else if(ze(h,v,i))_e(h,v,i),h=e[++l],v=s[++f];else if(ze(p,m,i))_e(p,m,i),p=e[--a],m=s[--d];else if(ze(h,m,i))"slot"!==h.j&&"slot"!==m.j||Ae(h.k.parentNode,!1),_e(h,m,i),Be(g,h.k,p.k.nextSibling),h=e[++l],m=s[--d];else if(ze(p,v,i))"slot"!==h.j&&"slot"!==m.j||Ae(p.k.parentNode,!1),_e(p,v,i),Be(g,p.k,h.k),p=e[--a],v=s[++f];else{for(c=-1,u=l;u<=a;++u)if(e[u]&&null!==e[u].S&&e[u].S===v.S){c=u;break}c>=0?(o=e[c],o.j!==v.j?r=Ce(e&&e[f],n,c):(_e(o,v,i),e[c]=void 0,r=o.k),v=s[++f]):(r=Ce(e&&e[f],n,f),v=s[++f]),r&&Be(Fe(h.k).parentNode,r,Fe(h.k))}l>a?Le(t,null==s[d+1]?null:s[d+1].k,n,s,f,d):f>d&&Te(e,l,a)})(s,i,e,r,n):null!==r?(null!==t.v&&(s.textContent=""),Le(s,null,e,r,0,r.length-1)):!n&&null!==i&&Te(i,0,i.length-1),Pe&&"svg"===o&&(Pe=!1)):(f=s["s-cr"])?f.parentNode.textContent=l:t.v!==l&&(s.data=l)},De=[],Ie=t=>{let e,n,s;const i=t.__childNodes||t.childNodes;for(const t of i){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const i=t["s-sn"];for(s=n.length-1;s>=0;s--)if(e=n[s],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===t["s-hn"]||e["s-sh"]&&e["s-sh"]===t["s-hn"]))if(oe(e,i)){let n=De.find((t=>t.M===e));Ne=!0,e["s-sn"]=e["s-sn"]||i,n?(n.M["s-sh"]=t["s-hn"],n.N=t):(e["s-sh"]=t["s-hn"],De.push({N:t,M:e})),e["s-sr"]&&De.map((t=>{oe(t.M,e["s-sn"])&&(n=De.find((t=>t.M===e)),n&&!t.N&&(t.N=n.N))}))}else De.some((t=>t.M===e))||De.push({M:e})}1===t.nodeType&&Ie(t)}},Ue=t=>{t.m&&t.m.ref&&t.m.ref(null),t.$&&t.$.map(Ue)},Be=(t,e,n,s)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,n);const{slotNode:i}=function(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const s=t["s-sn"]=le(t)||"";return{slotNode:ie(fe(e,"childNodes"),e.tagName,s)[0],slotName:s}}(e);return i&&!s&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(i),e}return t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)},Ge=(t,e)=>{if(e&&!t.R&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.R=()=>{e["s-p"].splice(n-1,1),s()})))}},He=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Ge(t,t.P);const n=()=>Ze(t,e);if(!e)return tt(n);queueMicrotask((()=>{n()}))},Ze=(t,e)=>{const n=t.$hostElement$,s=t.l;if(!s)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return e?(t.C&&(t.C=!1,Xe(s,"connectedCallback",void 0,n)),t.W.length&&t.W.forEach((t=>t(n))),i=Xe(s,"componentWillLoad",void 0,n)):i=Xe(s,"componentWillUpdate",void 0,n),i=Ve(i,(()=>Xe(s,"componentWillRender",void 0,n))),Ve(i,(()=>Ye(t,s,e)))},Ve=(t,e)=>qe(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),qe=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ye=async(t,e,n)=>{var s;const i=t.$hostElement$,r=i["s-rc"];n&&(t=>{const e=t.i,n=t.$hostElement$,s=e.u,i=((t,e)=>{var n,s,i;const r=ue(e),o=D.get(r);if(!U.document)return r;if(t=11===t.nodeType?t:U.document,o)if("string"==typeof o){let i,l=ce.get(t=t.head||t);if(l||ce.set(t,l=new Set),!l.has(r)){i=U.document.createElement("style"),i.innerHTML=o;const f=null!=(n=B.A)?n:Yt(U.document);if(null!=f&&i.setAttribute("nonce",f),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(H){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(o),Z?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=o+e.innerHTML:t.prepend(i)}else t.append(i);1&e.u&&t.insertBefore(i,null),4&e.u&&(i.innerHTML+=I),l&&l.add(r)}}else{let e=ce.get(t);if(e||ce.set(t,e=new Set),!e.has(r)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let s;if(o.constructor===n.CSSStyleSheet)s=o;else{s=new n.CSSStyleSheet;for(let t=0;t<o.cssRules.length;t++)s.insertRule(o.cssRules[t].cssText,t)}Z?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(r)}}return r})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&s&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);Je(t,e,i,n),r&&(r.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(s=i["s-p"])?s:[],n=()=>Ke(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},Je=(t,e,n,s)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{var s,i,r,o,l;const f=t.$hostElement$,c=t.i,u=t.L||he(null,null),a=(t=>t&&t.j===pe)(e)?e:ae(null,null,e);if(me=f.tagName,n&&a.m)for(const t of Object.keys(a.m))f.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.m[t]=f[t]);if(a.j=null,a.u|=4,t.L=a,a.k=u.k=f.shadowRoot||f,xe=!(!(1&c.u)||128&c.u),ve=f["s-cr"],Ne=!1,_e(u,a,n),B.u|=1,Re){Ie(a.k);for(const t of De){const e=t.M;if(!e["s-ol"]&&U.document){const t=U.document.createTextNode("");t["s-nr"]=e,Be(e.parentNode,e["s-ol"]=t,e,n)}}for(const t of De){const e=t.M,l=t.N;if(1===e.nodeType&&n&&(e["s-ih"]=null!=(s=e.hidden)&&s),l){const t=l.parentNode;let s=l.nextSibling;if(s&&1===s.nodeType){let n=null==(i=e["s-ol"])?void 0:i.previousSibling;for(;n;){let i=null!=(r=n["s-nr"])?r:null;if(i&&i["s-sn"]===e["s-sn"]&&t===(i.__parentNode||i.parentNode)){for(i=i.nextSibling;i===e||(null==i?void 0:i["s-sr"]);)i=null==i?void 0:i.nextSibling;if(!i||!i["s-nr"]){s=i;break}}n=n.previousSibling}}if((!s&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==s)&&e!==s){if(Be(t,e,s,n),8===e.nodeType&&e.nodeValue.startsWith("s-nt-")){const t=U.document.createTextNode(e.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=e["s-hn"],t["s-sn"]=e["s-sn"],t["s-sh"]=e["s-sh"],t["s-sr"]=e["s-sr"],t["s-ol"]=e["s-ol"],t["s-ol"]["s-nr"]=t,Be(e.parentNode,t,e,n),e.parentNode.removeChild(e)}1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(o=e["s-ih"])&&o)}e&&"function"==typeof l["s-rf"]&&l["s-rf"](l)}else 1===e.nodeType&&(e.hidden=!0)}}if(Ne&&se(a.k),B.u&=-2,De.length=0,!xe&&!(1&c.u)&&f["s-cr"]){const t=a.k.__childNodes||a.k.childNodes;for(const e of t)if(e["s-hn"]!==me&&!e["s-sh"])if(n&&null==e["s-ih"]&&(e["s-ih"]=null!=(l=e.hidden)&&l),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=U.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],Be(e.parentNode,t,e,n),e.parentNode.removeChild(e)}}ve=void 0})(t,e,s)}catch(e){F(e,t.$hostElement$)}return null},Ke=t=>{const e=t.$hostElement$,n=t.l,s=t.P;Xe(n,"componentDidRender",void 0,e),64&t.u?Xe(n,"componentDidUpdate",void 0,e):(t.u|=64,tn(e),Xe(n,"componentDidLoad",void 0,e),t.T(e),s||Qe()),t.R&&(t.R(),t.R=void 0),512&t.u&&X((()=>He(t,!1))),t.u&=-517},Qe=()=>{X((()=>ye(U,"appload",{detail:{namespace:"ticketlayer-elements"}})))},Xe=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){F(t,s)}},tn=t=>t.classList.add("hydrated"),en=(t,e,n,s)=>{const i=L(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${s.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,o=i.o.get(e),l=i.u,f=i.l;if(n=ge(n,s.t[e][0]),!(8&l&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n))){if(i.o.set(e,n),s.F){const t=s.F[e];t&&t.map((t=>{try{const[[s,r]]=Object.entries(t);(128&l||1&r)&&(f?f[s](n,o,e):i.W.push((()=>{i.l[s](n,o,e)})))}catch(t){F(t,r)}}))}if(2==(18&l)){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,o,e))return;He(i,!1)}}},nn=(t,e,n)=>{var s,i;const r=t.prototype;{t.watchers&&!e.F&&(e.F=t.watchers),t.deserializers&&!e._&&(e._=t.deserializers),t.serializers&&!e.D&&(e.D=t.serializers);const o=Object.entries(null!=(s=e.t)?s:{});if(o.map((([t,[s]])=>{if(31&s||2&n&&32&s){const{get:i,set:o}=Object.getOwnPropertyDescriptor(r,t)||{};i&&(e.t[t][0]|=2048),o&&(e.t[t][0]|=4096),(1&n||!i)&&Object.defineProperty(r,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>L(this).o.get(e))(0,t);const n=L(this),s=n?n.l:r;if(!s)return;return s[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,t,{set(i){const r=L(this);if(r){if(o)return void 0===(32&s?this[t]:r.$hostElement$[t])&&r.o.get(t)&&(i=r.o.get(t)),o.call(this,ge(i,s)),void en(this,t,i=32&s?this[t]:r.$hostElement$[t],e);{if(!(1&n&&4096&e.t[t][0]))return en(this,t,i,e),void(1&n&&!r.l&&r.W.push((()=>{4096&e.t[t][0]&&r.l[t]!==r.o.get(t)&&(r.l[t]=i)})));const o=()=>{const n=r.l[t];!r.o.get(t)&&n&&r.o.set(t,n),r.l[t]=ge(i,s),en(this,t,r.l[t],e)};r.l?o():r.W.push((()=>{o()}))}}}})}})),1&n){const n=new Map;r.attributeChangedCallback=function(t,s,i){B.jmp((()=>{var l;const f=n.get(t),c=L(this);if(this.hasOwnProperty(f)&&(i=this[f],delete this[f]),r.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==i)return;if(null==f){const n=null==c?void 0:c.u;if(c&&n&&!(8&n)&&i!==s){const r=c.l,o=null==(l=e.F)?void 0:l[t];null==o||o.forEach((e=>{const[[o,l]]=Object.entries(e);null!=r[o]&&(128&n||1&l)&&r[o].call(r,i,s,t)}))}return}const u=o.find((([t])=>t===f));u&&4&u[1][0]&&(i=null!==i&&"false"!==i);const a=Object.getOwnPropertyDescriptor(r,f);i==this[f]||a.get&&!a.set||(this[f]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.F)?i:{}),...o.filter((([t,e])=>31&e[0])).map((([t,e])=>{const s=e[1]||t;return n.set(s,t),s}))]))}}return t},sn=(t,e)=>{Xe(t,"connectedCallback",void 0,e)},rn=(t,e)=>{Xe(t,"disconnectedCallback",void 0,e||t)},on=(t,e={})=>{var n;if(!U.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const s=[],i=e.exclude||[],r=U.customElements,o=U.document.head,l=o.querySelector("meta[charset]"),f=U.document.createElement("style"),c=[];let u,a=!0;Object.assign(B,e),B.h=new URL(e.resourcesUrl||"./",U.document.baseURI).href;let h=!1;if(t.map((t=>{t[1].map((e=>{var n,o,l;const f={u:e[0],p:e[1],t:e[2],I:e[3]};4&f.u&&(h=!0),f.t=e[2],f.F=null!=(n=e[4])?n:{},f.D=null!=(o=e[5])?o:{},f._=null!=(l=e[6])?l:{};const p=f.p,d=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,i:e,o:new Map,U:new Map};n.B=new Promise((t=>n.T=t)),t["s-p"]=[],t["s-rc"]=[],n.W=[];const s=n;t.__stencil__getHostRef=()=>s})(t=this,f),1&f.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${f.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else ne.call(t,f)}connectedCallback(){L(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),u&&(clearTimeout(u),u=null),a?c.push(this):B.jmp((()=>(t=>{if(!(1&B.u)){const e=L(t);if(!e)return;const n=e.i,s=()=>{};if(1&e.u)(null==e?void 0:e.l)?sn(e.l,t):(null==e?void 0:e.B)&&e.B.then((()=>sn(e.l,t)));else{e.u|=1,12&n.u&&(t=>{if(!U.document)return;const e=t["s-cr"]=U.document.createComment("");e["s-cn"]=!0,Be(t,e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Ge(e,e.P=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;if(!(32&e.u)){if(e.u|=32,n.G){const i=((t,e)=>{const n=t.p.replace(/-/g,"_"),s=t.G;if(!s)return;const i=_.get(s);return i?i[n]:import(`./${s}.entry.js`).then((t=>(_.set(s,t),t[n])),(t=>{F(t,e.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(i&&"then"in i){const t=()=>{};s=await i,t()}else s=i;if(!s)throw Error(`Constructor for "${n.p}#${e.H}" was not found`);s.isProxied||(n.F=s.watchers,n.D=s.serializers,n._=s.deserializers,nn(s,n,2),s.isProxied=!0);const r=()=>{};e.u|=8;try{new s(e)}catch(e){F(e,t)}e.u&=-9,e.u|=128,r(),4&n.u?e.C=!0:sn(e.l,t)}else s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(s&&s.style){let t;"string"==typeof s.style&&(t=s.style);const e=ue(n);if(!D.has(e)){const s=()=>{};((t,e,n)=>{let s=D.get(t);H&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,D.set(t,s)})(e,t,!!(1&n.u)),s()}}}const i=e.P,r=()=>He(e,!0);i&&i["s-rc"]?i["s-rc"].push(r):r()})(t,e,n)}s()}})(this))))}disconnectedCallback(){B.jmp((()=>(async t=>{if(!(1&B.u)){const e=L(t);(null==e?void 0:e.l)?rn(e.l,t):(null==e?void 0:e.B)&&e.B.then((()=>rn(e.l,t)))}ce.has(t)&&ce.delete(t),t.shadowRoot&&ce.has(t.shadowRoot)&&ce.delete(t.shadowRoot)})(this))),B.raf((()=>{var t;const e=L(this);if(!e)return;const n=c.findIndex((t=>t===this));n>-1&&c.splice(n,1),(null==(t=null==e?void 0:e.L)?void 0:t.k)instanceof Node&&!e.L.k.isConnected&&delete e.L.k}))}componentOnReady(){var t;return null==(t=L(this))?void 0:t.B}};f.G=t[0],i.includes(p)||r.get(p)||(s.push(p),r.define(p,nn(d,f,1)))}))})),s.length>0&&(h&&(f.textContent+=I),f.textContent+=s.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",f.innerHTML.length)){f.setAttribute("data-styles","");const t=null!=(n=B.A)?n:Yt(U.document);null!=t&&f.setAttribute("nonce",t),o.insertBefore(f,l?l.nextSibling:o.firstChild)}a=!1,c.length?c.map((t=>t.connectedCallback())):B.jmp((()=>u=setTimeout(Qe,30)))},ln=t=>B.A=t;export{pe as H,be as a,on as b,we as c,t as g,ae as h,G as p,T as r,ln as s}
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as s}from"./p-Ba-RZTFI.js";import{w as e}from"./p-CqhvfyKV.js";import{e as n}from"./p-BGekdjN9.js";const l=class{constructor(s){i(this,s),this.tlAuthChanged=t(this,"tlAuthChanged"),this.tlMagicLinkSent=t(this,"tlMagicLinkSent"),this.tlError=t(this,"tlError"),this.heading="Sign in",this.allowCodeEntry=!0,this.phase="email",this.email="",this.code="",this.busy=!1,this.error=null,this.notice=null,this.customer=null,this.auth=null,this.unsubscribes=[],this.urlCodeUsed=!1,this.handleEmailInput=i=>{this.email=i.target.value,this.error=null},this.handleCodeInput=i=>{this.code=i.target.value,this.error=null},this.handleEmailSubmit=i=>{i.preventDefault(),this.requestLink()},this.handleCodeSubmit=i=>{i.preventDefault(),this.exchange(this.code.trim())}}async componentWillLoad(){const i=await e().catch((()=>null));if(!i)return void(this.error="Sign-in is not available right now");if(this.auth=i.getAuthManager?.()??null,!this.auth)return void(this.error="Sign-in is not available with this SDK");this.syncFromSDK(),this.unsubscribes.push(i.on("auth:changed",(()=>this.syncFromSDK()))),this.unsubscribes.push(i.on("session:changed",(()=>this.syncFromSDK())));const t=this.codeFromUrl();t&&!this.auth.authenticated&&await this.exchange(t)}disconnectedCallback(){this.unsubscribes.forEach((i=>i())),this.unsubscribes=[]}codeFromUrl(){if("undefined"==typeof window||!window.location?.search||this.urlCodeUsed)return null;const i=new URLSearchParams(window.location.search).get("code");return i&&(this.urlCodeUsed=!0),i}syncFromSDK(){this.auth&&(this.auth.authenticated?(this.customer=this.auth.customer??null,this.phase="signed-in"):"signed-in"===this.phase&&(this.customer=null,this.phase="email"))}async requestLink(i=!1){const t=this.email.trim();if(t){if(this.auth){this.busy=!0,this.error=null,this.notice=null;try{await this.auth.requestMagicLink({email:t}),this.phase="sent",this.notice=i?"Sent again. Check your inbox.":null,this.tlMagicLinkSent.emit({email:t})}catch(i){console.error("[tl-login] Magic-link request failed:",i),this.error=n(i,"Could not send your sign-in link"),this.tlError.emit({message:this.error})}finally{this.busy=!1}}}else this.error="Enter your email address"}async exchange(i){if(!i)return void(this.error="Enter the code from your email");if(!this.auth)return;const t=this.phase;this.busy=!0,this.error=null,this.phase="verifying";try{const t=await this.auth.exchange(i);this.customer=this.auth.customer??t?.customer??null,this.phase="signed-in",this.code="",this.tlAuthChanged.emit({customer:this.customer,authenticated:!0})}catch(i){console.error("[tl-login] Code exchange failed:",i),this.phase="verifying"===t||"email"===t?"email":"code",this.error="That code did not work. Check it and try again, or request a new link.",this.tlError.emit({message:this.error})}finally{this.busy=!1}}async signOut(){if(this.auth){this.busy=!0;try{await this.auth.logout()}catch(i){console.error("[tl-login] Sign out failed:",i)}finally{this.busy=!1,this.customer=null,this.phase="email",this.tlAuthChanged.emit({customer:null,authenticated:!1})}}}renderError(){return this.error?s("p",{class:"error",role:"alert"},this.error):null}render(){return"signed-in"===this.phase?s("div",{class:"login signed-in"},s("p",{class:"signed-in-text"},"Signed in as ",s("strong",null,this.customer?.email??"your account")),s("button",{type:"button",class:"secondary",disabled:this.busy,onClick:()=>this.signOut()},"Sign out")):"verifying"===this.phase?s("div",{class:"login"},s("h2",{class:"title"},"Signing you in…"),s("p",{class:"lead"},"Just a moment.")):"sent"===this.phase?s("div",{class:"login"},s("h2",{class:"title"},"Check your inbox"),s("p",{class:"lead"},"We've sent a sign-in link to ",s("strong",null,this.email),". Open it on this device to continue."),this.notice&&s("p",{class:"notice"},this.notice),this.renderError(),s("div",{class:"actions"},s("button",{type:"button",class:"secondary",disabled:this.busy,onClick:()=>this.requestLink(!0)},this.busy?"Sending…":"Resend link"),this.allowCodeEntry&&s("button",{type:"button",class:"link",onClick:()=>this.phase="code"},"Enter the code instead"),s("button",{type:"button",class:"link",onClick:()=>this.phase="email"},"Use a different email"))):"code"===this.phase?s("form",{class:"login",onSubmit:this.handleCodeSubmit},s("h2",{class:"title"},"Enter your code"),s("p",{class:"lead"},"Type the 6-digit code from the email we sent to ",s("strong",null,this.email),"."),s("label",{class:"label",htmlFor:"tl-login-code"},"Code"),s("input",{id:"tl-login-code",class:"input code-input",type:"text",inputmode:"numeric",autocomplete:"one-time-code",placeholder:"123456",value:this.code,disabled:this.busy,onInput:this.handleCodeInput}),this.renderError(),s("button",{type:"submit",class:"primary",disabled:this.busy},this.busy?"Checking…":"Sign in"),s("div",{class:"actions"},s("button",{type:"button",class:"link",onClick:()=>this.requestLink(!0)},"Resend link"),s("button",{type:"button",class:"link",onClick:()=>this.phase="sent"},"Back"))):s("form",{class:"login",onSubmit:this.handleEmailSubmit},s("h2",{class:"title"},this.heading),s("p",{class:"lead"},"Enter your email and we'll send you a secure sign-in link. No password needed."),s("label",{class:"label",htmlFor:"tl-login-email"},"Email address"),s("input",{id:"tl-login-email",class:"input",type:"email",autocomplete:"email",placeholder:"you@example.com",required:!0,value:this.email,disabled:this.busy||!this.auth,onInput:this.handleEmailInput}),this.renderError(),s("button",{type:"submit",class:"primary",disabled:this.busy||!this.auth},this.busy?"Sending link…":"Email me a sign-in link"))}};l.style=":host{display:block;font-family:var(--tl-font-family, system-ui, sans-serif);color:var(--tl-foreground, #111827)}.login{display:flex;flex-direction:column;gap:var(--tl-spacing-3, 0.75rem);padding:var(--tl-spacing-6, 1.5rem);background:var(--tl-background, #ffffff);border:1px solid var(--tl-border, #e5e7eb);border-radius:var(--tl-radius-lg, 0.75rem)}.title{margin:0;font-size:1.25rem;font-weight:600}.lead{margin:0;font-size:0.875rem;color:var(--tl-muted-foreground, #6b7280)}.label{font-size:0.875rem;font-weight:500}.input{padding:var(--tl-spacing-3, 0.75rem);font:inherit;font-size:0.9375rem;color:var(--tl-foreground, #111827);background:var(--tl-background, #ffffff);border:1px solid var(--tl-border, #e5e7eb);border-radius:var(--tl-radius-md, 0.5rem)}.input:focus{outline:2px solid var(--tl-primary, #6366f1);outline-offset:1px}.code-input{font-family:var(--tl-font-family-mono, ui-monospace, monospace);font-size:1.25rem;letter-spacing:0.25em;text-align:center}.primary,.secondary{padding:var(--tl-spacing-3, 0.75rem) var(--tl-spacing-4, 1rem);font:inherit;font-size:0.9375rem;font-weight:600;border-radius:var(--tl-radius-md, 0.5rem);cursor:pointer}.primary{color:var(--tl-primary-foreground, #ffffff);background:var(--tl-primary, #6366f1);border:none}.primary:hover:not(:disabled){opacity:0.9}.secondary{color:var(--tl-foreground, #111827);background:var(--tl-secondary, #f3f4f6);border:1px solid var(--tl-border, #e5e7eb)}.primary:disabled,.secondary:disabled,.input:disabled{opacity:0.6;cursor:not-allowed}.link{padding:0;font:inherit;font-size:0.875rem;color:var(--tl-primary, #6366f1);background:none;border:none;cursor:pointer}.link:hover{text-decoration:underline}.actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--tl-spacing-4, 1rem)}.error{margin:0;font-size:0.8125rem;color:var(--tl-error, #ef4444)}.notice{margin:0;font-size:0.8125rem;color:var(--tl-success, #10b981)}.signed-in{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap}.signed-in-text{margin:0;font-size:0.875rem;overflow-wrap:anywhere}";export{l as tl_login}
@@ -1 +0,0 @@
1
- import{r as t,c as r,h as e}from"./p-Ba-RZTFI.js";import{w as o,h as a,g as i}from"./p-CqhvfyKV.js";const s=class{constructor(e){t(this,e),this.tlCheckout=r(this,"tlCheckout"),this.tlItemRemoved=r(this,"tlItemRemoved"),this.tlCartUpdated=r(this,"tlCartUpdated"),this.tlError=r(this,"tlError"),this.showCheckoutButton=!0,this.checkoutLabel="Checkout",this.showRemoveButtons=!0,this.compact=!1,this.cart=null,this.loading=!0,this.error=null,this.removingItemId=null,this.handleCheckout=()=>{this.cart&&this.cart.items.length>0&&this.tlCheckout.emit({cart:this.cart})}}componentWillLoad(){this.loadCart()}componentDidLoad(){this.subscribeToCartUpdates()}disconnectedCallback(){this.unsubscribe&&this.unsubscribe()}async loadCart(){try{console.log("[tl-cart] Loading cart..."),this.loading=!0,this.error=null;const t=await o(),r=t.getCartManager?.();if(r){const t=await r.get();console.log("[tl-cart] Cart loaded:",t),this.cart=t}}catch(t){console.error("[tl-cart] Failed to load cart:",t),this.error=t instanceof Error?t.message:"Failed to load cart",this.tlError.emit({message:this.error})}finally{this.loading=!1}}async subscribeToCartUpdates(){const t=await o().catch((()=>null));if(!t)return;const r=t.getCartManager?.();r&&(this.unsubscribe=r.on?.("cart:updated",(t=>{console.log("[tl-cart] Cart updated:",t),this.cart=t,this.tlCartUpdated.emit({cart:t})})))}async handleRemoveItem(t){if(a()){this.removingItemId=t;try{const r=i(),e=r.getCartManager?.();e&&(await e.removeItem(t),console.log("[tl-cart] Item removed:",t),this.tlItemRemoved.emit({itemId:t}))}catch(t){console.error("[tl-cart] Failed to remove item:",t),this.error=t instanceof Error?t.message:"Failed to remove item",this.tlError.emit({message:this.error})}finally{this.removingItemId=null}}}formatPrice(t,r="GBP"){return new Intl.NumberFormat("en-GB",{style:"currency",currency:r}).format(t/100)}formatDate(t){return new Date(t).toLocaleDateString("en-GB",{weekday:"short",day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})}renderSkeleton(){return e("div",{class:"skeleton-container"},e("div",{class:"skeleton-item"}),e("div",{class:"skeleton-item"}),e("div",{class:"skeleton-totals"}))}renderEmptyCart(){return e("div",{class:"empty-cart"},e("svg",{class:"empty-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})),e("p",{class:"empty-title"},"Your cart is empty"),e("p",{class:"empty-message"},"Add tickets to get started"))}renderCartItem(t){const r=this.removingItemId===t.id;return e("div",{class:"cart-item "+(r?"removing":""),key:t.id},e("div",{class:"item-info"},e("p",{class:"item-name"},t.ticketTypeName),!this.compact&&e("p",{class:"item-event"},t.eventName),!this.compact&&t.occurrenceDate&&e("p",{class:"item-date"},this.formatDate(t.occurrenceDate)),e("p",{class:"item-quantity"},"Qty: ",t.quantity)),e("div",{class:"item-actions"},e("p",{class:"item-price"},this.formatPrice(t.totalPrice,t.currency)),this.showRemoveButtons&&e("button",{class:"remove-btn",onClick:()=>this.handleRemoveItem(t.id),disabled:r,"aria-label":"Remove item"},r?e("span",{class:"spinner"}):e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})))))}render(){if(this.loading)return this.renderSkeleton();if(!this.cart||0===this.cart.items.length)return this.renderEmptyCart();const{items:t,subtotal:r,fees:o,total:a,currency:i}=this.cart;return e("div",{class:"cart "+(this.compact?"compact":"")},e("div",{class:"cart-items"},t.map((t=>this.renderCartItem(t)))),e("div",{class:"cart-totals"},!this.compact&&e("div",{class:"total-row subtotal"},e("span",null,"Subtotal"),e("span",null,this.formatPrice(r,i))),o>0&&!this.compact&&e("div",{class:"total-row fees"},e("span",null,"Fees"),e("span",null,this.formatPrice(o,i))),e("div",{class:"total-row total"},e("span",null,"Total"),e("span",null,this.formatPrice(a,i)))),this.showCheckoutButton&&e("button",{class:"checkout-btn",onClick:this.handleCheckout,disabled:0===t.length},this.checkoutLabel))}};s.style=":host{display:block;font-family:var(--tl-font-family, system-ui, sans-serif)}.skeleton-container{padding:var(--tl-spacing-4, 1rem)}.skeleton-item{height:70px;background:var(--tl-color-muted, #f3f4f6);border-radius:var(--tl-radius-md, 0.5rem);margin-bottom:var(--tl-spacing-3, 0.75rem);animation:pulse 1.5s ease-in-out infinite}.skeleton-totals{height:100px;background:var(--tl-color-muted, #f3f4f6);border-radius:var(--tl-radius-md, 0.5rem);animation:pulse 1.5s ease-in-out infinite}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}.empty-cart{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--tl-spacing-8, 2rem);text-align:center}.empty-icon{width:48px;height:48px;color:var(--tl-color-muted-foreground, #9ca3af);margin-bottom:var(--tl-spacing-4, 1rem)}.empty-title{margin:0 0 var(--tl-spacing-2, 0.5rem);font-size:16px;font-weight:600;color:var(--tl-color-foreground, #111827)}.empty-message{margin:0;font-size:14px;color:var(--tl-color-muted-foreground, #6b7280)}.cart{background:var(--tl-color-background, #ffffff)}.cart.compact .cart-items{margin-bottom:var(--tl-spacing-2, 0.5rem)}.cart-items{margin-bottom:var(--tl-spacing-4, 1rem)}.cart-item{display:flex;justify-content:space-between;align-items:flex-start;padding:var(--tl-spacing-3, 0.75rem) 0;border-bottom:1px solid var(--tl-color-border, #e5e7eb);transition:opacity 0.2s}.cart-item:last-child{border-bottom:none}.cart-item.removing{opacity:0.5}.item-info{flex:1;min-width:0}.item-name{margin:0;font-weight:600;font-size:15px;color:var(--tl-color-foreground, #111827)}.item-event{margin:var(--tl-spacing-1, 0.25rem) 0 0;font-size:14px;color:var(--tl-color-muted-foreground, #6b7280)}.item-date{margin:var(--tl-spacing-1, 0.25rem) 0 0;font-size:13px;color:var(--tl-color-muted-foreground, #9ca3af)}.item-quantity{margin:var(--tl-spacing-1, 0.25rem) 0 0;font-size:13px;color:var(--tl-color-muted-foreground, #6b7280)}.item-actions{display:flex;align-items:center;gap:var(--tl-spacing-3, 0.75rem);margin-left:var(--tl-spacing-4, 1rem)}.item-price{margin:0;font-weight:600;font-size:15px;color:var(--tl-color-foreground, #111827);white-space:nowrap}.remove-btn{width:28px;height:28px;padding:0;border:none;background:transparent;border-radius:var(--tl-radius-sm, 0.25rem);color:var(--tl-color-muted-foreground, #9ca3af);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color 0.15s, color 0.15s}.remove-btn:hover:not(:disabled){background-color:var(--tl-color-destructive-bg, #fee2e2);color:var(--tl-color-destructive, #ef4444)}.remove-btn:disabled{cursor:not-allowed;opacity:0.5}.remove-btn svg{width:16px;height:16px}.spinner{width:14px;height:14px;border:2px solid var(--tl-color-border, #e5e7eb);border-top-color:var(--tl-color-primary, #6366f1);border-radius:50%;animation:spin 0.6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.cart-totals{padding:var(--tl-spacing-3, 0.75rem) 0;border-top:1px solid var(--tl-color-border, #e5e7eb)}.total-row{display:flex;justify-content:space-between;align-items:center;padding:var(--tl-spacing-1, 0.25rem) 0}.total-row.subtotal,.total-row.fees{font-size:14px;color:var(--tl-color-muted-foreground, #6b7280)}.total-row.total{font-size:16px;font-weight:700;color:var(--tl-color-foreground, #111827);padding-top:var(--tl-spacing-2, 0.5rem);border-top:1px solid var(--tl-color-border, #e5e7eb);margin-top:var(--tl-spacing-2, 0.5rem)}.checkout-btn{width:100%;margin-top:var(--tl-spacing-4, 1rem);padding:var(--tl-spacing-3, 0.75rem) var(--tl-spacing-4, 1rem);border-radius:var(--tl-radius-md, 0.5rem);border:none;background-color:var(--tl-color-primary, #6366f1);color:var(--tl-color-primary-foreground, #ffffff);font-weight:600;font-size:16px;cursor:pointer;transition:opacity 0.15s, transform 0.1s}.checkout-btn:hover:not(:disabled){opacity:0.9}.checkout-btn:active:not(:disabled){transform:scale(0.98)}.checkout-btn:disabled{background-color:var(--tl-color-muted, #d1d5db);color:var(--tl-color-muted-foreground, #6b7280);cursor:not-allowed}.cart.compact .item-info{flex-direction:row;align-items:center}.cart.compact .cart-totals{padding:var(--tl-spacing-2, 0.5rem) 0}.cart.compact .total-row.total{margin-top:0;border-top:none;padding-top:0}";export{s as tl_cart}
@@ -1 +0,0 @@
1
- import{r as t,c as r,h as e}from"./p-Ba-RZTFI.js";import{o as s,w as i}from"./p-CqhvfyKV.js";import{e as a,r as o,o as l,c as n,d as c,a as d,g as h}from"./p-BGekdjN9.js";const u=class{constructor(e){t(this,e),this.tlOrderLoaded=r(this,"tlOrderLoaded"),this.tlError=r(this,"tlError"),this.showTickets=!0,this.columns=2,this.order=null,this.resolvedOrderId=null,this.loading=!1,this.error=null,this.paymentFailed=!1,this.occurrence=null,this.signedInCustomer=null}watchOrderId(t){this.resolvedOrderId=t||this.orderIdFromUrl(),this.load()}async componentWillLoad(){const t=this.urlParams(),r=t?.get("redirect_status");this.paymentFailed=!!r&&"succeeded"!==r,this.resolvedOrderId=this.orderId||this.orderIdFromUrl(),this.resolvedOrderId&&!this.paymentFailed&&await this.load()}componentDidLoad(){this.unsubscribe=s("checkout:completed",(t=>{const r=t;r?.id&&(this.paymentFailed=!1,this.order=r,this.resolvedOrderId=r.id,this.tlOrderLoaded.emit({order:r}),this.load())}))}disconnectedCallback(){this.unsubscribe?.()}urlParams(){return"undefined"!=typeof window&&window.location?.search?new URLSearchParams(window.location.search):null}orderIdFromUrl(){return this.urlParams()?.get("orderId")||null}async load(){const t=this.resolvedOrderId;if(t)try{this.loading=!this.order,this.error=null;const r=await i(),e=r.getOrdersManager?.();if(!e)throw new Error("Orders are not available");const s=await e.get(t);if(!s)throw new Error("Order not found");this.order=s,this.signedInCustomer=r.getAuthManager?.()?.customer??null,this.tlOrderLoaded.emit({order:s}),this.resolveEvent(r,s)}catch(t){console.error("[tl-order-confirmation] Failed to load order:",t),this.error=a(t,"Failed to load your order"),this.tlError.emit({message:this.error})}finally{this.loading=!1}}async resolveEvent(t,r){const e=r.tickets?.find((t=>t.eventOccurrenceId))?.eventOccurrenceId;if(e)try{const s=await o(t,e);s&&this.order?.id===r.id&&(this.occurrence=s)}catch{}}renderRows(t){const r=this.customerEmail||c(t,this.signedInCustomer),s=this.occurrence?.eventName||l(t),i=this.occurrence?.startsAt;return e("dl",{class:"rows"},e("div",{class:"row"},e("dt",null,"Order reference"),e("dd",{class:"reference"},t.orderNumber)),r&&e("div",{class:"row"},e("dt",null,"Email"),e("dd",null,r)),s&&e("div",{class:"row"},e("dt",null,"Event"),e("dd",null,s)),i&&e("div",{class:"row"},e("dt",null,"Date"),e("dd",null,n(i))))}renderTotals(t){const r=t.currency||"GBP",s=Number(t.totalFees)||0,i=Number(t.totalTax)||0,a=Number(t.totalDiscounts)||0;return e("div",{class:"totals"},e("div",{class:"total-row"},e("span",null,"Subtotal"),e("span",null,d(t.subtotal,r))),s>0&&e("div",{class:"total-row"},e("span",null,"Fees"),e("span",null,d(t.totalFees,r))),i>0&&e("div",{class:"total-row"},e("span",null,"Tax"),e("span",null,d(t.totalTax,r))),a>0&&e("div",{class:"total-row discount"},e("span",null,"Discount"),e("span",null,"-",d(t.totalDiscounts,r))),e("div",{class:"total-row total"},e("span",null,"Total"),e("span",null,d(t.total,r))))}render(){if(this.paymentFailed)return e("div",{class:"confirmation"},e("h1",{class:"title"},"Payment not completed"),e("p",{class:"lead"},"Your payment wasn't completed. Your cart is still saved, so you can try again."));if(!this.resolvedOrderId&&!this.order)return null;if(this.loading)return e("div",{class:"confirmation"},e("div",{class:"skeleton-line short"}),e("div",{class:"skeleton-line long"}),e("div",{class:"skeleton-block"}));const t=this.order,r=t?.id||this.resolvedOrderId;return e("div",{class:"confirmation"},e("div",{class:"check","aria-hidden":"true"},e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"}))),e("h1",{class:"title"},"You're going!"),e("p",{class:"lead"},t?.orderNumber?`Order ${t.orderNumber} is confirmed. Your tickets are on their way to your email.`:"Your order is confirmed. Your tickets are on their way to your email."),this.error&&!t&&e("p",{class:"error"},"We couldn't load your order details yet. ",this.error),t&&Array.isArray(t.items)&&e("div",{class:"summary"},this.renderRows(t),e("ul",{class:"lines"},h(t).map(((r,s)=>e("li",{class:"line",key:s},e("span",{class:"line-name"},r.quantity," x ",r.name),e("span",{class:"line-price"},d(r.subtotal,t.currency)))))),this.renderTotals(t)),this.showTickets&&t&&e("div",{class:"tickets"},e("h2",{class:"subtitle"},"Your tickets"),e("tl-order-tickets",{orderId:r,columns:this.columns}),e("p",{class:"hint"},"Show these QR codes at the door for entry. Use Download PDF on a ticket to save it.")))}static get watchers(){return{orderId:[{watchOrderId:0}]}}};u.style=":host{display:block;font-family:var(--tl-font-family, system-ui, sans-serif);color:var(--tl-foreground, #111827)}.confirmation{text-align:center}.check{width:4rem;height:4rem;margin:0 auto var(--tl-spacing-4, 1rem);display:flex;align-items:center;justify-content:center;border-radius:9999px;background:var(--tl-success, #10b981);color:var(--tl-success-foreground, #ffffff)}.check svg{width:2rem;height:2rem}.title{margin:0 0 var(--tl-spacing-2, 0.5rem);font-size:1.875rem;font-weight:700;line-height:1.2}.lead{margin:0 0 var(--tl-spacing-6, 1.5rem);color:var(--tl-muted-foreground, #6b7280)}.error{margin:0 0 var(--tl-spacing-6, 1.5rem);font-size:0.875rem;color:var(--tl-error, #ef4444)}.summary{text-align:left;padding:var(--tl-spacing-6, 1.5rem);margin-bottom:var(--tl-spacing-6, 1.5rem);background:var(--tl-muted, #f9fafb);border:1px solid var(--tl-border, #e5e7eb);border-radius:var(--tl-radius-lg, 0.75rem)}.rows{display:grid;gap:var(--tl-spacing-2, 0.5rem);margin:0 0 var(--tl-spacing-4, 1rem);padding:0 0 var(--tl-spacing-4, 1rem);border-bottom:1px solid var(--tl-border, #e5e7eb)}.row{display:flex;justify-content:space-between;gap:var(--tl-spacing-4, 1rem);font-size:0.875rem}.row dt{color:var(--tl-muted-foreground, #6b7280)}.row dd{margin:0;text-align:right;overflow-wrap:anywhere}.reference{font-family:var(--tl-font-family-mono, ui-monospace, monospace);font-weight:600}.lines{list-style:none;margin:0;padding:0;display:grid;gap:var(--tl-spacing-2, 0.5rem)}.line{display:flex;justify-content:space-between;gap:var(--tl-spacing-4, 1rem);font-size:0.875rem}.totals{margin-top:var(--tl-spacing-3, 0.75rem);padding-top:var(--tl-spacing-3, 0.75rem);border-top:1px solid var(--tl-border, #e5e7eb);display:grid;gap:var(--tl-spacing-1, 0.25rem);font-size:0.875rem}.total-row{display:flex;justify-content:space-between;color:var(--tl-muted-foreground, #6b7280)}.total-row.discount{color:var(--tl-success, #10b981)}.total-row.total{margin-top:var(--tl-spacing-1, 0.25rem);font-size:1rem;font-weight:600;color:var(--tl-foreground, #111827)}.tickets{text-align:left}.subtitle{margin:0 0 var(--tl-spacing-4, 1rem);font-size:1.125rem;font-weight:600}.hint{margin:var(--tl-spacing-3, 0.75rem) 0 0;font-size:0.75rem;color:var(--tl-muted-foreground, #6b7280)}.skeleton-line,.skeleton-block{background:var(--tl-secondary, #f3f4f6);border-radius:var(--tl-radius-md, 0.5rem);animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;margin:0 auto var(--tl-spacing-3, 0.75rem)}.skeleton-line{height:1rem}.skeleton-line.short{width:40%;height:1.75rem}.skeleton-line.long{width:70%}.skeleton-block{height:8rem}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}";export{u as tl_order_confirmation}
@@ -1 +0,0 @@
1
- import{r as t,h as n}from"./p-Ba-RZTFI.js";import{w as r}from"./p-CqhvfyKV.js";const e=class{constructor(n){t(this,n),this.columns=2,this.tickets=[],this.loading=!0,this.error=null,this.issuing=!1,this.poll=0}watchOrder(){this.reset(),this.load()}async componentWillLoad(){await this.load()}disconnectedCallback(){this.stopPolling()}reset(){this.stopPolling(),this.poll=0,this.tickets=[],this.issuing=!1}stopPolling(){void 0!==this.timer&&(clearTimeout(this.timer),this.timer=void 0)}async load(){try{this.error=null;const t=await r(),n=t.getOrdersManager?.();if(!n)throw new Error("Tickets are not available");const o=await n.get(this.orderId);if(this.tickets=o?.tickets??[],this.tickets.length>0)this.issuing=!1,this.stopPolling();else{const t=e.POLL_DELAYS_MS[this.poll];this.issuing=void 0!==t,void 0!==t&&(this.poll+=1,this.stopPolling(),this.timer=setTimeout((()=>this.load()),t))}}catch(t){this.stopPolling(),this.issuing=!1,this.error=t instanceof Error?t.message:"Failed to load tickets"}finally{this.loading=!1}}render(){return this.loading?n("div",{class:"state"},"Loading tickets…"):this.error?n("div",{class:"state error"},this.error):0===this.tickets.length?this.issuing?n("div",{class:"state issuing",role:"status","aria-live":"polite"},n("span",{class:"spinner","aria-hidden":"true"}),"Preparing your tickets…"):n("div",{class:"state",role:"status"},"Your tickets are taking longer than usual. They will be emailed to you as soon as they are ready."):n("div",{class:`grid cols-${this.columns}`},this.tickets.map((t=>n("tl-ticket",{key:t.id,ticket:t,orderId:this.orderId}))))}static get watchers(){return{orderId:[{watchOrder:0}]}}};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}e.POLL_DELAYS_MS=[1e3,1500,2e3,3e3,4e3,5e3,6e3,8e3,1e4,12e3],e.style=":host{display:block;font-family:var(--tl-font-family, system-ui, sans-serif)}.grid{display:grid;gap:var(--tl-spacing-4, 1rem);grid-template-columns:1fr}@media (min-width: 480px){.grid.cols-2{grid-template-columns:repeat(2, 1fr)}.grid.cols-3{grid-template-columns:repeat(3, 1fr)}}.state{padding:var(--tl-spacing-6, 1.5rem);text-align:center;color:var(--tl-muted-foreground, #6b7280);font-size:0.875rem}.state.error{color:var(--tl-error, #dc2626)}.state.issuing{display:flex;align-items:center;justify-content:center;gap:var(--tl-spacing-2, 0.5rem)}.spinner{width:0.875rem;height:0.875rem;border:2px solid var(--tl-border, #e5e7eb);border-top-color:var(--tl-primary, #6366f1);border-radius:50%;animation:tl-spin 0.7s linear infinite;flex:none}@keyframes tl-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spinner{animation:none;border-top-color:var(--tl-border, #e5e7eb)}}";var i,s,u={};function c(){return s?i:(s=1,i=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var a,f={},l={};function h(){if(a)return l;let t;a=1;const n=[0,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];return l.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},l.getSymbolTotalCodewords=function(t){return n[t]},l.getBCHDigit=function(t){let n=0;for(;0!==t;)n++,t>>>=1;return n},l.setToSJISFunction=function(n){if("function"!=typeof n)throw new Error('"toSJISFunc" is not a valid function.');t=n},l.isKanjiModeEnabled=function(){return void 0!==t},l.toSJIS=function(n){return t(n)},l}var d,w,m,p,g,v={};function y(){return d||(d=1,(t=v).L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(n,r){if(t.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}(n)}catch(t){return r}}),v;var t}var b,E,k,x,A={},M={},T={},R={};function P(){if(x)return R;x=1;const t=y(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return R.getBlocksCount=function(r,e){switch(e){case t.L:return n[4*(r-1)+0];case t.M:return n[4*(r-1)+1];case t.Q:return n[4*(r-1)+2];case t.H:return n[4*(r-1)+3];default:return}},R.getTotalCodewordsCount=function(n,e){switch(e){case t.L:return r[4*(n-1)+0];case t.M:return r[4*(n-1)+1];case t.Q:return r[4*(n-1)+2];case t.H:return r[4*(n-1)+3];default:return}},R}var I,U,F,C,N={},B={};var _,q={},L={},$={};function z(){return _||(_=1,$.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),$}var Q,j,S,O={};function Z(){if(Q)return O;Q=1;const t="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";O.KANJI=new RegExp(n,"g"),O.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),O.BYTE=new RegExp(r,"g"),O.NUMERIC=new RegExp(t,"g"),O.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const e=new RegExp("^"+n+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return O.testKanji=function(t){return e.test(t)},O.testNumeric=function(t){return o.test(t)},O.testAlphanumeric=function(t){return i.test(t)},O}function D(){return j||(j=1,function(t){const n=z(),r=Z();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,r){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?t.ccBits[0]:r<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(n){return r.testNumeric(n)?t.NUMERIC:r.testAlphanumeric(n)?t.ALPHANUMERIC:r.testKanji(n)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(n,r){if(t.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}(n)}catch(t){return r}}}(L)),L}var H,J,K,V,W,Y,G,X,tt,nt,rt,et,ot={},it={},st={exports:{}};function ut(){return nt||(nt=1,function(t){var n={single_source_shortest_paths:function(t,r,e){var o={},i={};i[r]=0;var s,u,c,a,f,l,h=n.PriorityQueue.make();for(h.push(r,0);!h.empty();)for(c in a=(s=h.pop()).cost,f=t[u=s.value]||{})f.hasOwnProperty(c)&&(l=a+f[c],(void 0===i[c]||i[c]>l)&&(i[c]=l,h.push(c,l),o[c]=u));if(void 0!==e&&void 0===i[e]){var d=["Could not find a path from ",r," to ",e,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,n){for(var r=[],e=n;e;)r.push(e),e=t[e];return r.reverse(),r},find_path:function(t,r,e){var o=n.single_source_shortest_paths(t,r,e);return n.extract_shortest_path_from_predecessor_list(o,e)},PriorityQueue:{make:function(t){var r,e=n.PriorityQueue,o={};for(r in t=t||{},e)e.hasOwnProperty(r)&&(o[r]=e[r]);return o.queue=[],o.sorter=t.sorter||e.default_sorter,o},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){this.queue.push({value:t,cost:n}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=n}(st)),st.exports}function ct(){if(et)return f;et=1;const t=h(),n=y(),r=function(){if(m)return w;function t(){this.buffer=[],this.length=0}return m=1,t.prototype={get:function(t){const n=Math.floor(t/8);return 1==(this.buffer[n]>>>7-t%8&1)},put:function(t,n){for(let r=0;r<n;r++)this.putBit(1==(t>>>n-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},w=t}(),e=function(){if(g)return p;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return g=1,t.prototype.set=function(t,n,r,e){const o=t*this.size+n;this.data[o]=r,e&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,n){return this.data[t*this.size+n]},t.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},t.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},p=t}(),o=(b||(b=1,function(t){const n=h().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const r=Math.floor(t/7)+2,e=n(t),o=145===e?26:2*Math.ceil((e-13)/(2*r-2)),i=[e-7];for(let t=1;t<r-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},t.getPositions=function(n){const r=[],e=t.getRowColCoords(n),o=e.length;for(let t=0;t<o;t++)for(let n=0;n<o;n++)0===t&&0===n||0===t&&n===o-1||t===o-1&&0===n||r.push([e[t],e[n]]);return r}}(A)),A),i=function(){if(E)return M;E=1;const t=h().getSymbolSize;return M.getPositions=function(n){const r=t(n);return[[0,0],[r-7,0],[0,r-7]]},M}(),s=(k||(k=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(n,r,e){switch(n){case t.Patterns.PATTERN000:return(r+e)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return e%3==0;case t.Patterns.PATTERN011:return(r+e)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(e/3))%2==0;case t.Patterns.PATTERN101:return r*e%2+r*e%3==0;case t.Patterns.PATTERN110:return(r*e%2+r*e%3)%2==0;case t.Patterns.PATTERN111:return(r*e%3+(r+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let r=0,e=0,o=0,i=null,s=null;for(let u=0;u<n;u++){e=o=0,i=s=null;for(let c=0;c<n;c++){let n=t.get(u,c);n===i?e++:(e>=5&&(r+=e-5+3),i=n,e=1),n=t.get(c,u),n===s?o++:(o>=5&&(r+=o-5+3),s=n,o=1)}e>=5&&(r+=e-5+3),o>=5&&(r+=o-5+3)}return r},t.getPenaltyN2=function(t){const n=t.size;let r=0;for(let e=0;e<n-1;e++)for(let o=0;o<n-1;o++){const n=t.get(e,o)+t.get(e,o+1)+t.get(e+1,o)+t.get(e+1,o+1);4!==n&&0!==n||r++}return 3*r},t.getPenaltyN3=function(t){const n=t.size;let r=0,e=0,o=0;for(let i=0;i<n;i++){e=o=0;for(let s=0;s<n;s++)e=e<<1&2047|t.get(i,s),s>=10&&(1488===e||93===e)&&r++,o=o<<1&2047|t.get(s,i),s>=10&&(1488===o||93===o)&&r++}return 40*r},t.getPenaltyN4=function(t){let n=0;const r=t.data.length;for(let e=0;e<r;e++)n+=t.data[e];return 10*Math.abs(Math.ceil(100*n/r/5)-10)},t.applyMask=function(t,r){const e=r.size;for(let o=0;o<e;o++)for(let i=0;i<e;i++)r.isReserved(i,o)||r.xor(i,o,n(t,i,o))},t.getBestMask=function(n,r){const e=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let s=0;s<e;s++){r(s),t.applyMask(s,n);const e=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(s,n),e<i&&(i=e,o=s)}return o}}(T)),T),u=P(),c=function(){if(C)return F;C=1;const t=(U||(U=1,function(t){const n=function(){if(I)return B;I=1;const t=new Uint8Array(512),n=new Uint8Array(256);return function(){let r=1;for(let e=0;e<255;e++)t[e]=r,n[r]=e,r<<=1,256&r&&(r^=285);for(let n=255;n<512;n++)t[n]=t[n-255]}(),B.log=function(t){if(t<1)throw new Error("log("+t+")");return n[t]},B.exp=function(n){return t[n]},B.mul=function(r,e){return 0===r||0===e?0:t[n[r]+n[e]]},B}();t.mul=function(t,r){const e=new Uint8Array(t.length+r.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<r.length;i++)e[o+i]^=n.mul(t[o],r[i]);return e},t.mod=function(t,r){let e=new Uint8Array(t);for(;e.length-r.length>=0;){const t=e[0];for(let o=0;o<r.length;o++)e[o]^=n.mul(r[o],t);let o=0;for(;o<e.length&&0===e[o];)o++;e=e.slice(o)}return e},t.generateECPolynomial=function(r){let e=new Uint8Array([1]);for(let o=0;o<r;o++)e=t.mul(e,new Uint8Array([1,n.exp(o)]));return e}}(N)),N);function n(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return n.prototype.initialize=function(n){this.degree=n,this.genPoly=t.generateECPolynomial(this.degree)},n.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(n.length+this.degree);r.set(n);const e=t.mod(r,this.genPoly),o=this.degree-e.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(e,o),t}return e},F=n}(),a=(S||(S=1,function(t){const n=h(),r=P(),e=y(),o=D(),i=z(),s=n.getBCHDigit(7973);function u(t,n){return o.getCharCountIndicator(t,n)+4}function c(t,n){let r=0;return t.forEach((function(t){const e=u(t.mode,n);r+=e+t.getBitsLength()})),r}t.from=function(t,n){return i.isValid(t)?parseInt(t,10):n},t.getCapacity=function(t,e,s){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=o.BYTE);const c=8*(n.getSymbolTotalCodewords(t)-r.getTotalCodewordsCount(t,e));if(s===o.MIXED)return c;const a=c-u(s,t);switch(s){case o.NUMERIC:return Math.floor(a/10*3);case o.ALPHANUMERIC:return Math.floor(a/11*2);case o.KANJI:return Math.floor(a/13);default:return Math.floor(a/8)}},t.getBestVersionForData=function(n,r){let i;const s=e.from(r,e.M);if(Array.isArray(n)){if(n.length>1)return function(n,r){for(let e=1;e<=40;e++)if(c(n,e)<=t.getCapacity(e,r,o.MIXED))return e}(n,s);if(0===n.length)return 1;i=n[0]}else i=n;return function(n,r,e){for(let o=1;o<=40;o++)if(r<=t.getCapacity(o,e,n))return o}(i.mode,i.getLength(),s)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let r=t<<12;for(;n.getBCHDigit(r)-s>=0;)r^=7973<<n.getBCHDigit(r)-s;return t<<12|r}}(q)),q),l=function(){if(H)return ot;H=1;const t=h(),n=t.getBCHDigit(1335);return ot.getEncodedBits=function(r,e){const o=r.bit<<3|e;let i=o<<10;for(;t.getBCHDigit(i)-n>=0;)i^=1335<<t.getBCHDigit(i)-n;return 21522^(o<<10|i)},ot}(),d=D(),v=(rt||(rt=1,function(t){const n=D(),r=function(){if(K)return J;K=1;const t=D();function n(n){this.mode=t.NUMERIC,this.data=n.toString()}return n.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n,r,e;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),e=parseInt(r,10),t.put(e,10);const o=this.data.length-n;o>0&&(r=this.data.substr(n),e=parseInt(r,10),t.put(e,3*o+1))},J=n}(),e=function(){if(W)return V;W=1;const t=D(),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(n){this.mode=t.ALPHANUMERIC,this.data=n}return r.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let e=45*n.indexOf(this.data[r]);e+=n.indexOf(this.data[r+1]),t.put(e,11)}this.data.length%2&&t.put(n.indexOf(this.data[r]),6)},V=r}(),o=function(){if(G)return Y;G=1;const t=D();function n(n){this.mode=t.BYTE,this.data="string"==typeof n?(new TextEncoder).encode(n):new Uint8Array(n)}return n.getBitsLength=function(t){return 8*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){for(let n=0,r=this.data.length;n<r;n++)t.put(this.data[n],8)},Y=n}(),i=function(){if(tt)return X;tt=1;const t=D(),n=h();function r(n){this.mode=t.KANJI,this.data=n}return r.getBitsLength=function(t){return 13*t},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let r;for(r=0;r<this.data.length;r++){let e=n.toSJIS(this.data[r]);if(e>=33088&&e<=40956)e-=33088;else{if(!(e>=57408&&e<=60351))throw new Error("Invalid SJIS character: "+this.data[r]+"\nMake sure your charset is UTF-8");e-=49472}e=192*(e>>>8&255)+(255&e),t.put(e,13)}},X=r}(),s=Z(),u=h(),c=ut();function a(t){return unescape(encodeURIComponent(t)).length}function f(t,n,r){const e=[];let o;for(;null!==(o=t.exec(r));)e.push({data:o[0],index:o.index,mode:n,length:o[0].length});return e}function l(t){const r=f(s.NUMERIC,n.NUMERIC,t),e=f(s.ALPHANUMERIC,n.ALPHANUMERIC,t);let o,i;return u.isKanjiModeEnabled()?(o=f(s.BYTE,n.BYTE,t),i=f(s.KANJI,n.KANJI,t)):(o=f(s.BYTE_KANJI,n.BYTE,t),i=[]),r.concat(e,o,i).sort((function(t,n){return t.index-n.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,s){switch(s){case n.NUMERIC:return r.getBitsLength(t);case n.ALPHANUMERIC:return e.getBitsLength(t);case n.KANJI:return i.getBitsLength(t);case n.BYTE:return o.getBitsLength(t)}}function w(t,s){let c;const a=n.getBestModeForData(t);if(c=n.from(s,a),c!==n.BYTE&&c.bit<a.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(c)+".\n Suggested mode is: "+n.toString(a));switch(c!==n.KANJI||u.isKanjiModeEnabled()||(c=n.BYTE),c){case n.NUMERIC:return new r(t);case n.ALPHANUMERIC:return new e(t);case n.KANJI:return new i(t);case n.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce((function(t,n){return"string"==typeof n?t.push(w(n,null)):n.data&&t.push(w(n.data,n.mode)),t}),[])},t.fromString=function(r,e){const o=function(t,r){const e={},o={start:{}};let i=["start"];for(let s=0;s<t.length;s++){const u=t[s],c=[];for(let t=0;t<u.length;t++){const a=u[t],f=""+s+t;c.push(f),e[f]={node:a,lastCount:0},o[f]={};for(let t=0;t<i.length;t++){const s=i[t];e[s]&&e[s].node.mode===a.mode?(o[s][f]=d(e[s].lastCount+a.length,a.mode)-d(e[s].lastCount,a.mode),e[s].lastCount+=a.length):(e[s]&&(e[s].lastCount=a.length),o[s][f]=d(a.length,a.mode)+4+n.getCharCountIndicator(a.mode,r))}}i=c}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:e}}(function(t){const r=[];for(let e=0;e<t.length;e++){const o=t[e];switch(o.mode){case n.NUMERIC:r.push([o,{data:o.data,mode:n.ALPHANUMERIC,length:o.length},{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.ALPHANUMERIC:r.push([o,{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.KANJI:r.push([o,{data:o.data,mode:n.BYTE,length:a(o.data)}]);break;case n.BYTE:r.push([{data:o.data,mode:n.BYTE,length:a(o.data)}])}}return r}(l(r,u.isKanjiModeEnabled())),e),i=c.find_path(o.map,"start","end"),s=[];for(let t=1;t<i.length-1;t++)s.push(o.table[i[t]].node);return t.fromArray(s.reduce((function(t,n){const r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)}),[]))},t.rawSplit=function(n){return t.fromArray(l(n,u.isKanjiModeEnabled()))}}(it)),it);function x(t,n,r){const e=t.size,o=l.getEncodedBits(n,r);let i,s;for(i=0;i<15;i++)s=1==(o>>i&1),t.set(i<6?i:i<8?i+1:e-15+i,8,s,!0),t.set(8,i<8?e-i-1:i<9?15-i-1+1:15-i-1,s,!0);t.set(e-8,8,1,!0)}function R(n,f,l,h){let w;if(Array.isArray(n))w=v.fromArray(n);else{if("string"!=typeof n)throw new Error("Invalid data");{let t=f;if(!t){const r=v.rawSplit(n);t=a.getBestVersionForData(r,l)}w=v.fromString(n,t||40)}}const m=a.getBestVersionForData(w,l);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(f){if(f<m)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else f=m;const p=function(n,e,o){const i=new r;o.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),d.getCharCountIndicator(t.mode,n)),t.write(i)}));const s=8*(t.getSymbolTotalCodewords(n)-u.getTotalCodewordsCount(n,e));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const a=(s-i.getLengthInBits())/8;for(let t=0;t<a;t++)i.put(t%2?17:236,8);return function(n,r,e){const o=t.getSymbolTotalCodewords(r),i=o-u.getTotalCodewordsCount(r,e),s=u.getBlocksCount(r,e),a=s-o%s,f=Math.floor(o/s),l=Math.floor(i/s),h=l+1,d=f-l,w=new c(d);let m=0;const p=new Array(s),g=new Array(s);let v=0;const y=new Uint8Array(n.buffer);for(let t=0;t<s;t++){const n=t<a?l:h;p[t]=y.slice(m,m+n),g[t]=w.encode(p[t]),m+=n,v=Math.max(v,n)}const b=new Uint8Array(o);let E,k,x=0;for(E=0;E<v;E++)for(k=0;k<s;k++)E<p[k].length&&(b[x++]=p[k][E]);for(E=0;E<d;E++)for(k=0;k<s;k++)b[x++]=g[k][E];return b}(i,n,e)}(f,l,w),g=t.getSymbolSize(f),y=new e(g);return function(t,n){const r=t.size,e=i.getPositions(n);for(let n=0;n<e.length;n++){const o=e[n][0],i=e[n][1];for(let n=-1;n<=7;n++)if(!(o+n<=-1||r<=o+n))for(let e=-1;e<=7;e++)i+e<=-1||r<=i+e||t.set(o+n,i+e,n>=0&&n<=6&&(0===e||6===e)||e>=0&&e<=6&&(0===n||6===n)||n>=2&&n<=4&&e>=2&&e<=4,!0)}}(y,f),function(t){const n=t.size;for(let r=8;r<n-8;r++){const n=r%2==0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(y),function(t,n){const r=o.getPositions(n);for(let n=0;n<r.length;n++){const e=r[n][0],o=r[n][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)t.set(e+n,o+r,-2===n||2===n||-2===r||2===r||0===n&&0===r,!0)}}(y,f),x(y,l,0),f>=7&&function(t,n){const r=t.size,e=a.getEncodedBits(n);let o,i,s;for(let n=0;n<18;n++)o=Math.floor(n/3),i=n%3+r-8-3,s=1==(e>>n&1),t.set(o,i,s,!0),t.set(i,o,s,!0)}(y,f),function(t,n){const r=t.size;let e=-1,o=r-1,i=7,s=0;for(let u=r-1;u>0;u-=2)for(6===u&&u--;;){for(let r=0;r<2;r++)if(!t.isReserved(o,u-r)){let e=!1;s<n.length&&(e=1==(n[s]>>>i&1)),t.set(o,u-r,e),i--,-1===i&&(s++,i=7)}if(o+=e,o<0||r<=o){o-=e,e=-e;break}}}(y,p),isNaN(h)&&(h=s.getBestMask(y,x.bind(null,y,l))),s.applyMask(h,y),x(y,l,h),{modules:y,version:f,errorCorrectionLevel:l,maskPattern:h,segments:w}}return f.create=function(r,e){if(void 0===r||""===r)throw new Error("No input text");let o,i,u=n.M;return void 0!==e&&(u=n.from(e.errorCorrectionLevel,n.M),o=a.from(e.version),i=s.from(e.maskPattern),e.toSJISFunc&&t.setToSJISFunction(e.toSJISFunc)),R(r,o,u,i)},f}var at,ft,lt={},ht={};function dt(){return at||(at=1,function(t){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||5===n.length||n.length>8)throw new Error("Invalid hex color: "+t);3!==n.length&&4!==n.length||(n=Array.prototype.concat.apply([],n.map((function(t){return[t,t]})))),6===n.length&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const r=t.width&&t.width>=21?t.width:void 0;return{width:r,scale:r?4:t.scale||4,margin:null==t.margin||t.margin<0?4:t.margin,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,n){return n.width&&n.width>=t+2*n.margin?n.width/(t+2*n.margin):n.scale},t.getImageWidth=function(n,r){const e=t.getScale(n,r);return Math.floor((n+2*r.margin)*e)},t.qrToImageData=function(n,r,e){const o=r.modules.size,i=r.modules.data,s=t.getScale(o,e),u=Math.floor((o+2*e.margin)*s),c=e.margin*s,a=[e.color.light,e.color.dark];for(let t=0;t<u;t++)for(let r=0;r<u;r++){let f=4*(t*u+r),l=e.color.light;t>=c&&r>=c&&t<u-c&&r<u-c&&(l=a[i[Math.floor((t-c)/s)*o+Math.floor((r-c)/s)]?1:0]),n[f++]=l.r,n[f++]=l.g,n[f++]=l.b,n[f]=l.a}}}(ht)),ht}var wt,mt,pt={};var gt=function(){if(mt)return u;mt=1;const t=c(),n=ct(),r=(ft||(ft=1,function(t){const n=dt();t.render=function(t,r,e){let o=e,i=r;void 0!==o||r&&r.getContext||(o=r,r=void 0),r||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=n.getOptions(o);const s=n.getImageWidth(t.modules.size,o),u=i.getContext("2d"),c=u.createImageData(s,s);return n.qrToImageData(c.data,t,o),function(t,n,r){t.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=r,n.width=r,n.style.height=r+"px",n.style.width=r+"px"}(u,i,s),u.putImageData(c,0,0),i},t.renderToDataURL=function(n,r,e){let o=e;return void 0!==o||r&&r.getContext||(o=r,r=void 0),o||(o={}),t.render(n,r,o).toDataURL(o.type||"image/png",(o.rendererOpts||{}).quality)}}(lt)),lt),e=function(){if(wt)return pt;wt=1;const t=dt();function n(t,n){const r=t.a/255,e=n+'="'+t.hex+'"';return r<1?e+" "+n+'-opacity="'+r.toFixed(2).slice(1)+'"':e}function r(t,n,r){let e=t+n;return void 0!==r&&(e+=" "+r),e}return pt.render=function(e,o,i){const s=t.getOptions(o),u=e.modules.size,c=e.modules.data,a=u+2*s.margin,f=s.color.light.a?"<path "+n(s.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",l="<path "+n(s.color.dark,"stroke")+' d="'+function(t,n,e){let o="",i=0,s=!1,u=0;for(let c=0;c<t.length;c++){const a=Math.floor(c%n),f=Math.floor(c/n);a||s||(s=!0),t[c]?(u++,c>0&&a>0&&t[c-1]||(o+=s?r("M",a+e,.5+f+e):r("m",i,0),i=0,s=!1),a+1<n&&t[c+1]||(o+=r("h",u),u=0)):i++}return o}(c,u,s.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+'viewBox="0 0 '+a+" "+a+'" shape-rendering="crispEdges">'+f+l+"</svg>\n";return"function"==typeof i&&i(null,h),h},pt}();function o(r,e,o,i,s){const u=[].slice.call(arguments,1),c=u.length,a="function"==typeof u[c-1];if(!a&&!t())throw new Error("Callback required as last argument");if(!a){if(c<1)throw new Error("Too few arguments provided");return 1===c?(o=e,e=i=void 0):2!==c||e.getContext||(i=o,o=e,e=void 0),new Promise((function(t,s){try{const s=n.create(o,i);t(r(s,e,i))}catch(t){s(t)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(s=o,o=e,e=i=void 0):3===c&&(e.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=o,o=e,e=void 0));try{const t=n.create(o,i);s(null,r(t,e,i))}catch(t){s(t)}}return u.create=n.create,u.toCanvas=o.bind(null,r.render),u.toDataURL=o.bind(null,r.renderToDataURL),u.toString=o.bind(null,(function(t,n,r){return e.render(t,r)})),u}(),vt=o(gt);const yt=class{constructor(n){t(this,n),this.qrSvg="",this.downloading=!1}async generateQr(){this.ticket?.barcode&&(this.qrSvg=await vt.toString(this.ticket.barcode,{type:"svg",margin:0,errorCorrectionLevel:"M"}))}async componentWillLoad(){await this.generateQr()}async download(){try{this.downloading=!0;const t=await r(),n=t.getOrdersManager?.();if(!n)throw new Error("Ticket downloads are not available");const e=await n.ticketPdf(this.orderId,this.ticket.id),o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=`ticket-${this.ticket.id}.pdf`,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(o)}catch(t){console.error("[tl-ticket] download failed",t)}finally{this.downloading=!1}}render(){const t=this.ticket;if(!t)return null;const r="fully_redeemed"===t.admissionStatus,e=["cancelled","expired"].includes(t.status),o=r||e;return n("div",{class:"ticket"},n("div",{class:"qr-wrap"},n("div",{class:{qr:!0,inactive:o},innerHTML:this.qrSvg}),o&&n("span",{class:"stamp"},r?"Used":"Void")),n("p",{class:"name"},t.name),t.seatLabel&&n("p",{class:"meta"},"Seat ",t.seatLabel),t.holderName&&n("p",{class:"meta"},t.holderName),n("p",{class:"barcode"},t.barcode),n("button",{class:"download",disabled:this.downloading,onClick:()=>this.download()},this.downloading?"Preparing…":"Download PDF"))}static get watchers(){return{ticket:[{generateQr:0}]}}};yt.style=":host{display:block;font-family:var(--tl-font-family, system-ui, sans-serif)}.ticket{border:1px solid var(--tl-border, #e5e7eb);border-radius:var(--tl-radius-lg, 0.75rem);background:var(--tl-card, #ffffff);padding:var(--tl-spacing-5, 1.25rem);text-align:center}.qr-wrap{position:relative;width:160px;height:160px;margin:0 auto}.qr{width:160px;height:160px}.qr svg{width:100%;height:100%;display:block}.qr.inactive{opacity:0.3}.stamp{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);padding:0.25rem 0.5rem;border-radius:var(--tl-radius-sm, 0.25rem);background:rgba(17, 24, 39, 0.85);color:#ffffff;font-size:0.7rem;font-weight:700;text-transform:uppercase;letter-spacing:0.05em}.name{margin:1rem 0 0;font-weight:600;color:var(--tl-foreground, #111827)}.meta{margin:0.125rem 0 0;font-size:0.875rem;color:var(--tl-muted-foreground, #6b7280)}.barcode{margin:0.25rem 0 0;font-family:ui-monospace, monospace;font-size:0.625rem;color:var(--tl-muted-foreground, #9ca3af);word-break:break-all}.download{margin-top:0.75rem;padding:0.375rem 0.75rem;border:1px solid var(--tl-border, #e5e7eb);border-radius:var(--tl-radius-md, 0.5rem);background:transparent;color:var(--tl-foreground, #111827);font-size:0.875rem;font-weight:500;cursor:pointer}.download:hover{background:var(--tl-muted, #f3f4f6)}.download:disabled{opacity:0.5;cursor:default}";export{e as tl_order_tickets,yt as tl_ticket}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as r}from"./p-Ba-RZTFI.js";import{w as a}from"./p-CqhvfyKV.js";import{e as i}from"./p-BGekdjN9.js";const s=class{constructor(r){t(this,r),this.tlClick=e(this,"tlClick"),this.tlError=e(this,"tlError"),this.loadedEvent=null,this.loading=!1,this.error=null,this.handleClick=()=>{const t=this.current;t&&(console.log("[tl-event-card] Clicked:",t.id),this.tlClick.emit({eventId:t.id}))}}watchEventId(){this.loadEvent()}async componentWillLoad(){!this.event&&this.eventId&&await this.loadEvent()}async loadEvent(){if(!this.event&&this.eventId)try{this.loading=!0,this.error=null;const t=await a(),e=await t.getEventsManager().get(this.eventId);if(!e)throw new Error("Event not found");this.loadedEvent=function(t){const e=t.occurrences??[],r=e.map((t=>t.startsAt)).filter((t=>!!t)).sort(),a=Date.now(),i=r.find((t=>new Date(t).getTime()>=a))??r[0],s="sold_out"===t.status||e.length>0&&e.every((t=>"sold_out"===t.status));return{id:t.id,name:t.name,...t.shortDescription?{shortDescription:t.shortDescription}:{},...t.imageUrl?{imageUrl:t.imageUrl}:{},...t.venueName?{venue:{id:t.venueId??"",name:t.venueName,city:t.venueCity??""}}:{},...i?{nextOccurrence:{startsAt:i}}:{},availabilityStatus:s?"sold_out":"available"}}(e)}catch(t){console.error("[tl-event-card] Failed to load event:",t),this.error=i(t,"Failed to load event"),this.tlError.emit({message:this.error})}finally{this.loading=!1}}get current(){return this.event??this.loadedEvent}formatDate(t){return new Date(t).toLocaleDateString("en-GB",{weekday:"short",day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})}getStatusBadgeClass(){const t="status-badge";switch(this.current?.availabilityStatus){case"available":return`${t} status-available`;case"limited":return`${t} status-limited`;case"sold_out":return`${t} status-sold-out`;default:return t}}getStatusLabel(){switch(this.current?.availabilityStatus){case"available":return"Available";case"limited":return"Limited";case"sold_out":return"Sold Out";default:return""}}render(){if(this.loading)return r("div",{class:"event-card card-skeleton","aria-busy":"true"},r("div",{class:"image-container"}),r("div",{class:"content"},r("div",{class:"skeleton-line short"}),r("div",{class:"skeleton-line long"})));if(this.error)return r("div",{class:"event-card card-error"},this.error);const t=this.current;if(!t)return null;const e=t.thumbnailUrl||t.imageUrl;return r("div",{class:"event-card",onClick:this.handleClick},r("div",{class:"image-container"},e?r("img",{src:e,alt:t.name,class:"event-image"}):r("div",{class:"image-placeholder"},r("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"}))),r("div",{class:"status-container"},r("span",{class:this.getStatusBadgeClass()},this.getStatusLabel()))),r("div",{class:"content"},t.category&&r("span",{class:"category"},t.category),r("h3",{class:"title"},t.name),t.nextOccurrence&&r("p",{class:"meta"},r("svg",{class:"icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})),this.formatDate(t.nextOccurrence.startsAt)),t.venue&&r("p",{class:"meta"},r("svg",{class:"icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})),t.venue.name,", ",t.venue.city),t.shortDescription&&r("p",{class:"description"},t.shortDescription)))}static get watchers(){return{eventId:[{watchEventId:0}]}}};s.style=":host{display:block;font-family:var(--tl-font-family, system-ui, sans-serif)}.event-card{background:var(--tl-secondary, #f3f4f6);border-radius:var(--tl-radius-lg, 0.75rem);overflow:hidden;box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);cursor:pointer;transition:box-shadow 0.2s ease, transform 0.2s ease}.event-card:hover{box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);transform:translateY(-2px)}.image-container{position:relative;aspect-ratio:16 / 9;overflow:hidden;background:var(--tl-muted, #f9fafb)}.event-image{width:100%;height:100%;object-fit:cover;transition:transform 0.3s ease}.event-card:hover .event-image{transform:scale(1.05)}.image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--tl-muted-foreground, #6b7280)}.status-container{position:absolute;top:0.5rem;right:0.5rem}.status-badge{display:inline-block;padding:0.25rem 0.5rem;font-size:0.75rem;font-weight:500;border-radius:var(--tl-radius-sm, 0.25rem)}.status-available{background:var(--tl-success, #10b981);color:var(--tl-success-foreground, #ffffff)}.status-limited{background:var(--tl-warning, #f59e0b);color:var(--tl-warning-foreground, #ffffff)}.status-sold-out{background:var(--tl-error, #ef4444);color:var(--tl-error-foreground, #ffffff)}.content{padding:var(--tl-spacing-4, 1rem)}.category{display:inline-block;font-size:0.75rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em;color:var(--tl-primary, #6366f1)}.title{margin:0.25rem 0 0;font-size:1.125rem;font-weight:600;color:var(--tl-foreground, #111827);line-height:1.3}.event-card:hover .title{color:var(--tl-primary, #6366f1)}.meta{display:flex;align-items:center;gap:0.5rem;margin:0.5rem 0 0;font-size:0.875rem;color:var(--tl-muted-foreground, #6b7280)}.meta:first-of-type{margin-top:0.75rem}.icon{width:1rem;height:1rem;flex-shrink:0}.description{margin:0.75rem 0 0;font-size:0.875rem;color:var(--tl-muted-foreground, #6b7280);line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-skeleton{cursor:default;pointer-events:none}.card-skeleton .image-container{animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite}.skeleton-line{height:0.875rem;margin-top:0.5rem;background:var(--tl-muted, #f9fafb);border-radius:var(--tl-radius-sm, 0.25rem);animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite}.skeleton-line.short{width:40%}.skeleton-line.long{width:80%}.card-error{padding:var(--tl-spacing-4, 1rem);font-size:0.875rem;color:var(--tl-error, #ef4444);cursor:default}.card-error:hover{transform:none}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}";export{s as tl_event_card}