@session-services/web-elements 0.1.30 → 0.1.32
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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/session-services-elements.cjs.js +1 -1
- package/dist/cjs/session-services-ticketing.cjs.entry.js +1645 -22994
- package/dist/collection/components/session-services-ticketing/bot-detection.js +83 -0
- package/dist/collection/components/session-services-ticketing/bot-detection.test.js +74 -0
- package/dist/collection/components/session-services-ticketing/session-services-ticketing.css +164 -36
- package/dist/collection/components/session-services-ticketing/session-services-ticketing.js +697 -219
- package/dist/collection/components/session-services-ticketing/session-services-ticketing.logic.js +25 -4
- package/dist/collection/components/session-services-ticketing/session-services-ticketing.logic.test.js +19 -2
- package/dist/collection/components/session-services-ticketing/session-services-ticketing.test.js +540 -19
- package/dist/components/session-services-ticketing.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/session-services-elements.js +1 -1
- package/dist/esm/session-services-ticketing.entry.js +1645 -22994
- package/dist/session-services-elements/p-7a1b9685.entry.js +1 -0
- package/dist/session-services-elements/session-services-elements.esm.js +1 -1
- package/dist/types/components/session-services-ticketing/bot-detection.d.ts +13 -0
- package/dist/types/components/session-services-ticketing/bot-detection.test.d.ts +1 -0
- package/dist/types/components/session-services-ticketing/session-services-ticketing.d.ts +52 -5
- package/dist/types/components/session-services-ticketing/session-services-ticketing.logic.d.ts +8 -1
- package/package.json +2 -2
- package/dist/session-services-elements/p-4dd3f723.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as n,c as r,h as i,a as o}from"./index.js";function a(e){return Array.isArray(e)?e:null==e?[]:[e]}const s="orpc";var d=class extends Error{constructor(...e){super(...e),this.name="AbortError"}};function c(e){let t;return()=>{if(t)return t.result;let n=e();return t={result:n},n}}function u(){return globalThis["__@orpc/shared@1.14.5/otel/config__"]}function l(e,t={},n){return(u()?.tracer)?.startSpan(e,t,n)}function p(e,t,n={}){if(!e)return;let r=function(e){if(e instanceof Error){let t={message:e.message,name:e.name,stack:e.stack};return"code"in e&&("string"==typeof e.code||"number"==typeof e.code)&&(t.code=e.code),t}return{message:e+""}}(t);e.recordException(r),(!n.signal?.aborted||n.signal.reason!==t)&&e.setStatus({code:2,message:r.message})}async function m({name:e,context:t,...n},r){let i=u()?.tracer;if(!i)return r();let o=async e=>{try{return await r(e)}catch(t){throw p(e,t,n),t}finally{e.end()}};return t?i.startActiveSpan(e,n,t,o):i.startActiveSpan(e,n,o)}async function f(e,t){let n=u();if(!e||!n)return t();let r=n.trace.setSpan(n.context.active(),e);return n.context.with(r,t)}function h(e){return!(!e||"object"!=typeof e)&&"next"in e&&"function"==typeof e.next&&Symbol.asyncIterator in e&&"function"==typeof e[Symbol.asyncIterator]}const v=Symbol.asyncDispose??Symbol.for("asyncDispose");var g=class{#e=!1;#t=!1;#n;#r;constructor(e,t){this.#n=t,this.#r=function(e){let t=Promise.resolve();return(...n)=>t=t.catch((()=>{})).then((()=>e(...n)))}((async()=>{if(this.#e)return{done:!0,value:void 0};try{let t=await e();return t.done&&(this.#e=!0),t}catch(e){throw this.#e=!0,e}finally{this.#e&&!this.#t&&(this.#t=!0,await this.#n("next"))}}))}next(){return this.#r()}async return(e){return this.#e=!0,this.#t||(this.#t=!0,await this.#n("return")),{done:!0,value:e}}async throw(e){throw this.#e=!0,this.#t||(this.#t=!0,await this.#n("throw")),e}async[v](){this.#e=!0,this.#t||(this.#t=!0,await this.#n("dispose"))}[Symbol.asyncIterator](){return this}};function y({name:e,...t},n){let r;return new g((async()=>{r??=l(e);try{let e=await f(r,(()=>n.next()));return r?.addEvent(e.done?"completed":"yielded"),e}catch(e){throw p(r,e,t),e}}),(async e=>{try{"next"!==e&&await f(r,(()=>n.return?.()))}catch(e){throw p(r,e,t),e}finally{r?.end()}}))}function b(e,t,n){let r=(t,i)=>{let o=e[i];return o?o({...t,next:(e=t)=>r(e,i+1)}):n(t)};return r(t,0)}function w(e){if(e)return JSON.parse(e)}function $(e){return JSON.stringify(e)}function I(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||!t||!t.constructor}function k(e){return!!e&&("object"==typeof e||"function"==typeof e)}function E(e,t){let n=e;for(let e of t){if(!k(n))return;n=n[e]}return n}const x=(()=>{let e=function(){};return Object.freeze(e.prototype=Object.create(null)),e})();function A(e,...t){return"function"==typeof e?e(...t):e}function T(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return"then"!==t||"function"!=typeof r?r:new Proxy(r,{apply(t,n,r){if(2!==r.length||r.some((e=>!function(e){return"function"==typeof e&&O.test(""+e)}(e))))return Reflect.apply(t,n,r);let i=!0;r[0].call(n,T(new Proxy(e,{get:(e,t,n)=>{if(!i||"then"!==t)return Reflect.get(e,t,n);i=!1}})))}})}})}const O=/^\s*function\s*\(\)\s*\{\s*\[native code\]\s*\}\s*$/,_={BAD_REQUEST:{status:400,message:"Bad Request"},UNAUTHORIZED:{status:401,message:"Unauthorized"},FORBIDDEN:{status:403,message:"Forbidden"},NOT_FOUND:{status:404,message:"Not Found"},METHOD_NOT_SUPPORTED:{status:405,message:"Method Not Supported"},NOT_ACCEPTABLE:{status:406,message:"Not Acceptable"},TIMEOUT:{status:408,message:"Request Timeout"},CONFLICT:{status:409,message:"Conflict"},PRECONDITION_FAILED:{status:412,message:"Precondition Failed"},PAYLOAD_TOO_LARGE:{status:413,message:"Payload Too Large"},UNSUPPORTED_MEDIA_TYPE:{status:415,message:"Unsupported Media Type"},UNPROCESSABLE_CONTENT:{status:422,message:"Unprocessable Content"},TOO_MANY_REQUESTS:{status:429,message:"Too Many Requests"},CLIENT_CLOSED_REQUEST:{status:499,message:"Client Closed Request"},INTERNAL_SERVER_ERROR:{status:500,message:"Internal Server Error"},NOT_IMPLEMENTED:{status:501,message:"Not Implemented"},BAD_GATEWAY:{status:502,message:"Bad Gateway"},SERVICE_UNAVAILABLE:{status:503,message:"Service Unavailable"},GATEWAY_TIMEOUT:{status:504,message:"Gateway Timeout"}};let D;var S=class e extends Error{defined;code;status;data;static{let t=Symbol.for("__@orpc/client@1.14.5/error/ORPC_ERROR_CONSTRUCTORS__");globalThis[t]??=new WeakSet,D=globalThis[t],D.add(e)}constructor(e,...t){let n=function(e){return e[0]??{}}(t);if(void 0!==n.status&&!P(n.status))throw Error("[ORPCError] Invalid error status code.");let r=function(e,t){return t||_[e]?.message||e}(e,n.message);super(r,n),this.code=e,this.status=function(e,t){return t??_[e]?.status??500}(e,n.status),this.defined=n.defined??!1,this.data=n.data}toJSON(){return{defined:this.defined,code:this.code,status:this.status,message:this.message,data:this.data}}static[Symbol.hasInstance](e){if(D.has(this)){let t=function(e){return k(e)?Object.getPrototypeOf(e)?.constructor:null}(e);if(t&&D.has(t))return!0}return super[Symbol.hasInstance](e)}};function M(e){return e instanceof S?e:new S("INTERNAL_SERVER_ERROR",{message:"Internal server error",cause:e})}function P(e){return e<200||e>=400}function C(e){if(!I(e))return!1;let t=["defined","code","status","message","data"];return!Object.keys(e).some((e=>!t.includes(e)))&&"defined"in e&&"boolean"==typeof e.defined&&"code"in e&&"string"==typeof e.code&&"status"in e&&"number"==typeof e.status&&P(e.status)&&"message"in e&&"string"==typeof e.message}function j(e,t={}){return new S(e.code,{...t,...e})}var N=class extends TypeError{},R=class extends TypeError{},U=class extends Error{data;constructor(e){super(e?.message??"An error event was received",e),this.data=e?.data}};function L(e){let t=e.replace(/\n+$/,"").split(/\n/),n={data:void 0,event:void 0,id:void 0,retry:void 0,comments:[]};for(let e of t){let t=e.indexOf(":"),r=-1===t?e:e.slice(0,t),i=-1===t?"":e.slice(t+1).replace(/^\s/,"");if(0===t)n.comments.push(i);else if("data"===r)n.data??="",n.data+=i+"\n";else if("event"===r)n.event=i;else if("id"===r)n.id=i;else if("retry"===r){let e=Number.parseInt(i);Number.isInteger(e)&&e>=0&&""+e===i&&(n.retry=e)}}return n.data=n.data?.replace(/\n$/,""),n}var q=class{constructor(e={}){this.options=e}incomplete="";feed(e){this.incomplete+=e;let t=this.incomplete.lastIndexOf("\n\n");if(-1===t)return;let n=this.incomplete.slice(0,t).split(/\n\n/);this.incomplete=this.incomplete.slice(t+2);for(let e of n){let t=L(e+"\n\n");this.options.onEvent&&this.options.onEvent(t)}}end(){if(this.incomplete)throw new R("Event Iterator ended before complete")}},G=class extends TransformStream{constructor(){let e;super({start(t){e=new q({onEvent:e=>{t.enqueue(e)}})},transform(t){e.feed(t)},flush(){e.end()}})}};function z(e){if(e.includes("\n"))throw new N("Event's id must not contain a newline character")}function F(e){if(!Number.isInteger(e)||e<0)throw new N("Event's retry must be a integer and >= 0")}function B(e){if(e.includes("\n"))throw new N("Event's comment must not contain a newline character")}function W(e){let t="";return t+=function(e){let t="";for(let n of e??[])B(n),t+=`: ${n}\n`;return t}(e.comments),void 0!==e.event&&(function(e){if(e.includes("\n"))throw new N("Event's event must not contain a newline character")}(e.event),t+=`event: ${e.event}\n`),void 0!==e.retry&&(F(e.retry),t+=`retry: ${e.retry}\n`),void 0!==e.id&&(z(e.id),t+=`id: ${e.id}\n`),t+=function(e){let t=e?.split(/\n/)??[],n="";for(let e of t)n+=`data: ${e}\n`;return n}(e.data),t+="\n",t}const Y=Symbol("ORPC_EVENT_SOURCE_META");function V(e,t){if(void 0===t.id&&void 0===t.retry&&!t.comments?.length)return e;if(void 0!==t.id&&z(t.id),void 0!==t.retry&&F(t.retry),void 0!==t.comments)for(let e of t.comments)B(e);return new Proxy(e,{get:(e,n,r)=>n===Y?t:Reflect.get(e,n,r)})}function Z(e){return k(e)?Reflect.get(e,Y):void 0}function H(e,t){let n={...e};for(let e in t)Array.isArray(t[e])?n[e]=[...a(n[e]),...t[e]]:void 0!==t[e]&&(n[e]=Array.isArray(n[e])?[...n[e],t[e]]:void 0===n[e]?t[e]:[n[e],t[e]]);return n}function K(e,t){let n=async e=>{let n=await t.error(e);if(n!==e){let t=Z(e);t&&k(n)&&(n=V(n,t))}return n};return new g((async()=>{let{done:r,value:i}=await(async()=>{try{return await e.next()}catch(e){throw await n(e)}})(),o=await t.value(i,r);if(o!==i){let e=Z(i);e&&k(o)&&(o=V(o,e))}return{done:r,value:o}}),(async()=>{try{await(e.return?.())}catch(e){throw await n(e)}}))}function J(e,t={}){let n=t.path??[];return T(new Proxy((async(...[t,r={}])=>await e.call(n,t,function(e){return{...e,context:e.context??{}}}(r))),{get:(t,r)=>"string"==typeof r?J(e,{path:[...n,r]}):Reflect.get(t,r)}))}function Q(e,t){return{...e,...t}}var X=class{"~orpc";constructor(e){if(e.route?.successStatus&&P(e.route.successStatus))throw Error("[ContractProcedure] Invalid successStatus.");if(Object.values(e.errorMap).some((e=>e&&e.status&&!P(e.status))))throw Error("[ContractProcedure] Invalid error status code.");this["~orpc"]=e}};function ee(e){return e instanceof X||("object"==typeof e||"function"==typeof e)&&null!==e&&"~orpc"in e&&"object"==typeof e["~orpc"]&&null!==e["~orpc"]&&"errorMap"in e["~orpc"]&&"route"in e["~orpc"]&&"meta"in e["~orpc"]}function te(e,t){return{...e,...t}}function ne(e,t){return{...e,...t}}function re(e,t){return e?`${e}${t}`:t}function ie(e,t){return e?[...e,...t]:t}function oe(e,t){let n=e;return t.prefix&&(n=function(e,t){return e.path?{...e,path:`${t}${e.path}`}:e}(n,t.prefix)),t.tags?.length&&(n=function(e,t){return{...e,tags:[...t,...e.tags??[]]}}(n,t.tags)),n}function ae(e,t){if(ee(e))return new X({...e["~orpc"],errorMap:Q(t.errorMap,e["~orpc"].errorMap),route:oe(e["~orpc"].route,t)});if("object"!=typeof e||!e)return e;let n={};for(let r in e)n[r]=ae(e[r],t);return n}const se=new class e extends X{constructor(e){super(e),this["~orpc"].prefix=e.prefix,this["~orpc"].tags=e.tags}$meta(t){return new e({...this["~orpc"],meta:t})}$route(t){return new e({...this["~orpc"],route:t})}$input(t){return new e({...this["~orpc"],inputSchema:t})}errors(t){return new e({...this["~orpc"],errorMap:Q(this["~orpc"].errorMap,t)})}meta(t){return new e({...this["~orpc"],meta:te(this["~orpc"].meta,t)})}route(t){return new e({...this["~orpc"],route:ne(this["~orpc"].route,t)})}input(t){return new e({...this["~orpc"],inputSchema:t})}output(t){return new e({...this["~orpc"],outputSchema:t})}prefix(t){return new e({...this["~orpc"],prefix:re(this["~orpc"].prefix,t)})}tag(...t){return new e({...this["~orpc"],tags:ie(this["~orpc"].tags,t)})}router(e){return ae(e,this["~orpc"])}}({errorMap:{},route:{},meta:{}}),de={defaultMethod:"POST",defaultSuccessStatus:200,defaultSuccessDescription:"OK",defaultInputStructure:"compact",defaultOutputStructure:"compact"};function ce(e,t){return void 0===t?de[e]:t}const ue=Symbol.for("constructDateFrom");function le(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&ue in e?e[ue](t):e instanceof Date?new e.constructor(t):new Date(t)}function pe(e,t){let n=function(e){return le(e,e)}(e);return isNaN(t)?le(e,NaN):(t&&n.setDate(n.getDate()+t),n)}const me={},fe={};function he(e,t){try{let n=(me[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in fe?fe[n]:ge(n,n.split(":"))}catch{if(e in fe)return fe[e];let t=e?.match(ve);return t?ge(e,t.slice(1)):NaN}}const ve=/([+-]\d\d):?(\d\d)?/;function ge(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return fe[e]=60*n+r>0?60*n+r+i:60*n-r-i}var ye=class e extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(he(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),$e(this,e)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-he(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),we(this),+this}[Symbol.for("constructDateFrom")](t){return new e(+new Date(t),this.timeZone)}};const be=/^(get|set)(?!UTC)/;function we(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-he(e.timeZone,e)))}function $e(e,t){let n=Array.isArray(t)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(t):+e.internal,r=he(e.timeZone,e),i=r>0?Math.floor(r):Math.ceil(r),o=new Date(+e);o.setUTCHours(o.getUTCHours()-1);let a=-new Date(+e).getTimezoneOffset(),s=-new Date(+o).getTimezoneOffset(),d=a;if(a-s&&a!==i&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=a-i;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=he(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===i&&(d=s)}let c=d-i;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);let u=new Date(+e);u.setUTCSeconds(0);let l=a>0?u.getSeconds():(u.getSeconds()-60)%60,p=Math.round(-60*he(e.timeZone,e))%60;(p||l)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+l);let m=he(e.timeZone,e),f=m>0?Math.floor(m):Math.ceil(m),h=f!==i,v=-new Date(+e).getTimezoneOffset()-f-c,g=f-i,y=n-60*f*1e3,b=g>0&&Ie(e)-n==60*g*1e3&&Ie(e,y)!==n;if(h&&v&&!b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);let t=he(e.timeZone,e),n=f-(t>0?Math.floor(t):Math.ceil(t));n&&v<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}we(e);let w=(t?n:n+1e3*p)-+e.internal;w&&Math.abs(w)<18e5&&(Date.prototype.setTime.call(e,+e+w),we(e))}function Ie(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(60*-he(e.timeZone,n))),+n}function ke(e){return("string"==typeof e?new Date(e):e).toISOString().replace(/\.\d{3}Z$/,"")}let Ee;Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!be.test(e))return;let t=e.replace(be,"$1UTC");ye.prototype[t]&&(e.startsWith("get")?ye.prototype[e]=function(){return this.internal[t]()}:(ye.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),$e(e)}(this),+this},ye.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),we(this),+this}))})),function(e){e.signature="a1B2c3D4e5F6g7H8";let t=e.Tenant={id:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",oldId:"none",name:"Session Services",slug:"session-services",email:"hello@session.services",adminTeamId:"tem_01jqpjksnsen9vprw95et60t3m",defaultCurrency:"AUD",smsSenderId:"SESSIONS",baseUrl:{dev:"http://localhost:3000",production:"https://app.session.services"},logo:{icon:{src:"https://assets.session.services/icon-bg.png",width:29,height:29},email:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},website:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},qr:{src:"https://assets.session.services/tenants/session-services/qr.svg"}},favicon:"https://assets.session.services/tenants/session-services/favicon.svg"};e.Region={country:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf2",name:"Australia",slug:"australia",kind:"COUNTRY",order:1},state:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf3",name:"New South Wales",slug:"nsw",kind:"STATE",parentId:"rgn_01jqpj2t2kfvmstt6f6tzkbaf2",order:2},city:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf4",name:"Sydney",slug:"sydney",kind:"CITY",parentId:"rgn_01jqpj2t2kfvmstt6f6tzkbaf3",latitude:-33.8688,longitude:151.2093,radius:25,order:3}};let n=e.User={id:"usr_01jps5cgsd4tzjghtnt45qnhn0",email:"test@session.services",firstName:"Jay",lastName:"McMullen",imageUrl:void 0,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),tenantId:t.id,deleted:!1};e.EmailVerification={id:"emlvrf_01jps5cgsd4tzjghtnt45qnhn0",userId:"usr_01jps5cgsd4tzjghtnt45qnhn0",tenantId:t.id,email:"test@session.services",code:"123456",expiresAt:new Date(Date.now()+18e5).toISOString(),createdAt:(new Date).toISOString()},e.PasswordReset={id:"pwrst_01jps5cgsd4tzjghtnt45qnhn0",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",userId:"usr_01jps5cgsd4tzjghtnt45qnhn0",tenantId:t.id,email:"test@session.services",code:"123456",expiresAt:new Date(Date.now()+9e5).toISOString(),emailVerified:!1,twoFactorVerified:!1,createdAt:(new Date).toISOString()};let r=e.Team={id:"tem_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Session Services",slug:"session-services",description:"This is only a test...",type:"PROMOTER",approval:"APPROVED",tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",deleted:!1},i=e.Promoter={id:"pmt_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:r.id,name:"Session Services",slug:"session-services",description:"This is only a test...",payoutFrequency:"AFTER_EVENT",image:{src:"https://assets.session.services/icon-bg.png",alt:"Session Services Logo",width:800,height:800},approval:"APPROVED",geohash:"r3gx1",location:{id:"loc_01jqpjksnsen9vprw95et60t4m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sydney",address:"Sydney NSW 2000, Australia",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney"},tracking:{fbId:"485739562847563",gaId:"G-PSW1MY7HB4",tikTokId:"BQCKPH3RC77U8GPMLJ5G"},tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",deleted:!1};e.Venue={id:"ven_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:r.id,locationId:"loc_01jqpjksnsen9vprw95et60t3m",approval:"APPROVED",name:"Sydney Opera House",slug:"sydney-opera-house",description:"Iconic performing arts venue in Sydney, Australia",type:"THEATER",logo:{src:"https://assets.session.services/venues/sydney-opera-house.png",alt:"Sydney Opera House",width:800,height:800},images:[{src:"https://assets.session.services/venues/sydney-opera-house-1.jpg",alt:"Sydney Opera House exterior",width:1920,height:1080}],contact:{email:"info@sydneyoperahouse.com",phone:"+61 2 9250 7111",website:"https://www.sydneyoperahouse.com",instagram:"https://instagram.com/sydneyoperahouse",facebook:"https://facebook.com/sydneyoperahouse",twitter:"https://twitter.com/sydneyoperahouse"},location:{id:"loc_01jqpjksnsen9vprw95et60t3m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sydney Opera House",address:"Bennelong Point, Sydney NSW 2000",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8567844,longitude:151.2152967,timeZone:"Australia/Sydney",image:{src:"https://assets.session.services/locations/sydney-opera-house.jpg",alt:"Sydney Opera House",width:1200,height:800}},geohash:"r3gx2f9",capacity:5738,tenantId:t.id,deleted:!1};let o=e.PromoterMember={id:"mbr_01jps5cgsec5ge0b1bxa6gzkkk",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:r.id,userId:n.id,user:{id:n.id,email:n.email,firstName:n.firstName,lastName:n.lastName,imageUrl:n.imageUrl},permissions:["*"],isOwner:!0,tenantId:t.id};e.TeamMember={id:"mbr_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:r.id,userId:n.id,user:{id:n.id,email:n.email,firstName:n.firstName,lastName:n.lastName,imageUrl:n.imageUrl},permissions:["*"],isOwner:!0,tenantId:t.id},e.TeamInvite={id:"inv_01jqpjksnsen9vprw95et60t4m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),expiresAt:Math.floor(pe(new Date,7).getTime()/1e3),teamId:r.id,token:"a76e3c5d7109345b58e383e6d90f7728b75f9a38b727f0b9edd5b977e8c3b5d0",email:"team-invite@session.services",invitedBy:n.id,permissions:["event.write","order.write"],tenantId:t.id},e.CurrentSession={user:n,initials:"JM",isTenantAdmin:!0,promoters:[{...i,member:o}]},e.Session={id:"sess_01jps5cgsd4tzjghtnt45qnhn0",userId:n.id,tenantId:t.id,expiresAt:pe(new Date,30).toISOString(),twoFactorVerified:!1,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.BackupCode={id:"bkc_01jps5cgsd4tzjghtnt45qnhn0",userId:n.id,tenantId:t.id,code:"ABC123DEF456",used:!1,createdAt:(new Date).toISOString()},e.UserSession={id:"uss_01jps5cgsd4tzjghtnt45qnhn0",userId:n.id,tenantId:t.id,ipAddress:"192.168.1.100",userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",location:"Sydney, Australia",isCurrent:!0,expiresAt:pe(new Date,30).toISOString(),createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.PasskeyCredential={id:"pkc_01jps5cgsd4tzjghtnt45qnhn0",userId:n.id,tenantId:t.id,name:"iPhone Touch ID",credentialId:"cred_01jps5cgsd4tzjghtnt45qnhn0",credentialPublicKey:"pQECAyYgASFYIM...",credentialBackupEligible:!0,credentialBackupState:!1,credentialDeviceType:"singleDevice",counter:1,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.SecurityKeyCredential={id:"skc_01jps5cgsd4tzjghtnt45qnhn0",userId:n.id,tenantId:t.id,name:"YubiKey 5 NFC",credentialId:"cred_01jps5cgsd4tzjghtnt45qnhn0",credentialPublicKey:"pQECAyYgASFYIM...",credentialBackupEligible:!1,credentialBackupState:!1,credentialDeviceType:"crossPlatform",counter:5,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.TOTPCredential={id:"tpc_01jps5cgsd4tzjghtnt45qnhn0",userId:n.id,tenantId:t.id,secret:"JBSWY3DPEHPK3PXP",verified:!0,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()};let a=e.Location={id:"loc_01hk153x00eh99pagyydz03sbz",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),googlePlaceId:"ChIJ6zWCPUyxEmsRmc6BPrNaP4s",name:"Watson's EQ",address:"The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",city:"Moore Park",state:"New South Wales",postcode:"2021",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney",types:["establishment","point_of_interest","restaurant","bar"],image:{src:"https://assets.session.services/locations/watsons-eq.jpg",alt:"Watson's EQ",width:1200,height:800}};e.CarouselLocation={id:"loc_01hk153x00efq9ygdkc9eb3rjt",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),googlePlaceId:"ChIJc8-zlGSvEmsR0rbZWpCP6z0",name:"Carousel Bar & Ballroom",address:"169 Oxford St, Darlinghurst NSW 2010, Australia",city:"Darlinghurst",state:"New South Wales",postcode:"2010",country:"Australia",latitude:-33.8803603,longitude:151.2161228,timeZone:"Australia/Sydney",types:["establishment","night_club","point_of_interest"],image:{src:"https://assets.session.services/locations/loc_01hk153x00efq9ygdkc9eb3rjt.jpg",alt:"Carousel Bar & Ballroom",width:1200,height:800}};let s=e.Event={id:"evt_01jps5cgsenjrazw6wswmyspa3",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Test Event",slug:"test-event",description:"This is only a test...",approval:"APPROVED",status:"UPCOMING",visibility:"PUBLIC",currency:"AUD",entryStartsAt:ke(pe(new Date,1)),entryEndsAt:ke(pe(new Date,2)),publishAt:ke(new Date),images:{mobile:{src:"https://assets.session.services/event-mobile.jpg",alt:"Mobile Event Image",width:1080,height:1350},desktop:{src:"https://assets.session.services/event-desktop.jpg",alt:"Desktop Event Image",width:1920,height:1080}},geohash:"r3gx1",location:a,teamId:r.id,promoterId:i.id,tenantId:t.id,deleted:!1},d=e.Section={id:"sct_01jps5cgse0g3qj16kpq8t221r",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:r.id,promoterId:i.id,eventId:s.id,eventSlug:s.slug,name:"General Admission",capacity:1e3,limit:-1,available:700,sold:200,reserved:100,order:0,visibility:"ALWAYS",location:a,passcode:void 0,tenantId:t.id,deleted:!1,orderPadded:"0000000000"},c=e.Admission={id:"adm_01jps5cgsee0xvapbk92e8eb4g",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),sectionId:d.id,teamId:r.id,promoterId:i.id,eventId:s.id,eventSlug:s.slug,name:"Final Release",subtitle:"Entry before 10pm",description:"Early bird pricing with priority entry. Must present valid ID at gate.",capacity:1e5,limit:-1,available:7e4,sold:2e4,reserved:1e4,order:0,entryStartsAt:ke(pe(new Date,1)),entryEndsAt:ke(pe(new Date,2)),saleStartsAt:ke(new Date),saleEndsAt:ke(pe(new Date,2)),saleEndsBehavior:"SALE_ENDED",price:{base:1e3,booking:200,currency:"AUD"},visibility:"ALWAYS",passcode:void 0,tenantId:t.id,deleted:!1,orderPadded:"0000000000"};e.DetailedEvent={...s,admissions:[c],sections:[d]};let u=e.Beneficiary={id:"ben_01jps5cgse5n6mg1ymkew9tsfh",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"My Bank Account",currency:"AUD",gatewayId:"7489cb17-24c5-4acf-a0cf-d93ed38081fe",gateway:"AIRWALLEX",teamId:r.id,teamIds:[r.id],venueIds:[],tenantId:t.id};e.AirwallexBeneficiary={transfer_methods:["LOCAL"],beneficiary:{additional_info:{personal_email:"test@session.services"},address:{city:"Sydney",country_code:"AU",postcode:"2000",state:"AU-NSW",street_address:"123 George Street"},bank_details:{account_currency:"AUD",account_name:"John Doe",account_number:"999994",account_routing_type1:"bsb",account_routing_value1:"062004",bank_country_code:"AU",local_clearing_system:"BANK_TRANSFER"},entity_type:"PERSONAL",company_name:"Doe Enterprises Pty Ltd",first_name:"John",last_name:"Doe"}};let l=e.Coupon={id:"cpn_01jps5cgsfzs1ksqaet5hba8ac",couponId:"cpn_01jps5cgsfzs1ksqaet5hba8ac",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Half Price",active:!0,kind:"PERCENT",filter:"TEAM",currency:"AUD",discount:50,uses:0,limit:-1,saleStartsAt:"2025-02-10T03:00:00",saleEndsAt:void 0,deletedAt:void 0,teamId:r.id,tenantId:t.id,deleted:!1},p=e.CouponCode={id:"cod_01jps5cgsfzftw7hxcvr2wftk2",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"TEST50",uses:0,tenantId:t.id,couponId:l.id,teamId:r.id,deleted:!1},m=e.AmountCoupon={id:"cpn_01jps5cgsfndn8jcsfvh72x811",couponId:"cpn_01jps5cgsfndn8jcsfvh72x811",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Half Price",active:!0,kind:"PERCENT",filter:"EVENTS",currency:"AUD",eventIds:[s.id],discount:50,uses:0,limit:-1,saleStartsAt:"2025-02-10T03:00:00",saleEndsAt:void 0,deletedAt:void 0,teamId:r.id,tenantId:t.id};e.AmountCouponCode={id:"cod_01jps5cgsfq06xvvhg0hn2rdzd",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"TEST5DOLLAR",uses:0,tenantId:t.id,couponId:m.id,teamId:r.id};let f=e.Customer={id:"cus_01jps5cgsf4pn2a32eamppnap1",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),firstName:"Test",lastName:"User",email:"test@session.services",phone:"+61411111111",tenantId:t.id},h=e.PayoutTransfer={id:"xfr_01jq8s6c38f97w9yfrfcdhf47v",createdAt:(new Date).toISOString(),kind:"TICKETS",amount:1e3,currency:"AUD",fee:0,feeCurrency:"AUD",reference:"XYZ",gateway:"AIRWALLEX",gatewayId:"fe33fb0f-d9d8-47cd-8eef-6a19bd6223eb",beneficiary:u.name,beneficiaryId:u.id},v=e.PayoutDeduction={id:"pad_01jq90naksfzf8gt2xnn71h21h",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),amount:-100,currency:"AUD",description:"Minimum bar spend not met",reference:"XYZ",gateway:"AIRWALLEX",gatewayId:"1221bbbc-cc97-4119-a597-69019e9d8a93",beneficiary:u.name,beneficiaryId:u.id},g=e.Payout={id:"pyt_01jps5cgsfv2wre6hd0rc4w4t8",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),paidAt:(new Date).toISOString(),status:"PAID",method:"AIRWALLEX",structure:"DEFAULT",approval:"PENDING",frequency:"AFTER_EVENT",transfers:[h],deductions:[v],event:{id:s.id,name:s.name,slug:s.slug,location:s.location.name},price:{net:1e3,total:1e3,gross:1e3,base:1e3,booking:0,refunded:0,discount:0,gateway:0,dispute:0,shipping:0,sms:0,deductions:0,currency:"AUD"},eventId:s.id,teamId:r.id,promoterId:i.id,promoterSlug:i.slug,tenantId:t.id},y=e.OrderItem={id:"itm_01jps5cgsfwyxj0516571eaf17",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),orderId:"ord_01jps5cgsfgve5b5g2666kyryh",kind:"ADMISSION",quantity:2,admissionId:c.id,sectionId:d.id,price:{net:c.price.base+c.price.booking,total:c.price.base+c.price.booking,gross:c.price.base+c.price.booking,base:c.price.base,booking:c.price.booking,refunded:0,discount:0,currency:c.price.currency}};e.OrderFee={id:"fee_01jps5cgsgamykd6kh2t738qkh",createdAt:(new Date).toISOString(),reason:"Gateway Fee",amount:-30,currency:"AUD",requestId:"att_sgpdz4v2ph1axmdmdx8_m8w6qv"};let b=e.OrderOffer={kind:"SMS_DELIVERY",label:"SMS ticket delivery",price:{amount:200,currency:"AUD"}},w=e.Order={id:"ord_01jps5cgsfgve5b5g2666kyryh",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),reservedAt:(new Date).toISOString(),status:"PENDING",price:{net:500,total:1400,gross:2200,base:1e3,booking:400,discount:-1e3,refunded:-700,gateway:0,dispute:0,shipping:0,sms:200,currency:"AUD"},code:{id:p.id,name:p.name},event:{id:s.id,name:s.name,slug:s.slug},fees:[],items:[y],customer:Ee.Customer,customerId:Ee.Customer.id,teamId:Ee.Team.id,promoterId:Ee.Promoter.id,promoterSlug:Ee.Promoter.slug,eventId:Ee.Event.id,eventSlug:Ee.Event.slug,payment:{method:"AIRWALLEX",source:"CARD"},payoutIds:[g.id],refunds:[],offers:[b],tenantId:Ee.Tenant.id,checkoutUrl:t.baseUrl.dev+"/checkout/ord_01jps5cgsfgve5b5g2666kyryh",signature:"Q2hXbG9uZ1NpZzE2"},$=e.TicketScan={id:"scn_01jq4rjmtzyzgtsavn9f34mxan",scannedAt:(new Date).toISOString(),scannedBy:{id:n.id,firstName:n.firstName,lastName:n.lastName,email:n.email},scannedById:n.id,deviceId:"dev_01jq4rjvrgar43zwvyakbje22m",kind:"CHECK_IN"};e.OrderRefund={id:"rfd_01jps5cgsfgve5b5g2666kyryh",request:{idempotencyKey:"refund_12345_customer_request"},status:"SUCCEEDED",acceptedAt:(new Date).toISOString(),failedAt:(new Date).toISOString(),price:{currency:"AUD",total:1200,items:1200,shipping:0,fees:0},reason:"CUSTOMER_REQUEST",note:"Customer requested refund due to schedule conflict",tickets:{cancelRequested:!0,cancelled:!0,cancelledCount:2},gateway:{provider:"STRIPE",refundId:"re_1234567890abcdef",idempotencyKey:"rfd_01jps5cgsfgve5b5g2666kyryh"},actor:{type:"USER",userId:n.id},notification:{requested:!0,sentAt:(new Date).toISOString()},createdAt:(new Date).toISOString()},e.OrderRefundItem={orderItemId:y.id,quantity:2,amount:1200,ticketIds:["tkt_01jps5cgsg0s32w2pr73vbccde"]},e.Notification={id:"ntf_01jps5cgsfgve5b5g2666kyryh",aggregateType:"ORDER",aggregateId:w.id,eventId:s.id,kind:"ORDER_CONFIRMATION",channel:"EMAIL",status:"DELIVERED",providerMessageId:"msg_abc123def456",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),sentAt:(new Date).toISOString(),deliveredAt:(new Date).toISOString(),failedAt:(new Date).toISOString(),failureCode:"BOUNCE",failureReason:"Mailbox unavailable",tenantId:t.id},e.Timeline={id:"tln_01jps5cgsfgve5b5g2666kyryh"},e.SmsOrder={id:"ord_01k74g0tbwfvnb7b0e2esms001"},e.Ticket={id:"tkt_01jps5cgsg0s32w2pr73vbccde",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),status:"REDEEMED",scans:[$],token:"7b81e13025f78f9935d5933eec3ab25e3c2bb811c99f2470182dd6ba4394ff82",attendee:{email:f.email,firstName:f.firstName,lastName:f.lastName},event:{id:s.id,name:s.name,slug:s.slug,location:s.location,entryStartsAt:s.entryStartsAt,entryEndsAt:s.entryEndsAt,images:s.images},admission:{id:c.id,name:c.name,price:c.price,entryStartsAt:c.entryStartsAt,entryEndsAt:c.entryEndsAt},eventId:s.id,admissionId:c.id,customerId:f.id,orderId:w.id,orderItemId:y.id,teamId:r.id,promoterId:i.id,promoterSlug:i.slug,tenantId:t.id}}(Ee||={});const xe=["ALWAYS","HIDDEN","AFTER_ADMISSION"];var Ae;function Te(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=a.prototype,o=Object.keys(i);for(let e=0;e<o.length;e++){let t=o[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class o extends i{}function a(e){var t;let i=n?.Parent?new o:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Oe=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},_e=class extends Error{constructor(e){super("Encountered unidirectional transform during encode: "+e),this.name="ZodEncodeError"}};(Ae=globalThis).__zod_globalConfig??(Ae.__zod_globalConfig={});const De=globalThis.__zod_globalConfig;function Se(){return De}function Me(e){let t=Object.values(e).filter((e=>"number"==typeof e));return Object.entries(e).filter((([e,n])=>-1===t.indexOf(+e))).map((([e,t])=>t))}function Pe(e,t){return"bigint"==typeof t?""+t:t}function Ce(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function je(e){return null==e}function Ne(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Re=Symbol("evaluating");function Ue(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Re)return void 0===r&&(r=Re,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Le(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qe(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Ge(e){return JSON.stringify(e)}const ze="captureStackTrace"in Error?Error.captureStackTrace:()=>{};function Fe(e){return"object"==typeof e&&!!e&&!Array.isArray(e)}const Be=Ce((()=>{if(De.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch{return!1}}));function We(e){if(!1===Fe(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!(!1===Fe(n)||!1===Object.prototype.hasOwnProperty.call(n,"isPrototypeOf"))}function Ye(e){return We(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Ve=new Set(["string","number","symbol"]);function Ze(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function He(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Ke(e){let t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const Je={safeint:[-9007199254740991,2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Qe(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function Xe(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!1===e.issues[n]?.continue)return!0;return!1}function et(e,t){return t.map((t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t}))}function tt(e){return"string"==typeof e?e:e?.message}function nt(e,t,n){let r=e.message?e.message:tt(e.inst?._zod.def?.error?.(e))??tt(t?.error?.(e))??tt(n.customError?.(e))??tt(n.localeError?.(e))??"Invalid input",{inst:i,continue:o,input:a,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=a),s}function rt(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function it(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const ot=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Pe,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},at=Te("$ZodError",ot),st=Te("$ZodError",ot,{Parent:Error}),dt=e=>(t,n,r,i)=>{let o=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Oe;if(a.issues.length){let t=new(i?.Err??e)(a.issues.map((e=>nt(e,o,Se()))));throw ze(t,i?.callee),t}return a.value},ct=e=>async(t,n,r,i)=>{let o=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(i?.Err??e)(a.issues.map((e=>nt(e,o,Se()))));throw ze(t,i?.callee),t}return a.value},ut=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Oe;return o.issues.length?{success:!1,error:new(e??at)(o.issues.map((e=>nt(e,i,Se()))))}:{success:!0,data:o.value}},lt=ut(st),pt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map((e=>nt(e,i,Se()))))}:{success:!0,data:o.value}},mt=pt(st),ft=/^[cC][0-9a-z]{6,}$/,ht=/^[0-9a-z]+$/,vt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,gt=/^[0-9a-vA-V]{20}$/,yt=/^[A-Za-z0-9]{27}$/,bt=/^[a-zA-Z0-9_-]{21}$/,wt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$t=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,It=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,kt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Et=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,At=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Tt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ot=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_t=/^[A-Za-z0-9_-]*$/,Dt=/^https?$/,St=/^\+[1-9]\d{6,14}$/,Mt="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Pt=RegExp(`^${Mt}$`);function Ct(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?""+t:0===e.precision?t+":[0-5]\\d":`${t}:[0-5]\\d\\.\\d{${e.precision}}`:t+"(?::[0-5]\\d(?:\\.\\d+)?)?"}const jt=/^-?\d+$/,Nt=/^-?\d+(?:\.\d+)?$/,Rt=/^(?:true|false)$/i,Ut=/^null$/i,Lt=/^undefined$/i,qt=/^[^A-Z]*$/,Gt=/^[^a-z]*$/,zt=Te("$ZodCheck",((e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])})),Ft={number:"number",bigint:"bigint",object:"date"},Bt=Te("$ZodCheckLessThan",((e,t)=>{zt.init(e,t);let n=Ft[typeof t.value];e._zod.onattach.push((e=>{let n=e._zod.bag;t.value<((t.inclusive?n.maximum:n.exclusiveMaximum)??1/0)&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),Wt=Te("$ZodCheckGreaterThan",((e,t)=>{zt.init(e,t);let n=Ft[typeof t.value];e._zod.onattach.push((e=>{let n=e._zod.bag;t.value>((t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0)&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),Yt=Te("$ZodCheckMultipleOf",((e,t)=>{zt.init(e,t),e._zod.onattach.push((e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)})),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}})),Vt=Te("$ZodCheckNumberFormat",((e,t)=>{zt.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[i,o]=Je[t.format];e._zod.onattach.push((e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=o,n&&(r.pattern=jt)})),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void a.issues.push(s>0?{input:s,code:"too_big",maximum:2**53-1,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}:{input:s,code:"too_small",minimum:-9007199254740991,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort})}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}})),Zt=Te("$ZodCheckMaxLength",((e,t)=>{var n;zt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!je(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{t.maximum<(e._zod.bag.maximum??1/0)&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=rt(r);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),Ht=Te("$ZodCheckMinLength",((e,t)=>{var n;zt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!je(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{t.minimum>(e._zod.bag.minimum??-1/0)&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=rt(r);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),Kt=Te("$ZodCheckLengthEquals",((e,t)=>{var n;zt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!je(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length})),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let o=rt(r);n.issues.push({origin:o,...i>t.length?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}})),Jt=Te("$ZodCheckStringFormat",((e,t)=>{var n,r;zt.init(e,t),e._zod.onattach.push((e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))})),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:""+t.pattern}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})})),Qt=Te("$ZodCheckRegex",((e,t)=>{Jt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:""+t.pattern,inst:e,continue:!t.abort})}})),Xt=Te("$ZodCheckLowerCase",((e,t)=>{t.pattern??=qt,Jt.init(e,t)})),en=Te("$ZodCheckUpperCase",((e,t)=>{t.pattern??=Gt,Jt.init(e,t)})),tn=Te("$ZodCheckIncludes",((e,t)=>{zt.init(e,t);let n=Ze(t.includes),r=RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push((e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)})),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}})),nn=Te("$ZodCheckStartsWith",((e,t)=>{zt.init(e,t);let n=RegExp(`^${Ze(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push((e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)})),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}})),rn=Te("$ZodCheckEndsWith",((e,t)=>{zt.init(e,t);let n=RegExp(`.*${Ze(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push((e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)})),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}})),on=Te("$ZodCheckOverwrite",((e,t)=>{zt.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));var an=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});let t=e.split("\n").filter((e=>e)),n=Math.min(...t.map((e=>e.length-e.trimStart().length))),r=t.map((e=>e.slice(n))).map((e=>" ".repeat(2*this.indent)+e));for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[""]).map((e=>" "+e))];return new e(...t,n.join("\n"))}};const sn={major:4,minor:4,patch:3},dn=Te("$ZodType",((e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sn;let r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push((()=>{e._zod.run=e._zod.parse}));else{let t=(e,t,n)=>{let r,i=Qe(e);for(let o of t){if(o._zod.def.when){if(Xe(e)||!o._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,a=o._zod.check(e);if(a instanceof Promise&&!1===n?.async)throw new Oe;if(r||a instanceof Promise)r=(r??Promise.resolve()).then((async()=>{await a,e.issues.length!==t&&(i||=Qe(e,t))}));else{if(e.issues.length===t)continue;i||=Qe(e,t)}}return r?r.then((()=>e)):e},n=(n,i,o)=>{if(Qe(n))return n.aborted=!0,n;let a=t(i,r,o);if(a instanceof Promise){if(!1===o.async)throw new Oe;return a.then((t=>e._zod.parse(t,o)))}return e._zod.parse(a,o)};e._zod.run=(i,o)=>{if(o.skipChecks)return e._zod.parse(i,o);if("backward"===o.direction){let t=e._zod.parse({value:i.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then((e=>n(e,i,o))):n(t,i,o)}let a=e._zod.parse(i,o);if(a instanceof Promise){if(!1===o.async)throw new Oe;return a.then((e=>t(e,r,o)))}return t(a,r,o)}}Ue(e,"~standard",(()=>({validate:t=>{try{let n=lt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return mt(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1})))})),cn=Te("$ZodString",((e,t)=>{dn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(e=>RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`))(e._zod.bag),e._zod.parse=n=>{if(t.coerce)try{n.value=n.value+""}catch{}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}})),un=Te("$ZodStringFormat",((e,t)=>{Jt.init(e,t),cn.init(e,t)})),ln=Te("$ZodGUID",((e,t)=>{t.pattern??=$t,un.init(e,t)})),pn=Te("$ZodUUID",((e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=It(e)}else t.pattern??=It();un.init(e,t)})),mn=Te("$ZodEmail",((e,t)=>{t.pattern??=kt,un.init(e,t)})),fn=Te("$ZodURL",((e,t)=>{un.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Dt.source&&!/^https?:\/\//i.test(r))return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});let i=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(n.value=t.normalize?i.href:r)}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}})),hn=Te("$ZodEmoji",((e,t)=>{t.pattern??=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),un.init(e,t)})),vn=Te("$ZodNanoID",((e,t)=>{t.pattern??=bt,un.init(e,t)})),gn=Te("$ZodCUID",((e,t)=>{t.pattern??=ft,un.init(e,t)})),yn=Te("$ZodCUID2",((e,t)=>{t.pattern??=ht,un.init(e,t)})),bn=Te("$ZodULID",((e,t)=>{t.pattern??=vt,un.init(e,t)})),wn=Te("$ZodXID",((e,t)=>{t.pattern??=gt,un.init(e,t)})),$n=Te("$ZodKSUID",((e,t)=>{t.pattern??=yt,un.init(e,t)})),In=Te("$ZodISODateTime",((e,t)=>{t.pattern??=function(e){let t=Ct({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return RegExp(`^${Mt}T(?:${r})$`)}(t),un.init(e,t)})),kn=Te("$ZodISODate",((e,t)=>{t.pattern??=Pt,un.init(e,t)})),En=Te("$ZodISOTime",((e,t)=>{t.pattern??=function(e){return RegExp(`^${Ct(e)}$`)}(t),un.init(e,t)})),xn=Te("$ZodISODuration",((e,t)=>{t.pattern??=wt,un.init(e,t)})),An=Te("$ZodIPv4",((e,t)=>{t.pattern??=Et,un.init(e,t),e._zod.bag.format="ipv4"})),Tn=Te("$ZodIPv6",((e,t)=>{t.pattern??=xt,un.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}})),On=Te("$ZodCIDRv4",((e,t)=>{t.pattern??=At,un.init(e,t)})),_n=Te("$ZodCIDRv6",((e,t)=>{t.pattern??=Tt,un.init(e,t),e._zod.check=n=>{let r=n.value.split("/");try{if(2!==r.length)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(""+n!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}}));function Dn(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Sn=Te("$ZodBase64",((e,t)=>{t.pattern??=Ot,un.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Dn(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}})),Mn=Te("$ZodBase64URL",((e,t)=>{t.pattern??=_t,un.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!_t.test(e))return!1;let t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return Dn(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}})),Pn=Te("$ZodE164",((e,t)=>{t.pattern??=St,un.init(e,t)})),Cn=Te("$ZodJWT",((e,t)=>{un.init(e,t),e._zod.check=n=>{(function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!("typ"in i&&"JWT"!==i?.typ||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}})),jn=Te("$ZodNumber",((e,t)=>{dn.init(e,t),e._zod.pattern=e._zod.bag.pattern??Nt,e._zod.parse=n=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}})),Nn=Te("$ZodNumberFormat",((e,t)=>{Vt.init(e,t),jn.init(e,t)})),Rn=Te("$ZodBoolean",((e,t)=>{dn.init(e,t),e._zod.pattern=Rt,e._zod.parse=n=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}})),Un=Te("$ZodUndefined",((e,t)=>{dn.init(e,t),e._zod.pattern=Lt,e._zod.values=new Set([void 0]),e._zod.parse=t=>{let n=t.value;return void 0===n||t.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),t}})),Ln=Te("$ZodNull",((e,t)=>{dn.init(e,t),e._zod.pattern=Ut,e._zod.values=new Set([null]),e._zod.parse=t=>{let n=t.value;return null===n||t.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),t}})),qn=Te("$ZodAny",((e,t)=>{dn.init(e,t),e._zod.parse=e=>e})),Gn=Te("$ZodUnknown",((e,t)=>{dn.init(e,t),e._zod.parse=e=>e})),zn=Te("$ZodNever",((e,t)=>{dn.init(e,t),e._zod.parse=t=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)})),Fn=Te("$ZodVoid",((e,t)=>{dn.init(e,t),e._zod.parse=t=>{let n=t.value;return void 0===n||t.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),t}})),Bn=Te("$ZodDate",((e,t)=>{dn.init(e,t),e._zod.parse=n=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}}));function Wn(e,t,n){e.issues.length&&t.issues.push(...et(n,e.issues)),t.value[n]=e.value}const Yn=Te("$ZodArray",((e,t)=>{dn.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);let o=[];for(let e=0;e<i.length;e++){let a=t.element._zod.run({value:i[e],issues:[]},r);a instanceof Promise?o.push(a.then((t=>Wn(t,n,e)))):Wn(a,n,e)}return o.length?Promise.all(o).then((()=>n)):n}}));function Vn(e,t,n,r,i,o){let a=n in r;if(e.issues.length){if(i&&o&&!a)return;t.issues.push(...et(n,e.issues))}a||i?void 0===e.value?a&&(t.value[n]=void 0):t.value[n]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]})}function Zn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=function(e){return Object.keys(e).filter((t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout))}(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Hn(e,t,n,r,i,o){let a=[],s=i.keySet,d=i.catchall._zod,c=d.def.type,u="optional"===d.optin,l="optional"===d.optout;for(let i in t){if("__proto__"===i||s.has(i))continue;if("never"===c){a.push(i);continue}let o=d.run({value:t[i],issues:[]},r);o instanceof Promise?e.push(o.then((e=>Vn(e,n,i,t,u,l)))):Vn(o,n,i,t,u,l)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then((()=>n)):n}const Kn=Te("$ZodObject",((e,t)=>{if(dn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=Ce((()=>Zn(t)));Ue(e._zod,"propValues",(()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n}));let r,i=Fe,o=t.catchall;e._zod.parse=(t,a)=>{r??=n.value;let s=t.value;if(!i(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};let d=[],c=r.shape;for(let e of r.keys){let n=c[e],r="optional"===n._zod.optin,i="optional"===n._zod.optout,o=n._zod.run({value:s[e],issues:[]},a);o instanceof Promise?d.push(o.then((n=>Vn(n,t,e,s,r,i)))):Vn(o,t,e,s,r,i)}return o?Hn(d,s,t,a,n.value,e):d.length?Promise.all(d).then((()=>t)):t}})),Jn=Te("$ZodObjectJIT",((e,t)=>{Kn.init(e,t);let n,r,i=e._zod.parse,o=Ce((()=>Zn(t))),a=Fe,s=!De.jitless,d=s&&Be.value,c=t.catchall;e._zod.parse=(u,l)=>{r??=o.value;let p=u.value;return a(p)?s&&d&&!1===l?.async&&!0!==l.jitless?(n||=(e=>{let t=new an(["shape","payload","ctx"]),n=o.value,r=e=>{let t=Ge(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let i=Object.create(null),a=0;for(let e of n.keys)i[e]="key_"+a++;t.write("const newResult = {};");for(let o of n.keys){let n=i[o],a=Ge(o),s=e[o],d="optional"===s?._zod?.optin,c="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(o)};`),t.write(d&&c?`\n if (${n}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `:d?`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `:`\n const ${n}_present = ${a} in input;\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${a}]\n });\n }\n\n if (${n}_present) {\n if (${n}.value === undefined) {\n newResult[${a}] = undefined;\n } else {\n newResult[${a}] = ${n}.value;\n }\n }\n\n `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,n)=>s(e,t,n)})(t.shape),u=n(u,l),c?Hn([],p,u,l,r,e):u):i(u,l):(u.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),u)}}));function Qn(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let i=e.filter((e=>!Qe(e)));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((e=>e.issues.map((e=>nt(e,r,Se())))))}),t)}const Xn=Te("$ZodUnion",((e,t)=>{dn.init(e,t),Ue(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),Ue(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),Ue(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),Ue(e._zod,"pattern",(()=>{if(t.options.every((e=>e._zod.pattern))){let e=t.options.map((e=>e._zod.pattern));return RegExp(`^(${e.map((e=>Ne(e.source))).join("|")})$`)}}));let n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then((t=>Qn(t,r,e,i))):Qn(a,r,e,i)}})),er=Te("$ZodDiscriminatedUnion",((e,t)=>{t.inclusive=!1,Xn.init(e,t);let n=e._zod.parse;Ue(e._zod,"propValues",(()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e}));let r=Ce((()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${t+""}"`);n.set(t,r)}}return n}));e._zod.parse=(i,o)=>{let a=i.value;if(!Fe(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;let s=r.value.get(a?.[t.discriminator]);return s?s._zod.run(i,o):t.unionFallback||"backward"===o.direction?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:a,path:[t.discriminator],inst:e}),i)}})),tr=Te("$ZodIntersection",((e,t)=>{dn.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then((([t,n])=>rr(e,t,n))):rr(e,i,o)}}));function nr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(We(e)&&We(t)){let n=Object.keys(t),r=Object.keys(e).filter((e=>-1!==n.indexOf(e))),i={...e,...t};for(let n of r){let r=nr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=nr(e[r],t[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function rr(e,t,n){let r,i=new Map;for(let n of t.issues)if("unrecognized_keys"===n.code){r??=n;for(let e of n.keys)i.has(e)||i.set(e,{}),i.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)i.has(e)||i.set(e,{}),i.get(e).r=!0;else e.issues.push(t);let o=[...i].filter((([,e])=>e.l&&e.r)).map((([e])=>e));if(o.length&&r&&e.issues.push({...r,keys:o}),Qe(e))return e;let a=nr(t.value,n.value);if(!a.valid)throw Error("Unmergable intersection. Error path: "+JSON.stringify(a.mergeErrorPath));return e.value=a.data,e}const ir=Te("$ZodRecord",((e,t)=>{dn.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!We(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let s,d=new Set;for(let s of a)if("string"==typeof s||"number"==typeof s||"symbol"==typeof s){d.add("number"==typeof s?""+s:s);let a=t.keyType._zod.run({value:s,issues:[]},r);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map((e=>nt(e,r,Se()))),input:s,path:[s],inst:e});continue}let c=a.value,u=t.valueType._zod.run({value:i[s],issues:[]},r);u instanceof Promise?o.push(u.then((e=>{e.issues.length&&n.issues.push(...et(s,e.issues)),n.value[c]=e.value}))):(u.issues.length&&n.issues.push(...et(s,u.issues)),n.value[c]=u.value)}for(let e in i)d.has(e)||(s??=[],s.push(e));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:s})}else{n.value={};for(let a of Reflect.ownKeys(i)){if("__proto__"===a||!Object.prototype.propertyIsEnumerable.call(i,a))continue;let s=t.keyType._zod.run({value:a,issues:[]},r);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof a&&Nt.test(a)&&s.issues.length){let e=t.keyType._zod.run({value:Number(a),issues:[]},r);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?n.value[a]=i[a]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map((e=>nt(e,r,Se()))),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:i[a],issues:[]},r);d instanceof Promise?o.push(d.then((e=>{e.issues.length&&n.issues.push(...et(a,e.issues)),n.value[s.value]=e.value}))):(d.issues.length&&n.issues.push(...et(a,d.issues)),n.value[s.value]=d.value)}}return o.length?Promise.all(o).then((()=>n)):n}})),or=Te("$ZodEnum",((e,t)=>{dn.init(e,t);let n=Me(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter((e=>Ve.has(typeof e))).map((e=>"string"==typeof e?Ze(e):""+e)).join("|")})$`),e._zod.parse=t=>{let i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}})),ar=Te("$ZodLiteral",((e,t)=>{if(dn.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map((e=>"string"==typeof e?Ze(e):e?Ze(""+e):e+"")).join("|")})$`),e._zod.parse=r=>{let i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}})),sr=Te("$ZodTransform",((e,t)=>{dn.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new _e(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then((e=>(n.value=e,n.fallback=!0,n)));if(i instanceof Promise)throw new Oe;return n.value=i,n.fallback=!0,n}}));function dr(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const cr=Te("$ZodOptional",((e,t)=>{dn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ue(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),Ue(e._zod,"pattern",(()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ne(e.source)})?$`):void 0})),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then((e=>dr(e,r))):dr(i,r)}return void 0===e.value?e:t.innerType._zod.run(e,n)}})),ur=Te("$ZodExactOptional",((e,t)=>{cr.init(e,t),Ue(e._zod,"values",(()=>t.innerType._zod.values)),Ue(e._zod,"pattern",(()=>t.innerType._zod.pattern)),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)})),lr=Te("$ZodNullable",((e,t)=>{dn.init(e,t),Ue(e._zod,"optin",(()=>t.innerType._zod.optin)),Ue(e._zod,"optout",(()=>t.innerType._zod.optout)),Ue(e._zod,"pattern",(()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ne(e.source)}|null)$`):void 0})),Ue(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0)),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)})),pr=Te("$ZodDefault",((e,t)=>{dn.init(e,t),e._zod.optin="optional",Ue(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((e=>mr(e,t))):mr(r,t)}}));function mr(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const fr=Te("$ZodPrefault",((e,t)=>{dn.init(e,t),e._zod.optin="optional",Ue(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))})),hr=Te("$ZodNonOptional",((e,t)=>{dn.init(e,t),Ue(e._zod,"values",(()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter((e=>void 0!==e))):void 0})),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then((t=>vr(t,e))):vr(i,e)}}));function vr(e,t){return!e.issues.length&&void 0===e.value&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const gr=Te("$ZodCatch",((e,t)=>{dn.init(e,t),e._zod.optin="optional",Ue(e._zod,"optout",(()=>t.innerType._zod.optout)),Ue(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map((e=>nt(e,n,Se())))},input:e.value}),e.issues=[],e.fallback=!0),e))):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map((e=>nt(e,n,Se())))},input:e.value}),e.issues=[],e.fallback=!0),e)}})),yr=Te("$ZodPipe",((e,t)=>{dn.init(e,t),Ue(e._zod,"values",(()=>t.in._zod.values)),Ue(e._zod,"optin",(()=>t.in._zod.optin)),Ue(e._zod,"optout",(()=>t.out._zod.optout)),Ue(e._zod,"propValues",(()=>t.in._zod.propValues)),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then((e=>br(e,t.in,n))):br(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then((e=>br(e,t.out,n))):br(r,t.out,n)}}));function br(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const wr=Te("$ZodPreprocess",((e,t)=>{yr.init(e,t)})),$r=Te("$ZodReadonly",((e,t)=>{dn.init(e,t),Ue(e._zod,"propValues",(()=>t.innerType._zod.propValues)),Ue(e._zod,"values",(()=>t.innerType._zod.values)),Ue(e._zod,"optin",(()=>t.innerType?._zod?.optin)),Ue(e._zod,"optout",(()=>t.innerType?._zod?.optout)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ir):Ir(r)}}));function Ir(e){return e.value=Object.freeze(e.value),e}const kr=Te("$ZodLazy",((e,t)=>{dn.init(e,t),Ue(e._zod,"innerType",(()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner})),Ue(e._zod,"pattern",(()=>e._zod.innerType?._zod?.pattern)),Ue(e._zod,"propValues",(()=>e._zod.innerType?._zod?.propValues)),Ue(e._zod,"optin",(()=>e._zod.innerType?._zod?.optin??void 0)),Ue(e._zod,"optout",(()=>e._zod.innerType?._zod?.optout??void 0)),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)})),Er=Te("$ZodCustom",((e,t)=>{zt.init(e,t),dn.init(e,t),e._zod.parse=e=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then((t=>xr(t,n,r,e)));xr(i,n,r,e)}}));function xr(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(it(e))}}var Ar;(Ar=globalThis).__zod_globalRegistry??(Ar.__zod_globalRegistry=new class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});const Tr=globalThis.__zod_globalRegistry;function Or(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ke(t)})}function _r(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ke(t)})}function Dr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ke(t)})}function Sr(e,t){return new Bt({check:"less_than",...Ke(t),value:e,inclusive:!1})}function Mr(e,t){return new Bt({check:"less_than",...Ke(t),value:e,inclusive:!0})}function Pr(e,t){return new Wt({check:"greater_than",...Ke(t),value:e,inclusive:!1})}function Cr(e,t){return new Wt({check:"greater_than",...Ke(t),value:e,inclusive:!0})}function jr(e,t){return new Yt({check:"multiple_of",...Ke(t),value:e})}function Nr(e,t){return new Zt({check:"max_length",...Ke(t),maximum:e})}function Rr(e,t){return new Ht({check:"min_length",...Ke(t),minimum:e})}function Ur(e,t){return new Kt({check:"length_equals",...Ke(t),length:e})}function Lr(e){return new on({check:"overwrite",tx:e})}function qr(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Tr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Gr(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,r);else{let n=a.schema,o=t.processors[i.type];if(!o)throw Error("[toJSONSchema]: Non-representable type encountered: "+i.type);o(e,t,n,r)}let o=e._zod.parent;o&&(a.ref||=o,Gr(o,t,r),t.seen.get(o).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),"input"===t.io&&Br(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function zr(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${r}/${o}`}}if(t[1]===n)return{ref:"#"};let i=`#/${r}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:i+o}},o=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let o=t.schema;for(let e in o)delete o[e];o.$ref=n};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t!==n[0]){if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){o(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&"ref"===e.reused)&&o(n)}else o(n)}}function Fr(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let i=n.def??n.schema,o={...i},a=n.ref;if(n.ref=null,a){r(a);let n=e.seen.get(a),s=n.schema;if(!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(i,s):(i.allOf=i.allOf??[],i.allOf.push(s)),Object.assign(i,o),t._zod.parent===a)for(let e in i)"$ref"===e||"allOf"===e||e in o||delete i[e];if(s.$ref&&n.def)for(let e in i)"$ref"===e||"allOf"===e||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"===e||"allOf"===e||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target&&(i.$schema="http://json-schema.org/draft-04/schema#"),e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Wr(t,"input",e.processors),output:Wr(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error("Error converting schema to JSON.")}}function Br(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return Br(r.element,n);if("set"===r.type)return Br(r.valueType,n);if("lazy"===r.type)return Br(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type)return Br(r.innerType,n);if("intersection"===r.type)return Br(r.left,n)||Br(r.right,n);if("record"===r.type||"map"===r.type)return Br(r.keyType,n)||Br(r.valueType,n);if("pipe"===r.type)return!!e._zod.traits.has("$ZodCodec")||Br(r.in,n)||Br(r.out,n);if("object"===r.type){for(let e in r.shape)if(Br(r.shape[e],n))return!0;return!1}if("union"===r.type){for(let e of r.options)if(Br(e,n))return!0;return!1}if("tuple"===r.type){for(let e of r.items)if(Br(e,n))return!0;return!(!r.rest||!Br(r.rest,n))}return!1}const Wr=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},a=qr({...i??{},target:o,io:t,processors:n});return Gr(e,a),zr(a,e),Fr(a,e)},Yr={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Vr=(e,t,n,r)=>{let i=e._zod.def;Gr(i.innerType,t,r),t.seen.get(e).ref=i.innerType},Zr=Te("ZodISODateTime",((e,t)=>{In.init(e,t),bi.init(e,t)}));function Hr(e){return function(e,t){return new Zr({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ke(t)})}(0,e)}const Kr=Te("ZodISODate",((e,t)=>{kn.init(e,t),bi.init(e,t)}));function Jr(e){return function(e,t){return new Kr({type:"string",format:"date",check:"string_format",...Ke(t)})}(0,e)}const Qr=Te("ZodISOTime",((e,t)=>{En.init(e,t),bi.init(e,t)}));const Xr=Te("ZodISODuration",((e,t)=>{xn.init(e,t),bi.init(e,t)}));const ei=Te("ZodError",((e,t)=>{at.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map((e=>r({issues:e},[...i,...o.path])));else if("invalid_key"===o.code)r({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(o))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Pe,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Pe,2)}},isEmpty:{get:()=>0===e.issues.length}})}),{Parent:Error}),ti=dt(ei),ni=ct(ei),ri=ut(ei),ii=pt(ei),oi=(e=>(t,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return dt(e)(t,n,i)})(ei),ai=(e=>(t,n,r)=>dt(e)(t,n,r))(ei),si=(e=>async(t,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return ct(e)(t,n,i)})(ei),di=(e=>async(t,n,r)=>ct(e)(t,n,r))(ei),ci=(e=>(t,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return ut(e)(t,n,i)})(ei),ui=(e=>(t,n,r)=>ut(e)(t,n,r))(ei),li=(e=>async(t,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return pt(e)(t,n,i)})(ei),pi=(e=>async(t,n,r)=>pt(e)(t,n,r))(ei),mi=new WeakMap;function fi(e,t,n){let r=Object.getPrototypeOf(e),i=mi.get(r);if(i||(i=new Set,mi.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const hi=Te("ZodType",((e,t)=>(dn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Wr(e,"input"),output:Wr(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{let r=qr({...n,processors:t});return Gr(e,r),zr(r,e),Fr(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>ti(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ri(e,t,n),e.parseAsync=async(t,n)=>ni(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ii(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>oi(e,t,n),e.decode=(t,n)=>ai(e,t,n),e.encodeAsync=async(t,n)=>si(e,t,n),e.decodeAsync=async(t,n)=>di(e,t,n),e.safeEncode=(t,n)=>ci(e,t,n),e.safeDecode=(t,n)=>ui(e,t,n),e.safeEncodeAsync=async(t,n)=>li(e,t,n),e.safeDecodeAsync=async(t,n)=>pi(e,t,n),fi(e,"ZodType",{check(...e){let t=this.def;return this.clone(qe(t,{checks:[...t.checks??[],...e.map((e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e))]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return He(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return function(e,t,n){return new Uo({type:"custom",check:"custom",fn:t,...Ke(n)})}(0,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return function(e,t){let n=function(e,t){let n=new zt({check:"custom",...Ke(t)});return n._zod.check=e,n}((t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(it(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??="custom",r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(it(r))}},e(t.value,t))),t);return n}(e,t)}(e,t))},overwrite(e){return this.check(Lr(e))},optional(){return xo(this)},exactOptional(){return function(e){return new Ao({type:"optional",innerType:e})}(this)},nullable(){return Oo(this)},nullish(){return xo(Oo(this))},nonoptional(e){return function(e,t){return new So({type:"nonoptional",innerType:e,...Ke(t)})}(this,e)},array(){return so(this)},or(e){return po([this,e])},and(e){return function(e,t){return new ho({type:"intersection",left:e,right:t})}(this,e)},transform(e){return Co(this,ko(e))},default(e){return function(e,t){return new _o({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():Ye(t)}})}(this,e)},prefault(e){return function(e,t){return new Do({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():Ye(t)}})}(this,e)},catch(e){return function(e,t){return new Mo({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}(this,e)},pipe(e){return Co(this,e)},readonly(){return function(e){return new No({type:"readonly",innerType:e})}(this)},describe(e){let t=this.clone();return Tr.add(t,{description:e}),t},meta(...e){if(0===e.length)return Tr.get(this);let t=this.clone();return Tr.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>Tr.get(e)?.description,configurable:!0}),e))),vi=Te("_ZodString",((e,t)=>{cn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n)=>((e,t,n)=>{let r=n;r.type="string";let{minimum:i,maximum:o,format:a,patterns:s,contentEncoding:d}=e._zod.bag;if("number"==typeof i&&(r.minLength=i),"number"==typeof o&&(r.maxLength=o),a&&(r.format=Yr[a]??a,""===r.format&&delete r.format,"time"===a&&delete r.format),d&&(r.contentEncoding=d),s&&s.size>0){let e=[...s];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map((e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source})))])}})(e,t,n);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,fi(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new Qt({check:"string_format",format:"regex",...Ke(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new tn({check:"string_format",format:"includes",...Ke(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new nn({check:"string_format",format:"starts_with",...Ke(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new rn({check:"string_format",format:"ends_with",...Ke(t),suffix:e})}(...e))},min(...e){return this.check(Rr(...e))},max(...e){return this.check(Nr(...e))},length(...e){return this.check(Ur(...e))},nonempty(...e){return this.check(Rr(1,...e))},lowercase(e){return this.check(function(e){return new Xt({check:"string_format",format:"lowercase",...Ke(e)})}(e))},uppercase(e){return this.check(function(e){return new en({check:"string_format",format:"uppercase",...Ke(e)})}(e))},trim(){return this.check(Lr((e=>e.trim())))},normalize(...e){return this.check(function(e){return Lr((t=>t.normalize(e)))}(...e))},toLowerCase(){return this.check(Lr((e=>e.toLowerCase())))},toUpperCase(){return this.check(Lr((e=>e.toUpperCase())))},slugify(){return this.check(Lr((e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))))}})})),gi=Te("ZodString",((e,t)=>{cn.init(e,t),vi.init(e,t),e.email=t=>e.check(Or(wi,t)),e.url=t=>e.check(Dr(Ei,t)),e.jwt=t=>e.check(function(e,t){return new qi({type:"string",format:"jwt",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new Ai({type:"string",format:"emoji",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.guid=t=>e.check(_r(Ii,t)),e.uuid=t=>e.check(function(e,t){return new ki({type:"string",format:"uuid",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new ki({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ke(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new ki({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ke(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new ki({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ke(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new Ti({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.guid=t=>e.check(_r(Ii,t)),e.cuid=t=>e.check(function(e,t){return new Oi({type:"string",format:"cuid",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new _i({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new Di({type:"string",format:"ulid",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new Ri({type:"string",format:"base64",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new Ui({type:"string",format:"base64url",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new Si({type:"string",format:"xid",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new Mi({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new Pi({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new Ci({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new ji({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new Ni({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new Li({type:"string",format:"e164",check:"string_format",abort:!1,...Ke(t)})}(0,t)),e.datetime=t=>e.check(Hr(t)),e.date=t=>e.check(Jr(t)),e.time=t=>e.check(function(e){return function(e,t){return new Qr({type:"string",format:"time",check:"string_format",precision:null,...Ke(t)})}(0,e)}(t)),e.duration=t=>e.check(function(e){return function(e,t){return new Xr({type:"string",format:"duration",check:"string_format",...Ke(t)})}(0,e)}(t))}));function yi(e){return function(e,t){return new gi({type:"string",...Ke(t)})}(0,e)}const bi=Te("ZodStringFormat",((e,t)=>{un.init(e,t),vi.init(e,t)})),wi=Te("ZodEmail",((e,t)=>{mn.init(e,t),bi.init(e,t)}));function $i(e){return Or(wi,e)}const Ii=Te("ZodGUID",((e,t)=>{ln.init(e,t),bi.init(e,t)})),ki=Te("ZodUUID",((e,t)=>{pn.init(e,t),bi.init(e,t)})),Ei=Te("ZodURL",((e,t)=>{fn.init(e,t),bi.init(e,t)}));function xi(e){return Dr(Ei,e)}const Ai=Te("ZodEmoji",((e,t)=>{hn.init(e,t),bi.init(e,t)})),Ti=Te("ZodNanoID",((e,t)=>{vn.init(e,t),bi.init(e,t)})),Oi=Te("ZodCUID",((e,t)=>{gn.init(e,t),bi.init(e,t)})),_i=Te("ZodCUID2",((e,t)=>{yn.init(e,t),bi.init(e,t)})),Di=Te("ZodULID",((e,t)=>{bn.init(e,t),bi.init(e,t)})),Si=Te("ZodXID",((e,t)=>{wn.init(e,t),bi.init(e,t)})),Mi=Te("ZodKSUID",((e,t)=>{$n.init(e,t),bi.init(e,t)})),Pi=Te("ZodIPv4",((e,t)=>{An.init(e,t),bi.init(e,t)})),Ci=Te("ZodIPv6",((e,t)=>{Tn.init(e,t),bi.init(e,t)})),ji=Te("ZodCIDRv4",((e,t)=>{On.init(e,t),bi.init(e,t)})),Ni=Te("ZodCIDRv6",((e,t)=>{_n.init(e,t),bi.init(e,t)})),Ri=Te("ZodBase64",((e,t)=>{Sn.init(e,t),bi.init(e,t)})),Ui=Te("ZodBase64URL",((e,t)=>{Mn.init(e,t),bi.init(e,t)})),Li=Te("ZodE164",((e,t)=>{Pn.init(e,t),bi.init(e,t)})),qi=Te("ZodJWT",((e,t)=>{Cn.init(e,t),bi.init(e,t)})),Gi=Te("ZodNumber",((e,t)=>{jn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n)=>((e,t,n)=>{let r=n,{minimum:i,maximum:o,format:a,multipleOf:s,exclusiveMaximum:d,exclusiveMinimum:c}=e._zod.bag;r.type="string"==typeof a&&a.includes("int")?"integer":"number";let u="number"==typeof d&&d<=(o??1/0),l="draft-04"===t.target||"openapi-3.0"===t.target;"number"==typeof c&&c>=(i??-1/0)?l?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c:"number"==typeof i&&(r.minimum=i),u?l?(r.maximum=d,r.exclusiveMaximum=!0):r.exclusiveMaximum=d:"number"==typeof o&&(r.maximum=o),"number"==typeof s&&(r.multipleOf=s)})(e,t,n),fi(e,"ZodNumber",{gt(e,t){return this.check(Pr(e,t))},gte(e,t){return this.check(Cr(e,t))},min(e,t){return this.check(Cr(e,t))},lt(e,t){return this.check(Sr(e,t))},lte(e,t){return this.check(Mr(e,t))},max(e,t){return this.check(Mr(e,t))},int(e){return this.check(Bi(e))},safe(e){return this.check(Bi(e))},positive(e){return this.check(Pr(0,e))},nonnegative(e){return this.check(Cr(0,e))},negative(e){return this.check(Sr(0,e))},nonpositive(e){return this.check(Mr(0,e))},multipleOf(e,t){return this.check(jr(e,t))},step(e,t){return this.check(jr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}));function zi(e){return function(e,t){return new Gi({type:"number",checks:[],...Ke(t)})}(0,e)}const Fi=Te("ZodNumberFormat",((e,t)=>{Nn.init(e,t),Gi.init(e,t)}));function Bi(e){return function(e,t){return new Fi({type:"number",check:"number_format",abort:!1,format:"safeint",...Ke(t)})}(0,e)}const Wi=Te("ZodBoolean",((e,t)=>{Rn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,n)=>{n.type="boolean"})(0,0,t)}));function Yi(e){return function(e,t){return new Wi({type:"boolean",...Ke(t)})}(0,e)}const Vi=Te("ZodUndefined",((e,t)=>{Un.init(e,t),hi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")})(0,e)}));function Zi(e){return function(e,t){return new Vi({type:"undefined",...Ke(t)})}(0,e)}const Hi=Te("ZodNull",((e,t)=>{Ln.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,n)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"})(0,e,t)}));function Ki(e){return function(e,t){return new Hi({type:"null",...Ke(t)})}(0,e)}const Ji=Te("ZodAny",((e,t)=>{qn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=()=>{}})),Qi=Te("ZodUnknown",((e,t)=>{Gn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=()=>{}}));function Xi(){return new Qi({type:"unknown"})}const eo=Te("ZodNever",((e,t)=>{zn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,n)=>{n.not={}})(0,0,t)}));function to(e){return function(e,t){return new eo({type:"never",...Ke(t)})}(0,e)}const no=Te("ZodVoid",((e,t)=>{Fn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")})(0,e)}));function ro(e){return function(e,t){return new no({type:"void",...Ke(t)})}(0,e)}const io=Te("ZodDate",((e,t)=>{Bn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")})(0,e),e.min=(t,n)=>e.check(Cr(t,n)),e.max=(t,n)=>e.check(Mr(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}));function oo(e){return function(e,t){return new io({type:"date",...Ke(t)})}(0,e)}const ao=Te("ZodArray",((e,t)=>{Yn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=n,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(i.minItems=a),"number"==typeof s&&(i.maxItems=s),i.type="array",i.items=Gr(o.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,fi(e,"ZodArray",{min(e,t){return this.check(Rr(e,t))},nonempty(e){return this.check(Rr(1,e))},max(e,t){return this.check(Nr(e,t))},length(e,t){return this.check(Ur(e,t))},unwrap(){return this.element}})}));function so(e,t){return function(e,t,n){return new ao({type:"array",element:t,...Ke(n)})}(0,e,t)}const co=Te("ZodObject",((e,t)=>{Jn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=n,o=e._zod.def;i.type="object",i.properties={};let a=o.shape;for(let e in a)i.properties[e]=Gr(a[e],t,{...r,path:[...r.path,"properties",e]});let s=new Set(Object.keys(a)),d=new Set([...s].filter((e=>{let n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout})));d.size>0&&(i.required=Array.from(d)),"never"===o.catchall?._zod.def.type?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Gr(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(i.additionalProperties=!1)})(e,t,n,r),Ue(e,"shape",(()=>t.shape)),fi(e,"ZodObject",{keyof(){return bo(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Xi()})},loose(){return this.clone({...this._zod.def,catchall:Xi()})},strict(){return this.clone({...this._zod.def,catchall:to()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!We(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return He(e,qe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Le(this,"shape",n),n}}))}(this,e)},safeExtend(e){return function(e,t){if(!We(t))throw Error("Invalid input to safeExtend: expected a plain object");return He(e,qe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Le(this,"shape",n),n}}))}(this,e)},merge(e){return function(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return He(e,qe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Le(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}(this,e)},pick(e){return function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");return He(e,qe(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Le(this,"shape",e),e},checks:[]}))}(this,e)},omit(e){return function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");return He(e,qe(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Le(this,"shape",r),r},checks:[]}))}(this,e)},partial(...e){return function(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");return He(t,qe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return Le(this,"shape",i),i},checks:[]}))}(Eo,this,e[0])},required(...e){return function(e,t,n){return He(t,qe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(let t in r)i[t]=new e({type:"nonoptional",innerType:r[t]});return Le(this,"shape",i),i}}))}(So,this,e[0])}})}));function uo(e,t){return new co({type:"object",shape:e??{},...Ke(t)})}const lo=Te("ZodUnion",((e,t)=>{Xn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=!1===i.inclusive,a=i.options.map(((e,n)=>Gr(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]})));o?n.oneOf=a:n.anyOf=a})(e,t,n,r),e.options=t.options}));function po(e,t){return new lo({type:"union",options:e,...Ke(t)})}const mo=Te("ZodDiscriminatedUnion",((e,t)=>{lo.init(e,t),er.init(e,t)}));function fo(e,t,n){return new mo({type:"union",options:t,discriminator:e,...Ke(n)})}const ho=Te("ZodIntersection",((e,t)=>{tr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=Gr(i.left,t,{...r,path:[...r.path,"allOf",0]}),a=Gr(i.right,t,{...r,path:[...r.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;n.allOf=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]]})(e,t,n,r)})),vo=Te("ZodRecord",((e,t)=>{ir.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=n,o=e._zod.def;i.type="object";let a=o.keyType,s=a._zod.bag?.patterns;if("loose"===o.mode&&s&&s.size>0){let e=Gr(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(i.propertyNames=Gr(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=Gr(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let d=a._zod.values;if(d){let e=[...d].filter((e=>"string"==typeof e||"number"==typeof e));e.length>0&&(i.required=e)}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}));function go(e,t,n){return new vo(t&&t._zod?{type:"record",keyType:e,valueType:t,...Ke(n)}:{type:"record",keyType:yi(),valueType:e,...Ke(t)})}const yo=Te("ZodEnum",((e,t)=>{or.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n)=>((e,t,n)=>{let r=Me(e._zod.def.entries);r.every((e=>"number"==typeof e))&&(n.type="number"),r.every((e=>"string"==typeof e))&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e){if(!n.has(r))throw Error(`Key ${r} not found in enum`);i[r]=t.entries[r]}return new yo({...t,checks:[],...Ke(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e){if(!n.has(t))throw Error(`Key ${t} not found in enum`);delete i[t]}return new yo({...t,checks:[],...Ke(r),entries:i})}}));function bo(e,t){return new yo({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e,...Ke(t)})}const wo=Te("ZodLiteral",((e,t)=>{ar.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n)=>((e,t,n)=>{let r=e._zod.def,i=[];for(let e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(e))}else i.push(e);if(0!==i.length)if(1===i.length){let e=i[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else i.every((e=>"number"==typeof e))&&(n.type="number"),i.every((e=>"string"==typeof e))&&(n.type="string"),i.every((e=>"boolean"==typeof e))&&(n.type="boolean"),i.every((e=>null===e))&&(n.type="null"),n.enum=i})(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function $o(e,t){return new wo({type:"literal",values:Array.isArray(e)?e:[e],...Ke(t)})}const Io=Te("ZodTransform",((e,t)=>{sr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new _e(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(it(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??="custom",t.input??=n.value,t.inst??=e,n.issues.push(it(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then((e=>(n.value=e,n.fallback=!0,n))):(n.value=i,n.fallback=!0,n)}}));function ko(e){return new Io({type:"transform",transform:e})}const Eo=Te("ZodOptional",((e,t)=>{cr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vr(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}));function xo(e){return new Eo({type:"optional",innerType:e})}const Ao=Te("ZodExactOptional",((e,t)=>{ur.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vr(e,t,0,r),e.unwrap=()=>e._zod.def.innerType})),To=Te("ZodNullable",((e,t)=>{lr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=Gr(i.innerType,t,r),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}));function Oo(e){return new To({type:"nullable",innerType:e})}const _o=Te("ZodDefault",((e,t)=>{pr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;Gr(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),Do=Te("ZodPrefault",((e,t)=>{fr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;Gr(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType})),So=Te("ZodNonOptional",((e,t)=>{hr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;Gr(i.innerType,t,r),t.seen.get(e).ref=i.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType})),Mo=Te("ZodCatch",((e,t)=>{gr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i,o=e._zod.def;Gr(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),Po=Te("ZodPipe",((e,t)=>{yr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=i.in._zod.traits.has("$ZodTransform"),a="input"===t.io?o?i.out:i.in:i.out;Gr(a,t,r),t.seen.get(e).ref=a})(e,t,0,r),e.in=t.in,e.out=t.out}));function Co(e,t){return new Po({type:"pipe",in:e,out:t})}const jo=Te("ZodPreprocess",((e,t)=>{Po.init(e,t),wr.init(e,t)})),No=Te("ZodReadonly",((e,t)=>{$r.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;Gr(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType})),Ro=Te("ZodLazy",((e,t)=>{kr.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.innerType;Gr(i,t,r),t.seen.get(e).ref=i})(e,t,0,r),e.unwrap=()=>e._zod.def.getter()})),Uo=Te("ZodCustom",((e,t)=>{Er.init(e,t),hi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e)}));function Lo(e){return function(e,t){return new Gi({type:"number",coerce:!0,checks:[],...Ke(t)})}(0,e)}function qo(e){return function(e,t){return new Wi({type:"boolean",coerce:!0,...Ke(t)})}(0,e)}const Go=bo(["PENDING","APPROVED","REJECTED"]).meta({description:"Approval status. PENDING: awaiting review, APPROVED: approved for operation, REJECTED: rejected and cannot operate"}),zo=bo("AED.ALL.AMD.ANG.AOA.ARS.AUD.AWG.AZN.BAM.BBD.BDT.BGN.BHD.BIF.BMD.BND.BOB.BRL.BSD.BTN.BWP.BZD.CAD.CHF.CLP.CNY.COP.CRC.CVE.CZK.DJF.DKK.DOP.DZD.EGP.ERN.ETB.EUR.FJD.FKP.GBP.GEL.GHS.GIP.GMD.GNF.GTQ.GYD.HKD.HNL.HUF.IDR.ILS.INR.ISK.JMD.JOD.JPY.KES.KGS.KHR.KMF.KRW.KWD.KYD.KZT.LAK.LBP.LKR.LRD.LSL.LYD.MAD.MDL.MGA.MKD.MNT.MOP.MUR.MVR.MWK.MXN.MYR.NAD.NGN.NIO.NOK.NPR.NZD.OMR.PAB.PEN.PGK.PHP.PKR.PLN.PYG.QAR.RON.RSD.RWF.SAR.SBD.SCR.SEK.SGD.SHP.SLE.SRD.SVC.SZL.THB.TJS.TMT.TND.TOP.TRY.TTD.TWD.TZS.UAH.UGX.USD.UYU.UZS.VND.VUV.WST.XAF.XCD.XOF.XPF.ZAR.ZMW.ZWL".split(".")).meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code for transactions and payouts"}),Fo=bo([{category:"Day Party",group:"Event Type",priority:"core",notes:'Daytime or afternoon-focused event, often starting before evening and ending earlier than club nights; common signals include "day party", "day sesh", "Sunday session", "afternoon", "sunset", "courtyard", "rooftop", "poolside" or "open air".'},{category:"Festival",group:"Event Type",priority:"core",notes:'Large-scale event with multiple artists, stages, areas, brands or sessions; may run all day, across multiple days, or as a major ticketed programme; match terms like "festival", "lineup", "multi-stage", "weekender", "one-day festival" or "camping".'},{category:"Afterparty",group:"Event Type",priority:"high",notes:'Post-main-event continuation, usually late-night or early-morning, often tied to a festival, concert, gig, show, launch or headline act; match "official afterparty", "after party", "kick-ons", "continue the night" or "late-night session".'},{category:"Boat Party",group:"Event Type",priority:"high",notes:'Event held on a boat, yacht, harbour cruise or floating venue; strong signals include "boat party", "cruise", "harbour", "on the water", "boarding time", "sailing", "wharf", "dock" or "yacht".'},{category:"Pool Party",group:"Event Type",priority:"high",notes:'Party centred around a pool, resort, hotel or swim-friendly venue; usually daytime or summer-focused; match "pool party", "poolside", "swimwear", "cabana", "resort", "hotel pool", "daybed" or "summer session".'},{category:"Live Performance",group:"Event Type",priority:"high",notes:'Event includes live acts, bands, vocalists, instrumentalists or live electronic performance rather than only DJ sets; match "live", "live set", "performing live", "band", "vocalist", "singer", "instrumental", "live show" or "concert".'},{category:"Warehouse",group:"Venue Type",priority:"core",notes:'Industrial, raw or repurposed warehouse-style venue; often underground, large-room, concrete, late-night or rave-oriented; match "warehouse", "industrial space", "secret warehouse", "inner west warehouse", "factory", "converted space" or "underground location".'},{category:"Open Air",group:"Venue Type",priority:"core",notes:'Outdoor event in an uncovered or partly outdoor setting; match "open air", "outdoor", "under the sky", "courtyard", "garden", "terrace", "park", "field", "amphitheatre" or "sunset session".'},{category:"Rooftop",group:"Venue Type",priority:"high",notes:'Event held on a rooftop, terrace or elevated city-view venue; often summer, sunset, cocktail or skyline-focused; match "rooftop", "terrace", "skyline", "city views", "above the city", "sunset rooftop" or "open-air rooftop".'},{category:"Beach Party",group:"Venue Type",priority:"high",notes:'Coastal, beachfront or seaside event; may be on the sand, near the beach, at a beach club or coastal venue; match "beach party", "beachfront", "seaside", "coastal", "on the sand", "ocean views" or "beach club".'},{category:"Secret Location",group:"Venue Type",priority:"high",notes:'Venue is hidden, TBA, revealed later or sent only to ticket holders; common in underground, warehouse and rave events; match "secret location", "TBA", "location revealed", "address released", "SMS location" or "ticket holders only".'},{category:"DIY",group:"Venue Type",priority:"medium",notes:'Independent, self-organised or non-traditional event, often in unconventional spaces, bush settings or community-run venues; match "DIY", "bush doof", "renegade", "self-organised", "community-run", "off-grid" or "independent party".'},{category:"Basement",group:"Venue Type",priority:"medium",notes:'Small, low-ceiling, underground or downstairs venue; usually intimate, dark, club-focused or late-night; match "basement", "cellar", "downstairs", "underground room", "low ceiling" or "intimate club room".'},{category:"Free Entry",group:"Entry",priority:"core",notes:'No ticket or cover charge required to attend; match "free entry", "free event", "no cover", "free before", "RSVP free", "complimentary entry" or "walk-ins welcome". Do not confuse with free RSVP if paid entry may still apply.'},{category:"Donation",group:"Entry",priority:"medium",notes:'Entry is by donation, pay-what-you-can or voluntary contribution rather than a fixed ticket price; match "donation", "pay what you want", "PWYW", "suggested donation", "gold coin" or "contribute at the door".'},{category:"Vinyl Only",group:"Music",priority:"high",notes:'DJs perform using vinyl records only, usually signalling collector, selector, audiophile or purist culture; match "vinyl only", "all vinyl", "records only", "turntables", "wax", "crate diggers" or "strictly vinyl".'},{category:"Silent Disco",group:"Music",priority:"medium",notes:'Attendees listen through wireless headphones rather than a traditional speaker system; often multiple channels or DJs; match "silent disco", "headphone party", "wireless headphones", "choose your channel" or "multi-channel headphones".'},{category:"Underground",group:"Vibe",priority:"high",notes:'Non-mainstream, independent or subcultural event with raw, niche, alternative or anti-commercial positioning; match "underground", "leftfield", "subculture", "no frills", "raw", "for the heads", "heads only" or "off the beaten path".'},{category:"Intimate",group:"Vibe",priority:"high",notes:'Small-capacity, close-quarters or personal event; often limited tickets, small room, listening bar or community feel; match "intimate", "limited capacity", "small room", "close and personal", "cosy", "private" or "exclusive".'},{category:"Queer Friendly",group:"Vibe",priority:"high",notes:'Event explicitly welcomes, centres or is safe for LGBTQI+ communities; match "queer", "LGBTQI+", "LGBTQIA+", "gay", "trans inclusive", "rainbow community", "queer-friendly" or "queer party". Use when identity/community focus is explicit.'},{category:"FLINTA",group:"Vibe",priority:"high",notes:'Event explicitly centres or welcomes women, lesbians, intersex, non-binary, trans and agender people; match "FLINTA", "FLINTA*", "women and gender diverse", "trans and non-binary", "femme-led" or "gender-diverse community".'},{category:"Safe Space",group:"Vibe",priority:"high",notes:'Event emphasises inclusion, consent, harm minimisation, anti-harassment or community safety policies; match "safe space", "safer space", "consent policy", "zero tolerance", "harm reduction", "inclusive space" or "respectful dancefloor".'},{category:"No Photos",group:"Vibe",priority:"medium",notes:'Event discourages or bans photography/video to protect privacy, immersion or dancefloor culture; match "no photos", "no filming", "no cameras", "phone stickers", "camera policy", "be present" or "respect the dancefloor".'},{category:"Rave",group:"Vibe",priority:"high",notes:'High-energy dance event rooted in rave culture; often late-night, warehouse, underground, fast, heavy or euphoric; match "rave", "all-night", "warehouse rave", "doof", "hard dance", "strobe", "lasers" or "rave culture".'},{category:"BYO",group:"Amenities",priority:"core",notes:'Attendees can or must bring their own alcohol, drinks or supplies; match "BYO", "bring your own", "bring drinks", "no bar", "esky", "cooler", "bottle shop run" or "self-catered drinks".'},{category:"Cash Only",group:"Amenities",priority:"medium",notes:'Venue, bar, door or stall accepts cash but not card payments; match "cash only", "bring cash", "no EFTPOS", "no card", "cash at the door" or "ATM nearby".'},{category:"Card Only",group:"Amenities",priority:"medium",notes:'Venue, bar, door or stall is cashless and accepts card or digital payments only; match "card only", "cashless", "no cash", "tap only", "EFTPOS only" or "card payments only".'},{category:"Food Available",group:"Amenities",priority:"medium",notes:'Food is available at or near the event through vendors, kitchen, food trucks or venue menu; match "food available", "food trucks", "kitchen open", "snacks", "menu", "vendors", "street food" or "dinner available".'},{category:"Dress Code",group:"Other",priority:"high",notes:'Event requires, encourages or enforces specific clothing, theme, footwear or presentation; match "dress code", "strict dress code", "theme", "costume", "black tie", "no thongs", "collared shirts", "dress to impress" or "entry may be refused".'}].map((e=>e.category))),Bo=so(Fo).max(10).optional().meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10 categories)",examples:[["Day Party","Open Air","Free Entry"]]}),Wo=bo([{genre:"House",category:"House",priority:"core",notes:"Broad 4/4 dance music rooted in Chicago house; warm grooves, steady kicks, club-focused; use when event says house music generally without a clear subgenre."},{genre:"Deep House",category:"House",priority:"core",notes:"Smooth, warm, soulful or jazzy house; deeper basslines, softer drums, slower club tempo; often described as intimate, sophisticated, sunset, lounge or underground."},{genre:"Tech House",category:"House",priority:"core",notes:"Groovy house with techno-influenced drums, rolling basslines, minimal vocals and big club energy; common in Ibiza, festivals, commercial underground and peak-time club events."},{genre:"Progressive House",category:"House",priority:"core",notes:"Melodic house with long builds, emotional breakdowns and gradual progression; often associated with mainstage, euphoric, cinematic or journey-style sets."},{genre:"Minimal House",category:"House",priority:"core",notes:"Stripped-back, repetitive house with sparse percussion, subtle grooves and restrained arrangements; common in European club, afterhours and vinyl-focused events."},{genre:"Romanian Minimal",category:"House",priority:"core",notes:'Hypnotic, micro-detailed minimal house/techno linked to Romania; long-form grooves, subtle swing, deep rolling bass, afterhours, vinyl, underground and "ro-minimal" wording.'},{genre:"Afro House",category:"House",priority:"core",notes:"House music with African percussion, polyrhythms, chants, soulful vocals and warm melodic grooves; often spiritual, organic, sunset, beach club or global house oriented."},{genre:"Afro Tech",category:"House",priority:"core",notes:"Darker, tougher and more electronic Afro House; heavier drums, driving bass, tribal percussion and peak-time club energy; sits between Afro House and melodic techno."},{genre:"Acid House",category:"House",priority:"high",notes:"House built around squelchy Roland TB-303 acid basslines; raw, psychedelic, ravey or retro Chicago/UK warehouse references."},{genre:"Funky House",category:"House",priority:"high",notes:"Upbeat, feel-good house with funk, disco samples, bass guitar grooves, bright hooks and party-friendly energy; often vocal, summery or nostalgic."},{genre:"Jackin House",category:"House",priority:"high",notes:"Bouncy Chicago-style house with shuffled drums, chunky grooves, cut-up samples and playful energy; often raw, funky, loop-based and dancefloor-driven."},{genre:"Soulful House",category:"House",priority:"medium",notes:"Vocal-led house with gospel, soul and R&B influence; rich chords, emotional vocals, uplifting messages and warm classic house feel."},{genre:"Melodic House",category:"House",priority:"high",notes:"Modern melodic, emotional house with polished production, arpeggios, atmospheric pads and deep/progressive feel; often Anjunadeep, sunset, rooftop or organic club energy."},{genre:"Latin House",category:"House",priority:"medium",notes:"House with Latin percussion, Spanish or Portuguese vocals, salsa, samba, reggaeton or Afro-Latin rhythmic influence; upbeat, percussive and dancefloor-friendly."},{genre:"Techno",category:"Techno",priority:"core",notes:"Broad 4/4 electronic club music rooted in Detroit and Berlin; repetitive, mechanical, driving, hypnotic or warehouse-focused; use when techno is named without a clearer subtype."},{genre:"Melodic Techno",category:"Techno",priority:"core",notes:"Emotional, cinematic techno with big synth melodies, arpeggios, dark builds and dramatic drops; often Afterlife, Tale Of Us, lasers, visuals or large-room events."},{genre:"Hard Techno",category:"Techno",priority:"core",notes:"Fast, aggressive techno with pounding kicks, distorted drums, high energy and rave/warehouse intensity; often 145+ BPM and associated with modern hard rave trends."},{genre:"Industrial Techno",category:"Techno",priority:"high",notes:"Dark, harsh techno with distorted kicks, metallic percussion, noise textures and warehouse or dystopian aesthetics; more abrasive than standard techno."},{genre:"Minimal Techno",category:"Techno",priority:"high",notes:"Stripped-back techno built from repetition, subtle changes, sparse drums and hypnotic grooves; less melodic and more mechanical than minimal house."},{genre:"Detroit Techno",category:"Techno",priority:"medium",notes:"Techno rooted in Detroit's futuristic, soulful and machine-funk sound; classic, purist, historical or old-school techno references."},{genre:"Dub Techno",category:"Techno",priority:"medium",notes:"Deep techno with dub chords, echo, reverb, spacious atmospheres and slow hypnotic movement; often smoky, deep, aquatic or meditative."},{genre:"Acid Techno",category:"Techno",priority:"medium",notes:"Techno driven by squelchy 303 acid lines, looping percussion and rave energy; harder and more driving than acid house."},{genre:"Hypnotic Techno",category:"Techno",priority:"medium",notes:"Repetitive, deep, rolling techno designed for trance-like immersion; subtle loops, long blends, minimal melody and underground warehouse feel."},{genre:"Drum & Bass",category:"Bass",priority:"core",notes:"Fast breakbeat music around 160-180 BPM with heavy basslines and chopped drums; use for D&B, drum and bass, rollers, jump-up or bass-heavy rave events."},{genre:"Jungle",category:"Bass",priority:"core",notes:"Breakbeat-heavy precursor to D&B with chopped amen breaks, reggae/dub samples, ragga vocals and 90s UK rave energy."},{genre:"Dubstep",category:"Bass",priority:"core",notes:"Bass-heavy UK-origin genre around 140 BPM; half-time drums, sub-bass, wobble bass, dark atmospheres or aggressive drops."},{genre:"Bass House",category:"Bass",priority:"core",notes:"House-tempo club music with heavy bass drops, punchy drums and EDM/festival energy; blends house groove with dubstep or bass music sound design."},{genre:"Breakbeat",category:"Bass",priority:"core",notes:"Electronic music built on syncopated broken drum patterns instead of straight 4/4; often rave, electro, UK club, breaks or old-school references."},{genre:"UK Garage",category:"Bass",priority:"core",notes:'Skippy UK club music with swung 2-step rhythms, chopped vocals, sub-bass and soulful/R&B influence; often "UKG", "garage", "2-step" or "speed garage".'},{genre:"Bassline",category:"Bass",priority:"high",notes:"UK 4x4 garage-derived bass music with warping basslines, fast club energy and playful vocal chops; often northern UK or speed garage adjacent."},{genre:"Grime",category:"Bass",priority:"high",notes:"UK rap and electronic bass hybrid around 140 BPM; MC-led, sparse beats, aggressive flows, eski sounds and London street culture references."},{genre:"Liquid DnB",category:"Bass",priority:"medium",notes:"Melodic, smooth and soulful drum & bass; rolling breaks, warm bass, vocals, pads and emotional or uplifting atmosphere."},{genre:"Neurofunk",category:"Bass",priority:"medium",notes:"Technical, dark and aggressive drum & bass with complex bass sound design, precise drums and futuristic, intense energy."},{genre:"Footwork",category:"Bass",priority:"medium",notes:"Fast Chicago club style around 160 BPM with syncopated kicks, chopped vocal samples and jittery rhythms; related to juke and dance battles."},{genre:"Jersey Club",category:"Bass",priority:"medium",notes:"Fast, bouncy US club music with chopped samples, triplet kick patterns and call-and-response energy; often party, dance challenge or club edit focused."},{genre:"Trance",category:"Trance",priority:"core",notes:"Euphoric electronic dance music with emotional melodies, long builds, breakdowns and big climaxes; often 90s, festival, uplifting or hands-in-the-air language."},{genre:"Psytrance",category:"Trance",priority:"core",notes:"Fast psychedelic trance with rolling basslines, hypnotic repetition, alien/psychedelic sound design and outdoor festival or doof culture references."},{genre:"Progressive Trance",category:"Trance",priority:"high",notes:"Smoother, slower trance with gradual melodic builds, deep atmospheres and less explosive drops than uplifting trance; often journey-based and emotional."},{genre:"Disco",category:"Disco",priority:"core",notes:"Classic dance music with live-sounding drums, strings, funk bass, soul vocals and 70s/80s references; use for retro disco, disco party or classic dance events."},{genre:"Nu Disco",category:"Disco",priority:"core",notes:"Modern electronic disco with polished production, house tempo, funk basslines, synths and retro dancefloor feel; often contemporary disco edits or poolside energy."},{genre:"Italo Disco",category:"Disco",priority:"medium",notes:"European 80s disco style with synth bass, drum machines, dramatic vocals and retro-futurist melodies; often Italian, cult, synth-heavy or nostalgic."},{genre:"Funk",category:"Disco",priority:"high",notes:"Groove-based music with syncopated bass, live drums, brass, guitars and rhythmic vocals; often party, rare groove, soul-funk or dancefloor classics."},{genre:"Soul",category:"Disco",priority:"medium",notes:"Vocal-focused music rooted in R&B, gospel and Motown traditions; emotional vocals, warm instrumentation and classic groove; may overlap with disco and house roots."},{genre:"Balearic",category:"Disco",priority:"medium",notes:"Eclectic Ibiza-influenced sound blending downtempo, disco, house, pop, world and chillout; sunset, beach, terrace, poolside or open-air language."},{genre:"Hardcore",category:"Hard Dance",priority:"high",notes:"Very fast, intense rave music with distorted kicks, aggressive synths and high BPM; use when event says hardcore, ravecore or extreme hard dance."},{genre:"Hardstyle",category:"Hard Dance",priority:"high",notes:"Dutch-origin hard dance with distorted reverse-bass kicks, euphoric melodies, screeches and festival anthems; usually around 150 BPM."},{genre:"Gabber",category:"Hard Dance",priority:"low",notes:"Extreme Dutch hardcore style with very fast BPM, distorted kicks, raw rave energy and Rotterdam/hakken culture references."},{genre:"Happy Hardcore",category:"Hard Dance",priority:"low",notes:"Fast, euphoric hardcore with bright melodies, pitched-up vocals, piano riffs and 90s UK rave nostalgia; playful rather than dark."},{genre:"Amapiano",category:"Global",priority:"core",notes:"South African club music with log drums, shakers, jazzy chords, smooth vocals and laid-back but danceable grooves; often piano-led and percussive."},{genre:"Gqom",category:"Global",priority:"high",notes:"Dark, minimal South African club sound from Durban; heavy broken rhythms, raw percussion, sparse vocals and intense hypnotic energy."},{genre:"Afrobeats",category:"Global",priority:"core",notes:"West African pop and club sound, especially Nigerian/Ghanaian; melodic vocals, dancehall/highlife/hip-hop influence, warm rhythms and mainstream crossover."},{genre:"Kuduro",category:"Global",priority:"medium",notes:"Angolan and Portuguese club music with fast, hard percussion, energetic chants and raw dancefloor intensity; often Afro-Portuguese or Lisbon club references."},{genre:"Singeli",category:"Global",priority:"low",notes:"Extremely fast Tanzanian electronic dance music, often 180-220+ BPM; frantic rhythms, rapid vocals and high-energy East African street sound."},{genre:"Baile Funk",category:"Global",priority:"high",notes:"Brazilian funk carioca with heavy drums, MC vocals, Portuguese lyrics and raw party energy; often Rio, favela, proibidao or funk mandelao references."},{genre:"Reggaeton",category:"Global",priority:"high",notes:"Latin urban dance music with dembow rhythm, Spanish vocals, pop/hip-hop influence and mainstream club appeal; often perreo or Latin party events."},{genre:"Dancehall",category:"Global",priority:"high",notes:"Jamaican club music with riddims, patois vocals, reggae influence and sound system culture; can be party, bashment, Caribbean or crossover pop."},{genre:"Dembow",category:"Global",priority:"medium",notes:"Dominican-origin club style built on repetitive dembow rhythm, Spanish MC vocals and raw Latin street-party energy; more minimal and percussive than reggaeton."},{genre:"Ambient",category:"Downtempo",priority:"high",notes:"Atmospheric, beatless or low-rhythm electronic music focused on texture, mood and space; suited to listening rooms, chill rooms, sound baths or pre/post-event settings."},{genre:"Downtempo",category:"Downtempo",priority:"high",notes:"Slower electronic music with relaxed beats, warm textures and lounge/chillout feel; use for chill, sunset, listening, cafe, pre-party or afterhours decompression events."},{genre:"Electronica",category:"Downtempo",priority:"high",notes:"Broad non-club-focused electronic music; experimental, melodic, listening-oriented or pop-adjacent; use when event says electronic but not clearly house/techno/bass."},{genre:"Trip Hop",category:"Downtempo",priority:"low",notes:"Moody 90s Bristol sound blending hip-hop beats, dub, soul, jazz and atmospheric vocals; dark, smoky, cinematic or Massive Attack/Portishead references."},{genre:"Lo-Fi",category:"Downtempo",priority:"medium",notes:"Relaxed, hazy, imperfect-sounding beats with soft drums, samples, jazz chords and study/chill aesthetics; often lo-fi hip-hop or bedroom production references."},{genre:"Electro",category:"Electronic",priority:"core",notes:"Syncopated electronic music with 808 drums, robotic funk, vocoders, breakbeats and Detroit/80s futurism; distinct from electro-house."},{genre:"Synth Pop",category:"Electronic",priority:"medium",notes:"Pop-oriented electronic music with catchy vocals, 80s synths, drum machines and new wave influence; often retro, nostalgic or indie-pop crossover."},{genre:"Industrial",category:"Electronic",priority:"medium",notes:"Dark electronic or rock-influenced music with harsh textures, machine rhythms, noise and dystopian aesthetics; may overlap with EBM and industrial techno."},{genre:"EBM",category:"Electronic",priority:"low",notes:"Electronic Body Music: hard, repetitive industrial dance with shouted vocals, rigid basslines and militaristic rhythms; 80s/Belgian/German club references."},{genre:"Indie Dance",category:"Electronic",priority:"high",notes:"Danceable blend of indie rock, disco, synth pop and electronic production; often band/DJ crossover, nu-disco-adjacent, stylish or alternative club sound."},{genre:"Experimental",category:"Electronic",priority:"medium",notes:"Unconventional electronic music that avoids standard genre structures; abstract, avant-garde, noise, leftfield, art-focused or boundary-pushing events."},{genre:"Hip-Hop",category:"Non-Electronic",priority:"high",notes:"Rap-led music with beats, MCs, sampling, trap, boom bap or old-school references; use for hip-hop parties, rap nights or DJ sets centred on rap."},{genre:"R&B",category:"Non-Electronic",priority:"high",notes:"Smooth vocal-led music with soul, hip-hop and pop influence; 90s/2000s R&B, slow jams, contemporary R&B or club crossover events."},{genre:"Jazz",category:"Non-Electronic",priority:"medium",notes:"Improvised or live instrumental music with swing, bebop, fusion, soul-jazz or jazz club references; often live band or listening-focused."},{genre:"Pop",category:"Non-Electronic",priority:"medium",notes:"Mainstream, chart-focused music with recognisable hits, singalong vocals and broad commercial appeal; use for general pop parties or top-40 events."},{genre:"Rock",category:"Non-Electronic",priority:"low",notes:"Guitar-driven band music; indie rock, classic rock, punk, alternative or live venue references; usually non-electronic unless explicitly DJ edits."},{genre:"Reggae",category:"Non-Electronic",priority:"medium",notes:"Jamaican-origin music with offbeat guitar rhythms, dub influence, roots vocals and sound system culture; includes roots, dub and reggae parties."},{genre:"Live",category:"Non-Electronic",priority:"medium",notes:"Event is centred on live performance rather than DJ genre; bands, singers, instrumentalists or live electronic acts; use only when performance format is the key signal."}].map((e=>e.genre))),Yo=so(Wo).min(1).max(5).meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]});so(Wo).max(5).optional().meta({description:"Music genres for the event (up to 5 genres)",examples:[["Tech House","Melodic Techno"]]});const Vo={BAD_REQUEST:{status:400},INPUT_VALIDATION_FAILED:{status:422,data:uo({formErrors:so(yi()),fieldErrors:go(yi(),so(yi()))})},UNAUTHORIZED:{status:401},FORBIDDEN:{status:403},NOT_FOUND:{status:404},CONFLICT:{status:409},TOO_MANY_REQUESTS:{status:429},INTERNAL_SERVER_ERROR:{status:500},NOT_IMPLEMENTED:{status:501},SERVICE_UNAVAILABLE:{status:503}};function Zo(e,t){return yi().regex(RegExp(`^${e}_[0-9a-z]{26}$`),`Must be a valid ${t} ID`).describe(`Unique ${t} identifier`)}const Ho=Zo("tem","team"),Ko=Zo("evt","event"),Jo=Zo("ven","venue"),Qo=Zo("loc","location"),Xo=Zo("usr","user"),ea=Zo("ord","order"),ta=Zo("tkt","ticket"),na=Zo("pmt","promoter");Zo("cpn","coupon"),Zo("cod","coupon code");const ra=Zo("cus","customer"),ia=Zo("adm","admission"),oa=Zo("sct","section");Zo("ben","beneficiary");const aa=Zo("pyt","payout"),sa=Zo("mbr","team member"),da=Zo("inv","team invite"),ca=Zo("ecl","event collaborator"),ua=Zo("psc","permission scope"),la=Zo("prl","permission role"),pa=Zo("ntf","notification"),ma=uo({src:xi().meta({examples:["https://assets.session.services/my-image.jpg"]}),alt:yi().meta({examples:["My Image"]}),width:zi().meta({examples:[1080]}),height:zi().meta({examples:[1080]})});function fa(){return zi().min(-1)}function ha(){return zi().min(-1).refine((e=>0!==e),{message:"Limit cannot be 0. Use -1 for unlimited or a positive number for a specific limit"})}const va=po([yi(),zi(),Yi(),Ki()]),ga=new Ro({type:"lazy",getter:()=>po([va,so(ga),go(yi(),ga)])}),ya=go(yi().min(1).max(40).meta({description:"Metadata key. Must be 1-40 characters"}),yi().max(500).meta({description:"Metadata value. Must not exceed 500 characters"})).refine((e=>Object.keys(e).length<=50),{message:"Metadata cannot exceed 50 keys"}).optional().meta({description:"Flexible key-value metadata storage for custom configuration. Similar to Stripe's metadata API. Maximum 50 keys, key names up to 40 characters, values up to 500 characters."}),ba=yi().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/,"Must be a naive datetime without timezone (YYYY-MM-DDTHH:mm:ss)").meta({description:"Wall clock time without timezone (displays same everywhere)",examples:["2025-03-15T19:30:00"]});function wa(e){return Lo().int().min(1).max(100).prefault(20).meta({examples:[20],description:`Maximum number of ${e} to return per request (1-100, default: 20)`})}const $a=yi().meta({description:"Opaque cursor for pagination. Use the cursor from the previous response to continue fetching results."}),Ia="[a-z][a-z0-9-]*",ka=RegExp(`^-?(?:\\*|(?:${Ia})(?:\\.${Ia})*(?:\\.\\*|\\.bypass|\\.[a-z]{3}_[0-9a-z]{26})?)$`),Ea=/^[a-z]{3}_[0-9a-z]{26}$/,xa=["tem","pmt","ven","evt","ord","tkt","cpn"],Aa=new Set("tenant.masquerade,team.read,team.write,team.member.read,team.member.write,team.invite.read,team.invite.write,team.gateway.read,team.gateway.connect,team.gateway.write,team.performance.read,cms.read,cms.write,role.read,role.write,event.read,event.write,event.performance.read,promoter.read,promoter.write,promoter.performance.read,venue.read,venue.write,order.read,order.write,ticket.read,ticket.write,ticket.scan,coupon.read,coupon.write,beneficiary.read,beneficiary.write,payout.read,payout.write,*".split(",")),Ta=new Set(["tenant","team","team.member","team.invite","team.gateway","team.performance","cms","role","event","event.performance","promoter","promoter.performance","venue","order","ticket","coupon","beneficiary","payout"]),Oa={"tenant.masquerade":[],"team.read":["tem"],"team.write":["tem"],"team.member.read":["tem"],"team.member.write":["tem"],"team.invite.read":["tem"],"team.invite.write":["tem"],"team.gateway.read":["tem","pmt"],"team.gateway.connect":["tem"],"team.gateway.write":["tem","pmt"],"team.performance.read":["tem","pmt","ven","evt"],"cms.read":[],"cms.write":[],"role.read":["tem"],"role.write":["tem"],"event.read":["tem","pmt","ven","evt"],"event.write":["tem","pmt","ven","evt"],"event.performance.read":["tem","pmt","ven","evt"],"promoter.read":["tem","pmt","evt"],"promoter.write":["tem","pmt","evt"],"promoter.performance.read":["tem","pmt","evt"],"venue.read":["tem","ven","evt"],"venue.write":["tem","ven","evt"],"order.read":["tem","pmt","ven","evt","ord"],"order.write":["tem","pmt","ven","evt","ord"],"ticket.read":["tem","pmt","ven","evt","ord","tkt"],"ticket.write":["tem","pmt","ven","evt","ord","tkt"],"ticket.scan":["tem","pmt","ven","evt","ord","tkt"],"coupon.read":["tem","pmt","evt","cpn"],"coupon.write":["tem","pmt","evt","cpn"],"beneficiary.read":["tem","pmt"],"beneficiary.write":["tem","pmt"],"payout.read":["tem","pmt","ven"],"payout.write":["tem","pmt"],"*":[]};function _a(e){let[t]=e.split("_");return!!t&&xa.includes(t)}function Da(e,t){return!(!Aa.has(e)||!function(e){return Ea.test(e)&&_a(e)}(t))&&function(e,t){let n=function(e){let[t]=e.split("_");return t&&_a(e)?t:null}(t);return!!n&&(Oa[e]??[]).includes(n)}(e,t)}const Sa=[function(e){return Aa.has(e)},function(e){return!!e.endsWith(".bypass")&&Aa.has(e.slice(0,-7))},function(e){let t=function(e){let t=e.match(/^((?:[a-z][a-z0-9-]*)(?:\.[a-z][a-z0-9-]*)*)\.([a-z]{3}_[0-9a-z]{26})$/);return t?function(e){let t=e[1],n=e[2];return t&&n?{base:t,resourceId:n}:null}(t):null}(e);return!!t&&Da(t.base,t.resourceId)},function(e){if(!e.endsWith(".*"))return!1;let t=e.slice(0,-2);return Ta.has(t)||Aa.has(t)}],Ma=yi().regex(ka,"Invalid permission node. Use lowercase dot notation with optional wildcard, resource target, bypass target, and deny prefix.").refine((function(e){let t=function(e){return e.startsWith("-")?e.slice(1):e}(e);return Sa.some((e=>e(t)))}),{message:"Unsupported permission node. Only nodes from the canonical permission catalog are allowed."}).meta({description:"Permission node in minecraft-style format. Supports exact, scoped wildcard, resource target, bypass target, and deny prefix.",examples:["team.read","team.member.write","ticket.scan","ticket.scan.*","ticket.scan.evt_01h8c3jm9zs2v6h2k9p9r8f5a1","team.gateway.connect.bypass","team.*","*","-team.gateway.write","-ticket.scan.evt_01h8c3jm9zs2v6h2k9p9r8f5a1"]}),Pa=so(Ma).meta({description:"Array of permission nodes. Supports wildcard and negation. Empty arrays are allowed.",examples:[[],["team.read","team.member.write"],["event.read","event.write"],["*"],["-team.gateway.write"]]}),Ca=Pa.min(1).meta({description:"Non-empty array of permission nodes. Supports wildcard and negation.",examples:[["team.read","team.member.write"],["event.read","event.write"],["*"],["-team.gateway.write"]]}),ja=yi().length(16).meta({examples:[Ee.signature],description:"HMAC signature for secure access (16 characters, base64url encoded)"}),Na=uo({promoterIds:so(na).nullable().meta({description:"Null means team-wide promoter access. An array means access is restricted to those promoters."})}).meta({description:"Promoter access assigned to a team member or invite."}),Ra=uo({promoterIds:so(na).min(1).nullable().meta({description:"Null grants team-wide promoter access. A non-empty array restricts access to those promoters."})}).meta({description:"Promoter access assignment input."}),Ua=bo(["SALE_ENDED","SOLD_OUT","DOOR"]);function La(e){return uo({base:Bi().min(0).meta({examples:[Ee.Admission.price.base],description:"Base cost of a ticket for this admission type before fees, in cents"}),booking:Bi().min(0).meta({examples:[Ee.Admission.price.booking],description:e.booking}),currency:zo.meta({examples:[Ee.Admission.price.currency],description:e.currency})}).meta({examples:[Ee.Admission.price],description:e.price})}const qa=uo({id:ia.readonly().meta({description:"A unique identifier for this admission",examples:[Ee.Admission.id]}),name:yi().meta({description:"The display name of the admission type shown to customers",examples:[Ee.Admission.name]}),subtitle:yi().max(100).optional().meta({description:"Short supporting text shown below the admission name",examples:[Ee.Admission.subtitle]}),description:yi().max(500).optional().meta({description:"Detailed information shown when customers expand 'More info'",examples:[Ee.Admission.description]}),capacity:fa().prefault(-1).meta({examples:[Ee.Admission.capacity],description:"Maximum number of tickets that can be sold for this admission type. A value of -1 indicates unlimited"}),limit:ha().prefault(-1).meta({examples:[Ee.Admission.limit??-1],description:"Maximum number of tickets of this admission type that can be purchased in a single order. A value of -1 indicates unlimited"}),available:zi().min(-1).readonly().meta({examples:[Ee.Admission.available],description:"Current number of tickets available for purchase, calculated as capacity minus sold minus reserved. A value of -1 indicates unlimited"}),sold:zi().min(0).readonly().meta({examples:[Ee.Admission.sold],description:"Total number of tickets of this admission type that have been purchased"}),reserved:zi().min(0).readonly().meta({examples:[Ee.Admission.reserved],description:"Number of tickets held for customers during checkout and not available to others"}),order:zi().min(0).meta({examples:[Ee.Admission.order],description:"Determines the position in which this admission type appears when listed. Lower values appear first"}),createdAt:Hr().readonly().meta({examples:[Ee.Admission.createdAt],description:"Timestamp in ISO 8601 format when this admission type was created"}),updatedAt:Hr().readonly().meta({examples:[Ee.Admission.updatedAt],description:"Timestamp in ISO 8601 format when this admission type was last updated"}),entryStartsAt:ba.meta({examples:[Ee.Admission.entryStartsAt],description:"Wall clock time from which tickets of this type are valid for entry (no timezone)"}),entryEndsAt:ba.meta({examples:[Ee.Admission.entryEndsAt],description:"Wall clock time until which tickets of this type are valid for entry (no timezone)"}),saleStartsAt:ba.meta({examples:[Ee.Admission.saleStartsAt],description:"Wall clock time when ticket sales for this admission type begin (no timezone)"}),saleEndsAt:ba.meta({examples:[Ee.Admission.saleEndsAt],description:"Wall clock time when ticket sales for this admission type end (no timezone)"}),saleEndsBehavior:Ua.default("SALE_ENDED").meta({examples:[Ee.Admission.saleEndsBehavior],description:"Label to display for this admission after ticket sales have ended"}),price:La({booking:"Additional booking fee applied to the ticket price, in cents",currency:"Three-letter ISO 4217 currency code for the ticket price",price:"Pricing details for this admission type, including base cost and fees in cents, and currency"}),visibility:bo(xe).prefault("ALWAYS").meta({examples:["ALWAYS"],description:"Controls whether this admission type is shown publicly, revealed by a scoped coupon, or unlocked after another admission."}),visibleAfterAdmissionId:ia.nullable().optional().meta({description:"Admission that must sell out or close before this admission can be purchased."}),sectionId:oa.nullable().optional().meta({examples:[Ee.Admission.sectionId],description:"Identifier of the section this admission type belongs to, if any"}),teamId:Ho.meta({description:"Team that owns this admission. Denormalized for efficient queries."}),promoterId:na.meta({examples:[Ee.Admission.promoterId],description:"Identifier of the promoter responsible for this admission type"}),eventId:Ko.meta({examples:[Ee.Admission.eventId],description:"Identifier of the event to which this admission type is linked"}),eventSlug:yi().meta({examples:[Ee.Admission.eventSlug],description:"URL-friendly slug for the event associated with this admission type"})}).meta({description:"Admission represents a specific type or category of ticket available for an event",examples:[Ee.Admission]}),Ga=qa.omit({id:!0,createdAt:!0,updatedAt:!0,available:!0,sold:!0,reserved:!0}).meta({description:"Schema for creating a new admission type for an event"}),za=qa.pick({id:!0}).extend({eventId:qa.shape.eventId.meta({examples:[Ee.Admission.eventId],description:"Identifier of the event to which this admission type belongs"})}).meta({description:"Schema for deleting an admission type from an event. This performs a soft delete by setting the deletedAt timestamp"}),Fa=qa.pick({id:!0}).extend({eventId:Ko.meta({examples:[Ee.Admission.eventId],description:"Identifier of the event to which this admission type belongs"})}).meta({description:"Schema for retrieving a specific admission type"}),Ba=uo({eventId:yi().meta({examples:[Ee.Admission.eventId],description:"Identifier of the event to list admission types for"}),sectionId:yi().optional().meta({examples:[Ee.Admission.sectionId],description:"Filter admission types by section identifier. If provided, only admissions for this section are returned"}),query:yi().optional().meta({examples:["Early Bird"],description:"Optional search query to filter admissions by name. When provided, search-backed pagination is used."}),limit:wa("admission types").optional(),cursor:yi().optional().meta({examples:["eyJpZCI6ImFkbV8wMWpwczVjZ3NlZTB4dmFwYms5MmU4ZWI0ZyJ9"],description:"Pagination cursor for retrieving the next set of results. Obtained from previous response"})}).meta({description:"Schema for listing admission types with pagination and filtering options"});function Wa(e,t){return uo({[t]:so(e).meta({description:`Array of ${t} for the current result set`}),before:yi().nullish().meta({examples:["eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNqIn19"],description:"Cursor for navigating backward in the result set. Omitted when there are no prior results."}),after:yi().nullish().meta({examples:["eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNkIn19"],description:"Cursor for navigating forward in the result set. Omitted when there are no subsequent results."}),limit:Lo().min(1).meta({examples:[20],description:"Maximum number of items to return in each result set"})})}const Ya=Wa(qa,"admissions"),Va=qa.pick({eventId:!0}).extend({message:yi().meta({examples:["7.5% of the ticket price or $2 AUD, whichever is higher"],description:"Detailed explanation of the booking fee calculation applied to this admission type"}),price:La({booking:"Calculated booking fee applied to the ticket price, in cents",currency:"Three-letter ISO 4217 currency code for the quoted price",price:"Pricing quote for this admission type, showing base cost and calculated booking fee in cents"})}).meta({description:"Response schema for admission pricing quotes, including booking fee calculations and explanatory messages"}),Za=qa.pick({eventId:!0}).extend({base:Bi().min(0).meta({examples:[Ee.Admission.price.base],description:"Base cost of a ticket for this admission type before fees, in cents"}),currency:zo.meta({examples:[Ee.Admission.price.currency],description:"Three-letter ISO 4217 currency code for the ticket price"})}).meta({description:"Request schema for generating a pricing quote for an admission type, including booking fee calculations"}),Ha=uo({quote:Va}),Ka=uo({admission:qa}),Ja=uo({id:qa.shape.id,eventId:qa.shape.eventId,name:qa.shape.name.optional(),subtitle:qa.shape.subtitle,description:qa.shape.description,capacity:fa().optional(),limit:ha().optional(),order:qa.shape.order.optional(),entryStartsAt:qa.shape.entryStartsAt.optional(),entryEndsAt:qa.shape.entryEndsAt.optional(),saleStartsAt:qa.shape.saleStartsAt.optional(),saleEndsAt:qa.shape.saleEndsAt.optional(),saleEndsBehavior:Ua.optional(),price:qa.shape.price.optional(),visibility:bo(xe).optional(),visibleAfterAdmissionId:ia.nullable().optional(),sectionId:oa.nullable().optional().meta({description:"Section ID. Pass null to unassign from section; omit to leave unchanged."})}).meta({description:"Schema for updating an existing admission type."}),Qa=uo({eventId:Ko.optional().meta({description:"Event ID for rate limiting and change detection. If provided, suggestions are limited to once per day per event and only if the description changed significantly.",examples:[Ee.Event.id]}),description:yi().min(100).max(1e4).meta({description:"Event description to analyze for genre and category suggestions. Minimum 100 characters required for meaningful AI analysis.",examples:["Join us for an all-night warehouse party featuring the best in tech house and melodic techno. BYO drinks, intimate vibes, and a killer sound system."]}),eventName:yi().optional().meta({description:"Optional event name for additional context",examples:["Warehouse Sessions Vol. 5"]}),imageUrl:xi().optional().meta({description:"Optional event artwork URL for visual analysis (multimodal)",examples:["https://assets.session.services/events/poster.jpg"]})}).meta({description:"Input for AI-powered event tag suggestions"}),Xa=uo({genres:so(Wo).max(5).meta({description:"Suggested music genres based on event description and artwork",examples:[["Tech House","Melodic Techno"]]}),categories:so(Fo).max(10).meta({description:"Suggested event categories based on description and artwork",examples:[["Warehouse","Underground","BYO"]]}),confidence:zi().min(0).max(1).meta({description:"AI confidence score for the suggestions (0-1)",examples:[.85]}),startDate:yi().optional().meta({description:"Event start date/time. Either ISO 8601 format (if specific date found) or natural language hint for relative dates (e.g., 'next Saturday 9pm').",examples:["2025-02-15T21:00:00","next Saturday 9pm"]}),endDate:yi().optional().meta({description:"Event end date/time. Either ISO 8601 format (if specific date found) or natural language hint.",examples:["2025-02-16T04:00:00","6am Sunday"]}),venueName:yi().optional().meta({description:"Venue or location name extracted from the description or artwork. Used to search for and prefill the event location.",examples:["Warehouse 21","The Metro Theatre"]}),ticketUrl:xi().optional().meta({description:"External ticket purchase URL if found in the description. Only extracted if different from the host platform.",examples:["https://www.eventbrite.com/e/warehouse-sessions-tickets-123"]})}).meta({description:"AI-generated genre and category suggestions for an event"});uo({estimatedInputTokens:zi().int().meta({description:"Estimated input tokens for the request",examples:[500]}),estimatedOutputTokens:zi().int().meta({description:"Estimated output tokens for the response",examples:[100]}),estimatedCostUsd:zi().meta({description:"Estimated cost in USD",examples:[.002]}),includesImage:Yi().meta({description:"Whether the estimate includes image analysis",examples:[!0]})}).meta({description:"Cost estimate for an AI tag suggestion request"});for(var es=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,ts=[],ns=0;ns<256;++ns)ts.push((ns+256).toString(16).slice(1));function rs(e,t=0){return(ts[e[t+0]]+ts[e[t+1]]+ts[e[t+2]]+ts[e[t+3]]+"-"+ts[e[t+4]]+ts[e[t+5]]+"-"+ts[e[t+6]]+ts[e[t+7]]+"-"+ts[e[t+8]]+ts[e[t+9]]+"-"+ts[e[t+10]]+ts[e[t+11]]+ts[e[t+12]]+ts[e[t+13]]+ts[e[t+14]]+ts[e[t+15]]).toLowerCase()}var is,os=new Uint8Array(16);function as(){if(!is&&!(is=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return is(os)}var ss=null,ds=null,cs=0;function us(e,t){e||={};var n=0,r=t||new Uint8Array(16),i=e.random||(e.rng||as)(),o=void 0===e.msecs?Date.now():e.msecs,a=void 0===e.seq?null:e.seq,s=ds,d=ss;return o>cs&&void 0===e.msecs&&(cs=o,null!==a&&(s=null,d=null)),null!==a&&(a>2147483647&&(a=2147483647),s=a>>>19&4095,d=524287&a),(null===s||null===d)&&(s=(s=127&i[6])<<8|i[7],d=(d=(d=63&i[8])<<8|i[9])<<5|i[10]>>>3),o+1e4>cs&&null===a?++d>524287&&(d=0,++s>4095&&(s=0,cs++)):cs=o,ds=s,ss=d,r[n++]=cs/1099511627776&255,r[n++]=cs/4294967296&255,r[n++]=cs/16777216&255,r[n++]=cs/65536&255,r[n++]=cs/256&255,r[n++]=255&cs,r[n++]=s>>>4&15|112,r[n++]=255&s,r[n++]=d>>>13&63|128,r[n++]=d>>>5&255,r[n++]=d<<3&255|7&i[10],r[n++]=i[11],r[n++]=i[12],r[n++]=i[13],r[n++]=i[14],r[n++]=i[15],t||rs(r)}var ls="0123456789abcdefghjkmnpqrstvwxyz",ps=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,255,18,19,255,20,21,255,22,23,24,25,26,255,27,28,29,30,31,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]);function ms(e){let t=Array(26).fill("");if(16!==e.length)throw Error(`Invalid length. Expected 16 bytes, got ${e.length}. Input: ${e}`);return t[0]=ls[(224&e[0])>>5],t[1]=ls[31&e[0]],t[2]=ls[(248&e[1])>>3],t[3]=ls[(7&e[1])<<2|(192&e[2])>>6],t[4]=ls[(62&e[2])>>1],t[5]=ls[(1&e[2])<<4|(240&e[3])>>4],t[6]=ls[(15&e[3])<<1|(128&e[4])>>7],t[7]=ls[(124&e[4])>>2],t[8]=ls[(3&e[4])<<3|(224&e[5])>>5],t[9]=ls[31&e[5]],t[10]=ls[(248&e[6])>>3],t[11]=ls[(7&e[6])<<2|(192&e[7])>>6],t[12]=ls[(62&e[7])>>1],t[13]=ls[(1&e[7])<<4|(240&e[8])>>4],t[14]=ls[(15&e[8])<<1|(128&e[9])>>7],t[15]=ls[(124&e[9])>>2],t[16]=ls[(3&e[9])<<3|(224&e[10])>>5],t[17]=ls[31&e[10]],t[18]=ls[(248&e[11])>>3],t[19]=ls[(7&e[11])<<2|(192&e[12])>>6],t[20]=ls[(62&e[12])>>1],t[21]=ls[(1&e[12])<<4|(240&e[13])>>4],t[22]=ls[(15&e[13])<<1|(128&e[14])>>7],t[23]=ls[(124&e[14])>>2],t[24]=ls[(3&e[14])<<3|(224&e[15])>>5],t[25]=ls[31&e[15]],t.join("")}function fs(e){if(26!==e.length)throw Error(`Invalid length. Expected 26 bytes, got ${e.length}. Input: ${e}`);let t=(new TextEncoder).encode(e);if(255===ps[t[0]]||255===ps[t[1]]||255===ps[t[2]]||255===ps[t[3]]||255===ps[t[4]]||255===ps[t[5]]||255===ps[t[6]]||255===ps[t[7]]||255===ps[t[8]]||255===ps[t[9]]||255===ps[t[10]]||255===ps[t[11]]||255===ps[t[12]]||255===ps[t[13]]||255===ps[t[14]]||255===ps[t[15]]||255===ps[t[16]]||255===ps[t[17]]||255===ps[t[18]]||255===ps[t[19]]||255===ps[t[20]]||255===ps[t[21]]||255===ps[t[22]]||255===ps[t[23]]||255===ps[t[24]]||255===ps[t[25]])throw Error("Invalid base32 character");let n=new Uint8Array(16);return n[0]=ps[t[0]]<<5|ps[t[1]],n[1]=ps[t[2]]<<3|ps[t[3]]>>2,n[2]=(3&ps[t[3]])<<6|ps[t[4]]<<1|ps[t[5]]>>4,n[3]=(15&ps[t[5]])<<4|ps[t[6]]>>1,n[4]=(1&ps[t[6]])<<7|ps[t[7]]<<2|ps[t[8]]>>3,n[5]=(7&ps[t[8]])<<5|ps[t[9]],n[6]=ps[t[10]]<<3|ps[t[11]]>>2,n[7]=(3&ps[t[11]])<<6|ps[t[12]]<<1|ps[t[13]]>>4,n[8]=(15&ps[t[13]])<<4|ps[t[14]]>>1,n[9]=(1&ps[t[14]])<<7|ps[t[15]]<<2|ps[t[16]]>>3,n[10]=(7&ps[t[16]])<<5|ps[t[17]],n[11]=ps[t[18]]<<3|ps[t[19]]>>2,n[12]=(3&ps[t[19]])<<6|ps[t[20]]<<1|ps[t[21]]>>4,n[13]=(15&ps[t[21]])<<4|ps[t[22]]>>1,n[14]=(1&ps[t[22]])<<7|ps[t[23]]<<2|ps[t[24]]>>3,n[15]=(7&ps[t[24]])<<5|ps[t[25]],n}var hs=class extends Error{constructor(e){super(`Invalid prefix "${e}". Must be at most 63 ASCII letters [a-z_]`),this.name="InvalidPrefixError"}},vs=class extends Error{constructor(e,t){super(`Invalid TypeId. Prefix mismatch. Expected ${e}, got ${t}`),this.name="PrefixMismatchError"}},gs=class extends Error{constructor(e){super("Invalid TypeId. Prefix cannot be empty when there's a separator: "+e),this.name="EmptyPrefixError"}},ys=class extends Error{constructor(e){super("Invalid length. Suffix should have 26 characters, got "+e),this.name="InvalidSuffixLengthError"}},bs=class extends Error{constructor(e){super(`Invalid suffix. First character "${e}" must be in the range [0-7]`),this.name="InvalidSuffixCharacterError"}},ws=class extends Error{constructor(e,t){super(`Cannot convert TypeID of type ${e} to type ${t}`),this.name="TypeIDConversionError"}};function $s(e="",t=""){if(!function(e){if(e.length>63)return!1;let t,n,r;for(n=0,r=e.length;n<r;n+=1){t=e.charCodeAt(n);let i=t>96&&t<123;if((0===n||n===r-1)&&!i||!i&&95!==t)return!1}return!0}(e))throw new hs(e);let n;if(t)n=t;else{let e=new Uint8Array(16);us(void 0,e),n=ms(e)}if(26!==n.length)throw new ys(n.length);if(n[0]>"7")throw new bs(n[0]);return fs(n),""===e?n:`${e}_${n}`}function Is(e){let t=e.lastIndexOf("_");return-1===t?"":e.substring(0,t)}function ks(e){let t=e.lastIndexOf("_");return-1===t?e:e.substring(t+1)}var Es=class{constructor(e,t=""){this.prefix=e,this.suffix=t;let n=$s(e,t);this.prefix=Is(n),this.suffix=ks(n)}getType(){return this.prefix}getSuffix(){return this.suffix}asType(e){let t=this;if(t.prefix!==e)throw new ws(t.prefix,e);return t}toUUIDBytes(){return fs(this.suffix)}toUUID(){return function(e,t=0){var n=rs(e,t);if(!function(e){return"string"==typeof e&&es.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n}(this.toUUIDBytes())}toString(){return""===this.prefix?this.suffix:`${this.prefix}_${this.suffix}`}static fromString(e,t){let n=function(e,t){let n,r,i=e.lastIndexOf("_");if(-1===i)n="",r=e;else if(n=e.substring(0,i),r=e.substring(i+1),!n)throw new gs(e);if(!r)throw new ys(0);if(t&&n!==t)throw new vs(t,n);return $s(n,r)}(e,t);return new Es(Is(n),ks(n))}static fromUUIDBytes(e,t){return new Es(e,ms(t))}static fromUUID(e,t){return new Es(e,ms(function(e){let t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(t)))}};const xs={admission:"adm",anonymous:"anon",beneficiary:"ben",coupon:"cpn",couponCode:"cod",customer:"cus",event:"evt",eventCollaborator:"ecl",eventCollaboratorInvite:"evi",membership:"mem",order:"ord",orderItem:"itm",orderFee:"fee",permissionScope:"psc",permissionRole:"prl",permissionSnapshot:"pss",payout:"pyt",payoutDeduction:"pad",payoutTransfer:"xfr",promoter:"pmt",refund:"rfd",section:"sct",scan:"scn",team:"tem",teamMember:"mbr",teamInvite:"inv",teamGateway:"tgw",tenant:"tnt",ticket:"tkt",user:"usr",venue:"ven",location:"loc",request:"req",walletDevice:"wdv",schedule:"sch",session:"ssn",trackingEvent:"tev",trackingStats:"sta",hllShard:"shr",timeline:"tln",notification:"ntf"};function As(e){return function(e="",t=""){return new Es(e,t)}(xs[e])}const Ts="ses_sid",Os="ses_aid";function _s(){return""+As("session")}function Ds(){return""+As("anonymous")}const Ss=Jr().describe("Date (YYYY-MM-DD)"),Ms=yi().min(1).max(128).optional().describe("IANA time zone for interpreting date ranges"),Ps=uo({startDate:Ss.describe("Start date (YYYY-MM-DD)"),endDate:Ss.describe("End date (YYYY-MM-DD)"),timeZone:Ms}),Cs={startDate:Ss.optional().describe("Start date (YYYY-MM-DD)"),endDate:Ss.optional().describe("End date (YYYY-MM-DD)"),timeZone:Ms},js=e=>!e.startDate&&!e.endDate||!(!e.startDate||!e.endDate);function Ns(e){return uo(e).extend(Ps.shape)}function Rs(e){return uo({...e,...Cs}).refine(js,{message:"Both startDate and endDate must be provided together, or omit both for all-time data"})}uo(Cs).refine(js,{message:"Both startDate and endDate must be provided together, or omit both for all-time data"});const Us=uo({value:zi().describe("Current period value"),previous:zi().describe("Comparison period value"),change:zi().describe("Percentage change from previous period"),changeType:bo(["increase","decrease","unchanged"]).describe("Direction of change")}),Ls=uo({eventId:yi().describe("Event identifier"),eventName:yi().describe("Event name"),ticketCount:zi().describe("Number of tickets sold"),sharePercent:zi().describe("Percentage of total tickets")}),qs=uo({start:yi().describe("Period start date"),end:yi().describe("Period end date")}),Gs=uo({start:yi().describe("Comparison period start date"),end:yi().describe("Comparison period end date")}),zs=bo(["HOUR","DAY","WEEK","MONTH"]),Fs=uo({date:yi().describe("Date (YYYY-MM-DD)"),revenue:zi().describe("Revenue in cents"),tickets:zi().describe("Tickets sold")}),Bs=Fs.extend({orders:zi().describe("Orders placed")}),Ws=uo({revenue:zi().describe("Total revenue for period in cents"),tickets:zi().describe("Total tickets for period")}),Ys=Ws.extend({orders:zi().describe("Total orders for period")}),Vs=uo({revenue:Us.describe("Total revenue in cents"),ticketsSold:Us.describe("Number of tickets sold"),averageOrderValue:Us.describe("Average order value in cents"),conversionRate:Us.describe("Overall conversion rate (%)"),activeEvents:Us.describe("Number of active events in period"),uniqueCustomers:Us.describe("Unique customers (estimated)"),orderCount:Us.describe("Number of orders placed"),pageViews:Us.describe("Total page views from tracking")}),Zs=uo({events:so(Ls),totalTickets:zi().describe("Total tickets across all events")});function Hs(e,t){return Ns({...Xs(e,t),currency:yi().optional().describe("Currency code for revenue metrics")})}function Ks(e){return uo({meta:uo({...e,currency:yi().describe("Primary currency code"),currencies:so(yi()).describe("All currencies with transactions"),dateRange:qs,comparisonRange:Gs}),metrics:Vs})}function Js(e,t){return Ns({...Xs(e,t),granularity:zs.optional().default("DAY").describe("Time granularity"),currency:yi().optional().describe("Currency filter")})}function Qs(e,t){return Ns({...Xs(e,t),limit:zi().optional().default(5).describe("Maximum number of events to return")})}function Xs(e,t){return{[e]:yi().describe(t)}}const ed=Rs({eventId:yi().describe("Event identifier")}).meta({description:"Event performance summary request"}),td=uo({meta:uo({eventId:yi().describe("Event identifier"),eventName:yi().describe("Event name"),currency:yi().describe("Currency code (e.g., USD, EUR)"),dateRange:qs.optional().describe("Present only when startDate/endDate are provided"),comparisonRange:Gs.optional().describe("Present only when startDate/endDate are provided")}),metrics:uo({revenue:Us.describe("Total revenue in cents"),ticketsSold:Us.describe("Number of tickets sold"),orderCount:Us.describe("Number of orders placed"),averageOrderValue:Us.describe("Average order value in cents"),conversionRate:Us.describe("Conversion rate as percentage"),pageViews:Us.describe("Total page/product views"),uniqueVisitors:Us.describe("Unique visitors (estimated)"),checkoutStarted:Us.describe("Number of checkout started events (external link clicks for external events)")})}),nd=Ns({eventId:yi().describe("Event identifier"),granularity:zs.optional().default("DAY").describe("Time granularity for aggregation"),breakdown:bo(["TOTAL"]).optional().default("TOTAL").describe("Breakdown type (always TOTAL for performance)"),includeBreakdowns:Yi().optional().default(!0).describe("Whether to include admission and section breakdowns in each time bucket")}),rd=uo({meta:uo({eventId:yi(),eventName:yi().describe("Event name"),currency:yi().describe("Currency code"),dateRange:qs,granularity:zs}),series:so(uo({date:yi().describe("Date or timestamp"),tickets:zi().describe("Tickets sold in period"),revenue:zi().describe("Revenue in period (cents)"),admissions:so(uo({id:yi(),name:yi(),quantity:zi()})),sections:so(uo({id:yi(),name:yi(),quantity:zi()}))}))}),id=bo(["HOUR","DAY","WEEK","MONTH"]).describe("Time granularity for aggregation"),od=Ns({eventId:yi().describe("Event identifier"),granularity:id.optional().default("DAY")}).meta({description:"Event performance time series request"}),ad=uo({meta:uo({eventId:yi(),eventName:yi().describe("Event name"),currency:yi().describe("Currency code"),dateRange:qs,granularity:id}),series:so(uo({date:yi().describe("Date or timestamp"),revenue:zi().describe("Net revenue in period (cents)"),tickets:zi().describe("Tickets sold in period"),orders:zi().describe("Completed orders in period"),pageViews:zi().describe("Product/page views in period"),visitors:zi().describe("Unique visitors in period (estimated)"),checkoutStarted:zi().describe("Checkout started events in period"),convertedVisitors:zi().describe("Unique visitors who completed an order in period"),eligibleVisitors:zi().describe("Unique visitors eligible for conversion in period"),conversionRate:zi().describe("Converted visitors divided by eligible visitors in period (%)")}))}),sd=Ns({eventId:yi().describe("Event identifier")}),dd=uo({meta:uo({eventId:yi(),eventName:yi().describe("Event name"),currency:yi().describe("Currency code"),dateRange:qs}),totals:uo({entered:zi().describe("Total entered funnel (product viewed)"),completed:zi().describe("Total completed (orders)"),overallConversionRate:zi().describe("Overall conversion rate (%)"),totalDropped:zi().describe("Total dropped off")}),stages:so(uo({id:yi().describe("Funnel stage identifier"),name:yi().describe("Human-readable stage name"),count:zi().describe("Number of events at this stage"),conversionRate:zi().describe("Conversion rate from first stage (%)"),dropoffRate:zi().describe("Dropoff rate from previous stage (%)")}))});uo({meta:uo({eventId:yi(),dimension:yi().describe("Dimension type"),dateRange:qs,limit:zi().optional()}),data:so(uo({name:yi().describe("Dimension value (e.g., campaign name)"),views:zi().describe("Page/product views"),clicks:zi().describe("Ticket link clicks").optional(),conversions:zi().describe("Completed orders"),revenue:zi().describe("Total revenue in cents"),conversionRate:zi().describe("Conversion rate (%)"),share:zi().describe("Percentage share of total").optional()})),totals:uo({views:zi(),conversions:zi(),revenue:zi()}).optional()});const cd=bo(["HOUR","DAY","WEEK","MONTH"]),ud=uo({eventId:yi().describe("Event identifier"),eventName:yi().describe("Event name"),currency:yi().describe("Currency code (e.g., USD, EUR)"),dateRange:qs}),ld=ud.extend({limit:zi().describe("Maximum number of results returned")}),pd=bo(["MOBILE","DESKTOP","TABLET","Unknown"]),md=bo(["revenue","tickets","orders","pageViews","visitors","conversion","clicks","clickRate"]).describe("Metric used to sort breakdown rows before limiting results");Ns({eventId:yi(),granularity:cd.optional()}),uo({granularity:cd,data:so(uo({date:yi(),revenue:zi(),ticketsSold:zi()}))});const fd=Ns({eventId:yi(),limit:zi().min(1).max(100).optional().default(10)}),hd=uo({meta:ld,totals:uo({uses:zi().describe("Total coupon uses across all coupons"),revenue:zi().describe("Total revenue from coupon-discounted orders (cents)")}),coupons:so(uo({id:yi().describe("Coupon code identifier"),code:yi().describe("Coupon code"),uses:zi().describe("Number of times this coupon was used"),revenue:zi().describe("Revenue from this coupon (cents)"),discount:yi().describe("Discount amount or percentage"),share:zi().describe("Share of total coupon uses (%)")})).describe("Coupons sorted by uses descending")}),vd=Ns({eventId:yi(),limit:zi().min(1).max(100).optional().default(10),sortBy:md.optional().default("orders")}),gd=uo({data:so(uo({campaign:yi(),views:zi(),visitors:zi(),clicks:zi().optional(),orders:zi(),tickets:zi(),revenue:zi(),conversionRate:zi(),sharePercent:zi()})),totalOrders:zi(),totalTickets:zi(),totalRevenue:zi()}),yd=Ns({eventId:yi(),limit:zi().min(1).max(100).optional().default(10),sortBy:md.optional().default("orders")}),bd=uo({meta:ld,totals:uo({views:zi().describe("Total views across all mediums"),visitors:zi().describe("Total unique visitors across all mediums"),orders:zi().describe("Total orders across all mediums"),tickets:zi().describe("Total tickets across all mediums"),revenue:zi().describe("Total revenue across all mediums (cents)")}),mediums:so(uo({id:yi().describe("Medium identifier (e.g., 'social', 'email')"),name:yi().describe("Medium name"),views:zi().describe("Views from this medium"),visitors:zi().describe("Unique visitors from this medium"),clicks:zi().optional().describe("Ticket link clicks"),orders:zi().describe("Orders from this medium"),tickets:zi().describe("Tickets from this medium"),revenue:zi().describe("Revenue from this medium (cents)"),conversionRate:zi().describe("Conversion rate (%)"),share:zi().describe("Share of total orders (%)")})).describe("Mediums sorted by orders descending")}),wd=Ns({eventId:yi(),limit:zi().min(1).max(100).optional().default(10),sortBy:md.optional().default("orders")}),$d=uo({meta:ud,totals:uo({views:zi().describe("Total views across all devices"),visitors:zi().describe("Total unique visitors across all devices"),revenue:zi().describe("Total revenue across all devices (cents)"),orders:zi().describe("Total orders across all devices"),tickets:zi().describe("Total tickets across all devices")}),devices:so(uo({id:pd.describe("Device type"),name:yi().describe("Human-readable device name"),views:zi().optional().describe("Page views from this device"),visitors:zi().describe("Unique visitors from this device"),revenue:zi().describe("Revenue from this device (cents)"),clicks:zi().optional().describe("Ticket link clicks"),orders:zi().describe("Orders from this device"),tickets:zi().describe("Tickets from this device"),conversionRate:zi().describe("Conversion rate (%)"),share:zi().describe("Share of total orders (%)")})).describe("Devices sorted by orders descending")}),Id=Ns({eventId:yi(),limit:zi().min(1).max(100).optional().default(10),sortBy:md.optional().default("visitors")}),kd=uo({meta:ld,totals:uo({views:zi().describe("Total views across all browsers"),visitors:zi().describe("Total unique visitors across all browsers"),orders:zi().describe("Total orders across all browsers"),tickets:zi().describe("Total tickets across all browsers"),revenue:zi().describe("Total revenue across all browsers (cents)")}),browsers:so(uo({id:yi().describe("Browser identifier"),name:yi().describe("Human-readable browser name"),views:zi().describe("Page views from this browser"),clicks:zi().optional().describe("Ticket link clicks"),visitors:zi().describe("Unique visitors from this browser"),orders:zi().describe("Orders from this browser"),tickets:zi().describe("Tickets from this browser"),revenue:zi().describe("Revenue from this browser (cents)"),conversionRate:zi().describe("Conversion rate (%)"),share:zi().describe("Share of total visitors (%)")})).describe("Browsers sorted by visitors descending")}),Ed=Ns({eventId:yi(),limit:zi().min(1).max(100).optional().default(10),sortBy:md.optional().default("pageViews")}),xd=uo({meta:ld,totals:uo({views:zi().describe("Total views across all locations"),visitors:zi().describe("Total unique visitors across all locations"),orders:zi().describe("Total orders across all locations"),tickets:zi().describe("Total tickets across all locations"),revenue:zi().describe("Total revenue across all locations (cents)")}),locations:so(uo({id:yi().describe("Location/region code (e.g., 'US-CA', 'GB')"),name:yi().describe("Human-readable location name"),views:zi().describe("Page views from this location"),visitors:zi().describe("Unique visitors from this location"),clicks:zi().optional().describe("Ticket link clicks"),orders:zi().describe("Orders from this location"),tickets:zi().describe("Tickets from this location"),revenue:zi().describe("Revenue from this location (cents)"),conversionRate:zi().describe("Conversion rate (%)"),share:zi().describe("Share of total views (%)")})).describe("Locations sorted by views descending")}),Ad=Ns({eventId:yi(),limit:zi().min(1).max(100).optional().default(10),sortBy:md.optional().default("pageViews")}),Td=uo({meta:ld,totals:uo({sessions:zi().describe("Total sessions across all sources"),visitors:zi().describe("Total unique visitors across all sources"),orders:zi().describe("Total orders across all sources"),tickets:zi().describe("Total tickets across all sources"),revenue:zi().describe("Total revenue across all sources (cents)")}),sources:so(uo({id:yi().describe("Traffic source identifier"),name:yi().describe("Traffic source name"),referrer:yi().describe("Referrer URL or domain"),sessions:zi().describe("Sessions from this source"),visitors:zi().describe("Unique visitors from this source"),clicks:zi().optional().describe("Ticket link clicks"),orders:zi().describe("Orders from this source"),tickets:zi().describe("Tickets from this source"),conversionRate:zi().describe("Conversion rate (%)"),revenue:zi().describe("Revenue from this source (cents)"),share:zi().describe("Share of total sessions (%)")})).describe("Traffic sources sorted by sessions descending")}),Od=uo({eventId:yi(),includeAdmission:Yi().optional().default(!0),includeSection:Yi().optional().default(!0),granularity:bo(["HOUR","MINUTE"]).optional()}),_d=uo({totalTickets:zi(),checkedIn:zi(),notCheckedIn:zi(),checkinRate:zi()}),Dd=_d.extend({admissionId:yi(),admissionName:yi()}),Sd=_d.extend({sectionId:yi(),sectionName:yi()}),Md=po([_d.extend({byAdmission:so(Dd),bySection:so(Sd)}),uo({granularity:bo(["HOUR","MINUTE"]),totalTickets:zi(),data:so(uo({timestamp:yi(),checkedIn:zi(),rate:zi(),checkinsThisPeriod:zi()})),byAdmission:so(uo({admissionId:yi(),admissionName:yi(),data:so(uo({timestamp:yi(),checkedIn:zi(),rate:zi()}))})).optional(),bySection:so(uo({sectionId:yi(),sectionName:yi(),data:so(uo({timestamp:yi(),checkedIn:zi(),rate:zi()}))})).optional()})]),Pd=uo({eventId:yi(),limit:zi().min(1).max(50).optional().default(10)}),Cd=uo({totalCheckIns:zi(),scanners:so(uo({userId:yi(),name:yi(),email:yi(),checkIns:zi(),sharePercent:zi(),firstScanAt:yi().nullable(),lastScanAt:yi().nullable(),activeMinutes:zi(),scansPerHour:zi(),devices:so(uo({deviceId:yi(),checkIns:zi()}))})).describe("Door staff sorted by check-ins descending")}),jd=uo({eventId:yi(),includeAdmission:Yi().optional().default(!0),includeSection:Yi().optional().default(!0)}),Nd=uo({totalTickets:zi(),checkedIn:zi(),noShows:zi(),checkInRate:zi(),noShowRate:zi()}),Rd=Nd.extend({admissionId:yi(),admissionName:yi()}),Ud=Nd.extend({sectionId:yi(),sectionName:yi()}),Ld=Nd.extend({byAdmission:so(Rd),bySection:so(Ud)}),qd=uo({eventId:yi(),granularity:bo(["MINUTE","FIFTEEN_MINUTE","HOUR"]).optional().default("FIFTEEN_MINUTE")}),Gd=uo({granularity:bo(["MINUTE","FIFTEEN_MINUTE","HOUR"]),totalCheckIns:zi(),peakWindow:uo({start:yi().nullable(),end:yi().nullable(),checkIns:zi()}),data:so(uo({timestamp:yi(),checkIns:zi(),cumulativeCheckIns:zi(),cumulativeRate:zi()}))}),zd=Hs("promoterId","Promoter identifier"),Fd=Ks({promoterId:yi().describe("Promoter identifier"),promoterName:yi().describe("Promoter name"),teamId:yi().describe("Team identifier"),teamName:yi().describe("Team name")}),Bd=Js("promoterId","Promoter identifier"),Wd=uo({meta:uo({promoterId:yi(),dateRange:qs,granularity:zs}),currencies:so(uo({currency:yi().describe("Currency code (e.g., USD, EUR)"),series:so(Fs),totals:Ws})).describe("Time-series data grouped by currency")}),Yd=Qs("promoterId","Promoter identifier"),Vd=Zs,Zd=Hs("teamId","Team identifier"),Hd=Ks({teamId:yi().describe("Team identifier"),teamName:yi().describe("Team name")}),Kd=Js("teamId","Team identifier"),Jd=uo({meta:uo({teamId:yi(),dateRange:qs,granularity:zs}),currencies:so(uo({currency:yi().describe("Currency code (e.g., USD, EUR)"),series:so(Bs),totals:Ys})).describe("Time-series data grouped by currency")});Ns({teamId:yi().describe("Team identifier"),limit:zi().optional().default(10).describe("Number of events to return"),sortBy:bo(["revenue","tickets","conversion"]).optional().default("revenue").describe("Sort metric")}),uo({meta:uo({teamId:yi(),dateRange:uo({start:yi(),end:yi()}),limit:zi(),sortBy:yi()}),data:so(uo({eventId:yi().describe("Event identifier"),eventName:yi().describe("Event name"),eventDate:yi().describe("Event date").optional(),status:yi().describe("Event status"),revenue:zi().describe("Total revenue in cents"),tickets:zi().describe("Tickets sold"),views:zi().describe("Page views"),conversionRate:zi().describe("Conversion rate (%)"),contribution:zi().describe("% of promoter's total revenue")})),totals:uo({events:zi().describe("Total events in period"),revenue:zi().describe("Combined revenue"),tickets:zi().describe("Combined tickets")})});const Qd=Qs("teamId","Team identifier"),Xd=Zs,ec=Ns({teamId:yi().describe("Team identifier")}),tc=uo({stages:so(uo({stageId:yi().describe("Funnel stage identifier"),stageLabel:yi().describe("Human-readable stage name"),count:zi().describe("Number of events at this stage"),conversionRate:zi().describe("Conversion rate from first stage (%)"),dropoffPercent:zi().describe("Dropoff rate from previous stage (%)")}))}),nc=Ns({teamId:yi().describe("Team identifier"),groupBy:bo(["HOUR","DAY_OF_WEEK","DAY","WEEK","MONTH"]).optional().default("HOUR").describe("Time breakdown for aggregation"),timeZone:yi().optional().default("UTC").describe("IANA timezone for hour/day aggregation (e.g., 'America/New_York')")}),rc=uo({groupBy:bo(["HOUR","DAY_OF_WEEK","DAY","WEEK","MONTH"]).describe("The grouping used for aggregation"),buckets:so(uo({key:po([zi(),yi()]).describe("Bucket key (hour 0-23, day 0-6, or date string)"),label:yi().describe("Human-readable label"),orderCount:zi().describe("Number of orders"),sharePercent:zi().describe("Percentage of total orders")})),totalOrders:zi().describe("Total orders across all buckets")}),ic=Ns({teamId:yi().describe("Team identifier"),limit:zi().optional().default(10).describe("Maximum number of admissions to return")}),oc=uo({admissions:so(uo({admissionId:yi().describe("Admission identifier"),admissionName:yi().describe("Admission name"),ticketCount:zi().describe("Number of tickets sold"),sharePercent:zi().describe("Percentage of total tickets")})),totalTickets:zi().describe("Total tickets across all admissions")}),ac=Ns({teamId:yi().describe("Team identifier"),type:bo(["campaign","medium","source"]).describe("Dimension type to analyze"),limit:zi().optional().default(20).describe("Maximum number of results to return")}),sc=uo({dimensionType:bo(["campaign","medium","source"]).describe("The dimension type analyzed"),data:so(uo({dimensionValue:yi().describe("The dimension value (e.g., campaign name)"),dimensionLabel:yi().describe("Human-readable label"),views:zi().describe("Total page views"),conversions:zi().describe("Total conversions (orders)"),conversionRate:zi().describe("Conversion rate (%)"),sharePercent:zi().describe("Share of total conversions (%)")})),totalConversions:zi().describe("Total conversions across all dimensions")}),dc=uo({teamId:yi().describe("Team identifier"),startAt:Hr().describe("Inclusive period start timestamp"),endAt:Hr().describe("Exclusive period end timestamp")}),cc=uo({currency:yi().describe("Currency code"),disputedOrders:zi().describe("Orders currently marked as disputed"),orderCount:zi().describe("Successful orders"),refunded:zi().describe("Refunded amount in cents"),refundCount:zi().describe("Orders with refunded value"),refundRate:zi().describe("Refunded order rate as a percentage"),revenue:zi().describe("Total order value in cents"),ticketsSold:zi().describe("Tickets sold")}),uc=cc.omit({currency:!0}),lc=uo({currencies:so(cc),comparison:uo({totals:uc}),meta:uo({endAt:yi().describe("Exclusive period end timestamp"),startAt:yi().describe("Inclusive period start timestamp"),teamId:yi().describe("Team identifier")}),totals:uc}),pc=uo({teamId:yi().describe("Team identifier")}),mc=po([pc.extend({startDate:Ss.describe("Start date (YYYY-MM-DD)"),endDate:Ss.describe("End date (YYYY-MM-DD)")}),pc.extend({startDate:Zi().optional(),endDate:Zi().optional()})]),fc=uo({amount:zi().describe("Payout net amount in cents"),count:zi().describe("Number of payouts in this currency"),currency:yi().describe("Currency code")}),hc=uo({amount:zi().describe("Payout net amount in cents"),currency:yi().nullable().describe("Currency code"),dueAt:yi().nullable().describe("Payout due timestamp"),payoutId:yi().nullable().describe("Payout identifier")}),vc=uo({amount:zi().describe("Payout net amount in cents"),currency:yi().nullable().describe("Currency code"),paidAt:yi().nullable().describe("Payout paid timestamp"),payoutId:yi().nullable().describe("Payout identifier")}),gc=uo({upcoming:uo({count:zi().describe("Upcoming payouts matching the request"),pendingApproval:zi().describe("Upcoming payouts still awaiting approval"),totals:so(fc).describe("Upcoming payout totals by currency"),next:hc}),lastPaid:vc}),yc=Ns({teamId:yi().describe("Team identifier"),granularity:bo(["DAY","WEEK","MONTH"]).optional().default("DAY").describe("Time granularity for aggregation")}),bc=uo({granularity:bo(["DAY","WEEK","MONTH"]).describe("The granularity used"),series:so(uo({date:yi().describe("Date key (YYYY-MM-DD, YYYY-Www, or YYYY-MM)"),label:yi().describe("Human-readable label"),productViewed:zi().describe("Page views"),productAdded:zi().describe("Add to cart events"),checkoutStarted:zi().describe("Checkout started events"),orderCompleted:zi().describe("Completed orders")})),totals:uo({productViewed:zi().describe("Total page views"),productAdded:zi().describe("Total add to cart"),checkoutStarted:zi().describe("Total checkouts started"),orderCompleted:zi().describe("Total orders completed"),uniqueVisitors:zi().describe("Unique visitors (estimated via HyperLogLog, ~0.8% error)")})}),wc=bo("Page Viewed.Screen Viewed.Products Searched.Product List Viewed.Product List Filtered.Promotion Viewed.Promotion Clicked.Product Clicked.Product Viewed.Product Added.Product Removed.Cart Viewed.Checkout Started.Checkout Step Viewed.Checkout Step Completed.Payment Info Entered.Order Completed.Order Updated.Order Refunded.Order Cancelled.Coupon Entered.Coupon Applied.Coupon Denied.Coupon Removed.Product Added to Wishlist.Product Removed from Wishlist.Wishlist Product Added to Cart.Product Shared.Cart Shared.Product Reviewed".split(".")),$c=wc.enum,Ic=uo({product_id:yi().optional().describe("admission_id in ticketing context"),sku:yi().optional().describe("admission_id or admission_name"),category:yi().optional().describe('event_name or "Admission"'),name:yi().optional().describe("admission_name"),brand:yi().optional().describe("promoter_name"),variant:yi().optional().describe("section_name"),price:zi().optional().describe("admission price (base + booking fee)"),quantity:zi().optional().describe("number of tickets"),coupon:yi().optional().describe("coupon code applied"),position:zi().optional().describe("position in list"),url:yi().optional().describe("URL to event/admission page"),image_url:yi().optional().describe("event image"),admission_id:yi().optional().describe("Explicit admission ID"),section_id:yi().optional().describe("Section ID if applicable"),event_id:yi().optional().describe("Event ID for this admission"),promoter_id:yi().optional().describe("Promoter ID"),price_base:zi().nullish().describe("Base price before fees"),price_booking_fee:zi().nullish().describe("Booking fee"),capacity:zi().optional().describe("Total capacity for this admission"),available:zi().optional().describe("Remaining tickets available"),sold:zi().optional().describe("Tickets already sold")}),kc=uo({type:yi(),value:yi()}),Ec=uo({type:yi(),value:yi()}),xc=uo({query:po([yi(),go(yi(),Xi())]).optional(),list_id:yi().optional(),category:yi().optional(),filters:so(kc).optional(),sorts:so(Ec).optional(),promotion_id:yi().optional(),creative:yi().optional(),name:yi().optional(),position:po([yi(),zi()]).optional(),product_id:yi().optional(),sku:yi().optional(),brand:yi().optional(),variant:yi().optional(),price:zi().optional(),quantity:zi().optional(),coupon:yi().optional(),currency:yi().optional(),value:zi().optional(),url:yi().optional(),image_url:yi().optional(),cart_id:yi().optional(),step:zi().optional(),shipping_method:yi().optional(),payment_method:yi().optional(),ticketing_mode:bo(["internal","external"]).optional(),external_ticket_url:yi().optional(),external_ticket_domain:yi().optional(),cta_surface:yi().optional(),order_id:yi().optional(),affiliation:yi().optional(),subtotal:zi().optional(),total:zi().optional(),revenue:zi().optional(),shipping:zi().optional(),tax:zi().optional(),discount:zi().optional(),coupon_id:yi().optional(),coupon_name:yi().optional(),reason:yi().optional(),wishlist_id:yi().optional(),wishlist_name:yi().optional(),share_via:yi().optional(),share_message:yi().optional(),recipient:yi().optional(),review_id:yi().optional(),review_body:yi().optional(),rating:yi().optional(),products:so(Ic).optional(),event_id:yi().optional().describe("ID of the ticketed event (evt_xxx)"),event_name:yi().optional().describe("Name of the ticketed event"),event_slug:yi().optional().describe("URL slug of event"),event_starts_at:ba.optional().describe("When the event starts (naive datetime, no timezone)"),event_ends_at:ba.optional().describe("When the event ends (naive datetime, no timezone)"),event_status:bo(["UPCOMING","LIVE","ENDED","CANCELLED"]).optional(),event_visibility:bo(["PUBLIC","PRIVATE"]).optional(),event_location:yi().optional().describe("Venue name"),event_city:yi().optional().describe("Venue city"),event_country:yi().optional().describe("Venue country"),promoter_id:yi().optional().describe("ID of the promoter (pmt_xxx)"),promoter_name:yi().optional().describe("Name of the promoter"),promoter_slug:yi().optional().describe("URL slug of promoter"),admission_id:yi().optional().describe("ID of admission type (adm_xxx)"),admission_name:yi().optional().describe('Name of admission (e.g., "General Admission")'),admission_capacity:zi().optional().describe("Total capacity for this admission"),admission_available:zi().optional().describe("Tickets still available"),admission_sold:zi().optional().describe("Tickets already sold"),section_id:yi().optional().describe("ID of section (sct_xxx)"),section_name:yi().optional().describe('Name of section (e.g., "VIP", "General")'),section_capacity:zi().optional().describe("Total capacity for this section"),section_available:zi().optional().describe("Spots still available in section"),ticket_id:yi().optional().describe("Individual ticket ID (tkt_xxx)"),ticket_status:bo(["VALID","REDEEMED","CANCELLED"]).optional(),tickets_quantity:zi().optional().describe("Number of tickets in transaction"),customer_id:yi().optional().describe("Customer ID (cus_xxx)"),customer_email:yi().optional().describe("Customer email"),customer_first_name:yi().optional(),customer_last_name:yi().optional(),price_base:zi().nullish().describe("Base price before fees"),price_booking_fee:zi().nullish().describe("Booking fee amount"),price_discount_amount:zi().nullish().describe("Discount amount applied"),sale_starts_at:ba.optional().describe("When tickets go on sale (naive datetime, no timezone)"),sale_ends_at:ba.optional().describe("When ticket sales end (naive datetime, no timezone)"),entry_starts_at:ba.optional().describe("When entry to event begins (naive datetime, no timezone)"),entry_ends_at:ba.optional().describe("When entry to event ends (naive datetime, no timezone)"),funnel_step:yi().optional().describe('Current funnel step (e.g., "browse", "cart", "checkout")'),time_to_purchase:zi().optional().describe("Seconds from first view to purchase"),session_duration:zi().optional().describe("Total session duration in seconds"),referrer_type:bo(["DIRECT","SOCIAL","EMAIL","SEARCH","REFERRAL","AD"]).optional(),campaign_id:yi().optional().describe("Marketing campaign ID"),affiliate_id:yi().optional().describe("Affiliate partner ID"),promo_code_used:yi().optional().describe("Promotional code applied"),platform:bo(["WEB","MOBILE_WEB","IOS","ANDROID"]).optional(),app_version:yi().optional(),device_type:bo(["MOBILE","TABLET","DESKTOP"]).optional(),anonymous_id:yi().optional(),browser:yi().optional(),browser_session_id:yi().optional(),country:yi().optional(),page_path:yi().optional(),page_title:yi().optional(),page_url:yi().optional(),referrer:yi().optional(),region:yi().optional(),user_agent:yi().optional(),utm_source:yi().optional(),utm_medium:yi().optional(),utm_campaign:yi().optional(),utm_term:yi().optional(),utm_content:yi().optional()}),Ac=uo({session_id:yi(),user_id:yi().optional(),anonymous_id:yi().optional(),utm_source:yi().optional(),utm_medium:yi().optional(),utm_campaign:yi().optional(),utm_term:yi().optional(),utm_content:yi().optional(),page:uo({url:yi(),path:yi(),title:yi()}),referrer:yi().optional(),user_agent:yi().optional(),ip:yi().optional(),geo:uo({country:yi().optional().describe('Country code (e.g., "AU")'),countryName:yi().optional().describe('Country name (e.g., "Australia")'),region:yi().optional().describe("State/province code"),regionName:yi().optional().describe('State/province name (e.g., "New South Wales")'),city:yi().optional().describe("City name"),latitude:yi().optional().describe("Latitude"),longitude:yi().optional().describe("Longitude")}).optional(),fbc:yi().optional().describe("Facebook click ID"),fbp:yi().optional().describe("Facebook browser ID"),ttclid:yi().optional().describe("TikTok click ID")}),Tc=uo({id:yi(),eventId:yi().min(1).describe("Event being tracked (evt_123)"),teamId:yi().min(1).describe("Team ID (team_123)"),promoterId:yi().min(1).describe("Promoter ID (pmt_123)"),eventType:wc,timestamp:yi(),date:yi().describe("YYYY-MM-DD"),hour:zi().int().min(0).max(23),properties:xc,context:Ac,productId:yi().optional(),createdAt:yi(),updatedAt:yi()}),Oc=Tc.omit({id:!0,timestamp:!0,date:!0,hour:!0,createdAt:!0,updatedAt:!0}).extend({messageId:yi().min(1).optional().meta({description:"Analytics message id for retry-safe event delivery and linking."}),occurredAt:Hr().optional().meta({description:"Client-observed event time. Server ingest time remains authoritative for writes."})}).meta({description:"Schema for tracking an analytics event. Excludes system-generated fields"}),_c=uo({legacyOrgId:yi().min(1),legacyEventId:yi().min(1),legacyTeamId:yi().min(1),legacyEventName:yi().optional(),legacyEventSlug:yi().optional(),legacyEventCreatedAt:po([yi(),oo(),Ki()]).optional(),legacyTeamCreatedAt:po([yi(),oo(),Ki()]).optional()}),Dc=po([Oc,uo({eventName:yi().min(1).optional(),eventType:wc.optional(),eventId:yi().min(1).optional(),teamId:yi().min(1).optional(),promoterId:yi().min(1).optional(),properties:go(yi(),Xi()).optional(),context:Ac.partial().optional(),legacyContext:_c.optional()}).passthrough().meta({description:"Compatibility schema for legacy Sash analytics payloads that require server-side ID normalization"})]).meta({description:"Analytics ingress schema accepting both canonical payloads and legacy Sash-compatible payloads"});Rs({eventId:yi().meta({description:"Event ID to get tracking events for"}),limit:Lo().int().positive().optional().meta({description:"Maximum number of events to return"})}).meta({description:"Schema for retrieving tracking events for an event"}),uo({id:yi(),email:$i(),firstName:yi(),lastName:yi(),imageUrl:yi().url().optional(),tenantId:yi(),createdAt:yi().datetime(),updatedAt:yi().datetime()});const Sc=bo(["AIRWALLEX","STRIPE"]),Mc=uo({id:yi().readonly().meta({examples:[Ee.Beneficiary.id],description:"A unique identifier for this beneficiary."}),createdAt:Hr().readonly().meta({examples:[Ee.Beneficiary.createdAt],description:"Timestamp in ISO 8601 format when this beneficiary was created."}),updatedAt:Hr().readonly().meta({examples:[Ee.Beneficiary.updatedAt],description:"Timestamp in ISO 8601 format when this beneficiary was last updated."}),name:yi().meta({examples:[Ee.Beneficiary.name],description:"The account name for this beneficiary."}),currency:zo.meta({examples:[Ee.Beneficiary.currency],description:"Three-letter ISO 4217 currency code for payouts."}),gateway:Sc.meta({examples:["STRIPE"],description:"The payment gateway used for processing payouts."}),gatewayId:yi().meta({examples:[Ee.Beneficiary.gatewayId],description:"The identifier assigned by the payment gateway to this account."}),teamId:yi().meta({description:"Team that owns this beneficiary account."}),teamIds:so(yi()).meta({examples:[[]],description:"List of team IDs this beneficiary is assigned to. Empty array means available to all teams."}),venueIds:so(yi()).meta({examples:[[]],description:"List of venue IDs this beneficiary is assigned to. Empty array means team-level only (available to all venues)."})}).meta({description:"beneficiary"}),Pc=uo({city:yi().optional(),country_code:yi(),postcode:yi().optional(),state:yi().optional(),street_address:yi().optional()}),Cc=uo({account_currency:yi(),account_name:yi(),account_number:yi().optional(),account_routing_type1:yi().optional(),account_routing_value1:yi().optional(),account_routing_type2:yi().optional(),account_routing_value2:yi().optional(),bank_account_category:yi().optional(),bank_branch:yi().optional(),bank_country_code:yi(),bank_name:yi().optional(),bank_street_address:yi().optional(),binding_mobile_number:yi().optional(),fingerprint:yi().optional(),iban:yi().optional(),local_clearing_system:yi().optional(),swift_code:yi().optional(),transaction_reference:yi().optional(),account_identifier_type:yi().optional(),account_identifier_value:yi().optional()}),jc=uo({transfer_methods:so(bo(["SWIFT","LOCAL"])).meta({examples:[["LOCAL"]],description:"Transfer methods supported for this beneficiary"}),beneficiary:uo({company_name:yi().optional(),date_of_birth:yi().optional(),entity_type:yi().meta({examples:["COMPANY"],description:"Whether the beneficiary is PERSONAL or COMPANY"}),first_name:yi().optional(),last_name:yi().optional(),address:Pc,bank_details:Cc,additional_info:uo({personal_email:$i().optional()}).optional()}).meta({description:"Beneficiary details including personal/company info, address, and bank details"})}).meta({description:"Complete beneficiary request structure for Airwallex validation"}),Nc=jc.extend({id:yi().optional()}),Rc=Mc.omit({id:!0,createdAt:!0,updatedAt:!0,currency:!0}).extend({currency:zo.meta({examples:[Ee.Beneficiary.currency],description:"Three-letter ISO 4217 currency code for payouts to this beneficiary account"}),airwallex:Nc.optional().meta({examples:[Ee.AirwallexBeneficiary],description:"Airwallex-specific beneficiary details including bank account information and address (required when gateway is AIRWALLEX)"}),teamIds:so(yi()).optional().default([]).meta({examples:[[]],description:"List of team IDs to assign this beneficiary to. Empty array or omitted means available to all teams."}),venueIds:so(yi()).optional().default([]).meta({examples:[[]],description:"List of venue IDs to assign this beneficiary to. Empty array or omitted means team-level only."})}).meta({description:"Schema for creating a new beneficiary account for receiving payouts"}),Uc=Mc.pick({id:!0}).meta({description:"Schema for retrieving a single beneficiary by its unique identifier"}),Lc=Uc.meta({description:"Schema for deleting a beneficiary account - requires the beneficiary ID"}),qc=uo({teamId:yi().optional().meta({examples:[Ee.Team.id],description:"Optional identifier of the team whose beneficiaries to list. When provided, only beneficiaries for that team are returned."}),gateway:bo(["AIRWALLEX","STRIPE"]).optional().meta({examples:[Ee.Beneficiary.gateway],description:"Filter beneficiaries by payment gateway provider (optional)"}),currency:zo.optional().meta({examples:[Ee.Beneficiary.currency],description:"Filter beneficiaries by currency code (optional)"}),query:yi().optional().meta({examples:["beneficiary"],description:"Optional search query to filter beneficiaries by name or gateway identifier. When provided, search-backed pagination is used."}),limit:wa("beneficiaries").optional(),cursor:yi().optional().meta({examples:["eyJpZCI6ImJlbl8wMWpwczVjZ3NlNW42bWcxeW1rZXc5dHNmaCJ9"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Query parameters for listing beneficiaries with pagination and optional filters"}),Gc=Wa(Mc,"beneficiaries"),zc=uo({beneficiary:Mc}),Fc=uo({min:zi().optional().meta({description:"Minimum number of time units for the transfer"}),max:zi().optional().meta({description:"Maximum number of time units for the transfer"}),unit:yi().optional().meta({examples:["day"],description:"Time unit (e.g., 'day', 'hour')"})}).meta({description:"Expected transfer completion time range"}),Bc=uo({min:zi().optional().meta({description:"Minimum transfer amount"}),max:zi().optional().meta({description:"Maximum transfer amount"})}).meta({description:"Transfer amount limits"}),Wc=uo({label:yi().meta({description:"Display label for the option"}),value:yi().meta({description:"Value to submit when selected"}),flightTime:Fc.optional().meta({description:"Expected transfer time for TRANSFER_METHOD options"}),transferLimit:Bc.optional().meta({description:"Transfer amount limits for TRANSFER_METHOD options"}),processingTime:yi().optional().meta({description:"Human-readable processing time description"})}).meta({description:"A selectable option in a form field"}),Yc=uo({type:bo(["INPUT","SELECT","RADIO","TRANSFER_METHOD","DYNAMIC_SELECT"]).meta({examples:["INPUT"],description:"The type of form input to render"}),label:yi().optional().meta({description:"Display label for the field"}),placeholder:yi().optional().meta({description:"Placeholder text for input fields"}),description:yi().optional().meta({description:"Detailed description of the field"}),tip:yi().optional().meta({description:"Tooltip information shown on hover"}),example:yi().optional().meta({description:"Example value for the field"}),default:yi().optional().meta({description:"Default value to pre-populate the field"}),key:yi().optional().meta({description:"Unique key identifier for the field"}),options:so(Wc).optional().meta({description:"Available options for SELECT and RADIO field types"}),refresh:Yi().optional().meta({description:"When true, changing this field's value should trigger a schema refresh. Note: only documented API parameters (transfer_method, local_clearing_system) actually update the schema."})}).meta({description:"Field definition containing type, label, options, and metadata from Airwallex"}),Vc=uo({pattern:yi().optional().meta({description:"Regex pattern for field validation"}),type:yi().optional().meta({description:"Validation type identifier"})}).meta({description:"Validation rules for a form field"}),Zc=uo({path:yi().meta({examples:["beneficiary.bank_details.account_number"],description:"Dot-notation path to the field in the beneficiary request object"}),enabled:Yi().meta({examples:[!0],description:"Whether this field should be displayed"}),required:Yi().meta({examples:[!0],description:"Whether this field is required for submission"}),field:Yc.optional().meta({description:"Field definition with type, label, and options"}),rule:Vc.optional().meta({description:"Validation rules for the field"})}).meta({description:"A single field in the beneficiary form schema with display and validation rules"}),Hc=uo({bankCountryCode:yi().regex(/^[A-Z]{2}$/).meta({examples:["AU"],description:"Two-letter ISO 3166-1 alpha-2 country code for the bank location"}),accountCurrency:zo.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code for the beneficiary account"}),entityType:bo(["PERSONAL","COMPANY"]).meta({examples:["COMPANY"],description:"Whether the beneficiary is an individual or a company"}),transferMethod:bo(["LOCAL","SWIFT"]).optional().meta({examples:["LOCAL"],description:"Transfer method: SWIFT for international wire transfers, LOCAL for domestic transfers"}),localClearingSystem:yi().optional().meta({examples:["NPP"],description:"Local clearing system for domestic transfers (e.g., NPP, BANK_TRANSFER, BPAY for Australia). Only applicable when transferMethod is LOCAL."}),fieldValues:go(yi(),yi()).optional().meta({examples:[{"beneficiary.bank_details.account_routing_type1":"phone_number"}],description:"Current values of fields with refresh=true. Used to get dynamic schema updates based on user selections."})}).meta({description:"Parameters to fetch the form schema for a beneficiary."}),Kc=uo({fields:so(Zc).meta({description:"Array of form fields with their display and validation configuration"}),selectedTransferMethod:bo(["LOCAL","SWIFT"]).optional().meta({examples:["LOCAL"],description:"The transfer method used to generate this schema. When not provided in the request, LOCAL is auto-selected if available."}),selectedLocalClearingSystem:yi().optional().meta({examples:["NPP"],description:"The local clearing system used to generate this schema, if applicable."})}).meta({description:"Form schema response containing all fields needed to collect beneficiary details"}),Jc=se.route({method:"GET",path:"/beneficiaries/schema",summary:"Get beneficiary form schema",description:"Returns the form schema containing all fields required to create a beneficiary for the given country, currency, entity type, and transfer method combination. Use this to dynamically render the beneficiary creation form.",tags:["Beneficiaries"]}).input(Hc.strict()).output(Kc),Qc=uo({source:yi().meta({examples:["beneficiary.bank_details.account_number"],description:"Dot-notation path to the field that failed validation"}),code:yi().meta({examples:["001"],description:"Airwallex validation error code"}),message:yi().meta({examples:["This field is required"],description:"Human-readable error message"})}).meta({description:"Details about a single validation error for a field"}),Xc=jc.meta({description:"Beneficiary request data to validate against Airwallex rules before creating"}),eu=uo({valid:Yi().meta({examples:[!0],description:"Whether the beneficiary request passed all validation rules"}),errors:so(Qc).optional().meta({description:"Array of validation errors when valid is false. Each error contains the field path, error code, and message."})}).meta({description:"Validation result indicating whether the beneficiary request is valid for creation"}),tu=se.route({method:"POST",path:"/beneficiaries/validate",summary:"Validate beneficiary request",description:"Validates a beneficiary request against Airwallex rules without creating the beneficiary. Use this to provide real-time validation feedback before submission.",tags:["Beneficiaries"]}).input(Xc.strict()).output(eu),nu=se.route({method:"GET",path:"/events/{eventId}/admissions/{id}",summary:"Get admission by ID",tags:["Admissions"]}).input(Fa.strict()).output(Ka),ru=se.route({method:"POST",path:"/events/{eventId}/admissions",summary:"Create a new admission",tags:["Admissions"]}).input(Ga.strict()).output(Ka),iu=se.route({method:"PUT",path:"/events/{eventId}/admissions/{id}",summary:"Update an admission",tags:["Admissions"]}).input(Ja.strict()).output(Ka);var ou={get:nu,list:se.route({method:"GET",path:"/events/{eventId}/admissions",summary:"List admissions",description:"Returns admissions with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided for full-text search capabilities.",tags:["Admissions"]}).input(Ba.strict()).output(Ya),create:ru,update:iu,remove:se.route({method:"DELETE",path:"/events/{eventId}/admissions/{id}",summary:"Delete an admission",tags:["Admissions"]}).input(za.strict()).output(Ka),quote:se.route({method:"POST",path:"/events/{eventId}/admissions/quote",summary:"Create an admission quote",tags:["Admissions"]}).input(Za.strict()).output(Ha)};const au={BAD_REQUEST:{status:400,data:uo({unresolvedRequired:so(yi()),unresolvedOptional:so(yi()).optional(),issues:so(yi()).optional()}).optional()}};var su={track:se.route({method:"POST",path:"/analytics/track",summary:"Track event",tags:["Analytics"]}).input(Dc).errors(au).output(Tc),page:se.route({method:"POST",path:"/analytics/page",summary:"Page event",tags:["Analytics"]}).input(Dc).errors(au).output(Tc),identify:se.route({method:"POST",path:"/analytics/identify",summary:"Identify event",tags:["Analytics"]}).input(Dc).errors(au).output(Tc),alias:se.route({method:"POST",path:"/analytics/alias",summary:"Alias event",tags:["Analytics"]}).input(Dc).errors(au).output(Tc),group:se.route({method:"POST",path:"/analytics/group",summary:"Group event",tags:["Analytics"]}).input(Dc).errors(au).output(Tc),screen:se.route({method:"POST",path:"/analytics/screen",summary:"Screen event",tags:["Analytics"]}).input(Dc).errors(au).output(Tc)};const du=uo({expected:yi(),actual:yi()}),cu=se.route({method:"GET",path:"/beneficiaries/{id}",summary:"Get beneficiary by ID",tags:["Beneficiaries"]}).input(Uc.strict()).output(zc),uu=se.route({method:"POST",path:"/beneficiaries",summary:"Create a new beneficiary",tags:["Beneficiaries"]}).input(Rc.strict()).errors({BAD_REQUEST:{status:400,data:du.optional()}}).output(zc);var lu={get:cu,list:se.route({method:"GET",path:"/beneficiaries",summary:"List beneficiaries with cursor-based pagination",description:"Returns beneficiary data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Beneficiaries"]}).input(qc.strict()).output(Gc),create:uu,remove:se.route({method:"DELETE",path:"/beneficiaries/{id}",summary:"Delete a beneficiary",tags:["Beneficiaries"]}).input(Lc.strict()).output(zc),schema:Jc,validate:tu};const pu=bo(["AMOUNT","PERCENT"]),mu=bo(["TEAM","PROMOTER","EVENTS","SECTIONS","ADMISSIONS"]),fu=uo({id:yi().readonly().meta({examples:[Ee.Coupon.id],description:"A unique identifier for this coupon."}),couponId:yi().optional().readonly().meta({examples:[Ee.Coupon.couponId],description:"Duplicate of id field for GSI queries."}),createdAt:Hr().readonly().meta({examples:[Ee.Coupon.createdAt],description:"Timestamp in ISO 8601 format when this coupon was created."}),updatedAt:Hr().readonly().meta({examples:[Ee.Coupon.updatedAt],description:"Timestamp in ISO 8601 format when this coupon was last updated."}),name:yi().meta({examples:[Ee.Coupon.name],description:"Internal label for the coupon, visible to event organisers."}),active:Yi().optional().meta({examples:[Ee.Coupon.active],description:"Whether this coupon is currently active."}),showHidden:Yi().optional().meta({examples:[!1],description:"Whether this coupon reveals hidden admissions and sections within its scope."}),kind:pu.meta({examples:["PERCENT"],description:"Type of discount this coupon gives: a fixed amount or a percentage."}),filter:mu.meta({examples:["EVENTS"],description:"Scope of the coupon. TEAM applies to all events in the team. PROMOTER applies to all events by specified promoters. EVENTS/SECTIONS/ADMISSIONS apply to specific items."}),currency:zo.optional().meta({examples:[Ee.Coupon.currency],description:"Three-letter ISO 4217 currency code. Required for AMOUNT coupons. Optional for PERCENT coupons - when omitted, applies to all currencies."}),discount:zi().min(0).meta({examples:[Ee.Coupon.discount],description:"The discount value. If kind is 'amount', this is a currency amount. If kind is 'percent', this is a percentage."}),limit:zi().meta({examples:[Ee.Coupon.limit],description:"Maximum number of times the coupon can be redeemed across all customers."}),uses:zi().optional().meta({examples:[Ee.Coupon.uses],description:"Number of times this coupon has been redeemed so far."}),promoters:so(uo({id:yi().meta({description:"Identifier of a promoter this coupon applies to."}),name:yi().meta({description:"Name of a promoter this coupon applies to."}),slug:yi().meta({description:"URL slug of a promoter this coupon applies to."})})).optional().meta({description:"List of promoters this coupon applies to when filter is PROMOTER."}),events:so(uo({id:yi().meta({description:"Identifier of an event this coupon applies to."}),name:yi().meta({description:"Name of an event this coupon applies to."}),slug:yi().meta({description:"URL slug of an event this coupon applies to."})})).optional().meta({description:"List of events this coupon applies to when filter is EVENTS."}),sections:so(uo({id:yi().meta({description:"Identifier of a section this coupon applies to."}),name:yi().meta({description:"Name of a section this coupon applies to."}),eventId:yi().meta({description:"Identifier of the event this section belongs to."})})).optional().meta({description:"List of sections this coupon applies to when filter is 'sections'."}),admissions:so(uo({id:yi().meta({description:"Identifier of an admission this coupon applies to."}),name:yi().meta({description:"Name of an admission this coupon applies to."}),eventId:yi().meta({description:"Identifier of the event this admission belongs to."})})).optional().meta({description:"List of admissions this coupon applies to when filter is 'admissions'."}),saleStartsAt:ba.meta({examples:[Ee.Coupon.saleStartsAt],description:"Wall clock time when this coupon becomes valid (no timezone, ISO 8601 format: YYYY-MM-DDTHH:mm:ss)"}),saleEndsAt:ba.optional().meta({examples:[Ee.Coupon.saleEndsAt],description:"Wall clock time when this coupon expires (no timezone, ISO 8601 format: YYYY-MM-DDTHH:mm:ss)"}),teamId:yi().meta({description:"Team that created this coupon."})}).meta({description:"coupon"}),hu=uo({id:yi().readonly().meta({examples:[Ee.CouponCode.id],description:"A unique identifier for this coupon code."}),createdAt:Hr().readonly().meta({examples:[Ee.CouponCode.createdAt],description:"Timestamp in ISO 8601 format when this coupon code was created."}),updatedAt:Hr().readonly().meta({examples:[Ee.CouponCode.updatedAt],description:"Timestamp in ISO 8601 format when this coupon code was last updated."}),name:yi().meta({examples:[Ee.CouponCode.name],description:"The code string that customers enter to redeem the coupon."}),active:Yi().meta({examples:[Ee.CouponCode.active],description:"Whether this coupon code is currently enabled for use."}),couponId:yi().meta({examples:[Ee.Coupon.id],description:"Identifier of the coupon to which this code belongs."}),teamId:yi().meta({description:"Team that created this coupon code."}),uses:zi().int().nonnegative().default(0).readonly().meta({examples:[0],description:"Number of times this specific coupon code has been used in successful orders."})}).meta({description:"coupon-code"}),vu=hu.pick({id:!0});uo({couponId:yi().meta({examples:[Ee.Coupon.id]})}),uo({name:yi(),couponId:yi().optional().meta({examples:[Ee.Coupon.id]})});const gu=hu.omit({id:!0,createdAt:!0,updatedAt:!0,uses:!0}),yu=hu.omit({createdAt:!0,updatedAt:!0,couponId:!0,teamId:!0,uses:!0}).partial().extend({id:hu.shape.id}),bu=vu,wu=uo({couponId:yi().optional().meta({examples:[Ee.Coupon.id],description:"Optional filter to retrieve coupon codes for a specific coupon"}),teamId:yi().optional().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"Optional filter to retrieve coupon codes created by a specific team"}),active:qo().optional().meta({examples:[!0],description:"Optional filter to retrieve only active or inactive coupon codes"}),query:yi().optional().meta({examples:["SUMMER"],description:"Optional search query to filter coupon codes by name. When provided, search-backed pagination is used."}),limit:wa("coupon codes").optional(),cursor:yi().optional().meta({examples:["eyJpZCI6ImNwY18wMWpwczVjZ3NmenR3N2h4Y3ZyMndmdGsyIn0"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Schema for listing coupon codes with optional filtering, search, and pagination"}),$u=Wa(hu,"codes"),Iu=uo({couponCode:hu}),ku=fu.omit({id:!0,createdAt:!0,updatedAt:!0}).strict().refine((e=>"PERCENT"!==e.kind||e.discount<=100),{path:["discount"],message:"Discount must be 100 or less for PERCENT coupons"}).meta({description:"Schema for creating a new coupon without system-generated fields"}),Eu=fu.pick({id:!0}).meta({description:"Schema for retrieving a single coupon by ID"}),xu=Eu.meta({description:"Schema for deleting a coupon by ID with optional soft-delete filtering"}),Au=uo({teamId:yi().meta({examples:[Ee.Team.id],description:"Unique identifier of the team whose coupons to retrieve"}),active:qo().optional().meta({examples:[!0],description:"Optional filter to retrieve only active or inactive coupons"}),query:yi().optional().meta({examples:["Half Price"],description:"Optional search query to filter coupons by name or description. When provided, search-backed pagination is used."}),limit:wa("coupons").optional(),cursor:yi().optional().meta({examples:["eyJpZCI6ImNwbl8wMWpwczVjZ3NmenMxa3NxYWV0NWhiYThhYyJ9"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Schema for listing coupons belonging to a specific team with optional filtering and pagination"}),Tu=Wa(fu,"coupons"),Ou=uo({coupon:fu}),_u=fu.omit({createdAt:!0,updatedAt:!0,teamId:!0}).partial().extend({id:fu.shape.id.meta({examples:[Ee.Coupon.id],description:"Unique identifier of the coupon to update"}),saleEndsAt:ba.nullable().optional().meta({examples:[Ee.Coupon.saleEndsAt],description:"Expiry time. Pass null to remove end date; omit to leave unchanged."}),currency:zo.nullable().optional().meta({examples:["AUD","USD","GBP"],description:"Three-letter ISO 4217 currency code. Pass null to clear; omit to leave unchanged."})}).strict().refine((e=>"PERCENT"!==e.kind||void 0===e.discount||e.discount<=100),{path:["discount"],message:"Discount must be 100 or less for PERCENT coupons"}).meta({description:"Schema for updating an existing coupon."}),Du=uo({code:yi()}),Su=se.route({method:"GET",path:"/coupon-codes/{id}",summary:"Get coupon code by ID",tags:["Coupon Codes"]}).input(vu.strict()).output(Iu),Mu=se.route({method:"POST",path:"/coupon-codes",summary:"Create a new coupon code",tags:["Coupon Codes"]}).input(gu.strict()).errors({CONFLICT:{status:409,data:Du.optional()}}).output(Iu),Pu=se.route({method:"PUT",path:"/coupon-codes/{id}",summary:"Update a coupon code",tags:["Coupon Codes"]}).input(yu.strict()).output(Iu);var Cu={get:Su,list:se.route({method:"GET",path:"/coupon-codes",summary:"List coupon codes with cursor-based pagination",description:"Returns coupon code data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Coupon Codes"]}).input(wu.strict()).output($u),create:Mu,update:Pu,remove:se.route({method:"DELETE",path:"/coupon-codes/{id}",summary:"Delete a coupon code",tags:["Coupon Codes"]}).input(bu.strict()).output(Iu)};const ju=uo({committedAndHeldUses:zi(),requestedLimit:zi()}),Nu=se.route({method:"GET",path:"/coupons/{id}",summary:"Get coupon by ID",tags:["Coupons"]}).input(Eu.strict()).output(Ou),Ru=se.route({method:"POST",path:"/coupons",summary:"Create a new coupon",tags:["Coupons"]}).input(ku).output(Ou),Uu=se.route({method:"PUT",path:"/coupons/{id}",summary:"Update a coupon",tags:["Coupons"]}).input(_u).errors({BAD_REQUEST:{status:400,data:ju.optional()}}).output(Ou);var Lu={get:Nu,list:se.route({method:"GET",path:"/coupons",summary:"List coupons with cursor-based pagination",description:"Returns coupon data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Coupons"]}).input(Au.strict()).output(Tu),create:Ru,update:Uu,remove:se.route({method:"DELETE",path:"/coupons/{id}",summary:"Delete a coupon",tags:["Coupons"]}).input(xu.strict()).output(Ou),code:Cu},qu={suggestTags:se.route({method:"POST",path:"/events/tags",summary:"Suggest event genres and categories",description:"Uses AI to analyze event description and optional artwork to suggest relevant music genres and event categories. Returns up to 5 genres and 10 categories with a confidence score.",tags:["Events"]}).input(Qa.strict()).output(Xa)};const Gu=uo({eventId:Ko.meta({description:"Event to like"})}).meta({description:"Request to like an event"}),zu=uo({limit:wa("likes"),cursor:yi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing the current user's liked events with pagination. Returns events sorted by most recently liked first."}),Fu=uo({tenantId:yi().readonly().meta({description:"Tenant ID for multi-tenant isolation"}),userId:Xo.readonly().meta({description:"User who liked the event"}),eventId:Ko.meta({description:"Event the user liked"}),createdAt:Hr().readonly().meta({description:"Timestamp when the user liked the event"})}).meta({description:"Represents a user's like on an event. Used for tracking popular events and building personalized recommendations."}),Bu=Wa(Fu,"likes").meta({description:"Paginated list of event likes. Use cursor-based pagination to navigate through results."}),Wu=uo({eventId:Ko.meta({description:"Event to remove like from"})}).meta({description:"Request to remove the current user's like from an event"}),Yu=uo({like:Fu});var Vu={add:se.route({method:"POST",path:"/events/{eventId}/like",summary:"Like an event",description:"Like an event as the current user. Atomically increments the event's likes counter.",tags:["Events"]}).input(Gu).output(Yu),remove:se.route({method:"DELETE",path:"/events/{eventId}/like",summary:"Remove like from an event",description:"Remove the current user's like from an event. Atomically decrements the event's likes counter.",tags:["Events"]}).input(Wu).output(ro()),list:se.route({method:"GET",path:"/events/likes",summary:"List liked events",description:"List all events the current user has liked, with cursor-based pagination.",tags:["Events"]}).input(zu).output(Bu)};const Zu=uo({id:Qo.readonly().meta({examples:[Ee.Location.id],description:"Location identifier"}),googlePlaceId:yi().optional().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID for this location"}),createdAt:Hr().meta({examples:[Ee.Location.createdAt],description:"Timestamp in ISO 8601 format when the location was created"}),updatedAt:Hr().meta({examples:[Ee.Location.updatedAt],description:"Timestamp in ISO 8601 format when the location was last updated"}),name:yi().meta({examples:[Ee.Location.name],description:"Location name"}),address:yi().meta({examples:[Ee.Location.address],description:"Formatted address"}),city:yi().optional().meta({examples:[Ee.Location.city],description:"City name"}),state:yi().optional().meta({examples:[Ee.Location.state],description:"State or region"}),postcode:yi().optional().meta({examples:[Ee.Location.postcode],description:"Postal code"}),country:yi().meta({examples:[Ee.Location.country],description:"Country name"}),latitude:zi().min(-90).max(90).meta({examples:[Ee.Location.latitude],description:"Latitude coordinate"}),longitude:zi().min(-180).max(180).meta({examples:[Ee.Location.longitude],description:"Longitude coordinate"}),timeZone:yi().min(1).regex(/^[A-Za-z0-9_+-]+(\/[A-Za-z0-9_+-]+)*$/,{message:"Must be a valid IANA timezone identifier format"}).meta({examples:[Ee.Location.timeZone],description:"IANA timezone identifier (e.g., 'America/New_York', 'Europe/London', 'Australia/Sydney', 'UTC'). Must be validated against the IANA timezone database where used."}),types:so(yi()).optional().meta({examples:[["establishment","point_of_interest","stadium"]],description:"Google Place types indicating the category and nature of this location"}),description:yi().optional().meta({examples:["Historic outdoor amphitheater known for summer concerts"],description:"AI-generated description of the place, when available"}),image:ma.optional().meta({description:"Primary location photo"}),venueId:Jo.optional().meta({description:"Venue identifier if this location is a managed venue on the platform"})}).meta({description:"Location with full details including coordinates and timezone"}),Hu=Zu.omit({venueId:!0}).extend({venue:uo({id:Jo.meta({description:"Venue identifier"}),name:yi().meta({description:"Venue name"}),slug:yi().meta({description:"URL-friendly venue slug"}),teamId:yi().meta({description:"Team that owns this venue"}),approval:Go.meta({description:"Venue approval status"}),image:ma.optional().meta({description:"Venue image"}),description:yi().optional().meta({description:"Venue description"})}).optional().meta({description:"Denormalized venue details if this location is a managed venue. Only included when venue is approved."})}),Ku=yi().regex(/^G-[A-Z0-9]+$/,"Google Analytics Measurement ID must start with G-"),Ju=uo({id:na.readonly().meta({examples:[Ee.Promoter.id],description:"Unique identifier for the promoter organization"}),createdAt:Hr().readonly().meta({examples:[Ee.Promoter.createdAt],description:"Timestamp in ISO 8601 format when the promoter was created"}),updatedAt:Hr().readonly().meta({examples:[Ee.Promoter.updatedAt],description:"Timestamp in ISO 8601 format when the promoter was last updated"}),name:yi().min(3).max(30).meta({examples:[Ee.Promoter.name],description:"Display name of the promoter organization. Must be between 3 and 30 characters"}),slug:yi().min(3).max(30).meta({examples:[Ee.Promoter.slug],description:"URL-friendly slug for the promoter organization. Must be unique and between 3 and 30 characters"}),teamId:Ho.meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"ID of the team that owns this promoter. Establishes team-based organization and permissions."}),description:yi().meta({examples:[Ee.Promoter.description],description:"Detailed description of the promoter organization and their events"}),approval:Go.meta({examples:[Ee.Promoter.approval],description:"Approval status of the promoter. PENDING: awaiting review, APPROVED: can create events, REJECTED: cannot operate"}),image:ma.optional().meta({description:"Optional promotional image for the promoter organization with dimensions and alt text"}),location:Hu.meta({description:"Primary location details for the promoter including address, coordinates, and timezone"}),geohash:yi().meta({examples:[Ee.Promoter.geohash],description:"Geohash encoding of the promoter's location for efficient spatial queries"}),tracking:uo({fbId:yi().optional().meta({examples:[Ee.Promoter.tracking.fbId],description:"Facebook pixel ID for tracking conversions and analytics"}),gaId:Ku.optional().meta({examples:[Ee.Promoter.tracking.gaId],description:"Google Analytics 4 Measurement ID for web analytics"}),tikTokId:yi().optional().meta({examples:[Ee.Promoter.tracking.tikTokId],description:"TikTok pixel ID for advertising and conversion tracking"})}).optional().meta({description:"Optional tracking configuration for analytics and advertising platforms"}),metadata:ya}).meta({description:"Promoter organization with location and approval status"}),Qu=uo({id:yi().readonly().meta({examples:[Ee.Section.id],description:"Unique identifier for the section"}),createdAt:Hr().readonly().meta({examples:[Ee.Section.createdAt],description:"Timestamp when the section was created in ISO 8601 format"}),updatedAt:Hr().readonly().meta({examples:[Ee.Section.updatedAt],description:"Timestamp when the section was last updated in ISO 8601 format"}),name:yi().meta({examples:[Ee.Section.name],description:"Display name of the section (e.g., 'VIP Area', 'General Admission')"}),capacity:fa().prefault(-1).meta({examples:[Ee.Section.capacity],description:"Maximum number of attendees for this section. Use -1 for unlimited capacity"}),limit:ha().prefault(-1).meta({examples:[Ee.Section.limit??-1],description:"Maximum number of tickets for this section that can be purchased in a single order. A value of -1 indicates unlimited"}),available:zi().min(-1).readonly().meta({examples:[Ee.Section.available],description:"Number of tickets currently available for purchase in this section. Use -1 when capacity is unlimited"}),sold:zi().min(0).readonly().meta({examples:[Ee.Section.sold],description:"Number of tickets sold for this section"}),reserved:zi().readonly().meta({examples:[Ee.Section.reserved],description:"Number of tickets currently reserved (in pending orders) for this section"}),order:zi().min(0).meta({examples:[Ee.Section.order],description:"Display order of the section. Lower numbers appear first in listings"}),visibility:bo(["ALWAYS","STACKED","HIDDEN"]).prefault("ALWAYS").meta({examples:["ALWAYS"],description:"Controls how this section is shown: always list all visible admissions, stack to show the cheapest available admission, or hide until a scoped coupon reveals it."}),location:Zu.meta({description:"Physical location details for the section"}),teamId:yi().meta({description:"Team that owns this section. Denormalized for efficient queries."}),promoterId:yi().meta({examples:[Ee.Section.promoterId],description:"Unique identifier of the promoter who owns this section"}),eventId:yi().meta({examples:[Ee.Section.eventId],description:"Unique identifier of the event this section belongs to"}),eventSlug:yi().meta({examples:[Ee.Section.eventSlug],description:"URL-friendly identifier of the event this section belongs to"})}).meta({description:"A section represents a distinct area or tier within an event venue with its own capacity and pricing"}),Xu=bo(["UPCOMING","ENDED"]),el=bo(["PUBLIC","PRIVATE","SCHEDULED","PASSCODE","CANCELLED"]),tl=bo(["HIDDEN","SCHEDULED","PUBLIC"]),nl=uo({visibility:tl.optional().meta({description:"Whether public event surfaces show the full location address. Missing values are treated as PUBLIC unless legacy location reveal data says otherwise."}),publishAt:ba.optional().meta({description:"Wall clock time when the location address becomes public. Required when location visibility is SCHEDULED."}),sendAt:ba.optional().meta({description:"Wall clock time when customers with successful orders can see the full location address and receive the notification."}),instructions:yi().max(2e3).optional().meta({description:"Arrival instructions shown to customers once the location address has been sent."})}),rl=Hu.extend(nl.shape),il=uo({id:Ko.readonly().meta({examples:[Ee.Event.id],description:"A unique identifier for this event"}),createdAt:Hr().readonly().meta({examples:[Ee.Event.createdAt],description:"Timestamp in ISO 8601 format when this event was created"}),updatedAt:Hr().readonly().meta({examples:[Ee.Event.updatedAt],description:"Timestamp in ISO 8601 format when this event was last updated"}),name:yi().meta({examples:[Ee.Event.name],description:"The title of the event shown to attendees"}),slug:yi().meta({examples:[Ee.Event.slug],description:"URL-friendly identifier for the event"}),description:yi().meta({examples:[Ee.Event.description],description:"Detailed description of the event"}),approval:Go.meta({examples:["APPROVED"],description:"Approval status of the event"}),status:Xu.meta({examples:["UPCOMING","ENDED"],description:"Current stage of the event lifecycle"}),visibility:el.meta({examples:["PUBLIC"],description:"Who can see the event"}),currency:zo.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code used for ticket prices"}),url:xi().optional().meta({examples:["https://example.com"],description:"External URL for the event website or ticket page"}),entryStartsAt:ba.meta({examples:[Ee.Event.entryStartsAt],description:"Wall clock time when event entry begins (no timezone, displays same everywhere)"}),entryEndsAt:ba.meta({examples:[Ee.Event.entryEndsAt],description:"Wall clock time when event entry ends (no timezone, displays same everywhere)"}),publishAt:ba.meta({examples:[Ee.Event.publishAt],description:"Wall clock time when the event becomes publicly visible (no timezone)"}),locationRevealAt:ba.optional().meta({description:"Deprecated. Use location.sendAt for customer access and location.publishAt for scheduled public address visibility."}),entryInstructions:yi().max(2e3).optional().meta({description:"Deprecated. Use location.instructions for customer-facing arrival instructions."}),images:uo({mobile:ma.meta({description:"Mobile-optimized image for the event"}),desktop:ma.meta({description:"Desktop-optimized image for the event"})}),geohash:yi().meta({examples:[Ee.Event.geohash],description:"Geohash representing the event location"}),location:rl.meta({description:"Structured location details for the event"}),teamId:Ho.meta({description:"Team that owns this event. Denormalized for efficient queries."}),promoterId:na.meta({examples:[Ee.Promoter.id],description:"Promoter organizing the event. Must belong to the team."}),metadata:ya,genres:so(yi()).optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:so(yi()).optional().meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]}),featured:Yi().optional().meta({description:"Whether this event is an editorial pick",examples:[!0]}),likes:zi().int().min(0).optional().meta({description:"Number of users who liked this event",examples:[42]})}).meta({description:"event"}),ol=Ju.pick({id:!0,name:!0,slug:!0,description:!0,image:!0}),al=uo({event:il.extend({passcode:yi().optional().meta({description:"Plain-text event passcode. Included only on internal event detail responses for users with event.read access."}),sections:so(Qu),admissions:so(qa),promoter:ol.optional().meta({description:"Public summary of the promoter organizing this event. Included on event detail responses only."}),liked:Yi().optional().meta({description:"Whether the current user has liked this event",examples:[!0,!1]})})}),sl=bo(["APPROVED","REJECTED"]);bo(["CREATED","UPDATED","MANUAL"]);const dl=uo({key:yi().meta({examples:[Ee.Event.id,Ee.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),teamId:Ho.optional().meta({description:"Optional team scope. When provided, event must belong to this team."})}).meta({description:"Schema for retrieving internal event approval state."}),cl=uo({eventId:Ko,teamId:Ho,approval:Go,reason:yi().max(2e3).nullable(),requestedAt:Hr().nullable(),changedAt:Hr().nullable(),changedByUserId:yi().nullable(),submittedByUserId:yi().nullable()}).meta({description:"Internal approval workflow state for an event."}),ul=uo({approval:cl}),ll=dl.meta({description:"Schema for requesting or resubmitting event approval."}),pl=uo({key:yi().meta({examples:[Ee.Event.id,Ee.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),approval:sl.meta({examples:["APPROVED"],description:"Approval decision for the event"}),reason:yi().max(2e3).optional().meta({description:"Optional reason shown to the event submitter when rejecting the event"}),requestedAt:Hr().optional().meta({description:"Approval request timestamp from an email action. When provided, the event must still be pending for that request."})}).meta({description:"Schema for approving or rejecting an event."}),ml=il.omit({id:!0,teamId:!0,createdAt:!0,updatedAt:!0,status:!0,approval:!0,geohash:!0,location:!0,featured:!0,likes:!0}).extend({slug:yi().min(3).max(100).optional().meta({examples:[Ee.Event.slug],description:"URL-friendly slug for the event. If not provided, will be automatically generated from the name. Must be unique and between 3 and 100 characters"}),passcode:yi().optional().meta({description:"Passcode for protected access to the event"}),locationId:Qo.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location. Either locationId or googlePlaceId must be provided."}),googlePlaceId:yi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to create a new location from. Either locationId or googlePlaceId must be provided."}),location:nl.optional().meta({description:"Event-specific location visibility, customer send time, and arrival instructions."}),genres:Yo.optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:Bo.meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]})}).refine((e=>e.locationId||e.googlePlaceId),{message:"Either locationId or googlePlaceId must be provided"}),fl=uo({key:yi().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[Ee.Event.id,Ee.Event.slug]})}),hl=uo({key:yi().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[Ee.Event.id,Ee.Event.slug]}),name:yi().min(1).meta({description:"Name for the duplicated event",examples:[Ee.Event.name+" (Copy)"]}),entryStartsAt:ba.meta({description:"New event entry start time. Other copied event and admission datetimes are shifted by the same offset.",examples:[Ee.Event.entryStartsAt]}),url:xi().nullable().optional().meta({description:"External ticketing URL for the duplicated event. Pass null to create the copy without an external URL; omit to copy the source URL.",examples:["https://example.com/events/summer-festival-2025"]})}),vl=uo({key:yi().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[Ee.Event.id,Ee.Event.slug]}),featured:Yi().meta({description:"Whether the event should be featured (editorial pick)",examples:[!0,!1]})}),gl=uo({key:yi().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[Ee.Event.id,Ee.Event.slug]}),passcode:yi().optional().meta({description:"Passcode for accessing protected events"}),couponCode:yi().optional().meta({description:"Coupon code used to reveal hidden admissions and sections when eligible."}),teamId:yi().optional().meta({description:"Optional team scope. When provided, event must belong to this team."})}),yl=uo({sold:zi().min(0).meta({description:"Number of tickets sold (net of refunds)"}),reserved:zi().min(0).meta({description:"Number of tickets reserved"}),available:zi().min(-1).meta({description:"Number of tickets available (-1 for unlimited)"}),capacity:zi().min(-1).meta({description:"Total capacity (-1 for unlimited)"})}),bl=bo(["entryStartsAt","createdAt"]),wl=bo(["asc","desc"]),$l=uo({status:bo(["UPCOMING","ENDED"]).optional().meta({examples:["UPCOMING"],description:"Filter events by their current lifecycle status"}),approval:Go.optional().meta({examples:["APPROVED"],description:"Filter events by their approval status"}),visibility:bo(["PUBLIC","PRIVATE","SCHEDULED","PASSCODE"]).optional().meta({examples:["PUBLIC"],description:"Filter events by their visibility setting"}),promoterId:yi().optional().meta({examples:[Ee.Promoter.id],description:"Filter events to only those belonging to a specific promoter. If not provided, returns events from all promoters the user has access to"}),teamId:yi().optional().meta({description:"Filter events to only those belonging to a specific team. If not provided, returns events from all teams the user has access to"}),venueId:yi().optional().meta({description:"Filter events to only those at a specific venue. If not provided, returns events at all venues"}),limit:Lo().min(1).max(100).prefault(20).meta({examples:[20],description:"Maximum number of events to return in each result set. Must be between 1 and 100, defaults to 20"}),cursor:yi().optional().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Cursor token for pagination. Provide the cursor from the previous response to continue fetching results"}),query:function(){return new gi({type:"string",coerce:!0,...Ke(undefined)})}(0,void 0).optional().meta({examples:["Test Event"],description:"Search term to filter events by name, description, or location. Triggers full‑text search when provided"}),latitude:Lo().min(-90).max(90).optional().meta({examples:[Ee.Event.location.latitude],description:"Latitude coordinate for geographic search. Provide with longitude (and optional radius)"}),longitude:Lo().min(-180).max(180).optional().meta({examples:[Ee.Event.location.longitude],description:"Longitude coordinate for geographic search. Provide with latitude (and optional radius)"}),radius:Lo().optional().meta({examples:[20],description:"Search radius in kilometers from the provided coordinates. Defaults to 20km"}),country:yi().optional().meta({examples:["australia"],description:"Filter by country region slug. Matches events where location.country equals the region name"}),state:yi().optional().meta({examples:["nsw"],description:"Filter by state/province region slug. Matches events where location.state equals the region name"}),city:yi().optional().meta({examples:["sydney"],description:"Filter by city region slug. Matches events where location.city equals the region name"}),from:yi().date().optional().meta({examples:["2024-01-01"],description:"Filter events that start on or after this date (YYYY-MM-DD format). Events with entryStartsAt >= from"}),to:yi().date().optional().meta({examples:["2024-12-31"],description:"Filter events that start on or before this date (YYYY-MM-DD format). Events with entryStartsAt <= to"}),sort:bl.optional().meta({examples:["createdAt"],description:"Optional list sort field. Defaults to event start time. Use `createdAt` to return newest or oldest events first."}),direction:wl.optional().meta({examples:["desc"],description:"Sort direction for event lists. Defaults to lifecycle-aware event start order unless `sort` is provided."}),genres:so(Wo).max(20,"Cannot filter by more than 20 genres").optional().meta({examples:[["Tech House","Melodic Techno"]],description:"Filter events by music genre(s). Returns events matching ANY of the provided genres (OR logic). Maximum 20 genres"}),categories:so(Fo).max(10,"Cannot filter by more than 10 categories").optional().meta({examples:[["Day Party","Open Air"]],description:"Filter events by category(s). Returns events matching ANY of the provided categories (OR logic). Maximum 10 categories"}),featured:Yi().optional().meta({examples:[!0],description:"Filter to only featured (editorial pick) events"})}).meta({description:"List events with filtering, full‑text search, geo queries, date range filtering, genre/category filtering, and cursor-based pagination"}),Il=$l,kl=La({booking:"Booking fee for the cheapest publicly purchasable admission, in cents",currency:"Three-letter ISO 4217 currency code for the cheapest publicly purchasable admission",price:"Cheapest publicly purchasable admission price for this event, selected by base price"}),El=Wa(il.extend({inventory:yl.optional(),liked:Yi().optional().meta({description:"Whether the current user has liked this event",examples:[!0,!1]}),price:kl.nullable().meta({description:"Cheapest publicly purchasable admission price, or null when no public admission is currently available"})}),"events"),xl=uo({event:il});bo(["ONLINE","DOOR","SALE_ENDED","SOLD_OUT"]);const Al=$l.omit({cursor:!0,limit:!0}).extend({limit:Lo().int().min(1).max(1e3).prefault(1e3).meta({examples:[1e3],description:"Maximum number of event slugs to return. Must be between 1 and 1000, defaults to 1000"}),skip:Lo().int().min(0).prefault(0).meta({examples:[0],description:"Number of matching event slugs to skip before returning results"})}),Tl=uo({slugs:so(yi()).meta({description:"Current event slugs for the matching event list"}),skip:Lo().int().min(0).meta({examples:[0],description:"Number of matching event slugs skipped"}),limit:Lo().int().min(1).max(1e3).meta({examples:[1e3],description:"Maximum number of event slugs returned"})}),Ol=uo({visibility:tl.optional().meta({description:"Whether public event surfaces show the full location address. Omit to leave unchanged."}),publishAt:nl.shape.publishAt.nullable().optional().meta({description:"Public location address publish time. Pass null to clear; omit to leave unchanged."}),sendAt:nl.shape.sendAt.nullable().optional().meta({description:"Customer location address send time. Pass null to clear; omit to leave unchanged."}),instructions:nl.shape.instructions.nullable().optional().meta({description:"Arrival instructions for customers. Pass null to clear; omit to leave unchanged."})}),_l=il.omit({createdAt:!0,updatedAt:!0,geohash:!0,status:!0,approval:!0,location:!0,featured:!0,likes:!0}).partial().extend({key:yi().meta({examples:[Ee.Event.id,Ee.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),passcode:yi().nullable().optional().meta({description:"Passcode for protected access. Pass null to clear; omit to leave unchanged."}),url:xi().nullable().optional().meta({examples:["https://example.com/events/summer-festival-2025"],description:"External event URL. Pass null to clear; omit to leave unchanged."}),locationRevealAt:il.shape.locationRevealAt.nullable().optional().meta({description:"Wall clock time when the venue address becomes visible. Pass null to clear before reveal; omit to leave unchanged."}),entryInstructions:il.shape.entryInstructions.nullable().optional().meta({description:"Entrance instructions sent when the location is revealed. Pass null to clear; omit to leave unchanged."}),locationId:Qo.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:yi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."}),location:Ol.optional().meta({description:"Event-specific location visibility, public publish time, customer send time, and arrival instructions."}),genres:Yo.optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:Bo.meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]}),notify:Yi().optional().meta({description:"Whether attendees should be notified about this event update.",examples:[!0]})}).meta({description:"Schema for updating an existing event."}),Dl=vd.extend({limit:Lo().min(1).max(100).optional().default(10)}),Sl=fd.extend({limit:Lo().min(1).max(100).optional().default(10)}),Ml=Id.extend({limit:Lo().min(1).max(100).optional().default(10)}),Pl=yd.extend({limit:Lo().min(1).max(100).optional().default(10)}),Cl=wd.extend({limit:Lo().min(1).max(100).optional().default(10)}),jl=Ed.extend({limit:Lo().min(1).max(100).optional().default(10)}),Nl=Ad.extend({limit:Lo().min(1).max(100).optional().default(10)}),Rl=Pd.extend({limit:Lo().min(1).max(50).optional().default(10)}),Ul=jd.extend({includeAdmission:qo().optional().default(!0),includeSection:qo().optional().default(!0)}),Ll=qd.extend({});var ql={summary:se.route({method:"GET",path:"/events/{eventId}/performance/summary",summary:"Get event performance summary",description:"Top-level KPI metrics with period comparison based on tracking events",tags:["Event Performance"]}).input(ed).output(td),tickets:se.route({method:"GET",path:"/events/{eventId}/performance/tickets",summary:"Get ticket sales performance",description:"Time series of sold tickets and successful-order revenue by period, with admission and section breakdowns",tags:["Event Performance"]}).input(nd).output(rd),timeseries:se.route({method:"GET",path:"/events/{eventId}/performance/timeseries",summary:"Get event metric time series",description:"Per-bucket series of revenue, tickets, orders, page views, visitors, and conversion rate for the selected range",tags:["Event Performance"]}).input(od).output(ad),funnel:se.route({method:"GET",path:"/events/{eventId}/performance/funnel",summary:"Get sales funnel performance",description:"Conversion funnel showing drop-off at each stage from tracking events",tags:["Event Performance"]}).input(sd).output(dd),campaigns:se.route({method:"GET",path:"/events/{eventId}/performance/campaigns",summary:"Get campaign performance",description:"Marketing campaign metrics from tracking events (UTM campaign parameter)",tags:["Event Performance"]}).input(Dl).output(gd),coupons:se.route({method:"GET",path:"/events/{eventId}/performance/coupons",summary:"Get coupon performance",description:"Coupon usage and revenue from actual order data",tags:["Event Performance"]}).input(Sl).output(hd),mediums:se.route({method:"GET",path:"/events/{eventId}/performance/mediums",summary:"Get traffic medium performance",description:"Performance by traffic medium (social, email, cpc) from tracking events",tags:["Event Performance"]}).input(Pl).output(bd),devices:se.route({method:"GET",path:"/events/{eventId}/performance/devices",summary:"Get device performance",description:"Performance breakdown by device type from tracking events",tags:["Event Performance"]}).input(Cl).output($d),browsers:se.route({method:"GET",path:"/events/{eventId}/performance/browsers",summary:"Get browser performance",description:"Traffic breakdown by browser from tracking events",tags:["Event Performance"]}).input(Ml).output(kd),locations:se.route({method:"GET",path:"/events/{eventId}/performance/locations",summary:"Get geographic performance",description:"Performance by geographic location from tracking events",tags:["Event Performance"]}).input(jl).output(xd),traffic:se.route({method:"GET",path:"/events/{eventId}/performance/traffic",summary:"Get traffic source performance",description:"Top referral sources and channels from tracking events",tags:["Event Performance"]}).input(Nl).output(Td),attendance:se.route({method:"GET",path:"/events/{eventId}/performance/attendance",summary:"Get event attendance statistics",description:"Check-in statistics and attendance breakdown by admission and section",tags:["Event Performance"]}).input(Od).output(Md),scanners:se.route({method:"GET",path:"/events/{eventId}/performance/scanners",summary:"Get door staff scanner activity",description:"Ranked check-in activity by scanner for post-event door staff analytics",tags:["Event Performance"]}).input(Rl).output(Cd),turnout:se.route({method:"GET",path:"/events/{eventId}/performance/turnout",summary:"Get event turnout analysis",description:"Post-event sold versus checked-in tickets by admission and section",tags:["Event Performance"]}).input(Ul).output(Ld),pace:se.route({method:"GET",path:"/events/{eventId}/performance/pace",summary:"Get event check-in pace",description:"Post-event check-in flow over the admission entry window with peak door volume",tags:["Event Performance"]}).input(Ll).output(Gd)};const Gl=se.route({method:"GET",path:"/events/slugs",summary:"List event slugs",description:"List current event slugs with the same filters and access rules as event lists. Supports skip/limit pagination for sitemap generation.",tags:["Events"]}).input(Al).output(Tl),zl=se.route({method:"GET",path:"/events/{key}",summary:"Get event by ID or slug",description:"Retrieve an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(gl).output(al),Fl=se.route({method:"POST",path:"/events",summary:"Create a new event",tags:["Events"]}).input(ml.strict()).output(xl),Bl=se.route({method:"POST",path:"/events/{key}/duplicate",summary:"Duplicate an event",description:"Create a new event by copying event details, sections, and admissions from an existing event.",tags:["Events"]}).input(hl.strict()).output(xl),Wl=se.route({method:"PUT",path:"/events/{key}",summary:"Update an event",description:"Update an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(_l.strict()).output(xl),Yl={get:se.route({method:"GET",path:"/events/{key}/approval",summary:"Get event approval status",description:"Get internal event approval status and reviewer feedback. Requires event.read permission on the event owner team.",tags:["Events"]}).input(dl.strict()).output(ul),request:se.route({method:"POST",path:"/events/{key}/approval/request",summary:"Request event approval",description:"Request or resubmit event approval. Requires event.write permission on the event owner team.",tags:["Events"]}).input(ll.strict()).output(xl),update:se.route({method:"PUT",path:"/events/{key}/approval",summary:"Approve or reject an event",description:"Approve or reject an event. Requires event.write permission on the tenant admin team.",tags:["Events"]}).input(pl.strict()).output(xl)};var Vl={slugs:Gl,get:zl,list:se.route({method:"GET",path:"/events",summary:"List events",description:"List events with filters for status, approval, visibility, and promoter. Supports full‑text search (query), geo search (latitude/longitude/radius), and cursor-based pagination.",tags:["Events"]}).input(Il).output(El),create:Fl,duplicate:Bl,update:Wl,approval:Yl,remove:se.route({method:"DELETE",path:"/events/{key}",summary:"Delete an event",description:"Delete an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(fl.strict()).output(xl),feature:se.route({method:"POST",path:"/events/{key}/feature",summary:"Toggle event featured status",description:"Set or remove featured status on an event. Tenant admin only.",tags:["Events"]}).input(vl.strict()).output(xl),like:Vu,performance:ql,tags:qu.suggestTags};const Zl=uo({id:ca.readonly().meta({description:"Unique identifier for the event collaborator"}),createdAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the collaborator was added"}),updatedAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the collaborator was last updated"}),eventId:Ko.meta({description:"Event this collaboration applies to"}),promoterId:na.meta({description:"Promoter collaborating on the event"}),acceptedBy:Xo.meta({description:"User ID who accepted the invitation to collaborate"}),promoter:uo({id:na.meta({description:"Unique identifier of the promoter"}),name:yi().meta({description:"Name of the promoter"}),teamId:Ho.meta({description:"Team ID of the promoter"})}).optional().meta({description:"Populated promoter details. Only included when explicitly requested."}),permissions:Pa.meta({description:"Permissions granted to this collaborator. User must have permission in BOTH this grant AND their team membership (intersection).",examples:[[],["event.read","event.write"],["order.read"],["ticket.scan"],["*"]]}),tenantId:yi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Active event collaborator. Created when a promoter accepts an invitation or is directly added to an event. Hard deleted when removed."}),Hl=Zl.pick({id:!0,eventId:!0}).meta({description:"Schema for accepting an event promoter collaboration invitation. User accepting must be a member of the invited promoter's team."}),Kl=uo({id:ca.readonly().meta({description:"Unique identifier for the event collaboration invitation"}),createdAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was created"}),updatedAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was last updated"}),eventId:Ko.meta({description:"Event this invitation applies to"}),promoterId:na.meta({description:"Promoter being invited to collaborate on the event."}),invitedByPromoterId:na.meta({description:"Promoter who sent this invitation (event owner or collaborator with permission)."}),permissions:Pa.meta({description:"Permissions the promoter will receive upon accepting the invitation.",examples:[[],["event.read","event.write"],["order.read"],["ticket.scan"],["*"]]}),token:yi().readonly().meta({description:"Secure token for invite acceptance. Required to accept the invitation."}),invitedBy:Xo.meta({description:"User ID who sent the invitation"}),expiresAt:zi().int().positive().meta({description:"Unix timestamp (seconds) for DynamoDB TTL. Invitation will be automatically deleted after 7 days."}),tenantId:yi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Pending event collaborator invitation. Automatically deleted after 7 days via DynamoDB TTL. When accepted, creates an EventCollaborator record and deletes the invitation."}),Jl=Kl.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,token:!0,expiresAt:!0,invitedByPromoterId:!0}).meta({description:"Schema for inviting a promoter to collaborate on an event. Creates a pending invitation that the promoter can accept."}),Ql=uo({eventId:Ko.meta({description:"Event ID that the collaboration belongs to"}),id:ca.meta({description:"Event team access grant ID to retrieve"})}),Xl=uo({invite:Kl}),ep=uo({eventId:yi().meta({description:"Event ID to list collaborators for"}),accessPromoterId:yi().optional().meta({description:"DEPRECATED: Use 'promoterId' instead. Filter by collaborating promoter ID (what events can this promoter access). Maintained for backward compatibility."}),ownerPromoterId:yi().optional().meta({description:"DEPRECATED: No longer used. Maintained for backward compatibility only."}),limit:wa("event collaborators"),cursor:yi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing active event collaborations with pagination and filtering. Only returns accepted collaborations (not pending invitations). Use invite endpoints for pending invitations."}),tp=Wa(Zl,"grants"),np=uo({collaborator:Zl});var rp={get:se.route({method:"GET",path:"/events/{eventId}/collaborators/{id}",summary:"Get event collaborator by ID",description:"Retrieve an active event collaboration by its unique ID. Returns the collaborator record with promoter and permission details.",tags:["Event Collaborators"]}).input(Ql.strict()).output(np),list:se.route({method:"GET",path:"/events/{eventId}/collaborators",summary:"List active event collaborators with cursor-based pagination",description:"Returns active event collaborations for a specific event with cursor pagination. Only shows accepted collaborators. For pending invitations, use the invite endpoints.",tags:["Event Collaborators"]}).input(ep.strict()).output(tp),create:se.route({method:"POST",path:"/events/{eventId}/collaborators",summary:"Invite a promoter to collaborate on an event",description:"Send a collaboration invitation to a promoter (can be from a different team). Enables cross-team promoter-to-promoter collaboration. Creates a pending invitation with a secure token that expires in 7 days. The invited promoter must accept to create an active collaboration.",tags:["Event Collaborators"]}).input(Jl.strict()).output(Xl),accept:se.route({method:"POST",path:"/events/{eventId}/collaborators/{id}/accept",summary:"Accept an event collaboration invitation",description:"Accept a pending event collaboration invitation. User must be a member of the invited promoter's team. Deletes the invitation and creates an active collaboration record.",tags:["Event Collaborators"]}).input(Hl.strict()).output(np),remove:se.route({method:"DELETE",path:"/events/{eventId}/collaborators/{id}",summary:"Remove active event collaboration",description:"Remove an active collaboration (hard delete). Can be done by event team members or the collaborating team members. This completely removes access.",tags:["Event Collaborators"]}).input(Ql.strict()).output(ro())};const ip=uo({language:yi().trim().max(80).optional(),platform:yi().trim().max(120).optional(),timezone:yi().trim().max(120).optional(),userAgent:yi().trim().max(800).optional(),viewport:uo({width:zi().int().positive().max(1e4),height:zi().int().positive().max(1e4),devicePixelRatio:zi().positive().max(10).optional()}).optional()}),op=uo({key:yi().trim().min(1),message:yi().trim().min(10).max(4e3),pageUrl:xi().max(2e3),pageTitle:yi().trim().max(300).optional(),browser:ip.optional()}),ap=uo({ok:$o(!0)}),sp=uo({file:new Ji({type:"any"}).describe("Image file to upload (max 10MB)"),folder:bo(["avatars","events","teams","promoters","venues"]).describe("Folder to upload to"),width:Lo().int().positive().optional().describe("Target width in pixels"),height:Lo().int().positive().optional().describe("Target height in pixels")}),dp=ma,cp=se.route({method:"POST",path:"/internal/upload/image",summary:"Upload and compress image",description:"Upload an image file (PNG, JPEG, or SVG), optionally resize it, and compress it for web. SVG files are uploaded as-is without compression. Returns the uploaded image URL and metadata.",tags:["Internal"]}).input(sp.strict()).output(dp);var up={shareFeedback:se.route({method:"POST",path:"/internal/feedback",summary:"Share product feedback",description:"Send authenticated tenant dashboard feedback to the Sessions team.",tags:["Internal"]}).input(op.strict()).output(ap),uploadImage:cp};const lp=uo({key:yi().min(1).meta({description:"Location key - either a location ID (loc_xxx format) or provider-specific identifier (e.g., Google Place ID)",examples:[Ee.Location.id,"ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}),pp=uo({query:yi().min(1).meta({examples:["sydney opera"],description:"Search query for location search"}),latitude:Lo().min(-90).max(90).optional().meta({examples:[Ee.Location.latitude],description:"User's latitude for proximity-based results (optional for better relevance)"}),longitude:Lo().min(-180).max(180).optional().meta({examples:[Ee.Location.longitude],description:"User's longitude for proximity-based results (optional for better relevance)"}),types:so(yi()).optional().meta({examples:[["establishment"]],description:"Filter results by Google Place types (e.g., 'establishment', 'night_club', 'bar')"})}).meta({description:"Parameters for searching locations"}),mp=uo({googlePlaceId:yi().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID for this location"}),name:yi().meta({examples:[Ee.Location.name],description:"Primary name of the location"}),description:yi().meta({examples:[Ee.Location.address],description:"Full formatted address"}),venue:uo({id:Jo.meta({examples:[Ee.Venue.id],description:"Venue ID if this location is a managed venue"}),name:yi().meta({examples:[Ee.Venue.name],description:"Venue name"}),teamId:yi().meta({description:"Team that manages this venue"}),image:ma.optional().meta({description:"Primary venue image"})}).optional().meta({description:"Present if this location is a managed venue on the platform"})}).meta({description:"Single location search result with optional venue overlay"}),fp=uo({predictions:so(mp).meta({description:"Array of location predictions"})}).meta({description:"Response containing location search results"}),hp=uo({location:Hu});var vp={list:se.route({method:"GET",path:"/locations",summary:"Search for locations",description:"Search for locations by query. Returns predictions with venue badges for locations that are managed venues on the platform. The query parameter is required.",tags:["Locations"]}).input(pp.strict()).output(fp),get:se.route({method:"GET",path:"/locations/{key}",summary:"Get location details",description:"Fetch full location details including coordinates, timezone, and photo. Accepts location ID or provider identifier (e.g., Google Place ID). Uses cache-first strategy.",tags:["Locations"]}).input(lp.strict()).output(hp)};const gp=uo({name:yi().meta({examples:["tenant-web","team-web","api","partner"],description:"Free-form channel identifier describing where the order originated."}),referrer:yi().optional().meta({examples:["https://sash.teams.mixmag.au/events/example-event"],description:"Optional referrer URL captured at order creation for redirect routing and attribution."}),utmSource:yi().optional().meta({examples:["instagram"],description:"Optional UTM source captured from the originating URL."}),utmMedium:yi().optional().meta({examples:["social"],description:"Optional UTM medium captured from the originating URL."}),utmCampaign:yi().optional().meta({examples:["summer-launch"],description:"Optional UTM campaign captured from the originating URL."}),deviceType:bo(["MOBILE","TABLET","DESKTOP"]).optional().meta({examples:["MOBILE"],description:"Optional analytics device classification captured at order creation."}),browser:yi().optional().meta({examples:["Chrome"],description:"Optional analytics browser classification captured at order creation."}),country:yi().optional().meta({examples:["Australia"],description:"Optional viewer country captured at order creation for analytics attribution."}),region:yi().optional().meta({examples:["Australia - New South Wales"],description:"Optional viewer region captured at order creation for analytics attribution."}),sessionId:yi().optional().meta({examples:["ses_01HX..."],description:"Session ID captured at order creation for client/server analytics linking."}),anonymousId:yi().optional().meta({examples:["aid_01HX..."],description:"Browser anonymous ID captured at order creation for attribution linking."})}),yp=uo({id:yi().meta({examples:[Ee.CouponCode.id],description:"Unique identifier of the coupon code used in the order"}),name:yi().meta({examples:[Ee.CouponCode.name],description:"The coupon code string that was entered by the customer"}),couponId:yi().meta({examples:[Ee.CouponCode.couponId],description:"Unique identifier of the parent coupon configuration"})}),bp=uo({id:yi().meta({examples:[Ee.Customer.id],description:"Unique identifier of the customer who placed the order"}),firstName:yi().meta({examples:[Ee.Customer.firstName],description:"First name of the customer"}),lastName:yi().meta({examples:[Ee.Customer.lastName],description:"Last name of the customer"}),email:$i().meta({examples:[Ee.Customer.email],description:"Email address of the customer"}),phone:yi().meta({examples:[Ee.Customer.phone],description:"Customer phone number in E.164 format for SMS delivery"}).optional()}),wp=uo({id:yi().meta({examples:[Ee.Event.id],description:"Unique identifier of the event associated with the order"}),name:yi().meta({examples:[Ee.Event.name],description:"Display name of the event"}),slug:yi().meta({examples:[Ee.Event.slug],description:"URL-friendly slug of the event"}),location:yi().meta({examples:[Ee.Event.location.name],description:"Name of the venue or location where the event takes place"}).optional(),locationAddress:yi().optional().meta({examples:[Ee.Event.location.address],description:"Full venue address, available once the event location is revealed."}),locationLatitude:zi().optional().meta({examples:[Ee.Event.location.latitude],description:"Venue latitude, available once the event location is revealed."}),locationLongitude:zi().optional().meta({examples:[Ee.Event.location.longitude],description:"Venue longitude, available once the event location is revealed."}),entryInstructions:yi().max(2e3).optional().meta({description:"Latest entry instructions for customers once the event location is revealed."})}),$p=bo(["GATEWAY","SHIPPING","SMS_DELIVERY"]).meta({description:"Type of fee applied to an order"}),Ip=uo({id:yi().meta({examples:[Ee.OrderFee.id],description:"Unique identifier for this order fee"}),createdAt:Hr().readonly().meta({examples:[Ee.OrderFee.createdAt],description:"Timestamp in ISO 8601 format when this fee was created"}),reason:yi().meta({examples:[Ee.OrderFee.reason],description:"Description explaining why this fee was applied to the order"}),amount:zi().finite("Amount must be a valid number").meta({examples:[Ee.OrderFee.amount],description:"Fee amount in cents (positive value indicates charge to customer, negative value indicates credit or discount)"}),currency:zo.meta({examples:[Ee.OrderFee.currency],description:"Currency code in ISO 4217 format"}),requestId:yi().meta({examples:[Ee.OrderFee.requestId],description:"External payment processor request identifier for tracking this fee"}),kind:$p.optional().meta({examples:["GATEWAY"],description:"Type of fee for categorization and reporting"})}),kp=e=>({id:e.id,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:e.name,slug:e.slug,description:e.description,approval:"APPROVED",status:"UPCOMING",visibility:"PUBLIC",currency:"AUD",entryStartsAt:ke(pe(new Date,1)),entryEndsAt:ke(pe(new Date,2)),publishAt:ke(new Date),images:{mobile:{src:"https://assets.session.services/event-mobile.jpg",alt:"Mobile Event Image",width:1080,height:1350},desktop:{src:"https://assets.session.services/event-desktop.jpg",alt:"Desktop Event Image",width:1920,height:1080}},geohash:"r3gx1",location:e.location,teamId:e.teamId,promoterId:e.promoterId,tenantId:e.tenantId}),Ep=e=>({id:e.id,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),...e.sectionId?{sectionId:e.sectionId}:{},...e.teamId?{teamId:e.teamId}:{},promoterId:e.promoterId,eventId:e.eventId,eventSlug:e.eventSlug,name:e.name,capacity:100,limit:-1,available:100,entryStartsAt:ke(pe(new Date,1)),entryEndsAt:ke(pe(new Date,2)),saleStartsAt:ke(new Date),saleEndsAt:ke(pe(new Date,2)),price:{base:1e3,booking:200,currency:"AUD"},tenantId:e.tenantId}),xp=e=>({id:"tkt_01jps5cgsh51kzg7534pzap7gk",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),status:"REDEEMED",scans:[],token:e.token,attendee:{email:Tp.Customer.email,firstName:Tp.Customer.firstName,lastName:Tp.Customer.lastName},event:{id:Tp.WrongEvent.id,name:Tp.WrongEvent.name,slug:Tp.WrongEvent.slug,location:Tp.WrongEvent.location,entryStartsAt:Tp.WrongEvent.entryStartsAt,entryEndsAt:Tp.WrongEvent.entryEndsAt,images:Tp.WrongEvent.images},admission:{id:Tp.WrongAdmission.id,name:Tp.WrongAdmission.name,price:Tp.WrongAdmission.price,entryStartsAt:Tp.WrongAdmission.entryStartsAt,entryEndsAt:Tp.WrongAdmission.entryEndsAt},eventId:Tp.WrongEvent.id,customerId:Tp.Customer.id,orderId:Tp.WrongOrder.id,orderItemId:Tp.WrongOrderItem.id,admissionId:Tp.WrongOrderItem.admissionId,...e.teamId?{teamId:e.teamId}:{},promoterId:Tp.WrongPromoter.id,promoterSlug:Tp.WrongPromoter.slug,tenantId:Tp.Tenant.id}),Ap=e=>{let t=new Date(2020,1,1);return{...Ee.Event,id:e.id,status:e.status,createdAt:t.toISOString(),updatedAt:t.toISOString(),publishAt:ke(t),entryStartsAt:ke(t),entryEndsAt:ke(new Date(2020,1,2)),slug:e.slug,name:e.name}};let Tp;!function(e){let{Tenant:t,Team:n,TeamMember:r,TeamInvite:i,Venue:o,User:a,Session:s,EmailVerification:d,PasswordReset:c,Promoter:u,PromoterMember:l,CurrentSession:p,Event:m,DetailedEvent:f,Location:h,CarouselLocation:v,Section:g,Admission:y,Beneficiary:b,AirwallexBeneficiary:w,Coupon:$,CouponCode:I,AmountCoupon:k,AmountCouponCode:E,Customer:x,Payout:A,Order:T,OrderItem:O,OrderFee:_,Ticket:D}=Ee;e.Tenant=t,e.Team=n,e.TeamMember=r,e.TeamInvite=i,e.Venue=o,e.User=a,e.Session=s,e.EmailVerification=d,e.PasswordReset=c,e.Promoter=u,e.PromoterMember=l,e.CurrentSession=p,e.Event=m,e.DetailedEvent=f,e.Location=h,e.CarouselLocation=v,e.Section=g,e.Admission=y,e.Beneficiary=b,e.AirwallexBeneficiary=w,e.Coupon=$,e.CouponCode=I,e.AmountCoupon=k,e.AmountCouponCode=E,e.Customer=x,e.Payout=A,e.Order=T,e.OrderItem=O,e.OrderFee=_,e.Ticket=D,e.JayUser={...a,id:"usr_01k5hbpkfje048zccqmqfhjpep",email:"j@1f.io",firstName:"Jay",lastName:"McMullen"};let S=e.TestUser={id:"usr_01k5wcss3gf24advd4av43s96m",email:"test@e2e.session.services",firstName:"Test",lastName:"User",createdAt:"2025-09-23T22:58:37.808Z",updatedAt:"2025-09-23T22:58:37.808Z",tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2"};e.TestPromoterMember={id:"mbr_01k6s0t3f3f6cak0066dy5n1dm",createdAt:"2025-10-05T01:47:04.035Z",updatedAt:"2025-10-05T01:47:04.035Z",teamId:n.id,userId:S.id,user:S,permissions:["*"],isOwner:!1,tenantId:t.id},e.SystemUser={...a,id:"usr_01jps5cgsgn1ee4txxn0fz81f2",email:"system@session.services",firstName:"Session",lastName:"Services"},e.DeletedAdmission={...y,id:"adm_01jps5cgsg63gr2s1g2d87cqfy",deletedAt:(new Date).toISOString(),deleted:!0},e.SoloAdmission={...y,id:"adm_01jpsf2h7r4z8kmd9x1q3w4vty",name:"Solo Admission",sectionId:void 0},e.DeletedCoupon={...$,id:"cpn_01jps5cgsgzxf6xvmx3dnt9h1p",couponId:"cpn_01jps5cgsgzxf6xvmx3dnt9h1p",deletedAt:(new Date).toISOString(),deleted:!0},e.DeletedCouponCode={...I,id:"cod_01jps5cgsg7ep2gvwzghp1ppv6",deletedAt:(new Date).toISOString(),deleted:!0},e.DeletedSection={...g,id:"sct_01jps5cgsgy7681swwcvf01wxh",deletedAt:(new Date).toISOString(),deleted:!0},e.DeletedEvent={...m,id:"evt_01jps5cgsg8pyd64pc89tcbg9j",slug:"deleted-event",name:"Deleted Event",deletedAt:(new Date).toISOString(),deleted:!0},e.PastEvent=Ap({id:"evt_01jqqt1ztw4676fdrr27z7de1c",status:"ENDED",slug:"past-event",name:"Past Event"}),e.CancelledEvent=Ap({id:"evt_01jt0tfntmfk1sgn72q8c02v7a",status:"CANCELLED",slug:"cancelled-event",name:"Cancelled Event"}),e.DeletedPromoter={...u,id:"pmt_01jps5cgsg4xem309j6sxj01aw",slug:"deleted-promoter",name:"Deleted Promoter",deletedAt:(new Date).toISOString(),deleted:!0},e.DeletedPromoterMember={...l,userId:Tp.User.id,user:Tp.User,id:"mbr_01jpwzceh3zvab64kwq633q4cc"},e.SmsOrder={...T,id:Ee.SmsOrder.id,status:"SUCCESSFUL",price:{...T.price,sms:200},customer:{...x,phone:"+61412345678"},offers:[]},e.ExpiredOrder={...T,id:"ord_01jq0xwysx1hzs3wqt2fns4578",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",status:"PENDING",createdAt:new Date(2020,1,1).toISOString(),updatedAt:new Date(2020,1,1).toISOString()},e.AbandonedOrder={...T,id:"ord_01jq0xdzwsfjpd329r8gv3txr2",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",status:"ABANDONED",createdAt:new Date(2020,1,1).toISOString(),updatedAt:new Date(2020,1,1).toISOString()},e.ProcessingOrder={...T,id:"ord_01jq289n4kcz2tnre24x3v2get",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",status:"PROCESSING",customer:Ee.Customer,customerId:Ee.Customer.id},e.FreeAdmission={...y,id:"adm_01jpykjbrdgy8jxmz57hmampww",price:{base:0,booking:0,currency:"AUD"}},e.SoldOutAdmission={...y,id:"adm_01jps5cgse6m3567vzvk69hkrm",name:"First Release",capacity:100,available:0,sold:100,reserved:0},e.UnlimitedAdmission={...y,id:"adm_01jsr09narf6d83vyk3hs8q9cf",name:"First Release",capacity:-1,available:-1,sold:100,reserved:0},e.UnlimitedSection={id:"sct_01jsr09narf6d83vytx3cng55e",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,promoterId:u.id,eventId:m.id,eventSlug:m.slug,name:"Sold Out Section",capacity:-1,limit:-1,available:-1,sold:200,reserved:0,order:0,visibility:"ALWAYS",location:h,tenantId:t.id};let M=e.SoldOutSection={id:"sct_01jq1rcqbkzqbbakgwy8ptpmvq",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,promoterId:u.id,eventId:m.id,eventSlug:m.slug,name:"Sold Out Section",capacity:200,limit:-1,sold:200,available:0,reserved:0,order:0,visibility:"ALWAYS",location:h,tenantId:t.id};e.SoldOutSectionAdmission={...y,sectionId:M.id,id:"adm_01jq1rcjah79628zsafg3k8wyz",name:"First Release",capacity:100,available:100,sold:0,reserved:0,order:0};let P=e.MaxReservedSection={id:"sct_01jq1rcqbkzrkea9ng8e4kngvq",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,promoterId:u.id,eventId:m.id,eventSlug:m.slug,name:"Max Reserved Section",capacity:200,limit:-1,sold:0,available:0,reserved:200,location:h,tenantId:t.id,order:0,visibility:"ALWAYS"};e.MaxReservedAdmission={...y,id:"adm_01jq1rcqbk5s86df68xvz66fh4",name:"First Release",capacity:100,available:0,sold:0,reserved:100},e.MaxReservedSectionAdmission={...y,sectionId:P.id,id:"adm_01jq1rcqbkhkxq67e9rs8rpngt",name:"First Release",capacity:100,available:100,sold:0,reserved:0},e.SessionsBeneficiary={...b,id:"ben_01jps5cgse5n6mg1ymkew9tsss",promoterId:"pmt_01jqpjksnsen9vprw95et60t2m"},e.AnotherBeneficiary={...b,id:"ben_01jpsbxdthxadywamz2yj4zt75",currency:"USD",name:"Another Bank Account"},e.AnotherSection={...g,id:"sct_01jps5cgsg3spk97pwwp4352z9"},e.AnotherEvent={...m,id:"evt_01jps5cgsgkegpptzf3dsmkbpy",slug:"another-event",name:"Another Event",visibility:"PUBLIC"},e.AnotherCouponCode={...I,name:"ANOTHER",id:"cod_01jps5cgsghcvnjsf5nax5d7z7"},e.PrivateEvent={...m,id:"evt_01jps5cgsgavb91qw967y3d64f",slug:"private-event",name:"Private Event",visibility:"PRIVATE"},e.PendingEvent={...m,id:"evt_01jps5cgsh7mpevnq8pngdqs8q",slug:"pending-event",name:"Pending Event",approval:"PENDING"};let C=e.WrongUser={id:"usr_01jps5cgshwa2sts0fj53pksk0",email:"wrong@session.services",firstName:"Wrong",lastName:"User",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),tenantId:t.id},j=e.WrongTeam={id:"tem_01jps5cgshfgkvmjhfkev542en",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Wrong Team",slug:"wrong-team",description:"This is the wrong team...",type:"PROMOTER",tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2"},N=e.WrongPromoter={id:"pmt_01jps5cgshfgkvmjhfkev542en",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Wrong Promoter",slug:"wrong-promoter",description:"This is the wrong promoter...",payoutFrequency:"AFTER_EVENT",image:{src:"https://assets.session.services/icon-bg.png",alt:"Session Services Logo",width:800,height:800},approval:"APPROVED",type:"PROMOTER",teamId:j.id,geohash:"r3gx1",location:{id:"loc_01jps5cgshfgkvmjhfkev542ep",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sydney",address:"Sydney NSW 2000, Australia",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8688,longitude:151.2093,timeZone:"Australia/Sydney"},tracking:{fbId:"485739562847563",gaId:"G-PSW1MY7HB4",tikTokId:"BQCKPH3RC77U8GPMLJ5G"},tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2"};e.WrongPromoterMember={id:"mbr_01jps5cgsec5ge0b1bxa6gzkkk",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),promoterId:N.id,userId:C.id,user:{id:C.id,email:C.email,firstName:C.firstName,lastName:C.lastName},permissions:["*"],tenantId:t.id};let R=e.WrongEvent=kp({id:"evt_01jps5cgshm2v14zzykna678fd",name:"Wrong Event",slug:"wrong-event",description:"This is the wrong event...",location:{id:"loc_01jps5cgshm2v14zzykna678fe",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Watson's EQ",address:"The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",city:"Moore Park",state:"New South Wales",postcode:"2021",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney",image:{src:"https://assets.session.services/locations/watsons-eq.jpg",alt:"Watson's EQ",width:1200,height:800}},teamId:j.id,promoterId:N.id,tenantId:t.id}),U=e.WrongAdmission=Ep({id:"adm_01jps5cgshfggkvmjhfkevy5en",sectionId:(e.WrongSection={id:"sct_01jps5cgsh6asm2d0ghfqq6br2",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:j.id,promoterId:N.id,eventId:R.id,eventSlug:R.slug,name:"Wrong Admission",capacity:200,limit:-1,available:200,reserved:0,order:0,sold:0,visibility:"ALWAYS",location:h,tenantId:t.id}).id,teamId:j.id,promoterId:N.id,eventId:R.id,eventSlug:R.slug,name:"Wrong Release",tenantId:t.id});e.ExpiredAdmission={...y,id:"adm_01jq6cazzbswynyvg8d0hpx1n5",entryStartsAt:ke(new Date(2020,0,1)),entryEndsAt:ke(pe(new Date(2020,0,1),2))};let L=e.WrongBeneficiary={id:"ben_01jps5cgshfgnzwvcyck0y4sdg",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"My Bank Account",currency:"AUD",gatewayId:"ben_12345abcde67890",gateway:"AIRWALLEX",assignment:"PROMOTER",teamId:j.id,promoterId:N.id,tenantId:t.id},q=e.WrongCoupon={id:"cpn_01jps5cgsh4fy01mvwvzn7xbc9",couponId:"cpn_01jps5cgsh4fy01mvwvzn7xbc9",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Wrong Price",active:!0,kind:"PERCENT",filter:"TEAM",currency:"AUD",discount:50,uses:0,limit:-1,saleStartsAt:ke(new Date(2025,1,10,3,0,0)),saleEndsAt:void 0,deletedAt:void 0,teamId:j.id,tenantId:t.id},G=e.WrongCouponCode={id:"cod_01jps5cgsh2hevcp6av50kbgyf",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"WRONG",tenantId:t.id,couponId:q.id,teamId:j.id},z=e.WrongPayout={id:"pyt_01jps5cgshynssderz1k0fd7z3",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),paidAt:(new Date).toISOString(),structure:"default",items:{tickets:{beneficiaryId:L.id,feeAmount:0,feeCurrency:"AUD",transferAmount:1e3,transferCurrency:"AUD"},sessions:{beneficiaryId:L.id,feeAmount:0,feeCurrency:"AUD",transferAmount:650,transferCurrency:"AUD"}},eventId:R.id,teamId:j.id,promoterId:N.id},F=e.WrongOrder={id:"ord_01jps5cgshxhcpy2djnr8e04s3",token:"51126f93491f3bda92235ade2d87baec7935610e52b64d4252a3c721dfc6016a",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),status:"PENDING",payment:{method:"FREE"},price:{total:0,base:0,booking:0,discount:0,processor:0,currency:"AUD"},code:{id:G.id,name:G.name},customer:x,teamId:j.id,promoterId:N.id,eventId:R.id,paymentId:"",payoutIds:[z.id]};e.WrongOrderItem={id:"itm_01jps5cgsh14bjvyywkvt6f37e",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),orderId:F.id,kind:"ADMISSION",quantity:2,admissionId:U.id,price:{base:U.price.base,booking:U.price.booking,discount:0,currency:U.price.currency}},e.WrongOrderFee={id:"fee_01jps5cgshgebpv67sppjfrgb8",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),orderId:F.id,reason:"Gateway Fee",amount:-30,currency:"AUD",requestId:"att_sgpdz4v2ph1axmdmdx8_m8w6qv"},e.WrongTicket=xp({token:"a1b2c3d4e5f6789012345678901234567890123456789012345678901234abcd",teamId:j.id}),e.AnotherTicket={...D,id:"tkt_01jq6v4gmad9m28kzw8g8910jw"},e.ExpiredTicket=xp({token:"e1f2a3b4c5d6789012345678901234567890123456789012345678901234efab"}),e.UpcomingPayout={...A,id:"pyt_01jq9cvaxvatez34jmwn11rzt8",status:"UPCOMING",transfers:[],deductions:[]},e.PayoutNotePayout={...A,id:"pyt_01kr2note0000000000000001",transfers:[],deductions:[]};let B=e.MixmagTenant={id:"tnt_01hk153x00en6tvgwwwhn8xj1p",oldId:"p8npi2s3t24arpunzp2e7dzaq",name:"Mixmag ANZ",slug:"mixmag-anz",email:"hello@mixmag.net.au",adminTeamId:"tem_01hr9kk2pgez2s8jzb3gs5nwsf",legacyTenantsToTeams:{clhvrnqph0000m9rq039hkw7s:"tem_01k5sashm1xmaganzteam0001","6kh3sj8ih5tvg927rz5elm90o":"tem_01k6blankm1xmaganzteam002",vc8vrjrv5arhabnk8ainx0ycb:"tem_01k7prowlm1xmaganzteam003",clkwbixsi0000m9coi7i5b65z:"tem_01k8crousm1xmaganzteam004"},defaultCurrency:"AUD",smsSenderId:"MIXMAG",baseUrl:{dev:"http://mixmag-au.local:3000",production:"https://mixmag-anz.app.session.services"},logo:{icon:{src:"https://assets.session.services/icon-bg.png",width:29,height:29},email:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},website:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},qr:{src:"https://assets.session.services/tenants/mixmag-anz/qr.svg"}},favicon:"https://assets.session.services/tenants/mixmag-anz/favicon.svg"},W=e.MixmagUser={id:"usr_01jps5cgsmh2d4ez6xz2t23fsf",email:"mixmag@session.services",firstName:"Mixmag",lastName:"User",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),tenantId:B.id},Y=e.MixmagTeam={id:"tem_01hr9kk2pgez2s8jzb3gs5nwsf",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Mixmag Team",slug:"mixmag-team",description:"This is Mixmag team...",type:"PROMOTER",tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2"},V=e.MixmagPromoter={id:"pmt_01hr9kk2pgez2s8jzb3gs5nwsf",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),payoutFrequency:"AFTER_EVENT",name:"Mixmag Promoter",slug:"mixmag-promoter",description:"This is Mixmag...",image:{src:"https://assets.session.services/icon-bg.png",alt:"Session Services Logo",width:800,height:800},approval:"APPROVED",type:"PROMOTER",geohash:"r3gx1",location:{id:"loc_01hr9kk2pgez2s8jzb3gs5nwsg",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Mixmag",address:"169 Oxford St, Darlinghurst NSW 2010, Australia",city:"Darlinghurst",state:"New South Wales",postcode:"2010",country:"Australia",latitude:-33.8774,longitude:151.2196,timeZone:"Australia/Sydney"},tracking:{fbId:"485739562847563",gaId:"G-PSW1MY7HB4",tikTokId:"BQCKPH3RC77U8GPMLJ5G"},teamId:Y.id,tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2"},Z=e.MixmagSashPromoter={id:"pmt_01jps5cgsm15cfwrtat68b2vq5",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),payoutFrequency:"WEEKLY",name:"SASH Mixmag Promoter",slug:"sash-mixmag-promoter",description:"This is SASH on Mixmag...",image:{src:"https://assets.session.services/icon-bg.png",alt:"Session Services Logo",width:800,height:800},approval:"APPROVED",type:"PROMOTER",geohash:"r3gx1",location:{id:"loc_01jps5cgsm15cfwrtat68b2vq6",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Mixmag",address:"169 Oxford St, Darlinghurst NSW 2010, Australia",city:"Darlinghurst",state:"New South Wales",postcode:"2010",country:"Australia",latitude:-33.8774,longitude:151.2196,timeZone:"Australia/Sydney"},tracking:{fbId:"485739562847563",gaId:"G-PSW1MY7HB4",tikTokId:"BQCKPH3RC77U8GPMLJ5G"},tenantId:B.id},H=e.MixmagSashTeam={id:"tem_01ha3fnp48ekdst2ezkgxm3zem",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sash Team",slug:"sash",description:"SASH team for Mixmag ANZ fixtures",type:"PROMOTER",tenantId:B.id},K=e.MixmagSashFixturePromoter={id:"pmt_01ha3fnp48ekdst2ezkgxm3zem",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),payoutFrequency:"WEEKLY",name:"Sash Fixture Promoter",slug:"sash-fixture-promoter",description:"Fixture promoter for SASH test event",image:{src:"https://assets.session.services/icon-bg.png",alt:"Session Services Logo",width:800,height:800},approval:"APPROVED",type:"PROMOTER",geohash:"r3gx3",location:{...v,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},tracking:{fbId:"485739562847563",gaId:"G-PSW1MY7HB4",tikTokId:"BQCKPH3RC77U8GPMLJ5G"},teamId:H.id,tenantId:B.id};e.MixmagSashFixtureEvent={id:"evt_01hj8xw1e0em7vjns3zjtc9q9g",createdAt:"2023-12-22T14:11:36.000Z",updatedAt:"2024-12-13T07:53:26.000Z",name:"Test Event",slug:"test-event",description:"This is an event for testing",approval:"APPROVED",status:"ENDED",visibility:"PRIVATE",currency:"AUD",entryStartsAt:"2024-12-30T21:00:56",entryEndsAt:"2024-12-31T03:00:08",publishAt:"2024-12-13T18:49:56",images:{mobile:{src:"https://assets.session.services/uploads/images/1771573094836-test-event-1734076207200-mobile.jpg",alt:"test-event-1734076207200-mobile.jpg",width:1080,height:1350},desktop:{src:"https://assets.session.services/uploads/images/1771573095056-test-event-1734076207200-desktop.jpg",alt:"test-event-1734076207200-desktop.jpg",width:1920,height:1005}},geohash:"r3gx3",location:{...v,createdAt:"2025-12-12T08:13:11.004Z",updatedAt:"2025-12-12T08:13:11.171Z"},teamId:H.id,promoterId:K.id,tenantId:B.id},e.MixmagPromoterMember={id:"mbr_01jps5cgsmk2femegmakpgrjdq",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),promoterId:V.id,promoterSlug:V.slug,userId:W.id,user:{id:W.id,email:W.email,firstName:W.firstName,lastName:W.lastName},permissions:["*"],tenantId:B.id};let J=e.MixmagEvent=kp({id:"evt_01jps5cgsmwksmhse1gr2jrq7x",name:"Mixmag Event",slug:"wrong-event",description:"This is the wrong event...",location:{id:"loc_01jps5cgsmkp1bdr7hgfmmhr4e",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Mixmag",address:"169 Oxford St, Darlinghurst NSW 2010, Australia",city:"Darlinghurst",state:"New South Wales",postcode:"2010",country:"Australia",latitude:-33.8774,longitude:151.2196,timeZone:"Australia/Sydney"},teamId:Y.id,promoterId:V.id,tenantId:B.id}),Q=e.MixmagSashEvent=kp({id:"evt_01kb1ve66keh4rntf96rq5wpk2",name:"Mixmag SASH Event",slug:"mixmag-sash-event",description:"This is a sash on mixmag event...",location:{id:"loc_01jps5cgsm7qxvh6watsons0eq",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Watson's EQ",address:"The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",city:"Moore Park",state:"New South Wales",postcode:"2010",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney"},teamId:Y.id,promoterId:V.id,tenantId:B.id}),X=e.MixmagAdmission=Ep({id:"adm_01jps5cgsmbepdasrtxvh9xa0k",sectionId:(e.MixmagSection={id:"sct_01jps5cgsmhrfxjn18y9bfdqc2",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:Y.id,promoterId:V.id,eventId:J.id,eventSlug:J.slug,name:"Mixmag Admission",capacity:200,limit:-1,available:200,reserved:0,order:0,sold:0,visibility:"ALWAYS",location:h,tenantId:B.id}).id,teamId:Y.id,promoterId:V.id,eventId:J.id,eventSlug:J.slug,name:"Mixmag Release",tenantId:B.id});e.MixmagSashAdmission=Ep({id:"adm_01jps5cgsm5c3scpdyf25bhntd",promoterId:Z.id,eventId:Q.id,eventSlug:Q.slug,name:"Final Release",tenantId:B.id});let ee=e.MixmagBeneficiary={id:"ben_01jps5cgsmgxsdv4nxjk51s5by",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"My Bank Account",currency:"AUD",gatewayId:"ben_12345abcde67890",gateway:"AIRWALLEX",assignment:"PROMOTER",teamId:Y.id,promoterId:V.id,tenantId:B.id},te=e.MixmagCoupon={id:"cpn_01kb1vvpa0ecrbpyh2j5mvzdp9",couponId:"cpn_01kb1vvpa0ecrbpyh2j5mvzdp9",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Mixmag Price",active:!0,kind:"PERCENT",filter:"TEAM",currency:"AUD",discount:50,uses:0,limit:-1,saleStartsAt:ke(new Date(2025,1,10,3,0,0)),saleEndsAt:void 0,deletedAt:void 0,teamId:Y.id,tenantId:B.id},ne=e.MixmagCouponCode={id:"cod_01jps5cgsmc53405wk7t2v8ka7",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"MIXMAG",tenantId:B.id,couponId:te.id,teamId:Y.id},re=e.MixmagPayout={id:"pyt_01jps5cgsmx1x39hnrmvvtcets",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),paidAt:(new Date).toISOString(),structure:"default",items:{tickets:{beneficiaryId:ee.id,feeAmount:0,feeCurrency:"AUD",transferAmount:1e3,transferCurrency:"AUD"},sessions:{beneficiaryId:ee.id,feeAmount:0,feeCurrency:"AUD",transferAmount:650,transferCurrency:"AUD"}},eventId:J.id,promoterId:V.id},ie=e.MixmagOrder={id:"ord_01jps5cgsmtxt8e0985tstqe5h",token:"16a761b251a2368027c6c08453eca1a97f7e7fcbf714b789c8aa96033d199b90",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),status:"PENDING",payment:{method:"FREE"},price:{total:0,base:0,booking:0,discount:0,processor:0,currency:"AUD"},code:{id:ne.id,name:ne.name},customer:x,promoterId:V.id,eventId:J.id,paymentId:"",payoutIds:[re.id]},oe=e.MixmagOrderItem={id:"itm_01jps5cgsmqrkg0btn7khdyjyg",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),orderId:ie.id,kind:"ADMISSION",quantity:2,admissionId:X.id,price:{base:X.price.base,booking:X.price.booking,discount:0,currency:X.price.currency}};e.MixmagOrderFee={id:"fee_01jps5cgsm4jgpnfqxahmwm7he",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),orderId:ie.id,reason:"Gateway Fee",amount:30,currency:"AUD",requestId:"att_sgpdz4v2ph1axmdmdx8_m8w6qv"},e.MixmagTicket={id:"tkt_01jps5cgsmycbvfrqw5h3zt9bp",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),status:"REDEEMED",scans:[],token:"m1i2x3m4a5g6789012345678901234567890123456789012345678901234mixm",attendee:{email:x.email,firstName:x.firstName,lastName:x.lastName},event:{id:J.id,name:J.name,slug:J.slug,location:J.location,entryStartsAt:J.entryStartsAt,entryEndsAt:J.entryEndsAt,images:J.images},admission:{id:X.id,name:X.name,price:X.price,entryStartsAt:X.entryStartsAt,entryEndsAt:X.entryEndsAt},eventId:J.id,customerId:x.id,orderId:ie.id,orderItemId:oe.id,admissionId:X.id,promoterId:V.id,promoterSlug:V.slug,tenantId:B.id},e.InactiveCoupon={...$,id:"cpn_01kb1ve66keh4rntfm5z89yskj",couponId:"cpn_01kb1ve66keh4rntfm5z89yskj",name:"Inactive Coupon",active:!1};let ae=e.MelbourneLocation={id:"loc_01hk153x00ebfrn7y8v7z8emew",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),googlePlaceId:"ChIJc4QL47ZC1moRFW-PYdhx-O0",name:"Federation Square",address:"Federation Square, Melbourne VIC 3000, Australia",city:"Melbourne",state:"Victoria",postcode:"3000",country:"Australia",latitude:-37.8179789,longitude:144.9690576,timeZone:"Australia/Melbourne"};e.MelbourneVenue={...o,id:"ven_01kb1ve66heh4rntebeywafbwj",name:"Melbourne Convention Centre",slug:"melbourne-convention-centre",description:"Premier convention and exhibition venue in Melbourne",locationId:ae.id,location:ae,geohash:"r1r0f"};let se=e.MelbournePromoter={...u,id:"pmt_01kb1ve66keh4rntehghtb8j43",name:"Melbourne Promoter",slug:"melbourne-promoter",description:"A promoter based in Melbourne",geohash:"r1r0f",location:ae};e.MelbourneEvent={...m,id:"evt_01kb1ve66keh4rnteypq587crh",name:"Melbourne Event",slug:"melbourne-event",description:"An event in Melbourne for geo testing",promoterId:se.id,geohash:"r1r0f",location:ae},e.PendingVenue={...o,id:"ven_01kb1ve66keh4rntf3crpmdyaw",name:"Pending Venue",slug:"pending-venue",description:"A venue pending approval",approval:"PENDING"},e.Locations={sydneyOperaHouse:{id:"loc_01hk153x00fpxv6cjp99qawkcs",googlePlaceId:"ChIJ3S-JXmauEmsRUcIaWtf4MzE",name:"Sydney Opera House",address:"Bennelong Point, Sydney NSW 2000, Australia",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8567844,longitude:151.2152967,timeZone:"Australia/Sydney",types:["establishment","point_of_interest","tourist_attraction"],image:{src:"https://assets.session.services/locations/loc_01hk153x00fpxv6cjp99qawkcs.jpg",alt:"Sydney Opera House",width:1200,height:800}},carouselBarBallroom:{...v,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),types:[...v.types],image:v.image},homeTheVenue:{id:"loc_01hk153x00eqbb7qm3b7fjxh7j",googlePlaceId:"ChIJLaRY2DuuEmsRkgiW8LMz2Hs",name:"Home The Venue",address:"101/1-5 Wheat Rd, Sydney NSW 2000, Australia",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8725457,longitude:151.201907,timeZone:"Australia/Sydney",types:["establishment","food","night_club","point_of_interest","restaurant"],image:{src:"https://assets.session.services/locations/loc_01hk153x00eqbb7qm3b7fjxh7j.jpg",alt:"Home The Venue",width:1200,height:800}},greenwoodHotel:{id:"loc_01hk153x00eerbxb70s9fwbmc9",googlePlaceId:"ChIJPZiEA_OuEmsRWKYZIBL58QU",name:"Greenwood Hotel",address:"The Greenwood Plaza Rooftop, 36 Blue St, North Sydney NSW 2060, Australia",city:"North Sydney",state:"New South Wales",postcode:"2060",country:"Australia",latitude:-33.8401485,longitude:151.2074803,timeZone:"Australia/Sydney",types:["bar","establishment","food","point_of_interest","restaurant"],image:{src:"https://assets.session.services/locations/loc_01hk153x00eerbxb70s9fwbmc9.jpg",alt:"Greenwood Hotel",width:1200,height:800}},sydneyRacquetClub:{id:"loc_01hk153x00f26trt0z9kmm5pm4",googlePlaceId:"ChIJB3Dai2SvEmsR904tdDsfGWs",name:"Sydney Racquet Club",address:"17 Park Rd N, Moore Park NSW 2021, Australia",city:"Moore Park",state:"New South Wales",postcode:"2021",country:"Australia",latitude:-33.89344310000001,longitude:151.2260224,timeZone:"Australia/Sydney",types:["establishment","point_of_interest"],image:{src:"https://assets.session.services/locations/loc_01hk153x00f26trt0z9kmm5pm4.jpg",alt:"Sydney Racquet Club",width:1200,height:800}},centralStation:{id:"loc_01hk153x00fypv7sxqvby33hsg",googlePlaceId:"ChIJpcfaaCGuEmsRcTRNZkqb51U",name:"Central Station",address:"Eddy Ave, Haymarket NSW 2000, Australia",city:"Haymarket",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8826465,longitude:151.2064744,timeZone:"Australia/Sydney",types:["establishment","point_of_interest","subway_station","train_station","transit_station"],image:{src:"https://assets.session.services/locations/loc_01hk153x00fypv7sxqvby33hsg.jpg",alt:"Central Station",width:1200,height:800}},federationSquare:{id:"loc_01hk153x00ebfrn7y8v7z8emew",googlePlaceId:"ChIJc4QL47ZC1moRFW-PYdhx-O0",name:"Federation Square",address:"Federation Square, Melbourne VIC 3000, Australia",city:"Melbourne",state:"Victoria",postcode:"3000",country:"Australia",latitude:-37.8179789,longitude:144.9690576,timeZone:"Australia/Melbourne",types:["town_square"],image:{src:"https://assets.session.services/locations/loc_01hk153x00ebfrn7y8v7z8emew.jpg",alt:"Federation Square",width:1200,height:800}},bondiBeach:{id:"loc_01hk153x00er59hr0dvf9t4mpy",googlePlaceId:"ChIJWTi8xgGyEmsRgK0yFmh9AQU",name:"Bondi Beach",address:"Bondi Beach NSW 2026, Australia",city:"Bondi Beach",state:"New South Wales",postcode:"2026",country:"Australia",latitude:-33.8891201,longitude:151.2703991,timeZone:"Australia/Sydney",types:["locality","political"],image:{src:"https://assets.session.services/locations/loc_01hk153x00er59hr0dvf9t4mpy.jpg",alt:"Bondi Beach",width:1200,height:800}},sydney:{id:"loc_01hk153x00fyrr4gttg9psr5cv",googlePlaceId:"ChIJP3Sa8ziYEmsRUKgyFmh9AQM",name:"Sydney",address:"Sydney NSW, Australia",city:"Sydney",state:"New South Wales",postcode:void 0,country:"Australia",latitude:-33.8727409,longitude:151.2057136,timeZone:"Australia/Sydney",types:["colloquial_area","locality","political"],image:{src:"https://assets.session.services/locations/loc_01hk153x00fyrr4gttg9psr5cv.jpg",alt:"Sydney",width:1200,height:800}}}}(Tp||={});const Op=uo({net:Bi().min(0).meta({examples:[Ee.OrderItem.price.net],description:"Total amount to pay to promoter in cents.\nCalculated as: total - booking - refunded"}),total:Bi().min(0).meta({examples:[Ee.OrderItem.price.total],description:"Total amount the customer should pay in cents.\nCalculated as: gross - discount"}),gross:Bi().min(0).meta({examples:[Ee.OrderItem.price.gross],description:"Total amount before refunds and discounts in cents.\nCalculated as: base + booking"}),base:Bi().min(0).meta({examples:[Ee.OrderItem.price.base],description:"Total ticket price in cents"}),booking:Bi().min(0).meta({examples:[Ee.OrderItem.price.booking],description:"Total booking fees in cents (non-refundable)"}),refunded:Bi().max(0).meta({examples:[Ee.OrderItem.price.refunded],description:"Total amount refunded in cents"}),discount:Bi().max(0).meta({examples:[Ee.OrderItem.price.discount],description:"Total amount discounted in cents"}),currency:zo.meta({examples:[Ee.OrderItem.price.currency],description:"Currency code in ISO 4217 format."})}),_p=bo(["ADMISSION","ADDON"]),Dp=uo({id:yi().meta({examples:[Ee.OrderItem.id],description:"Unique identifier for this order item"}),kind:_p.meta({examples:[Ee.OrderItem.kind],description:"Type of item: ADMISSION for tickets, ADDON for additional products or services"}),quantity:Bi().min(1).meta({examples:[Ee.OrderItem.quantity],description:"Number of items purchased (minimum 1)"}),admissionId:yi().optional().meta({examples:[Ee.OrderItem.admissionId],description:"Unique identifier of the admission ticket type, required for ADMISSION items"}),sectionId:yi().optional().meta({examples:[Ee.OrderItem.sectionId],description:"Unique identifier of the venue section for this admission"}),admission:qa.optional().meta({examples:[Tp.Admission],description:"Complete admission details captured at time of purchase. This is a snapshot that preserves the exact ticket type information as it was when the order was placed"}),section:Qu.optional().meta({examples:[Tp.Section],description:"Complete section details captured at time of purchase. This is a snapshot that preserves the exact venue area or category information as it was when the order was placed"}),price:Op.meta({description:"Pricing breakdown for this order item including all fees and discounts"})}),Sp=uo({promoter:Yi(),tenant:Yi()}),Mp=bo(["SMS_DELIVERY"]).meta({description:"Type of pre-computed offer available for this order"}),Pp=uo({amount:Bi().min(0).meta({examples:[200],description:"Offer price in the smallest currency unit (e.g. cents)"}),currency:zo.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code"})}),Cp=uo({kind:Mp.meta({examples:["SMS_DELIVERY"],description:"Discriminator identifying the type of offer"}),label:yi().meta({examples:["SMS ticket delivery"],description:"Human-readable label for the offer"}),price:Pp.meta({description:"Pre-computed price for this offer"})}),jp=bo(["FREE","AIRWALLEX","STRIPE"]),Np=bo(["AMERICAN_EXPRESS","CHINA_UNION_PAY","DINERS_CLUB_INTERNATIONAL","DISCOVER","JCB","MAESTRO","MASTERCARD","UNION_PAY","VISA"]),Rp=bo("ACH_DIRECT_DEBIT.ACSS_DEBIT.AFFIRM.AFTERPAY.ALFAMART.ALIPAY.ALIPAYCN.ALIPAYHK.ALMA.AMAZON_PAY.APPLEPAY.ATOME.BACS_DIRECT_DEBIT.BANCONTACT.BANK_TRANSFER.BECS_DIRECT_DEBIT.BILLIE.BITPAY.BLIK.BOLETO.BOOST.CARD.CARD_PRESENT.CASHAPP.CRYPTO.CUSTOM.CUSTOMER_BALANCE.DANA.DOKU_EWALLET.DRAGONPAY.DUIT_NOW.EFT_DIRECT_DEBIT.EPS.ESUN.FAMILY_MART.FPX.FPS.GCASH.GIROPAY.GOOGLEPAY.GO_PAY.GRABPAY.HI_LIFE.IDEAL.INDOMARET.INTERAC_PRESENT.JENIUS_PAY.KAKAOPAY.KLARNA.KONBINI.KOREAN_LOCAL_CARD.LINK.LINKAJA.MAXIMA.MB_WAY.MOBILEPAY.MULTIBANCO.MYBANK.NARVESEN.NAVER_PAY.NZ_BANK_ACCOUNT.ONLINE_BANKING.OVO.OXXO.P24.PAYBYBANKAPP.PAYCO.PAYEASY.PAYPAL.PAYPAY.PAYSAFECASH.PAYSAFECARD.PAYSERA.PAY_NOW.PERLAS_TERMINALS.PIX.PROMPTPAY.RABBIT_LINE_PAY.REVOLUT_PAY.SAMSUNG_PAY.SATISPAY.SEPA_DIRECT_DEBIT.SEVEN_ELEVEN.SHOPEE_PAY.SKRILL.SOFORT.SWISH.TNG.TOSS_PAY.TRUEMONEY.TRUSTLY.TWINT.VERKKOPANKKI.WECHATPAY.ZIP".split(".")),Up=uo({method:jp.meta({examples:["FREE"],description:"Payment gateway used to process this order: FREE for no-cost orders, AIRWALLEX or STRIPE for paid orders"}),source:Rp.optional().meta({examples:["APPLEPAY","GOOGLEPAY","CARD"],description:"Payment method used by the customer such as ApplePay, GooglePay, or card-based payments"}),brand:Np.optional().meta({examples:["VISA","MASTERCARD","AMERICAN_EXPRESS"],description:"Card brand when source is CARD (Visa, Mastercard, American Express, etc.)"}),last4:yi().optional().meta({examples:["4242"],description:"Last 4 digits of the card number when source is CARD"}),stripeId:yi().optional().meta({examples:["pi_1234567890abcdef"],description:"Stripe payment intent identifier when using Stripe gateway"}),stripeClientSecret:yi().optional().meta({examples:["pi_1234567890abcdef_secret_xyz"],description:"Stripe PaymentIntent client secret associated with the order, used to complete the payment flow"}),stripeAccountId:yi().optional().meta({examples:["acct_1234567890abcdef"],description:"Connected Stripe account ID for direct charges. When present, payment is processed directly on the connected account rather than the platform account."}),airwallexId:yi().optional().meta({examples:["int_hkdmr7v9rg1j8donpkmv96"],description:"Airwallex payment intent identifier when using Airwallex gateway"}),airwallexClientSecret:yi().optional().meta({examples:["eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiaW50ZW50X2lkIjoiaW50X2hrZG1yN3Y5cmcxajhkb25wa212OTYifQ.K8vLx2nPzQHdR5mT1wYcBfJkLmNpS3xG7aE9dH4qZvM"],description:"Airwallex client secret used to authenticate requests for payment initialization"}),airwallexCustomerId:yi().optional().meta({examples:["cus_hkdmrhkh8he4j3kvela"],description:"Airwallex customer ID attached to the PaymentIntent for saved cards functionality"}),airwallexCustomerClientSecret:yi().optional().meta({examples:["eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiY3VzdG9tZXJfaWQiOiJjdXNfaGtkbXJoa2g4aGU0ajNrdmVsYSJ9.abc123"],description:"Airwallex customer client secret for accessing saved payment methods in the Drop-in Element"})}),Lp=uo({net:Bi().meta({examples:[Ee.Order.price.net],description:"Total amount to pay to promoter in cents.\nCalculated as: total + booking + refunded + dispute"}),total:Bi().meta({examples:[Ee.Order.price.total],description:"Total amount the customer should pay in cents.\nCalculated as: gross + discount"}),gross:Bi().min(0).meta({examples:[Ee.Order.price.gross],description:"Total amount before refunds and discounts in cents.\nCalculated as: base + booking + shipping"}),base:Bi().min(0).meta({examples:[Ee.Order.price.base],description:"Total ticket price in cents"}),booking:Bi().min(0).meta({examples:[Ee.Order.price.booking],description:"Total booking fees in cents (non-refundable)"}),shipping:Bi().min(0).meta({examples:[Ee.Order.price.shipping],description:"Total shipping amount in cents"}),sms:Bi().min(0).default(0).meta({examples:[Ee.Order.price.sms],description:"SMS delivery fee in cents (customer-facing price in event currency)"}),refunded:Bi().max(0).meta({examples:[Ee.Order.price.refunded],description:"Total amount refunded in cents (negative value)"}),discount:Bi().max(0).meta({examples:[Ee.Order.price.discount],description:"Total amount discounted in cents (negative value)"}),gateway:Bi().max(0).meta({examples:[Ee.Order.price.gateway],description:"Total absorbed payment gateway fees in cents (negative value)"}),dispute:Bi().max(0).meta({examples:[Ee.Order.price.dispute],description:"Total non-absorbed payment gateway fees in cents (negative value)"}),currency:zo.meta({examples:[Ee.Order.price.currency],description:"Currency code in ISO 4217 format"})}),qp=bo(["PENDING","PROCESSING","SUCCEEDED","FAILED"]),Gp=bo(["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED","OTHER"]),zp=bo(["USER","GATEWAY","SYSTEM"]),Fp=uo({orderItemId:yi().meta({examples:[Ee.OrderRefundItem.orderItemId],description:"Identifier of the order item being refunded"}),quantity:Bi().min(1).meta({examples:[Ee.OrderRefundItem.quantity],description:"Number of units refunded for this item"}),amount:Bi().min(0).meta({examples:[Ee.OrderRefundItem.amount],description:"Refund amount for this item in cents (base price only, excludes booking fee)"}),ticketIds:so(yi()).meta({examples:[Ee.OrderRefundItem.ticketIds],description:"Specific ticket identifiers that were refunded (selected via FIFO)"})}),Bp=uo({idempotencyKey:yi().optional().meta({examples:[Ee.OrderRefund.request.idempotencyKey],description:"Client-provided key to prevent duplicate refund processing"})}),Wp=uo({currency:yi().meta({examples:["AUD"],description:"Currency used for all refund amounts"}),total:Bi().min(1).meta({examples:[Ee.OrderRefund.price.total],description:"Total refund amount in cents, including ticket, shipping, and fee portions."}),items:Bi().min(0).meta({examples:[Ee.OrderRefund.price.items],description:"Ticket item portion of the refund in cents"}),shipping:Bi().min(0).meta({examples:[Ee.OrderRefund.price.shipping],description:"Shipping portion of the refund in cents"}),fees:Bi().min(0).meta({examples:[Ee.OrderRefund.price.fees],description:"Fee portion of the refund in cents"})}),Yp=uo({cancelRequested:Yi().meta({examples:[Ee.OrderRefund.tickets.cancelRequested],description:"Whether ticket cancellation was requested for the refund"}),cancelled:Yi().meta({examples:[Ee.OrderRefund.tickets.cancelled],description:"Whether tickets were cancelled as part of this refund"}),cancelledCount:Bi().min(0).meta({examples:[Ee.OrderRefund.tickets.cancelledCount],description:"Number of tickets that were cancelled"})}),Vp=uo({provider:jp.meta({examples:["STRIPE","AIRWALLEX"],description:"Payment gateway used to process the refund"}),refundId:yi().optional().meta({examples:[Ee.OrderRefund.gateway.refundId],description:"Refund identifier from the payment gateway"}),idempotencyKey:yi().optional().meta({examples:[Ee.OrderRefund.gateway.idempotencyKey],description:"Idempotency key sent to the payment gateway"})}),Zp=uo({type:zp.meta({examples:["USER","GATEWAY"],description:"Who initiated the refund"}),userId:yi().optional().meta({examples:[Ee.OrderRefund.actor.userId],description:"Identifier of the user who initiated the refund"})}),Hp=uo({requested:Yi().meta({examples:[Ee.OrderRefund.notification.requested],description:"Whether a customer refund confirmation email was requested."}),sentAt:Hr().optional().meta({examples:[Ee.OrderRefund.notification.sentAt],description:"Timestamp when the refund confirmation email was sent."})}),Kp=uo({reason:yi().meta({examples:["Insufficient funds for refund"],description:"Gateway or system failure reason"}),message:yi().optional().meta({examples:["The refund could not be processed."],description:"User-facing failure message when available"})}),Jp=uo({id:yi().meta({examples:[Ee.OrderRefund.id],description:"Unique identifier for this refund"}),request:Bp.optional().meta({description:"Request metadata supplied by Sessions or API callers"}),status:qp.meta({examples:["PENDING","SUCCEEDED"],description:"Current processing status. PENDING: awaiting gateway confirmation or async processing (e.g., bank transfers). PROCESSING: gateway confirmed, ticket cancellation in progress. SUCCEEDED/FAILED: terminal states."}),acceptedAt:Hr().optional().meta({examples:[Ee.OrderRefund.acceptedAt],description:"Timestamp when the payment gateway accepted the refund"}),failedAt:Hr().optional().meta({examples:[Ee.OrderRefund.failedAt],description:"Timestamp when the refund failed"}),failure:Kp.optional().meta({description:"Failure details when the refund failed"}),price:Wp.meta({description:"Refund amount breakdown"}),reason:Gp.meta({examples:["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED"],description:"Categorized reason for the refund used for analytics"}),note:yi().optional().meta({examples:[Ee.OrderRefund.note],description:"Free-form notes explaining the refund"}),items:so(Fp).meta({description:"Line items included in this refund with quantities and amounts"}),tickets:Yp.meta({description:"Ticket cancellation state for the refund"}),gateway:Vp.meta({description:"Gateway refund identifiers"}),actor:Zp.meta({description:"Refund initiator"}),metadata:go(yi(),yi()).optional().meta({examples:[{supportTicket:"#12345"}],description:"Custom key-value pairs passed through to the payment gateway"}),notification:Hp.meta({description:"Refund confirmation notification state"}),createdAt:Hr().meta({examples:[Ee.OrderRefund.createdAt],description:"Timestamp when the refund was created"})}),Qp=Lp.extend({exchangeRate:zi().meta({examples:[1.4],description:"Conversion rate applied from the original payment currency to the settlement currency. 1.0 when both currencies are the same"})}).meta({description:"Settled price breakdown in the payout currency. All amounts from the original order price are converted using the exchange rate. For same-currency orders the values match the order price with an exchange rate of 1.0",examples:[{base:14e3,booking:700,shipping:0,sms:0,discount:0,refunded:0,gateway:0,dispute:0,gross:14700,total:14700,net:14e3,currency:"AUD",exchangeRate:1.4}]});function Xp(e,t,n={}){return uo({id:yi().meta({examples:t.idExamples,description:t.idDescription}),createdAt:Hr().readonly().meta({examples:t.createdAtExamples,description:"Timestamp in ISO 8601 format when this timeline entry was created"}),...n,kind:e.meta({examples:t.kindExamples,description:t.kindDescription}),editable:Yi().meta({examples:[!1],description:"Whether this timeline entry can be edited by users"}),pinned:Yi().meta({examples:[!1],description:"Whether this timeline entry is pinned to the top of the timeline"}),description:yi().meta({examples:t.descriptionExamples,description:"Human-readable description of what happened in this timeline event"}),author:yi().meta({examples:["System"],description:"Name of the user or system that created this timeline entry"}),userId:yi().optional().meta({examples:[Ee.User.id],description:t.userIdDescription??"Identifier of the user who created this timeline entry, when available"}),externalId:yi().optional().meta({examples:t.externalIdExamples,description:t.externalIdDescription})})}const em=Xp(bo("ORDER_STATUS_UPDATED.ORDER_EXPIRED.ORDER_COMPLETED.PAYMENT_INITIATED.PAYMENT_PROCESSING.PAYMENT_FAILED.PAYMENT_SUCCEEDED.REFUND_INITIATED.REFUND_PROCESSING.REFUND_SUCCEEDED.REFUND_SETTLED.REFUND_FAILED.CHARGEBACK_INITIATED.CHARGEBACK_EVIDENCE_SUBMITTED.CHARGEBACK_WON.CHARGEBACK_LOST.CHARGEBACK_FUNDS_WITHDRAWN.TICKETS_GENERATED.TICKET_ADDED.TICKETS_SCANNED.TICKET_EDITED.TICKET_STATUS_CHANGED.EMAIL_SENT.EMAIL_DELIVERED.EMAIL_OPENED.EMAIL_BOUNCED.EMAIL_COMPLAINED.EMAIL_FAILED.SMS_SENT.SMS_DELIVERED.SMS_FAILED.NOTE".split(".")),{createdAtExamples:[Ee.Order.createdAt],descriptionExamples:["Order was created successfully"],externalIdDescription:"External idempotency key for deduplication (e.g., SES messageId + eventType)",externalIdExamples:["ses:01234567-89ab-cdef-0123-456789abcdef:Delivery"],idDescription:"Unique identifier of the timeline entry",idExamples:[Ee.Timeline.id],kindDescription:"Type of timeline event (ORDER_COMPLETED, PAYMENT_SUCCEEDED, REFUND_INITIATED, etc.)",kindExamples:["ORDER_COMPLETED"],userIdDescription:"Identifier of the user who created this timeline entry, when available."},{status:yi().optional().meta({examples:["SUCCESSFUL"],description:"Order status associated with this timeline entry, when applicable."})}),tm=bo(["PENDING","PROCESSING","SUCCESSFUL","DISPUTED","ABANDONED"]),nm=uo({id:ea.readonly().meta({examples:[Ee.Order.id],description:"A unique identifier for this order."}),createdAt:Hr().readonly().meta({examples:[Ee.Order.createdAt],description:"Timestamp in ISO 8601 format when this order was created."}),updatedAt:Hr().readonly().meta({examples:[Ee.Order.updatedAt],description:"Timestamp in ISO 8601 format when this order was last updated."}),status:tm.meta({examples:["PENDING"],description:"Current payment lifecycle status. PENDING: awaiting payment. PROCESSING: payment in progress. SUCCESSFUL: payment confirmed. DISPUTED: chargeback filed. ABANDONED: expired or cancelled."}),payment:Up.optional().meta({description:"Payment gateway details including method, card brand, and transaction identifiers. Absent for free orders."}),items:so(Dp).meta({description:"Line items in this order, each with a ticket type, quantity, and price breakdown."}),fees:so(Ip).meta({description:"Gateway fees recorded against this order from settlement processing (e.g. payment processing fees, dispute fees)."}),price:Lp.meta({description:"Price breakdown in the event currency. This reflects what the customer was charged."}),settlement:Qp.optional().meta({description:"Price breakdown in the payout currency with the exchange rate applied. When the event currency differs from the settlement currency, all amounts are converted. For same-currency orders the values match the order price with an exchange rate of 1.0."}),couponCode:yp.optional().meta({description:"Coupon code applied to this order for discount calculation."}),customer:bp.optional().meta({description:"Customer who placed this order. Absent for guest checkouts before customer details are captured."}),marketingConsent:Sp.optional().meta({description:"Marketing opt-in choices captured during checkout."}),timeline:so(em).optional().meta({description:"Chronological audit trail of events for this order (payments, refunds, emails, scans)."}),refunds:so(Jp).default([]).meta({description:"Refunds processed for this order including pending, succeeded, and failed attempts."}),offers:so(Cp).default([]).meta({description:"Pre-computed add-on offers available during checkout (e.g. SMS ticket delivery)."}),customerId:ra.optional().meta({examples:[Ee.Customer.id],description:"Identifier of the customer who placed this order."}),createdBy:bp.optional().meta({description:"Admin user who created this order on behalf of the customer."}),teamId:Ho.meta({description:"Team that owns this order."}),promoterId:na.meta({examples:[Ee.Promoter.id],description:"Promoter managing this order."}),event:wp.meta({description:"Snapshot of the event at time of purchase (name, slug, location)."}),payoutIds:so(aa.meta({examples:["pay_01HQXYZ"],description:"Payout identifier."})).meta({description:"Payout identifiers for settlements that included this order."}),eventId:Ko.meta({examples:[Ee.Event.id],description:"Identifier of the event this order belongs to."}),checkoutUrl:yi().optional().readonly().meta({examples:["https://example.com/checkout/ord_1234567890"],description:"Derived checkout URL where the customer can complete payment for this order."}),returnUrl:yi().optional().meta({examples:["https://example.com/event/success"],description:"URL to redirect to after successful payment completion."}),channel:gp.optional().meta({description:"Channel metadata captured at order creation to identify origin and redirect context."}),reservedAt:Hr().optional().meta({examples:[(new Date).toISOString()],description:"Timestamp when inventory was reserved for this order. Used for checkout countdown timer."})}).meta({description:"A customer order for event tickets. Tracks the full lifecycle from checkout through payment, settlement, and payout."}),rm=uo({id:yi().meta({examples:[Ee.Order.id],description:"Unique identifier of the order to add a note to"}),note:yi().min(1).max(1e3).meta({examples:["Customer requested special seating arrangements"],description:"Note text content (1-1000 characters)"})}),im=Dp.omit({id:!0,price:!0,kind:!0}).extend({id:yi().optional().meta({examples:["itm_01jps5cgsfwyxj0516571eaf17"],description:"Unique identifier for this order item. When omitted, the server assigns an id during processing"})}),om=uo({eventId:yi().meta({description:"Unique identifier of the event for which to create a complimentary order"}),items:so(im).min(1).meta({description:"Admission items to include in the complimentary order"}),customer:uo({firstName:yi().min(1),lastName:yi().min(1),email:$i()}),notifyCustomer:Yi().default(!0).meta({description:"Whether to send the standard order confirmation email after tickets are generated"}),reason:yi().min(1),idempotencyKey:yi().trim().min(1).max(255).optional()}),am=uo({postHogDistinctId:yi().min(1).max(256).optional()}),sm=uo({eventId:yi().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Unique identifier of the event for which to create the order"}),items:so(im).meta({description:"List of items to include in the new order"}),couponCode:yi().optional().meta({examples:["TEST50"],description:"Optional coupon code to apply discount to the order"}),returnUrl:yi().optional().meta({examples:["https://example.com/event/success"],description:"Optional URL to redirect to after successful payment"}),channel:gp.optional().meta({description:"Optional channel metadata for where the order originated (for attribution and redirect routing)."}),analytics:am.optional().meta({description:"Optional browser analytics metadata used for cross-domain checkout attribution."})}),dm=uo({id:yi().meta({examples:[Ee.Order.id],description:"Unique identifier of the order"}),noteId:yi().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to delete"})}),cm=bo(["EMAIL","SMS"]).meta({examples:["EMAIL"],description:"Method used to deliver tickets to the customer: EMAIL or SMS"});uo({id:yi().meta({examples:[Ee.Order.id],description:"Unique identifier of the order to edit"}),signature:ja.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded). Required for editing order items."}),items:so(im).min(1).meta({description:"Updated list of items for the order (replaces existing items). Prices will be recalculated and payment intent updated."})});const um=bo(["STATUS","DELIVERY_METHOD","CUSTOMER_EMAIL","CUSTOMER_PHONE","COUPON_CODE","PAYMENT_SOURCE","PAYMENT_METHOD","CURRENCY","CREATED_AT","UPDATED_AT","RESERVED_AT","TOTAL","TICKETS","ORDER_ID","CUSTOMER_ID","EVENT_ID","PROMOTER_ID","PAYOUT_ID"]),lm=bo(["IS","IS_NOT","IS_ANY_OF","CONTAINS","IS_EMPTY","IS_NOT_EMPTY","BETWEEN","GTE","LTE"]),pm=new Set(["IS_EMPTY","IS_NOT_EMPTY"]),mm=new Set(["IS_ANY_OF"]),fm=new Set(["IS","IS_NOT","CONTAINS","GTE","LTE"]),hm=new Set(["BETWEEN"]),vm={STATUS:new Set(["IS","IS_NOT","IS_ANY_OF"]),DELIVERY_METHOD:new Set(["IS","IS_NOT","IS_ANY_OF"]),CUSTOMER_EMAIL:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),CUSTOMER_PHONE:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),COUPON_CODE:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),PAYMENT_SOURCE:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),PAYMENT_METHOD:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),CURRENCY:new Set(["IS","IS_NOT","IS_ANY_OF"]),CREATED_AT:new Set(["BETWEEN","GTE","LTE"]),UPDATED_AT:new Set(["BETWEEN","GTE","LTE"]),RESERVED_AT:new Set(["BETWEEN","GTE","LTE","IS_EMPTY","IS_NOT_EMPTY"]),TOTAL:new Set(["BETWEEN","GTE","LTE"]),TICKETS:new Set(["BETWEEN","GTE","LTE"]),ORDER_ID:new Set(["IS","IS_NOT","CONTAINS"]),CUSTOMER_ID:new Set(["IS","IS_NOT","IS_EMPTY","IS_NOT_EMPTY"]),EVENT_ID:new Set(["IS","IS_NOT"]),PROMOTER_ID:new Set(["IS","IS_NOT"]),PAYOUT_ID:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"])},gm={STATUS:tm,DELIVERY_METHOD:cm,PAYMENT_SOURCE:Rp,PAYMENT_METHOD:jp},ym=new Set(["CREATED_AT","UPDATED_AT","RESERVED_AT"]),bm=new Set(["TOTAL","TICKETS"]),wm=uo({field:um,operator:lm,values:so(yi()).max(20)}).superRefine(((e,t)=>{vm[e.field].has(e.operator)||t.addIssue({code:"custom",path:["operator"],message:`${e.operator} is not supported for ${e.field}`}),function(e,t){let n=e.values.length;pm.has(e.operator)&&0!==n&&t.addIssue({code:"custom",path:["values"],message:e.operator+" does not accept values"}),fm.has(e.operator)&&1!==n&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires exactly one value"}),mm.has(e.operator)&&n<1&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires at least one value"}),hm.has(e.operator)&&2!==n&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires exactly two values"})}(e,t),function(e,t){let n=gm[e.field];n&&e.values.forEach(((r,i)=>{n.safeParse(r).success||t.addIssue({code:"custom",path:["values",i],message:`${r} is not valid for ${e.field}`})}))}(e,t),function(e,t){ym.has(e.field)&&e.values.forEach(((e,n)=>{Number.isNaN(Date.parse(e))&&t.addIssue({code:"custom",path:["values",n],message:e+" is not a valid date"})}))}(e,t),function(e,t){bm.has(e.field)&&e.values.forEach(((e,n)=>{/^-?\d+$/.test(e)||t.addIssue({code:"custom",path:["values",n],message:e+" is not a valid integer"})}))}(e,t)})),$m=uo({id:yi().meta({examples:[Ee.Order.id],description:"Unique identifier of the order to retrieve"}),signature:ja.optional().meta({description:"HMAC signature for public order access (16 characters, base64url encoded)"})}),Im="Either locationId or googlePlaceId must be provided",km={locationId:Qo.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location. Either locationId or googlePlaceId must be provided."}),googlePlaceId:yi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to create a new location from. Either locationId or googlePlaceId must be provided."})};function Em(e){return!(!e.locationId&&!e.googlePlaceId)}const xm=Qu.omit({id:!0,createdAt:!0,updatedAt:!0,order:!0,available:!0,sold:!0,reserved:!0,visibility:!0,promoterId:!0,eventSlug:!0,location:!0}).extend({order:zi().optional().meta({examples:[Ee.Section.order],description:"Display order of the section. Lower numbers appear first in listings. Defaults to 0 if not specified"}),visibility:Qu.shape.visibility.optional(),...km}).refine(Em,{message:Im}).meta({description:"Schema for creating a new section within an event venue. Excludes system-generated fields and fields derived from the event"}),Am=Qu.pick({id:!0}).extend({eventId:yi().meta({examples:[Ee.Section.eventId],description:"Unique identifier of the event to verify section belongs to"})}).meta({description:"Schema for soft-deleting a section by setting its deletedAt timestamp"}),Tm=Qu.pick({id:!0}).extend({eventId:yi().meta({examples:[Ee.Section.eventId],description:"Unique identifier of the event to verify section belongs to"})}).meta({description:"Schema for retrieving a specific section by ID"}),Om=uo({eventId:Qu.shape.eventId,query:yi().optional().meta({examples:["VIP"],description:"Optional search query. When provided, automatically uses search-backed pagination for full-text search capabilities"}),limit:Lo().min(1).max(100).prefault(20).meta({examples:[20],description:"Maximum number of sections to return in each result set. Must be between 1 and 100, defaults to 20"}),cursor:yi().optional().meta({examples:["eyJpbnRlbnQiOnsicmVzb3VyY2UiOiJzZWN0aW9uLmxpc3QifSwicG9zaXRpb24iOnsiZW5naW5lIjoiZHluYW1vIiwgImN1cnNvciI6InNlY18wMWpwczVjZ3NlMGczcWo1NnZkODZ6N3FqIiwgImhpc3RvcnkiOltdfX0="],description:"Opaque pagination cursor from a previous response. Provide to continue fetching subsequent results"})}).meta({description:"Schema for listing sections with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided"}),_m=Wa(Qu,"sections"),Dm=uo({section:Qu}),Sm=Qu.omit({promoterId:!0,createdAt:!0,updatedAt:!0,eventSlug:!0,available:!0,sold:!0,reserved:!0,location:!0,teamId:!0,name:!0,capacity:!0,limit:!0,order:!0}).extend({id:yi().meta({examples:[Ee.Section.id],description:"Unique identifier of the section to update"}),eventId:yi().meta({examples:[Ee.Section.eventId],description:"Unique identifier of the event to verify section belongs to"}),name:Qu.shape.name.optional(),capacity:fa().optional(),limit:ha().optional(),order:Qu.shape.order.optional(),visibility:bo(["ALWAYS","STACKED","HIDDEN"]).optional(),locationId:Qo.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:yi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."})}).meta({description:"Schema for updating an existing section."}),Mm=Dp.extend({admission:qa.optional().meta({description:"Complete admission details for this order item when available"}),section:Qu.optional().meta({description:"Complete section details for this order item when applicable"})}),Pm=bo(["UPDATED_AT","CREATED_AT","EVENT_NAME","TOTAL","STATUS","CUSTOMER_NAME","PAYMENT_SOURCE","COUPON_CODE","TICKETS","DELIVERY_METHOD","CUSTOMER_EMAIL","CUSTOMER_PHONE","ORDER_ID"]),Cm=bo(["asc","desc"]),jm=uo({mine:Yi().optional().meta({examples:[!0],description:"When true, returns only the authenticated user's orders. Can be combined with teamId or eventId to further filter results."}),teamId:yi().optional().meta({description:"Filter orders by team unique identifier"}),eventId:yi().optional().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Filter orders by event unique identifier"}),status:tm.optional().meta({examples:["SUCCESSFUL"],description:"Filter orders by payment status"}),query:yi().optional().meta({examples:["John Doe"],description:"Optional search query to filter orders by customer details. When provided, search-backed pagination is used."}),includeEventTerms:Yi().optional().meta({examples:[!0],description:"When true for authenticated user-owned order searches, also matches event name, slug, and location unless eventId is already provided."}),filters:so(wm).max(10).optional().meta({description:"Optional advanced filters for order lists."}),sort:Pm.optional().meta({examples:["UPDATED_AT","CREATED_AT","CUSTOMER_NAME"],description:"Field to sort order lists by."}),direction:Cm.optional().meta({examples:["asc","desc"],description:"Sort direction for order lists. Defaults to `desc` when omitted."}),from:yi().date().optional().meta({examples:["2025-01-01"],description:"Filter orders created on or after this date (YYYY-MM-DD format). Inclusive of the entire day."}),to:yi().date().optional().meta({examples:["2025-12-31"],description:"Filter orders created on or before this date (YYYY-MM-DD format). Inclusive of the entire day."}),limit:wa("orders"),cursor:yi().optional().meta({examples:["eyJpZCI6Im9yZF8wMWpwczVjZ3NmZ3ZlNWI1ZzI2NjZreXJ5aCJ9"],description:"Pagination cursor for continuing to fetch subsequent results"})}),Nm=Wa(nm,"orders"),Rm=uo({items:so(Mm).meta({description:"List of order items with complete pricing and admission details"}),price:Lp.meta({description:"Total pricing breakdown for the entire order quote"}),couponCode:hu.optional().meta({description:"Applied coupon code details if a discount was used in this quote"})}),Um=uo({eventId:yi().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Unique identifier of the event for which to generate a price quote"}),items:so(im).meta({description:"List of items to include in the price quote calculation"}),couponCode:yi().optional().meta({examples:["TEST50"],description:"Optional coupon code to apply discount to the quote"})}),Lm=uo({quote:Rm}),qm=uo({orderItemId:yi().meta({examples:[Ee.OrderRefundItem.orderItemId],description:"Identifier of the order item to refund"}),quantity:Bi().min(1).meta({examples:[Ee.OrderRefundItem.quantity],description:"Number of units to refund for this item"})}),Gm=uo({id:ea.meta({examples:[Ee.Order.id],description:"Identifier of the order to refund"}),fullRefund:Yi().default(!1).meta({examples:[!1],description:"When true, refunds all remaining refundable items. Mutually exclusive with items."}),items:so(qm).optional().meta({description:"Specific items and quantities to refund. Required if fullRefund is false."}),shippingAmount:Bi().min(0).optional().meta({examples:[500],description:"Amount of shipping to refund in cents. Cannot exceed remaining refundable shipping."}),cancelTickets:Yi().default(!0).meta({examples:[!0],description:"Whether to cancel tickets associated with refunded items. Defaults to true."}),notify:Yi().default(!0).meta({examples:[!0],description:"Whether to send a refund confirmation email to the customer. Defaults to true."}),reason:Gp.meta({examples:["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED"],description:"Categorized reason for the refund"}),note:yi().optional().meta({examples:["Customer requested refund due to schedule conflict"],description:"Free-form notes explaining the refund"}),idempotencyKey:yi().optional().meta({examples:["refund_12345_customer_request"],description:"Client-provided key to prevent duplicate refund processing. Recommended for programmatic refunds."}),metadata:go(yi(),yi()).optional().meta({examples:[{supportTicket:"#12345"}],description:"Custom key-value pairs passed through to the payment gateway"})}),zm=uo({refund:Jp}),Fm=uo({id:yi().meta({examples:[Ee.Order.id],description:"Order ID to resend tickets for"}),email:yi().email().optional().meta({examples:["customer@example.com"],description:"Email address to send tickets to. If not provided, uses order.customer.email"})}),Bm=uo({id:yi().meta({examples:[Ee.Order.id],description:"Unique identifier of the order to reserve inventory for"}),signature:ja.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded)."})}),Wm=uo({code:$o("ORDER_NOT_RESERVABLE")}),Ym=uo({order:nm});var Vm={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[0-79]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}},Zm={}.constructor;function Hm(e){return null!=e&&e.constructor===Zm}function Km(e){return Km="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Km(e)}function Jm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qm(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Km(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Km(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==Km(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ef(e){var t,n,r,i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],d=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(d=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);d=!0);}catch(e){c=!0,i=e}finally{try{if(!d&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xm(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array.prototype.slice.call(e),4),o=i[0],a=i[1],s=i[2],d=i[3];if("string"!=typeof o)throw TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!=typeof a){if(!Hm(a))throw Error("Invalid second argument: "+a);s?(n=a,r=s):r=a}else d?(n=s,r=d):(n=void 0,r=s),a&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null==arguments[t]?{}:arguments[t];t%2?Jm(Object(n),!0).forEach((function(t){Qm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:a},n));return{text:t,options:n,metadata:r}}var tf="0-90-9٠-٩۰-۹",nf="-‐-―−ー-//.. ()()[]\\[\\]~⁓∼~";function rf(e){return rf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rf(e)}function of(e){var t="function"==typeof Map?new Map:void 0;return of=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch{return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(af())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&sf(i,n.prototype),i}(e,arguments,df(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),sf(n,e)},of(e)}function af(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(af=function(){return!!e})()}function sf(e,t){return sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sf(e,t)}function df(e){return df=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},df(e)}var cf=function(){function e(t){var n;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),n=function(e,t,n){return t=df(t),function(e,t){if(t&&("object"==rf(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,af()?Reflect.construct(t,n||[],df(e).constructor):t.apply(e,n))}(this,e,[t]),Object.setPrototypeOf(n,e.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sf(e,t)}(e,of(Error)),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(e)}();function uf(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),i=0;i<3;i++){var o=Number(n[i]),a=Number(r[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var lf=/^\d+$/;function pf(e){return pf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pf(e)}function mf(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function ff(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hf(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hf(e){var t=function(e){if("object"!=pf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pf(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==pf(t)?t:t+""}var vf=" ext. ",gf=ff((function e(t){mf(this,e),kf(t),this.metadata=t,Af.call(this,t)}),[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){var n,r;if(e&&(function(e){return lf.test(e)}(e)?r=e:n=e),t&&(r=t),n&&"001"!==n){var i=this.getCountryMetadata(n);if(!i)throw Error("Unknown country: "+n);this.numberingPlan=new yf(i,this)}else if(r){if(!this.hasCallingCode(r))throw Error("Unknown calling code: "+r);this.numberingPlan=new yf(this.getNumberingPlanMetadata(r),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t)return 1===t.length&&3===t[0].length?void 0:t}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),yf=ff((function e(t,n){mf(this,e),this.globalMetadataObject=n,this.metadata=t,Af.call(this,n.metadata)}),[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"_getDefaultCountryMetadataForThisCallingCode",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this._getDefaultCountryMetadataForThisCallingCode()}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[]).map((function(t){return new bf(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return!(this.types()&&0===this.types().length||!this.types())}},{key:"type",value:function(e){if(this.hasTypes()&&If(this.types(),e))return new $f(If(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?vf:this.metadata[13]||vf}}]),bf=ff((function e(t,n){mf(this,e),this._format=t,this.metadata=n}),[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||wf.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),wf=/^\(?\$1\)?$/,$f=ff((function e(t,n){mf(this,e),this.type=t,this.metadata=n}),[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]);function If(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function kf(e){if(!e)throw Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Hm(e)||!Hm(e.countries))throw Error(`[libphonenumber-js] \`metadata\` argument was passed but it's not a valid metadata. Must be an object having \`.countries\` child object property. Got ${Hm(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Ef(e)+": "+e}.`)}var Ef=function(e){return pf(e)};function xf(e,t){var n=new gf(t);if(n.hasCountry(e))return n.selectNumberingPlan(e).countryCallingCode();throw Error("Unknown country: "+e)}function Af(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===uf(t,"1.2.0")?this.v2=!0:-1===uf(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var Tf=function(e){return`([${tf}]{1,${e}})`};function Of(){var e="[ \\t,]*",t="[:\\..]?[ \\t,-]*",n="#?",r="[ \\t]*";return";ext="+Tf("20")+"|"+e+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+t+Tf("20")+"#?|"+e+"(?:[xx##~~]|int|int)"+t+Tf("9")+"#?|[- ]+"+Tf("6")+"#|"+r+"(?:,{2}|;)"+t+Tf("15")+"#?|"+r+"(?:,)+"+t+Tf("9")+n}var _f="["+tf+"]{2}",Df="[++]{0,1}(?:["+nf+"]*["+tf+"]){3,}["+nf+tf+"]*",Sf=RegExp("^[++]{0,1}(?:["+nf+"]*["+tf+"]){1,2}$","i"),Mf=Df+"(?:"+Of()+")?",Pf=RegExp("^"+_f+"$|^"+Mf+"$","i"),Cf=RegExp("(?:"+Of()+")$","i"),jf={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Nf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Rf(e){for(var t,n="",r=function(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Nf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nf(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=r()).done;)n+=Uf(t.value,n)||"";return n}function Uf(e,t){if("+"===e){if(t)return;return"+"}return function(e){return jf[e]}(e)}function Lf(e,t,n){return function(e,t,n,r){n&&(r=new gf(r.metadata)).selectNumberingPlan(n);var i=r.type(void 0),o=i&&i.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";var a=e.length,s=o[0];return s===a?"IS_POSSIBLE":s>a?"TOO_SHORT":o[o.length-1]<a?"TOO_LONG":o.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,0,t,n)}function qf(e,t){return"IS_POSSIBLE"===Lf(e,void 0,t)}function Gf(e,t){return e||="",RegExp("^(?:"+t+")$").test(e)}function zf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ff=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Bf(e,t,n){if(t||={},e.country||e.countryCallingCode){var r=new gf(n);r.selectNumberingPlan(e.country||e.countryCallingCode);var i=t.v2?e.nationalNumber:e.phone;if(Gf(i,r.nationalNumberPattern())){if(Wf(i,"FIXED_LINE",r))return r.type("MOBILE")&&""===r.type("MOBILE").pattern()||!r.type("MOBILE")||Wf(i,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var o,a=function(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return zf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zf(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(Ff);!(o=a()).done;){var s=o.value;if(Wf(i,s,r))return s}}}}function Wf(e,t,n){var r=n.type(t);return!(!r||!r.pattern()||r.possibleLengths()&&r.possibleLengths().indexOf(e.length)<0)&&Gf(e,r.pattern())}var Yf=/^[A-Z]{2}$/;var Vf=RegExp("(["+tf+"])");function Zf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hf(e,t){var n=t.nationalNumber,r=t.metadata,i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:function(e,t,n){for(var r,i=new gf(n),o=function(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Zf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zf(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(r=o()).done;){var a=r.value;if(i.selectNumberingPlan(a),i.leadingDigits()){if(e&&0===e.search(i.leadingDigits()))return a}else if(Bf({phone:e,country:a},void 0,i.metadata))return a}}(n,i,r.metadata)}function Kf(e,t,n){var r=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var i,o,a,s=r.length-1,d=s>0&&r[s];if(t.nationalPrefixTransformRule()&&d?(i=e.replace(n,t.nationalPrefixTransformRule()),s>1&&(o=r[1])):(i=e.slice(r[0].length),d&&(o=r[1])),d){var c=e.indexOf(r[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=r[0];return{nationalNumber:i,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}(e,n),i=r.carrierCode,o=r.nationalNumber;return o===e||function(e,t,n){return!(Gf(e,n.nationalNumberPattern())&&!Gf(t,n.nationalNumberPattern()))}(e,o,n)&&(!n.numberingPlan.possibleLengths()||(t||=Hf(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n}),function(e,t,n){switch(Lf(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))?{nationalNumber:o,carrierCode:i}:{nationalNumber:e}}function Jf(e,t,n,r,i){if(!e)return{};var o;if("+"!==e[0]){var a=function(e,t,n,r){if(t){var i=new gf(r);i.selectNumberingPlan(t||n);var o=RegExp(i.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(Vf);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,n,r,i);if(!a||a===e){if(n||r){var s=function(e,t,n,r,i){if(!n&&!r)return{number:e};var o=n?xf(n,i):r;if(0===e.indexOf(o)){var a=new gf(i);a.selectNumberingPlan(n||r);var s=e.slice(o.length),d=Kf(s,void 0,a).nationalNumber,c=Kf(e,void 0,a).nationalNumber;if(!Gf(c,a.nationalNumberPattern())&&Gf(d,a.nationalNumberPattern())||"TOO_LONG"===Lf(c,void 0,a))return{countryCallingCode:o,number:s}}return{number:e}}(e,0,n,r,i),d=s.countryCallingCode;if(d)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:d,number:s.number}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};for(var c=new gf(i),u=2;u-1<=3&&u<=e.length;){var l=e.slice(1,u);if(c.hasCallingCode(l))return c.selectNumberingPlan(l),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:l,number:e.slice(u)};u++}return{}}var Qf=/(\$\d)/;var Xf=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/,eh={formatExtension:function(e,t,n){return`${e}${n.ext()}${t}`}};function th(e,t,n,r,i){var o=function(e,t){return function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(e,(function(e){if(e.leadingDigitsPatterns().length>0){var n=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==t.search(n))return!1}return Gf(t,e.pattern())}))}(r.formats(),e);return o?function(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix,o=e.replace(RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(Qf,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(RegExp(`[${nf}]+`,"g")," ").trim()}(o):o}(e,o,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&!1===i.nationalPrefix)}):e}function nh(e,t,n,r){return t?r(e,t,n):e}function rh(e){return rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rh(e)}function ih(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oh(e){for(var t=1;t<arguments.length;t++){var n=null==arguments[t]?{}:arguments[t];t%2?ih(Object(n),!0).forEach((function(t){ah(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ih(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ah(e,t,n){return(t=sh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sh(e){var t=function(e){if("object"!=rh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rh(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==rh(t)?t:t+""}var dh=function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sh(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),!t)throw TypeError("First argument is required");if("string"!=typeof t)throw TypeError("First argument must be a string");if("+"===t[0]&&!n)throw TypeError("`metadata` argument not passed");if(Hm(n)&&Hm(n.countries)){r=n;var i=t;if(!ch.test(i))throw Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=Jf(i,0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw Error("Invalid `number` argument passed: too short")}if(!n)throw TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw TypeError("`nationalNumber` argument must be a string");kf(r);var a=function(e,t){var n,r,i=new gf(t);return function(e){return Yf.test(e)}(e)?(i.selectNumberingPlan(n=e),r=i.countryCallingCode()):r=e,{country:n,callingCode:r}}(t,r),s=a.callingCode;this.country=a.country,this.countryCallingCode=s,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}),[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:function(e,t,n){var r=new gf(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new gf(n);return r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0}(t,e,n)})):[]}(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){void 0===t&&(t={});var r=new gf(n);if(t.v2){if(!e.countryCallingCode)throw Error("Invalid phone number object passed");r.selectNumberingPlan(e.country||e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!r.hasCountry(e.country))throw Error("Unknown country: "+e.country);r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}}if(r.possibleLengths())return qf(e.phone||e.nationalNumber,r);if(e.countryCallingCode&&r.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,n){t||={};var r=new gf(n);return r.selectNumberingPlan(e.country||e.countryCallingCode),r.hasTypes()?void 0!==Bf(e,t,r.metadata):Gf(t.v2?e.nationalNumber:e.phone,r.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new gf(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Bf(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return function(e,t,n,r){n=n?function(){for(var e=1,t=[...arguments];e<t.length;){if(t[e])for(var n in t[e])t[0][n]=t[e][n];e++}return t[0]}({},eh,n):eh;var i=new gf(r);if(e.country&&"001"!==e.country){if(!i.hasCountry(e.country))throw Error("Unknown country: "+e.country);i.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";i.selectNumberingPlan(e.countryCallingCode)}var o=i.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?nh(th(a,0,"NATIONAL",i,n),e.ext,i,n.formatExtension):"";case"INTERNATIONAL":return a?nh(`+${o} ${th(a,0,"INTERNATIONAL",i,n)}`,e.ext,i,n.formatExtension):"+"+o;case"E.164":return`+${o}${a}`;case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw Error('"formatRFC3966()" expects "number" to be in E.164 format.');return`tel:${t}${n?";ext="+n:""}`}({number:`+${o}${a}`,ext:e.ext});case"IDD":if(!n.fromCountry)return;var s=function(e,t,n,r,i){if(xf(r,i.metadata)===n){var o=th(e,0,"NATIONAL",i);return"1"===n?n+" "+o:o}var a=function(e,t,n){var r=new gf(n);return r.selectNumberingPlan(e||void 0),r.defaultIDDPrefix()?r.defaultIDDPrefix():Xf.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,0,i.metadata);if(a)return`${a} ${n} ${th(e,0,"INTERNATIONAL",i)}`}(a,0,o,n.fromCountry,i);return s?nh(s,e.ext,i,n.formatExtension):void 0;default:throw Error(`Unknown "format" argument passed to "formatNumber()": "${t}"`)}}(this,e,t?oh(oh({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}]),ch=/^\+\d+$/,uh="(["+tf+"]|[\\-\\.\\(\\)]?)",lh=RegExp("^\\+"+uh+"*["+tf+"]"+uh+"*$","g"),ph=RegExp("^(["+tf+"]+((\\-)*["+tf+"])*\\.)*[a-zA-Z]+((\\-)*["+tf+"])*\\.?$","g"),mh=";phone-context=";var fh=RegExp("[++"+tf+"]"),hh=RegExp("[^"+tf+"#]+$");function vh(e,t,n){t||={};var r=new gf(n);if(t.defaultCountry&&!r.hasCountry(t.defaultCountry))throw t.v2?new cf("INVALID_COUNTRY"):Error("Unknown country: "+t.defaultCountry);var i=function(e,t,n){var r=function(e,t){var n,r=t.extractFormattedPhoneNumber,i=function(e){var t=e.indexOf(mh);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(lh.test(e)||ph.test(e))}(i))throw new cf("NOT_A_NUMBER");if(null===i)n=r(e)||"";else{n="","+"===i.charAt(0)&&(n+=i);var o=e.indexOf("tel:"),a=o>=0?o+4:0,s=e.indexOf(mh);n+=e.substring(a,s)}var d=n.indexOf(";isub=");if(d>0&&(n=n.substring(0,d)),""!==n)return n}(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(e){if(e.length>250){if(n)throw new cf("TOO_LONG");return}if(!1===t)return e;var r=e.search(fh);if(!(r<0))return e.slice(r).replace(hh,"")}}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&Pf.test(e)}(r))return function(e){return Sf.test(e)}(r)?{error:"TOO_SHORT"}:{};var i=function(e){var t=e.search(Cf);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(Cf),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}(r);return i.ext?i:{number:r}}(e,t.v2,t.extract),o=i.number,a=i.ext;if(!o){if(t.v2)throw new cf("TOO_SHORT"===i.error?"TOO_SHORT":"NOT_A_NUMBER");return{}}var s=function(e,t,n,r){var i,o=Jf(Rf(e),0,t,n,r.metadata),a=o.countryCallingCodeSource,s=o.countryCallingCode,d=o.number;if(s)r.selectNumberingPlan(s);else{if(!d||!t&&!n)return{};t?(i=t,r.selectNumberingPlan(t),s=r.numberingPlan.callingCode()):(r.selectNumberingPlan(n),s=n)}if(!d)return{countryCallingCodeSource:a,countryCallingCode:s};var c=Kf(Rf(d),void 0,r),u=c.nationalNumber,l=c.carrierCode,p=Hf(s,{nationalNumber:u,metadata:r});return p&&(i=p,"001"===p||r.selectNumberingPlan(i)),{country:i,countryCallingCode:s,countryCallingCodeSource:a,nationalNumber:u,carrierCode:l}}(o,t.defaultCountry,t.defaultCallingCode,r),d=s.country,c=s.nationalNumber,u=s.countryCallingCode,l=s.countryCallingCodeSource,p=s.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new cf("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new cf("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new cf("TOO_LONG");return{}}if(t.v2){var m=new dh(u,c,r.metadata);return d&&(m.country=d),p&&(m.carrierCode=p),a&&(m.ext=a),m.__countryCallingCodeSource=l,m}var f=!!(t.extended?r.hasSelectedNumberingPlan():d)&&Gf(c,r.nationalNumberPattern());return t.extended?{country:d,countryCallingCode:u,carrierCode:p,valid:f,possible:!!f||!(!0!==t.extended||!r.possibleLengths()||!qf(c,r)),phone:c,ext:a}:f?function(e,t,n){var r={country:e,phone:t};return n&&(r.ext=n),r}(d,c,a):{}}function gh(e){return gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gh(e)}function yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bh(e){for(var t=1;t<arguments.length;t++){var n=null==arguments[t]?{}:arguments[t];t%2?yh(Object(n),!0).forEach((function(t){wh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wh(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=gh(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=gh(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==gh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $h(e){return $h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$h(e)}function Ih(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kh(e){for(var t=1;t<arguments.length;t++){var n=null==arguments[t]?{}:arguments[t];t%2?Ih(Object(n),!0).forEach((function(t){Eh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ih(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Eh(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=$h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$h(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==$h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xh(e){return xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xh(e)}function Ah(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Th(e){for(var t=1;t<arguments.length;t++){var n=null==arguments[t]?{}:arguments[t];t%2?Ah(Object(n),!0).forEach((function(t){Oh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ah(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oh(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=xh(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=xh(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==xh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _h(){var e=ef(arguments),t=e.options,n=e.metadata,r=function(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=kh(kh({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return vh(e,bh(bh({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof cf))throw e}}(e.text,t=Th(Th({},t),{},{extract:!1}),n);return r&&r.isValid()||!1}const Dh=sm.omit({eventId:!0,channel:!0,analytics:!0}).partial().extend({id:yi().meta({examples:[Ee.Order.id],description:"Unique identifier of the order to update"}),signature:ja.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded). Required for all order updates."}),items:so(im).min(1).optional().meta({description:"Updated list of items for the order. Requires signature. Prices will be recalculated and payment intent updated."}),customer:uo({firstName:yi().meta({examples:[Ee.Customer.firstName],description:"Updated first name of the customer"}).optional(),lastName:yi().meta({examples:[Ee.Customer.lastName],description:"Updated last name of the customer"}).optional(),email:$i().meta({examples:[Ee.Customer.email],description:"Updated email address of the customer"}).optional(),phone:yi().refine((e=>!e||function(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(Vm),e.apply(this,n)}(_h,arguments)}(e)),{message:"Phone must be in E.164 format (e.g., +61412345678)"}).meta({examples:[Ee.Customer.phone],description:"Updated phone number in E.164 format (e.g., +61412345678)"}).optional(),deliveryMethod:cm.optional()}).optional().meta({description:"Updated customer information for the order. All fields are optional for partial updates."}),marketingConsent:Sp.optional().meta({description:"Marketing opt-in choices captured during checkout."})}),Sh=uo({id:yi().meta({examples:[Ee.Order.id],description:"Unique identifier of the order"}),noteId:yi().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to update"}),note:yi().min(1).max(1e3).meta({examples:["Updated: Customer confirmed special seating arrangements"],description:"Updated note text content (1-1000 characters)"})});var Mh={create:se.route({method:"POST",path:"/orders/{id}/notes",summary:"Add note to order timeline (promoter only)",description:"Add a user note to the order timeline. Note will be marked as editable by the author.",tags:["Orders"]}).input(rm.strict()).output(Ym),update:se.route({method:"PATCH",path:"/orders/{id}/notes/{noteId}",summary:"Update timeline note (author only)",description:"Update a timeline note. Only the author can edit their own notes. System-generated entries cannot be edited.",tags:["Orders"]}).input(Sh.strict()).output(Ym),remove:se.route({method:"DELETE",path:"/orders/{id}/notes/{noteId}",summary:"Delete timeline note (author only)",description:"Delete a timeline note. Only the author can delete their own notes. System-generated entries cannot be deleted.",tags:["Orders"]}).input(dm.strict()).output(ro())};const Ph=se.route({method:"GET",path:"/orders/{id}",summary:"Get order by ID",tags:["Orders"]}).input($m.strict()).output(Ym),Ch=se.route({method:"GET",path:"/orders",summary:"List orders with cursor-based pagination",description:"Returns order data with cursor-based pagination, optional full-text search via `query`, advanced filters, and deterministic sorting.",tags:["Orders"]}).input(jm.strict()).output(Nm),jh=se.route({method:"POST",path:"/orders/quote",summary:"Create order quote",tags:["Orders"]}).input(Um.strict()).output(Lm);var Nh={get:Ph,list:Ch,create:se.route({method:"POST",path:"/orders",summary:"Create a new order",tags:["Orders"]}).input(sm.strict()).output(Ym),createComplimentary:se.route({method:"POST",path:"/orders/complimentary",summary:"Create a complimentary order",tags:["Orders"]}).input(om.strict()).output(Ym),update:se.route({method:"PUT",path:"/orders/{id}",summary:"Update an order",tags:["Orders"]}).input(Dh.strict()).output(Ym),reserve:se.route({method:"POST",path:"/orders/{id}/reserve",summary:"Re-reserve inventory for an abandoned order",description:"Attempts to re-reserve inventory for an abandoned order. If inventory is available, the order status is set back to PENDING with a new reservation timer. Returns the updated order with a new reservedAt timestamp if successful.",tags:["Orders"]}).input(Bm.strict()).errors({BAD_REQUEST:{status:400,data:Wm.optional()}}).output(Ym),quote:jh,resend:se.route({method:"POST",path:"/orders/{id}/resend",summary:"Resend tickets to customer",description:"Resend order tickets to the customer's email. Optionally provide a different email address.",tags:["Orders"]}).input(Fm.strict()).output(Ym),refund:se.route({method:"POST",path:"/orders/{id}/refund",summary:"Refund order items",description:"Process a refund for order items. Supports full or partial refunds with optional ticket cancellation.",tags:["Orders"]}).input(Gm.strict()).output(zm),note:Mh};uo({success:Yi().meta({description:"Whether the payout approval was successful"}),message:yi().optional().meta({description:"Optional message about the approval result"}),payoutId:yi().meta({description:"ID of the payout that was approved"})});const Rh=uo({payoutId:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout for which to retrieve the detailed breakdown of orders and financial calculations."})}),Uh=uo({id:yi().readonly().meta({examples:[Ee.PayoutDeduction.id],description:"Unique identifier for this deduction record."}),createdAt:Hr().readonly().meta({examples:[Ee.PayoutDeduction.createdAt],description:"Timestamp in ISO 8601 format when this deduction was created."}),updatedAt:Hr().readonly().meta({examples:[Ee.PayoutDeduction.updatedAt],description:"Timestamp in ISO 8601 format when this deduction was last updated."}),amount:Bi().max(0).meta({examples:[Ee.PayoutDeduction.amount],description:"Deduction amount in cents. Negative values reduce the payout."}),currency:zo.meta({examples:[Ee.PayoutDeduction.currency],description:"Currency code in ISO 4217 format for the deduction amount."}),description:yi().meta({examples:[Ee.PayoutDeduction.description],description:"Human-readable description explaining the reason for this deduction (e.g., 'Minimum bar spend not met', 'Venue damage charge')."}),gateway:yi().meta({examples:[Ee.PayoutDeduction.gateway],description:"Payment gateway identifier where this deduction was processed."}),gatewayId:yi().meta({examples:[Ee.PayoutDeduction.gatewayId],description:"Unique identifier assigned by the payment gateway for this deduction transaction."}),beneficiary:yi().meta({examples:[Ee.PayoutDeduction.beneficiary],description:"Human-readable name of the beneficiary account from which this deduction was taken."}),beneficiaryId:yi().meta({examples:[Ee.PayoutDeduction.beneficiaryId],description:"Unique identifier of the beneficiary account from which this deduction was taken."}),transferId:yi().optional().meta({description:"Optional reference to a transfer record when this deduction results in money being moved to a future payout."}),transferPayoutId:yi().optional().meta({description:"Optional reference to a future payout where the deducted amount will be applied."})}),Lh=uo({id:yi().meta({examples:[Ee.Event.id],description:"Unique identifier for the event associated with this payout."}),name:yi().meta({examples:[Ee.Event.name],description:"Human-readable name of the event."}),slug:yi().meta({examples:[Ee.Event.slug],description:"URL-friendly slug identifier for the event."}),location:yi().optional().meta({examples:[Ee.Event.location.name],description:"Optional human-readable location name where the event takes place."})}),qh=uo({net:Bi().meta({examples:[Ee.Payout.price.net],description:"Total amount to pay to promoter.\nCalculated as: total + booking + refunded + dispute + deductions"}),total:Bi().meta({examples:[Ee.Payout.price.total],description:"Total amount the collected in ticket revenue.\nCalculated as: gross + discount"}),gross:Bi().min(0).meta({examples:[Ee.Payout.price.gross],description:"Total amount before refunds, disputes, deductions and discounts.\nCalculated as: base + booking + shipping"}),base:Bi().min(0).meta({examples:[Ee.Payout.price.base],description:"Total value of tickets."}),booking:Bi().min(0).meta({examples:[Ee.Payout.price.booking],description:"Total value of booking fees (non-refundable)."}),shipping:Bi().min(0).meta({examples:[Ee.Payout.price.shipping],description:"Total value of shipping."}),sms:Bi().min(0).default(0).meta({examples:[Ee.Payout.price.sms],description:"Total SMS delivery fees collected in cents (owed to Session Services, not the event organiser)."}),refunded:Bi().max(0).meta({examples:[Ee.Payout.price.refunded],description:"Total value of refunds (negative value)."}),discount:Bi().max(0).meta({examples:[Ee.Payout.price.discount],description:"Total value of discounts (negative value)."}),gateway:Bi().meta({examples:[Ee.Payout.price.gateway],description:"Total value of absorbed payment gateway fees. Negative values are charges; positive values are reversals."}),dispute:Bi().meta({examples:[Ee.Payout.price.dispute],description:"Total value of non-absorbed payment gateway fees. Negative values are charges; positive values are reversals."}),deductions:Bi().max(0).meta({examples:[Ee.Payout.price.deductions],description:"Total value of payout-level deductions (negative value)."}),currency:zo.meta({examples:[Ee.Payout.price.currency],description:"Currency code in ISO 4217 format."})}),Gh=Xp(bo(["CREATED","APPROVED","REJECTED","PROCESSING","PAID","FAILED","CANCELLED","NOTE"]),{createdAtExamples:[Ee.Payout.createdAt],descriptionExamples:["Payout was created after event settlement"],externalIdDescription:"External idempotency key for deduplication (e.g., Airwallex transfer events)",externalIdExamples:["airwallex:transfer_abc123:completed"],idDescription:"Unique identifier for this timeline entry",idExamples:["tl_01jgxyz123abc"],kindDescription:"Type of timeline event (CREATED, APPROVED, PROCESSING, PAID, NOTE, etc.)",kindExamples:["CREATED","APPROVED","PAID"]}),zh=uo({id:yi().meta({examples:[Ee.PayoutTransfer.id],description:"Unique identifier for this transfer record."}),createdAt:Hr().meta({examples:[Ee.PayoutTransfer.createdAt],description:"Timestamp in ISO 8601 format when this transfer was created."}),kind:bo(["TICKETS","TENANT","VENUE","TEAM","SESSIONS","UNKNOWN"]).meta({examples:["TICKETS"],description:"Type of transfer. TICKETS: revenue from ticket sales, TENANT: platform fees, VENUE: venue split, TEAM: team split, SESSIONS: platform commission, UNKNOWN: unclassified transfer."}),amount:Bi().min(0).meta({examples:[Ee.PayoutTransfer.amount],description:"Transfer amount in cents. Positive values represent money being transferred to the beneficiary."}),currency:zo.meta({examples:[Ee.PayoutTransfer.currency],description:"Currency code in ISO 4217 format for the transfer amount."}),fee:Bi().min(0).meta({examples:[Ee.PayoutTransfer.fee],description:"Gateway processing fee for this transfer in cents. This fee is deducted from the transfer amount."}),feeCurrency:zo.meta({examples:[Ee.PayoutTransfer.feeCurrency],description:"Currency code in ISO 4217 format for the gateway fee."}),reference:yi().meta({examples:[Ee.PayoutTransfer.reference],description:"External reference identifier for tracking this transfer with the payment gateway."}),gateway:bo(["AIRWALLEX","STRIPE"]).meta({examples:["AIRWALLEX"],description:"Payment gateway used to process this transfer."}),gatewayId:yi().meta({examples:[Ee.PayoutTransfer.gatewayId],description:"Unique identifier assigned by the payment gateway for this transfer."}),beneficiary:yi().meta({examples:[Ee.PayoutTransfer.beneficiary],description:"Human-readable name of the beneficiary receiving this transfer."}),beneficiaryId:yi().meta({examples:[Ee.PayoutTransfer.beneficiaryId],description:"Unique identifier of the beneficiary account receiving this transfer."}),status:yi().optional().meta({examples:["SCHEDULED"],description:"Transfer status from the payment gateway (e.g. SCHEDULED, IN_PROGRESS, COMPLETED)."}),settlementAmount:Bi().min(0).optional().meta({examples:[3550],description:"Amount received by the beneficiary in their local currency, in cents. Present only for cross-currency transfers where the settlement currency differs from the source currency."}),settlementCurrency:zo.optional().meta({examples:["USD"],description:"Currency code in ISO 4217 format for the settlement amount. Present only for cross-currency transfers."}),deductionId:yi().optional().meta({description:"Optional reference to a deduction record when this transfer represents money being held back from a previous negative payout."}),deductionPayoutId:yi().optional().meta({description:"Optional reference to the payout that originated this transfer when it represents an outstanding balance being carried forward."})}),Fh=bo(["UPCOMING","FAILED","PROCESSING","PAID","CANCELLED"]),Bh=bo(["AIRWALLEX","STRIPE","MANUAL"]),Wh=bo(["DAILY","WEEKLY","AFTER_EVENT","ON_DEMAND"]),Yh=uo({id:yi().readonly().meta({examples:[Ee.Payout.id],description:"A unique identifier for this payout."}),createdAt:Hr().readonly().meta({examples:[Ee.Payout.createdAt],description:"Timestamp in ISO 8601 format when this payout was created."}),updatedAt:Hr().readonly().meta({examples:[Ee.Payout.updatedAt],description:"Timestamp in ISO 8601 format when this payout was last updated."}),paidAt:Hr().optional().meta({examples:[Ee.Payout.paidAt],description:"Timestamp in ISO 8601 format when this payout was completed."}),dueAt:Hr().optional().meta({examples:[Ee.Payout.createdAt],description:"Earliest timestamp in ISO 8601 format when this payout can be picked up for processing. This is not a guaranteed bank arrival time."}),status:Fh.meta({examples:["PAID"],description:"Current payment status of this payout."}),method:Bh.meta({examples:["MANUAL"],description:"The payout channel used for disbursing funds."}),approval:Go.meta({examples:["APPROVED"],description:"Approval status for this payout."}),frequency:Wh.default("AFTER_EVENT").meta({examples:["AFTER_EVENT"],description:"Schedule on which this payout is generated."}),structure:yi().meta({examples:[Ee.Payout.structure],description:"Data structure defining how funds are allocated in this payout."}),transfers:so(zh).meta({description:"List of individual transfer records included in this payout."}),deductions:so(Uh).meta({description:"List of deductions applied before calculating the payout total."}),price:qh.meta({description:"Summary of amounts for transfers and deductions in this payout."}),event:Lh.meta({description:"Information about the event associated with this payout."}),timeline:so(Gh).optional().meta({description:"Chronological list of status changes and notes for this payout."}),eventId:yi().meta({examples:[Ee.Payout.eventId],description:"Identifier of the event for which this payout was generated."}),teamId:yi().meta({description:"Team receiving this payout. BREAKING CHANGE: Replaced promoterId/promoterSlug."})}).meta({description:"payout"});uo({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout to approve for processing."})}),uo({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout to reject."}),reason:yi().optional().meta({examples:["Insufficient funds in account"],description:"Optional reason for rejecting the payout. This will be recorded for audit purposes."})}),uo({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout to process and initiate transfers."})}),uo({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout to retry transfer processing for."})});const Vh=uo({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout to add a note to"}),note:yi().trim().min(1).max(1e3).meta({examples:["Transfer confirmed via bank statement"],description:"Note text content (1-1000 characters)"})}),Zh=uo({name:yi(),gateway:bo(["AIRWALLEX","STRIPE","FREE"]),message:yi(),eventIds:so(yi()).optional(),venues:so(yi()).optional(),tenants:so(yi()).optional(),teams:so(yi()).optional(),ticketBeneficiaryTeamId:yi().optional(),min:zi().optional(),max:zi().optional(),percent:zi().optional(),split:uo({tenant:zi(),team:zi(),venue:zi(),sessions:zi()})}),Hh=uo({tenant:zi().meta({examples:[5e4],description:"Amount allocated to the tenant (platform) in cents. This represents the platform's share of the revenue."}),venue:zi().meta({examples:[25e3],description:"Amount allocated to the venue in cents. This represents the venue's share of the revenue from events held at their location."}),team:zi().meta({examples:[2e4],description:"Amount allocated to the team in cents. This represents the team's share of the revenue after fees and other deductions."}),sessions:zi().meta({examples:[3e3],description:"Amount allocated to Sessions platform commission in cents. This represents the platform's service fees."}),tickets:zi().meta({examples:[2e3],description:"Amount allocated to ticketing fees in cents. This represents fees charged for ticket processing and management."})});uo({payout:Yh.meta({description:"Complete payout record containing all financial details and metadata for calculating beneficiary allocations."}),feeStructure:Zh.meta({description:"Fee structure configuration that defines how revenue is split between different parties (promoter, venue, platform, etc.)."}),split:Hh.meta({description:"Calculated split amounts showing how the payout total is divided among the different beneficiaries in cents."})});const Kh=uo({orders:zi().meta({examples:[150],description:"Total number of orders included in this payout breakdown."}),price:Lp.meta({description:"Aggregated price information for all orders included in this payout, showing total revenue, fees, and deductions."}),split:Hh.meta({description:"How the total payout amount is split between different beneficiaries (tenant, venue, promoter, etc.) in cents."}),structure:yi().meta({examples:["DEFAULT"],description:"Fee structure identifier that was used to calculate the payout split and allocations."})}),Jh=uo({total:Kh.meta({description:"Summary totals for all orders included in this payout breakdown, including aggregated financial calculations."}),orders:so(uo({order:nm.meta({description:"Complete order information including customer details, items, and payment status."}),price:Lp.meta({description:"Settled price information for this specific order, showing final amounts after refunds and adjustments."}),split:Hh.meta({description:"How this individual order's revenue is split between different beneficiaries in cents."}),structure:yi().meta({examples:["DEFAULT"],description:"Fee structure identifier used to calculate the split for this order."})})).meta({description:"Detailed breakdown of individual orders included in this payout, showing how each order contributes to the total."})});Yh.pick({id:!0,eventId:!0}).extend({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout for which to retrieve the detailed breakdown."}),eventId:yi().meta({examples:[Ee.Event.id],description:"Unique identifier of the event associated with the payout breakdown."})}),Yh.pick({eventId:!0,teamId:!0,method:!0,frequency:!0}).partial({method:!0,frequency:!0}).meta({description:"Schema for creating a new payout record"}).extend({eventId:yi().meta({examples:[Ee.Event.id],description:"Unique identifier of the event for which the payout is being created"}),teamId:yi().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"Unique identifier of the team who will receive the payout"}),method:bo(["AIRWALLEX","STRIPE","MANUAL"]).optional().meta({examples:["AIRWALLEX"],description:"Optional payment method for the payout. Defaults to promoter's preferred method if not specified"}),frequency:bo(["DAILY","WEEKLY","AFTER_EVENT"]).optional().meta({examples:["AFTER_EVENT"],description:"Optional payout frequency. Defaults to 'AFTER_EVENT' if not specified"})});const Qh=uo({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout"}),noteId:yi().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to delete"})}),Xh=Yh.pick({id:!0}).extend({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout to retrieve."})}),ev=bo(["createdAt"]),tv=bo(["asc","desc"]),nv=uo({mine:Yi().optional().meta({examples:[!0],description:"When true, returns payouts from teams where the authenticated user has payout access (for example, `payout.read` or `payout.write`)."}),teamId:yi().optional().meta({description:"Filter payouts by specific team unique identifier. BREAKING CHANGE: Replaced promoterId filter."}),eventId:yi().optional().meta({examples:[Ee.Event.id],description:"Filter payouts by specific event unique identifier. When provided, only returns payouts for this event."}),status:bo(["UPCOMING","FAILED","PROCESSING","PAID","CANCELLED"]).optional().meta({examples:["PAID"],description:"Filter payouts by payment status. UPCOMING: scheduled but not yet processed, FAILED: failed processing and will retry, PROCESSING: currently being processed, PAID: successfully completed, CANCELLED: cancelled before completion."}),approval:Go.optional().meta({examples:["APPROVED"],description:"Filter payouts by approval status. PENDING: awaiting approval, APPROVED: approved for processing, REJECTED: rejected and will not be processed."}),query:yi().optional().meta({examples:["PAID venue:sydney"],description:"Optional search query to filter payouts by text fields. When provided, search-backed pagination is used."}),sort:ev.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest payouts first."}),direction:tv.optional().meta({examples:["desc"],description:"Sort direction for payout lists. Defaults to `desc` when `sort` is provided."}),limit:wa("payouts").optional(),cursor:yi().optional().meta({examples:["eyJpZCI6InBheV8wMWpwczVjZ3NmdjJ3cmU2aGQwcmM0dzR0OCJ9"],description:"Pagination cursor for continuing to fetch subsequent results. Use the cursor from the previous response to continue."})}).meta({description:"Schema for listing payouts with optional filtering, search, and cursor-based pagination"}),rv=Wa(Yh,"payouts"),iv=uo({status:bo(["VALID","FALLBACK","MISSING"]).meta({examples:["VALID"],description:"Resolution status for the beneficiary used by this split. FALLBACK indicates a non-strict match was used, MISSING means no beneficiary is configured."}),warning:yi().optional().meta({examples:["Using fallback beneficiary with matching gateway only."],description:"Optional warning message shown when fallback or missing beneficiary resolution was required."}),beneficiary:uo({id:yi().optional().meta({examples:[Ee.Beneficiary.id],description:"Identifier for the beneficiary."}),teamId:yi().optional().meta({examples:[Ee.Team.id],description:"Team that owns this beneficiary configuration."}),name:yi().meta({examples:[Ee.Beneficiary.name],description:"Display name for the resolved beneficiary."}),gateway:bo(["AIRWALLEX","STRIPE"]).optional().meta({examples:[Ee.Beneficiary.gateway],description:"Payment gateway for this beneficiary when available from configuration."}),gatewayId:yi().meta({examples:[Ee.Beneficiary.gatewayId],description:"Gateway-specific beneficiary identifier used for transfer creation."}),currency:zo.meta({examples:[Ee.Beneficiary.currency],description:"Currency configured for this beneficiary."})}).optional()}),ov=uo({kind:bo(["tickets","tenant","venue","team","sessions"]).meta({examples:["tickets"],description:"Split component represented by this row."}),amount:zi().int().meta({examples:[114500],description:"Amount in cents for this split component."}),currency:zo.meta({examples:[Ee.Payout.price.currency],description:"Currency code for this split component."}),beneficiary:iv}),av=bo(["TRACKED","N_A","SKIPPED"]),sv=uo({orders:zi().int().meta({examples:[12],description:"Number of orders in this settlement bucket."}),price:Lp.meta({description:"Aggregated totals for the orders in this bucket, in the bucket's native currency."})}),dv=uo({state:av.meta({examples:["TRACKED"],description:"Whether settlement tracking applies to this payout preview. Non-Airwallex payouts return N_A."}),settled:sv.optional().meta({description:"Completed Airwallex orders that already have settlement data available."}),awaitingSettlement:sv.optional().meta({description:"Completed Airwallex orders still waiting on settlement ingestion."})}),cv=uo({payout:Yh.pick({id:!0,status:!0,approval:!0,method:!0,frequency:!0,structure:!0,createdAt:!0,dueAt:!0,teamId:!0,eventId:!0,event:!0,price:!0}).meta({description:"Lightweight payout summary used by approvals and payout queue UIs."}),rows:so(ov).meta({description:"Non-zero split rows with beneficiary resolution status and warnings."}),settlementSummary:dv.meta({description:"Settlement status summary for the payout event. Airwallex payouts expose settled vs awaiting-settlement buckets."})}),uv=Xh.extend({includeSettlementSummary:Yi().optional().meta({examples:[!0],description:"When true, includes the Airwallex settlement summary for the payout preview."})}),lv=uo({payout:Yh,breakdown:Jh,canExportBookingFees:Yi()}),pv=go(yi(),go(yi(),uo({net:zi(),total:zi(),gross:zi(),base:zi(),booking:zi(),shipping:zi(),refunded:zi(),discount:zi(),gateway:zi(),dispute:zi(),deductions:zi()}))).meta({description:"Payout statistics grouped by period (current/previous) and currency",examples:[{current:{USD:{net:1e5,total:12e4,gross:115e3,base:11e4,booking:5e3,shipping:0,refunded:0,discount:5e3,gateway:3e3,dispute:0,deductions:2e3}},previous:{USD:{net:8e4,total:95e3,gross:9e4,base:85e3,booking:5e3,shipping:0,refunded:0,discount:5e3,gateway:2500,dispute:0,deductions:1500}}}]}),mv=uo({teamId:yi().optional().meta({description:"Filter stats by team ID"}),startDate:yi().optional().meta({description:"Start date for stats period (YYYY-MM-DD)"}),endDate:yi().optional().meta({description:"End date for stats period (YYYY-MM-DD)"})}),fv=Yh.pick({id:!0}).merge(Yh.pick({status:!0,approval:!0}).partial()).extend({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout to update."}),status:bo(["CANCELLED"]).optional().meta({examples:["CANCELLED"],description:"Optional new payment status for the payout. Only CANCELLED is allowed for manual updates."}),approval:Go.optional().meta({examples:["APPROVED"],description:"Optional new approval status for the payout. PENDING: awaiting approval, APPROVED: approved for processing, REJECTED: rejected."})}),hv=uo({id:yi().meta({examples:[Ee.Payout.id],description:"Unique identifier of the payout"}),noteId:yi().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to update"}),note:yi().trim().min(1).max(1e3).meta({examples:["Updated: Transfer confirmed - reference #12345"],description:"Updated note text content (1-1000 characters)"})}),vv=uo({payout:Yh});var gv={create:se.route({method:"POST",path:"/payouts/{id}/notes",summary:"Add note to payout timeline (`payout.write` required)",description:"Add a user note to the payout timeline. Note will be marked as editable by the author.",tags:["Payouts"]}).input(Vh.strict()).output(vv),update:se.route({method:"PATCH",path:"/payouts/{id}/notes/{noteId}",summary:"Update timeline note (author only)",description:"Update a timeline note. Only the author can edit their own notes. System-generated entries cannot be edited.",tags:["Payouts"]}).input(hv.strict()).output(vv),remove:se.route({method:"DELETE",path:"/payouts/{id}/notes/{noteId}",summary:"Delete timeline note (author only)",description:"Delete a timeline note. Only the author can delete their own notes. System-generated entries cannot be deleted.",tags:["Payouts"]}).input(Qh.strict()).output(vv)},yv={get:se.route({method:"GET",path:"/payouts/{id}",summary:"Get payout by ID with breakdown",tags:["Payouts"]}).input(Xh.strict()).output(lv),list:se.route({method:"GET",path:"/payouts",summary:"List payouts with cursor-based pagination",description:"Returns payout data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Payouts"]}).input(nv.strict()).output(rv),preview:se.route({method:"GET",path:"/payouts/{id}/preview",summary:"Get payout preview for approvals",description:"Returns lightweight payout split rows and beneficiary resolution status used by approvals dropdowns.",tags:["Payouts"]}).input(uv.strict()).output(cv),stats:se.route({method:"POST",path:"/payouts/stats",summary:"Get payout statistics",tags:["Payouts"]}).input(mv.strict()).output(pv),breakdown:se.route({method:"GET",path:"/payouts/{payoutId}/breakdown",summary:"Get payout breakdown",tags:["Payouts"]}).input(Rh.strict()).output(Jh),update:se.route({method:"PATCH",path:"/payouts/{id}",summary:"Update a payout",description:"Update payout status or approval. Use approval field to approve or reject payouts.",tags:["Payouts"]}).input(fv.strict()).output(Yh),note:gv};const bv=bo(["PROMOTER","VENUE"]).meta({description:"Type of permission scope. PROMOTER: applies to all events by a specific promoter. VENUE: applies to all events at a specific venue."}),wv=uo({id:yi().readonly().meta({description:"Unique identifier for the permission scope"}),createdAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the scope was created"}),updatedAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the scope was last updated"}),teamMemberId:yi().meta({description:"Team member this scope applies to"}),teamId:yi().meta({description:"Team the member belongs to"}),userId:yi().meta({description:"ID of the user this permission scope applies to"}),permissions:so(Ma).meta({description:"Scoped permissions. Can be empty array to remove all access. Replaces lower-tier permissions based on kind (VENUE overrides PROMOTER overrides BASE)."}),roleIds:so(yi()).optional().meta({description:"Optional role IDs applied at this scope. Role-derived permissions are merged with explicit scoped nodes."}),tenantId:yi().readonly().meta({description:"Tenant identifier"})}),$v=fo("kind",[wv.extend({kind:$o("PROMOTER").meta({description:"Scope type: PROMOTER-specific permissions"}),promoterId:yi().meta({description:"Promoter this scope applies to. Replaces base permissions for all events by this promoter."})}).meta({description:"PROMOTER-specific permission scope. Applies to all events by the specified promoter."}),wv.extend({kind:$o("VENUE").meta({description:"Scope type: VENUE-specific permissions"}),venueId:yi().meta({description:"Venue this scope applies to. Replaces base/promoter permissions for all events at this venue."})}).meta({description:"VENUE-specific permission scope. Applies to all events at the specified venue."})]).meta({description:"Permission scope for a team member. Can be PROMOTER-specific (applies to all events by that promoter) or VENUE-specific (applies to all events at that venue). Replaces lower-tier permissions using REPLACE semantics."}),Iv=uo({permissions:so(Ma).meta({description:"Scoped permissions. Can be empty array to remove all access. Replaces lower-tier permissions based on kind (VENUE overrides PROMOTER overrides BASE)."}),roleIds:so(yi()).optional().meta({description:"Optional role IDs to apply at this scope."})}),kv=fo("kind",[Iv.extend({kind:$o("PROMOTER").meta({description:"Scope type: PROMOTER-specific permissions"}),promoterId:yi().meta({description:"Promoter this scope applies to. Replaces base permissions for all events by this promoter."})}).meta({description:"Create a PROMOTER-specific permission scope. Applies to all events by the specified promoter."}),Iv.extend({kind:$o("VENUE").meta({description:"Scope type: VENUE-specific permissions"}),venueId:yi().meta({description:"Venue this scope applies to. Replaces base/promoter permissions for all events at this venue."})}).meta({description:"Create a VENUE-specific permission scope. Applies to all events at the specified venue."})]).meta({description:"Schema for creating a new permission scope. Must specify kind (PROMOTER or VENUE) and corresponding ID."}),Ev=uo({id:ua.meta({description:"Unique identifier for the permission scope"})}).meta({description:"Schema for retrieving a single permission scope by ID"}),xv=uo({teamMemberId:yi().optional().meta({description:"Filter by team member ID"}),userId:yi().optional().meta({description:"Filter by user ID"}),kind:bv.optional().meta({description:"Filter by scope kind (PROMOTER or VENUE)"}),promoterId:yi().optional().meta({description:"Filter by promoter ID (only for kind=PROMOTER scopes)"}),venueId:yi().optional().meta({description:"Filter by venue ID (only for kind=VENUE scopes)"}),limit:wa("permission scopes"),cursor:yi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing permission scopes with pagination and filtering"}),Av=Wa($v,"items").meta({description:"Paginated response containing permission scopes with cursor for next page"}),Tv=Iv.meta({description:"Schema for updating an existing permission scope. Only permissions array can be modified."}),Ov=uo({key:yi(),memberId:yi()}),_v=Ov.merge(Ev).strict();var Dv={get:se.route({method:"GET",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Get permission scope by ID",description:"Retrieve a permission scope using its unique ID",tags:["Permission Scopes"]}).input(_v).output($v),list:se.route({method:"GET",path:"/teams/{key}/members/{memberId}/permission-scopes",summary:"List permission scopes with cursor-based pagination",description:"Returns permission scopes for a specific team member with cursor pagination. Can filter by kind (PROMOTER or VENUE).",tags:["Permission Scopes"]}).input(Ov.merge(xv).strict()).output(Av),create:se.route({method:"POST",path:"/teams/{key}/members/{memberId}/permission-scopes",summary:"Create a new permission scope",description:"Create a permission scope for a team member. Can be PROMOTER-specific (applies to all events by that promoter) or VENUE-specific (applies to all events at that venue). Replaces lower-tier permissions.",tags:["Permission Scopes"]}).input(Ov.and(kv)).output($v),update:se.route({method:"PATCH",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Update a permission scope",description:"Update an existing permission scope. Only the permissions array can be modified.",tags:["Permission Scopes"]}).input(Ov.extend({id:yi()}).merge(Tv).strict()).output($v),remove:se.route({method:"DELETE",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Delete a permission scope",description:"Remove a permission scope. Team member will revert to lower-tier permissions for the affected resource.",tags:["Permission Scopes"]}).input(_v).output($v)};const Sv=uo({id:la.meta({description:"Permission role ID"}),teamId:Ho.meta({description:"Team that owns this role"}),name:yi().min(1).meta({description:"Role display name"}),description:yi().optional().meta({description:"Optional role description"}),permissions:Ca.meta({description:"Permission nodes granted by this role"}),createdAt:Hr().meta({description:"Timestamp in ISO 8601 format when the role was created"}),updatedAt:Hr().meta({description:"Timestamp in ISO 8601 format when the role was last updated"})}).meta({description:"Team-scoped permission role"}),Mv=uo({role:Sv}),Pv=uo({roles:so(Sv)}),Cv=uo({key:yi().meta({description:"Team identifier (ID or slug)"})}),jv=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),roleId:la}),Nv=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),name:yi().min(1).meta({description:"Role display name"}),description:yi().optional().meta({description:"Optional role description"}),permissions:Ca}),Rv=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),roleId:la,name:yi().min(1).meta({description:"Role display name"}),description:yi().optional().meta({description:"Optional role description"}),permissions:Ca}),Uv=uo({memberId:sa,permissions:so(Ma),updatedAt:Hr()}),Lv=uo({member:Uv}),qv=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),memberId:sa}),Gv=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),memberId:sa,permissions:so(Ma).meta({description:"Direct permission nodes for this member. Full-replace semantics; use an empty array to remove all direct grants."})}),zv=uo({memberId:sa,roleIds:so(la).meta({description:"Role IDs assigned to this member"}),updatedAt:Hr()}),Fv=uo({member:zv}),Bv=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),memberId:sa}),Wv=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),memberId:sa,roleIds:so(la)}),Yv=uo({direct:so(yi()),fromRoles:so(yi()),effective:so(yi()),denied:so(yi())});uo({memberId:sa,permissions:Yv}),uo({key:yi().meta({description:"Team identifier (ID or slug)"}),memberId:sa,domain:yi().optional().meta({description:"Optional domain filter (for example: ticket, event)"}),action:yi().optional().meta({description:"Optional action filter (for example: read, write, scan)"}),resourceId:yi().optional().meta({description:"Optional resource ID filter"})});var Vv={roles:{list:se.route({method:"GET",path:"/teams/{key}/roles",summary:"List team roles",description:"Returns all roles configured for a team.",tags:["Permissions"]}).input(Cv.strict()).output(Pv),create:se.route({method:"POST",path:"/teams/{key}/roles",summary:"Create team role",description:"Creates a team-scoped permission role.",tags:["Permissions"]}).input(Nv.strict()).output(Mv),get:se.route({method:"GET",path:"/teams/{key}/roles/{roleId}",summary:"Get team role",description:"Retrieves a team role by ID.",tags:["Permissions"]}).input(jv.strict()).output(Mv),update:se.route({method:"PUT",path:"/teams/{key}/roles/{roleId}",summary:"Replace team role",description:"Full-replace, idempotent update for role name, description, and permissions.",tags:["Permissions"]}).input(Rv.strict()).output(Mv),remove:se.route({method:"DELETE",path:"/teams/{key}/roles/{roleId}",summary:"Delete team role",description:"Deletes a team role.",tags:["Permissions"]}).input(jv.strict()).output(Mv)},members:{permissions:{get:se.route({method:"GET",path:"/teams/{key}/members/{memberId}/permissions",summary:"Get member direct permissions",description:"Returns direct permission nodes assigned to a member.",tags:["Permissions"]}).input(qv.strict()).output(Lv),replace:se.route({method:"PUT",path:"/teams/{key}/members/{memberId}/permissions",summary:"Replace member direct permissions",description:"Full-replace, idempotent update for direct permission nodes assigned to a member.",tags:["Permissions"]}).input(Gv.strict()).output(Lv)},roles:{get:se.route({method:"GET",path:"/teams/{key}/members/{memberId}/roles",summary:"Get member role assignments",description:"Returns role IDs assigned to a member.",tags:["Permissions"]}).input(Bv.strict()).output(Fv),replace:se.route({method:"PUT",path:"/teams/{key}/members/{memberId}/roles",summary:"Replace member role assignments",description:"Full-replace, idempotent update for role assignments on a member.",tags:["Permissions"]}).input(Wv.strict()).output(Fv)}}};const Zv=uo({key:yi().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[Ee.Promoter.id,Ee.Promoter.slug]})}).meta({description:"Request schema for retrieving a promoter by either its unique ID or slug"});Ju.pick({slug:!0});const Hv=Ju.omit({id:!0,createdAt:!0,updatedAt:!0,geohash:!0,approval:!0,location:!0}).extend({teamId:yi().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"ID of the team that will own this promoter. User must be a member of this team."}),slug:yi().min(3).max(30).optional().meta({examples:[Ee.Promoter.slug],description:"URL-friendly slug for the promoter organization. If not provided, will be automatically generated from the name. Must be unique and between 3 and 30 characters"}),...km}).refine(Em,{message:Im}).meta({description:"Schema for creating a new promoter organization. The system automatically generates the ID, tenant association, geohash, and timestamps"}),Kv=uo({key:yi().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[Ee.Promoter.id,Ee.Promoter.slug]})}).meta({description:"Schema for removing (soft deleting) a promoter organization by key (ID or slug)"});Ju.pick({id:!0}).meta({description:"Schema for retrieving a specific promoter by ID"});const Jv=bo(["createdAt"]),Qv=bo(["asc","desc"]),Xv=uo({teamId:yi().optional().meta({description:"Filter promoters to only those belonging to a specific team"}),approval:Go.optional().meta({examples:[Ee.Promoter.approval],description:"Filter promoters by approval status. PENDING: awaiting review, APPROVED: can create events, REJECTED: cannot operate"}),query:yi().optional().meta({examples:["Session Services"],description:"Optional search query. When provided, results are fetched from search with unified cursor pagination."}),latitude:Lo().min(-90).max(90).optional().meta({examples:[Ee.Promoter.location.latitude],description:"Latitude used with longitude and radius to filter promoters by proximity when searching."}),longitude:Lo().min(-180).max(180).optional().meta({examples:[Ee.Promoter.location.longitude],description:"Longitude used with latitude and radius to filter promoters by proximity when searching."}),radius:Lo().optional().meta({examples:[50],description:"Search radius in kilometers applied when latitude and longitude are provided."}),mine:qo().optional().meta({examples:[!0],description:"When true, limits results to promoters from teams the current user belongs to. When combined with teamId, returns only that team's promoters (bypassing tenant-wide admin scope)."}),sort:Jv.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest promoters first."}),direction:Qv.optional().meta({examples:["desc"],description:"Sort direction for promoter lists. Defaults to `desc` when omitted."}),limit:function(e,t){return new jo({type:"pipe",in:ko((e=>{if(null!=e)return"string"==typeof e?function(e){let t=e.trim();if(0===t.length)return;let n=Number(t);return Number.isNaN(n)?e:n}(e):e})),out:t})}(0,zi().min(1).max(100).prefault(20)).meta({examples:[20],description:"Maximum number of promoters to return (1-100, defaults to 20)"}).optional(),cursor:yi().optional().meta({examples:["eyJpZCI6InByb18wMWpxcGprc25zZW45dnBydzk1ZXQ2MHQybSJ9"],description:"Opaque cursor for pagination. Use the cursor from the previous response to continue fetching results."})}).meta({description:"Schema for listing promoters with optional filtering by team, full-text search, and cursor pagination"}),eg=Wa(Ju,"promoters"),tg=uo({promoter:Ju}),ng=Ju.omit({createdAt:!0,updatedAt:!0,id:!0,location:!0}).partial().extend({key:yi().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[Ee.Promoter.id,Ee.Promoter.slug]}),locationId:Qo.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:yi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."}),image:ma.nullable().optional().meta({description:"Promoter image. Pass null to clear; omit to leave unchanged.",examples:[Ee.Promoter.image,null]}),tracking:uo({fbId:yi().optional(),gaId:Ku.optional(),tikTokId:yi().optional()}).nullable().optional().meta({description:"Analytics tracking config. Pass null to clear all tracking; omit to leave unchanged."})}).meta({description:"Schema for updating an existing promoter."});var rg={summary:se.route({method:"GET",path:"/promoters/{promoterId}/performance/summary",summary:"Get promoter performance summary",description:"Overview KPIs for a single promoter based on tracking data (excludes entity-based data like payouts)",tags:["Promoter Performance"]}).input(zd).output(Fd),revenue:se.route({method:"GET",path:"/promoters/{promoterId}/performance/revenue",summary:"Get promoter revenue over time",description:"Time-series data for revenue and tickets sold for a single promoter",tags:["Promoter Performance"]}).input(Bd).output(Wd),events:se.route({method:"GET",path:"/promoters/{promoterId}/performance/events",summary:"Get promoter top events by tickets",description:"Top events by ticket count for a single promoter",tags:["Promoter Performance"]}).input(Yd).output(Vd)};const ig=uo({eventCount:zi().optional()}),og=se.route({method:"GET",path:"/promoters/{key}",summary:"Get promoter by ID or slug",description:"Retrieve a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(Zv.strict()).output(tg),ag=se.route({method:"POST",path:"/promoters",summary:"Create a new promoter",description:"Create a new promoter brand within a team",tags:["Promoters"]}).input(Hv.strict()).output(tg),sg=se.route({method:"PUT",path:"/promoters/{key}",summary:"Update a promoter",description:"Update a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(ng.strict()).output(tg);var dg={get:og,list:se.route({method:"GET",path:"/promoters",summary:"List promoters with cursor-based pagination",description:"Returns promoters with cursor pagination. Filter by teamId to see promoters for a specific team.",tags:["Promoters"]}).input(Xv.strict()).output(eg),create:ag,update:sg,remove:se.route({method:"DELETE",path:"/promoters/{key}",summary:"Delete a promoter",description:"Delete a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(Kv.strict()).errors({CONFLICT:{status:409,data:ig.optional()}}).output(tg),performance:rg};const cg=se.route({method:"GET",path:"/events/{eventId}/sections/{id}",summary:"Get section by ID",tags:["Sections"]}).input(Tm.strict()).output(Dm),ug=se.route({method:"POST",path:"/events/{eventId}/sections",summary:"Create a new section",tags:["Sections"]}).input(xm.strict()).output(Dm),lg=se.route({method:"PUT",path:"/events/{eventId}/sections/{id}",summary:"Update a section",tags:["Sections"]}).input(Sm.strict()).output(Dm);var pg={get:cg,list:se.route({method:"GET",path:"/events/{eventId}/sections",summary:"List sections",description:"Returns sections with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided for full-text search capabilities.",tags:["Sections"]}).input(Om.strict()).output(_m),create:ug,update:lg,remove:se.route({method:"DELETE",path:"/events/{eventId}/sections/{id}",summary:"Delete a section",tags:["Sections"]}).input(Am.strict()).output(Dm)};const mg=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),inviteId:yi().meta({description:"Team invite ID to accept"}),token:yi().meta({description:"Secure token used to accept the team invite. This token must match the one sent in the invitation email."})}),fg=uo({provider:bo(["STRIPE","AIRWALLEX"]).meta({description:"Payment gateway provider type"}),connectedAt:Hr().meta({description:"Timestamp when the payment gateway was connected to this team"}),connectedBy:yi().meta({description:"User ID of the team member who connected the payment gateway"}),accountId:yi().meta({description:"Connected account ID. For Stripe: acct_xxxxx. For Airwallex: business account open ID."})}).meta({description:"Payment gateway configuration for direct payouts to the team's connected account"}),hg=uo({id:Ho.readonly().meta({description:"Unique identifier for the team organization"}),createdAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the team was created"}),updatedAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the team was last updated"}),name:yi().min(3).max(30).meta({description:"Display name of the team organization. Must be between 3 and 30 characters"}),slug:yi().min(3).max(30).meta({description:"URL-friendly slug for the team organization. Must be unique within tenant and between 3 and 30 characters"}),supportEmail:yi().email().optional().meta({description:"Support email address for customer inquiries. Used as reply-to address in order confirmation emails"}),publicBaseUrl:xi().optional().meta({description:"Optional public website base URL for team-owned event and order links. When present, it overrides the tenant public base URL.",examples:["https://sash.net.au"]}),image:ma.optional().meta({description:"Team image with dimensions and alt text for branding across the platform"}),metadata:ya,approval:Go.meta({description:"Approval status of the team. PENDING: awaiting review, APPROVED: can create promoters/venues/events, REJECTED: cannot operate"}),deletedAt:Hr().optional().readonly().meta({description:"Timestamp in ISO 8601 format when the team was soft deleted. Only present for deleted teams."}),tenantId:yi().readonly().meta({description:"Tenant ID for multi-tenant isolation"}),isAdmin:Yi().optional().meta({description:"Whether this team is the admin team for the tenant"}),gateway:fg.optional().meta({description:"Connected payment gateway for direct payouts. When connected, funds from ticket sales go directly to the team's account with platform fees deducted."})}).meta({description:"Team organization that owns promoters and venues. Multiple brands can exist under one team."});hg.extend({promoter:Ju.meta({description:"The primary promoter brand associated with this team"})}).meta({description:"Team organization with its primary promoter brand included for convenience"});const vg=hg.extend({member:uo({id:sa.meta({description:"Current user's team member identifier for this team"}),permissions:Pa.meta({description:"Permissions the current user has for this team. Controls access to team resources.",examples:[[],["team.read","team.write"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),isOwner:Yi().meta({description:"Whether the current user is the owner of this team. Owners have full control."})}).optional().meta({description:"Current user's membership details for this team. Present when user is a member."})}).meta({description:"Team organization with the current user's membership details"}),gg=uo({key:yi().min(1).meta({description:"Team key - either a unique ID (tem_xxx format) or URL-friendly slug",examples:[Ee.Team.id,Ee.Team.slug]})}).meta({description:"Request schema for retrieving a team by either its unique ID or slug"}),yg=hg.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,deletedAt:!0}).extend({slug:yi().min(3).max(30).optional().meta({description:"URL-friendly slug for the team organization. If not provided, will be automatically generated from the name. Must be unique within tenant and between 3 and 30 characters"}),approval:hg.shape.approval.optional().meta({description:"Approval status of the team. Defaults to PENDING if not specified."})}).meta({description:"Schema for creating a new team organization. The system automatically generates the ID, tenant association, and timestamps"});uo({id:Ho.meta({description:"Team ID to delete"})}),uo({id:Ho.meta({description:"Team ID to retrieve"})});const bg=uo({id:da.readonly().meta({description:"Unique identifier for the team invitation"}),createdAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was created"}),updatedAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was last updated"}),teamId:Ho.meta({description:"Team this invitation is for"}),email:$i().meta({description:"Email address of the invited user. Used for sending invitation."}),permissions:so(Ma).meta({description:"Permissions the user will receive upon accepting the invitation. Can be overridden per promoter or venue.",examples:[[],["event.read","event.write","order.read"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),roleIds:so(yi()).optional().meta({description:"Role IDs assigned on invite acceptance. Effective permissions are role + explicit nodes."}),access:Na.optional().meta({description:"Promoter access to apply when the invitation is accepted."}),token:yi().readonly().meta({description:"Secure token for invite acceptance. Required to accept the invitation."}),expiresAt:zi().int().positive().meta({description:"Unix timestamp (seconds) for DynamoDB TTL. Invitation will be automatically deleted after 7 days."}),invitedBy:Xo.meta({description:"User ID who sent the invitation"}),tenantId:yi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Pending team invitation. Automatically deleted after 7 days via DynamoDB TTL. When accepted, creates a TeamMember record and deletes the invitation."}),wg=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),inviteId:yi().meta({description:"Team invite ID to cancel"})}),$g=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),email:$i().meta({description:"Email address of the user to invite"}),roleIds:so(yi()).min(1).meta({description:"Role IDs to grant to the invited user."}),access:Ra.optional().meta({description:"Optional promoter access assignment. Omit to preserve existing team-wide behavior."})}),Ig=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),inviteId:da.meta({description:"Team invite ID to retrieve"})}),kg=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),query:yi().optional().meta({description:"Search query to filter invitations by email. Case-insensitive partial match"}),limit:zi().int().min(1).max(100).default(20).optional().meta({description:"Maximum number of invitations to return per page"}),cursor:yi().optional().meta({description:"Pagination cursor for fetching the next page"})}),Eg=Wa(bg,"invites"),xg=uo({invite:bg}),Ag=bo(["createdAt"]),Tg=bo(["asc","desc"]),Og=uo({userId:Xo.optional().meta({description:"Filter teams by user membership. If omitted, returns all teams (tenant admin only). If provided, returns teams where the specified user is a member"}),approval:Go.optional().meta({description:"Filter teams by approval status. PENDING: awaiting review, APPROVED: can operate, REJECTED: cannot operate"}),query:yi().optional().meta({description:"Optional search query for filtering teams by name or slug"}),sort:Ag.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest teams first."}),direction:Tg.optional().meta({examples:["desc"],description:"Sort direction for team lists. Defaults to `desc` when `sort` is provided."}),limit:wa("teams"),cursor:yi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing teams with pagination and filtering"}),_g=Wa(vg,"teams"),Dg=bo(["STRIPE","AIRWALLEX"]),Sg=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),provider:Dg.meta({description:"Payment processor to connect",examples:["STRIPE","AIRWALLEX"]})}),Mg=uo({authorizationUrl:yi().url().meta({description:"URL to redirect the user to for OAuth authorization. Open in a new window or redirect the current page.",examples:["https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_xxx&scope=read_write&redirect_uri=..."]})}),Pg=uo({key:yi().meta({description:"Team identifier (ID or slug)"})}),Cg=uo({team:vg.extend({isAdmin:Yi().optional().meta({description:"Whether this team is the tenant admin team"})})}),jg=uo({id:yi().meta({description:"Role ID"}),teamId:yi().meta({description:"Team ID this role belongs to"}),key:yi().meta({description:"Role key"}),name:yi().meta({description:"Role display name"}),description:yi().optional().meta({description:"Role description"}),permissions:so(yi()).meta({description:"Permission nodes granted by this role"}),scope:$o("TEAM").meta({description:"Role scope"}),isPreset:Yi().meta({description:"Whether this role is a system preset role"})});uo({roles:so(jg)}),uo({key:yi().meta({description:"Team identifier (ID or slug)"})});const Ng=hg.omit({tenantId:!0,createdAt:!0,updatedAt:!0,id:!0}).partial().extend({key:yi().min(1).meta({description:"Team key - either a unique ID (tem_xxx format) or URL-friendly slug",examples:[Ee.Team.id,Ee.Team.slug]}),supportEmail:yi().email().nullable().optional().meta({description:"Support email for customer inquiries. Pass null to clear, omit to leave unchanged."}),publicBaseUrl:xi().nullable().optional().meta({description:"Public website base URL for team-owned event and order links. Pass null to clear, omit to leave unchanged."}),image:ma.nullable().optional().meta({description:"Team image. Pass null to clear, omit to leave unchanged."})}).meta({description:"Schema for updating an existing team organization. Pass null to clear optional fields."});var Rg={summary:se.route({method:"GET",path:"/teams/{teamId}/performance/summary",summary:"Get team performance summary",description:"Overview KPIs aggregated across all promoters in the team, based on tracking data (excludes entity-based data like payouts)",tags:["Team Performance"]}).input(Zd).output(Hd),revenue:se.route({method:"GET",path:"/teams/{teamId}/performance/revenue",summary:"Get team revenue over time",description:"Time-series data for revenue and tickets sold aggregated across all promoters in the team",tags:["Team Performance"]}).input(Kd).output(Jd),funnel:se.route({method:"GET",path:"/teams/{teamId}/performance/funnel",summary:"Get team conversion funnel",description:"Conversion funnel showing drop-off rates from product view to purchase, aggregated across all events in the team",tags:["Team Performance"]}).input(ec).output(tc),traffic:se.route({method:"GET",path:"/teams/{teamId}/performance/traffic",summary:"Get team traffic sources",description:"Traffic source breakdown by campaign, medium, or source, aggregated across all events in the team",tags:["Team Performance"]}).input(ac).output(sc),insights:se.route({method:"GET",path:"/teams/{teamId}/performance/insights",summary:"Get team performance insights",description:"Order-backed revenue, tickets, refund, and dispute totals for an exact time window",tags:["Team Performance"]}).input(dc).output(lc),payouts:se.route({method:"GET",path:"/teams/{teamId}/performance/payouts",summary:"Get team payout performance",description:"Upcoming and recently paid payout totals aggregated across the team",tags:["Team Performance"]}).input(mc).output(gc),events:se.route({method:"GET",path:"/teams/{teamId}/performance/events",summary:"Get team top events by tickets",description:"Top events by ticket count, aggregated across all events in the team",tags:["Team Performance"]}).input(Qd).output(Xd),admissions:se.route({method:"GET",path:"/teams/{teamId}/performance/admissions",summary:"Get team top admissions by tickets",description:"Top admission types by ticket count, aggregated across all events in the team",tags:["Team Performance"]}).input(ic).output(oc),orders:se.route({method:"GET",path:"/teams/{teamId}/performance/orders",summary:"Get team orders distribution",description:"Order counts grouped by time breakdown (hour, day of week, day, week, month)",tags:["Team Performance"]}).input(nc).output(rc),tracking:se.route({method:"GET",path:"/teams/{teamId}/performance/tracking",summary:"Get team tracking time series",description:"Time-series tracking data (page views, add to cart, checkout, orders) aggregated at team or tenant level",tags:["Team Performance"]}).input(yc).output(bc)},Ug={get:se.route({method:"GET",path:"/teams/{key}",summary:"Get team by ID or slug",description:"Retrieve a team with membership details. User must be a member of the team.",tags:["Teams"]}).input(gg.strict()).output(Cg),list:se.route({method:"GET",path:"/teams",summary:"List teams with cursor-based pagination",description:"Returns teams the current user has access to with cursor pagination",tags:["Teams"]}).input(Og.strict()).output(_g),create:se.route({method:"POST",path:"/teams",summary:"Create a new team",description:"Create a new team organization",tags:["Teams"]}).input(yg.strict()).output(Cg),update:se.route({method:"PATCH",path:"/teams/{key}",summary:"Update a team",description:"Update an existing team by ID or slug",tags:["Teams"]}).input(Ng.strict()).output(Cg),remove:se.route({method:"DELETE",path:"/teams/{key}",summary:"Delete a team",description:"Soft delete a team by ID or slug",tags:["Teams"]}).input(gg.strict()).output(Cg),performance:Rg};const Lg=uo({id:sa.readonly().meta({description:"Unique identifier for the team member"}),createdAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the member was created"}),updatedAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the member was last updated"}),teamId:Ho.meta({description:"Team this member belongs to"}),userId:Xo.meta({description:"User ID of the team member"}),user:uo({id:Xo.meta({description:"Unique identifier of the user"}),email:$i().meta({description:"Email address of the user"}),firstName:yi().meta({description:"First name of the user"}),lastName:yi().meta({description:"Last name of the user"}),imageUrl:yi().optional().meta({description:"Profile image URL of the user"})}).meta({description:"Denormalized user details for quick access without additional queries."}),permissions:so(Ma).optional().meta({description:"Base permissions across the team. Can be overridden per promoter or venue. Undefined means no base permissions (permissions come from PermissionScope only).",examples:[["event.read","event.write","order.read"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),roleIds:so(yi()).optional().meta({description:"Role IDs assigned to this team member. Effective permissions are derived from role nodes plus explicit permission nodes."}),isOwner:Yi().meta({description:"Whether this member is the owner of the team. Only one owner per team is allowed. Owner has full control and cannot be deleted."}),access:Na.optional().meta({description:"Promoter access summary. Omitted only for legacy/no-access records."}),tenantId:yi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Active team member with base permissions. Permissions can be overridden per promoter or venue. Created when a user accepts an invitation or is directly added to a team."}),qg=uo({member:Lg});var Gg={list:se.route({method:"GET",path:"/teams/{key}/invites",summary:"List pending team invitations with cursor-based pagination",description:"Returns pending team invitations for a specific team. Team key can be ID or slug. These are email-based invitations that have not yet been accepted.",tags:["Team Invites"]}).input(kg.strict()).output(Eg),get:se.route({method:"GET",path:"/teams/{key}/invites/{inviteId}",summary:"Get pending invitation by ID",description:"Retrieve a pending team invitation by its ID. Team key can be ID or slug.",tags:["Team Invites"]}).input(Ig.strict()).output(xg),create:se.route({method:"POST",path:"/teams/{key}/invites",summary:"Create a team invitation",description:"Invite a user to join a team by email. Team key can be ID or slug. Creates a pending invitation with a secure token that expires in 7 days. The invited user will receive an email with an acceptance link.",tags:["Team Invites"]}).input($g.strict()).output(xg),accept:se.route({method:"PATCH",path:"/teams/{key}/invites/{inviteId}",summary:"Accept a team invitation",description:"Accept a pending team invitation using the secure token. Team key can be ID or slug. This deletes the invitation and creates an active TeamMember record. Returns the newly created team member.",tags:["Team Invites"]}).input(mg.strict()).output(qg),resend:se.route({method:"POST",path:"/teams/{key}/invites/{inviteId}/resend",summary:"Resend invitation email",description:"Resend the invitation email with a new token and extended expiry. Team key can be ID or slug. Useful when the original invitation has expired or was not received.",tags:["Team Invites"]}).input(Ig.strict()).output(xg),cancel:se.route({method:"DELETE",path:"/teams/{key}/invites/{inviteId}",summary:"Cancel a pending invitation",description:"Cancel a pending team invitation before it is accepted. Team key can be ID or slug. Deletes the invitation record.",tags:["Team Invites"]}).input(wg.strict()).output(xg)},zg={connect:se.route({method:"POST",path:"/teams/{key}/payment/connect",summary:"Initiate payment processor connection",description:"Start the OAuth flow to connect a team's payment processor account. Returns an authorization URL to redirect the user to the payment provider's OAuth page. The OAuth callback is handled directly by the payment gateway.",tags:["Team Payments"]}).input(Sg.strict()).output(Mg),disconnect:se.route({method:"POST",path:"/teams/{key}/payment/disconnect",summary:"Disconnect payment processor",description:"Remove the payment processor connection from a team. Future ticket sales will use the platform account. Only the team owner can disconnect the payment processor.",tags:["Team Payments"]}).input(Pg.strict()).output(hg)};const Fg=Lg.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,user:!0,teamId:!0,permissions:!0}).extend({key:yi().meta({description:"Team identifier (ID or slug)"}),roleIds:so(yi()).min(1).meta({description:"Role IDs assigned to this team member."}),access:Ra.optional().meta({description:"Optional promoter access assignment. Omit to preserve existing team-wide behavior."})}).meta({description:"Schema for adding an existing user to a team. Requires userId of an existing user account."}),Bg=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),userId:yi().meta({description:"User ID of the team member to retrieve"})}),Wg=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),query:yi().optional().meta({description:"Search query to filter members by name or email. Case-insensitive partial match"}),limit:wa("team members"),cursor:yi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing active team members with pagination and search"}),Yg=Wa(Lg,"members"),Vg=uo({key:yi().meta({description:"Team identifier (ID or slug)"}),newOwnerId:yi().meta({description:"Team member ID of the new owner. This member must already exist with ACTIVE status."})}).meta({description:"Schema for transferring team ownership from the current owner to another active team member."}),Zg=uo({previousOwner:Lg.meta({description:"The previous owner (now a regular member with owner-equivalent access, typically via `*`)"}),newOwner:Lg.meta({description:"The new owner (now has isOwner: true)"})}).meta({description:"Response payload for team ownership transfer operation"}),Hg=uo({id:yi().meta({description:"Team member ID to update"}),roleIds:so(yi()).min(1).meta({description:"Replace role assignments for this team member with the provided role IDs."}),isOwner:Yi().optional().meta({description:"Whether this team member is an owner of the team"}),access:Ra.optional().meta({description:"Optional promoter access assignment. Omit to update only role assignments."})}).meta({description:"Schema for updating team member roles. Cannot update teamId, userId, or owner status."});var Kg={get:se.route({method:"GET",path:"/teams/{key}/members/{userId}",summary:"Get team member by user ID",description:"Retrieve a team member using the team key (ID or slug) and user ID",tags:["Team Members"]}).input(Bg.strict()).output(qg),list:se.route({method:"GET",path:"/teams/{key}/members",summary:"List team members with cursor-based pagination",description:"Returns active team members for a specific team with cursor pagination. Team key can be ID or slug. For pending invitations, use the team invites endpoint instead.",tags:["Team Members"]}).input(Wg.strict()).output(Yg),create:se.route({method:"POST",path:"/teams/{key}/members",summary:"Add an existing user to a team",description:"Directly add an existing user to a team. Team key can be ID or slug. Requires at least one role ID. To invite a new user by email, use the team invites endpoint instead.",tags:["Team Members"]}).input(Fg.strict()).output(qg),update:se.route({method:"PATCH",path:"/teams/{key}/members/{userId}",summary:"Update a team member's roles",description:"Update an existing active team member. Team key can be ID or slug. Replaces role assignments. Cannot modify isOwner (use transfer endpoint instead).",tags:["Team Members"]}).input(Hg.extend({key:yi(),userId:yi()}).strict()).output(qg),remove:se.route({method:"DELETE",path:"/teams/{key}/members/{userId}",summary:"Remove a team member",description:"Remove an active member from a team. Team key can be ID or slug. Cannot remove the team owner (transfer ownership first). To cancel pending invitations, use the team invites endpoint.",tags:["Team Members"]}).input(Bg.strict()).output(qg),transfer:se.route({method:"POST",path:"/teams/{key}/transfer",summary:"Transfer team ownership",description:"Transfer team ownership from the current owner to another active member. Team key can be ID or slug. Only the current owner can perform this action. Previous owner retains owner-equivalent access (typically via `*`) but loses isOwner status.",tags:["Team Members"]}).input(Vg.strict()).output(Zg)};const Jg=bo(["ALL","COUNTRY","STATE","CITY","VENUE"]),Qg=uo({id:yi(),name:yi(),slug:yi(),kind:Jg,parentId:yi().optional(),latitude:zi().optional(),longitude:zi().optional(),radius:zi().optional(),enabled:Yi(),order:zi(),zoom:zi().optional(),heroImage:yi().optional(),description:yi().optional()}),Xg=uo({tenant:uo({id:yi(),name:yi(),slug:yi(),adminTeamId:yi(),legacyTenantsToTeams:go(yi(),yi()).optional(),features:go(yi(),Yi()).optional(),defaultCurrency:yi(),logo:uo({email:uo({src:yi(),width:zi(),height:zi()}),website:uo({src:yi(),width:zi(),height:zi()})}),baseUrl:uo({dev:yi().optional(),production:yi().optional()}),publicBaseUrl:uo({dev:yi().optional(),sandbox:yi().optional(),production:yi().optional()}).optional()}),regions:so(Qg)}),ey=uo({regions:so(Qg)}),ty=uo({teamId:yi().optional()}),ny=uo({counts:uo({teams:Yi(),promoters:Yi(),venues:Yi(),events:Yi(),payouts:Yi()})}),ry=se.route({method:"GET",path:"/tenant/config",summary:"Get tenant configuration",tags:["Tenant"],description:"Returns tenant configuration including features and regions. Requires x-tenant-id header."}).output(Xg),iy=se.route({method:"GET",path:"/tenant/regions",summary:"Get tenant regions",tags:["Tenant"],description:"Returns available regions for the tenant. Requires x-tenant-id header."}).output(ey);var oy={approvals:se.route({method:"GET",path:"/tenant/approvals",summary:"Get tenant approval badges",tags:["Tenant"],description:"Returns lightweight booleans for pending approvals. Requires tenant admin access."}).input(ty).output(ny),config:ry,regions:iy};const ay=uo({id:yi().meta({examples:[Ee.Admission.id],description:"Admission ID reference"}),name:yi().meta({examples:["VIP Access","General Admission","Early Bird"],description:"Admission type name at time of purchase"}),price:uo({base:zi().meta({description:"Base price in smallest currency unit (cents)"}),booking:zi().meta({description:"Booking fee in smallest currency unit (cents)"}),currency:yi().meta({examples:["USD","EUR","GBP"],description:"ISO 4217 currency code"})}).meta({description:"Price snapshot at time of purchase"}),entryStartsAt:ba.meta({description:"Wall clock time when ticket holder can enter (no timezone, displays same everywhere)"}),entryEndsAt:ba.meta({description:"Wall clock time when entry period ends (no timezone, displays same everywhere)"})}).meta({description:"Admission details for this ticket"}),sy=uo({firstName:yi().trim().min(1).meta({examples:[Ee.Customer.firstName],description:"First name of the ticket attendee"}),lastName:yi().trim().min(1).meta({examples:[Ee.Customer.lastName],description:"Last name of the ticket attendee"}),email:$i().meta({examples:[Ee.Customer.email],description:"Email address of the ticket attendee"}),phone:yi().meta({examples:[Ee.Customer.phone],description:"Phone number of the ticket attendee (optional)"}).optional()}).meta({description:"Attendee information for a ticket - can be edited by tenant admins. Defaults to the order customer details when ticket is created."}),dy=uo({id:yi().meta({examples:[Ee.Event.id],description:"Event ID reference"}),name:yi().meta({examples:[Ee.Event.name],description:"The title of the event shown to attendees"}),slug:yi().meta({examples:[Ee.Event.slug],description:"URL-friendly identifier for the event"}),location:Zu.meta({description:"Structured location details for the event"}),entryStartsAt:ba.meta({examples:[Ee.Event.entryStartsAt],description:"Wall clock time when event entry begins (no timezone, displays same everywhere)"}),entryEndsAt:ba.meta({examples:[Ee.Event.entryEndsAt],description:"Wall clock time when event entry ends (no timezone, displays same everywhere)"}),images:uo({mobile:ma.meta({description:"Mobile-optimized image for the event"}),desktop:ma.meta({description:"Desktop-optimized image for the event"})})}).meta({description:"Event details for this ticket"}),cy=uo({id:yi().meta({examples:[Ee.User.id],description:"Unique identifier of the user who performed the ticket scan"}),firstName:yi().meta({examples:[Ee.User.firstName],description:"First name of the user who performed the scan"}),lastName:yi().meta({examples:[Ee.User.lastName],description:"Last name of the user who performed the scan"}),email:$i().meta({examples:[Ee.User.email],description:"Email address of the user who performed the scan"})}).meta({description:"Information about the user who scanned a ticket"}),uy=bo(["CHECK_IN","CHECK_OUT"]),ly=uo({id:yi().meta({examples:[Ee.TicketScan.id],description:"Unique identifier of the ticket scan record"}),scannedAt:Hr().readonly().meta({examples:[Ee.TicketScan.scannedAt],description:"Timestamp when the ticket was scanned in ISO 8601 format"}),scannedById:yi().meta({examples:[Ee.TicketScan.scannedById],description:"Unique identifier of the user who performed the scan"}),scannedBy:cy.meta({description:"Detailed information about the user who performed the scan"}),deviceId:yi().meta({examples:[Ee.TicketScan.deviceId],description:"Unique identifier of the device used for scanning"}),kind:uy.meta({examples:["CHECK_IN"],description:"Type of scan operation: CHECK_IN for entry, CHECK_OUT for exit"})}).meta({description:"Record of a ticket scan operation including when, who, and what type of scan"}),py=uo({id:yi().meta({examples:[Ee.Section.id],description:"Section ID reference"}),name:yi().meta({examples:["Floor Section A","Balcony Left","VIP Lounge"],description:"Section name at time of purchase"}),location:uo({name:yi().meta({description:"Venue or location name"}),address:yi().optional().meta({description:"Street address"}),city:yi().optional().meta({description:"City name"}),state:yi().optional().meta({description:"State or province"}),postcode:yi().optional().meta({description:"Postal/ZIP code"}),country:yi().optional().meta({description:"ISO country code"}),latitude:zi().optional().meta({description:"Geographic latitude coordinate"}),longitude:zi().optional().meta({description:"Geographic longitude coordinate"}),timeZone:yi().optional().meta({examples:["America/New_York","Europe/London"],description:"IANA timezone identifier"})}).meta({description:"Physical location details"})}).meta({description:"Section details for this ticket"}),my=bo(["ACTIVE","REDEEMED","CANCELLED"]),fy=uo({id:yi().readonly().meta({examples:[Ee.Ticket.id],description:"Unique identifier for the ticket"}),createdAt:Hr().readonly().meta({examples:[Ee.Ticket.createdAt],description:"Timestamp when the ticket was created in ISO 8601 format"}),updatedAt:Hr().readonly().meta({examples:[Ee.Ticket.updatedAt],description:"Timestamp when the ticket was last updated in ISO 8601 format"}),scans:so(ly).meta({description:"Array of all scan records for this ticket (check-ins and check-outs)"}),status:my.meta({examples:["ACTIVE"],description:"Current status of the ticket: ACTIVE (can be used), REDEEMED (already used), CANCELLED (invalidated or refunded)"}),attendee:sy.meta({description:"Attendee information for this ticket - editable by tenant admins"}),customerId:ra.meta({examples:[Ee.Ticket.customerId],description:"Unique identifier of the customer who purchased this ticket (read-only)"}),eventId:Ko.meta({examples:[Ee.Ticket.eventId],description:"Unique identifier of the event this ticket grants access to"}),event:dy.meta({description:"Event details for this ticket"}),admissionId:ia.meta({examples:[Ee.Ticket.admissionId],description:"Unique identifier of the admission type/tier this ticket represents"}),admission:ay.meta({description:"Admission details for this ticket"}),section:py.optional().meta({description:"Section details for this ticket (if assigned to a section)"}),orderId:ea.meta({examples:[Ee.Ticket.orderId],description:"Unique identifier of the order this ticket was purchased in"}),orderItemId:yi().meta({examples:[Ee.Ticket.orderItemId],description:"Unique identifier of the specific order item this ticket represents (optional for legacy tickets)"}).optional(),teamId:Ho.meta({examples:[Ee.Ticket.teamId],description:"Identifier of the team that owns this ticket"}),promoterId:na.meta({examples:[Ee.Ticket.promoterId],description:"Unique identifier of the promoter/organizer who created this event"})}).meta({description:"A ticket represents a customer's admission to an event. It tracks the purchase, scanning history, and current status."}),hy=uo({kind:bo(["CHECK_IN","CHECK_OUT"]).meta({description:"The most recent attendee scan action."}),scannedAt:Hr().meta({description:"Timestamp for the most recent attendee scan."})}),vy=uo({key:bo("#ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")).meta({description:"Alpha navigation bucket key for attendee roster jumps."}),count:Lo().int().min(0).meta({description:"Number of roster rows currently available in this bucket."}),anchor:yi().meta({description:"Server-issued bookmark for the first roster row in this bucket under the active filters."})}),gy=ay.pick({id:!0,name:!0,entryEndsAt:!0}),yy=py.pick({id:!0,name:!0}),by=uo({id:ta.meta({examples:[Ee.Ticket.id],description:"Ticket identifier for this attendee roster row."}),orderId:ea.meta({examples:[Ee.Ticket.orderId],description:"Order identifier used to navigate to order details."}),status:my.meta({description:"Current ticket status for the attendee row."}),attendee:sy.meta({description:"Editable attendee identity fields for this ticket."}),admission:gy.meta({description:"Admission snapshot needed for roster labels and expiry state."}),section:yy.optional().meta({description:"Optional section label shown in the roster row."}),lastScan:hy.optional().meta({description:"Most recent scan event for compact roster activity text."}),lastCheckInAt:Hr().optional().meta({description:"Timestamp for the most recent check-in scan, used for checked-in labels."})}),wy=uo({eventId:Ko.meta({examples:[Ee.Event.id],description:"Event identifier for the attendee alpha index."}),admissionIds:so(ia).optional().meta({examples:[[Ee.Admission.id]],description:"Optional admission filters used when computing available attendee buckets."}),sectionIds:so(oa).optional().meta({examples:[[Ee.Section.id]],description:"Optional section filters used when computing available attendee buckets."})}),$y=uo({buckets:so(vy).meta({description:"Available attendee alpha buckets for the active filter set."})}),Iy=Lo().int().min(1).max(100).prefault(100).meta({examples:[100],description:"Maximum number of attendee roster rows to return per request (1-100, default: 100)."}),ky=uo({eventId:Ko.meta({examples:[Ee.Event.id],description:"Event identifier for the attendee roster."}),admissionIds:so(ia).optional().meta({examples:[[Ee.Admission.id]],description:"Optional admission filters. When provided, only matching ticket admissions are included."}),sectionIds:so(oa).optional().meta({examples:[[Ee.Section.id]],description:"Optional section filters. When provided, only matching ticket sections are included."}),query:yi().optional().meta({examples:["John","john@example.com","+61400000000"],description:"Optional attendee search query. Matches attendee name, email, and phone."}),cursor:$a.optional(),before:$a.optional().meta({description:"Cursor for loading roster rows before the current window. Mutually exclusive with cursor and anchor."}),anchor:yi().optional().meta({description:"Server-issued bookmark used to jump to a roster bucket. Mutually exclusive with cursor and before."}),limit:Iy.optional()}),Ey=Wa(by,"tickets"),xy=fy.pick({status:!0,admissionId:!0,orderItemId:!0}).extend({orderId:yi().meta({examples:[Ee.Order.id],description:"The order this ticket belongs to"}),customerId:yi().meta({examples:[Ee.Customer.id],description:"The customer who purchased this ticket"}),attendee:sy.optional().meta({description:"Optional attendee information - defaults to order customer details if not provided"})}).meta({description:"Schema for creating a new ticket - caller provides minimal input; derived fields are populated by the service"}),Ay=fy.pick({id:!0}).extend({signature:ja.optional().meta({description:"HMAC signature for public ticket access (16 characters, base64url encoded)"})}).meta({description:"Schema for retrieving a specific ticket by ID with optional signature validation"}),Ty=uo({promoterId:yi().optional().meta({examples:[Ee.Promoter.id],description:"Filter tickets by promoter/organizer unique identifier (optional)"}),eventId:yi().optional().meta({examples:[Ee.Event.id],description:"Filter tickets by event unique identifier (optional)"}),customerId:yi().optional().meta({examples:[Ee.Customer.id],description:"Filter tickets by customer unique identifier (optional)"}),orderId:yi().optional().meta({examples:[Ee.Order.id],description:"Filter tickets by order unique identifier (optional)"}),status:my.optional().meta({examples:["ACTIVE"],description:"Filter tickets by status: ACTIVE (can be used), REDEEMED (already used), CANCELLED (invalidated or refunded)"}),orderSignature:ja.optional().meta({description:"Order signature used to access tickets for a specific order without permissions (16 characters, base64url encoded)"}),query:yi().optional().meta({examples:["John Doe"],description:"Optional search query to filter tickets by customer details. When provided, search-backed pagination is used."}),limit:wa("tickets").optional(),cursor:yi().optional().meta({examples:["eyJpZCI6InRrdF8wMWpwczVjZ3NnMHMzMncycHI3M3ZiY2NkZSJ9"],description:"Pagination cursor for continuing to fetch subsequent results (optional)"})}).meta({description:"Schema for listing tickets with optional filtering, search, and cursor-based pagination"}),Oy=Wa(fy,"tickets"),_y=uo({ticket:fy}),Dy=fy.pick({id:!0,eventId:!0}).extend({key:fy.shape.id.meta({description:"Transition key. Supports canonical ticket IDs (tkt_*), order IDs (ord_*), and legacy Neon ticket IDs."}),deviceId:fy.shape.scans.element.shape.deviceId.optional().meta({description:"Unique identifier of the scanning device (optional)."}),eventId:fy.shape.eventId.optional().meta({description:"Optional event scope guard for check-in transitions. When provided, check-in fails if the ticket/order event does not match."}),allowPartialOrderCheckIn:Yi().optional().meta({description:"Confirms an order-level check-in when some tickets are already redeemed and some remain active."}),admissionIds:so(ia).optional().meta({description:"Optional scanner admission filters. When provided, check-in only applies to matching ticket admissions."}),sectionIds:so(oa).optional().meta({description:"Optional scanner section filters. When provided, check-in only applies to matching ticket sections."}),idempotencyKey:yi().trim().min(1).max(255).optional().meta({description:"Stable client-generated key used to replay a scan request without turning a timed-out success into a duplicate denial."})}).omit({id:!0}).meta({description:"Schema for check-in/check-out transitions addressed by key, where key may resolve to a ticket, order, or legacy ticket identifier."}),Sy=bo(["ticket","order","legacy"]),My=bo(["NOOP_TRANSITION"]),Py=bo(["PARTIAL_ORDER_CONFIRMATION_REQUIRED"]),Cy=bo(["EVENT_MISMATCH"]),jy=bo(["FILTERED_OUT"]),Ny=uo({id:fy.shape.orderId,checkedInCount:zi().int().nonnegative().optional(),items:so(uo({quantity:zi().int().positive()}))}),Ry=dy.pick({id:!0,name:!0,slug:!0,entryStartsAt:!0}).extend({teamId:fy.shape.teamId}),Uy=po([uo({reason:My,kind:bo(["CHECK_IN","CHECK_OUT"]),targetType:Sy,order:Ny.optional(),ticket:fy.optional()}),uo({reason:Cy,kind:bo(["CHECK_IN","CHECK_OUT"]),targetType:Sy,requestedEventId:fy.shape.eventId.optional(),event:Ry,order:Ny.optional(),ticket:fy.optional()}),uo({reason:Py,kind:$o("CHECK_IN"),targetType:$o("order"),order:Ny,ticket:fy.optional()}),uo({reason:jy,kind:$o("CHECK_IN"),targetType:Sy,order:Ny.optional(),ticket:fy.optional()})]),Ly=uo({tickets:so(fy).meta({description:"Transition result tickets. Single-item array for ticket/legacy targets and full order tickets for order targets."}),targetType:Sy.meta({description:"Resolved target scope from the provided key."}),order:Ny.optional()}),qy=bo(["ACTIVE","CANCELLED"]).describe("Status updates allowed via PATCH: ACTIVE (reactivate), CANCELLED (void). REDEEMED is set via scan endpoint."),Gy=uo({id:yi().meta({examples:[Ee.Ticket.id],description:"Unique identifier of the ticket to update"}),status:qy.optional().meta({description:"Update ticket status: CANCELLED to void, ACTIVE to reactivate"}),attendee:sy.partial().nullable().optional().meta({description:"Attendee info. Pass object to set/update, null to clear, or omit to leave unchanged."}),admissionId:yi().optional().meta({examples:[Ee.Admission.id],description:"Change ticket type/admission (admission and section objects will be fetched from event and stored)"})}).meta({description:"Schema for updating a ticket."}),zy=se.route({method:"GET",path:"/tickets/{id}",summary:"Get ticket by ID",tags:["Tickets"]}).input(Ay.strict()).output(_y),Fy=se.route({method:"POST",path:"/tickets",summary:"Create a new ticket",tags:["Tickets"]}).input(xy.strict()).output(_y),By=se.route({method:"PUT",path:"/tickets/{id}",summary:"Update a ticket",tags:["Tickets"]}).input(Gy.strict()).output(_y);var Wy={get:zy,list:se.route({method:"GET",path:"/tickets",summary:"List tickets with cursor-based pagination",description:"Returns ticket data with cursor-based pagination, optional full-text search via `query`, and a fixed attendee-name ascending order for non-search list paths.",tags:["Tickets"]}).input(Ty.strict()).output(Oy),attendees:{list:se.route({method:"GET",path:"/tickets/attendees",summary:"List event attendees with alpha-navigation support",description:"Returns ticket-backed attendee roster rows for an event. Supports bounded browsing, alpha jump bookmarks, and attendee search.",tags:["Tickets"]}).input(ky.strict()).output(Ey),index:se.route({method:"GET",path:"/tickets/attendees/index",summary:"Get attendee alpha-navigation buckets",description:"Returns available alpha buckets and server-issued bookmarks for the ticket attendee roster.",tags:["Tickets"]}).input(wy.strict()).output($y)},create:Fy,update:By,checkInByKey:se.route({method:"PUT",path:"/tickets/{key}/check-in",summary:"Check in tickets by key",tags:["Tickets"]}).input(Dy.strict()).errors({BAD_REQUEST:{status:400,data:Uy.optional()}}).output(Ly),checkOutByKey:se.route({method:"PUT",path:"/tickets/{key}/check-out",summary:"Check out tickets by key",tags:["Tickets"]}).input(Dy.strict()).errors({BAD_REQUEST:{status:400,data:Uy.optional()}}).output(Ly)};const Yy={id:Ee.User.id,createdAt:Ee.User.createdAt,updatedAt:Ee.User.updatedAt,email:Ee.User.email,firstName:Ee.User.firstName,lastName:Ee.User.lastName,imageUrl:"https://assets.session.services/examples/avatar.jpg",tenantId:Ee.User.tenantId},Vy=uo({id:yi().readonly().meta({description:"Unique identifier for the user",examples:[Ee.User.id]}),createdAt:Hr().readonly().meta({description:"ISO 8601 timestamp when the user account was created",examples:[Ee.User.createdAt]}),updatedAt:Hr().readonly().meta({description:"ISO 8601 timestamp when the user account was last updated",examples:[Ee.User.updatedAt]}),email:$i().meta({description:"User's email address, used for authentication and communication",examples:[Ee.User.email]}),firstName:yi().min(1).meta({description:"User's first name",examples:[Ee.User.firstName]}),lastName:yi().min(1).meta({description:"User's last name",examples:[Ee.User.lastName]}),imageUrl:xi().optional().meta({description:"Optional URL to the user's profile image or avatar",examples:["https://assets.session.services/examples/avatar.jpg"]}),metadata:go(yi(),ga).optional().meta({description:"Arbitrary key-value metadata for storing user preferences and settings",examples:[{"widgets:team_abc123":{visibleWidgets:["revenue"]}}]})}).meta({ref:"User",description:"User entity containing profile and audit information scoped to a specific tenant",examples:[Yy]}),Zy=Lg.meta({ref:"MeTeamMember",description:"Team membership for the current user with denormalized user details and role-expanded team permissions."}),Hy=uo({access:yi().meta({description:"JWT access token with updated user data"}),refresh:yi().meta({description:"Refresh token for obtaining new access tokens"})}).meta({ref:"Tokens",description:"Authentication tokens for client session management"}),Ky=uo({user:Vy.meta({description:"The updated user profile"}),tokens:Hy.optional().meta({description:"New JWT tokens with updated user data. Present when refresh token was provided in request."})}).meta({ref:"UserUpdateResponse",description:"Response payload for PATCH /users/me containing the updated user profile."}),Jy=uo({deleted:$o(!0).meta({description:"Whether the current user account was deleted."})}).meta({ref:"UserDeleteResponse",description:"Response payload for DELETE /users/me after deleting the current account."}),Qy=uo({user:Vy.nullable().meta({description:"Current authenticated user profile, null if not authenticated"}),isAdmin:Yi().meta({description:"Whether the current user has admin privileges for the tenant"}),members:so(Zy).meta({description:"All team memberships for the current user within this tenant."})}).meta({ref:"MeResponse",description:"Response payload for GET /users/me providing the current user, tenant admin status, and team memberships.",examples:[{user:{id:"usr_01k5hbpkfje048zccqmqfhjpep",createdAt:"2025-09-19T16:07:46.418Z",updatedAt:"2025-09-19T16:07:46.418Z",email:"j@1f.io",firstName:"Jay",lastName:"McMullen",imageUrl:"https://assets.session.services/examples/avatar.jpg"},isAdmin:!0,members:[{id:"mbr_01jps5cgsec5ge0b1bxa6gzkkk",createdAt:"2025-09-25T03:25:46.080Z",updatedAt:"2025-09-25T03:25:46.080Z",teamId:"tem_01jqpjksnsen9vprw95et60t2m",userId:"usr_01k5hbpkfje048zccqmqfhjpep",user:{id:"usr_01k5hbpkfje048zccqmqfhjpep",email:"j@1f.io",firstName:"Jay",lastName:"McMullen",imageUrl:"https://assets.session.services/examples/avatar.jpg"},permissions:["*"],isOwner:!0,tenantId:"tnt_01abc123"}]}]}),Xy=se.route({method:"GET",path:"/users/me",summary:"Get the current user and their team memberships",tags:["Users"]}).output(Qy),eb=uo({firstName:yi().min(1).optional(),lastName:yi().min(1).optional(),imageUrl:xi().nullable().optional(),metadata:go(yi(),ga).optional(),refreshToken:yi().optional().meta({description:"Current refresh token. When provided, new tokens with updated user data will be returned."})}).meta({ref:"UpdateUserInput",description:"Input for updating the current user's profile"}),tb=se.route({method:"PATCH",path:"/users/me",summary:"Update the current user's profile",tags:["Users"]}).input(eb).output(Ky);var nb={me:Xy,remove:se.route({method:"DELETE",path:"/users/me",summary:"Delete the current user's account",tags:["Users"]}).output(Jy),update:tb};const rb=uo({id:yi().readonly().meta({description:"Unique identifier for the venue"}),createdAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the venue was created"}),updatedAt:Hr().readonly().meta({description:"Timestamp in ISO 8601 format when the venue was last updated"}),teamId:yi().meta({description:"Team that manages this venue"}),locationId:Qo.meta({examples:["loc_01h2xk3j9k8m2n5p7q9r1s3t4v"],description:"Location identifier for this venue"}),googlePlaceId:yi().optional().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID when this venue is linked to a Google Places location"}),approval:Go.meta({examples:["APPROVED"],description:"Approval status of the venue"}),name:yi().min(3).max(100).meta({description:"Display name of the venue. Must be between 3 and 100 characters"}),slug:yi().min(3).meta({description:"URL-friendly slug for the venue. Must be unique within tenant"}),description:yi().max(500).optional().meta({description:"Short description of the venue for listings and discovery"}),image:ma.optional().meta({description:"Venue image"}),contact:uo({email:$i().optional().meta({description:"Public contact email for venue inquiries"}),phone:yi().optional().meta({description:"Public contact phone number"}),website:xi().optional().meta({description:"Venue website URL"}),instagram:yi().optional().meta({description:"Instagram profile URL"}),facebook:yi().optional().meta({description:"Facebook page URL"}),twitter:yi().optional().meta({description:"Twitter/X profile URL"}),tiktok:yi().optional().meta({description:"TikTok profile URL"}),youtube:yi().optional().meta({description:"YouTube channel URL"})}).optional().meta({description:"Public contact information and social media links"}),location:Zu.omit({venueId:!0}).meta({description:"Physical location details including address, coordinates, and timezone"}),geohash:yi().meta({description:"Geohash encoding of the venue's location for efficient spatial queries"}),capacity:zi().int().min(1).optional().meta({description:"Maximum capacity of the venue (number of attendees)"}),metadata:ya,deletedAt:Hr().readonly().optional().meta({description:"Timestamp in ISO 8601 format when the venue was soft-deleted. Null if not deleted"}),tenantId:yi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Managed venue with custom branding and details. Teams can claim venues which then appear in location search results."}),ib=rb.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,geohash:!0,deletedAt:!0,location:!0,googlePlaceId:!0,approval:!0}).extend({slug:yi().min(3).optional().meta({description:"URL-friendly slug for the venue. If not provided, will be automatically generated from the name. Must be unique within tenant"})}).meta({description:"Schema for creating a new venue. The system automatically derives location details and Google Place ID from the locationId"}),ob=uo({key:yi().min(1).meta({description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug",examples:[Ee.Venue.id,Ee.Venue.slug]})}),ab=uo({key:yi().meta({examples:[Ee.Venue.id,Ee.Venue.slug],description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug"})}),sb=bo(["createdAt"]),db=bo(["asc","desc"]),cb=uo({teamId:yi().optional().meta({description:"Filter venues by owner team ID"}),approval:Go.optional().meta({description:"Filter venues by approval status. PENDING: awaiting review, APPROVED: can be used for events, REJECTED: cannot be used"}),query:yi().optional().meta({description:"Optional search query for filtering venues by name or slug"}),latitude:Lo().min(-90).max(90).optional().meta({description:"Latitude for location-based search. Must be used with longitude"}),longitude:Lo().min(-180).max(180).optional().meta({description:"Longitude for location-based search. Must be used with latitude"}),radius:Lo().min(1).max(2e4).optional().meta({description:"Search radius in kilometers (1-20000). Requires latitude and longitude"}),sort:sb.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest venues first."}),direction:db.optional().meta({examples:["desc"],description:"Sort direction for venue lists. Defaults to `desc` when `sort` is provided."}),limit:wa("venues"),cursor:yi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing venues with pagination, filtering, and location-based search"}),ub=Wa(rb,"venues").meta({description:"Paginated response containing venues with cursor for next page"}),lb=uo({venue:rb}),pb=rb.omit({id:!0,tenantId:!0,teamId:!0,createdAt:!0,updatedAt:!0,deletedAt:!0,geohash:!0}).partial().extend({key:yi().meta({examples:[Ee.Venue.id,Ee.Venue.slug],description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug"}),description:yi().max(500).nullable().optional().meta({description:"Short description of the venue. Pass null to clear, omit to leave unchanged."}),image:ma.nullable().optional().meta({description:"Venue image. Pass null to clear, omit to leave unchanged."}),capacity:zi().int().min(1).nullable().optional().meta({description:"Maximum capacity. Pass null to clear, omit to leave unchanged."}),contact:uo({email:$i().optional(),phone:yi().optional(),website:xi().optional(),instagram:yi().optional(),facebook:yi().optional(),twitter:yi().optional(),tiktok:yi().optional(),youtube:yi().optional()}).nullable().optional().meta({description:"Contact information. Pass null to clear all contact fields, omit to leave unchanged."}),googlePlaceId:yi().nullable().optional().meta({description:"Google Place ID. Pass null to unlink from Google Places, omit to leave unchanged."})}).meta({description:"Schema for updating an existing venue. Cannot change teamId (owner). Pass null to clear optional fields."}),mb=function(e){return se.errors(Vo).router(e)}({analytics:su,beneficiary:lu,section:pg,event:Vl,eventCollaborator:rp,admission:ou,order:Nh,ticket:Wy,internal:up,location:vp,coupon:Lu,payout:yv,teams:Vv,permissionScope:Dv,promoter:dg,team:Ug,teamInvite:Gg,teamPayment:zg,teamMember:Kg,tenant:oy,venue:{get:se.route({method:"GET",path:"/venues/{key}",summary:"Get venue by ID or slug",description:"Retrieve a venue using its unique ID or slug",tags:["Venues"]}).input(ab.strict()).output(lb),list:se.route({method:"GET",path:"/venues",summary:"List venues with cursor-based pagination",description:"Returns venues with cursor pagination. Supports filtering by team, location-based search, and text query",tags:["Venues"]}).input(cb.strict()).output(ub),create:se.route({method:"POST",path:"/venues",summary:"Create a new venue",description:"Create a new venue. Venue will be owned by the specified team but can be used by all teams for their events",tags:["Venues"]}).input(ib.strict()).output(lb),update:se.route({method:"PATCH",path:"/venues/{key}",summary:"Update a venue",description:"Update an existing venue. Cannot change venue ownership (teamId)",tags:["Venues"]}).input(pb.strict()).output(lb),remove:se.route({method:"DELETE",path:"/venues/{key}",summary:"Delete a venue",description:"Soft delete a venue",tags:["Venues"]}).input(ob.strict()).output(lb),linkLocation:se.route({method:"POST",path:"/venues/{key}/locations",summary:"Link location to venue",description:"Link a location to this venue. Allows the venue to be discovered when users search for this location. A venue can have multiple linked locations (e.g., different addresses, branded names). Requires venue access on the owning team (for example, `venue.write`).",tags:["Venues"]}).input(ab.extend({locationKey:yi().meta({description:"Location ID (loc_xxx) or Google Place ID to link to this venue",examples:["loc_01jps5cgsm7qxvh6watsons0eq","ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}).strict()).output(lb),unlinkLocation:se.route({method:"DELETE",path:"/venues/{key}/locations/{locationKey}",summary:"Unlink location from venue",description:"Remove a location link from this venue. The location will no longer show this venue's branding. Requires venue access on the owning team (for example, `venue.write`).",tags:["Venues"]}).input(ab.extend({locationKey:yi().meta({description:"Location ID (loc_xxx) or Google Place ID to unlink from this venue",examples:["loc_01jps5cgsm7qxvh6watsons0eq","ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}).strict()).output(lb)},user:nb}),fb=bo(["ORDER","EVENT"]).meta({description:"Aggregate type this notification belongs to"}),hb=bo(["ORDER_CONFIRMATION","REFUND_CONFIRMATION","ORDER_REMINDER","ORDER_CANCELLATION","ORDER_TIME_CHANGE","ORDER_VENUE_CHANGE","ORDER_TIME_AND_VENUE_CHANGE","ORDER_LOCATION_REVEAL","EVENT_APPROVAL_REQUEST","EVENT_APPROVAL_DECISION"]).meta({description:"Notification kind"}),vb=bo(["SMS","EMAIL"]).meta({description:"Delivery channel"}),gb=bo(["PENDING","PROCESSING","SENT","DELIVERED","FAILED","CANCELLED"]).meta({description:"Current notification status"});function yb(e,t={}){return m({name:"parse_standard_body",signal:t.signal},(async()=>{let n=e.headers.get("content-disposition");if("string"==typeof n){let t=function(e){let t=e.match(/filename\*=(UTF-8'')?([^;]*)/i);if(t&&"string"==typeof t[2])return function(e){try{return decodeURIComponent(e)}catch{return e}}(t[2]);let n=e.match(/filename="((?:\\"|[^"])*)"/i);return n&&"string"==typeof n[1]?n[1].replace(/\\"/g,'"'):void 0}(n)??"blob",r=await e.blob();return new File([r],t,{type:r.type})}let r=e.headers.get("content-type");if(!r||r.startsWith("application/json"))return w(await e.text());if(r.startsWith("multipart/form-data"))return await e.formData();if(r.startsWith("application/x-www-form-urlencoded")){let t=await e.text();return new URLSearchParams(t)}if(r.startsWith("text/event-stream"))return function(e,t={}){let n,r=(e?.pipeThrough(new TextDecoderStream).pipeThrough(new G))?.getReader(),i=!1;return new g((async()=>{n??=l("consume_event_iterator_stream");try{for(;;){if(void 0===r)return{done:!0,value:void 0};let{done:e,value:t}=await f(n,(()=>r.read()));if(e){if(i)throw new d("Stream was cancelled");return{done:!0,value:void 0}}switch(t.event){case"message":{let e=w(t.data);return k(e)&&(e=V(e,t)),n?.addEvent("message"),{done:!1,value:e}}case"error":{let e=new U({data:w(t.data)});throw e=V(e,t),n?.addEvent("error"),e}case"done":{let e=w(t.data);return k(e)&&(e=V(e,t)),n?.addEvent("done"),{done:!0,value:e}}default:n?.addEvent("maybe_keepalive")}}}catch(e){throw e instanceof U||p(n,e,t),e}}),(async e=>{try{"next"!==e&&(i=!0,n?.addEvent("cancelled")),await f(n,(()=>r?.cancel()))}catch(e){throw p(n,e,t),e}finally{n?.end()}}))}(e.body,t);if(r.startsWith("text/plain"))return await e.text();let i=await e.blob();return new File([i],"blob",{type:i.type})}))}function bb(e,t={}){return e.forEach(((e,n)=>{Array.isArray(t[n])?t[n].push(e):t[n]=void 0===t[n]?e:[t[n],e]})),t}function wb(e,t={}){let n=function(e,t=new Headers){for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,e);else void 0!==r&&t.append(n,r);return t}(e.headers),r=function(e,t,n={}){if(e instanceof ReadableStream)return e;let r=t.get("content-disposition");return t.delete("content-type"),t.delete("content-disposition"),void 0!==e?e instanceof Blob?(t.set("content-type",e.type),t.set("content-length",""+e.size),t.set("content-disposition",r??function(e,t="inline"){return`${t}; filename="${e.replace(/[^\x20-\x7E]/g,"_").replace(/"/g,'\\"')}"; filename*=utf-8''${encodeURIComponent(e).replace(/['()*]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())).replace(/%(7C|60|5E)/g,((e,t)=>String.fromCharCode(Number.parseInt(t,16))))}`}(e instanceof File?e.name:"blob")),e):e instanceof FormData||e instanceof URLSearchParams?e:h(e)?(t.set("content-type","text/event-stream"),function(e,t={}){let n,r,i=t.eventIteratorKeepAliveEnabled??!0,o=t.eventIteratorKeepAliveInterval??5e3,a=t.eventIteratorKeepAliveComment??"",s=t.eventIteratorInitialCommentEnabled??!0,d=t.eventIteratorInitialComment??"",c=!1;return new ReadableStream({start(e){r=l("stream_event_iterator"),s&&e.enqueue(W({comments:[d]}))},async pull(t){try{i&&(n=setInterval((()=>{t.enqueue(W({comments:[a]})),r?.addEvent("keepalive")}),o));let s=await f(r,(()=>e.next()));if(clearInterval(n),c)return;let d=Z(s.value);if(!s.done||void 0!==s.value||void 0!==d){let e=s.done?"done":"message";t.enqueue(W({...d,event:e,data:$(s.value)})),r?.addEvent(e)}s.done&&(t.close(),r?.end())}catch(e){if(clearInterval(n),c)return;e instanceof U?(t.enqueue(W({...Z(e),event:"error",data:$(e.data)})),r?.addEvent("error"),t.close()):(p(r,e),t.error(e)),r?.end()}},async cancel(){try{c=!0,clearInterval(n),r?.addEvent("cancelled"),await f(r,(()=>e.return?.()))}catch(e){throw p(r,e),e}finally{r?.end()}}}).pipeThrough(new TextEncoderStream)}(e,n)):(t.set("content-type","application/json"),$(e)):void 0}(e.body,n,t);return new Request(e.url,{signal:e.signal,method:e.method,headers:n,body:r})}uo({id:pa.meta({examples:[Ee.Notification.id],description:"Unique notification identifier"}),createdAt:Hr().readonly().meta({examples:[Ee.Notification.createdAt],description:"Timestamp when notification was created"}),updatedAt:Hr().readonly().meta({examples:[Ee.Notification.updatedAt],description:"Timestamp when notification was last updated"}),aggregateType:fb.meta({examples:[Ee.Notification.aggregateType]}),aggregateId:po([ea,Ko]).meta({examples:[Ee.Notification.aggregateId],description:"Aggregate identifier (order ID for ORDER notifications, event ID for EVENT notifications)"}),eventId:Ko.optional().meta({examples:[Ee.Notification.eventId],description:"Associated event identifier when applicable"}),kind:hb.meta({examples:[Ee.Notification.kind]}),channel:vb.meta({examples:[Ee.Notification.channel]}),status:gb.meta({examples:[Ee.Notification.status]}),providerMessageId:yi().optional().meta({examples:[Ee.Notification.providerMessageId],description:"Provider message identifier"}),sentAt:Hr().optional().meta({examples:[Ee.Notification.sentAt],description:"Timestamp when provider accepted send request"}),deliveredAt:Hr().optional().meta({examples:[Ee.Notification.deliveredAt],description:"Timestamp when provider confirmed delivery"}),failedAt:Hr().optional().meta({examples:[Ee.Notification.failedAt],description:"Timestamp when notification failed"}),failureCode:yi().optional().meta({examples:[Ee.Notification.failureCode],description:"Failure code when notification is FAILED"}),failureReason:yi().optional().meta({examples:[Ee.Notification.failureReason],description:"Failure reason when notification is FAILED"})}).meta({description:"Notification delivery record"}),uo({id:sa.meta({description:"Team member ID to delete"})});var $b=class{plugins;constructor(e=[]){this.plugins=[...e].sort(((e,t)=>(e.order??0)-(t.order??0)))}init(e){for(let t of this.plugins)t.init?.(e)}},Ib=class{constructor(e,t,n={}){this.codec=e,this.sender=t,new $b(n.plugins).init(n),this.interceptors=a(n.interceptors),this.clientInterceptors=a(n.clientInterceptors)}interceptors;clientInterceptors;call(e,t,n){return m({name:`${s}.${e.join("/")}`,signal:n.signal},(r=>(r?.setAttribute("rpc.system",s),r?.setAttribute("rpc.method",e.join(".")),h(t)&&(t=y({name:"consume_event_iterator_input",signal:n.signal},t)),b(this.interceptors,{...n,path:e,input:t},(async({path:e,input:t,...n})=>{let i,o=u(),a=o?.trace.getActiveSpan()??r;a&&o&&(i=o?.trace.setSpan(o.context.active(),a));let s=await m({name:"encode_request",context:i},(()=>this.codec.encode(e,t,n))),d=await b(this.clientInterceptors,{...n,input:t,path:e,request:s},(({input:e,path:t,request:n,...r})=>m({name:"send_request",signal:r.signal,context:i},(()=>this.sender.call(n,r,t,e))))),c=await m({name:"decode_response",context:i},(()=>this.codec.decode(d,n,e,t)));return h(c)?y({name:"consume_event_iterator_output",signal:n.signal},c):c})))))}};function kb(e){return"/"+e.map(encodeURIComponent).join("/")}var Eb=class extends $b{initRuntimeAdapter(e){for(let t of this.plugins)t.initRuntimeAdapter?.(e)}},xb=class{fetch;toFetchRequestOptions;adapterInterceptors;constructor(e){new Eb(e.plugins).initRuntimeAdapter(e),this.fetch=e.fetch??globalThis.fetch.bind(globalThis),this.toFetchRequestOptions=e,this.adapterInterceptors=a(e.adapterInterceptors)}async call(e,t,n,r){let i=wb(e,this.toFetchRequestOptions);return function(e,t={}){return{body:c((()=>yb(e,t))),status:e.status,get headers(){let t=bb(e.headers);return Object.defineProperty(this,"headers",{value:t,writable:!0}),t},set headers(e){Object.defineProperty(this,"headers",{value:e,writable:!0})}}}(await b(this.adapterInterceptors,{...t,request:i,path:n,input:r,init:{redirect:"manual"}},(({request:e,path:t,input:n,init:r,...i})=>this.fetch(e,r,i,t,n))),{signal:i.signal})}},Ab=class{maxArrayIndex;constructor(e={}){this.maxArrayIndex=e.maxBracketNotationArrayIndex??9999}serialize(e,t=[],n=[]){if(Array.isArray(e))e.forEach(((e,r)=>{this.serialize(e,[...t,r],n)}));else if(I(e))for(let r in e)this.serialize(e[r],[...t,r],n);else n.push([this.stringifyPath(t),e]);return n}deserialize(e){if(0===e.length)return{};let t=new WeakSet,n={value:[]};for(let[r,i]of e){let e=this.parsePath(r),o=n,a="value";e.forEach(((n,r)=>{!Array.isArray(o[a])&&!I(o[a])&&(o[a]=[]),r===e.length-1?Array.isArray(o[a])&&(""===n?o[a].length&&!t.has(o[a])&&(o[a]=Ob(o[a])):t.has(o[a])?(t.delete(o[a]),o[a]=_b(o[a])):Tb(n,this.maxArrayIndex)||(o[a]=Ob(o[a]))):Array.isArray(o[a])&&!Tb(n,this.maxArrayIndex)&&(t.has(o[a])?(t.delete(o[a]),o[a]=_b(o[a])):o[a]=Ob(o[a])),o=o[a],a=n})),Array.isArray(o)&&""===a?(t.add(o),o.push(i)):a in o?Array.isArray(o[a])?o[a].push(i):o[a]=[o[a],i]:o[a]=i}return n.value}stringifyPath(e){return e.map((e=>(""+e).replace(/[\\[\]]/g,(e=>{switch(e){case"\\":return"\\\\";case"[":return"\\[";case"]":return"\\]";default:return e}})))).reduce(((e,t,n)=>0===n?t:`${e}[${t}]`),"")}parsePath(e){let t=[],n=!1,r="",i=0;for(let o=0;o<e.length;o++){let a=e[o],s=e[o+1];!n||"]"!==a||void 0!==s&&"["!==s||i%2!=0?0===t.length&&"["===a&&i%2==0?(n=!0,t.push(r),r=""):"\\"===a?i++:(r+="\\".repeat(i/2)+a,i=0):(void 0===s&&(n=!1),t.push(r),r="",o++)}return n||0===t.length?[e]:t}};function Tb(e,t){return/^0$|^[1-9]\d*$/.test(e)&&Number(e)<=t}function Ob(e){let t=new x;return e.forEach(((e,n)=>{t[n]=e})),t}function _b(e){let t=new x;return t[""]=1===e.length?e[0]:e,t}var Db=class{customSerializers;constructor(e={}){this.customSerializers=e.customJsonSerializers??[]}serialize(e,t={value:!1}){for(let n of this.customSerializers)if(n.condition(e))return this.serialize(n.serialize(e),t);if(e instanceof Blob)return t.value=!0,[e,t.value];if(e instanceof Set)return this.serialize(Array.from(e),t);if(e instanceof Map)return this.serialize(Array.from(e.entries()),t);if(Array.isArray(e))return[e.map((e=>void 0===e?null:this.serialize(e,t)[0])),t.value];if(I(e)){let n={};for(let r in e)"toJSON"===r&&"function"==typeof e[r]||(n[r]=this.serialize(e[r],t)[0]);return[n,t.value]}return"bigint"==typeof e||e instanceof RegExp||e instanceof URL?[""+e,t.value]:e instanceof Date?[Number.isNaN(e.getTime())?null:e.toISOString(),t.value]:Number.isNaN(e)?[null,t.value]:[e,t.value]}};function Sb(e){return"/"+e.replace(/\/{2,}/g,"/").replace(/^\/|\/$/g,"")}function Mb(e){return e?Sb(e).match(/\/\{[^}]+\}/g)?.map((e=>({raw:e,name:e.match(/\{\+?([^}]+)\}/)[1]}))):void 0}var Pb=class{constructor(e,t,n){this.contract=e,this.serializer=t,this.baseUrl=n.url,this.headers=n.headers??{},this.customErrorResponseBodyDecoder=n.customErrorResponseBodyDecoder}baseUrl;headers;customErrorResponseBodyDecoder;async encode(e,t,n){let r=function(e){return"function"==typeof e.forEach?bb(e):e}(await A(this.headers,n,e,t));void 0!==n.lastEventId&&(r=H(r,{"last-event-id":n.lastEventId}));let i=await A(this.baseUrl,n,e,t),o=E(this.contract,e);if(!ee(o))throw Error("[StandardOpenapiLinkCodec] expect a contract procedure at "+e.join("."));return"compact"===ce("defaultInputStructure",o["~orpc"].route.inputStructure)?this.#e(o,e,t,n,i,r):this.#t(o,e,t,n,i,r)}#e(e,t,n,r,i,o){let a=Sb(e["~orpc"].route.path??kb(t)),s=n,d=Mb(a);if(d?.length){if(!I(n))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "compact" structure when has dynamic params at ${t.join(".")}.`);let e={...n};for(let t of d)a=a.replace(t.raw,"/"+encodeURIComponent(""+this.serializer.serialize(n[t.name]))),delete e[t.name];s=Object.keys(e).length?e:void 0}let c=ce("defaultMethod",e["~orpc"].route.method),u=new URL(i);if(u.pathname=`${u.pathname.replace(/\/$/,"")}${a}`,"GET"===c){let e=this.serializer.serialize(s,{outputFormat:"URLSearchParams"});for(let[t,n]of e)u.searchParams.append(t,n);return{url:u,method:c,headers:o,body:void 0,signal:r.signal}}return{url:u,method:c,headers:o,body:this.serializer.serialize(s),signal:r.signal}}#t(e,t,n,r,i,o){let a=Sb(e["~orpc"].route.path??kb(t)),s=Mb(a);if(!I(n)&&void 0!==n)throw TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "detailed" structure at ${t.join(".")}.`);if(s?.length){if(!I(n?.params))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input.params shape for "detailed" structure when has dynamic params at ${t.join(".")}.`);for(let e of s)a=a.replace(e.raw,"/"+encodeURIComponent(""+this.serializer.serialize(n.params[e.name])))}let d=o;if(void 0!==n?.headers){if(!I(n.headers))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input.headers shape for "detailed" structure at ${t.join(".")}.`);d=H(n.headers,o)}let c=ce("defaultMethod",e["~orpc"].route.method),u=new URL(i);if(u.pathname=`${u.pathname.replace(/\/$/,"")}${a}`,void 0!==n?.query){let e=this.serializer.serialize(n.query,{outputFormat:"URLSearchParams"});for(let[t,n]of e)u.searchParams.append(t,n)}return"GET"===c?{url:u,method:c,headers:d,body:void 0,signal:r.signal}:{url:u,method:c,headers:d,body:this.serializer.serialize(n?.body),signal:r.signal}}async decode(e,t,n){let r=!P(e.status),i=await(async()=>{let t=!1;try{let n=await e.body();return t=!0,this.serializer.deserialize(n)}catch(e){throw Error(t?"Invalid OpenAPI response format.":"Cannot parse response body, please check the response body and content-type.",{cause:e})}})();if(!r)throw this.customErrorResponseBodyDecoder?.(i,e)??(C(i)?j(i):new S(function(e){return Object.entries(_).find((([,t])=>t.status===e))?.[0]??"MALFORMED_ORPC_ERROR_RESPONSE"}(e.status),{status:e.status,data:{...e,body:i}}));let o=E(this.contract,n);if(!ee(o))throw Error("[StandardOpenapiLinkCodec] expect a contract procedure at "+n.join("."));return"compact"===ce("defaultOutputStructure",o["~orpc"].route.outputStructure)?i:{status:e.status,headers:e.headers,body:i}}},Cb=class{constructor(e,t){this.jsonSerializer=e,this.bracketNotation=t}serialize(e,t={}){return h(e)&&!t.outputFormat?K(e,{value:async e=>this.#e(e,{outputFormat:"plain"}),error:async e=>new U({data:this.#e(M(e).toJSON(),{outputFormat:"plain"}),cause:e})}):this.#e(e,t)}#e(e,t){let[n,r]=this.jsonSerializer.serialize(e);if("plain"===t.outputFormat)return n;if("URLSearchParams"===t.outputFormat){let e=new URLSearchParams;for(let[t,r]of this.bracketNotation.serialize(n))("string"==typeof r||"number"==typeof r||"boolean"==typeof r)&&e.append(t,""+r);return e}if(n instanceof Blob||void 0===n||!r)return n;let i=new FormData;for(let[e,t]of this.bracketNotation.serialize(n))"string"==typeof t||"number"==typeof t||"boolean"==typeof t?i.append(e,""+t):t instanceof Blob&&i.append(e,t);return i}deserialize(e){return e instanceof URLSearchParams||e instanceof FormData?this.bracketNotation.deserialize(Array.from(e.entries())):h(e)?K(e,{value:async e=>e,error:async e=>e instanceof U&&C(e.data)?j(e.data,{cause:e}):e}):e}},jb=class extends Ib{constructor(e,t,n){super(new Pb(e,new Cb(new Db(n),new Ab({maxBracketNotationArrayIndex:4294967294})),n),t,n)}},Nb=class extends jb{constructor(e,t){super(e,new xb(t),t)}};const Rb={sandbox:"https://api.sandbox.session.services",prod:"https://api.session.services"};function Ub(e){return e in Rb?Rb[e]:e}var Lb,qb={};function Gb(){if(Lb)return qb;Lb=1,Object.defineProperty(qb,"__esModule",{value:!0}),qb.parseCookie=s,qb.parse=s,qb.stringifyCookie=function(n,r){const i=r?.encode||encodeURIComponent,o=[];for(const r of Object.keys(n)){const a=n[r];if(void 0===a)continue;if(!e.test(r))throw new TypeError("cookie name is invalid: "+r);const s=i(a);if(!t.test(s))throw new TypeError("cookie val is invalid: "+a);o.push(`${r}=${s}`)}return o.join("; ")},qb.stringifySetCookie=d,qb.serialize=d,qb.parseSetCookie=function(e,t){const n=t?.decode||p,r=e.length,o=c(e,0,r),a=u(e,0,o),s=-1===a?{name:"",value:n(l(e,0,o))}:{name:l(e,0,a),value:n(l(e,a+1,o))};let d=o+1;for(;d<r;){const t=c(e,d,r),n=u(e,d,t),o=l(e,d,-1===n?t:n),a=-1===n?void 0:l(e,n+1,t);switch(o.toLowerCase()){case"httponly":s.httpOnly=!0;break;case"secure":s.secure=!0;break;case"partitioned":s.partitioned=!0;break;case"domain":s.domain=a;break;case"path":s.path=a;break;case"max-age":a&&i.test(a)&&(s.maxAge=Number(a));break;case"expires":if(!a)break;const e=new Date(a);Number.isFinite(e.valueOf())&&(s.expires=e);break;case"priority":if(!a)break;const t=a.toLowerCase();"low"!==t&&"medium"!==t&&"high"!==t||(s.priority=t);break;case"samesite":if(!a)break;const n=a.toLowerCase();"lax"!==n&&"strict"!==n&&"none"!==n||(s.sameSite=n)}d=t+1}return s},qb.stringifySetCookie=d,qb.serialize=d;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=/^-?\d+$/,o=Object.prototype.toString,a=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function s(e,t){const n=new a,r=e.length;if(r<2)return n;const i=t?.decode||p;let o=0;do{const t=u(e,o,r);if(-1===t)break;const a=c(e,o,r);if(t>a){o=e.lastIndexOf(";",t-1)+1;continue}const s=l(e,o,t);void 0===n[s]&&(n[s]=i(l(e,t+1,a))),o=a+1}while(o<r);return n}function d(i,a,s){const d="object"==typeof i?i:{...s,name:i,value:a+""},c="object"==typeof a?a:s,u=c?.encode||encodeURIComponent;if(!e.test(d.name))throw new TypeError("argument name is invalid: "+d.name);const l=d.value?u(d.value):"";if(!t.test(l))throw new TypeError("argument val is invalid: "+d.value);let p=d.name+"="+l;if(void 0!==d.maxAge){if(!Number.isInteger(d.maxAge))throw new TypeError("option maxAge is invalid: "+d.maxAge);p+="; Max-Age="+d.maxAge}if(d.domain){if(!n.test(d.domain))throw new TypeError("option domain is invalid: "+d.domain);p+="; Domain="+d.domain}if(d.path){if(!r.test(d.path))throw new TypeError("option path is invalid: "+d.path);p+="; Path="+d.path}if(d.expires){if(!function(e){return"[object Date]"===o.call(e)}(d.expires)||!Number.isFinite(d.expires.valueOf()))throw new TypeError("option expires is invalid: "+d.expires);p+="; Expires="+d.expires.toUTCString()}if(d.httpOnly&&(p+="; HttpOnly"),d.secure&&(p+="; Secure"),d.partitioned&&(p+="; Partitioned"),d.priority)switch("string"==typeof d.priority?d.priority.toLowerCase():void 0){case"low":p+="; Priority=Low";break;case"medium":p+="; Priority=Medium";break;case"high":p+="; Priority=High";break;default:throw new TypeError("option priority is invalid: "+d.priority)}if(d.sameSite)switch("string"==typeof d.sameSite?d.sameSite.toLowerCase():d.sameSite){case!0:case"strict":p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"none":p+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid: "+d.sameSite)}return p}function c(e,t,n){const r=e.indexOf(";",t);return-1===r?n:r}function u(e,t,n){const r=e.indexOf("=",t);return r<n?r:-1}function l(e,t,n){let r=t,i=n;do{const t=e.charCodeAt(r);if(32!==t&&9!==t)break}while(++r<i);for(;i>r;){const t=e.charCodeAt(i-1);if(32!==t&&9!==t)break;i--}return e.slice(r,i)}function p(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}return qb}var zb=Gb();function Fb(e,t={}){const n=function(e){return e&&"j"===e[0]&&":"===e[1]?e.substr(2):e}(e);if(!t.doNotParse)try{return JSON.parse(n)}catch(e){}return e}class Bb{constructor(e,t={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const e=this.cookies;this.cookies=zb.parse(document.cookie),this._checkChanges(e)};const n="undefined"==typeof document?"":document.cookie;this.cookies=function(e){return"string"==typeof e?zb.parse(e):"object"==typeof e&&null!==e?e:{}}(e||n),this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=function(){const e="undefined"==typeof globalThis?void 0:globalThis.TEST_HAS_DOCUMENT_COOKIE;return"boolean"==typeof e?e:"object"==typeof document&&"string"==typeof document.cookie}()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach((t=>{e[t]!==this.cookies[t]&&this._emitChange({name:t,value:Fb(this.cookies[t])})}))}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),Fb(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();const t={};for(let n in this.cookies)t[n]=Fb(this.cookies[n],e);return t}set(e,t,n){n=n?Object.assign(Object.assign({},this.defaultSetOptions),n):this.defaultSetOptions;const r="string"==typeof t?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:r}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=zb.serialize(e,r,n)),this._emitChange({name:e,value:t,options:n})}remove(e,t){const n=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=zb.serialize(e,"",n)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&1===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(e){const t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&0===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}removeAllChangeListeners(){for(;this.changeListeners.length>0;)this.removeChangeListener(this.changeListeners[0])}}const Wb="sessions_attribution";function Yb(e,t){return e.get(t)||void 0}function Vb(e){return!(!e||!Object.values(e).some(Boolean))}function Zb(){try{let e=window.localStorage?.getItem(Wb);if(!e)return;let t=JSON.parse(e);if(!t||"object"!=typeof t)return void window.localStorage?.removeItem(Wb);let n=t;return!n.expiresAt||n.expiresAt<=Date.now()?void window.localStorage?.removeItem(Wb):n}catch{return}}function Hb(e){return"string"==typeof e&&e.length>0?e:void 0}function Kb(){if(typeof window>"u")return;let e=function(e){return{source:Yb(e,"utm_source"),medium:Yb(e,"utm_medium"),name:Yb(e,"utm_campaign"),term:Yb(e,"utm_term"),content:Yb(e,"utm_content")}}(new URLSearchParams(window.location.search));return Vb(e)?(function(e){if(Vb(e))try{window.localStorage?.setItem(Wb,JSON.stringify({...Zb(),expiresAt:Date.now()+2592e6,utm_campaign:e?.name,utm_content:e?.content,utm_medium:e?.medium,utm_source:e?.source,utm_term:e?.term}))}catch{return}}(e),e):function(){let e=Zb();if(!e)return;let t={source:Hb(e.utm_source),medium:Hb(e.utm_medium),name:Hb(e.utm_campaign),term:Hb(e.utm_term),content:Hb(e.utm_content)};return Vb(t)?t:void 0}()}function Jb(e){return{anonymous_id:e.anonymousId,browser:ew(e.context.userAgent),browser_session_id:e.sessionId,device_type:Xb(e.context.userAgent),page_path:e.context.page.path,page_title:e.context.page.title,page_url:e.context.page.url,referrer:e.context.page.referrer,user_agent:e.context.userAgent||void 0,utm_campaign:e.context.campaign?.name,utm_content:e.context.campaign?.content,utm_medium:e.context.campaign?.medium,utm_source:e.context.campaign?.source,utm_term:e.context.campaign?.term}}function Qb(){return typeof window>"u"?{page:{url:"",path:"",title:"",referrer:void 0},userAgent:"",campaign:void 0}:{page:{url:window.location.href,path:window.location.pathname,title:document.title,referrer:document.referrer||void 0},userAgent:navigator.userAgent,campaign:Kb()}}function Xb(e){let t=e.toLowerCase();return t?function(e){return!!/ipad|tablet|playbook|silk|kindle|sm-t|tab/.test(e)||/android/.test(e)&&!/mobile/.test(e)}(t)?"TABLET":function(e){return/iphone|ipod|android|windows phone|blackberry|bb10|mobile/.test(e)}(t)?"MOBILE":"DESKTOP":"DESKTOP"}function ew(e){let t=e.toLowerCase();return t?t.includes("instagram")?"Instagram App":/fban|fbav|fb_iab|fbios|facebook/.test(t)?"Facebook App":/tiktok|musical_ly|bytedance|bytelo/.test(t)?"TikTok App":t.includes("snapchat")?"Snapchat App":t.includes("pinterest")?"Pinterest App":t.includes("linkedin")?"LinkedIn App":/twitter|twitterandroid/.test(t)?"X App":t.includes("micromessenger")?"WeChat App":/\bline\//.test(t)?"LINE App":t.includes("gsa/")?"Google App":/edg\/|edge|edgios|edga/.test(t)?"Edge":t.includes("samsungbrowser")?"Samsung Internet":/opr\/|opera|opios/.test(t)?"Opera":/firefox|fxios/.test(t)?"Firefox":t.includes("crios")?"Chrome":/iphone|ipod|ipad/.test(t)&&t.includes("safari")?"Mobile Safari":t.includes("android")&&t.includes("wv")?"Android WebView":/chrome|chromium/.test(t)?"Chrome":t.includes("safari")?"Safari":"Other":"Unknown"}function tw(e,t,n){n&&(e[t]=n)}function nw(...e){return e.find(Boolean)}function rw(e){return(t,n)=>{e(t,n.product_id),function(e,t){tw(e,"content_name",t.name),tw(e,"value",nw(t.value,t.price)),e.content_type="product"}(t,n)}}function iw(e){return(t,n)=>{e(t,n),tw(t,"content_category",n.category)}}function ow(e,t){tw(e,"value",nw(t.value,t.total))}function aw(e,t){tw(e,"value",nw(t.value,t.total,t.revenue))}function sw(e,t){if(Array.isArray(e))return e.map(t)}const dw={"Product Viewed":"ViewContent","Product Added":"AddToCart","Checkout Started":"InitiateCheckout","Payment Info Entered":"AddPaymentInfo","Order Completed":"Purchase"},cw=new Set(["AddPaymentInfo","AddToCart","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"]),uw=new Set,lw=new Map;function pw(e){if(Array.from(document.scripts??[]).some((e=>e.src.includes("connect.facebook.net/en_US/fbevents.js"))))return!0;let t=document.createElement("script");t.async=!0,t.src="https://connect.facebook.net/en_US/fbevents.js",t.addEventListener?.("load",(()=>{vw(e,"[Facebook Pixel] fbevents.js loaded")})),t.addEventListener?.("error",(()=>{vw(e,"[Facebook Pixel] fbevents.js failed to load")}));let n=document.getElementsByTagName("script")[0],r=n?.parentNode??document.head??document.body;return!!r&&(r.insertBefore(t,n??null),vw(e,"[Facebook Pixel] inserted fbevents.js"),!0)}function mw(e,t){!t||!Array.isArray(t)||(e.content_ids=t.flatMap((e=>e.product_id?[e.product_id]:[])),e.num_items=t.length,e.contents=sw(t,(e=>({id:e.product_id,quantity:e.quantity||1,item_price:e.price}))))}function fw(e,t){let n=window;typeof window>"u"||!n.fbq||(t?n.fbq("init",e,{external_id:t}):n.fbq("init",e))}function hw(e,t,n){let r=window;typeof window>"u"||!r.fbq||r.fbq(e,t,n)}function vw(e,...t){e&&console.log(...t)}function gw(e,t,n){return!!function(e){if(typeof window>"u")return!1;let t=window;if(t.fbq)return pw(e);let n=(...e)=>{n.callMethod?n.callMethod(...e):n.queue.push(e)};return n.push=n,n.loaded=!0,n.version="2.0",n.queue=[],t.fbq=n,t._fbq||=n,pw(e)}(n)&&(function(e,t,n){let r=lw.get(e);return!(!t||t===r||(fw(e,t),lw.set(e,t),uw.add(e),vw(n,`[Facebook Pixel] Re-initialized pixel ${e} with userId ${t}`),0))}(e,t,n)||uw.has(e)||function(e,t,n){fw(e,t),uw.add(e),t&&lw.set(e,t),vw(n,"[Facebook Pixel] Initialized pixel "+e)}(e,t,n),!0)}const yw=rw((function(e,t){t&&(e.content_ids=[t])}));function bw(e,t){yw(e,t),t.product_id&&(e.contents=[{id:t.product_id,quantity:t.quantity||1,item_price:t.price}])}function ww(e,t){mw(e,t.products),ow(e,t),e.content_type="product",tw(e,"order_id",t.order_id)}function $w(e,t){tw(e,"value",t.value),t.product_id&&(e.content_ids=[t.product_id])}const Iw={ViewContent:iw(yw),AddToCart:bw,InitiateCheckout:ww,AddPaymentInfo:ww,Purchase:function(e,t){mw(e,t.products),aw(e,t),e.content_type="product",tw(e,"order_id",t.order_id)},"Product List Viewed":function(e,t){mw(e,t.products),e.content_type="product"},"Product Removed":bw,"Cart Viewed":ww,"Coupon Applied":ww,"Coupon Removed":ww};function kw(e,t){let n={};return tw(n,"currency",t.currency),tw(n,"event_id",t.event_id),(Iw[e.name]??Iw[e.sourceName]??$w)(n,t),n}function Ew(e,t=2){let n=e.trim();if(!n.includes("%")||0===t)return n;try{return Ew(decodeURIComponent(n),t-1)}catch{return n}}function xw(e){let t=e.match(/[A-Za-z0-9]+/g);return t?t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(""):"Unknown"}function Aw(e){let t=Ew(function(e){return e.name||"Unknown"}(e)),n=dw[t]||t;return cw.has(n)?{method:"track",name:n,sourceName:t}:{method:"trackCustom",name:xw(n),sourceName:t}}function Tw(e=!1){let t=(t,n)=>{n.fbId&&gw(n.fbId,t.userId,e)&&(hw("track","PageView",{}),vw(e,"[Facebook Pixel] Sent PageView"))};return{name:"Facebook Pixel",preload:(t,n)=>{n.fbId&&gw(n.fbId,t.userId,e)},track:(t,n)=>{if(!n.fbId||!gw(n.fbId,t.userId,e))return;let r=Aw(t),i=kw(r,t.properties);hw(r.method,r.name,i),vw(e,`[Facebook Pixel] Sent ${r.name}:`,i)},page:t,screen:t,identify:(t,n)=>{!n.fbId||!t.userId||(gw(n.fbId,t.userId,e),vw(e,"[Facebook Pixel] Identity synced: "+t.userId))}}}const Ow={"Product Viewed":"view_item","Product Added":"add_to_cart","Product Removed":"remove_from_cart","Checkout Started":"begin_checkout","Payment Info Entered":"add_payment_info","Order Completed":"purchase","Product List Viewed":"view_item_list","Cart Viewed":"view_cart","Coupon Entered":"coupon_entered","Coupon Applied":"coupon_applied","Coupon Denied":"coupon_denied","Coupon Removed":"coupon_removed"},_w=new Set;function Dw(e){return"google-analytics-"+e}function Sw(e,t,n){if(typeof window>"u")return;let r=window;r.gtag&&r.gtag("event",t,{...n,send_to:e})}function Mw(e,...t){e&&console.log(...t)}function Pw(e){return"string"==typeof e&&e.length>0?e:void 0}function Cw(e,t,n){null==n||""===n||(e[t]=n)}function jw(e){return{item_id:e.product_id||e.sku,item_name:e.name,item_category:e.category,item_variant:Pw(e.variant),price:e.price,quantity:e.quantity||1}}function Nw(e){return!e.product_id||e.products?[]:[{item_id:e.product_id,item_name:e.name,item_category:e.category,item_variant:Pw(e.variant),price:e.price,quantity:e.quantity||1}]}function Rw(e){return Array.isArray(e.products)?e.products.map(jw):[]}function Uw(e,t=2){let n=e.trim();if(!n.includes("%")||0===t)return n;try{return Uw(decodeURIComponent(n),t-1)}catch{return n}}function Lw(e){let t=Uw(e.name||"Unknown");return Ow[t]||function(e){let t=e.match(/[A-Za-z0-9]+/g)?.join("_").toLowerCase()||"custom_event";return/^[a-z]/.test(t)?t:"event_"+t}(t)}function qw(e,t){Cw(e,"user_id",t.userId),Cw(e,"event_id",t.properties.event_id),Cw(e,"team_id",t.properties.team_id),Cw(e,"promoter_id",t.properties.promoter_id),Cw(e,"order_id",t.properties.order_id)}function Gw(e,t){if(function(e){return!(!e||!/^G-[A-Z0-9]+$/.test(e))}(e.gaId))return function(e,t){if(typeof window>"u")return!1;let n=window;return n.dataLayer=n.dataLayer||[],n.gtag||(n.gtag=(...e)=>{n.dataLayer?.push(e)},n.gtag("js",new Date)),function(e){if(document.getElementById(Dw(e)))return;let t=document.createElement("script");t.id=Dw(e),t.async=!0,t.src="https://www.googletagmanager.com/gtag/js?id="+e;let n=document.getElementsByTagName("script")[0];n?.parentNode?.insertBefore(t,n)}(e),_w.has(e)||(n.gtag("config",e,{send_page_view:!1}),_w.add(e),Mw(t,"[Google Analytics] Initialized "+e)),!0}(e.gaId,t)?e.gaId:void 0}function zw(e=!1){return{name:"Google Analytics",preload:(t,n)=>{Gw(n,e)},track:(t,n)=>{let r=Gw(n,e);if(!r)return;let i=Lw(t),o=function(e,t){let n={},r=function(e){return[...Nw(e),...Rw(e)]}(t.properties);return qw(n,t),Cw(n,"currency",t.properties.currency),Cw(n,"value",function(e){return e.find((e=>"number"==typeof e))}([t.properties.value,t.properties.total,t.properties.revenue,t.properties.price])),Cw(n,"coupon",t.properties.coupon),Cw(n,"payment_type",Pw(t.properties.payment_type)??Pw(t.properties.payment_method)),Cw(n,"item_list_id",t.properties.list_id),Cw(n,"item_list_name",t.properties.list_name),"purchase"===e&&Cw(n,"transaction_id",t.properties.order_id),r.length>0&&(n.items=r),n}(i,t);Sw(r,i,o),Mw(e,`[Google Analytics] Sent ${i}:`,o)},page:(t,n)=>{let r=Gw(n,e);if(!r)return;let i={page_location:t.context.page.url,page_path:t.context.page.path,page_title:t.context.page.title};qw(i,t),Cw(i,"page_referrer",t.context.page.referrer),Sw(r,"page_view",i),Mw(e,"[Google Analytics] Sent page_view:",i)},screen:(t,n)=>{let r=Gw(n,e);if(!r)return;let i={};qw(i,t),Cw(i,"screen_name",t.name||"Unknown"),Sw(r,"screen_view",i),Mw(e,"[Google Analytics] Sent screen_view:",i)},identify:(t,n)=>{t.userId&&(Gw(n,e),Mw(e,"[Google Analytics] Identity available: "+t.userId))}}}const Fw=new Set(Object.values($c));function Bw(e){return e.messageId??"msg_"+e.timestamp.toString(36)}function Ww(e){let t=e.context.campaign??{};return{session_id:e.sessionId,anonymous_id:e.anonymousId,user_id:e.userId,page:{url:e.context.page.url,path:e.context.page.path,title:e.context.page.title},referrer:e.context.page.referrer,user_agent:e.context.userAgent,utm_source:t.source,utm_medium:t.medium,utm_campaign:t.name,utm_term:t.term,utm_content:t.content}}function Yw(e,t,n){return n&&t?{...e,name:t}:e}const Vw={"Product Viewed":"ViewContent","Product Added":"AddToCart","Checkout Started":"InitiateCheckout","Payment Info Entered":"AddPaymentInfo","Order Completed":"Purchase"},Zw=new Set;function Hw(e,t){let n=window;typeof window>"u"||!n.ttq||n.ttq.instance(e)("identify",{external_id:t})}function Kw(e,...t){e&&console.log(...t)}function Jw(e,t){return!!function(){if(typeof window>"u")return!1;let e=window;if(e.ttq)return!0;e.TiktokAnalyticsObject="ttq";let t=(...e)=>{t._i=t._i||{},t._t=t._t||{},t._i[e[0]]=e};t.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],t.setAndDefer=(e,t)=>{e[t]=(...n)=>{e._t=e._t||{};let r=e._t;r[t]=r[t]||[],r[t]?.push(n)}};for(let e of t.methods)t.setAndDefer(t,e);t.instance=e=>{let n=t._i[e]||[];for(let e of t.methods)t.setAndDefer(n,e);return n},t._i={},t._t={},e.ttq=t;let n=document.createElement("script");n.async=!0,n.src="https://analytics.tiktok.com/i18n/pixel/events.js";let r=document.getElementsByTagName("script")[0];return r?.parentNode?.insertBefore(n,r),!0}()&&(Zw.has(e)||(function(e){let t=window;typeof window>"u"||!t.ttq||t.ttq("init",e)}(e),Zw.add(e),Kw(t,"[TikTok Pixel] Initialized pixel "+e)),!0)}const Qw=rw((function(e,t){tw(e,"content_id",t)}));function Xw(e,t){tw(e,"contents",sw(t,(e=>({content_id:e.product_id,content_name:e.name,quantity:e.quantity||1,price:e.price}))))}function e$(e,t){Xw(e,t.products),ow(e,t)}function t$(e,t){tw(e,"value",t.value)}const n$={ViewContent:iw(Qw),AddToCart:function(e,t){Qw(e,t),tw(e,"quantity",t.quantity)},InitiateCheckout:e$,AddPaymentInfo:e$,Purchase:function(e,t){Xw(e,t.products),aw(e,t),tw(e,"order_id",t.order_id)}};function r$(e,t){let n={};return tw(n,"currency",t.currency),tw(n,"event_id",t.event_id),(n$[e]??t$)(n,t),n}function i$(e){return e.tikTokId}function o$(e=!1){let t=(t,n)=>{let r=i$(n);r&&Jw(r,e)&&(function(e){let t=window;typeof window>"u"||!t.ttq||t.ttq.instance(e)("page")}(r),Kw(e,"[TikTok Pixel] Sent page view"))};return{name:"TikTok Pixel",preload:(t,n)=>{let r=i$(n);r&&Jw(r,e)&&t.userId&&Hw(r,t.userId)},track:(t,n)=>{let r=i$(n);if(!r||!Jw(r,e))return;let i=function(e){let t=function(e){return e.name||"Unknown"}(e);return Vw[t]||t}(t),o=r$(i,t.properties);(function(e,t,n){let r=window;typeof window>"u"||!r.ttq||r.ttq.instance(e)("track",t,n)})(r,i,o),Kw(e,`[TikTok Pixel] Sent ${i}:`,o)},page:t,screen:t,identify:(t,n)=>{let r=i$(n);!r||!t.userId||Jw(r,e)&&(Hw(r,t.userId),Kw(e,"[TikTok Pixel] Identity synced: "+t.userId))}}}const a$={preload:(e,t,n)=>e.preload(t,n),track:(e,t,n)=>e.track(t,n),page:(e,t,n)=>e.page(t,n),screen:(e,t,n)=>e.screen(t,n),identify:(e,t,n)=>e.identify(t,n)},s$=["fbId","gaId","tikTokId"];function d$(e){return e||void 0}function c$(e,t=!1,n={}){let r=new Map,i=new Map,o=!1===n.sessions?null:function(e,t=!1){let n=async(n,r,i)=>{let o=function(e){let{event_id:t,team_id:n,promoter_id:r,...i}=e;return{eventId:t,teamId:n,promoterId:r,rest:i}}(r.properties);if(!function(e){return!!(e.eventId&&e.teamId&&e.promoterId)}(o))return void function(e,t,n){e&&console.warn(`[Sessions API] Missing required fields, skipping ${t}:`,{eventId:n.eventId,teamId:n.teamId,promoterId:n.promoterId})}(t,n,o);let a=i??r.name;if(!function(e){return!(!e||!Fw.has(e))}(a))return void function(e,t,n){e&&console.warn(`[Sessions API] Invalid or missing eventType "${n}", skipping ${t}`)}(t,n,a);let s=function(e,t,n,r){return{eventId:t.eventId,teamId:t.teamId,promoterId:t.promoterId,eventType:n,messageId:Bw(e),occurredAt:new Date(e.timestamp).toISOString(),properties:Yw(t.rest,e.name,r),context:Ww(e)}}(r,o,a,i);(function(e,t,n){e&&console.log(`[Sessions API] Sending ${t}:`,n)})(t,n,s),await e.analytics[n](s)};return{name:"Sessions API",preload:()=>{t&&console.log("[Sessions API] Preload received (no-op)")},track:e=>n("track",e).catch((e=>{t&&console.error("[Sessions API] track error:",e)})),page:e=>n("page",e,"Page Viewed").catch((e=>{t&&console.error("[Sessions API] page error:",e)})),screen:e=>n("screen",e,"Screen Viewed").catch((e=>{t&&console.error("[Sessions API] screen error:",e)})),identify:e=>{t&&console.log("[Sessions API] Identify received (logged only):",{userId:e.userId,traits:e.traits})}}}(e,t),a=[!1===n.facebook?null:Tw(t),!1===n.googleAnalytics?null:zw(t),!1===n.tikTok?null:o$(t)].filter((e=>!!e)),s=async n=>{try{let r=function(e){let t=e??{};return Object.fromEntries(s$.map((e=>[e,d$(t[e])])))}((await e.promoter.get({key:n})).promoter?.tracking);return function(e,t,n){e&&console.log(`[DestinationManager] Fetched config for promoter ${t}:`,n)}(t,n,r),r}catch(e){return function(e,t,n){e&&console.warn(`[DestinationManager] Failed to fetch promoter ${t} config:`,n)}(t,n,e),{}}},d=async(e,n,r)=>{try{await u(e,n,r)}catch(n){t&&console.error(`[DestinationManager] ${e.name} error:`,n)}},c=async e=>{let t=r.get(e);if(t)return t;let n=i.get(e);if(n)return n;n=s(e),i.set(e,n);try{let t=await n;return r.set(e,t),t}finally{i.delete(e)}},u=(e,t,n)=>a$[t.type]?.(e,t,n);return{sendEvent:async(e,t)=>{if(!o&&0===a.length)return;let n=o?d(o,e,{}):Promise.resolve();if(0===a.length)return void await n;let r=await c(t);if(!function(e){return s$.some((t=>!!e[t]))}(r))return void await n;let i=Promise.all(a.map((t=>d(t,e,r))));await Promise.all([n,i])},clearCache:()=>{r.clear(),i.clear()}}}function u$(){return typeof document>"u"?null:new Bb}const l$={deleteCookie:function(e){let t=u$();t&&t.remove(e,{path:"/"})},getCookie:function(e){return u$()?.get(e)??null},getItem:function(e){if(typeof localStorage>"u")return null;try{return localStorage.getItem(e)}catch{return null}},removeItem:function(e){if(!(typeof localStorage>"u"))try{localStorage.removeItem(e)}catch{}},setCookie:function(e,t){let n=u$();n&&n.set(e,t,{path:"/",sameSite:"lax",secure:"https:"===window.location.protocol})},setItem:function(e,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(e,t)}catch{}}};function p$(){return function(e){let t=e.getCookie(Ts);if(t)return t;let n=_s();return e.setCookie(Ts,n),n}(l$)}function m$(){return function(e){let t=e.getItem(Os);if(t)return t;let n=Ds();return e.setItem(Os,n),n}(l$)}const f$={AUD:{locale:"en-AU",exponent:2},NZD:{locale:"en-NZ",exponent:2},GBP:{locale:"en-GB",exponent:2},USD:{locale:"en-US",exponent:2},EUR:{locale:"de-DE",exponent:2},CAD:{locale:"en-CA",exponent:2},CHF:{locale:"de-CH",exponent:2},CNY:{locale:"zh-CN",exponent:2},HKD:{locale:"zh-HK",exponent:2},SGD:{locale:"en-SG",exponent:2},INR:{locale:"en-IN",exponent:2},MXN:{locale:"es-MX",exponent:2},BRL:{locale:"pt-BR",exponent:2},ZAR:{locale:"en-ZA",exponent:2},SEK:{locale:"sv-SE",exponent:2},NOK:{locale:"nb-NO",exponent:2},DKK:{locale:"da-DK",exponent:2},PLN:{locale:"pl-PL",exponent:2},CZK:{locale:"cs-CZ",exponent:2},HUF:{locale:"hu-HU",exponent:2},RON:{locale:"ro-RO",exponent:2},THB:{locale:"th-TH",exponent:2},ILS:{locale:"he-IL",exponent:2},JPY:{locale:"ja-JP",exponent:0},KRW:{locale:"ko-KR",exponent:0}},h$={locale:"en-US",exponent:2},v$=new Map;function g$(){return globalThis.crypto?.randomUUID?.()??`msg_${Date.now().toString(36)}_${Math.random().toString(36).slice(2)}`}function y$(e="tenant-web"){let t=Qb(),n=Jb({anonymousId:m$(),context:t,sessionId:p$()});return{name:e,referrer:t.page.referrer,utmSource:t.campaign?.source,utmMedium:t.campaign?.medium,utmCampaign:t.campaign?.name,browser:b$(n.browser),deviceType:w$(n.device_type),sessionId:b$(n.browser_session_id),anonymousId:b$(n.anonymous_id)}}function b$(e){return"string"==typeof e&&e.length>0?e:void 0}function w$(e){return"MOBILE"===e||"TABLET"===e||"DESKTOP"===e?e:void 0}var $$,I$,k$={},E$={},x$={},A$={};function T$(){return I$||(I$=1,A$.tzName=function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}),A$}var O$,_$,D$,S$={},M$={};function P$(){if(O$)return M$;O$=1,M$.tzOffset=function(i,o){try{const n=(e[i]||=new Intl.DateTimeFormat("en-US",{timeZone:i,timeZoneName:"longOffset"}).format)(o).split("GMT")[1];return n in t?t[n]:r(n,n.split(":"))}catch{if(i in t)return t[i];const e=i?.match(n);return e?r(i,e.slice(1)):NaN}};const e={},t={},n=/([+-]\d\d):?(\d\d)?/;function r(e,n){const r=+(n[0]||0),i=+(n[1]||0),o=+(n[2]||0)/60;return t[e]=60*r+i>0?60*r+i+o:60*r-i-o}return M$}function C$(){if(_$)return S$;_$=1,S$.TZDateMini=void 0;var e=P$();class t extends Date{constructor(...t){super(),t.length>1&&"string"==typeof t[t.length-1]&&(this.timeZone=t.pop()),this.internal=new Date,isNaN((0,e.tzOffset)(this.timeZone,this))?this.setTime(NaN):t.length?"number"==typeof t[0]&&(1===t.length||2===t.length&&"number"!=typeof t[1])?this.setTime(t[0]):"string"==typeof t[0]?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),i(this,t)):this.setTime(Date.now())}static tz(e,...n){return n.length?new t(...n,e):new t(Date.now(),e)}withTimeZone(e){return new t(+this,e)}getTimezoneOffset(){const t=-(0,e.tzOffset)(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(e){return Date.prototype.setTime.apply(this,arguments),r(this),+this}[Symbol.for("constructDateFrom")](e){return new t(+new Date(e),this.timeZone)}}S$.TZDateMini=t;const n=/^(get|set)(?!UTC)/;function r(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(60*-(0,e.tzOffset)(t.timeZone,t)))}function i(t,n){const i=Array.isArray(n)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(n):+t.internal,a=(0,e.tzOffset)(t.timeZone,t),s=a>0?Math.floor(a):Math.ceil(a),d=new Date(+t);d.setUTCHours(d.getUTCHours()-1);const c=-new Date(+t).getTimezoneOffset(),u=-new Date(+d).getTimezoneOffset();let l=c;if(c-u&&c!==s&&Date.prototype.getHours.apply(t)!==(Array.isArray(n)?n[3]||0:t.internal.getUTCHours())){const n=new Date(+t),r=c-s;r&&n.setUTCMinutes(n.getUTCMinutes()+r);const i=(0,e.tzOffset)(t.timeZone,n);(i>0?Math.floor(i):Math.ceil(i))===s&&(l=u)}const p=l-s;p&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+p);const m=new Date(+t);m.setUTCSeconds(0);const f=c>0?m.getSeconds():(m.getSeconds()-60)%60,h=Math.round(-60*(0,e.tzOffset)(t.timeZone,t))%60;(h||f)&&Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+h+f);const v=(0,e.tzOffset)(t.timeZone,t),g=v>0?Math.floor(v):Math.ceil(v),y=g!==s,b=-new Date(+t).getTimezoneOffset()-g-p,w=g-s,$=i-60*g*1e3,I=w>0&&o(t)-i==60*w*1e3&&o(t,$)!==i;if(y&&b&&!I){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+b);const n=(0,e.tzOffset)(t.timeZone,t),r=g-(n>0?Math.floor(n):Math.ceil(n));r&&b<0&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+r)}r(t);const k=(n?i:i+1e3*h)-+t.internal;k&&Math.abs(k)<18e5&&(Date.prototype.setTime.call(t,+t+k),r(t))}function o(t,n){const r=new Date(n??+t);return r.setUTCSeconds(r.getUTCSeconds()-Math.round(60*-(0,e.tzOffset)(t.timeZone,r))),+r}return Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!n.test(e))return;const o=e.replace(n,"$1UTC");t.prototype[o]&&(e.startsWith("get")?t.prototype[e]=function(){return this.internal[o]()}:(t.prototype[e]=function(){return Date.prototype[o].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),i(e)}(this),+this},t.prototype[o]=function(){return Date.prototype[o].apply(this,arguments),r(this),+this}))})),S$}function j$(){if(D$)return x$;D$=1,x$.TZDate=void 0;var e=T$(),t=C$();class n extends t.TZDateMini{static tz(e,...t){return t.length?new n(...t,e):new n(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,i]=this.tzComponents();return`${t} GMT${n}${r}${i} (${(0,e.tzName)(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",(Math.floor(Math.abs(e)/60)+"").padStart(2,"0"),(Math.abs(e)%60+"").padStart(2,"0")]}withTimeZone(e){return new n(+this,e)}[Symbol.for("constructDateFrom")](e){return new n(+new Date(e),this.timeZone)}}return x$.TZDate=n,x$}var N$,R$,U$,L$,q$,G$={},z$={},F$=(U$||(U$=1,function(e){var t=($$||($$=1,E$.constructFromSymbol=void 0,E$.constructFromSymbol=Symbol.for("constructDateFrom")),E$);Object.keys(t).forEach((function(n){"default"!==n&&"__esModule"!==n&&(n in e&&e[n]===t[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}}))}));var n=j$();Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}}))}));var r=C$();Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}}))}));var i=function(){if(N$)return G$;N$=1,G$.tz=void 0;var e=j$();return G$.tz=t=>n=>e.TZDate.tz(t,+new Date(n)),G$}();Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));var o=P$();Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var a=function(){if(R$)return z$;R$=1,z$.tzScan=function(t,n){const r=[],i=new Date(n.start);i.setUTCSeconds(0,0);const o=new Date(n.end);o.setUTCSeconds(0,0);const a=+o;let s=(0,e.tzOffset)(t,i);for(;+i<a;){i.setUTCMonth(i.getUTCMonth()+1);const n=(0,e.tzOffset)(t,i);if(n!=s){const n=new Date(i);n.setUTCMonth(n.getUTCMonth()-1);const o=+i;for(s=(0,e.tzOffset)(t,n);+n<o;){n.setUTCDate(n.getUTCDate()+1);const i=(0,e.tzOffset)(t,n);if(i!=s){const i=new Date(n);i.setUTCDate(i.getUTCDate()-1);const o=+n;for(s=(0,e.tzOffset)(t,i);+i<o;){i.setUTCHours(i.getUTCHours()+1);const n=(0,e.tzOffset)(t,i);n!==s&&r.push({date:new Date(i),change:n-s,offset:n}),s=n}}s=i}}s=n}return r};var e=P$();return z$}();Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))}));var s=T$();Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===s[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}}))}))}(k$)),k$),B$={},W$={},Y$={},V$={},Z$={};function H$(){if(L$)return Z$;L$=1,Z$.secondsInYear=Z$.secondsInWeek=Z$.secondsInQuarter=Z$.secondsInMonth=Z$.secondsInMinute=Z$.secondsInHour=Z$.secondsInDay=Z$.quartersInYear=Z$.monthsInYear=Z$.monthsInQuarter=Z$.minutesInYear=Z$.minutesInMonth=Z$.minutesInHour=Z$.minutesInDay=Z$.minTime=Z$.millisecondsInWeek=Z$.millisecondsInSecond=Z$.millisecondsInMinute=Z$.millisecondsInHour=Z$.millisecondsInDay=Z$.maxTime=Z$.daysInYear=Z$.daysInWeek=Z$.constructFromSymbol=void 0,Z$.daysInWeek=7;const e=Z$.daysInYear=365.2425,t=Z$.maxTime=864e13;Z$.minTime=-t,Z$.millisecondsInWeek=6048e5,Z$.millisecondsInDay=864e5,Z$.millisecondsInMinute=6e4,Z$.millisecondsInHour=36e5,Z$.millisecondsInSecond=1e3,Z$.minutesInYear=525600,Z$.minutesInMonth=43200,Z$.minutesInDay=1440,Z$.minutesInHour=60,Z$.monthsInQuarter=3,Z$.monthsInYear=12,Z$.quartersInYear=4;const n=Z$.secondsInHour=3600;Z$.secondsInMinute=60;const r=Z$.secondsInDay=24*n;Z$.secondsInWeek=7*r;const i=Z$.secondsInYear=r*e,o=Z$.secondsInMonth=i/12;return Z$.secondsInQuarter=3*o,Z$.constructFromSymbol=Symbol.for("constructDateFrom"),Z$}function K$(){if(q$)return V$;q$=1,V$.constructFrom=function(t,n){return"function"==typeof t?t(n):t&&"object"==typeof t&&e.constructFromSymbol in t?t[e.constructFromSymbol](n):t instanceof Date?new t.constructor(n):new Date(n)};var e=H$();return V$}var J$,Q$,X$={};function eI(){if(J$)return X$;J$=1,X$.toDate=function(t,n){return(0,e.constructFrom)(n||t,t)};var e=K$();return X$}function tI(){if(Q$)return Y$;Q$=1,Y$.addDays=function(n,r,i){const o=(0,t.toDate)(n,i?.in);return isNaN(r)?(0,e.constructFrom)(i?.in||n,NaN):r?(o.setDate(o.getDate()+r),o):o};var e=K$(),t=eI();return Y$}var nI,rI,iI={};function oI(){if(nI)return iI;nI=1,iI.addMonths=function(n,r,i){const o=(0,t.toDate)(n,i?.in);if(isNaN(r))return(0,e.constructFrom)(i?.in||n,NaN);if(!r)return o;const a=o.getDate(),s=(0,e.constructFrom)(i?.in||n,o.getTime());s.setMonth(o.getMonth()+r+1,0);return a>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),a),o)};var e=K$(),t=eI();return iI}function aI(){if(rI)return W$;rI=1,W$.add=function(i,o,a){const{years:s=0,months:d=0,weeks:c=0,days:u=0,hours:l=0,minutes:p=0,seconds:m=0}=o,f=(0,r.toDate)(i,a?.in),h=d||s?(0,t.addMonths)(f,d+12*s):f,v=u||c?(0,e.addDays)(h,u+7*c):h,g=1e3*(m+60*(p+60*l));return(0,n.constructFrom)(a?.in||i,+v+g)};var e=tI(),t=oI(),n=K$(),r=eI();return W$}var sI,dI={},cI={};function uI(){if(sI)return cI;sI=1,cI.isSaturday=function(t,n){return 6===(0,e.toDate)(t,n?.in).getDay()};var e=eI();return cI}var lI,pI={};function mI(){if(lI)return pI;lI=1,pI.isSunday=function(t,n){return 0===(0,e.toDate)(t,n?.in).getDay()};var e=eI();return pI}var fI,hI,vI={};function gI(){if(fI)return vI;fI=1,vI.isWeekend=function(t,n){const r=(0,e.toDate)(t,n?.in).getDay();return 0===r||6===r};var e=eI();return vI}function yI(){if(hI)return dI;hI=1,dI.addBusinessDays=function(o,a,s){const d=(0,i.toDate)(o,s?.in),c=(0,r.isWeekend)(d,s);if(isNaN(a))return(0,e.constructFrom)(s?.in,NaN);const u=d.getHours(),l=a<0?-1:1,p=Math.trunc(a/5);d.setDate(d.getDate()+7*p);let m=Math.abs(a%5);for(;m>0;)d.setDate(d.getDate()+l),(0,r.isWeekend)(d,s)||(m-=1);return c&&(0,r.isWeekend)(d,s)&&0!==a&&((0,t.isSaturday)(d,s)&&d.setDate(d.getDate()+(l<0?2:-1)),(0,n.isSunday)(d,s)&&d.setDate(d.getDate()+(l<0?1:-2))),d.setHours(u),d};var e=K$(),t=uI(),n=mI(),r=gI(),i=eI();return dI}var bI,wI,$I={},II={};function kI(){if(bI)return II;bI=1,II.addMilliseconds=function(n,r,i){return(0,e.constructFrom)(i?.in||n,+(0,t.toDate)(n)+r)};var e=K$(),t=eI();return II}function EI(){if(wI)return $I;wI=1,$I.addHours=function(n,r,i){return(0,e.addMilliseconds)(n,r*t.millisecondsInHour,i)};var e=kI(),t=H$();return $I}var xI,AI,TI,OI,_I={},DI={},SI={},MI={},PI={};function CI(){if(xI)return PI;xI=1,PI.getDefaultOptions=function(){return e},PI.setDefaultOptions=function(t){e=t};let e={};return PI}function jI(){if(AI)return MI;AI=1,MI.startOfWeek=function(n,r){const i=(0,e.getDefaultOptions)(),o=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=(0,t.toDate)(n,r?.in),s=a.getDay(),d=(s<o?7:0)+s-o;return a.setDate(a.getDate()-d),a.setHours(0,0,0,0),a};var e=CI(),t=eI();return MI}function NI(){if(TI)return SI;TI=1,SI.startOfISOWeek=function(t,n){return(0,e.startOfWeek)(t,{...n,weekStartsOn:1})};var e=jI();return SI}function RI(){if(OI)return DI;OI=1,DI.getISOWeekYear=function(r,i){const o=(0,n.toDate)(r,i?.in),a=o.getFullYear(),s=(0,e.constructFrom)(o,0);s.setFullYear(a+1,0,4),s.setHours(0,0,0,0);const d=(0,t.startOfISOWeek)(s),c=(0,e.constructFrom)(o,0);c.setFullYear(a,0,4),c.setHours(0,0,0,0);const u=(0,t.startOfISOWeek)(c);return o.getTime()>=d.getTime()?a+1:o.getTime()>=u.getTime()?a:a-1};var e=K$(),t=NI(),n=eI();return DI}var UI,LI={},qI={},GI={};function zI(){if(UI)return GI;UI=1,GI.getTimezoneOffsetInMilliseconds=function(t){const n=(0,e.toDate)(t),r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return r.setUTCFullYear(n.getFullYear()),+t-+r};var e=eI();return GI}var FI,BI={};function WI(){if(FI)return BI;FI=1,BI.normalizeDates=function(t,...n){const r=e.constructFrom.bind(null,t||n.find((e=>"object"==typeof e)));return n.map(r)};var e=K$();return BI}var YI,VI,ZI={};function HI(){if(YI)return ZI;YI=1,ZI.startOfDay=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setHours(0,0,0,0),r};var e=eI();return ZI}function KI(){if(VI)return qI;VI=1,qI.differenceInCalendarDays=function(i,o,a){const[s,d]=(0,t.normalizeDates)(a?.in,i,o),c=(0,r.startOfDay)(s),u=(0,r.startOfDay)(d),l=+c-(0,e.getTimezoneOffsetInMilliseconds)(c),p=+u-(0,e.getTimezoneOffsetInMilliseconds)(u);return Math.round((l-p)/n.millisecondsInDay)};var e=zI(),t=WI(),n=H$(),r=HI();return qI}var JI,QI,XI,ek={};function tk(){if(JI)return ek;JI=1,ek.startOfISOWeekYear=function(r,i){const o=(0,t.getISOWeekYear)(r,i),a=(0,e.constructFrom)(i?.in||r,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),(0,n.startOfISOWeek)(a)};var e=K$(),t=RI(),n=NI();return ek}function nk(){if(QI)return LI;QI=1,LI.setISOWeekYear=function(i,o,a){let s=(0,r.toDate)(i,a?.in);const d=(0,t.differenceInCalendarDays)(s,(0,n.startOfISOWeekYear)(s,a)),c=(0,e.constructFrom)(a?.in||i,0);return c.setFullYear(o,0,4),c.setHours(0,0,0,0),s=(0,n.startOfISOWeekYear)(c),s.setDate(s.getDate()+d),s};var e=K$(),t=KI(),n=tk(),r=eI();return LI}function rk(){if(XI)return _I;XI=1,_I.addISOWeekYears=function(n,r,i){return(0,t.setISOWeekYear)(n,(0,e.getISOWeekYear)(n,i)+r,i)};var e=RI(),t=nk();return _I}var ik,ok={};function ak(){if(ik)return ok;ik=1,ok.addMinutes=function(n,r,i){const o=(0,t.toDate)(n,i?.in);return o.setTime(o.getTime()+r*e.millisecondsInMinute),o};var e=H$(),t=eI();return ok}var sk,dk={};function ck(){if(sk)return dk;sk=1,dk.addQuarters=function(t,n,r){return(0,e.addMonths)(t,3*n,r)};var e=oI();return dk}var uk,lk={};function pk(){if(uk)return lk;uk=1,lk.addSeconds=function(t,n,r){return(0,e.addMilliseconds)(t,1e3*n,r)};var e=kI();return lk}var mk,fk={};function hk(){if(mk)return fk;mk=1,fk.addWeeks=function(t,n,r){return(0,e.addDays)(t,7*n,r)};var e=tI();return fk}var vk,gk={};function yk(){if(vk)return gk;vk=1,gk.addYears=function(t,n,r){return(0,e.addMonths)(t,12*n,r)};var e=oI();return gk}var bk,wk={};function $k(){if(bk)return wk;bk=1,wk.areIntervalsOverlapping=function(t,n,r){const[i,o]=[+(0,e.toDate)(t.start,r?.in),+(0,e.toDate)(t.end,r?.in)].sort(((e,t)=>e-t)),[a,s]=[+(0,e.toDate)(n.start,r?.in),+(0,e.toDate)(n.end,r?.in)].sort(((e,t)=>e-t));return r?.inclusive?i<=s&&a<=o:i<s&&a<o};var e=eI();return wk}var Ik,kk={},Ek={};function xk(){if(Ik)return Ek;Ik=1,Ek.max=function(n,r){let i,o=r?.in;return n.forEach((n=>{o||"object"!=typeof n||(o=e.constructFrom.bind(null,n));const r=(0,t.toDate)(n,o);(!i||i<r||isNaN(+r))&&(i=r)})),(0,e.constructFrom)(o,i||NaN)};var e=K$(),t=eI();return Ek}var Ak,Tk,Ok={};function _k(){if(Ak)return Ok;Ak=1,Ok.min=function(n,r){let i,o=r?.in;return n.forEach((n=>{o||"object"!=typeof n||(o=e.constructFrom.bind(null,n));const r=(0,t.toDate)(n,o);(!i||i>r||isNaN(+r))&&(i=r)})),(0,e.constructFrom)(o,i||NaN)};var e=K$(),t=eI();return Ok}function Dk(){if(Tk)return kk;Tk=1,kk.clamp=function(r,i,o){const[a,s,d]=(0,e.normalizeDates)(o?.in,r,i.start,i.end);return(0,n.min)([(0,t.max)([a,s],o),d],o)};var e=WI(),t=xk(),n=_k();return kk}var Sk,Mk={};function Pk(){if(Sk)return Mk;Sk=1,Mk.closestIndexTo=function(t,n){const r=+(0,e.toDate)(t);if(isNaN(r))return NaN;let i,o;return n.forEach(((t,n)=>{const a=(0,e.toDate)(t);if(isNaN(+a))return i=NaN,void(o=NaN);const s=Math.abs(r-+a);(null==i||s<o)&&(i=n,o=s)})),i};var e=eI();return Mk}var Ck,jk={};function Nk(){if(Ck)return jk;Ck=1,jk.closestTo=function(r,i,o){const[a,...s]=(0,e.normalizeDates)(o?.in,r,...i),d=(0,t.closestIndexTo)(a,s);return"number"==typeof d&&isNaN(d)?(0,n.constructFrom)(a,NaN):void 0!==d?s[d]:void 0};var e=WI(),t=Pk(),n=K$();return jk}var Rk,Uk={};function Lk(){if(Rk)return Uk;Rk=1,Uk.compareAsc=function(t,n){const r=+(0,e.toDate)(t)-+(0,e.toDate)(n);return r<0?-1:r>0?1:r};var e=eI();return Uk}var qk,Gk={};function zk(){if(qk)return Gk;qk=1,Gk.compareDesc=function(t,n){const r=+(0,e.toDate)(t)-+(0,e.toDate)(n);return r>0?-1:r<0?1:r};var e=eI();return Gk}var Fk,Bk={};function Wk(){if(Fk)return Bk;Fk=1,Bk.constructNow=function(t){return(0,e.constructFrom)(t,Date.now())};var e=K$();return Bk}var Yk,Vk={};function Zk(){if(Yk)return Vk;Yk=1,Vk.daysToWeeks=function(t){const n=Math.trunc(t/e.daysInWeek);return 0===n?0:n};var e=H$();return Vk}var Hk,Kk={},Jk={};function Qk(){if(Hk)return Jk;Hk=1,Jk.isSameDay=function(n,r,i){const[o,a]=(0,e.normalizeDates)(i?.in,n,r);return+(0,t.startOfDay)(o)==+(0,t.startOfDay)(a)};var e=WI(),t=HI();return Jk}var Xk,eE,tE,nE={},rE={};function iE(){return Xk||(Xk=1,rE.isDate=function(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}),rE}function oE(){if(eE)return nE;eE=1,nE.isValid=function(n){return!(!(0,e.isDate)(n)&&"number"!=typeof n||isNaN(+(0,t.toDate)(n)))};var e=iE(),t=eI();return nE}function aE(){if(tE)return Kk;tE=1,Kk.differenceInBusinessDays=function(a,s,d){const[c,u]=(0,e.normalizeDates)(d?.in,a,s);if(!(0,i.isValid)(c)||!(0,i.isValid)(u))return NaN;const l=(0,n.differenceInCalendarDays)(c,u),p=l<0?-1:1,m=Math.trunc(l/7);let f=5*m,h=(0,t.addDays)(u,7*m);for(;!(0,r.isSameDay)(c,h);)f+=(0,o.isWeekend)(h,d)?0:p,h=(0,t.addDays)(h,p);return 0===f?0:f};var e=WI(),t=tI(),n=KI(),r=Qk(),i=oE(),o=gI();return Kk}var sE,dE={};function cE(){if(sE)return dE;sE=1,dE.differenceInCalendarISOWeekYears=function(n,r,i){const[o,a]=(0,e.normalizeDates)(i?.in,n,r);return(0,t.getISOWeekYear)(o,i)-(0,t.getISOWeekYear)(a,i)};var e=WI(),t=RI();return dE}var uE,lE={};function pE(){if(uE)return lE;uE=1,lE.differenceInCalendarISOWeeks=function(i,o,a){const[s,d]=(0,t.normalizeDates)(a?.in,i,o),c=(0,r.startOfISOWeek)(s),u=(0,r.startOfISOWeek)(d),l=+c-(0,e.getTimezoneOffsetInMilliseconds)(c),p=+u-(0,e.getTimezoneOffsetInMilliseconds)(u);return Math.round((l-p)/n.millisecondsInWeek)};var e=zI(),t=WI(),n=H$(),r=NI();return lE}var mE,fE={};function hE(){if(mE)return fE;mE=1,fE.differenceInCalendarMonths=function(t,n,r){const[i,o]=(0,e.normalizeDates)(r?.in,t,n);return 12*(i.getFullYear()-o.getFullYear())+(i.getMonth()-o.getMonth())};var e=WI();return fE}var vE,gE,yE={},bE={};function wE(){if(vE)return bE;vE=1,bE.getQuarter=function(t,n){const r=(0,e.toDate)(t,n?.in);return Math.trunc(r.getMonth()/3)+1};var e=eI();return bE}function $E(){if(gE)return yE;gE=1,yE.differenceInCalendarQuarters=function(n,r,i){const[o,a]=(0,e.normalizeDates)(i?.in,n,r);return 4*(o.getFullYear()-a.getFullYear())+((0,t.getQuarter)(o)-(0,t.getQuarter)(a))};var e=WI(),t=wE();return yE}var IE,kE={};function EE(){if(IE)return kE;IE=1,kE.differenceInCalendarWeeks=function(i,o,a){const[s,d]=(0,t.normalizeDates)(a?.in,i,o),c=(0,r.startOfWeek)(s,a),u=(0,r.startOfWeek)(d,a),l=+c-(0,e.getTimezoneOffsetInMilliseconds)(c),p=+u-(0,e.getTimezoneOffsetInMilliseconds)(u);return Math.round((l-p)/n.millisecondsInWeek)};var e=zI(),t=WI(),n=H$(),r=jI();return kE}var xE,AE={};function TE(){if(xE)return AE;xE=1,AE.differenceInCalendarYears=function(t,n,r){const[i,o]=(0,e.normalizeDates)(r?.in,t,n);return i.getFullYear()-o.getFullYear()};var e=WI();return AE}var OE,_E={};function DE(){if(OE)return _E;OE=1,_E.differenceInDays=function(r,i,o){const[a,s]=(0,e.normalizeDates)(o?.in,r,i),d=n(a,s),c=Math.abs((0,t.differenceInCalendarDays)(a,s));a.setDate(a.getDate()-d*c);const u=d*(c-Number(n(a,s)===-d));return 0===u?0:u};var e=WI(),t=KI();function n(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}return _E}var SE,ME,PE={},CE={};function jE(){return SE||(SE=1,CE.getRoundingMethod=function(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return 0===n?0:n}}),CE}function NE(){if(ME)return PE;ME=1,PE.differenceInHours=function(r,i,o){const[a,s]=(0,t.normalizeDates)(o?.in,r,i),d=(+a-+s)/n.millisecondsInHour;return(0,e.getRoundingMethod)(o?.roundingMethod)(d)};var e=jE(),t=WI(),n=H$();return PE}var RE,UE,LE={},qE={};function GE(){if(RE)return qE;RE=1,qE.subISOWeekYears=function(t,n,r){return(0,e.addISOWeekYears)(t,-n,r)};var e=rk();return qE}function zE(){if(UE)return LE;UE=1,LE.differenceInISOWeekYears=function(i,o,a){const[s,d]=(0,e.normalizeDates)(a?.in,i,o),c=(0,t.compareAsc)(s,d),u=Math.abs((0,n.differenceInCalendarISOWeekYears)(s,d,a)),l=(0,r.subISOWeekYears)(s,c*u,a),p=c*(u-Number((0,t.compareAsc)(l,d)===-c));return 0===p?0:p};var e=WI(),t=Lk(),n=cE(),r=GE();return LE}var FE,BE={};function WE(){if(FE)return BE;FE=1,BE.differenceInMilliseconds=function(t,n){return+(0,e.toDate)(t)-+(0,e.toDate)(n)};var e=eI();return BE}var YE,VE={};function ZE(){if(YE)return VE;YE=1,VE.differenceInMinutes=function(r,i,o){const a=(0,n.differenceInMilliseconds)(r,i)/t.millisecondsInMinute;return(0,e.getRoundingMethod)(o?.roundingMethod)(a)};var e=jE(),t=H$(),n=WE();return VE}var HE,KE={},JE={},QE={};function XE(){if(HE)return QE;HE=1,QE.endOfDay=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setHours(23,59,59,999),r};var e=eI();return QE}var ex,tx,nx,rx={};function ix(){if(ex)return rx;ex=1,rx.endOfMonth=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getMonth();return r.setFullYear(r.getFullYear(),i+1,0),r.setHours(23,59,59,999),r};var e=eI();return rx}function ox(){if(tx)return JE;tx=1,JE.isLastDayOfMonth=function(r,i){const o=(0,n.toDate)(r,i?.in);return+(0,e.endOfDay)(o,i)==+(0,t.endOfMonth)(o,i)};var e=XE(),t=ix(),n=eI();return JE}function ax(){if(nx)return KE;nx=1,KE.differenceInMonths=function(i,o,a){const[s,d,c]=(0,e.normalizeDates)(a?.in,i,i,o),u=(0,t.compareAsc)(d,c),l=Math.abs((0,n.differenceInCalendarMonths)(d,c));if(l<1)return 0;1===d.getMonth()&&d.getDate()>27&&d.setDate(30),d.setMonth(d.getMonth()-u*l);let p=(0,t.compareAsc)(d,c)===-u;(0,r.isLastDayOfMonth)(s)&&1===l&&1===(0,t.compareAsc)(s,c)&&(p=!1);const m=u*(l-+p);return 0===m?0:m};var e=WI(),t=Lk(),n=hE(),r=ox();return KE}var sx,dx={};function cx(){if(sx)return dx;sx=1,dx.differenceInQuarters=function(n,r,i){const o=(0,t.differenceInMonths)(n,r,i)/3;return(0,e.getRoundingMethod)(i?.roundingMethod)(o)};var e=jE(),t=ax();return dx}var ux,lx={};function px(){if(ux)return lx;ux=1,lx.differenceInSeconds=function(n,r,i){const o=(0,t.differenceInMilliseconds)(n,r)/1e3;return(0,e.getRoundingMethod)(i?.roundingMethod)(o)};var e=jE(),t=WE();return lx}var mx,fx={};function hx(){if(mx)return fx;mx=1,fx.differenceInWeeks=function(n,r,i){const o=(0,t.differenceInDays)(n,r,i)/7;return(0,e.getRoundingMethod)(i?.roundingMethod)(o)};var e=jE(),t=DE();return fx}var vx,gx={};function yx(){if(vx)return gx;vx=1,gx.differenceInYears=function(r,i,o){const[a,s]=(0,e.normalizeDates)(o?.in,r,i),d=(0,t.compareAsc)(a,s),c=Math.abs((0,n.differenceInCalendarYears)(a,s));a.setFullYear(1584),s.setFullYear(1584);const u=d*(c-+((0,t.compareAsc)(a,s)===-d));return 0===u?0:u};var e=WI(),t=Lk(),n=TE();return gx}var bx,wx,$x={},Ix={};function kx(){if(bx)return Ix;bx=1,Ix.normalizeInterval=function(t,n){const[r,i]=(0,e.normalizeDates)(t,n.start,n.end);return{start:r,end:i}};var e=WI();return Ix}function Ex(){if(wx)return $x;wx=1,$x.eachDayOfInterval=function(n,r){const{start:i,end:o}=(0,e.normalizeInterval)(r?.in,n);let a=+i>+o;const s=a?+i:+o,d=a?o:i;d.setHours(0,0,0,0);let c=r?.step??1;if(!c)return[];c<0&&(c=-c,a=!a);const u=[];for(;+d<=s;)u.push((0,t.constructFrom)(i,d)),d.setDate(d.getDate()+c),d.setHours(0,0,0,0);return a?u.reverse():u};var e=kx(),t=K$();return $x}var xx,Ax={};function Tx(){if(xx)return Ax;xx=1,Ax.eachHourOfInterval=function(n,r){const{start:i,end:o}=(0,e.normalizeInterval)(r?.in,n);let a=+i>+o;const s=a?+i:+o,d=a?o:i;d.setMinutes(0,0,0);let c=r?.step??1;if(!c)return[];c<0&&(c=-c,a=!a);const u=[];for(;+d<=s;)u.push((0,t.constructFrom)(i,d)),d.setHours(d.getHours()+c);return a?u.reverse():u};var e=kx(),t=K$();return Ax}var Ox,_x={};function Dx(){if(Ox)return _x;Ox=1,_x.eachMinuteOfInterval=function(r,i){const{start:o,end:a}=(0,e.normalizeInterval)(i?.in,r);o.setSeconds(0,0);let s=+o>+a;const d=s?+o:+a;let c=s?a:o,u=i?.step??1;if(!u)return[];u<0&&(u=-u,s=!s);const l=[];for(;+c<=d;)l.push((0,n.constructFrom)(o,c)),c=(0,t.addMinutes)(c,u);return s?l.reverse():l};var e=kx(),t=ak(),n=K$();return _x}var Sx,Mx={};function Px(){if(Sx)return Mx;Sx=1,Mx.eachMonthOfInterval=function(n,r){const{start:i,end:o}=(0,e.normalizeInterval)(r?.in,n);let a=+i>+o;const s=a?+i:+o,d=a?o:i;d.setHours(0,0,0,0),d.setDate(1);let c=r?.step??1;if(!c)return[];c<0&&(c=-c,a=!a);const u=[];for(;+d<=s;)u.push((0,t.constructFrom)(i,d)),d.setMonth(d.getMonth()+c);return a?u.reverse():u};var e=kx(),t=K$();return Mx}var Cx,jx,Nx={},Rx={};function Ux(){if(Cx)return Rx;Cx=1,Rx.startOfQuarter=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getMonth();return r.setMonth(i-i%3,1),r.setHours(0,0,0,0),r};var e=eI();return Rx}function Lx(){if(jx)return Nx;jx=1,Nx.eachQuarterOfInterval=function(i,o){const{start:a,end:s}=(0,e.normalizeInterval)(o?.in,i);let d=+a>+s;const c=d?+(0,r.startOfQuarter)(a):+(0,r.startOfQuarter)(s);let u=(0,r.startOfQuarter)(d?s:a),l=o?.step??1;if(!l)return[];l<0&&(l=-l,d=!d);const p=[];for(;+u<=c;)p.push((0,n.constructFrom)(a,u)),u=(0,t.addQuarters)(u,l);return d?p.reverse():p};var e=kx(),t=ck(),n=K$(),r=Ux();return Nx}var qx,Gx={};function zx(){if(qx)return Gx;qx=1,Gx.eachWeekOfInterval=function(i,o){const{start:a,end:s}=(0,e.normalizeInterval)(o?.in,i);let d=+a>+s;const c=(0,r.startOfWeek)(d?s:a,o),u=(0,r.startOfWeek)(d?a:s,o);c.setHours(15),u.setHours(15);const l=+u.getTime();let p=c,m=o?.step??1;if(!m)return[];m<0&&(m=-m,d=!d);const f=[];for(;+p<=l;)p.setHours(0),f.push((0,n.constructFrom)(a,p)),p=(0,t.addWeeks)(p,m),p.setHours(15);return d?f.reverse():f};var e=kx(),t=hk(),n=K$(),r=jI();return Gx}var Fx,Bx={};function Wx(){if(Fx)return Bx;Fx=1,Bx.eachWeekendOfInterval=function(i,o){const{start:a,end:s}=(0,e.normalizeInterval)(o?.in,i),d=(0,n.eachDayOfInterval)({start:a,end:s},o),c=[];let u=0;for(;u<d.length;){const e=d[u++];(0,r.isWeekend)(e)&&c.push((0,t.constructFrom)(a,e))}return c};var e=kx(),t=K$(),n=Ex(),r=gI();return Bx}var Yx,Vx,Zx={},Hx={};function Kx(){if(Yx)return Hx;Yx=1,Hx.startOfMonth=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setDate(1),r.setHours(0,0,0,0),r};var e=eI();return Hx}function Jx(){if(Vx)return Zx;Vx=1,Zx.eachWeekendOfMonth=function(r,i){const o=(0,n.startOfMonth)(r,i),a=(0,t.endOfMonth)(r,i);return(0,e.eachWeekendOfInterval)({start:o,end:a},i)};var e=Wx(),t=ix(),n=Kx();return Zx}var Qx,Xx={},eA={};function tA(){if(Qx)return eA;Qx=1,eA.endOfYear=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getFullYear();return r.setFullYear(i+1,0,0),r.setHours(23,59,59,999),r};var e=eI();return eA}var nA,rA,iA={};function oA(){if(nA)return iA;nA=1,iA.startOfYear=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r};var e=eI();return iA}function aA(){if(rA)return Xx;rA=1,Xx.eachWeekendOfYear=function(r,i){const o=(0,n.startOfYear)(r,i),a=(0,t.endOfYear)(r,i);return(0,e.eachWeekendOfInterval)({start:o,end:a},i)};var e=Wx(),t=tA(),n=oA();return Xx}var sA,dA={};function cA(){if(sA)return dA;sA=1,dA.eachYearOfInterval=function(n,r){const{start:i,end:o}=(0,e.normalizeInterval)(r?.in,n);let a=+i>+o;const s=a?+i:+o,d=a?o:i;d.setHours(0,0,0,0),d.setMonth(0,1);let c=r?.step??1;if(!c)return[];c<0&&(c=-c,a=!a);const u=[];for(;+d<=s;)u.push((0,t.constructFrom)(i,d)),d.setFullYear(d.getFullYear()+c);return a?u.reverse():u};var e=kx(),t=K$();return dA}var uA,lA={};function pA(){if(uA)return lA;uA=1,lA.endOfDecade=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getFullYear();return r.setFullYear(9+10*Math.floor(i/10),11,31),r.setHours(23,59,59,999),r};var e=eI();return lA}var mA,fA={};function hA(){if(mA)return fA;mA=1,fA.endOfHour=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setMinutes(59,59,999),r};var e=eI();return fA}var vA,gA,yA={},bA={};function wA(){if(vA)return bA;vA=1,bA.endOfWeek=function(n,r){const i=(0,e.getDefaultOptions)(),o=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=(0,t.toDate)(n,r?.in),s=a.getDay(),d=6+(s<o?-7:0)-(s-o);return a.setDate(a.getDate()+d),a.setHours(23,59,59,999),a};var e=CI(),t=eI();return bA}function $A(){if(gA)return yA;gA=1,yA.endOfISOWeek=function(t,n){return(0,e.endOfWeek)(t,{...n,weekStartsOn:1})};var e=wA();return yA}var IA,kA={};function EA(){if(IA)return kA;IA=1,kA.endOfISOWeekYear=function(r,i){const o=(0,t.getISOWeekYear)(r,i),a=(0,e.constructFrom)(i?.in||r,0);a.setFullYear(o+1,0,4),a.setHours(0,0,0,0);const s=(0,n.startOfISOWeek)(a,i);return s.setMilliseconds(s.getMilliseconds()-1),s};var e=K$(),t=RI(),n=NI();return kA}var xA,AA={};function TA(){if(xA)return AA;xA=1,AA.endOfMinute=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setSeconds(59,999),r};var e=eI();return AA}var OA,_A={};function DA(){if(OA)return _A;OA=1,_A.endOfQuarter=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getMonth();return r.setMonth(i-i%3+3,0),r.setHours(23,59,59,999),r};var e=eI();return _A}var SA,MA={};function PA(){if(SA)return MA;SA=1,MA.endOfSecond=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setMilliseconds(999),r};var e=eI();return MA}var CA,jA={};function NA(){if(CA)return jA;CA=1,jA.endOfToday=function(t){return(0,e.endOfDay)(Date.now(),t)};var e=XE();return jA}var RA,UA={};function LA(){if(RA)return UA;RA=1,UA.endOfTomorrow=function(t){const n=(0,e.constructNow)(t?.in),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=(0,e.constructNow)(t?.in);return a.setFullYear(r,i,o+1),a.setHours(23,59,59,999),t?.in?t.in(a):a};var e=Wk();return UA}var qA,GA={};function zA(){if(qA)return GA;qA=1,GA.endOfYesterday=function(n){const r=(0,t.constructNow)(n?.in),i=(0,e.constructFrom)(n?.in,0);return i.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()-1),i.setHours(23,59,59,999),i};var e=K$(),t=Wk();return GA}var FA,BA={},WA={},YA={},VA={};function ZA(){if(FA)return VA;FA=1,VA.formatDistance=void 0;const e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return VA.formatDistance=(t,n,r)=>{let i;const o=e[t];return i="string"==typeof o?o:1===n?o.one:o.other.replace("{{count}}",""+n),r?.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i},VA}var HA,KA,JA={},QA={};function XA(){return HA||(HA=1,QA.buildFormatLongFn=function(e){return(t={})=>e.formats[t.width?t.width+"":e.defaultWidth]||e.formats[e.defaultWidth]}),QA}function eT(){if(KA)return JA;KA=1,JA.formatLong=void 0;var e=XA();return JA.formatLong={date:(0,e.buildFormatLongFn)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,e.buildFormatLongFn)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,e.buildFormatLongFn)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},JA}var tT,nT={};function rT(){if(tT)return nT;tT=1,nT.formatRelative=void 0;const e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};return nT.formatRelative=t=>e[t],nT}var iT,oT,aT={},sT={};function dT(){return iT||(iT=1,sT.buildLocalizeFn=function(e){return(t,n)=>{let r;if("formatting"==(n?.context?n.context+"":"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth;r=e.formattingValues[n?.width?n.width+"":t]||e.formattingValues[t]}else{const t=e.defaultWidth;r=e.values[n?.width?n.width+"":e.defaultWidth]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}),sT}function cT(){if(oT)return aT;oT=1,aT.localize=void 0;var e=dT();return aT.localize={ordinalNumber:e=>{const t=Number(e),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:(0,e.buildLocalizeFn)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,e.buildLocalizeFn)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:(0,e.buildLocalizeFn)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,e.buildLocalizeFn)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,e.buildLocalizeFn)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},aT}var uT,lT={},pT={};function mT(){return uT||(uT=1,pT.buildMatchFn=function(e){return(t,n={})=>{const r=n.width,i=t.match(r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth]);if(!i)return null;const o=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(a)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(a,(e=>e.test(o))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(a,(e=>e.test(o)));let d;return d=e.valueCallback?e.valueCallback(s):s,d=n.valueCallback?n.valueCallback(d):d,{value:d,rest:t.slice(o.length)}}}),pT}var fT,hT,vT,gT,yT={};function bT(){return fT||(fT=1,yT.buildMatchPatternFn=function(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];return a=n.valueCallback?n.valueCallback(a):a,{value:a,rest:t.slice(i.length)}}}),yT}function wT(){if(hT)return lT;hT=1,lT.match=void 0;var e=mT();return lT.match={ordinalNumber:(0,bT().buildMatchPatternFn)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:(0,e.buildMatchFn)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,e.buildMatchFn)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:(0,e.buildMatchFn)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,e.buildMatchFn)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,e.buildMatchFn)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},lT}function $T(){return vT||(vT=1,YA.enUS=void 0,YA.enUS={code:"en-US",formatDistance:ZA().formatDistance,formatLong:eT().formatLong,formatRelative:rT().formatRelative,localize:cT().localize,match:wT().match,options:{weekStartsOn:0,firstWeekContainsDate:1}}),YA}function IT(){return gT||(gT=1,function(){Object.defineProperty(WA,"defaultLocale",{enumerable:!0,get:function(){return e.enUS}});var e=$T()}()),WA}var kT,ET={},xT={};function AT(){if(kT)return xT;kT=1,xT.getDayOfYear=function(r,i){const o=(0,n.toDate)(r,i?.in);return(0,e.differenceInCalendarDays)(o,(0,t.startOfYear)(o))+1};var e=KI(),t=oA(),n=eI();return xT}var TT,OT={};function _T(){if(TT)return OT;TT=1,OT.getISOWeek=function(i,o){const a=(0,r.toDate)(i,o?.in),s=+(0,t.startOfISOWeek)(a)-+(0,n.startOfISOWeekYear)(a);return Math.round(s/e.millisecondsInWeek)+1};var e=H$(),t=NI(),n=tk(),r=eI();return OT}var DT,ST,MT,PT={},CT={},jT={};function NT(){if(DT)return jT;DT=1,jT.getWeekYear=function(i,o){const a=(0,r.toDate)(i,o?.in),s=a.getFullYear(),d=(0,e.getDefaultOptions)(),c=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??d.firstWeekContainsDate??d.locale?.options?.firstWeekContainsDate??1,u=(0,t.constructFrom)(o?.in||i,0);u.setFullYear(s+1,0,c),u.setHours(0,0,0,0);const l=(0,n.startOfWeek)(u,o),p=(0,t.constructFrom)(o?.in||i,0);p.setFullYear(s,0,c),p.setHours(0,0,0,0);const m=(0,n.startOfWeek)(p,o);return+a>=+l?s+1:+a>=+m?s:s-1};var e=CI(),t=K$(),n=jI(),r=eI();return jT}function RT(){if(ST)return CT;ST=1,CT.startOfWeekYear=function(i,o){const a=(0,e.getDefaultOptions)(),s=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,d=(0,n.getWeekYear)(i,o),c=(0,t.constructFrom)(o?.in||i,0);return c.setFullYear(d,0,s),c.setHours(0,0,0,0),(0,r.startOfWeek)(c,o)};var e=CI(),t=K$(),n=NT(),r=jI();return CT}function UT(){if(MT)return PT;MT=1,PT.getWeek=function(i,o){const a=(0,r.toDate)(i,o?.in),s=+(0,t.startOfWeek)(a,o)-+(0,n.startOfWeekYear)(a,o);return Math.round(s/e.millisecondsInWeek)+1};var e=H$(),t=jI(),n=RT(),r=eI();return PT}var LT,qT={};function GT(){return LT||(LT=1,qT.addLeadingZeros=function(e,t){return(e<0?"-":"")+(""+Math.abs(e)).padStart(t,"0")}),qT}var zT,FT,BT={};function WT(){if(zT)return BT;zT=1,BT.lightFormatters=void 0;var e=GT();return BT.lightFormatters={y(t,n){const r=t.getFullYear(),i=r>0?r:1-r;return(0,e.addLeadingZeros)("yy"===n?i%100:i,n.length)},M(t,n){const r=t.getMonth();return"M"===n?r+1+"":(0,e.addLeadingZeros)(r+1,2)},d:(t,n)=>(0,e.addLeadingZeros)(t.getDate(),n.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,n)=>(0,e.addLeadingZeros)(t.getHours()%12||12,n.length),H:(t,n)=>(0,e.addLeadingZeros)(t.getHours(),n.length),m:(t,n)=>(0,e.addLeadingZeros)(t.getMinutes(),n.length),s:(t,n)=>(0,e.addLeadingZeros)(t.getSeconds(),n.length),S(t,n){const r=n.length,i=t.getMilliseconds(),o=Math.trunc(i*Math.pow(10,r-3));return(0,e.addLeadingZeros)(o,n.length)}},BT}function YT(){if(FT)return ET;FT=1,ET.formatters=void 0;var e=AT(),t=_T(),n=RI(),r=UT(),i=NT(),o=GT(),a=WT();function s(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return 0===a?n+(i+""):n+(i+"")+t+(0,o.addLeadingZeros)(a,2)}function d(e,t){return e%60==0?(e>0?"-":"+")+(0,o.addLeadingZeros)(Math.abs(e)/60,2):c(e,t)}function c(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+(0,o.addLeadingZeros)(Math.trunc(r/60),2)+t+(0,o.addLeadingZeros)(r%60,2)}return ET.formatters={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return a.lightFormatters.y(e,t)},Y:function(e,t,n,r){const a=(0,i.getWeekYear)(e,r),s=a>0?a:1-a;return"YY"===t?(0,o.addLeadingZeros)(s%100,2):"Yo"===t?n.ordinalNumber(s,{unit:"year"}):(0,o.addLeadingZeros)(s,t.length)},R:function(e,t){const r=(0,n.getISOWeekYear)(e);return(0,o.addLeadingZeros)(r,t.length)},u:function(e,t){const n=e.getFullYear();return(0,o.addLeadingZeros)(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return r+"";case"QQ":return(0,o.addLeadingZeros)(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return r+"";case"qq":return(0,o.addLeadingZeros)(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return a.lightFormatters.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return r+1+"";case"LL":return(0,o.addLeadingZeros)(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){const a=(0,r.getWeek)(e,i);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):(0,o.addLeadingZeros)(a,t.length)},I:function(e,n,r){const i=(0,t.getISOWeek)(e);return"Io"===n?r.ordinalNumber(i,{unit:"week"}):(0,o.addLeadingZeros)(i,n.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):a.lightFormatters.d(e,t)},D:function(t,n,r){const i=(0,e.getDayOfYear)(t);return"Do"===n?r.ordinalNumber(i,{unit:"dayOfYear"}):(0,o.addLeadingZeros)(i,n.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return a+"";case"ee":return(0,o.addLeadingZeros)(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return a+"";case"cc":return(0,o.addLeadingZeros)(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return i+"";case"ii":return(0,o.addLeadingZeros)(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return a.lightFormatters.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):a.lightFormatters.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):(0,o.addLeadingZeros)(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):(0,o.addLeadingZeros)(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):a.lightFormatters.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):a.lightFormatters.s(e,t)},S:function(e,t){return a.lightFormatters.S(e,t)},X:function(e,t){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return d(n);case"XXXX":case"XX":return c(n);default:return c(n,":")}},x:function(e,t){const n=e.getTimezoneOffset();switch(t){case"x":return d(n);case"xxxx":case"xx":return c(n);default:return c(n,":")}},O:function(e,t){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+s(n,":");default:return"GMT"+c(n,":")}},z:function(e,t){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+s(n,":");default:return"GMT"+c(n,":")}},t:function(e,t){const n=Math.trunc(+e/1e3);return(0,o.addLeadingZeros)(n,t.length)},T:function(e,t){return(0,o.addLeadingZeros)(+e,t.length)}},ET}var VT,ZT={};function HT(){if(VT)return ZT;VT=1,ZT.longFormatters=void 0;const e=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},t=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};return ZT.longFormatters={p:t,P:(n,r)=>{const i=n.match(/(P+)(p+)?/)||[],o=i[1],a=i[2];if(!a)return e(n,r);let s;switch(o){case"P":s=r.dateTime({width:"short"});break;case"PP":s=r.dateTime({width:"medium"});break;case"PPP":s=r.dateTime({width:"long"});break;default:s=r.dateTime({width:"full"})}return s.replace("{{date}}",e(o,r)).replace("{{time}}",t(a,r))}},ZT}var KT,JT,QT={};function XT(){if(KT)return QT;KT=1,QT.isProtectedDayOfYearToken=function(t){return e.test(t)},QT.isProtectedWeekYearToken=function(e){return t.test(e)},QT.warnOrThrowProtectedError=function(e,t,r){const i=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(i),n.includes(e))throw new RangeError(i)};const e=/^D+$/,t=/^Y+$/,n=["D","DD","YY","YYYY"];return QT}function eO(){return JT||(JT=1,function(e){e.format=e.formatDate=function(e,u,l){const f=(0,n.getDefaultOptions)(),h=l?.locale??f.locale??t.defaultLocale,v=l?.firstWeekContainsDate??l?.locale?.options?.firstWeekContainsDate??f.firstWeekContainsDate??f.locale?.options?.firstWeekContainsDate??1,g=l?.weekStartsOn??l?.locale?.options?.weekStartsOn??f.weekStartsOn??f.locale?.options?.weekStartsOn??0,y=(0,s.toDate)(e,l?.in);if(!(0,a.isValid)(y))throw new RangeError("Invalid time value");let b=u.match(c).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,i.longFormatters[t])(e,h.formatLong):e})).join("").match(d).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:m(e)};if(r.formatters[t])return{isToken:!0,value:e};if(t.match(p))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));h.localize.preprocessor&&(b=h.localize.preprocessor(y,b));const w={firstWeekContainsDate:v,weekStartsOn:g,locale:h};return b.map((t=>{if(!t.isToken)return t.value;const n=t.value;return(!l?.useAdditionalWeekYearTokens&&(0,o.isProtectedWeekYearToken)(n)||!l?.useAdditionalDayOfYearTokens&&(0,o.isProtectedDayOfYearToken)(n))&&(0,o.warnOrThrowProtectedError)(n,u,e+""),(0,r.formatters[n[0]])(y,n,h.localize,w)})).join("")},Object.defineProperty(e,"formatters",{enumerable:!0,get:function(){return r.formatters}}),Object.defineProperty(e,"longFormatters",{enumerable:!0,get:function(){return i.longFormatters}});var t=IT(),n=CI(),r=YT(),i=HT(),o=XT(),a=oE(),s=eI();const d=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,c=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,u=/^'([^]*?)'?$/,l=/''/g,p=/[a-zA-Z]/;function m(e){const t=e.match(u);return t?t[1].replace(l,"'"):e}}(BA)),BA}var tO,nO={};function rO(){if(tO)return nO;tO=1,nO.formatDistance=function(d,c,u){const l=(0,t.getDefaultOptions)(),p=u?.locale??l.locale??e.defaultLocale,m=(0,i.compareAsc)(d,c);if(isNaN(m))throw new RangeError("Invalid time value");const f=Object.assign({},u,{addSuffix:u?.addSuffix,comparison:m}),[h,v]=(0,r.normalizeDates)(u?.in,...m>0?[c,d]:[d,c]),g=(0,s.differenceInSeconds)(v,h),y=((0,n.getTimezoneOffsetInMilliseconds)(v)-(0,n.getTimezoneOffsetInMilliseconds)(h))/1e3,b=Math.round((g-y)/60);let w;if(b<2)return u?.includeSeconds?g<5?p.formatDistance("lessThanXSeconds",5,f):g<10?p.formatDistance("lessThanXSeconds",10,f):g<20?p.formatDistance("lessThanXSeconds",20,f):g<40?p.formatDistance("halfAMinute",0,f):p.formatDistance(g<60?"lessThanXMinutes":"xMinutes",1,f):0===b?p.formatDistance("lessThanXMinutes",1,f):p.formatDistance("xMinutes",b,f);if(b<45)return p.formatDistance("xMinutes",b,f);if(b<90)return p.formatDistance("aboutXHours",1,f);if(b<o.minutesInDay)return p.formatDistance("aboutXHours",Math.round(b/60),f);if(b<2520)return p.formatDistance("xDays",1,f);if(b<o.minutesInMonth)return p.formatDistance("xDays",Math.round(b/o.minutesInDay),f);if(b<2*o.minutesInMonth)return w=Math.round(b/o.minutesInMonth),p.formatDistance("aboutXMonths",w,f);if(w=(0,a.differenceInMonths)(v,h),w<12)return p.formatDistance("xMonths",Math.round(b/o.minutesInMonth),f);{const e=w%12,t=Math.trunc(w/12);return e<3?p.formatDistance("aboutXYears",t,f):e<9?p.formatDistance("overXYears",t,f):p.formatDistance("almostXYears",t+1,f)}};var e=IT(),t=CI(),n=zI(),r=WI(),i=Lk(),o=H$(),a=ax(),s=px();return nO}var iO,oO={};function aO(){if(iO)return oO;iO=1,oO.formatDistanceStrict=function(s,d,c){const u=(0,t.getDefaultOptions)(),l=c?.locale??u.locale??e.defaultLocale,p=(0,o.compareAsc)(s,d);if(isNaN(p))throw new RangeError("Invalid time value");const m=Object.assign({},c,{addSuffix:c?.addSuffix,comparison:p}),[f,h]=(0,i.normalizeDates)(c?.in,...p>0?[d,s]:[s,d]),v=(0,n.getRoundingMethod)(c?.roundingMethod??"round"),g=h.getTime()-f.getTime(),y=g/a.millisecondsInMinute,b=(g-((0,r.getTimezoneOffsetInMilliseconds)(h)-(0,r.getTimezoneOffsetInMilliseconds)(f)))/a.millisecondsInMinute,w=c?.unit;let $;if($=w||(y<1?"second":y<60?"minute":y<a.minutesInDay?"hour":b<a.minutesInMonth?"day":b<a.minutesInYear?"month":"year"),"second"===$){const e=v(g/1e3);return l.formatDistance("xSeconds",e,m)}if("minute"===$){const e=v(y);return l.formatDistance("xMinutes",e,m)}if("hour"===$){const e=v(y/60);return l.formatDistance("xHours",e,m)}if("day"===$){const e=v(b/a.minutesInDay);return l.formatDistance("xDays",e,m)}if("month"===$){const e=v(b/a.minutesInMonth);return 12===e&&"month"!==w?l.formatDistance("xYears",1,m):l.formatDistance("xMonths",e,m)}{const e=v(b/a.minutesInYear);return l.formatDistance("xYears",e,m)}};var e=IT(),t=CI(),n=jE(),r=zI(),i=WI(),o=Lk(),a=H$();return oO}var sO,dO={};function cO(){if(sO)return dO;sO=1,dO.formatDistanceToNow=function(n,r){return(0,t.formatDistance)(n,(0,e.constructNow)(n),r)};var e=Wk(),t=rO();return dO}var uO,lO={};function pO(){if(uO)return lO;uO=1,lO.formatDistanceToNowStrict=function(n,r){return(0,t.formatDistanceStrict)(n,(0,e.constructNow)(n),r)};var e=Wk(),t=aO();return lO}var mO,fO={};function hO(){if(mO)return fO;mO=1,fO.formatDuration=function(r,i){const o=(0,t.getDefaultOptions)(),a=i?.locale??o.locale??e.defaultLocale,s=i?.format??n,d=i?.zero??!1,c=i?.delimiter??" ";if(!a.formatDistance)return"";const u=s.reduce(((e,t)=>{const n="x"+t.replace(/(^.)/,(e=>e.toUpperCase())),i=r[t];return void 0!==i&&(d||r[t])?e.concat(a.formatDistance(n,i)):e}),[]).join(c);return u};var e=IT(),t=CI();const n=["years","months","weeks","days","hours","minutes","seconds"];return fO}var vO,gO={};function yO(){if(vO)return gO;vO=1,gO.formatISO=function(n,r){const i=(0,t.toDate)(n,r?.in);if(isNaN(+i))throw new RangeError("Invalid time value");const o=r?.format??"extended",a=r?.representation??"complete";let s="",d="";const c="extended"===o?"-":"",u="extended"===o?":":"";if("time"!==a){const t=(0,e.addLeadingZeros)(i.getDate(),2),n=(0,e.addLeadingZeros)(i.getMonth()+1,2);s=`${(0,e.addLeadingZeros)(i.getFullYear(),4)}${c}${n}${c}${t}`}if("date"!==a){const t=i.getTimezoneOffset();if(0!==t){const n=Math.abs(t);d=`${t<0?"+":"-"}${(0,e.addLeadingZeros)(Math.trunc(n/60),2)}:${(0,e.addLeadingZeros)(n%60,2)}`}else d="Z";s=`${s}${""===s?"":"T"}${[(0,e.addLeadingZeros)(i.getHours(),2),(0,e.addLeadingZeros)(i.getMinutes(),2),(0,e.addLeadingZeros)(i.getSeconds(),2)].join(u)}${d}`}return s};var e=GT(),t=eI();return gO}var bO,wO={};function $O(){if(bO)return wO;bO=1,wO.formatISO9075=function(r,i){const o=(0,n.toDate)(r,i?.in);if(!(0,t.isValid)(o))throw new RangeError("Invalid time value");const a=i?.format??"extended",s=i?.representation??"complete";let d="";const c="extended"===a?"-":"",u="extended"===a?":":"";if("time"!==s){const t=(0,e.addLeadingZeros)(o.getDate(),2),n=(0,e.addLeadingZeros)(o.getMonth()+1,2);d=`${(0,e.addLeadingZeros)(o.getFullYear(),4)}${c}${n}${c}${t}`}return"date"!==s&&(d=`${d}${""===d?"":" "}${(0,e.addLeadingZeros)(o.getHours(),2)}${u}${(0,e.addLeadingZeros)(o.getMinutes(),2)}${u}${(0,e.addLeadingZeros)(o.getSeconds(),2)}`),d};var e=GT(),t=oE(),n=eI();return wO}var IO,kO={};function EO(){return IO||(IO=1,kO.formatISODuration=function(e){const{years:t=0,months:n=0,days:r=0,hours:i=0,minutes:o=0,seconds:a=0}=e;return`P${t}Y${n}M${r}DT${i}H${o}M${a}S`}),kO}var xO,AO={};function TO(){if(xO)return AO;xO=1,AO.formatRFC3339=function(r,i){const o=(0,n.toDate)(r,i?.in);if(!(0,t.isValid)(o))throw new RangeError("Invalid time value");const a=i?.fractionDigits??0,s=(0,e.addLeadingZeros)(o.getDate(),2),d=(0,e.addLeadingZeros)(o.getMonth()+1,2),c=o.getFullYear(),u=(0,e.addLeadingZeros)(o.getHours(),2),l=(0,e.addLeadingZeros)(o.getMinutes(),2),p=(0,e.addLeadingZeros)(o.getSeconds(),2);let m="";if(a>0){const t=o.getMilliseconds(),n=Math.trunc(t*Math.pow(10,a-3));m="."+(0,e.addLeadingZeros)(n,a)}let f="";const h=o.getTimezoneOffset();if(0!==h){const t=Math.abs(h);f=`${h<0?"+":"-"}${(0,e.addLeadingZeros)(Math.trunc(t/60),2)}:${(0,e.addLeadingZeros)(t%60,2)}`}else f="Z";return`${c}-${d}-${s}T${u}:${l}:${p}${m}${f}`};var e=GT(),t=oE(),n=eI();return AO}var OO,_O={};function DO(){if(OO)return _O;OO=1,_O.formatRFC7231=function(o){const a=(0,n.toDate)(o);if(!(0,t.isValid)(a))throw new RangeError("Invalid time value");return`${r[a.getUTCDay()]}, ${(0,e.addLeadingZeros)(a.getUTCDate(),2)} ${i[a.getUTCMonth()]} ${a.getUTCFullYear()} ${(0,e.addLeadingZeros)(a.getUTCHours(),2)}:${(0,e.addLeadingZeros)(a.getUTCMinutes(),2)}:${(0,e.addLeadingZeros)(a.getUTCSeconds(),2)} GMT`};var e=GT(),t=oE(),n=eI();const r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return _O}var SO,MO={};function PO(){if(SO)return MO;SO=1,MO.formatRelative=function(o,a,s){const[d,c]=(0,n.normalizeDates)(s?.in,o,a),u=(0,t.getDefaultOptions)(),l=s?.locale??u.locale??e.defaultLocale,p=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??u.weekStartsOn??u.locale?.options?.weekStartsOn??0,m=(0,r.differenceInCalendarDays)(d,c);if(isNaN(m))throw new RangeError("Invalid time value");let f;f=m<-6?"other":m<-1?"lastWeek":m<0?"yesterday":m<1?"today":m<2?"tomorrow":m<7?"nextWeek":"other";const h=l.formatRelative(f,d,c,{locale:l,weekStartsOn:p});return(0,i.format)(d,h,{locale:l,weekStartsOn:p})};var e=IT(),t=CI(),n=WI(),r=KI(),i=eO();return MO}var CO,jO={};function NO(){if(CO)return jO;CO=1,jO.fromUnixTime=function(t,n){return(0,e.toDate)(1e3*t,n?.in)};var e=eI();return jO}var RO,UO={};function LO(){if(RO)return UO;RO=1,UO.getDate=function(t,n){return(0,e.toDate)(t,n?.in).getDate()};var e=eI();return UO}var qO,GO={};function zO(){if(qO)return GO;qO=1,GO.getDay=function(t,n){return(0,e.toDate)(t,n?.in).getDay()};var e=eI();return GO}var FO,BO={};function WO(){if(FO)return BO;FO=1,BO.getDaysInMonth=function(n,r){const i=(0,t.toDate)(n,r?.in),o=i.getFullYear(),a=i.getMonth(),s=(0,e.constructFrom)(i,0);return s.setFullYear(o,a+1,0),s.setHours(0,0,0,0),s.getDate()};var e=K$(),t=eI();return BO}var YO,VO,ZO={},HO={};function KO(){if(YO)return HO;YO=1,HO.isLeapYear=function(t,n){const r=(0,e.toDate)(t,n?.in).getFullYear();return r%400==0||r%4==0&&r%100!=0};var e=eI();return HO}function JO(){if(VO)return ZO;VO=1,ZO.getDaysInYear=function(n,r){const i=(0,t.toDate)(n,r?.in);return Number.isNaN(+i)?NaN:(0,e.isLeapYear)(i)?366:365};var e=KO(),t=eI();return ZO}var QO,XO={};function e_(){if(QO)return XO;QO=1,XO.getDecade=function(t,n){const r=(0,e.toDate)(t,n?.in).getFullYear();return 10*Math.floor(r/10)};var e=eI();return XO}var t_,n_={};function r_(){if(t_)return n_;t_=1,n_.getDefaultOptions=function(){return Object.assign({},(0,e.getDefaultOptions)())};var e=CI();return n_}var i_,o_={};function a_(){if(i_)return o_;i_=1,o_.getHours=function(t,n){return(0,e.toDate)(t,n?.in).getHours()};var e=eI();return o_}var s_,d_={};function c_(){if(s_)return d_;s_=1,d_.getISODay=function(t,n){const r=(0,e.toDate)(t,n?.in).getDay();return 0===r?7:r};var e=eI();return d_}var u_,l_={};function p_(){if(u_)return l_;u_=1,l_.getISOWeeksInYear=function(r,i){const o=(0,n.startOfISOWeekYear)(r,i),a=(0,n.startOfISOWeekYear)((0,e.addWeeks)(o,60));return Math.round((+a-+o)/t.millisecondsInWeek)};var e=hk(),t=H$(),n=tk();return l_}var m_,f_={};function h_(){if(m_)return f_;m_=1,f_.getMilliseconds=function(t){return(0,e.toDate)(t).getMilliseconds()};var e=eI();return f_}var v_,g_={};function y_(){if(v_)return g_;v_=1,g_.getMinutes=function(t,n){return(0,e.toDate)(t,n?.in).getMinutes()};var e=eI();return g_}var b_,w_={};function $_(){if(b_)return w_;b_=1,w_.getMonth=function(t,n){return(0,e.toDate)(t,n?.in).getMonth()};var e=eI();return w_}var I_,k_={};function E_(){if(I_)return k_;I_=1,k_.getOverlappingDaysInIntervals=function(r,i){const[o,a]=[+(0,n.toDate)(r.start),+(0,n.toDate)(r.end)].sort(((e,t)=>e-t)),[s,d]=[+(0,n.toDate)(i.start),+(0,n.toDate)(i.end)].sort(((e,t)=>e-t));if(!(o<d&&s<a))return 0;const c=s<o?o:s,u=c-(0,e.getTimezoneOffsetInMilliseconds)(c),l=d>a?a:d,p=l-(0,e.getTimezoneOffsetInMilliseconds)(l);return Math.ceil((p-u)/t.millisecondsInDay)};var e=zI(),t=H$(),n=eI();return k_}var x_,A_={};function T_(){if(x_)return A_;x_=1,A_.getSeconds=function(t){return(0,e.toDate)(t).getSeconds()};var e=eI();return A_}var O_,__={};function D_(){if(O_)return __;O_=1,__.getTime=function(t){return+(0,e.toDate)(t)};var e=eI();return __}var S_,M_={};function P_(){if(S_)return M_;S_=1,M_.getUnixTime=function(t){return Math.trunc(+(0,e.toDate)(t)/1e3)};var e=eI();return M_}var C_,j_={};function N_(){if(C_)return j_;C_=1,j_.getWeekOfMonth=function(o,a){const s=(0,e.getDefaultOptions)(),d=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=(0,t.getDate)((0,i.toDate)(o,a?.in));if(isNaN(c))return NaN;let u=d-(0,n.getDay)((0,r.startOfMonth)(o,a));return u<=0&&(u+=7),Math.ceil((c-u)/7)+1};var e=CI(),t=LO(),n=zO(),r=Kx(),i=eI();return j_}var R_,U_,L_={},q_={};function G_(){if(R_)return q_;R_=1,q_.lastDayOfMonth=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getMonth();return r.setFullYear(r.getFullYear(),i+1,0),r.setHours(0,0,0,0),(0,e.toDate)(r,n?.in)};var e=eI();return q_}function z_(){if(U_)return L_;U_=1,L_.getWeeksInMonth=function(i,o){const a=(0,r.toDate)(i,o?.in);return(0,e.differenceInCalendarWeeks)((0,t.lastDayOfMonth)(a,o),(0,n.startOfMonth)(a,o),o)+1};var e=EE(),t=G_(),n=Kx(),r=eI();return L_}var F_,B_={};function W_(){if(F_)return B_;F_=1,B_.getYear=function(t,n){return(0,e.toDate)(t,n?.in).getFullYear()};var e=eI();return B_}var Y_,V_={};function Z_(){if(Y_)return V_;Y_=1,V_.hoursToMilliseconds=function(t){return Math.trunc(t*e.millisecondsInHour)};var e=H$();return V_}var H_,K_={};function J_(){if(H_)return K_;H_=1,K_.hoursToMinutes=function(t){return Math.trunc(t*e.minutesInHour)};var e=H$();return K_}var Q_,X_={};function eD(){if(Q_)return X_;Q_=1,X_.hoursToSeconds=function(t){return Math.trunc(t*e.secondsInHour)};var e=H$();return X_}var tD,nD={};function rD(){if(tD)return nD;tD=1,nD.interval=function(t,n,r){const[i,o]=(0,e.normalizeDates)(r?.in,t,n);if(isNaN(+i))throw new TypeError("Start date is invalid");if(isNaN(+o))throw new TypeError("End date is invalid");if(r?.assertPositive&&+i>+o)throw new TypeError("End date must be after start date");return{start:i,end:o}};var e=WI();return nD}var iD,oD={};function aD(){if(iD)return oD;iD=1,oD.intervalToDuration=function(d,c){const{start:u,end:l}=(0,e.normalizeInterval)(c?.in,d),p={},m=(0,s.differenceInYears)(l,u);m&&(p.years=m);const f=(0,t.add)(u,{years:p.years}),h=(0,o.differenceInMonths)(l,f);h&&(p.months=h);const v=(0,t.add)(f,{months:p.months}),g=(0,n.differenceInDays)(l,v);g&&(p.days=g);const y=(0,t.add)(v,{days:p.days}),b=(0,r.differenceInHours)(l,y);b&&(p.hours=b);const w=(0,t.add)(y,{hours:p.hours}),$=(0,i.differenceInMinutes)(l,w);$&&(p.minutes=$);const I=(0,t.add)(w,{minutes:p.minutes}),k=(0,a.differenceInSeconds)(l,I);return k&&(p.seconds=k),p};var e=kx(),t=aI(),n=DE(),r=NE(),i=ZE(),o=ax(),a=px(),s=yx();return oD}var sD,dD={};function cD(){if(sD)return dD;sD=1,dD.intlFormat=function(t,n,r){let i;return!function(e){return void 0!==e&&!("locale"in e)}(n)?r=n:i=n,new Intl.DateTimeFormat(r?.locale,i).format((0,e.toDate)(t))};var e=eI();return dD}var uD,lD={};function pD(){if(uD)return lD;uD=1,lD.intlFormatDistance=function(u,l,p){let m,f=0;const[h,v]=(0,e.normalizeDates)(p?.in,u,l);if(p?.unit)m=p?.unit,"second"===m?f=(0,c.differenceInSeconds)(h,v):"minute"===m?f=(0,d.differenceInMinutes)(h,v):"hour"===m?f=(0,s.differenceInHours)(h,v):"day"===m?f=(0,n.differenceInCalendarDays)(h,v):"week"===m?f=(0,o.differenceInCalendarWeeks)(h,v):"month"===m?f=(0,r.differenceInCalendarMonths)(h,v):"quarter"===m?f=(0,i.differenceInCalendarQuarters)(h,v):"year"===m&&(f=(0,a.differenceInCalendarYears)(h,v));else{const e=(0,c.differenceInSeconds)(h,v);Math.abs(e)<t.secondsInMinute?(f=(0,c.differenceInSeconds)(h,v),m="second"):Math.abs(e)<t.secondsInHour?(f=(0,d.differenceInMinutes)(h,v),m="minute"):Math.abs(e)<t.secondsInDay&&Math.abs((0,n.differenceInCalendarDays)(h,v))<1?(f=(0,s.differenceInHours)(h,v),m="hour"):Math.abs(e)<t.secondsInWeek&&(f=(0,n.differenceInCalendarDays)(h,v))&&Math.abs(f)<7?m="day":Math.abs(e)<t.secondsInMonth?(f=(0,o.differenceInCalendarWeeks)(h,v),m="week"):Math.abs(e)<t.secondsInQuarter?(f=(0,r.differenceInCalendarMonths)(h,v),m="month"):Math.abs(e)<t.secondsInYear&&(0,i.differenceInCalendarQuarters)(h,v)<4?(f=(0,i.differenceInCalendarQuarters)(h,v),m="quarter"):(f=(0,a.differenceInCalendarYears)(h,v),m="year")}return new Intl.RelativeTimeFormat(p?.locale,{numeric:"auto",...p}).format(f,m)};var e=WI(),t=H$(),n=KI(),r=hE(),i=$E(),o=EE(),a=TE(),s=NE(),d=ZE(),c=px();return lD}var mD,fD={};function hD(){if(mD)return fD;mD=1,fD.isAfter=function(t,n){return+(0,e.toDate)(t)>+(0,e.toDate)(n)};var e=eI();return fD}var vD,gD={};function yD(){if(vD)return gD;vD=1,gD.isBefore=function(t,n){return+(0,e.toDate)(t)<+(0,e.toDate)(n)};var e=eI();return gD}var bD,wD={};function $D(){if(bD)return wD;bD=1,wD.isEqual=function(t,n){return+(0,e.toDate)(t)==+(0,e.toDate)(n)};var e=eI();return wD}var ID,kD={};function ED(){return ID||(ID=1,kD.isExists=function(e,t,n){const r=new Date(e,t,n);return r.getFullYear()===e&&r.getMonth()===t&&r.getDate()===n}),kD}var xD,AD={};function TD(){if(xD)return AD;xD=1,AD.isFirstDayOfMonth=function(t,n){return 1===(0,e.toDate)(t,n?.in).getDate()};var e=eI();return AD}var OD,_D={};function DD(){if(OD)return _D;OD=1,_D.isFriday=function(t,n){return 5===(0,e.toDate)(t,n?.in).getDay()};var e=eI();return _D}var SD,MD={};function PD(){if(SD)return MD;SD=1,MD.isFuture=function(t){return+(0,e.toDate)(t)>Date.now()};var e=eI();return MD}var CD,jD,ND={},RD={},UD={},LD={};function qD(){if(CD)return LD;CD=1,LD.transpose=function(t,n){const r=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(n)?new n(0):(0,e.constructFrom)(n,0);return r.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r};var e=K$();return LD}function GD(){if(jD)return UD;jD=1,UD.ValueSetter=UD.Setter=UD.DateTimezoneSetter=void 0;var e=K$(),t=qD();let n=class{subPriority=0;validate(e,t){return!0}};return UD.Setter=n,UD.ValueSetter=class extends n{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}},UD.DateTimezoneSetter=class extends n{priority=10;subPriority=-1;constructor(t,n){super(),this.context=t||(t=>(0,e.constructFrom)(n,t))}set(n,r){return r.timestampIsSet?n:(0,e.constructFrom)(n,(0,t.transpose)(n,this.context))}},UD}var zD,FD,BD={},WD={},YD={};function VD(){if(zD)return YD;zD=1,YD.Parser=void 0;var e=GD();return YD.Parser=class{run(t,n,r,i){const o=this.parse(t,n,r,i);return o?{setter:new e.ValueSetter(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,t,n){return!0}},YD}function ZD(){if(FD)return WD;FD=1,WD.EraParser=void 0;var e=VD();return WD.EraParser=class extends e.Parser{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},WD}var HD,KD,JD,QD={},XD={},eS={};function tS(){return HD||(HD=1,eS.timezonePatterns=eS.numericPatterns=void 0,eS.numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},eS.timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/}),eS}function nS(){if(KD)return XD;KD=1,XD.dayPeriodEnumToHours=function(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}},XD.isLeapYearIndex=function(e){return e%400==0||e%4==0&&e%100!=0},XD.mapValue=function(e,t){return e?{value:t(e.value),rest:e.rest}:e},XD.normalizeTwoDigitYear=function(e,t){const n=t>0,r=n?t:1-t;let i;if(r<=50)i=e||100;else{const t=r+50;i=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?i:1-i},XD.parseAnyDigitsSigned=function(e){return n(t.numericPatterns.anyDigitsSigned,e)},XD.parseNDigits=function(e,r){switch(e){case 1:return n(t.numericPatterns.singleDigit,r);case 2:return n(t.numericPatterns.twoDigits,r);case 3:return n(t.numericPatterns.threeDigits,r);case 4:return n(t.numericPatterns.fourDigits,r);default:return n(RegExp("^\\d{1,"+e+"}"),r)}},XD.parseNDigitsSigned=function(e,r){switch(e){case 1:return n(t.numericPatterns.singleDigitSigned,r);case 2:return n(t.numericPatterns.twoDigitsSigned,r);case 3:return n(t.numericPatterns.threeDigitsSigned,r);case 4:return n(t.numericPatterns.fourDigitsSigned,r);default:return n(RegExp("^-?\\d{1,"+e+"}"),r)}},XD.parseNumericPattern=n,XD.parseTimezonePattern=function(t,n){const r=n.match(t);return r?"Z"===r[0]?{value:0,rest:n.slice(1)}:{value:("+"===r[1]?1:-1)*((r[2]?parseInt(r[2],10):0)*e.millisecondsInHour+(r[3]?parseInt(r[3],10):0)*e.millisecondsInMinute+(r[5]?parseInt(r[5],10):0)*e.millisecondsInSecond),rest:n.slice(r[0].length)}:null};var e=H$(),t=tS();function n(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}return XD}function rS(){if(JD)return QD;JD=1,QD.YearParser=void 0;var e=VD(),t=nS();return QD.YearParser=class extends e.Parser{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,r){const i=e=>({year:e,isTwoDigitYear:"yy"===n});switch(n){case"y":return(0,t.mapValue)((0,t.parseNDigits)(4,e),i);case"yo":return(0,t.mapValue)(r.ordinalNumber(e,{unit:"year"}),i);default:return(0,t.mapValue)((0,t.parseNDigits)(n.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,n,r){const i=e.getFullYear();if(r.isTwoDigitYear){const n=(0,t.normalizeTwoDigitYear)(r.year,i);return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}return e.setFullYear("era"in n&&1!==n.era?1-r.year:r.year,0,1),e.setHours(0,0,0,0),e}},QD}var iS,oS={};function aS(){if(iS)return oS;iS=1,oS.LocalWeekYearParser=void 0;var e=NT(),t=jI(),n=VD(),r=nS();return oS.LocalWeekYearParser=class extends n.Parser{priority=130;parse(e,t,n){const i=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return(0,r.mapValue)((0,r.parseNDigits)(4,e),i);case"Yo":return(0,r.mapValue)(n.ordinalNumber(e,{unit:"year"}),i);default:return(0,r.mapValue)((0,r.parseNDigits)(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(n,i,o,a){const s=(0,e.getWeekYear)(n,a);if(o.isTwoDigitYear){const e=(0,r.normalizeTwoDigitYear)(o.year,s);return n.setFullYear(e,0,a.firstWeekContainsDate),n.setHours(0,0,0,0),(0,t.startOfWeek)(n,a)}return n.setFullYear("era"in i&&1!==i.era?1-o.year:o.year,0,a.firstWeekContainsDate),n.setHours(0,0,0,0),(0,t.startOfWeek)(n,a)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},oS}var sS,dS={};function cS(){if(sS)return dS;sS=1,dS.ISOWeekYearParser=void 0;var e=NI(),t=K$(),n=VD(),r=nS();return dS.ISOWeekYearParser=class extends n.Parser{priority=130;parse(e,t){return(0,r.parseNDigitsSigned)("R"===t?4:t.length,e)}set(n,r,i){const o=(0,t.constructFrom)(n,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),(0,e.startOfISOWeek)(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},dS}var uS,lS={};function pS(){if(uS)return lS;uS=1,lS.ExtendedYearParser=void 0;var e=VD(),t=nS();return lS.ExtendedYearParser=class extends e.Parser{priority=130;parse(e,n){return(0,t.parseNDigitsSigned)("u"===n?4:n.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},lS}var mS,fS={};function hS(){if(mS)return fS;mS=1,fS.QuarterParser=void 0;var e=VD(),t=nS();return fS.QuarterParser=class extends e.Parser{priority=120;parse(e,n,r){switch(n){case"Q":case"QQ":return(0,t.parseNDigits)(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},fS}var vS,gS={};function yS(){if(vS)return gS;vS=1,gS.StandAloneQuarterParser=void 0;var e=VD(),t=nS();return gS.StandAloneQuarterParser=class extends e.Parser{priority=120;parse(e,n,r){switch(n){case"q":case"qq":return(0,t.parseNDigits)(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},gS}var bS,wS={};function $S(){if(bS)return wS;bS=1,wS.MonthParser=void 0;var e=tS(),t=VD(),n=nS();return wS.MonthParser=class extends t.Parser{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,r,i){const o=e=>e-1;switch(r){case"M":return(0,n.mapValue)((0,n.parseNumericPattern)(e.numericPatterns.month,t),o);case"MM":return(0,n.mapValue)((0,n.parseNDigits)(2,t),o);case"Mo":return(0,n.mapValue)(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},wS}var IS,kS={};function ES(){if(IS)return kS;IS=1,kS.StandAloneMonthParser=void 0;var e=tS(),t=VD(),n=nS();return kS.StandAloneMonthParser=class extends t.Parser{priority=110;parse(t,r,i){const o=e=>e-1;switch(r){case"L":return(0,n.mapValue)((0,n.parseNumericPattern)(e.numericPatterns.month,t),o);case"LL":return(0,n.mapValue)((0,n.parseNDigits)(2,t),o);case"Lo":return(0,n.mapValue)(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},kS}var xS,AS,TS={},OS={};function _S(){if(xS)return OS;xS=1,OS.setWeek=function(n,r,i){const o=(0,t.toDate)(n,i?.in),a=(0,e.getWeek)(o,i)-r;return o.setDate(o.getDate()-7*a),(0,t.toDate)(o,i?.in)};var e=UT(),t=eI();return OS}function DS(){if(AS)return TS;AS=1,TS.LocalWeekParser=void 0;var e=_S(),t=jI(),n=tS(),r=VD(),i=nS();return TS.LocalWeekParser=class extends r.Parser{priority=100;parse(e,t,r){switch(t){case"w":return(0,i.parseNumericPattern)(n.numericPatterns.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return(0,i.parseNDigits)(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(n,r,i,o){return(0,t.startOfWeek)((0,e.setWeek)(n,i,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},TS}var SS,MS,PS={},CS={};function jS(){if(SS)return CS;SS=1,CS.setISOWeek=function(n,r,i){const o=(0,t.toDate)(n,i?.in),a=(0,e.getISOWeek)(o,i)-r;return o.setDate(o.getDate()-7*a),o};var e=_T(),t=eI();return CS}function NS(){if(MS)return PS;MS=1,PS.ISOWeekParser=void 0;var e=jS(),t=NI(),n=tS(),r=VD(),i=nS();return PS.ISOWeekParser=class extends r.Parser{priority=100;parse(e,t,r){switch(t){case"I":return(0,i.parseNumericPattern)(n.numericPatterns.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return(0,i.parseNDigits)(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(n,r,i){return(0,t.startOfISOWeek)((0,e.setISOWeek)(n,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},PS}var RS,US={};function LS(){if(RS)return US;RS=1,US.DateParser=void 0;var e=tS(),t=VD(),n=nS();const r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,29,31,30,31,30,31,31,30,31,30,31];return US.DateParser=class extends t.Parser{priority=90;subPriority=1;parse(t,r,i){switch(r){case"d":return(0,n.parseNumericPattern)(e.numericPatterns.date,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return(0,n.parseNDigits)(r.length,t)}}validate(e,t){const o=e.getFullYear(),a=(0,n.isLeapYearIndex)(o),s=e.getMonth();return a?t>=1&&t<=i[s]:t>=1&&t<=r[s]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},US}var qS,GS={};function zS(){if(qS)return GS;qS=1,GS.DayOfYearParser=void 0;var e=tS(),t=VD(),n=nS();return GS.DayOfYearParser=class extends t.Parser{priority=90;subpriority=1;parse(t,r,i){switch(r){case"D":case"DD":return(0,n.parseNumericPattern)(e.numericPatterns.dayOfYear,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return(0,n.parseNDigits)(r.length,t)}}validate(e,t){const r=e.getFullYear();return(0,n.isLeapYearIndex)(r)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},GS}var FS,BS,WS={},YS={};function VS(){if(FS)return YS;FS=1,YS.setDay=function(r,i,o){const a=(0,e.getDefaultOptions)(),s=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,d=(0,n.toDate)(r,o?.in),c=d.getDay(),u=7-s;return(0,t.addDays)(d,i<0||i>6?i-(c+u)%7:((i%7+7)%7+u)%7-(c+u)%7,o)};var e=CI(),t=tI(),n=eI();return YS}function ZS(){if(BS)return WS;BS=1,WS.DayParser=void 0;var e=VS(),t=VD();return WS.DayParser=class extends t.Parser{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(t,n,r,i){return(t=(0,e.setDay)(t,r,i)).setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]},WS}var HS,KS={};function JS(){if(HS)return KS;HS=1,KS.LocalDayParser=void 0;var e=VS(),t=VD(),n=nS();return KS.LocalDayParser=class extends t.Parser{priority=90;parse(e,t,r,i){const o=e=>(e+i.weekStartsOn+6)%7+7*Math.floor((e-1)/7);switch(t){case"e":case"ee":return(0,n.mapValue)((0,n.parseNDigits)(t.length,e),o);case"eo":return(0,n.mapValue)(r.ordinalNumber(e,{unit:"day"}),o);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(t,n,r,i){return(t=(0,e.setDay)(t,r,i)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},KS}var QS,XS={};function eM(){if(QS)return XS;QS=1,XS.StandAloneLocalDayParser=void 0;var e=VS(),t=VD(),n=nS();return XS.StandAloneLocalDayParser=class extends t.Parser{priority=90;parse(e,t,r,i){const o=e=>(e+i.weekStartsOn+6)%7+7*Math.floor((e-1)/7);switch(t){case"c":case"cc":return(0,n.mapValue)((0,n.parseNDigits)(t.length,e),o);case"co":return(0,n.mapValue)(r.ordinalNumber(e,{unit:"day"}),o);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(t,n,r,i){return(t=(0,e.setDay)(t,r,i)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},XS}var tM,nM,rM={},iM={};function oM(){if(tM)return iM;tM=1,iM.setISODay=function(r,i,o){const a=(0,n.toDate)(r,o?.in),s=(0,t.getISODay)(a,o);return(0,e.addDays)(a,i-s,o)};var e=tI(),t=c_(),n=eI();return iM}function aM(){if(nM)return rM;nM=1,rM.ISODayParser=void 0;var e=oM(),t=VD(),n=nS();return rM.ISODayParser=class extends t.Parser{priority=90;parse(e,t,r){const i=e=>0===e?7:e;switch(t){case"i":case"ii":return(0,n.parseNDigits)(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return(0,n.mapValue)(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return(0,n.mapValue)(r.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return(0,n.mapValue)(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),i);default:return(0,n.mapValue)(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,t){return t>=1&&t<=7}set(t,n,r){return(t=(0,e.setISODay)(t,r)).setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},rM}var sM,dM={};function cM(){if(sM)return dM;sM=1,dM.AMPMParser=void 0;var e=VD(),t=nS();return dM.AMPMParser=class extends e.Parser{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours((0,t.dayPeriodEnumToHours)(r),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},dM}var uM,lM={};function pM(){if(uM)return lM;uM=1,lM.AMPMMidnightParser=void 0;var e=VD(),t=nS();return lM.AMPMMidnightParser=class extends e.Parser{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours((0,t.dayPeriodEnumToHours)(r),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},lM}var mM,fM={};function hM(){if(mM)return fM;mM=1,fM.DayPeriodParser=void 0;var e=VD(),t=nS();return fM.DayPeriodParser=class extends e.Parser{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours((0,t.dayPeriodEnumToHours)(r),0,0,0),e}incompatibleTokens=["a","b","t","T"]},fM}var vM,gM={};function yM(){if(vM)return gM;vM=1,gM.Hour1to12Parser=void 0;var e=tS(),t=VD(),n=nS();return gM.Hour1to12Parser=class extends t.Parser{priority=70;parse(t,r,i){switch(r){case"h":return(0,n.parseNumericPattern)(e.numericPatterns.hour12h,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return(0,n.parseNDigits)(r.length,t)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return e.setHours(r&&n<12?n+12:r||12!==n?n:0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},gM}var bM,wM={};function $M(){if(bM)return wM;bM=1,wM.Hour0to23Parser=void 0;var e=tS(),t=VD(),n=nS();return wM.Hour0to23Parser=class extends t.Parser{priority=70;parse(t,r,i){switch(r){case"H":return(0,n.parseNumericPattern)(e.numericPatterns.hour23h,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return(0,n.parseNDigits)(r.length,t)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},wM}var IM,kM={};function EM(){if(IM)return kM;IM=1,kM.Hour0To11Parser=void 0;var e=tS(),t=VD(),n=nS();return kM.Hour0To11Parser=class extends t.Parser{priority=70;parse(t,r,i){switch(r){case"K":return(0,n.parseNumericPattern)(e.numericPatterns.hour11h,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return(0,n.parseNDigits)(r.length,t)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){const r=e.getHours()>=12;return e.setHours(r&&n<12?n+12:n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},kM}var xM,AM={};function TM(){if(xM)return AM;xM=1,AM.Hour1To24Parser=void 0;var e=tS(),t=VD(),n=nS();return AM.Hour1To24Parser=class extends t.Parser{priority=70;parse(t,r,i){switch(r){case"k":return(0,n.parseNumericPattern)(e.numericPatterns.hour24h,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return(0,n.parseNDigits)(r.length,t)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){return e.setHours(n<=24?n%24:n,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},AM}var OM,_M={};function DM(){if(OM)return _M;OM=1,_M.MinuteParser=void 0;var e=tS(),t=VD(),n=nS();return _M.MinuteParser=class extends t.Parser{priority=60;parse(t,r,i){switch(r){case"m":return(0,n.parseNumericPattern)(e.numericPatterns.minute,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return(0,n.parseNDigits)(r.length,t)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},_M}var SM,MM={};function PM(){if(SM)return MM;SM=1,MM.SecondParser=void 0;var e=tS(),t=VD(),n=nS();return MM.SecondParser=class extends t.Parser{priority=50;parse(t,r,i){switch(r){case"s":return(0,n.parseNumericPattern)(e.numericPatterns.second,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return(0,n.parseNDigits)(r.length,t)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},MM}var CM,jM={};function NM(){if(CM)return jM;CM=1,jM.FractionOfSecondParser=void 0;var e=VD(),t=nS();return jM.FractionOfSecondParser=class extends e.Parser{priority=30;parse(e,n){return(0,t.mapValue)((0,t.parseNDigits)(n.length,e),(e=>Math.trunc(e*Math.pow(10,3-n.length))))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},jM}var RM,UM={};function LM(){if(RM)return UM;RM=1,UM.ISOTimezoneWithZParser=void 0;var e=K$(),t=zI(),n=tS(),r=VD(),i=nS();return UM.ISOTimezoneWithZParser=class extends r.Parser{priority=10;parse(e,t){switch(t){case"X":return(0,i.parseTimezonePattern)(n.timezonePatterns.basicOptionalMinutes,e);case"XX":return(0,i.parseTimezonePattern)(n.timezonePatterns.basic,e);case"XXXX":return(0,i.parseTimezonePattern)(n.timezonePatterns.basicOptionalSeconds,e);case"XXXXX":return(0,i.parseTimezonePattern)(n.timezonePatterns.extendedOptionalSeconds,e);default:return(0,i.parseTimezonePattern)(n.timezonePatterns.extended,e)}}set(n,r,i){return r.timestampIsSet?n:(0,e.constructFrom)(n,n.getTime()-(0,t.getTimezoneOffsetInMilliseconds)(n)-i)}incompatibleTokens=["t","T","x"]},UM}var qM,GM={};function zM(){if(qM)return GM;qM=1,GM.ISOTimezoneParser=void 0;var e=K$(),t=zI(),n=tS(),r=VD(),i=nS();return GM.ISOTimezoneParser=class extends r.Parser{priority=10;parse(e,t){switch(t){case"x":return(0,i.parseTimezonePattern)(n.timezonePatterns.basicOptionalMinutes,e);case"xx":return(0,i.parseTimezonePattern)(n.timezonePatterns.basic,e);case"xxxx":return(0,i.parseTimezonePattern)(n.timezonePatterns.basicOptionalSeconds,e);case"xxxxx":return(0,i.parseTimezonePattern)(n.timezonePatterns.extendedOptionalSeconds,e);default:return(0,i.parseTimezonePattern)(n.timezonePatterns.extended,e)}}set(n,r,i){return r.timestampIsSet?n:(0,e.constructFrom)(n,n.getTime()-(0,t.getTimezoneOffsetInMilliseconds)(n)-i)}incompatibleTokens=["t","T","X"]},GM}var FM,BM={};function WM(){if(FM)return BM;FM=1,BM.TimestampSecondsParser=void 0;var e=K$(),t=VD(),n=nS();return BM.TimestampSecondsParser=class extends t.Parser{priority=40;parse(e){return(0,n.parseAnyDigitsSigned)(e)}set(t,n,r){return[(0,e.constructFrom)(t,1e3*r),{timestampIsSet:!0}]}incompatibleTokens="*"},BM}var YM,VM,ZM,HM,KM={};function JM(){if(YM)return KM;YM=1,KM.TimestampMillisecondsParser=void 0;var e=K$(),t=VD(),n=nS();return KM.TimestampMillisecondsParser=class extends t.Parser{priority=20;parse(e){return(0,n.parseAnyDigitsSigned)(e)}set(t,n,r){return[(0,e.constructFrom)(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"},KM}function QM(){if(VM)return BD;VM=1,BD.parsers=void 0;var e=ZD(),t=rS(),n=aS(),r=cS(),i=pS(),o=hS(),a=yS(),s=$S(),d=ES(),c=DS(),u=NS(),l=LS(),p=zS(),m=ZS(),f=JS(),h=eM(),v=aM(),g=cM(),y=pM(),b=hM(),w=yM(),$=$M(),I=EM(),k=TM(),E=DM(),x=PM(),A=NM(),T=LM(),O=zM(),_=WM(),D=JM();return BD.parsers={G:new e.EraParser,y:new t.YearParser,Y:new n.LocalWeekYearParser,R:new r.ISOWeekYearParser,u:new i.ExtendedYearParser,Q:new o.QuarterParser,q:new a.StandAloneQuarterParser,M:new s.MonthParser,L:new d.StandAloneMonthParser,w:new c.LocalWeekParser,I:new u.ISOWeekParser,d:new l.DateParser,D:new p.DayOfYearParser,E:new m.DayParser,e:new f.LocalDayParser,c:new h.StandAloneLocalDayParser,i:new v.ISODayParser,a:new g.AMPMParser,b:new y.AMPMMidnightParser,B:new b.DayPeriodParser,h:new w.Hour1to12Parser,H:new $.Hour0to23Parser,K:new I.Hour0To11Parser,k:new k.Hour1To24Parser,m:new E.MinuteParser,s:new x.SecondParser,S:new A.FractionOfSecondParser,X:new T.ISOTimezoneWithZParser,x:new O.ISOTimezoneParser,t:new _.TimestampSecondsParser,T:new D.TimestampMillisecondsParser},BD}function XM(){return ZM||(ZM=1,function(e){Object.defineProperty(e,"longFormatters",{enumerable:!0,get:function(){return n.longFormatters}}),e.parse=function(e,l,p,v){const g=()=>(0,i.constructFrom)(v?.in||p,NaN),y=(0,o.getDefaultOptions)(),b=v?.locale??y.locale??t.defaultLocale,w=v?.firstWeekContainsDate??v?.locale?.options?.firstWeekContainsDate??y.firstWeekContainsDate??y.locale?.options?.firstWeekContainsDate??1,$=v?.weekStartsOn??v?.locale?.options?.weekStartsOn??y.weekStartsOn??y.locale?.options?.weekStartsOn??0;if(!l)return e?g():(0,a.toDate)(p,v?.in);const I={firstWeekContainsDate:w,weekStartsOn:$,locale:b},k=[new s.DateTimezoneSetter(v?.in,p)],E=l.match(u).map((e=>{const t=e[0];return t in n.longFormatters?(0,n.longFormatters[t])(e,b.formatLong):e})).join("").match(c),x=[];for(let t of E){!v?.useAdditionalWeekYearTokens&&(0,r.isProtectedWeekYearToken)(t)&&(0,r.warnOrThrowProtectedError)(t,l,e),!v?.useAdditionalDayOfYearTokens&&(0,r.isProtectedDayOfYearToken)(t)&&(0,r.warnOrThrowProtectedError)(t,l,e);const n=t[0],i=d.parsers[n];if(i){const{incompatibleTokens:r}=i;if(Array.isArray(r)){const e=x.find((e=>r.includes(e.token)||e.token===n));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${t}\` at the same time`)}else if("*"===i.incompatibleTokens&&x.length>0)throw new RangeError(`The format string mustn't contain \`${t}\` and any other token at the same time`);x.push({token:n,fullToken:t});const o=i.run(e,t,b.match,I);if(!o)return g();k.push(o.setter),e=o.rest}else{if(n.match(f))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=h(t)),0!==e.indexOf(t))return g();e=e.slice(t.length)}}if(e.length>0&&m.test(e))return g();const A=k.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>k.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let T=(0,a.toDate)(p,v?.in);if(isNaN(+T))return g();const O={};for(const e of A){if(!e.validate(T,I))return g();const t=e.set(T,O,I);Array.isArray(t)?(T=t[0],Object.assign(O,t[1])):T=t}return T},Object.defineProperty(e,"parsers",{enumerable:!0,get:function(){return d.parsers}});var t=IT(),n=HT(),r=XT(),i=K$(),o=r_(),a=eI(),s=GD(),d=QM();const c=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,u=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,l=/^'([^]*?)'?$/,p=/''/g,m=/\S/,f=/[a-zA-Z]/;function h(e){return e.match(l)[1].replace(p,"'")}}(RD)),RD}function eP(){if(HM)return ND;HM=1,ND.isMatch=function(n,r,i){return(0,e.isValid)((0,t.parse)(n,r,new Date,i))};var e=oE(),t=XM();return ND}var tP,nP={};function rP(){if(tP)return nP;tP=1,nP.isMonday=function(t,n){return 1===(0,e.toDate)(t,n?.in).getDay()};var e=eI();return nP}var iP,oP={};function aP(){if(iP)return oP;iP=1,oP.isPast=function(t){return+(0,e.toDate)(t)<Date.now()};var e=eI();return oP}var sP,dP,cP={},uP={};function lP(){if(sP)return uP;sP=1,uP.startOfHour=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setMinutes(0,0,0),r};var e=eI();return uP}function pP(){if(dP)return cP;dP=1,cP.isSameHour=function(n,r,i){const[o,a]=(0,e.normalizeDates)(i?.in,n,r);return+(0,t.startOfHour)(o)==+(0,t.startOfHour)(a)};var e=WI(),t=lP();return cP}var mP,fP,hP={},vP={};function gP(){if(mP)return vP;mP=1,vP.isSameWeek=function(n,r,i){const[o,a]=(0,e.normalizeDates)(i?.in,n,r);return+(0,t.startOfWeek)(o,i)==+(0,t.startOfWeek)(a,i)};var e=WI(),t=jI();return vP}function yP(){if(fP)return hP;fP=1,hP.isSameISOWeek=function(t,n,r){return(0,e.isSameWeek)(t,n,{...r,weekStartsOn:1})};var e=gP();return hP}var bP,wP={};function $P(){if(bP)return wP;bP=1,wP.isSameISOWeekYear=function(n,r,i){const[o,a]=(0,t.normalizeDates)(i?.in,n,r);return+(0,e.startOfISOWeekYear)(o)==+(0,e.startOfISOWeekYear)(a)};var e=tk(),t=WI();return wP}var IP,kP,EP={},xP={};function AP(){if(IP)return xP;IP=1,xP.startOfMinute=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setSeconds(0,0),r};var e=eI();return xP}function TP(){if(kP)return EP;kP=1,EP.isSameMinute=function(t,n){return+(0,e.startOfMinute)(t)==+(0,e.startOfMinute)(n)};var e=AP();return EP}var OP,_P={};function DP(){if(OP)return _P;OP=1,_P.isSameMonth=function(t,n,r){const[i,o]=(0,e.normalizeDates)(r?.in,t,n);return i.getFullYear()===o.getFullYear()&&i.getMonth()===o.getMonth()};var e=WI();return _P}var SP,MP={};function PP(){if(SP)return MP;SP=1,MP.isSameQuarter=function(n,r,i){const[o,a]=(0,e.normalizeDates)(i?.in,n,r);return+(0,t.startOfQuarter)(o)==+(0,t.startOfQuarter)(a)};var e=WI(),t=Ux();return MP}var CP,jP,NP={},RP={};function UP(){if(CP)return RP;CP=1,RP.startOfSecond=function(t,n){const r=(0,e.toDate)(t,n?.in);return r.setMilliseconds(0),r};var e=eI();return RP}function LP(){if(jP)return NP;jP=1,NP.isSameSecond=function(t,n){return+(0,e.startOfSecond)(t)==+(0,e.startOfSecond)(n)};var e=UP();return NP}var qP,GP={};function zP(){if(qP)return GP;qP=1,GP.isSameYear=function(t,n,r){const[i,o]=(0,e.normalizeDates)(r?.in,t,n);return i.getFullYear()===o.getFullYear()};var e=WI();return GP}var FP,BP={};function WP(){if(FP)return BP;FP=1,BP.isThisHour=function(r,i){return(0,t.isSameHour)((0,n.toDate)(r,i?.in),(0,e.constructNow)(i?.in||r))};var e=Wk(),t=pP(),n=eI();return BP}var YP,VP={};function ZP(){if(YP)return VP;YP=1,VP.isThisISOWeek=function(r,i){return(0,n.isSameISOWeek)((0,e.constructFrom)(i?.in||r,r),(0,t.constructNow)(i?.in||r))};var e=K$(),t=Wk(),n=yP();return VP}var HP,KP={};function JP(){if(HP)return KP;HP=1,KP.isThisMinute=function(n){return(0,t.isSameMinute)(n,(0,e.constructNow)(n))};var e=Wk(),t=TP();return KP}var QP,XP={};function eC(){if(QP)return XP;QP=1,XP.isThisMonth=function(r,i){return(0,n.isSameMonth)((0,e.constructFrom)(i?.in||r,r),(0,t.constructNow)(i?.in||r))};var e=K$(),t=Wk(),n=DP();return XP}var tC,nC={};function rC(){if(tC)return nC;tC=1,nC.isThisQuarter=function(r,i){return(0,n.isSameQuarter)((0,e.constructFrom)(i?.in||r,r),(0,t.constructNow)(i?.in||r))};var e=K$(),t=Wk(),n=PP();return nC}var iC,oC={};function aC(){if(iC)return oC;iC=1,oC.isThisSecond=function(n){return(0,t.isSameSecond)(n,(0,e.constructNow)(n))};var e=Wk(),t=LP();return oC}var sC,dC={};function cC(){if(sC)return dC;sC=1,dC.isThisWeek=function(r,i){return(0,n.isSameWeek)((0,e.constructFrom)(i?.in||r,r),(0,t.constructNow)(i?.in||r),i)};var e=K$(),t=Wk(),n=gP();return dC}var uC,lC={};function pC(){if(uC)return lC;uC=1,lC.isThisYear=function(r,i){return(0,n.isSameYear)((0,e.constructFrom)(i?.in||r,r),(0,t.constructNow)(i?.in||r))};var e=K$(),t=Wk(),n=zP();return lC}var mC,fC={};function hC(){if(mC)return fC;mC=1,fC.isThursday=function(t,n){return 4===(0,e.toDate)(t,n?.in).getDay()};var e=eI();return fC}var vC,gC={};function yC(){if(vC)return gC;vC=1,gC.isToday=function(r,i){return(0,n.isSameDay)((0,e.constructFrom)(i?.in||r,r),(0,t.constructNow)(i?.in||r))};var e=K$(),t=Wk(),n=Qk();return gC}var bC,wC={};function $C(){if(bC)return wC;bC=1,wC.isTomorrow=function(r,i){return(0,n.isSameDay)(r,(0,e.addDays)((0,t.constructNow)(i?.in||r),1),i)};var e=tI(),t=Wk(),n=Qk();return wC}var IC,kC={};function EC(){if(IC)return kC;IC=1,kC.isTuesday=function(t,n){return 2===(0,e.toDate)(t,n?.in).getDay()};var e=eI();return kC}var xC,AC={};function TC(){if(xC)return AC;xC=1,AC.isWednesday=function(t,n){return 3===(0,e.toDate)(t,n?.in).getDay()};var e=eI();return AC}var OC,_C={};function DC(){if(OC)return _C;OC=1,_C.isWithinInterval=function(t,n,r){const i=+(0,e.toDate)(t,r?.in),[o,a]=[+(0,e.toDate)(n.start,r?.in),+(0,e.toDate)(n.end,r?.in)].sort(((e,t)=>e-t));return i>=o&&i<=a};var e=eI();return _C}var SC,MC,PC={},CC={};function jC(){if(SC)return CC;SC=1,CC.subDays=function(t,n,r){return(0,e.addDays)(t,-n,r)};var e=tI();return CC}function NC(){if(MC)return PC;MC=1,PC.isYesterday=function(i,o){return(0,n.isSameDay)((0,e.constructFrom)(o?.in||i,i),(0,r.subDays)((0,t.constructNow)(o?.in||i),1))};var e=K$(),t=Wk(),n=Qk(),r=jC();return PC}var RC,UC={};function LC(){if(RC)return UC;RC=1,UC.lastDayOfDecade=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getFullYear();return r.setFullYear(9+10*Math.floor(i/10)+1,0,0),r.setHours(0,0,0,0),(0,e.toDate)(r,n?.in)};var e=eI();return UC}var qC,GC,zC={},FC={};function BC(){if(qC)return FC;qC=1,FC.lastDayOfWeek=function(n,r){const i=(0,e.getDefaultOptions)(),o=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=(0,t.toDate)(n,r?.in),s=a.getDay(),d=6+(s<o?-7:0)-(s-o);return a.setHours(0,0,0,0),a.setDate(a.getDate()+d),a};var e=CI(),t=eI();return FC}function WC(){if(GC)return zC;GC=1,zC.lastDayOfISOWeek=function(t,n){return(0,e.lastDayOfWeek)(t,{...n,weekStartsOn:1})};var e=BC();return zC}var YC,VC={};function ZC(){if(YC)return VC;YC=1,VC.lastDayOfISOWeekYear=function(r,i){const o=(0,t.getISOWeekYear)(r,i),a=(0,e.constructFrom)(i?.in||r,0);a.setFullYear(o+1,0,4),a.setHours(0,0,0,0);const s=(0,n.startOfISOWeek)(a,i);return s.setDate(s.getDate()-1),s};var e=K$(),t=RI(),n=NI();return VC}var HC,KC={};function JC(){if(HC)return KC;HC=1,KC.lastDayOfQuarter=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getMonth();return r.setMonth(i-i%3+3,0),r.setHours(0,0,0,0),r};var e=eI();return KC}var QC,XC={};function ej(){if(QC)return XC;QC=1,XC.lastDayOfYear=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getFullYear();return r.setFullYear(i+1,0,0),r.setHours(0,0,0,0),r};var e=eI();return XC}var tj,nj={};function rj(){return tj||(tj=1,function(e){e.lightFormat=function(e,d){const c=(0,r.toDate)(e);if(!(0,n.isValid)(c))throw new RangeError("Invalid time value");const u=d.match(i);return u?u.map((e=>{if("''"===e)return"'";const n=e[0];if("'"===n)return function(e){const t=e.match(o);return t?t[1].replace(a,"'"):e}(e);const r=t.lightFormatters[n];if(r)return r(c,e);if(n.match(s))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return e})).join(""):""},Object.defineProperty(e,"lightFormatters",{enumerable:!0,get:function(){return t.lightFormatters}});var t=WT(),n=oE(),r=eI();const i=/(\w)\1*|''|'(''|[^'])+('|$)|./g,o=/^'([^]*?)'?$/,a=/''/g,s=/[a-zA-Z]/}(nj)),nj}var ij,oj={};function aj(){if(ij)return oj;ij=1,oj.milliseconds=function({years:t,months:n,weeks:r,days:i,hours:o,minutes:a,seconds:s}){let d=0;t&&(d+=t*e.daysInYear),n&&(d+=n*(e.daysInYear/12)),r&&(d+=7*r),i&&(d+=i);let c=24*d*60*60;return o&&(c+=60*o*60),a&&(c+=60*a),s&&(c+=s),Math.trunc(1e3*c)};var e=H$();return oj}var sj,dj={};function cj(){if(sj)return dj;sj=1,dj.millisecondsToHours=function(t){return Math.trunc(t/e.millisecondsInHour)};var e=H$();return dj}var uj,lj={};function pj(){if(uj)return lj;uj=1,lj.millisecondsToMinutes=function(t){return Math.trunc(t/e.millisecondsInMinute)};var e=H$();return lj}var mj,fj={};function hj(){if(mj)return fj;mj=1,fj.millisecondsToSeconds=function(t){return Math.trunc(t/e.millisecondsInSecond)};var e=H$();return fj}var vj,gj={};function yj(){if(vj)return gj;vj=1,gj.minutesToHours=function(t){return Math.trunc(t/e.minutesInHour)};var e=H$();return gj}var bj,wj={};function $j(){if(bj)return wj;bj=1,wj.minutesToMilliseconds=function(t){return Math.trunc(t*e.millisecondsInMinute)};var e=H$();return wj}var Ij,kj={};function Ej(){if(Ij)return kj;Ij=1,kj.minutesToSeconds=function(t){return Math.trunc(t*e.secondsInMinute)};var e=H$();return kj}var xj,Aj={};function Tj(){if(xj)return Aj;xj=1,Aj.monthsToQuarters=function(t){return Math.trunc(t/e.monthsInQuarter)};var e=H$();return Aj}var Oj,_j={};function Dj(){if(Oj)return _j;Oj=1,_j.monthsToYears=function(t){return Math.trunc(t/e.monthsInYear)};var e=H$();return _j}var Sj,Mj={};function Pj(){if(Sj)return Mj;Sj=1,Mj.nextDay=function(n,r,i){let o=r-(0,t.getDay)(n,i);return o<=0&&(o+=7),(0,e.addDays)(n,o,i)};var e=tI(),t=zO();return Mj}var Cj,jj={};function Nj(){if(Cj)return jj;Cj=1,jj.nextFriday=function(t,n){return(0,e.nextDay)(t,5,n)};var e=Pj();return jj}var Rj,Uj={};function Lj(){if(Rj)return Uj;Rj=1,Uj.nextMonday=function(t,n){return(0,e.nextDay)(t,1,n)};var e=Pj();return Uj}var qj,Gj={};function zj(){if(qj)return Gj;qj=1,Gj.nextSaturday=function(t,n){return(0,e.nextDay)(t,6,n)};var e=Pj();return Gj}var Fj,Bj={};function Wj(){if(Fj)return Bj;Fj=1,Bj.nextSunday=function(t,n){return(0,e.nextDay)(t,0,n)};var e=Pj();return Bj}var Yj,Vj={};function Zj(){if(Yj)return Vj;Yj=1,Vj.nextThursday=function(t,n){return(0,e.nextDay)(t,4,n)};var e=Pj();return Vj}var Hj,Kj={};function Jj(){if(Hj)return Kj;Hj=1,Kj.nextTuesday=function(t,n){return(0,e.nextDay)(t,2,n)};var e=Pj();return Kj}var Qj,Xj={};function eN(){if(Qj)return Xj;Qj=1,Xj.nextWednesday=function(t,n){return(0,e.nextDay)(t,3,n)};var e=Pj();return Xj}var tN,nN={};function rN(){if(tN)return nN;tN=1,nN.parseISO=function(l,p){const m=()=>(0,t.constructFrom)(p?.in,NaN),f=p?.additionalDigits??2,h=function(e){const t={},n=e.split(r.dateTimeDelimiter);let i;if(n.length>2)return t;if(/:/.test(n[0])?i=n[0]:(t.date=n[0],i=n[1],r.timeZoneDelimiter.test(t.date)&&(t.date=e.split(r.timeZoneDelimiter)[0],i=e.substr(t.date.length,e.length))),i){const e=r.timezone.exec(i);e?(t.time=i.replace(e[1],""),t.timezone=e[1]):t.time=i}return t}(l);let v;if(h.date){const e=function(e,t){const n=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?i:100*o,restDateString:e.slice((r[1]||r[2]).length)}}(h.date,f);v=function(e,t){if(null===t)return new Date(NaN);const n=e.match(i);if(!n)return new Date(NaN);const r=!!n[4],o=s(n[1]),a=s(n[2])-1,d=s(n[3]),l=s(n[4]),p=s(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,l,p)?function(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(t,l,p):new Date(NaN);{const e=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(c[t]||(u(e)?29:28))}(t,a,d)&&function(e,t){return t>=1&&t<=(u(e)?366:365)}(t,o)?(e.setUTCFullYear(t,a,Math.max(o,d)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!v||isNaN(+v))return m();const g=+v;let y,b=0;if(h.time&&(b=function(t){const n=t.match(o);if(!n)return NaN;const r=d(n[1]),i=d(n[2]),a=d(n[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(r,i,a)?r*e.millisecondsInHour+i*e.millisecondsInMinute+1e3*a:NaN}(h.time),isNaN(b)))return m();if(!h.timezone){const e=new Date(g+b),t=(0,n.toDate)(0,p?.in);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return y=function(t){if("Z"===t)return 0;const n=t.match(a);if(!n)return 0;const r="+"===n[1]?-1:1,i=parseInt(n[2]),o=n[3]&&parseInt(n[3])||0;return function(e,t){return t>=0&&t<=59}(0,o)?r*(i*e.millisecondsInHour+o*e.millisecondsInMinute):NaN}(h.timezone),isNaN(y)?m():(0,n.toDate)(g+b+y,p?.in)};var e=H$(),t=K$(),n=eI();const r={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},i=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,o=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,a=/^([+-])(\d{2})(?::?(\d{2}))?$/;function s(e){return e?parseInt(e):1}function d(e){return e&&parseFloat(e.replace(",","."))||0}const c=[31,null,31,30,31,30,31,31,30,31,30,31];function u(e){return e%400==0||e%4==0&&e%100!=0}return nN}var iN,oN={};function aN(){if(iN)return oN;iN=1,oN.parseJSON=function(t,n){const r=t.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);return(0,e.toDate)(r?Date.UTC(+r[1],+r[2]-1,+r[3],+r[4]-(+r[9]||0)*("-"==r[8]?-1:1),+r[5]-(+r[10]||0)*("-"==r[8]?-1:1),+r[6],+((r[7]||"0")+"00").substring(0,3)):NaN,n?.in)};var e=eI();return oN}var sN,dN={};function cN(){if(sN)return dN;sN=1,dN.previousDay=function(n,r,i){let o=(0,e.getDay)(n,i)-r;return o<=0&&(o+=7),(0,t.subDays)(n,o,i)};var e=zO(),t=jC();return dN}var uN,lN={};function pN(){if(uN)return lN;uN=1,lN.previousFriday=function(t,n){return(0,e.previousDay)(t,5,n)};var e=cN();return lN}var mN,fN={};function hN(){if(mN)return fN;mN=1,fN.previousMonday=function(t,n){return(0,e.previousDay)(t,1,n)};var e=cN();return fN}var vN,gN={};function yN(){if(vN)return gN;vN=1,gN.previousSaturday=function(t,n){return(0,e.previousDay)(t,6,n)};var e=cN();return gN}var bN,wN={};function $N(){if(bN)return wN;bN=1,wN.previousSunday=function(t,n){return(0,e.previousDay)(t,0,n)};var e=cN();return wN}var IN,kN={};function EN(){if(IN)return kN;IN=1,kN.previousThursday=function(t,n){return(0,e.previousDay)(t,4,n)};var e=cN();return kN}var xN,AN={};function TN(){if(xN)return AN;xN=1,AN.previousTuesday=function(t,n){return(0,e.previousDay)(t,2,n)};var e=cN();return AN}var ON,_N={};function DN(){if(ON)return _N;ON=1,_N.previousWednesday=function(t,n){return(0,e.previousDay)(t,3,n)};var e=cN();return _N}var SN,MN={};function PN(){if(SN)return MN;SN=1,MN.quartersToMonths=function(t){return Math.trunc(t*e.monthsInQuarter)};var e=H$();return MN}var CN,jN={};function NN(){if(CN)return jN;CN=1,jN.quartersToYears=function(t){return Math.trunc(t/e.quartersInYear)};var e=H$();return jN}var RN,UN={};function LN(){if(RN)return UN;RN=1,UN.roundToNearestHours=function(r,i){const o=i?.nearestTo??1;if(o<1||o>12)return(0,t.constructFrom)(i?.in||r,NaN);const a=(0,n.toDate)(r,i?.in),s=a.getMinutes()/60,d=a.getSeconds()/60/60,c=a.getMilliseconds()/1e3/60/60,u=a.getHours()+s+d+c,l=(0,e.getRoundingMethod)(i?.roundingMethod??"round")(u/o)*o;return a.setHours(l,0,0,0),a};var e=jE(),t=K$(),n=eI();return UN}var qN,GN={};function zN(){if(qN)return GN;qN=1,GN.roundToNearestMinutes=function(r,i){const o=i?.nearestTo??1;if(o<1||o>30)return(0,t.constructFrom)(r,NaN);const a=(0,n.toDate)(r,i?.in),s=a.getSeconds()/60,d=a.getMilliseconds()/1e3/60,c=a.getMinutes()+s+d,u=(0,e.getRoundingMethod)(i?.roundingMethod??"round")(c/o)*o;return a.setMinutes(u,0,0),a};var e=jE(),t=K$(),n=eI();return GN}var FN,BN={};function WN(){if(FN)return BN;FN=1,BN.secondsToHours=function(t){return Math.trunc(t/e.secondsInHour)};var e=H$();return BN}var YN,VN={};function ZN(){if(YN)return VN;YN=1,VN.secondsToMilliseconds=function(t){return t*e.millisecondsInSecond};var e=H$();return VN}var HN,KN={};function JN(){if(HN)return KN;HN=1,KN.secondsToMinutes=function(t){return Math.trunc(t/e.secondsInMinute)};var e=H$();return KN}var QN,XN,eR={},tR={};function nR(){if(QN)return tR;QN=1,tR.setMonth=function(r,i,o){const a=(0,n.toDate)(r,o?.in),s=a.getFullYear(),d=a.getDate(),c=(0,e.constructFrom)(o?.in||r,0);c.setFullYear(s,i,15),c.setHours(0,0,0,0);const u=(0,t.getDaysInMonth)(c);return a.setMonth(i,Math.min(d,u)),a};var e=K$(),t=WO(),n=eI();return tR}function rR(){if(XN)return eR;XN=1,eR.set=function(r,i,o){let a=(0,n.toDate)(r,o?.in);return isNaN(+a)?(0,e.constructFrom)(o?.in||r,NaN):(null!=i.year&&a.setFullYear(i.year),null!=i.month&&(a=(0,t.setMonth)(a,i.month)),null!=i.date&&a.setDate(i.date),null!=i.hours&&a.setHours(i.hours),null!=i.minutes&&a.setMinutes(i.minutes),null!=i.seconds&&a.setSeconds(i.seconds),null!=i.milliseconds&&a.setMilliseconds(i.milliseconds),a)};var e=K$(),t=nR(),n=eI();return eR}var iR,oR={};function aR(){if(iR)return oR;iR=1,oR.setDate=function(t,n,r){const i=(0,e.toDate)(t,r?.in);return i.setDate(n),i};var e=eI();return oR}var sR,dR={};function cR(){if(sR)return dR;sR=1,dR.setDayOfYear=function(t,n,r){const i=(0,e.toDate)(t,r?.in);return i.setMonth(0),i.setDate(n),i};var e=eI();return dR}var uR,lR={};function pR(){if(uR)return lR;uR=1,lR.setDefaultOptions=function(t){const n={},r=(0,e.getDefaultOptions)();for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=r[e]);for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(void 0===t[e]?delete n[e]:n[e]=t[e]);(0,e.setDefaultOptions)(n)};var e=CI();return lR}var mR,fR={};function hR(){if(mR)return fR;mR=1,fR.setHours=function(t,n,r){const i=(0,e.toDate)(t,r?.in);return i.setHours(n),i};var e=eI();return fR}var vR,gR={};function yR(){if(vR)return gR;vR=1,gR.setMilliseconds=function(t,n,r){const i=(0,e.toDate)(t,r?.in);return i.setMilliseconds(n),i};var e=eI();return gR}var bR,wR={};function $R(){if(bR)return wR;bR=1,wR.setMinutes=function(t,n,r){const i=(0,e.toDate)(t,r?.in);return i.setMinutes(n),i};var e=eI();return wR}var IR,kR={};function ER(){if(IR)return kR;IR=1,kR.setQuarter=function(n,r,i){const o=(0,t.toDate)(n,i?.in),a=r-(Math.trunc(o.getMonth()/3)+1);return(0,e.setMonth)(o,o.getMonth()+3*a)};var e=nR(),t=eI();return kR}var xR,AR={};function TR(){if(xR)return AR;xR=1,AR.setSeconds=function(t,n,r){const i=(0,e.toDate)(t,r?.in);return i.setSeconds(n),i};var e=eI();return AR}var OR,_R={};function DR(){if(OR)return _R;OR=1,_R.setWeekYear=function(o,a,s){const d=(0,e.getDefaultOptions)(),c=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??d.firstWeekContainsDate??d.locale?.options?.firstWeekContainsDate??1,u=(0,n.differenceInCalendarDays)((0,i.toDate)(o,s?.in),(0,r.startOfWeekYear)(o,s),s),l=(0,t.constructFrom)(s?.in||o,0);l.setFullYear(a,0,c),l.setHours(0,0,0,0);const p=(0,r.startOfWeekYear)(l,s);return p.setDate(p.getDate()+u),p};var e=CI(),t=K$(),n=KI(),r=RT(),i=eI();return _R}var SR,MR={};function PR(){if(SR)return MR;SR=1,MR.setYear=function(n,r,i){const o=(0,t.toDate)(n,i?.in);return isNaN(+o)?(0,e.constructFrom)(i?.in||n,NaN):(o.setFullYear(r),o)};var e=K$(),t=eI();return MR}var CR,jR={};function NR(){if(CR)return jR;CR=1,jR.startOfDecade=function(t,n){const r=(0,e.toDate)(t,n?.in),i=r.getFullYear();return r.setFullYear(10*Math.floor(i/10),0,1),r.setHours(0,0,0,0),r};var e=eI();return jR}var RR,UR={};function LR(){if(RR)return UR;RR=1,UR.startOfToday=function(t){return(0,e.startOfDay)(Date.now(),t)};var e=HI();return UR}var qR,GR={};function zR(){if(qR)return GR;qR=1,GR.startOfTomorrow=function(n){const r=(0,t.constructNow)(n?.in),i=r.getFullYear(),o=r.getMonth(),a=r.getDate(),s=(0,e.constructFrom)(n?.in,0);return s.setFullYear(i,o,a+1),s.setHours(0,0,0,0),s};var e=K$(),t=Wk();return GR}var FR,BR={};function WR(){if(FR)return BR;FR=1,BR.startOfYesterday=function(t){const n=(0,e.constructNow)(t?.in),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=(0,e.constructNow)(t?.in);return a.setFullYear(r,i,o-1),a.setHours(0,0,0,0),a};var e=Wk();return BR}var YR,VR,ZR={},HR={};function KR(){if(YR)return HR;YR=1,HR.subMonths=function(t,n,r){return(0,e.addMonths)(t,-n,r)};var e=oI();return HR}function JR(){if(VR)return ZR;VR=1,ZR.sub=function(r,i,o){const{years:a=0,months:s=0,weeks:d=0,days:c=0,hours:u=0,minutes:l=0,seconds:p=0}=i,m=(0,n.subMonths)(r,s+12*a,o),f=(0,t.subDays)(m,c+7*d,o),h=1e3*(p+60*(l+60*u));return(0,e.constructFrom)(o?.in||r,+f-h)};var e=K$(),t=jC(),n=KR();return ZR}var QR,XR={};function eU(){if(QR)return XR;QR=1,XR.subBusinessDays=function(t,n,r){return(0,e.addBusinessDays)(t,-n,r)};var e=yI();return XR}var tU,nU={};function rU(){if(tU)return nU;tU=1,nU.subHours=function(t,n,r){return(0,e.addHours)(t,-n,r)};var e=EI();return nU}var iU,oU={};function aU(){if(iU)return oU;iU=1,oU.subMilliseconds=function(t,n,r){return(0,e.addMilliseconds)(t,-n,r)};var e=kI();return oU}var sU,dU={};function cU(){if(sU)return dU;sU=1,dU.subMinutes=function(t,n,r){return(0,e.addMinutes)(t,-n,r)};var e=ak();return dU}var uU,lU={};function pU(){if(uU)return lU;uU=1,lU.subQuarters=function(t,n,r){return(0,e.addQuarters)(t,-n,r)};var e=ck();return lU}var mU,fU={};function hU(){if(mU)return fU;mU=1,fU.subSeconds=function(t,n,r){return(0,e.addSeconds)(t,-n,r)};var e=pk();return fU}var vU,gU={};function yU(){if(vU)return gU;vU=1,gU.subWeeks=function(t,n,r){return(0,e.addWeeks)(t,-n,r)};var e=hk();return gU}var bU,wU={};function $U(){if(bU)return wU;bU=1,wU.subYears=function(t,n,r){return(0,e.addYears)(t,-n,r)};var e=yk();return wU}var IU,kU={};function EU(){if(IU)return kU;IU=1,kU.weeksToDays=function(t){return Math.trunc(t*e.daysInWeek)};var e=H$();return kU}var xU,AU={};function TU(){if(xU)return AU;xU=1,AU.yearsToDays=function(t){return Math.trunc(t*e.daysInYear)};var e=H$();return AU}var OU,_U={};function DU(){if(OU)return _U;OU=1,_U.yearsToMonths=function(t){return Math.trunc(t*e.monthsInYear)};var e=H$();return _U}var SU,MU,PU={};function CU(){if(SU)return PU;SU=1,PU.yearsToQuarters=function(t){return Math.trunc(t*e.quartersInYear)};var e=H$();return PU}function jU(){return MU||(MU=1,function(e){var t=aI();Object.keys(t).forEach((function(n){"default"!==n&&"__esModule"!==n&&(n in e&&e[n]===t[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}}))}));var n=yI();Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}}))}));var r=tI();Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}}))}));var i=EI();Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));var o=rk();Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var a=kI();Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))}));var s=ak();Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===s[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}}))}));var d=oI();Object.keys(d).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===d[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))}));var c=ck();Object.keys(c).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===c[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}}))}));var u=pk();Object.keys(u).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===u[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}}))}));var l=hk();Object.keys(l).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===l[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}}))}));var p=yk();Object.keys(p).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===p[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}}))}));var m=$k();Object.keys(m).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===m[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return m[t]}}))}));var f=Dk();Object.keys(f).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===f[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return f[t]}}))}));var h=Pk();Object.keys(h).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===h[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return h[t]}}))}));var v=Nk();Object.keys(v).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===v[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return v[t]}}))}));var g=Lk();Object.keys(g).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===g[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return g[t]}}))}));var y=zk();Object.keys(y).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===y[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return y[t]}}))}));var b=K$();Object.keys(b).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===b[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return b[t]}}))}));var w=Wk();Object.keys(w).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===w[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return w[t]}}))}));var $=Zk();Object.keys($).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===$[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return $[t]}}))}));var I=aE();Object.keys(I).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===I[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return I[t]}}))}));var k=KI();Object.keys(k).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===k[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return k[t]}}))}));var E=cE();Object.keys(E).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===E[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return E[t]}}))}));var x=pE();Object.keys(x).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===x[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return x[t]}}))}));var A=hE();Object.keys(A).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===A[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return A[t]}}))}));var T=$E();Object.keys(T).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===T[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return T[t]}}))}));var O=EE();Object.keys(O).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===O[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return O[t]}}))}));var _=TE();Object.keys(_).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===_[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return _[t]}}))}));var D=DE();Object.keys(D).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===D[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return D[t]}}))}));var S=NE();Object.keys(S).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===S[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return S[t]}}))}));var M=zE();Object.keys(M).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===M[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return M[t]}}))}));var P=WE();Object.keys(P).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===P[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return P[t]}}))}));var C=ZE();Object.keys(C).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===C[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return C[t]}}))}));var j=ax();Object.keys(j).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===j[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return j[t]}}))}));var N=cx();Object.keys(N).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===N[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return N[t]}}))}));var R=px();Object.keys(R).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===R[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return R[t]}}))}));var U=hx();Object.keys(U).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===U[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return U[t]}}))}));var L=yx();Object.keys(L).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===L[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return L[t]}}))}));var q=Ex();Object.keys(q).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===q[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return q[t]}}))}));var G=Tx();Object.keys(G).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===G[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return G[t]}}))}));var z=Dx();Object.keys(z).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===z[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return z[t]}}))}));var F=Px();Object.keys(F).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===F[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return F[t]}}))}));var B=Lx();Object.keys(B).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===B[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return B[t]}}))}));var W=zx();Object.keys(W).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===W[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return W[t]}}))}));var Y=Wx();Object.keys(Y).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Y[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Y[t]}}))}));var V=Jx();Object.keys(V).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===V[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return V[t]}}))}));var Z=aA();Object.keys(Z).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Z[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Z[t]}}))}));var H=cA();Object.keys(H).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===H[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return H[t]}}))}));var K=XE();Object.keys(K).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===K[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return K[t]}}))}));var J=pA();Object.keys(J).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===J[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return J[t]}}))}));var Q=hA();Object.keys(Q).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Q[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Q[t]}}))}));var X=$A();Object.keys(X).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===X[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return X[t]}}))}));var ee=EA();Object.keys(ee).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ee[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ee[t]}}))}));var te=TA();Object.keys(te).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===te[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return te[t]}}))}));var ne=ix();Object.keys(ne).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ne[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ne[t]}}))}));var re=DA();Object.keys(re).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===re[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return re[t]}}))}));var ie=PA();Object.keys(ie).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ie[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ie[t]}}))}));var oe=NA();Object.keys(oe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===oe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return oe[t]}}))}));var ae=LA();Object.keys(ae).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ae[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ae[t]}}))}));var se=wA();Object.keys(se).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===se[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return se[t]}}))}));var de=tA();Object.keys(de).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===de[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return de[t]}}))}));var ce=zA();Object.keys(ce).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ce[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ce[t]}}))}));var ue=eO();Object.keys(ue).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ue[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ue[t]}}))}));var le=rO();Object.keys(le).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===le[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return le[t]}}))}));var pe=aO();Object.keys(pe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===pe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return pe[t]}}))}));var me=cO();Object.keys(me).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===me[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return me[t]}}))}));var fe=pO();Object.keys(fe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===fe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return fe[t]}}))}));var he=hO();Object.keys(he).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===he[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return he[t]}}))}));var ve=yO();Object.keys(ve).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ve[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ve[t]}}))}));var ge=$O();Object.keys(ge).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ge[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ge[t]}}))}));var ye=EO();Object.keys(ye).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ye[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ye[t]}}))}));var be=TO();Object.keys(be).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===be[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return be[t]}}))}));var we=DO();Object.keys(we).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===we[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return we[t]}}))}));var $e=PO();Object.keys($e).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===$e[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return $e[t]}}))}));var Ie=NO();Object.keys(Ie).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ie[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ie[t]}}))}));var ke=LO();Object.keys(ke).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ke[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ke[t]}}))}));var Ee=zO();Object.keys(Ee).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ee[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ee[t]}}))}));var xe=AT();Object.keys(xe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===xe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return xe[t]}}))}));var Ae=WO();Object.keys(Ae).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ae[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ae[t]}}))}));var Te=JO();Object.keys(Te).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Te[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Te[t]}}))}));var Oe=e_();Object.keys(Oe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Oe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Oe[t]}}))}));var _e=r_();Object.keys(_e).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===_e[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return _e[t]}}))}));var De=a_();Object.keys(De).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===De[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return De[t]}}))}));var Se=c_();Object.keys(Se).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Se[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Se[t]}}))}));var Me=_T();Object.keys(Me).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Me[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Me[t]}}))}));var Pe=RI();Object.keys(Pe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Pe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Pe[t]}}))}));var Ce=p_();Object.keys(Ce).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ce[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ce[t]}}))}));var je=h_();Object.keys(je).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===je[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return je[t]}}))}));var Ne=y_();Object.keys(Ne).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ne[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ne[t]}}))}));var Re=$_();Object.keys(Re).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Re[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Re[t]}}))}));var Ue=E_();Object.keys(Ue).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ue[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ue[t]}}))}));var Le=wE();Object.keys(Le).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Le[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Le[t]}}))}));var qe=T_();Object.keys(qe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===qe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return qe[t]}}))}));var Ge=D_();Object.keys(Ge).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ge[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ge[t]}}))}));var ze=P_();Object.keys(ze).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ze[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ze[t]}}))}));var Fe=UT();Object.keys(Fe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Fe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Fe[t]}}))}));var Be=N_();Object.keys(Be).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Be[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Be[t]}}))}));var We=NT();Object.keys(We).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===We[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return We[t]}}))}));var Ye=z_();Object.keys(Ye).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ye[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ye[t]}}))}));var Ve=W_();Object.keys(Ve).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ve[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ve[t]}}))}));var Ze=Z_();Object.keys(Ze).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ze[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ze[t]}}))}));var He=J_();Object.keys(He).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===He[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return He[t]}}))}));var Ke=eD();Object.keys(Ke).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ke[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ke[t]}}))}));var Je=rD();Object.keys(Je).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Je[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Je[t]}}))}));var Qe=aD();Object.keys(Qe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Qe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Qe[t]}}))}));var Xe=cD();Object.keys(Xe).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Xe[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Xe[t]}}))}));var et=pD();Object.keys(et).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===et[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return et[t]}}))}));var tt=hD();Object.keys(tt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===tt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return tt[t]}}))}));var nt=yD();Object.keys(nt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===nt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return nt[t]}}))}));var rt=iE();Object.keys(rt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===rt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return rt[t]}}))}));var it=$D();Object.keys(it).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===it[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return it[t]}}))}));var ot=ED();Object.keys(ot).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ot[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ot[t]}}))}));var at=TD();Object.keys(at).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===at[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return at[t]}}))}));var st=DD();Object.keys(st).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===st[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return st[t]}}))}));var dt=PD();Object.keys(dt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===dt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return dt[t]}}))}));var ct=ox();Object.keys(ct).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ct[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ct[t]}}))}));var ut=KO();Object.keys(ut).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ut[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ut[t]}}))}));var lt=eP();Object.keys(lt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===lt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return lt[t]}}))}));var pt=rP();Object.keys(pt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===pt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return pt[t]}}))}));var mt=aP();Object.keys(mt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===mt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return mt[t]}}))}));var ft=Qk();Object.keys(ft).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ft[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ft[t]}}))}));var ht=pP();Object.keys(ht).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ht[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ht[t]}}))}));var vt=yP();Object.keys(vt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===vt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return vt[t]}}))}));var gt=$P();Object.keys(gt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===gt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return gt[t]}}))}));var yt=TP();Object.keys(yt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===yt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return yt[t]}}))}));var bt=DP();Object.keys(bt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===bt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return bt[t]}}))}));var wt=PP();Object.keys(wt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===wt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return wt[t]}}))}));var $t=LP();Object.keys($t).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===$t[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return $t[t]}}))}));var It=gP();Object.keys(It).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===It[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return It[t]}}))}));var kt=zP();Object.keys(kt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===kt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return kt[t]}}))}));var Et=uI();Object.keys(Et).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Et[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Et[t]}}))}));var xt=mI();Object.keys(xt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===xt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return xt[t]}}))}));var At=WP();Object.keys(At).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===At[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return At[t]}}))}));var Tt=ZP();Object.keys(Tt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Tt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Tt[t]}}))}));var Ot=JP();Object.keys(Ot).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ot[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ot[t]}}))}));var _t=eC();Object.keys(_t).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===_t[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return _t[t]}}))}));var Dt=rC();Object.keys(Dt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Dt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Dt[t]}}))}));var St=aC();Object.keys(St).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===St[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return St[t]}}))}));var Mt=cC();Object.keys(Mt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Mt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Mt[t]}}))}));var Pt=pC();Object.keys(Pt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Pt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Pt[t]}}))}));var Ct=hC();Object.keys(Ct).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ct[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ct[t]}}))}));var jt=yC();Object.keys(jt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===jt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return jt[t]}}))}));var Nt=$C();Object.keys(Nt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Nt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Nt[t]}}))}));var Rt=EC();Object.keys(Rt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Rt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Rt[t]}}))}));var Ut=oE();Object.keys(Ut).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ut[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ut[t]}}))}));var Lt=TC();Object.keys(Lt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Lt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Lt[t]}}))}));var qt=gI();Object.keys(qt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===qt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return qt[t]}}))}));var Gt=DC();Object.keys(Gt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Gt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Gt[t]}}))}));var zt=NC();Object.keys(zt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===zt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return zt[t]}}))}));var Ft=LC();Object.keys(Ft).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ft[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ft[t]}}))}));var Bt=WC();Object.keys(Bt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Bt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Bt[t]}}))}));var Wt=ZC();Object.keys(Wt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Wt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Wt[t]}}))}));var Yt=G_();Object.keys(Yt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Yt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Yt[t]}}))}));var Vt=JC();Object.keys(Vt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Vt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Vt[t]}}))}));var Zt=BC();Object.keys(Zt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Zt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Zt[t]}}))}));var Ht=ej();Object.keys(Ht).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ht[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ht[t]}}))}));var Kt=rj();Object.keys(Kt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Kt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Kt[t]}}))}));var Jt=xk();Object.keys(Jt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Jt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Jt[t]}}))}));var Qt=aj();Object.keys(Qt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Qt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Qt[t]}}))}));var Xt=cj();Object.keys(Xt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Xt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Xt[t]}}))}));var en=pj();Object.keys(en).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===en[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return en[t]}}))}));var tn=hj();Object.keys(tn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===tn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return tn[t]}}))}));var nn=_k();Object.keys(nn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===nn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return nn[t]}}))}));var rn=yj();Object.keys(rn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===rn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return rn[t]}}))}));var on=$j();Object.keys(on).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===on[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return on[t]}}))}));var an=Ej();Object.keys(an).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===an[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return an[t]}}))}));var sn=Tj();Object.keys(sn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===sn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return sn[t]}}))}));var dn=Dj();Object.keys(dn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===dn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return dn[t]}}))}));var cn=Pj();Object.keys(cn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===cn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return cn[t]}}))}));var un=Nj();Object.keys(un).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===un[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return un[t]}}))}));var ln=Lj();Object.keys(ln).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ln[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ln[t]}}))}));var pn=zj();Object.keys(pn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===pn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return pn[t]}}))}));var mn=Wj();Object.keys(mn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===mn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return mn[t]}}))}));var fn=Zj();Object.keys(fn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===fn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return fn[t]}}))}));var hn=Jj();Object.keys(hn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===hn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return hn[t]}}))}));var vn=eN();Object.keys(vn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===vn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return vn[t]}}))}));var gn=XM();Object.keys(gn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===gn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return gn[t]}}))}));var yn=rN();Object.keys(yn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===yn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return yn[t]}}))}));var bn=aN();Object.keys(bn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===bn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return bn[t]}}))}));var wn=cN();Object.keys(wn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===wn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return wn[t]}}))}));var $n=pN();Object.keys($n).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===$n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return $n[t]}}))}));var In=hN();Object.keys(In).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===In[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return In[t]}}))}));var kn=yN();Object.keys(kn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===kn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return kn[t]}}))}));var En=$N();Object.keys(En).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===En[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return En[t]}}))}));var xn=EN();Object.keys(xn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===xn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return xn[t]}}))}));var An=TN();Object.keys(An).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===An[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return An[t]}}))}));var Tn=DN();Object.keys(Tn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Tn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Tn[t]}}))}));var On=PN();Object.keys(On).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===On[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return On[t]}}))}));var _n=NN();Object.keys(_n).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===_n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return _n[t]}}))}));var Dn=LN();Object.keys(Dn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Dn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Dn[t]}}))}));var Sn=zN();Object.keys(Sn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Sn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Sn[t]}}))}));var Mn=WN();Object.keys(Mn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Mn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Mn[t]}}))}));var Pn=ZN();Object.keys(Pn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Pn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Pn[t]}}))}));var Cn=JN();Object.keys(Cn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Cn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Cn[t]}}))}));var jn=rR();Object.keys(jn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===jn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return jn[t]}}))}));var Nn=aR();Object.keys(Nn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Nn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Nn[t]}}))}));var Rn=VS();Object.keys(Rn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Rn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Rn[t]}}))}));var Un=cR();Object.keys(Un).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Un[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Un[t]}}))}));var Ln=pR();Object.keys(Ln).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ln[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ln[t]}}))}));var qn=hR();Object.keys(qn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===qn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return qn[t]}}))}));var Gn=oM();Object.keys(Gn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Gn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Gn[t]}}))}));var zn=jS();Object.keys(zn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===zn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return zn[t]}}))}));var Fn=nk();Object.keys(Fn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Fn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Fn[t]}}))}));var Bn=yR();Object.keys(Bn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Bn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Bn[t]}}))}));var Wn=$R();Object.keys(Wn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Wn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Wn[t]}}))}));var Yn=nR();Object.keys(Yn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Yn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Yn[t]}}))}));var Vn=ER();Object.keys(Vn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Vn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Vn[t]}}))}));var Zn=TR();Object.keys(Zn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Zn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Zn[t]}}))}));var Hn=_S();Object.keys(Hn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Hn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Hn[t]}}))}));var Kn=DR();Object.keys(Kn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Kn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Kn[t]}}))}));var Jn=PR();Object.keys(Jn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Jn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Jn[t]}}))}));var Qn=HI();Object.keys(Qn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Qn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Qn[t]}}))}));var Xn=NR();Object.keys(Xn).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Xn[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Xn[t]}}))}));var er=lP();Object.keys(er).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===er[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return er[t]}}))}));var tr=NI();Object.keys(tr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===tr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return tr[t]}}))}));var nr=tk();Object.keys(nr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===nr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return nr[t]}}))}));var rr=AP();Object.keys(rr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===rr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return rr[t]}}))}));var ir=Kx();Object.keys(ir).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ir[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ir[t]}}))}));var or=Ux();Object.keys(or).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===or[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return or[t]}}))}));var ar=UP();Object.keys(ar).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ar[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ar[t]}}))}));var sr=LR();Object.keys(sr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===sr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return sr[t]}}))}));var dr=zR();Object.keys(dr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===dr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return dr[t]}}))}));var cr=jI();Object.keys(cr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===cr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return cr[t]}}))}));var ur=RT();Object.keys(ur).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===ur[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return ur[t]}}))}));var lr=oA();Object.keys(lr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===lr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return lr[t]}}))}));var pr=WR();Object.keys(pr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===pr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return pr[t]}}))}));var mr=JR();Object.keys(mr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===mr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return mr[t]}}))}));var fr=eU();Object.keys(fr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===fr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return fr[t]}}))}));var hr=jC();Object.keys(hr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===hr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return hr[t]}}))}));var vr=rU();Object.keys(vr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===vr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return vr[t]}}))}));var gr=GE();Object.keys(gr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===gr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return gr[t]}}))}));var yr=aU();Object.keys(yr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===yr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return yr[t]}}))}));var br=cU();Object.keys(br).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===br[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return br[t]}}))}));var wr=KR();Object.keys(wr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===wr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return wr[t]}}))}));var $r=pU();Object.keys($r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===$r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return $r[t]}}))}));var Ir=hU();Object.keys(Ir).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ir[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ir[t]}}))}));var kr=yU();Object.keys(kr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===kr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return kr[t]}}))}));var Er=$U();Object.keys(Er).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Er[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Er[t]}}))}));var xr=eI();Object.keys(xr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===xr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return xr[t]}}))}));var Ar=qD();Object.keys(Ar).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Ar[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ar[t]}}))}));var Tr=EU();Object.keys(Tr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Tr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Tr[t]}}))}));var Or=TU();Object.keys(Or).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Or[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Or[t]}}))}));var _r=DU();Object.keys(_r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===_r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return _r[t]}}))}));var Dr=CU();Object.keys(Dr).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===Dr[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return Dr[t]}}))}))}(B$)),B$}var NU=jU();function RU(e,t){const[n,r,i,o,a,s]=function(e){const[t,n]=e.split("T");if(!t||!n)throw Error("Invalid naive datetime format: "+e);const r=[...t.split("-"),...n.split(":")].map(Number);if(r.length<6)throw Error("Invalid naive datetime format: "+e);return r.slice(0,6)}(e);return new F$.TZDate(n,r-1,i,o,a,s,t)}function UU(e,t){const n=NU.parse(e,"yyyy-MM-dd'T'HH:mm:ss",new Date);return NU.format(n,t)}function LU(e,t){return RU(e,t)<new F$.TZDate(new Date,t)}function qU(e,t){return RU(e,t)>new F$.TZDate(new Date,t)}function GU(e){return null==e||-1===e?1/0:Math.max(0,e)}function zU(e){return Math.min(GU(e.admission.available),GU(e.admission.limit),GU(e.section?.available),GU(e.section?.limit))}function FU(e){return zU(e)<=0}function BU(e,t,n,r=new Date){return function(e,t,n,r=new Date){return"AFTER_ADMISSION"===e.visibility&&!function(e,t,n=new Date){return!!e&&(!!(e.saleEndsAt&&RU(e.saleEndsAt,t)<n)||null!=e.capacity&&-1!==e.capacity&&(e.sold??0)>=e.capacity)}(function(e,t){if("AFTER_ADMISSION"===e.visibility&&e.visibleAfterAdmissionId)return t.find((t=>t.id===e.visibleAfterAdmissionId))}(e,t),n,r)}(e,t,n,r)?{text:"Available soon"}:null}function WU(e){return e?.trim().toUpperCase()??""}function YU(e){return`${e.admissionId}::${e.sectionId??"none"}`}function VU(e,t){return`${e}::${t||"none"}`}function ZU(e){return e?"total"in e&&"number"==typeof e.total?e.total:(e.base??0)+(e.booking??0):0}function HU(e){return e.location?.timeZone??"UTC"}function KU(e){return new Map(e.sections.map((e=>[e.id,e])))}function JU(e,t){return!e.sectionId||t.has(e.sectionId)}function QU(e){const t=KU(e),n=HU(e);return e.admissions.some((r=>function(e,t,n,r){return!!JU(e,r)&&!BU(e,t,n)&&!!function(e,t){return!qU(e.saleStartsAt,t)&&!LU(e.saleEndsAt,t)}(e,n)&&function(e,t){return zU({admission:e,section:t})>0}(e,function(e,t){if(e.sectionId)return t.get(e.sectionId)}(e,r))}(r,e.admissions,n,t)))}function XU(e,t){return qU(e.saleStartsAt,t)?{text:"On sale "+UU(e.saleStartsAt,"EEE, MMM d · h:mm a"),tone:"muted"}:null}function eL(e){const t=function(e){return LU(e.entryEndsAt,HU(e))}(e),n=e.url||void 0,r=function(e){return!QU(e)&&"DOOR"===function(e){const t=KU(e),n=e.admissions.filter((e=>JU(e,t)));if(0!==n.length)return QU(e)?"ONLINE":function(e,t){const n=e.filter((e=>LU(e.saleEndsAt,t)));if(0!==n.length)return n.some((e=>"DOOR"===e.saleEndsBehavior))?"DOOR":n.every((e=>"SOLD_OUT"===e.saleEndsBehavior))?"SOLD_OUT":"SALE_ENDED"}(n,HU(e))}(e)}(e),i=!t&&!!n,o=!t&&!i&&function(e){const t=KU(e);return e.admissions.some((e=>JU(e,t)))}(e);return{externalTicketUrl:n,isDoorOnly:r,isEnded:t,isUnavailableForSale:!r&&!QU(e)&&o,showExternalTicketing:i,showTicketing:o,ticketHeading:r?"Tickets at the Door":"Get Tickets"}}function tL(e){const t=VU(e.admission.id,e.section.id);return cL({admission:e.admission,initialPrice:e.initialAdmissionPrices?.[t],previewItem:e.previewItems.get(t),quoteItem:e.quoteItems.get(t)}).base}function nL(e){return null==e||-1===e?1/0:Math.max(0,e)}function rL(e,t,n){const r=t.filter((t=>t.sectionId===e.id)).sort(((e,t)=>e.order-t.order));if("STACKED"!==e.visibility||r.length<=1)return r;const i=n.mode??"default",o=r.filter((t=>function(e){return"door"===e.mode||!e.event||!dL({admission:e.admission,event:e.event,section:e.section}).disabled}({admission:t,event:n.event,mode:i,section:e}))),a=o.length>0?o:r,[s,d]=[...a].sort(function(e,t){const n=uL(e.previewQuote??null),r=uL(e.quote??null);return(i,o)=>{const a=tL({admission:i,initialAdmissionPrices:e.initialAdmissionPrices,previewItems:n,quoteItems:r,section:t})-tL({admission:o,initialAdmissionPrices:e.initialAdmissionPrices,previewItems:n,quoteItems:r,section:t});if(0!==a)return a;const s=i.order-o.order;return 0!==s?s:i.id.localeCompare(o.id)}}(n,e));return s?d&&function(e){const t=nL(e.available);if(!Number.isFinite(t))return!1;const n=nL(e.limit);return Number.isFinite(n)?n>t:t<10}(s)?[s,d]:[s]:[]}function iL(e,t,n){return e.map((e=>({type:"section",section:e,admissions:rL(e,t,n)}))).filter((e=>e.admissions.length>0))}function oL(e){return"section"===e.type?e.section.order:e.admission.order}function aL(e,t){return function(e,t){return-1===(e.available??0)&&-1===e.capacity&&(!t||-1===(t.available??0))}(e,t)?10:Math.min(zU({admission:e,section:t}),10)}function sL(e,t,n){return[!t,!n,(e.available??0)>0,(e.available??0)<20].every(Boolean)}function dL(e){const t=HU(e.event),n=BU(e.admission,e.event.admissions,t),r=qU(e.admission.saleStartsAt,t),i=LU(e.admission.saleEndsAt,t),o=!!e.sectionSoldOut||i&&"SOLD_OUT"===e.admission.saleEndsBehavior||FU({admission:e.admission,section:e.section}),a=o||r||i,s=function(e){return"DOOR"===e.value&&(e.soldOut||e.saleEnded)?{text:"Available At Door",tone:"success"}:e.soldOut?{text:"Sold Out",tone:"destructive"}:e.saleEnded?{text:"Sale Ended",tone:"destructive"}:null}({saleEnded:i,soldOut:o,value:e.admission.saleEndsBehavior});return{disabled:a||!!n,label:n?{...n,tone:"muted"}:XU(e.admission,t),maxQuantity:aL(e.admission,e.section),postSale:i,showScarcity:sL(e.admission,o,a),soldOut:o,statusLabel:s?.text??null,statusTone:s?.tone??null}}function cL(e){const t=e.quoteItem??e.previewItem;if(t){const e=function(e){return Math.max(e?.quantity??1,1)}(t),n=Math.round(Math.max((t.price.base+t.price.discount)/e,0)),r=Math.round(t.price.booking/e);return!t.price.discount||t.price.discount>=0?{base:n,discounted:!1,fees:r}:{base:n,discounted:!0,fees:r,gross:Math.round(t.price.base/e)}}if(e.initialPrice&&e.initialPrice.discount<0){const t=e.admission.price.booking??0;return{base:Math.max(e.initialPrice.total-t,0),discounted:!0,fees:t,gross:Math.max(e.initialPrice.gross-t,0)}}return{base:e.admission.price.base??0,discounted:!1,fees:e.admission.price.booking??0}}function uL(e){return function(e){return new Map((e?.items??[]).filter((e=>"ADMISSION"===e.kind&&e.admissionId)).map((e=>[YU({admissionId:e.admissionId??"",sectionId:e.sectionId}),e])))}(e)}function lL(e){const t=new Set(e.sections.map((e=>e.id))),n=HU(e);return e.admissions.filter((r=>!(BU(r,e.admissions,n)||r.sectionId&&!t.has(r.sectionId)||qU(r.saleStartsAt,n)||LU(r.saleEndsAt,n)))).map((e=>({admissionId:e.id??"",quantity:1,sectionId:e.sectionId??void 0})))}const pL=e=>e.price?.total??0;function mL(e,t){return e instanceof Error?e.message:t}function fL(e){try{return JSON.parse(e)}catch{return null}}function hL(e){return e.teamId?e.promoterId?null:"missing_promoter_id":"missing_team_id"}function vL(e){return[e.location?.venue?.name,e.location?.name].find(Boolean)}function gL(e){return e||void 0}function yL(e){if(!e)return"external site";try{return new URL(e).hostname.replace(/^www\./,"")}catch{return"external site"}}function bL(e){return!!e?.items?.length}function wL(e){return{product_id:e.admissionId,sku:e.admissionId,quantity:e.quantity,admission_id:e.admissionId,section_id:e.sectionId}}function $L({event:e,admission:t,section:n}){return{name:t?.name,category:e?.name,variant:n?.name}}function IL(e){return{price:ZU(e.price)/100,price_base:e.price?.base,price_booking_fee:e.price?.booking}}const kL=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("path",{d:"M8 2v4"}),i("path",{d:"M16 2v4"}),i("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),i("path",{d:"M3 10h18"})),EL=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),i("circle",{cx:"12",cy:"10",r:"3"})),xL=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.checkoutInit=r(this,"checkoutInit"),this.cartUpdate=r(this,"cartUpdate"),this.errorOccurred=r(this,"errorOccurred"),this.analyticsEventSkipped=r(this,"analyticsEventSkipped")}get host(){return this}tenantId;eventId;apiUrl="https://api.session.services";locale="en-US";returnUrl;couponCode;initialAdmissionPrices;initialPreviewQuote;passcode;stickyCheckout=!1;theme="system";enableAnalytics=!0;debugAnalytics=!1;event=null;selectedItems=new Map;quote=null;previewQuote=null;loading=!0;error=null;quoteLoading=!1;previewLoading=!1;quoteError=null;couponError=null;couponInput="";appliedCouponCode="";passcodeInput="";activePasscode="";passcodeDenied=!1;selectionPrompt=!1;checkoutLoading=!1;currentTheme="light";openModalAdmissionId=null;checkoutInit;cartUpdate;errorOccurred;analyticsEventSkipped;client;analytics;mediaQueryList;requestId=0;previewRequestId=0;quoteTimer;promptTimer;async componentWillLoad(){"undefined"!=typeof window&&window.addEventListener("popstate",this.handleDiscountQueryChange),await this.initializeComponent()}async propsChanged(){await this.initializeComponent()}async couponCodeChanged(){await this.setInitialCoupon()}themeChanged(){this.setupTheme()}disconnectedCallback(){"undefined"!=typeof window&&window.removeEventListener("popstate",this.handleDiscountQueryChange),this.mediaQueryList&&this.mediaQueryList.removeEventListener("change",this.handleSystemThemeChange),this.openModalAdmissionId&&document.removeEventListener("keydown",this.handleModalKeyDown),this.clearQuoteTimer(),this.clearPromptTimer()}handleDiscountQueryChange=()=>{WU(this.couponCode)||this.setInitialCoupon().catch((()=>{}))};async initializeComponent(){if(this.error=null,this.event=null,this.selectedItems=new Map,this.quote=null,this.previewQuote=null,this.quoteError=null,this.couponError=null,this.couponInput=this.initialCouponCode(),this.appliedCouponCode=this.couponInput,this.activePasscode=this.passcode||"",this.passcodeInput=this.activePasscode,this.passcodeDenied=!1,!this.tenantId||!this.eventId)return this.error="Missing required configuration: tenantId and eventId",void(this.loading=!1);this.client=function(e){return J(new Nb(mb,{url:Ub(e.environment),headers:{"x-tenant-id":e.tenantId??"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",...e.headers??{}}}))}({environment:this.apiUrl,tenantId:this.tenantId}),this.setupTheme(),await this.loadEventData()}async setInitialCoupon(){const e=this.initialCouponCode();if(this.couponInput=e,this.quote=null,this.previewQuote=this.activeInitialPreviewQuote(e),this.quoteError=null,this.couponError=null,!e)return this.appliedCouponCode="",void await this.updateQuote();this.selectedItems.size>0?await this.applyCartCoupon(e):this.previewQuote||await this.applyPreviewCoupon(e)}initialCouponCode(){return WU(this.couponCode)||("undefined"==typeof window?"":WU(function(e){return new URLSearchParams(e).get("discount")??""}(window.location.search)))}parsedInitialPreviewQuote(){return this.initialPreviewQuote?"string"!=typeof this.initialPreviewQuote?this.initialPreviewQuote:fL(this.initialPreviewQuote):null}parsedInitialAdmissionPrices(){if(this.initialAdmissionPrices)return"string"!=typeof this.initialAdmissionPrices?this.initialAdmissionPrices:fL(this.initialAdmissionPrices)??void 0}activeInitialPreviewQuote(e=this.appliedCouponCode){return e?e!==this.initialCouponCode()?null:this.parsedInitialPreviewQuote():null}activeInitialAdmissionPrices(){if(this.appliedCouponCode&&this.appliedCouponCode===this.initialCouponCode())return this.parsedInitialAdmissionPrices()}setupTheme(){this.mediaQueryList&&this.mediaQueryList.removeEventListener("change",this.handleSystemThemeChange),"system"===this.theme?(this.mediaQueryList=window.matchMedia("(prefers-color-scheme: dark)"),this.currentTheme=this.mediaQueryList.matches?"dark":"light",this.mediaQueryList.addEventListener("change",this.handleSystemThemeChange)):this.currentTheme=this.theme}handleSystemThemeChange=e=>{"system"===this.theme&&(this.currentTheme=e.matches?"dark":"light")};trackEvent(e,t={}){const n=this.analyticsContext(e);n&&n.analytics.track(e,{...this.analyticsProperties(n.event),...t})}analyticsProperties(e,t={}){return{event_id:this.eventId,team_id:e.teamId,promoter_id:e.promoterId,event_name:e.name,event_slug:e.slug,currency:e.currency,...t}}analyticsForEvent(e,t){if(!this.enableAnalytics)return;const n=hL(t);if(n)this.emitAnalyticsEventSkipped(e,n,t);else{if(this.analytics)return this.analytics;this.emitAnalyticsEventSkipped(e,"analytics_not_initialized",t)}}analyticsContext(e){const t=this.event;if(!t)return void this.emitAnalyticsEventSkipped(e,"missing_event");const n=this.analyticsForEvent(e,t);return n?{analytics:n,event:t}:void 0}emitAnalyticsEventSkipped(e,t,n,r){const i={eventType:e,eventId:this.eventId,reason:t,promoterId:n?.promoterId||void 0,teamId:n?.teamId||void 0};this.analyticsEventSkipped.emit(i),this.debugAnalytics&&console.warn("[SessionServicesTicketing] Analytics event skipped:",i,r)}getLowestPrice(){const e=this.event;return e?.admissions.length?Math.min(...e.admissions.map((e=>ZU(e.price)))):0}getAdmissionListProducts(e){return e.admissions.map(((t,n)=>({product_id:t.id,sku:t.id,name:t.name,category:e.name,price:ZU(t.price)/100,quantity:1,position:n+1,admission_id:t.id,section_id:t.sectionId,price_base:t.price?.base,price_booking_fee:t.price?.booking,available:t.available,capacity:t.capacity})))}async loadEventData(){try{this.loading=!0,this.error=null,this.passcodeDenied=!1;const e=await this.client.event.get({key:this.eventId,couponCode:this.appliedCouponCode||void 0,passcode:this.activePasscode||void 0});this.event=e.event,this.pruneSelectedItems(e.event),this.trackLoadedEvent(e.event),await this.updatePreviewQuote()}catch(e){this.passcodeDenied=function(e){const t=mL(e,"");return!!/incorrect passcode/i.test(t)||"UNAUTHORIZED"===function(e){const t=function(e){if(e&&"object"==typeof e)return e.code}(e);return"string"==typeof t?t:void 0}(e)&&/passcode/i.test(t)}(e),this.error=mL(e,"Failed to load event data"),this.errorOccurred.emit({error:this.error})}finally{this.loading=!1}}pruneSelectedItems(e){const t=new Set(e.admissions.map((e=>VU(e.id,e.sectionId??null)))),n=Array.from(this.selectedItems).filter((([e])=>t.has(e)));n.length!==this.selectedItems.size&&(this.selectedItems=new Map(n),this.quote=null,this.quoteError=null)}trackLoadedEvent(e){this.setupAnalytics(e)&&(this.trackPageViewed(e),this.trackProductViewed(e),this.trackEvent("Product List Viewed",{list_id:this.eventId,category:"Admissions",products:this.getAdmissionListProducts(e)}))}setupAnalytics(e){if(!this.enableAnalytics)return!1;const t=hL(e);if(t)return this.emitAnalyticsEventSkipped("Page Viewed",t,e),!1;if(this.analytics)return!0;try{this.analytics=function(e){let t,n=e.debug??!1,r=c$(e.client,n,e.destinations),i=p$(),o=m$();n&&console.log("[Analytics] Initialized:",{sessionId:i,anonymousId:o});let a=(e,n,r)=>{let a=Qb();return{type:e,name:n,properties:{...Jb({anonymousId:o,context:a,sessionId:i}),...r},context:a,timestamp:Date.now(),messageId:g$(),sessionId:i,anonymousId:o,userId:t}},s=async(e,t)=>{try{await r.sendEvent(e,t)}catch(e){n&&console.error("[Analytics] Failed to send event:",e)}},d=(e,t)=>{let r=e.promoter_id;return!r&&n&&console.warn(`[Analytics] ${t}() called without promoter_id, skipping`),r},c=async(e,t={})=>{let n=d(t,"track");n&&await s(a("track",e,t),n)},u=async(e={})=>{let t=d(e,"preload");t&&await s(a("preload","Preload",e),t)},l=async(e,t={})=>{let n=d(t,"page");n&&await s(a("page",e||"Page Viewed",t),n)},p=async(e,t={})=>{let n=d(t,"screen");n&&await s(a("screen",e||"Screen Viewed",t),n)},m=async(e,r={})=>{t=e;let a=r.promoter_id;a&&await s({type:"identify",properties:{},context:Qb(),timestamp:Date.now(),messageId:g$(),sessionId:i,anonymousId:o,userId:e,traits:r},a),n&&console.log("[Analytics] User identified:",e)},f=async(e,r={})=>{let a=r.promoter_id;a&&await s({type:"group",properties:{},context:Qb(),timestamp:Date.now(),messageId:g$(),sessionId:i,anonymousId:o,userId:t,groupId:e,traits:r},a),n&&console.log("[Analytics] Group called:",{groupId:e,traits:r})};return{preload:(e={})=>{u(e)},preloadAsync:u,track:(e,t={})=>{c(e,t)},trackAsync:c,page:(e,t={})=>{l(e,t)},pageAsync:l,screen:(e,t={})=>{p(e,t)},screenAsync:p,identify:(e,t={})=>{m(e,t)},identifyAsync:m,alias:(e,t)=>{n&&console.log("[Analytics] Alias called:",{userId:e,previousId:t})},group:(e,t={})=>{f(e,t)},groupAsync:f,reset:()=>{let e=function(e){let t=_s(),n=Ds();return e.setCookie(Ts,t),e.setItem(Os,n),{sessionId:t,anonymousId:n}}(l$);i=e.sessionId,o=e.anonymousId,t=void 0,r.clearCache(),n&&console.log("[Analytics] Session reset:",{sessionId:i,anonymousId:o})}}}({client:this.client,debug:this.debugAnalytics})}catch(t){return this.emitAnalyticsEventSkipped("Page Viewed","analytics_initialization_failed",e,t),!1}return!0}trackPageViewed(e){const t=this.analyticsForEvent("Page Viewed",e);t&&t.page("Ticketing Widget",this.analyticsProperties(e))}trackProductViewed(e){const t=this.getLowestPrice();this.trackEvent("Product Viewed",{product_id:this.eventId,sku:this.eventId,name:e.name,category:"Event",value:t/100,price:t/100,event_date:e.entryStartsAt,venue_name:vL(e),venue_city:e.location?.city})}async updateQuantity(e,t,n){const r=VU(e,t);await this.setQuantity(e,t,(this.selectedItems.get(r)||0)+n)}async setQuantity(e,t,n){const r=VU(e,t),i=this.event?.admissions.find((t=>t.id===e));if(!i)return;const o=this.selectedItems.get(r)||0,a=Math.max(0,Math.min(n,this.getMaxQuantity(i,t)));if(o===a)return;this.selectionPrompt=!1,this.setSelectedQuantity(r,a);const s=t?this.event?.sections.find((e=>e.id===t)):null;this.trackQuantityChange({admission:i,section:s,sectionId:t,delta:a-o}),this.scheduleQuoteUpdate()}setSelectedQuantity(e,t){0===t?this.selectedItems.delete(e):this.selectedItems.set(e,t),this.selectedItems=new Map(this.selectedItems)}trackQuantityChange(e){e.delta>0?this.trackProductAdded(e):e.delta<0&&this.trackProductRemoved(e)}trackProductAdded(e){this.trackEvent("Product Added",{...this.getQuantityAnalytics(e),price_base:e.admission.price?.base,price_booking_fee:e.admission.price?.booking})}trackProductRemoved(e){this.trackEvent("Product Removed",this.getQuantityAnalytics(e))}getQuantityAnalytics(e){return{product_id:e.admission.id,sku:e.admission.id,name:e.admission.name,category:this.event?.name,variant:e.section?.name,price:ZU(e.admission.price)/100,quantity:Math.abs(e.delta),admission_id:e.admission.id,section_id:gL(e.sectionId),section_name:e.section?.name}}async updateQuote(){if(this.clearQuoteTimer(),0===this.selectedItems.size)return this.quote=null,this.quoteError=null,this.quoteLoading=!1,void await this.updatePreviewQuote();this.requestId++;const e=this.requestId;try{this.quoteLoading=!0,this.quoteError=null;const t=await this.fetchCartQuote(this.appliedCouponCode);this.applyQuote(t.quote,e)}catch(t){this.handleQuoteError(e)}finally{e===this.requestId&&(this.quoteLoading=!1)}}scheduleQuoteUpdate(){this.clearQuoteTimer(),0!==this.selectedItems.size?(this.quoteLoading=!0,this.quoteTimer=setTimeout((()=>{this.quoteTimer=void 0,this.updateQuote().catch((()=>{}))}),150)):this.updateQuote().catch((()=>{}))}clearQuoteTimer(){this.quoteTimer&&(clearTimeout(this.quoteTimer),this.quoteTimer=void 0)}clearPromptTimer(){this.promptTimer&&(clearTimeout(this.promptTimer),this.promptTimer=void 0)}promptTicketSelection(){this.selectionPrompt=!0,this.clearPromptTimer(),this.promptTimer=setTimeout((()=>{this.selectionPrompt=!1,this.promptTimer=void 0}),800)}getQuoteRequestItems(){return Array.from(this.selectedItems,(([e,t])=>{const n=function(e){const[t,n]=e.split("::");return{admissionId:t,sectionId:"none"===n?void 0:n}}(e);return{quantity:t,admissionId:n.admissionId,sectionId:n.sectionId}}))}fetchCartQuote(e){return this.client.order.quote({eventId:this.eventId,items:this.getQuoteRequestItems(),couponCode:e||void 0})}applyQuote(e,t){t===this.requestId&&(this.quote=e,this.quoteError=null,this.cartUpdate.emit(this.quote),this.trackEvent("Cart Viewed",{products:this.getCartProducts(),value:pL(this.quote)/100,currency:this.event?.currency}))}handleQuoteError(e){e===this.requestId&&(this.quote=null,this.quoteError="Failed to update cart. Please try again.",this.errorOccurred.emit({error:this.quoteError}))}async updatePreviewQuote(){const e=this.event;if(!e||!this.appliedCouponCode)return this.previewRequestId++,this.previewLoading=!1,void(this.previewQuote=null);const t=this.activeInitialPreviewQuote();if(t)return this.previewRequestId++,this.previewLoading=!1,void(this.previewQuote=t);if(0===lL(e).length)return this.previewRequestId++,this.previewLoading=!1,void(this.previewQuote=null);this.previewRequestId++;const n=this.previewRequestId;try{this.previewLoading=!0;const e=await this.fetchPreviewQuote(this.appliedCouponCode);n===this.previewRequestId&&(this.previewQuote=e.quote)}catch(e){n===this.previewRequestId&&(this.previewQuote=null,this.appliedCouponCode="",this.setCouponError())}finally{n===this.previewRequestId&&(this.previewLoading=!1)}}fetchPreviewQuote(e){const t=this.event;if(!t)throw Error("Missing event");return this.client.order.quote({eventId:t.id,items:lL(t),couponCode:e})}handleCouponInput=e=>{e.target instanceof HTMLInputElement&&(this.couponInput=e.target.value.toUpperCase())};handleCouponKeyDown=e=>{"Enter"===e.key&&(e.preventDefault(),this.applyCoupon().catch((()=>{})))};async applyCoupon(){const e=WU(this.couponInput);this.couponInput=e,this.quoteError=null,this.couponError=null,this.trackCouponEntered(e),this.selectedItems.size>0?await this.applyCartCoupon(e):await this.applyPreviewCoupon(e)}async removeCoupon(){if(this.couponError=null,this.quoteError=null,this.selectedItems.size>0)return void await this.removeCartCoupon();this.couponInput="";const e=this.appliedCouponCode;this.appliedCouponCode="",await this.loadEventData(),this.previewRequestId++,this.previewLoading=!1,this.previewQuote=null,this.trackCouponRemoved(e,null)}async applyCartCoupon(e){this.requestId++;const t=this.requestId,n=this.appliedCouponCode;try{if(this.quoteLoading=!0,this.appliedCouponCode=e,await this.loadEventData(),t!==this.requestId)return;if(0===this.selectedItems.size)return void await this.applyPreviewCoupon(e);const n=await this.fetchCartQuote(e);if(t!==this.requestId)return;this.appliedCouponCode=e,this.previewQuote=null,this.applyQuote(n.quote,t),this.trackCouponApplied(e,n.quote)}catch(r){t===this.requestId&&(this.appliedCouponCode=n),this.handleCouponError(t),this.trackCouponDenied(e)}finally{t===this.requestId&&(this.quoteLoading=!1)}}async applyPreviewCoupon(e){const t=this.appliedCouponCode;this.appliedCouponCode=e;try{await this.loadEventData()}catch(n){return this.appliedCouponCode=t,this.setCouponError(),void this.trackCouponDenied(e)}const n=this.event;if(!n)return;const r=this.activeInitialPreviewQuote(e);if(r)return this.appliedCouponCode=e,this.previewQuote=r,void this.trackCouponApplied(e,r);if(0===lL(n).length)return this.appliedCouponCode=e,void(this.previewQuote=null);this.previewRequestId++;const i=this.previewRequestId;try{this.previewLoading=!0;const t=await this.fetchPreviewQuote(e);if(i!==this.previewRequestId)return;this.appliedCouponCode=e,this.previewQuote=t.quote,this.trackCouponApplied(e,t.quote)}catch(t){i===this.previewRequestId&&(this.setCouponError(),this.trackCouponDenied(e))}finally{i===this.previewRequestId&&(this.previewLoading=!1)}}async removeCartCoupon(){this.requestId++;const e=this.requestId,t=this.appliedCouponCode;try{if(this.quoteLoading=!0,this.appliedCouponCode="",await this.loadEventData(),0===this.selectedItems.size)return this.couponInput="",this.previewQuote=null,void this.trackCouponRemoved(t,null);const n=await this.fetchCartQuote("");if(e!==this.requestId)return;this.couponInput="",this.appliedCouponCode="",this.previewQuote=null,this.applyQuote(n.quote,e),this.trackCouponRemoved(t,n.quote)}catch(t){this.handleCouponError(e,"Failed to remove coupon. Please try again.")}finally{e===this.requestId&&(this.quoteLoading=!1)}}handleCouponError(e,t){e===this.requestId&&this.setCouponError(t)}setCouponError(e="Failed to apply coupon. Please check the code."){this.couponError=e,this.errorOccurred.emit({error:this.couponError})}trackCouponEntered(e){e&&this.trackEvent("Coupon Entered",{coupon:e})}trackCouponApplied(e,t){e&&this.trackEvent("Coupon Applied",{coupon:e,products:this.getProductsForQuote(t),total:t?pL(t)/100:0,value:t?pL(t)/100:0})}trackCouponDenied(e){e&&this.trackEvent("Coupon Denied",{coupon:e,reason:this.couponError})}trackCouponRemoved(e,t){e&&this.trackEvent("Coupon Removed",{coupon:e,products:this.getProductsForQuote(t),total:t?pL(t)/100:0,value:t?pL(t)/100:0})}handlePasscodeInput=e=>{e.target instanceof HTMLInputElement&&(this.passcodeInput=e.target.value)};async submitPasscode(e){e.preventDefault(),this.activePasscode=this.passcodeInput.trim(),await this.loadEventData()}async initiateCheckout(){if(!this.isCheckoutDisabled()&&this.quote)try{this.checkoutLoading=!0,this.quoteError=null;const e=await this.client.order.create({eventId:this.eventId,items:this.getCheckoutItems(this.quote),couponCode:this.appliedCouponCode||void 0,returnUrl:this.returnUrl,channel:y$("elements")});this.trackCheckoutStarted(this.quote,e.order.id),this.handleCheckoutOrder(e.order)}catch(e){this.handleCheckoutError()}}trackCheckoutStarted(e,t){const n=pL(e)/100;this.trackEvent("Checkout Started",{order_id:t,value:n,revenue:n,currency:this.event?.currency,products:this.getCheckoutProducts()})}trackExternalTicketClick(e,t){this.trackEvent("Checkout Started",{ticketing_mode:"external",external_ticket_url:e,external_ticket_domain:yL(e),cta_surface:t})}getCheckoutItems(e){return e.items.map((e=>({quantity:e.quantity,admissionId:e.admissionId,sectionId:e.sectionId})))}handleCheckoutOrder(e){this.checkoutInit.emit({orderId:e.id,checkoutUrl:e.checkoutUrl}),e.checkoutUrl?window.location.href=e.checkoutUrl:this.checkoutLoading=!1}handleCheckoutError(){this.quoteError="Failed to initiate checkout. Please try again.",this.errorOccurred.emit({error:this.quoteError}),this.checkoutLoading=!1}handleStickyCheckoutClick(e){if(e.isDoorOnly||!bL(this.quote))return this.promptTicketSelection(),void this.scrollToTicketSelector();this.initiateCheckout().catch((()=>{}))}scrollToTicketSelector(){const e=this.host.shadowRoot?.querySelector(".tickets-wrapper")??this.host;window.scrollTo({behavior:"smooth",top:Math.max(e.getBoundingClientRect().top+window.scrollY-100,0)})}getCartProducts(){return this.quote?this.getProductsForQuote(this.quote):[]}getCheckoutProducts(){return this.quote?this.quote.items.map((e=>({...this.getQuoteProduct(e),section_name:this.getQuoteSection(e)?.name}))):[]}getProductsForQuote(e){return e?e.items.map((e=>this.getQuoteProduct(e))):[]}getQuoteProduct(e){return{...wL(e),...$L(this.quoteProductContext(e)),...IL(e)}}quoteProductContext(e){return{event:this.event,admission:this.getQuoteAdmission(e),section:this.getQuoteSection(e)}}getQuoteAdmission(e){return this.event?.admissions.find((t=>t.id===e.admissionId))}getQuoteSection(e){return e.sectionId?this.event?.sections.find((t=>t.id===e.sectionId)):null}formatDateTimeRange(e,t){return`${UU(e,"EEE, MMM d · h:mm a")} - ${UU(t,"h:mm a")}`}formatPriceValue(e){const t=this.event?.currency;if(!t)return new Intl.NumberFormat(this.locale,{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(e/100);try{return function(e,t){let n=f$[t]??h$,r=10**n.exponent;return function(e,t){let n=`${e}:${t}`,r=v$.get(n);if(r)return r;let i=Intl.NumberFormat(e,{style:"currency",currency:t});return v$.set(n,i),i}(n.locale,t).format(e/r)}(e,t)}catch(n){return console.error("formatPrice failed, using fallback",{error:n,currency:t,priceInCents:e,locale:this.locale}),new Intl.NumberFormat(this.locale,{style:"currency",currency:t}).format(e/100)}}handleQuantityDecrease=async(e,t)=>{await this.updateQuantity(e,t,-1)};handleQuantityIncrease=async(e,t)=>{await this.updateQuantity(e,t,1)};handleQuantityInput=async(e,t,n)=>{n.target instanceof HTMLInputElement&&await this.setQuantity(e,t,Number(n.target.value)||0)};openModal=(e,t)=>{t.stopPropagation(),this.openModalAdmissionId=e,document.addEventListener("keydown",this.handleModalKeyDown)};closeModal=()=>{this.openModalAdmissionId=null,document.removeEventListener("keydown",this.handleModalKeyDown)};handleModalKeyDown=e=>{"Escape"===e.key&&this.closeModal()};handleBackdropClick=e=>{e.target instanceof n&&e.target.classList.contains("modal-backdrop")&&this.closeModal()};renderQuantityControls(e,t,n,r){const o=VU(e.id,t),a=this.selectedItems.get(o)||0;return i("div",{class:"quantity-controls"},i("button",{type:"button",class:"quantity-btn decrease",onClick:()=>this.handleQuantityDecrease(e.id,t),disabled:n||0===a,"aria-label":"Decrease quantity","data-testid":"event-admission-decrement"},"−"),i("input",{class:"quantity-value",type:"number",min:"0",max:r,inputmode:"numeric",value:a,onInput:n=>this.handleQuantityInput(e.id,t,n),disabled:n,"aria-label":"Quantity for "+e.name,"data-testid":"event-admission-quantity-input"}),i("button",{type:"button",class:"quantity-btn increase",onClick:()=>this.handleQuantityIncrease(e.id,t),disabled:n||a>=r,"aria-label":"Increase quantity","data-testid":"event-admission-increment"},"+"))}getMaxQuantity(e,t){return this.event?dL({admission:e,event:this.event,section:this.getSection(t)}).maxQuantity:0}getSection(e){if(e)return this.event?.sections.find((t=>t.id===e))}renderEventTimeAndLocation(e){return i(i.Fragment,null,this.renderEventTime(e,"admission-time"),this.renderEventLocation(e,"admission-venue"))}renderEventTime(e,t){return e.entryStartsAt&&e.entryEndsAt?i("div",{class:t},kL(),this.formatDateTimeRange(e.entryStartsAt,e.entryEndsAt)):null}renderAdmissionTime(e,t){return e?.entryStartsAt&&e.entryEndsAt?i("div",{class:t},kL(),this.formatDateTimeRange(e.entryStartsAt,e.entryEndsAt)):null}renderSectionLocation(e){const t=[e.location?.name,e.location?.city].filter(Boolean).join(", ");return t?i("div",{class:"section-venue"},EL(),t):null}renderEventLocation(e,t){return e.location?i("div",{class:t},EL(),e.location.name):null}renderPriceAndControls(e,t,n,r){const o=VU(e.id,t),a=cL({admission:e,initialPrice:this.activeInitialAdmissionPrices()?.[o],quoteItem:uL(this.quote).get(o),previewItem:uL(this.previewQuote).get(o)}),s=function(e){return e.discounted&&void 0!==e.gross?Math.max(e.gross-e.base,0):0}(a);return i("div",{class:"admission-price-info"},i("div",{class:"admission-price-wrapper"},s>0&&i("span",{class:"admission-savings"},"Save ",this.formatPriceValue(s)),this.renderAdmissionPrice(a),a.fees>0&&i("span",{class:"admission-booking-fee"},this.formatPriceValue(a.fees)," Booking Fee"),n.showScarcity&&i("span",{class:"admission-availability"},e.available," tickets remaining"),n.label&&i("span",{class:"admission-sale-label "+n.label.tone},n.label.text)),this.renderAdmissionControls(e,t,n,r))}renderAdmissionPrice(e){return e.discounted?i("span",{class:"admission-price-row"},i("span",{class:"admission-price discounted"},this.formatPriceValue(e.base)),void 0!==e.gross&&i("span",{class:"admission-price-original"},this.formatPriceValue(e.gross))):i("span",{class:"admission-price"},this.formatPriceValue(e.base))}renderAdmissionControls(e,t,n,r){return n.statusLabel?i("div",{class:"sold-out-controls "+(n.statusTone??"")},i("span",{class:"sold-out-text"},n.statusLabel)):"door"===r?null:this.renderQuantityControls(e,t,n.disabled,n.maxQuantity)}renderAdmission(e,t,n,r=!1,o="default"){const a=dL({admission:e,event:t,section:n,sectionSoldOut:r}),s=n?.id||null;return i("section",{class:this.getAdmissionClassName(a,n),key:VU(e.id,s),tabindex:a.disabled?-1:0,"aria-label":this.getAdmissionAriaLabel(e,n,a),"data-testid":"event-admission-card","data-admission-id":e.id,"data-admission-name":e.name,"data-section-id":n?.id??""},i("div",{class:"admission-content"},i("div",{class:"admission-details"},this.renderAdmissionHeader(e),this.renderAdmissionBody(e,t,s,a,o))))}getAdmissionClassName(e,t){return`admission-card ${e.soldOut?"sold-out":""} ${e.disabled&&!e.soldOut?"unavailable":""} ${t?"":"solo-admission"}`}getAdmissionAriaLabel(e,t,n){return function(e,t,n){return t?`${e.name} in ${t.name} - ${n}`:`${e.name} - ${n}`}(e,t,n.statusLabel??this.admissionStatusText(e,n.soldOut))}admissionStatusText(e,t){return t?"Sold Out":(e.price.booking??0)<=0?this.formatPriceValue(e.price.base):`${this.formatPriceValue(e.price.base)} plus ${this.formatPriceValue(e.price.booking)} booking fee`}renderAdmissionHeader(e){return i("div",{class:"admission-header"},i("div",{class:"admission-header-text"},i("h3",{class:"admission-title"},e.name),e.subtitle&&i("p",{class:"admission-subtitle"},e.subtitle)),this.renderMoreInfoButton(e))}renderMoreInfoButton(e){return e.description?i("button",{type:"button",class:"more-info-badge",onClick:t=>this.openModal(e.id,t),"aria-label":"More info about "+e.name},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("circle",{cx:"12",cy:"12",r:"10"}),i("path",{d:"M12 16v-4"}),i("path",{d:"M12 8h.01"})),i("span",null,"More info")):null}renderAdmissionBody(e,t,n,r,o){return n?this.renderPriceAndControls(e,n,r,o):i(i.Fragment,null,this.renderEventTimeAndLocation(t),this.renderPriceAndControls(e,n,r,o))}renderSectionHeader(e,t){return i("div",{class:"section-header"},i("h2",{class:"section-name"},e.name),this.renderAdmissionTime(t[0],"section-time"),this.renderSectionLocation(e))}renderSectionWithAdmissions(e,t,n,r){const o=function(e){return!!e.section&&(!!function(e){return[e.available,e.limit].some((e=>GU(e)<=0))}(e.section)||e.admissions.length>0&&e.admissions.every((t=>FU({admission:t,section:e.section}))))}({admissions:t,section:e});return i("div",{class:"ticket-section "+(o?"section-sold-out":""),key:e.id},this.renderSectionHeader(e,t),i("div",{class:"admissions-list"},t.map((t=>this.renderAdmission(t,n,e,o,r)))))}renderLoadingState(){return i(o,{"data-theme":this.currentTheme},i("div",{class:"session-services-ticketing-container"},i("div",{class:"tickets-wrapper"},i("h2",{class:"tickets-heading"},"Get Tickets"),i("div",{class:"ticket-section loading-ticket-section"},i("div",{class:"admissions-list"},[0,1,2].map((e=>i("div",{"aria-hidden":"true",class:"admission-card loading-admission",key:e}))))))))}renderErrorState(){return this.passcodeDenied?this.renderPasscodeState():i(o,{"data-theme":this.currentTheme},i("div",{class:"session-services-ticketing-container"},i("div",{class:"message-state"},i("strong",null,"Tickets Couldn’t Load"),i("span",null,"We couldn’t load ticket details. Try again in a moment."),i("button",{type:"button",class:"retry-button",onClick:()=>this.loadEventData()},"Try Again"))))}renderPasscodeState(){return i(o,{"data-theme":this.currentTheme},i("div",{class:"session-services-ticketing-container"},i("form",{class:"passcode-form",onSubmit:e=>this.submitPasscode(e)},i("h2",null,"Enter passcode"),i("p",null,"Enter the event passcode to view tickets and event details."),i("input",{type:"text",name:"passcode",value:this.passcodeInput,onInput:this.handlePasscodeInput,autocomplete:"one-time-code",placeholder:"Passcode","aria-label":"Passcode"}),this.passcodeDenied&&this.activePasscode&&i("span",{class:"error-message"},"Incorrect passcode"),i("button",{type:"submit",class:"checkout-btn",disabled:!this.passcodeInput.trim()},"Unlock event"))))}renderNotFoundState(){return i(o,{"data-theme":this.currentTheme},i("div",{class:"session-services-ticketing-container"},i("div",{class:"message-state"},i("strong",null,"Event not found"),i("span",null,"We couldn’t find this event. The link may be incorrect or expired."))))}renderCouponPanel(){const e=this.couponInput.trim().length>0,t=this.quoteLoading||this.previewLoading||this.checkoutLoading,n=e&&!t;return i("div",{class:"coupon-panel"},i("div",{class:"coupon-row"},i("input",{id:"coupon-code",name:"coupon-code",placeholder:"Coupon Code",value:this.couponInput,onInput:this.handleCouponInput,onKeyDown:this.handleCouponKeyDown,autocomplete:"off",disabled:t,"aria-label":"Coupon code","aria-invalid":!!this.couponError}),this.appliedCouponCode?i("button",{type:"button",class:"coupon-remove",onClick:()=>this.removeCoupon(),disabled:t,"aria-label":"Remove coupon"},"Remove"):i("button",{type:"button",class:"coupon-apply",onClick:()=>this.applyCoupon(),disabled:!n},"Apply")),this.couponError&&i("span",{class:"error-message"},this.couponError))}isCheckoutDisabled(){return this.quoteLoading||this.checkoutLoading||!!this.quoteError||!bL(this.quote)}getCheckoutButtonText(){return this.checkoutLoading?"Processing...":this.quote?this.getQuoteCheckoutText():"Pay"}renderQuoteLoadingContent(){return i("span",{class:"checkout-spinner-wrapper","aria-hidden":"true"},i("svg",{class:"checkout-spinner",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})))}renderCheckoutButtonContent(){return this.quoteLoading?this.renderQuoteLoadingContent():this.getCheckoutButtonText()}isStickyCheckoutDisabled(e){return!e.isDoorOnly&&(e.isEnded||e.isUnavailableForSale||this.checkoutLoading||this.quoteLoading)}getStickyCheckoutText(e){return this.checkoutLoading?"Processing...":this.quote?this.getQuoteCheckoutText():this.selectionPrompt?"Select a ticket":e.isDoorOnly?"Get Tickets at the Door":e.isEnded?"Event Ended":e.isUnavailableForSale?"Tickets Unavailable":"Get Tickets"}renderStickyCheckoutButtonContent(e){return this.quoteLoading?this.renderQuoteLoadingContent():this.getStickyCheckoutText(e)}getQuoteCheckoutText(){return this.quote?0===pL(this.quote)?"Continue":"Pay "+this.getOrderTotalText():"Pay"}getOrderTotalText(){if(!this.quote)return"N/A";const e=pL(this.quote);return 0===e?"Free":this.formatPriceValue(e)}renderCheckoutActions(){return i("div",{class:"checkout-actions"},this.renderCouponPanel(),this.quoteError&&i("div",{class:"error-message"},this.quoteError),i("button",{type:"button",class:"checkout-btn",onClick:()=>this.initiateCheckout(),disabled:this.isCheckoutDisabled(),"aria-label":this.quoteLoading?"Updating":void 0,"data-testid":"event-checkout-cta-desktop"},this.renderCheckoutButtonContent()))}renderStickyCheckout(e){return this.stickyCheckout&&e.showTicketing?i("div",{class:"sticky-checkout-bar"},i("button",{type:"button",class:"checkout-btn sticky-checkout-btn "+(this.selectionPrompt?"selection-prompt":""),onClick:()=>this.handleStickyCheckoutClick(e),disabled:this.isStickyCheckoutDisabled(e),"aria-label":this.quoteLoading?"Updating":void 0},this.renderStickyCheckoutButtonContent(e))):null}renderStickyExternalTicketing(e){if(!this.stickyCheckout)return null;const t=e.externalTicketUrl;if(!t)return null;const n=yL(t);return i("div",{class:"sticky-checkout-bar"},i("a",{class:"external-ticket-button sticky-checkout-btn",href:t,target:"_blank",rel:"noreferrer",onClick:()=>this.trackExternalTicketClick(t,"sticky")},i("span",{class:"external-ticket-label"},"Get tickets"),i("span",{class:"external-ticket-domain"},"via ",n)))}renderModal(){if(!this.openModalAdmissionId)return null;const e=this.event?.admissions.find((e=>e.id===this.openModalAdmissionId));return e?i("div",{class:"modal-backdrop",onClick:this.handleBackdropClick},i("div",{class:"modal-content",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title"},i("button",{type:"button",class:"modal-close-btn",onClick:()=>this.closeModal(),"aria-label":"Close"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("path",{d:"M18 6 6 18"}),i("path",{d:"M6 6l12 12"}))),i("div",{class:"modal-header"},i("h2",{id:"modal-title",class:"modal-title"},e.name),e.subtitle&&i("p",{class:"modal-subtitle"},e.subtitle)),i("p",{class:"modal-description"},e.description))):null}renderTicketSections(e){const t=eL(e),n=t.isDoorOnly?"door":"default",r=function(e,t,n={}){return[...iL(e,t,n),...t.filter((e=>!e.sectionId)).map((e=>({type:"admission",admission:e})))].sort(((e,t)=>oL(e)-oL(t)))}(e.sections,function(e,t){if("door"!==t)return e.admissions;const n=HU(e);return e.admissions.filter((t=>!BU(t,e.admissions,n)&&"DOOR"===t.saleEndsBehavior&&LU(t.saleEndsAt,n)))}(e,n),{event:e,initialAdmissionPrices:this.activeInitialAdmissionPrices(),mode:n,previewQuote:this.previewQuote,quote:this.quote});return i("div",{class:"tickets-wrapper"},this.renderDoorAlert(e,n),i("h2",{class:"tickets-heading"},t.ticketHeading),r.map((t=>this.renderTopLevelItem(t,e,n))))}renderTopLevelItem(e,t,n){return"section"===e.type?this.renderSectionWithAdmissions(e.section,e.admissions,t,n):i("div",{class:"ticket-section",key:e.admission.id},i("div",{class:"admissions-list"},this.renderAdmission(e.admission,t,void 0,!1,n)))}renderDoorAlert(e,t){if("door"!==t)return null;const n=e.location?.name?.trim()||"the venue";return i("div",{class:"door-alert"},i("strong",null,"Tickets are available at ",n),i("span",null,"Online sales are closed. Tickets are available at the venue when you arrive."))}loadingView(){return this.loading?this.renderLoadingState():void 0}errorView(){return this.error&&!this.event?this.renderErrorState():void 0}missingEventView(){return this.event?void 0:this.renderNotFoundState()}pendingView(){return this.loadingView()??this.errorView()??this.missingEventView()}renderReadyState(){const e=this.event;if(!e)return this.renderNotFoundState();const t=eL(e);return t.showExternalTicketing?i(o,{"data-theme":this.currentTheme,"data-sticky-checkout":this.stickyCheckout?"true":void 0},i("div",{class:"session-services-ticketing-container"},this.renderExternalTicketing(t)),this.renderStickyExternalTicketing(t)):i(o,{"data-theme":this.currentTheme,"data-sticky-checkout":this.stickyCheckout?"true":void 0},i("div",{class:"session-services-ticketing-container"},t.showTicketing?this.renderTicketSections(e):this.renderUnavailableState(t),!t.isDoorOnly&&t.showTicketing&&this.renderCheckoutActions()),this.renderStickyCheckout(t),this.renderModal())}renderExternalTicketing(e){const t=e.externalTicketUrl;if(!t)return null;const n=yL(t);return i("div",{class:"tickets-wrapper"},i("h2",{class:"tickets-heading"},e.ticketHeading),i("div",{class:"external-ticket-panel"},i("p",{class:"external-ticket-warning"},"This event sells through an external ticketing site. Checkout, tickets, and support are handled there."),i("a",{class:"external-ticket-button inline-external-ticket-button",href:t,target:"_blank",rel:"noreferrer",onClick:()=>this.trackExternalTicketClick(t,"inline")},i("span",{class:"external-ticket-label"},"Get tickets"),i("span",{class:"external-ticket-domain"},"via ",n))))}renderUnavailableState(e){return i("div",{class:"empty-ticketing-state"},i("strong",null,"Tickets Unavailable"),i("span",null,e.isEnded?"This event has ended, so tickets are no longer available.":"Tickets are not available for this event right now."))}render(){return this.pendingView()??this.renderReadyState()}static get watchers(){return{tenantId:[{propsChanged:0}],eventId:[{propsChanged:0}],apiUrl:[{propsChanged:0}],passcode:[{propsChanged:0}],couponCode:[{couponCodeChanged:0}],initialAdmissionPrices:[{couponCodeChanged:0}],initialPreviewQuote:[{couponCodeChanged:0}],theme:[{themeChanged:0}]}}static get style(){return':host{--background:transparent;--foreground:oklch(0.21 0.006 285.885);--card:oklch(1 0 0);--card-foreground:oklch(0.21 0.006 285.885);--popover:oklch(1 0 0);--popover-foreground:oklch(0.21 0.006 285.885);--primary:oklch(0.537 0.1554 255);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(0 0 0 / 4%);--secondary-foreground:oklch(0.21 0.006 285.885);--muted:oklch(0 0 0 / 4%);--muted-foreground:oklch(0.442 0.017 285.786);--accent:oklch(0 0 0 / 4%);--accent-foreground:oklch(0.21 0.006 285.885);--destructive:oklch(0.637 0.237 25.331);--destructive-foreground:oklch(0.505 0.213 27.518);--border:oklch(0 0 0 / 12%);--input:oklch(0 0 0 / 12%);--ring:oklch(0.705 0.015 286.067);--success:oklch(0.696 0.17 162.48);--warning:oklch(0.769 0.188 70.08);--info:oklch(0.623 0.214 259.815);--info-foreground:oklch(0.488 0.243 264.376);--backdrop:oklch(0 0 0 / 0.32);--radius:0.625rem;--spacing-xs:0.25rem;--spacing-sm:0.5rem;--spacing-md:1rem;--spacing-lg:1.5rem;--spacing-xl:2rem;--font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--font-size-xs:0.75rem;--font-size-sm:0.875rem;--font-size-base:1rem;--font-size-lg:1.125rem;--font-size-xl:1.25rem;--font-size-2xl:1.5rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--shadow-sm:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);--shadow-base:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);--shadow-md:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);--shadow-lg:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);--shadow-xl:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);--shadow-edge-light:0 1px oklch(0 0 0 / 4%);--shadow-edge-dark:0 -1px oklch(1 0 0 / 8%);--transition-fast:150ms cubic-bezier(0.4, 0, 0.2, 1);--transition-base:200ms cubic-bezier(0.4, 0, 0.2, 1);--transition-slow:300ms cubic-bezier(0.4, 0, 0.2, 1);--internal-background:var(--background, transparent);--internal-foreground:var(--foreground, oklch(0.21 0.006 285.885));--internal-card:var(--card, oklch(1 0 0));--internal-popover:var(--popover, oklch(1 0 0));--internal-popover-foreground:var(--popover-foreground, oklch(0.21 0.006 285.885));--internal-primary:var(--primary, oklch(0.537 0.1554 255));--internal-primary-foreground:var(--primary-foreground, oklch(0.985 0 0));--internal-secondary:var(--secondary, oklch(0 0 0 / 4%));--internal-muted:var(--muted, oklch(0 0 0 / 4%));--internal-muted-foreground:var(--muted-foreground, oklch(0.442 0.017 285.786));--internal-accent:var(--accent, oklch(0 0 0 / 4%));--internal-accent-foreground:var(--accent-foreground, oklch(0.21 0.006 285.885));--internal-destructive:var(--destructive, oklch(0.637 0.237 25.331));--internal-border:var(--border, oklch(0 0 0 / 12%));--internal-input:var(--input, oklch(0 0 0 / 12%));--internal-ring:var(--ring, oklch(0.705 0.015 286.067));--internal-success:var(--success, oklch(0.696 0.17 162.48));--internal-warning:var(--warning, oklch(0.769 0.188 70.08));--internal-info:var(--info, oklch(0.623 0.214 259.815));--internal-info-foreground:var(--info-foreground, oklch(0.488 0.243 264.376));--internal-backdrop:var(--backdrop, oklch(0 0 0 / 0.32));--internal-radius:var(--radius, 0.625rem);--internal-spacing-xs:var(--spacing-xs, 0.25rem);--internal-spacing-sm:var(--spacing-sm, 0.5rem);--internal-spacing-md:var(--spacing-md, 1rem);--internal-spacing-lg:var(--spacing-lg, 1.5rem);--internal-spacing-xl:var(--spacing-xl, 2rem);--internal-font-family:var(--font-family, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif);--internal-font-size-xs:var(--font-size-xs, 0.75rem);--internal-font-size-sm:var(--font-size-sm, 0.875rem);--internal-font-size-base:var(--font-size-base, 1rem);--internal-font-size-lg:var(--font-size-lg, 1.125rem);--internal-font-size-xl:var(--font-size-xl, 1.25rem);--internal-font-weight-medium:var(--font-weight-medium, 500);--internal-font-weight-semibold:var(--font-weight-semibold, 600);--internal-font-weight-bold:var(--font-weight-bold, 700);--internal-shadow-lg:var(--shadow-lg, 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1));--internal-shadow-xl:var(--shadow-xl, 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1));--internal-shadow-edge-light:var(--shadow-edge-light, 0 1px oklch(0 0 0 / 4%));--internal-transition-fast:var(--transition-fast, 150ms cubic-bezier(0.4, 0, 0.2, 1));--internal-transition-base:var(--transition-base, 200ms cubic-bezier(0.4, 0, 0.2, 1));--internal-transition-slow:var(--transition-slow, 300ms cubic-bezier(0.4, 0, 0.2, 1));display:block;font-family:var(--internal-font-family);color:var(--internal-foreground);background:var(--internal-background)}*{box-sizing:border-box;margin:0;padding:0}button,input,select,textarea{font:inherit}*:focus{outline:none}*:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px;border-radius:calc(var(--internal-radius) - 4px)}.session-services-ticketing-container{width:100%;max-width:100%;margin:0}:host([data-theme="dark"]){--background:transparent;--foreground:oklch(0.967 0.001 286.375);--card:color-mix( in srgb, oklch(0.21 0.006 285.885) 80%, oklch(0.141 0.005 285.823) );--card-foreground:oklch(0.967 0.001 286.375);--popover:oklch(0.21 0.006 285.885);--popover-foreground:oklch(0.967 0.001 286.375);--primary:oklch(0.537 0.1554 255);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(1 0 0 / 6%);--secondary-foreground:oklch(0.967 0.001 286.375);--muted:oklch(1 0 0 / 6%);--muted-foreground:oklch(0.705 0.015 286.067);--accent:oklch(1 0 0 / 6%);--accent-foreground:oklch(0.967 0.001 286.375);--destructive:oklch(0.637 0.237 25.331);--destructive-foreground:oklch(0.704 0.191 22.216);--border:oklch(1 0 0 / 12%);--input:oklch(1 0 0 / 12%);--ring:oklch(0.552 0.016 285.938);--success:oklch(0.696 0.17 162.48);--warning:oklch(0.769 0.188 70.08);--info:oklch(0.623 0.214 259.815);--info-foreground:oklch(0.707 0.165 254.624)}.tickets-wrapper{padding:0;width:100%}.tickets-heading{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);margin:0 0 var(--internal-spacing-md)}.ticket-section.loading-ticket-section{overflow:visible;background:transparent;border:0;box-shadow:none}.loading-ticket-section .admissions-list{display:flex;flex-direction:column;gap:var(--internal-spacing-sm)}.admission-card.loading-admission{min-height:5.25rem;padding:0;background:oklch(from var(--internal-foreground) l c h / 0.07);border:0;border-radius:var(--internal-radius);box-shadow:none;pointer-events:none;animation:loading-card 1.6s ease-out infinite}@keyframes loading-card{0%,100%{opacity:0.48}50%{opacity:0.74}}.passcode-form,.passcode-form input,.ticket-section,.more-info-badge,.quantity-controls,.sold-out-controls,.coupon-row,.coupon-apply,.coupon-remove{border:1px solid var(--internal-input);box-shadow:var(--internal-shadow-edge-light)}.external-ticket-button,.checkout-btn{display:inline-flex;align-items:center;justify-content:center;background:var(--internal-primary);color:var(--internal-primary-foreground);border:1px solid oklch(from var(--internal-primary) calc(l - 0.08) c h);border-radius:calc(var(--internal-radius) - 2px);cursor:pointer;box-shadow:var(--internal-shadow-edge-light);transition:all var(--internal-transition-fast)}.external-ticket-button:hover,.checkout-btn:hover:not(:disabled){background:oklch(from var(--internal-primary) calc(l - 0.08) c h);transform:translateY(-1px)}.external-ticket-button:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.passcode-form{display:flex;flex-direction:column;gap:var(--internal-spacing-sm);padding:var(--internal-spacing-lg);margin-bottom:var(--internal-spacing-md);background:var(--internal-card);border-radius:var(--internal-radius)}.passcode-form h2{color:var(--internal-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-semibold);line-height:1.3}.passcode-form p{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.5}.door-alert,.empty-ticketing-state,.message-state{display:flex;flex-direction:column;gap:calc(var(--internal-spacing-xs) * 1.5);margin-bottom:var(--internal-spacing-md);padding:0;background:transparent;border:none;border-radius:0;box-shadow:none}.door-alert strong,.empty-ticketing-state strong,.message-state strong{color:var(--internal-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-semibold);line-height:1.3}.door-alert span,.empty-ticketing-state span,.message-state span{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.4}.external-ticket-button{flex-direction:column;gap:calc(var(--internal-spacing-xs) * 0.5);width:100%;padding:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs)) var(--internal-spacing-lg);text-decoration:none}.external-ticket-panel{display:flex;flex-direction:column;gap:var(--internal-spacing-md)}.external-ticket-warning{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-medium);line-height:1.35}.external-ticket-label{font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-bold);line-height:1.2}.external-ticket-domain{font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2;opacity:0.82}.passcode-form input{width:100%;min-width:0;padding:calc(var(--internal-spacing-sm) + 0.125rem) var(--internal-spacing-sm);background:var(--internal-card);color:var(--internal-foreground);border-radius:calc(var(--internal-radius) - 2px);font:inherit}.passcode-form input:disabled{opacity:0.6;cursor:not-allowed}.ticket-section{background:var(--internal-card);border-radius:var(--internal-radius);margin:0 0 var(--internal-spacing-lg) 0;overflow:hidden;width:100%;transition:all var(--internal-transition-base)}.tickets-wrapper>.ticket-section:last-child{margin-bottom:0}.ticket-section.section-sold-out{position:relative}.ticket-section.section-sold-out .section-header{padding-bottom:var(--internal-spacing-md)}.ticket-section.section-sold-out .section-name,.ticket-section.section-sold-out .section-time,.ticket-section.section-sold-out .section-venue{opacity:0.8}.ticket-section.section-sold-out .admissions-list{opacity:0.6;pointer-events:none;filter:grayscale(0.3)}.ticket-section.section-sold-out .admission-card{background:var(--internal-card)}.ticket-section.section-sold-out .quantity-controls,.ticket-section.section-sold-out .sold-out-controls{opacity:0.7}.section-header{padding:var(--internal-spacing-md) var(--internal-spacing-lg);border-bottom:1px solid var(--internal-border);background:var(--internal-card)}.section-name{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);letter-spacing:-0.025em;margin:0 0 var(--internal-spacing-xs) 0;display:flex;align-items:center;gap:var(--internal-spacing-sm)}.section-time,.section-venue{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);display:flex;align-items:center;gap:var(--internal-spacing-xs)}.section-time,.admission-time{margin-bottom:var(--internal-spacing-xs)}.section-time svg,.section-venue svg,.admission-time svg,.admission-venue svg{width:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs));height:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs));flex-shrink:0;opacity:0.8}.admissions-list{padding:0}.admission-card{border-bottom:1px solid var(--internal-border);padding:var(--internal-spacing-md) var(--internal-spacing-lg);position:relative;transition:background-color var(--internal-transition-base);cursor:default}.admission-card:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-2px;z-index:1}.admission-card.sold-out{background:var(--internal-card)}.admission-card.unavailable{opacity:0.72}.admission-card.sold-out .admission-price{opacity:0.5}.admission-card:last-child{border-bottom:none}.admission-content{display:flex;justify-content:space-between;align-items:center}.admission-details{flex:1}.admission-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--internal-spacing-md);margin-bottom:var(--internal-spacing-sm)}.admission-header-text{flex:1;min-width:0}.admission-title{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);margin-bottom:0;display:flex;align-items:center;gap:var(--internal-spacing-sm)}.admission-subtitle{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);margin-top:var(--internal-spacing-xs);line-height:1.4}.more-info-badge{display:inline-flex;align-items:center;gap:calc(var(--internal-spacing-xs) * 1.5);padding:calc(var(--internal-spacing-xs) * 1.5) var(--internal-spacing-sm);background:oklch(from var(--internal-info) l c h / 0.08);color:var(--internal-info-foreground);border-radius:calc(var(--internal-radius) - 2px);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);cursor:pointer;transition:all var(--internal-transition-fast);white-space:nowrap;flex-shrink:0}.more-info-badge:hover{background:oklch(from var(--internal-info) l c h / 0.16)}.more-info-badge:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.more-info-badge svg{flex-shrink:0}.admission-time,.admission-venue{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);display:flex;align-items:center;gap:var(--internal-spacing-xs)}.admission-venue{margin-bottom:var(--internal-spacing-sm)}.solo-admission .admission-content{flex-direction:column;align-items:stretch}.solo-admission .admission-details{width:100%}.solo-admission .admission-price-info{margin-top:var(--internal-spacing-md);display:flex;justify-content:space-between;align-items:center;width:100%}.solo-admission .quantity-controls{margin-left:auto;flex-shrink:0}.admission-price-info{display:flex;align-items:center;justify-content:space-between;gap:var(--internal-spacing-sm);margin-bottom:var(--internal-spacing-sm);width:100%}.admission-price-wrapper{display:flex;flex-direction:column;row-gap:calc(var(--internal-spacing-xs) * 0.5)}.admission-price{color:var(--internal-foreground);font-size:var(--internal-font-size-xl);font-weight:var(--internal-font-weight-bold);letter-spacing:-0.025em;line-height:1.1}.admission-price-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--internal-spacing-sm)}.admission-price-original{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-base);text-decoration:line-through}.admission-booking-fee{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2}.admission-savings,.admission-availability{font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2}.admission-savings{color:var(--internal-success)}.admission-availability{color:var(--internal-warning)}.admission-sale-label{display:block;margin-top:var(--internal-spacing-xs);color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-medium);line-height:1.35}.admission-sale-label.success{color:var(--internal-success)}.quantity-controls{display:inline-flex;align-items:center;gap:0;background:var(--internal-secondary);border-radius:calc(var(--internal-radius) - 2px);overflow:hidden;transition:all var(--internal-transition-fast)}.quantity-controls:has(.quantity-value:focus-visible){box-shadow:0 0 0 2px var(--internal-ring)}.quantity-btn{width:calc(var(--internal-spacing-lg) * 1.5);height:calc(var(--internal-spacing-lg) * 1.5);border:none;background:transparent;color:var(--internal-muted-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-medium);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--internal-transition-fast);position:relative}.quantity-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-2px;z-index:1}.quantity-btn:hover:not(:disabled){background:var(--internal-accent);color:var(--internal-accent-foreground)}.quantity-btn:active:not(:disabled){transform:scale(0.95)}.quantity-btn:disabled{opacity:0.6;cursor:not-allowed;background:var(--internal-secondary);color:var(--internal-muted-foreground);border-color:var(--internal-border)}.quantity-btn.decrease{border-right:1px solid var(--internal-input)}.quantity-btn.increase{border-left:1px solid var(--internal-input)}.quantity-value{appearance:textfield;width:2.75rem;height:calc(var(--internal-spacing-lg) * 1.5);border:none;background:transparent;min-width:2.5rem;text-align:center;font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);color:var(--internal-foreground);padding:0 var(--internal-spacing-xs)}.quantity-value:focus-visible{outline:none}.quantity-value::-webkit-inner-spin-button,.quantity-value::-webkit-outer-spin-button{appearance:none;margin:0}.quantity-value:disabled{opacity:0.6;cursor:not-allowed}.sold-out-controls{display:inline-flex;align-items:center;justify-content:center;min-width:calc(var(--internal-spacing-lg) * 1.5 * 2 + 2.5rem);height:calc(var(--internal-spacing-lg) * 1.5);padding:0;background:transparent;border:none;box-shadow:none}.sold-out-controls,.sold-out-text{color:var(--internal-destructive);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);letter-spacing:0.025em;text-transform:uppercase}.sold-out-controls.success,.sold-out-controls.success .sold-out-text{color:var(--internal-success)}.checkout-actions{margin:var(--internal-spacing-lg) 0 0 0;width:100%}.coupon-panel{margin-bottom:var(--internal-spacing-md)}.coupon-row{position:relative;display:flex;align-items:center;width:100%;min-width:0;overflow:hidden;background:var(--internal-background);background-clip:padding-box;border-radius:var(--internal-radius);transition:border-color var(--internal-transition-fast)}.coupon-row:focus-within{border-color:var(--internal-ring)}.coupon-row:has(input[aria-invalid="true"]){border-color:var(--internal-destructive)}.coupon-row:has(input:disabled){opacity:0.64}.coupon-row input{width:100%;min-width:0;padding:calc(var(--internal-spacing-sm) - 1px) calc(var(--internal-spacing-xl) * 2.75) calc(var(--internal-spacing-sm) - 1px) calc(var(--internal-spacing-md) - 1px);background:var(--internal-card);color:var(--internal-foreground);border:none;border-radius:inherit;font:inherit;font-size:var(--internal-font-size-sm);line-height:1.25rem;outline:none}.coupon-row input::placeholder{color:oklch(from var(--internal-muted-foreground) l c h / 0.64)}.coupon-row input:disabled{cursor:not-allowed}.coupon-apply,.coupon-remove{position:absolute;right:calc((var(--internal-spacing-xs) * 1.5) - 3px);top:50%;transform:translateY(-50%);padding:calc(var(--internal-spacing-xs) * 1.25) var(--internal-spacing-sm);background:var(--internal-secondary);color:var(--internal-foreground);border-radius:calc(var(--internal-radius) - 2px);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);cursor:pointer;transition:all var(--internal-transition-fast)}.coupon-apply:hover:not(:disabled),.coupon-remove:hover:not(:disabled){background:oklch(from var(--internal-accent) l c h / 0.8)}.coupon-apply:focus-visible,.coupon-remove:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-1px}.coupon-apply:disabled,.coupon-remove:disabled{opacity:0.6;cursor:not-allowed}.checkout-btn{width:100%;padding:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs)) var(--internal-spacing-lg);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-bold);line-height:1.25;position:relative;overflow:hidden}.checkout-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.checkout-btn:active:not(:disabled){transform:translateY(0)}.checkout-btn:disabled{opacity:0.5;cursor:not-allowed}.checkout-spinner-wrapper{display:inline-flex;align-items:center;justify-content:center;height:1.25em;vertical-align:middle}.checkout-spinner{width:1.125em;height:1.125em;animation:checkout-spinner 0.8s linear infinite}@keyframes checkout-spinner{to{transform:rotate(360deg)}}.sticky-checkout-bar{position:fixed;right:0;bottom:0;left:0;z-index:40;display:none;padding:var(--internal-spacing-md);background:var(--internal-card);border-top:1px solid var(--internal-border);box-shadow:var(--internal-shadow-lg)}.sticky-checkout-btn.selection-prompt{animation:selection-prompt-shake 400ms ease-in-out}@keyframes selection-prompt-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}.retry-button{align-self:flex-start;margin-top:var(--internal-spacing-xs);background:var(--internal-primary);color:var(--internal-primary-foreground);border:1px solid oklch(from var(--internal-primary) calc(l - 0.08) c h);padding:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs)) var(--internal-spacing-lg);border-radius:calc(var(--internal-radius) - 2px);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-medium);cursor:pointer;transition:all var(--internal-transition-fast);box-shadow:var(--internal-shadow-edge-light)}.retry-button:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.retry-button:hover{background:oklch(from var(--internal-primary) calc(l - 0.08) c h);transform:translateY(-1px)}.retry-button:active{transform:translateY(0)}.error-message{background:oklch( from var(--internal-destructive) calc(l + 0.4) calc(c * 0.2) h / 0.05 );border:1px solid oklch(from var(--internal-destructive) l c h / 0.2);color:var(--internal-destructive);padding:var(--internal-spacing-sm) var(--internal-spacing-md);border-radius:var(--internal-radius);margin-bottom:var(--internal-spacing-md);font-size:var(--internal-font-size-sm)}@media (min-width: 768px){.ticket-section{border-radius:var(--internal-radius);margin:0 0 var(--internal-spacing-md) 0}}@media (max-width: 767px){:host([data-sticky-checkout="true"]) .checkout-actions>.checkout-btn,:host([data-sticky-checkout="true"]) .inline-external-ticket-button{display:none}.sticky-checkout-bar{display:block}}.modal-backdrop{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:var(--internal-spacing-md);background:var(--internal-backdrop);backdrop-filter:blur(4px);animation:modal-backdrop-fade-in var(--internal-transition-base) ease-out}@keyframes modal-backdrop-fade-in{from{opacity:0}to{opacity:1}}.modal-content{position:relative;width:100%;max-width:32rem;max-height:calc(100vh - var(--internal-spacing-xl) * 2);overflow-y:auto;background:var(--internal-popover);color:var(--internal-popover-foreground);border:1px solid var(--internal-border);border-radius:var(--internal-radius);padding:var(--internal-spacing-lg);box-shadow:var(--internal-shadow-xl);animation:modal-content-scale-in var(--internal-transition-base) ease-out}@keyframes modal-content-scale-in{from{opacity:0;transform:scale(0.98)}to{opacity:1;transform:scale(1)}}.modal-close-btn{position:absolute;top:var(--internal-spacing-sm);right:var(--internal-spacing-sm);display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;background:transparent;border:1px solid transparent;border-radius:calc(var(--internal-radius) - 4px);color:var(--internal-muted-foreground);cursor:pointer;opacity:0.72;transition:all var(--internal-transition-fast)}.modal-close-btn:hover{opacity:1;background:var(--internal-accent)}.modal-close-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:1px;opacity:1}.modal-header{margin-bottom:var(--internal-spacing-md);padding-right:var(--internal-spacing-xl)}.modal-title{font-size:var(--internal-font-size-xl);font-weight:var(--internal-font-weight-semibold);color:var(--internal-foreground);margin:0;line-height:1.2}.modal-subtitle{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);margin-top:var(--internal-spacing-xs);line-height:1.4}.modal-description{color:var(--internal-foreground);font-size:var(--internal-font-size-base);line-height:1.6;white-space:pre-wrap;margin:0}'}},[513,"session-services-ticketing",{tenantId:[1,"tenant-id"],eventId:[1,"event-id"],apiUrl:[1,"api-url"],locale:[1],returnUrl:[1,"return-url"],couponCode:[1,"coupon-code"],initialAdmissionPrices:[1,"initial-admission-prices"],initialPreviewQuote:[1,"initial-preview-quote"],passcode:[1],stickyCheckout:[4,"sticky-checkout"],theme:[1],enableAnalytics:[4,"enable-analytics"],debugAnalytics:[4,"debug-analytics"],event:[32],selectedItems:[32],quote:[32],previewQuote:[32],loading:[32],error:[32],quoteLoading:[32],previewLoading:[32],quoteError:[32],couponError:[32],couponInput:[32],appliedCouponCode:[32],passcodeInput:[32],activePasscode:[32],passcodeDenied:[32],selectionPrompt:[32],checkoutLoading:[32],currentTheme:[32],openModalAdmissionId:[32]},void 0,{tenantId:[{propsChanged:0}],eventId:[{propsChanged:0}],apiUrl:[{propsChanged:0}],passcode:[{propsChanged:0}],couponCode:[{couponCodeChanged:0}],initialAdmissionPrices:[{couponCodeChanged:0}],initialPreviewQuote:[{couponCodeChanged:0}],theme:[{themeChanged:0}]}]);function AL(){"undefined"!=typeof customElements&&["session-services-ticketing"].forEach((t=>{"session-services-ticketing"===t&&(customElements.get(e(t))||customElements.define(e(t),xL))}))}AL();const TL=xL,OL=AL;export{TL as SessionServicesTicketing,OL as defineCustomElement}
|
|
1
|
+
import{t as e,p as t,H as i,c as n,h as r,a as o}from"./index.js";var a;function s(e,t,i){function n(i,n){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:n,constr:a,traits:new Set},enumerable:!1}),i._zod.traits.has(e))return;i._zod.traits.add(e),t(i,n);let r=a.prototype,o=Object.keys(r);for(let e=0;e<o.length;e++){let t=o[e];t in i||(i[t]=r[t].bind(i))}}let r=i?.Parent??Object;class o extends r{}function a(e){var t;let r=i?.Parent?new o:this;n(r,e),(t=r._zod).deferred??(t.deferred=[]);for(let e of r._zod.deferred)e();return r}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(i?.Parent&&t instanceof i.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var d=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},c=class extends Error{constructor(e){super("Encountered unidirectional transform during encode: "+e),this.name="ZodEncodeError"}};(a=globalThis).__zod_globalConfig??(a.__zod_globalConfig={});const l=globalThis.__zod_globalConfig;function u(){return l}function p(e){let t=Object.values(e).filter((e=>"number"==typeof e));return Object.entries(e).filter((([e,i])=>-1===t.indexOf(+e))).map((([e,t])=>t))}function m(e,t){return"bigint"==typeof t?""+t:t}function h(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function f(e){return null==e}function y(e){let t=+!!e.startsWith("^"),i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}const v=Symbol("evaluating");function g(e,t,i){let n;Object.defineProperty(e,t,{get(){if(n!==v)return void 0===n&&(n=v,n=i()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function b(e,t,i){Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}function $(...e){let t={};for(let i of e)Object.assign(t,Object.getOwnPropertyDescriptors(i));return Object.defineProperties({},t)}function w(e){return JSON.stringify(e)}const I="captureStackTrace"in Error?Error.captureStackTrace:()=>{};function E(e){return"object"==typeof e&&!!e&&!Array.isArray(e)}const k=h((()=>{if(l.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch{return!1}}));function T(e){if(!1===E(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let i=t.prototype;return!(!1===E(i)||!1===Object.prototype.hasOwnProperty.call(i,"isPrototypeOf"))}function A(e){return T(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const x=new Set(["string","number","symbol"]);function S(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function D(e,t,i){let n=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(n._zod.parent=e),n}function C(e){let t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const P={safeint:[-9007199254740991,2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function O(e,t=0){if(!0===e.aborted)return!0;for(let i=t;i<e.issues.length;i++)if(!0!==e.issues[i]?.continue)return!0;return!1}function _(e,t=0){if(!0===e.aborted)return!0;for(let i=t;i<e.issues.length;i++)if(!1===e.issues[i]?.continue)return!0;return!1}function R(e,t){return t.map((t=>{var i;return(i=t).path??(i.path=[]),t.path.unshift(e),t}))}function N(e){return"string"==typeof e?e:e?.message}function U(e,t,i){let n=e.message?e.message:N(e.inst?._zod.def?.error?.(e))??N(t?.error?.(e))??N(i.customError?.(e))??N(i.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...s}=e;return s.path??=[],s.message=n,t?.reportInput&&(s.input=a),s}function M(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function L(...e){let[t,i,n]=e;return"string"==typeof t?{message:t,code:"custom",input:i,inst:n}:{...t}}const j=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,m,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},q=s("$ZodError",j),G=s("$ZodError",j,{Parent:Error}),F=e=>(t,i,n,r)=>{let o=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:i,issues:[]},o);if(a instanceof Promise)throw new d;if(a.issues.length){let t=new(r?.Err??e)(a.issues.map((e=>U(e,o,u()))));throw I(t,r?.callee),t}return a.value},B=e=>async(t,i,n,r)=>{let o=n?{...n,async:!0}:{async:!0},a=t._zod.run({value:i,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(r?.Err??e)(a.issues.map((e=>U(e,o,u()))));throw I(t,r?.callee),t}return a.value},z=e=>(t,i,n)=>{let r=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:i,issues:[]},r);if(o instanceof Promise)throw new d;return o.issues.length?{success:!1,error:new(e??q)(o.issues.map((e=>U(e,r,u()))))}:{success:!0,data:o.value}},V=z(G),Y=e=>async(t,i,n)=>{let r=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:i,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map((e=>U(e,r,u()))))}:{success:!0,data:o.value}},W=Y(G),Z=/^[cC][0-9a-z]{6,}$/,H=/^[0-9a-z]+$/,K=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,J=/^[0-9a-vA-V]{20}$/,Q=/^[A-Za-z0-9]{27}$/,X=/^[a-zA-Z0-9_-]{21}$/,ee=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,te=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ie=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ne=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,re=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ae=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,se=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,de=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ce=/^[A-Za-z0-9_-]*$/,le=/^https?$/,ue=/^\+[1-9]\d{6,14}$/,pe="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",me=RegExp(`^${pe}$`);function he(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?""+t:0===e.precision?t+":[0-5]\\d":`${t}:[0-5]\\d\\.\\d{${e.precision}}`:t+"(?::[0-5]\\d(?:\\.\\d+)?)?"}const fe=/^-?\d+$/,ye=/^-?\d+(?:\.\d+)?$/,ve=/^(?:true|false)$/i,ge=/^null$/i,be=/^undefined$/i,$e=/^[^A-Z]*$/,we=/^[^a-z]*$/,Ie=s("$ZodCheck",((e,t)=>{var i;e._zod??={},e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])})),Ee={number:"number",bigint:"bigint",object:"date"},ke=s("$ZodCheckLessThan",((e,t)=>{Ie.init(e,t);let i=Ee[typeof t.value];e._zod.onattach.push((e=>{let i=e._zod.bag;t.value<((t.inclusive?i.maximum:i.exclusiveMaximum)??1/0)&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)})),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:i,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),Te=s("$ZodCheckGreaterThan",((e,t)=>{Ie.init(e,t);let i=Ee[typeof t.value];e._zod.onattach.push((e=>{let i=e._zod.bag;t.value>((t.inclusive?i.minimum:i.exclusiveMinimum)??-1/0)&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)})),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:i,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),Ae=s("$ZodCheckMultipleOf",((e,t)=>{Ie.init(e,t),e._zod.onattach.push((e=>{var i;(i=e._zod.bag).multipleOf??(i.multipleOf=t.value)})),e._zod.check=i=>{if(typeof i.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof i.value?i.value%t.value===BigInt(0):0===function(e,t){let i=e/t,n=Math.round(i),r=2**-52*Math.max(Math.abs(i),1);return Math.abs(i-n)<r?0:i-n}(i.value,t.value))||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:t.value,input:i.value,inst:e,continue:!t.abort})}})),xe=s("$ZodCheckNumberFormat",((e,t)=>{Ie.init(e,t),t.format=t.format||"float64";let i=t.format?.includes("int"),n=i?"int":"number",[r,o]=P[t.format];e._zod.onattach.push((e=>{let n=e._zod.bag;n.format=t.format,n.minimum=r,n.maximum=o,i&&(n.pattern=fe)})),e._zod.check=a=>{let s=a.value;if(i){if(!Number.isInteger(s))return void a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void a.issues.push(s>0?{input:s,code:"too_big",maximum:2**53-1,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}:{input:s,code:"too_small",minimum:-9007199254740991,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort})}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}})),Se=s("$ZodCheckMaxLength",((e,t)=>{var i;Ie.init(e,t),(i=e._zod.def).when??(i.when=e=>{let t=e.value;return!f(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{t.maximum<(e._zod.bag.maximum??1/0)&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=i=>{let n=i.value;if(n.length<=t.maximum)return;let r=M(n);i.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}})),De=s("$ZodCheckMinLength",((e,t)=>{var i;Ie.init(e,t),(i=e._zod.def).when??(i.when=e=>{let t=e.value;return!f(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{t.minimum>(e._zod.bag.minimum??-1/0)&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=i=>{let n=i.value;if(n.length>=t.minimum)return;let r=M(n);i.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}})),Ce=s("$ZodCheckLengthEquals",((e,t)=>{var i;Ie.init(e,t),(i=e._zod.def).when??(i.when=e=>{let t=e.value;return!f(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{let i=e._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length})),e._zod.check=i=>{let n=i.value,r=n.length;if(r===t.length)return;let o=M(n);i.issues.push({origin:o,...r>t.length?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}})),Pe=s("$ZodCheckStringFormat",((e,t)=>{var i,n;Ie.init(e,t),e._zod.onattach.push((e=>{let i=e._zod.bag;i.format=t.format,t.pattern&&(i.patterns??=new Set,i.patterns.add(t.pattern))})),t.pattern?(i=e._zod).check??(i.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:""+t.pattern}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})})),Oe=s("$ZodCheckRegex",((e,t)=>{Pe.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:""+t.pattern,inst:e,continue:!t.abort})}})),_e=s("$ZodCheckLowerCase",((e,t)=>{t.pattern??=$e,Pe.init(e,t)})),Re=s("$ZodCheckUpperCase",((e,t)=>{t.pattern??=we,Pe.init(e,t)})),Ne=s("$ZodCheckIncludes",((e,t)=>{Ie.init(e,t);let i=S(t.includes),n=RegExp("number"==typeof t.position?`^.{${t.position}}${i}`:i);t.pattern=n,e._zod.onattach.push((e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)})),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}})),Ue=s("$ZodCheckStartsWith",((e,t)=>{Ie.init(e,t);let i=RegExp(`^${S(t.prefix)}.*`);t.pattern??=i,e._zod.onattach.push((e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(i)})),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}})),Me=s("$ZodCheckEndsWith",((e,t)=>{Ie.init(e,t);let i=RegExp(`.*${S(t.suffix)}$`);t.pattern??=i,e._zod.onattach.push((e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(i)})),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}})),Le=s("$ZodCheckOverwrite",((e,t)=>{Ie.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));var je=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});let t=e.split("\n").filter((e=>e)),i=Math.min(...t.map((e=>e.length-e.trimStart().length))),n=t.map((e=>e.slice(i))).map((e=>" ".repeat(2*this.indent)+e));for(let e of n)this.content.push(e)}compile(){let e=Function,t=this?.args,i=[...(this?.content??[""]).map((e=>" "+e))];return new e(...t,i.join("\n"))}};const qe={major:4,minor:4,patch:3},Ge=s("$ZodType",((e,t)=>{var i;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=qe;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let t of n)for(let i of t._zod.onattach)i(e);if(0===n.length)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push((()=>{e._zod.run=e._zod.parse}));else{let t=(e,t,i)=>{let n,r=O(e);for(let o of t){if(o._zod.def.when){if(_(e)||!o._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,a=o._zod.check(e);if(a instanceof Promise&&!1===i?.async)throw new d;if(n||a instanceof Promise)n=(n??Promise.resolve()).then((async()=>{await a,e.issues.length!==t&&(r||=O(e,t))}));else{if(e.issues.length===t)continue;r||=O(e,t)}}return n?n.then((()=>e)):e},i=(i,r,o)=>{if(O(i))return i.aborted=!0,i;let a=t(r,n,o);if(a instanceof Promise){if(!1===o.async)throw new d;return a.then((t=>e._zod.parse(t,o)))}return e._zod.parse(a,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){let t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then((e=>i(e,r,o))):i(t,r,o)}let a=e._zod.parse(r,o);if(a instanceof Promise){if(!1===o.async)throw new d;return a.then((e=>t(e,n,o)))}return t(a,n,o)}}g(e,"~standard",(()=>({validate:t=>{try{let i=V(e,t);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return W(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1})))})),Fe=s("$ZodString",((e,t)=>{Ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(e=>RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`))(e._zod.bag),e._zod.parse=i=>{if(t.coerce)try{i.value=i.value+""}catch{}return"string"==typeof i.value||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}})),Be=s("$ZodStringFormat",((e,t)=>{Pe.init(e,t),Fe.init(e,t)})),ze=s("$ZodGUID",((e,t)=>{t.pattern??=te,Be.init(e,t)})),Ve=s("$ZodUUID",((e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=ie(e)}else t.pattern??=ie();Be.init(e,t)})),Ye=s("$ZodEmail",((e,t)=>{t.pattern??=ne,Be.init(e,t)})),We=s("$ZodURL",((e,t)=>{Be.init(e,t),e._zod.check=i=>{try{let n=i.value.trim();if(!t.normalize&&t.protocol?.source===le.source&&!/^https?:\/\//i.test(n))return void i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!t.abort});let r=new URL(n);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort})),void(i.value=t.normalize?r.href:n)}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}})),Ze=s("$ZodEmoji",((e,t)=>{t.pattern??=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Be.init(e,t)})),He=s("$ZodNanoID",((e,t)=>{t.pattern??=X,Be.init(e,t)})),Ke=s("$ZodCUID",((e,t)=>{t.pattern??=Z,Be.init(e,t)})),Je=s("$ZodCUID2",((e,t)=>{t.pattern??=H,Be.init(e,t)})),Qe=s("$ZodULID",((e,t)=>{t.pattern??=K,Be.init(e,t)})),Xe=s("$ZodXID",((e,t)=>{t.pattern??=J,Be.init(e,t)})),et=s("$ZodKSUID",((e,t)=>{t.pattern??=Q,Be.init(e,t)})),tt=s("$ZodISODateTime",((e,t)=>{t.pattern??=function(e){let t=he({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${i.join("|")})`;return RegExp(`^${pe}T(?:${n})$`)}(t),Be.init(e,t)})),it=s("$ZodISODate",((e,t)=>{t.pattern??=me,Be.init(e,t)})),nt=s("$ZodISOTime",((e,t)=>{t.pattern??=function(e){return RegExp(`^${he(e)}$`)}(t),Be.init(e,t)})),rt=s("$ZodISODuration",((e,t)=>{t.pattern??=ee,Be.init(e,t)})),ot=s("$ZodIPv4",((e,t)=>{t.pattern??=re,Be.init(e,t),e._zod.bag.format="ipv4"})),at=s("$ZodIPv6",((e,t)=>{t.pattern??=oe,Be.init(e,t),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}})),st=s("$ZodCIDRv4",((e,t)=>{t.pattern??=ae,Be.init(e,t)})),dt=s("$ZodCIDRv6",((e,t)=>{t.pattern??=se,Be.init(e,t),e._zod.check=i=>{let n=i.value.split("/");try{if(2!==n.length)throw Error();let[e,t]=n;if(!t)throw Error();let i=Number(t);if(""+i!==t||i<0||i>128)throw Error();new URL(`http://[${e}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!t.abort})}}}));function ct(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const lt=s("$ZodBase64",((e,t)=>{t.pattern??=de,Be.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{ct(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!t.abort})}})),ut=s("$ZodBase64URL",((e,t)=>{t.pattern??=ce,Be.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{(function(e){if(!ce.test(e))return!1;let t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return ct(t.padEnd(4*Math.ceil(t.length/4),"="))})(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!t.abort})}})),pt=s("$ZodE164",((e,t)=>{t.pattern??=ue,Be.init(e,t)})),mt=s("$ZodJWT",((e,t)=>{Be.init(e,t),e._zod.check=i=>{(function(e,t=null){try{let i=e.split(".");if(3!==i.length)return!1;let[n]=i;if(!n)return!1;let r=JSON.parse(atob(n));return!("typ"in r&&"JWT"!==r?.typ||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}})(i.value,t.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!t.abort})}})),ht=s("$ZodNumber",((e,t)=>{Ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??ye,e._zod.parse=i=>{if(t.coerce)try{i.value=Number(i.value)}catch{}let n=i.value;if("number"==typeof n&&!Number.isNaN(n)&&Number.isFinite(n))return i;let r="number"==typeof n?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...r?{received:r}:{}}),i}})),ft=s("$ZodNumberFormat",((e,t)=>{xe.init(e,t),ht.init(e,t)})),yt=s("$ZodBoolean",((e,t)=>{Ge.init(e,t),e._zod.pattern=ve,e._zod.parse=i=>{if(t.coerce)try{i.value=!!i.value}catch{}let n=i.value;return"boolean"==typeof n||i.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),i}})),vt=s("$ZodUndefined",((e,t)=>{Ge.init(e,t),e._zod.pattern=be,e._zod.values=new Set([void 0]),e._zod.parse=t=>{let i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}})),gt=s("$ZodNull",((e,t)=>{Ge.init(e,t),e._zod.pattern=ge,e._zod.values=new Set([null]),e._zod.parse=t=>{let i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}})),bt=s("$ZodAny",((e,t)=>{Ge.init(e,t),e._zod.parse=e=>e})),$t=s("$ZodUnknown",((e,t)=>{Ge.init(e,t),e._zod.parse=e=>e})),wt=s("$ZodNever",((e,t)=>{Ge.init(e,t),e._zod.parse=t=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)})),It=s("$ZodVoid",((e,t)=>{Ge.init(e,t),e._zod.parse=t=>{let i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}})),Et=s("$ZodDate",((e,t)=>{Ge.init(e,t),e._zod.parse=i=>{if(t.coerce)try{i.value=new Date(i.value)}catch{}let n=i.value,r=n instanceof Date;return r&&!Number.isNaN(n.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:n,...r?{received:"Invalid Date"}:{},inst:e}),i}}));function kt(e,t,i){e.issues.length&&t.issues.push(...R(i,e.issues)),t.value[i]=e.value}const Tt=s("$ZodArray",((e,t)=>{Ge.init(e,t),e._zod.parse=(i,n)=>{let r=i.value;if(!Array.isArray(r))return i.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),i;i.value=Array(r.length);let o=[];for(let e=0;e<r.length;e++){let a=t.element._zod.run({value:r[e],issues:[]},n);a instanceof Promise?o.push(a.then((t=>kt(t,i,e)))):kt(a,i,e)}return o.length?Promise.all(o).then((()=>i)):i}}));function At(e,t,i,n,r,o){let a=i in n;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...R(i,e.issues))}a||r?void 0===e.value?a&&(t.value[i]=void 0):t.value[i]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]})}function xt(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${i}": expected a Zod schema`);let i=function(e){return Object.keys(e).filter((t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout))}(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function St(e,t,i,n,r,o){let a=[],s=r.keySet,d=r.catchall._zod,c=d.def.type,l="optional"===d.optin,u="optional"===d.optout;for(let r in t){if("__proto__"===r||s.has(r))continue;if("never"===c){a.push(r);continue}let o=d.run({value:t[r],issues:[]},n);o instanceof Promise?e.push(o.then((e=>At(e,i,r,t,l,u)))):At(o,i,r,t,l,u)}return a.length&&i.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then((()=>i)):i}const Dt=s("$ZodObject",((e,t)=>{if(Ge.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let i={...e};return Object.defineProperty(t,"shape",{value:i}),i}})}let i=h((()=>xt(t)));g(e._zod,"propValues",(()=>{let e=t.shape,i={};for(let t in e){let n=e[t]._zod;if(n.values){i[t]??(i[t]=new Set);for(let e of n.values)i[t].add(e)}}return i}));let n,r=E,o=t.catchall;e._zod.parse=(t,a)=>{n??=i.value;let s=t.value;if(!r(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};let d=[],c=n.shape;for(let e of n.keys){let i=c[e],n="optional"===i._zod.optin,r="optional"===i._zod.optout,o=i._zod.run({value:s[e],issues:[]},a);o instanceof Promise?d.push(o.then((i=>At(i,t,e,s,n,r)))):At(o,t,e,s,n,r)}return o?St(d,s,t,a,i.value,e):d.length?Promise.all(d).then((()=>t)):t}})),Ct=s("$ZodObjectJIT",((e,t)=>{Dt.init(e,t);let i,n,r=e._zod.parse,o=h((()=>xt(t))),a=E,s=!l.jitless,d=s&&k.value,c=t.catchall;e._zod.parse=(l,u)=>{n??=o.value;let p=l.value;return a(p)?s&&d&&!1===u?.async&&!0!==u.jitless?(i||=(e=>{let t=new je(["shape","payload","ctx"]),i=o.value,n=e=>{let t=w(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let r=Object.create(null),a=0;for(let e of i.keys)r[e]="key_"+a++;t.write("const newResult = {};");for(let o of i.keys){let i=r[o],a=w(o),s=e[o],d="optional"===s?._zod?.optin,c="optional"===s?._zod?.optout;t.write(`const ${i} = ${n(o)};`),t.write(d&&c?`\n if (${i}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${i}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${i}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${i}.value;\n }\n \n `:d?`\n if (${i}.issues.length) {\n payload.issues = payload.issues.concat(${i}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${i}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${i}.value;\n }\n \n `:`\n const ${i}_present = ${a} in input;\n if (${i}.issues.length) {\n payload.issues = payload.issues.concat(${i}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n if (!${i}_present && !${i}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${a}]\n });\n }\n\n if (${i}_present) {\n if (${i}.value === undefined) {\n newResult[${a}] = undefined;\n } else {\n newResult[${a}] = ${i}.value;\n }\n }\n\n `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,i)=>s(e,t,i)})(t.shape),l=i(l,u),c?St([],p,l,u,n,e):l):r(l,u):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}}));function Pt(e,t,i,n){for(let i of e)if(0===i.issues.length)return t.value=i.value,t;let r=e.filter((e=>!O(e)));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map((e=>e.issues.map((e=>U(e,n,u())))))}),t)}const Ot=s("$ZodUnion",((e,t)=>{Ge.init(e,t),g(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),g(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),g(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),g(e._zod,"pattern",(()=>{if(t.options.every((e=>e._zod.pattern))){let e=t.options.map((e=>e._zod.pattern));return RegExp(`^(${e.map((e=>y(e.source))).join("|")})$`)}}));let i=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(n,r)=>{if(i)return i(n,r);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then((t=>Pt(t,n,e,r))):Pt(a,n,e,r)}})),_t=s("$ZodDiscriminatedUnion",((e,t)=>{t.inclusive=!1,Ot.init(e,t);let i=e._zod.parse;g(e._zod,"propValues",(()=>{let e={};for(let i of t.options){let n=i._zod.propValues;if(!n||0===Object.keys(n).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[t,i]of Object.entries(n)){e[t]||(e[t]=new Set);for(let n of i)e[t].add(n)}}return e}));let n=h((()=>{let e=t.options,i=new Map;for(let n of e){let e=n._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let t of e){if(i.has(t))throw Error(`Duplicate discriminator value "${t+""}"`);i.set(t,n)}}return i}));e._zod.parse=(r,o)=>{let a=r.value;if(!E(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=n.value.get(a?.[t.discriminator]);return s?s._zod.run(r,o):t.unionFallback||"backward"===o.direction?i(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}})),Rt=s("$ZodIntersection",((e,t)=>{Ge.init(e,t),e._zod.parse=(e,i)=>{let n=e.value,r=t.left._zod.run({value:n,issues:[]},i),o=t.right._zod.run({value:n,issues:[]},i);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then((([t,i])=>Ut(e,t,i))):Ut(e,r,o)}}));function Nt(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(T(e)&&T(t)){let i=Object.keys(t),n=Object.keys(e).filter((e=>-1!==i.indexOf(e))),r={...e,...t};for(let i of n){let n=Nt(e[i],t[i]);if(!n.valid)return{valid:!1,mergeErrorPath:[i,...n.mergeErrorPath]};r[i]=n.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let n=0;n<e.length;n++){let r=Nt(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i.push(r.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function Ut(e,t,i){let n,r=new Map;for(let i of t.issues)if("unrecognized_keys"===i.code){n??=i;for(let e of i.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(i);for(let t of i.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let o=[...r].filter((([,e])=>e.l&&e.r)).map((([e])=>e));if(o.length&&n&&e.issues.push({...n,keys:o}),O(e))return e;let a=Nt(t.value,i.value);if(!a.valid)throw Error("Unmergable intersection. Error path: "+JSON.stringify(a.mergeErrorPath));return e.value=a.data,e}const Mt=s("$ZodRecord",((e,t)=>{Ge.init(e,t),e._zod.parse=(i,n)=>{let r=i.value;if(!T(r))return i.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),i;let o=[],a=t.keyType._zod.values;if(a){i.value={};let s,d=new Set;for(let s of a)if("string"==typeof s||"number"==typeof s||"symbol"==typeof s){d.add("number"==typeof s?""+s:s);let a=t.keyType._zod.run({value:s,issues:[]},n);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(a.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map((e=>U(e,n,u()))),input:s,path:[s],inst:e});continue}let c=a.value,l=t.valueType._zod.run({value:r[s],issues:[]},n);l instanceof Promise?o.push(l.then((e=>{e.issues.length&&i.issues.push(...R(s,e.issues)),i.value[c]=e.value}))):(l.issues.length&&i.issues.push(...R(s,l.issues)),i.value[c]=l.value)}for(let e in r)d.has(e)||(s??=[],s.push(e));s&&s.length>0&&i.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:s})}else{i.value={};for(let a of Reflect.ownKeys(r)){if("__proto__"===a||!Object.prototype.propertyIsEnumerable.call(r,a))continue;let s=t.keyType._zod.run({value:a,issues:[]},n);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof a&&ye.test(a)&&s.issues.length){let e=t.keyType._zod.run({value:Number(a),issues:[]},n);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?i.value[a]=r[a]:i.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map((e=>U(e,n,u()))),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:r[a],issues:[]},n);d instanceof Promise?o.push(d.then((e=>{e.issues.length&&i.issues.push(...R(a,e.issues)),i.value[s.value]=e.value}))):(d.issues.length&&i.issues.push(...R(a,d.issues)),i.value[s.value]=d.value)}}return o.length?Promise.all(o).then((()=>i)):i}})),Lt=s("$ZodEnum",((e,t)=>{Ge.init(e,t);let i=p(t.entries),n=new Set(i);e._zod.values=n,e._zod.pattern=RegExp(`^(${i.filter((e=>x.has(typeof e))).map((e=>"string"==typeof e?S(e):""+e)).join("|")})$`),e._zod.parse=t=>{let r=t.value;return n.has(r)||t.issues.push({code:"invalid_value",values:i,input:r,inst:e}),t}})),jt=s("$ZodLiteral",((e,t)=>{if(Ge.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let i=new Set(t.values);e._zod.values=i,e._zod.pattern=RegExp(`^(${t.values.map((e=>"string"==typeof e?S(e):e?S(""+e):e+"")).join("|")})$`),e._zod.parse=n=>{let r=n.value;return i.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}})),qt=s("$ZodTransform",((e,t)=>{Ge.init(e,t),e._zod.optin="optional",e._zod.parse=(i,n)=>{if("backward"===n.direction)throw new c(e.constructor.name);let r=t.transform(i.value,i);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then((e=>(i.value=e,i.fallback=!0,i)));if(r instanceof Promise)throw new d;return i.value=r,i.fallback=!0,i}}));function Gt(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Ft=s("$ZodOptional",((e,t)=>{Ge.init(e,t),e._zod.optin="optional",e._zod.optout="optional",g(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),g(e._zod,"pattern",(()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${y(e.source)})?$`):void 0})),e._zod.parse=(e,i)=>{if("optional"===t.innerType._zod.optin){let n=e.value,r=t.innerType._zod.run(e,i);return r instanceof Promise?r.then((e=>Gt(e,n))):Gt(r,n)}return void 0===e.value?e:t.innerType._zod.run(e,i)}})),Bt=s("$ZodExactOptional",((e,t)=>{Ft.init(e,t),g(e._zod,"values",(()=>t.innerType._zod.values)),g(e._zod,"pattern",(()=>t.innerType._zod.pattern)),e._zod.parse=(e,i)=>t.innerType._zod.run(e,i)})),zt=s("$ZodNullable",((e,t)=>{Ge.init(e,t),g(e._zod,"optin",(()=>t.innerType._zod.optin)),g(e._zod,"optout",(()=>t.innerType._zod.optout)),g(e._zod,"pattern",(()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${y(e.source)}|null)$`):void 0})),g(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0)),e._zod.parse=(e,i)=>null===e.value?e:t.innerType._zod.run(e,i)})),Vt=s("$ZodDefault",((e,t)=>{Ge.init(e,t),e._zod.optin="optional",g(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,i)=>{if("backward"===i.direction)return t.innerType._zod.run(e,i);if(void 0===e.value)return e.value=t.defaultValue,e;let n=t.innerType._zod.run(e,i);return n instanceof Promise?n.then((e=>Yt(e,t))):Yt(n,t)}}));function Yt(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Wt=s("$ZodPrefault",((e,t)=>{Ge.init(e,t),e._zod.optin="optional",g(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,i)=>("backward"===i.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,i))})),Zt=s("$ZodNonOptional",((e,t)=>{Ge.init(e,t),g(e._zod,"values",(()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter((e=>void 0!==e))):void 0})),e._zod.parse=(i,n)=>{let r=t.innerType._zod.run(i,n);return r instanceof Promise?r.then((t=>Ht(t,e))):Ht(r,e)}}));function Ht(e,t){return!e.issues.length&&void 0===e.value&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Kt=s("$ZodCatch",((e,t)=>{Ge.init(e,t),e._zod.optin="optional",g(e._zod,"optout",(()=>t.innerType._zod.optout)),g(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,i)=>{if("backward"===i.direction)return t.innerType._zod.run(e,i);let n=t.innerType._zod.run(e,i);return n instanceof Promise?n.then((n=>(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map((e=>U(e,i,u())))},input:e.value}),e.issues=[],e.fallback=!0),e))):(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map((e=>U(e,i,u())))},input:e.value}),e.issues=[],e.fallback=!0),e)}})),Jt=s("$ZodPipe",((e,t)=>{Ge.init(e,t),g(e._zod,"values",(()=>t.in._zod.values)),g(e._zod,"optin",(()=>t.in._zod.optin)),g(e._zod,"optout",(()=>t.out._zod.optout)),g(e._zod,"propValues",(()=>t.in._zod.propValues)),e._zod.parse=(e,i)=>{if("backward"===i.direction){let n=t.out._zod.run(e,i);return n instanceof Promise?n.then((e=>Qt(e,t.in,i))):Qt(n,t.in,i)}let n=t.in._zod.run(e,i);return n instanceof Promise?n.then((e=>Qt(e,t.out,i))):Qt(n,t.out,i)}}));function Qt(e,t,i){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},i)}const Xt=s("$ZodPreprocess",((e,t)=>{Jt.init(e,t)})),ei=s("$ZodReadonly",((e,t)=>{Ge.init(e,t),g(e._zod,"propValues",(()=>t.innerType._zod.propValues)),g(e._zod,"values",(()=>t.innerType._zod.values)),g(e._zod,"optin",(()=>t.innerType?._zod?.optin)),g(e._zod,"optout",(()=>t.innerType?._zod?.optout)),e._zod.parse=(e,i)=>{if("backward"===i.direction)return t.innerType._zod.run(e,i);let n=t.innerType._zod.run(e,i);return n instanceof Promise?n.then(ti):ti(n)}}));function ti(e){return e.value=Object.freeze(e.value),e}const ii=s("$ZodLazy",((e,t)=>{Ge.init(e,t),g(e._zod,"innerType",(()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner})),g(e._zod,"pattern",(()=>e._zod.innerType?._zod?.pattern)),g(e._zod,"propValues",(()=>e._zod.innerType?._zod?.propValues)),g(e._zod,"optin",(()=>e._zod.innerType?._zod?.optin??void 0)),g(e._zod,"optout",(()=>e._zod.innerType?._zod?.optout??void 0)),e._zod.parse=(t,i)=>e._zod.innerType._zod.run(t,i)})),ni=s("$ZodCustom",((e,t)=>{Ie.init(e,t),Ge.init(e,t),e._zod.parse=e=>e,e._zod.check=i=>{let n=i.value,r=t.fn(n);if(r instanceof Promise)return r.then((t=>ri(t,i,n,e)));ri(r,i,n,e)}}));function ri(e,t,i,n){if(!e){let e={code:"custom",input:i,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(L(e))}}var oi;(oi=globalThis).__zod_globalRegistry??(oi.__zod_globalRegistry=new class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let i=t[0];return this._map.set(e,i),i&&"object"==typeof i&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let i={...this.get(t)??{}};delete i.id;let n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});const ai=globalThis.__zod_globalRegistry;function si(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...C(t)})}function di(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...C(t)})}function ci(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...C(t)})}function li(e,t){return new ke({check:"less_than",...C(t),value:e,inclusive:!1})}function ui(e,t){return new ke({check:"less_than",...C(t),value:e,inclusive:!0})}function pi(e,t){return new Te({check:"greater_than",...C(t),value:e,inclusive:!1})}function mi(e,t){return new Te({check:"greater_than",...C(t),value:e,inclusive:!0})}function hi(e,t){return new Ae({check:"multiple_of",...C(t),value:e})}function fi(e,t){return new Se({check:"max_length",...C(t),maximum:e})}function yi(e,t){return new De({check:"min_length",...C(t),minimum:e})}function vi(e,t){return new Ce({check:"length_equals",...C(t),length:e})}function gi(e){return new Le({check:"overwrite",tx:e})}function bi(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ai,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $i(e,t,i={path:[],schemaPath:[]}){var n;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,i.schemaPath.includes(e)&&(o.cycle=i.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let n={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,n);else{let i=a.schema,o=t.processors[r.type];if(!o)throw Error("[toJSONSchema]: Non-representable type encountered: "+r.type);o(e,t,i,n)}let o=e._zod.parent;o&&(a.ref||=o,$i(o,t,n),t.seen.get(o).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),"input"===t.io&&Ei(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function wi(e,t){let i=e.seen.get(t);if(!i)throw Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let t of e.seen.entries()){let i=e.metadataRegistry.get(t[0])?.id;if(i){let e=n.get(i);if(e&&e!==t[0])throw Error(`Duplicate schema id "${i}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(i,t[0])}}let r=t=>{let n="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let i=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(i)return{ref:r(i)};let o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${r("__shared")}#/${n}/${o}`}}if(t[1]===i)return{ref:"#"};let r=`#/${n}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:r+o}},o=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:i,defId:n}=r(e);t.def={...t.schema},n&&(t.defId=n);let o=t.schema;for(let e in o)delete o[e];o.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let n=i[1];if(t!==i[0]){if(e.external){let n=e.external.registry.get(i[0])?.id;if(t!==i[0]&&n){o(i);continue}}(e.metadataRegistry.get(i[0])?.id||n.cycle||n.count>1&&"ref"===e.reused)&&o(i)}else o(i)}}function Ii(e,t){let i=e.seen.get(t);if(!i)throw Error("Unprocessed schema. This is a bug in Zod.");let n=t=>{let i=e.seen.get(t);if(null===i.ref)return;let r=i.def??i.schema,o={...r},a=i.ref;if(i.ref=null,a){n(a);let i=e.seen.get(a),s=i.schema;if(!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,s):(r.allOf=r.allOf??[],r.allOf.push(s)),Object.assign(r,o),t._zod.parent===a)for(let e in r)"$ref"===e||"allOf"===e||e in o||delete r[e];if(s.$ref&&i.def)for(let e in r)"$ref"===e||"allOf"===e||e in i.def&&JSON.stringify(r[e])===JSON.stringify(i.def[e])&&delete r[e]}let s=t._zod.parent;if(s&&s!==a){n(s);let t=e.seen.get(s);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(let e in r)"$ref"===e||"allOf"===e||e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:i.path??[]})};for(let t of[...e.seen.entries()].reverse())n(t[0]);let r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target&&(r.$schema="http://json-schema.org/draft-04/schema#"),e.external?.uri){let i=e.external.registry.get(t)?.id;if(!i)throw Error("Schema is missing an `id` property");r.$id=e.external.uri(i)}Object.assign(r,i.def??i.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?r.$defs=a:r.definitions=a);try{let i=JSON.parse(JSON.stringify(r));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:ki(t,"input",e.processors),output:ki(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw Error("Error converting schema to JSON.")}}function Ei(e,t){let i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);let n=e._zod.def;if("transform"===n.type)return!0;if("array"===n.type)return Ei(n.element,i);if("set"===n.type)return Ei(n.valueType,i);if("lazy"===n.type)return Ei(n.getter(),i);if("promise"===n.type||"optional"===n.type||"nonoptional"===n.type||"nullable"===n.type||"readonly"===n.type||"default"===n.type||"prefault"===n.type)return Ei(n.innerType,i);if("intersection"===n.type)return Ei(n.left,i)||Ei(n.right,i);if("record"===n.type||"map"===n.type)return Ei(n.keyType,i)||Ei(n.valueType,i);if("pipe"===n.type)return!!e._zod.traits.has("$ZodCodec")||Ei(n.in,i)||Ei(n.out,i);if("object"===n.type){for(let e in n.shape)if(Ei(n.shape[e],i))return!0;return!1}if("union"===n.type){for(let e of n.options)if(Ei(e,i))return!0;return!1}if("tuple"===n.type){for(let e of n.items)if(Ei(e,i))return!0;return!(!n.rest||!Ei(n.rest,i))}return!1}const ki=(e,t,i={})=>n=>{let{libraryOptions:r,target:o}=n??{},a=bi({...r??{},target:o,io:t,processors:i});return $i(e,a),wi(a,e),Ii(a,e)},Ti={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ai=(e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType},xi=s("ZodISODateTime",((e,t)=>{tt.init(e,t),Qi.init(e,t)}));function Si(e){return function(e,t){return new xi({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(t)})}(0,e)}const Di=s("ZodISODate",((e,t)=>{it.init(e,t),Qi.init(e,t)}));function Ci(e){return function(e,t){return new Di({type:"string",format:"date",check:"string_format",...C(t)})}(0,e)}const Pi=s("ZodISOTime",((e,t)=>{nt.init(e,t),Qi.init(e,t)}));const Oi=s("ZodISODuration",((e,t)=>{rt.init(e,t),Qi.init(e,t)}));const _i=s("ZodError",((e,t)=>{q.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){let i={_errors:[]},n=(e,r=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map((e=>n({issues:e},[...r,...o.path])));else if("invalid_key"===o.code)n({issues:o.issues},[...r,...o.path]);else if("invalid_element"===o.code)n({issues:o.issues},[...r,...o.path]);else{let e=[...r,...o.path];if(0===e.length)i._errors.push(t(o));else{let n=i,r=0;for(;r<e.length;){let i=e[r];r===e.length-1?(n[i]=n[i]||{_errors:[]},n[i]._errors.push(t(o))):n[i]=n[i]||{_errors:[]},n=n[i],r++}}}};return n(e),i}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){let i={},n=[];for(let r of e.issues)r.path.length>0?(i[r.path[0]]=i[r.path[0]]||[],i[r.path[0]].push(t(r))):n.push(t(r));return{formErrors:n,fieldErrors:i}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,m,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,m,2)}},isEmpty:{get:()=>0===e.issues.length}})}),{Parent:Error}),Ri=F(_i),Ni=B(_i),Ui=z(_i),Mi=Y(_i),Li=(e=>(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return F(e)(t,i,r)})(_i),ji=(e=>(t,i,n)=>F(e)(t,i,n))(_i),qi=(e=>async(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return B(e)(t,i,r)})(_i),Gi=(e=>async(t,i,n)=>B(e)(t,i,n))(_i),Fi=(e=>(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return z(e)(t,i,r)})(_i),Bi=(e=>(t,i,n)=>z(e)(t,i,n))(_i),zi=(e=>async(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return Y(e)(t,i,r)})(_i),Vi=(e=>async(t,i,n)=>Y(e)(t,i,n))(_i),Yi=new WeakMap;function Wi(e,t,i){let n=Object.getPrototypeOf(e),r=Yi.get(n);if(r||(r=new Set,Yi.set(n,r)),!r.has(t)){r.add(t);for(let e in i){let t=i[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,get(){let i=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:i}),i},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const Zi=s("ZodType",((e,t)=>(Ge.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ki(e,"input"),output:ki(e,"output")}}),e.toJSONSchema=((e,t={})=>i=>{let n=bi({...i,processors:t});return $i(e,n),wi(n,e),Ii(n,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,i)=>Ri(e,t,i,{callee:e.parse}),e.safeParse=(t,i)=>Ui(e,t,i),e.parseAsync=async(t,i)=>Ni(e,t,i,{callee:e.parseAsync}),e.safeParseAsync=async(t,i)=>Mi(e,t,i),e.spa=e.safeParseAsync,e.encode=(t,i)=>Li(e,t,i),e.decode=(t,i)=>ji(e,t,i),e.encodeAsync=async(t,i)=>qi(e,t,i),e.decodeAsync=async(t,i)=>Gi(e,t,i),e.safeEncode=(t,i)=>Fi(e,t,i),e.safeDecode=(t,i)=>Bi(e,t,i),e.safeEncodeAsync=async(t,i)=>zi(e,t,i),e.safeDecodeAsync=async(t,i)=>Vi(e,t,i),Wi(e,"ZodType",{check(...e){let t=this.def;return this.clone($(t,{checks:[...t.checks??[],...e.map((e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e))]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return D(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return function(e,t,i){return new gr({type:"custom",check:"custom",fn:t,...C(i)})}(0,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return function(e,t){let i=function(e,t){let i=new Ie({check:"custom",...C(t)});return i._zod.check=e,i}((t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(L(e,t.value,i._zod.def));else{let n=e;n.fatal&&(n.continue=!1),n.code??="custom",n.input??=t.value,n.inst??=i,n.continue??=!i._zod.def.abort,t.issues.push(L(n))}},e(t.value,t))),t);return i}(e,t)}(e,t))},overwrite(e){return this.check(gi(e))},optional(){return or(this)},exactOptional(){return function(e){return new ar({type:"optional",innerType:e})}(this)},nullable(){return dr(this)},nullish(){return or(dr(this))},nonoptional(e){return function(e,t){return new ur({type:"nonoptional",innerType:e,...C(t)})}(this,e)},array(){return Gn(this)},or(e){return Yn([this,e])},and(e){return function(e,t){return new Hn({type:"intersection",left:e,right:t})}(this,e)},transform(e){return hr(this,nr(e))},default(e){return function(e,t){return new cr({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():A(t)}})}(this,e)},prefault(e){return function(e,t){return new lr({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():A(t)}})}(this,e)},catch(e){return function(e,t){return new pr({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}(this,e)},pipe(e){return hr(this,e)},readonly(){return function(e){return new yr({type:"readonly",innerType:e})}(this)},describe(e){let t=this.clone();return ai.add(t,{description:e}),t},meta(...e){if(0===e.length)return ai.get(this);let t=this.clone();return ai.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>ai.get(e)?.description,configurable:!0}),e))),Hi=s("_ZodString",((e,t)=>{Fe.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i)=>((e,t,i)=>{let n=i;n.type="string";let{minimum:r,maximum:o,format:a,patterns:s,contentEncoding:d}=e._zod.bag;if("number"==typeof r&&(n.minLength=r),"number"==typeof o&&(n.maxLength=o),a&&(n.format=Ti[a]??a,""===n.format&&delete n.format,"time"===a&&delete n.format),d&&(n.contentEncoding=d),s&&s.size>0){let e=[...s];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map((e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source})))])}})(e,t,i);let i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,Wi(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new Oe({check:"string_format",format:"regex",...C(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new Ne({check:"string_format",format:"includes",...C(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new Ue({check:"string_format",format:"starts_with",...C(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new Me({check:"string_format",format:"ends_with",...C(t),suffix:e})}(...e))},min(...e){return this.check(yi(...e))},max(...e){return this.check(fi(...e))},length(...e){return this.check(vi(...e))},nonempty(...e){return this.check(yi(1,...e))},lowercase(e){return this.check(function(e){return new _e({check:"string_format",format:"lowercase",...C(e)})}(e))},uppercase(e){return this.check(function(e){return new Re({check:"string_format",format:"uppercase",...C(e)})}(e))},trim(){return this.check(gi((e=>e.trim())))},normalize(...e){return this.check(function(e){return gi((t=>t.normalize(e)))}(...e))},toLowerCase(){return this.check(gi((e=>e.toLowerCase())))},toUpperCase(){return this.check(gi((e=>e.toUpperCase())))},slugify(){return this.check(gi((e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))))}})})),Ki=s("ZodString",((e,t)=>{Fe.init(e,t),Hi.init(e,t),e.email=t=>e.check(si(Xi,t)),e.url=t=>e.check(ci(rn,t)),e.jwt=t=>e.check(function(e,t){return new $n({type:"string",format:"jwt",check:"string_format",abort:!1,...C(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new an({type:"string",format:"emoji",check:"string_format",abort:!1,...C(t)})}(0,t)),e.guid=t=>e.check(di(tn,t)),e.uuid=t=>e.check(function(e,t){return new nn({type:"string",format:"uuid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new nn({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new nn({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new nn({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new sn({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.guid=t=>e.check(di(tn,t)),e.cuid=t=>e.check(function(e,t){return new dn({type:"string",format:"cuid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new cn({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new ln({type:"string",format:"ulid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new vn({type:"string",format:"base64",check:"string_format",abort:!1,...C(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new gn({type:"string",format:"base64url",check:"string_format",abort:!1,...C(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new un({type:"string",format:"xid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new pn({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new mn({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new hn({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new fn({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new yn({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new bn({type:"string",format:"e164",check:"string_format",abort:!1,...C(t)})}(0,t)),e.datetime=t=>e.check(Si(t)),e.date=t=>e.check(Ci(t)),e.time=t=>e.check(function(e){return function(e,t){return new Pi({type:"string",format:"time",check:"string_format",precision:null,...C(t)})}(0,e)}(t)),e.duration=t=>e.check(function(e){return function(e,t){return new Oi({type:"string",format:"duration",check:"string_format",...C(t)})}(0,e)}(t))}));function Ji(e){return function(e,t){return new Ki({type:"string",...C(t)})}(0,e)}const Qi=s("ZodStringFormat",((e,t)=>{Be.init(e,t),Hi.init(e,t)})),Xi=s("ZodEmail",((e,t)=>{Ye.init(e,t),Qi.init(e,t)}));function en(e){return si(Xi,e)}const tn=s("ZodGUID",((e,t)=>{ze.init(e,t),Qi.init(e,t)})),nn=s("ZodUUID",((e,t)=>{Ve.init(e,t),Qi.init(e,t)})),rn=s("ZodURL",((e,t)=>{We.init(e,t),Qi.init(e,t)}));function on(e){return ci(rn,e)}const an=s("ZodEmoji",((e,t)=>{Ze.init(e,t),Qi.init(e,t)})),sn=s("ZodNanoID",((e,t)=>{He.init(e,t),Qi.init(e,t)})),dn=s("ZodCUID",((e,t)=>{Ke.init(e,t),Qi.init(e,t)})),cn=s("ZodCUID2",((e,t)=>{Je.init(e,t),Qi.init(e,t)})),ln=s("ZodULID",((e,t)=>{Qe.init(e,t),Qi.init(e,t)})),un=s("ZodXID",((e,t)=>{Xe.init(e,t),Qi.init(e,t)})),pn=s("ZodKSUID",((e,t)=>{et.init(e,t),Qi.init(e,t)})),mn=s("ZodIPv4",((e,t)=>{ot.init(e,t),Qi.init(e,t)})),hn=s("ZodIPv6",((e,t)=>{at.init(e,t),Qi.init(e,t)})),fn=s("ZodCIDRv4",((e,t)=>{st.init(e,t),Qi.init(e,t)})),yn=s("ZodCIDRv6",((e,t)=>{dt.init(e,t),Qi.init(e,t)})),vn=s("ZodBase64",((e,t)=>{lt.init(e,t),Qi.init(e,t)})),gn=s("ZodBase64URL",((e,t)=>{ut.init(e,t),Qi.init(e,t)})),bn=s("ZodE164",((e,t)=>{pt.init(e,t),Qi.init(e,t)})),$n=s("ZodJWT",((e,t)=>{mt.init(e,t),Qi.init(e,t)})),wn=s("ZodNumber",((e,t)=>{ht.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i)=>((e,t,i)=>{let n=i,{minimum:r,maximum:o,format:a,multipleOf:s,exclusiveMaximum:d,exclusiveMinimum:c}=e._zod.bag;n.type="string"==typeof a&&a.includes("int")?"integer":"number";let l="number"==typeof d&&d<=(o??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;"number"==typeof c&&c>=(r??-1/0)?u?(n.minimum=c,n.exclusiveMinimum=!0):n.exclusiveMinimum=c:"number"==typeof r&&(n.minimum=r),l?u?(n.maximum=d,n.exclusiveMaximum=!0):n.exclusiveMaximum=d:"number"==typeof o&&(n.maximum=o),"number"==typeof s&&(n.multipleOf=s)})(e,t,i),Wi(e,"ZodNumber",{gt(e,t){return this.check(pi(e,t))},gte(e,t){return this.check(mi(e,t))},min(e,t){return this.check(mi(e,t))},lt(e,t){return this.check(li(e,t))},lte(e,t){return this.check(ui(e,t))},max(e,t){return this.check(ui(e,t))},int(e){return this.check(kn(e))},safe(e){return this.check(kn(e))},positive(e){return this.check(pi(0,e))},nonnegative(e){return this.check(mi(0,e))},negative(e){return this.check(li(0,e))},nonpositive(e){return this.check(ui(0,e))},multipleOf(e,t){return this.check(hi(e,t))},step(e,t){return this.check(hi(e,t))},finite(){return this}});let i=e._zod.bag;e.minValue=Math.max(i.minimum??-1/0,i.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(i.maximum??1/0,i.exclusiveMaximum??1/0)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null}));function In(e){return function(e,t){return new wn({type:"number",checks:[],...C(t)})}(0,e)}const En=s("ZodNumberFormat",((e,t)=>{ft.init(e,t),wn.init(e,t)}));function kn(e){return function(e,t){return new En({type:"number",check:"number_format",abort:!1,format:"safeint",...C(t)})}(0,e)}const Tn=s("ZodBoolean",((e,t)=>{yt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,i)=>{i.type="boolean"})(0,0,t)}));function An(e){return function(e,t){return new Tn({type:"boolean",...C(t)})}(0,e)}const xn=s("ZodUndefined",((e,t)=>{vt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")})(0,e)}));function Sn(e){return function(e,t){return new xn({type:"undefined",...C(t)})}(0,e)}const Dn=s("ZodNull",((e,t)=>{gt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,i)=>{"openapi-3.0"===t.target?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"})(0,e,t)}));function Cn(e){return function(e,t){return new Dn({type:"null",...C(t)})}(0,e)}const Pn=s("ZodAny",((e,t)=>{bt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=()=>{}})),On=s("ZodUnknown",((e,t)=>{$t.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=()=>{}}));function _n(){return new On({type:"unknown"})}const Rn=s("ZodNever",((e,t)=>{wt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,i)=>{i.not={}})(0,0,t)}));function Nn(e){return function(e,t){return new Rn({type:"never",...C(t)})}(0,e)}const Un=s("ZodVoid",((e,t)=>{It.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")})(0,e)}));function Mn(e){return function(e,t){return new Un({type:"void",...C(t)})}(0,e)}const Ln=s("ZodDate",((e,t)=>{Et.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")})(0,e),e.min=(t,i)=>e.check(mi(t,i)),e.max=(t,i)=>e.check(ui(t,i));let i=e._zod.bag;e.minDate=i.minimum?new Date(i.minimum):null,e.maxDate=i.maximum?new Date(i.maximum):null}));function jn(e){return function(e,t){return new Ln({type:"date",...C(t)})}(0,e)}const qn=s("ZodArray",((e,t)=>{Tt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=$i(o.element,t,{...n,path:[...n.path,"items"]})})(e,t,i,n),e.element=t.element,Wi(e,"ZodArray",{min(e,t){return this.check(yi(e,t))},nonempty(e){return this.check(yi(1,e))},max(e,t){return this.check(fi(e,t))},length(e,t){return this.check(vi(e,t))},unwrap(){return this.element}})}));function Gn(e,t){return function(e,t,i){return new qn({type:"array",element:t,...C(i)})}(0,e,t)}const Fn=s("ZodObject",((e,t)=>{Ct.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let e in a)r.properties[e]=$i(a[e],t,{...n,path:[...n.path,"properties",e]});let s=new Set(Object.keys(a)),d=new Set([...s].filter((e=>{let i=o.shape[e]._zod;return"input"===t.io?void 0===i.optin:void 0===i.optout})));d.size>0&&(r.required=Array.from(d)),"never"===o.catchall?._zod.def.type?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=$i(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,i,n),g(e,"shape",(()=>t.shape)),Wi(e,"ZodObject",{keyof(){return Xn(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:_n()})},loose(){return this.clone({...this._zod.def,catchall:_n()})},strict(){return this.clone({...this._zod.def,catchall:Nn()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!T(t))throw Error("Invalid input to extend: expected a plain object");let i=e._zod.def.checks;if(i&&i.length>0){let i=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(i,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return D(e,$(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return b(this,"shape",i),i}}))}(this,e)},safeExtend(e){return function(e,t){if(!T(t))throw Error("Invalid input to safeExtend: expected a plain object");return D(e,$(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return b(this,"shape",i),i}}))}(this,e)},merge(e){return function(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return D(e,$(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return b(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}(this,e)},pick(e){return function(e,t){let i=e._zod.def,n=i.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");return D(e,$(e._zod.def,{get shape(){let e={};for(let n in t){if(!(n in i.shape))throw Error(`Unrecognized key: "${n}"`);t[n]&&(e[n]=i.shape[n])}return b(this,"shape",e),e},checks:[]}))}(this,e)},omit(e){return function(e,t){let i=e._zod.def,n=i.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");return D(e,$(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let e in t){if(!(e in i.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return b(this,"shape",n),n},checks:[]}))}(this,e)},partial(...e){return function(e,t,i){let n=t._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");return D(t,$(t._zod.def,{get shape(){let n=t._zod.def.shape,r={...n};if(i)for(let t in i){if(!(t in n))throw Error(`Unrecognized key: "${t}"`);i[t]&&(r[t]=e?new e({type:"optional",innerType:n[t]}):n[t])}else for(let t in n)r[t]=e?new e({type:"optional",innerType:n[t]}):n[t];return b(this,"shape",r),r},checks:[]}))}(rr,this,e[0])},required(...e){return function(e,t,i){return D(t,$(t._zod.def,{get shape(){let n=t._zod.def.shape,r={...n};if(i)for(let t in i){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);i[t]&&(r[t]=new e({type:"nonoptional",innerType:n[t]}))}else for(let t in n)r[t]=new e({type:"nonoptional",innerType:n[t]});return b(this,"shape",r),r}}))}(ur,this,e[0])}})}));function Bn(e,t){return new Fn({type:"object",shape:e??{},...C(t)})}function zn(e,t){return new Fn({type:"object",shape:e,catchall:Nn(),...C(t)})}const Vn=s("ZodUnion",((e,t)=>{Ot.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=!1===r.inclusive,a=r.options.map(((e,i)=>$i(e,t,{...n,path:[...n.path,o?"oneOf":"anyOf",i]})));o?i.oneOf=a:i.anyOf=a})(e,t,i,n),e.options=t.options}));function Yn(e,t){return new Vn({type:"union",options:e,...C(t)})}const Wn=s("ZodDiscriminatedUnion",((e,t)=>{Vn.init(e,t),_t.init(e,t)}));function Zn(e,t,i){return new Wn({type:"union",options:t,discriminator:e,...C(i)})}const Hn=s("ZodIntersection",((e,t)=>{Rt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=$i(r.left,t,{...n,path:[...n.path,"allOf",0]}),a=$i(r.right,t,{...n,path:[...n.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;i.allOf=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]]})(e,t,i,n)})),Kn=s("ZodRecord",((e,t)=>{Mt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,o=e._zod.def;r.type="object";let a=o.keyType,s=a._zod.bag?.patterns;if("loose"===o.mode&&s&&s.size>0){let e=$i(o.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});r.patternProperties={};for(let t of s)r.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(r.propertyNames=$i(o.keyType,t,{...n,path:[...n.path,"propertyNames"]})),r.additionalProperties=$i(o.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let d=a._zod.values;if(d){let e=[...d].filter((e=>"string"==typeof e||"number"==typeof e));e.length>0&&(r.required=e)}})(e,t,i,n),e.keyType=t.keyType,e.valueType=t.valueType}));function Jn(e,t,i){return new Kn(t&&t._zod?{type:"record",keyType:e,valueType:t,...C(i)}:{type:"record",keyType:Ji(),valueType:e,...C(t)})}const Qn=s("ZodEnum",((e,t)=>{Lt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i)=>((e,t,i)=>{let n=p(e._zod.def.entries);n.every((e=>"number"==typeof e))&&(i.type="number"),n.every((e=>"string"==typeof e))&&(i.type="string"),i.enum=n})(e,0,i),e.enum=t.entries,e.options=Object.values(t.entries);let i=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let r={};for(let n of e){if(!i.has(n))throw Error(`Key ${n} not found in enum`);r[n]=t.entries[n]}return new Qn({...t,checks:[],...C(n),entries:r})},e.exclude=(e,n)=>{let r={...t.entries};for(let t of e){if(!i.has(t))throw Error(`Key ${t} not found in enum`);delete r[t]}return new Qn({...t,checks:[],...C(n),entries:r})}}));function Xn(e,t){return new Qn({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e,...C(t)})}const er=s("ZodLiteral",((e,t)=>{jt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i)=>((e,t,i)=>{let n=e._zod.def,r=[];for(let e of n.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(e))}else r.push(e);if(0!==r.length)if(1===r.length){let e=r[0];i.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?i.enum=[e]:i.const=e}else r.every((e=>"number"==typeof e))&&(i.type="number"),r.every((e=>"string"==typeof e))&&(i.type="string"),r.every((e=>"boolean"==typeof e))&&(i.type="boolean"),r.every((e=>null===e))&&(i.type="null"),i.enum=r})(e,t,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function tr(e,t){return new er({type:"literal",values:Array.isArray(e)?e:[e],...C(t)})}const ir=s("ZodTransform",((e,t)=>{qt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(i,n)=>{if("backward"===n.direction)throw new c(e.constructor.name);i.addIssue=n=>{if("string"==typeof n)i.issues.push(L(n,i.value,t));else{let t=n;t.fatal&&(t.continue=!1),t.code??="custom",t.input??=i.value,t.inst??=e,i.issues.push(L(t))}};let r=t.transform(i.value,i);return r instanceof Promise?r.then((e=>(i.value=e,i.fallback=!0,i))):(i.value=r,i.fallback=!0,i)}}));function nr(e){return new ir({type:"transform",transform:e})}const rr=s("ZodOptional",((e,t)=>{Ft.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>Ai(e,t,0,n),e.unwrap=()=>e._zod.def.innerType}));function or(e){return new rr({type:"optional",innerType:e})}const ar=s("ZodExactOptional",((e,t)=>{Bt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>Ai(e,t,0,n),e.unwrap=()=>e._zod.def.innerType})),sr=s("ZodNullable",((e,t)=>{zt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=$i(r.innerType,t,n),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=r.innerType,i.nullable=!0):i.anyOf=[o,{type:"null"}]})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType}));function dr(e){return new sr({type:"nullable",innerType:e})}const cr=s("ZodDefault",((e,t)=>{Vt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType,i.default=JSON.parse(JSON.stringify(r.defaultValue))})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),lr=s("ZodPrefault",((e,t)=>{Wt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType,"input"===t.io&&(i._prefault=JSON.parse(JSON.stringify(r.defaultValue)))})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType})),ur=s("ZodNonOptional",((e,t)=>{Zt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType})(e,t,0,n),e.unwrap=()=>e._zod.def.innerType})),pr=s("ZodCatch",((e,t)=>{Kt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r,o=e._zod.def;$i(o.innerType,t,n),t.seen.get(e).ref=o.innerType;try{r=o.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}i.default=r})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),mr=s("ZodPipe",((e,t)=>{Jt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a="input"===t.io?o?r.out:r.in:r.out;$i(a,t,n),t.seen.get(e).ref=a})(e,t,0,n),e.in=t.in,e.out=t.out}));function hr(e,t){return new mr({type:"pipe",in:e,out:t})}const fr=s("ZodPreprocess",((e,t)=>{mr.init(e,t),Xt.init(e,t)})),yr=s("ZodReadonly",((e,t)=>{ei.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType,i.readOnly=!0})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType})),vr=s("ZodLazy",((e,t)=>{ii.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.innerType;$i(r,t,n),t.seen.get(e).ref=r})(e,t,0,n),e.unwrap=()=>e._zod.def.getter()})),gr=s("ZodCustom",((e,t)=>{ni.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e)}));for(var br=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,$r=[],wr=0;wr<256;++wr)$r.push((wr+256).toString(16).slice(1));function Ir(e,t=0){return($r[e[t+0]]+$r[e[t+1]]+$r[e[t+2]]+$r[e[t+3]]+"-"+$r[e[t+4]]+$r[e[t+5]]+"-"+$r[e[t+6]]+$r[e[t+7]]+"-"+$r[e[t+8]]+$r[e[t+9]]+"-"+$r[e[t+10]]+$r[e[t+11]]+$r[e[t+12]]+$r[e[t+13]]+$r[e[t+14]]+$r[e[t+15]]).toLowerCase()}var Er,kr=new Uint8Array(16);function Tr(){if(!Er&&!(Er=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Er(kr)}var Ar=null,xr=null,Sr=0;function Dr(e,t){e||={};var i=0,n=t||new Uint8Array(16),r=e.random||(e.rng||Tr)(),o=void 0===e.msecs?Date.now():e.msecs,a=void 0===e.seq?null:e.seq,s=xr,d=Ar;return o>Sr&&void 0===e.msecs&&(Sr=o,null!==a&&(s=null,d=null)),null!==a&&(a>2147483647&&(a=2147483647),s=a>>>19&4095,d=524287&a),(null===s||null===d)&&(s=(s=127&r[6])<<8|r[7],d=(d=(d=63&r[8])<<8|r[9])<<5|r[10]>>>3),o+1e4>Sr&&null===a?++d>524287&&(d=0,++s>4095&&(s=0,Sr++)):Sr=o,xr=s,Ar=d,n[i++]=Sr/1099511627776&255,n[i++]=Sr/4294967296&255,n[i++]=Sr/16777216&255,n[i++]=Sr/65536&255,n[i++]=Sr/256&255,n[i++]=255&Sr,n[i++]=s>>>4&15|112,n[i++]=255&s,n[i++]=d>>>13&63|128,n[i++]=d>>>5&255,n[i++]=d<<3&255|7&r[10],n[i++]=r[11],n[i++]=r[12],n[i++]=r[13],n[i++]=r[14],n[i++]=r[15],t||Ir(n)}var Cr="0123456789abcdefghjkmnpqrstvwxyz",Pr=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,255,18,19,255,20,21,255,22,23,24,25,26,255,27,28,29,30,31,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]);function Or(e){let t=Array(26).fill("");if(16!==e.length)throw Error(`Invalid length. Expected 16 bytes, got ${e.length}. Input: ${e}`);return t[0]=Cr[(224&e[0])>>5],t[1]=Cr[31&e[0]],t[2]=Cr[(248&e[1])>>3],t[3]=Cr[(7&e[1])<<2|(192&e[2])>>6],t[4]=Cr[(62&e[2])>>1],t[5]=Cr[(1&e[2])<<4|(240&e[3])>>4],t[6]=Cr[(15&e[3])<<1|(128&e[4])>>7],t[7]=Cr[(124&e[4])>>2],t[8]=Cr[(3&e[4])<<3|(224&e[5])>>5],t[9]=Cr[31&e[5]],t[10]=Cr[(248&e[6])>>3],t[11]=Cr[(7&e[6])<<2|(192&e[7])>>6],t[12]=Cr[(62&e[7])>>1],t[13]=Cr[(1&e[7])<<4|(240&e[8])>>4],t[14]=Cr[(15&e[8])<<1|(128&e[9])>>7],t[15]=Cr[(124&e[9])>>2],t[16]=Cr[(3&e[9])<<3|(224&e[10])>>5],t[17]=Cr[31&e[10]],t[18]=Cr[(248&e[11])>>3],t[19]=Cr[(7&e[11])<<2|(192&e[12])>>6],t[20]=Cr[(62&e[12])>>1],t[21]=Cr[(1&e[12])<<4|(240&e[13])>>4],t[22]=Cr[(15&e[13])<<1|(128&e[14])>>7],t[23]=Cr[(124&e[14])>>2],t[24]=Cr[(3&e[14])<<3|(224&e[15])>>5],t[25]=Cr[31&e[15]],t.join("")}function _r(e){if(26!==e.length)throw Error(`Invalid length. Expected 26 bytes, got ${e.length}. Input: ${e}`);let t=(new TextEncoder).encode(e);if(255===Pr[t[0]]||255===Pr[t[1]]||255===Pr[t[2]]||255===Pr[t[3]]||255===Pr[t[4]]||255===Pr[t[5]]||255===Pr[t[6]]||255===Pr[t[7]]||255===Pr[t[8]]||255===Pr[t[9]]||255===Pr[t[10]]||255===Pr[t[11]]||255===Pr[t[12]]||255===Pr[t[13]]||255===Pr[t[14]]||255===Pr[t[15]]||255===Pr[t[16]]||255===Pr[t[17]]||255===Pr[t[18]]||255===Pr[t[19]]||255===Pr[t[20]]||255===Pr[t[21]]||255===Pr[t[22]]||255===Pr[t[23]]||255===Pr[t[24]]||255===Pr[t[25]])throw Error("Invalid base32 character");let i=new Uint8Array(16);return i[0]=Pr[t[0]]<<5|Pr[t[1]],i[1]=Pr[t[2]]<<3|Pr[t[3]]>>2,i[2]=(3&Pr[t[3]])<<6|Pr[t[4]]<<1|Pr[t[5]]>>4,i[3]=(15&Pr[t[5]])<<4|Pr[t[6]]>>1,i[4]=(1&Pr[t[6]])<<7|Pr[t[7]]<<2|Pr[t[8]]>>3,i[5]=(7&Pr[t[8]])<<5|Pr[t[9]],i[6]=Pr[t[10]]<<3|Pr[t[11]]>>2,i[7]=(3&Pr[t[11]])<<6|Pr[t[12]]<<1|Pr[t[13]]>>4,i[8]=(15&Pr[t[13]])<<4|Pr[t[14]]>>1,i[9]=(1&Pr[t[14]])<<7|Pr[t[15]]<<2|Pr[t[16]]>>3,i[10]=(7&Pr[t[16]])<<5|Pr[t[17]],i[11]=Pr[t[18]]<<3|Pr[t[19]]>>2,i[12]=(3&Pr[t[19]])<<6|Pr[t[20]]<<1|Pr[t[21]]>>4,i[13]=(15&Pr[t[21]])<<4|Pr[t[22]]>>1,i[14]=(1&Pr[t[22]])<<7|Pr[t[23]]<<2|Pr[t[24]]>>3,i[15]=(7&Pr[t[24]])<<5|Pr[t[25]],i}var Rr=class extends Error{constructor(e){super(`Invalid prefix "${e}". Must be at most 63 ASCII letters [a-z_]`),this.name="InvalidPrefixError"}},Nr=class extends Error{constructor(e,t){super(`Invalid TypeId. Prefix mismatch. Expected ${e}, got ${t}`),this.name="PrefixMismatchError"}},Ur=class extends Error{constructor(e){super("Invalid TypeId. Prefix cannot be empty when there's a separator: "+e),this.name="EmptyPrefixError"}},Mr=class extends Error{constructor(e){super("Invalid length. Suffix should have 26 characters, got "+e),this.name="InvalidSuffixLengthError"}},Lr=class extends Error{constructor(e){super(`Invalid suffix. First character "${e}" must be in the range [0-7]`),this.name="InvalidSuffixCharacterError"}},jr=class extends Error{constructor(e,t){super(`Cannot convert TypeID of type ${e} to type ${t}`),this.name="TypeIDConversionError"}};function qr(e="",t=""){if(!function(e){if(e.length>63)return!1;let t,i,n;for(i=0,n=e.length;i<n;i+=1){t=e.charCodeAt(i);let r=t>96&&t<123;if((0===i||i===n-1)&&!r||!r&&95!==t)return!1}return!0}(e))throw new Rr(e);let i;if(t)i=t;else{let e=new Uint8Array(16);Dr(void 0,e),i=Or(e)}if(26!==i.length)throw new Mr(i.length);if(i[0]>"7")throw new Lr(i[0]);return _r(i),""===e?i:`${e}_${i}`}function Gr(e){let t=e.lastIndexOf("_");return-1===t?"":e.substring(0,t)}function Fr(e){let t=e.lastIndexOf("_");return-1===t?e:e.substring(t+1)}var Br=class{constructor(e,t=""){this.prefix=e,this.suffix=t;let i=qr(e,t);this.prefix=Gr(i),this.suffix=Fr(i)}getType(){return this.prefix}getSuffix(){return this.suffix}asType(e){let t=this;if(t.prefix!==e)throw new jr(t.prefix,e);return t}toUUIDBytes(){return _r(this.suffix)}toUUID(){return function(e,t=0){var i=Ir(e,t);if(!function(e){return"string"==typeof e&&br.test(e)}(i))throw TypeError("Stringified UUID is invalid");return i}(this.toUUIDBytes())}toString(){return""===this.prefix?this.suffix:`${this.prefix}_${this.suffix}`}static fromString(e,t){let i=function(e,t){let i,n,r=e.lastIndexOf("_");if(-1===r)i="",n=e;else if(i=e.substring(0,r),n=e.substring(r+1),!i)throw new Ur(e);if(!n)throw new Mr(0);if(t&&i!==t)throw new Nr(t,i);return qr(i,n)}(e,t);return new Br(Gr(i),Fr(i))}static fromUUIDBytes(e,t){return new Br(e,Or(t))}static fromUUID(e,t){return new Br(e,Or(function(e){let t,i=new Uint8Array(16);return i[0]=(t=parseInt(e.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(e.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(e.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(e.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i}(t)))}};const zr={admission:"adm",anonymous:"anon",beneficiary:"ben",coupon:"cpn",couponCode:"cod",customer:"cus",event:"evt",eventCollaborator:"ecl",eventCollaboratorInvite:"evi",membership:"mem",order:"ord",orderItem:"itm",orderFee:"fee",permissionScope:"psc",permissionRole:"prl",permissionSnapshot:"pss",payout:"pyt",paymentDispute:"pds",webhookInboxEvent:"wih",payoutAdjustmentApplication:"paa",payoutAdjustment:"adj",platformFunding:"pfu",payoutTransfer:"xfr",promoter:"pmt",refund:"rfd",section:"sct",scan:"scn",team:"tem",teamMember:"mbr",teamInvite:"inv",teamGateway:"tgw",teamGatewayAccount:"tga",tenant:"tnt",ticket:"tkt",user:"usr",venue:"ven",location:"loc",request:"req",report:"rpt",walletDevice:"wdv",schedule:"sch",session:"ssn",trackingEvent:"tev",trackingStats:"sta",hllShard:"shr",timeline:"tln",notification:"ntf"};function Vr(e){return function(e="",t=""){return new Br(e,t)}(zr[e])}const Yr="ses_sid",Wr="ses_aid";function Zr(){return""+Vr("session")}function Hr(){return""+Vr("anonymous")}const Kr=Xn("Page Viewed.Screen Viewed.Products Searched.Product List Viewed.Product List Filtered.Promotion Viewed.Promotion Clicked.Product Clicked.Product Viewed.Product Added.Product Removed.Cart Viewed.Checkout Started.Checkout Step Viewed.Checkout Step Completed.Payment Info Entered.Order Completed.Order Updated.Order Refunded.Order Cancelled.Coupon Entered.Coupon Applied.Coupon Denied.Coupon Removed.Product Added to Wishlist.Product Removed from Wishlist.Wishlist Product Added to Cart.Product Shared.Cart Shared.Product Reviewed".split(".")),Jr=Kr.enum;function Qr(e){return Array.isArray(e)?e:null==e?[]:[e]}const Xr="orpc";var eo=class extends Error{constructor(...e){super(...e),this.name="AbortError"}};function to(e){let t;return()=>{if(t)return t.result;let i=e();return t={result:i},i}}function io(){return globalThis["__@orpc/shared@1.14.5/otel/config__"]}function no(e,t={},i){return(io()?.tracer)?.startSpan(e,t,i)}function ro(e,t,i={}){if(!e)return;let n=function(e){if(e instanceof Error){let t={message:e.message,name:e.name,stack:e.stack};return"code"in e&&("string"==typeof e.code||"number"==typeof e.code)&&(t.code=e.code),t}return{message:e+""}}(t);e.recordException(n),(!i.signal?.aborted||i.signal.reason!==t)&&e.setStatus({code:2,message:n.message})}async function oo({name:e,context:t,...i},n){let r=io()?.tracer;if(!r)return n();let o=async e=>{try{return await n(e)}catch(t){throw ro(e,t,i),t}finally{e.end()}};return t?r.startActiveSpan(e,i,t,o):r.startActiveSpan(e,i,o)}async function ao(e,t){let i=io();if(!e||!i)return t();let n=i.trace.setSpan(i.context.active(),e);return i.context.with(n,t)}function so(e){return!(!e||"object"!=typeof e)&&"next"in e&&"function"==typeof e.next&&Symbol.asyncIterator in e&&"function"==typeof e[Symbol.asyncIterator]}const co=Symbol.asyncDispose??Symbol.for("asyncDispose");var lo=class{#e=!1;#t=!1;#i;#n;constructor(e,t){this.#i=t,this.#n=function(e){let t=Promise.resolve();return(...i)=>t=t.catch((()=>{})).then((()=>e(...i)))}((async()=>{if(this.#e)return{done:!0,value:void 0};try{let t=await e();return t.done&&(this.#e=!0),t}catch(e){throw this.#e=!0,e}finally{this.#e&&!this.#t&&(this.#t=!0,await this.#i("next"))}}))}next(){return this.#n()}async return(e){return this.#e=!0,this.#t||(this.#t=!0,await this.#i("return")),{done:!0,value:e}}async throw(e){throw this.#e=!0,this.#t||(this.#t=!0,await this.#i("throw")),e}async[co](){this.#e=!0,this.#t||(this.#t=!0,await this.#i("dispose"))}[Symbol.asyncIterator](){return this}};function uo({name:e,...t},i){let n;return new lo((async()=>{n??=no(e);try{let e=await ao(n,(()=>i.next()));return n?.addEvent(e.done?"completed":"yielded"),e}catch(e){throw ro(n,e,t),e}}),(async e=>{try{"next"!==e&&await ao(n,(()=>i.return?.()))}catch(e){throw ro(n,e,t),e}finally{n?.end()}}))}function po(e,t,i){let n=(t,r)=>{let o=e[r];return o?o({...t,next:(e=t)=>n(e,r+1)}):i(t)};return n(t,0)}function mo(e){if(e)return JSON.parse(e)}function ho(e){return JSON.stringify(e)}function fo(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||!t||!t.constructor}function yo(e){return!!e&&("object"==typeof e||"function"==typeof e)}function vo(e,t){let i=e;for(let e of t){if(!yo(i))return;i=i[e]}return i}const go=(()=>{let e=function(){};return Object.freeze(e.prototype=Object.create(null)),e})();function bo(e,...t){return"function"==typeof e?e(...t):e}function $o(e){return new Proxy(e,{get(e,t,i){let n=Reflect.get(e,t,i);return"then"!==t||"function"!=typeof n?n:new Proxy(n,{apply(t,i,n){if(2!==n.length||n.some((e=>!function(e){return"function"==typeof e&&wo.test(""+e)}(e))))return Reflect.apply(t,i,n);let r=!0;n[0].call(i,$o(new Proxy(e,{get:(e,t,i)=>{if(!r||"then"!==t)return Reflect.get(e,t,i);r=!1}})))}})}})}const wo=/^\s*function\s*\(\)\s*\{\s*\[native code\]\s*\}\s*$/,Io={BAD_REQUEST:{status:400,message:"Bad Request"},UNAUTHORIZED:{status:401,message:"Unauthorized"},FORBIDDEN:{status:403,message:"Forbidden"},NOT_FOUND:{status:404,message:"Not Found"},METHOD_NOT_SUPPORTED:{status:405,message:"Method Not Supported"},NOT_ACCEPTABLE:{status:406,message:"Not Acceptable"},TIMEOUT:{status:408,message:"Request Timeout"},CONFLICT:{status:409,message:"Conflict"},PRECONDITION_FAILED:{status:412,message:"Precondition Failed"},PAYLOAD_TOO_LARGE:{status:413,message:"Payload Too Large"},UNSUPPORTED_MEDIA_TYPE:{status:415,message:"Unsupported Media Type"},UNPROCESSABLE_CONTENT:{status:422,message:"Unprocessable Content"},TOO_MANY_REQUESTS:{status:429,message:"Too Many Requests"},CLIENT_CLOSED_REQUEST:{status:499,message:"Client Closed Request"},INTERNAL_SERVER_ERROR:{status:500,message:"Internal Server Error"},NOT_IMPLEMENTED:{status:501,message:"Not Implemented"},BAD_GATEWAY:{status:502,message:"Bad Gateway"},SERVICE_UNAVAILABLE:{status:503,message:"Service Unavailable"},GATEWAY_TIMEOUT:{status:504,message:"Gateway Timeout"}};let Eo;var ko=class e extends Error{defined;code;status;data;static{let t=Symbol.for("__@orpc/client@1.14.5/error/ORPC_ERROR_CONSTRUCTORS__");globalThis[t]??=new WeakSet,Eo=globalThis[t],Eo.add(e)}constructor(e,...t){let i=function(e){return e[0]??{}}(t);if(void 0!==i.status&&!Ao(i.status))throw Error("[ORPCError] Invalid error status code.");let n=function(e,t){return t||Io[e]?.message||e}(e,i.message);super(n,i),this.code=e,this.status=function(e,t){return t??Io[e]?.status??500}(e,i.status),this.defined=i.defined??!1,this.data=i.data}toJSON(){return{defined:this.defined,code:this.code,status:this.status,message:this.message,data:this.data}}static[Symbol.hasInstance](e){if(Eo.has(this)){let t=function(e){return yo(e)?Object.getPrototypeOf(e)?.constructor:null}(e);if(t&&Eo.has(t))return!0}return super[Symbol.hasInstance](e)}};function To(e){return e instanceof ko?e:new ko("INTERNAL_SERVER_ERROR",{message:"Internal server error",cause:e})}function Ao(e){return e<200||e>=400}function xo(e){if(!fo(e))return!1;let t=["defined","code","status","message","data"];return!Object.keys(e).some((e=>!t.includes(e)))&&"defined"in e&&"boolean"==typeof e.defined&&"code"in e&&"string"==typeof e.code&&"status"in e&&"number"==typeof e.status&&Ao(e.status)&&"message"in e&&"string"==typeof e.message}function So(e,t={}){return new ko(e.code,{...t,...e})}var Do=class extends TypeError{},Co=class extends TypeError{},Po=class extends Error{data;constructor(e){super(e?.message??"An error event was received",e),this.data=e?.data}};function Oo(e){let t=e.replace(/\n+$/,"").split(/\n/),i={data:void 0,event:void 0,id:void 0,retry:void 0,comments:[]};for(let e of t){let t=e.indexOf(":"),n=-1===t?e:e.slice(0,t),r=-1===t?"":e.slice(t+1).replace(/^\s/,"");if(0===t)i.comments.push(r);else if("data"===n)i.data??="",i.data+=r+"\n";else if("event"===n)i.event=r;else if("id"===n)i.id=r;else if("retry"===n){let e=Number.parseInt(r);Number.isInteger(e)&&e>=0&&""+e===r&&(i.retry=e)}}return i.data=i.data?.replace(/\n$/,""),i}var _o=class{constructor(e={}){this.options=e}incomplete="";feed(e){this.incomplete+=e;let t=this.incomplete.lastIndexOf("\n\n");if(-1===t)return;let i=this.incomplete.slice(0,t).split(/\n\n/);this.incomplete=this.incomplete.slice(t+2);for(let e of i){let t=Oo(e+"\n\n");this.options.onEvent&&this.options.onEvent(t)}}end(){if(this.incomplete)throw new Co("Event Iterator ended before complete")}},Ro=class extends TransformStream{constructor(){let e;super({start(t){e=new _o({onEvent:e=>{t.enqueue(e)}})},transform(t){e.feed(t)},flush(){e.end()}})}};function No(e){if(e.includes("\n"))throw new Do("Event's id must not contain a newline character")}function Uo(e){if(!Number.isInteger(e)||e<0)throw new Do("Event's retry must be a integer and >= 0")}function Mo(e){if(e.includes("\n"))throw new Do("Event's comment must not contain a newline character")}function Lo(e){let t="";return t+=function(e){let t="";for(let i of e??[])Mo(i),t+=`: ${i}\n`;return t}(e.comments),void 0!==e.event&&(function(e){if(e.includes("\n"))throw new Do("Event's event must not contain a newline character")}(e.event),t+=`event: ${e.event}\n`),void 0!==e.retry&&(Uo(e.retry),t+=`retry: ${e.retry}\n`),void 0!==e.id&&(No(e.id),t+=`id: ${e.id}\n`),t+=function(e){let t=e?.split(/\n/)??[],i="";for(let e of t)i+=`data: ${e}\n`;return i}(e.data),t+="\n",t}const jo=Symbol("ORPC_EVENT_SOURCE_META");function qo(e,t){if(void 0===t.id&&void 0===t.retry&&!t.comments?.length)return e;if(void 0!==t.id&&No(t.id),void 0!==t.retry&&Uo(t.retry),void 0!==t.comments)for(let e of t.comments)Mo(e);return new Proxy(e,{get:(e,i,n)=>i===jo?t:Reflect.get(e,i,n)})}function Go(e){return yo(e)?Reflect.get(e,jo):void 0}function Fo(e,t){let i={...e};for(let e in t)Array.isArray(t[e])?i[e]=[...Qr(i[e]),...t[e]]:void 0!==t[e]&&(i[e]=Array.isArray(i[e])?[...i[e],t[e]]:void 0===i[e]?t[e]:[i[e],t[e]]);return i}function Bo(e,t){let i=async e=>{let i=await t.error(e);if(i!==e){let t=Go(e);t&&yo(i)&&(i=qo(i,t))}return i};return new lo((async()=>{let{done:n,value:r}=await(async()=>{try{return await e.next()}catch(e){throw await i(e)}})(),o=await t.value(r,n);if(o!==r){let e=Go(r);e&&yo(o)&&(o=qo(o,e))}return{done:n,value:o}}),(async()=>{try{await(e.return?.())}catch(e){throw await i(e)}}))}function zo(e,t={}){let i=t.path??[];return $o(new Proxy((async(...[t,n={}])=>await e.call(i,t,function(e){return{...e,context:e.context??{}}}(n))),{get:(t,n)=>"string"==typeof n?zo(e,{path:[...i,n]}):Reflect.get(t,n)}))}function Vo(e,t){return{...e,...t}}var Yo=class{"~orpc";constructor(e){if(e.route?.successStatus&&Ao(e.route.successStatus))throw Error("[ContractProcedure] Invalid successStatus.");if(Object.values(e.errorMap).some((e=>e&&e.status&&!Ao(e.status))))throw Error("[ContractProcedure] Invalid error status code.");this["~orpc"]=e}};function Wo(e){return e instanceof Yo||("object"==typeof e||"function"==typeof e)&&null!==e&&"~orpc"in e&&"object"==typeof e["~orpc"]&&null!==e["~orpc"]&&"errorMap"in e["~orpc"]&&"route"in e["~orpc"]&&"meta"in e["~orpc"]}function Zo(e,t){return{...e,...t}}function Ho(e,t){return{...e,...t}}function Ko(e,t){return e?`${e}${t}`:t}function Jo(e,t){return e?[...e,...t]:t}function Qo(e,t){let i=e;return t.prefix&&(i=function(e,t){return e.path?{...e,path:`${t}${e.path}`}:e}(i,t.prefix)),t.tags?.length&&(i=function(e,t){return{...e,tags:[...t,...e.tags??[]]}}(i,t.tags)),i}function Xo(e,t){if(Wo(e))return new Yo({...e["~orpc"],errorMap:Vo(t.errorMap,e["~orpc"].errorMap),route:Qo(e["~orpc"].route,t)});if("object"!=typeof e||!e)return e;let i={};for(let n in e)i[n]=Xo(e[n],t);return i}const ea=new class e extends Yo{constructor(e){super(e),this["~orpc"].prefix=e.prefix,this["~orpc"].tags=e.tags}$meta(t){return new e({...this["~orpc"],meta:t})}$route(t){return new e({...this["~orpc"],route:t})}$input(t){return new e({...this["~orpc"],inputSchema:t})}errors(t){return new e({...this["~orpc"],errorMap:Vo(this["~orpc"].errorMap,t)})}meta(t){return new e({...this["~orpc"],meta:Zo(this["~orpc"].meta,t)})}route(t){return new e({...this["~orpc"],route:Ho(this["~orpc"].route,t)})}input(t){return new e({...this["~orpc"],inputSchema:t})}output(t){return new e({...this["~orpc"],outputSchema:t})}prefix(t){return new e({...this["~orpc"],prefix:Ko(this["~orpc"].prefix,t)})}tag(...t){return new e({...this["~orpc"],tags:Jo(this["~orpc"].tags,t)})}router(e){return Xo(e,this["~orpc"])}}({errorMap:{},route:{},meta:{}}),ta={defaultMethod:"POST",defaultSuccessStatus:200,defaultSuccessDescription:"OK",defaultInputStructure:"compact",defaultOutputStructure:"compact"};function ia(e,t){return void 0===t?ta[e]:t}const na=Symbol.for("constructDateFrom");function ra(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&na in e?e[na](t):e instanceof Date?new e.constructor(t):new Date(t)}function oa(e,t){let i=function(e){return ra(e,e)}(e);return isNaN(t)?ra(e,NaN):(t&&i.setDate(i.getDate()+t),i)}const aa={},sa={};function da(e,t){try{let i=(aa[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return i in sa?sa[i]:la(i,i.split(":"))}catch{if(e in sa)return sa[e];let t=e?.match(ca);return t?la(e,t.slice(1)):NaN}}const ca=/([+-]\d\d):?(\d\d)?/;function la(e,t){let i=+(t[0]||0),n=+(t[1]||0),r=(t[2]||0)/60;return sa[e]=60*i+n>0?60*i+n+r:60*i-n-r}var ua=class e extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(da(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),ha(this,e)):this.setTime(Date.now())}static tz(t,...i){return i.length?new e(...i,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-da(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),ma(this),+this}[Symbol.for("constructDateFrom")](t){return new e(+new Date(t),this.timeZone)}};const pa=/^(get|set)(?!UTC)/;function ma(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-da(e.timeZone,e)))}function ha(e,t){let i=Array.isArray(t)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(t):+e.internal,n=da(e.timeZone,e),r=n>0?Math.floor(n):Math.ceil(n),o=new Date(+e);o.setUTCHours(o.getUTCHours()-1);let a=-new Date(+e).getTimezoneOffset(),s=-new Date(+o).getTimezoneOffset(),d=a;if(a-s&&a!==r&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),i=a-r;i&&t.setUTCMinutes(t.getUTCMinutes()+i);let n=da(e.timeZone,t);(n>0?Math.floor(n):Math.ceil(n))===r&&(d=s)}let c=d-r;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);let l=new Date(+e);l.setUTCSeconds(0);let u=a>0?l.getSeconds():(l.getSeconds()-60)%60,p=Math.round(-60*da(e.timeZone,e))%60;(p||u)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+u);let m=da(e.timeZone,e),h=m>0?Math.floor(m):Math.ceil(m),f=h!==r,y=-new Date(+e).getTimezoneOffset()-h-c,v=h-r,g=i-60*h*1e3,b=v>0&&fa(e)-i==60*v*1e3&&fa(e,g)!==i;if(f&&y&&!b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);let t=da(e.timeZone,e),i=h-(t>0?Math.floor(t):Math.ceil(t));i&&y<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+i)}ma(e);let $=(t?i:i+1e3*p)-+e.internal;$&&Math.abs($)<18e5&&(Date.prototype.setTime.call(e,+e+$),ma(e))}function fa(e,t){let i=new Date(t??+e);return i.setUTCSeconds(i.getUTCSeconds()-Math.round(60*-da(e.timeZone,i))),+i}function ya(e){return("string"==typeof e?new Date(e):e).toISOString().replace(/\.\d{3}Z$/,"")}let va;Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!pa.test(e))return;let t=e.replace(pa,"$1UTC");ua.prototype[t]&&(e.startsWith("get")?ua.prototype[e]=function(){return this.internal[t]()}:(ua.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),ha(e)}(this),+this},ua.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ma(this),+this}))})),function(e){e.signature="a1B2c3D4e5F6g7H8";let t=e.Tenant={id:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",oldId:"none",name:"Session Services",slug:"session-services",email:"hello@session.services",adminTeamId:"tem_01jqpjksnsen9vprw95et60t3m",defaultCurrency:"AUD",smsSenderId:"SESSIONS",baseUrl:{dev:"http://localhost:3000",production:"https://app.session.services"},logo:{icon:{src:"https://assets.session.services/icon-bg.png",width:29,height:29},email:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},website:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},qr:{src:"https://assets.session.services/tenants/session-services/qr.svg"}},favicon:"https://assets.session.services/tenants/session-services/favicon.svg"};e.Region={country:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf2",name:"Australia",slug:"australia",kind:"COUNTRY",order:1},state:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf3",name:"New South Wales",slug:"nsw",kind:"STATE",parentId:"rgn_01jqpj2t2kfvmstt6f6tzkbaf2",order:2},city:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf4",name:"Sydney",slug:"sydney",kind:"CITY",parentId:"rgn_01jqpj2t2kfvmstt6f6tzkbaf3",latitude:-33.8688,longitude:151.2093,radius:25,order:3}};let i=e.User={id:"usr_01jps5cgsd4tzjghtnt45qnhn0",email:"test@session.services",firstName:"Jay",lastName:"McMullen",imageUrl:void 0,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),tenantId:t.id,deleted:!1};e.EmailVerification={id:"emlvrf_01jps5cgsd4tzjghtnt45qnhn0",userId:"usr_01jps5cgsd4tzjghtnt45qnhn0",tenantId:t.id,email:"test@session.services",code:"123456",expiresAt:new Date(Date.now()+18e5).toISOString(),createdAt:(new Date).toISOString()},e.PasswordReset={id:"pwrst_01jps5cgsd4tzjghtnt45qnhn0",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",userId:"usr_01jps5cgsd4tzjghtnt45qnhn0",tenantId:t.id,email:"test@session.services",code:"123456",expiresAt:new Date(Date.now()+9e5).toISOString(),emailVerified:!1,twoFactorVerified:!1,createdAt:(new Date).toISOString()};let n=e.Team={id:"tem_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Session Services",slug:"session-services",description:"This is only a test...",type:"PROMOTER",approval:"APPROVED",tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",deleted:!1},r=e.Promoter={id:"pmt_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,name:"Session Services",slug:"session-services",description:"This is only a test...",payoutFrequency:"AFTER_EVENT",image:{src:"https://assets.session.services/icon-bg.png",alt:"Session Services Logo",width:800,height:800},approval:"APPROVED",geohash:"r3gx1",location:{id:"loc_01jqpjksnsen9vprw95et60t4m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sydney",address:"Sydney NSW 2000, Australia",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney"},tracking:{fbId:"485739562847563",gaId:"G-PSW1MY7HB4",tikTokId:"BQCKPH3RC77U8GPMLJ5G"},tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",deleted:!1};e.Venue={id:"ven_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,locationId:"loc_01jqpjksnsen9vprw95et60t3m",approval:"APPROVED",name:"Sydney Opera House",slug:"sydney-opera-house",description:"Iconic performing arts venue in Sydney, Australia",type:"THEATER",logo:{src:"https://assets.session.services/venues/sydney-opera-house.png",alt:"Sydney Opera House",width:800,height:800},images:[{src:"https://assets.session.services/venues/sydney-opera-house-1.jpg",alt:"Sydney Opera House exterior",width:1920,height:1080}],contact:{email:"info@sydneyoperahouse.com",phone:"+61 2 9250 7111",website:"https://www.sydneyoperahouse.com",instagram:"https://instagram.com/sydneyoperahouse",facebook:"https://facebook.com/sydneyoperahouse",twitter:"https://twitter.com/sydneyoperahouse"},location:{id:"loc_01jqpjksnsen9vprw95et60t3m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sydney Opera House",address:"Bennelong Point, Sydney NSW 2000",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8567844,longitude:151.2152967,timeZone:"Australia/Sydney",image:{src:"https://assets.session.services/locations/sydney-opera-house.jpg",alt:"Sydney Opera House",width:1200,height:800}},geohash:"r3gx2f9",capacity:5738,tenantId:t.id,deleted:!1};let o=e.PromoterMember={id:"mbr_01jps5cgsec5ge0b1bxa6gzkkk",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,userId:i.id,user:{id:i.id,email:i.email,firstName:i.firstName,lastName:i.lastName,imageUrl:i.imageUrl},permissions:["*"],isOwner:!0,tenantId:t.id};e.TeamMember={id:"mbr_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,userId:i.id,user:{id:i.id,email:i.email,firstName:i.firstName,lastName:i.lastName,imageUrl:i.imageUrl},permissions:["*"],isOwner:!0,tenantId:t.id},e.TeamInvite={id:"inv_01jqpjksnsen9vprw95et60t4m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),expiresAt:Math.floor(oa(new Date,7).getTime()/1e3),teamId:n.id,token:"a76e3c5d7109345b58e383e6d90f7728b75f9a38b727f0b9edd5b977e8c3b5d0",email:"team-invite@session.services",invitedBy:i.id,permissions:["event.write","order.write"],tenantId:t.id},e.CurrentSession={user:i,initials:"JM",isTenantAdmin:!0,promoters:[{...r,member:o}]},e.Session={id:"sess_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,expiresAt:oa(new Date,30).toISOString(),twoFactorVerified:!1,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.BackupCode={id:"bkc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,code:"ABC123DEF456",used:!1,createdAt:(new Date).toISOString()},e.UserSession={id:"uss_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,ipAddress:"192.168.1.100",userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",location:"Sydney, Australia",isCurrent:!0,expiresAt:oa(new Date,30).toISOString(),createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.PasskeyCredential={id:"pkc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,name:"iPhone Touch ID",credentialId:"cred_01jps5cgsd4tzjghtnt45qnhn0",credentialPublicKey:"pQECAyYgASFYIM...",credentialBackupEligible:!0,credentialBackupState:!1,credentialDeviceType:"singleDevice",counter:1,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.SecurityKeyCredential={id:"skc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,name:"YubiKey 5 NFC",credentialId:"cred_01jps5cgsd4tzjghtnt45qnhn0",credentialPublicKey:"pQECAyYgASFYIM...",credentialBackupEligible:!1,credentialBackupState:!1,credentialDeviceType:"crossPlatform",counter:5,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.TOTPCredential={id:"tpc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,secret:"JBSWY3DPEHPK3PXP",verified:!0,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()};let a=e.Location={id:"loc_01hk153x00eh99pagyydz03sbz",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),googlePlaceId:"ChIJ6zWCPUyxEmsRmc6BPrNaP4s",name:"Watson's EQ",address:"The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",city:"Moore Park",state:"New South Wales",postcode:"2021",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney",types:["establishment","point_of_interest","restaurant","bar"],image:{src:"https://assets.session.services/locations/watsons-eq.jpg",alt:"Watson's EQ",width:1200,height:800}};e.CarouselLocation={id:"loc_01hk153x00efq9ygdkc9eb3rjt",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),googlePlaceId:"ChIJc8-zlGSvEmsR0rbZWpCP6z0",name:"Carousel Bar & Ballroom",address:"169 Oxford St, Darlinghurst NSW 2010, Australia",city:"Darlinghurst",state:"New South Wales",postcode:"2010",country:"Australia",latitude:-33.8803603,longitude:151.2161228,timeZone:"Australia/Sydney",types:["establishment","night_club","point_of_interest"],image:{src:"https://assets.session.services/locations/loc_01hk153x00efq9ygdkc9eb3rjt.jpg",alt:"Carousel Bar & Ballroom",width:1200,height:800}};let s=e.Event={id:"evt_01jps5cgsenjrazw6wswmyspa3",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Test Event",slug:"test-event",description:"This is only a test...",approval:"APPROVED",status:"UPCOMING",visibility:"PUBLIC",currency:"AUD",entryStartsAt:ya(oa(new Date,1)),entryEndsAt:ya(oa(new Date,2)),publishAt:ya(new Date),images:{mobile:{src:"https://assets.session.services/event-mobile.jpg",alt:"Mobile Event Image",width:1080,height:1350},desktop:{src:"https://assets.session.services/event-desktop.jpg",alt:"Desktop Event Image",width:1920,height:1080}},geohash:"r3gx1",location:a,teamId:n.id,promoterId:r.id,tenantId:t.id,deleted:!1},d=e.Section={id:"sct_01jps5cgse0g3qj16kpq8t221r",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,promoterId:r.id,eventId:s.id,eventSlug:s.slug,name:"General Admission",capacity:1e3,limit:-1,available:700,sold:200,reserved:100,order:0,visibility:"ALWAYS",location:a,passcode:void 0,tenantId:t.id,deleted:!1,orderPadded:"0000000000"},c=e.Admission={id:"adm_01jps5cgsee0xvapbk92e8eb4g",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),sectionId:d.id,teamId:n.id,promoterId:r.id,eventId:s.id,eventSlug:s.slug,name:"Final Release",subtitle:"Entry before 10pm",description:"Early bird pricing with priority entry. Must present valid ID at gate.",capacity:1e5,limit:-1,available:7e4,sold:2e4,reserved:1e4,order:0,entryStartsAt:ya(oa(new Date,1)),entryEndsAt:ya(oa(new Date,2)),saleStartsAt:ya(new Date),saleEndsAt:ya(oa(new Date,2)),saleEndsBehavior:"SALE_ENDED",price:{base:1e3,booking:200,currency:"AUD"},visibility:"ALWAYS",passcode:void 0,tenantId:t.id,deleted:!1,orderPadded:"0000000000"};e.DetailedEvent={...s,admissions:[c],sections:[d]};let l=e.Beneficiary={id:"ben_01jps5cgse5n6mg1ymkew9tsfh",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"My Bank Account",currency:"AUD",gatewayId:"7489cb17-24c5-4acf-a0cf-d93ed38081fe",gateway:"AIRWALLEX",teamId:n.id,teamIds:[n.id],venueIds:[],tenantId:t.id};e.AirwallexBeneficiary={transfer_methods:["LOCAL"],beneficiary:{additional_info:{personal_email:"test@session.services"},address:{city:"Sydney",country_code:"AU",postcode:"2000",state:"AU-NSW",street_address:"123 George Street"},bank_details:{account_currency:"AUD",account_name:"John Doe",account_number:"999994",account_routing_type1:"bsb",account_routing_value1:"062004",bank_country_code:"AU",local_clearing_system:"BANK_TRANSFER"},entity_type:"PERSONAL",company_name:"Doe Enterprises Pty Ltd",first_name:"John",last_name:"Doe"}};let u=e.Coupon={id:"cpn_01jps5cgsfzs1ksqaet5hba8ac",couponId:"cpn_01jps5cgsfzs1ksqaet5hba8ac",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Half Price",active:!0,kind:"PERCENT",filter:"TEAM",currency:"AUD",discount:50,uses:0,limit:-1,saleStartsAt:"2025-02-10T03:00:00",saleEndsAt:void 0,deletedAt:void 0,teamId:n.id,tenantId:t.id,deleted:!1},p=e.CouponCode={id:"cod_01jps5cgsfzftw7hxcvr2wftk2",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"TEST50",uses:0,tenantId:t.id,couponId:u.id,teamId:n.id,deleted:!1},m=e.AmountCoupon={id:"cpn_01jps5cgsfndn8jcsfvh72x811",couponId:"cpn_01jps5cgsfndn8jcsfvh72x811",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Half Price",active:!0,kind:"PERCENT",filter:"EVENTS",currency:"AUD",eventIds:[s.id],discount:50,uses:0,limit:-1,saleStartsAt:"2025-02-10T03:00:00",saleEndsAt:void 0,deletedAt:void 0,teamId:n.id,tenantId:t.id};e.AmountCouponCode={id:"cod_01jps5cgsfq06xvvhg0hn2rdzd",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"TEST5DOLLAR",uses:0,tenantId:t.id,couponId:m.id,teamId:n.id};let h=e.Customer={id:"cus_01jps5cgsf4pn2a32eamppnap1",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),firstName:"Test",lastName:"User",email:"test@session.services",phone:"+61411111111",tenantId:t.id},f=e.PayoutTransfer={id:"xfr_01jq8s6c38f97w9yfrfcdhf47v",createdAt:(new Date).toISOString(),kind:"TICKETS",amount:1e3,currency:"AUD",fee:0,feeCurrency:"AUD",reference:"XYZ",gateway:"AIRWALLEX",gatewayId:"fe33fb0f-d9d8-47cd-8eef-6a19bd6223eb",beneficiary:l.name,beneficiaryId:l.id};e.PayoutDeduction={id:"pdn_01jq8s6c38f97w9yfrfcdhf47v",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),amount:-1e3,currency:"AUD",description:"Legacy payout deduction",gateway:"AIRWALLEX",gatewayId:"fe33fb0f-d9d8-47cd-8eef-6a19bd6223eb",beneficiary:l.name,beneficiaryId:l.id};let y=e.Payout={id:"pyt_01jps5cgsfv2wre6hd0rc4w4t8",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),paidAt:(new Date).toISOString(),status:"PAID",method:"AIRWALLEX",structure:"DEFAULT",approval:"PENDING",frequency:"AFTER_EVENT",transfers:[f],event:{id:s.id,name:s.name,slug:s.slug,location:s.location.name},price:{net:1e3,total:1e3,gross:1e3,base:1e3,booking:0,refunded:0,discount:0,gateway:0,dispute:0,deductions:0,shipping:0,sms:0,currency:"AUD"},eventId:s.id,teamId:n.id,promoterId:r.id,promoterSlug:r.slug,tenantId:t.id},v=e.OrderItem={id:"itm_01jps5cgsfwyxj0516571eaf17",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),orderId:"ord_01jps5cgsfgve5b5g2666kyryh",kind:"ADMISSION",quantity:2,admissionId:c.id,sectionId:d.id,price:{net:c.price.base+c.price.booking,total:c.price.base+c.price.booking,gross:c.price.base+c.price.booking,base:c.price.base,booking:c.price.booking,refunded:0,discount:0,currency:c.price.currency}};e.OrderFee={id:"fee_01jps5cgsgamykd6kh2t738qkh",createdAt:(new Date).toISOString(),reason:"Gateway Fee",amount:-30,currency:"AUD",requestId:"att_sgpdz4v2ph1axmdmdx8_m8w6qv"};let g=e.OrderOffer={kind:"SMS_DELIVERY",label:"SMS ticket delivery",price:{amount:200,currency:"AUD"}},b=e.Order={id:"ord_01jps5cgsfgve5b5g2666kyryh",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),reservedAt:(new Date).toISOString(),status:"PENDING",price:{net:500,total:1400,gross:2200,base:1e3,booking:400,discount:-1e3,refunded:-700,gateway:0,dispute:0,shipping:0,sms:200,currency:"AUD"},code:{id:p.id,name:p.name},event:{id:s.id,name:s.name,slug:s.slug},fees:[],items:[v],customer:va.Customer,customerId:va.Customer.id,teamId:va.Team.id,promoterId:va.Promoter.id,promoterSlug:va.Promoter.slug,eventId:va.Event.id,eventSlug:va.Event.slug,payment:{method:"AIRWALLEX",source:"CARD"},payoutIds:[y.id],refunds:[],offers:[g],tenantId:va.Tenant.id,checkoutUrl:t.baseUrl.dev+"/checkout/ord_01jps5cgsfgve5b5g2666kyryh",signature:"Q2hXbG9uZ1NpZzE2"},$=e.TicketScan={id:"scn_01jq4rjmtzyzgtsavn9f34mxan",scannedAt:(new Date).toISOString(),scannedBy:{id:i.id,firstName:i.firstName,lastName:i.lastName,email:i.email},scannedById:i.id,deviceId:"dev_01jq4rjvrgar43zwvyakbje22m",kind:"CHECK_IN"};e.OrderRefund={id:"rfd_01jps5cgsfgve5b5g2666kyryh",request:{idempotencyKey:"refund_12345_customer_request"},status:"SUCCEEDED",acceptedAt:(new Date).toISOString(),failedAt:(new Date).toISOString(),price:{currency:"AUD",total:1200,items:1200,shipping:0,fees:0},reason:"CUSTOMER_REQUEST",note:"Customer requested refund due to schedule conflict",tickets:{cancelRequested:!0,cancelled:!0,cancelledCount:2},gateway:{provider:"STRIPE",refundId:"re_1234567890abcdef",idempotencyKey:"rfd_01jps5cgsfgve5b5g2666kyryh"},actor:{type:"USER",userId:i.id},notification:{requested:!0,sentAt:(new Date).toISOString()},createdAt:(new Date).toISOString()},e.OrderRefundItem={orderItemId:v.id,quantity:2,amount:1200,ticketIds:["tkt_01jps5cgsg0s32w2pr73vbccde"]},e.Notification={id:"ntf_01jps5cgsfgve5b5g2666kyryh",aggregateType:"ORDER",aggregateId:b.id,eventId:s.id,kind:"ORDER_CONFIRMATION",channel:"EMAIL",status:"DELIVERED",providerMessageId:"msg_abc123def456",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),sentAt:(new Date).toISOString(),deliveredAt:(new Date).toISOString(),failedAt:(new Date).toISOString(),failureCode:"BOUNCE",failureReason:"Mailbox unavailable",tenantId:t.id},e.Timeline={id:"tln_01jps5cgsfgve5b5g2666kyryh"},e.SmsOrder={id:"ord_01k74g0tbwfvnb7b0e2esms001"},e.Ticket={id:"tkt_01jps5cgsg0s32w2pr73vbccde",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),status:"REDEEMED",scans:[$],token:"7b81e13025f78f9935d5933eec3ab25e3c2bb811c99f2470182dd6ba4394ff82",attendee:{email:h.email,firstName:h.firstName,lastName:h.lastName},event:{id:s.id,name:s.name,slug:s.slug,location:s.location,entryStartsAt:s.entryStartsAt,entryEndsAt:s.entryEndsAt,images:s.images},admission:{id:c.id,name:c.name,price:c.price,entryStartsAt:c.entryStartsAt,entryEndsAt:c.entryEndsAt},eventId:s.id,admissionId:c.id,customerId:h.id,orderId:b.id,orderItemId:v.id,teamId:n.id,promoterId:r.id,promoterSlug:r.slug,tenantId:t.id}}(va||={});const ga=["ALWAYS","HIDDEN","AFTER_ADMISSION"];function ba(e){return function(e,t){return new wn({type:"number",coerce:!0,checks:[],...C(t)})}(0,e)}function $a(e){return function(e,t){return new Tn({type:"boolean",coerce:!0,...C(t)})}(0,e)}const wa=Xn(["PENDING","APPROVED","REJECTED"]).meta({description:"Approval status. PENDING: awaiting review, APPROVED: approved for operation, REJECTED: rejected and cannot operate"}),Ia=Xn("AED.ALL.AMD.ANG.AOA.ARS.AUD.AWG.AZN.BAM.BBD.BDT.BGN.BHD.BIF.BMD.BND.BOB.BRL.BSD.BTN.BWP.BZD.CAD.CHF.CLP.CNY.COP.CRC.CVE.CZK.DJF.DKK.DOP.DZD.EGP.ERN.ETB.EUR.FJD.FKP.GBP.GEL.GHS.GIP.GMD.GNF.GTQ.GYD.HKD.HNL.HUF.IDR.ILS.INR.ISK.JMD.JOD.JPY.KES.KGS.KHR.KMF.KRW.KWD.KYD.KZT.LAK.LBP.LKR.LRD.LSL.LYD.MAD.MDL.MGA.MKD.MNT.MOP.MUR.MVR.MWK.MXN.MYR.NAD.NGN.NIO.NOK.NPR.NZD.OMR.PAB.PEN.PGK.PHP.PKR.PLN.PYG.QAR.RON.RSD.RWF.SAR.SBD.SCR.SEK.SGD.SHP.SLE.SRD.SVC.SZL.THB.TJS.TMT.TND.TOP.TRY.TTD.TWD.TZS.UAH.UGX.USD.UYU.UZS.VND.VUV.WST.XAF.XCD.XOF.XPF.ZAR.ZMW.ZWL".split(".")).meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code for transactions and payouts"}),Ea=Xn([{category:"Day Party",group:"Event Type",priority:"core",notes:'Daytime or afternoon-focused event, often starting before evening and ending earlier than club nights; common signals include "day party", "day sesh", "Sunday session", "afternoon", "sunset", "courtyard", "rooftop", "poolside" or "open air".'},{category:"Festival",group:"Event Type",priority:"core",notes:'Large-scale event with multiple artists, stages, areas, brands or sessions; may run all day, across multiple days, or as a major ticketed programme; match terms like "festival", "lineup", "multi-stage", "weekender", "one-day festival" or "camping".'},{category:"Club Night",group:"Event Type",priority:"core",notes:'DJ-led nightclub or club-room event, usually late-night and dancefloor-focused; match "club night", "nightclub", "club room", "resident DJ", "guest DJ", "DJ sets", "all night" or explicitly club-focused programming. Do not use for every electronic event or DJ set without a club/nightclub context.'},{category:"Concert",group:"Event Type",priority:"high",notes:'Headline live music event in a concert, gig, theatre, arena or show format; match "concert", "gig", "headline show", "live show", "tour date", "arena", "theatre" or "standing room". Use alongside "Live Performance" when live performers are explicit.'},{category:"Listening Party",group:"Event Type",priority:"medium",notes:'Playback, album launch or listening-focused event centred on hearing recorded music together; match "listening party", "album playback", "record launch", "listening session", "label preview" or "listening bar".'},{category:"Workshop",group:"Event Type",priority:"medium",notes:'Educational, participatory or skills-focused event; match "workshop", "masterclass", "clinic", "class", "seminar", "producer workshop", "DJ workshop" or "hands-on session".'},{category:"Afterparty",group:"Event Type",priority:"high",notes:'Post-main-event continuation, usually late-night or early-morning, often tied to a festival, concert, gig, show, launch or headline act; match "official afterparty", "after party", "kick-ons", "continue the night" or "late-night session".'},{category:"Boat Party",group:"Event Type",priority:"high",notes:'Event held on a boat, yacht, harbour cruise or floating venue; strong signals include "boat party", "cruise", "harbour", "on the water", "boarding time", "sailing", "wharf", "dock" or "yacht".'},{category:"Pool Party",group:"Event Type",priority:"high",notes:'Party centred around a pool, resort, hotel or swim-friendly venue; usually daytime or summer-focused; match "pool party", "poolside", "swimwear", "cabana", "resort", "hotel pool", "daybed" or "summer session".'},{category:"Live Performance",group:"Event Type",priority:"high",notes:'Event includes live acts, bands, vocalists, instrumentalists or live electronic performance rather than only DJ sets; match "live", "live set", "performing live", "band", "vocalist", "singer", "instrumental", "live show" or "concert".'},{category:"Warehouse",group:"Venue Type",priority:"core",notes:'Industrial, raw or repurposed warehouse-style venue; often underground, large-room, concrete, late-night or rave-oriented; match "warehouse", "industrial space", "secret warehouse", "inner west warehouse", "factory", "converted space" or "underground location".'},{category:"Nightclub",group:"Venue Type",priority:"core",notes:'Purpose-built nightlife or dance venue, club room or nightclub setting; match "nightclub", "night club", "club room", "dance club" or venues explicitly described as clubs. This describes the venue, not the event programme.'},{category:"Bar",group:"Venue Type",priority:"core",notes:'Event held at a bar, pub, tavern or cocktail bar; match "bar", "pub", "tavern", "cocktail bar", "wine bar" or "hotel bar". Do not use for every venue with a bar service.'},{category:"Open Air",group:"Venue Type",priority:"core",notes:'Outdoor event in an uncovered or partly outdoor setting; match "open air", "outdoor", "under the sky", "courtyard", "garden", "terrace", "park", "field", "amphitheatre" or "sunset session".'},{category:"Arena",group:"Venue Type",priority:"high",notes:'Large indoor arena, stadium or major venue built for high-capacity concerts, sports or touring shows; match "arena", "stadium", "entertainment centre", "exhibition centre" or "convention centre".'},{category:"Rooftop",group:"Venue Type",priority:"high",notes:'Event held on a rooftop, terrace or elevated city-view venue; often summer, sunset, cocktail or skyline-focused; match "rooftop", "terrace", "skyline", "city views", "above the city", "sunset rooftop" or "open-air rooftop".'},{category:"Beach Party",group:"Venue Type",priority:"high",notes:'Coastal, beachfront or seaside event; may be on the sand, near the beach, at a beach club or coastal venue; match "beach party", "beachfront", "seaside", "coastal", "on the sand", "ocean views" or "beach club".'},{category:"Secret Location",group:"Venue Type",priority:"high",notes:'Venue is hidden, TBA, revealed later or sent only to ticket holders; common in underground, warehouse and rave events; match "secret location", "TBA", "location revealed", "address released", "SMS location" or "ticket holders only".'},{category:"DIY",group:"Venue Type",priority:"medium",notes:'Independent, self-organised or non-traditional event, often in unconventional spaces, bush settings or community-run venues; match "DIY", "bush doof", "renegade", "self-organised", "community-run", "off-grid" or "independent party".'},{category:"Basement",group:"Venue Type",priority:"medium",notes:'Small, low-ceiling, underground or downstairs venue; usually intimate, dark, club-focused or late-night; match "basement", "cellar", "downstairs", "underground room", "low ceiling" or "intimate club room".'},{category:"Free Entry",group:"Entry",priority:"core",notes:'No ticket or cover charge required to attend; match "free entry", "free event", "no cover", "free before", "RSVP free", "complimentary entry" or "walk-ins welcome". Do not confuse with free RSVP if paid entry may still apply.'},{category:"Donation",group:"Entry",priority:"medium",notes:'Entry is by donation, pay-what-you-can or voluntary contribution rather than a fixed ticket price; match "donation", "pay what you want", "PWYW", "suggested donation", "gold coin" or "contribute at the door".'},{category:"Vinyl Only",group:"Music",priority:"high",notes:'DJs perform using vinyl records only, usually signalling collector, selector, audiophile or purist culture; match "vinyl only", "all vinyl", "records only", "turntables", "wax", "crate diggers" or "strictly vinyl".'},{category:"Silent Disco",group:"Music",priority:"medium",notes:'Attendees listen through wireless headphones rather than a traditional speaker system; often multiple channels or DJs; match "silent disco", "headphone party", "wireless headphones", "choose your channel" or "multi-channel headphones".'},{category:"Underground",group:"Vibe",priority:"high",notes:'Non-mainstream, independent or subcultural event with raw, niche, alternative or anti-commercial positioning; match "underground", "leftfield", "subculture", "no frills", "raw", "for the heads", "heads only" or "off the beaten path".'},{category:"Intimate",group:"Vibe",priority:"high",notes:'Small-capacity, close-quarters or personal event; often limited tickets, small room, listening bar or community feel; match "intimate", "limited capacity", "small room", "close and personal", "cosy", "private" or "exclusive".'},{category:"Queer Friendly",group:"Vibe",priority:"high",notes:'Event explicitly welcomes, centres or is safe for LGBTQI+ communities; match "queer", "LGBTQI+", "LGBTQIA+", "gay", "trans inclusive", "rainbow community", "queer-friendly" or "queer party". Use when identity/community focus is explicit.'},{category:"FLINTA",group:"Vibe",priority:"high",notes:'Event explicitly centres or welcomes women, lesbians, intersex, non-binary, trans and agender people; match "FLINTA", "FLINTA*", "women and gender diverse", "trans and non-binary", "femme-led" or "gender-diverse community".'},{category:"Safe Space",group:"Vibe",priority:"high",notes:'Event emphasises inclusion, consent, harm minimisation, anti-harassment or community safety policies; match "safe space", "safer space", "consent policy", "zero tolerance", "harm reduction", "inclusive space" or "respectful dancefloor".'},{category:"No Photos",group:"Vibe",priority:"medium",notes:'Event discourages or bans photography/video to protect privacy, immersion or dancefloor culture; match "no photos", "no filming", "no cameras", "phone stickers", "camera policy", "be present" or "respect the dancefloor".'},{category:"Rave",group:"Vibe",priority:"high",notes:'High-energy dance event rooted in rave culture; often late-night, warehouse, underground, fast, heavy or euphoric; match "rave", "all-night", "warehouse rave", "doof", "hard dance", "strobe", "lasers" or "rave culture".'},{category:"BYO",group:"Amenities",priority:"core",notes:'Attendees can or must bring their own alcohol, drinks or supplies; match "BYO", "bring your own", "bring drinks", "no bar", "esky", "cooler", "bottle shop run" or "self-catered drinks".'},{category:"Cash Only",group:"Amenities",priority:"medium",notes:'Venue, bar, door or stall accepts cash but not card payments; match "cash only", "bring cash", "no EFTPOS", "no card", "cash at the door" or "ATM nearby".'},{category:"Card Only",group:"Amenities",priority:"medium",notes:'Venue, bar, door or stall is cashless and accepts card or digital payments only; match "card only", "cashless", "no cash", "tap only", "EFTPOS only" or "card payments only".'},{category:"Food Available",group:"Amenities",priority:"medium",notes:'Food is available at or near the event through vendors, kitchen, food trucks or venue menu; match "food available", "food trucks", "kitchen open", "snacks", "menu", "vendors", "street food" or "dinner available".'},{category:"Dress Code",group:"Other",priority:"high",notes:'Event requires, encourages or enforces specific clothing, theme, footwear or presentation; match "dress code", "strict dress code", "theme", "costume", "black tie", "no thongs", "collared shirts", "dress to impress" or "entry may be refused".'}].map((e=>e.category))),ka=Gn(Ea).max(10).optional().meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10 categories)",examples:[["Day Party","Open Air","Free Entry"]]}),Ta=Xn([{genre:"House",category:"House",priority:"core",notes:"Broad 4/4 dance music rooted in Chicago house; warm grooves, steady kicks, club-focused; use when event says house music generally without a clear subgenre."},{genre:"Deep House",category:"House",priority:"core",notes:"Smooth, warm, soulful or jazzy house; deeper basslines, softer drums, slower club tempo; often described as intimate, sophisticated, sunset, lounge or underground."},{genre:"Tech House",category:"House",priority:"core",notes:"Groovy house with techno-influenced drums, rolling basslines, minimal vocals and big club energy; common in Ibiza, festivals, commercial underground and peak-time club events."},{genre:"Progressive House",category:"House",priority:"core",notes:"Melodic house with long builds, emotional breakdowns and gradual progression; often associated with mainstage, euphoric, cinematic or journey-style sets."},{genre:"Minimal House",category:"House",priority:"core",notes:"Stripped-back, repetitive house with sparse percussion, subtle grooves and restrained arrangements; common in European club, afterhours and vinyl-focused events."},{genre:"Romanian Minimal",category:"House",priority:"core",notes:'Hypnotic, micro-detailed minimal house/techno linked to Romania; long-form grooves, subtle swing, deep rolling bass, afterhours, vinyl, underground and "ro-minimal" wording.'},{genre:"Afro House",category:"House",priority:"core",notes:"House music with African percussion, polyrhythms, chants, soulful vocals and warm melodic grooves; often spiritual, organic, sunset, beach club or global house oriented."},{genre:"Afro Tech",category:"House",priority:"core",notes:"Darker, tougher and more electronic Afro House; heavier drums, driving bass, tribal percussion and peak-time club energy; sits between Afro House and melodic techno."},{genre:"Acid House",category:"House",priority:"high",notes:"House built around squelchy Roland TB-303 acid basslines; raw, psychedelic, ravey or retro Chicago/UK warehouse references."},{genre:"Funky House",category:"House",priority:"high",notes:"Upbeat, feel-good house with funk, disco samples, bass guitar grooves, bright hooks and party-friendly energy; often vocal, summery or nostalgic."},{genre:"Jackin House",category:"House",priority:"high",notes:"Bouncy Chicago-style house with shuffled drums, chunky grooves, cut-up samples and playful energy; often raw, funky, loop-based and dancefloor-driven."},{genre:"Soulful House",category:"House",priority:"medium",notes:"Vocal-led house with gospel, soul and R&B influence; rich chords, emotional vocals, uplifting messages and warm classic house feel."},{genre:"Melodic House",category:"House",priority:"high",notes:"Modern melodic, emotional house with polished production, arpeggios, atmospheric pads and deep/progressive feel; often Anjunadeep, sunset, rooftop or organic club energy."},{genre:"Latin House",category:"House",priority:"medium",notes:"House with Latin percussion, Spanish or Portuguese vocals, salsa, samba, reggaeton or Afro-Latin rhythmic influence; upbeat, percussive and dancefloor-friendly."},{genre:"Techno",category:"Techno",priority:"core",notes:"Broad 4/4 electronic club music rooted in Detroit and Berlin; repetitive, mechanical, driving, hypnotic or warehouse-focused; use when techno is named without a clearer subtype."},{genre:"Melodic Techno",category:"Techno",priority:"core",notes:"Emotional, cinematic techno with big synth melodies, arpeggios, dark builds and dramatic drops; often Afterlife, Tale Of Us, lasers, visuals or large-room events."},{genre:"Hard Techno",category:"Techno",priority:"core",notes:"Fast, aggressive techno with pounding kicks, distorted drums, high energy and rave/warehouse intensity; often 145+ BPM and associated with modern hard rave trends."},{genre:"Industrial Techno",category:"Techno",priority:"high",notes:"Dark, harsh techno with distorted kicks, metallic percussion, noise textures and warehouse or dystopian aesthetics; more abrasive than standard techno."},{genre:"Minimal Techno",category:"Techno",priority:"high",notes:"Stripped-back techno built from repetition, subtle changes, sparse drums and hypnotic grooves; less melodic and more mechanical than minimal house."},{genre:"Detroit Techno",category:"Techno",priority:"medium",notes:"Techno rooted in Detroit's futuristic, soulful and machine-funk sound; classic, purist, historical or old-school techno references."},{genre:"Dub Techno",category:"Techno",priority:"medium",notes:"Deep techno with dub chords, echo, reverb, spacious atmospheres and slow hypnotic movement; often smoky, deep, aquatic or meditative."},{genre:"Acid Techno",category:"Techno",priority:"medium",notes:"Techno driven by squelchy 303 acid lines, looping percussion and rave energy; harder and more driving than acid house."},{genre:"Hypnotic Techno",category:"Techno",priority:"medium",notes:"Repetitive, deep, rolling techno designed for trance-like immersion; subtle loops, long blends, minimal melody and underground warehouse feel."},{genre:"Drum & Bass",category:"Bass",priority:"core",notes:"Fast breakbeat music around 160-180 BPM with heavy basslines and chopped drums; use for D&B, drum and bass, rollers, jump-up or bass-heavy rave events."},{genre:"Jungle",category:"Bass",priority:"core",notes:"Breakbeat-heavy precursor to D&B with chopped amen breaks, reggae/dub samples, ragga vocals and 90s UK rave energy."},{genre:"Dubstep",category:"Bass",priority:"core",notes:"Bass-heavy UK-origin genre around 140 BPM; half-time drums, sub-bass, wobble bass, dark atmospheres or aggressive drops."},{genre:"Bass House",category:"Bass",priority:"core",notes:"House-tempo club music with heavy bass drops, punchy drums and EDM/festival energy; blends house groove with dubstep or bass music sound design."},{genre:"Breakbeat",category:"Bass",priority:"core",notes:"Electronic music built on syncopated broken drum patterns instead of straight 4/4; often rave, electro, UK club, breaks or old-school references."},{genre:"UK Garage",category:"Bass",priority:"core",notes:'Skippy UK club music with swung 2-step rhythms, chopped vocals, sub-bass and soulful/R&B influence; often "UKG", "garage", "2-step" or "speed garage".'},{genre:"Bassline",category:"Bass",priority:"high",notes:"UK 4x4 garage-derived bass music with warping basslines, fast club energy and playful vocal chops; often northern UK or speed garage adjacent."},{genre:"Grime",category:"Bass",priority:"high",notes:"UK rap and electronic bass hybrid around 140 BPM; MC-led, sparse beats, aggressive flows, eski sounds and London street culture references."},{genre:"Liquid DnB",category:"Bass",priority:"medium",notes:"Melodic, smooth and soulful drum & bass; rolling breaks, warm bass, vocals, pads and emotional or uplifting atmosphere."},{genre:"Neurofunk",category:"Bass",priority:"medium",notes:"Technical, dark and aggressive drum & bass with complex bass sound design, precise drums and futuristic, intense energy."},{genre:"Footwork",category:"Bass",priority:"medium",notes:"Fast Chicago club style around 160 BPM with syncopated kicks, chopped vocal samples and jittery rhythms; related to juke and dance battles."},{genre:"Jersey Club",category:"Bass",priority:"medium",notes:"Fast, bouncy US club music with chopped samples, triplet kick patterns and call-and-response energy; often party, dance challenge or club edit focused."},{genre:"Trance",category:"Trance",priority:"core",notes:"Euphoric electronic dance music with emotional melodies, long builds, breakdowns and big climaxes; often 90s, festival, uplifting or hands-in-the-air language."},{genre:"Psytrance",category:"Trance",priority:"core",notes:"Fast psychedelic trance with rolling basslines, hypnotic repetition, alien/psychedelic sound design and outdoor festival or doof culture references."},{genre:"Progressive Trance",category:"Trance",priority:"high",notes:"Smoother, slower trance with gradual melodic builds, deep atmospheres and less explosive drops than uplifting trance; often journey-based and emotional."},{genre:"Disco",category:"Disco",priority:"core",notes:"Classic dance music with live-sounding drums, strings, funk bass, soul vocals and 70s/80s references; use for retro disco, disco party or classic dance events."},{genre:"Nu Disco",category:"Disco",priority:"core",notes:"Modern electronic disco with polished production, house tempo, funk basslines, synths and retro dancefloor feel; often contemporary disco edits or poolside energy."},{genre:"Italo Disco",category:"Disco",priority:"medium",notes:"European 80s disco style with synth bass, drum machines, dramatic vocals and retro-futurist melodies; often Italian, cult, synth-heavy or nostalgic."},{genre:"Funk",category:"Disco",priority:"high",notes:"Groove-based music with syncopated bass, live drums, brass, guitars and rhythmic vocals; often party, rare groove, soul-funk or dancefloor classics."},{genre:"Soul",category:"Disco",priority:"medium",notes:"Vocal-focused music rooted in R&B, gospel and Motown traditions; emotional vocals, warm instrumentation and classic groove; may overlap with disco and house roots."},{genre:"Balearic",category:"Disco",priority:"medium",notes:"Eclectic Ibiza-influenced sound blending downtempo, disco, house, pop, world and chillout; sunset, beach, terrace, poolside or open-air language."},{genre:"Hardcore",category:"Hard Dance",priority:"high",notes:"Very fast, intense rave music with distorted kicks, aggressive synths and high BPM; use when event says hardcore, ravecore or extreme hard dance."},{genre:"Hardstyle",category:"Hard Dance",priority:"high",notes:"Dutch-origin hard dance with distorted reverse-bass kicks, euphoric melodies, screeches and festival anthems; usually around 150 BPM."},{genre:"Gabber",category:"Hard Dance",priority:"low",notes:"Extreme Dutch hardcore style with very fast BPM, distorted kicks, raw rave energy and Rotterdam/hakken culture references."},{genre:"Happy Hardcore",category:"Hard Dance",priority:"low",notes:"Fast, euphoric hardcore with bright melodies, pitched-up vocals, piano riffs and 90s UK rave nostalgia; playful rather than dark."},{genre:"Amapiano",category:"Global",priority:"core",notes:"South African club music with log drums, shakers, jazzy chords, smooth vocals and laid-back but danceable grooves; often piano-led and percussive."},{genre:"Gqom",category:"Global",priority:"high",notes:"Dark, minimal South African club sound from Durban; heavy broken rhythms, raw percussion, sparse vocals and intense hypnotic energy."},{genre:"Afrobeats",category:"Global",priority:"core",notes:"West African pop and club sound, especially Nigerian/Ghanaian; melodic vocals, dancehall/highlife/hip-hop influence, warm rhythms and mainstream crossover."},{genre:"Kuduro",category:"Global",priority:"medium",notes:"Angolan and Portuguese club music with fast, hard percussion, energetic chants and raw dancefloor intensity; often Afro-Portuguese or Lisbon club references."},{genre:"Singeli",category:"Global",priority:"low",notes:"Extremely fast Tanzanian electronic dance music, often 180-220+ BPM; frantic rhythms, rapid vocals and high-energy East African street sound."},{genre:"Baile Funk",category:"Global",priority:"high",notes:"Brazilian funk carioca with heavy drums, MC vocals, Portuguese lyrics and raw party energy; often Rio, favela, proibidao or funk mandelao references."},{genre:"Reggaeton",category:"Global",priority:"high",notes:"Latin urban dance music with dembow rhythm, Spanish vocals, pop/hip-hop influence and mainstream club appeal; often perreo or Latin party events."},{genre:"Dancehall",category:"Global",priority:"high",notes:"Jamaican club music with riddims, patois vocals, reggae influence and sound system culture; can be party, bashment, Caribbean or crossover pop."},{genre:"Dembow",category:"Global",priority:"medium",notes:"Dominican-origin club style built on repetitive dembow rhythm, Spanish MC vocals and raw Latin street-party energy; more minimal and percussive than reggaeton."},{genre:"Ambient",category:"Downtempo",priority:"high",notes:"Atmospheric, beatless or low-rhythm electronic music focused on texture, mood and space; suited to listening rooms, chill rooms, sound baths or pre/post-event settings."},{genre:"Downtempo",category:"Downtempo",priority:"high",notes:"Slower electronic music with relaxed beats, warm textures and lounge/chillout feel; use for chill, sunset, listening, cafe, pre-party or afterhours decompression events."},{genre:"Electronica",category:"Downtempo",priority:"high",notes:"Broad non-club-focused electronic music; experimental, melodic, listening-oriented or pop-adjacent; use when event says electronic but not clearly house/techno/bass."},{genre:"Trip Hop",category:"Downtempo",priority:"low",notes:"Moody 90s Bristol sound blending hip-hop beats, dub, soul, jazz and atmospheric vocals; dark, smoky, cinematic or Massive Attack/Portishead references."},{genre:"Lo-Fi",category:"Downtempo",priority:"medium",notes:"Relaxed, hazy, imperfect-sounding beats with soft drums, samples, jazz chords and study/chill aesthetics; often lo-fi hip-hop or bedroom production references."},{genre:"Electro",category:"Electronic",priority:"core",notes:"Syncopated electronic music with 808 drums, robotic funk, vocoders, breakbeats and Detroit/80s futurism; distinct from electro-house."},{genre:"Synth Pop",category:"Electronic",priority:"medium",notes:"Pop-oriented electronic music with catchy vocals, 80s synths, drum machines and new wave influence; often retro, nostalgic or indie-pop crossover."},{genre:"Industrial",category:"Electronic",priority:"medium",notes:"Dark electronic or rock-influenced music with harsh textures, machine rhythms, noise and dystopian aesthetics; may overlap with EBM and industrial techno."},{genre:"EBM",category:"Electronic",priority:"low",notes:"Electronic Body Music: hard, repetitive industrial dance with shouted vocals, rigid basslines and militaristic rhythms; 80s/Belgian/German club references."},{genre:"Indie Dance",category:"Electronic",priority:"high",notes:"Danceable blend of indie rock, disco, synth pop and electronic production; often band/DJ crossover, nu-disco-adjacent, stylish or alternative club sound."},{genre:"Experimental",category:"Electronic",priority:"medium",notes:"Unconventional electronic music that avoids standard genre structures; abstract, avant-garde, noise, leftfield, art-focused or boundary-pushing events."},{genre:"Hip-Hop",category:"Non-Electronic",priority:"high",notes:"Rap-led music with beats, MCs, sampling, trap, boom bap or old-school references; use for hip-hop parties, rap nights or DJ sets centred on rap."},{genre:"R&B",category:"Non-Electronic",priority:"high",notes:"Smooth vocal-led music with soul, hip-hop and pop influence; 90s/2000s R&B, slow jams, contemporary R&B or club crossover events."},{genre:"Jazz",category:"Non-Electronic",priority:"medium",notes:"Improvised or live instrumental music with swing, bebop, fusion, soul-jazz or jazz club references; often live band or listening-focused."},{genre:"Pop",category:"Non-Electronic",priority:"medium",notes:"Mainstream, chart-focused music with recognisable hits, singalong vocals and broad commercial appeal; use for general pop parties or top-40 events."},{genre:"Rock",category:"Non-Electronic",priority:"low",notes:"Guitar-driven band music; indie rock, classic rock, punk, alternative or live venue references; usually non-electronic unless explicitly DJ edits."},{genre:"Reggae",category:"Non-Electronic",priority:"medium",notes:"Jamaican-origin music with offbeat guitar rhythms, dub influence, roots vocals and sound system culture; includes roots, dub and reggae parties."},{genre:"Live",category:"Non-Electronic",priority:"medium",notes:"Event is centred on live performance rather than DJ genre; bands, singers, instrumentalists or live electronic acts; use only when performance format is the key signal."}].map((e=>e.genre))),Aa=Gn(Ta).min(1).max(5).meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]});Gn(Ta).max(5).optional().meta({description:"Music genres for the event (up to 5 genres)",examples:[["Tech House","Melodic Techno"]]});const xa={BAD_REQUEST:{status:400},INPUT_VALIDATION_FAILED:{status:422,data:Bn({formErrors:Gn(Ji()),fieldErrors:Jn(Ji(),Gn(Ji()))})},UNAUTHORIZED:{status:401},FORBIDDEN:{status:403},NOT_FOUND:{status:404},CONFLICT:{status:409},TOO_MANY_REQUESTS:{status:429},INTERNAL_SERVER_ERROR:{status:500},NOT_IMPLEMENTED:{status:501},SERVICE_UNAVAILABLE:{status:503}};function Sa(e,t){return Ji().regex(RegExp(`^${e}_[0-9a-z]{26}$`),`Must be a valid ${t} ID`).describe(`Unique ${t} identifier`)}const Da=Sa("tem","team"),Ca=Sa("evt","event"),Pa=Sa("ven","venue"),Oa=Sa("loc","location"),_a=Sa("usr","user"),Ra=Sa("ord","order"),Na=Sa("tkt","ticket"),Ua=Sa("pmt","promoter");Sa("cpn","coupon"),Sa("cod","coupon code");const Ma=Sa("cus","customer"),La=Sa("adm","admission"),ja=Sa("sct","section");Sa("ben","beneficiary");const qa=Sa("pyt","payout"),Ga=Sa("mbr","team member"),Fa=Sa("inv","team invite"),Ba=Sa("ecl","event collaborator"),za=Sa("psc","permission scope"),Va=Sa("prl","permission role"),Ya=Sa("ntf","notification"),Wa=Bn({src:on().meta({examples:["https://assets.session.services/my-image.jpg"]}),alt:Ji().meta({examples:["My Image"]}),width:In().meta({examples:[1080]}),height:In().meta({examples:[1080]})});function Za(){return In().min(-1)}function Ha(){return In().min(-1).refine((e=>0!==e),{message:"Limit cannot be 0. Use -1 for unlimited or a positive number for a specific limit"})}const Ka=Yn([Ji(),In(),An(),Cn()]),Ja=new vr({type:"lazy",getter:()=>Yn([Ka,Gn(Ja),Jn(Ji(),Ja)])}),Qa=Jn(Ji().min(1).max(40).meta({description:"Metadata key. Must be 1-40 characters"}),Ji().max(500).meta({description:"Metadata value. Must not exceed 500 characters"})).refine((e=>Object.keys(e).length<=50),{message:"Metadata cannot exceed 50 keys"}).optional().meta({description:"Flexible key-value metadata storage for custom configuration. Similar to Stripe's metadata API. Maximum 50 keys, key names up to 40 characters, values up to 500 characters."}),Xa=Ji().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/,"Must be a naive datetime without timezone (YYYY-MM-DDTHH:mm:ss)").meta({description:"Wall clock time without timezone (displays same everywhere)",examples:["2025-03-15T19:30:00"]});function es(e){return ba().int().min(1).max(100).prefault(20).meta({examples:[20],description:`Maximum number of ${e} to return per request (1-100, default: 20)`})}const ts=Ji().meta({description:"Opaque cursor for pagination. Use the cursor from the previous response to continue fetching results."}),is="[a-z][a-z0-9-]*",ns=RegExp(`^-?(?:\\*|(?:${is})(?:\\.${is})*(?:\\.\\*|\\.bypass|\\.[a-z]{3}_[0-9a-z]{26})?)$`),rs=/^[a-z]{3}_[0-9a-z]{26}$/,os=["tem","pmt","ven","evt","ord","tkt","cpn"],as=new Set("tenant.masquerade,team.read,team.write,team.member.read,team.member.write,team.invite.read,team.invite.write,team.gateway.read,team.gateway.connect,team.gateway.write,team.performance.read,cms.read,cms.write,role.read,role.write,event.read,event.write,event.performance.read,promoter.read,promoter.write,promoter.performance.read,venue.read,venue.write,order.read,order.write,ticket.read,ticket.write,ticket.scan,coupon.read,coupon.write,beneficiary.read,beneficiary.write,payout.read,payout.write,*".split(",")),ss=new Set(["tenant","team","team.member","team.invite","team.gateway","team.performance","cms","role","event","event.performance","promoter","promoter.performance","venue","order","ticket","coupon","beneficiary","payout"]),ds={"tenant.masquerade":[],"team.read":["tem"],"team.write":["tem"],"team.member.read":["tem"],"team.member.write":["tem"],"team.invite.read":["tem"],"team.invite.write":["tem"],"team.gateway.read":["tem","pmt"],"team.gateway.connect":["tem"],"team.gateway.write":["tem","pmt"],"team.performance.read":["tem","pmt","ven","evt"],"cms.read":[],"cms.write":[],"role.read":["tem"],"role.write":["tem"],"event.read":["tem","pmt","ven","evt"],"event.write":["tem","pmt","ven","evt"],"event.performance.read":["tem","pmt","ven","evt"],"promoter.read":["tem","pmt","evt"],"promoter.write":["tem","pmt","evt"],"promoter.performance.read":["tem","pmt","evt"],"venue.read":["tem","ven","evt"],"venue.write":["tem","ven","evt"],"order.read":["tem","pmt","ven","evt","ord"],"order.write":["tem","pmt","ven","evt","ord"],"ticket.read":["tem","pmt","ven","evt","ord","tkt"],"ticket.write":["tem","pmt","ven","evt","ord","tkt"],"ticket.scan":["tem","pmt","ven","evt","ord","tkt"],"coupon.read":["tem","pmt","evt","cpn"],"coupon.write":["tem","pmt","evt","cpn"],"beneficiary.read":["tem","pmt"],"beneficiary.write":["tem","pmt"],"payout.read":["tem","pmt","ven"],"payout.write":["tem","pmt"],"*":[]};function cs(e){let[t]=e.split("_");return!!t&&os.includes(t)}function ls(e,t){return!(!as.has(e)||!function(e){return rs.test(e)&&cs(e)}(t))&&function(e,t){let i=function(e){let[t]=e.split("_");return t&&cs(e)?t:null}(t);return!!i&&(ds[e]??[]).includes(i)}(e,t)}const us=[function(e){return as.has(e)},function(e){return!!e.endsWith(".bypass")&&as.has(e.slice(0,-7))},function(e){let t=function(e){let t=e.match(/^((?:[a-z][a-z0-9-]*)(?:\.[a-z][a-z0-9-]*)*)\.([a-z]{3}_[0-9a-z]{26})$/);return t?function(e){let t=e[1],i=e[2];return t&&i?{base:t,resourceId:i}:null}(t):null}(e);return!!t&&ls(t.base,t.resourceId)},function(e){if(!e.endsWith(".*"))return!1;let t=e.slice(0,-2);return ss.has(t)||as.has(t)}],ps=Ji().regex(ns,"Invalid permission node. Use lowercase dot notation with optional wildcard, resource target, bypass target, and deny prefix.").refine((function(e){let t=function(e){return e.startsWith("-")?e.slice(1):e}(e);return us.some((e=>e(t)))}),{message:"Unsupported permission node. Only nodes from the canonical permission catalog are allowed."}).meta({description:"Permission node in minecraft-style format. Supports exact, scoped wildcard, resource target, bypass target, and deny prefix.",examples:["team.read","team.member.write","ticket.scan","ticket.scan.*","ticket.scan.evt_01h8c3jm9zs2v6h2k9p9r8f5a1","team.gateway.connect.bypass","team.*","*","-team.gateway.write","-ticket.scan.evt_01h8c3jm9zs2v6h2k9p9r8f5a1"]}),ms=Gn(ps).meta({description:"Array of permission nodes. Supports wildcard and negation. Empty arrays are allowed.",examples:[[],["team.read","team.member.write"],["event.read","event.write"],["*"],["-team.gateway.write"]]}),hs=ms.min(1).meta({description:"Non-empty array of permission nodes. Supports wildcard and negation.",examples:[["team.read","team.member.write"],["event.read","event.write"],["*"],["-team.gateway.write"]]}),fs=Ji().length(16).meta({examples:[va.signature],description:"HMAC signature for secure access (16 characters, base64url encoded)"}),ys=Bn({promoterIds:Gn(Ua).nullable().meta({description:"Null means team-wide promoter access. An array means access is restricted to those promoters."})}).meta({description:"Promoter access assigned to a team member or invite."}),vs=Bn({promoterIds:Gn(Ua).min(1).nullable().meta({description:"Null grants team-wide promoter access. A non-empty array restricts access to those promoters."})}).meta({description:"Promoter access assignment input."}),gs=Xn(["SALE_ENDED","SOLD_OUT","DOOR"]),bs=Bn({booking:In().min(4).max(10).meta({examples:[7.5],description:"Booking fee percentage used to calculate the booking fee."})}).meta({description:"Admission-level pricing override used to calculate derived fee amounts."});function $s(e){return Bn({base:kn().min(0).meta({examples:[va.Admission.price.base],description:"Base cost of a ticket for this admission type before fees, in cents"}),booking:kn().min(0).meta({examples:[va.Admission.price.booking],description:e.booking}),currency:Ia.meta({examples:[va.Admission.price.currency],description:e.currency}),override:bs.optional().meta({description:"Optional pricing override used to calculate derived fee amounts."})}).meta({examples:[va.Admission.price],description:e.price})}const ws=Bn({id:La.readonly().meta({description:"A unique identifier for this admission",examples:[va.Admission.id]}),name:Ji().meta({description:"The display name of the admission type shown to customers",examples:[va.Admission.name]}),subtitle:Ji().max(100).optional().meta({description:"Short supporting text shown below the admission name",examples:[va.Admission.subtitle]}),description:Ji().max(500).optional().meta({description:"Detailed information shown when customers expand 'More info'",examples:[va.Admission.description]}),capacity:Za().prefault(-1).meta({examples:[va.Admission.capacity],description:"Maximum number of tickets that can be sold for this admission type. A value of -1 indicates unlimited"}),limit:Ha().prefault(-1).meta({examples:[va.Admission.limit??-1],description:"Maximum number of tickets of this admission type that can be purchased in a single order. A value of -1 indicates unlimited"}),available:In().min(-1).readonly().meta({examples:[va.Admission.available],description:"Current number of tickets available for purchase, calculated as capacity minus sold minus reserved. A value of -1 indicates unlimited"}),sold:In().min(0).readonly().meta({examples:[va.Admission.sold],description:"Total number of tickets of this admission type that have been purchased"}),reserved:In().min(0).readonly().meta({examples:[va.Admission.reserved],description:"Number of tickets held for customers during checkout and not available to others"}),order:In().min(0).meta({examples:[va.Admission.order],description:"Determines the position in which this admission type appears when listed. Lower values appear first"}),createdAt:Si().readonly().meta({examples:[va.Admission.createdAt],description:"Timestamp in ISO 8601 format when this admission type was created"}),updatedAt:Si().readonly().meta({examples:[va.Admission.updatedAt],description:"Timestamp in ISO 8601 format when this admission type was last updated"}),entryStartsAt:Xa.meta({examples:[va.Admission.entryStartsAt],description:"Wall clock time from which tickets of this type are valid for entry (no timezone)"}),entryEndsAt:Xa.meta({examples:[va.Admission.entryEndsAt],description:"Wall clock time until which tickets of this type are valid for entry (no timezone)"}),saleStartsAt:Xa.meta({examples:[va.Admission.saleStartsAt],description:"Wall clock time when ticket sales for this admission type begin (no timezone)"}),saleEndsAt:Xa.meta({examples:[va.Admission.saleEndsAt],description:"Wall clock time when ticket sales for this admission type end (no timezone)"}),saleEndsBehavior:gs.default("SALE_ENDED").meta({examples:[va.Admission.saleEndsBehavior],description:"Label to display for this admission after ticket sales have ended"}),price:$s({booking:"Additional booking fee applied to the ticket price, in cents",currency:"Three-letter ISO 4217 currency code for the ticket price",price:"Pricing details for this admission type, including base cost and fees in cents, and currency"}),visibility:Xn(ga).prefault("ALWAYS").meta({examples:["ALWAYS"],description:"Controls whether this admission type is shown publicly, revealed by a scoped coupon, or unlocked after another admission."}),visibleAfterAdmissionId:La.nullable().optional().meta({description:"Admission that must sell out or close before this admission can be purchased."}),sectionId:ja.nullable().optional().meta({examples:[va.Admission.sectionId],description:"Identifier of the section this admission type belongs to, if any"}),teamId:Da.meta({description:"Team that owns this admission. Denormalized for efficient queries."}),promoterId:Ua.meta({examples:[va.Admission.promoterId],description:"Identifier of the promoter responsible for this admission type"}),eventId:Ca.meta({examples:[va.Admission.eventId],description:"Identifier of the event to which this admission type is linked"}),eventSlug:Ji().meta({examples:[va.Admission.eventSlug],description:"URL-friendly slug for the event associated with this admission type"})}).meta({description:"Admission represents a specific type or category of ticket available for an event",examples:[va.Admission]}),Is=ws.omit({id:!0,createdAt:!0,updatedAt:!0,available:!0,sold:!0,reserved:!0}).meta({description:"Schema for creating a new admission type for an event"}),Es=ws.pick({id:!0}).extend({eventId:ws.shape.eventId.meta({examples:[va.Admission.eventId],description:"Identifier of the event to which this admission type belongs"})}).meta({description:"Schema for deleting an admission type from an event. This performs a soft delete by setting the deletedAt timestamp"}),ks=ws.pick({id:!0}).extend({eventId:Ca.meta({examples:[va.Admission.eventId],description:"Identifier of the event to which this admission type belongs"})}).meta({description:"Schema for retrieving a specific admission type"}),Ts=zn({eventId:Ji().max(128).meta({examples:[va.Admission.eventId],description:"Identifier of the event to list admission types for"}),sectionId:Ji().max(128).optional().meta({examples:[va.Admission.sectionId],description:"Filter admission types by section identifier. If provided, only admissions for this section are returned"}),query:Ji().max(120).optional().meta({examples:["Early Bird"],description:"Optional search query to filter admissions by name. When provided, search-backed pagination is used."}),limit:es("admission types").optional(),cursor:Ji().max(768).optional().meta({examples:["eyJpZCI6ImFkbV8wMWpwczVjZ3NlZTB4dmFwYms5MmU4ZWI0ZyJ9"],description:"Pagination cursor for retrieving the next set of results. Obtained from previous response"})}).meta({description:"Schema for listing admission types with pagination and filtering options"});function As(e,t){return Bn({[t]:Gn(e).meta({description:`Array of ${t} for the current result set`}),before:Ji().nullish().meta({examples:["eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNqIn19"],description:"Cursor for navigating backward in the result set. Omitted when there are no prior results."}),after:Ji().nullish().meta({examples:["eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNkIn19"],description:"Cursor for navigating forward in the result set. Omitted when there are no subsequent results."}),limit:ba().min(1).meta({examples:[20],description:"Maximum number of items to return in each result set"})})}const xs=As(ws,"admissions"),Ss=Bn({min:kn().min(0).meta({description:"Minimum booking fee in the quote currency's minor units"}).optional(),max:kn().min(0).meta({description:"Maximum booking fee in the quote currency's minor units"}).optional(),percent:In().min(0).meta({description:"Percentage applied when calculating the booking fee"}).optional()}),Ds=ws.pick({eventId:!0}).extend({message:Ji().meta({examples:["7.5% of the ticket price or $2 AUD, whichever is higher"],description:"Detailed explanation of the booking fee calculation applied to this admission type"}),source:Xn(["EVENT","CUSTOM"]).meta({description:"Whether the quote uses the resolved event fee or an admission-level custom percentage."}),rule:Ss.meta({description:"Effective booking fee rule in the quote currency after conversion."}),price:$s({booking:"Calculated booking fee applied to the ticket price, in cents",currency:"Three-letter ISO 4217 currency code for the quoted price",price:"Pricing quote for this admission type, showing base cost and calculated booking fee in cents"})}).meta({description:"Response schema for admission pricing quotes, including booking fee calculations and explanatory messages"}),Cs=ws.pick({eventId:!0}).extend({base:kn().min(0).meta({examples:[va.Admission.price.base],description:"Base cost of a ticket for this admission type before fees, in cents"}),currency:Ia.meta({examples:[va.Admission.price.currency],description:"Three-letter ISO 4217 currency code for the ticket price"}),override:bs.optional().meta({description:"Optional admission-level booking fee percentage to preview instead of the event fee formula."})}).meta({description:"Request schema for generating a pricing quote for an admission type, including booking fee calculations"}),Ps=Bn({quote:Ds}),Os=Bn({admission:ws}),_s=Bn({id:ws.shape.id,eventId:ws.shape.eventId,name:ws.shape.name.optional(),subtitle:ws.shape.subtitle,description:ws.shape.description,capacity:Za().optional(),limit:Ha().optional(),order:ws.shape.order.optional(),entryStartsAt:ws.shape.entryStartsAt.optional(),entryEndsAt:ws.shape.entryEndsAt.optional(),saleStartsAt:ws.shape.saleStartsAt.optional(),saleEndsAt:ws.shape.saleEndsAt.optional(),saleEndsBehavior:gs.optional(),price:ws.shape.price.extend({override:bs.nullable().optional().meta({description:"Admission pricing override. Pass null to clear it; omit to leave it unchanged."})}).optional(),visibility:Xn(ga).optional(),visibleAfterAdmissionId:La.nullable().optional(),sectionId:ja.nullable().optional().meta({description:"Section ID. Pass null to unassign from section; omit to leave unchanged."})}).meta({description:"Schema for updating an existing admission type."}),Rs=Ci().describe("Date (YYYY-MM-DD)"),Ns=Ji().min(1).max(128).optional().describe("IANA time zone for interpreting date ranges"),Us=Bn({startDate:Rs.describe("Start date (YYYY-MM-DD)"),endDate:Rs.describe("End date (YYYY-MM-DD)"),timeZone:Ns}),Ms={startDate:Rs.optional().describe("Start date (YYYY-MM-DD)"),endDate:Rs.optional().describe("End date (YYYY-MM-DD)"),timeZone:Ns},Ls=e=>!e.startDate&&!e.endDate||!(!e.startDate||!e.endDate);function js(e){return Bn(e).extend(Us.shape)}function qs(e){return Bn({...e,...Ms}).refine(Ls,{message:"Both startDate and endDate must be provided together, or omit both for all-time data"})}Bn(Ms).refine(Ls,{message:"Both startDate and endDate must be provided together, or omit both for all-time data"});const Gs=Bn({value:In().describe("Current period value"),previous:In().describe("Comparison period value"),change:In().describe("Percentage change from previous period"),changeType:Xn(["increase","decrease","unchanged"]).describe("Direction of change")}),Fs=Bn({eventId:Ji().describe("Event identifier"),eventName:Ji().describe("Event name"),ticketCount:In().describe("Number of tickets sold"),sharePercent:In().describe("Percentage of total tickets")}),Bs=Bn({start:Ji().describe("Period start date"),end:Ji().describe("Period end date")}),zs=Bn({start:Ji().describe("Comparison period start date"),end:Ji().describe("Comparison period end date")}),Vs=Xn(["HOUR","DAY","WEEK","MONTH"]),Ys=Bn({date:Ji().describe("Date (YYYY-MM-DD)"),revenue:In().describe("Revenue in cents"),tickets:In().describe("Tickets sold")}),Ws=Ys.extend({orders:In().describe("Orders placed")}),Zs=Bn({revenue:In().describe("Total revenue for period in cents"),tickets:In().describe("Total tickets for period")}),Hs=Zs.extend({orders:In().describe("Total orders for period")}),Ks=Bn({revenue:Gs.describe("Total revenue in cents"),ticketsSold:Gs.describe("Number of tickets sold"),averageOrderValue:Gs.describe("Average order value in cents"),conversionRate:Gs.describe("Overall conversion rate (%)"),activeEvents:Gs.describe("Number of active events in period"),uniqueCustomers:Gs.describe("Unique customers (estimated)"),orderCount:Gs.describe("Number of orders placed"),pageViews:Gs.describe("Total page views from tracking")}),Js=Bn({events:Gn(Fs),totalTickets:In().describe("Total tickets across all events")});function Qs(e,t){return js({...id(e,t),currency:Ji().optional().describe("Currency code for revenue metrics")})}function Xs(e){return Bn({meta:Bn({...e,currency:Ji().describe("Primary currency code"),currencies:Gn(Ji()).describe("All currencies with transactions"),dateRange:Bs,comparisonRange:zs}),metrics:Ks})}function ed(e,t){return js({...id(e,t),granularity:Vs.optional().default("DAY").describe("Time granularity"),currency:Ji().optional().describe("Currency filter")})}function td(e,t){return js({...id(e,t),limit:In().optional().default(5).describe("Maximum number of events to return")})}function id(e,t){return{[e]:Ji().describe(t)}}const nd=qs({eventId:Ji().describe("Event identifier")}).meta({description:"Event performance summary request"}),rd=Bn({meta:Bn({eventId:Ji().describe("Event identifier"),eventName:Ji().describe("Event name"),currency:Ji().describe("Currency code (e.g., USD, EUR)"),dateRange:Bs.optional().describe("Present only when startDate/endDate are provided"),comparisonRange:zs.optional().describe("Present only when startDate/endDate are provided")}),metrics:Bn({revenue:Gs.describe("Total revenue in cents"),ticketsSold:Gs.describe("Number of tickets sold"),orderCount:Gs.describe("Number of orders placed"),averageOrderValue:Gs.describe("Average order value in cents"),conversionRate:Gs.describe("Conversion rate as percentage"),pageViews:Gs.describe("Total page/product views"),uniqueVisitors:Gs.describe("Unique visitors (estimated)"),checkoutStarted:Gs.describe("Number of checkout started events (external link clicks for external events)")})}),od=js({eventId:Ji().describe("Event identifier"),granularity:Vs.optional().default("DAY").describe("Time granularity for aggregation"),breakdown:Xn(["TOTAL"]).optional().default("TOTAL").describe("Breakdown type (always TOTAL for performance)"),includeBreakdowns:An().optional().default(!0).describe("Whether to include admission and section breakdowns in each time bucket")}),ad=Bn({meta:Bn({eventId:Ji(),eventName:Ji().describe("Event name"),currency:Ji().describe("Currency code"),dateRange:Bs,granularity:Vs}),series:Gn(Bn({date:Ji().describe("Date or timestamp"),tickets:In().describe("Tickets sold in period"),revenue:In().describe("Revenue in period (cents)"),admissions:Gn(Bn({id:Ji(),name:Ji(),quantity:In()})),sections:Gn(Bn({id:Ji(),name:Ji(),quantity:In()}))}))}),sd=Xn(["HOUR","DAY","WEEK","MONTH"]).describe("Time granularity for aggregation"),dd=js({eventId:Ji().describe("Event identifier"),granularity:sd.optional().default("DAY")}).meta({description:"Event performance time series request"}),cd=Bn({meta:Bn({eventId:Ji(),eventName:Ji().describe("Event name"),currency:Ji().describe("Currency code"),dateRange:Bs,granularity:sd}),series:Gn(Bn({date:Ji().describe("Date or timestamp"),revenue:In().describe("Net revenue in period (cents)"),tickets:In().describe("Tickets sold in period"),orders:In().describe("Completed orders in period"),pageViews:In().describe("Product/page views in period"),visitors:In().describe("Unique visitors in period (estimated)"),checkoutStarted:In().describe("Checkout started events in period"),convertedVisitors:In().describe("Unique visitors who completed an order in period"),eligibleVisitors:In().describe("Unique visitors eligible for conversion in period"),conversionRate:In().describe("Converted visitors divided by eligible visitors in period (%)")}))}),ld=js({eventId:Ji().describe("Event identifier")}),ud=Bn({meta:Bn({eventId:Ji(),eventName:Ji().describe("Event name"),currency:Ji().describe("Currency code"),dateRange:Bs}),totals:Bn({entered:In().describe("Total entered funnel (product viewed)"),completed:In().describe("Total completed (orders)"),overallConversionRate:In().describe("Overall conversion rate (%)"),totalDropped:In().describe("Total dropped off")}),stages:Gn(Bn({id:Ji().describe("Funnel stage identifier"),name:Ji().describe("Human-readable stage name"),count:In().describe("Number of events at this stage"),conversionRate:In().describe("Conversion rate from first stage (%)"),dropoffRate:In().describe("Dropoff rate from previous stage (%)")}))});Bn({meta:Bn({eventId:Ji(),dimension:Ji().describe("Dimension type"),dateRange:Bs,limit:In().optional()}),data:Gn(Bn({name:Ji().describe("Dimension value (e.g., campaign name)"),views:In().describe("Page/product views"),clicks:In().describe("Ticket link clicks").optional(),conversions:In().describe("Completed orders"),revenue:In().describe("Total revenue in cents"),conversionRate:In().describe("Conversion rate (%)"),share:In().describe("Percentage share of total").optional()})),totals:Bn({views:In(),conversions:In(),revenue:In()}).optional()});const pd=Xn(["HOUR","DAY","WEEK","MONTH"]),md=Bn({eventId:Ji().describe("Event identifier"),eventName:Ji().describe("Event name"),currency:Ji().describe("Currency code (e.g., USD, EUR)"),dateRange:Bs}),hd=md.extend({limit:In().describe("Maximum number of results returned")}),fd=Xn(["MOBILE","DESKTOP","TABLET","Unknown"]),yd=Xn(["revenue","tickets","orders","pageViews","visitors","conversion","clicks","clickRate"]).describe("Metric used to sort breakdown rows before limiting results");js({eventId:Ji(),granularity:pd.optional()}),Bn({granularity:pd,data:Gn(Bn({date:Ji(),revenue:In(),ticketsSold:In()}))});const vd=js({eventId:Ji(),limit:In().min(1).max(100).optional().default(10)}),gd=Bn({meta:hd,totals:Bn({uses:In().describe("Total coupon uses across all coupons"),revenue:In().describe("Total revenue from coupon-discounted orders (cents)")}),coupons:Gn(Bn({id:Ji().describe("Coupon code identifier"),code:Ji().describe("Coupon code"),uses:In().describe("Number of times this coupon was used"),revenue:In().describe("Revenue from this coupon (cents)"),discount:Ji().describe("Discount amount or percentage"),share:In().describe("Share of total coupon uses (%)")})).describe("Coupons sorted by uses descending")}),bd=js({eventId:Ji(),limit:In().min(1).max(100).optional().default(10),sortBy:yd.optional().default("orders")}),$d=Bn({data:Gn(Bn({campaign:Ji(),views:In(),visitors:In(),clicks:In().optional(),orders:In(),tickets:In(),revenue:In(),conversionRate:In(),sharePercent:In()})),totalOrders:In(),totalTickets:In(),totalRevenue:In()}),wd=js({eventId:Ji(),limit:In().min(1).max(100).optional().default(10),sortBy:yd.optional().default("orders")}),Id=Bn({meta:hd,totals:Bn({views:In().describe("Total views across all mediums"),visitors:In().describe("Total unique visitors across all mediums"),orders:In().describe("Total orders across all mediums"),tickets:In().describe("Total tickets across all mediums"),revenue:In().describe("Total revenue across all mediums (cents)")}),mediums:Gn(Bn({id:Ji().describe("Medium identifier (e.g., 'social', 'email')"),name:Ji().describe("Medium name"),views:In().describe("Views from this medium"),visitors:In().describe("Unique visitors from this medium"),clicks:In().optional().describe("Ticket link clicks"),orders:In().describe("Orders from this medium"),tickets:In().describe("Tickets from this medium"),revenue:In().describe("Revenue from this medium (cents)"),conversionRate:In().describe("Conversion rate (%)"),share:In().describe("Share of total orders (%)")})).describe("Mediums sorted by orders descending")}),Ed=js({eventId:Ji(),limit:In().min(1).max(100).optional().default(10),sortBy:yd.optional().default("orders")}),kd=Bn({meta:md,totals:Bn({views:In().describe("Total views across all devices"),visitors:In().describe("Total unique visitors across all devices"),revenue:In().describe("Total revenue across all devices (cents)"),orders:In().describe("Total orders across all devices"),tickets:In().describe("Total tickets across all devices")}),devices:Gn(Bn({id:fd.describe("Device type"),name:Ji().describe("Human-readable device name"),views:In().optional().describe("Page views from this device"),visitors:In().describe("Unique visitors from this device"),revenue:In().describe("Revenue from this device (cents)"),clicks:In().optional().describe("Ticket link clicks"),orders:In().describe("Orders from this device"),tickets:In().describe("Tickets from this device"),conversionRate:In().describe("Conversion rate (%)"),share:In().describe("Share of total orders (%)")})).describe("Devices sorted by orders descending")}),Td=js({eventId:Ji(),limit:In().min(1).max(100).optional().default(10),sortBy:yd.optional().default("visitors")}),Ad=Bn({meta:hd,totals:Bn({views:In().describe("Total views across all browsers"),visitors:In().describe("Total unique visitors across all browsers"),orders:In().describe("Total orders across all browsers"),tickets:In().describe("Total tickets across all browsers"),revenue:In().describe("Total revenue across all browsers (cents)")}),browsers:Gn(Bn({id:Ji().describe("Browser identifier"),name:Ji().describe("Human-readable browser name"),views:In().describe("Page views from this browser"),clicks:In().optional().describe("Ticket link clicks"),visitors:In().describe("Unique visitors from this browser"),orders:In().describe("Orders from this browser"),tickets:In().describe("Tickets from this browser"),revenue:In().describe("Revenue from this browser (cents)"),conversionRate:In().describe("Conversion rate (%)"),share:In().describe("Share of total visitors (%)")})).describe("Browsers sorted by visitors descending")}),xd=js({eventId:Ji(),limit:In().min(1).max(100).optional().default(10),sortBy:yd.optional().default("pageViews")}),Sd=Bn({meta:hd,totals:Bn({views:In().describe("Total views across all locations"),visitors:In().describe("Total unique visitors across all locations"),orders:In().describe("Total orders across all locations"),tickets:In().describe("Total tickets across all locations"),revenue:In().describe("Total revenue across all locations (cents)")}),locations:Gn(Bn({id:Ji().describe("Location/region code (e.g., 'US-CA', 'GB')"),name:Ji().describe("Human-readable location name"),views:In().describe("Page views from this location"),visitors:In().describe("Unique visitors from this location"),clicks:In().optional().describe("Ticket link clicks"),orders:In().describe("Orders from this location"),tickets:In().describe("Tickets from this location"),revenue:In().describe("Revenue from this location (cents)"),conversionRate:In().describe("Conversion rate (%)"),share:In().describe("Share of total views (%)")})).describe("Locations sorted by views descending")}),Dd=js({eventId:Ji(),limit:In().min(1).max(100).optional().default(10),sortBy:yd.optional().default("pageViews")}),Cd=Bn({meta:hd,totals:Bn({sessions:In().describe("Total sessions across all sources"),visitors:In().describe("Total unique visitors across all sources"),orders:In().describe("Total orders across all sources"),tickets:In().describe("Total tickets across all sources"),revenue:In().describe("Total revenue across all sources (cents)")}),sources:Gn(Bn({id:Ji().describe("Traffic source identifier"),name:Ji().describe("Traffic source name"),referrer:Ji().describe("Referrer URL or domain"),sessions:In().describe("Sessions from this source"),visitors:In().describe("Unique visitors from this source"),clicks:In().optional().describe("Ticket link clicks"),orders:In().describe("Orders from this source"),tickets:In().describe("Tickets from this source"),conversionRate:In().describe("Conversion rate (%)"),revenue:In().describe("Revenue from this source (cents)"),share:In().describe("Share of total sessions (%)")})).describe("Traffic sources sorted by sessions descending")}),Pd=Bn({eventId:Ji(),includeAdmission:An().optional().default(!0),includeSection:An().optional().default(!0),granularity:Xn(["HOUR","MINUTE"]).optional()}),Od=Bn({totalTickets:In(),checkedIn:In(),notCheckedIn:In(),checkinRate:In()}),_d=Od.extend({admissionId:Ji(),admissionName:Ji()}),Rd=Od.extend({sectionId:Ji(),sectionName:Ji()}),Nd=Yn([Od.extend({byAdmission:Gn(_d),bySection:Gn(Rd)}),Bn({granularity:Xn(["HOUR","MINUTE"]),totalTickets:In(),data:Gn(Bn({timestamp:Ji(),checkedIn:In(),rate:In(),checkinsThisPeriod:In()})),byAdmission:Gn(Bn({admissionId:Ji(),admissionName:Ji(),data:Gn(Bn({timestamp:Ji(),checkedIn:In(),rate:In()}))})).optional(),bySection:Gn(Bn({sectionId:Ji(),sectionName:Ji(),data:Gn(Bn({timestamp:Ji(),checkedIn:In(),rate:In()}))})).optional()})]),Ud=Bn({eventId:Ji(),limit:In().min(1).max(50).optional().default(10)}),Md=Bn({totalCheckIns:In(),scanners:Gn(Bn({userId:Ji(),name:Ji(),email:Ji(),checkIns:In(),sharePercent:In(),firstScanAt:Ji().nullable(),lastScanAt:Ji().nullable(),activeMinutes:In(),scansPerHour:In(),devices:Gn(Bn({deviceId:Ji(),checkIns:In()}))})).describe("Door staff sorted by check-ins descending")}),Ld=Bn({eventId:Ji(),includeAdmission:An().optional().default(!0),includeSection:An().optional().default(!0)}),jd=Bn({totalTickets:In(),checkedIn:In(),noShows:In(),checkInRate:In(),noShowRate:In()}),qd=jd.extend({admissionId:Ji(),admissionName:Ji()}),Gd=jd.extend({sectionId:Ji(),sectionName:Ji()}),Fd=jd.extend({byAdmission:Gn(qd),bySection:Gn(Gd)}),Bd=Bn({eventId:Ji(),granularity:Xn(["MINUTE","FIFTEEN_MINUTE","HOUR"]).optional().default("FIFTEEN_MINUTE")}),zd=Bn({granularity:Xn(["MINUTE","FIFTEEN_MINUTE","HOUR"]),totalCheckIns:In(),peakWindow:Bn({start:Ji().nullable(),end:Ji().nullable(),checkIns:In()}),data:Gn(Bn({timestamp:Ji(),checkIns:In(),cumulativeCheckIns:In(),cumulativeRate:In()}))}),Vd=Qs("promoterId","Promoter identifier"),Yd=Xs({promoterId:Ji().describe("Promoter identifier"),promoterName:Ji().describe("Promoter name"),teamId:Ji().describe("Team identifier"),teamName:Ji().describe("Team name")}),Wd=ed("promoterId","Promoter identifier"),Zd=Bn({meta:Bn({promoterId:Ji(),dateRange:Bs,granularity:Vs}),currencies:Gn(Bn({currency:Ji().describe("Currency code (e.g., USD, EUR)"),series:Gn(Ys),totals:Zs})).describe("Time-series data grouped by currency")}),Hd=td("promoterId","Promoter identifier"),Kd=Js,Jd=Qs("teamId","Team identifier"),Qd=Xs({teamId:Ji().describe("Team identifier"),teamName:Ji().describe("Team name")}),Xd=ed("teamId","Team identifier"),ec=Bn({meta:Bn({teamId:Ji(),dateRange:Bs,granularity:Vs}),currencies:Gn(Bn({currency:Ji().describe("Currency code (e.g., USD, EUR)"),series:Gn(Ws),totals:Hs})).describe("Time-series data grouped by currency")});js({teamId:Ji().describe("Team identifier"),limit:In().optional().default(10).describe("Number of events to return"),sortBy:Xn(["revenue","tickets","conversion"]).optional().default("revenue").describe("Sort metric")}),Bn({meta:Bn({teamId:Ji(),dateRange:Bn({start:Ji(),end:Ji()}),limit:In(),sortBy:Ji()}),data:Gn(Bn({eventId:Ji().describe("Event identifier"),eventName:Ji().describe("Event name"),eventDate:Ji().describe("Event date").optional(),status:Ji().describe("Event status"),revenue:In().describe("Total revenue in cents"),tickets:In().describe("Tickets sold"),views:In().describe("Page views"),conversionRate:In().describe("Conversion rate (%)"),contribution:In().describe("% of promoter's total revenue")})),totals:Bn({events:In().describe("Total events in period"),revenue:In().describe("Combined revenue"),tickets:In().describe("Combined tickets")})});const tc=td("teamId","Team identifier"),ic=Js,nc=js({teamId:Ji().describe("Team identifier")}),rc=Bn({stages:Gn(Bn({stageId:Ji().describe("Funnel stage identifier"),stageLabel:Ji().describe("Human-readable stage name"),count:In().describe("Number of events at this stage"),conversionRate:In().describe("Conversion rate from first stage (%)"),dropoffPercent:In().describe("Dropoff rate from previous stage (%)")}))}),oc=js({teamId:Ji().describe("Team identifier"),groupBy:Xn(["HOUR","DAY_OF_WEEK","DAY","WEEK","MONTH"]).optional().default("HOUR").describe("Time breakdown for aggregation"),timeZone:Ji().optional().default("UTC").describe("IANA timezone for hour/day aggregation (e.g., 'America/New_York')")}),ac=Bn({groupBy:Xn(["HOUR","DAY_OF_WEEK","DAY","WEEK","MONTH"]).describe("The grouping used for aggregation"),buckets:Gn(Bn({key:Yn([In(),Ji()]).describe("Bucket key (hour 0-23, day 0-6, or date string)"),label:Ji().describe("Human-readable label"),orderCount:In().describe("Number of orders"),sharePercent:In().describe("Percentage of total orders")})),totalOrders:In().describe("Total orders across all buckets")}),sc=js({teamId:Ji().describe("Team identifier"),limit:In().optional().default(10).describe("Maximum number of admissions to return")}),dc=Bn({admissions:Gn(Bn({admissionId:Ji().describe("Admission identifier"),admissionName:Ji().describe("Admission name"),ticketCount:In().describe("Number of tickets sold"),sharePercent:In().describe("Percentage of total tickets")})),totalTickets:In().describe("Total tickets across all admissions")}),cc=js({teamId:Ji().describe("Team identifier"),type:Xn(["campaign","medium","source"]).describe("Dimension type to analyze"),limit:In().optional().default(20).describe("Maximum number of results to return")}),lc=Bn({dimensionType:Xn(["campaign","medium","source"]).describe("The dimension type analyzed"),data:Gn(Bn({dimensionValue:Ji().describe("The dimension value (e.g., campaign name)"),dimensionLabel:Ji().describe("Human-readable label"),views:In().describe("Total page views"),conversions:In().describe("Total conversions (orders)"),conversionRate:In().describe("Conversion rate (%)"),sharePercent:In().describe("Share of total conversions (%)")})),totalConversions:In().describe("Total conversions across all dimensions")}),uc=Bn({teamId:Ji().describe("Team identifier"),startAt:Si().describe("Inclusive period start timestamp"),endAt:Si().describe("Exclusive period end timestamp")}),pc=Bn({currency:Ji().describe("Currency code"),disputedOrders:In().describe("Orders currently marked as disputed"),orderCount:In().describe("Successful orders"),refunded:In().describe("Refunded amount in cents"),refundCount:In().describe("Orders with refunded value"),refundRate:In().describe("Refunded order rate as a percentage"),revenue:In().describe("Total order value in cents"),ticketsSold:In().describe("Tickets sold")}),mc=pc.omit({currency:!0}),hc=Bn({currencies:Gn(pc),comparison:Bn({totals:mc}),meta:Bn({endAt:Ji().describe("Exclusive period end timestamp"),startAt:Ji().describe("Inclusive period start timestamp"),teamId:Ji().describe("Team identifier")}),totals:mc}),fc=Bn({teamId:Ji().describe("Team identifier")}),yc=Yn([fc.extend({startDate:Rs.describe("Start date (YYYY-MM-DD)"),endDate:Rs.describe("End date (YYYY-MM-DD)")}),fc.extend({startDate:Sn().optional(),endDate:Sn().optional()})]),vc=Bn({amount:In().describe("Payout net amount in cents"),count:In().describe("Number of payouts in this currency"),currency:Ji().describe("Currency code")}),gc=Bn({amount:In().describe("Payout net amount in cents"),currency:Ji().nullable().describe("Currency code"),dueAt:Ji().nullable().describe("Payout due timestamp"),payoutId:Ji().nullable().describe("Payout identifier")}),bc=Bn({amount:In().describe("Payout net amount in cents"),currency:Ji().nullable().describe("Currency code"),paidAt:Ji().nullable().describe("Payout paid timestamp"),payoutId:Ji().nullable().describe("Payout identifier")}),$c=Bn({upcoming:Bn({count:In().describe("Upcoming payouts matching the request"),pendingApproval:In().describe("Upcoming payouts still awaiting approval"),totals:Gn(vc).describe("Upcoming payout totals by currency"),next:gc}),lastPaid:bc}),wc=Bn({teamId:Ji().describe("Team identifier"),startDate:Rs.describe("Start date (YYYY-MM-DD)"),endDate:Rs.describe("End date (YYYY-MM-DD)"),granularity:Vs.optional().default("DAY").describe("Time granularity"),currency:Ji().optional().describe("Currency filter")}),Ic=Xn(["revenue","credits","refunds","disputes","payouts"]),Ec=Bn({id:Ji().optional().describe("Source identifier"),label:Ji().describe("Human-readable source label"),kind:Ic,amount:In().describe("Signed movement amount in cents"),eventId:Ji().optional().describe("Related event identifier"),eventName:Ji().optional().describe("Related event name")}),kc=Bn({date:Ji().describe("Bucket date"),label:Ji().describe("Human-readable bucket label"),revenue:In().describe("Successful order total after discounts in cents"),credits:In().describe("Positive credit amount in cents"),refunds:In().describe("Signed refund adjustment amount in cents"),disputes:In().describe("Signed dispute principal and fee adjustment amount in cents"),payouts:In().describe("Signed paid payout amount in cents"),movements:Gn(Ec)}),Tc=Bn({revenue:In().describe("Successful order total after discounts in cents"),credits:In().describe("Positive credit amount in cents"),refunds:In().describe("Signed refund adjustment amount in cents"),disputes:In().describe("Signed dispute principal and fee adjustment amount in cents"),payouts:In().describe("Signed paid payout amount in cents"),net:In().describe("Net signed money movement in cents")}),Ac=Bn({amount:In().describe("Outstanding adjustment amount in cents"),count:In().describe("Outstanding adjustment count"),currency:Ji().describe("Currency code")}),xc=Bn({meta:Bn({teamId:Ji(),dateRange:Bs,granularity:Vs}),cards:Bn({upcomingPayouts:Bn({count:In(),pendingApproval:In(),totals:Gn(vc)}),adjustments:Bn({count:In(),totals:Gn(Ac)}),nextPayout:gc,lastPaid:bc}),currencies:Gn(Bn({currency:Ji().describe("Currency code"),series:Gn(kc),totals:Tc}))}),Sc=js({teamId:Ji().describe("Team identifier"),granularity:Xn(["DAY","WEEK","MONTH"]).optional().default("DAY").describe("Time granularity for aggregation")}),Dc=Bn({granularity:Xn(["DAY","WEEK","MONTH"]).describe("The granularity used"),series:Gn(Bn({date:Ji().describe("Date key (YYYY-MM-DD, YYYY-Www, or YYYY-MM)"),label:Ji().describe("Human-readable label"),productViewed:In().describe("Page views"),productAdded:In().describe("Add to cart events"),checkoutStarted:In().describe("Checkout started events"),orderCompleted:In().describe("Completed orders")})),totals:Bn({productViewed:In().describe("Total page views"),productAdded:In().describe("Total add to cart"),checkoutStarted:In().describe("Total checkouts started"),orderCompleted:In().describe("Total orders completed"),uniqueVisitors:In().describe("Unique visitors (estimated via HyperLogLog, ~0.8% error)")})}),Cc=Bn({product_id:Ji().optional().describe("admission_id in ticketing context"),sku:Ji().optional().describe("admission_id or admission_name"),category:Ji().optional().describe('event_name or "Admission"'),name:Ji().optional().describe("admission_name"),brand:Ji().optional().describe("promoter_name"),variant:Ji().optional().describe("section_name"),price:In().optional().describe("admission price (base + booking fee) in major currency units"),quantity:In().optional().describe("number of tickets"),coupon:Ji().optional().describe("coupon code applied"),position:In().optional().describe("position in list"),url:Ji().optional().describe("URL to event/admission page"),image_url:Ji().optional().describe("event image"),admission_id:Ji().optional().describe("Explicit admission ID"),section_id:Ji().optional().describe("Section ID if applicable"),event_id:Ji().optional().describe("Event ID for this admission"),promoter_id:Ji().optional().describe("Promoter ID"),price_base:In().nullish().describe("Base price before fees in minor currency units"),price_booking_fee:In().nullish().describe("Booking fee in minor currency units"),capacity:In().optional().describe("Total capacity for this admission"),available:In().optional().describe("Remaining tickets available"),sold:In().optional().describe("Tickets already sold")}),Pc=Bn({type:Ji(),value:Ji()}),Oc=Bn({type:Ji(),value:Ji()}),_c=Bn({query:Yn([Ji(),Jn(Ji(),_n())]).optional(),list_id:Ji().optional(),category:Ji().optional(),filters:Gn(Pc).optional(),sorts:Gn(Oc).optional(),promotion_id:Ji().optional(),creative:Ji().optional(),name:Ji().optional(),position:Yn([Ji(),In()]).optional(),product_id:Ji().optional(),sku:Ji().optional(),brand:Ji().optional(),variant:Ji().optional(),price:In().optional().describe("Product price in major currency units"),quantity:In().optional(),coupon:Ji().optional(),currency:Ji().optional().describe("ISO 4217 currency code"),value:In().optional().describe("Event value in major currency units"),url:Ji().optional(),image_url:Ji().optional(),cart_id:Ji().optional(),step:In().optional(),shipping_method:Ji().optional(),payment_method:Ji().optional(),ticketing_mode:Xn(["internal","external"]).optional(),external_ticket_url:Ji().optional(),external_ticket_domain:Ji().optional(),cta_surface:Ji().optional(),order_id:Ji().optional(),affiliation:Ji().optional(),subtotal:In().optional().describe("Order subtotal in major currency units"),total:In().optional().describe("Order total in major currency units"),revenue:In().optional().describe("Order revenue in major currency units"),shipping:In().optional().describe("Shipping amount in major currency units"),tax:In().optional().describe("Tax amount in major currency units"),discount:In().optional().describe("Discount amount in major currency units"),coupon_id:Ji().optional(),coupon_name:Ji().optional(),reason:Ji().optional(),wishlist_id:Ji().optional(),wishlist_name:Ji().optional(),share_via:Ji().optional(),share_message:Ji().optional(),recipient:Ji().optional(),review_id:Ji().optional(),review_body:Ji().optional(),rating:Ji().optional(),products:Gn(Cc).optional(),event_id:Ji().optional().describe("ID of the ticketed event (evt_xxx)"),event_name:Ji().optional().describe("Name of the ticketed event"),event_slug:Ji().optional().describe("URL slug of event"),event_starts_at:Xa.optional().describe("When the event starts (naive datetime, no timezone)"),event_ends_at:Xa.optional().describe("When the event ends (naive datetime, no timezone)"),event_status:Xn(["UPCOMING","LIVE","ENDED","CANCELLED"]).optional(),event_visibility:Xn(["PUBLIC","PRIVATE"]).optional(),event_location:Ji().optional().describe("Venue name"),event_city:Ji().optional().describe("Venue city"),event_country:Ji().optional().describe("Venue country"),promoter_id:Ji().optional().describe("ID of the promoter (pmt_xxx)"),promoter_name:Ji().optional().describe("Name of the promoter"),promoter_slug:Ji().optional().describe("URL slug of promoter"),admission_id:Ji().optional().describe("ID of admission type (adm_xxx)"),admission_name:Ji().optional().describe('Name of admission (e.g., "General Admission")'),admission_capacity:In().optional().describe("Total capacity for this admission"),admission_available:In().optional().describe("Tickets still available"),admission_sold:In().optional().describe("Tickets already sold"),section_id:Ji().optional().describe("ID of section (sct_xxx)"),section_name:Ji().optional().describe('Name of section (e.g., "VIP", "General")'),section_capacity:In().optional().describe("Total capacity for this section"),section_available:In().optional().describe("Spots still available in section"),ticket_id:Ji().optional().describe("Individual ticket ID (tkt_xxx)"),ticket_status:Xn(["VALID","REDEEMED","CANCELLED"]).optional(),tickets_quantity:In().optional().describe("Number of tickets in transaction"),customer_id:Ji().optional().describe("Customer ID (cus_xxx)"),customer_email:Ji().optional().describe("Customer email"),customer_first_name:Ji().optional(),customer_last_name:Ji().optional(),price_base:In().nullish().describe("Base price before fees in minor currency units"),price_booking_fee:In().nullish().describe("Booking fee amount in minor currency units"),price_discount_amount:In().nullish().describe("Discount amount applied in minor currency units"),sale_starts_at:Xa.optional().describe("When tickets go on sale (naive datetime, no timezone)"),sale_ends_at:Xa.optional().describe("When ticket sales end (naive datetime, no timezone)"),entry_starts_at:Xa.optional().describe("When entry to event begins (naive datetime, no timezone)"),entry_ends_at:Xa.optional().describe("When entry to event ends (naive datetime, no timezone)"),funnel_step:Ji().optional().describe('Current funnel step (e.g., "browse", "cart", "checkout")'),time_to_purchase:In().optional().describe("Seconds from first view to purchase"),session_duration:In().optional().describe("Total session duration in seconds"),referrer_type:Xn(["DIRECT","SOCIAL","EMAIL","SEARCH","REFERRAL","AD"]).optional(),campaign_id:Ji().optional().describe("Marketing campaign ID"),affiliate_id:Ji().optional().describe("Affiliate partner ID"),promo_code_used:Ji().optional().describe("Promotional code applied"),platform:Xn(["WEB","MOBILE_WEB","IOS","ANDROID"]).optional(),app_version:Ji().optional(),device_type:Xn(["MOBILE","TABLET","DESKTOP"]).optional(),anonymous_id:Ji().optional(),browser:Ji().optional(),browser_session_id:Ji().optional(),country:Ji().optional(),page_path:Ji().optional(),page_title:Ji().optional(),page_url:Ji().optional(),referrer:Ji().optional(),region:Ji().optional(),user_agent:Ji().optional(),utm_source:Ji().optional(),utm_medium:Ji().optional(),utm_campaign:Ji().optional(),utm_term:Ji().optional(),utm_content:Ji().optional()}),Rc=Bn({session_id:Ji(),user_id:Ji().optional(),anonymous_id:Ji().optional(),utm_source:Ji().optional(),utm_medium:Ji().optional(),utm_campaign:Ji().optional(),utm_term:Ji().optional(),utm_content:Ji().optional(),page:Bn({url:Ji(),path:Ji(),title:Ji()}),referrer:Ji().optional(),user_agent:Ji().optional(),ip:Ji().optional(),geo:Bn({country:Ji().optional().describe('Country code (e.g., "AU")'),countryName:Ji().optional().describe('Country name (e.g., "Australia")'),region:Ji().optional().describe("State/province code"),regionName:Ji().optional().describe('State/province name (e.g., "New South Wales")'),city:Ji().optional().describe("City name"),latitude:Ji().optional().describe("Latitude"),longitude:Ji().optional().describe("Longitude")}).optional(),fbc:Ji().optional().describe("Facebook click ID"),fbp:Ji().optional().describe("Facebook browser ID"),ttclid:Ji().optional().describe("TikTok click ID")}),Nc=Bn({id:Ji(),eventId:Ji().min(1).describe("Event being tracked (evt_123)"),teamId:Ji().min(1).describe("Team ID (team_123)"),promoterId:Ji().min(1).describe("Promoter ID (pmt_123)"),eventType:Kr,timestamp:Ji(),date:Ji().describe("YYYY-MM-DD"),hour:In().int().min(0).max(23),properties:_c,context:Rc,productId:Ji().optional(),createdAt:Ji(),updatedAt:Ji()}),Uc=Nc.omit({id:!0,timestamp:!0,date:!0,hour:!0,createdAt:!0,updatedAt:!0}).extend({messageId:Ji().min(1).optional().meta({description:"Analytics message id for retry-safe event delivery and linking."}),occurredAt:Si().optional().meta({description:"Client-observed event time. Server ingest time remains authoritative for writes."})}).meta({description:"Schema for tracking an analytics event. Excludes system-generated fields"}),Mc=Bn({legacyOrgId:Ji().min(1),legacyEventId:Ji().min(1),legacyTeamId:Ji().min(1),legacyEventName:Ji().optional(),legacyEventSlug:Ji().optional(),legacyEventCreatedAt:Yn([Ji(),jn(),Cn()]).optional(),legacyTeamCreatedAt:Yn([Ji(),jn(),Cn()]).optional()}),Lc=Yn([Uc,Bn({eventName:Ji().min(1).optional(),eventType:Kr.optional(),eventId:Ji().min(1).optional(),teamId:Ji().min(1).optional(),promoterId:Ji().min(1).optional(),properties:Jn(Ji(),_n()).optional(),context:Rc.partial().optional(),legacyContext:Mc.optional()}).passthrough().meta({description:"Compatibility schema for legacy Sash analytics payloads that require server-side ID normalization"})]).meta({description:"Analytics ingress schema accepting both canonical payloads and legacy Sash-compatible payloads"});qs({eventId:Ji().meta({description:"Event ID to get tracking events for"}),limit:ba().int().positive().optional().meta({description:"Maximum number of events to return"})}).meta({description:"Schema for retrieving tracking events for an event"});const jc=Xn(["AIRWALLEX","STRIPE"]),qc=Bn({id:Ji().readonly().meta({examples:[va.Beneficiary.id],description:"A unique identifier for this beneficiary."}),createdAt:Si().readonly().meta({examples:[va.Beneficiary.createdAt],description:"Timestamp in ISO 8601 format when this beneficiary was created."}),updatedAt:Si().readonly().meta({examples:[va.Beneficiary.updatedAt],description:"Timestamp in ISO 8601 format when this beneficiary was last updated."}),name:Ji().meta({examples:[va.Beneficiary.name],description:"The account name for this beneficiary."}),currency:Ia.meta({examples:[va.Beneficiary.currency],description:"Three-letter ISO 4217 currency code for payouts."}),gateway:jc.meta({examples:["STRIPE"],description:"The payment gateway used for processing payouts."}),gatewayId:Ji().meta({examples:[va.Beneficiary.gatewayId],description:"The identifier assigned by the payment gateway to this account."}),teamId:Ji().meta({description:"Team that owns this beneficiary account."}),teamIds:Gn(Ji()).meta({examples:[[]],description:"List of team IDs this beneficiary is assigned to. Empty array means available to all teams."}),venueIds:Gn(Ji()).meta({examples:[[]],description:"List of venue IDs this beneficiary is assigned to. Empty array means team-level only (available to all venues)."})}).meta({description:"beneficiary"}),Gc=Bn({city:Ji().optional(),country_code:Ji(),postcode:Ji().optional(),state:Ji().optional(),street_address:Ji().optional()}),Fc=Bn({account_currency:Ji(),account_name:Ji(),account_number:Ji().optional(),account_routing_type1:Ji().optional(),account_routing_value1:Ji().optional(),account_routing_type2:Ji().optional(),account_routing_value2:Ji().optional(),bank_account_category:Ji().optional(),bank_branch:Ji().optional(),bank_country_code:Ji(),bank_name:Ji().optional(),bank_street_address:Ji().optional(),binding_mobile_number:Ji().optional(),fingerprint:Ji().optional(),iban:Ji().optional(),local_clearing_system:Ji().optional(),swift_code:Ji().optional(),transaction_reference:Ji().optional(),account_identifier_type:Ji().optional(),account_identifier_value:Ji().optional()}),Bc=Bn({transfer_methods:Gn(Xn(["SWIFT","LOCAL"])).meta({examples:[["LOCAL"]],description:"Transfer methods supported for this beneficiary"}),beneficiary:Bn({company_name:Ji().optional(),date_of_birth:Ji().optional(),entity_type:Ji().meta({examples:["COMPANY"],description:"Whether the beneficiary is PERSONAL or COMPANY"}),first_name:Ji().optional(),last_name:Ji().optional(),address:Gc,bank_details:Fc,additional_info:Bn({personal_email:en().optional()}).optional()}).meta({description:"Beneficiary details including personal/company info, address, and bank details"})}).meta({description:"Complete beneficiary request structure for Airwallex validation"}),zc=Bc.extend({id:Ji().optional()}),Vc=qc.omit({id:!0,createdAt:!0,updatedAt:!0,currency:!0}).extend({currency:Ia.meta({examples:[va.Beneficiary.currency],description:"Three-letter ISO 4217 currency code for payouts to this beneficiary account"}),airwallex:zc.optional().meta({examples:[va.AirwallexBeneficiary],description:"Airwallex-specific beneficiary details including bank account information and address (required when gateway is AIRWALLEX)"}),teamIds:Gn(Ji()).optional().default([]).meta({examples:[[]],description:"List of team IDs to assign this beneficiary to. Empty array or omitted means available to all teams."}),venueIds:Gn(Ji()).optional().default([]).meta({examples:[[]],description:"List of venue IDs to assign this beneficiary to. Empty array or omitted means team-level only."})}).meta({description:"Schema for creating a new beneficiary account for receiving payouts"}),Yc=qc.pick({id:!0}).meta({description:"Schema for retrieving a single beneficiary by its unique identifier"}),Wc=Yc.meta({description:"Schema for deleting a beneficiary account - requires the beneficiary ID"}),Zc=Bn({teamId:Ji().optional().meta({examples:[va.Team.id],description:"Optional identifier of the team whose beneficiaries to list. When provided, only beneficiaries for that team are returned."}),gateway:Xn(["AIRWALLEX","STRIPE"]).optional().meta({examples:[va.Beneficiary.gateway],description:"Filter beneficiaries by payment gateway provider (optional)"}),currency:Ia.optional().meta({examples:[va.Beneficiary.currency],description:"Filter beneficiaries by currency code (optional)"}),query:Ji().optional().meta({examples:["beneficiary"],description:"Optional search query to filter beneficiaries by name or gateway identifier. When provided, search-backed pagination is used."}),limit:es("beneficiaries").optional(),cursor:Ji().optional().meta({examples:["eyJpZCI6ImJlbl8wMWpwczVjZ3NlNW42bWcxeW1rZXc5dHNmaCJ9"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Query parameters for listing beneficiaries with pagination and optional filters"}),Hc=As(qc,"beneficiaries"),Kc=Bn({beneficiary:qc}),Jc=Bn({min:In().optional().meta({description:"Minimum number of time units for the transfer"}),max:In().optional().meta({description:"Maximum number of time units for the transfer"}),unit:Ji().optional().meta({examples:["day"],description:"Time unit (e.g., 'day', 'hour')"})}).meta({description:"Expected transfer completion time range"}),Qc=Bn({min:In().optional().meta({description:"Minimum transfer amount"}),max:In().optional().meta({description:"Maximum transfer amount"})}).meta({description:"Transfer amount limits"}),Xc=Bn({label:Ji().meta({description:"Display label for the option"}),value:Ji().meta({description:"Value to submit when selected"}),flightTime:Jc.optional().meta({description:"Expected transfer time for TRANSFER_METHOD options"}),transferLimit:Qc.optional().meta({description:"Transfer amount limits for TRANSFER_METHOD options"}),processingTime:Ji().optional().meta({description:"Human-readable processing time description"})}).meta({description:"A selectable option in a form field"}),el=Bn({type:Xn(["INPUT","SELECT","RADIO","TRANSFER_METHOD","DYNAMIC_SELECT"]).meta({examples:["INPUT"],description:"The type of form input to render"}),label:Ji().optional().meta({description:"Display label for the field"}),placeholder:Ji().optional().meta({description:"Placeholder text for input fields"}),description:Ji().optional().meta({description:"Detailed description of the field"}),tip:Ji().optional().meta({description:"Tooltip information shown on hover"}),example:Ji().optional().meta({description:"Example value for the field"}),default:Ji().optional().meta({description:"Default value to pre-populate the field"}),key:Ji().optional().meta({description:"Unique key identifier for the field"}),options:Gn(Xc).optional().meta({description:"Available options for SELECT and RADIO field types"}),refresh:An().optional().meta({description:"When true, changing this field's value should trigger a schema refresh. Note: only documented API parameters (transfer_method, local_clearing_system) actually update the schema."})}).meta({description:"Field definition containing type, label, options, and metadata from Airwallex"}),tl=Bn({pattern:Ji().optional().meta({description:"Regex pattern for field validation"}),type:Ji().optional().meta({description:"Validation type identifier"})}).meta({description:"Validation rules for a form field"}),il=Bn({path:Ji().meta({examples:["beneficiary.bank_details.account_number"],description:"Dot-notation path to the field in the beneficiary request object"}),enabled:An().meta({examples:[!0],description:"Whether this field should be displayed"}),required:An().meta({examples:[!0],description:"Whether this field is required for submission"}),field:el.optional().meta({description:"Field definition with type, label, and options"}),rule:tl.optional().meta({description:"Validation rules for the field"})}).meta({description:"A single field in the beneficiary form schema with display and validation rules"}),nl=Bn({bankCountryCode:Ji().regex(/^[A-Z]{2}$/).meta({examples:["AU"],description:"Two-letter ISO 3166-1 alpha-2 country code for the bank location"}),accountCurrency:Ia.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code for the beneficiary account"}),entityType:Xn(["PERSONAL","COMPANY"]).meta({examples:["COMPANY"],description:"Whether the beneficiary is an individual or a company"}),transferMethod:Xn(["LOCAL","SWIFT"]).optional().meta({examples:["LOCAL"],description:"Transfer method: SWIFT for international wire transfers, LOCAL for domestic transfers"}),localClearingSystem:Ji().optional().meta({examples:["NPP"],description:"Local clearing system for domestic transfers (e.g., NPP, BANK_TRANSFER, BPAY for Australia). Only applicable when transferMethod is LOCAL."}),fieldValues:Jn(Ji(),Ji()).optional().meta({examples:[{"beneficiary.bank_details.account_routing_type1":"phone_number"}],description:"Current values of fields with refresh=true. Used to get dynamic schema updates based on user selections."})}).meta({description:"Parameters to fetch the form schema for a beneficiary."}),rl=Bn({fields:Gn(il).meta({description:"Array of form fields with their display and validation configuration"}),selectedTransferMethod:Xn(["LOCAL","SWIFT"]).optional().meta({examples:["LOCAL"],description:"The transfer method used to generate this schema. When not provided in the request, LOCAL is auto-selected if available."}),selectedLocalClearingSystem:Ji().optional().meta({examples:["NPP"],description:"The local clearing system used to generate this schema, if applicable."})}).meta({description:"Form schema response containing all fields needed to collect beneficiary details"}),ol=ea.route({method:"GET",path:"/beneficiaries/schema",summary:"Get beneficiary form schema",description:"Returns the form schema containing all fields required to create a beneficiary for the given country, currency, entity type, and transfer method combination. Use this to dynamically render the beneficiary creation form.",tags:["Beneficiaries"]}).input(nl.strict()).output(rl),al=Bn({source:Ji().meta({examples:["beneficiary.bank_details.account_number"],description:"Dot-notation path to the field that failed validation"}),code:Ji().meta({examples:["001"],description:"Airwallex validation error code"}),message:Ji().meta({examples:["This field is required"],description:"Human-readable error message"})}).meta({description:"Details about a single validation error for a field"}),sl=Bc.meta({description:"Beneficiary request data to validate against Airwallex rules before creating"}),dl=Bn({valid:An().meta({examples:[!0],description:"Whether the beneficiary request passed all validation rules"}),errors:Gn(al).optional().meta({description:"Array of validation errors when valid is false. Each error contains the field path, error code, and message."})}).meta({description:"Validation result indicating whether the beneficiary request is valid for creation"}),cl=ea.route({method:"POST",path:"/beneficiaries/validate",summary:"Validate beneficiary request",description:"Validates a beneficiary request against Airwallex rules without creating the beneficiary. Use this to provide real-time validation feedback before submission.",tags:["Beneficiaries"]}).input(sl.strict()).output(dl),ll=Xn(["AMOUNT","PERCENT"]),ul=Xn(["TEAM","PROMOTER","EVENTS","SECTIONS","ADMISSIONS"]),pl=Bn({id:Ji().readonly().meta({examples:[va.Coupon.id],description:"A unique identifier for this coupon."}),couponId:Ji().optional().readonly().meta({examples:[va.Coupon.couponId],description:"Duplicate of id field for GSI queries."}),createdAt:Si().readonly().meta({examples:[va.Coupon.createdAt],description:"Timestamp in ISO 8601 format when this coupon was created."}),updatedAt:Si().readonly().meta({examples:[va.Coupon.updatedAt],description:"Timestamp in ISO 8601 format when this coupon was last updated."}),name:Ji().meta({examples:[va.Coupon.name],description:"Internal label for the coupon, visible to event organisers."}),active:An().optional().meta({examples:[va.Coupon.active],description:"Whether this coupon is currently active."}),showHidden:An().optional().meta({examples:[!1],description:"Whether this coupon reveals hidden admissions and sections within its scope."}),kind:ll.meta({examples:["PERCENT"],description:"Type of discount this coupon gives: a fixed amount or a percentage."}),filter:ul.meta({examples:["EVENTS"],description:"Scope of the coupon. TEAM applies to all events in the team. PROMOTER applies to all events by specified promoters. EVENTS/SECTIONS/ADMISSIONS apply to specific items."}),currency:Ia.optional().meta({examples:[va.Coupon.currency],description:"Three-letter ISO 4217 currency code. Required for AMOUNT coupons. Optional for PERCENT coupons - when omitted, applies to all currencies."}),discount:In().min(0).meta({examples:[va.Coupon.discount],description:"The discount value. If kind is 'amount', this is a currency amount. If kind is 'percent', this is a percentage."}),limit:In().meta({examples:[va.Coupon.limit],description:"Maximum number of times the coupon can be redeemed across all customers."}),uses:In().optional().meta({examples:[va.Coupon.uses],description:"Number of times this coupon has been redeemed so far."}),promoters:Gn(Bn({id:Ji().meta({description:"Identifier of a promoter this coupon applies to."}),name:Ji().meta({description:"Name of a promoter this coupon applies to."}),slug:Ji().meta({description:"URL slug of a promoter this coupon applies to."})})).optional().meta({description:"List of promoters this coupon applies to when filter is PROMOTER."}),events:Gn(Bn({id:Ji().meta({description:"Identifier of an event this coupon applies to."}),name:Ji().meta({description:"Name of an event this coupon applies to."}),slug:Ji().meta({description:"URL slug of an event this coupon applies to."})})).optional().meta({description:"List of events this coupon applies to when filter is EVENTS."}),sections:Gn(Bn({id:Ji().meta({description:"Identifier of a section this coupon applies to."}),name:Ji().meta({description:"Name of a section this coupon applies to."}),eventId:Ji().meta({description:"Identifier of the event this section belongs to."})})).optional().meta({description:"List of sections this coupon applies to when filter is 'sections'."}),admissions:Gn(Bn({id:Ji().meta({description:"Identifier of an admission this coupon applies to."}),name:Ji().meta({description:"Name of an admission this coupon applies to."}),eventId:Ji().meta({description:"Identifier of the event this admission belongs to."})})).optional().meta({description:"List of admissions this coupon applies to when filter is 'admissions'."}),saleStartsAt:Xa.meta({examples:[va.Coupon.saleStartsAt],description:"Wall clock time when this coupon becomes valid (no timezone, ISO 8601 format: YYYY-MM-DDTHH:mm:ss)"}),saleEndsAt:Xa.optional().meta({examples:[va.Coupon.saleEndsAt],description:"Wall clock time when this coupon expires (no timezone, ISO 8601 format: YYYY-MM-DDTHH:mm:ss)"}),teamId:Ji().meta({description:"Team that created this coupon."})}).meta({description:"coupon"}),ml=Bn({id:Ji().readonly().meta({examples:[va.CouponCode.id],description:"A unique identifier for this coupon code."}),createdAt:Si().readonly().meta({examples:[va.CouponCode.createdAt],description:"Timestamp in ISO 8601 format when this coupon code was created."}),updatedAt:Si().readonly().meta({examples:[va.CouponCode.updatedAt],description:"Timestamp in ISO 8601 format when this coupon code was last updated."}),name:Ji().meta({examples:[va.CouponCode.name],description:"The code string that customers enter to redeem the coupon."}),active:An().meta({examples:[va.CouponCode.active],description:"Whether this coupon code is currently enabled for use."}),couponId:Ji().meta({examples:[va.Coupon.id],description:"Identifier of the coupon to which this code belongs."}),teamId:Ji().meta({description:"Team that created this coupon code."}),uses:In().int().nonnegative().default(0).readonly().meta({examples:[0],description:"Number of times this specific coupon code has been used in successful orders."})}).meta({description:"coupon-code"}),hl=ml.pick({id:!0});Bn({couponId:Ji().meta({examples:[va.Coupon.id]})}),Bn({name:Ji(),couponId:Ji().optional().meta({examples:[va.Coupon.id]})});const fl=ml.omit({id:!0,createdAt:!0,updatedAt:!0,uses:!0}),yl=ml.omit({createdAt:!0,updatedAt:!0,couponId:!0,teamId:!0,uses:!0}).partial().extend({id:ml.shape.id}),vl=hl,gl=Bn({couponId:Ji().optional().meta({examples:[va.Coupon.id],description:"Optional filter to retrieve coupon codes for a specific coupon"}),teamId:Ji().optional().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"Optional filter to retrieve coupon codes created by a specific team"}),active:$a().optional().meta({examples:[!0],description:"Optional filter to retrieve only active or inactive coupon codes"}),query:Ji().optional().meta({examples:["SUMMER"],description:"Optional search query to filter coupon codes by name. When provided, search-backed pagination is used."}),limit:es("coupon codes").optional(),cursor:Ji().optional().meta({examples:["eyJpZCI6ImNwY18wMWpwczVjZ3NmenR3N2h4Y3ZyMndmdGsyIn0"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Schema for listing coupon codes with optional filtering, search, and pagination"}),bl=As(ml,"codes"),$l=Bn({couponCode:ml}),wl=pl.omit({id:!0,createdAt:!0,updatedAt:!0}).strict().refine((e=>"PERCENT"!==e.kind||e.discount<=100),{path:["discount"],message:"Discount must be 100 or less for PERCENT coupons"}).meta({description:"Schema for creating a new coupon without system-generated fields"}),Il=pl.pick({id:!0}).meta({description:"Schema for retrieving a single coupon by ID"}),El=Il.meta({description:"Schema for deleting a coupon by ID with optional soft-delete filtering"}),kl=Bn({teamId:Ji().meta({examples:[va.Team.id],description:"Unique identifier of the team whose coupons to retrieve"}),active:$a().optional().meta({examples:[!0],description:"Optional filter to retrieve only active or inactive coupons"}),query:Ji().optional().meta({examples:["Half Price"],description:"Optional search query to filter coupons by name or description. When provided, search-backed pagination is used."}),limit:es("coupons").optional(),cursor:Ji().optional().meta({examples:["eyJpZCI6ImNwbl8wMWpwczVjZ3NmenMxa3NxYWV0NWhiYThhYyJ9"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Schema for listing coupons belonging to a specific team with optional filtering and pagination"}),Tl=As(pl,"coupons"),Al=Bn({coupon:pl}),xl=pl.omit({createdAt:!0,updatedAt:!0,teamId:!0}).partial().extend({id:pl.shape.id.meta({examples:[va.Coupon.id],description:"Unique identifier of the coupon to update"}),saleEndsAt:Xa.nullable().optional().meta({examples:[va.Coupon.saleEndsAt],description:"Expiry time. Pass null to remove end date; omit to leave unchanged."}),currency:Ia.nullable().optional().meta({examples:["AUD","USD","GBP"],description:"Three-letter ISO 4217 currency code. Pass null to clear; omit to leave unchanged."})}).strict().refine((e=>"PERCENT"!==e.kind||void 0===e.discount||e.discount<=100),{path:["discount"],message:"Discount must be 100 or less for PERCENT coupons"}).meta({description:"Schema for updating an existing coupon."}),Sl=Bn({id:Oa.readonly().meta({examples:[va.Location.id],description:"Location identifier"}),googlePlaceId:Ji().optional().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID for this location"}),createdAt:Si().meta({examples:[va.Location.createdAt],description:"Timestamp in ISO 8601 format when the location was created"}),updatedAt:Si().meta({examples:[va.Location.updatedAt],description:"Timestamp in ISO 8601 format when the location was last updated"}),name:Ji().meta({examples:[va.Location.name],description:"Location name"}),address:Ji().meta({examples:[va.Location.address],description:"Formatted address"}),city:Ji().optional().meta({examples:[va.Location.city],description:"City name"}),state:Ji().optional().meta({examples:[va.Location.state],description:"State or region"}),postcode:Ji().optional().meta({examples:[va.Location.postcode],description:"Postal code"}),country:Ji().meta({examples:[va.Location.country],description:"Country name"}),latitude:In().min(-90).max(90).meta({examples:[va.Location.latitude],description:"Latitude coordinate"}),longitude:In().min(-180).max(180).meta({examples:[va.Location.longitude],description:"Longitude coordinate"}),timeZone:Ji().min(1).regex(/^[A-Za-z0-9_+-]+(\/[A-Za-z0-9_+-]+)*$/,{message:"Must be a valid IANA timezone identifier format"}).meta({examples:[va.Location.timeZone],description:"IANA timezone identifier (e.g., 'America/New_York', 'Europe/London', 'Australia/Sydney', 'UTC'). Must be validated against the IANA timezone database where used."}),types:Gn(Ji()).optional().meta({examples:[["establishment","point_of_interest","stadium"]],description:"Google Place types indicating the category and nature of this location"}),description:Ji().optional().meta({examples:["Historic outdoor amphitheater known for summer concerts"],description:"AI-generated description of the place, when available"}),image:Wa.optional().meta({description:"Primary location photo"}),venueId:Pa.optional().meta({description:"Venue identifier if this location is a managed venue on the platform"})}).meta({description:"Location with full details including coordinates and timezone"}),Dl=Sl.omit({venueId:!0}).extend({venue:Bn({id:Pa.meta({description:"Venue identifier"}),name:Ji().meta({description:"Venue name"}),slug:Ji().meta({description:"URL-friendly venue slug"}),teamId:Ji().meta({description:"Team that owns this venue"}),approval:wa.meta({description:"Venue approval status"}),image:Wa.optional().meta({description:"Venue image"}),description:Ji().optional().meta({description:"Venue description"})}).optional().meta({description:"Denormalized venue details if this location is a managed venue. Only included when venue is approved."})}),Cl=Ji().regex(/^G-[A-Z0-9]+$/,"Google Analytics Measurement ID must start with G-"),Pl=Bn({id:Ua.readonly().meta({examples:[va.Promoter.id],description:"Unique identifier for the promoter organization"}),createdAt:Si().readonly().meta({examples:[va.Promoter.createdAt],description:"Timestamp in ISO 8601 format when the promoter was created"}),updatedAt:Si().readonly().meta({examples:[va.Promoter.updatedAt],description:"Timestamp in ISO 8601 format when the promoter was last updated"}),name:Ji().min(3).max(30).meta({examples:[va.Promoter.name],description:"Display name of the promoter organization. Must be between 3 and 30 characters"}),slug:Ji().min(3).max(30).meta({examples:[va.Promoter.slug],description:"URL-friendly slug for the promoter organization. Must be unique and between 3 and 30 characters"}),teamId:Da.meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"ID of the team that owns this promoter. Establishes team-based organization and permissions."}),description:Ji().meta({examples:[va.Promoter.description],description:"Detailed description of the promoter organization and their events"}),approval:wa.meta({examples:[va.Promoter.approval],description:"Approval status of the promoter. PENDING: awaiting review, APPROVED: can create events, REJECTED: cannot operate"}),image:Wa.optional().meta({description:"Optional promotional image for the promoter organization with dimensions and alt text"}),location:Dl.meta({description:"Primary location details for the promoter including address, coordinates, and timezone"}),geohash:Ji().meta({examples:[va.Promoter.geohash],description:"Geohash encoding of the promoter's location for efficient spatial queries"}),tracking:Bn({fbId:Ji().optional().meta({examples:[va.Promoter.tracking.fbId],description:"Facebook pixel ID for tracking conversions and analytics"}),gaId:Cl.optional().meta({examples:[va.Promoter.tracking.gaId],description:"Google Analytics 4 Measurement ID for web analytics"}),tikTokId:Ji().optional().meta({examples:[va.Promoter.tracking.tikTokId],description:"TikTok pixel ID for advertising and conversion tracking"})}).optional().meta({description:"Optional tracking configuration for analytics and advertising platforms"}),metadata:Qa}).meta({description:"Promoter organization with location and approval status"}),Ol=Bn({id:Ji().readonly().meta({examples:[va.Section.id],description:"Unique identifier for the section"}),createdAt:Si().readonly().meta({examples:[va.Section.createdAt],description:"Timestamp when the section was created in ISO 8601 format"}),updatedAt:Si().readonly().meta({examples:[va.Section.updatedAt],description:"Timestamp when the section was last updated in ISO 8601 format"}),name:Ji().meta({examples:[va.Section.name],description:"Display name of the section (e.g., 'VIP Area', 'General Admission')"}),capacity:Za().prefault(-1).meta({examples:[va.Section.capacity],description:"Maximum number of attendees for this section. Use -1 for unlimited capacity"}),limit:Ha().prefault(-1).meta({examples:[va.Section.limit??-1],description:"Maximum number of tickets for this section that can be purchased in a single order. A value of -1 indicates unlimited"}),available:In().min(-1).readonly().meta({examples:[va.Section.available],description:"Number of tickets currently available for purchase in this section. Use -1 when capacity is unlimited"}),sold:In().min(0).readonly().meta({examples:[va.Section.sold],description:"Number of tickets sold for this section"}),reserved:In().readonly().meta({examples:[va.Section.reserved],description:"Number of tickets currently reserved (in pending orders) for this section"}),order:In().min(0).meta({examples:[va.Section.order],description:"Display order of the section. Lower numbers appear first in listings"}),visibility:Xn(["ALWAYS","STACKED","HIDDEN"]).prefault("ALWAYS").meta({examples:["ALWAYS"],description:"Controls how this section is shown: always list all visible admissions, stack to show the cheapest available admission, or hide until a scoped coupon reveals it."}),location:Sl.meta({description:"Physical location details for the section"}),teamId:Ji().meta({description:"Team that owns this section. Denormalized for efficient queries."}),promoterId:Ji().meta({examples:[va.Section.promoterId],description:"Unique identifier of the promoter who owns this section"}),eventId:Ji().meta({examples:[va.Section.eventId],description:"Unique identifier of the event this section belongs to"}),eventSlug:Ji().meta({examples:[va.Section.eventSlug],description:"URL-friendly identifier of the event this section belongs to"})}).meta({description:"A section represents a distinct area or tier within an event venue with its own capacity and pricing"}),_l=Xn(["AUD","NZD","USD"]),Rl=Xn(["FEATURE_DISABLED","UNSUPPORTED_CURRENCY","NOT_ROUTED","NO_CONNECTED_GATEWAY","CHARGES_DISABLED","INCOMPATIBLE_FEE_STRUCTURE"]),Nl=Bn({available:An().meta({description:"Whether Stripe Connect can be used for the selected team, event, and currency."}),reasons:Gn(Rl).meta({description:"Machine-readable reasons Stripe Connect is unavailable. Empty when available is true."}),supportedCurrencies:Gn(_l).meta({description:"Currencies currently supported for Stripe Connect routing in this tenant flow."})});Bn({code:tr("STRIPE_CONNECT_UNAVAILABLE").meta({description:"Stable error code returned when Stripe Connect is unavailable."}),availability:Nl.meta({description:"Detailed Stripe Connect availability result for UI filtering and recovery."})});const Ul=Xn(["UPCOMING","ENDED"]),Ml=Xn(["PUBLIC","PRIVATE","SCHEDULED","PASSCODE","CANCELLED"]),Ll=Xn(["HIDDEN","SCHEDULED","PUBLIC"]),jl=Bn({visibility:Ll.optional().meta({description:"Whether public event surfaces show the full location address. Missing values are treated as PUBLIC unless legacy location reveal data says otherwise."}),publishAt:Xa.optional().meta({description:"Wall clock time when the location address becomes public. Required when location visibility is SCHEDULED."}),sendAt:Xa.optional().meta({description:"Wall clock time when customers with successful orders can see the full location address and receive the notification."}),instructions:Ji().max(2e3).optional().meta({description:"Arrival instructions shown to customers once the location address has been sent."})}),ql=Dl.extend(jl.shape),Gl=Bn({id:Ca.readonly().meta({examples:[va.Event.id],description:"A unique identifier for this event"}),createdAt:Si().readonly().meta({examples:[va.Event.createdAt],description:"Timestamp in ISO 8601 format when this event was created"}),updatedAt:Si().readonly().meta({examples:[va.Event.updatedAt],description:"Timestamp in ISO 8601 format when this event was last updated"}),name:Ji().meta({examples:[va.Event.name],description:"The title of the event shown to attendees"}),slug:Ji().meta({examples:[va.Event.slug],description:"URL-friendly identifier for the event"}),description:Ji().meta({examples:[va.Event.description],description:"Detailed description of the event"}),approval:wa.meta({examples:["APPROVED"],description:"Approval status of the event"}),status:Ul.meta({examples:["UPCOMING","ENDED"],description:"Current stage of the event lifecycle"}),visibility:Ml.meta({examples:["PUBLIC"],description:"Who can see the event"}),currency:Ia.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code used for ticket prices"}),url:on().optional().meta({examples:["https://example.com"],description:"External URL for the event website or ticket page"}),entryStartsAt:Xa.meta({examples:[va.Event.entryStartsAt],description:"Wall clock time when event entry begins (no timezone, displays same everywhere)"}),entryEndsAt:Xa.meta({examples:[va.Event.entryEndsAt],description:"Wall clock time when event entry ends (no timezone, displays same everywhere)"}),publishAt:Xa.meta({examples:[va.Event.publishAt],description:"Wall clock time when the event becomes publicly visible (no timezone)"}),locationRevealAt:Xa.optional().meta({description:"Deprecated. Use location.sendAt for customer access and location.publishAt for scheduled public address visibility."}),entryInstructions:Ji().max(2e3).optional().meta({description:"Deprecated. Use location.instructions for customer-facing arrival instructions."}),images:Bn({mobile:Wa.meta({description:"Mobile-optimized image for the event"}),desktop:Wa.meta({description:"Desktop-optimized image for the event"})}),geohash:Ji().meta({examples:[va.Event.geohash],description:"Geohash representing the event location"}),location:ql.meta({description:"Structured location details for the event"}),teamId:Da.meta({description:"Team that owns this event. Denormalized for efficient queries."}),promoterId:Ua.meta({examples:[va.Promoter.id],description:"Promoter organizing the event. Must belong to the team."}),metadata:Qa,genres:Gn(Ji()).optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:Gn(Ji()).optional().meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]}),featured:An().optional().meta({description:"Whether this event is an editorial pick",examples:[!0]}),likes:In().int().min(0).optional().meta({description:"Number of users who liked this event",examples:[42]}),stripeConnectAvailability:Nl.optional().meta({description:"Stripe Connect availability metadata for tenant event UI."})}).meta({description:"event"}),Fl=Pl.pick({id:!0,name:!0,slug:!0,description:!0,image:!0}),Bl=Bn({event:Gl.extend({passcode:Ji().optional().meta({description:"Plain-text event passcode. Included only on internal event detail responses for users with event.read access."}),sections:Gn(Ol),admissions:Gn(ws),promoter:Fl.optional().meta({description:"Public summary of the promoter organizing this event. Included on event detail responses only."}),liked:An().optional().meta({description:"Whether the current user has liked this event",examples:[!0,!1]})})}),zl=Xn(["APPROVED","REJECTED"]);Xn(["CREATED","UPDATED","MANUAL"]);const Vl=Bn({key:Ji().meta({examples:[va.Event.id,va.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),teamId:Da.optional().meta({description:"Optional team scope. When provided, event must belong to this team."})}).meta({description:"Schema for retrieving internal event approval state."}),Yl=Bn({eventId:Ca,teamId:Da,approval:wa,reason:Ji().max(2e3).nullable(),requestedAt:Si().nullable(),changedAt:Si().nullable(),changedByUserId:Ji().nullable(),submittedByUserId:Ji().nullable()}).meta({description:"Internal approval workflow state for an event."}),Wl=Bn({approval:Yl}),Zl=Vl.meta({description:"Schema for requesting or resubmitting event approval."}),Hl=Bn({key:Ji().meta({examples:[va.Event.id,va.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),approval:zl.meta({examples:["APPROVED"],description:"Approval decision for the event"}),reason:Ji().max(2e3).optional().meta({description:"Optional reason shown to the event submitter when rejecting the event"}),requestedAt:Si().optional().meta({description:"Approval request timestamp from an email action. When provided, the event must still be pending for that request."})}).meta({description:"Schema for approving or rejecting an event."}),Kl=Gl.omit({id:!0,teamId:!0,createdAt:!0,updatedAt:!0,status:!0,approval:!0,geohash:!0,location:!0,likes:!0,stripeConnectAvailability:!0}).extend({slug:Ji().min(3).max(100).optional().meta({examples:[va.Event.slug],description:"URL-friendly slug for the event. If not provided, will be automatically generated from the name. Must be unique and between 3 and 100 characters"}),passcode:Ji().optional().meta({description:"Passcode for protected access to the event"}),locationId:Oa.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location. Either locationId or googlePlaceId must be provided."}),googlePlaceId:Ji().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to create a new location from. Either locationId or googlePlaceId must be provided."}),location:jl.optional().meta({description:"Event-specific location visibility, customer send time, and arrival instructions."}),genres:Aa.optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:ka.meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]})}).refine((e=>e.locationId||e.googlePlaceId),{message:"Either locationId or googlePlaceId must be provided"}),Jl=Bn({key:Ji().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[va.Event.id,va.Event.slug]})}),Ql=Bn({key:Ji().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[va.Event.id,va.Event.slug]}),name:Ji().min(1).meta({description:"Name for the duplicated event",examples:[va.Event.name+" (Copy)"]}),entryStartsAt:Xa.meta({description:"New event entry start time. Other copied event and admission datetimes are shifted by the same offset.",examples:[va.Event.entryStartsAt]}),url:on().nullable().optional().meta({description:"External ticketing URL for the duplicated event. Pass null to create the copy without an external URL; omit to copy the source URL.",examples:["https://example.com/events/summer-festival-2025"]})}),Xl=Bn({key:Ji().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[va.Event.id,va.Event.slug]}),featured:An().meta({description:"Whether the event should be featured (editorial pick)",examples:[!0,!1]})}),eu=Bn({key:Ji().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[va.Event.id,va.Event.slug]}),passcode:Ji().optional().meta({description:"Passcode for accessing protected events"}),couponCode:Ji().optional().meta({description:"Coupon code used to reveal hidden admissions and sections when eligible."}),teamId:Ji().optional().meta({description:"Optional team scope. When provided, event must belong to this team."})}),tu=Bn({sold:In().min(0).meta({description:"Number of tickets sold (net of refunds)"}),reserved:In().min(0).meta({description:"Number of tickets reserved"}),available:In().min(-1).meta({description:"Number of tickets available (-1 for unlimited)"}),capacity:In().min(-1).meta({description:"Total capacity (-1 for unlimited)"})}),iu=Xn(["entryStartsAt","createdAt"]),nu=Xn(["asc","desc"]),ru=zn({status:Xn(["UPCOMING","ENDED"]).optional().meta({examples:["UPCOMING"],description:"Filter events by their current lifecycle status"}),approval:wa.optional().meta({examples:["APPROVED"],description:"Filter events by their approval status"}),visibility:Xn(["PUBLIC","PRIVATE","SCHEDULED","PASSCODE"]).optional().meta({examples:["PUBLIC"],description:"Filter events by their visibility setting"}),promoterId:Ji().max(128).optional().meta({examples:[va.Promoter.id],description:"Filter events to only those belonging to a specific promoter. If not provided, returns events from all promoters the user has access to"}),teamId:Ji().max(128).optional().meta({description:"Filter events to only those belonging to a specific team. If not provided, returns events from all teams the user has access to"}),venueId:Ji().max(128).optional().meta({description:"Filter events to only those at a specific venue. If not provided, returns events at all venues"}),limit:ba().min(1).max(100).prefault(20).meta({examples:[20],description:"Maximum number of events to return in each result set. Must be between 1 and 100, defaults to 20"}),cursor:Ji().max(768).optional().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Cursor token for pagination. Provide the cursor from the previous response to continue fetching results"}),query:function(){return new Ki({type:"string",coerce:!0,...C(undefined)})}(0,void 0).max(120).optional().meta({examples:["Test Event"],description:"Search term to filter events by name, description, or location. Triggers full‑text search when provided"}),latitude:ba().min(-90).max(90).optional().meta({examples:[va.Event.location.latitude],description:"Latitude coordinate for geographic search. Provide with longitude (and optional radius)"}),longitude:ba().min(-180).max(180).optional().meta({examples:[va.Event.location.longitude],description:"Longitude coordinate for geographic search. Provide with latitude (and optional radius)"}),radius:ba().positive().max(2e4).optional().meta({examples:[20],description:"Search radius in kilometers from the provided coordinates. Defaults to 20km"}),country:Ji().max(120).optional().meta({examples:["australia"],description:"Filter by country region slug. Matches events where location.country equals the region name"}),state:Ji().max(120).optional().meta({examples:["nsw"],description:"Filter by state/province region slug. Matches events where location.state equals the region name"}),city:Ji().max(120).optional().meta({examples:["sydney"],description:"Filter by city region slug. Matches events where location.city equals the region name"}),from:Ji().date().optional().meta({examples:["2024-01-01"],description:"Filter events that start on or after this date (YYYY-MM-DD format). Events with entryStartsAt >= from"}),to:Ji().date().optional().meta({examples:["2024-12-31"],description:"Filter events that start on or before this date (YYYY-MM-DD format). Events with entryStartsAt <= to"}),sort:iu.optional().meta({examples:["createdAt"],description:"Optional list sort field. Defaults to event start time. Use `createdAt` to return newest or oldest events first."}),direction:nu.optional().meta({examples:["desc"],description:"Sort direction for event lists. Defaults to lifecycle-aware event start order unless `sort` is provided."}),genres:Gn(Ta).max(20,"Cannot filter by more than 20 genres").optional().meta({examples:[["Tech House","Melodic Techno"]],description:"Filter events by music genre(s). Returns events matching ANY of the provided genres (OR logic). Maximum 20 genres"}),categories:Gn(Ea).max(10,"Cannot filter by more than 10 categories").optional().meta({examples:[["Day Party","Open Air"]],description:"Filter events by category(s). Returns events matching ANY of the provided categories (OR logic). Maximum 10 categories"}),featured:An().optional().meta({examples:[!0],description:"Filter to only featured (editorial pick) events"})}).meta({description:"List events with filtering, full‑text search, geo queries, date range filtering, genre/category filtering, and cursor-based pagination"}),ou=ru,au=$s({booking:"Booking fee for the cheapest publicly purchasable admission, in cents",currency:"Three-letter ISO 4217 currency code for the cheapest publicly purchasable admission",price:"Cheapest publicly purchasable admission price for this event, selected by base price"}),su=As(Gl.extend({inventory:tu.optional(),liked:An().optional().meta({description:"Whether the current user has liked this event",examples:[!0,!1]}),price:au.nullable().meta({description:"Cheapest publicly purchasable admission price, or null when no public admission is currently available"})}),"events"),du=Bn({event:Gl});Xn(["ONLINE","DOOR","SALE_ENDED","SOLD_OUT"]);const cu=ru.omit({cursor:!0,limit:!0}).extend({limit:ba().int().min(1).max(1e3).prefault(1e3).meta({examples:[1e3],description:"Maximum number of event slugs to return. Must be between 1 and 1000, defaults to 1000"}),skip:ba().int().min(0).max(1e4).prefault(0).meta({examples:[0],description:"Number of matching event slugs to skip before returning results"})}),lu=Bn({slugs:Gn(Ji()).meta({description:"Current event slugs for the matching event list"}),skip:ba().int().min(0).meta({examples:[0],description:"Number of matching event slugs skipped"}),limit:ba().int().min(1).max(1e3).meta({examples:[1e3],description:"Maximum number of event slugs returned"})}),uu=Bn({visibility:Ll.optional().meta({description:"Whether public event surfaces show the full location address. Omit to leave unchanged."}),publishAt:jl.shape.publishAt.nullable().optional().meta({description:"Public location address publish time. Pass null to clear; omit to leave unchanged."}),sendAt:jl.shape.sendAt.nullable().optional().meta({description:"Customer location address send time. Pass null to clear; omit to leave unchanged."}),instructions:jl.shape.instructions.nullable().optional().meta({description:"Arrival instructions for customers. Pass null to clear; omit to leave unchanged."})}),pu=Gl.omit({createdAt:!0,updatedAt:!0,geohash:!0,status:!0,approval:!0,location:!0,likes:!0,stripeConnectAvailability:!0}).partial().extend({key:Ji().meta({examples:[va.Event.id,va.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),slug:Ji().min(3).max(100).optional().meta({examples:[va.Event.slug],description:"URL-friendly slug for the event. Omit to leave unchanged. Must be unique and between 3 and 100 characters"}),passcode:Ji().nullable().optional().meta({description:"Passcode for protected access. Pass null to clear; omit to leave unchanged."}),url:on().nullable().optional().meta({examples:["https://example.com/events/summer-festival-2025"],description:"External event URL. Pass null to clear; omit to leave unchanged."}),locationRevealAt:Gl.shape.locationRevealAt.nullable().optional().meta({description:"Wall clock time when the venue address becomes visible. Pass null to clear before reveal; omit to leave unchanged."}),entryInstructions:Gl.shape.entryInstructions.nullable().optional().meta({description:"Entrance instructions sent when the location is revealed. Pass null to clear; omit to leave unchanged."}),locationId:Oa.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:Ji().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."}),location:uu.optional().meta({description:"Event-specific location visibility, public publish time, customer send time, and arrival instructions."}),genres:Aa.optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:ka.meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]}),notify:An().optional().meta({description:"Whether attendees should be notified about this event update.",examples:[!0]})}).meta({description:"Schema for updating an existing event."}),mu=Bn({id:Ba.readonly().meta({description:"Unique identifier for the event collaborator"}),createdAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the collaborator was added"}),updatedAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the collaborator was last updated"}),eventId:Ca.meta({description:"Event this collaboration applies to"}),promoterId:Ua.meta({description:"Promoter collaborating on the event"}),acceptedBy:_a.meta({description:"User ID who accepted the invitation to collaborate"}),promoter:Bn({id:Ua.meta({description:"Unique identifier of the promoter"}),name:Ji().meta({description:"Name of the promoter"}),teamId:Da.meta({description:"Team ID of the promoter"})}).optional().meta({description:"Populated promoter details. Only included when explicitly requested."}),permissions:ms.meta({description:"Permissions granted to this collaborator. User must have permission in BOTH this grant AND their team membership (intersection).",examples:[[],["event.read","event.write"],["order.read"],["ticket.scan"],["*"]]}),tenantId:Ji().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Active event collaborator. Created when a promoter accepts an invitation or is directly added to an event. Hard deleted when removed."}),hu=mu.pick({id:!0,eventId:!0}).meta({description:"Schema for accepting an event promoter collaboration invitation. User accepting must be a member of the invited promoter's team."}),fu=Bn({id:Ba.readonly().meta({description:"Unique identifier for the event collaboration invitation"}),createdAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was created"}),updatedAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was last updated"}),eventId:Ca.meta({description:"Event this invitation applies to"}),promoterId:Ua.meta({description:"Promoter being invited to collaborate on the event."}),invitedByPromoterId:Ua.meta({description:"Promoter who sent this invitation (event owner or collaborator with permission)."}),permissions:ms.meta({description:"Permissions the promoter will receive upon accepting the invitation.",examples:[[],["event.read","event.write"],["order.read"],["ticket.scan"],["*"]]}),token:Ji().readonly().meta({description:"Secure token for invite acceptance. Required to accept the invitation."}),invitedBy:_a.meta({description:"User ID who sent the invitation"}),expiresAt:In().int().positive().meta({description:"Unix timestamp (seconds) for DynamoDB TTL. Invitation will be automatically deleted after 7 days."}),tenantId:Ji().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Pending event collaborator invitation. Automatically deleted after 7 days via DynamoDB TTL. When accepted, creates an EventCollaborator record and deletes the invitation."}),yu=fu.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,token:!0,expiresAt:!0,invitedByPromoterId:!0}).meta({description:"Schema for inviting a promoter to collaborate on an event. Creates a pending invitation that the promoter can accept."}),vu=Bn({eventId:Ca.meta({description:"Event ID that the collaboration belongs to"}),id:Ba.meta({description:"Event team access grant ID to retrieve"})}),gu=Bn({invite:fu}),bu=Bn({eventId:Ji().meta({description:"Event ID to list collaborators for"}),accessPromoterId:Ji().optional().meta({description:"DEPRECATED: Use 'promoterId' instead. Filter by collaborating promoter ID (what events can this promoter access). Maintained for backward compatibility."}),ownerPromoterId:Ji().optional().meta({description:"DEPRECATED: No longer used. Maintained for backward compatibility only."}),limit:es("event collaborators"),cursor:Ji().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing active event collaborations with pagination and filtering. Only returns accepted collaborations (not pending invitations). Use invite endpoints for pending invitations."}),$u=As(mu,"grants"),wu=Bn({collaborator:mu}),Iu=Bn({key:Ji().min(1).meta({description:"Location key - either a location ID (loc_xxx format) or provider-specific identifier (e.g., Google Place ID)",examples:[va.Location.id,"ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}),Eu=Bn({query:Ji().min(1).meta({examples:["sydney opera"],description:"Search query for location search"}),latitude:ba().min(-90).max(90).optional().meta({examples:[va.Location.latitude],description:"User's latitude for proximity-based results (optional for better relevance)"}),longitude:ba().min(-180).max(180).optional().meta({examples:[va.Location.longitude],description:"User's longitude for proximity-based results (optional for better relevance)"}),types:Gn(Ji()).optional().meta({examples:[["establishment"]],description:"Filter results by Google Place types (e.g., 'establishment', 'night_club', 'bar')"})}).meta({description:"Parameters for searching locations"}),ku=Bn({googlePlaceId:Ji().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID for this location"}),name:Ji().meta({examples:[va.Location.name],description:"Primary name of the location"}),description:Ji().meta({examples:[va.Location.address],description:"Full formatted address"}),venue:Bn({id:Pa.meta({examples:[va.Venue.id],description:"Venue ID if this location is a managed venue"}),name:Ji().meta({examples:[va.Venue.name],description:"Venue name"}),teamId:Ji().meta({description:"Team that manages this venue"}),image:Wa.optional().meta({description:"Primary venue image"})}).optional().meta({description:"Present if this location is a managed venue on the platform"})}).meta({description:"Single location search result with optional venue overlay"}),Tu=Bn({predictions:Gn(ku).meta({description:"Array of location predictions"})}).meta({description:"Response containing location search results"}),Au=Bn({location:Dl}),xu=Bn({name:Ji().meta({examples:["tenant-web","team-web","api","partner"],description:"Free-form channel identifier describing where the order originated."}),referrer:Ji().optional().meta({examples:["https://sash.teams.mixmag.au/events/example-event"],description:"Optional referrer URL captured at order creation for redirect routing and attribution."}),utmSource:Ji().optional().meta({examples:["instagram"],description:"Optional UTM source captured from the originating URL."}),utmMedium:Ji().optional().meta({examples:["social"],description:"Optional UTM medium captured from the originating URL."}),utmCampaign:Ji().optional().meta({examples:["summer-launch"],description:"Optional UTM campaign captured from the originating URL."}),deviceType:Xn(["MOBILE","TABLET","DESKTOP"]).optional().meta({examples:["MOBILE"],description:"Optional analytics device classification captured at order creation."}),browser:Ji().optional().meta({examples:["Chrome"],description:"Optional analytics browser classification captured at order creation."}),country:Ji().optional().meta({examples:["Australia"],description:"Optional viewer country captured at order creation for analytics attribution."}),region:Ji().optional().meta({examples:["Australia - New South Wales"],description:"Optional viewer region captured at order creation for analytics attribution."}),sessionId:Ji().optional().meta({examples:["ses_01HX..."],description:"Session ID captured at order creation for client/server analytics linking."}),anonymousId:Ji().optional().meta({examples:["aid_01HX..."],description:"Browser anonymous ID captured at order creation for attribution linking."})}),Su=Bn({id:Ji().meta({examples:[va.CouponCode.id],description:"Unique identifier of the coupon code used in the order"}),name:Ji().meta({examples:[va.CouponCode.name],description:"The coupon code string that was entered by the customer"}),couponId:Ji().meta({examples:[va.CouponCode.couponId],description:"Unique identifier of the parent coupon configuration"})}),Du=Bn({id:Ji().meta({examples:[va.Customer.id],description:"Unique identifier of the customer who placed the order"}),firstName:Ji().meta({examples:[va.Customer.firstName],description:"First name of the customer"}),lastName:Ji().meta({examples:[va.Customer.lastName],description:"Last name of the customer"}),email:en().meta({examples:[va.Customer.email],description:"Email address of the customer"}),phone:Ji().meta({examples:[va.Customer.phone],description:"Customer phone number in E.164 format for SMS delivery"}).optional()}),Cu=Bn({id:Ji().meta({examples:[va.Event.id],description:"Unique identifier of the event associated with the order"}),name:Ji().meta({examples:[va.Event.name],description:"Display name of the event"}),slug:Ji().meta({examples:[va.Event.slug],description:"URL-friendly slug of the event"}),location:Ji().meta({examples:[va.Event.location.name],description:"Name of the venue or location where the event takes place"}).optional(),locationAddress:Ji().optional().meta({examples:[va.Event.location.address],description:"Full venue address, available once the event location is revealed."}),locationLatitude:In().optional().meta({examples:[va.Event.location.latitude],description:"Venue latitude, available once the event location is revealed."}),locationLongitude:In().optional().meta({examples:[va.Event.location.longitude],description:"Venue longitude, available once the event location is revealed."}),entryInstructions:Ji().max(2e3).optional().meta({description:"Latest entry instructions for customers once the event location is revealed."})}),Pu=Xn(["GATEWAY","SHIPPING","SMS_DELIVERY"]).meta({description:"Type of fee applied to an order"}),Ou=Bn({id:Ji().meta({examples:[va.OrderFee.id],description:"Unique identifier for this order fee"}),createdAt:Si().readonly().meta({examples:[va.OrderFee.createdAt],description:"Timestamp in ISO 8601 format when this fee was created"}),reason:Ji().meta({examples:[va.OrderFee.reason],description:"Description explaining why this fee was applied to the order"}),amount:In().finite("Amount must be a valid number").meta({examples:[va.OrderFee.amount],description:"Fee amount in cents (positive value indicates charge to customer, negative value indicates credit or discount)"}),currency:Ia.meta({examples:[va.OrderFee.currency],description:"Currency code in ISO 4217 format"}),requestId:Ji().meta({examples:[va.OrderFee.requestId],description:"External payment processor request identifier for tracking this fee"}),kind:Pu.optional().meta({examples:["GATEWAY"],description:"Type of fee for categorization and reporting"})}),_u=Bn({net:kn().min(0).meta({examples:[va.OrderItem.price.net],description:"Total amount to pay to promoter in cents.\nCalculated as: total - booking - refunded"}),total:kn().min(0).meta({examples:[va.OrderItem.price.total],description:"Total amount the customer should pay in cents.\nCalculated as: gross - discount"}),gross:kn().min(0).meta({examples:[va.OrderItem.price.gross],description:"Total amount before refunds and discounts in cents.\nCalculated as: base + booking"}),base:kn().min(0).meta({examples:[va.OrderItem.price.base],description:"Total ticket price in cents"}),booking:kn().min(0).meta({examples:[va.OrderItem.price.booking],description:"Total booking fees in cents (non-refundable)"}),refunded:kn().max(0).meta({examples:[va.OrderItem.price.refunded],description:"Total amount refunded in cents"}),discount:kn().max(0).meta({examples:[va.OrderItem.price.discount],description:"Total amount discounted in cents"}),currency:Ia.meta({examples:[va.OrderItem.price.currency],description:"Currency code in ISO 4217 format."})}),Ru=Xn(["ADMISSION","ADDON"]),Nu=Bn({id:Ji().meta({examples:[va.OrderItem.id],description:"Unique identifier for this order item"}),kind:Ru.meta({examples:[va.OrderItem.kind],description:"Type of item: ADMISSION for tickets, ADDON for additional products or services"}),quantity:kn().min(1).meta({examples:[va.OrderItem.quantity],description:"Number of items purchased (minimum 1)"}),admissionId:Ji().optional().meta({examples:[va.OrderItem.admissionId],description:"Unique identifier of the admission ticket type, required for ADMISSION items"}),sectionId:Ji().optional().meta({examples:[va.OrderItem.sectionId],description:"Unique identifier of the venue section for this admission"}),admission:ws.optional().meta({examples:[va.Admission],description:"Complete admission details captured at time of purchase. This is a snapshot that preserves the exact ticket type information as it was when the order was placed"}),section:Ol.optional().meta({examples:[va.Section],description:"Complete section details captured at time of purchase. This is a snapshot that preserves the exact venue area or category information as it was when the order was placed"}),price:_u.meta({description:"Pricing breakdown for this order item including all fees and discounts"})}),Uu=Bn({promoter:An(),tenant:An()}),Mu=Xn(["SMS_DELIVERY"]).meta({description:"Type of pre-computed offer available for this order"}),Lu=Bn({amount:kn().min(0).meta({examples:[200],description:"Offer price in the smallest currency unit (e.g. cents)"}),currency:Ia.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code"})}),ju=Bn({kind:Mu.meta({examples:["SMS_DELIVERY"],description:"Discriminator identifying the type of offer"}),label:Ji().meta({examples:["SMS ticket delivery"],description:"Human-readable label for the offer"}),price:Lu.meta({description:"Pre-computed price for this offer"})}),qu=Xn(["FREE","AIRWALLEX","STRIPE"]),Gu=Xn(["AMERICAN_EXPRESS","CARTES_BANCAIRES","CHINA_UNION_PAY","DINERS_CLUB_INTERNATIONAL","DISCOVER","EFTPOS_AUSTRALIA","INTERAC","JCB","LINK","MAESTRO","MASTERCARD","OTHER","UNKNOWN","UNION_PAY","VISA"]),Fu=Xn("ACH_DIRECT_DEBIT.ACSS_DEBIT.AFFIRM.AFTERPAY.ALFAMART.ALIPAY.ALIPAYCN.ALIPAYHK.ALMA.AMEX_EXPRESS_CHECKOUT.AMAZON_PAY.APPLEPAY.ATOME.BACS_DIRECT_DEBIT.BANCONTACT.BANK_TRANSFER.BECS_DIRECT_DEBIT.BILLIE.BITPAY.BLIK.BOLETO.BOOST.CARD.CARD_PRESENT.CASHAPP.CRYPTO.CUSTOM.CUSTOMER_BALANCE.DANA.DOKU_EWALLET.DRAGONPAY.DUIT_NOW.EFT_DIRECT_DEBIT.EPS.ESUN.FAMILY_MART.FPX.FPS.GCASH.GIROPAY.GOOGLEPAY.GO_PAY.GRABPAY.HI_LIFE.IDEAL.INDOMARET.INTERAC_PRESENT.JENIUS_PAY.KAKAOPAY.KLARNA.KONBINI.KOREAN_LOCAL_CARD.LINK.LINKAJA.MASTERPASS.MAXIMA.MB_WAY.MOBILEPAY.MULTIBANCO.MYBANK.NARVESEN.NAVER_PAY.NZ_BANK_ACCOUNT.ONLINE_BANKING.OVO.OXXO.P24.PAYBYBANKAPP.PAYCO.PAYEASY.PAYPAL.PAYPAY.PAYSAFECASH.PAYSAFECARD.PAYSERA.PAY_NOW.PERLAS_TERMINALS.PIX.PROMPTPAY.RABBIT_LINE_PAY.REVOLUT_PAY.SAMSUNG_PAY.SATISPAY.SEPA_DIRECT_DEBIT.SEVEN_ELEVEN.SHOPEE_PAY.SKRILL.SOFORT.SWISH.TNG.TOSS_PAY.TRUEMONEY.TRUSTLY.TWINT.VERKKOPANKKI.VISA_CHECKOUT.WECHATPAY.ZIP".split(".")),Bu=Bn({method:qu.meta({examples:["FREE"],description:"Payment gateway used to process this order: FREE for no-cost orders, AIRWALLEX or STRIPE for paid orders"}),source:Fu.optional().meta({examples:["APPLEPAY","GOOGLEPAY","CARD"],description:"Payment method used by the customer such as ApplePay, GooglePay, or card-based payments"}),brand:Gu.optional().meta({examples:["VISA","MASTERCARD","AMERICAN_EXPRESS"],description:"Card brand when source is CARD (Visa, Mastercard, American Express, etc.)"}),last4:Ji().optional().meta({examples:["4242"],description:"Last 4 digits of the card number when source is CARD"}),stripeId:Ji().optional().meta({examples:["pi_1234567890abcdef"],description:"Stripe payment intent identifier when using Stripe gateway"}),stripeClientSecret:Ji().optional().meta({examples:["pi_1234567890abcdef_secret_xyz"],description:"Stripe PaymentIntent client secret associated with the order, used to complete the payment flow"}),stripeCustomerSessionClientSecret:Ji().optional().meta({examples:["cuss_1234567890abcdef_secret_xyz"],description:"Stripe CustomerSession client secret used by the Payment Element to offer and redisplay saved payment methods"}),stripeAccountId:Ji().optional().meta({examples:["acct_1234567890abcdef"],description:"Connected Stripe account ID for direct charges. When present, payment is processed directly on the connected account rather than the platform account."}),airwallexId:Ji().optional().meta({examples:["int_hkdmr7v9rg1j8donpkmv96"],description:"Airwallex payment intent identifier when using Airwallex gateway"}),airwallexClientSecret:Ji().optional().meta({examples:["eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiaW50ZW50X2lkIjoiaW50X2hrZG1yN3Y5cmcxajhkb25wa212OTYifQ.K8vLx2nPzQHdR5mT1wYcBfJkLmNpS3xG7aE9dH4qZvM"],description:"Airwallex client secret used to authenticate requests for payment initialization"}),airwallexCustomerId:Ji().optional().meta({examples:["cus_hkdmrhkh8he4j3kvela"],description:"Airwallex customer ID attached to the PaymentIntent for saved cards functionality"}),airwallexCustomerClientSecret:Ji().optional().meta({examples:["eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiY3VzdG9tZXJfaWQiOiJjdXNfaGtkbXJoa2g4aGU0ajNrdmVsYSJ9.abc123"],description:"Airwallex customer client secret for accessing saved payment methods in the Drop-in Element"})}),zu=Bn({net:kn().meta({examples:[va.Order.price.net],description:"Total amount to pay to promoter in cents.\nCalculated as: total + booking + refunded + dispute"}),total:kn().meta({examples:[va.Order.price.total],description:"Total amount the customer should pay in cents.\nCalculated as: gross + discount"}),gross:kn().min(0).meta({examples:[va.Order.price.gross],description:"Total amount before refunds and discounts in cents.\nCalculated as: base + booking + shipping"}),base:kn().min(0).meta({examples:[va.Order.price.base],description:"Total ticket price in cents"}),booking:kn().min(0).meta({examples:[va.Order.price.booking],description:"Total booking fees in cents (non-refundable)"}),shipping:kn().min(0).meta({examples:[va.Order.price.shipping],description:"Total shipping amount in cents"}),sms:kn().min(0).default(0).meta({examples:[va.Order.price.sms],description:"SMS delivery fee in cents (customer-facing price in event currency)"}),refunded:kn().max(0).meta({examples:[va.Order.price.refunded],description:"Total amount refunded in cents (negative value)"}),discount:kn().max(0).meta({examples:[va.Order.price.discount],description:"Total amount discounted in cents (negative value)"}),gateway:kn().max(0).meta({examples:[va.Order.price.gateway],description:"Total absorbed payment gateway fees in cents (negative value)"}),dispute:kn().max(0).meta({examples:[va.Order.price.dispute],description:"Total non-absorbed payment gateway fees in cents (negative value)"}),currency:Ia.meta({examples:[va.Order.price.currency],description:"Currency code in ISO 4217 format"})}),Vu=Xn(["PENDING","PROCESSING","SUCCEEDED","FAILED"]),Yu=Xn(["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED","OTHER"]),Wu=Xn(["USER","GATEWAY","SYSTEM"]),Zu=Bn({orderItemId:Ji().meta({examples:[va.OrderRefundItem.orderItemId],description:"Identifier of the order item being refunded"}),quantity:kn().min(1).meta({examples:[va.OrderRefundItem.quantity],description:"Number of units refunded for this item"}),amount:kn().min(0).meta({examples:[va.OrderRefundItem.amount],description:"Refund amount for this item in cents (base price only, excludes booking fee)"}),ticketIds:Gn(Ji()).meta({examples:[va.OrderRefundItem.ticketIds],description:"Specific ticket identifiers that were refunded (selected via FIFO)"})}),Hu=Bn({idempotencyKey:Ji().optional().meta({examples:[va.OrderRefund.request.idempotencyKey],description:"Client-provided key to prevent duplicate refund processing"})}),Ku=Bn({currency:Ji().meta({examples:["AUD"],description:"Currency used for all refund amounts"}),total:kn().min(1).meta({examples:[va.OrderRefund.price.total],description:"Total refund amount in cents, including ticket, shipping, and fee portions."}),items:kn().min(0).meta({examples:[va.OrderRefund.price.items],description:"Ticket item portion of the refund in cents"}),shipping:kn().min(0).meta({examples:[va.OrderRefund.price.shipping],description:"Shipping portion of the refund in cents"}),fees:kn().min(0).meta({examples:[va.OrderRefund.price.fees],description:"Fee portion of the refund in cents"})}),Ju=Bn({cancelRequested:An().meta({examples:[va.OrderRefund.tickets.cancelRequested],description:"Whether ticket cancellation was requested for the refund"}),cancelled:An().meta({examples:[va.OrderRefund.tickets.cancelled],description:"Whether tickets were cancelled as part of this refund"}),cancelledCount:kn().min(0).meta({examples:[va.OrderRefund.tickets.cancelledCount],description:"Number of tickets that were cancelled"})}),Qu=Bn({provider:qu.meta({examples:["STRIPE","AIRWALLEX"],description:"Payment gateway used to process the refund"}),refundId:Ji().optional().meta({examples:[va.OrderRefund.gateway.refundId],description:"Refund identifier from the payment gateway"}),idempotencyKey:Ji().optional().meta({examples:[va.OrderRefund.gateway.idempotencyKey],description:"Idempotency key sent to the payment gateway"})}),Xu=Bn({type:Wu.meta({examples:["USER","GATEWAY"],description:"Who initiated the refund"}),userId:Ji().optional().meta({examples:[va.OrderRefund.actor.userId],description:"Identifier of the user who initiated the refund"})}),ep=Bn({requested:An().meta({examples:[va.OrderRefund.notification.requested],description:"Whether a customer refund confirmation email was requested."}),sentAt:Si().optional().meta({examples:[va.OrderRefund.notification.sentAt],description:"Timestamp when the refund confirmation email was sent."})}),tp=Bn({reason:Ji().meta({examples:["Insufficient funds for refund"],description:"Gateway or system failure reason"}),message:Ji().optional().meta({examples:["The refund could not be processed."],description:"User-facing failure message when available"})}),ip=Bn({id:Ji().meta({examples:[va.OrderRefund.id],description:"Unique identifier for this refund"}),request:Hu.optional().meta({description:"Request metadata supplied by Sessions or API callers"}),status:Vu.meta({examples:["PENDING","SUCCEEDED"],description:"Current processing status. PENDING: awaiting gateway confirmation or async processing (e.g., bank transfers). PROCESSING: gateway confirmed, ticket cancellation in progress. SUCCEEDED/FAILED: terminal states."}),acceptedAt:Si().optional().meta({examples:[va.OrderRefund.acceptedAt],description:"Timestamp when the payment gateway accepted the refund"}),failedAt:Si().optional().meta({examples:[va.OrderRefund.failedAt],description:"Timestamp when the refund failed"}),failure:tp.optional().meta({description:"Failure details when the refund failed"}),price:Ku.meta({description:"Refund amount breakdown"}),reason:Yu.meta({examples:["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED"],description:"Categorized reason for the refund used for analytics"}),note:Ji().optional().meta({examples:[va.OrderRefund.note],description:"Free-form notes explaining the refund"}),items:Gn(Zu).meta({description:"Line items included in this refund with quantities and amounts"}),tickets:Ju.meta({description:"Ticket cancellation state for the refund"}),gateway:Qu.meta({description:"Gateway refund identifiers"}),actor:Xu.meta({description:"Refund initiator"}),metadata:Jn(Ji(),Ji()).optional().meta({examples:[{supportTicket:"#12345"}],description:"Custom key-value pairs passed through to the payment gateway"}),notification:ep.meta({description:"Refund confirmation notification state"}),createdAt:Si().meta({examples:[va.OrderRefund.createdAt],description:"Timestamp when the refund was created"})}),np=zu.extend({exchangeRate:In().meta({examples:[1.4],description:"Conversion rate applied from the original payment currency to the settlement currency. 1.0 when both currencies are the same"})}).meta({description:"Settled price breakdown in the payout currency. All amounts from the original order price are converted using the exchange rate. For same-currency orders the values match the order price with an exchange rate of 1.0",examples:[{base:14e3,booking:700,shipping:0,sms:0,discount:0,refunded:0,gateway:0,dispute:0,gross:14700,total:14700,net:14e3,currency:"AUD",exchangeRate:1.4}]});function rp(e,t,i={}){return Bn({id:Ji().meta({examples:t.idExamples,description:t.idDescription}),createdAt:Si().readonly().meta({examples:t.createdAtExamples,description:"Timestamp in ISO 8601 format when this timeline entry was created"}),...i,kind:e.meta({examples:t.kindExamples,description:t.kindDescription}),editable:An().meta({examples:[!1],description:"Whether this timeline entry can be edited by users"}),pinned:An().meta({examples:[!1],description:"Whether this timeline entry is pinned to the top of the timeline"}),description:Ji().meta({examples:t.descriptionExamples,description:"Human-readable description of what happened in this timeline event"}),author:Ji().meta({examples:["System"],description:"Name of the user or system that created this timeline entry"}),userId:Ji().optional().meta({examples:[va.User.id],description:t.userIdDescription??"Identifier of the user who created this timeline entry, when available"}),externalId:Ji().optional().meta({examples:t.externalIdExamples,description:t.externalIdDescription})})}const op=rp(Xn("ORDER_STATUS_UPDATED.ORDER_EXPIRED.ORDER_COMPLETED.PAYMENT_INITIATED.PAYMENT_PROCESSING.PAYMENT_FAILED.PAYMENT_SUCCEEDED.REFUND_INITIATED.REFUND_PROCESSING.REFUND_SUCCEEDED.REFUND_SETTLED.REFUND_FAILED.CHARGEBACK_INITIATED.CHARGEBACK_EVIDENCE_SUBMITTED.CHARGEBACK_WON.CHARGEBACK_LOST.CHARGEBACK_FUNDS_WITHDRAWN.TICKETS_GENERATED.TICKET_ADDED.TICKETS_SCANNED.TICKET_EDITED.TICKET_STATUS_CHANGED.EMAIL_SENT.EMAIL_DELIVERED.EMAIL_OPENED.EMAIL_BOUNCED.EMAIL_COMPLAINED.EMAIL_FAILED.SMS_SENT.SMS_DELIVERED.SMS_FAILED.NOTE".split(".")),{createdAtExamples:[va.Order.createdAt],descriptionExamples:["Order was created successfully"],externalIdDescription:"External idempotency key for deduplication (e.g., SES messageId + eventType)",externalIdExamples:["ses:01234567-89ab-cdef-0123-456789abcdef:Delivery"],idDescription:"Unique identifier of the timeline entry",idExamples:[va.Timeline.id],kindDescription:"Type of timeline event (ORDER_COMPLETED, PAYMENT_SUCCEEDED, REFUND_INITIATED, etc.)",kindExamples:["ORDER_COMPLETED"],userIdDescription:"Identifier of the user who created this timeline entry, when available."},{status:Ji().optional().meta({examples:["SUCCESSFUL"],description:"Order status associated with this timeline entry, when applicable."})}),ap=Xn(["PENDING","PROCESSING","SUCCESSFUL","DISPUTED","ABANDONED"]),sp=Bn({id:Ra.readonly().meta({examples:[va.Order.id],description:"A unique identifier for this order."}),createdAt:Si().readonly().meta({examples:[va.Order.createdAt],description:"Timestamp in ISO 8601 format when this order was created."}),updatedAt:Si().readonly().meta({examples:[va.Order.updatedAt],description:"Timestamp in ISO 8601 format when this order was last updated."}),status:ap.meta({examples:["PENDING"],description:"Current payment lifecycle status. PENDING: awaiting payment. PROCESSING: payment in progress. SUCCESSFUL: payment confirmed. DISPUTED: chargeback filed. ABANDONED: expired or cancelled."}),payment:Bu.optional().meta({description:"Payment gateway details including method, card brand, and transaction identifiers. Absent for free orders."}),items:Gn(Nu).meta({description:"Line items in this order, each with a ticket type, quantity, and price breakdown."}),fees:Gn(Ou).meta({description:"Gateway fees recorded against this order from settlement processing (e.g. payment processing fees, dispute fees)."}),price:zu.meta({description:"Price breakdown in the event currency. This reflects what the customer was charged."}),settlement:np.optional().meta({description:"Price breakdown in the payout currency with the exchange rate applied. When the event currency differs from the settlement currency, all amounts are converted. For same-currency orders the values match the order price with an exchange rate of 1.0."}),couponCode:Su.optional().meta({description:"Coupon code applied to this order for discount calculation."}),customer:Du.optional().meta({description:"Customer who placed this order. Absent for guest checkouts before customer details are captured."}),marketingConsent:Uu.optional().meta({description:"Marketing opt-in choices captured during checkout."}),timeline:Gn(op).optional().meta({description:"Chronological audit trail of events for this order (payments, refunds, emails, scans)."}),refunds:Gn(ip).default([]).meta({description:"Refunds processed for this order including pending, succeeded, and failed attempts."}),offers:Gn(ju).default([]).meta({description:"Pre-computed add-on offers available during checkout (e.g. SMS ticket delivery)."}),customerId:Ma.optional().meta({examples:[va.Customer.id],description:"Identifier of the customer who placed this order."}),createdBy:Du.optional().meta({description:"Admin user who created this order on behalf of the customer."}),teamId:Da.meta({description:"Team that owns this order."}),promoterId:Ua.meta({examples:[va.Promoter.id],description:"Promoter managing this order."}),event:Cu.meta({description:"Snapshot of the event at time of purchase (name, slug, location)."}),payoutIds:Gn(qa.meta({examples:["pay_01HQXYZ"],description:"Payout identifier."})).meta({description:"Payout identifiers for settlements that included this order."}),eventId:Ca.meta({examples:[va.Event.id],description:"Identifier of the event this order belongs to."}),checkoutUrl:Ji().optional().readonly().meta({examples:["https://example.com/checkout/ord_1234567890"],description:"Derived checkout URL where the customer can complete payment for this order."}),returnUrl:Ji().optional().meta({examples:["https://example.com/event/success"],description:"URL to redirect to after successful payment completion."}),channel:xu.optional().meta({description:"Channel metadata captured at order creation to identify origin and redirect context."}),reservedAt:Si().optional().meta({examples:[(new Date).toISOString()],description:"Timestamp when inventory was reserved for this order. Used for checkout countdown timer."})}).meta({description:"A customer order for event tickets. Tracks the full lifecycle from checkout through payment, settlement, and payout."}),dp=Bn({id:Ji().meta({examples:[va.Order.id],description:"Unique identifier of the order to add a note to"}),note:Ji().min(1).max(1e3).meta({examples:["Customer requested special seating arrangements"],description:"Note text content (1-1000 characters)"})}),cp=Nu.omit({id:!0,price:!0,kind:!0}).extend({id:Ji().optional().meta({examples:["itm_01jps5cgsfwyxj0516571eaf17"],description:"Unique identifier for this order item. When omitted, the server assigns an id during processing"})}),lp=Bn({eventId:Ji().meta({description:"Unique identifier of the event for which to create a complimentary order"}),items:Gn(cp).min(1).meta({description:"Admission items to include in the complimentary order"}),customer:Bn({firstName:Ji().min(1),lastName:Ji().min(1),email:en()}),notifyCustomer:An().default(!0).meta({description:"Whether to send the standard order confirmation email after tickets are generated"}),reason:Ji().min(1),idempotencyKey:Ji().trim().min(1).max(255).optional()}),up=Bn({postHogDistinctId:Ji().min(1).max(256).optional()}),pp=Bn({eventId:Ji().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Unique identifier of the event for which to create the order"}),items:Gn(cp).meta({description:"List of items to include in the new order"}),couponCode:Ji().optional().meta({examples:["TEST50"],description:"Optional coupon code to apply discount to the order"}),returnUrl:Ji().optional().meta({examples:["https://example.com/event/success"],description:"Optional URL to redirect to after successful payment"}),channel:xu.optional().meta({description:"Optional channel metadata for where the order originated (for attribution and redirect routing)."}),analytics:up.optional().meta({description:"Optional browser analytics metadata used for cross-domain checkout attribution."}),idempotencyKey:Ji().trim().min(1).max(255).optional().meta({description:"Optional key that makes repeated order creation requests return the same order."})}),mp=Bn({id:Ji().meta({examples:[va.Order.id],description:"Unique identifier of the order"}),noteId:Ji().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to delete"})}),hp=Xn(["EMAIL","SMS"]).meta({examples:["EMAIL"],description:"Method used to deliver tickets to the customer: EMAIL or SMS"});Bn({id:Ji().meta({examples:[va.Order.id],description:"Unique identifier of the order to edit"}),signature:fs.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded). Required for editing order items."}),items:Gn(cp).min(1).meta({description:"Updated list of items for the order (replaces existing items). Prices will be recalculated and payment intent updated."})});const fp=Xn(["STATUS","DELIVERY_METHOD","CUSTOMER_EMAIL","CUSTOMER_PHONE","COUPON_CODE","PAYMENT_SOURCE","PAYMENT_METHOD","CURRENCY","CREATED_AT","UPDATED_AT","RESERVED_AT","TOTAL","TICKETS","ORDER_ID","CUSTOMER_ID","EVENT_ID","PROMOTER_ID","PAYOUT_ID"]),yp=Xn(["IS","IS_NOT","IS_ANY_OF","CONTAINS","IS_EMPTY","IS_NOT_EMPTY","BETWEEN","GTE","LTE"]),vp=new Set(["IS_EMPTY","IS_NOT_EMPTY"]),gp=new Set(["IS_ANY_OF"]),bp=new Set(["IS","IS_NOT","CONTAINS","GTE","LTE"]),$p=new Set(["BETWEEN"]),wp={STATUS:new Set(["IS","IS_NOT","IS_ANY_OF"]),DELIVERY_METHOD:new Set(["IS","IS_NOT","IS_ANY_OF"]),CUSTOMER_EMAIL:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),CUSTOMER_PHONE:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),COUPON_CODE:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),PAYMENT_SOURCE:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),PAYMENT_METHOD:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),CURRENCY:new Set(["IS","IS_NOT","IS_ANY_OF"]),CREATED_AT:new Set(["BETWEEN","GTE","LTE"]),UPDATED_AT:new Set(["BETWEEN","GTE","LTE"]),RESERVED_AT:new Set(["BETWEEN","GTE","LTE","IS_EMPTY","IS_NOT_EMPTY"]),TOTAL:new Set(["BETWEEN","GTE","LTE"]),TICKETS:new Set(["BETWEEN","GTE","LTE"]),ORDER_ID:new Set(["IS","IS_NOT","CONTAINS"]),CUSTOMER_ID:new Set(["IS","IS_NOT","IS_EMPTY","IS_NOT_EMPTY"]),EVENT_ID:new Set(["IS","IS_NOT"]),PROMOTER_ID:new Set(["IS","IS_NOT"]),PAYOUT_ID:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"])},Ip={STATUS:ap,DELIVERY_METHOD:hp,PAYMENT_SOURCE:Fu,PAYMENT_METHOD:qu},Ep=new Set(["CREATED_AT","UPDATED_AT","RESERVED_AT"]),kp=new Set(["TOTAL","TICKETS"]),Tp=Bn({field:fp,operator:yp,values:Gn(Ji()).max(20)}).superRefine(((e,t)=>{wp[e.field].has(e.operator)||t.addIssue({code:"custom",path:["operator"],message:`${e.operator} is not supported for ${e.field}`}),function(e,t){let i=e.values.length;vp.has(e.operator)&&0!==i&&t.addIssue({code:"custom",path:["values"],message:e.operator+" does not accept values"}),bp.has(e.operator)&&1!==i&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires exactly one value"}),gp.has(e.operator)&&i<1&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires at least one value"}),$p.has(e.operator)&&2!==i&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires exactly two values"})}(e,t),function(e,t){let i=Ip[e.field];i&&e.values.forEach(((n,r)=>{i.safeParse(n).success||t.addIssue({code:"custom",path:["values",r],message:`${n} is not valid for ${e.field}`})}))}(e,t),function(e,t){Ep.has(e.field)&&e.values.forEach(((e,i)=>{Number.isNaN(Date.parse(e))&&t.addIssue({code:"custom",path:["values",i],message:e+" is not a valid date"})}))}(e,t),function(e,t){kp.has(e.field)&&e.values.forEach(((e,i)=>{/^-?\d+$/.test(e)||t.addIssue({code:"custom",path:["values",i],message:e+" is not a valid integer"})}))}(e,t)})),Ap=Bn({id:Ji().meta({examples:[va.Order.id],description:"Unique identifier of the order to retrieve"}),signature:fs.optional().meta({description:"HMAC signature for public order access (16 characters, base64url encoded)"})}),xp="Either locationId or googlePlaceId must be provided",Sp={locationId:Oa.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location. Either locationId or googlePlaceId must be provided."}),googlePlaceId:Ji().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to create a new location from. Either locationId or googlePlaceId must be provided."})};function Dp(e){return!(!e.locationId&&!e.googlePlaceId)}const Cp=Ol.omit({id:!0,createdAt:!0,updatedAt:!0,order:!0,available:!0,sold:!0,reserved:!0,visibility:!0,promoterId:!0,eventSlug:!0,location:!0}).extend({order:In().optional().meta({examples:[va.Section.order],description:"Display order of the section. Lower numbers appear first in listings. Defaults to 0 if not specified"}),visibility:Ol.shape.visibility.optional(),...Sp}).refine(Dp,{message:xp}).meta({description:"Schema for creating a new section within an event venue. Excludes system-generated fields and fields derived from the event"}),Pp=Ol.pick({id:!0}).extend({eventId:Ji().meta({examples:[va.Section.eventId],description:"Unique identifier of the event to verify section belongs to"})}).meta({description:"Schema for soft-deleting a section by setting its deletedAt timestamp"}),Op=Ol.pick({id:!0}).extend({eventId:Ji().meta({examples:[va.Section.eventId],description:"Unique identifier of the event to verify section belongs to"})}).meta({description:"Schema for retrieving a specific section by ID"}),_p=zn({eventId:Ol.shape.eventId,query:Ji().max(120).optional().meta({examples:["VIP"],description:"Optional search query. When provided, automatically uses search-backed pagination for full-text search capabilities"}),limit:ba().min(1).max(100).prefault(20).meta({examples:[20],description:"Maximum number of sections to return in each result set. Must be between 1 and 100, defaults to 20"}),cursor:Ji().max(768).optional().meta({examples:["eyJpbnRlbnQiOnsicmVzb3VyY2UiOiJzZWN0aW9uLmxpc3QifSwicG9zaXRpb24iOnsiZW5naW5lIjoiZHluYW1vIiwgImN1cnNvciI6InNlY18wMWpwczVjZ3NlMGczcWo1NnZkODZ6N3FqIiwgImhpc3RvcnkiOltdfX0="],description:"Opaque pagination cursor from a previous response. Provide to continue fetching subsequent results"})}).meta({description:"Schema for listing sections with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided"}),Rp=As(Ol,"sections"),Np=Bn({section:Ol}),Up=Ol.omit({promoterId:!0,createdAt:!0,updatedAt:!0,eventSlug:!0,available:!0,sold:!0,reserved:!0,location:!0,teamId:!0,name:!0,capacity:!0,limit:!0,order:!0}).extend({id:Ji().meta({examples:[va.Section.id],description:"Unique identifier of the section to update"}),eventId:Ji().meta({examples:[va.Section.eventId],description:"Unique identifier of the event to verify section belongs to"}),name:Ol.shape.name.optional(),capacity:Za().optional(),limit:Ha().optional(),order:Ol.shape.order.optional(),visibility:Xn(["ALWAYS","STACKED","HIDDEN"]).optional(),locationId:Oa.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:Ji().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."})}).meta({description:"Schema for updating an existing section."}),Mp=Nu.extend({admission:ws.optional().meta({description:"Complete admission details for this order item when available"}),section:Ol.optional().meta({description:"Complete section details for this order item when applicable"})}),Lp=Xn(["UPDATED_AT","CREATED_AT","EVENT_NAME","TOTAL","STATUS","CUSTOMER_NAME","PAYMENT_SOURCE","COUPON_CODE","TICKETS","DELIVERY_METHOD","CUSTOMER_EMAIL","CUSTOMER_PHONE","ORDER_ID"]),jp=Xn(["asc","desc"]),qp=Bn({mine:An().optional().meta({examples:[!0],description:"When true, returns only the authenticated user's orders. Can be combined with teamId or eventId to further filter results."}),teamId:Ji().optional().meta({description:"Filter orders by team unique identifier"}),eventId:Ji().optional().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Filter orders by event unique identifier"}),status:ap.optional().meta({examples:["SUCCESSFUL"],description:"Filter orders by payment status"}),query:Ji().optional().meta({examples:["John Doe"],description:"Optional search query to filter orders by customer details. When provided, search-backed pagination is used."}),includeEventTerms:An().optional().meta({examples:[!0],description:"When true for authenticated user-owned order searches, also matches event name, slug, and location unless eventId is already provided."}),filters:Gn(Tp).max(10).optional().meta({description:"Optional advanced filters for order lists."}),sort:Lp.optional().meta({examples:["UPDATED_AT","CREATED_AT","CUSTOMER_NAME"],description:"Field to sort order lists by."}),direction:jp.optional().meta({examples:["asc","desc"],description:"Sort direction for order lists. Defaults to `desc` when omitted."}),from:Ji().date().optional().meta({examples:["2025-01-01"],description:"Filter orders created on or after this date (YYYY-MM-DD format). Inclusive of the entire day."}),to:Ji().date().optional().meta({examples:["2025-12-31"],description:"Filter orders created on or before this date (YYYY-MM-DD format). Inclusive of the entire day."}),limit:es("orders"),cursor:Ji().optional().meta({examples:["eyJpZCI6Im9yZF8wMWpwczVjZ3NmZ3ZlNWI1ZzI2NjZreXJ5aCJ9"],description:"Pagination cursor for continuing to fetch subsequent results"})}),Gp=As(sp,"orders"),Fp=Bn({items:Gn(Mp).meta({description:"List of order items with complete pricing and admission details"}),price:zu.meta({description:"Total pricing breakdown for the entire order quote"}),couponCode:ml.optional().meta({description:"Applied coupon code details if a discount was used in this quote"}),stripeConnectAvailability:Nl.optional().meta({description:"Stripe Connect availability metadata for tenant checkout UI."})}),Bp=Bn({eventId:Ji().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Unique identifier of the event for which to generate a price quote"}),items:Gn(cp).meta({description:"List of items to include in the price quote calculation"}),couponCode:Ji().optional().meta({examples:["TEST50"],description:"Optional coupon code to apply discount to the quote"})}),zp=Bn({quote:Fp}),Vp=Bn({orderItemId:Ji().meta({examples:[va.OrderRefundItem.orderItemId],description:"Identifier of the order item to refund"}),quantity:kn().min(1).meta({examples:[va.OrderRefundItem.quantity],description:"Number of units to refund for this item"})}),Yp=Bn({id:Ra.meta({examples:[va.Order.id],description:"Identifier of the order to refund"}),fullRefund:An().default(!1).meta({examples:[!1],description:"When true, refunds all remaining refundable items. Mutually exclusive with items."}),items:Gn(Vp).optional().meta({description:"Specific items and quantities to refund. Required if fullRefund is false."}),shippingAmount:kn().min(0).optional().meta({examples:[500],description:"Amount of shipping to refund in cents. Cannot exceed remaining refundable shipping."}),cancelTickets:An().default(!0).meta({examples:[!0],description:"Whether to cancel tickets associated with refunded items. Defaults to true."}),notify:An().default(!0).meta({examples:[!0],description:"Whether to send a refund confirmation email to the customer. Defaults to true."}),reason:Yu.meta({examples:["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED"],description:"Categorized reason for the refund"}),note:Ji().optional().meta({examples:["Customer requested refund due to schedule conflict"],description:"Free-form notes explaining the refund"}),idempotencyKey:Ji().optional().meta({examples:["refund_12345_customer_request"],description:"Client-provided key to prevent duplicate refund processing. Recommended for programmatic refunds."}),metadata:Jn(Ji(),Ji()).optional().meta({examples:[{supportTicket:"#12345"}],description:"Custom key-value pairs passed through to the payment gateway"})}),Wp=Bn({refund:ip}),Zp=Bn({id:Ji().meta({examples:[va.Order.id],description:"Order ID to resend tickets for"}),email:Ji().email().optional().meta({examples:["customer@example.com"],description:"Email address to send tickets to. If not provided, uses order.customer.email"})}),Hp=Bn({id:Ji().meta({examples:[va.Order.id],description:"Unique identifier of the order to reserve inventory for"}),signature:fs.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded)."})}),Kp=Bn({code:tr("ORDER_NOT_RESERVABLE")}),Jp=Bn({order:sp});var Qp={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[0-79]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}},Xp={}.constructor;function em(e){return null!=e&&e.constructor===Xp}function tm(e){return tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tm(e)}function im(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function nm(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=tm(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=tm(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==tm(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function rm(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function om(e){var t,i,n,r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,o,a,s=[],d=!0,c=!1;try{if(o=(i=i.call(e)).next,0===t);else for(;!(d=(n=o.call(i)).done)&&(s.push(n.value),s.length!==t);d=!0);}catch(e){c=!0,r=e}finally{try{if(!d&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rm(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?rm(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array.prototype.slice.call(e),4),o=r[0],a=r[1],s=r[2],d=r[3];if("string"!=typeof o)throw TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!=typeof a){if(!em(a))throw Error("Invalid second argument: "+a);s?(i=a,n=s):n=a}else d?(i=s,n=d):(i=void 0,n=s),a&&(i=function(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?im(Object(i),!0).forEach((function(t){nm(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):im(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({defaultCountry:a},i));return{text:t,options:i,metadata:n}}var am="0-90-9٠-٩۰-۹",sm="-‐-―−ー-//.. ()()[]\\[\\]~⁓∼~";function dm(e){return dm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dm(e)}function cm(e){var t="function"==typeof Map?new Map:void 0;return cm=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch{return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return function(e,t,i){if(lm())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var r=new(e.bind.apply(e,n));return i&&um(r,i.prototype),r}(e,arguments,pm(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),um(i,e)},cm(e)}function lm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(lm=function(){return!!e})()}function um(e,t){return um=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},um(e,t)}function pm(e){return pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pm(e)}var mm=function(){function e(t){var i;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),i=function(e,t,i){return t=pm(t),function(e,t){if(t&&("object"==dm(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,lm()?Reflect.construct(t,i||[],pm(e).constructor):t.apply(e,i))}(this,e,[t]),Object.setPrototypeOf(i,e.prototype),i.name=i.constructor.name,i}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&um(e,t)}(e,cm(Error)),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(e)}();function hm(e,t){e=e.split("-"),t=t.split("-");for(var i=e[0].split("."),n=t[0].split("."),r=0;r<3;r++){var o=Number(i[r]),a=Number(n[r]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var fm=/^\d+$/;function ym(e){return ym="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ym(e)}function vm(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function gm(e,t){return t&&function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bm(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bm(e){var t=function(e){if("object"!=ym(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=ym(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==ym(t)?t:t+""}var $m=" ext. ",wm=gm((function e(t){vm(this,e),xm(t),this.metadata=t,Cm.call(this,t)}),[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){var i,n;if(e&&(function(e){return fm.test(e)}(e)?n=e:i=e),t&&(n=t),i&&"001"!==i){var r=this.getCountryMetadata(i);if(!r)throw Error("Unknown country: "+i);this.numberingPlan=new Im(r,this)}else if(n){if(!this.hasCallingCode(n))throw Error("Unknown calling code: "+n);this.numberingPlan=new Im(this.getNumberingPlanMetadata(n),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t)return 1===t.length&&3===t[0].length?void 0:t}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var i=this.nonGeographic()[e];if(i)return i}else{var n=this.countryCallingCodes()[e];if(n&&1===n.length&&"001"===n[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),Im=gm((function e(t,i){vm(this,e),this.globalMetadataObject=i,this.metadata=t,Cm.call(this,i.metadata)}),[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"_getDefaultCountryMetadataForThisCallingCode",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this._getDefaultCountryMetadataForThisCallingCode()}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[]).map((function(t){return new Em(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return!(this.types()&&0===this.types().length||!this.types())}},{key:"type",value:function(e){if(this.hasTypes()&&Am(this.types(),e))return new Tm(Am(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?$m:this.metadata[13]||$m}}]),Em=gm((function e(t,i){vm(this,e),this._format=t,this.metadata=i}),[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||km.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),km=/^\(?\$1\)?$/,Tm=gm((function e(t,i){vm(this,e),this.type=t,this.metadata=i}),[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]);function Am(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function xm(e){if(!e)throw Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!em(e)||!em(e.countries))throw Error(`[libphonenumber-js] \`metadata\` argument was passed but it's not a valid metadata. Must be an object having \`.countries\` child object property. Got ${em(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Sm(e)+": "+e}.`)}var Sm=function(e){return ym(e)};function Dm(e,t){var i=new wm(t);if(i.hasCountry(e))return i.selectNumberingPlan(e).countryCallingCode();throw Error("Unknown country: "+e)}function Cm(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===hm(t,"1.2.0")?this.v2=!0:-1===hm(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var Pm=function(e){return`([${am}]{1,${e}})`};function Om(){var e="[ \\t,]*",t="[:\\..]?[ \\t,-]*",i="#?",n="[ \\t]*";return";ext="+Pm("20")+"|"+e+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+t+Pm("20")+"#?|"+e+"(?:[xx##~~]|int|int)"+t+Pm("9")+"#?|[- ]+"+Pm("6")+"#|"+n+"(?:,{2}|;)"+t+Pm("15")+"#?|"+n+"(?:,)+"+t+Pm("9")+i}var _m="["+am+"]{2}",Rm="[++]{0,1}(?:["+sm+"]*["+am+"]){3,}["+sm+am+"]*",Nm=RegExp("^[++]{0,1}(?:["+sm+"]*["+am+"]){1,2}$","i"),Um=Rm+"(?:"+Om()+")?",Mm=RegExp("^"+_m+"$|^"+Um+"$","i"),Lm=RegExp("(?:"+Om()+")$","i"),jm={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function qm(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function Gm(e){for(var t,i="",n=function(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return qm(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?qm(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=n()).done;)i+=Fm(t.value,i)||"";return i}function Fm(e,t){if("+"===e){if(t)return;return"+"}return function(e){return jm[e]}(e)}function Bm(e,t,i){return function(e,t,i,n){i&&(n=new wm(n.metadata)).selectNumberingPlan(i);var r=n.type(void 0),o=r&&r.possibleLengths()||n.possibleLengths();if(!o)return"IS_POSSIBLE";var a=e.length,s=o[0];return s===a?"IS_POSSIBLE":s>a?"TOO_SHORT":o[o.length-1]<a?"TOO_LONG":o.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,0,t,i)}function zm(e,t){return"IS_POSSIBLE"===Bm(e,void 0,t)}function Vm(e,t){return e||="",RegExp("^(?:"+t+")$").test(e)}function Ym(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}var Wm=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Zm(e,t,i){if(t||={},e.country||e.countryCallingCode){var n=new wm(i);n.selectNumberingPlan(e.country||e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Vm(r,n.nationalNumberPattern())){if(Hm(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()||!n.type("MOBILE")||Hm(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var o,a=function(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Ym(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ym(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(Wm);!(o=a()).done;){var s=o.value;if(Hm(r,s,n))return s}}}}function Hm(e,t,i){var n=i.type(t);return!(!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(e.length)<0)&&Vm(e,n.pattern())}var Km=/^[A-Z]{2}$/;var Jm=RegExp("(["+am+"])");function Qm(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function Xm(e,t){var i=t.nationalNumber,n=t.metadata,r=n.getCountryCodesForCallingCode(e);if(r)return 1===r.length?r[0]:function(e,t,i){for(var n,r=new wm(i),o=function(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Qm(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Qm(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(n=o()).done;){var a=n.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(Zm({phone:e,country:a},void 0,r.metadata))return a}}(i,r,n.metadata)}function eh(e,t,i){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var i=RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=i.exec(e);if(n){var r,o,a,s=n.length-1,d=s>0&&n[s];if(t.nationalPrefixTransformRule()&&d?(r=e.replace(i,t.nationalPrefixTransformRule()),s>1&&(o=n[1])):(r=e.slice(n[0].length),d&&(o=n[1])),d){var c=e.indexOf(n[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=n[0];return{nationalNumber:r,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}(e,i),r=n.carrierCode,o=n.nationalNumber;return o===e||function(e,t,i){return!(Vm(e,i.nationalNumberPattern())&&!Vm(t,i.nationalNumberPattern()))}(e,o,i)&&(!i.numberingPlan.possibleLengths()||(t||=Xm(i.numberingPlan.callingCode(),{nationalNumber:o,metadata:i}),function(e,t,i){switch(Bm(e,t,i)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,i)))?{nationalNumber:o,carrierCode:r}:{nationalNumber:e}}function th(e,t,i,n,r){if(!e)return{};var o;if("+"!==e[0]){var a=function(e,t,i,n){if(t){var r=new wm(n);r.selectNumberingPlan(t||i);var o=RegExp(r.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(Jm);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,i,n,r);if(!a||a===e){if(i||n){var s=function(e,t,i,n,r){if(!i&&!n)return{number:e};var o=i?Dm(i,r):n;if(0===e.indexOf(o)){var a=new wm(r);a.selectNumberingPlan(i||n);var s=e.slice(o.length),d=eh(s,void 0,a).nationalNumber,c=eh(e,void 0,a).nationalNumber;if(!Vm(c,a.nationalNumberPattern())&&Vm(d,a.nationalNumberPattern())||"TOO_LONG"===Bm(c,void 0,a))return{countryCallingCode:o,number:s}}return{number:e}}(e,0,i,n,r),d=s.countryCallingCode;if(d)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:d,number:s.number}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};for(var c=new wm(r),l=2;l-1<=3&&l<=e.length;){var u=e.slice(1,l);if(c.hasCallingCode(u))return c.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(l)};l++}return{}}var ih=/(\$\d)/;var nh=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/,rh={formatExtension:function(e,t,i){return`${e}${i.ext()}${t}`}};function oh(e,t,i,n,r){var o=function(e,t){return function(e,t){for(var i=0;i<e.length;){if(t(e[i]))return e[i];i++}}(e,(function(e){if(e.leadingDigitsPatterns().length>0){var i=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==t.search(i))return!1}return Vm(t,e.pattern())}))}(n.formats(),e);return o?function(e,t,i){var n=i.useInternationalFormat,r=i.withNationalPrefix,o=e.replace(RegExp(t.pattern()),n?t.internationalFormat():r&&t.nationalPrefixFormattingRule()?t.format().replace(ih,t.nationalPrefixFormattingRule()):t.format());return n?function(e){return e.replace(RegExp(`[${sm}]+`,"g")," ").trim()}(o):o}(e,o,{useInternationalFormat:"INTERNATIONAL"===i,withNationalPrefix:!(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&r&&!1===r.nationalPrefix)}):e}function ah(e,t,i,n){return t?n(e,t,i):e}function sh(e){return sh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sh(e)}function dh(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ch(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?dh(Object(i),!0).forEach((function(t){lh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):dh(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function lh(e,t,i){return(t=uh(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function uh(e){var t=function(e){if("object"!=sh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=sh(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==sh(t)?t:t+""}var ph=function(e,t){return t&&function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uh(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,i,n){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),!t)throw TypeError("First argument is required");if("string"!=typeof t)throw TypeError("First argument must be a string");if("+"===t[0]&&!i)throw TypeError("`metadata` argument not passed");if(em(i)&&em(i.countries)){n=i;var r=t;if(!mh.test(r))throw Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=th(r,0,void 0,void 0,n);if(t=o.countryCallingCode,!(i=o.number))throw Error("Invalid `number` argument passed: too short")}if(!i)throw TypeError("`nationalNumber` argument is required");if("string"!=typeof i)throw TypeError("`nationalNumber` argument must be a string");xm(n);var a=function(e,t){var i,n,r=new wm(t);return function(e){return Km.test(e)}(e)?(r.selectNumberingPlan(i=e),n=r.countryCallingCode()):n=e,{country:i,callingCode:n}}(t,n),s=a.callingCode;this.country=a.country,this.countryCallingCode=s,this.nationalNumber=i,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return n}}),[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:function(e,t,i){var n=new wm(i).getCountryCodesForCallingCode(e);return n?n.filter((function(e){return function(e,t,i){var n=new wm(i);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}(t,e,i)})):[]}(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,i){void 0===t&&(t={});var n=new wm(i);if(t.v2){if(!e.countryCallingCode)throw Error("Invalid phone number object passed");n.selectNumberingPlan(e.country||e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw Error("Unknown country: "+e.country);n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return zm(e.phone||e.nationalNumber,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,i){t||={};var n=new wm(i);return n.selectNumberingPlan(e.country||e.countryCallingCode),n.hasTypes()?void 0!==Zm(e,t,n.metadata):Vm(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new wm(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Zm(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return function(e,t,i,n){i=i?function(){for(var e=1,t=[...arguments];e<t.length;){if(t[e])for(var i in t[e])t[0][i]=t[e][i];e++}return t[0]}({},rh,i):rh;var r=new wm(n);if(e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw Error("Unknown country: "+e.country);r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var o=r.countryCallingCode(),a=i.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?ah(oh(a,0,"NATIONAL",r,i),e.ext,r,i.formatExtension):"";case"INTERNATIONAL":return a?ah(`+${o} ${oh(a,0,"INTERNATIONAL",r,i)}`,e.ext,r,i.formatExtension):"+"+o;case"E.164":return`+${o}${a}`;case"RFC3966":return function(e){var t=e.number,i=e.ext;if(!t)return"";if("+"!==t[0])throw Error('"formatRFC3966()" expects "number" to be in E.164 format.');return`tel:${t}${i?";ext="+i:""}`}({number:`+${o}${a}`,ext:e.ext});case"IDD":if(!i.fromCountry)return;var s=function(e,t,i,n,r){if(Dm(n,r.metadata)===i){var o=oh(e,0,"NATIONAL",r);return"1"===i?i+" "+o:o}var a=function(e,t,i){var n=new wm(i);return n.selectNumberingPlan(e||void 0),n.defaultIDDPrefix()?n.defaultIDDPrefix():nh.test(n.IDDPrefix())?n.IDDPrefix():void 0}(n,0,r.metadata);if(a)return`${a} ${i} ${oh(e,0,"INTERNATIONAL",r)}`}(a,0,o,i.fromCountry,r);return s?ah(s,e.ext,r,i.formatExtension):void 0;default:throw Error(`Unknown "format" argument passed to "formatNumber()": "${t}"`)}}(this,e,t?ch(ch({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}]),mh=/^\+\d+$/,hh="(["+am+"]|[\\-\\.\\(\\)]?)",fh=RegExp("^\\+"+hh+"*["+am+"]"+hh+"*$","g"),yh=RegExp("^(["+am+"]+((\\-)*["+am+"])*\\.)*[a-zA-Z]+((\\-)*["+am+"])*\\.?$","g"),vh=";phone-context=";var gh=RegExp("[++"+am+"]"),bh=RegExp("[^"+am+"#]+$");function $h(e,t,i){t||={};var n=new wm(i);if(t.defaultCountry&&!n.hasCountry(t.defaultCountry))throw t.v2?new mm("INVALID_COUNTRY"):Error("Unknown country: "+t.defaultCountry);var r=function(e,t,i){var n=function(e,t){var i,n=t.extractFormattedPhoneNumber,r=function(e){var t=e.indexOf(vh);if(t<0)return null;var i=t+15;if(i>=e.length)return"";var n=e.indexOf(";",i);return n>=0?e.substring(i,n):e.substring(i)}(e);if(!function(e){return null===e||0!==e.length&&(fh.test(e)||yh.test(e))}(r))throw new mm("NOT_A_NUMBER");if(null===r)i=n(e)||"";else{i="","+"===r.charAt(0)&&(i+=r);var o=e.indexOf("tel:"),a=o>=0?o+4:0,s=e.indexOf(vh);i+=e.substring(a,s)}var d=i.indexOf(";isub=");if(d>0&&(i=i.substring(0,d)),""!==i)return i}(e,{extractFormattedPhoneNumber:function(e){return function(e,t,i){if(e){if(e.length>250){if(i)throw new mm("TOO_LONG");return}if(!1===t)return e;var n=e.search(gh);if(!(n<0))return e.slice(n).replace(bh,"")}}(e,i,t)}});if(!n)return{};if(!function(e){return e.length>=2&&Mm.test(e)}(n))return function(e){return Nm.test(e)}(n)?{error:"TOO_SHORT"}:{};var r=function(e){var t=e.search(Lm);if(t<0)return{};for(var i=e.slice(0,t),n=e.match(Lm),r=1;r<n.length;){if(n[r])return{number:i,ext:n[r]};r++}}(n);return r.ext?r:{number:n}}(e,t.v2,t.extract),o=r.number,a=r.ext;if(!o){if(t.v2)throw new mm("TOO_SHORT"===r.error?"TOO_SHORT":"NOT_A_NUMBER");return{}}var s=function(e,t,i,n){var r,o=th(Gm(e),0,t,i,n.metadata),a=o.countryCallingCodeSource,s=o.countryCallingCode,d=o.number;if(s)n.selectNumberingPlan(s);else{if(!d||!t&&!i)return{};t?(r=t,n.selectNumberingPlan(t),s=n.numberingPlan.callingCode()):(n.selectNumberingPlan(i),s=i)}if(!d)return{countryCallingCodeSource:a,countryCallingCode:s};var c=eh(Gm(d),void 0,n),l=c.nationalNumber,u=c.carrierCode,p=Xm(s,{nationalNumber:l,metadata:n});return p&&(r=p,"001"===p||n.selectNumberingPlan(r)),{country:r,countryCallingCode:s,countryCallingCodeSource:a,nationalNumber:l,carrierCode:u}}(o,t.defaultCountry,t.defaultCallingCode,n),d=s.country,c=s.nationalNumber,l=s.countryCallingCode,u=s.countryCallingCodeSource,p=s.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new mm("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new mm("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new mm("TOO_LONG");return{}}if(t.v2){var m=new ph(l,c,n.metadata);return d&&(m.country=d),p&&(m.carrierCode=p),a&&(m.ext=a),m.__countryCallingCodeSource=u,m}var h=!!(t.extended?n.hasSelectedNumberingPlan():d)&&Vm(c,n.nationalNumberPattern());return t.extended?{country:d,countryCallingCode:l,carrierCode:p,valid:h,possible:!!h||!(!0!==t.extended||!n.possibleLengths()||!zm(c,n)),phone:c,ext:a}:h?function(e,t,i){var n={country:e,phone:t};return i&&(n.ext=i),n}(d,c,a):{}}function wh(e){return wh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wh(e)}function Ih(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Eh(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?Ih(Object(i),!0).forEach((function(t){kh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ih(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function kh(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=wh(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=wh(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==wh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Th(e){return Th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Th(e)}function Ah(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function xh(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?Ah(Object(i),!0).forEach((function(t){Sh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ah(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Sh(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=Th(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=Th(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==Th(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Dh(e){return Dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dh(e)}function Ch(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ph(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?Ch(Object(i),!0).forEach((function(t){Oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ch(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Oh(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=Dh(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=Dh(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==Dh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _h(){var e=om(arguments),t=e.options,i=e.metadata,n=function(e,t,i){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,i)&&(t=xh(xh({},t),{},{defaultCountry:void 0}));try{return function(e,t,i){return $h(e,Eh(Eh({},t),{},{v2:!0}),i)}(e,t,i)}catch(e){if(!(e instanceof mm))throw e}}(e.text,t=Ph(Ph({},t),{},{extract:!1}),i);return n&&n.isValid()||!1}const Rh=pp.omit({eventId:!0,channel:!0,analytics:!0}).partial().extend({id:Ji().meta({examples:[va.Order.id],description:"Unique identifier of the order to update"}),signature:fs.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded). Required for all order updates."}),items:Gn(cp).min(1).optional().meta({description:"Updated list of items for the order. Requires signature. Prices will be recalculated and payment intent updated."}),customer:Bn({firstName:Ji().meta({examples:[va.Customer.firstName],description:"Updated first name of the customer"}).optional(),lastName:Ji().meta({examples:[va.Customer.lastName],description:"Updated last name of the customer"}).optional(),email:en().meta({examples:[va.Customer.email],description:"Updated email address of the customer"}).optional(),phone:Ji().refine((e=>!e||function(){return function(e,t){var i=Array.prototype.slice.call(t);return i.push(Qp),e.apply(this,i)}(_h,arguments)}(e)),{message:"Phone must be in E.164 format (e.g., +61412345678)"}).meta({examples:[va.Customer.phone],description:"Updated phone number in E.164 format (e.g., +61412345678)"}).optional(),deliveryMethod:hp.optional()}).optional().meta({description:"Updated customer information for the order. All fields are optional for partial updates."}),marketingConsent:Uu.optional().meta({description:"Marketing opt-in choices captured during checkout."})}),Nh=Bn({id:Ji().meta({examples:[va.Order.id],description:"Unique identifier of the order"}),noteId:Ji().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to update"}),note:Ji().min(1).max(1e3).meta({examples:["Updated: Customer confirmed special seating arrangements"],description:"Updated note text content (1-1000 characters)"})});Bn({success:An().meta({description:"Whether the payout approval was successful"}),message:Ji().optional().meta({description:"Optional message about the approval result"}),payoutId:Ji().meta({description:"ID of the payout that was approved"})});const Uh=Bn({payoutId:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout for which to retrieve the detailed breakdown of orders and financial calculations."})}),Mh=Bn({id:Ji().readonly().meta({examples:[va.PayoutDeduction.id],description:"Unique identifier for this deduction record."}),createdAt:Si().readonly().meta({examples:[va.PayoutDeduction.createdAt],description:"Timestamp in ISO 8601 format when this deduction was created."}),updatedAt:Si().readonly().meta({examples:[va.PayoutDeduction.updatedAt],description:"Timestamp in ISO 8601 format when this deduction was last updated."}),amount:kn().max(0).meta({examples:[va.PayoutDeduction.amount],description:"Deprecated legacy deduction amount in cents. Negative values reduce the payout."}),currency:Ia.meta({examples:[va.PayoutDeduction.currency],description:"Currency code in ISO 4217 format for the deduction amount."}),description:Ji().meta({examples:[va.PayoutDeduction.description],description:"Human-readable description explaining the reason for this legacy deduction."}),gateway:Ji().meta({examples:[va.PayoutDeduction.gateway],description:"Payment gateway identifier where this legacy deduction was processed."}),gatewayId:Ji().meta({examples:[va.PayoutDeduction.gatewayId],description:"Unique identifier assigned by the payment gateway for this legacy deduction transaction."}),beneficiary:Ji().meta({examples:[va.PayoutDeduction.beneficiary],description:"Human-readable name of the beneficiary account from which this legacy deduction was taken."}),beneficiaryId:Ji().meta({examples:[va.PayoutDeduction.beneficiaryId],description:"Unique identifier of the beneficiary account from which this legacy deduction was taken."}),transferId:Ji().optional().meta({description:"Optional reference to a transfer record when this legacy deduction resulted in money being moved to a future payout."}),transferPayoutId:Ji().optional().meta({description:"Optional reference to a future payout where the legacy deducted amount was applied."})}),Lh=Bn({id:Ji().meta({examples:[va.Event.id],description:"Unique identifier for the event associated with this payout."}),name:Ji().meta({examples:[va.Event.name],description:"Human-readable name of the event."}),slug:Ji().meta({examples:[va.Event.slug],description:"URL-friendly slug identifier for the event."}),location:Ji().optional().meta({examples:[va.Event.location.name],description:"Optional human-readable location name where the event takes place."})}),jh=Bn({net:kn().meta({examples:[va.Payout.price.net],description:"Total amount to pay to promoter.\nCalculated as: total + booking + refunded + dispute"}),total:kn().meta({examples:[va.Payout.price.total],description:"Total amount the collected in ticket revenue.\nCalculated as: gross + discount"}),gross:kn().min(0).meta({examples:[va.Payout.price.gross],description:"Total amount before refunds, disputes and discounts.\nCalculated as: base + booking + shipping"}),base:kn().min(0).meta({examples:[va.Payout.price.base],description:"Total value of tickets."}),booking:kn().min(0).meta({examples:[va.Payout.price.booking],description:"Total value of booking fees (non-refundable)."}),shipping:kn().min(0).meta({examples:[va.Payout.price.shipping],description:"Total value of shipping."}),sms:kn().min(0).default(0).meta({examples:[va.Payout.price.sms],description:"Total SMS delivery fees collected in cents (owed to Session Services, not the event organiser)."}),refunded:kn().max(0).meta({examples:[va.Payout.price.refunded],description:"Total value of refunds (negative value)."}),discount:kn().max(0).meta({examples:[va.Payout.price.discount],description:"Total value of discounts (negative value)."}),gateway:kn().meta({examples:[va.Payout.price.gateway],description:"Total value of absorbed payment gateway fees. Negative values are charges; positive values are reversals."}),dispute:kn().meta({examples:[va.Payout.price.dispute],description:"Total value of non-absorbed payment gateway fees. Negative values are charges; positive values are reversals."}),deductions:kn().max(0).optional().meta({examples:[va.Payout.price.deductions],description:"Deprecated total value of legacy payout-level deductions. New recovery amounts are exposed through payout adjustments."}),currency:Ia.meta({examples:[va.Payout.price.currency],description:"Currency code in ISO 4217 format."})}),qh=Xn(["DISPUTE_REVERSAL_CREDIT","REFUND_REVERSAL_CREDIT"]),Gh=Bn({source:Xn(["AIRWALLEX_SETTLEMENT_CREDIT"]),kind:qh,adjustmentId:Ji(),adjustmentUniqueKey:Ji(),sourceKey:Ji(),sourcePayoutId:Ji(),settlementId:Ji(),transactionId:Ji().optional(),paymentIntentId:Ji().optional(),paymentAttemptId:Ji().optional(),createdActionPublishedAt:Si().optional()}),Fh=rp(Xn(["CREATED","APPROVED","REJECTED","PROCESSING","PAID","FAILED","CANCELLED","NOTE"]),{createdAtExamples:[va.Payout.createdAt],descriptionExamples:["Payout was created after event settlement"],externalIdDescription:"External idempotency key for deduplication (e.g., Airwallex transfer events)",externalIdExamples:["airwallex:transfer_abc123:completed"],idDescription:"Unique identifier for this timeline entry",idExamples:["tl_01jgxyz123abc"],kindDescription:"Type of timeline event (CREATED, APPROVED, PROCESSING, PAID, NOTE, etc.)",kindExamples:["CREATED","APPROVED","PAID"]}),Bh=Bn({id:Ji().meta({examples:[va.PayoutTransfer.id],description:"Unique identifier for this transfer record."}),createdAt:Si().meta({examples:[va.PayoutTransfer.createdAt],description:"Timestamp in ISO 8601 format when this transfer was created."}),kind:Xn(["TICKETS","TENANT","VENUE","TEAM","SESSIONS","UNKNOWN"]).meta({examples:["TICKETS"],description:"Type of transfer. TICKETS: revenue from ticket sales, TENANT: platform fees, VENUE: venue split, TEAM: team split, SESSIONS: platform commission, UNKNOWN: unclassified transfer."}),amount:kn().min(0).meta({examples:[va.PayoutTransfer.amount],description:"Transfer amount in cents. Positive values represent money being transferred to the beneficiary."}),currency:Ia.meta({examples:[va.PayoutTransfer.currency],description:"Currency code in ISO 4217 format for the transfer amount."}),fee:kn().min(0).meta({examples:[va.PayoutTransfer.fee],description:"Gateway processing fee for this transfer in cents. This fee is deducted from the transfer amount."}),feeCurrency:Ia.meta({examples:[va.PayoutTransfer.feeCurrency],description:"Currency code in ISO 4217 format for the gateway fee."}),reference:Ji().meta({examples:[va.PayoutTransfer.reference],description:"External reference identifier for tracking this transfer with the payment gateway."}),gateway:Xn(["AIRWALLEX","STRIPE"]).meta({examples:["AIRWALLEX"],description:"Payment gateway used to process this transfer."}),gatewayId:Ji().meta({examples:[va.PayoutTransfer.gatewayId],description:"Unique identifier assigned by the payment gateway for this transfer."}),beneficiary:Ji().meta({examples:[va.PayoutTransfer.beneficiary],description:"Human-readable name of the beneficiary receiving this transfer."}),beneficiaryId:Ji().meta({examples:[va.PayoutTransfer.beneficiaryId],description:"Unique identifier of the beneficiary account receiving this transfer."}),status:Ji().optional().meta({examples:["SCHEDULED"],description:"Transfer status from the payment gateway (e.g. SCHEDULED, IN_PROGRESS, COMPLETED)."}),settlementAmount:kn().min(0).optional().meta({examples:[3550],description:"Amount received by the beneficiary in their local currency, in cents. Present only for cross-currency transfers where the settlement currency differs from the source currency."}),settlementCurrency:Ia.optional().meta({examples:["USD"],description:"Currency code in ISO 4217 format for the settlement amount. Present only for cross-currency transfers."}),deductionId:Ji().optional().meta({description:"Deprecated optional reference to a legacy deduction record."}),deductionPayoutId:Ji().optional().meta({description:"Deprecated optional reference to the payout that originated a legacy deduction transfer."})}),zh=Xn(["UPCOMING","FAILED","PROCESSING","PAID","CANCELLED"]),Vh=Xn(["AIRWALLEX","STRIPE","MANUAL"]),Yh=Xn(["DAILY","WEEKLY","AFTER_EVENT","ON_DEMAND"]),Wh=Bn({id:Ji().readonly().meta({examples:[va.Payout.id],description:"A unique identifier for this payout."}),createdAt:Si().readonly().meta({examples:[va.Payout.createdAt],description:"Timestamp in ISO 8601 format when this payout was created."}),updatedAt:Si().readonly().meta({examples:[va.Payout.updatedAt],description:"Timestamp in ISO 8601 format when this payout was last updated."}),paidAt:Si().optional().meta({examples:[va.Payout.paidAt],description:"Timestamp in ISO 8601 format when this payout was completed."}),dueAt:Si().optional().meta({examples:[va.Payout.createdAt],description:"Earliest timestamp in ISO 8601 format when this payout can be picked up for processing. This is not a guaranteed bank arrival time."}),status:zh.meta({examples:["PAID"],description:"Current payment status of this payout."}),method:Vh.meta({examples:["MANUAL"],description:"The payout channel used for disbursing funds."}),approval:wa.meta({examples:["APPROVED"],description:"Approval status for this payout."}),frequency:Yh.default("AFTER_EVENT").meta({examples:["AFTER_EVENT"],description:"Schedule on which this payout is generated."}),structure:Ji().meta({examples:[va.Payout.structure],description:"Data structure defining how funds are allocated in this payout."}),transfers:Gn(Bh).meta({description:"List of individual transfer records included in this payout."}),deductions:Gn(Mh).optional().meta({description:"Deprecated legacy deductions applied before calculating the payout total. New recovery amounts are exposed through payout adjustments."}),price:jh.meta({description:"Summary of event/order-derived amounts for this payout."}),recovery:Gh.optional().meta({description:"Optional recovery metadata when this payout exists to return settlement-proven recovered funds."}),event:Lh.meta({description:"Information about the event associated with this payout."}),timeline:Gn(Fh).optional().meta({description:"Chronological list of status changes and notes for this payout."}),eventId:Ji().meta({examples:[va.Payout.eventId],description:"Identifier of the event for which this payout was generated."}),teamId:Ji().meta({description:"Team receiving this payout. BREAKING CHANGE: Replaced promoterId/promoterSlug."})}).meta({description:"payout"});Bn({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout to approve for processing."})}),Bn({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout to reject."}),reason:Ji().optional().meta({examples:["Insufficient funds in account"],description:"Optional reason for rejecting the payout. This will be recorded for audit purposes."})}),Bn({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout to process and initiate transfers."})}),Bn({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout to retry transfer processing for."})});const Zh=Bn({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout to add a note to"}),note:Ji().trim().min(1).max(1e3).meta({examples:["Transfer confirmed via bank statement"],description:"Note text content (1-1000 characters)"})}),Hh=Bn({name:Ji(),gateway:Xn(["AIRWALLEX","STRIPE","FREE"]),message:Ji(),eventIds:Gn(Ji()).optional(),venues:Gn(Ji()).optional(),tenants:Gn(Ji()).optional(),teams:Gn(Ji()).optional(),ticketBeneficiaryTeamId:Ji().optional(),min:In().optional(),max:In().optional(),percent:In().optional(),split:Bn({tenant:In(),team:In(),venue:In(),sessions:In()})}),Kh=Bn({tenant:In().meta({examples:[5e4],description:"Amount allocated to the tenant (platform) in cents. This represents the platform's share of the revenue."}),venue:In().meta({examples:[25e3],description:"Amount allocated to the venue in cents. This represents the venue's share of the revenue from events held at their location."}),team:In().meta({examples:[2e4],description:"Amount allocated to the team in cents. This represents the team's share of the revenue after fees and other deductions."}),sessions:In().meta({examples:[3e3],description:"Amount allocated to Sessions platform commission in cents. This represents the platform's service fees."}),tickets:In().meta({examples:[2e3],description:"Amount allocated to ticketing fees in cents. This represents fees charged for ticket processing and management."})});Bn({payout:Wh.meta({description:"Complete payout record containing all financial details and metadata for calculating beneficiary allocations."}),feeStructure:Hh.meta({description:"Fee structure configuration that defines how revenue is split between different parties (promoter, venue, platform, etc.)."}),split:Kh.meta({description:"Calculated split amounts showing how the payout total is divided among the different beneficiaries in cents."})});const Jh=Bn({orders:In().meta({examples:[150],description:"Total number of orders included in this payout breakdown."}),price:zu.meta({description:"Aggregated price information for all orders included in this payout, showing total revenue, fees, refunds, and disputes."}),split:Kh.meta({description:"How the total payout amount is split between different beneficiaries (tenant, venue, promoter, etc.) in cents."}),structure:Ji().meta({examples:["DEFAULT"],description:"Fee structure identifier that was used to calculate the payout split and allocations."})}),Qh=Bn({total:Jh.meta({description:"Summary totals for all orders included in this payout breakdown, including aggregated financial calculations."}),orders:Gn(Bn({order:sp.meta({description:"Complete order information including customer details, items, and payment status."}),price:zu.meta({description:"Settled price information for this specific order, showing final amounts after refunds and adjustments."}),split:Kh.meta({description:"How this individual order's revenue is split between different beneficiaries in cents."}),structure:Ji().meta({examples:["DEFAULT"],description:"Fee structure identifier used to calculate the split for this order."})})).meta({description:"Detailed breakdown of individual orders included in this payout, showing how each order contributes to the total."})});Wh.pick({id:!0,eventId:!0}).extend({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout for which to retrieve the detailed breakdown."}),eventId:Ji().meta({examples:[va.Event.id],description:"Unique identifier of the event associated with the payout breakdown."})}),Wh.pick({eventId:!0,teamId:!0,method:!0,frequency:!0}).partial({method:!0,frequency:!0}).meta({description:"Schema for creating a new payout record"}).extend({eventId:Ji().meta({examples:[va.Event.id],description:"Unique identifier of the event for which the payout is being created"}),teamId:Ji().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"Unique identifier of the team who will receive the payout"}),method:Xn(["AIRWALLEX","STRIPE","MANUAL"]).optional().meta({examples:["AIRWALLEX"],description:"Optional payment method for the payout. Defaults to promoter's preferred method if not specified"}),frequency:Xn(["DAILY","WEEKLY","AFTER_EVENT"]).optional().meta({examples:["AFTER_EVENT"],description:"Optional payout frequency. Defaults to 'AFTER_EVENT' if not specified"})});const Xh=Bn({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout"}),noteId:Ji().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to delete"})}),ef=Wh.pick({id:!0}).extend({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout to retrieve."})}),tf=Xn(["createdAt"]),nf=Xn(["asc","desc"]),rf=Bn({mine:An().optional().meta({examples:[!0],description:"When true, returns payouts from teams where the authenticated user has payout access (for example, `payout.read` or `payout.write`)."}),teamId:Ji().optional().meta({description:"Filter payouts by specific team unique identifier. BREAKING CHANGE: Replaced promoterId filter."}),eventId:Ji().optional().meta({examples:[va.Event.id],description:"Filter payouts by specific event unique identifier. When provided, only returns payouts for this event."}),status:Xn(["UPCOMING","FAILED","PROCESSING","PAID","CANCELLED"]).optional().meta({examples:["PAID"],description:"Filter payouts by payment status. UPCOMING: scheduled but not yet processed, FAILED: failed processing and will retry, PROCESSING: currently being processed, PAID: successfully completed, CANCELLED: cancelled before completion."}),approval:wa.optional().meta({examples:["APPROVED"],description:"Filter payouts by approval status. PENDING: awaiting approval, APPROVED: approved for processing, REJECTED: rejected and will not be processed."}),query:Ji().optional().meta({examples:["PAID venue:sydney"],description:"Optional search query to filter payouts by text fields. When provided, search-backed pagination is used."}),sort:tf.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest payouts first."}),direction:nf.optional().meta({examples:["desc"],description:"Sort direction for payout lists. Defaults to `desc` when `sort` is provided."}),limit:es("payouts").optional(),cursor:Ji().optional().meta({examples:["eyJpZCI6InBheV8wMWpwczVjZ3NmdjJ3cmU2aGQwcmM0dzR0OCJ9"],description:"Pagination cursor for continuing to fetch subsequent results. Use the cursor from the previous response to continue."})}).meta({description:"Schema for listing payouts with optional filtering, search, and cursor-based pagination"}),of=As(Wh,"payouts"),af=Bn({status:Xn(["VALID","FALLBACK","MISSING"]).meta({examples:["VALID"],description:"Resolution status for the beneficiary used by this split. FALLBACK indicates a non-strict match was used, MISSING means no beneficiary is configured."}),warning:Ji().optional().meta({examples:["Using fallback beneficiary with matching gateway only."],description:"Optional warning message shown when fallback or missing beneficiary resolution was required."}),beneficiary:Bn({id:Ji().optional().meta({examples:[va.Beneficiary.id],description:"Identifier for the beneficiary."}),teamId:Ji().optional().meta({examples:[va.Team.id],description:"Team that owns this beneficiary configuration."}),name:Ji().meta({examples:[va.Beneficiary.name],description:"Display name for the resolved beneficiary."}),gateway:Xn(["AIRWALLEX","STRIPE"]).optional().meta({examples:[va.Beneficiary.gateway],description:"Payment gateway for this beneficiary when available from configuration."}),gatewayId:Ji().meta({examples:[va.Beneficiary.gatewayId],description:"Gateway-specific beneficiary identifier used for transfer creation."}),currency:Ia.meta({examples:[va.Beneficiary.currency],description:"Currency configured for this beneficiary."})}).optional()}),sf=Bn({kind:Xn(["tickets","tenant","venue","team","sessions"]).meta({examples:["tickets"],description:"Split component represented by this row."}),amount:In().int().meta({examples:[114500],description:"Amount in cents for this split component."}),currency:Ia.meta({examples:[va.Payout.price.currency],description:"Currency code for this split component."}),beneficiary:af}),df=Xn(["TRACKED","N_A","SKIPPED"]),cf=Bn({orders:In().int().meta({examples:[12],description:"Number of orders in this settlement bucket."}),price:zu.meta({description:"Aggregated totals for the orders in this bucket, in the bucket's native currency."})}),lf=Bn({state:df.meta({examples:["TRACKED"],description:"Whether settlement tracking applies to this payout preview. Non-Airwallex payouts return N_A."}),settled:cf.optional().meta({description:"Completed Airwallex orders that already have settlement data available."}),awaitingSettlement:cf.optional().meta({description:"Completed Airwallex orders still waiting on settlement ingestion."})}),uf=Bn({payout:Wh.pick({id:!0,status:!0,approval:!0,method:!0,frequency:!0,structure:!0,createdAt:!0,dueAt:!0,teamId:!0,eventId:!0,event:!0,price:!0}).meta({description:"Lightweight payout summary used by approvals and payout queue UIs."}),rows:Gn(sf).meta({description:"Non-zero split rows with beneficiary resolution status and warnings."}),settlementSummary:lf.meta({description:"Settlement status summary for the payout event. Airwallex payouts expose settled vs awaiting-settlement buckets."})}),pf=ef.extend({includeSettlementSummary:An().optional().meta({examples:[!0],description:"When true, includes the Airwallex settlement summary for the payout preview."})}),mf=Xn(["REFUND","DISPUTE_PRINCIPAL","DISPUTE_FEE","GATEWAY_FEE","NEGATIVE_PAYOUT_CARRY_FORWARD","LEGACY_ADJUSTMENT"]),hf=Xn(["RESERVED","OPEN","PARTIALLY_APPLIED","APPLIED"]),ff=Xn(["OUTSTANDING","APPLIED","ALL"]),yf=Xn(["event","payout"]),vf=Bn({id:Ji(),name:Ji(),slug:Ji()}),gf=Bn({id:Ji(),status:zh,approval:wa,method:Vh,dueAt:Si().optional(),paidAt:Si().optional(),event:vf,price:jh}),bf=Bn({id:Ji(),payoutId:Ji(),amount:kn().min(0),currency:Ia,appliedAt:Si(),transferId:Ji().optional(),payout:gf.optional()}),$f=Bn({id:Ji(),createdAt:Si(),updatedAt:Si(),provenAt:Si(),teamId:Ji(),eventId:Ji().optional(),orderId:Ji().optional(),payoutId:Ji().optional(),sourcePayoutId:Ji().optional(),gateway:Vh,kind:mf,direction:tr("DEBIT"),status:hf,amount:kn().min(0),appliedAmount:kn().min(0),remainingAmount:kn().min(0),currency:Ia,beneficiary:Ji(),beneficiaryId:Ji(),description:Ji(),settlementId:Ji().optional(),transactionId:Ji().optional(),feeType:Ji().optional(),feeSourceId:Ji().optional(),disputeId:Ji().optional(),refundId:Ji().optional(),paymentIntentId:Ji().optional(),paymentAttemptId:Ji().optional(),customer:Du.optional(),event:vf.optional(),sourcePayout:gf.optional(),applications:Gn(bf)}),wf=Bn({id:Ji()}),If=Bn({adjustmentId:Ji(),amount:kn().min(0),currency:Ia}),Ef=Bn({amount:kn().min(0),appliedAmount:kn().min(0),remainingAmount:kn().min(0),projectedAmount:kn().min(0),currency:Ia}),kf=Bn({id:Ji(),event:vf.optional(),adjustments:Gn($f),totals:Gn(Ef)}),Tf=Bn({id:Ji(),payout:gf,adjustments:Gn($f),projections:Gn(If),totals:Gn(Ef),projectedNetAmount:kn()}),Af=Bn({adjustmentCount:kn().min(0),eventCount:kn().min(0),upcomingPayoutCount:kn().min(0),totals:Gn(Ef)}),xf=Bn({teamId:Ji(),query:Ji().optional(),status:ff.optional(),groupBy:yf.optional(),eventId:Ji().optional(),currency:Ia.optional(),limit:es("adjustments").optional(),cursor:ts.optional()}),Sf=Bn({adjustments:Gn($f),eventGroups:Gn(kf),payoutGroups:Gn(Tf),summary:Af,summaryScope:tr("PAGE"),before:Ji().nullish(),after:Ji().nullish(),limit:In().int().min(1)}),Df=Bn({adjustment:$f,adjustments:Gn($f),eventGroups:Gn(kf),payoutGroups:Gn(Tf),summary:Af}),Cf=Bn({payout:Wh,breakdown:Qh,appliedAdjustments:Gn($f),projectedAdjustmentGroup:Tf.optional(),canExportBookingFees:An()}),Pf=Jn(Ji(),Jn(Ji(),Bn({net:In(),total:In(),gross:In(),base:In(),booking:In(),shipping:In(),refunded:In(),discount:In(),gateway:In(),dispute:In(),deductions:In().default(0)}))).meta({description:"Payout statistics grouped by period (current/previous) and currency",examples:[{current:{USD:{net:1e5,total:12e4,gross:115e3,base:11e4,booking:5e3,shipping:0,refunded:0,discount:5e3,gateway:3e3,dispute:0}},previous:{USD:{net:8e4,total:95e3,gross:9e4,base:85e3,booking:5e3,shipping:0,refunded:0,discount:5e3,gateway:2500,dispute:0}}}]}),Of=Bn({teamId:Ji().optional().meta({description:"Filter stats by team ID"}),startDate:Ji().optional().meta({description:"Start date for stats period (YYYY-MM-DD)"}),endDate:Ji().optional().meta({description:"End date for stats period (YYYY-MM-DD)"})}),_f=Wh.pick({id:!0}).merge(Wh.pick({status:!0,approval:!0}).partial()).extend({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout to update."}),status:Xn(["CANCELLED"]).optional().meta({examples:["CANCELLED"],description:"Optional new payment status for the payout. Only CANCELLED is allowed for manual updates."}),approval:wa.optional().meta({examples:["APPROVED"],description:"Optional new approval status for the payout. PENDING: awaiting approval, APPROVED: approved for processing, REJECTED: rejected."})}),Rf=Bn({id:Ji().meta({examples:[va.Payout.id],description:"Unique identifier of the payout"}),noteId:Ji().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to update"}),note:Ji().trim().min(1).max(1e3).meta({examples:["Updated: Transfer confirmed - reference #12345"],description:"Updated note text content (1-1000 characters)"})}),Nf=Xn(["PROMOTER","VENUE"]).meta({description:"Type of permission scope. PROMOTER: applies to all events by a specific promoter. VENUE: applies to all events at a specific venue."}),Uf=Bn({id:Ji().readonly().meta({description:"Unique identifier for the permission scope"}),createdAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the scope was created"}),updatedAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the scope was last updated"}),teamMemberId:Ji().meta({description:"Team member this scope applies to"}),teamId:Ji().meta({description:"Team the member belongs to"}),userId:Ji().meta({description:"ID of the user this permission scope applies to"}),permissions:Gn(ps).meta({description:"Scoped permissions. Can be empty array to remove all access. Replaces lower-tier permissions based on kind (VENUE overrides PROMOTER overrides BASE)."}),roleIds:Gn(Ji()).optional().meta({description:"Optional role IDs applied at this scope. Role-derived permissions are merged with explicit scoped nodes."}),tenantId:Ji().readonly().meta({description:"Tenant identifier"})}),Mf=Zn("kind",[Uf.extend({kind:tr("PROMOTER").meta({description:"Scope type: PROMOTER-specific permissions"}),promoterId:Ji().meta({description:"Promoter this scope applies to. Replaces base permissions for all events by this promoter."})}).meta({description:"PROMOTER-specific permission scope. Applies to all events by the specified promoter."}),Uf.extend({kind:tr("VENUE").meta({description:"Scope type: VENUE-specific permissions"}),venueId:Ji().meta({description:"Venue this scope applies to. Replaces base/promoter permissions for all events at this venue."})}).meta({description:"VENUE-specific permission scope. Applies to all events at the specified venue."})]).meta({description:"Permission scope for a team member. Can be PROMOTER-specific (applies to all events by that promoter) or VENUE-specific (applies to all events at that venue). Replaces lower-tier permissions using REPLACE semantics."}),Lf=Bn({permissions:Gn(ps).meta({description:"Scoped permissions. Can be empty array to remove all access. Replaces lower-tier permissions based on kind (VENUE overrides PROMOTER overrides BASE)."}),roleIds:Gn(Ji()).optional().meta({description:"Optional role IDs to apply at this scope."})}),jf=Zn("kind",[Lf.extend({kind:tr("PROMOTER").meta({description:"Scope type: PROMOTER-specific permissions"}),promoterId:Ji().meta({description:"Promoter this scope applies to. Replaces base permissions for all events by this promoter."})}).meta({description:"Create a PROMOTER-specific permission scope. Applies to all events by the specified promoter."}),Lf.extend({kind:tr("VENUE").meta({description:"Scope type: VENUE-specific permissions"}),venueId:Ji().meta({description:"Venue this scope applies to. Replaces base/promoter permissions for all events at this venue."})}).meta({description:"Create a VENUE-specific permission scope. Applies to all events at the specified venue."})]).meta({description:"Schema for creating a new permission scope. Must specify kind (PROMOTER or VENUE) and corresponding ID."}),qf=Bn({id:za.meta({description:"Unique identifier for the permission scope"})}).meta({description:"Schema for retrieving a single permission scope by ID"}),Gf=Bn({teamMemberId:Ji().optional().meta({description:"Filter by team member ID"}),userId:Ji().optional().meta({description:"Filter by user ID"}),kind:Nf.optional().meta({description:"Filter by scope kind (PROMOTER or VENUE)"}),promoterId:Ji().optional().meta({description:"Filter by promoter ID (only for kind=PROMOTER scopes)"}),venueId:Ji().optional().meta({description:"Filter by venue ID (only for kind=VENUE scopes)"}),limit:es("permission scopes"),cursor:Ji().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing permission scopes with pagination and filtering"}),Ff=As(Mf,"items").meta({description:"Paginated response containing permission scopes with cursor for next page"}),Bf=Lf.meta({description:"Schema for updating an existing permission scope. Only permissions array can be modified."}),zf=Bn({id:Va.meta({description:"Permission role ID"}),teamId:Da.meta({description:"Team that owns this role"}),name:Ji().min(1).meta({description:"Role display name"}),description:Ji().optional().meta({description:"Optional role description"}),permissions:hs.meta({description:"Permission nodes granted by this role"}),createdAt:Si().meta({description:"Timestamp in ISO 8601 format when the role was created"}),updatedAt:Si().meta({description:"Timestamp in ISO 8601 format when the role was last updated"})}).meta({description:"Team-scoped permission role"}),Vf=Bn({role:zf}),Yf=Bn({roles:Gn(zf)}),Wf=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"})}),Zf=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),roleId:Va}),Hf=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),name:Ji().min(1).meta({description:"Role display name"}),description:Ji().optional().meta({description:"Optional role description"}),permissions:hs}),Kf=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),roleId:Va,name:Ji().min(1).meta({description:"Role display name"}),description:Ji().optional().meta({description:"Optional role description"}),permissions:hs}),Jf=Bn({memberId:Ga,permissions:Gn(ps),updatedAt:Si()}),Qf=Bn({member:Jf}),Xf=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),memberId:Ga}),ey=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),memberId:Ga,permissions:Gn(ps).meta({description:"Direct permission nodes for this member. Full-replace semantics; use an empty array to remove all direct grants."})}),ty=Bn({memberId:Ga,roleIds:Gn(Va).meta({description:"Role IDs assigned to this member"}),updatedAt:Si()}),iy=Bn({member:ty}),ny=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),memberId:Ga}),ry=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),memberId:Ga,roleIds:Gn(Va)}),oy=Bn({direct:Gn(Ji()),fromRoles:Gn(Ji()),effective:Gn(Ji()),denied:Gn(Ji())});Bn({memberId:Ga,permissions:oy}),Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),memberId:Ga,domain:Ji().optional().meta({description:"Optional domain filter (for example: ticket, event)"}),action:Ji().optional().meta({description:"Optional action filter (for example: read, write, scan)"}),resourceId:Ji().optional().meta({description:"Optional resource ID filter"})});var ay={roles:{list:ea.route({method:"GET",path:"/teams/{key}/roles",summary:"List team roles",description:"Returns all roles configured for a team.",tags:["Permissions"]}).input(Wf.strict()).output(Yf),create:ea.route({method:"POST",path:"/teams/{key}/roles",summary:"Create team role",description:"Creates a team-scoped permission role.",tags:["Permissions"]}).input(Hf.strict()).output(Vf),get:ea.route({method:"GET",path:"/teams/{key}/roles/{roleId}",summary:"Get team role",description:"Retrieves a team role by ID.",tags:["Permissions"]}).input(Zf.strict()).output(Vf),update:ea.route({method:"PUT",path:"/teams/{key}/roles/{roleId}",summary:"Replace team role",description:"Full-replace, idempotent update for role name, description, and permissions.",tags:["Permissions"]}).input(Kf.strict()).output(Vf),remove:ea.route({method:"DELETE",path:"/teams/{key}/roles/{roleId}",summary:"Delete team role",description:"Deletes a team role.",tags:["Permissions"]}).input(Zf.strict()).output(Vf)},members:{permissions:{get:ea.route({method:"GET",path:"/teams/{key}/members/{memberId}/permissions",summary:"Get member direct permissions",description:"Returns direct permission nodes assigned to a member.",tags:["Permissions"]}).input(Xf.strict()).output(Qf),replace:ea.route({method:"PUT",path:"/teams/{key}/members/{memberId}/permissions",summary:"Replace member direct permissions",description:"Full-replace, idempotent update for direct permission nodes assigned to a member.",tags:["Permissions"]}).input(ey.strict()).output(Qf)},roles:{get:ea.route({method:"GET",path:"/teams/{key}/members/{memberId}/roles",summary:"Get member role assignments",description:"Returns role IDs assigned to a member.",tags:["Permissions"]}).input(ny.strict()).output(iy),replace:ea.route({method:"PUT",path:"/teams/{key}/members/{memberId}/roles",summary:"Replace member role assignments",description:"Full-replace, idempotent update for role assignments on a member.",tags:["Permissions"]}).input(ry.strict()).output(iy)}}};const sy=Bn({key:Ji().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[va.Promoter.id,va.Promoter.slug]})}).meta({description:"Request schema for retrieving a promoter by either its unique ID or slug"});Pl.pick({slug:!0});const dy=Pl.omit({id:!0,createdAt:!0,updatedAt:!0,geohash:!0,approval:!0,location:!0}).extend({teamId:Ji().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"ID of the team that will own this promoter. User must be a member of this team."}),slug:Ji().min(3).max(30).optional().meta({examples:[va.Promoter.slug],description:"URL-friendly slug for the promoter organization. If not provided, will be automatically generated from the name. Must be unique and between 3 and 30 characters"}),...Sp}).refine(Dp,{message:xp}).meta({description:"Schema for creating a new promoter organization. The system automatically generates the ID, tenant association, geohash, and timestamps"}),cy=Bn({key:Ji().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[va.Promoter.id,va.Promoter.slug]})}).meta({description:"Schema for removing (soft deleting) a promoter organization by key (ID or slug)"});Pl.pick({id:!0}).meta({description:"Schema for retrieving a specific promoter by ID"});const ly=Xn(["createdAt"]),uy=Xn(["asc","desc"]),py=zn({teamId:Ji().max(128).optional().meta({description:"Filter promoters to only those belonging to a specific team"}),approval:wa.optional().meta({examples:[va.Promoter.approval],description:"Filter promoters by approval status. PENDING: awaiting review, APPROVED: can create events, REJECTED: cannot operate"}),query:Ji().max(120).optional().meta({examples:["Session Services"],description:"Optional search query. When provided, results are fetched from search with unified cursor pagination."}),latitude:ba().min(-90).max(90).optional().meta({examples:[va.Promoter.location.latitude],description:"Latitude used with longitude and radius to filter promoters by proximity when searching."}),longitude:ba().min(-180).max(180).optional().meta({examples:[va.Promoter.location.longitude],description:"Longitude used with latitude and radius to filter promoters by proximity when searching."}),radius:ba().min(1).max(2e4).optional().meta({examples:[50],description:"Search radius in kilometers applied when latitude and longitude are provided."}),mine:$a().optional().meta({examples:[!0],description:"When true, limits results to promoters from teams the current user belongs to. When combined with teamId, returns only that team's promoters (bypassing tenant-wide admin scope)."}),sort:ly.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest promoters first."}),direction:uy.optional().meta({examples:["desc"],description:"Sort direction for promoter lists. Defaults to `desc` when omitted."}),limit:function(e,t){return new fr({type:"pipe",in:nr((e=>{if(null!=e)return"string"==typeof e?function(e){let t=e.trim();if(0===t.length)return;let i=Number(t);return Number.isNaN(i)?e:i}(e):e})),out:t})}(0,In().min(1).max(100).prefault(20)).meta({examples:[20],description:"Maximum number of promoters to return (1-100, defaults to 20)"}).optional(),cursor:Ji().max(768).optional().meta({examples:["eyJpZCI6InByb18wMWpxcGprc25zZW45dnBydzk1ZXQ2MHQybSJ9"],description:"Opaque cursor for pagination. Use the cursor from the previous response to continue fetching results."})}).meta({description:"Schema for listing promoters with optional filtering by team, full-text search, and cursor pagination"}),my=As(Pl,"promoters"),hy=Bn({promoter:Pl}),fy=Pl.omit({createdAt:!0,updatedAt:!0,id:!0,location:!0}).partial().extend({key:Ji().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[va.Promoter.id,va.Promoter.slug]}),locationId:Oa.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:Ji().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."}),image:Wa.nullable().optional().meta({description:"Promoter image. Pass null to clear; omit to leave unchanged.",examples:[va.Promoter.image,null]}),tracking:Bn({fbId:Ji().optional(),gaId:Cl.optional(),tikTokId:Ji().optional()}).nullable().optional().meta({description:"Analytics tracking config. Pass null to clear all tracking; omit to leave unchanged."})}).meta({description:"Schema for updating an existing promoter."}),yy=Xn(["PAYOUT_STATEMENT","PAYOUT_ORDER_BREAKDOWN","PAYOUT_BOOKING_FEE_BREAKDOWN","PAYOUT_ADJUSTMENT_BREAKDOWN","EVENT_ORDERS"]),vy=Xn(["QUEUED","PROCESSING","COMPLETED","FAILED"]),gy=Bn({payoutId:Ji().describe("Payout identifier"),teamId:Ji().optional().describe("Requesting team identifier")}),by=Bn({eventId:Ji().describe("Event identifier")}),$y=Zn("type",[Bn({type:tr("PAYOUT_STATEMENT"),params:gy}),Bn({type:tr("PAYOUT_ORDER_BREAKDOWN"),params:gy}),Bn({type:tr("PAYOUT_BOOKING_FEE_BREAKDOWN"),params:gy}),Bn({type:tr("PAYOUT_ADJUSTMENT_BREAKDOWN"),params:gy}),Bn({type:tr("EVENT_ORDERS"),params:by})]),wy=Bn({id:Ji().describe("Report job identifier")}),Iy=Bn({id:Ji(),type:yy,status:vy,createdAt:Ji(),updatedAt:Ji(),expiresAt:Ji().optional(),filename:Ji().optional(),contentType:Ji().optional(),sizeBytes:In().optional(),error:Ji().optional(),downloadUrl:Ji().optional()}),Ey=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),inviteId:Ji().meta({description:"Team invite ID to accept"}),token:Ji().meta({description:"Secure token used to accept the team invite. This token must match the one sent in the invitation email."})}),ky=Xn(["TEAM","EVENTS"]),Ty=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),scope:ky.meta({description:"Stripe Connect event routing scope. TEAM routes every team event through Stripe Connect. EVENTS routes selected events only.",examples:["EVENTS"]}),eventIds:Gn(Ca).max(100).optional().meta({description:"Event IDs routed through Stripe Connect when scope is EVENTS. Omit or pass an empty array to keep Stripe Connect disabled for all events in EVENTS mode."})}),Ay=Bn({provider:Xn(["STRIPE","AIRWALLEX"]).meta({description:"Payment gateway provider type"}),connectedAt:Si().meta({description:"Timestamp when the payment gateway was connected to this team"}),connectedBy:Ji().meta({description:"User ID of the team member who connected the payment gateway"}),accountId:Ji().meta({description:"Connected account ID. For Stripe: acct_xxxxx. For Airwallex: business account open ID."}),scope:ky.optional().meta({description:"Stripe Connect routing scope. TEAM routes all team events through Stripe Connect. EVENTS routes only selected events."}),eventIds:Gn(Ca).optional().meta({description:"Event IDs routed through Stripe Connect when scope is EVENTS."}),chargesEnabled:An().optional().meta({description:"Whether the connected Stripe account can currently accept charges."}),payoutsEnabled:An().optional().meta({description:"Whether the connected Stripe account can currently receive payouts."}),requirementsDue:Gn(Ji()).optional().meta({description:"Stripe Connect account requirements currently due before the account can remain fully enabled."}),disabledReason:Ji().optional().meta({description:"Stripe disabled reason for the connected account, when Stripe reports one."}),syncedAt:Si().optional().meta({description:"Timestamp when gateway account status was last synced from the provider."})}).meta({description:"Payment gateway configuration for direct payouts to the team's connected account"}),xy=Bn({id:Da.readonly().meta({description:"Unique identifier for the team organization"}),createdAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the team was created"}),updatedAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the team was last updated"}),name:Ji().min(3).max(30).meta({description:"Display name of the team organization. Must be between 3 and 30 characters"}),slug:Ji().min(3).max(30).meta({description:"URL-friendly slug for the team organization. Must be unique within tenant and between 3 and 30 characters"}),supportEmail:Ji().email().optional().meta({description:"Support email address for customer inquiries. Used as reply-to address in order confirmation emails"}),publicBaseUrl:on().optional().meta({description:"Optional public website base URL for team-owned event and order links. When present, it overrides the tenant public base URL.",examples:["https://sash.net.au"]}),image:Wa.optional().meta({description:"Team image with dimensions and alt text for branding across the platform"}),metadata:Qa,approval:wa.meta({description:"Approval status of the team. PENDING: awaiting review, APPROVED: can create promoters/venues/events, REJECTED: cannot operate"}),deletedAt:Si().optional().readonly().meta({description:"Timestamp in ISO 8601 format when the team was soft deleted. Only present for deleted teams."}),tenantId:Ji().readonly().meta({description:"Tenant ID for multi-tenant isolation"}),isAdmin:An().optional().meta({description:"Whether this team is the admin team for the tenant"}),gateway:Ay.optional().meta({description:"Connected payment gateway for direct payouts. When connected, funds from ticket sales go directly to the team's account with platform fees deducted."})}).meta({description:"Team organization that owns promoters and venues. Multiple brands can exist under one team."});xy.extend({promoter:Pl.meta({description:"The primary promoter brand associated with this team"})}).meta({description:"Team organization with its primary promoter brand included for convenience"});const Sy=xy.extend({member:Bn({id:Ga.meta({description:"Current user's team member identifier for this team"}),permissions:ms.meta({description:"Permissions the current user has for this team. Controls access to team resources.",examples:[[],["team.read","team.write"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),isOwner:An().meta({description:"Whether the current user is the owner of this team. Owners have full control."})}).optional().meta({description:"Current user's membership details for this team. Present when user is a member."})}).meta({description:"Team organization with the current user's membership details"}),Dy=Bn({key:Ji().min(1).meta({description:"Team key - either a unique ID (tem_xxx format) or URL-friendly slug",examples:[va.Team.id,va.Team.slug]})}).meta({description:"Request schema for retrieving a team by either its unique ID or slug"}),Cy=xy.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,deletedAt:!0}).extend({slug:Ji().min(3).max(30).optional().meta({description:"URL-friendly slug for the team organization. If not provided, will be automatically generated from the name. Must be unique within tenant and between 3 and 30 characters"}),approval:xy.shape.approval.optional().meta({description:"Approval status of the team. Defaults to PENDING if not specified."})}).meta({description:"Schema for creating a new team organization. The system automatically generates the ID, tenant association, and timestamps"});Bn({id:Da.meta({description:"Team ID to delete"})}),Bn({id:Da.meta({description:"Team ID to retrieve"})});const Py=Bn({id:Fa.readonly().meta({description:"Unique identifier for the team invitation"}),createdAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was created"}),updatedAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was last updated"}),teamId:Da.meta({description:"Team this invitation is for"}),email:en().meta({description:"Email address of the invited user. Used for sending invitation."}),permissions:Gn(ps).meta({description:"Permissions the user will receive upon accepting the invitation. Can be overridden per promoter or venue.",examples:[[],["event.read","event.write","order.read"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),roleIds:Gn(Ji()).optional().meta({description:"Role IDs assigned on invite acceptance. Effective permissions are role + explicit nodes."}),access:ys.optional().meta({description:"Promoter access to apply when the invitation is accepted."}),token:Ji().readonly().meta({description:"Secure token for invite acceptance. Required to accept the invitation."}),expiresAt:In().int().positive().meta({description:"Unix timestamp (seconds) for DynamoDB TTL. Invitation will be automatically deleted after 7 days."}),invitedBy:_a.meta({description:"User ID who sent the invitation"}),tenantId:Ji().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Pending team invitation. Automatically deleted after 7 days via DynamoDB TTL. When accepted, creates a TeamMember record and deletes the invitation."}),Oy=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),inviteId:Ji().meta({description:"Team invite ID to cancel"})}),_y=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),email:en().meta({description:"Email address of the user to invite"}),roleIds:Gn(Ji()).min(1).meta({description:"Role IDs to grant to the invited user."}),access:vs.optional().meta({description:"Optional promoter access assignment. Omit to preserve existing team-wide behavior."})}),Ry=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),inviteId:Fa.meta({description:"Team invite ID to retrieve"})}),Ny=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),query:Ji().optional().meta({description:"Search query to filter invitations by email. Case-insensitive partial match"}),limit:In().int().min(1).max(100).default(20).optional().meta({description:"Maximum number of invitations to return per page"}),cursor:Ji().optional().meta({description:"Pagination cursor for fetching the next page"})}),Uy=As(Py,"invites"),My=Bn({invite:Py}),Ly=Xn(["createdAt"]),jy=Xn(["asc","desc"]),qy=Bn({userId:_a.optional().meta({description:"Filter teams by user membership. If omitted, returns all teams (tenant admin only). If provided, returns teams where the specified user is a member"}),approval:wa.optional().meta({description:"Filter teams by approval status. PENDING: awaiting review, APPROVED: can operate, REJECTED: cannot operate"}),query:Ji().optional().meta({description:"Optional search query for filtering teams by name or slug"}),sort:Ly.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest teams first."}),direction:jy.optional().meta({examples:["desc"],description:"Sort direction for team lists. Defaults to `desc` when `sort` is provided."}),limit:es("teams"),cursor:Ji().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing teams with pagination and filtering"}),Gy=As(Sy,"teams"),Fy=Xn(["STRIPE","AIRWALLEX"]),By=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),provider:Fy.meta({description:"Payment processor to connect",examples:["STRIPE","AIRWALLEX"]})}),zy=Bn({authorizationUrl:Ji().url().meta({description:"URL to redirect the user to for OAuth authorization. Open in a new window or redirect the current page.",examples:["https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_xxx&scope=read_write&redirect_uri=..."]})}),Vy=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"})}),Yy=Bn({team:Sy.extend({isAdmin:An().optional().meta({description:"Whether this team is the tenant admin team"}),stripeConnectAvailability:Nl.optional().meta({description:"Stripe Connect availability metadata for tenant payment settings UI."})})}),Wy=Bn({id:Ji().meta({description:"Role ID"}),teamId:Ji().meta({description:"Team ID this role belongs to"}),key:Ji().meta({description:"Role key"}),name:Ji().meta({description:"Role display name"}),description:Ji().optional().meta({description:"Role description"}),permissions:Gn(Ji()).meta({description:"Permission nodes granted by this role"}),scope:tr("TEAM").meta({description:"Role scope"}),isPreset:An().meta({description:"Whether this role is a system preset role"})});Bn({key:Ji().meta({description:"Team identifier (ID or slug)"})}),Bn({roles:Gn(Wy)});const Zy=Bn({slug:Ji().min(3).max(30).meta({description:"Candidate team URL slug to check after server normalization."}),key:Ji().min(1).optional().meta({description:"Current team key to exclude when checking availability during team edits."})}).meta({description:"Request schema for checking team slug availability."}),Hy=Bn({slug:Ji().min(3).max(30).meta({description:"Normalized team URL slug that was checked."}),available:An().meta({description:"Whether the normalized slug is available in this tenant."})}).meta({description:"Team slug availability result."}),Ky=xy.omit({tenantId:!0,createdAt:!0,updatedAt:!0,id:!0}).partial().extend({key:Ji().min(1).meta({description:"Team key - either a unique ID (tem_xxx format) or URL-friendly slug",examples:[va.Team.id,va.Team.slug]}),supportEmail:Ji().email().nullable().optional().meta({description:"Support email for customer inquiries. Pass null to clear, omit to leave unchanged."}),publicBaseUrl:on().nullable().optional().meta({description:"Public website base URL for team-owned event and order links. Pass null to clear, omit to leave unchanged."}),image:Wa.nullable().optional().meta({description:"Team image. Pass null to clear, omit to leave unchanged."})}).meta({description:"Schema for updating an existing team organization. Pass null to clear optional fields."}),Jy=Bn({id:Ga.readonly().meta({description:"Unique identifier for the team member"}),createdAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the member was created"}),updatedAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the member was last updated"}),teamId:Da.meta({description:"Team this member belongs to"}),userId:_a.meta({description:"User ID of the team member"}),user:Bn({id:_a.meta({description:"Unique identifier of the user"}),email:en().meta({description:"Email address of the user"}),firstName:Ji().meta({description:"First name of the user"}),lastName:Ji().meta({description:"Last name of the user"}),imageUrl:Ji().optional().meta({description:"Profile image URL of the user"})}).meta({description:"Denormalized user details for quick access without additional queries."}),permissions:Gn(ps).optional().meta({description:"Base permissions across the team. Can be overridden per promoter or venue. Undefined means no base permissions (permissions come from PermissionScope only).",examples:[["event.read","event.write","order.read"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),roleIds:Gn(Ji()).optional().meta({description:"Role IDs assigned to this team member. Effective permissions are derived from role nodes plus explicit permission nodes."}),isOwner:An().meta({description:"Whether this member is the owner of the team. Only one owner per team is allowed. Owner has full control and cannot be deleted."}),access:ys.optional().meta({description:"Promoter access summary. Omitted only for legacy/no-access records."}),tenantId:Ji().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Active team member with base permissions. Permissions can be overridden per promoter or venue. Created when a user accepts an invitation or is directly added to a team."}),Qy=Bn({member:Jy}),Xy=Jy.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,user:!0,teamId:!0,permissions:!0}).extend({key:Ji().meta({description:"Team identifier (ID or slug)"}),roleIds:Gn(Ji()).min(1).meta({description:"Role IDs assigned to this team member."}),access:vs.optional().meta({description:"Optional promoter access assignment. Omit to preserve existing team-wide behavior."})}).meta({description:"Schema for adding an existing user to a team. Requires userId of an existing user account."}),ev=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),userId:Ji().meta({description:"User ID of the team member to retrieve"})}),tv=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),query:Ji().optional().meta({description:"Search query to filter members by name or email. Case-insensitive partial match"}),limit:es("team members"),cursor:Ji().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing active team members with pagination and search"}),iv=As(Jy,"members"),nv=Bn({key:Ji().meta({description:"Team identifier (ID or slug)"}),newOwnerId:Ji().meta({description:"Team member ID of the new owner. This member must already exist with ACTIVE status."})}).meta({description:"Schema for transferring team ownership from the current owner to another active team member."}),rv=Bn({previousOwner:Jy.meta({description:"The previous owner (now a regular member with owner-equivalent access, typically via `*`)"}),newOwner:Jy.meta({description:"The new owner (now has isOwner: true)"})}).meta({description:"Response payload for team ownership transfer operation"}),ov=Bn({id:Ji().meta({description:"Team member ID to update"}),roleIds:Gn(Ji()).min(1).meta({description:"Replace role assignments for this team member with the provided role IDs."}),isOwner:An().optional().meta({description:"Whether this team member is an owner of the team"}),access:vs.optional().meta({description:"Optional promoter access assignment. Omit to update only role assignments."})}).meta({description:"Schema for updating team member roles. Cannot update teamId, userId, or owner status."});var av={get:ea.route({method:"GET",path:"/teams/{key}/members/{userId}",summary:"Get team member by user ID",description:"Retrieve a team member using the team key (ID or slug) and user ID",tags:["Team Members"]}).input(ev.strict()).output(Qy),list:ea.route({method:"GET",path:"/teams/{key}/members",summary:"List team members with cursor-based pagination",description:"Returns active team members for a specific team with cursor pagination. Team key can be ID or slug. For pending invitations, use the team invites endpoint instead.",tags:["Team Members"]}).input(tv.strict()).output(iv),create:ea.route({method:"POST",path:"/teams/{key}/members",summary:"Add an existing user to a team",description:"Directly add an existing user to a team. Team key can be ID or slug. Requires at least one role ID. To invite a new user by email, use the team invites endpoint instead.",tags:["Team Members"]}).input(Xy.strict()).output(Qy),update:ea.route({method:"PATCH",path:"/teams/{key}/members/{userId}",summary:"Update a team member's roles",description:"Update an existing active team member. Team key can be ID or slug. Replaces role assignments. Cannot modify isOwner (use transfer endpoint instead).",tags:["Team Members"]}).input(ov.extend({key:Ji(),userId:Ji()}).strict()).output(Qy),remove:ea.route({method:"DELETE",path:"/teams/{key}/members/{userId}",summary:"Remove a team member",description:"Remove an active member from a team. Team key can be ID or slug. Cannot remove the team owner (transfer ownership first). To cancel pending invitations, use the team invites endpoint.",tags:["Team Members"]}).input(ev.strict()).output(Qy),transfer:ea.route({method:"POST",path:"/teams/{key}/transfer",summary:"Transfer team ownership",description:"Transfer team ownership from the current owner to another active member. Team key can be ID or slug. Only the current owner can perform this action. Previous owner retains owner-equivalent access (typically via `*`) but loses isOwner status.",tags:["Team Members"]}).input(nv.strict()).output(rv)};const sv=Xn(["ALL","COUNTRY","STATE","CITY","VENUE"]),dv=Bn({id:Ji(),name:Ji(),slug:Ji(),kind:sv,parentId:Ji().optional(),latitude:In().optional(),longitude:In().optional(),radius:In().optional(),enabled:An(),order:In(),zoom:In().optional(),heroImage:Ji().optional(),description:Ji().optional()}),cv=Bn({tenant:Bn({id:Ji(),name:Ji(),slug:Ji(),adminTeamId:Ji(),legacyTenantsToTeams:Jn(Ji(),Ji()).optional(),features:Jn(Ji(),An()).optional(),defaultCurrency:Ji(),logo:Bn({email:Bn({src:Ji(),width:In(),height:In()}),website:Bn({src:Ji(),width:In(),height:In()})}),baseUrl:Bn({dev:Ji().optional(),production:Ji().optional()}),publicBaseUrl:Bn({dev:Ji().optional(),sandbox:Ji().optional(),production:Ji().optional()}).optional()}),regions:Gn(dv)}),lv=Bn({regions:Gn(dv)}),uv=Bn({teamId:Ji().optional()}),pv=Bn({counts:Bn({teams:An(),promoters:An(),venues:An(),events:An(),payouts:An()})}),mv=Bn({id:Ji().meta({examples:[va.Admission.id],description:"Admission ID reference"}),name:Ji().meta({examples:["VIP Access","General Admission","Early Bird"],description:"Admission type name at time of purchase"}),price:Bn({base:In().meta({description:"Base price in smallest currency unit (cents)"}),booking:In().meta({description:"Booking fee in smallest currency unit (cents)"}),currency:Ji().meta({examples:["USD","EUR","GBP"],description:"ISO 4217 currency code"})}).meta({description:"Price snapshot at time of purchase"}),entryStartsAt:Xa.meta({description:"Wall clock time when ticket holder can enter (no timezone, displays same everywhere)"}),entryEndsAt:Xa.meta({description:"Wall clock time when entry period ends (no timezone, displays same everywhere)"})}).meta({description:"Admission details for this ticket"}),hv=Bn({firstName:Ji().trim().min(1).meta({examples:[va.Customer.firstName],description:"First name of the ticket attendee"}),lastName:Ji().trim().min(1).meta({examples:[va.Customer.lastName],description:"Last name of the ticket attendee"}),email:en().meta({examples:[va.Customer.email],description:"Email address of the ticket attendee"}),phone:Ji().meta({examples:[va.Customer.phone],description:"Phone number of the ticket attendee (optional)"}).optional()}).meta({description:"Attendee information for a ticket - can be edited by tenant admins. Defaults to the order customer details when ticket is created."}),fv=Bn({id:Ji().meta({examples:[va.Event.id],description:"Event ID reference"}),name:Ji().meta({examples:[va.Event.name],description:"The title of the event shown to attendees"}),slug:Ji().meta({examples:[va.Event.slug],description:"URL-friendly identifier for the event"}),location:Sl.meta({description:"Structured location details for the event"}),entryStartsAt:Xa.meta({examples:[va.Event.entryStartsAt],description:"Wall clock time when event entry begins (no timezone, displays same everywhere)"}),entryEndsAt:Xa.meta({examples:[va.Event.entryEndsAt],description:"Wall clock time when event entry ends (no timezone, displays same everywhere)"}),images:Bn({mobile:Wa.meta({description:"Mobile-optimized image for the event"}),desktop:Wa.meta({description:"Desktop-optimized image for the event"})})}).meta({description:"Event details for this ticket"}),yv=Bn({id:Ji().meta({examples:[va.User.id],description:"Unique identifier of the user who performed the ticket scan"}),firstName:Ji().meta({examples:[va.User.firstName],description:"First name of the user who performed the scan"}),lastName:Ji().meta({examples:[va.User.lastName],description:"Last name of the user who performed the scan"}),email:en().meta({examples:[va.User.email],description:"Email address of the user who performed the scan"})}).meta({description:"Information about the user who scanned a ticket"}),vv=Xn(["CHECK_IN","CHECK_OUT"]),gv=Bn({id:Ji().meta({examples:[va.TicketScan.id],description:"Unique identifier of the ticket scan record"}),scannedAt:Si().readonly().meta({examples:[va.TicketScan.scannedAt],description:"Timestamp when the ticket was scanned in ISO 8601 format"}),scannedById:Ji().meta({examples:[va.TicketScan.scannedById],description:"Unique identifier of the user who performed the scan"}),scannedBy:yv.meta({description:"Detailed information about the user who performed the scan"}),deviceId:Ji().meta({examples:[va.TicketScan.deviceId],description:"Unique identifier of the device used for scanning"}),kind:vv.meta({examples:["CHECK_IN"],description:"Type of scan operation: CHECK_IN for entry, CHECK_OUT for exit"})}).meta({description:"Record of a ticket scan operation including when, who, and what type of scan"}),bv=Bn({id:Ji().meta({examples:[va.Section.id],description:"Section ID reference"}),name:Ji().meta({examples:["Floor Section A","Balcony Left","VIP Lounge"],description:"Section name at time of purchase"}),location:Bn({name:Ji().meta({description:"Venue or location name"}),address:Ji().optional().meta({description:"Street address"}),city:Ji().optional().meta({description:"City name"}),state:Ji().optional().meta({description:"State or province"}),postcode:Ji().optional().meta({description:"Postal/ZIP code"}),country:Ji().optional().meta({description:"ISO country code"}),latitude:In().optional().meta({description:"Geographic latitude coordinate"}),longitude:In().optional().meta({description:"Geographic longitude coordinate"}),timeZone:Ji().optional().meta({examples:["America/New_York","Europe/London"],description:"IANA timezone identifier"})}).meta({description:"Physical location details"})}).meta({description:"Section details for this ticket"}),$v=Xn(["ACTIVE","REDEEMED","CANCELLED"]),wv=Bn({id:Ji().readonly().meta({examples:[va.Ticket.id],description:"Unique identifier for the ticket"}),createdAt:Si().readonly().meta({examples:[va.Ticket.createdAt],description:"Timestamp when the ticket was created in ISO 8601 format"}),updatedAt:Si().readonly().meta({examples:[va.Ticket.updatedAt],description:"Timestamp when the ticket was last updated in ISO 8601 format"}),scans:Gn(gv).meta({description:"Array of all scan records for this ticket (check-ins and check-outs)"}),status:$v.meta({examples:["ACTIVE"],description:"Current status of the ticket: ACTIVE (can be used), REDEEMED (already used), CANCELLED (invalidated or refunded)"}),attendee:hv.meta({description:"Attendee information for this ticket - editable by tenant admins"}),customerId:Ma.meta({examples:[va.Ticket.customerId],description:"Unique identifier of the customer who purchased this ticket (read-only)"}),eventId:Ca.meta({examples:[va.Ticket.eventId],description:"Unique identifier of the event this ticket grants access to"}),event:fv.meta({description:"Event details for this ticket"}),admissionId:La.meta({examples:[va.Ticket.admissionId],description:"Unique identifier of the admission type/tier this ticket represents"}),admission:mv.meta({description:"Admission details for this ticket"}),section:bv.optional().meta({description:"Section details for this ticket (if assigned to a section)"}),orderId:Ra.meta({examples:[va.Ticket.orderId],description:"Unique identifier of the order this ticket was purchased in"}),orderItemId:Ji().meta({examples:[va.Ticket.orderItemId],description:"Unique identifier of the specific order item this ticket represents"}).optional(),teamId:Da.meta({examples:[va.Ticket.teamId],description:"Identifier of the team that owns this ticket"}),promoterId:Ua.meta({examples:[va.Ticket.promoterId],description:"Unique identifier of the promoter/organizer who created this event"})}).meta({description:"A ticket represents a customer's admission to an event. It tracks the purchase, scanning history, and current status."}),Iv=Bn({kind:Xn(["CHECK_IN","CHECK_OUT"]).meta({description:"The most recent attendee scan action."}),scannedAt:Si().meta({description:"Timestamp for the most recent attendee scan."})}),Ev=Bn({key:Xn("#ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")).meta({description:"Alpha navigation bucket key for attendee roster jumps."}),count:ba().int().min(0).meta({description:"Number of roster rows currently available in this bucket."}),anchor:Ji().meta({description:"Server-issued bookmark for the first roster row in this bucket under the active filters."})}),kv=mv.pick({id:!0,name:!0,entryEndsAt:!0}),Tv=bv.pick({id:!0,name:!0}),Av=Bn({id:Na.meta({examples:[va.Ticket.id],description:"Ticket identifier for this attendee roster row."}),orderId:Ra.meta({examples:[va.Ticket.orderId],description:"Order identifier used to navigate to order details."}),status:$v.meta({description:"Current ticket status for the attendee row."}),attendee:hv.meta({description:"Editable attendee identity fields for this ticket."}),admission:kv.meta({description:"Admission snapshot needed for roster labels and expiry state."}),section:Tv.optional().meta({description:"Optional section label shown in the roster row."}),lastScan:Iv.optional().meta({description:"Most recent scan event for compact roster activity text."}),lastCheckInAt:Si().optional().meta({description:"Timestamp for the most recent check-in scan, used for checked-in labels."})}),xv=Bn({eventId:Ca.meta({examples:[va.Event.id],description:"Event identifier for the attendee alpha index."}),admissionIds:Gn(La).optional().meta({examples:[[va.Admission.id]],description:"Optional admission filters used when computing available attendee buckets."}),sectionIds:Gn(ja).optional().meta({examples:[[va.Section.id]],description:"Optional section filters used when computing available attendee buckets."})}),Sv=Bn({buckets:Gn(Ev).meta({description:"Available attendee alpha buckets for the active filter set."})}),Dv=ba().int().min(1).max(100).prefault(100).meta({examples:[100],description:"Maximum number of attendee roster rows to return per request (1-100, default: 100)."}),Cv=Bn({eventId:Ca.meta({examples:[va.Event.id],description:"Event identifier for the attendee roster."}),admissionIds:Gn(La).optional().meta({examples:[[va.Admission.id]],description:"Optional admission filters. When provided, only matching ticket admissions are included."}),sectionIds:Gn(ja).optional().meta({examples:[[va.Section.id]],description:"Optional section filters. When provided, only matching ticket sections are included."}),query:Ji().optional().meta({examples:["John","john@example.com","+61400000000"],description:"Optional attendee search query. Matches attendee name, email, and phone."}),cursor:ts.optional(),before:ts.optional().meta({description:"Cursor for loading roster rows before the current window. Mutually exclusive with cursor and anchor."}),anchor:Ji().optional().meta({description:"Server-issued bookmark used to jump to a roster bucket. Mutually exclusive with cursor and before."}),limit:Dv.optional()}),Pv=As(Av,"tickets"),Ov=wv.pick({status:!0,admissionId:!0,orderItemId:!0}).extend({orderId:Ji().meta({examples:[va.Order.id],description:"The order this ticket belongs to"}),customerId:Ji().meta({examples:[va.Customer.id],description:"The customer who purchased this ticket"}),attendee:hv.optional().meta({description:"Optional attendee information - defaults to order customer details if not provided"})}).meta({description:"Schema for creating a new ticket - caller provides minimal input; derived fields are populated by the service"}),_v=wv.pick({id:!0}).extend({signature:fs.optional().meta({description:"HMAC signature for public ticket access (16 characters, base64url encoded)"})}).meta({description:"Schema for retrieving a specific ticket by ID with optional signature validation"}),Rv=Bn({promoterId:Ji().optional().meta({examples:[va.Promoter.id],description:"Filter tickets by promoter/organizer unique identifier (optional)"}),eventId:Ji().optional().meta({examples:[va.Event.id],description:"Filter tickets by event unique identifier (optional)"}),customerId:Ji().optional().meta({examples:[va.Customer.id],description:"Filter tickets by customer unique identifier (optional)"}),orderId:Ji().optional().meta({examples:[va.Order.id],description:"Filter tickets by order unique identifier (optional)"}),status:$v.optional().meta({examples:["ACTIVE"],description:"Filter tickets by status: ACTIVE (can be used), REDEEMED (already used), CANCELLED (invalidated or refunded)"}),orderSignature:fs.optional().meta({description:"Order signature used to access tickets for a specific order without permissions (16 characters, base64url encoded)"}),query:Ji().optional().meta({examples:["John Doe"],description:"Optional search query to filter tickets by customer details. When provided, search-backed pagination is used."}),limit:es("tickets").optional(),cursor:Ji().optional().meta({examples:["eyJpZCI6InRrdF8wMWpwczVjZ3NnMHMzMncycHI3M3ZiY2NkZSJ9"],description:"Pagination cursor for continuing to fetch subsequent results (optional)"})}).meta({description:"Schema for listing tickets with optional filtering, search, and cursor-based pagination"}),Nv=As(wv,"tickets"),Uv=Bn({ticket:wv}),Mv=wv.pick({id:!0,eventId:!0}).extend({key:wv.shape.id.meta({description:"Transition key. Supports canonical ticket IDs (tkt_*) and order IDs (ord_*)."}),deviceId:wv.shape.scans.element.shape.deviceId.optional().meta({description:"Unique identifier of the scanning device (optional)."}),eventId:wv.shape.eventId.optional().meta({description:"Optional event scope guard for check-in transitions. When provided, check-in fails if the ticket/order event does not match."}),allowPartialOrderCheckIn:An().optional().meta({description:"Confirms an order-level check-in when some tickets are already redeemed and some remain active."}),admissionIds:Gn(La).optional().meta({description:"Optional scanner admission filters. When provided, check-in only applies to matching ticket admissions."}),sectionIds:Gn(ja).optional().meta({description:"Optional scanner section filters. When provided, check-in only applies to matching ticket sections."}),idempotencyKey:Ji().trim().min(1).max(255).optional().meta({description:"Stable client-generated key used to replay a scan request without turning a timed-out success into a duplicate denial."})}).omit({id:!0}).meta({description:"Schema for check-in/check-out transitions addressed by key, where key may resolve to a ticket or order identifier."}),Lv=Xn(["ticket","order"]),jv=Xn(["NOOP_TRANSITION"]),qv=Xn(["PARTIAL_ORDER_CONFIRMATION_REQUIRED"]),Gv=Xn(["EVENT_MISMATCH"]),Fv=Xn(["FILTERED_OUT"]),Bv=Bn({id:wv.shape.orderId,checkedInCount:In().int().nonnegative().optional(),items:Gn(Bn({quantity:In().int().positive()}))}),zv=fv.pick({id:!0,name:!0,slug:!0,entryStartsAt:!0}).extend({teamId:wv.shape.teamId}),Vv=Yn([Bn({reason:jv,kind:Xn(["CHECK_IN","CHECK_OUT"]),targetType:Lv,order:Bv.optional(),ticket:wv.optional()}),Bn({reason:Gv,kind:Xn(["CHECK_IN","CHECK_OUT"]),targetType:Lv,requestedEventId:wv.shape.eventId.optional(),event:zv,order:Bv.optional(),ticket:wv.optional()}),Bn({reason:qv,kind:tr("CHECK_IN"),targetType:tr("order"),order:Bv,ticket:wv.optional()}),Bn({reason:Fv,kind:tr("CHECK_IN"),targetType:Lv,order:Bv.optional(),ticket:wv.optional()})]),Yv=Bn({tickets:Gn(wv).meta({description:"Transition result tickets. Single-item array for ticket targets and full order tickets for order targets."}),targetType:Lv.meta({description:"Resolved target scope from the provided key."}),order:Bv.optional()}),Wv=Xn(["ACTIVE","CANCELLED"]).describe("Status updates allowed via PATCH: ACTIVE (reactivate), CANCELLED (void). REDEEMED is set via scan endpoint."),Zv=Bn({id:Ji().meta({examples:[va.Ticket.id],description:"Unique identifier of the ticket to update"}),status:Wv.optional().meta({description:"Update ticket status: CANCELLED to void, ACTIVE to reactivate"}),attendee:hv.partial().nullable().optional().meta({description:"Attendee info. Pass object to set/update, null to clear, or omit to leave unchanged."}),admissionId:Ji().optional().meta({examples:[va.Admission.id],description:"Change ticket type/admission (admission and section objects will be fetched from event and stored)"})}).meta({description:"Schema for updating a ticket."}),Hv={id:va.User.id,createdAt:va.User.createdAt,updatedAt:va.User.updatedAt,email:va.User.email,firstName:va.User.firstName,lastName:va.User.lastName,imageUrl:"https://assets.session.services/examples/avatar.jpg",tenantId:va.User.tenantId},Kv=Bn({id:Ji().readonly().meta({description:"Unique identifier for the user",examples:[va.User.id]}),createdAt:Si().readonly().meta({description:"ISO 8601 timestamp when the user account was created",examples:[va.User.createdAt]}),updatedAt:Si().readonly().meta({description:"ISO 8601 timestamp when the user account was last updated",examples:[va.User.updatedAt]}),email:en().meta({description:"User's email address, used for authentication and communication",examples:[va.User.email]}),firstName:Ji().min(1).meta({description:"User's first name",examples:[va.User.firstName]}),lastName:Ji().min(1).meta({description:"User's last name",examples:[va.User.lastName]}),imageUrl:on().optional().meta({description:"Optional URL to the user's profile image or avatar",examples:["https://assets.session.services/examples/avatar.jpg"]}),metadata:Jn(Ji(),Ja).optional().meta({description:"Arbitrary key-value metadata for storing user preferences and settings",examples:[{"widgets:team_abc123":{visibleWidgets:["revenue"]}}]})}).meta({ref:"User",description:"User entity containing profile and audit information scoped to a specific tenant",examples:[Hv]}),Jv=Jy.meta({ref:"MeTeamMember",description:"Team membership for the current user with denormalized user details and role-expanded team permissions."}),Qv=Bn({access:Ji().meta({description:"JWT access token with updated user data"}),refresh:Ji().meta({description:"Refresh token for obtaining new access tokens"})}).meta({ref:"Tokens",description:"Authentication tokens for client session management"}),Xv=Bn({user:Kv.meta({description:"The updated user profile"}),tokens:Qv.optional().meta({description:"New JWT tokens with updated user data. Present when refresh token was provided in request."})}).meta({ref:"UserUpdateResponse",description:"Response payload for PATCH /users/me containing the updated user profile."}),eg=Bn({deleted:tr(!0).meta({description:"Whether the current user account was deleted."})}).meta({ref:"UserDeleteResponse",description:"Response payload for DELETE /users/me after deleting the current account."}),tg=Bn({user:Kv.nullable().meta({description:"Current authenticated user profile, null if not authenticated"}),isAdmin:An().meta({description:"Whether the current user has admin privileges for the tenant"}),members:Gn(Jv).meta({description:"All team memberships for the current user within this tenant."})}).meta({ref:"MeResponse",description:"Response payload for GET /users/me providing the current user, tenant admin status, and team memberships.",examples:[{user:{id:"usr_01k5hbpkfje048zccqmqfhjpep",createdAt:"2025-09-19T16:07:46.418Z",updatedAt:"2025-09-19T16:07:46.418Z",email:"j@1f.io",firstName:"Jay",lastName:"McMullen",imageUrl:"https://assets.session.services/examples/avatar.jpg"},isAdmin:!0,members:[{id:"mbr_01jps5cgsec5ge0b1bxa6gzkkk",createdAt:"2025-09-25T03:25:46.080Z",updatedAt:"2025-09-25T03:25:46.080Z",teamId:"tem_01jqpjksnsen9vprw95et60t2m",userId:"usr_01k5hbpkfje048zccqmqfhjpep",user:{id:"usr_01k5hbpkfje048zccqmqfhjpep",email:"j@1f.io",firstName:"Jay",lastName:"McMullen",imageUrl:"https://assets.session.services/examples/avatar.jpg"},permissions:["*"],isOwner:!0,tenantId:"tnt_01abc123"}]}]}),ig=Bn({id:Ji().readonly().meta({description:"Unique identifier for the venue"}),createdAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the venue was created"}),updatedAt:Si().readonly().meta({description:"Timestamp in ISO 8601 format when the venue was last updated"}),teamId:Ji().meta({description:"Team that manages this venue"}),locationId:Oa.meta({examples:["loc_01h2xk3j9k8m2n5p7q9r1s3t4v"],description:"Location identifier for this venue"}),googlePlaceId:Ji().optional().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID when this venue is linked to a Google Places location"}),approval:wa.meta({examples:["APPROVED"],description:"Approval status of the venue"}),name:Ji().min(3).max(100).meta({description:"Display name of the venue. Must be between 3 and 100 characters"}),slug:Ji().min(3).meta({description:"URL-friendly slug for the venue. Must be unique within tenant"}),description:Ji().max(500).optional().meta({description:"Short description of the venue for listings and discovery"}),image:Wa.optional().meta({description:"Venue image"}),contact:Bn({email:en().optional().meta({description:"Public contact email for venue inquiries"}),phone:Ji().optional().meta({description:"Public contact phone number"}),website:on().optional().meta({description:"Venue website URL"}),instagram:Ji().optional().meta({description:"Instagram profile URL"}),facebook:Ji().optional().meta({description:"Facebook page URL"}),twitter:Ji().optional().meta({description:"Twitter/X profile URL"}),tiktok:Ji().optional().meta({description:"TikTok profile URL"}),youtube:Ji().optional().meta({description:"YouTube channel URL"})}).optional().meta({description:"Public contact information and social media links"}),location:Sl.omit({venueId:!0}).meta({description:"Physical location details including address, coordinates, and timezone"}),geohash:Ji().meta({description:"Geohash encoding of the venue's location for efficient spatial queries"}),capacity:In().int().min(1).optional().meta({description:"Maximum capacity of the venue (number of attendees)"}),metadata:Qa,deletedAt:Si().readonly().optional().meta({description:"Timestamp in ISO 8601 format when the venue was soft-deleted. Null if not deleted"}),tenantId:Ji().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Managed venue with custom branding and details. Teams can claim venues which then appear in location search results."}),ng=ig.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,geohash:!0,deletedAt:!0,location:!0,googlePlaceId:!0,approval:!0}).extend({slug:Ji().min(3).optional().meta({description:"URL-friendly slug for the venue. If not provided, will be automatically generated from the name. Must be unique within tenant"})}).meta({description:"Schema for creating a new venue. The system automatically derives location details and Google Place ID from the locationId"}),rg=Bn({key:Ji().min(1).meta({description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug",examples:[va.Venue.id,va.Venue.slug]})}),og=Bn({key:Ji().meta({examples:[va.Venue.id,va.Venue.slug],description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug"})}),ag=Xn(["createdAt"]),sg=Xn(["asc","desc"]),dg=zn({teamId:Ji().max(128).optional().meta({description:"Filter venues by owner team ID"}),approval:wa.optional().meta({description:"Filter venues by approval status. PENDING: awaiting review, APPROVED: can be used for events, REJECTED: cannot be used"}),query:Ji().max(120).optional().meta({description:"Optional search query for filtering venues by name or slug"}),latitude:ba().min(-90).max(90).optional().meta({description:"Latitude for location-based search. Must be used with longitude"}),longitude:ba().min(-180).max(180).optional().meta({description:"Longitude for location-based search. Must be used with latitude"}),radius:ba().min(1).max(2e4).optional().meta({description:"Search radius in kilometers (1-20000). Requires latitude and longitude"}),sort:ag.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest venues first."}),direction:sg.optional().meta({examples:["desc"],description:"Sort direction for venue lists. Defaults to `desc` when `sort` is provided."}),limit:es("venues"),cursor:Ji().max(768).optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing venues with pagination, filtering, and location-based search"}),cg=As(ig,"venues").meta({description:"Paginated response containing venues with cursor for next page"}),lg=Bn({venue:ig}),ug=ig.omit({id:!0,tenantId:!0,teamId:!0,createdAt:!0,updatedAt:!0,deletedAt:!0,geohash:!0}).partial().extend({key:Ji().meta({examples:[va.Venue.id,va.Venue.slug],description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug"}),description:Ji().max(500).nullable().optional().meta({description:"Short description of the venue. Pass null to clear, omit to leave unchanged."}),image:Wa.nullable().optional().meta({description:"Venue image. Pass null to clear, omit to leave unchanged."}),capacity:In().int().min(1).nullable().optional().meta({description:"Maximum capacity. Pass null to clear, omit to leave unchanged."}),contact:Bn({email:en().optional(),phone:Ji().optional(),website:on().optional(),instagram:Ji().optional(),facebook:Ji().optional(),twitter:Ji().optional(),tiktok:Ji().optional(),youtube:Ji().optional()}).nullable().optional().meta({description:"Contact information. Pass null to clear all contact fields, omit to leave unchanged."}),googlePlaceId:Ji().nullable().optional().meta({description:"Google Place ID. Pass null to unlink from Google Places, omit to leave unchanged."})}).meta({description:"Schema for updating an existing venue. Cannot change teamId (owner). Pass null to clear optional fields."});Bn({id:Ji(),email:en(),firstName:Ji(),lastName:Ji(),imageUrl:Ji().url().optional(),tenantId:Ji(),createdAt:Ji().datetime(),updatedAt:Ji().datetime()});const pg=Xn(["ORDER","EVENT","TEAM","TEAM_INVITE"]).meta({description:"Aggregate type this notification belongs to"}),mg=Xn(["ORDER_CONFIRMATION","REFUND_CONFIRMATION","ORDER_REMINDER","ORDER_CANCELLATION","ORDER_TIME_CHANGE","ORDER_VENUE_CHANGE","ORDER_TIME_AND_VENUE_CHANGE","ORDER_LOCATION_REVEAL","EVENT_APPROVAL_REQUEST","EVENT_APPROVAL_DECISION","TEAM_INVITE","ORDER_TICKETS_RESEND","INTERNAL_FEEDBACK"]).meta({description:"Notification kind"}),hg=Xn(["SMS","EMAIL"]).meta({description:"Delivery channel"}),fg=Xn(["PENDING","PROCESSING","SENT","DELIVERED","FAILED","CANCELLED"]).meta({description:"Current notification status"});function yg(e,t={}){return oo({name:"parse_standard_body",signal:t.signal},(async()=>{let i=e.headers.get("content-disposition");if("string"==typeof i){let t=function(e){let t=e.match(/filename\*=(UTF-8'')?([^;]*)/i);if(t&&"string"==typeof t[2])return function(e){try{return decodeURIComponent(e)}catch{return e}}(t[2]);let i=e.match(/filename="((?:\\"|[^"])*)"/i);return i&&"string"==typeof i[1]?i[1].replace(/\\"/g,'"'):void 0}(i)??"blob",n=await e.blob();return new File([n],t,{type:n.type})}let n=e.headers.get("content-type");if(!n||n.startsWith("application/json"))return mo(await e.text());if(n.startsWith("multipart/form-data"))return await e.formData();if(n.startsWith("application/x-www-form-urlencoded")){let t=await e.text();return new URLSearchParams(t)}if(n.startsWith("text/event-stream"))return function(e,t={}){let i,n=(e?.pipeThrough(new TextDecoderStream).pipeThrough(new Ro))?.getReader(),r=!1;return new lo((async()=>{i??=no("consume_event_iterator_stream");try{for(;;){if(void 0===n)return{done:!0,value:void 0};let{done:e,value:t}=await ao(i,(()=>n.read()));if(e){if(r)throw new eo("Stream was cancelled");return{done:!0,value:void 0}}switch(t.event){case"message":{let e=mo(t.data);return yo(e)&&(e=qo(e,t)),i?.addEvent("message"),{done:!1,value:e}}case"error":{let e=new Po({data:mo(t.data)});throw e=qo(e,t),i?.addEvent("error"),e}case"done":{let e=mo(t.data);return yo(e)&&(e=qo(e,t)),i?.addEvent("done"),{done:!0,value:e}}default:i?.addEvent("maybe_keepalive")}}}catch(e){throw e instanceof Po||ro(i,e,t),e}}),(async e=>{try{"next"!==e&&(r=!0,i?.addEvent("cancelled")),await ao(i,(()=>n?.cancel()))}catch(e){throw ro(i,e,t),e}finally{i?.end()}}))}(e.body,t);if(n.startsWith("text/plain"))return await e.text();let r=await e.blob();return new File([r],"blob",{type:r.type})}))}function vg(e,t={}){return e.forEach(((e,i)=>{Array.isArray(t[i])?t[i].push(e):t[i]=void 0===t[i]?e:[t[i],e]})),t}function gg(e,t={}){let i=function(e,t=new Headers){for(let[i,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(i,e);else void 0!==n&&t.append(i,n);return t}(e.headers),n=function(e,t,i={}){if(e instanceof ReadableStream)return e;let n=t.get("content-disposition");return t.delete("content-type"),t.delete("content-disposition"),void 0!==e?e instanceof Blob?(t.set("content-type",e.type),t.set("content-length",""+e.size),t.set("content-disposition",n??function(e,t="inline"){return`${t}; filename="${e.replace(/[^\x20-\x7E]/g,"_").replace(/"/g,'\\"')}"; filename*=utf-8''${encodeURIComponent(e).replace(/['()*]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())).replace(/%(7C|60|5E)/g,((e,t)=>String.fromCharCode(Number.parseInt(t,16))))}`}(e instanceof File?e.name:"blob")),e):e instanceof FormData||e instanceof URLSearchParams?e:so(e)?(t.set("content-type","text/event-stream"),function(e,t={}){let i,n,r=t.eventIteratorKeepAliveEnabled??!0,o=t.eventIteratorKeepAliveInterval??5e3,a=t.eventIteratorKeepAliveComment??"",s=t.eventIteratorInitialCommentEnabled??!0,d=t.eventIteratorInitialComment??"",c=!1;return new ReadableStream({start(e){n=no("stream_event_iterator"),s&&e.enqueue(Lo({comments:[d]}))},async pull(t){try{r&&(i=setInterval((()=>{t.enqueue(Lo({comments:[a]})),n?.addEvent("keepalive")}),o));let s=await ao(n,(()=>e.next()));if(clearInterval(i),c)return;let d=Go(s.value);if(!s.done||void 0!==s.value||void 0!==d){let e=s.done?"done":"message";t.enqueue(Lo({...d,event:e,data:ho(s.value)})),n?.addEvent(e)}s.done&&(t.close(),n?.end())}catch(e){if(clearInterval(i),c)return;e instanceof Po?(t.enqueue(Lo({...Go(e),event:"error",data:ho(e.data)})),n?.addEvent("error"),t.close()):(ro(n,e),t.error(e)),n?.end()}},async cancel(){try{c=!0,clearInterval(i),n?.addEvent("cancelled"),await ao(n,(()=>e.return?.()))}catch(e){throw ro(n,e),e}finally{n?.end()}}}).pipeThrough(new TextEncoderStream)}(e,i)):(t.set("content-type","application/json"),ho(e)):void 0}(e.body,i,t);return new Request(e.url,{signal:e.signal,method:e.method,headers:i,body:n})}Bn({id:Ya.meta({examples:[va.Notification.id],description:"Unique notification identifier"}),createdAt:Si().readonly().meta({examples:[va.Notification.createdAt],description:"Timestamp when notification was created"}),updatedAt:Si().readonly().meta({examples:[va.Notification.updatedAt],description:"Timestamp when notification was last updated"}),aggregateType:pg.meta({examples:[va.Notification.aggregateType]}),aggregateId:Yn([Ra,Ca,Da,Fa]).meta({examples:[va.Notification.aggregateId],description:"Aggregate identifier for the notification owner"}),eventId:Ca.optional().meta({examples:[va.Notification.eventId],description:"Associated event identifier when applicable"}),kind:mg.meta({examples:[va.Notification.kind]}),channel:hg.meta({examples:[va.Notification.channel]}),status:fg.meta({examples:[va.Notification.status]}),providerMessageId:Ji().optional().meta({examples:[va.Notification.providerMessageId],description:"Provider message identifier"}),sentAt:Si().optional().meta({examples:[va.Notification.sentAt],description:"Timestamp when provider accepted send request"}),deliveredAt:Si().optional().meta({examples:[va.Notification.deliveredAt],description:"Timestamp when provider confirmed delivery"}),failedAt:Si().optional().meta({examples:[va.Notification.failedAt],description:"Timestamp when notification failed"}),failureCode:Ji().optional().meta({examples:[va.Notification.failureCode],description:"Failure code when notification is FAILED"}),failureReason:Ji().optional().meta({examples:[va.Notification.failureReason],description:"Failure reason when notification is FAILED"})}).meta({description:"Notification delivery record"}),Bn({id:Ga.meta({description:"Team member ID to delete"})});var bg=class{plugins;constructor(e=[]){this.plugins=[...e].sort(((e,t)=>(e.order??0)-(t.order??0)))}init(e){for(let t of this.plugins)t.init?.(e)}},$g=class{constructor(e,t,i={}){this.codec=e,this.sender=t,new bg(i.plugins).init(i),this.interceptors=Qr(i.interceptors),this.clientInterceptors=Qr(i.clientInterceptors)}interceptors;clientInterceptors;call(e,t,i){return oo({name:`${Xr}.${e.join("/")}`,signal:i.signal},(n=>(n?.setAttribute("rpc.system",Xr),n?.setAttribute("rpc.method",e.join(".")),so(t)&&(t=uo({name:"consume_event_iterator_input",signal:i.signal},t)),po(this.interceptors,{...i,path:e,input:t},(async({path:e,input:t,...i})=>{let r,o=io(),a=o?.trace.getActiveSpan()??n;a&&o&&(r=o?.trace.setSpan(o.context.active(),a));let s=await oo({name:"encode_request",context:r},(()=>this.codec.encode(e,t,i))),d=await po(this.clientInterceptors,{...i,input:t,path:e,request:s},(({input:e,path:t,request:i,...n})=>oo({name:"send_request",signal:n.signal,context:r},(()=>this.sender.call(i,n,t,e))))),c=await oo({name:"decode_response",context:r},(()=>this.codec.decode(d,i,e,t)));return so(c)?uo({name:"consume_event_iterator_output",signal:i.signal},c):c})))))}};function wg(e){return"/"+e.map(encodeURIComponent).join("/")}var Ig=class extends bg{initRuntimeAdapter(e){for(let t of this.plugins)t.initRuntimeAdapter?.(e)}},Eg=class{fetch;toFetchRequestOptions;adapterInterceptors;constructor(e){new Ig(e.plugins).initRuntimeAdapter(e),this.fetch=e.fetch??globalThis.fetch.bind(globalThis),this.toFetchRequestOptions=e,this.adapterInterceptors=Qr(e.adapterInterceptors)}async call(e,t,i,n){let r=gg(e,this.toFetchRequestOptions);return function(e,t={}){return{body:to((()=>yg(e,t))),status:e.status,get headers(){let t=vg(e.headers);return Object.defineProperty(this,"headers",{value:t,writable:!0}),t},set headers(e){Object.defineProperty(this,"headers",{value:e,writable:!0})}}}(await po(this.adapterInterceptors,{...t,request:r,path:i,input:n,init:{redirect:"manual"}},(({request:e,path:t,input:i,init:n,...r})=>this.fetch(e,n,r,t,i))),{signal:r.signal})}},kg=class{maxArrayIndex;constructor(e={}){this.maxArrayIndex=e.maxBracketNotationArrayIndex??9999}serialize(e,t=[],i=[]){if(Array.isArray(e))e.forEach(((e,n)=>{this.serialize(e,[...t,n],i)}));else if(fo(e))for(let n in e)this.serialize(e[n],[...t,n],i);else i.push([this.stringifyPath(t),e]);return i}deserialize(e){if(0===e.length)return{};let t=new WeakSet,i={value:[]};for(let[n,r]of e){let e=this.parsePath(n),o=i,a="value";e.forEach(((i,n)=>{!Array.isArray(o[a])&&!fo(o[a])&&(o[a]=[]),n===e.length-1?Array.isArray(o[a])&&(""===i?o[a].length&&!t.has(o[a])&&(o[a]=Ag(o[a])):t.has(o[a])?(t.delete(o[a]),o[a]=xg(o[a])):Tg(i,this.maxArrayIndex)||(o[a]=Ag(o[a]))):Array.isArray(o[a])&&!Tg(i,this.maxArrayIndex)&&(t.has(o[a])?(t.delete(o[a]),o[a]=xg(o[a])):o[a]=Ag(o[a])),o=o[a],a=i})),Array.isArray(o)&&""===a?(t.add(o),o.push(r)):a in o?Array.isArray(o[a])?o[a].push(r):o[a]=[o[a],r]:o[a]=r}return i.value}stringifyPath(e){return e.map((e=>(""+e).replace(/[\\[\]]/g,(e=>{switch(e){case"\\":return"\\\\";case"[":return"\\[";case"]":return"\\]";default:return e}})))).reduce(((e,t,i)=>0===i?t:`${e}[${t}]`),"")}parsePath(e){let t=[],i=!1,n="",r=0;for(let o=0;o<e.length;o++){let a=e[o],s=e[o+1];!i||"]"!==a||void 0!==s&&"["!==s||r%2!=0?0===t.length&&"["===a&&r%2==0?(i=!0,t.push(n),n=""):"\\"===a?r++:(n+="\\".repeat(r/2)+a,r=0):(void 0===s&&(i=!1),t.push(n),n="",o++)}return i||0===t.length?[e]:t}};function Tg(e,t){return/^0$|^[1-9]\d*$/.test(e)&&Number(e)<=t}function Ag(e){let t=new go;return e.forEach(((e,i)=>{t[i]=e})),t}function xg(e){let t=new go;return t[""]=1===e.length?e[0]:e,t}var Sg=class{customSerializers;constructor(e={}){this.customSerializers=e.customJsonSerializers??[]}serialize(e,t={value:!1}){for(let i of this.customSerializers)if(i.condition(e))return this.serialize(i.serialize(e),t);if(e instanceof Blob)return t.value=!0,[e,t.value];if(e instanceof Set)return this.serialize(Array.from(e),t);if(e instanceof Map)return this.serialize(Array.from(e.entries()),t);if(Array.isArray(e))return[e.map((e=>void 0===e?null:this.serialize(e,t)[0])),t.value];if(fo(e)){let i={};for(let n in e)"toJSON"===n&&"function"==typeof e[n]||(i[n]=this.serialize(e[n],t)[0]);return[i,t.value]}return"bigint"==typeof e||e instanceof RegExp||e instanceof URL?[""+e,t.value]:e instanceof Date?[Number.isNaN(e.getTime())?null:e.toISOString(),t.value]:Number.isNaN(e)?[null,t.value]:[e,t.value]}};function Dg(e){return"/"+e.replace(/\/{2,}/g,"/").replace(/^\/|\/$/g,"")}function Cg(e){return e?Dg(e).match(/\/\{[^}]+\}/g)?.map((e=>({raw:e,name:e.match(/\{\+?([^}]+)\}/)[1]}))):void 0}var Pg=class{constructor(e,t,i){this.contract=e,this.serializer=t,this.baseUrl=i.url,this.headers=i.headers??{},this.customErrorResponseBodyDecoder=i.customErrorResponseBodyDecoder}baseUrl;headers;customErrorResponseBodyDecoder;async encode(e,t,i){let n=function(e){return"function"==typeof e.forEach?vg(e):e}(await bo(this.headers,i,e,t));void 0!==i.lastEventId&&(n=Fo(n,{"last-event-id":i.lastEventId}));let r=await bo(this.baseUrl,i,e,t),o=vo(this.contract,e);if(!Wo(o))throw Error("[StandardOpenapiLinkCodec] expect a contract procedure at "+e.join("."));return"compact"===ia("defaultInputStructure",o["~orpc"].route.inputStructure)?this.#e(o,e,t,i,r,n):this.#t(o,e,t,i,r,n)}#e(e,t,i,n,r,o){let a=Dg(e["~orpc"].route.path??wg(t)),s=i,d=Cg(a);if(d?.length){if(!fo(i))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "compact" structure when has dynamic params at ${t.join(".")}.`);let e={...i};for(let t of d)a=a.replace(t.raw,"/"+encodeURIComponent(""+this.serializer.serialize(i[t.name]))),delete e[t.name];s=Object.keys(e).length?e:void 0}let c=ia("defaultMethod",e["~orpc"].route.method),l=new URL(r);if(l.pathname=`${l.pathname.replace(/\/$/,"")}${a}`,"GET"===c){let e=this.serializer.serialize(s,{outputFormat:"URLSearchParams"});for(let[t,i]of e)l.searchParams.append(t,i);return{url:l,method:c,headers:o,body:void 0,signal:n.signal}}return{url:l,method:c,headers:o,body:this.serializer.serialize(s),signal:n.signal}}#t(e,t,i,n,r,o){let a=Dg(e["~orpc"].route.path??wg(t)),s=Cg(a);if(!fo(i)&&void 0!==i)throw TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "detailed" structure at ${t.join(".")}.`);if(s?.length){if(!fo(i?.params))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input.params shape for "detailed" structure when has dynamic params at ${t.join(".")}.`);for(let e of s)a=a.replace(e.raw,"/"+encodeURIComponent(""+this.serializer.serialize(i.params[e.name])))}let d=o;if(void 0!==i?.headers){if(!fo(i.headers))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input.headers shape for "detailed" structure at ${t.join(".")}.`);d=Fo(i.headers,o)}let c=ia("defaultMethod",e["~orpc"].route.method),l=new URL(r);if(l.pathname=`${l.pathname.replace(/\/$/,"")}${a}`,void 0!==i?.query){let e=this.serializer.serialize(i.query,{outputFormat:"URLSearchParams"});for(let[t,i]of e)l.searchParams.append(t,i)}return"GET"===c?{url:l,method:c,headers:d,body:void 0,signal:n.signal}:{url:l,method:c,headers:d,body:this.serializer.serialize(i?.body),signal:n.signal}}async decode(e,t,i){let n=!Ao(e.status),r=await(async()=>{let t=!1;try{let i=await e.body();return t=!0,this.serializer.deserialize(i)}catch(e){throw Error(t?"Invalid OpenAPI response format.":"Cannot parse response body, please check the response body and content-type.",{cause:e})}})();if(!n)throw this.customErrorResponseBodyDecoder?.(r,e)??(xo(r)?So(r):new ko(function(e){return Object.entries(Io).find((([,t])=>t.status===e))?.[0]??"MALFORMED_ORPC_ERROR_RESPONSE"}(e.status),{status:e.status,data:{...e,body:r}}));let o=vo(this.contract,i);if(!Wo(o))throw Error("[StandardOpenapiLinkCodec] expect a contract procedure at "+i.join("."));return"compact"===ia("defaultOutputStructure",o["~orpc"].route.outputStructure)?r:{status:e.status,headers:e.headers,body:r}}},Og=class{constructor(e,t){this.jsonSerializer=e,this.bracketNotation=t}serialize(e,t={}){return so(e)&&!t.outputFormat?Bo(e,{value:async e=>this.#e(e,{outputFormat:"plain"}),error:async e=>new Po({data:this.#e(To(e).toJSON(),{outputFormat:"plain"}),cause:e})}):this.#e(e,t)}#e(e,t){let[i,n]=this.jsonSerializer.serialize(e);if("plain"===t.outputFormat)return i;if("URLSearchParams"===t.outputFormat){let e=new URLSearchParams;for(let[t,n]of this.bracketNotation.serialize(i))("string"==typeof n||"number"==typeof n||"boolean"==typeof n)&&e.append(t,""+n);return e}if(i instanceof Blob||void 0===i||!n)return i;let r=new FormData;for(let[e,t]of this.bracketNotation.serialize(i))"string"==typeof t||"number"==typeof t||"boolean"==typeof t?r.append(e,""+t):t instanceof Blob&&r.append(e,t);return r}deserialize(e){return e instanceof URLSearchParams||e instanceof FormData?this.bracketNotation.deserialize(Array.from(e.entries())):so(e)?Bo(e,{value:async e=>e,error:async e=>e instanceof Po&&xo(e.data)?So(e.data,{cause:e}):e}):e}},_g=class extends $g{constructor(e,t,i){super(new Pg(e,new Og(new Sg(i),new kg({maxBracketNotationArrayIndex:4294967294})),i),t,i)}},Rg=class extends _g{constructor(e,t){super(e,new Eg(t),t)}};const Ng=ea.route({method:"GET",path:"/events/{eventId}/admissions/{id}",summary:"Get admission by ID",tags:["Admissions"]}).input(ks.strict()).output(Os),Ug=ea.route({method:"POST",path:"/events/{eventId}/admissions",summary:"Create a new admission",tags:["Admissions"]}).input(Is.strict()).output(Os),Mg=ea.route({method:"PUT",path:"/events/{eventId}/admissions/{id}",summary:"Update an admission",tags:["Admissions"]}).input(_s.strict()).output(Os);var Lg={get:Ng,list:ea.route({method:"GET",path:"/events/{eventId}/admissions",summary:"List admissions",description:"Returns admissions with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided for full-text search capabilities.",tags:["Admissions"]}).input(Ts.strict()).output(xs),create:Ug,update:Mg,remove:ea.route({method:"DELETE",path:"/events/{eventId}/admissions/{id}",summary:"Delete an admission",tags:["Admissions"]}).input(Es.strict()).output(Os),quote:ea.route({method:"POST",path:"/events/{eventId}/admissions/quote",summary:"Create an admission quote",tags:["Admissions"]}).input(Cs.strict()).output(Ps)};const jg={BAD_REQUEST:{status:400,data:Bn({unresolvedRequired:Gn(Ji()),unresolvedOptional:Gn(Ji()).optional(),issues:Gn(Ji()).optional()}).optional()}};var qg={track:ea.route({method:"POST",path:"/analytics/track",summary:"Track event",tags:["Analytics"]}).input(Lc).errors(jg).output(Nc),page:ea.route({method:"POST",path:"/analytics/page",summary:"Page event",tags:["Analytics"]}).input(Lc).errors(jg).output(Nc),identify:ea.route({method:"POST",path:"/analytics/identify",summary:"Identify event",tags:["Analytics"]}).input(Lc).errors(jg).output(Nc),alias:ea.route({method:"POST",path:"/analytics/alias",summary:"Alias event",tags:["Analytics"]}).input(Lc).errors(jg).output(Nc),group:ea.route({method:"POST",path:"/analytics/group",summary:"Group event",tags:["Analytics"]}).input(Lc).errors(jg).output(Nc),screen:ea.route({method:"POST",path:"/analytics/screen",summary:"Screen event",tags:["Analytics"]}).input(Lc).errors(jg).output(Nc)};const Gg=Bn({expected:Ji(),actual:Ji()}),Fg=ea.route({method:"GET",path:"/beneficiaries/{id}",summary:"Get beneficiary by ID",tags:["Beneficiaries"]}).input(Yc.strict()).output(Kc),Bg=ea.route({method:"POST",path:"/beneficiaries",summary:"Create a new beneficiary",tags:["Beneficiaries"]}).input(Vc.strict()).errors({BAD_REQUEST:{status:400,data:Gg.optional()}}).output(Kc);var zg={get:Fg,list:ea.route({method:"GET",path:"/beneficiaries",summary:"List beneficiaries with cursor-based pagination",description:"Returns beneficiary data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Beneficiaries"]}).input(Zc.strict()).output(Hc),create:Bg,remove:ea.route({method:"DELETE",path:"/beneficiaries/{id}",summary:"Delete a beneficiary",tags:["Beneficiaries"]}).input(Wc.strict()).output(Kc),schema:ol,validate:cl};const Vg=Bn({code:Ji()}),Yg=ea.route({method:"GET",path:"/coupon-codes/{id}",summary:"Get coupon code by ID",tags:["Coupon Codes"]}).input(hl.strict()).output($l),Wg=ea.route({method:"POST",path:"/coupon-codes",summary:"Create a new coupon code",tags:["Coupon Codes"]}).input(fl.strict()).errors({CONFLICT:{status:409,data:Vg.optional()}}).output($l),Zg=ea.route({method:"PUT",path:"/coupon-codes/{id}",summary:"Update a coupon code",tags:["Coupon Codes"]}).input(yl.strict()).output($l);var Hg={get:Yg,list:ea.route({method:"GET",path:"/coupon-codes",summary:"List coupon codes with cursor-based pagination",description:"Returns coupon code data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Coupon Codes"]}).input(gl.strict()).output(bl),create:Wg,update:Zg,remove:ea.route({method:"DELETE",path:"/coupon-codes/{id}",summary:"Delete a coupon code",tags:["Coupon Codes"]}).input(vl.strict()).output($l)};const Kg=Bn({committedAndHeldUses:In(),requestedLimit:In()}),Jg=ea.route({method:"GET",path:"/coupons/{id}",summary:"Get coupon by ID",tags:["Coupons"]}).input(Il.strict()).output(Al),Qg=ea.route({method:"POST",path:"/coupons",summary:"Create a new coupon",tags:["Coupons"]}).input(wl).output(Al),Xg=ea.route({method:"PUT",path:"/coupons/{id}",summary:"Update a coupon",tags:["Coupons"]}).input(xl).errors({BAD_REQUEST:{status:400,data:Kg.optional()}}).output(Al);var eb={get:Jg,list:ea.route({method:"GET",path:"/coupons",summary:"List coupons with cursor-based pagination",description:"Returns coupon data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Coupons"]}).input(kl.strict()).output(Tl),create:Qg,update:Xg,remove:ea.route({method:"DELETE",path:"/coupons/{id}",summary:"Delete a coupon",tags:["Coupons"]}).input(El.strict()).output(Al),code:Hg};const tb=Bn({eventId:Ca.optional().meta({description:"Event ID for rate limiting and change detection. If provided, suggestions are limited to once per day per event and only if the description changed significantly.",examples:[va.Event.id]}),description:Ji().min(100).max(1e4).meta({description:"Event description to analyze for genre and category suggestions. Minimum 100 characters required for meaningful AI analysis.",examples:["Join us for an all-night warehouse party featuring the best in tech house and melodic techno. BYO drinks, intimate vibes, and a killer sound system."]}),eventName:Ji().optional().meta({description:"Optional event name for additional context",examples:["Warehouse Sessions Vol. 5"]}),imageUrl:on().optional().meta({description:"Optional event artwork URL for visual analysis (multimodal)",examples:["https://assets.session.services/events/poster.jpg"]})}).meta({description:"Input for AI-powered event tag suggestions"}),ib=Bn({genres:Gn(Ta).max(5).meta({description:"Suggested music genres based on event description and artwork",examples:[["Tech House","Melodic Techno"]]}),categories:Gn(Ea).max(10).meta({description:"Suggested event categories based on description and artwork",examples:[["Warehouse","Underground","BYO"]]}),confidence:In().min(0).max(1).meta({description:"AI confidence score for the suggestions (0-1)",examples:[.85]}),startDate:Ji().optional().meta({description:"Event start date/time. Either ISO 8601 format (if specific date found) or natural language hint for relative dates (e.g., 'next Saturday 9pm').",examples:["2025-02-15T21:00:00","next Saturday 9pm"]}),endDate:Ji().optional().meta({description:"Event end date/time. Either ISO 8601 format (if specific date found) or natural language hint.",examples:["2025-02-16T04:00:00","6am Sunday"]}),venueName:Ji().optional().meta({description:"Venue or location name extracted from the description or artwork. Used to search for and prefill the event location.",examples:["Warehouse 21","The Metro Theatre"]}),ticketUrl:on().optional().meta({description:"External ticket purchase URL if found in the description. Only extracted if different from the host platform.",examples:["https://www.eventbrite.com/e/warehouse-sessions-tickets-123"]})}).meta({description:"AI-generated genre and category suggestions for an event"});Bn({estimatedInputTokens:In().int().meta({description:"Estimated input tokens for the request",examples:[500]}),estimatedOutputTokens:In().int().meta({description:"Estimated output tokens for the response",examples:[100]}),estimatedCostUsd:In().meta({description:"Estimated cost in USD",examples:[.002]}),includesImage:An().meta({description:"Whether the estimate includes image analysis",examples:[!0]})}).meta({description:"Cost estimate for an AI tag suggestion request"});var nb={suggestTags:ea.route({method:"POST",path:"/events/tags",summary:"Suggest event genres and categories",description:"Uses AI to analyze event description and optional artwork to suggest relevant music genres and event categories. Returns up to 5 genres and 10 categories with a confidence score.",tags:["Events"]}).input(tb.strict()).output(ib)};const rb=Bn({eventId:Ca.meta({description:"Event to like"})}).meta({description:"Request to like an event"}),ob=Bn({limit:es("likes"),cursor:Ji().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing the current user's liked events with pagination. Returns events sorted by most recently liked first."}),ab=Bn({tenantId:Ji().readonly().meta({description:"Tenant ID for multi-tenant isolation"}),userId:_a.readonly().meta({description:"User who liked the event"}),eventId:Ca.meta({description:"Event the user liked"}),createdAt:Si().readonly().meta({description:"Timestamp when the user liked the event"})}).meta({description:"Represents a user's like on an event. Used for tracking popular events and building personalized recommendations."}),sb=As(ab,"likes").meta({description:"Paginated list of event likes. Use cursor-based pagination to navigate through results."}),db=Bn({eventId:Ca.meta({description:"Event to remove like from"})}).meta({description:"Request to remove the current user's like from an event"}),cb=Bn({like:ab});var lb={add:ea.route({method:"POST",path:"/events/{eventId}/like",summary:"Like an event",description:"Like an event as the current user. Atomically increments the event's likes counter.",tags:["Events"]}).input(rb).output(cb),remove:ea.route({method:"DELETE",path:"/events/{eventId}/like",summary:"Remove like from an event",description:"Remove the current user's like from an event. Atomically decrements the event's likes counter.",tags:["Events"]}).input(db).output(Mn()),list:ea.route({method:"GET",path:"/events/likes",summary:"List liked events",description:"List all events the current user has liked, with cursor-based pagination.",tags:["Events"]}).input(ob).output(sb)};const ub=bd.extend({limit:ba().min(1).max(100).optional().default(10)}),pb=vd.extend({limit:ba().min(1).max(100).optional().default(10)}),mb=Td.extend({limit:ba().min(1).max(100).optional().default(10)}),hb=wd.extend({limit:ba().min(1).max(100).optional().default(10)}),fb=Ed.extend({limit:ba().min(1).max(100).optional().default(10)}),yb=xd.extend({limit:ba().min(1).max(100).optional().default(10)}),vb=Dd.extend({limit:ba().min(1).max(100).optional().default(10)}),gb=Ud.extend({limit:ba().min(1).max(50).optional().default(10)}),bb=Ld.extend({includeAdmission:$a().optional().default(!0),includeSection:$a().optional().default(!0)}),$b=Bd.extend({});var wb={summary:ea.route({method:"GET",path:"/events/{eventId}/performance/summary",summary:"Get event performance summary",description:"Top-level KPI metrics with period comparison based on tracking events",tags:["Event Performance"]}).input(nd).output(rd),tickets:ea.route({method:"GET",path:"/events/{eventId}/performance/tickets",summary:"Get ticket sales performance",description:"Time series of sold tickets and successful-order revenue by period, with admission and section breakdowns",tags:["Event Performance"]}).input(od).output(ad),timeseries:ea.route({method:"GET",path:"/events/{eventId}/performance/timeseries",summary:"Get event metric time series",description:"Per-bucket series of revenue, tickets, orders, page views, visitors, and conversion rate for the selected range",tags:["Event Performance"]}).input(dd).output(cd),funnel:ea.route({method:"GET",path:"/events/{eventId}/performance/funnel",summary:"Get sales funnel performance",description:"Conversion funnel showing drop-off at each stage from tracking events",tags:["Event Performance"]}).input(ld).output(ud),campaigns:ea.route({method:"GET",path:"/events/{eventId}/performance/campaigns",summary:"Get campaign performance",description:"Marketing campaign metrics from tracking events (UTM campaign parameter)",tags:["Event Performance"]}).input(ub).output($d),coupons:ea.route({method:"GET",path:"/events/{eventId}/performance/coupons",summary:"Get coupon performance",description:"Coupon usage and revenue from actual order data",tags:["Event Performance"]}).input(pb).output(gd),mediums:ea.route({method:"GET",path:"/events/{eventId}/performance/mediums",summary:"Get traffic medium performance",description:"Performance by traffic medium (social, email, cpc) from tracking events",tags:["Event Performance"]}).input(hb).output(Id),devices:ea.route({method:"GET",path:"/events/{eventId}/performance/devices",summary:"Get device performance",description:"Performance breakdown by device type from tracking events",tags:["Event Performance"]}).input(fb).output(kd),browsers:ea.route({method:"GET",path:"/events/{eventId}/performance/browsers",summary:"Get browser performance",description:"Traffic breakdown by browser from tracking events",tags:["Event Performance"]}).input(mb).output(Ad),locations:ea.route({method:"GET",path:"/events/{eventId}/performance/locations",summary:"Get geographic performance",description:"Performance by geographic location from tracking events",tags:["Event Performance"]}).input(yb).output(Sd),traffic:ea.route({method:"GET",path:"/events/{eventId}/performance/traffic",summary:"Get traffic source performance",description:"Top referral sources and channels from tracking events",tags:["Event Performance"]}).input(vb).output(Cd),attendance:ea.route({method:"GET",path:"/events/{eventId}/performance/attendance",summary:"Get event attendance statistics",description:"Check-in statistics and attendance breakdown by admission and section",tags:["Event Performance"]}).input(Pd).output(Nd),scanners:ea.route({method:"GET",path:"/events/{eventId}/performance/scanners",summary:"Get door staff scanner activity",description:"Ranked check-in activity by scanner for post-event door staff analytics",tags:["Event Performance"]}).input(gb).output(Md),turnout:ea.route({method:"GET",path:"/events/{eventId}/performance/turnout",summary:"Get event turnout analysis",description:"Post-event sold versus checked-in tickets by admission and section",tags:["Event Performance"]}).input(bb).output(Fd),pace:ea.route({method:"GET",path:"/events/{eventId}/performance/pace",summary:"Get event check-in pace",description:"Post-event check-in flow over the admission entry window with peak door volume",tags:["Event Performance"]}).input($b).output(zd)};const Ib=ea.route({method:"GET",path:"/events/slugs",summary:"List event slugs",description:"List current event slugs with the same filters and access rules as event lists. Supports skip/limit pagination for sitemap generation.",tags:["Events"]}).input(cu).output(lu),Eb=ea.route({method:"GET",path:"/events/{key}",summary:"Get event by ID or slug",description:"Retrieve an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(eu).output(Bl),kb=ea.route({method:"POST",path:"/events",summary:"Create a new event",tags:["Events"]}).input(Kl.strict()).output(du),Tb=ea.route({method:"POST",path:"/events/{key}/duplicate",summary:"Duplicate an event",description:"Create a new event by copying event details, sections, and admissions from an existing event.",tags:["Events"]}).input(Ql.strict()).output(du),Ab=ea.route({method:"PUT",path:"/events/{key}",summary:"Update an event",description:"Update an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(pu.strict()).output(du),xb={get:ea.route({method:"GET",path:"/events/{key}/approval",summary:"Get event approval status",description:"Get internal event approval status and reviewer feedback. Requires event.read permission on the event owner team.",tags:["Events"]}).input(Vl.strict()).output(Wl),request:ea.route({method:"POST",path:"/events/{key}/approval/request",summary:"Request event approval",description:"Request or resubmit event approval. Requires event.write permission on the event owner team.",tags:["Events"]}).input(Zl.strict()).output(du),update:ea.route({method:"PUT",path:"/events/{key}/approval",summary:"Approve or reject an event",description:"Approve or reject an event. Requires event.write permission on the tenant admin team.",tags:["Events"]}).input(Hl.strict()).output(du)};var Sb={slugs:Ib,get:Eb,list:ea.route({method:"GET",path:"/events",summary:"List events",description:"List events with filters for status, approval, visibility, and promoter. Supports full‑text search (query), geo search (latitude/longitude/radius), and cursor-based pagination.",tags:["Events"]}).input(ou).output(su),create:kb,duplicate:Tb,update:Ab,approval:xb,remove:ea.route({method:"DELETE",path:"/events/{key}",summary:"Delete an event",description:"Delete an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(Jl.strict()).output(du),feature:ea.route({method:"POST",path:"/events/{key}/feature",summary:"Toggle event featured status",description:"Set or remove featured status on an event. Tenant admin only.",tags:["Events"]}).input(Xl.strict()).output(du),like:lb,performance:wb,tags:nb.suggestTags},Db={get:ea.route({method:"GET",path:"/events/{eventId}/collaborators/{id}",summary:"Get event collaborator by ID",description:"Retrieve an active event collaboration by its unique ID. Returns the collaborator record with promoter and permission details.",tags:["Event Collaborators"]}).input(vu.strict()).output(wu),list:ea.route({method:"GET",path:"/events/{eventId}/collaborators",summary:"List active event collaborators with cursor-based pagination",description:"Returns active event collaborations for a specific event with cursor pagination. Only shows accepted collaborators. For pending invitations, use the invite endpoints.",tags:["Event Collaborators"]}).input(bu.strict()).output($u),create:ea.route({method:"POST",path:"/events/{eventId}/collaborators",summary:"Invite a promoter to collaborate on an event",description:"Send a collaboration invitation to a promoter (can be from a different team). Enables cross-team promoter-to-promoter collaboration. Creates a pending invitation with a secure token that expires in 7 days. The invited promoter must accept to create an active collaboration.",tags:["Event Collaborators"]}).input(yu.strict()).output(gu),accept:ea.route({method:"POST",path:"/events/{eventId}/collaborators/{id}/accept",summary:"Accept an event collaboration invitation",description:"Accept a pending event collaboration invitation. User must be a member of the invited promoter's team. Deletes the invitation and creates an active collaboration record.",tags:["Event Collaborators"]}).input(hu.strict()).output(wu),remove:ea.route({method:"DELETE",path:"/events/{eventId}/collaborators/{id}",summary:"Remove active event collaboration",description:"Remove an active collaboration (hard delete). Can be done by event team members or the collaborating team members. This completely removes access.",tags:["Event Collaborators"]}).input(vu.strict()).output(Mn())};const Cb=Bn({language:Ji().trim().max(80).optional(),platform:Ji().trim().max(120).optional(),timezone:Ji().trim().max(120).optional(),userAgent:Ji().trim().max(800).optional(),viewport:Bn({width:In().int().positive().max(1e4),height:In().int().positive().max(1e4),devicePixelRatio:In().positive().max(10).optional()}).optional()}),Pb=Bn({key:Ji().trim().min(1),message:Ji().trim().min(10).max(4e3),pageUrl:on().max(2e3),pageTitle:Ji().trim().max(300).optional(),browser:Cb.optional()}),Ob=Bn({ok:tr(!0)}),_b=Bn({file:new Pn({type:"any"}).describe("Image file to upload (max 10MB)"),folder:Xn(["avatars","events","teams","promoters","venues"]).describe("Folder to upload to"),width:ba().int().positive().optional().describe("Target width in pixels"),height:ba().int().positive().optional().describe("Target height in pixels")}),Rb=Wa,Nb=ea.route({method:"POST",path:"/internal/upload/image",summary:"Upload and compress image",description:"Upload an image file (PNG, JPEG, or SVG), optionally resize it, and compress it for web. SVG files are uploaded as-is without compression. Returns the uploaded image URL and metadata.",tags:["Internal"]}).input(_b.strict()).output(Rb);var Ub={shareFeedback:ea.route({method:"POST",path:"/internal/feedback",summary:"Share product feedback",description:"Send authenticated tenant dashboard feedback to the Sessions team.",tags:["Internal"]}).input(Pb.strict()).output(Ob),uploadImage:Nb},Mb={list:ea.route({method:"GET",path:"/locations",summary:"Search for locations",description:"Search for locations by query. Returns predictions with venue badges for locations that are managed venues on the platform. The query parameter is required.",tags:["Locations"]}).input(Eu.strict()).output(Tu),get:ea.route({method:"GET",path:"/locations/{key}",summary:"Get location details",description:"Fetch full location details including coordinates, timezone, and photo. Accepts location ID or provider identifier (e.g., Google Place ID). Uses cache-first strategy.",tags:["Locations"]}).input(Iu.strict()).output(Au)},Lb={create:ea.route({method:"POST",path:"/orders/{id}/notes",summary:"Add note to order timeline (promoter only)",description:"Add a user note to the order timeline. Note will be marked as editable by the author.",tags:["Orders"]}).input(dp.strict()).output(Jp),update:ea.route({method:"PATCH",path:"/orders/{id}/notes/{noteId}",summary:"Update timeline note (author only)",description:"Update a timeline note. Only the author can edit their own notes. System-generated entries cannot be edited.",tags:["Orders"]}).input(Nh.strict()).output(Jp),remove:ea.route({method:"DELETE",path:"/orders/{id}/notes/{noteId}",summary:"Delete timeline note (author only)",description:"Delete a timeline note. Only the author can delete their own notes. System-generated entries cannot be deleted.",tags:["Orders"]}).input(mp.strict()).output(Mn())};const jb=ea.route({method:"GET",path:"/orders/{id}",summary:"Get order by ID",tags:["Orders"]}).input(Ap.strict()).output(Jp),qb=ea.route({method:"GET",path:"/orders",summary:"List orders with cursor-based pagination",description:"Returns order data with cursor-based pagination, optional full-text search via `query`, advanced filters, and deterministic sorting.",tags:["Orders"]}).input(qp.strict()).output(Gp),Gb=ea.route({method:"POST",path:"/orders/quote",summary:"Create order quote",tags:["Orders"]}).input(Bp.strict()).output(zp);var Fb={get:jb,list:qb,create:ea.route({method:"POST",path:"/orders",summary:"Create a new order",tags:["Orders"]}).input(pp.strict()).output(Jp),createComplimentary:ea.route({method:"POST",path:"/orders/complimentary",summary:"Create a complimentary order",tags:["Orders"]}).input(lp.strict()).output(Jp),update:ea.route({method:"PUT",path:"/orders/{id}",summary:"Update an order",tags:["Orders"]}).input(Rh.strict()).output(Jp),reserve:ea.route({method:"POST",path:"/orders/{id}/reserve",summary:"Re-reserve inventory for an abandoned order",description:"Attempts to re-reserve inventory for an abandoned order. If inventory is available, the order status is set back to PENDING with a new reservation timer. Returns the updated order with a new reservedAt timestamp if successful.",tags:["Orders"]}).input(Hp.strict()).errors({BAD_REQUEST:{status:400,data:Kp.optional()}}).output(Jp),quote:Gb,resend:ea.route({method:"POST",path:"/orders/{id}/resend",summary:"Resend tickets to customer",description:"Resend order tickets to the customer's email. Optionally provide a different email address.",tags:["Orders"]}).input(Zp.strict()).output(Jp),refund:ea.route({method:"POST",path:"/orders/{id}/refund",summary:"Refund order items",description:"Process a refund for order items. Supports full or partial refunds with optional ticket cancellation.",tags:["Orders"]}).input(Yp.strict()).output(Wp),note:Lb};const Bb=Bn({payout:Wh});var zb={create:ea.route({method:"POST",path:"/payouts/{id}/notes",summary:"Add note to payout timeline (`payout.write` required)",description:"Add a user note to the payout timeline. Note will be marked as editable by the author.",tags:["Payouts"]}).input(Zh.strict()).output(Bb),update:ea.route({method:"PATCH",path:"/payouts/{id}/notes/{noteId}",summary:"Update timeline note (author only)",description:"Update a timeline note. Only the author can edit their own notes. System-generated entries cannot be edited.",tags:["Payouts"]}).input(Rf.strict()).output(Bb),remove:ea.route({method:"DELETE",path:"/payouts/{id}/notes/{noteId}",summary:"Delete timeline note (author only)",description:"Delete a timeline note. Only the author can delete their own notes. System-generated entries cannot be deleted.",tags:["Payouts"]}).input(Xh.strict()).output(Bb)},Vb={get:ea.route({method:"GET",path:"/payouts/{id}",summary:"Get payout by ID with breakdown",tags:["Payouts"]}).input(ef.strict()).output(Cf),list:ea.route({method:"GET",path:"/payouts",summary:"List payouts with cursor-based pagination",description:"Returns payout data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Payouts"]}).input(rf.strict()).output(of),preview:ea.route({method:"GET",path:"/payouts/{id}/preview",summary:"Get payout preview for approvals",description:"Returns lightweight payout split rows and beneficiary resolution status used by approvals dropdowns.",tags:["Payouts"]}).input(pf.strict()).output(uf),adjustments:ea.route({method:"GET",path:"/payouts/adjustments",summary:"List Airwallex payout adjustments",description:"Returns settlement-proven Airwallex refund and dispute adjustments grouped for tenant payout review.",tags:["Payouts"]}).input(xf.strict()).output(Sf),adjustment:ea.route({method:"GET",path:"/payouts/adjustments/{id}",summary:"Get payout adjustment by ID",description:"Returns a payout adjustment detail payload with related adjustment rows, applications, and upcoming payout projections.",tags:["Payouts"]}).input(wf.strict()).output(Df),stats:ea.route({method:"POST",path:"/payouts/stats",summary:"Get payout statistics",tags:["Payouts"]}).input(Of.strict()).output(Pf),breakdown:ea.route({method:"GET",path:"/payouts/{payoutId}/breakdown",summary:"Get payout breakdown",tags:["Payouts"]}).input(Uh.strict()).output(Qh),update:ea.route({method:"PATCH",path:"/payouts/{id}",summary:"Update a payout",description:"Update payout status or approval. Use approval field to approve or reject payouts.",tags:["Payouts"]}).input(_f.strict()).output(Wh),note:zb};const Yb=Bn({key:Ji(),memberId:Ji()}),Wb=Yb.merge(qf).strict();var Zb={get:ea.route({method:"GET",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Get permission scope by ID",description:"Retrieve a permission scope using its unique ID",tags:["Permission Scopes"]}).input(Wb).output(Mf),list:ea.route({method:"GET",path:"/teams/{key}/members/{memberId}/permission-scopes",summary:"List permission scopes with cursor-based pagination",description:"Returns permission scopes for a specific team member with cursor pagination. Can filter by kind (PROMOTER or VENUE).",tags:["Permission Scopes"]}).input(Yb.merge(Gf).strict()).output(Ff),create:ea.route({method:"POST",path:"/teams/{key}/members/{memberId}/permission-scopes",summary:"Create a new permission scope",description:"Create a permission scope for a team member. Can be PROMOTER-specific (applies to all events by that promoter) or VENUE-specific (applies to all events at that venue). Replaces lower-tier permissions.",tags:["Permission Scopes"]}).input(Yb.and(jf)).output(Mf),update:ea.route({method:"PATCH",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Update a permission scope",description:"Update an existing permission scope. Only the permissions array can be modified.",tags:["Permission Scopes"]}).input(Yb.extend({id:Ji()}).merge(Bf).strict()).output(Mf),remove:ea.route({method:"DELETE",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Delete a permission scope",description:"Remove a permission scope. Team member will revert to lower-tier permissions for the affected resource.",tags:["Permission Scopes"]}).input(Wb).output(Mf)},Hb={summary:ea.route({method:"GET",path:"/promoters/{promoterId}/performance/summary",summary:"Get promoter performance summary",description:"Overview KPIs for a single promoter based on tracking data (excludes entity-based data like payouts)",tags:["Promoter Performance"]}).input(Vd).output(Yd),revenue:ea.route({method:"GET",path:"/promoters/{promoterId}/performance/revenue",summary:"Get promoter revenue over time",description:"Time-series data for revenue and tickets sold for a single promoter",tags:["Promoter Performance"]}).input(Wd).output(Zd),events:ea.route({method:"GET",path:"/promoters/{promoterId}/performance/events",summary:"Get promoter top events by tickets",description:"Top events by ticket count for a single promoter",tags:["Promoter Performance"]}).input(Hd).output(Kd)};const Kb=Bn({eventCount:In().optional()}),Jb=ea.route({method:"GET",path:"/promoters/{key}",summary:"Get promoter by ID or slug",description:"Retrieve a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(sy.strict()).output(hy),Qb=ea.route({method:"POST",path:"/promoters",summary:"Create a new promoter",description:"Create a new promoter brand within a team",tags:["Promoters"]}).input(dy.strict()).output(hy),Xb=ea.route({method:"PUT",path:"/promoters/{key}",summary:"Update a promoter",description:"Update a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(fy.strict()).output(hy);var e$={get:Jb,list:ea.route({method:"GET",path:"/promoters",summary:"List promoters with cursor-based pagination",description:"Returns promoters with cursor pagination. Filter by teamId to see promoters for a specific team.",tags:["Promoters"]}).input(py.strict()).output(my),create:Qb,update:Xb,remove:ea.route({method:"DELETE",path:"/promoters/{key}",summary:"Delete a promoter",description:"Delete a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(cy.strict()).errors({CONFLICT:{status:409,data:Kb.optional()}}).output(hy),performance:Hb},t$={create:ea.route({method:"POST",path:"/reports",summary:"Create report generation job",description:"Creates an asynchronous report job. Download the report once the job status is COMPLETED.",tags:["Reports"]}).input($y).output(Iy),get:ea.route({method:"GET",path:"/reports/{id}",summary:"Get report generation job",tags:["Reports"]}).input(wy.strict()).output(Iy)};const i$=ea.route({method:"GET",path:"/events/{eventId}/sections/{id}",summary:"Get section by ID",tags:["Sections"]}).input(Op.strict()).output(Np),n$=ea.route({method:"POST",path:"/events/{eventId}/sections",summary:"Create a new section",tags:["Sections"]}).input(Cp.strict()).output(Np),r$=ea.route({method:"PUT",path:"/events/{eventId}/sections/{id}",summary:"Update a section",tags:["Sections"]}).input(Up.strict()).output(Np);var o$={get:i$,list:ea.route({method:"GET",path:"/events/{eventId}/sections",summary:"List sections",description:"Returns sections with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided for full-text search capabilities.",tags:["Sections"]}).input(_p.strict()).output(Rp),create:n$,update:r$,remove:ea.route({method:"DELETE",path:"/events/{eventId}/sections/{id}",summary:"Delete a section",tags:["Sections"]}).input(Pp.strict()).output(Np)},a$={summary:ea.route({method:"GET",path:"/teams/{teamId}/performance/summary",summary:"Get team performance summary",description:"Overview KPIs aggregated across all promoters in the team, based on tracking data (excludes entity-based data like payouts)",tags:["Team Performance"]}).input(Jd).output(Qd),revenue:ea.route({method:"GET",path:"/teams/{teamId}/performance/revenue",summary:"Get team revenue over time",description:"Time-series data for revenue and tickets sold aggregated across all promoters in the team",tags:["Team Performance"]}).input(Xd).output(ec),funnel:ea.route({method:"GET",path:"/teams/{teamId}/performance/funnel",summary:"Get team conversion funnel",description:"Conversion funnel showing drop-off rates from product view to purchase, aggregated across all events in the team",tags:["Team Performance"]}).input(nc).output(rc),traffic:ea.route({method:"GET",path:"/teams/{teamId}/performance/traffic",summary:"Get team traffic sources",description:"Traffic source breakdown by campaign, medium, or source, aggregated across all events in the team",tags:["Team Performance"]}).input(cc).output(lc),insights:ea.route({method:"GET",path:"/teams/{teamId}/performance/insights",summary:"Get team performance insights",description:"Order-backed revenue, tickets, refund, and dispute totals for an exact time window",tags:["Team Performance"]}).input(uc).output(hc),payouts:ea.route({method:"GET",path:"/teams/{teamId}/performance/payouts",summary:"Get team payout performance",description:"Upcoming and recently paid payout totals aggregated across the team",tags:["Team Performance"]}).input(yc).output($c),finance:ea.route({method:"GET",path:"/teams/{teamId}/performance/finance",summary:"Get team finance overview",description:"Finance overview combining gross order value with payout and adjustment data",tags:["Team Performance"]}).input(wc).output(xc),events:ea.route({method:"GET",path:"/teams/{teamId}/performance/events",summary:"Get team top events by tickets",description:"Top events by ticket count, aggregated across all events in the team",tags:["Team Performance"]}).input(tc).output(ic),admissions:ea.route({method:"GET",path:"/teams/{teamId}/performance/admissions",summary:"Get team top admissions by tickets",description:"Top admission types by ticket count, aggregated across all events in the team",tags:["Team Performance"]}).input(sc).output(dc),orders:ea.route({method:"GET",path:"/teams/{teamId}/performance/orders",summary:"Get team orders distribution",description:"Order counts grouped by time breakdown (hour, day of week, day, week, month)",tags:["Team Performance"]}).input(oc).output(ac),tracking:ea.route({method:"GET",path:"/teams/{teamId}/performance/tracking",summary:"Get team tracking time series",description:"Time-series tracking data (page views, add to cart, checkout, orders) aggregated at team or tenant level",tags:["Team Performance"]}).input(Sc).output(Dc)},s$={get:ea.route({method:"GET",path:"/teams/{key}",summary:"Get team by ID or slug",description:"Retrieve a team with membership details. User must be a member of the team.",tags:["Teams"]}).input(Dy.strict()).output(Yy),list:ea.route({method:"GET",path:"/teams",summary:"List teams with cursor-based pagination",description:"Returns teams the current user has access to with cursor pagination",tags:["Teams"]}).input(qy.strict()).output(Gy),create:ea.route({method:"POST",path:"/teams",summary:"Create a new team",description:"Create a new team organization",tags:["Teams"]}).input(Cy.strict()).output(Yy),slugAvailability:ea.route({method:"GET",path:"/teams/slugs/{slug}/availability",summary:"Check team slug availability",description:"Check whether a team URL slug is available within the current tenant.",tags:["Teams"]}).input(Zy.strict()).output(Hy),update:ea.route({method:"PATCH",path:"/teams/{key}",summary:"Update a team",description:"Update an existing team by ID or slug",tags:["Teams"]}).input(Ky.strict()).output(Yy),remove:ea.route({method:"DELETE",path:"/teams/{key}",summary:"Delete a team",description:"Soft delete a team by ID or slug",tags:["Teams"]}).input(Dy.strict()).output(Yy),performance:a$},d$={list:ea.route({method:"GET",path:"/teams/{key}/invites",summary:"List pending team invitations with cursor-based pagination",description:"Returns pending team invitations for a specific team. Team key can be ID or slug. These are email-based invitations that have not yet been accepted.",tags:["Team Invites"]}).input(Ny.strict()).output(Uy),get:ea.route({method:"GET",path:"/teams/{key}/invites/{inviteId}",summary:"Get pending invitation by ID",description:"Retrieve a pending team invitation by its ID. Team key can be ID or slug.",tags:["Team Invites"]}).input(Ry.strict()).output(My),create:ea.route({method:"POST",path:"/teams/{key}/invites",summary:"Create a team invitation",description:"Invite a user to join a team by email. Team key can be ID or slug. Creates a pending invitation with a secure token that expires in 7 days. The invited user will receive an email with an acceptance link.",tags:["Team Invites"]}).input(_y.strict()).output(My),accept:ea.route({method:"PATCH",path:"/teams/{key}/invites/{inviteId}",summary:"Accept a team invitation",description:"Accept a pending team invitation using the secure token. Team key can be ID or slug. This deletes the invitation and creates an active TeamMember record. Returns the newly created team member.",tags:["Team Invites"]}).input(Ey.strict()).output(Qy),resend:ea.route({method:"POST",path:"/teams/{key}/invites/{inviteId}/resend",summary:"Resend invitation email",description:"Resend the invitation email with a new token and extended expiry. Team key can be ID or slug. Useful when the original invitation has expired or was not received.",tags:["Team Invites"]}).input(Ry.strict()).output(My),cancel:ea.route({method:"DELETE",path:"/teams/{key}/invites/{inviteId}",summary:"Cancel a pending invitation",description:"Cancel a pending team invitation before it is accepted. Team key can be ID or slug. Deletes the invitation record.",tags:["Team Invites"]}).input(Oy.strict()).output(My)},c$={connect:ea.route({method:"POST",path:"/teams/{key}/payment/connect",summary:"Initiate payment processor connection",description:"Start the OAuth flow to connect a team's payment processor account. Returns an authorization URL to redirect the user to the payment provider's OAuth page. The OAuth callback is handled directly by the payment gateway.",tags:["Team Payments"]}).input(By.strict()).output(zy),disconnect:ea.route({method:"POST",path:"/teams/{key}/payment/disconnect",summary:"Disconnect payment processor",description:"Remove the payment processor connection from a team. Future ticket sales will use the platform account. Only the team owner can disconnect the payment processor.",tags:["Team Payments"]}).input(Vy.strict()).output(xy),gateway:{update:ea.route({method:"PATCH",path:"/teams/{key}/payment/gateway",summary:"Update Stripe Connect event routing",description:"Configure whether Stripe Connect applies to every team event or only selected events.",tags:["Team Payments"]}).input(Ty.strict()).output(xy)}};const l$=ea.route({method:"GET",path:"/tenant/config",summary:"Get tenant configuration",tags:["Tenant"],description:"Returns tenant configuration including features and regions. Requires x-tenant-id header."}).output(cv),u$=ea.route({method:"GET",path:"/tenant/regions",summary:"Get tenant regions",tags:["Tenant"],description:"Returns available regions for the tenant. Requires x-tenant-id header."}).output(lv);var p$={approvals:ea.route({method:"GET",path:"/tenant/approvals",summary:"Get tenant approval badges",tags:["Tenant"],description:"Returns lightweight booleans for pending approvals. Requires tenant admin access."}).input(uv).output(pv),config:l$,regions:u$};const m$=ea.route({method:"GET",path:"/tickets/{id}",summary:"Get ticket by ID",tags:["Tickets"]}).input(_v.strict()).output(Uv),h$=ea.route({method:"POST",path:"/tickets",summary:"Create a new ticket",tags:["Tickets"]}).input(Ov.strict()).output(Uv),f$=ea.route({method:"PUT",path:"/tickets/{id}",summary:"Update a ticket",tags:["Tickets"]}).input(Zv.strict()).output(Uv);var y$={get:m$,list:ea.route({method:"GET",path:"/tickets",summary:"List tickets with cursor-based pagination",description:"Returns ticket data with cursor-based pagination, optional full-text search via `query`, and a fixed attendee-name ascending order for non-search list paths.",tags:["Tickets"]}).input(Rv.strict()).output(Nv),attendees:{list:ea.route({method:"GET",path:"/tickets/attendees",summary:"List event attendees with alpha-navigation support",description:"Returns ticket-backed attendee roster rows for an event. Supports bounded browsing, alpha jump bookmarks, and attendee search.",tags:["Tickets"]}).input(Cv.strict()).output(Pv),index:ea.route({method:"GET",path:"/tickets/attendees/index",summary:"Get attendee alpha-navigation buckets",description:"Returns available alpha buckets and server-issued bookmarks for the ticket attendee roster.",tags:["Tickets"]}).input(xv.strict()).output(Sv)},create:h$,update:f$,checkInByKey:ea.route({method:"PUT",path:"/tickets/{key}/check-in",summary:"Check in tickets by key",tags:["Tickets"]}).input(Mv.strict()).errors({BAD_REQUEST:{status:400,data:Vv.optional()}}).output(Yv),checkOutByKey:ea.route({method:"PUT",path:"/tickets/{key}/check-out",summary:"Check out tickets by key",tags:["Tickets"]}).input(Mv.strict()).errors({BAD_REQUEST:{status:400,data:Vv.optional()}}).output(Yv)};const v$=ea.route({method:"GET",path:"/users/me",summary:"Get the current user and their team memberships",tags:["Users"]}).output(tg),g$=Bn({firstName:Ji().min(1).optional(),lastName:Ji().min(1).optional(),imageUrl:on().nullable().optional(),metadata:Jn(Ji(),Ja).optional(),refreshToken:Ji().optional().meta({description:"Current refresh token. When provided, new tokens with updated user data will be returned."})}).meta({ref:"UpdateUserInput",description:"Input for updating the current user's profile"}),b$=ea.route({method:"PATCH",path:"/users/me",summary:"Update the current user's profile",tags:["Users"]}).input(g$).output(Xv);var $$={me:v$,remove:ea.route({method:"DELETE",path:"/users/me",summary:"Delete the current user's account",tags:["Users"]}).output(eg),update:b$};const w$={analytics:qg,beneficiary:zg,section:o$,event:Sb,eventCollaborator:Db,admission:Lg,order:Fb,ticket:y$,location:Mb,coupon:eb,payout:Vb,teams:ay,permissionScope:Zb,promoter:e$,report:t$,team:s$,teamInvite:d$,teamPayment:c$,teamMember:av,tenant:p$,venue:{get:ea.route({method:"GET",path:"/venues/{key}",summary:"Get venue by ID or slug",description:"Retrieve a venue using its unique ID or slug",tags:["Venues"]}).input(og.strict()).output(lg),list:ea.route({method:"GET",path:"/venues",summary:"List venues with cursor-based pagination",description:"Returns venues with cursor pagination. Supports filtering by team, location-based search, and text query",tags:["Venues"]}).input(dg.strict()).output(cg),create:ea.route({method:"POST",path:"/venues",summary:"Create a new venue",description:"Create a new venue. Venue will be owned by the specified team but can be used by all teams for their events",tags:["Venues"]}).input(ng.strict()).output(lg),update:ea.route({method:"PATCH",path:"/venues/{key}",summary:"Update a venue",description:"Update an existing venue. Cannot change venue ownership (teamId)",tags:["Venues"]}).input(ug.strict()).output(lg),remove:ea.route({method:"DELETE",path:"/venues/{key}",summary:"Delete a venue",description:"Soft delete a venue",tags:["Venues"]}).input(rg.strict()).output(lg),linkLocation:ea.route({method:"POST",path:"/venues/{key}/locations",summary:"Link location to venue",description:"Link a location to this venue. Allows the venue to be discovered when users search for this location. A venue can have multiple linked locations (e.g., different addresses, branded names). Requires venue access on the owning team (for example, `venue.write`).",tags:["Venues"]}).input(og.extend({locationKey:Ji().meta({description:"Location ID (loc_xxx) or Google Place ID to link to this venue",examples:["loc_01jps5cgsm7qxvh6watsons0eq","ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}).strict()).output(lg),unlinkLocation:ea.route({method:"DELETE",path:"/venues/{key}/locations/{locationKey}",summary:"Unlink location from venue",description:"Remove a location link from this venue. The location will no longer show this venue's branding. Requires venue access on the owning team (for example, `venue.write`).",tags:["Venues"]}).input(og.extend({locationKey:Ji().meta({description:"Location ID (loc_xxx) or Google Place ID to unlink from this venue",examples:["loc_01jps5cgsm7qxvh6watsons0eq","ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}).strict()).output(lg)},user:$$},I$={...w$,internal:Ub};function E$(e){return ea.errors(xa).router(e)}const k$=E$(w$);E$(I$);const T$=k$,A$={sandbox:"https://api.sandbox.session.services",prod:"https://api.session.services"};function x$(e){return e in A$?A$[e]:e}const S$="sessions_attribution";function D$(e,t){return e.get(t)||void 0}function C$(e){return!(!e||!Object.values(e).some(Boolean))}function P$(){try{let e=window.localStorage?.getItem(S$);if(!e)return;let t=JSON.parse(e);if(!t||"object"!=typeof t)return void window.localStorage?.removeItem(S$);let i=t;return!i.expiresAt||i.expiresAt<=Date.now()?void window.localStorage?.removeItem(S$):i}catch{return}}function O$(e){return"string"==typeof e&&e.length>0?e:void 0}function _$(){if(typeof window>"u")return;let e=function(e){return{source:D$(e,"utm_source"),medium:D$(e,"utm_medium"),name:D$(e,"utm_campaign"),term:D$(e,"utm_term"),content:D$(e,"utm_content")}}(new URLSearchParams(window.location.search));return C$(e)?(function(e){if(C$(e))try{window.localStorage?.setItem(S$,JSON.stringify({...P$(),expiresAt:Date.now()+2592e6,utm_campaign:e?.name,utm_content:e?.content,utm_medium:e?.medium,utm_source:e?.source,utm_term:e?.term}))}catch{return}}(e),e):function(){let e=P$();if(!e)return;let t={source:O$(e.utm_source),medium:O$(e.utm_medium),name:O$(e.utm_campaign),term:O$(e.utm_term),content:O$(e.utm_content)};return C$(t)?t:void 0}()}function R$(e){return{anonymous_id:e.anonymousId,browser:M$(e.context.userAgent),browser_session_id:e.sessionId,device_type:U$(e.context.userAgent),page_path:e.context.page.path,page_title:e.context.page.title,page_url:e.context.page.url,referrer:e.context.page.referrer,user_agent:e.context.userAgent||void 0,utm_campaign:e.context.campaign?.name,utm_content:e.context.campaign?.content,utm_medium:e.context.campaign?.medium,utm_source:e.context.campaign?.source,utm_term:e.context.campaign?.term}}function N$(){return typeof window>"u"?{page:{url:"",path:"",title:"",referrer:void 0},userAgent:"",campaign:void 0}:{page:{url:window.location.href,path:window.location.pathname,title:document.title,referrer:document.referrer||void 0},userAgent:navigator.userAgent,campaign:_$()}}function U$(e){let t=e.toLowerCase();return t?function(e){return!!/ipad|tablet|playbook|silk|kindle|sm-t|tab/.test(e)||/android/.test(e)&&!/mobile/.test(e)}(t)?"TABLET":function(e){return/iphone|ipod|android|windows phone|blackberry|bb10|mobile/.test(e)}(t)?"MOBILE":"DESKTOP":"DESKTOP"}function M$(e){let t=e.toLowerCase();return t?t.includes("instagram")?"Instagram App":/fban|fbav|fb_iab|fbios|facebook/.test(t)?"Facebook App":/tiktok|musical_ly|bytedance|bytelo/.test(t)?"TikTok App":t.includes("snapchat")?"Snapchat App":t.includes("pinterest")?"Pinterest App":t.includes("linkedin")?"LinkedIn App":/twitter|twitterandroid/.test(t)?"X App":t.includes("micromessenger")?"WeChat App":/\bline\//.test(t)?"LINE App":t.includes("gsa/")?"Google App":/edg\/|edge|edgios|edga/.test(t)?"Edge":t.includes("samsungbrowser")?"Samsung Internet":/opr\/|opera|opios/.test(t)?"Opera":/firefox|fxios/.test(t)?"Firefox":t.includes("crios")?"Chrome":/iphone|ipod|ipad/.test(t)&&t.includes("safari")?"Mobile Safari":t.includes("android")&&t.includes("wv")?"Android WebView":/chrome|chromium/.test(t)?"Chrome":t.includes("safari")?"Safari":"Other":"Unknown"}function L$(e,t,i){null==i||""===i||(e[t]=i)}function j$(...e){return e.find((e=>null!=e&&""!==e))}const q$={"Product Viewed":"ViewContent","Product Added":"AddToCart","Checkout Started":"InitiateCheckout","Payment Info Entered":"AddPaymentInfo","Order Completed":"Purchase"},G$=new Set(["AddPaymentInfo","AddToCart","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"]),F$=new Set,B$=new Map;function z$(e){if(Array.from(document.scripts??[]).some((e=>e.src.includes("connect.facebook.net/en_US/fbevents.js"))))return!0;let t=document.createElement("script");t.async=!0,t.src="https://connect.facebook.net/en_US/fbevents.js",t.addEventListener?.("load",(()=>{Z$(e,"[Facebook Pixel] fbevents.js loaded")})),t.addEventListener?.("error",(()=>{Z$(e,"[Facebook Pixel] fbevents.js failed to load")}));let i=document.getElementsByTagName("script")[0],n=i?.parentNode??document.head??document.body;return!!n&&(n.insertBefore(t,i??null),Z$(e,"[Facebook Pixel] inserted fbevents.js"),!0)}function V$(e,t){!t||!Array.isArray(t)||(e.content_ids=t.flatMap((e=>e.product_id?[e.product_id]:[])),e.num_items=t.length,e.contents=function(e){if(Array.isArray(e))return e.map((e=>({id:e.product_id,quantity:e.quantity||1,item_price:e.price})))}(t))}function Y$(e,t){let i=window;typeof window>"u"||!i.fbq||(t?i.fbq("init",e,{external_id:t}):i.fbq("init",e))}function W$(e,t,i){let n=window;typeof window>"u"||!n.fbq||n.fbq(e,t,i)}function Z$(e,...t){e&&console.log(...t)}function H$(e,t,i){return!!function(e){if(typeof window>"u")return!1;let t=window;if(t.fbq)return z$(e);let i=(...e)=>{i.callMethod?i.callMethod(...e):i.queue.push(e)};return i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],t.fbq=i,t._fbq||=i,z$(e)}(i)&&(function(e,t,i){let n=B$.get(e);return!(!t||t===n||(Y$(e,t),B$.set(e,t),F$.add(e),Z$(i,`[Facebook Pixel] Re-initialized pixel ${e} with userId ${t}`),0))}(e,t,i)||F$.has(e)||function(e,t,i){Y$(e,t),F$.add(e),t&&B$.set(e,t),Z$(i,"[Facebook Pixel] Initialized pixel "+e)}(e,t,i),!0)}const K$=(e,t)=>{(function(e,t){t&&(e.content_ids=[t])})(e,t.product_id),function(e,t){L$(e,"content_name",t.name),L$(e,"value",j$(t.value,t.price)),e.content_type="product"}(e,t)},J$=function(e){return(t,i)=>{e(t,i),L$(t,"content_category",i.category)}}(K$);function Q$(e,t){K$(e,t),t.product_id&&(e.contents=[{id:t.product_id,quantity:t.quantity||1,item_price:t.price}])}function X$(e,t){V$(e,t.products),function(e,t){L$(e,"value",j$(t.value,t.total))}(e,t),e.content_type="product",L$(e,"order_id",t.order_id)}function ew(e,t){L$(e,"value",t.value),t.product_id&&(e.content_ids=[t.product_id])}const tw={ViewContent:J$,AddToCart:Q$,InitiateCheckout:X$,AddPaymentInfo:X$,Purchase:function(e,t){V$(e,t.products),function(e,t){L$(e,"value",j$(t.value,t.total,t.revenue))}(e,t),e.content_type="product",L$(e,"order_id",t.order_id)},"Product List Viewed":function(e,t){V$(e,t.products),e.content_type="product"},"Product Removed":Q$,"Cart Viewed":X$,"Coupon Applied":X$,"Coupon Removed":X$};function iw(e,t){let i={};return L$(i,"currency",t.currency),L$(i,"event_id",t.event_id),(tw[e.name]??tw[e.sourceName]??ew)(i,t),i}function nw(e,t=2){let i=e.trim();if(!i.includes("%")||0===t)return i;try{return nw(decodeURIComponent(i),t-1)}catch{return i}}function rw(e){let t=e.match(/[A-Za-z0-9]+/g);return t?t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(""):"Unknown"}function ow(e){let t=nw(function(e){return e.name||"Unknown"}(e)),i=q$[t]||t;return G$.has(i)?{method:"track",name:i,sourceName:t}:{method:"trackCustom",name:rw(i),sourceName:t}}function aw(e=!1){let t=(t,i)=>{i.fbId&&H$(i.fbId,t.userId,e)&&(W$("track","PageView",{}),Z$(e,"[Facebook Pixel] Sent PageView"))};return{name:"Facebook Pixel",preload:(t,i)=>{i.fbId&&H$(i.fbId,t.userId,e)},track:(t,i)=>{if(!i.fbId||!H$(i.fbId,t.userId,e))return;let n=ow(t),r=iw(n,t.properties);W$(n.method,n.name,r),Z$(e,`[Facebook Pixel] Sent ${n.name}:`,r)},page:t,screen:t,identify:(t,i)=>{!i.fbId||!t.userId||(H$(i.fbId,t.userId,e),Z$(e,"[Facebook Pixel] Identity synced: "+t.userId))}}}const sw={"Product Viewed":"view_item","Product Added":"add_to_cart","Product Removed":"remove_from_cart","Checkout Started":"begin_checkout","Payment Info Entered":"add_payment_info","Order Completed":"purchase","Product List Viewed":"view_item_list","Cart Viewed":"view_cart","Coupon Entered":"coupon_entered","Coupon Applied":"coupon_applied","Coupon Denied":"coupon_denied","Coupon Removed":"coupon_removed"},dw=new Set;function cw(e){return"google-analytics-"+e}function lw(e,t,i){if(typeof window>"u")return;let n=window;n.gtag&&n.gtag("event",t,{...i,send_to:e})}function uw(e,t){if(typeof window>"u")return;let i=window;i.gtag&&(i.gtag("set",{user_id:e}),pw(t,"[Google Analytics] User ID updated"))}function pw(e,...t){e&&console.log(...t)}function mw(e){return"string"==typeof e&&e.length>0?e:void 0}function hw(e,t,i){null==i||""===i||(e[t]=i)}function fw(e){return"number"==typeof e.price}function yw(e){let t=e.filter(fw);if(0!==t.length)return t.reduce(((e,t)=>e+t.price*function(e){return"number"==typeof e.quantity?e.quantity:1}(t)),0)}function vw(e){return{item_id:e.product_id||e.sku,item_name:e.name,item_category:e.category,item_variant:mw(e.variant),price:e.price,quantity:e.quantity??1}}function gw(e){return!e.product_id||e.products?[]:[{item_id:e.product_id,item_name:e.name,item_category:e.category,item_variant:mw(e.variant),price:e.price,quantity:e.quantity??1}]}function bw(e){return Array.isArray(e.products)?e.products.map(vw):[]}function $w(e,t=2){let i=e.trim();if(!i.includes("%")||0===t)return i;try{return $w(decodeURIComponent(i),t-1)}catch{return i}}function ww(e){let t=$w(e.name||"Unknown");return sw[t]||function(e){let t=e.match(/[A-Za-z0-9]+/g)?.join("_").toLowerCase()||"custom_event";return/^[a-z]/.test(t)?t:"event_"+t}(t)}function Iw(e,t){hw(e,"event_id",t.properties.event_id),hw(e,"team_id",t.properties.team_id),hw(e,"promoter_id",t.properties.promoter_id),hw(e,"order_id",t.properties.order_id)}function Ew(e,t){if(function(e){return!(!e||!/^G-[A-Z0-9]+$/.test(e))}(e.gaId))return function(e,t){if(typeof window>"u")return!1;let i=window;return i.dataLayer=i.dataLayer||[],i.gtag||(i.gtag=(...e)=>{i.dataLayer?.push(e)},i.gtag("js",new Date)),function(e){if(document.getElementById(cw(e)))return;let t=document.createElement("script");t.id=cw(e),t.async=!0,t.src="https://www.googletagmanager.com/gtag/js?id="+e;let i=document.getElementsByTagName("script")[0];i?.parentNode?.insertBefore(t,i)}(e),dw.has(e)||(i.gtag("config",e,{send_page_view:!1}),dw.add(e),pw(t,"[Google Analytics] Initialized "+e)),!0}(e.gaId,t)?e.gaId:void 0}function kw(e=!1){return{name:"Google Analytics",preload:(t,i)=>{Ew(i,e)},track:(t,i)=>{let n=Ew(i,e);if(!n)return;let r=ww(t),o=function(e,t){let i={},n=function(e){return[...gw(e),...bw(e)]}(t.properties);return Iw(i,t),n.length>0&&(i.items=n),hw(i,"currency",t.properties.currency),hw(i,"value",function(e,t){return function(e){return e.find((e=>"number"==typeof e))}([e.value,e.total,e.revenue,yw(t)])}(t.properties,n)),hw(i,"coupon",t.properties.coupon),hw(i,"payment_type",mw(t.properties.payment_type)??mw(t.properties.payment_method)),hw(i,"item_list_id",t.properties.list_id),hw(i,"item_list_name",t.properties.list_name),"purchase"===e&&hw(i,"transaction_id",function(e){return mw(e.transaction_id)??mw(e.order_id)}(t.properties)),i}(r,t);lw(n,r,o),pw(e,`[Google Analytics] Sent ${r}:`,o)},page:(t,i)=>{let n=Ew(i,e);if(!n)return;let r={page_location:t.context.page.url,page_path:t.context.page.path,page_title:t.context.page.title};Iw(r,t),hw(r,"page_referrer",t.context.page.referrer),lw(n,"page_view",r),pw(e,"[Google Analytics] Sent page_view:",r)},screen:(t,i)=>{let n=Ew(i,e);if(!n)return;let r={};Iw(r,t),hw(r,"screen_name",t.name||"Unknown"),lw(n,"screen_view",r),pw(e,"[Google Analytics] Sent screen_view:",r)},identify:(t,i)=>{t.userId&&Ew(i,e)&&(uw(t.userId,e),pw(e,"[Google Analytics] Identity available"))},reset:()=>{uw(null,e)}}}const Tw=new Set(Object.values(Jr));function Aw(e){return e.messageId??"msg_"+e.timestamp.toString(36)}function xw(e){let t=e.context.campaign??{};return{session_id:e.sessionId,anonymous_id:e.anonymousId,user_id:e.userId,page:{url:e.context.page.url,path:e.context.page.path,title:e.context.page.title},referrer:e.context.page.referrer,user_agent:e.context.userAgent,utm_source:t.source,utm_medium:t.medium,utm_campaign:t.name,utm_term:t.term,utm_content:t.content}}function Sw(e,t,i){return i&&t?{...e,name:t}:e}const Dw={"Product Viewed":"ViewContent","Product Added":"AddToCart","Checkout Started":"InitiateCheckout","Payment Info Entered":"AddPaymentInfo","Order Completed":"Purchase"},Cw=new Set(["AddPaymentInfo","AddToCart","AddToWishlist","ApplicationApproval","CompleteRegistration","Contact","CustomizeProduct","Download","FindLocation","InitiateCheckout","Purchase","Schedule","Search","StartTrial","SubmitApplication","SubmitForm","Subscribe","ViewContent"]),Pw=new Set,Ow="https://analytics.tiktok.com/i18n/pixel/events.js";function _w(e,t){let i=window;typeof window>"u"||!i.ttq||i.ttq.instance(e).identify?.({external_id:t})}function Rw(e){let t={};return L$(t,"event_id",e),Object.keys(t).length>0?t:void 0}function Nw(e,...t){e&&console.log(...t)}function Uw(e,t){return!!function(){if(typeof window>"u")return!1;let e=window;if(e.ttq)return!0;e.TiktokAnalyticsObject="ttq";let t=[];t.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],t.setAndDefer=(e,t)=>{e[t]=(...i)=>{e.push([t,...i])}};for(let e of t.methods)t.setAndDefer(t,e);return t.instance=e=>{let i=t._i[e]??[];for(let e of t.methods)t.setAndDefer(i,e);return i},t._i={},t._t={},t._o={},t.load=(e,i={})=>{t._i[e]=t._i[e]??[],t._i[e]._u=Ow,t._t[e]=Date.now(),t._o[e]=i,function(e){if(function(e){return Array.from(document.scripts??[]).some((t=>t.src.includes(Ow)&&t.src.includes("sdkid="+e)))}(e))return;let t=document.createElement("script");t.async=!0,t.src=`${Ow}?sdkid=${e}&lib=ttq`;let i=document.getElementsByTagName("script")[0];i?.parentNode?.insertBefore(t,i)}(e)},e.ttq=t,!0}()&&(Pw.has(e)||(function(e){let t=window;typeof window>"u"||!t.ttq||t.ttq.load(e)}(e),Pw.add(e),Nw(t,"[TikTok Pixel] Initialized pixel "+e)),!0)}function Mw(e){return"number"==typeof e.quantity?e.quantity:1}function Lw(e){if("number"==typeof e.price)return e.price*Mw(e)}function jw(e){return Array.isArray(e)?function(e){let t=e.filter((e=>"number"==typeof e.price));if(0!==t.length)return t.reduce(((e,t)=>e+Number(t.price)*Mw(t)),0)}(e):void 0}function qw(e){return function(e){return e.find((e=>"number"==typeof e))}([e.value,e.total,e.revenue,jw(e.products),Lw(e)])}function Gw(e,t){(function(e,t){L$(e,"content_ids",t?[t]:void 0)})(e,t.product_id),L$(e,"content_name",t.name),L$(e,"price",t.price),L$(e,"quantity",t.product_id?Mw(t):void 0),L$(e,"value",qw(t)),e.content_type="product"}function Fw(e){let t={content_type:"product"};return L$(t,"content_id",e.product_id),L$(t,"content_name",e.name),L$(t,"quantity",Mw(e)),L$(t,"price",e.price),t}function Bw(e,t){Array.isArray(t)&&(L$(e,"contents",t.map(Fw)),L$(e,"content_ids",function(e){return e.flatMap((e=>e.product_id?[e.product_id]:[]))}(t)),L$(e,"quantity",function(e){return e.reduce(((e,t)=>e+Mw(t)),0)}(t)),e.content_type="product")}function zw(e,t){Bw(e,t.products),L$(e,"value",qw(t))}function Vw(e,t){L$(e,"value",t.value)}const Yw={ViewContent:function(e,t){Gw(e,t),L$(e,"content_category",t.category)},AddToCart:function(e,t){Gw(e,t)},InitiateCheckout:zw,AddPaymentInfo:zw,Purchase:function(e,t){Bw(e,t.products),L$(e,"value",qw(t)),L$(e,"order_id",t.order_id)}};function Ww(e,t){let i={};return L$(i,"currency",t.currency),(Yw[e]??Vw)(i,t),i}function Zw(e,t=2){let i=e.trim();if(!i.includes("%")||0===t)return i;try{return Zw(decodeURIComponent(i),t-1)}catch{return i}}function Hw(e){let t=Zw(function(e){return e.name||"Unknown"}(e)),i=Dw[t]||t;return Cw.has(i)?i:function(e){let t=e.match(/[A-Za-z0-9]+/g)?.join("")||"CustomEvent";return/^[A-Za-z]/.test(t)?t.slice(0,50):("Event"+t).slice(0,50)}(i)}function Kw(e){return e.tikTokId}function Jw(e=!1){let t=(t,i)=>{let n=Kw(i);n&&Uw(n,e)&&(function(e,t){let i=window;if(typeof window>"u"||!i.ttq)return;let n=i.ttq.instance(e).page;if(!n)return;let r=Rw(t);r?n(r):n()}(n,t.properties.event_id),Nw(e,"[TikTok Pixel] Sent page view"))};return{name:"TikTok Pixel",preload:(t,i)=>{let n=Kw(i);n&&Uw(n,e)&&t.userId&&_w(n,t.userId)},track:(t,i)=>{let n=Kw(i);if(!n||!Uw(n,e))return;let r=Hw(t),o=Ww(r,t.properties);(function(e,t,i,n){let r=window;if(typeof window>"u"||!r.ttq)return;let o=r.ttq.instance(e).track;if(!o)return;let a=Rw(n);a?o(t,i,a):o(t,i)})(n,r,o,t.properties.event_id),Nw(e,`[TikTok Pixel] Sent ${r}:`,o)},page:t,screen:t,identify:(t,i)=>{let n=Kw(i);!n||!t.userId||Uw(n,e)&&(_w(n,t.userId),Nw(e,"[TikTok Pixel] Identity synced"))}}}const Qw={preload:(e,t,i)=>e.preload(t,i),track:(e,t,i)=>e.track(t,i),page:(e,t,i)=>e.page(t,i),screen:(e,t,i)=>e.screen(t,i),identify:(e,t,i)=>e.identify(t,i)},Xw=["fbId","gaId","tikTokId"];function eI(e){return e||void 0}function tI(e,t=!1,i={}){let n=new Map,r=new Map,o=!1===i.sessions?null:function(e,t=!1){let i=async(i,n,r)=>{let o=function(e){let{event_id:t,team_id:i,promoter_id:n,...r}=e;return{eventId:t,teamId:i,promoterId:n,rest:r}}(n.properties);if(!function(e){return!!(e.eventId&&e.teamId&&e.promoterId)}(o))return void function(e,t,i){e&&console.warn(`[Sessions API] Missing required fields, skipping ${t}:`,{eventId:i.eventId,teamId:i.teamId,promoterId:i.promoterId})}(t,i,o);let a=r??n.name;if(!function(e){return!(!e||!Tw.has(e))}(a))return void function(e,t,i){e&&console.warn(`[Sessions API] Invalid or missing eventType "${i}", skipping ${t}`)}(t,i,a);let s=function(e,t,i,n){return{eventId:t.eventId,teamId:t.teamId,promoterId:t.promoterId,eventType:i,messageId:Aw(e),occurredAt:new Date(e.timestamp).toISOString(),properties:Sw(t.rest,e.name,n),context:xw(e)}}(n,o,a,r);(function(e,t,i){e&&console.log(`[Sessions API] Sending ${t}:`,i)})(t,i,s),await e.analytics[i](s)};return{name:"Sessions API",preload:()=>{t&&console.log("[Sessions API] Preload received (no-op)")},track:e=>i("track",e).catch((e=>{t&&console.error("[Sessions API] track error:",e)})),page:e=>i("page",e,"Page Viewed").catch((e=>{t&&console.error("[Sessions API] page error:",e)})),screen:e=>i("screen",e,"Screen Viewed").catch((e=>{t&&console.error("[Sessions API] screen error:",e)})),identify:e=>{t&&console.log("[Sessions API] Identify received (logged only):",{userId:e.userId,traits:e.traits})}}}(e,t),a=[!1===i.facebook?null:aw(t),!1===i.googleAnalytics?null:kw(t),!1===i.tikTok?null:Jw(t)].filter((e=>!!e)),s=async i=>{try{let n=function(e){let t=e??{};return Object.fromEntries(Xw.map((e=>[e,eI(t[e])])))}((await e.promoter.get({key:i})).promoter?.tracking);return function(e,t,i){e&&console.log(`[DestinationManager] Fetched config for promoter ${t}:`,i)}(t,i,n),n}catch(e){return function(e,t,i){e&&console.warn(`[DestinationManager] Failed to fetch promoter ${t} config:`,i)}(t,i,e),{}}},d=async(e,i,n)=>{try{await u(e,i,n)}catch(i){t&&console.error(`[DestinationManager] ${e.name} error:`,i)}},c=e=>{try{e.reset?.()}catch(i){t&&console.error(`[DestinationManager] ${e.name} reset error:`,i)}},l=async e=>{let t=n.get(e);if(t)return t;let i=r.get(e);if(i)return i;i=s(e),r.set(e,i);try{let t=await i;return n.set(e,t),t}finally{r.delete(e)}},u=(e,t,i)=>Qw[t.type]?.(e,t,i);return{sendEvent:async(e,t)=>{if(!o&&0===a.length)return;let i=o?d(o,e,{}):Promise.resolve();if(0===a.length)return void await i;let n=await l(t);if(!function(e){return Xw.some((t=>!!e[t]))}(n))return void await i;let r=Promise.all(a.map((t=>d(t,e,n))));await Promise.all([i,r])},clearCache:()=>{n.clear(),r.clear();for(let e of a)c(e)}}}var iI,nI={},rI=function(){if(iI)return nI;iI=1,Object.defineProperty(nI,"__esModule",{value:!0}),nI.parseCookie=s,nI.parse=s,nI.stringifyCookie=function(i,n){let r=n?.encode||encodeURIComponent,o=[];for(let n of Object.keys(i)){let a=i[n];if(void 0===a)continue;if(!e.test(n))throw TypeError("cookie name is invalid: "+n);let s=r(a);if(!t.test(s))throw TypeError("cookie val is invalid: "+a);o.push(`${n}=${s}`)}return o.join("; ")},nI.stringifySetCookie=d,nI.serialize=d,nI.parseSetCookie=function(e,t){let i=t?.decode||p,n=e.length,o=c(e,0,n),a=l(e,0,o),s=-1===a?{name:"",value:i(u(e,0,o))}:{name:u(e,0,a),value:i(u(e,a+1,o))},d=o+1;for(;d<n;){let t=c(e,d,n),i=l(e,d,t),o=u(e,d,-1===i?t:i),a=-1===i?void 0:u(e,i+1,t);switch(o.toLowerCase()){case"httponly":s.httpOnly=!0;break;case"secure":s.secure=!0;break;case"partitioned":s.partitioned=!0;break;case"domain":s.domain=a;break;case"path":s.path=a;break;case"max-age":a&&r.test(a)&&(s.maxAge=Number(a));break;case"expires":if(!a)break;let e=new Date(a);Number.isFinite(e.valueOf())&&(s.expires=e);break;case"priority":if(!a)break;let t=a.toLowerCase();("low"===t||"medium"===t||"high"===t)&&(s.priority=t);break;case"samesite":if(!a)break;let i=a.toLowerCase();("lax"===i||"strict"===i||"none"===i)&&(s.sameSite=i)}d=t+1}return s},nI.stringifySetCookie=d,nI.serialize=d;let e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,r=/^-?\d+$/,o=Object.prototype.toString,a=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function s(e,t){let i=new a,n=e.length;if(n<2)return i;let r=t?.decode||p,o=0;do{let t=l(e,o,n);if(-1===t)break;let a=c(e,o,n);if(t>a){o=e.lastIndexOf(";",t-1)+1;continue}let s=u(e,o,t);void 0===i[s]&&(i[s]=r(u(e,t+1,a))),o=a+1}while(o<n);return i}function d(r,o,a){let s="object"==typeof r?r:{...a,name:r,value:o+""},d=("object"==typeof o?o:a)?.encode||encodeURIComponent;if(!e.test(s.name))throw TypeError("argument name is invalid: "+s.name);let c=s.value?d(s.value):"";if(!t.test(c))throw TypeError("argument val is invalid: "+s.value);let l=s.name+"="+c;if(void 0!==s.maxAge){if(!Number.isInteger(s.maxAge))throw TypeError("option maxAge is invalid: "+s.maxAge);l+="; Max-Age="+s.maxAge}if(s.domain){if(!i.test(s.domain))throw TypeError("option domain is invalid: "+s.domain);l+="; Domain="+s.domain}if(s.path){if(!n.test(s.path))throw TypeError("option path is invalid: "+s.path);l+="; Path="+s.path}if(s.expires){if(!m(s.expires)||!Number.isFinite(s.expires.valueOf()))throw TypeError("option expires is invalid: "+s.expires);l+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(l+="; HttpOnly"),s.secure&&(l+="; Secure"),s.partitioned&&(l+="; Partitioned"),s.priority)switch("string"==typeof s.priority?s.priority.toLowerCase():void 0){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw TypeError("option priority is invalid: "+s.priority)}if(s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid: "+s.sameSite)}return l}function c(e,t,i){let n=e.indexOf(";",t);return-1===n?i:n}function l(e,t,i){let n=e.indexOf("=",t);return n<i?n:-1}function u(e,t,i){let n=t,r=i;do{let t=e.charCodeAt(n);if(32!==t&&9!==t)break}while(++n<r);for(;r>n;){let t=e.charCodeAt(r-1);if(32!==t&&9!==t)break;r--}return e.slice(n,r)}function p(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch{return e}}function m(e){return"[object Date]"===o.call(e)}return nI}();function oI(e,t={}){let i=function(e){return e&&"j"===e[0]&&":"===e[1]?e.substr(2):e}(e);if(!t.doNotParse)try{return JSON.parse(i)}catch{}return e}var aI=class{constructor(e,t={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;let e=this.cookies;this.cookies=rI.parse(document.cookie),this._checkChanges(e)};let i=typeof document>"u"?"":document.cookie;this.cookies=function(e){return"string"==typeof e?rI.parse(e):"object"==typeof e&&e?e:{}}(e||i),this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=function(){let e=typeof globalThis>"u"?void 0:globalThis.TEST_HAS_DOCUMENT_COOKIE;return"boolean"==typeof e?e:"object"==typeof document&&"string"==typeof document.cookie}()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach((t=>{e[t]!==this.cookies[t]&&this._emitChange({name:t,value:oI(this.cookies[t])})}))}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),oI(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();let t={};for(let i in this.cookies)t[i]=oI(this.cookies[i],e);return t}set(e,t,i){i=i?Object.assign(Object.assign({},this.defaultSetOptions),i):this.defaultSetOptions;let n="string"==typeof t?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:n}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=rI.serialize(e,n,i)),this._emitChange({name:e,value:t,options:i})}remove(e,t){let i=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=rI.serialize(e,"",i)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&1===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(e){let t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&0===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}removeAllChangeListeners(){for(;this.changeListeners.length>0;)this.removeChangeListener(this.changeListeners[0])}};function sI(){return typeof document>"u"?null:new aI}const dI={deleteCookie:function(e){let t=sI();t&&t.remove(e,{path:"/"})},getCookie:function(e){return sI()?.get(e)??null},getItem:function(e){if(typeof localStorage>"u")return null;try{return localStorage.getItem(e)}catch{return null}},removeItem:function(e){if(!(typeof localStorage>"u"))try{localStorage.removeItem(e)}catch{}},setCookie:function(e,t){let i=sI();i&&i.set(e,t,{path:"/",sameSite:"lax",secure:"https:"===window.location.protocol})},setItem:function(e,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(e,t)}catch{}}};function cI(){return function(e){let t=e.getCookie(Yr);if(t)return t;let i=Zr();return e.setCookie(Yr,i),i}(dI)}function lI(){return function(e){let t=e.getItem(Wr);if(t)return t;let i=Hr();return e.setItem(Wr,i),i}(dI)}function uI(){return globalThis.crypto?.randomUUID?.()??`msg_${Date.now().toString(36)}_${Math.random().toString(36).slice(2)}`}function pI(e="tenant-web"){let t=N$(),i=R$({anonymousId:lI(),context:t,sessionId:cI()});return{name:e,referrer:t.page.referrer,utmSource:t.campaign?.source,utmMedium:t.campaign?.medium,utmCampaign:t.campaign?.name,browser:mI(i.browser),deviceType:hI(i.device_type),sessionId:mI(i.browser_session_id),anonymousId:mI(i.anonymous_id)}}function mI(e){return"string"==typeof e&&e.length>0?e:void 0}function hI(e){return"MOBILE"===e||"TABLET"===e||"DESKTOP"===e?e:void 0}const fI={AED:{name:"United Arab Emirates Dirham",symbol:"AED",locale:"ar-AE",decimals:2,airwallex:!0},AUD:{name:"Australian Dollar",symbol:"A$",locale:"en-AU",decimals:2,airwallex:!0},BRL:{name:"Brazilian Real",symbol:"R$",locale:"pt-BR",decimals:2,airwallex:!0},CAD:{name:"Canadian Dollar",symbol:"CA$",locale:"en-CA",decimals:2,airwallex:!0},CHF:{name:"Swiss Franc",symbol:"CHF",locale:"de-CH",decimals:2,airwallex:!0},CNY:{name:"Chinese Yuan",symbol:"CN¥",locale:"zh-CN",decimals:2,airwallex:!0},CZK:{name:"Czech Koruna",symbol:"CZK",locale:"cs-CZ",decimals:2,airwallex:!0},DKK:{name:"Danish Krone",symbol:"DKK",locale:"da-DK",decimals:2,airwallex:!0},EUR:{name:"Euro",symbol:"€",locale:"de-DE",decimals:2,airwallex:!0},GBP:{name:"British Pound Sterling",symbol:"£",locale:"en-GB",decimals:2,airwallex:!0},HKD:{name:"Hong Kong Dollar",symbol:"HK$",locale:"zh-HK",decimals:2,airwallex:!0},HUF:{name:"Hungarian Forint",symbol:"HUF",locale:"hu-HU",decimals:2,airwallex:!0},ILS:{name:"Israeli New Sheqel",symbol:"₪",locale:"he-IL",decimals:2,airwallex:!0},JPY:{name:"Japanese Yen",symbol:"¥",locale:"ja-JP",decimals:0,airwallex:!0},KRW:{name:"South Korean Won",symbol:"₩",locale:"ko-KR",decimals:0,airwallex:!0},MXN:{name:"Mexican Peso",symbol:"MX$",locale:"es-MX",decimals:2,airwallex:!0},NOK:{name:"Norwegian Krone",symbol:"NOK",locale:"nb-NO",decimals:2,airwallex:!0},NZD:{name:"New Zealand Dollar",symbol:"NZ$",locale:"en-NZ",decimals:2,airwallex:!0},PLN:{name:"Polish Zloty",symbol:"PLN",locale:"pl-PL",decimals:2,airwallex:!0},RON:{name:"Romanian Leu",symbol:"RON",locale:"ro-RO",decimals:2,airwallex:!0},SEK:{name:"Swedish Krona",symbol:"SEK",locale:"sv-SE",decimals:2,airwallex:!0},SGD:{name:"Singapore Dollar",symbol:"SGD",locale:"en-SG",decimals:2,airwallex:!0},THB:{name:"Thai Baht",symbol:"THB",locale:"th-TH",decimals:2,airwallex:!0},USD:{name:"US Dollar",symbol:"$",locale:"en-US",decimals:2,airwallex:!0},VND:{name:"Vietnamese Dong",symbol:"₫",locale:"vi-VN",decimals:0,airwallex:!0},ZAR:{name:"South African Rand",symbol:"ZAR",locale:"en-ZA",decimals:2,airwallex:!0},BIF:{name:"Burundi Franc",symbol:"BIF",locale:"fr-BI",decimals:0},CLP:{name:"Chilean Peso",symbol:"CLP",locale:"es-CL",decimals:0},DJF:{name:"Djibouti Franc",symbol:"DJF",locale:"fr-DJ",decimals:0},GNF:{name:"Guinea Franc",symbol:"GNF",locale:"fr-GN",decimals:0},ISK:{name:"Iceland Krona",symbol:"ISK",locale:"is-IS",decimals:0},KMF:{name:"Comoro Franc",symbol:"KMF",locale:"fr-KM",decimals:0},PYG:{name:"Paraguayan Guarani",symbol:"PYG",locale:"es-PY",decimals:0},RWF:{name:"Rwanda Franc",symbol:"RWF",locale:"rw-RW",decimals:0},SLE:{name:"Sierra Leonean Leone",symbol:"Le",locale:"en-SL",decimals:0},UGX:{name:"Uganda Shilling",symbol:"UGX",locale:"en-UG",decimals:0},VUV:{name:"Vanuatu Vatu",symbol:"VUV",locale:"en-VU",decimals:0},XAF:{name:"CFA Franc BEAC",symbol:"FCFA",locale:"fr-CM",decimals:0},XOF:{name:"CFA Franc BCEAO",symbol:"CFA",locale:"fr-SN",decimals:0},XPF:{name:"CFP Franc",symbol:"CFPF",locale:"fr-PF",decimals:0},BHD:{name:"Bahraini Dinar",symbol:"BHD",locale:"ar-BH",decimals:3},JOD:{name:"Jordanian Dinar",symbol:"JOD",locale:"ar-JO",decimals:3},KWD:{name:"Kuwaiti Dinar",symbol:"KWD",locale:"ar-KW",decimals:3},LYD:{name:"Libyan Dinar",symbol:"LYD",locale:"ar-LY",decimals:3},OMR:{name:"Rial Omani",symbol:"OMR",locale:"ar-OM",decimals:3},TND:{name:"Tunisian Dinar",symbol:"TND",locale:"ar-TN",decimals:3},ALL:{name:"Albanian Lek",symbol:"ALL",locale:"sq-AL",decimals:2},AMD:{name:"Armenian Dram",symbol:"֏",locale:"hy-AM",decimals:2},ANG:{name:"Netherlands Antillean Guilder",symbol:"ANG",locale:"nl-CW",decimals:2},AOA:{name:"Angolan Kwanza",symbol:"Kz",locale:"pt-AO",decimals:2},ARS:{name:"Argentine Peso",symbol:"ARS",locale:"es-AR",decimals:2},AWG:{name:"Aruban Florin",symbol:"AWG",locale:"nl-AW",decimals:2},AZN:{name:"Azerbaijani Manat",symbol:"₼",locale:"az-AZ",decimals:2},BAM:{name:"Convertible Mark",symbol:"KM",locale:"bs-BA",decimals:2},BBD:{name:"Barbadian Dollar",symbol:"BBD",locale:"en-BB",decimals:2},BDT:{name:"Bangladeshi Taka",symbol:"BDT",locale:"bn-BD",decimals:2},BGN:{name:"Bulgarian Lev",symbol:"лв",locale:"bg-BG",decimals:2},BMD:{name:"Bermudian Dollar",symbol:"BMD",locale:"en-BM",decimals:2},BND:{name:"Brunei Dollar",symbol:"BND",locale:"en-BN",decimals:2},BOB:{name:"Bolivian Boliviano",symbol:"BOB",locale:"es-BO",decimals:2},BSD:{name:"Bahamian Dollar",symbol:"BSD",locale:"en-BS",decimals:2},BTN:{name:"Bhutanese Ngultrum",symbol:"Nu.",locale:"dz-BT",decimals:2},BWP:{name:"Botswanan Pula",symbol:"BWP",locale:"en-BW",decimals:2},BZD:{name:"Belize Dollar",symbol:"BZD",locale:"en-BZ",decimals:2},COP:{name:"Colombian Peso",symbol:"COP",locale:"es-CO",decimals:2},CRC:{name:"Costa Rican Colon",symbol:"CRC",locale:"es-CR",decimals:2},CVE:{name:"Cabo Verde Escudo",symbol:"CVE",locale:"pt-CV",decimals:2},DOP:{name:"Dominican Peso",symbol:"DOP",locale:"es-DO",decimals:2},DZD:{name:"Algerian Dinar",symbol:"DZD",locale:"ar-DZ",decimals:2},EGP:{name:"Egyptian Pound",symbol:"EGP",locale:"ar-EG",decimals:2},ERN:{name:"Eritrean Nakfa",symbol:"Nfk",locale:"ti-ER",decimals:2},ETB:{name:"Ethiopian Birr",symbol:"ETB",locale:"am-ET",decimals:2},FJD:{name:"Fijian Dollar",symbol:"FJD",locale:"en-FJ",decimals:2},FKP:{name:"Falkland Islands Pound",symbol:"FKP",locale:"en-FK",decimals:2},GEL:{name:"Georgian Lari",symbol:"₾",locale:"ka-GE",decimals:2},GHS:{name:"Ghana Cedi",symbol:"GH₵",locale:"en-GH",decimals:2},GIP:{name:"Gibraltar Pound",symbol:"GIP",locale:"en-GI",decimals:2},GMD:{name:"Gambian Dalasi",symbol:"GMD",locale:"en-GM",decimals:2},GTQ:{name:"Guatemalan Quetzal",symbol:"GTQ",locale:"es-GT",decimals:2},GYD:{name:"Guyanaese Dollar",symbol:"GYD",locale:"en-GY",decimals:2},HNL:{name:"Honduran Lempira",symbol:"HNL",locale:"es-HN",decimals:2},IDR:{name:"Indonesian Rupiah",symbol:"IDR",locale:"id-ID",decimals:2},INR:{name:"Indian Rupee",symbol:"₹",locale:"en-IN",decimals:2},JMD:{name:"Jamaican Dollar",symbol:"JMD",locale:"en-JM",decimals:2},KES:{name:"Kenyan Shilling",symbol:"KES",locale:"en-KE",decimals:2},KGS:{name:"Kyrgyzstani Som",symbol:"сом",locale:"ky-KG",decimals:2},KHR:{name:"Cambodian Riel",symbol:"KHR",locale:"km-KH",decimals:2},KYD:{name:"Cayman Islands Dollar",symbol:"KYD",locale:"en-KY",decimals:2},KZT:{name:"Kazakhstani Tenge",symbol:"KZT",locale:"kk-KZ",decimals:2},LAK:{name:"Laotian Kip",symbol:"LAK",locale:"lo-LA",decimals:2},LBP:{name:"Lebanese Pound",symbol:"LBP",locale:"ar-LB",decimals:2},LKR:{name:"Sri Lankan Rupee",symbol:"LKR",locale:"en-LK",decimals:2},LRD:{name:"Liberian Dollar",symbol:"LRD",locale:"en-LR",decimals:2},LSL:{name:"Lesotho Loti",symbol:"LSL",locale:"en-LS",decimals:2},MAD:{name:"Moroccan Dirham",symbol:"MAD",locale:"ar-MA",decimals:2},MDL:{name:"Moldovan Leu",symbol:"MDL",locale:"ro-MD",decimals:2},MGA:{name:"Malagasy Ariary",symbol:"Ar",locale:"fr-MG",decimals:2},MKD:{name:"Macedonian Denar",symbol:"ден",locale:"mk-MK",decimals:2},MNT:{name:"Mongolian Tugrik",symbol:"MNT",locale:"mn-MN",decimals:2},MOP:{name:"Macanese Pataca",symbol:"MOP",locale:"zh-MO",decimals:2},MUR:{name:"Mauritian Rupee",symbol:"MUR",locale:"en-MU",decimals:2},MVR:{name:"Maldivian Rufiyaa",symbol:"MVR",locale:"dv-MV",decimals:2},MWK:{name:"Malawian Kwacha",symbol:"MWK",locale:"en-MW",decimals:2},MYR:{name:"Malaysian Ringgit",symbol:"MYR",locale:"ms-MY",decimals:2},NAD:{name:"Namibian Dollar",symbol:"NAD",locale:"en-NA",decimals:2},NGN:{name:"Nigerian Naira",symbol:"NGN",locale:"en-NG",decimals:2},NIO:{name:"Nicaraguan Cordoba",symbol:"NIO",locale:"es-NI",decimals:2},NPR:{name:"Nepalese Rupee",symbol:"NPR",locale:"ne-NP",decimals:2},PAB:{name:"Panamanian Balboa",symbol:"PAB",locale:"es-PA",decimals:2},PEN:{name:"Peruvian Nuevo Sol",symbol:"PEN",locale:"es-PE",decimals:2},PGK:{name:"Papua New Guinean Kina",symbol:"PGK",locale:"en-PG",decimals:2},PHP:{name:"Philippine Peso",symbol:"PHP",locale:"en-PH",decimals:2},PKR:{name:"Pakistani Rupee",symbol:"PKR",locale:"en-PK",decimals:2},QAR:{name:"Qatari Rial",symbol:"QAR",locale:"ar-QA",decimals:2},RSD:{name:"Serbian Dinar",symbol:"din.",locale:"sr-RS",decimals:2},SAR:{name:"Saudi Riyal",symbol:"SAR",locale:"ar-SA",decimals:2},SBD:{name:"Solomon Islands Dollar",symbol:"SBD",locale:"en-SB",decimals:2},SCR:{name:"Seychellois Rupee",symbol:"SCR",locale:"en-SC",decimals:2},SHP:{name:"Saint Helena Pound",symbol:"SHP",locale:"en-SH",decimals:2},SRD:{name:"Surinamese Dollar",symbol:"SRD",locale:"nl-SR",decimals:2},STD:{name:"Sao Tome and Principe Dobra",symbol:"STD",locale:"pt-ST",decimals:2},SVC:{name:"Salvadoran Colon",symbol:"SVC",locale:"es-SV",decimals:2},SZL:{name:"Swazi Lilangeni",symbol:"SZL",locale:"en-SZ",decimals:2},TJS:{name:"Tajikistani Somoni",symbol:"SM",locale:"tg-TJ",decimals:2},TMT:{name:"Turkmenistani Manat",symbol:"TMT",locale:"tk-TM",decimals:2},TOP:{name:"Tongan Pa'anga",symbol:"TOP",locale:"to-TO",decimals:2},TRY:{name:"Turkish Lira",symbol:"₺",locale:"tr-TR",decimals:2},TTD:{name:"Trinidad and Tobago Dollar",symbol:"TTD",locale:"en-TT",decimals:2},TWD:{name:"New Taiwan Dollar",symbol:"NT$",locale:"zh-TW",decimals:2},TZS:{name:"Tanzanian Shilling",symbol:"TZS",locale:"sw-TZ",decimals:2},UAH:{name:"Ukrainian Hryvnia",symbol:"UAH",locale:"uk-UA",decimals:2},UYU:{name:"Uruguayan Peso",symbol:"UYU",locale:"es-UY",decimals:2},UZS:{name:"Uzbekistani Som",symbol:"UZS",locale:"uz-UZ",decimals:2},WST:{name:"Samoan Tala",symbol:"WST",locale:"sm-WS",decimals:2},XCD:{name:"East Caribbean Dollar",symbol:"EC$",locale:"en-AG",decimals:2},ZMW:{name:"Zambian Kwacha",symbol:"ZK",locale:"en-ZM",decimals:2},ZWL:{name:"Zimbabwean Dollar",symbol:"ZWL",locale:"en-ZW",decimals:2}};Object.entries(fI).filter((([,e])=>e.airwallex)).map((([e])=>e));var yI,vI,gI={},bI={},$I={},wI={};function II(){return vI||(vI=1,wI.tzName=function(e,t,i="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:i}).format(t).split(/\s/g).slice(2).join(" ")}),wI}var EI,kI,TI,AI={},xI={};function SI(){if(EI)return xI;EI=1,xI.tzOffset=function(r,o){try{const i=(e[r]||=new Intl.DateTimeFormat("en-US",{timeZone:r,timeZoneName:"longOffset"}).format)(o).split("GMT")[1];return i in t?t[i]:n(i,i.split(":"))}catch{if(r in t)return t[r];const e=r?.match(i);return e?n(r,e.slice(1)):NaN}};const e={},t={},i=/([+-]\d\d):?(\d\d)?/;function n(e,i){const n=+(i[0]||0),r=+(i[1]||0),o=+(i[2]||0)/60;return t[e]=60*n+r>0?60*n+r+o:60*n-r-o}return xI}function DI(){if(kI)return AI;kI=1,AI.TZDateMini=void 0;var e=SI();class t extends Date{constructor(...t){super(),t.length>1&&"string"==typeof t[t.length-1]&&(this.timeZone=t.pop()),this.internal=new Date,isNaN((0,e.tzOffset)(this.timeZone,this))?this.setTime(NaN):t.length?"number"==typeof t[0]&&(1===t.length||2===t.length&&"number"!=typeof t[1])?this.setTime(t[0]):"string"==typeof t[0]?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),r(this,t)):this.setTime(Date.now())}static tz(e,...i){return i.length?new t(...i,e):new t(Date.now(),e)}withTimeZone(e){return new t(+this,e)}getTimezoneOffset(){const t=-(0,e.tzOffset)(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(e){return Date.prototype.setTime.apply(this,arguments),n(this),+this}[Symbol.for("constructDateFrom")](e){return new t(+new Date(e),this.timeZone)}}AI.TZDateMini=t;const i=/^(get|set)(?!UTC)/;function n(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(60*-(0,e.tzOffset)(t.timeZone,t)))}function r(t,i){const r=Array.isArray(i)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(i):+t.internal,a=(0,e.tzOffset)(t.timeZone,t),s=a>0?Math.floor(a):Math.ceil(a),d=new Date(+t);d.setUTCHours(d.getUTCHours()-1);const c=-new Date(+t).getTimezoneOffset(),l=-new Date(+d).getTimezoneOffset();let u=c;if(c-l&&c!==s&&Date.prototype.getHours.apply(t)!==(Array.isArray(i)?i[3]||0:t.internal.getUTCHours())){const i=new Date(+t),n=c-s;n&&i.setUTCMinutes(i.getUTCMinutes()+n);const r=(0,e.tzOffset)(t.timeZone,i);(r>0?Math.floor(r):Math.ceil(r))===s&&(u=l)}const p=u-s;p&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+p);const m=new Date(+t);m.setUTCSeconds(0);const h=c>0?m.getSeconds():(m.getSeconds()-60)%60,f=Math.round(-60*(0,e.tzOffset)(t.timeZone,t))%60;(f||h)&&Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+f+h);const y=(0,e.tzOffset)(t.timeZone,t),v=y>0?Math.floor(y):Math.ceil(y),g=v!==s,b=-new Date(+t).getTimezoneOffset()-v-p,$=v-s,w=r-60*v*1e3,I=$>0&&o(t)-r==60*$*1e3&&o(t,w)!==r;if(g&&b&&!I){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+b);const i=(0,e.tzOffset)(t.timeZone,t),n=v-(i>0?Math.floor(i):Math.ceil(i));n&&b<0&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+n)}n(t);const E=(i?r:r+1e3*f)-+t.internal;E&&Math.abs(E)<18e5&&(Date.prototype.setTime.call(t,+t+E),n(t))}function o(t,i){const n=new Date(i??+t);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(60*-(0,e.tzOffset)(t.timeZone,n))),+n}return Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!i.test(e))return;const o=e.replace(i,"$1UTC");t.prototype[o]&&(e.startsWith("get")?t.prototype[e]=function(){return this.internal[o]()}:(t.prototype[e]=function(){return Date.prototype[o].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),r(e)}(this),+this},t.prototype[o]=function(){return Date.prototype[o].apply(this,arguments),n(this),+this}))})),AI}function CI(){if(TI)return $I;TI=1,$I.TZDate=void 0;var e=II(),t=DI();class i extends t.TZDateMini{static tz(e,...t){return t.length?new i(...t,e):new i(Date.now(),e)}toISOString(){const[e,t,i]=this.tzComponents(),n=`${e}${t}:${i}`;return this.internal.toISOString().slice(0,-1)+n}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,i,n]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${i} ${t} ${n}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[i,n,r]=this.tzComponents();return`${t} GMT${i}${n}${r} (${(0,e.tzName)(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",(Math.floor(Math.abs(e)/60)+"").padStart(2,"0"),(Math.abs(e)%60+"").padStart(2,"0")]}withTimeZone(e){return new i(+this,e)}[Symbol.for("constructDateFrom")](e){return new i(+new Date(e),this.timeZone)}}return $I.TZDate=i,$I}var PI,OI,_I,RI={},NI={},UI=(_I||(_I=1,function(e){var t=(yI||(yI=1,bI.constructFromSymbol=void 0,bI.constructFromSymbol=Symbol.for("constructDateFrom")),bI);Object.keys(t).forEach((function(i){"default"!==i&&"__esModule"!==i&&(i in e&&e[i]===t[i]||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}}))}));var i=CI();Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));var n=DI();Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}}))}));var r=function(){if(PI)return RI;PI=1,RI.tz=void 0;var e=CI();return RI.tz=t=>i=>e.TZDate.tz(t,+new Date(i)),RI}();Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}}))}));var o=SI();Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var a=function(){if(OI)return NI;OI=1,NI.tzScan=function(t,i){const n=[],r=new Date(i.start);r.setUTCSeconds(0,0);const o=new Date(i.end);o.setUTCSeconds(0,0);const a=+o;let s=(0,e.tzOffset)(t,r);for(;+r<a;){r.setUTCMonth(r.getUTCMonth()+1);const i=(0,e.tzOffset)(t,r);if(i!=s){const i=new Date(r);i.setUTCMonth(i.getUTCMonth()-1);const o=+r;for(s=(0,e.tzOffset)(t,i);+i<o;){i.setUTCDate(i.getUTCDate()+1);const r=(0,e.tzOffset)(t,i);if(r!=s){const r=new Date(i);r.setUTCDate(r.getUTCDate()-1);const o=+i;for(s=(0,e.tzOffset)(t,r);+r<o;){r.setUTCHours(r.getUTCHours()+1);const i=(0,e.tzOffset)(t,r);i!==s&&n.push({date:new Date(r),change:i-s,offset:i}),s=i}}s=r}}s=i}return n};var e=SI();return NI}();Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))}));var s=II();Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===s[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}}))}))}(gI)),gI);function MI(e,t){const[i,n,r,o,a,s]=function(e){const[t,i]=e.split("T");if(!t||!i)throw Error("Invalid naive datetime format: "+e);const n=[...t.split("-"),...i.split(":")].map(Number);if(n.length<6)throw Error("Invalid naive datetime format: "+e);return n.slice(0,6)}(e);return new UI.TZDate(i,n-1,r,o,a,s,t)}function LI(e,t){return MI(e,t)<new UI.TZDate(new Date,t)}function jI(e,t){return MI(e,t)>new UI.TZDate(new Date,t)}function qI(e){return null==e||-1===e?1/0:Math.max(0,e)}function GI(e){return Math.min(qI(e.admission.available),qI(e.admission.limit),qI(e.section?.available),qI(e.section?.limit))}function FI(e){return GI(e)<=0}function BI(e,t,i,n=new Date){return function(e,t,i,n=new Date){return"AFTER_ADMISSION"===e.visibility&&!function(e,t,i=new Date){return!!e&&(!!(e.saleEndsAt&&MI(e.saleEndsAt,t)<i)||null!=e.capacity&&-1!==e.capacity&&(e.sold??0)>=e.capacity)}(function(e,t){if("AFTER_ADMISSION"===e.visibility&&e.visibleAfterAdmissionId)return t.find((t=>t.id===e.visibleAfterAdmissionId))}(e,t),i,n)}(e,t,i,n)?{text:"Available soon"}:null}function zI(e){return e?.trim().toUpperCase()??""}function VI(e){return`${e.admissionId}::${e.sectionId??"none"}`}const YI=["__puppeteer_evaluation_script__","__puppeteer"],WI=["__playwright","__playwright__binding__","__pw_manual","__pwInitScripts"],ZI=["_selenium","callSelenium","_Selenium_IDE_Recorder","__selenium_evaluate","__webdriver_evaluate","__webdriver_script_function","__fxdriver_evaluate","domAutomation","domAutomationController"],HI=["callPhantom","_phantom","__phantomas","__casper","slimer","__nightmare"],KI=["$cdc_","$wdc_","$chrome_asyncScriptInfo"];function JI(e,t){return t.some((t=>t in e))}const QI="en-US";function XI(e,t){return`${e}::${t||"none"}`}function eE(e){return e?"total"in e&&"number"==typeof e.total?e.total:(e.base??0)+(e.booking??0):0}function tE(e){return e.location?.timeZone??"UTC"}function iE(e){return new Map(e.sections.map((e=>[e.id,e])))}function nE(e,t){return!e.sectionId||t.has(e.sectionId)}function rE(e){const t=iE(e),i=tE(e);return e.admissions.some((n=>function(e,t,i,n){return!!nE(e,n)&&!BI(e,t,i)&&!!function(e,t){return!jI(e.saleStartsAt,t)&&!LI(e.saleEndsAt,t)}(e,i)&&function(e,t){return GI({admission:e,section:t})>0}(e,function(e,t){if(e.sectionId)return t.get(e.sectionId)}(e,n))}(n,e.admissions,i,t)))}function oE(e,t,i){if(!jI(e.saleStartsAt,t))return null;const n=MI(e.saleStartsAt,"UTC");return{text:`On sale ${aE(i,{day:"numeric",month:"short",timeZone:"UTC",weekday:"short"}).format(n)} · ${aE(i,{hour:"numeric",minute:"2-digit",timeZone:"UTC"}).format(n)}`,tone:"muted"}}function aE(e,t){try{return new Intl.DateTimeFormat(e,t)}catch{return new Intl.DateTimeFormat(QI,t)}}function sE(e){const t=function(e){return LI(e.entryEndsAt,tE(e))}(e),i=e.url||void 0,n=function(e){return!rE(e)&&"DOOR"===function(e){const t=iE(e),i=e.admissions.filter((e=>nE(e,t)));if(0!==i.length)return rE(e)?"ONLINE":function(e,t){const i=e.filter((e=>LI(e.saleEndsAt,t)));if(0!==i.length)return i.some((e=>"DOOR"===e.saleEndsBehavior))?"DOOR":i.every((e=>"SOLD_OUT"===e.saleEndsBehavior))?"SOLD_OUT":"SALE_ENDED"}(i,tE(e))}(e)}(e),r=!t&&!!i,o=!t&&!r&&function(e){const t=iE(e);return e.admissions.some((e=>nE(e,t)))}(e);return{externalTicketUrl:i,isDoorOnly:n,isEnded:t,isUnavailableForSale:!n&&!rE(e)&&o,showExternalTicketing:r,showTicketing:o,ticketHeading:n?"Tickets at the Door":"Get Tickets"}}function dE(e){const t=XI(e.admission.id,e.section.id);return yE({admission:e.admission,initialPrice:e.initialAdmissionPrices?.[t],previewItem:e.previewItems.get(t),quoteItem:e.quoteItems.get(t)}).base}function cE(e){return null==e||-1===e?1/0:Math.max(0,e)}function lE(e,t,i){const n=t.filter((t=>t.sectionId===e.id)).sort(((e,t)=>e.order-t.order));if("STACKED"!==e.visibility||n.length<=1)return n;const r=i.mode??"default",o=n.filter((t=>function(e){return"door"===e.mode||!e.event||!fE({admission:e.admission,event:e.event,section:e.section}).disabled}({admission:t,event:i.event,mode:r,section:e}))),a=o.length>0?o:n,[s,d]=[...a].sort(function(e,t){const i=vE(e.previewQuote??null),n=vE(e.quote??null);return(r,o)=>{const a=dE({admission:r,initialAdmissionPrices:e.initialAdmissionPrices,previewItems:i,quoteItems:n,section:t})-dE({admission:o,initialAdmissionPrices:e.initialAdmissionPrices,previewItems:i,quoteItems:n,section:t});if(0!==a)return a;const s=r.order-o.order;return 0!==s?s:r.id.localeCompare(o.id)}}(i,e));return s?d&&function(e){const t=cE(e.available);if(!Number.isFinite(t))return!1;const i=cE(e.limit);return Number.isFinite(i)?i>t:t<10}(s)?[s,d]:[s]:[]}function uE(e,t,i){return e.map((e=>({type:"section",section:e,admissions:lE(e,t,i)}))).filter((e=>e.admissions.length>0))}function pE(e){return"section"===e.type?e.section.order:e.admission.order}function mE(e,t){return function(e,t){return-1===(e.available??0)&&-1===e.capacity&&(!t||-1===(t.available??0))}(e,t)?10:Math.min(GI({admission:e,section:t}),10)}function hE(e,t,i){return[!t,!i,(e.available??0)>0,(e.available??0)<20].every(Boolean)}function fE(e){const t=tE(e.event),i=BI(e.admission,e.event.admissions,t),n=jI(e.admission.saleStartsAt,t),r=LI(e.admission.saleEndsAt,t),o=!!e.sectionSoldOut||r&&"SOLD_OUT"===e.admission.saleEndsBehavior||FI({admission:e.admission,section:e.section}),a=o||n||r,s=function(e){return"DOOR"===e.value&&(e.soldOut||e.saleEnded)?{text:"Available At Door",tone:"success"}:e.soldOut?{text:"Sold Out",tone:"destructive"}:e.saleEnded?{text:"Sale Ended",tone:"destructive"}:null}({saleEnded:r,soldOut:o,value:e.admission.saleEndsBehavior});return{disabled:a||!!i,label:i?{...i,tone:"muted"}:oE(e.admission,t,e.locale??QI),maxQuantity:mE(e.admission,e.section),postSale:r,showScarcity:hE(e.admission,o,a),soldOut:o,statusLabel:s?.text??null,statusTone:s?.tone??null}}function yE(e){const t=e.quoteItem??e.previewItem;if(t){const e=function(e){return Math.max(e?.quantity??1,1)}(t),i=Math.round(Math.max((t.price.base+t.price.discount)/e,0)),n=Math.round(t.price.booking/e);return!t.price.discount||t.price.discount>=0?{base:i,discounted:!1,fees:n}:{base:i,discounted:!0,fees:n,gross:Math.round(t.price.base/e)}}if(e.initialPrice&&e.initialPrice.discount<0){const t=e.admission.price.booking??0;return{base:Math.max(e.initialPrice.total-t,0),discounted:!0,fees:t,gross:Math.max(e.initialPrice.gross-t,0)}}return{base:e.admission.price.base??0,discounted:!1,fees:e.admission.price.booking??0}}function vE(e){return function(e){return new Map((e?.items??[]).filter((e=>"ADMISSION"===e.kind&&e.admissionId)).map((e=>[VI({admissionId:e.admissionId??"",sectionId:e.sectionId}),e])))}(e)}function gE(e){const t=new Set(e.sections.map((e=>e.id))),i=tE(e);return e.admissions.filter((n=>!(BI(n,e.admissions,i)||n.sectionId&&!t.has(n.sectionId)||jI(n.saleStartsAt,i)||LI(n.saleEndsAt,i)))).map((e=>({admissionId:e.id??"",quantity:1,sectionId:e.sectionId??void 0})))}const bE=e=>e.price?.total??0;function $E(e,t){return function(e,t){const i=function(e){return fI[e]?.decimals??2}(t),n=10**i;return Number(e)/n}(e,t??"")}function wE(e,t){return $E(eE(e),e?.currency??t)}function IE(e,t){return $E(bE(e),e.price?.currency??t)}function EE(e,t){return e instanceof Error?e.message:t}function kE(e){const t=function(e){if(e&&"object"==typeof e)return e.code}(e);return"string"==typeof t?t:void 0}async function TE(e,t){let i;const n=new Promise(((t,n)=>{i=setTimeout((()=>{e.abort(),n(Error("The request timed out"))}),15e3)}));try{return await Promise.race([t(e.signal),n])}finally{i&&clearTimeout(i)}}function AE(e){try{return JSON.parse(e)}catch{return null}}function xE(e){return e.teamId?e.promoterId?null:"missing_promoter_id":"missing_team_id"}function SE(e){return[e.location?.venue?.name,e.location?.name].find(Boolean)}function DE(e){return e||void 0}function CE(e){if(!e)return"external site";try{return new URL(e).hostname.replace(/^www\./,"")}catch{return"external site"}}function PE(e){return!!e?.items?.length}function OE(e){return{product_id:e.admissionId,sku:e.admissionId,quantity:e.quantity,admission_id:e.admissionId,section_id:e.sectionId}}function _E({event:e,admission:t,section:i}){return{name:t?.name,category:e?.name,variant:i?.name}}function RE(e){return{price:wE(e.price),price_base:e.price?.base,price_booking_fee:e.price?.booking}}const NE=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M8 2v4"}),r("path",{d:"M16 2v4"}),r("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),r("path",{d:"M3 10h18"})),UE=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),r("circle",{cx:"12",cy:"10",r:"3"})),ME=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.checkoutInit=n(this,"checkoutInit"),this.cartUpdate=n(this,"cartUpdate"),this.errorOccurred=n(this,"errorOccurred"),this.analyticsEventSkipped=n(this,"analyticsEventSkipped")}get host(){return this}tenantId;eventId;apiUrl="https://api.session.services";locale="en-US";returnUrl;couponCode;initialAdmissionPrices;initialPreviewQuote;passcode;stickyCheckout=!1;theme="system";enableAnalytics=!0;debugAnalytics=!1;event=null;selectedItems=new Map;quote=null;previewQuote=null;initialLoading=!0;eventLoading=!1;retryLoading=!1;passcodeLoading=!1;error=null;errorKind=null;refreshError=null;quoteLoading=!1;previewLoading=!1;quoteError=null;couponError=null;couponInput="";appliedCouponCode="";passcodeInput="";activePasscode="";passcodeDenied=!1;selectionPrompt=!1;checkoutLoading=!1;checkoutError=null;currentTheme="light";openModalAdmissionId=null;verificationRequired=!1;checkoutInit;cartUpdate;errorOccurred;analyticsEventSkipped;client;analytics;mediaQueryList;requestId=0;previewRequestId=0;eventRequestId=0;checkoutRequestId=0;couponRequestId=0;initializeId=0;initialSettled=!1;active=!0;trackedIdentity;quoteRevision;checkoutIdempotencyKeys=new Map;eventController;quoteController;previewController;checkoutController;couponController;quoteTimer;promptTimer;botBypassed=!1;modalTrigger;modalFocusPending=!1;modalRestorePending=!1;connectedCallback(){this.active=!0,"undefined"!=typeof window&&window.addEventListener("popstate",this.handleDiscountQueryChange)}componentWillLoad(){this.startInitialization()}componentDidRender(){if(this.modalFocusPending){const e=this.host.shadowRoot?.querySelector(".modal-content");if(!e)return;return this.modalFocusPending=!1,void e.querySelector("button")?.focus()}this.modalRestorePending&&(this.modalRestorePending=!1,this.modalTrigger?.focus(),this.modalTrigger=void 0)}propsChanged(){this.startInitialization()}couponCodeChanged(){this.setInitialCoupon().catch((e=>{this.setCouponError(EE(e,"Failed to update coupon"))}))}themeChanged(){this.setupTheme()}disconnectedCallback(){this.active=!1,this.initializeId++,this.invalidateRequests(),"undefined"!=typeof window&&window.removeEventListener&&window.removeEventListener("popstate",this.handleDiscountQueryChange),this.mediaQueryList&&this.mediaQueryList.removeEventListener("change",this.handleSystemThemeChange),document.removeEventListener("keydown",this.handleModalKeyDown),this.clearQuoteTimer(),this.clearPromptTimer()}handleDiscountQueryChange=()=>{zI(this.couponCode)||this.setInitialCoupon().catch((()=>{}))};continueAfterVerification=async()=>{this.botBypassed=!0,this.verificationRequired=!1;const e=this.initializeComponent(),t=this.initializeId;try{await e}catch(e){t===this.initializeId&&this.handleInitializationError(e)}};startInitialization(){const e=this.initializeComponent(),t=this.initializeId;e.catch((e=>{t===this.initializeId&&this.handleInitializationError(e)}))}handleInitializationError=e=>{const t=EE(e,"Failed to load event data");this.error=t,this.errorKind="transient",this.finishInitialLoad(!this.initialSettled),this.errorOccurred.emit({error:t})};async initializeComponent(){const e=++this.initializeId,t=!this.initialSettled;if(this.invalidateRequests(),this.error=null,this.errorKind=null,this.refreshError=null,this.event=null,this.selectedItems=new Map,this.quote=null,this.previewQuote=null,this.quoteError=null,this.checkoutError=null,this.quoteLoading=!1,this.previewLoading=!1,this.checkoutLoading=!1,this.couponError=null,this.couponInput=this.initialCouponCode(),this.appliedCouponCode=this.couponInput,this.activePasscode=this.passcode||"",this.passcodeInput=this.activePasscode,this.passcodeDenied=!1,this.verificationRequired=!1,this.initialLoading=t,this.eventLoading=!t,this.retryLoading=!1,this.passcodeLoading=!1,!this.tenantId||!this.eventId)return this.error="Missing required configuration: tenantId and eventId",this.errorKind="configuration",void this.finishInitialLoad(t);if(this.setupTheme(),!this.botBypassed&&function(e){try{return"https://api.session.services"===new URL(e).origin}catch{return!1}}(this.apiUrl)&&function(){try{const e=function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator)return{globals:window,root:document.documentElement,userAgent:navigator.userAgent,webdriver:navigator.webdriver}}();return e?function(e){const t=Object.keys(e.globals),i=[!0===e.webdriver?"webdriver":void 0,/HeadlessChrome|Playwright|PhantomJS/i.test(e.userAgent)?"automation-user-agent":void 0,JI(e.globals,YI)?"puppeteer":void 0,JI(e.globals,WI)?"playwright":void 0,JI(e.globals,ZI)||e.root.hasAttribute("webdriver")||e.root.hasAttribute("selenium")?"selenium":void 0,t.some((e=>KI.some((t=>e.startsWith(t)))))?"chromedriver":void 0,JI(e.globals,HI)?"phantomjs":void 0].filter((e=>void 0!==e));return{bot:i.length>0,signals:i}}(e):{bot:!1,signals:[]}}catch{return{bot:!1,signals:[]}}}().bot)return this.verificationRequired=!0,void this.finishInitialLoad(t);this.client=function(e){return zo(new Rg(T$,{url:x$(e.environment),headers:{"x-tenant-id":e.tenantId??"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",...e.headers??{}}}))}({environment:this.apiUrl,tenantId:this.tenantId}),this.analytics=void 0;const i=await this.loadEventData({mode:t?"initial":"refresh"});e===this.initializeId&&"success"===i.status&&(this.handleLoadedEvent(i.event),await this.updatePreviewQuote())}handleLoadedEvent(e){const t=`${this.apiUrl}::${this.tenantId}::${this.eventId}`;this.setupAnalytics(e),t!==this.trackedIdentity&&(this.trackedIdentity=t,this.trackLoadedEvent(e))}finishInitialLoad(e){e&&(this.initialSettled=!0,this.initialLoading=!1),this.eventLoading=!1}invalidateRequests(){this.eventRequestId++,this.requestId++,this.previewRequestId++,this.checkoutRequestId++,this.couponRequestId++,this.eventController?.abort(),this.quoteController?.abort(),this.previewController?.abort(),this.checkoutController?.abort(),this.couponController?.abort(),this.eventController=void 0,this.quoteController=void 0,this.previewController=void 0,this.checkoutController=void 0,this.couponController=void 0,this.clearQuoteTimer(),this.quoteRevision=void 0,this.quoteLoading=!1,this.previewLoading=!1,this.checkoutLoading=!1}async setInitialCoupon(){const e=this.initialCouponCode();if(this.couponInput=e,this.quoteError=null,this.couponError=null,!this.event)return this.appliedCouponCode=e,void(this.previewQuote=this.activeInitialPreviewQuote(e));this.selectedItems.size>0?await this.applyCartCoupon(e):await this.applyPreviewCoupon(e)}initialCouponCode(){return zI(this.couponCode)||("undefined"!=typeof window&&window.location?zI(function(e){return new URLSearchParams(e).get("discount")??""}(window.location.search)):"")}parsedInitialPreviewQuote(){return this.initialPreviewQuote?"string"!=typeof this.initialPreviewQuote?this.initialPreviewQuote:AE(this.initialPreviewQuote):null}parsedInitialAdmissionPrices(){if(this.initialAdmissionPrices)return"string"!=typeof this.initialAdmissionPrices?this.initialAdmissionPrices:AE(this.initialAdmissionPrices)??void 0}activeInitialPreviewQuote(e=this.appliedCouponCode){return e?e!==this.initialCouponCode()?null:this.parsedInitialPreviewQuote():null}activeInitialAdmissionPrices(){if(this.appliedCouponCode&&this.appliedCouponCode===this.initialCouponCode())return this.parsedInitialAdmissionPrices()}setupTheme(){this.mediaQueryList&&this.mediaQueryList.removeEventListener("change",this.handleSystemThemeChange),"system"===this.theme?(this.mediaQueryList=window.matchMedia("(prefers-color-scheme: dark)"),this.currentTheme=this.mediaQueryList.matches?"dark":"light",this.mediaQueryList.addEventListener("change",this.handleSystemThemeChange)):this.currentTheme=this.theme}handleSystemThemeChange=e=>{"system"===this.theme&&(this.currentTheme=e.matches?"dark":"light")};trackEvent(e,t={}){const i=this.analyticsContext(e);i&&i.analytics.track(e,{...this.analyticsProperties(i.event),...t})}analyticsProperties(e,t={}){return{event_id:this.eventId,team_id:e.teamId,promoter_id:e.promoterId,event_name:e.name,event_slug:e.slug,currency:e.currency,...t}}analyticsForEvent(e,t){if(!this.enableAnalytics)return;const i=xE(t);if(i)this.emitAnalyticsEventSkipped(e,i,t);else{if(this.analytics)return this.analytics;this.emitAnalyticsEventSkipped(e,"analytics_not_initialized",t)}}analyticsContext(e){const t=this.event;if(!t)return void this.emitAnalyticsEventSkipped(e,"missing_event");const i=this.analyticsForEvent(e,t);return i?{analytics:i,event:t}:void 0}emitAnalyticsEventSkipped(e,t,i,n){const r={eventType:e,eventId:this.eventId,reason:t,promoterId:i?.promoterId||void 0,teamId:i?.teamId||void 0};this.analyticsEventSkipped.emit(r),this.debugAnalytics&&console.warn("[SessionServicesTicketing] Analytics event skipped:",r,n)}getLowestPrice(){const e=this.event;return e?.admissions.length?Math.min(...e.admissions.map((e=>eE(e.price)))):0}getAdmissionListProducts(e){return e.admissions.map(((t,i)=>({product_id:t.id,sku:t.id,name:t.name,category:e.name,price:wE(t.price,e.currency),quantity:1,position:i+1,admission_id:t.id,section_id:t.sectionId,price_base:t.price?.base,price_booking_fee:t.price?.booking,available:t.available,capacity:t.capacity})))}async loadEventData(e={}){const t=e.mode??"refresh",i=this.client,n=this.eventId;if(!i||!this.tenantId||!n){const e="Missing required configuration: tenantId and eventId";return this.error=e,this.errorKind="configuration",{status:"error",error:e,kind:"configuration"}}const r=++this.eventRequestId,o=new AbortController;this.eventController?.abort(),this.eventController=o,"coupon"===t&&(this.couponController=o),"initial"===t&&(this.initialLoading=!0),"refresh"===t&&(this.eventLoading=!0),"retry"===t&&(this.retryLoading=!0),"passcode"===t&&(this.passcodeLoading=!0);try{"coupon"!==t&&"passcode"!==t&&(this.error=null,this.errorKind=null,this.refreshError=null);const a=await TE(o,(t=>i.event.get({key:n,couponCode:(e.couponCode??this.appliedCouponCode)||void 0,passcode:(e.passcode??this.activePasscode)||void 0},{signal:t})));return this.isEventRequestCurrent(r,n,o)?(!1!==e.commit&&(this.event=a.event,this.pruneSelectedItems(a.event)),this.passcodeDenied=!1,{status:"success",event:a.event}):{status:"stale"}}catch(e){if(!this.isEventRequestCurrent(r,n,o))return{status:"stale"};const i=function(e){return function(e){const t=EE(e,"");return!!/incorrect passcode/i.test(t)||"UNAUTHORIZED"===kE(e)&&/passcode/i.test(t)}(e)?"access":"NOT_FOUND"===kE(e)?"not_found":"transient"}(e),a=EE(e,"Failed to load event data");return this.passcodeDenied="access"===i,"coupon"!==t&&(!this.event||"refresh"!==t&&"retry"!==t?(this.error=a,this.errorKind=i):this.refreshError=a,this.errorOccurred.emit({error:a})),{status:"error",error:a,kind:i}}finally{r===this.eventRequestId&&("initial"===t&&this.finishInitialLoad(!0),"refresh"===t&&(this.eventLoading=!1),"retry"===t&&(this.retryLoading=!1),"passcode"===t&&(this.passcodeLoading=!1),this.eventController===o&&(this.eventController=void 0),this.couponController===o&&(this.couponController=void 0))}}isEventRequestCurrent(e,t,i){return this.active&&e===this.eventRequestId&&t===this.eventId&&this.eventController===i}pruneSelectedItems(e){this.openModalAdmissionId&&!e.admissions.some((e=>e.id===this.openModalAdmissionId))&&this.closeModal();const t=new Set(e.admissions.map((e=>XI(e.id,e.sectionId??null)))),i=Array.from(this.selectedItems).filter((([e])=>t.has(e)));i.length!==this.selectedItems.size&&(this.selectedItems=new Map(i),this.invalidateQuote(),this.selectedItems.size>0&&this.scheduleQuoteUpdate())}trackLoadedEvent(e){this.setupAnalytics(e)&&(this.trackPageViewed(e),this.trackProductViewed(e),this.trackEvent("Product List Viewed",{list_id:this.eventId,category:"Admissions",products:this.getAdmissionListProducts(e)}))}setupAnalytics(e){if(!this.enableAnalytics)return!1;const t=xE(e);if(t)return this.emitAnalyticsEventSkipped("Page Viewed",t,e),!1;if(this.analytics)return!0;try{this.analytics=function(e){let t,i=e.debug??!1,n=tI(e.client,i,e.destinations),r=cI(),o=lI();i&&console.log("[Analytics] Initialized:",{sessionId:r,anonymousId:o});let a=(e,i,n)=>{let a=N$();return{type:e,name:i,properties:{...R$({anonymousId:o,context:a,sessionId:r}),...n},context:a,timestamp:Date.now(),messageId:uI(),sessionId:r,anonymousId:o,userId:t}},s=async(e,t)=>{try{await n.sendEvent(e,t)}catch(e){i&&console.error("[Analytics] Failed to send event:",e)}},d=(e,t)=>{let n=e.promoter_id;return!n&&i&&console.warn(`[Analytics] ${t}() called without promoter_id, skipping`),n},c=async(e,t={})=>{let i=d(t,"track");i&&await s(a("track",e,t),i)},l=async(e={})=>{let t=d(e,"preload");t&&await s(a("preload","Preload",e),t)},u=async(e,t={})=>{let i=d(t,"page");i&&await s(a("page",e||"Page Viewed",t),i)},p=async(e,t={})=>{let i=d(t,"screen");i&&await s(a("screen",e||"Screen Viewed",t),i)},m=async(e,n={})=>{t=e;let a=n.promoter_id;a&&await s({type:"identify",properties:{},context:N$(),timestamp:Date.now(),messageId:uI(),sessionId:r,anonymousId:o,userId:e,traits:n},a),i&&console.log("[Analytics] User identified:",e)},h=async(e,n={})=>{let a=n.promoter_id;a&&await s({type:"group",properties:{},context:N$(),timestamp:Date.now(),messageId:uI(),sessionId:r,anonymousId:o,userId:t,groupId:e,traits:n},a),i&&console.log("[Analytics] Group called:",{groupId:e,traits:n})};return{preload:(e={})=>{l(e)},preloadAsync:l,track:(e,t={})=>{c(e,t)},trackAsync:c,page:(e,t={})=>{u(e,t)},pageAsync:u,screen:(e,t={})=>{p(e,t)},screenAsync:p,identify:(e,t={})=>{m(e,t)},identifyAsync:m,alias:(e,t)=>{i&&console.log("[Analytics] Alias called:",{userId:e,previousId:t})},group:(e,t={})=>{h(e,t)},groupAsync:h,reset:()=>{let e=function(e){let t=Zr(),i=Hr();return e.setCookie(Yr,t),e.setItem(Wr,i),{sessionId:t,anonymousId:i}}(dI);r=e.sessionId,o=e.anonymousId,t=void 0,n.clearCache(),i&&console.log("[Analytics] Session reset:",{sessionId:r,anonymousId:o})}}}({client:this.client,debug:this.debugAnalytics})}catch(t){return this.emitAnalyticsEventSkipped("Page Viewed","analytics_initialization_failed",e,t),!1}return!0}trackPageViewed(e){const t=this.analyticsForEvent("Page Viewed",e);t&&t.page("Ticketing Widget",this.analyticsProperties(e))}trackProductViewed(e){const t=this.getLowestPrice();this.trackEvent("Product Viewed",{product_id:this.eventId,sku:this.eventId,name:e.name,category:"Event",value:$E(t,e.currency),price:$E(t,e.currency),event_date:e.entryStartsAt,venue_name:SE(e),venue_city:e.location?.city})}async updateQuantity(e,t,i){const n=XI(e,t);await this.setQuantity(e,t,(this.selectedItems.get(n)||0)+i)}async setQuantity(e,t,i){if(this.checkoutLoading)return;const n=XI(e,t),r=this.event?.admissions.find((t=>t.id===e));if(!r)return;const o=this.selectedItems.get(n)||0,a=Math.max(0,Math.min(i,this.getMaxQuantity(r,t)));if(o===a)return;this.selectionPrompt=!1,this.setSelectedQuantity(n,a),this.invalidateQuote(),this.checkoutError=null;const s=t?this.event?.sections.find((e=>e.id===t)):null;this.trackQuantityChange({admission:r,section:s,sectionId:t,delta:a-o}),this.scheduleQuoteUpdate()}setSelectedQuantity(e,t){0===t?this.selectedItems.delete(e):this.selectedItems.set(e,t),this.selectedItems=new Map(this.selectedItems)}trackQuantityChange(e){e.delta>0?this.trackProductAdded(e):e.delta<0&&this.trackProductRemoved(e)}trackProductAdded(e){this.trackEvent("Product Added",{...this.getQuantityAnalytics(e),price_base:e.admission.price?.base,price_booking_fee:e.admission.price?.booking})}trackProductRemoved(e){this.trackEvent("Product Removed",this.getQuantityAnalytics(e))}getQuantityAnalytics(e){return{product_id:e.admission.id,sku:e.admission.id,name:e.admission.name,category:this.event?.name,variant:e.section?.name,price:wE(e.admission.price,this.event?.currency),quantity:Math.abs(e.delta),admission_id:e.admission.id,section_id:DE(e.sectionId),section_name:e.section?.name}}async updateQuote(){if(this.clearQuoteTimer(),0===this.selectedItems.size)return this.invalidateQuote(),this.quote=null,this.quoteError=null,this.quoteLoading=!1,void await this.updatePreviewQuote();const e=++this.requestId,t=this.eventId,i=this.appliedCouponCode,n=this.getQuoteRequestItems(),r=this.quoteRevisionFor(t,i,n),o=new AbortController;this.quoteController?.abort(),this.quoteController=o;try{this.quoteLoading=!0,this.quoteError=null;const a=await this.fetchCartQuote(t,n,i,o);this.applyQuote(a.quote,e,r)}catch(t){this.handleQuoteError(e)}finally{e===this.requestId&&(this.quoteLoading=!1,this.quoteController===o&&(this.quoteController=void 0))}}scheduleQuoteUpdate(){this.clearQuoteTimer(),0!==this.selectedItems.size?(this.quoteLoading=!0,this.quoteTimer=setTimeout((()=>{this.quoteTimer=void 0,this.updateQuote().catch((()=>{}))}),150)):this.updateQuote().catch((()=>{}))}clearQuoteTimer(){this.quoteTimer&&(clearTimeout(this.quoteTimer),this.quoteTimer=void 0)}invalidateQuote(){this.requestId++,this.couponRequestId++,this.checkoutRequestId++,this.quoteController?.abort(),this.previewController?.abort(),this.checkoutController?.abort(),this.couponController?.abort(),this.quoteController=void 0,this.previewController=void 0,this.checkoutController=void 0,this.couponController=void 0,this.quoteRevision=void 0,this.quote=null,this.quoteError=null,this.quoteLoading=!1,this.previewLoading=!1,this.checkoutError=null,this.checkoutLoading=!1}clearPromptTimer(){this.promptTimer&&(clearTimeout(this.promptTimer),this.promptTimer=void 0)}promptTicketSelection(){this.selectionPrompt=!0,this.clearPromptTimer(),this.promptTimer=setTimeout((()=>{this.selectionPrompt=!1,this.promptTimer=void 0}),800)}getQuoteRequestItems(){return Array.from(this.selectedItems,(([e,t])=>{const i=function(e){const[t,i]=e.split("::");return{admissionId:t,sectionId:"none"===i?void 0:i}}(e);return{quantity:t,admissionId:i.admissionId,sectionId:i.sectionId}}))}fetchCartQuote(e,t,i,n){return TE(n,(n=>this.client.order.quote({eventId:e,items:t,couponCode:i||void 0},{signal:n})))}applyQuote(e,t,i=this.currentQuoteRevision()){t===this.requestId&&(this.quote=e,this.quoteRevision=i,this.quoteError=null,this.cartUpdate.emit(this.quote),this.trackEvent("Cart Viewed",{products:this.getCartProducts(),value:IE(this.quote,this.event?.currency),currency:this.event?.currency}))}handleQuoteError(e){e===this.requestId&&(this.quote=null,this.quoteRevision=void 0,this.quoteError="Failed to update cart. Please try again.",this.errorOccurred.emit({error:this.quoteError}))}quoteRevisionFor(e,t,i){return JSON.stringify({eventId:e,coupon:t,items:i})}currentQuoteRevision(){return this.quoteRevisionFor(this.eventId,this.appliedCouponCode,this.getQuoteRequestItems())}async updatePreviewQuote(){const e=this.event;if(!e||!this.appliedCouponCode)return this.previewRequestId++,this.previewController?.abort(),this.previewController=void 0,this.previewLoading=!1,void(this.previewQuote=null);const t=this.activeInitialPreviewQuote();if(t)return this.previewRequestId++,this.previewLoading=!1,void(this.previewQuote=t);if(0===gE(e).length)return this.previewRequestId++,this.previewLoading=!1,void(this.previewQuote=null);this.previewRequestId++;const i=this.previewRequestId,n=this.appliedCouponCode,r=this.eventId,o=new AbortController;this.previewController?.abort(),this.previewController=o;try{this.previewLoading=!0;const t=await this.fetchPreviewQuote(e,n,o);i===this.previewRequestId&&r===this.eventId&&n===this.appliedCouponCode&&(this.previewQuote=t.quote)}catch(e){i===this.previewRequestId&&(this.previewQuote=null,this.setCouponError())}finally{i===this.previewRequestId&&(this.previewLoading=!1,this.previewController===o&&(this.previewController=void 0))}}fetchPreviewQuote(e,t,i){return TE(i,(i=>this.client.order.quote({eventId:e.id,items:gE(e),couponCode:t},{signal:i})))}handleCouponInput=e=>{e.target instanceof HTMLInputElement&&(this.couponInput=e.target.value.toUpperCase())};handleCouponKeyDown=e=>{"Enter"===e.key&&(e.preventDefault(),this.applyCoupon().catch((()=>{})))};async applyCoupon(){const e=zI(this.couponInput);this.couponInput=e,this.quoteError=null,this.couponError=null,this.trackCouponEntered(e),this.selectedItems.size>0?await this.applyCartCoupon(e):await this.applyPreviewCoupon(e)}async removeCoupon(){this.couponError=null,this.quoteError=null,this.selectedItems.size>0?await this.removeCartCoupon():await this.applyPreviewCoupon("")}async applyCartCoupon(e){const t=++this.couponRequestId,i=++this.requestId,n=this.appliedCouponCode,r=this.getQuoteRequestItems(),o=this.eventId,a=this.quoteRevisionFor(o,e,r),s=new AbortController;this.quoteController?.abort(),this.quoteController=s;try{this.quoteLoading=!0;const d=await this.loadEventData({commit:!1,couponCode:e,mode:"coupon"});if(!this.isCouponOperationCurrent(t,i))return;if("success"!==d.status)throw Error("Coupon load failed");const c=await this.fetchCartQuote(o,r,e,s);if(!this.isCouponOperationCurrent(t,i))return;if(this.event=d.event,this.appliedCouponCode=e,this.couponInput=e,this.previewQuote=null,this.pruneSelectedItems(d.event),a!==this.currentQuoteRevision())return this.invalidateQuote(),void this.scheduleQuoteUpdate();this.applyQuote(c.quote,i,a),e?this.trackCouponApplied(e,c.quote):this.trackCouponRemoved(n,c.quote)}catch(r){if(!this.isCouponOperationCurrent(t,i))return;this.couponInput=n||e,this.setCouponError(e?void 0:"Failed to remove coupon. Your current discount is still applied."),e&&this.trackCouponDenied(e)}finally{i===this.requestId&&(this.quoteLoading=!1,this.quoteController===s&&(this.quoteController=void 0))}}async applyPreviewCoupon(e){const t=this.appliedCouponCode,i=++this.couponRequestId,n=++this.previewRequestId,r=new AbortController;this.previewController?.abort(),this.previewController=r;try{this.previewLoading=!0;const o=await this.loadEventData({commit:!1,couponCode:e,mode:"coupon"});if(!this.isPreviewCouponOperationCurrent(i,n))return;if("success"!==o.status)throw Error("Coupon load failed");const a=this.activeInitialPreviewQuote(e),s=a||!e||0===gE(o.event).length?null:await this.fetchPreviewQuote(o.event,e,r);if(!this.isPreviewCouponOperationCurrent(i,n))return;this.event=o.event,this.pruneSelectedItems(o.event),this.appliedCouponCode=e,this.couponInput=e,this.previewQuote=a??s?.quote??null,e?this.trackCouponApplied(e,this.previewQuote):this.trackCouponRemoved(t,null)}catch(r){if(!this.isPreviewCouponOperationCurrent(i,n))return;this.couponInput=t||e,this.setCouponError(e?void 0:"Failed to remove coupon. Your current discount is still applied."),e&&this.trackCouponDenied(e)}finally{n===this.previewRequestId&&(this.previewLoading=!1,this.previewController===r&&(this.previewController=void 0))}}async removeCartCoupon(){await this.applyCartCoupon("")}isCouponOperationCurrent(e,t){return this.active&&e===this.couponRequestId&&t===this.requestId}isPreviewCouponOperationCurrent(e,t){return this.active&&e===this.couponRequestId&&t===this.previewRequestId}setCouponError(e="Failed to apply coupon. Please check the code."){this.couponError=e,this.errorOccurred.emit({error:this.couponError})}trackCouponEntered(e){e&&this.trackEvent("Coupon Entered",{coupon:e})}trackCouponApplied(e,t){e&&this.trackEvent("Coupon Applied",{coupon:e,products:this.getProductsForQuote(t),total:t?IE(t,this.event?.currency):0,value:t?IE(t,this.event?.currency):0})}trackCouponDenied(e){e&&this.trackEvent("Coupon Denied",{coupon:e,reason:this.couponError})}trackCouponRemoved(e,t){e&&this.trackEvent("Coupon Removed",{coupon:e,products:this.getProductsForQuote(t),total:t?IE(t,this.event?.currency):0,value:t?IE(t,this.event?.currency):0})}handlePasscodeInput=e=>{e.target instanceof HTMLInputElement&&(this.passcodeInput=e.target.value)};async submitPasscode(e){e.preventDefault();const t=this.passcodeInput.trim();this.activePasscode=t;const i=await this.loadEventData({mode:"passcode",passcode:t});"success"===i.status&&(this.error=null,this.errorKind=null,this.handleLoadedEvent(i.event),await this.updatePreviewQuote())}async retryEventLoad(){if(!this.tenantId||!this.eventId)return void await this.initializeComponent();const e=await this.loadEventData({mode:"retry"});"success"===e.status&&(this.handleLoadedEvent(e.event),await this.updatePreviewQuote())}async initiateCheckout(){if(this.isCheckoutDisabled())return;const e=this.quote;if(!e)return;const t=++this.checkoutRequestId,i=this.eventId,n=this.appliedCouponCode,r=this.currentQuoteRevision(),o=new AbortController;this.checkoutController?.abort(),this.checkoutController=o;try{this.checkoutLoading=!0,this.checkoutError=null;const a=await this.getCheckoutIdempotencyKey(r);if(!this.isCheckoutRequestCurrent(t,i,n,r))return;const s=await TE(o,(t=>this.client.order.create({eventId:i,items:this.getCheckoutItems(e),couponCode:n||void 0,returnUrl:this.returnUrl,channel:pI("elements"),idempotencyKey:a},{signal:t})));if(!this.isCheckoutRequestCurrent(t,i,n,r))return;this.trackCheckoutStarted(e,s.order.id),this.handleCheckoutOrder(s.order,t)}catch(e){this.isCheckoutRequestCurrent(t,i,n,r)&&this.handleCheckoutError()}finally{t===this.checkoutRequestId&&this.checkoutController===o&&(this.checkoutController=void 0)}}async getCheckoutIdempotencyKey(e){const t=this.checkoutIdempotencyKeys.get(e);if(t)return t;const i=await async function(e){if(!globalThis.crypto?.subtle)return;const t=await globalThis.crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e));return"session-services:checkout:"+Array.from(new Uint8Array(t),(e=>e.toString(16).padStart(2,"0"))).join("")}(`${this.apiUrl}\0${this.tenantId}\0${e}`),n=function(e){if(e&&"undefined"!=typeof window)try{return window.sessionStorage?.getItem(e)||void 0}catch{return}}(i),r=n??function(){const e=globalThis.crypto.getRandomValues(new Uint8Array(16));return"elements_"+Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("")}();return this.checkoutIdempotencyKeys.set(e,r),n||function(e,t){if(e&&"undefined"!=typeof window)try{window.sessionStorage?.setItem(e,t)}catch{}}(i,r),r}isCheckoutRequestCurrent(e,t,i,n){return this.active&&e===this.checkoutRequestId&&t===this.eventId&&i===this.appliedCouponCode&&n===this.currentQuoteRevision()&&n===this.quoteRevision}trackCheckoutStarted(e,t){const i=IE(e,this.event?.currency);this.trackEvent("Checkout Started",{order_id:t,value:i,revenue:i,currency:this.event?.currency,products:this.getCheckoutProducts()})}trackExternalTicketClick(e,t){this.trackEvent("Checkout Started",{ticketing_mode:"external",external_ticket_url:e,external_ticket_domain:CE(e),cta_surface:t})}getCheckoutItems(e){return e.items.map((e=>({quantity:e.quantity,admissionId:e.admissionId,sectionId:e.sectionId})))}handleCheckoutOrder(e,t){this.active&&t===this.checkoutRequestId&&(this.checkoutInit.emit({orderId:e.id,checkoutUrl:e.checkoutUrl}),e.checkoutUrl?window.location.href=e.checkoutUrl:this.checkoutLoading=!1)}handleCheckoutError(){this.checkoutError="We couldn’t open checkout. Your tickets are still selected, so you can try again.",this.errorOccurred.emit({error:this.checkoutError}),this.checkoutLoading=!1}handleStickyCheckoutClick(e){if(e.isDoorOnly||!PE(this.quote))return this.promptTicketSelection(),void this.scrollToTicketSelector();this.initiateCheckout().catch((()=>{}))}scrollToTicketSelector(){const e=this.host.shadowRoot?.querySelector(".tickets-wrapper")??this.host;window.scrollTo({behavior:!0===window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",top:Math.max(e.getBoundingClientRect().top+window.scrollY-100,0)})}getCartProducts(){return this.quote?this.getProductsForQuote(this.quote):[]}getCheckoutProducts(){return this.quote?this.quote.items.map((e=>({...this.getQuoteProduct(e),section_name:this.getQuoteSection(e)?.name}))):[]}getProductsForQuote(e){return e?e.items.map((e=>this.getQuoteProduct(e))):[]}getQuoteProduct(e){return{...OE(e),..._E(this.quoteProductContext(e)),...RE(e)}}quoteProductContext(e){return{event:this.event,admission:this.getQuoteAdmission(e),section:this.getQuoteSection(e)}}getQuoteAdmission(e){return this.event?.admissions.find((t=>t.id===e.admissionId))}getQuoteSection(e){return e.sectionId?this.event?.sections.find((t=>t.id===e.sectionId)):null}formatDateTimeRange(e,t){const i=this.event?tE(this.event):"UTC";try{const n=MI(e,i),r=MI(t,i),o=this.dateFormatter({day:"numeric",month:"short",timeZone:i,weekday:"short"}).format(n),a=this.dateFormatter({hour:"numeric",minute:"2-digit",timeZone:i});return`${o} · ${a.format(n)} – ${a.format(r)}`}catch{return`${e} – ${t}`}}dateFormatter(e){try{return new Intl.DateTimeFormat(this.locale,e)}catch{return new Intl.DateTimeFormat("en-US",e)}}formatPriceValue(e){const t=this.event?.currency;if(!t)return new Intl.NumberFormat(this.locale,{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format($E(e));try{return new Intl.NumberFormat(this.locale,{style:"currency",currency:t}).format($E(e,t))}catch{return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format($E(e,t))}}handleQuantityDecrease=async(e,t)=>{await this.updateQuantity(e,t,-1)};handleQuantityIncrease=async(e,t)=>{await this.updateQuantity(e,t,1)};handleQuantityInput=async(e,t,i)=>{i.target instanceof HTMLInputElement&&await this.setQuantity(e,t,Number(i.target.value)||0)};openModal=(e,t)=>{t.stopPropagation(),this.modalTrigger=t.currentTarget,this.modalFocusPending=!0,this.openModalAdmissionId=e,document.addEventListener("keydown",this.handleModalKeyDown)};closeModal=()=>{this.openModalAdmissionId=null,this.modalFocusPending=!1,this.modalRestorePending=!0,"undefined"!=typeof document&&document.removeEventListener("keydown",this.handleModalKeyDown)};handleModalKeyDown=e=>{if("Escape"===e.key)return e.preventDefault(),void this.closeModal();if("Tab"!==e.key)return;const t=this.host.shadowRoot?.querySelector(".modal-content");if(!t)return;const i=Array.from(t.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(0===i.length)return e.preventDefault(),void t.focus();const n=i[0],r=i.at(-1),o=this.host.shadowRoot?.activeElement;if(e.shiftKey&&o===n)return e.preventDefault(),void r?.focus();e.shiftKey||o!==r||(e.preventDefault(),n?.focus())};handleBackdropClick=e=>{e.target instanceof i&&e.target.classList.contains("modal-backdrop")&&this.closeModal()};renderQuantityControls(e,t,i,n){const o=XI(e.id,t),a=this.selectedItems.get(o)||0;return r("div",{class:"quantity-controls"},r("button",{type:"button",class:"quantity-btn decrease",onClick:()=>this.handleQuantityDecrease(e.id,t),disabled:i||0===a,"aria-label":"Decrease quantity","data-testid":"event-admission-decrement"},"−"),r("input",{class:"quantity-value",type:"number",min:"0",max:n,inputmode:"numeric",value:a,onInput:i=>this.handleQuantityInput(e.id,t,i),disabled:i,"aria-label":"Quantity for "+e.name,"data-testid":"event-admission-quantity-input"}),r("button",{type:"button",class:"quantity-btn increase",onClick:()=>this.handleQuantityIncrease(e.id,t),disabled:i||a>=n,"aria-label":"Increase quantity","data-testid":"event-admission-increment"},"+"))}getMaxQuantity(e,t){return this.event?fE({admission:e,event:this.event,locale:this.locale,section:this.getSection(t)}).maxQuantity:0}getSection(e){if(e)return this.event?.sections.find((t=>t.id===e))}renderEventTimeAndLocation(e){return r(r.Fragment,null,this.renderEventTime(e,"admission-time"),this.renderEventLocation(e,"admission-venue"))}renderEventTime(e,t){return e.entryStartsAt&&e.entryEndsAt?r("div",{class:t},NE(),this.formatDateTimeRange(e.entryStartsAt,e.entryEndsAt)):null}renderAdmissionTime(e,t){return e?.entryStartsAt&&e.entryEndsAt?r("div",{class:t},NE(),this.formatDateTimeRange(e.entryStartsAt,e.entryEndsAt)):null}renderSectionLocation(e){const t=[e.location?.name,e.location?.city].filter(Boolean).join(", ");return t?r("div",{class:"section-venue"},UE(),t):null}renderEventLocation(e,t){return e.location?r("div",{class:t},UE(),e.location.name):null}renderPriceAndControls(e,t,i,n){const o=XI(e.id,t),a=yE({admission:e,initialPrice:this.activeInitialAdmissionPrices()?.[o],quoteItem:vE(this.quote).get(o),previewItem:vE(this.previewQuote).get(o)}),s=function(e){return e.discounted&&void 0!==e.gross?Math.max(e.gross-e.base,0):0}(a);return r("div",{class:"admission-price-info"},r("div",{class:"admission-price-wrapper"},s>0&&r("span",{class:"admission-savings"},"Save ",this.formatPriceValue(s)),this.renderAdmissionPrice(a),a.fees>0&&r("span",{class:"admission-booking-fee"},this.formatPriceValue(a.fees)," Booking Fee"),i.showScarcity&&r("span",{class:"admission-availability"},e.available," tickets remaining"),i.label&&r("span",{class:"admission-sale-label "+i.label.tone},i.label.text)),this.renderAdmissionControls(e,t,i,n))}renderAdmissionPrice(e){return e.discounted?r("span",{class:"admission-price-row"},r("span",{class:"admission-price discounted"},this.formatPriceValue(e.base)),void 0!==e.gross&&r("span",{class:"admission-price-original"},this.formatPriceValue(e.gross))):r("span",{class:"admission-price"},this.formatPriceValue(e.base))}renderAdmissionControls(e,t,i,n){return i.statusLabel?r("div",{class:"sold-out-controls "+(i.statusTone??"")},r("span",{class:"sold-out-text"},i.statusLabel)):"door"===n?null:this.renderQuantityControls(e,t,i.disabled||this.checkoutLoading,i.maxQuantity)}renderAdmission(e,t,i,n=!1,o="default"){const a=fE({admission:e,event:t,locale:this.locale,section:i,sectionSoldOut:n}),s=i?.id||null;return r("section",{class:this.getAdmissionClassName(a,i),key:XI(e.id,s),"aria-label":this.getAdmissionAriaLabel(e,i,a),"data-testid":"event-admission-card","data-admission-id":e.id,"data-admission-name":e.name,"data-section-id":i?.id??""},r("div",{class:"admission-content"},r("div",{class:"admission-details"},this.renderAdmissionHeader(e),this.renderAdmissionBody(e,t,s,a,o))))}getAdmissionClassName(e,t){return`admission-card ${e.soldOut?"sold-out":""} ${e.disabled&&!e.soldOut?"unavailable":""} ${t?"":"solo-admission"}`}getAdmissionAriaLabel(e,t,i){return function(e,t,i){return t?`${e.name} in ${t.name} - ${i}`:`${e.name} - ${i}`}(e,t,i.statusLabel??this.admissionStatusText(e,i.soldOut))}admissionStatusText(e,t){return t?"Sold Out":(e.price.booking??0)<=0?this.formatPriceValue(e.price.base):`${this.formatPriceValue(e.price.base)} plus ${this.formatPriceValue(e.price.booking)} booking fee`}renderAdmissionHeader(e){return r("div",{class:"admission-header"},r("div",{class:"admission-header-text"},r("h3",{class:"admission-title"},e.name),e.subtitle&&r("p",{class:"admission-subtitle"},e.subtitle)),this.renderMoreInfoButton(e))}renderMoreInfoButton(e){return e.description?r("button",{type:"button",class:"more-info-badge",onClick:t=>this.openModal(e.id,t),"aria-label":"More info about "+e.name},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("circle",{cx:"12",cy:"12",r:"10"}),r("path",{d:"M12 16v-4"}),r("path",{d:"M12 8h.01"})),r("span",null,"More info")):null}renderAdmissionBody(e,t,i,n,o){return i?this.renderPriceAndControls(e,i,n,o):r(r.Fragment,null,this.renderEventTimeAndLocation(t),this.renderPriceAndControls(e,i,n,o))}renderSectionHeader(e,t){return r("div",{class:"section-header"},r("h2",{class:"section-name"},e.name),this.renderAdmissionTime(t[0],"section-time"),this.renderSectionLocation(e))}renderSectionWithAdmissions(e,t,i,n){const o=function(e){return!!e.section&&(!!function(e){return[e.available,e.limit].some((e=>qI(e)<=0))}(e.section)||e.admissions.length>0&&e.admissions.every((t=>FI({admission:t,section:e.section}))))}({admissions:t,section:e});return r("div",{class:"ticket-section "+(o?"section-sold-out":""),key:e.id},this.renderSectionHeader(e,t),r("div",{class:"admissions-list"},t.map((t=>this.renderAdmission(t,i,e,o,n)))))}renderLoadingState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container",role:"status","aria-live":"polite","aria-label":"Loading ticket options"},r("span",{class:"sr-only"},"Loading ticket options"),r("div",{class:"tickets-wrapper"},r("h2",{class:"tickets-heading"},"Get Tickets"),r("div",{class:"ticket-section loading-ticket-section"},r("div",{class:"admissions-list"},[0,1,2].map((e=>r("div",{"aria-hidden":"true",class:"admission-card loading-admission",key:e}))))))))}renderErrorState(){if("access"===this.errorKind)return this.renderPasscodeState();if("not_found"===this.errorKind)return this.renderNotFoundState();const e="configuration"===this.errorKind;return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("div",{class:"message-state",role:"alert","aria-live":"assertive"},r("strong",null,e?"Ticket widget needs setup":"Tickets didn’t load"),r("span",null,e?"This ticket widget is missing its event or tenant details.":"Something got in the way. Try again to load the ticket options."),!e&&r("button",{type:"button",class:"checkout-btn",onClick:()=>this.retryEventLoad(),disabled:this.retryLoading},this.retryLoading?"Loading tickets…":"Try again"))))}renderUpdatingState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container",role:"status","aria-live":"polite"},r("div",{class:"message-state"},r("strong",null,"Loading ticket options…"),r("span",null,"This should only take a moment."))))}renderVerificationState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("section",{class:"message-state","aria-labelledby":"ticket-verification-title","aria-describedby":"ticket-verification-description"},r("h2",{id:"ticket-verification-title"},"Let’s get your tickets"),r("p",{id:"ticket-verification-description"},"We just need you to confirm before we load the ticket options."),r("button",{type:"button",class:"checkout-btn",onClick:this.continueAfterVerification},"Load tickets"))))}renderPasscodeState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("form",{class:"passcode-form",onSubmit:e=>this.submitPasscode(e)},r("h2",null,"Enter passcode"),r("p",null,"Enter the event passcode to view tickets and event details."),r("input",{type:"text",name:"passcode",value:this.passcodeInput,onInput:this.handlePasscodeInput,autocomplete:"one-time-code",placeholder:"Passcode","aria-label":"Passcode","aria-invalid":this.passcodeDenied,"aria-describedby":this.passcodeDenied?"ticket-passcode-error":void 0,disabled:this.passcodeLoading}),this.passcodeDenied&&this.activePasscode&&r("span",{id:"ticket-passcode-error",class:"error-message",role:"alert","aria-live":"assertive"},"That passcode didn’t work. Check it and try again."),r("button",{type:"submit",class:"checkout-btn",disabled:!this.passcodeInput.trim()||this.passcodeLoading},this.passcodeLoading?"Unlocking…":"Unlock event"))))}renderNotFoundState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("div",{class:"message-state",role:"alert"},r("strong",null,"Event not found"),r("span",null,"We couldn’t find this event. The link may be incorrect or expired."))))}renderCouponPanel(){const e=this.couponInput.trim().length>0,t=this.quoteLoading||this.previewLoading||this.checkoutLoading,i=e&&!t;return r("div",{class:"coupon-panel"},r("div",{class:"coupon-row"},r("input",{id:"coupon-code",name:"coupon-code",placeholder:"Coupon Code",value:this.appliedCouponCode||this.couponInput,onInput:this.handleCouponInput,onKeyDown:this.handleCouponKeyDown,autocomplete:"off",disabled:t||!!this.appliedCouponCode,"aria-label":"Coupon code","aria-invalid":!!this.couponError,"aria-describedby":this.couponError?"coupon-error":void 0}),this.appliedCouponCode?r("button",{type:"button",class:"coupon-remove",onClick:()=>this.removeCoupon(),disabled:t,"aria-label":"Remove coupon"},"Remove"):r("button",{type:"button",class:"coupon-apply",onClick:()=>this.applyCoupon(),disabled:!i},"Apply")),this.couponError&&r("span",{id:"coupon-error",class:"error-message",role:"alert","aria-live":"assertive"},this.couponError))}isCheckoutDisabled(){return this.quoteLoading||this.checkoutLoading||!PE(this.quote)||this.quoteRevision!==this.currentQuoteRevision()}getCheckoutButtonText(){return this.checkoutLoading?"Processing...":this.checkoutError?"Try checkout again":this.quote?this.getQuoteCheckoutText():"Pay"}renderQuoteLoadingContent(){return r("span",{class:"checkout-spinner-wrapper","aria-hidden":"true"},r("svg",{class:"checkout-spinner",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})))}renderCheckoutButtonContent(){return this.quoteLoading?this.renderQuoteLoadingContent():this.getCheckoutButtonText()}isStickyCheckoutDisabled(e){return!e.isDoorOnly&&(e.isEnded||e.isUnavailableForSale||this.checkoutLoading||this.quoteLoading)}getStickyCheckoutText(e){return this.checkoutLoading?"Processing...":this.quote?this.getQuoteCheckoutText():this.selectionPrompt?"Select a ticket":e.isDoorOnly?"Get Tickets at the Door":e.isEnded?"Event Ended":e.isUnavailableForSale?"Tickets Unavailable":"Get Tickets"}renderStickyCheckoutButtonContent(e){return this.quoteLoading?this.renderQuoteLoadingContent():this.getStickyCheckoutText(e)}getQuoteCheckoutText(){return this.quote?0===bE(this.quote)?"Continue":"Pay "+this.getOrderTotalText():"Pay"}getOrderTotalText(){if(!this.quote)return"N/A";const e=bE(this.quote);return 0===e?"Free":this.formatPriceValue(e)}renderCheckoutActions(){return r("div",{class:"checkout-actions"},this.renderCouponPanel(),this.quoteError&&r("div",{class:"error-message",role:"alert","aria-live":"assertive"},this.quoteError,r("button",{type:"button",class:"coupon-apply",onClick:()=>this.updateQuote(),disabled:this.quoteLoading},"Try again")),this.checkoutError&&r("div",{class:"error-message",role:"alert","aria-live":"assertive"},this.checkoutError),r("button",{type:"button",class:"checkout-btn",onClick:()=>this.initiateCheckout(),disabled:this.isCheckoutDisabled(),"aria-label":this.quoteLoading?"Updating":void 0,"data-testid":"event-checkout-cta-desktop"},this.renderCheckoutButtonContent()))}renderStickyCheckout(e){return this.stickyCheckout&&e.showTicketing?r("div",{class:"sticky-checkout-bar"},e.isDoorOnly?r("div",{class:"sticky-door-info"},r("strong",null,"Tickets available at the door"),r("span",null,"Buy yours at the venue when you arrive.")):r("button",{type:"button",class:"checkout-btn sticky-checkout-btn "+(this.selectionPrompt?"selection-prompt":""),onClick:()=>this.handleStickyCheckoutClick(e),disabled:this.isStickyCheckoutDisabled(e),"aria-label":this.quoteLoading?"Updating":void 0},this.renderStickyCheckoutButtonContent(e))):null}renderStickyExternalTicketing(e){if(!this.stickyCheckout)return null;const t=e.externalTicketUrl;if(!t)return null;const i=CE(t);return r("div",{class:"sticky-checkout-bar"},r("a",{class:"external-ticket-button sticky-checkout-btn",href:t,target:"_blank",rel:"noreferrer",onClick:()=>this.trackExternalTicketClick(t,"sticky")},r("span",{class:"external-ticket-label"},"Get tickets"),r("span",{class:"external-ticket-domain"},"via ",i)))}renderModal(){if(!this.openModalAdmissionId)return null;const e=this.event?.admissions.find((e=>e.id===this.openModalAdmissionId));return e?r("div",{class:"modal-backdrop",onClick:this.handleBackdropClick},r("div",{class:"modal-content",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-description",tabindex:"-1"},r("button",{type:"button",class:"modal-close-btn",onClick:()=>this.closeModal(),"aria-label":"Close"},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M18 6 6 18"}),r("path",{d:"M6 6l12 12"}))),r("div",{class:"modal-header"},r("h2",{id:"modal-title",class:"modal-title"},e.name),e.subtitle&&r("p",{class:"modal-subtitle"},e.subtitle)),r("p",{id:"modal-description",class:"modal-description"},e.description))):null}renderTicketSections(e){const t=sE(e),i=t.isDoorOnly?"door":"default",n=function(e,t,i={}){return[...uE(e,t,i),...t.filter((e=>!e.sectionId)).map((e=>({type:"admission",admission:e})))].sort(((e,t)=>pE(e)-pE(t)))}(e.sections,function(e,t){if("door"!==t)return e.admissions;const i=tE(e);return e.admissions.filter((t=>!BI(t,e.admissions,i)&&"DOOR"===t.saleEndsBehavior&&LI(t.saleEndsAt,i)))}(e,i),{event:e,initialAdmissionPrices:this.activeInitialAdmissionPrices(),mode:i,previewQuote:this.previewQuote,quote:this.quote});return r("div",{class:"tickets-wrapper"},this.renderDoorAlert(e,i),r("h2",{class:"tickets-heading"},t.ticketHeading),n.map((t=>this.renderTopLevelItem(t,e,i))))}renderTopLevelItem(e,t,i){return"section"===e.type?this.renderSectionWithAdmissions(e.section,e.admissions,t,i):r("div",{class:"ticket-section",key:e.admission.id},r("div",{class:"admissions-list"},this.renderAdmission(e.admission,t,void 0,!1,i)))}renderDoorAlert(e,t){if("door"!==t)return null;const i=e.location?.name?.trim()||"the venue";return r("div",{class:"door-alert"},r("strong",null,"Tickets are available at ",i),r("span",null,"Online sales are closed. Tickets are available at the venue when you arrive."))}loadingView(){return this.initialLoading?this.renderLoadingState():void 0}errorView(){return this.error&&!this.event?this.renderErrorState():void 0}verificationView(){return this.verificationRequired?this.renderVerificationState():void 0}missingEventView(){if(!this.event)return this.eventLoading||this.retryLoading?this.renderUpdatingState():this.renderNotFoundState()}pendingView(){return this.loadingView()??this.verificationView()??this.errorView()??this.missingEventView()}renderReadyState(){const e=this.event;if(!e)return this.renderNotFoundState();const t=sE(e);return t.showExternalTicketing?r(o,{"data-theme":this.currentTheme,"data-sticky-checkout":this.stickyCheckout?"true":void 0},r("div",{class:"session-services-ticketing-container","aria-busy":this.eventLoading?"true":"false"},this.renderExternalTicketing(t)),this.renderStickyExternalTicketing(t)):r(o,{"data-theme":this.currentTheme,"data-sticky-checkout":this.stickyCheckout?"true":void 0},r("div",{class:"session-services-ticketing-container","aria-busy":this.eventLoading||this.retryLoading||this.passcodeLoading?"true":"false","aria-hidden":this.openModalAdmissionId?"true":void 0,inert:!!this.openModalAdmissionId||void 0},this.eventLoading&&r("div",{class:"inline-status",role:"status","aria-live":"polite"},"Updating ticket options…"),this.refreshError&&r("div",{class:"error-message",role:"alert","aria-live":"assertive"},r("span",null,"We couldn’t refresh the latest ticket details."),r("button",{type:"button",class:"inline-retry-btn",onClick:()=>this.retryEventLoad(),disabled:this.retryLoading},this.retryLoading?"Refreshing…":"Try again")),t.showTicketing?this.renderTicketSections(e):this.renderUnavailableState(t),!t.isDoorOnly&&t.showTicketing&&this.renderCheckoutActions()),this.renderStickyCheckout(t),this.renderModal())}renderExternalTicketing(e){const t=e.externalTicketUrl;if(!t)return null;const i=CE(t);return r("div",{class:"tickets-wrapper"},r("h2",{class:"tickets-heading"},e.ticketHeading),r("div",{class:"external-ticket-panel"},r("p",{class:"external-ticket-warning"},"This event sells through an external ticketing site. Checkout, tickets, and support are handled there."),r("a",{class:"external-ticket-button inline-external-ticket-button",href:t,target:"_blank",rel:"noreferrer",onClick:()=>this.trackExternalTicketClick(t,"inline")},r("span",{class:"external-ticket-label"},"Get tickets"),r("span",{class:"external-ticket-domain"},"via ",i))))}renderUnavailableState(e){return r("div",{class:"empty-ticketing-state"},r("strong",null,"Tickets Unavailable"),r("span",null,e.isEnded?"This event has ended, so tickets are no longer available.":"Tickets are not available for this event right now."))}render(){return this.pendingView()??this.renderReadyState()}static get watchers(){return{tenantId:[{propsChanged:0}],eventId:[{propsChanged:0}],apiUrl:[{propsChanged:0}],passcode:[{propsChanged:0}],couponCode:[{couponCodeChanged:0}],initialAdmissionPrices:[{couponCodeChanged:0}],initialPreviewQuote:[{couponCodeChanged:0}],theme:[{themeChanged:0}]}}static get style(){return':host{--background:transparent;--foreground:oklch(0.21 0.006 285.885);--card:oklch(1 0 0);--card-foreground:oklch(0.21 0.006 285.885);--popover:oklch(1 0 0);--popover-foreground:oklch(0.21 0.006 285.885);--primary:oklch(0.537 0.1554 255);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(0 0 0 / 4%);--secondary-foreground:oklch(0.21 0.006 285.885);--muted:oklch(0 0 0 / 4%);--muted-foreground:oklch(0.442 0.017 285.786);--accent:oklch(0 0 0 / 4%);--accent-foreground:oklch(0.21 0.006 285.885);--destructive:oklch(0.637 0.237 25.331);--destructive-foreground:oklch(0.505 0.213 27.518);--border:oklch(0 0 0 / 12%);--input:oklch(0 0 0 / 12%);--ring:oklch(0.705 0.015 286.067);--success:oklch(0.696 0.17 162.48);--warning:oklch(0.769 0.188 70.08);--info:oklch(0.623 0.214 259.815);--info-foreground:oklch(0.488 0.243 264.376);--backdrop:oklch(0 0 0 / 0.32);--radius:0.625rem;--spacing-xs:0.25rem;--spacing-sm:0.5rem;--spacing-md:1rem;--spacing-lg:1.5rem;--spacing-xl:2rem;--font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--font-size-xs:0.75rem;--font-size-sm:0.875rem;--font-size-base:1rem;--font-size-lg:1.125rem;--font-size-xl:1.25rem;--font-size-2xl:1.5rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--shadow-sm:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);--shadow-base:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);--shadow-md:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);--shadow-lg:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);--shadow-xl:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);--shadow-edge-light:0 1px oklch(0 0 0 / 4%);--shadow-edge-dark:0 -1px oklch(1 0 0 / 8%);--transition-fast:150ms cubic-bezier(0.4, 0, 0.2, 1);--transition-base:200ms cubic-bezier(0.4, 0, 0.2, 1);--transition-slow:300ms cubic-bezier(0.4, 0, 0.2, 1);--internal-background:var(--background, transparent);--internal-foreground:var(--foreground, oklch(0.21 0.006 285.885));--internal-card:var(--card, oklch(1 0 0));--internal-popover:var(--popover, oklch(1 0 0));--internal-popover-foreground:var(--popover-foreground, oklch(0.21 0.006 285.885));--internal-primary:var(--primary, oklch(0.537 0.1554 255));--internal-primary-foreground:var(--primary-foreground, oklch(0.985 0 0));--internal-secondary:var(--secondary, oklch(0 0 0 / 4%));--internal-muted:var(--muted, oklch(0 0 0 / 4%));--internal-muted-foreground:var(--muted-foreground, oklch(0.442 0.017 285.786));--internal-accent:var(--accent, oklch(0 0 0 / 4%));--internal-accent-foreground:var(--accent-foreground, oklch(0.21 0.006 285.885));--internal-destructive:var(--destructive, oklch(0.637 0.237 25.331));--internal-border:var(--border, oklch(0 0 0 / 12%));--internal-input:var(--input, oklch(0 0 0 / 12%));--internal-ring:var(--ring, oklch(0.705 0.015 286.067));--internal-success:var(--success, oklch(0.696 0.17 162.48));--internal-warning:var(--warning, oklch(0.769 0.188 70.08));--internal-info:var(--info, oklch(0.623 0.214 259.815));--internal-info-foreground:var(--info-foreground, oklch(0.488 0.243 264.376));--internal-backdrop:var(--backdrop, oklch(0 0 0 / 0.32));--internal-radius:var(--radius, 0.625rem);--internal-spacing-xs:var(--spacing-xs, 0.25rem);--internal-spacing-sm:var(--spacing-sm, 0.5rem);--internal-spacing-md:var(--spacing-md, 1rem);--internal-spacing-lg:var(--spacing-lg, 1.5rem);--internal-spacing-xl:var(--spacing-xl, 2rem);--internal-font-family:var(--font-family, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif);--internal-font-size-xs:var(--font-size-xs, 0.75rem);--internal-font-size-sm:var(--font-size-sm, 0.875rem);--internal-font-size-base:var(--font-size-base, 1rem);--internal-font-size-lg:var(--font-size-lg, 1.125rem);--internal-font-size-xl:var(--font-size-xl, 1.25rem);--internal-font-weight-medium:var(--font-weight-medium, 500);--internal-font-weight-semibold:var(--font-weight-semibold, 600);--internal-font-weight-bold:var(--font-weight-bold, 700);--internal-shadow-lg:var(--shadow-lg, 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1));--internal-shadow-xl:var(--shadow-xl, 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1));--internal-shadow-edge-light:var(--shadow-edge-light, 0 1px oklch(0 0 0 / 4%));--internal-transition-fast:var(--transition-fast, 150ms cubic-bezier(0.4, 0, 0.2, 1));--internal-transition-base:var(--transition-base, 200ms cubic-bezier(0.4, 0, 0.2, 1));--internal-transition-slow:var(--transition-slow, 300ms cubic-bezier(0.4, 0, 0.2, 1));display:block;font-family:var(--internal-font-family);color:var(--internal-foreground);background:var(--internal-background);color-scheme:light}*{box-sizing:border-box;margin:0;padding:0}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}*:focus{outline:none}*:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px;border-radius:calc(var(--internal-radius) - 4px)}.session-services-ticketing-container{width:100%;max-width:100%;margin:0}:host([data-theme="dark"]){color-scheme:dark;--background:transparent;--foreground:oklch(0.967 0.001 286.375);--card:color-mix( in srgb, oklch(0.21 0.006 285.885) 80%, oklch(0.141 0.005 285.823) );--card-foreground:oklch(0.967 0.001 286.375);--popover:oklch(0.21 0.006 285.885);--popover-foreground:oklch(0.967 0.001 286.375);--primary:oklch(0.537 0.1554 255);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(1 0 0 / 6%);--secondary-foreground:oklch(0.967 0.001 286.375);--muted:oklch(1 0 0 / 6%);--muted-foreground:oklch(0.705 0.015 286.067);--accent:oklch(1 0 0 / 6%);--accent-foreground:oklch(0.967 0.001 286.375);--destructive:oklch(0.637 0.237 25.331);--destructive-foreground:oklch(0.704 0.191 22.216);--border:oklch(1 0 0 / 12%);--input:oklch(1 0 0 / 12%);--ring:oklch(0.552 0.016 285.938);--success:oklch(0.696 0.17 162.48);--warning:oklch(0.769 0.188 70.08);--info:oklch(0.623 0.214 259.815);--info-foreground:oklch(0.707 0.165 254.624)}.tickets-wrapper{padding:0;width:100%}.tickets-heading{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);margin:0 0 var(--internal-spacing-md)}.ticket-section.loading-ticket-section{overflow:visible;background:transparent;border:0;box-shadow:none}.loading-ticket-section .admissions-list{display:flex;flex-direction:column;gap:var(--internal-spacing-sm)}.admission-card.loading-admission{min-height:5.25rem;padding:0;background:oklch(from var(--internal-foreground) l c h / 0.07);border:0;border-radius:var(--internal-radius);box-shadow:none;pointer-events:none;animation:loading-card 1.6s ease-out infinite}@keyframes loading-card{0%,100%{opacity:0.48}50%{opacity:0.74}}.passcode-form,.passcode-form input,.ticket-section,.more-info-badge,.quantity-controls,.sold-out-controls,.coupon-row,.coupon-apply,.coupon-remove{border:1px solid var(--internal-input);box-shadow:var(--internal-shadow-edge-light)}.external-ticket-button,.checkout-btn{display:inline-flex;align-items:center;justify-content:center;background:var(--internal-primary);color:var(--internal-primary-foreground);border:1px solid oklch(from var(--internal-primary) calc(l - 0.08) c h);border-radius:calc(var(--internal-radius) - 2px);cursor:pointer;box-shadow:var(--internal-shadow-edge-light);transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), box-shadow var(--internal-transition-fast), opacity var(--internal-transition-fast), transform var(--internal-transition-fast)}.external-ticket-button:hover,.checkout-btn:hover:not(:disabled){background:oklch(from var(--internal-primary) calc(l - 0.08) c h);transform:translateY(-1px)}.external-ticket-button:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.passcode-form{display:flex;flex-direction:column;gap:var(--internal-spacing-sm);padding:var(--internal-spacing-lg);margin-bottom:var(--internal-spacing-md);background:var(--internal-card);border-radius:var(--internal-radius)}.passcode-form h2{color:var(--internal-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-semibold);line-height:1.3}.passcode-form p{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.5}.door-alert,.empty-ticketing-state,.message-state{display:flex;flex-direction:column;gap:calc(var(--internal-spacing-xs) * 1.5);margin-bottom:var(--internal-spacing-md);padding:0;background:transparent;border:none;border-radius:0;box-shadow:none}.door-alert strong,.empty-ticketing-state strong,.message-state strong,.message-state h2{color:var(--internal-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-semibold);line-height:1.3}.door-alert span,.empty-ticketing-state span,.message-state span,.message-state p{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.4}.message-state .checkout-btn{margin-top:var(--internal-spacing-sm)}.external-ticket-button{flex-direction:column;gap:calc(var(--internal-spacing-xs) * 0.5);width:100%;padding:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs)) var(--internal-spacing-lg);text-decoration:none}.external-ticket-panel{display:flex;flex-direction:column;gap:var(--internal-spacing-md)}.external-ticket-warning{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-medium);line-height:1.35}.external-ticket-label{font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-bold);line-height:1.2}.external-ticket-domain{font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2;opacity:0.82}.passcode-form input{width:100%;min-width:0;padding:calc(var(--internal-spacing-sm) + 0.125rem) var(--internal-spacing-sm);background:var(--internal-card);color:var(--internal-foreground);border-radius:calc(var(--internal-radius) - 2px);font:inherit}.passcode-form input:disabled{opacity:0.6;cursor:not-allowed}.ticket-section{background:var(--internal-card);border-radius:var(--internal-radius);margin:0 0 var(--internal-spacing-lg) 0;overflow:hidden;width:100%;transition:background-color var(--internal-transition-base), border-color var(--internal-transition-base), box-shadow var(--internal-transition-base)}.tickets-wrapper>.ticket-section:last-child{margin-bottom:0}.ticket-section.section-sold-out{position:relative}.ticket-section.section-sold-out .section-header{padding-bottom:var(--internal-spacing-md)}.ticket-section.section-sold-out .section-name,.ticket-section.section-sold-out .section-time,.ticket-section.section-sold-out .section-venue{opacity:0.8}.ticket-section.section-sold-out .admissions-list{opacity:0.6;filter:grayscale(0.3)}.ticket-section.section-sold-out .admission-card{background:var(--internal-card)}.ticket-section.section-sold-out .quantity-controls,.ticket-section.section-sold-out .sold-out-controls{opacity:0.7}.section-header{padding:var(--internal-spacing-md) var(--internal-spacing-lg);border-bottom:1px solid var(--internal-border);background:var(--internal-card)}.section-name{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);letter-spacing:-0.025em;margin:0 0 var(--internal-spacing-xs) 0;display:flex;align-items:center;gap:var(--internal-spacing-sm)}.section-time,.section-venue{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);display:flex;align-items:center;gap:var(--internal-spacing-xs)}.section-time,.admission-time{margin-bottom:var(--internal-spacing-xs)}.section-time svg,.section-venue svg,.admission-time svg,.admission-venue svg{width:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs));height:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs));flex-shrink:0;opacity:0.8}.admissions-list{padding:0}.admission-card{border-bottom:1px solid var(--internal-border);padding:var(--internal-spacing-md) var(--internal-spacing-lg);position:relative;transition:background-color var(--internal-transition-base);cursor:default}.admission-card:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-2px;z-index:1}.admission-card.sold-out{background:var(--internal-card)}.admission-card.unavailable{opacity:0.72}.admission-card.sold-out .admission-price{opacity:0.5}.admission-card:last-child{border-bottom:none}.admission-content{display:flex;justify-content:space-between;align-items:center}.admission-details{flex:1}.admission-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--internal-spacing-md);margin-bottom:var(--internal-spacing-sm)}.admission-header-text{flex:1;min-width:0}.admission-title{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);margin-bottom:0;display:flex;align-items:center;gap:var(--internal-spacing-sm)}.admission-subtitle{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);margin-top:var(--internal-spacing-xs);line-height:1.4}.more-info-badge{display:inline-flex;align-items:center;gap:calc(var(--internal-spacing-xs) * 1.5);padding:calc(var(--internal-spacing-xs) * 1.5) var(--internal-spacing-sm);background:oklch(from var(--internal-info) l c h / 0.08);color:var(--internal-info-foreground);border-radius:calc(var(--internal-radius) - 2px);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);cursor:pointer;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), color var(--internal-transition-fast);white-space:nowrap;flex-shrink:0}.more-info-badge:hover{background:oklch(from var(--internal-info) l c h / 0.16)}.more-info-badge:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.more-info-badge svg{flex-shrink:0}.admission-time,.admission-venue{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);display:flex;align-items:center;gap:var(--internal-spacing-xs)}.admission-venue{margin-bottom:var(--internal-spacing-sm)}.solo-admission .admission-content{flex-direction:column;align-items:stretch}.solo-admission .admission-details{width:100%}.solo-admission .admission-price-info{margin-top:var(--internal-spacing-md);display:flex;justify-content:space-between;align-items:center;width:100%}.solo-admission .quantity-controls{margin-left:auto;flex-shrink:0}.admission-price-info{display:flex;align-items:center;justify-content:space-between;gap:var(--internal-spacing-sm);margin-bottom:var(--internal-spacing-sm);width:100%}.admission-price-wrapper{display:flex;flex-direction:column;row-gap:calc(var(--internal-spacing-xs) * 0.5)}.admission-price{color:var(--internal-foreground);font-size:var(--internal-font-size-xl);font-weight:var(--internal-font-weight-bold);letter-spacing:-0.025em;line-height:1.1}.admission-price-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--internal-spacing-sm)}.admission-price-original{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-base);text-decoration:line-through}.admission-booking-fee{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2}.admission-savings,.admission-availability{font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2}.admission-savings{color:var(--internal-success)}.admission-availability{color:var(--internal-warning)}.admission-sale-label{display:block;margin-top:var(--internal-spacing-xs);color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-medium);line-height:1.35}.admission-sale-label.success{color:var(--internal-success)}.quantity-controls{display:inline-flex;align-items:center;gap:0;background:var(--internal-secondary);border-radius:calc(var(--internal-radius) - 2px);overflow:hidden;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), box-shadow var(--internal-transition-fast)}.quantity-controls:has(.quantity-value:focus-visible){box-shadow:0 0 0 2px var(--internal-ring)}.quantity-btn{width:calc(var(--internal-spacing-lg) * 1.5);height:calc(var(--internal-spacing-lg) * 1.5);border:none;background:transparent;color:var(--internal-muted-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-medium);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color var(--internal-transition-fast), color var(--internal-transition-fast), opacity var(--internal-transition-fast), transform var(--internal-transition-fast);position:relative}.quantity-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-2px;z-index:1}.quantity-btn:hover:not(:disabled){background:var(--internal-accent);color:var(--internal-accent-foreground)}.quantity-btn:active:not(:disabled){transform:scale(0.95)}.quantity-btn:disabled{opacity:0.6;cursor:not-allowed;background:var(--internal-secondary);color:var(--internal-muted-foreground);border-color:var(--internal-border)}.quantity-btn.decrease{border-right:1px solid var(--internal-input)}.quantity-btn.increase{border-left:1px solid var(--internal-input)}.quantity-value{appearance:textfield;width:2.75rem;height:calc(var(--internal-spacing-lg) * 1.5);border:none;background:transparent;min-width:2.5rem;text-align:center;font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);color:var(--internal-foreground);padding:0 var(--internal-spacing-xs)}.quantity-value:focus-visible{outline:none}.quantity-value::-webkit-inner-spin-button,.quantity-value::-webkit-outer-spin-button{appearance:none;margin:0}.quantity-value:disabled{opacity:0.6;cursor:not-allowed}.sold-out-controls{display:inline-flex;align-items:center;justify-content:center;min-width:calc(var(--internal-spacing-lg) * 1.5 * 2 + 2.5rem);height:calc(var(--internal-spacing-lg) * 1.5);padding:0;background:transparent;border:none;box-shadow:none}.sold-out-controls,.sold-out-text{color:var(--internal-destructive);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);letter-spacing:0.025em;text-transform:uppercase}.sold-out-controls.success,.sold-out-controls.success .sold-out-text{color:var(--internal-success)}.checkout-actions{margin:var(--internal-spacing-lg) 0 0 0;width:100%}.coupon-panel{margin-bottom:var(--internal-spacing-md)}.coupon-row{position:relative;display:flex;align-items:center;width:100%;min-width:0;overflow:hidden;background:var(--internal-background);background-clip:padding-box;border-radius:var(--internal-radius);transition:border-color var(--internal-transition-fast)}.coupon-row:focus-within{border-color:var(--internal-ring)}.coupon-row:has(input[aria-invalid="true"]){border-color:var(--internal-destructive)}.coupon-row:has(input:disabled){opacity:0.64}.coupon-row input{width:100%;min-width:0;padding:calc(var(--internal-spacing-sm) - 1px) calc(var(--internal-spacing-xl) * 2.75) calc(var(--internal-spacing-sm) - 1px) calc(var(--internal-spacing-md) - 1px);background:var(--internal-card);color:var(--internal-foreground);border:none;border-radius:inherit;font:inherit;font-size:var(--internal-font-size-sm);line-height:1.25rem;outline:none}.coupon-row input::placeholder{color:oklch(from var(--internal-muted-foreground) l c h / 0.64)}.coupon-row input:disabled{cursor:not-allowed}.coupon-apply,.coupon-remove{position:absolute;right:calc((var(--internal-spacing-xs) * 1.5) - 3px);top:50%;transform:translateY(-50%);padding:calc(var(--internal-spacing-xs) * 1.25) var(--internal-spacing-sm);background:var(--internal-secondary);color:var(--internal-foreground);border-radius:calc(var(--internal-radius) - 2px);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);cursor:pointer;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), color var(--internal-transition-fast), opacity var(--internal-transition-fast)}.coupon-apply:hover:not(:disabled),.coupon-remove:hover:not(:disabled){background:oklch(from var(--internal-accent) l c h / 0.8)}.coupon-apply:focus-visible,.coupon-remove:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-1px}.coupon-apply:disabled,.coupon-remove:disabled{opacity:0.6;cursor:not-allowed}.checkout-btn{width:100%;padding:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs)) var(--internal-spacing-lg);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-bold);line-height:1.25;position:relative;overflow:hidden}.checkout-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.checkout-btn:active:not(:disabled){transform:translateY(0)}.checkout-btn:disabled{opacity:0.5;cursor:not-allowed}.checkout-spinner-wrapper{display:inline-flex;align-items:center;justify-content:center;height:1.25em;vertical-align:middle}.checkout-spinner{width:1.125em;height:1.125em;animation:checkout-spinner 0.8s linear infinite}@keyframes checkout-spinner{to{transform:rotate(360deg)}}.sticky-checkout-bar{position:fixed;right:0;bottom:0;left:0;z-index:40;display:none;padding:var(--internal-spacing-md) var(--internal-spacing-md) calc(var(--internal-spacing-md) + env(safe-area-inset-bottom, 0px));background:var(--internal-card);border-top:1px solid var(--internal-border);box-shadow:var(--internal-shadow-lg)}.sticky-door-info{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--internal-spacing-xs) * 0.5);min-height:2.75rem;padding:var(--internal-spacing-sm) var(--internal-spacing-md);color:var(--internal-foreground);background:var(--internal-secondary);border:1px solid var(--internal-border);border-radius:calc(var(--internal-radius) - 2px);text-align:center}.sticky-door-info strong{font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);line-height:1.25}.sticky-door-info span{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-xs);line-height:1.3}.sticky-checkout-btn.selection-prompt{animation:selection-prompt-shake 400ms ease-in-out}@keyframes selection-prompt-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}.error-message{background:oklch( from var(--internal-destructive) calc(l + 0.4) calc(c * 0.2) h / 0.05 );border:1px solid oklch(from var(--internal-destructive) l c h / 0.2);color:var(--internal-destructive);padding:var(--internal-spacing-sm) var(--internal-spacing-md);border-radius:var(--internal-radius);margin-bottom:var(--internal-spacing-md);font-size:var(--internal-font-size-sm);line-height:1.4}.inline-status{display:flex;align-items:center;gap:var(--internal-spacing-sm);margin-bottom:var(--internal-spacing-md);color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.4}.inline-retry-btn{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;margin-top:var(--internal-spacing-sm);padding:calc(var(--internal-spacing-xs) * 1.5) var(--internal-spacing-md);background:var(--internal-primary);color:var(--internal-primary-foreground);border:1px solid oklch(from var(--internal-primary) calc(l - 0.08) c h);border-radius:calc(var(--internal-radius) - 2px);box-shadow:var(--internal-shadow-edge-light);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);cursor:pointer;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), opacity var(--internal-transition-fast), transform var(--internal-transition-fast)}.inline-retry-btn:hover:not(:disabled){background:oklch(from var(--internal-primary) calc(l - 0.08) c h);transform:translateY(-1px)}.inline-retry-btn:disabled{opacity:0.5;cursor:not-allowed}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}@media (min-width: 768px){.ticket-section{border-radius:var(--internal-radius);margin:0 0 var(--internal-spacing-md) 0}}@media (max-width: 767px){:host([data-sticky-checkout="true"]) .checkout-actions>.checkout-btn,:host([data-sticky-checkout="true"]) .inline-external-ticket-button{display:none}.sticky-checkout-bar{display:block}:host([data-sticky-checkout="true"]) .session-services-ticketing-container{padding-bottom:calc(6.5rem + env(safe-area-inset-bottom, 0px))}}.modal-backdrop{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:var(--internal-spacing-md);background:var(--internal-backdrop);backdrop-filter:blur(4px);overscroll-behavior:contain;animation:modal-backdrop-fade-in var(--internal-transition-base) ease-out}@keyframes modal-backdrop-fade-in{from{opacity:0}to{opacity:1}}.modal-content{position:relative;width:100%;max-width:32rem;max-height:calc(100vh - var(--internal-spacing-xl) * 2);overflow-y:auto;overscroll-behavior:contain;background:var(--internal-popover);color:var(--internal-popover-foreground);border:1px solid var(--internal-border);border-radius:var(--internal-radius);padding:var(--internal-spacing-lg);box-shadow:var(--internal-shadow-xl);animation:modal-content-scale-in var(--internal-transition-base) ease-out}@keyframes modal-content-scale-in{from{opacity:0;transform:scale(0.98)}to{opacity:1;transform:scale(1)}}.modal-close-btn{position:absolute;top:var(--internal-spacing-sm);right:var(--internal-spacing-sm);display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;background:transparent;border:1px solid transparent;border-radius:calc(var(--internal-radius) - 4px);color:var(--internal-muted-foreground);cursor:pointer;opacity:0.72;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), color var(--internal-transition-fast), opacity var(--internal-transition-fast)}.modal-close-btn:hover{opacity:1;background:var(--internal-accent)}.modal-close-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:1px;opacity:1}.modal-header{margin-bottom:var(--internal-spacing-md);padding-right:var(--internal-spacing-xl)}.modal-title{font-size:var(--internal-font-size-xl);font-weight:var(--internal-font-weight-semibold);color:var(--internal-foreground);margin:0;line-height:1.2}.modal-subtitle{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);margin-top:var(--internal-spacing-xs);line-height:1.4}.modal-description{color:var(--internal-foreground);font-size:var(--internal-font-size-base);line-height:1.6;white-space:pre-wrap;margin:0}@media (prefers-reduced-motion: reduce){:host,*{scroll-behavior:auto !important}.admission-card.loading-admission,.checkout-spinner,.sticky-checkout-btn.selection-prompt,.modal-backdrop,.modal-content{animation:none}.external-ticket-button,.checkout-btn,.ticket-section,.more-info-badge,.quantity-controls,.quantity-btn,.coupon-row,.coupon-apply,.coupon-remove,.inline-retry-btn,.modal-close-btn{transition:none}}'}},[513,"session-services-ticketing",{tenantId:[1,"tenant-id"],eventId:[1,"event-id"],apiUrl:[1,"api-url"],locale:[1],returnUrl:[1,"return-url"],couponCode:[1,"coupon-code"],initialAdmissionPrices:[1,"initial-admission-prices"],initialPreviewQuote:[1,"initial-preview-quote"],passcode:[1],stickyCheckout:[4,"sticky-checkout"],theme:[1],enableAnalytics:[4,"enable-analytics"],debugAnalytics:[4,"debug-analytics"],event:[32],selectedItems:[32],quote:[32],previewQuote:[32],initialLoading:[32],eventLoading:[32],retryLoading:[32],passcodeLoading:[32],error:[32],errorKind:[32],refreshError:[32],quoteLoading:[32],previewLoading:[32],quoteError:[32],couponError:[32],couponInput:[32],appliedCouponCode:[32],passcodeInput:[32],activePasscode:[32],passcodeDenied:[32],selectionPrompt:[32],checkoutLoading:[32],checkoutError:[32],currentTheme:[32],openModalAdmissionId:[32],verificationRequired:[32]},void 0,{tenantId:[{propsChanged:0}],eventId:[{propsChanged:0}],apiUrl:[{propsChanged:0}],passcode:[{propsChanged:0}],couponCode:[{couponCodeChanged:0}],initialAdmissionPrices:[{couponCodeChanged:0}],initialPreviewQuote:[{couponCodeChanged:0}],theme:[{themeChanged:0}]}]);function LE(){"undefined"!=typeof customElements&&["session-services-ticketing"].forEach((t=>{"session-services-ticketing"===t&&(customElements.get(e(t))||customElements.define(e(t),ME))}))}LE();const jE=ME,qE=LE;export{jE as SessionServicesTicketing,qE as defineCustomElement}
|