tonightpass 0.0.264 → 0.0.266
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var pathcat=require('pathcat'),oi=require('redaxios');require('reflect-metadata');var classValidator=require('class-validator'),classTransformer=require('class-transformer');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var oi__default=/*#__PURE__*/_interopDefault(oi);var Jr=Object.defineProperty;var n=(e,t)=>Jr(e,"name",{value:t,configurable:true});var Go="https://api.tonightpass.com";var c={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,INLINE:{EMAIL:/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}/gi,URL:/(https?:\/\/[^\s<>"'`[\](){}|\\^]+)/gi,USER_MENTION:/@([a-zA-Z0-9_.-]+)/g,ARTIST_MENTION:/\+([a-zA-Z0-9_.-]+)/g},NAME:/^[a-zA-ZÀ-ÿ0-9-\s]+$/,SLUG:/^[a-z0-9_.]+$/,USERNAME:/^(?!\.)(?!.*\.\.)(?!.*\.$)[a-z0-9_.]{3,48}$/,PHONE:/^\+(?:[0-9] ?){6,14}[0-9]$/,PASSWORD:/^(?=.*[A-Z])(?=.*[a-z])(?=.*[\d\W]).{8,}$/,PASSWORD_MIN_LENGTH:/^.{8,}$/,PASSWORD_UPPERCASE:/^(?=.*[A-Z])/,PASSWORD_LOWERCASE:/^(?=.*[a-z])/,PASSWORD_NUMBER_SPECIAL:/^(?=.*[\d\W])/,IMAGE_URL:/^(https:\/\/|http:\/\/)(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_+.~#?&//=]*)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)$/i,ORGANIZATION_AVATAR_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//,ORGANIZATION_BANNER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//,EVENT_FLYER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,EVENT_FLYER_URL_UPDATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com|cdn\.payload\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/|[\w-]+\.\w+$)/,EVENT_TRAILER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,EVENT_TRAILER_URL_UPDATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com|cdn\.payload\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/|[\w-]+\.\w+$)/,USER_AVATAR_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//,USER_AVATAR_URL_CREATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(users\/[\w-]+\/avatars\/|temp\/users\/avatars\/)/,USER_BANNER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/banners\//,CHANNEL_MESSAGE_ATTACHMENT:/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,USER_POST_MEDIA_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/posts\/media\/|users\/[\w-]+\/posts\/[\w-]+\/media\/)/};var cp=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),l=function(e){return e.Owner="owner",e.Admin="admin",e.Manager="manager",e.Member="member",e}({});var lp=function(e){return e.Follow="follow",e.OrganizationEventCancelled="organization_event_cancelled",e.OrganizationEventPostponed="organization_event_postponed",e.OrganizationEventRescheduled="organization_event_rescheduled",e}({});var up=function(e){return e.Image="image",e.Video="video",e}({});var C=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var xp=function(e){return e.Authentication="authentication",e.BookingTicket="booking_ticket",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation",e}({});var it=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),Q=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),Ip=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Et={[l.Owner]:3,[l.Admin]:2,[l.Manager]:1,[l.Member]:0},Np={[it.Admin]:2,[it.Developer]:1,[it.User]:0};var st=class{static{n(this,"MemoryCacheStore");}cache=new Map;maxSize;constructor(t=1e3){this.maxSize=t;}async get(t){return this.cache.get(t)??null}async set(t,o){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){let i=this.cache.keys().next().value;i!==void 0&&this.cache.delete(i);}this.cache.set(t,o);}async delete(t){this.cache.delete(t);}async clear(){this.cache.clear();}async size(){return this.cache.size}async keys(){return Array.from(this.cache.keys())}};var Fe=class{static{n(this,"CacheManager");}store;options;constructor(t){this.options={enabled:t.enabled,ttl:t.ttl??6e4,maxSize:t.maxSize??1e3,methods:t.methods??["GET"]},this.store=t.store??new st(this.options.maxSize);}generateKey(t,o){return `${t}:${o}`}shouldCache(t){return this.options.enabled&&this.options.methods.includes(t)}isValid(t){return Date.now()-t.timestamp<this.options.ttl}async get(t,o){if(!this.shouldCache(t))return null;let i=this.generateKey(t,o),s=await this.store.get(i);return s?this.isValid(s)?s.data:(await this.store.delete(i),null):null}async set(t,o,i){if(!this.shouldCache(t))return;let s=this.generateKey(t,o);await this.store.set(s,{data:i,timestamp:Date.now()});}async clear(){await this.store.clear();}async stats(){return {size:await this.store.size(),keys:await this.store.keys()}}};var Ut={name:"tonightpass",version:"0.0.264"};var at=function(e){return e.USD="USD",e.EUR="EUR",e.GBP="GBP",e.ARS="ARS",e.AWG="AWG",e.BBD="BBD",e.BMD="BMD",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BZD="BZD",e.CAD="CAD",e.CLP="CLP",e.COP="COP",e.CRC="CRC",e.DOP="DOP",e.FKP="FKP",e.GTQ="GTQ",e.GYD="GYD",e.HNL="HNL",e.HTG="HTG",e.JMD="JMD",e.KYD="KYD",e.MXN="MXN",e.NIO="NIO",e.PAB="PAB",e.PEN="PEN",e.PYG="PYG",e.SRD="SRD",e.TTD="TTD",e.UYU="UYU",e.XCD="XCD",e.ALL="ALL",e.BAM="BAM",e.BGN="BGN",e.BYN="BYN",e.CHF="CHF",e.CZK="CZK",e.DKK="DKK",e.GEL="GEL",e.GIP="GIP",e.HUF="HUF",e.ISK="ISK",e.MDL="MDL",e.MKD="MKD",e.NOK="NOK",e.PLN="PLN",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.SEK="SEK",e.TRY="TRY",e.UAH="UAH",e.AED="AED",e.AFN="AFN",e.AMD="AMD",e.AZN="AZN",e.BDT="BDT",e.BND="BND",e.CNY="CNY",e.HKD="HKD",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.JPY="JPY",e.KGS="KGS",e.KHR="KHR",e.KRW="KRW",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MVR="MVR",e.MYR="MYR",e.NPR="NPR",e.PHP="PHP",e.PKR="PKR",e.QAR="QAR",e.SAR="SAR",e.SGD="SGD",e.THB="THB",e.TJS="TJS",e.TWD="TWD",e.UZS="UZS",e.VND="VND",e.YER="YER",e.AOA="AOA",e.BWP="BWP",e.CDF="CDF",e.CVE="CVE",e.DJF="DJF",e.DZD="DZD",e.EGP="EGP",e.ETB="ETB",e.GMD="GMD",e.GNF="GNF",e.KES="KES",e.KMF="KMF",e.LRD="LRD",e.LSL="LSL",e.MAD="MAD",e.MGA="MGA",e.MUR="MUR",e.MWK="MWK",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.RWF="RWF",e.SCR="SCR",e.SHP="SHP",e.SLE="SLE",e.SOS="SOS",e.STD="STD",e.SZL="SZL",e.TZS="TZS",e.UGX="UGX",e.XAF="XAF",e.XOF="XOF",e.ZAR="ZAR",e.ZMW="ZMW",e.ANG="ANG",e.AUD="AUD",e.BIF="BIF",e.FJD="FJD",e.NZD="NZD",e.PGK="PGK",e.SBD="SBD",e.TOP="TOP",e.VUV="VUV",e.WST="WST",e.XCG="XCG",e.XPF="XPF",e}({}),Ko=["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","UGX","VND","VUV","XAF","XOF","XPF"],Ho={USD:50,AED:200,ARS:50,AUD:50,BRL:50,CAD:50,CHF:50,COP:50,CZK:1500,DKK:250,EUR:50,GBP:30,HKD:400,HUF:17500,IDR:50,ILS:50,INR:50,JPY:50,KRW:50,MXN:1e3,MYR:200,NOK:300,NZD:50,PHP:50,PLN:200,RON:200,RUB:50,SEK:300,SGD:50,THB:1e3,ZAR:50};function Ft(e){return Ko.includes(e)}n(Ft,"isZeroDecimalCurrency");function Jp(e,t){return Ft(t)?Math.round(e):Math.round(e*100)}n(Jp,"toSmallestUnit");function Qr(e,t){return Ft(t)?e:e/100}n(Qr,"fromSmallestUnit");var Bt=new Map;function Vo(e){let t=Bt.get(e);if(t)return t;try{let o=new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(s=>s.type==="currency")?.value,i=o&&o.toUpperCase()!==e?o:e;return Bt.set(e,i),i}catch{return Bt.set(e,e),e}}n(Vo,"getCurrencySymbol");function Cp(e){let t=Vo(e);return t!==e?`${e} (${t})`:e}n(Cp,"formatCurrencyLabel");function Qp(e,t,o){let i=Vo(t);if(e==null)return o?.emptyPlaceholder??`--.-- ${i}`;if(e===0)return o?.freeLabel??"Free";let s=Qr(e,t),r=Ft(t)?0:2;return `${s.toFixed(r)} ${i}`}n(Qp,"formatPrice");var ec=function(e){return e.Europe="Europe",e.NonEurope="Non Europe",e}({}),Ie=95,tc=Ie,To={transactionFee:25,europeRate:1.5,nonEuropeRate:3.25,connectRate:.25},Wo={percentage:50,minimumCommission:Ie},Zo={locality:"Europe"};function oc(e){let t=Ho[e];return t?Math.max(t,Ie):Ie}n(oc,"getMinimumChargeableAmount");function ei(e,t,o=To,i=Wo,s=Zo){if(e<=0)return 0;let a=(s.locality==="Europe"?o.europeRate:o.nonEuropeRate)*e/100,p=o.connectRate*e/100,f=o.transactionFee+a+p,k=i.minimumCommission;return Math.max(t?f+f*i.percentage/100:f/(1-i.percentage/100),k)}n(ei,"calculateTicketFee");function ti(e,t,o,i=To,s=Zo){return ei(e,t,i,{...Wo,minimumCommission:o},s)}n(ti,"calculateTicketFeeWithCurrency");function nc(e,t=Ie){let o=0,i=0,s=0;for(let p of e){let f=Math.round(ti(p.unitAmount,p.isFeesIncluded,t));o+=p.unitAmount*p.quantity,i+=f*p.quantity,p.isFeesIncluded&&(s+=f*p.quantity);}let r=Math.min(s,o),a=o+i-r;return {subtotal:o,fees:i,includedFees:r,total:a}}n(nc,"calculateOrderTotal");function rc(e,t=Ie){return e<=0?e:e<t?t:e}n(rc,"applyMinimumChargeableAmount");var Ae=typeof window<"u";function ee(e,t){let o=new FormData,i=n(s=>s!==null&&typeof s=="object"&&"uri"in s&&"name"in s&&"type"in s,"isFileObject");if(typeof File<"u"&&t instanceof File)o.append(e,t);else if(typeof FileList<"u"&&t instanceof FileList)for(let s of Array.from(t))o.append(e,s);else if(i(t))o.append(e,t);else if(Array.isArray(t))for(let s of t)o.append(e,s);return o}n(ee,"buildFileFormData");function fc(e,t){return Et[e]>=Et[t]}n(fc,"isMemberRoleAtLeast");var ni=oi__default.default.create({headers:{Accept:"application/json",...!Ae&&{"User-Agent":`${Ut.name}/${Ut.version}`}},responseType:"json",transformRequest:[(e,t)=>{if(e instanceof FormData){if(t&&typeof t=="object"){let o={};for(let[i,s]of Object.entries(t)){let r=i.toLowerCase();r!=="content-type"&&(o[r]=s);}Object.keys(t).forEach(i=>delete t[i]),Object.assign(t,o);}return e}if(e!=null)return t&&(t["Content-Type"]="application/json"),JSON.stringify(e)}],withCredentials:Ae}),qo=n(async(e,t)=>{let{apiKey:o,accessToken:i,...s}=t||{},r={...s.headers,...o&&{"X-API-Key":o},...i&&{Authorization:`Bearer ${i}`}};return ni(e,{...s,headers:r}).then(p=>p).catch(p=>{throw p.data?new Ge(p,p.data):(console.error(p),p)})},"request");var Ge=class extends Error{static{n(this,"TonightPassAPIError");}response;data;status;constructor(t,o){super(o.message),this.response=t,this.data=o,this.status=t.status;}},pt=class{static{n(this,"Client");}apiKey;accessToken;cacheManager;baseURL;url;constructor(t){this.baseURL=t.baseURL||Go,this.apiKey=t.apiKey,this.accessToken=t.accessToken,this.url=(o,i)=>pathcat.pathcat(this.baseURL,o,i),t.cache?.enabled&&(this.cacheManager=new Fe(t.cache));}setOptions(t){t.baseURL&&(this.baseURL=t.baseURL),this.apiKey=t.apiKey,this.accessToken=t.accessToken,t.cache?.enabled?this.cacheManager=new Fe(t.cache):this.cacheManager=void 0;}setAccessToken(t){this.accessToken=t;}async clearCache(){await this.cacheManager?.clear();}async getCacheStats(){return this.cacheManager?.stats()}async get(t,o,i){return this.requester("GET",t,void 0,o,i)}async post(t,o,i,s){return this.requester("POST",t,o,i,s)}async put(t,o,i,s){return this.requester("PUT",t,o,i,s)}async patch(t,o,i,s){return this.requester("PATCH",t,o,i,s)}async delete(t,o,i,s){return this.requester("DELETE",t,o,i,s)}async requester(t,o,i,s={},r={}){let a=this.url(o,s);if(i!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");if(this.cacheManager){let k=await this.cacheManager.get(t,a);if(k!==null)return k}let p=await qo(a,{method:t,data:i,apiKey:this.apiKey,accessToken:this.accessToken,...r}),f=p.data;if(!f.success)throw new Ge(p,f);return this.cacheManager&&await this.cacheManager.set(t,a,f.data),f.data}};var te=function(e){return e.PUBLIC="public",e.INTERNAL="internal",e}({}),oe=function(e){return e.User="user",e.App="app",e}({});function ct(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(ct,"_ts_decorate");function dt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(dt,"_ts_metadata");var _e=class{static{n(this,"CreateApiKeyDto");}name;type;tier;allowedOrigins};ct([classValidator.IsString(),classValidator.Length(1,100),dt("design:type",String)],_e.prototype,"name",void 0);ct([classValidator.IsEnum(oe),classValidator.IsOptional(),dt("design:type",typeof oe>"u"?Object:oe)],_e.prototype,"type",void 0);ct([classValidator.IsEnum(te),classValidator.IsOptional(),dt("design:type",typeof te>"u"?Object:te)],_e.prototype,"tier",void 0);ct([classValidator.IsArray(),classValidator.IsUrl({require_protocol:true,require_tld:false},{each:true,message:"Each allowed origin must be a valid URL"}),classValidator.ArrayMaxSize(20),classValidator.IsOptional(),dt("design:type",Array)],_e.prototype,"allowedOrigins",void 0);function Ke(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Ke,"_ts_decorate");function He(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(He,"_ts_metadata");var he=class{static{n(this,"UpdateApiKeyDto");}name;isActive;type;tier;allowedOrigins};Ke([classValidator.IsString(),classValidator.IsOptional(),classValidator.Length(1,100),He("design:type",String)],he.prototype,"name",void 0);Ke([classValidator.IsBoolean(),classValidator.IsOptional(),He("design:type",Boolean)],he.prototype,"isActive",void 0);Ke([classValidator.IsEnum(oe),classValidator.IsOptional(),He("design:type",typeof oe>"u"?Object:oe)],he.prototype,"type",void 0);Ke([classValidator.IsEnum(te),classValidator.IsOptional(),He("design:type",typeof te>"u"?Object:te)],he.prototype,"tier",void 0);Ke([classValidator.IsArray(),classValidator.IsUrl({require_protocol:true,require_tld:false},{each:true,message:"Each allowed origin must be a valid URL"}),classValidator.ArrayMaxSize(20),classValidator.IsOptional(),He("design:type",Array)],he.prototype,"allowedOrigins",void 0);function yi(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(yi,"_ts_decorate");function hi(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(hi,"_ts_metadata");var Kt=class{static{n(this,"AddParticipantDto");}username};yi([classValidator.IsString(),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),hi("design:type",String)],Kt.prototype,"username",void 0);var Yc=function(e){return e.Google="google",e.Facebook="facebook",e.Twitter="twitter",e}({}),kc=function(e){return e.SignUp="signup",e.SignIn="signin",e}({});var Cc=function(e){return e.All="ALL",e.Online="ONLINE",e.Archived="ARCHIVED",e}({}),Qc=function(e){return e.Onsite="ONSITE",e.Remote="REMOTE",e.Hybrid="HYBRID",e}({}),ed=function(e){return e.Anywhere="ANYWHERE",e.Country="COUNTRY",e}({});var ft=function(e){return e.Dislike="dislike",e.HarassmentSelf="harassment_self",e.HarassmentOther="harassment_other",e.SexualHarassmentSelf="sexual_harassment_self",e.NudesSelf="nudes_self",e.SexualContent="sexual_content",e.ChildInvolved="child_involved",e.ThreatTarget="threat_target",e.ViolentContent="violent_content",e.HateSpeech="hate_speech",e.Terrorism="terrorism",e.DrugSale="drug_sale",e.WeaponSale="weapon_sale",e.SelfHarmConcern="self_harm_concern",e.SelfHarmPromotion="self_harm_promotion",e.Other="other",e}({});var ve=function(e){return e.Private="private",e.Group="group",e}({}),nd=function(e){return e.Member="member",e.Admin="admin",e}({}),rd=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var ad=function(e){return e.AuthEmailAlreadyExists="auth.email-already-exists",e.AuthUsernameAlreadyExists="auth.username-already-exists",e.AuthPhoneNumberAlreadyExists="auth.phone-number-already-exists",e.AuthInvalidCredentials="auth.invalid-credentials",e.AuthUserNotFound="auth.user-not-found",e.AuthInvalidToken="auth.invalid-token",e.AuthTokenExpired="auth.token-expired",e.AuthUnauthorized="auth.unauthorized",e.AuthPasswordMismatch="auth.password-mismatch",e.AuthInvalidOAuth2Provider="auth.invalid-oauth2-provider",e.AuthOAuth2Error="auth.oauth2-error",e.UserNotFound="user.not-found",e.UserInvalidUsername="user.invalid-username",e.UserInvalidEmail="user.invalid-email",e.UserInvalidPhoneNumber="user.invalid-phone-number",e.UserInvalidPassword="user.invalid-password",e.UserInvalidBirthDate="user.invalid-birth-date",e.UserInvalidGender="user.invalid-gender",e.UserInvalidRole="user.invalid-role",e.UserInvalidPreferences="user.invalid-preferences",e.UserInvalidLocation="user.invalid-location",e.UserInvalidFile="user.invalid-file",e.UserFileTooLarge="user.file-too-large",e.UserUnsupportedFileType="user.unsupported-file-type",e.OrganizationNotFound="organization.not-found",e.OrganizationInvalidSlug="organization.invalid-slug",e.OrganizationInvalidName="organization.invalid-name",e.OrganizationInvalidDescription="organization.invalid-description",e.OrganizationInvalidLocation="organization.invalid-location",e.OrganizationInvalidSocialLink="organization.invalid-social-link",e.OrganizationAlreadyExists="organization.already-exists",e.OrganizationUnauthorized="organization.unauthorized",e.OrganizationMemberNotFound="organization.member-not-found",e.OrganizationMemberInvalidRole="organization.member-invalid-role",e.OrganizationMemberAlreadyExists="organization.member-already-exists",e.EventNotFound="event.not-found",e.EventInvalidTitle="event.invalid-title",e.EventInvalidDescription="event.invalid-description",e.EventInvalidLocation="event.invalid-location",e.EventInvalidDates="event.invalid-dates",e.EventInvalidTickets="event.invalid-tickets",e.EventInvalidStyles="event.invalid-styles",e.EventInvalidType="event.invalid-type",e.EventInvalidVisibility="event.invalid-visibility",e.EventUnavailable="event.unavailable",e.EventTicketNotFound="event.ticket-not-found",e.EventTicketUnavailable="event.ticket-unavailable",e.EventTicketInvalidQuantity="event.ticket-invalid-quantity",e.OrderNotFound="order.not-found",e.OrderInvalidStatus="order.invalid-status",e.OrderInvalidPayment="order.invalid-payment",e.OrderPaymentFailed="order.payment-failed",e.OrderAlreadyPaid="order.already-paid",e.OrderCancelled="order.cancelled",e.OrderRefunded="order.refunded",e.OrderExpired="order.expired",e.BookingNotFound="booking.not-found",e.BookingInvalidStatus="booking.invalid-status",e.BookingInvalidTickets="booking.invalid-tickets",e.BookingTicketNotFound="booking.ticket-not-found",e.BookingTicketInvalidToken="booking.ticket-invalid-token",e.BookingTicketExpired="booking.ticket-expired",e.BookingTicketUsed="booking.ticket-used",e.FileNotFound="file.not-found",e.FileInvalidType="file.invalid-type",e.FileTooLarge="file.too-large",e.FileUploadFailed="file.upload-failed",e.ValidationError="validation.error",e.DatabaseError="database.error",e.InternalServerError="server.internal-error",e.NotFound="not-found",e.BadRequest="bad-request",e.Unauthorized="unauthorized",e.Forbidden="forbidden",e.TooManyRequests="too-many-requests",e.ServiceUnavailable="service-unavailable",e.TooManyRequestsAuth="rate-limit.auth",e.TooManyRequestsApi="rate-limit.api",e.WebhookInvalidSignature="webhook.invalid-signature",e.WebhookInvalidEvent="webhook.invalid-event",e.WebhookProcessingFailed="webhook.processing-failed",e.PaymentRequired="payment.required",e.PaymentMethodRequired="payment.method-required",e.PaymentFailed="payment.failed",e.PaymentCancelled="payment.cancelled",e.PaymentRefunded="payment.refunded",e.BillingInvalidAccount="billing.invalid-account",e.BillingAccountRequired="billing.account-required",e.NotificationInvalidType="notification.invalid-type",e.NotificationSendingFailed="notification.sending-failed",e.CacheError="cache.error",e.CacheMiss="cache.miss",e.ExternalServiceError="external-service.error",e.ExternalServiceTimeout="external-service.timeout",e.ExternalServiceUnavailable="external-service.unavailable",e}({});var cd=function(e){return e.Following="following",e.Discover="discover",e}({});var fd=function(e){return e.Completed="completed",e.Pending="pending",e.Transferred="transferred",e.Cancelled="cancelled",e}({}),ld=function(e){return e.Pending="pending",e.Succeeded="succeeded",e.Failed="failed",e.RequiresAction="requires_action",e}({});var ne=function(e){return e.Percentage="percentage",e.Fixed="fixed",e}({});function yd(e,t=new Date){if(e.lifecycleStatus===lt.Cancelled)return be.Cancelled;if(e.lifecycleStatus===lt.Postponed)return be.Postponed;let o=e.startAt instanceof Date?e.startAt:new Date(e.startAt),i=e.endAt instanceof Date?e.endAt:new Date(e.endAt);return e.lifecycleStatus===lt.Rescheduled&&t<o?be.Rescheduled:o>t?be.Upcoming:o<=t&&i>=t?be.Ongoing:be.Ended}n(yd,"computeOrganizationEventStatus");var bd=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var re=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),ie=function(e){return e.Entry="entry",e.Package="package",e.Meal="meal",e.Drink="drink",e.Parking="parking",e.Accommodation="accommodation",e.Camping="camping",e.Locker="locker",e.Shuttle="shuttle",e.Other="other",e}({});var se=function(e){return e.Clubbing="clubbing",e.Concert="concert",e.Festival="festival",e.HouseParty="house_party",e.FriendsParty="friends_party",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Spectacle="spectacle",e.Cruise="cruise",e.OutsideAnimation="outside_animation",e.Sport="sport",e.Match="match",e.Seminar="seminar",e.Conference="conference",e.WellnessDay="wellness_day",e.Workshop="workshop",e.TradeFair="trade_fair",e.ConsumerShow="consumer_show",e.Membership="membership",e}({}),ae=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),Sd=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),be=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e.Cancelled="cancelled",e.Postponed="postponed",e.Rescheduled="rescheduled",e}({}),lt=function(e){return e.Cancelled="cancelled",e.Postponed="postponed",e.Rescheduled="rescheduled",e}({}),Id=function(e){return e.Organizer="organizer",e.Support="support",e.ExternalSource="external_source",e}({});var zd=function(e){return e.OrganizationCreated="organization_created",e.Follow="follow",e.OrganizationMemberInvited="organization_member_invited",e.OrganizationMemberJoined="organization_member_joined",e.OrganizationMemberLeft="organization_member_left",e.OrganizationMemberRoleUpdated="organization_member_role_updated",e.OrganizationEventCreated="organization_event_created",e.OrganizationEventUpdated="organization_event_updated",e.OrganizationEventCancelled="organization_event_cancelled",e.OrganizationEventPostponed="organization_event_postponed",e.OrganizationEventRescheduled="organization_event_rescheduled",e.OrganizationEventCancelRefundsCompleted="organization_event_cancel_refunds_completed",e.OrganizationEventCancelRefundsPartial="organization_event_cancel_refunds_partial",e.OrganizationEventMilestone="organization_event_milestone",e.OrderReceived="order_received",e.PayoutCompleted="payout_completed",e.BillingAccountConnected="billing_account_connected",e}({});var Md=function(e){return e.InvitationLink="invitation_link",e}({});var Ed=function(e){return e.Paid="paid",e.Pending="pending",e.InTransit="in_transit",e.Failed="failed",e.Canceled="canceled",e}({}),Ud=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Zd=function(e){return e.User="user",e.Organization="organization",e}({});var $d=["\u{1F44D}","\u2764\uFE0F","\u{1F389}","\u{1F440}","\u{1F680}"],Xd=function(e){return e.ComingSoon="coming-soon",e.Shipped="shipped",e}({});var kd=function(e){return e.FR="fr",e.EN="en",e}({});function Vt(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Vt,"_ts_decorate");function Tt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Tt,"_ts_metadata");var Te=class{static{n(this,"CreateChannelDto");}type;participantUsernames;name};Vt([classValidator.IsEnum(ve),Tt("design:type",typeof ve>"u"?Object:ve)],Te.prototype,"type",void 0);Vt([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ValidateIf(e=>e.type===ve.Private),classValidator.ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),classValidator.ValidateIf(e=>e.type===ve.Group),classValidator.ArrayMinSize(3,{message:"Group channels must have at least 3 participants"}),classValidator.ArrayMaxSize(50,{message:"Group channels can have at most 50 participants"}),classValidator.IsString({each:true}),classValidator.Matches(c.USERNAME,{each:true,message:"user.username.format"}),Tt("design:type",Array)],Te.prototype,"participantUsernames",void 0);Vt([classValidator.IsOptional(),classValidator.ValidateIf(e=>e.type===ve.Group),classValidator.IsString(),classValidator.Length(1,100),Tt("design:type",String)],Te.prototype,"name",void 0);function _i(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(_i,"_ts_decorate");function Oi(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Oi,"_ts_metadata");var Wt=class{static{n(this,"AddReactionDto");}emoji};_i([classValidator.IsString(),classValidator.Length(1,10),Oi("design:type",String)],Wt.prototype,"emoji",void 0);function Pi(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Pi,"_ts_decorate");var Oe=class{static{n(this,"ContentOrAttachmentsConstraint");}validate(t,o){let i=o.object,s=!!(i.content&&i.content.trim().length>0),r=!!(i.attachments&&i.attachments.length>0);return s||r}defaultMessage(){return "Either content or attachments must be provided"}};Oe=Pi([classValidator.ValidatorConstraint({name:"contentOrAttachments",async:false})],Oe);function Zt(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Zt,"_ts_decorate");function qt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(qt,"_ts_metadata");var We=class{static{n(this,"CreateChannelMessageDto");}content;attachments;replyToId};Zt([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.content!==void 0),classValidator.Length(1,1024),qt("design:type",String)],We.prototype,"content",void 0);Zt([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(10),classValidator.Matches(c.CHANNEL_MESSAGE_ATTACHMENT,{each:true}),classValidator.Validate(Oe),qt("design:type",Array)],We.prototype,"attachments",void 0);Zt([classValidator.IsOptional(),classValidator.IsMongoId(),qt("design:type",String)],We.prototype,"replyToId",void 0);function Co(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Co,"_ts_decorate");function Qo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Qo,"_ts_metadata");var mt=class{static{n(this,"ReportChannelMessageDto");}reason;description};Co([classValidator.IsEnum(ft),Qo("design:type",typeof ft>"u"?Object:ft)],mt.prototype,"reason",void 0);Co([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.description&&e.description.trim().length>0),classValidator.Length(1,500),Qo("design:type",String)],mt.prototype,"description",void 0);function Wi(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Wi,"_ts_decorate");function Zi(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Zi,"_ts_metadata");var Xt=class{static{n(this,"UpdateChannelMessageDto");}content};Wi([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,1024),Zi("design:type",String)],Xt.prototype,"content",void 0);function Yi(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Yi,"_ts_decorate");function ki(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ki,"_ts_metadata");var Yt=class{static{n(this,"UpdateChannelDto");}name};Yi([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,100),ki("design:type",String)],Yt.prototype,"name",void 0);function es(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(es,"_ts_decorate");var je=class{static{n(this,"CoordinatesRangeConstraint");}validate(t){if(!Array.isArray(t)||t.length!==2)return false;let[o,i]=t;return i>=-90&&i<=90&&o>=-180&&o<=180}defaultMessage(){return "Coordinates must be within valid geographic ranges"}};je=es([classValidator.ValidatorConstraint({name:"coordinatesRange",async:false})],je);var ut=n((e,t)=>{if(!e)return e;let o=e.split(",").map(J=>J.trim()),i=t.zipCode?.toLowerCase(),s=t.city?.toLowerCase(),r=t.country?.toLowerCase(),a=[i,s,r].filter(J=>!!J),p=i&&s?`${i} ${s}`:void 0,f=n(J=>{let Fo=J.toLowerCase();return !!(a.includes(Fo)||p&&Fo===p)},"isNoise"),k=[];for(let J of o)f(J)||k.push(J);return k.join(", ").trim()||e},"normalizeAddress");function pe(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(pe,"_ts_decorate");function ce(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ce,"_ts_metadata");var D=class{static{n(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point",this.coordinates=[0,0];}};pe([classValidator.IsString(),classValidator.IsNotEmpty(),ce("design:type",String)],D.prototype,"type",void 0);pe([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Validate(je),ce("design:type",Array)],D.prototype,"coordinates",void 0);var _=class{static{n(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),ce("design:type",String)],_.prototype,"name",void 0);pe([classTransformer.Transform(({value:e,obj:t})=>ut(e,{zipCode:t.zipCode,city:t.city,country:t.country})),classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),ce("design:type",String)],_.prototype,"address",void 0);pe([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),ce("design:type",String)],_.prototype,"zipCode",void 0);pe([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),ce("design:type",String)],_.prototype,"city",void 0);pe([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),ce("design:type",String)],_.prototype,"country",void 0);pe([classValidator.ValidateNested(),classTransformer.Type(()=>D),classValidator.IsNotEmpty(),ce("design:type",typeof D>"u"?Object:D)],_.prototype,"geometry",void 0);function Pe(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Pe,"_ts_decorate");function De(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(De,"_ts_metadata");var O=class{static{n(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};Pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),De("design:type",String)],O.prototype,"name",void 0);Pe([classValidator.IsOptional(),classTransformer.Transform(({value:e,obj:t})=>ut(e,{zipCode:t.zipCode,city:t.city,country:t.country})),classValidator.IsString(),classValidator.Length(1,256),De("design:type",String)],O.prototype,"address",void 0);Pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),De("design:type",String)],O.prototype,"zipCode",void 0);Pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),De("design:type",String)],O.prototype,"city",void 0);Pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),De("design:type",String)],O.prototype,"country",void 0);Pe([classValidator.IsOptional(),classValidator.ValidateNested(),classTransformer.Type(()=>D),De("design:type",typeof D>"u"?Object:D)],O.prototype,"geometry",void 0);function K(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(K,"_ts_decorate");function H(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(H,"_ts_metadata");var Ne=class{static{n(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};K([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),H("design:type",String)],Ne.prototype,"organizationSlug",void 0);K([classValidator.IsObject(),H("design:type",typeof G>"u"?Object:G)],Ne.prototype,"identity",void 0);K([classValidator.IsArray(),H("design:type",Array)],Ne.prototype,"members",void 0);K([classValidator.IsOptional(),classValidator.IsObject(),H("design:type",typeof Location>"u"?Object:Location)],Ne.prototype,"location",void 0);var G=class{static{n(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};K([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),H("design:type",String)],G.prototype,"displayName",void 0);K([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),H("design:type",String)],G.prototype,"description",void 0);K([classValidator.Matches(c.ORGANIZATION_AVATAR_URL,{message:"organization.avatar.url.invalid"}),H("design:type",String)],G.prototype,"avatarUrl",void 0);K([classValidator.IsOptional(),classValidator.Matches(c.ORGANIZATION_BANNER_URL,{message:"organization.banner.url.invalid"}),H("design:type",String)],G.prototype,"bannerUrl",void 0);K([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),H("design:type",Array)],G.prototype,"links",void 0);function gt(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(gt,"_ts_decorate");function yt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(yt,"_ts_metadata");var Me=class{static{n(this,"CancelOrganizationEventDto");}reason;refundOrders;notifyHolders;allowEndedCancel};gt([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,500),yt("design:type",String)],Me.prototype,"reason",void 0);gt([classValidator.IsOptional(),classValidator.IsBoolean(),yt("design:type",Boolean)],Me.prototype,"refundOrders",void 0);gt([classValidator.IsOptional(),classValidator.IsBoolean(),yt("design:type",Boolean)],Me.prototype,"notifyHolders",void 0);gt([classValidator.IsOptional(),classValidator.IsBoolean(),yt("design:type",Boolean)],Me.prototype,"allowEndedCancel",void 0);function nn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(nn,"_ts_decorate");var Ye=class{static{n(this,"AtLeastOneMediaConstraint");}validate(t,o){let i=o.object,s=i.flyers||[],r=i.trailers||[];return s.length>0||r.length>0}defaultMessage(){return "At least one flyer or trailer must be provided"}};Ye=nn([classValidator.ValidatorConstraint({name:"atLeastOneMedia",async:false})],Ye);function an(e){return (t,o)=>{classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:Ye});}}n(an,"AtLeastOneMedia");var ke=class{static{n(this,"AtLeastOneMediaOnUpdateConstraint");}validate(t,o){let i=o.object;return i.flyers!==void 0&&i.trailers!==void 0?i.flyers.length>0||i.trailers.length>0:i.flyers!==void 0&&i.trailers===void 0?i.flyers.length>0:i.trailers!==void 0&&i.flyers===void 0?i.trailers.length>0:true}defaultMessage(){return "Cannot remove all media from event. At least one flyer or trailer must remain"}};ke=nn([classValidator.ValidatorConstraint({name:"atLeastOneMediaOnUpdate",async:false})],ke);function pn(e){return (t,o)=>{classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:ke});}}n(pn,"AtLeastOneMediaOnUpdate");function hs(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(hs,"_ts_decorate");var Qt=class{static{n(this,"IsAfterNowConstraint");}validate(t){return t instanceof Date?t.getTime()>Date.now():false}defaultMessage(t){return `${t.property} must be in the future`}};Qt=hs([classValidator.ValidatorConstraint({name:"isAfterNow",async:false})],Qt);function V(e){return (t,o)=>{classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:Qt});}}n(V,"IsAfterNow");function eo(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(eo,"_ts_decorate");function to(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(to,"_ts_metadata");var T=class{static{n(this,"EventArtistDto");}id;permalink;username};eo([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Matches(/^\d+$/,{message:"artist.id.numeric"}),to("design:type",String)],T.prototype,"id",void 0);eo([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,100),classValidator.Matches(/^[a-zA-Z0-9_-]+$/,{message:"artist.permalink.format"}),to("design:type",String)],T.prototype,"permalink",void 0);eo([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,100),to("design:type",String)],T.prototype,"username",void 0);function E(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(E,"_ts_decorate");function U(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(U,"_ts_metadata");var b=class{static{n(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;isVisible;isFeesIncluded;startAt;endAt};E([classValidator.IsString(),classValidator.Length(1,128),U("design:type",String)],b.prototype,"name",void 0);E([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),U("design:type",String)],b.prototype,"description",void 0);E([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),U("design:type",Number)],b.prototype,"price",void 0);E([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),U("design:type",Number)],b.prototype,"quantity",void 0);E([classValidator.IsEnum(re),U("design:type",typeof re>"u"?Object:re)],b.prototype,"type",void 0);E([classValidator.IsEnum(ie),U("design:type",typeof ie>"u"?Object:ie)],b.prototype,"category",void 0);E([classValidator.IsBoolean(),U("design:type",Boolean)],b.prototype,"isVisible",void 0);E([classValidator.IsBoolean(),U("design:type",Boolean)],b.prototype,"isFeesIncluded",void 0);E([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),U("design:type",typeof Date>"u"?Object:Date)],b.prototype,"startAt",void 0);E([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),U("design:type",typeof Date>"u"?Object:Date)],b.prototype,"endAt",void 0);function z(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(z,"_ts_decorate");function N(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(N,"_ts_metadata");var u=class{static{n(this,"UpdateOrganizationEventTicketDto");}id;name;description;price;quantity;type;category;isVisible;isFeesIncluded;startAt;endAt};z([classValidator.IsString(),classValidator.IsOptional(),N("design:type",String)],u.prototype,"id",void 0);z([classValidator.IsString(),classValidator.Length(1,128),classValidator.IsOptional(),N("design:type",String)],u.prototype,"name",void 0);z([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),N("design:type",String)],u.prototype,"description",void 0);z([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),N("design:type",Number)],u.prototype,"price",void 0);z([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),N("design:type",Number)],u.prototype,"quantity",void 0);z([classValidator.IsEnum(re),classValidator.IsOptional(),N("design:type",typeof re>"u"?Object:re)],u.prototype,"type",void 0);z([classValidator.IsEnum(ie),classValidator.IsOptional(),N("design:type",typeof ie>"u"?Object:ie)],u.prototype,"category",void 0);z([classValidator.IsBoolean(),classValidator.IsOptional(),N("design:type",Boolean)],u.prototype,"isVisible",void 0);z([classValidator.IsBoolean(),classValidator.IsOptional(),N("design:type",Boolean)],u.prototype,"isFeesIncluded",void 0);z([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),N("design:type",typeof Date>"u"?Object:Date)],u.prototype,"startAt",void 0);z([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),N("design:type",typeof Date>"u"?Object:Date)],u.prototype,"endAt",void 0);function R(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(R,"_ts_decorate");function x(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(x,"_ts_metadata");var m=class{static{n(this,"BaseOrganizationEventDto");}title;slug;description;type;visibility;currency;flyers;trailers;location;styles;artists;startAt;endAt};R([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,64),x("design:type",String)],m.prototype,"title",void 0);R([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG,{message:"organization.event.slug.format"}),x("design:type",String)],m.prototype,"slug",void 0);R([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,2048),x("design:type",String)],m.prototype,"description",void 0);R([classValidator.IsEnum(se),classValidator.IsNotEmpty(),x("design:type",typeof se>"u"?Object:se)],m.prototype,"type",void 0);R([classValidator.IsEnum(ae),classValidator.IsNotEmpty(),x("design:type",typeof ae>"u"?Object:ae)],m.prototype,"visibility",void 0);R([classValidator.IsEnum(at),classValidator.IsNotEmpty(),x("design:type",typeof at>"u"?Object:at)],m.prototype,"currency",void 0);R([classValidator.IsArray(),classValidator.ArrayMaxSize(25),classValidator.Matches(c.EVENT_FLYER_URL,{each:true,message:"organization.event.flyers.url.invalid"}),an(),x("design:type",Array)],m.prototype,"flyers",void 0);R([classValidator.IsArray(),classValidator.ArrayMaxSize(25),classValidator.Matches(c.EVENT_TRAILER_URL,{each:true,message:"organization.event.trailers.url.invalid"}),x("design:type",Array)],m.prototype,"trailers",void 0);R([classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>_),classValidator.IsNotEmpty(),x("design:type",typeof _>"u"?Object:_)],m.prototype,"location",void 0);R([classValidator.IsArray(),classValidator.IsString({each:true}),classValidator.ArrayMinSize(1),x("design:type",Array)],m.prototype,"styles",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(50),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>T),x("design:type",Array)],m.prototype,"artists",void 0);R([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.IsNotEmpty(),V(),x("design:type",typeof Date>"u"?Object:Date)],m.prototype,"startAt",void 0);R([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.IsNotEmpty(),V(),x("design:type",typeof Date>"u"?Object:Date)],m.prototype,"endAt",void 0);var so=class extends m{static{n(this,"CreateOrganizationEventDto");}tickets};R([classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>b),classValidator.IsNotEmpty(),x("design:type",Array)],so.prototype,"tickets",void 0);function jn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(jn,"_ts_decorate");function wn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(wn,"_ts_metadata");var xt=class{static{n(this,"CreateOrganizationEventOrderDto");}cart;promoCode};jn([classValidator.IsArray(),classValidator.IsString({each:true}),wn("design:type",Array)],xt.prototype,"cart",void 0);jn([classValidator.IsOptional(),classValidator.IsString(),wn("design:type",String)],xt.prototype,"promoCode",void 0);function Dn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Dn,"_ts_decorate");function zn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(zn,"_ts_metadata");var St=class{static{n(this,"PostponeOrganizationEventDto");}reason;notifyHolders};Dn([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,500),zn("design:type",String)],St.prototype,"reason",void 0);Dn([classValidator.IsOptional(),classValidator.IsBoolean(),zn("design:type",Boolean)],St.prototype,"notifyHolders",void 0);function de(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(de,"_ts_decorate");function fe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(fe,"_ts_metadata");var B=class{static{n(this,"CreateOrganizationEventPromoCodeDto");}code;type;value;maxUses;isActive;minCartAmount;expiresAt;ticketIds};de([classValidator.IsString(),classValidator.Length(1,32),fe("design:type",String)],B.prototype,"code",void 0);de([classValidator.IsEnum(ne),fe("design:type",typeof ne>"u"?Object:ne)],B.prototype,"type",void 0);de([classValidator.IsNumber(),classValidator.Min(1),classValidator.Max(1e4),fe("design:type",Number)],B.prototype,"value",void 0);de([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(1),fe("design:type",Number)],B.prototype,"maxUses",void 0);de([classValidator.IsOptional(),classValidator.IsBoolean(),fe("design:type",Boolean)],B.prototype,"isActive",void 0);de([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(0),fe("design:type",Number)],B.prototype,"minCartAmount",void 0);de([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),fe("design:type",typeof Date>"u"?Object:Date)],B.prototype,"expiresAt",void 0);de([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),fe("design:type",Array)],B.prototype,"ticketIds",void 0);function le(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(le,"_ts_decorate");function me(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(me,"_ts_metadata");var F=class{static{n(this,"UpdateOrganizationEventPromoCodeDto");}code;type;value;maxUses;isActive;minCartAmount;expiresAt;ticketIds};le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),me("design:type",String)],F.prototype,"code",void 0);le([classValidator.IsOptional(),classValidator.IsEnum(ne),me("design:type",typeof ne>"u"?Object:ne)],F.prototype,"type",void 0);le([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(1),classValidator.Max(1e4),me("design:type",Number)],F.prototype,"value",void 0);le([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(1),me("design:type",Number)],F.prototype,"maxUses",void 0);le([classValidator.IsOptional(),classValidator.IsBoolean(),me("design:type",Boolean)],F.prototype,"isActive",void 0);le([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(0),me("design:type",Number)],F.prototype,"minCartAmount",void 0);le([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),me("design:type",typeof Date>"u"?Object:Date)],F.prototype,"expiresAt",void 0);le([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),me("design:type",Array)],F.prototype,"ticketIds",void 0);function It(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(It,"_ts_decorate");function At(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(At,"_ts_metadata");var Le=class{static{n(this,"RescheduleOrganizationEventDto");}startAt;endAt;reason;notifyHolders};It([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),V(),At("design:type",typeof Date>"u"?Object:Date)],Le.prototype,"startAt",void 0);It([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),V(),At("design:type",typeof Date>"u"?Object:Date)],Le.prototype,"endAt",void 0);It([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,500),At("design:type",String)],Le.prototype,"reason",void 0);It([classValidator.IsOptional(),classValidator.IsBoolean(),At("design:type",Boolean)],Le.prototype,"notifyHolders",void 0);var _t=class{static{n(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var Fn=class extends _t{static{n(this,"UpdateOrganizationEventStyleDto");}};function S(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(S,"_ts_decorate");function I(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(I,"_ts_metadata");var g=class{static{n(this,"UpdateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;artists;startAt;endAt};S([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,64),I("design:type",String)],g.prototype,"title",void 0);S([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG,{message:"organization.event.slug.format"}),I("design:type",String)],g.prototype,"slug",void 0);S([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(16,2048),I("design:type",String)],g.prototype,"description",void 0);S([classValidator.IsOptional(),classValidator.IsEnum(se),I("design:type",typeof se>"u"?Object:se)],g.prototype,"type",void 0);S([classValidator.IsOptional(),classValidator.IsEnum(ae),I("design:type",typeof ae>"u"?Object:ae)],g.prototype,"visibility",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.Matches(c.EVENT_FLYER_URL_UPDATE,{each:true,message:"organization.event.flyers.url.invalid"}),pn(),I("design:type",Array)],g.prototype,"flyers",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.Matches(c.EVENT_TRAILER_URL_UPDATE,{each:true,message:"organization.event.trailers.url.invalid"}),I("design:type",Array)],g.prototype,"trailers",void 0);S([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>O),I("design:type",typeof O>"u"?Object:O)],g.prototype,"location",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>u),I("design:type",Array)],g.prototype,"tickets",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),I("design:type",Array)],g.prototype,"styles",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(50),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>T),I("design:type",Array)],g.prototype,"artists",void 0);S([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),V(),I("design:type",typeof Date>"u"?Object:Date)],g.prototype,"startAt",void 0);S([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),V(),I("design:type",typeof Date>"u"?Object:Date)],g.prototype,"endAt",void 0);function Xs(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Xs,"_ts_decorate");function Ys(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Ys,"_ts_metadata");var So=class{static{n(this,"AcceptOrganizationMemberInvitationDto");}token};Xs([classValidator.IsString(),classValidator.IsNotEmpty(),Ys("design:type",String)],So.prototype,"token",void 0);function Vn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Vn,"_ts_decorate");function Tn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Tn,"_ts_metadata");var jt=class{static{n(this,"CreateOrganizationMemberDto");}user;role};Vn([classValidator.IsString(),classValidator.IsNotEmpty(),Tn("design:type",String)],jt.prototype,"user",void 0);Vn([classValidator.IsEnum(l),classValidator.IsNotEmpty(),Tn("design:type",typeof l>"u"?Object:l)],jt.prototype,"role",void 0);function ea(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(ea,"_ts_decorate");function ta(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ta,"_ts_metadata");var Io=class{static{n(this,"CreateOrganizationMemberInvitationLinkDto");}role};ea([classValidator.IsEnum(l),classValidator.IsOptional(),ta("design:type",typeof l>"u"?Object:l)],Io.prototype,"role",void 0);function ra(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(ra,"_ts_decorate");function ia(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ia,"_ts_metadata");var Ao=class{static{n(this,"UpdateOrganizationMemberDto");}role};ra([classValidator.IsEnum(l),classValidator.IsNotEmpty(),ia("design:type",typeof l>"u"?Object:l)],Ao.prototype,"role",void 0);function q(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(q,"_ts_decorate");function $(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n($,"_ts_metadata");var Ee=class{static{n(this,"UpdateOrganizationDto");}slug;identity;members;location};q([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"organization.slug.format"}),$("design:type",String)],Ee.prototype,"slug",void 0);q([classValidator.IsObject(),classValidator.IsOptional(),$("design:type",typeof Z>"u"?Object:Z)],Ee.prototype,"identity",void 0);q([classValidator.IsOptional(),classValidator.IsArray(),$("design:type",Array)],Ee.prototype,"members",void 0);q([classValidator.IsOptional(),classValidator.IsObject(),$("design:type",typeof Location>"u"?Object:Location)],Ee.prototype,"location",void 0);var Z=class{static{n(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};q([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),$("design:type",String)],Z.prototype,"displayName",void 0);q([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),$("design:type",String)],Z.prototype,"description",void 0);q([classValidator.IsOptional(),classValidator.Matches(c.ORGANIZATION_AVATAR_URL),$("design:type",String)],Z.prototype,"avatarUrl",void 0);q([classValidator.IsOptional(),classValidator.Matches(c.ORGANIZATION_BANNER_URL),$("design:type",String)],Z.prototype,"bannerUrl",void 0);q([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),$("design:type",Array)],Z.prototype,"links",void 0);function j(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(j,"_ts_decorate");function w(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(w,"_ts_metadata");var et=class{static{n(this,"CreateUserDto");}identifier;identity;password};j([classValidator.ValidateNested(),classTransformer.Type(()=>Ue),w("design:type",typeof Ue>"u"?Object:Ue)],et.prototype,"identifier",void 0);j([classValidator.ValidateNested(),classTransformer.Type(()=>L),w("design:type",typeof L>"u"?Object:L)],et.prototype,"identity",void 0);j([classValidator.IsString(),classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),w("design:type",String)],et.prototype,"password",void 0);var Ue=class{static{n(this,"CreateUserIdentifierDto");}email;phoneNumber;username};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),w("design:type",String)],Ue.prototype,"email",void 0);j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),w("design:type",String)],Ue.prototype,"phoneNumber",void 0);j([classValidator.IsString(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),w("design:type",String)],Ue.prototype,"username",void 0);var L=class{static{n(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate;links};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),w("design:type",String)],L.prototype,"firstName",void 0);j([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),w("design:type",String)],L.prototype,"lastName",void 0);j([classValidator.IsEnum(Q),w("design:type",typeof Q>"u"?Object:Q)],L.prototype,"gender",void 0);j([classValidator.IsOptional(),classValidator.Matches(c.USER_AVATAR_URL_CREATE,{message:"user.avatar.url.invalid"}),w("design:type",String)],L.prototype,"avatarUrl",void 0);j([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>{if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t}),classValidator.IsDate(),w("design:type",typeof Date>"u"?Object:Date)],L.prototype,"birthDate",void 0);j([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),w("design:type",Array)],L.prototype,"links",void 0);function xa(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(xa,"_ts_decorate");function Sa(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Sa,"_ts_metadata");var Po=class{static{n(this,"GoogleOneTapDto");}credential};xa([classValidator.IsNotEmpty(),classValidator.IsString(),Sa("design:type",String)],Po.prototype,"credential",void 0);function Yn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Yn,"_ts_decorate");function kn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(kn,"_ts_metadata");var wt=class{static{n(this,"CreateUserPostCommentDto");}content;replyToId};Yn([classValidator.IsString(),classValidator.Length(1,280),kn("design:type",String)],wt.prototype,"content",void 0);Yn([classValidator.IsOptional(),classValidator.IsString(),kn("design:type",String)],wt.prototype,"replyToId",void 0);function ja(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(ja,"_ts_decorate");function wa(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(wa,"_ts_metadata");var Do=class{static{n(this,"UpdateUserPostCommentDto");}content};ja([classValidator.IsString(),classValidator.Length(1,280),wa("design:type",String)],Do.prototype,"content",void 0);function zo(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(zo,"_ts_decorate");function No(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(No,"_ts_metadata");var tt=class{static{n(this,"CreateUserPostDto");}content;mediaUrls;visibility};zo([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),No("design:type",String)],tt.prototype,"content",void 0);zo([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ArrayMaxSize(10),classValidator.Matches(c.USER_POST_MEDIA_URL,{each:true}),No("design:type",Array)],tt.prototype,"mediaUrls",void 0);zo([classValidator.IsOptional(),classValidator.IsEnum(C),No("design:type",typeof C>"u"?Object:C)],tt.prototype,"visibility",void 0);function Fa(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Fa,"_ts_decorate");function Ga(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Ga,"_ts_metadata");var Mo=class{static{n(this,"CreateUserPostRepostDto");}comment};Fa([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,280),Ga("design:type",String)],Mo.prototype,"comment",void 0);function Qn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Qn,"_ts_decorate");function er(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(er,"_ts_metadata");var Pt=class{static{n(this,"UpdateUserPostDto");}content;visibility};Qn([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),er("design:type",String)],Pt.prototype,"content",void 0);Qn([classValidator.IsOptional(),classValidator.IsEnum(C),er("design:type",typeof C>"u"?Object:C)],Pt.prototype,"visibility",void 0);function qa(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(qa,"_ts_decorate");function $a(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n($a,"_ts_metadata");var Lo=class{static{n(this,"RecoveryDto");}identifier};qa([classValidator.IsNotEmpty(),classValidator.IsString(),$a("design:type",String)],Lo.prototype,"identifier",void 0);function Eo(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Eo,"_ts_decorate");function Uo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Uo,"_ts_metadata");var ot=class{static{n(this,"RecoveryResetDto");}tokenId;tokenValue;password};Eo([classValidator.IsString(),classValidator.IsNotEmpty(),Uo("design:type",String)],ot.prototype,"tokenId",void 0);Eo([classValidator.IsString(),classValidator.IsNotEmpty(),Uo("design:type",String)],ot.prototype,"tokenValue",void 0);Eo([classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),classValidator.IsNotEmpty({message:"Password is required"}),Uo("design:type",String)],ot.prototype,"password",void 0);function nr(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(nr,"_ts_decorate");function rr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(rr,"_ts_metadata");var zt=class{static{n(this,"SignInUserDto");}identifier;password};nr([classValidator.IsNotEmpty(),classValidator.IsString(),rr("design:type",String)],zt.prototype,"identifier",void 0);nr([classValidator.IsNotEmpty(),classValidator.IsString(),rr("design:type",String)],zt.prototype,"password",void 0);function y(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(y,"_ts_decorate");function h(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(h,"_ts_metadata");var nt=class{static{n(this,"UpdateUserDto");}identifier;identity;password};y([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>Be),h("design:type",typeof Be>"u"?Object:Be)],nt.prototype,"identifier",void 0);y([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>P),h("design:type",typeof P>"u"?Object:P)],nt.prototype,"identity",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),h("design:type",String)],nt.prototype,"password",void 0);var Be=class{static{n(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};y([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),h("design:type",String)],Be.prototype,"email",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),h("design:type",String)],Be.prototype,"phoneNumber",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),h("design:type",String)],Be.prototype,"username",void 0);var P=class{static{n(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate;links};y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),h("design:type",String)],P.prototype,"firstName",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),h("design:type",String)],P.prototype,"lastName",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),h("design:type",String)],P.prototype,"displayName",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),h("design:type",String)],P.prototype,"description",void 0);y([classValidator.IsOptional(),classValidator.Matches(c.USER_AVATAR_URL),h("design:type",Object)],P.prototype,"avatarUrl",void 0);y([classValidator.IsOptional(),classValidator.Matches(c.USER_BANNER_URL),h("design:type",Object)],P.prototype,"bannerUrl",void 0);y([classValidator.IsOptional(),classValidator.IsEnum(Q),h("design:type",typeof Q>"u"?Object:Q)],P.prototype,"gender",void 0);y([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>{if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t}),classValidator.IsDate(),h("design:type",typeof Date>"u"?Object:Date)],P.prototype,"birthDate",void 0);y([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),h("design:type",Array)],P.prototype,"links",void 0);function dr(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(dr,"_ts_decorate");function fr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(fr,"_ts_metadata");var Nt=class{static{n(this,"VerifyEmailConfirmDto");}tokenId;tokenValue};dr([classValidator.IsString(),classValidator.IsNotEmpty(),fr("design:type",String)],Nt.prototype,"tokenId",void 0);dr([classValidator.IsString(),classValidator.IsNotEmpty(),fr("design:type",String)],Nt.prototype,"tokenValue",void 0);function d(e){return e}n(d,"sdk");var ur=e=>({getAll:n(async()=>e.get("/api-keys"),"getAll"),get:n(async t=>e.get("/api-keys/:apiKeyId",{apiKeyId:t}),"get"),create:n(async t=>e.post("/api-keys",t),"create"),update:n(async(t,o)=>e.put("/api-keys/:apiKeyId",o,{apiKeyId:t}),"update"),delete:n(async t=>e.delete("/api-keys/:apiKeyId",void 0,{apiKeyId:t}),"delete")});var gr=e=>({top:n(async t=>e.get("/artists/top",t),"top"),search:n(async t=>e.get("/artists/search",t),"search"),get:n(async t=>e.get("/artists/:idOrPermalink",t),"get"),follow:n(async t=>e.post("/artists/:idOrPermalink/follow",void 0,t),"follow"),unfollow:n(async t=>e.delete("/artists/:idOrPermalink/follow",void 0,t),"unfollow"),events:n(async t=>e.get("/artists/:idOrPermalink/events",t),"events")});var yr=e=>({signIn:n(async t=>e.post("/auth/sign-in",t),"signIn"),signUp:n(async t=>e.post("/auth/sign-up",t),"signUp"),signOut:n(async()=>e.post("/auth/sign-out",void 0),"signOut"),refreshToken:n(async()=>e.post("/auth/refresh-token",void 0),"refreshToken"),recovery:n(async t=>e.post("/auth/recovery",t),"recovery"),recoveryReset:n(async t=>e.post("/auth/recovery/reset",t),"recoveryReset"),verifyEmail:{send:n(async()=>e.post("/auth/verify/email/send",void 0),"send"),confirm:n(async t=>e.post("/auth/verify/email/confirm",t),"confirm")},oauth2:{connect:n((t,o)=>e.url("/oauth2/:provider",{provider:t,...o}),"connect"),disconnect:n(async t=>e.delete("/oauth2/:provider",void 0,{provider:t}),"disconnect"),googleOneTap:n(async t=>e.post("/oauth2/google/one-tap",t),"googleOneTap")}});var hr=e=>({categories:{getAll:n(async t=>e.get("/careers/categories",t),"getAll")},employmentTypes:{getAll:n(async t=>e.get("/careers/employmentTypes",t),"getAll")},jobs:{getAll:n(async t=>e.get("/careers/jobs",t),"getAll"),get:n(async t=>e.get("/careers/jobs/:jobId",{jobId:t}),"get")},offices:{getAll:n(async t=>e.get("/careers/offices",t),"getAll")}});var vr=e=>({getAll:n(async(t,o)=>e.get("/channels/~me/:channelId/messages",{channelId:t,...o}),"getAll"),getAllByOrganization:n(async(t,o,i)=>e.get("/channels/:organizationSlug/:channelId/messages",{organizationSlug:t,channelId:o,...i}),"getAllByOrganization"),get:n(async(t,o)=>e.get("/channels/~me/:channelId/messages/:messageId",{channelId:t,messageId:o}),"get"),getByOrganization:n(async(t,o,i)=>e.get("/channels/:organizationSlug/:channelId/messages/:messageId",{organizationSlug:t,channelId:o,messageId:i}),"getByOrganization"),create:n(async(t,o)=>e.post("/channels/~me/:channelId/messages",o,{channelId:t}),"create"),createByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/messages",i,{organizationSlug:t,channelId:o}),"createByOrganization"),update:n(async(t,o,i)=>e.put("/channels/~me/:channelId/messages/:messageId",i,{channelId:t,messageId:o}),"update"),updateByOrganization:n(async(t,o,i,s)=>e.put("/channels/:organizationSlug/:channelId/messages/:messageId",s,{organizationSlug:t,channelId:o,messageId:i}),"updateByOrganization"),delete:n(async(t,o)=>e.delete("/channels/~me/:channelId/messages/:messageId",void 0,{channelId:t,messageId:o}),"delete"),deleteByOrganization:n(async(t,o,i)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId",void 0,{organizationSlug:t,channelId:o,messageId:i}),"deleteByOrganization"),addReaction:n(async(t,o,i)=>e.post("/channels/~me/:channelId/messages/:messageId/reactions",i,{channelId:t,messageId:o}),"addReaction"),addReactionByOrganization:n(async(t,o,i,s)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/reactions",s,{organizationSlug:t,channelId:o,messageId:i}),"addReactionByOrganization"),removeReaction:n(async(t,o,i)=>e.delete("/channels/~me/:channelId/messages/:messageId/reactions/:emoji",void 0,{channelId:t,messageId:o,emoji:i}),"removeReaction"),removeReactionByOrganization:n(async(t,o,i,s)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji",void 0,{organizationSlug:t,channelId:o,messageId:i,emoji:s}),"removeReactionByOrganization"),markAsRead:n(async(t,o)=>e.post("/channels/~me/:channelId/messages/:messageId/read",void 0,{channelId:t,messageId:o}),"markAsRead"),markAsReadByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/read",void 0,{organizationSlug:t,channelId:o,messageId:i}),"markAsReadByOrganization"),uploadFile:n(async(t,o)=>e.post("/channels/~me/:channelId/files",o,{channelId:t}),"uploadFile"),uploadFileByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/files",i,{organizationSlug:t,channelId:o}),"uploadFileByOrganization"),report:n(async(t,o,i)=>e.post("/channels/~me/:channelId/messages/:messageId/report",i,{channelId:t,messageId:o}),"report"),reportByOrganization:n(async(t,o,i,s)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/report",s,{organizationSlug:t,channelId:o,messageId:i}),"reportByOrganization")});var br=e=>({me:n(async t=>e.get("/channels/~me",t),"me"),getByOrganization:n(async(t,o)=>e.get("/channels/:organizationSlug",{organizationSlug:t,...o}),"getByOrganization"),countMe:n(async t=>e.get("/users/~me/channels/count",t),"countMe"),countByOrganization:n(async(t,o)=>e.get("/users/@:organizationSlug/channels/count",{organizationSlug:t,...o}),"countByOrganization"),get:n(async t=>e.get("/channels/~me/:channelId",{channelId:t}),"get"),getByOrganizationChannel:n(async(t,o)=>e.get("/channels/:organizationSlug/:channelId",{organizationSlug:t,channelId:o}),"getByOrganizationChannel"),create:n(async t=>e.post("/channels/~me",t),"create"),createByOrganization:n(async(t,o)=>e.post("/channels/:organizationSlug",o,{organizationSlug:t}),"createByOrganization"),update:n(async(t,o)=>e.put("/channels/~me/:channelId",o,{channelId:t}),"update"),updateByOrganization:n(async(t,o,i)=>e.put("/channels/:organizationSlug/:channelId",i,{organizationSlug:t,channelId:o}),"updateByOrganization"),delete:n(async t=>e.delete("/channels/~me/:channelId",void 0,{channelId:t}),"delete"),deleteByOrganization:n(async(t,o)=>e.delete("/channels/:organizationSlug/:channelId",void 0,{organizationSlug:t,channelId:o}),"deleteByOrganization"),addParticipant:n(async(t,o)=>e.post("/channels/~me/:channelId/participants",o,{channelId:t}),"addParticipant"),addParticipantByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/participants",i,{organizationSlug:t,channelId:o}),"addParticipantByOrganization"),removeParticipant:n(async(t,o)=>e.delete("/channels/~me/:channelId/participants/:username",void 0,{channelId:t,username:o}),"removeParticipant"),removeParticipantByOrganization:n(async(t,o,i)=>e.delete("/channels/:organizationSlug/:channelId/participants/:username",void 0,{organizationSlug:t,channelId:o,username:i}),"removeParticipantByOrganization"),getMembers:n(async(t,o)=>e.get("/channels/~me/:channelId/members",{channelId:t,...o}),"getMembers"),getMembersByOrganization:n(async(t,o,i)=>e.get("/channels/:organizationSlug/:channelId/members",{organizationSlug:t,channelId:o,...i}),"getMembersByOrganization"),messages:vr(e)});var Rr=e=>({getRates:n(()=>e.get("/currencies/rates"),"getRates"),convert:n(t=>e.post("/currencies/convert",t),"convert"),convertAmount:n((t,o,i)=>e.post("/currencies/convert",{from:t,to:o,amount:i}),"convertAmount")});var xr=e=>({getFollowing:n(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:n(async t=>e.get("/feed/discover",t),"getDiscover")});var Sr=e=>({getAll:n(async()=>e.get("/health"),"getAll"),database:n(async()=>e.get("/health/database"),"database"),api:n(async()=>e.get("/health/api"),"api"),app:n(async()=>e.get("/health/app"),"app"),memory:n(async()=>e.get("/health/memory"),"memory")});var Ir=e=>({registerToBeta:n(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var Ar=e=>({getAll:n(async t=>e.get("/orders",t),"getAll"),get:n(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var _r=n(e=>({account:n(async t=>e.get("/organizations/@:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:n(t=>{if(Ae)window.location.href=e.url("/organizations/@:organizationSlug/billing/link",{organizationSlug:t});else throw new Error("Billing link is only available in the browser")},"link"),balance:n(async t=>e.get("/organizations/@:organizationSlug/billing/balance",{organizationSlug:t}),"balance"),pending:n(async t=>e.get("/organizations/@:organizationSlug/billing/pending",{organizationSlug:t}),"pending"),dashboard:n(t=>{if(Ae)window.location.href=e.url("/organizations/@:organizationSlug/billing/dashboard",{organizationSlug:t});else throw new Error("Billing dashboard is only available in the browser")},"dashboard")}),"organizationsBilling");var Or=e=>({getAll:n(async t=>e.get("/organizations/@:organizationSlug/customers",{organizationSlug:t}),"getAll"),get:n(async(t,o)=>e.get("/organizations/@:organizationSlug/customers/:username",{organizationSlug:t,username:o}),"get")});var jr=n(e=>({create:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/orders",i,{organizationSlug:t,eventSlug:o}),"create")}),"organizationsEventsOrders");var wr=n(e=>({getAll:n(async(t,o,i)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/promo-codes",{organizationSlug:t,eventSlug:o,...i}),"getAll"),create:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/promo-codes",i,{organizationSlug:t,eventSlug:o}),"create"),update:n(async(t,o,i,s)=>e.put("/organizations/@:organizationSlug/events/:eventSlug/promo-codes/:promoCodeId",s,{organizationSlug:t,eventSlug:o,promoCodeId:i}),"update"),delete:n(async(t,o,i)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug/promo-codes/:promoCodeId",void 0,{organizationSlug:t,eventSlug:o,promoCodeId:i}),"delete"),validate:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/promo-codes/validate",{code:i},{organizationSlug:t,eventSlug:o}),"validate")}),"organizationsEventsPromoCodes");var Pr=n(e=>({getAll:n(async t=>e.get("/organizations/events/styles",t),"getAll"),get:n(async t=>e.get("/organizations/events/styles/:styleSlug",{styleSlug:t}),"get"),create:n(async t=>e.post("/organizations/events/styles",t),"create"),update:n(async(t,o)=>e.put("/organizations/events/styles/:styleSlug",o,{styleSlug:t}),"update"),delete:n(async t=>e.delete("/organizations/events/styles/:styleSlug",void 0,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var Dr=n(e=>({getAll:n(async(t,o)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:o}),"getAll"),get:n(async(t,o,i)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:o,ticketId:i}),"get"),create:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/tickets",i,{organizationSlug:t,eventSlug:o}),"create"),update:n(async(t,o,i,s)=>e.put("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",s,{organizationSlug:t,eventSlug:o,ticketId:i}),"update"),delete:n(async(t,o,i)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:o,ticketId:i}),"delete")}),"organizationsEventsTickets");var zr=n(e=>({record:n(async(t,o)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:o}),"record"),getStreamUrl:n(t=>e.url("/organizations/events/views/stream",t),"getStreamUrl")}),"organizationsEventsViews");var Nr=n(e=>({search:n(async(t,o)=>e.get("/organizations/events/search",{q:t,...o}),"search"),getCalendar:n(async(t,o)=>e.get("/organizations/events/calendar/:year/:month",{year:t.toString(),month:o.toString()}),"getCalendar"),getAll:n(async(t,o)=>t?e.get("/organizations/@:organizationSlug/events",{organizationSlug:t,...o}):e.get("/organizations/events",o),"getAll"),getSuggestions:n(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:n(async t=>e.get("/organizations/events/nearby",t),"getNearby"),get:n(async(t,o)=>e.get("/organizations/@:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:o}),"get"),create:n(async(t,o)=>e.post("/organizations/@:organizationSlug/events",o,{organizationSlug:t}),"create"),update:n(async(t,o,i)=>e.put("/organizations/@:organizationSlug/events/:eventSlug",i,{organizationSlug:t,eventSlug:o}),"update"),delete:n(async(t,o)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug",void 0,{organizationSlug:t,eventSlug:o}),"delete"),uploadFile:n(async(t,o)=>e.post("/events/files/:eventFileType",ee("file",o),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:n(async(t,o,i,s)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType",ee("file",s),{organizationSlug:t,eventSlug:o,eventFileType:i}),"uploadOrganizationFile"),request:n(async(t,o)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/request",void 0,{organizationSlug:t,eventSlug:o}),"request"),orders:jr(e),promoCodes:wr(e),styles:Pr(e),tickets:Dr(e),views:zr(e)}),"organizationsEvents");var Mr=n(e=>({getLinks:n(async t=>e.get("/organizations/@:organizationSlug/members/invitations/links",{organizationSlug:t}),"getLinks"),createLink:n(async(t,o={})=>e.post("/organizations/@:organizationSlug/members/invitations/links",o,{organizationSlug:t}),"createLink"),accept:n(async(t,o)=>e.post("/organizations/@:organizationSlug/members/invitations/accept",o,{organizationSlug:t}),"accept")}),"invitations");var Lr=n(e=>({me:n(async()=>e.get("/organizations/members/~me"),"me"),get:n(async t=>e.get("/organizations/@:organizationSlug/members",{organizationSlug:t}),"get"),create:n(async(t,o)=>e.post("/organizations/@:organizationSlug/members",o,{organizationSlug:t}),"create"),update:n(async(t,o,i)=>e.put("/organizations/@:organizationSlug/members/:username",i,{organizationSlug:t,username:o}),"update"),delete:n(async(t,o)=>e.delete("/organizations/@:organizationSlug/members/:username",void 0,{organizationSlug:t,username:o}),"delete"),invitations:Mr(e),accept:n(async t=>e.put("/organizations/@:organizationSlug/members/~me/accept",void 0,{organizationSlug:t}),"accept"),reject:n(async t=>e.delete("/organizations/@:organizationSlug/members/~me/reject",void 0,{organizationSlug:t}),"reject"),leave:n(async t=>e.delete("/organizations/@:organizationSlug/members/~me",void 0,{organizationSlug:t}),"leave")}),"organizationsMembers");var Er=e=>({getAll:n(async t=>e.get("/organizations/@:organizationSlug/orders",t),"getAll"),get:n(async t=>e.get("/organizations/@:organizationSlug/orders/:orderId",t),"get"),getAllByEvent:n(async t=>e.get("/organizations/@:organizationSlug/events/:eventSlug/orders",t),"getAllByEvent"),getBookingsByEvent:n(async t=>e.get("/organizations/@:organizationSlug/events/:eventSlug/bookings",t),"getBookingsByEvent"),getParticipantsByEvent:n(async t=>e.get("/organizations/@:organizationSlug/events/:eventSlug/participants",t),"getParticipantsByEvent")});var Ur=e=>({search:n(async(t,o)=>e.get("/organizations/search",{q:t,limit:o}),"search"),getAll:n(async()=>e.get("/organizations"),"getAll"),get:n(async t=>e.get("/organizations/@:organizationSlug",{organizationSlug:t}),"get"),create:n(async t=>e.post("/organizations",t),"create"),update:n(async(t,o)=>e.put("/organizations/@:organizationSlug",o,{organizationSlug:t}),"update"),delete:n(async t=>e.delete("/organizations/@:organizationSlug",void 0,{organizationSlug:t}),"delete"),uploadFile:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/files/:organizationFileType",ee("file",i),{organizationSlug:t,organizationFileType:o}),"uploadFile"),billing:_r(e),events:Nr(e),members:Lr(e),customers:Or(e),orders:Er(e)});var Br=e=>({countries:{getAll:n(async t=>e.get("/places/countries",t),"getAll"),get:n(async t=>e.get("/places/countries/:countrySlug",t),"get"),cities:{getAll:n(async t=>e.get("/places/countries/:countrySlug/cities",t),"getAll"),get:n(async t=>e.get("/places/countries/:countrySlug/cities/:citySlug",t),"get"),nearby:n(async t=>e.get("/places/countries/:countrySlug/cities/:citySlug/nearby",t),"nearby")}},cities:{getAll:n(async t=>e.get("/places/cities",t),"getAll"),search:n(async t=>e.get("/places/cities/search",t),"search")}});var Fr=e=>({follow:n(async t=>e.post("/profiles/@:username/relationships/follow",void 0,{username:t}),"follow"),unfollow:n(async t=>e.post("/profiles/@:username/relationships/unfollow",void 0,{username:t}),"unfollow"),getSuggestions:n(async t=>e.get("/profiles/~me/relationships/suggestions",t),"getSuggestions"),getFollowers:n(async(t,o)=>e.get("/profiles/@:username/relationships/followers",{username:t,...o}),"getFollowers")});var Gr=e=>({getAll:n(async t=>e.get("/profiles",t),"getAll"),search:n(async(t,o)=>e.get("/profiles/search",{q:t,...o}),"search"),get:n(async t=>e.get("/profiles/@:username",{username:t}),"get"),relationships:Fr(e)});var Kr=e=>({reactions:{get:n(async t=>e.get("/roadmap/reactions/:featureId",{featureId:t}),"get"),add:n(async(t,o)=>e.post("/roadmap/reactions/:featureId",{reaction:o},{featureId:t}),"add")}});var Hr=e=>({getCounts:n(async()=>e.get("/sitemaps/counts"),"getCounts")});var Vr=e=>({get:n(async t=>e.get("/users/bookings/tickets/:ticketId",{ticketId:t}),"get"),use:n(async(t,o,i)=>e.put("/users/bookings/tickets/:ticketId/use",{tokenId:o,tokenValue:i},{ticketId:t}),"use")});var Tr=e=>({getAll:n(async()=>e.get("/users/bookings"),"getAll"),get:n(async t=>e.get("/users/bookings/:bookingId",{bookingId:t}),"get"),me:n(async()=>e.get("/users/~me/bookings"),"me"),tickets:Vr(e)});var Wr=e=>({me:n(async()=>e.get("/users/~me/notifications"),"me"),count:n(async t=>e.get("/users/~me/notifications/count",t),"count"),read:n(async()=>e.put("/users/~me/notifications/read",void 0),"read")});var Zr=n(e=>({record:n(async(t,o)=>e.post("/users/@:username/posts/:postId/views",void 0,{username:t,postId:o}),"record")}),"usersPostsViews");var qr=e=>({getByUsername:n(async(t,o)=>e.get("/users/@:username/posts",{username:t,...o}),"getByUsername"),getByUsernameAndId:n(async(t,o)=>e.get("/users/@:username/posts/:postId",{username:t,postId:o}),"getByUsernameAndId"),create:n(async t=>e.post("/users/~me/posts",t),"create"),update:n(async(t,o)=>e.put("/users/~me/posts/:postId",o,{postId:t}),"update"),delete:n(async t=>e.delete("/users/~me/posts/:postId",void 0,{postId:t}),"delete"),uploadMedia:n(async t=>e.post("/users/~me/posts/media",t),"uploadMedia"),views:Zr(e)});var $r=e=>({getByPost:n(async(t,o,i)=>e.get("/users/@:username/posts/:postId/comments",{username:t,postId:o,...i}),"getByPost"),create:n(async(t,o)=>e.post("/users/~me/posts/:postId/comments",o,{postId:t}),"create"),update:n(async(t,o,i)=>e.put("/users/~me/posts/:postId/comments/:commentId",i,{postId:t,commentId:o}),"update"),delete:n(async(t,o)=>e.delete("/users/~me/posts/:postId/comments/:commentId",void 0,{postId:t,commentId:o}),"delete")});var Xr=e=>({getByUsername:n(async(t,o)=>e.get("/users/@:username/reposts",{username:t,...o}),"getByUsername"),getByPost:n(async(t,o,i)=>e.get("/users/@:username/posts/:postId/reposts",{username:t,postId:o,...i}),"getByPost"),create:n(async(t,o)=>e.post("/users/~me/posts/:postId/reposts",o||{},{postId:t}),"create"),delete:n(async t=>e.delete("/users/~me/posts/:postId/reposts",void 0,{postId:t}),"delete")});var Yr=e=>({getAll:n(async()=>e.get("/users"),"getAll"),get:n(async t=>e.get("/users/@:userId",{userId:t}),"get"),me:n(async()=>e.get("/users/~me"),"me"),check:n(async(t,o)=>e.get("/users/check/:identifier",{identifier:t,suggestions:o}),"check"),update:n(async(t,o)=>e.put("/users/@:userId",o,{userId:t}),"update"),uploadFile:n(async(t,o,i)=>e.post("/users/@:userId/files/:userFileType",ee("file",i),{userId:t,userFileType:o}),"uploadFile"),uploadTempFile:n(async(t,o)=>e.post("/users/files/:userFileType",ee("file",o),{userFileType:t}),"uploadTempFile"),bookings:Tr(e),notifications:Wr(e),posts:qr(e),postsComments:$r(e),postsReposts:Xr(e)});var kr=class{static{n(this,"TonightPass");}client;apiKeys;artists;auth;careers;channels;currencies;feed;health;orders;organizations;places;profiles;roadmap;sitemaps;users;notifications;constructor(t){this.client=new pt(t),this.apiKeys=ur(this.client),this.artists=gr(this.client),this.auth=yr(this.client),this.careers=hr(this.client),this.channels=br(this.client),this.currencies=Rr(this.client),this.feed=xr(this.client),this.health=Sr(this.client),this.orders=Ar(this.client),this.organizations=Ur(this.client),this.places=Br(this.client),this.profiles=Gr(this.client),this.roadmap=Kr(this.client),this.sitemaps=Hr(this.client),this.users=Yr(this.client),this.notifications=Ir(this.client);}};var Mt=class{static{n(this,"WebSocketClient");}ws;options;reconnectAttempts=0;reconnectTimer;eventHandlers=new Map;isConnected=false;isReconnecting=false;constructor(t={}){this.options={baseURL:"wss://api.tonightpass.com",maxReconnectAttempts:3,reconnectInterval:1e3,debug:false,...t};}log(t,...o){this.options.debug&&console.log(`[WebSocketClient] ${t}`,...o);}getWebSocketURL(t,o){let i={};Object.entries(o).forEach(([r,a])=>{typeof a=="string"&&r!=="token"&&(i[r]=a);});let s=pathcat.pathcat(t,i);return `${this.options.baseURL}${s}`}async connect(t,o){return new Promise((i,s)=>{try{let r=this.getWebSocketURL(t,o);this.log("Connecting to",r);let a=[];"token"in o&&typeof o.token=="string"&&a.push(`access_token.${o.token}`),this.ws=a.length>0?new WebSocket(r,a):new WebSocket(r),this.ws.onopen=()=>{this.log("Connected successfully"),this.isConnected=!0,this.isReconnecting=!1,this.reconnectAttempts=0,i();},this.ws.onmessage=p=>{try{let f=JSON.parse(p.data);this.handleEvent(f);}catch(f){this.log("Error parsing message:",f);}},this.ws.onclose=p=>{this.log("Connection closed",p.code),this.isConnected=!1,this.options.maxReconnectAttempts&&!this.isReconnecting&&this.handleReconnect(t,o);},this.ws.onerror=p=>{this.log("WebSocket error:",p),this.isConnected=!1,s(p);};}catch(r){s(r);}})}handleReconnect(t,o){if(this.reconnectAttempts>=this.options.maxReconnectAttempts){this.log("Max reconnect attempts reached");return}this.isReconnecting=true,this.reconnectAttempts++,this.log(`Attempting to reconnect (${this.reconnectAttempts}/${this.options.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.connect(t,o).catch(i=>{this.log("Reconnection failed:",i);});},this.options.reconnectInterval);}handleEvent(t){this.log("Received event:",t.type);let o=this.eventHandlers.get(t.type);o&&o.forEach(s=>s(t));let i=this.eventHandlers.get("*");i&&i.forEach(s=>s(t));}on(t,o){this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set);let i=n(s=>{o(s);},"wrappedHandler");return this.eventHandlers.get(t)?.add(i),()=>{let s=this.eventHandlers.get(t);s&&(s.delete(i),s.size===0&&this.eventHandlers.delete(t));}}off(t,o){let i=this.eventHandlers.get(t);i&&(i.clear(),this.eventHandlers.delete(t));}send(t){this.ws&&this.isConnected?this.ws.send(JSON.stringify(t)):this.log("Cannot send data: WebSocket not connected");}disconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.ws&&(this.isConnected=false,this.isReconnecting=false,this.ws.close()),this.eventHandlers.clear();}get connected(){return this.isConnected}get reconnecting(){return this.isReconnecting}};var Lt=class extends Mt{static{n(this,"ChannelWebSocketClient");}async connectToChannel(t,o={}){return this.connect("/channels/~me/:channelId/ws",{...o,channelId:t})}async connectToOrganizationChannel(t,o,i={}){return this.connect("/channels/:organizationSlug/:channelId/ws",{...i,organizationSlug:t,channelId:o})}async connectToUserChannels(t={}){return this.connect("/channels/~me/ws",t)}async connectToOrganizationChannels(t,o={}){return this.connect("/channels/:organizationSlug/ws",{...o,organizationSlug:t})}onMessageCreate(t){return this.on("channel_message_create",t)}onMessageUpdate(t){return this.on("channel_message_update",t)}onMessageDelete(t){return this.on("channel_message_delete",t)}onChannelUpdate(t){return this.on("channel_update",t)}onChannelDelete(t){return this.on("channel_delete",t)}onMemberJoin(t){return this.on("channel_member_join",t)}onMemberLeave(t){return this.on("channel_member_leave",t)}onTypingStart(t){return this.on("typing_start",t)}onTypingStop(t){return this.on("typing_stop",t)}startTyping(t){this.send({type:"typing_start",data:{channelId:t}});}stopTyping(t){this.send({type:"typing_stop",data:{channelId:t}});}subscribeToChannel(t){this.send({type:"subscribe",data:{channelId:t}});}unsubscribeFromChannel(t){this.send({type:"unsubscribe",data:{channelId:t}});}};function sb(e){let t=new Lt(e);return {connect:n((o,i)=>t.connectToChannel(o,{token:i}),"connect"),connectToOrganization:n((o,i,s)=>t.connectToOrganizationChannel(o,i,{token:s}),"connectToOrganization"),connectToUserChannels:n(o=>t.connectToUserChannels({token:o}),"connectToUserChannels"),connectToOrganizationChannels:n((o,i)=>t.connectToOrganizationChannels(o,{token:i}),"connectToOrganizationChannels"),onMessageCreate:n(o=>t.onMessageCreate(o),"onMessageCreate"),onMessageUpdate:n(o=>t.onMessageUpdate(o),"onMessageUpdate"),onMessageDelete:n(o=>t.onMessageDelete(o),"onMessageDelete"),onChannelUpdate:n(o=>t.onChannelUpdate(o),"onChannelUpdate"),onChannelDelete:n(o=>t.onChannelDelete(o),"onChannelDelete"),onMemberJoin:n(o=>t.onMemberJoin(o),"onMemberJoin"),onMemberLeave:n(o=>t.onMemberLeave(o),"onMemberLeave"),onTypingStart:n(o=>t.onTypingStart(o),"onTypingStart"),onTypingStop:n(o=>t.onTypingStop(o),"onTypingStop"),onAny:n(o=>t.on("*",o),"onAny"),startTyping:n(o=>t.startTyping(o),"startTyping"),stopTyping:n(o=>t.stopTyping(o),"stopTyping"),subscribeToChannel:n(o=>t.subscribeToChannel(o),"subscribeToChannel"),unsubscribeFromChannel:n(o=>t.unsubscribeFromChannel(o),"unsubscribeFromChannel"),disconnect:n(()=>t.disconnect(),"disconnect"),get connected(){return t.connected},get reconnecting(){return t.reconnecting},client:t}}n(sb,"channelsWS");
|
|
1
|
+
'use strict';var pathcat=require('pathcat'),oi=require('redaxios');require('reflect-metadata');var classValidator=require('class-validator'),classTransformer=require('class-transformer');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var oi__default=/*#__PURE__*/_interopDefault(oi);var Jr=Object.defineProperty;var n=(e,t)=>Jr(e,"name",{value:t,configurable:true});var Go="https://api.tonightpass.com";var c={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,INLINE:{EMAIL:/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}/gi,URL:/(https?:\/\/[^\s<>"'`[\](){}|\\^]+)/gi,USER_MENTION:/@([a-zA-Z0-9_.-]+)/g,ARTIST_MENTION:/\+([a-zA-Z0-9_.-]+)/g},NAME:/^[a-zA-ZÀ-ÿ0-9-\s]+$/,SLUG:/^[a-z0-9_.]+$/,USERNAME:/^(?!\.)(?!.*\.\.)(?!.*\.$)[a-z0-9_.]{3,48}$/,PHONE:/^\+(?:[0-9] ?){6,14}[0-9]$/,PASSWORD:/^(?=.*[A-Z])(?=.*[a-z])(?=.*[\d\W]).{8,}$/,PASSWORD_MIN_LENGTH:/^.{8,}$/,PASSWORD_UPPERCASE:/^(?=.*[A-Z])/,PASSWORD_LOWERCASE:/^(?=.*[a-z])/,PASSWORD_NUMBER_SPECIAL:/^(?=.*[\d\W])/,IMAGE_URL:/^(https:\/\/|http:\/\/)(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_+.~#?&//=]*)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)$/i,ORGANIZATION_AVATAR_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//,ORGANIZATION_BANNER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//,EVENT_FLYER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,EVENT_FLYER_URL_UPDATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com|cdn\.payload\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/|[\w-]+\.\w+$)/,EVENT_TRAILER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,EVENT_TRAILER_URL_UPDATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com|cdn\.payload\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/|[\w-]+\.\w+$)/,USER_AVATAR_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//,USER_AVATAR_URL_CREATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(users\/[\w-]+\/avatars\/|temp\/users\/avatars\/)/,USER_BANNER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/banners\//,CHANNEL_MESSAGE_ATTACHMENT:/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,USER_POST_MEDIA_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/posts\/media\/|users\/[\w-]+\/posts\/[\w-]+\/media\/)/};var cp=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),l=function(e){return e.Owner="owner",e.Admin="admin",e.Manager="manager",e.Member="member",e}({});var lp=function(e){return e.Follow="follow",e.OrganizationEventCancelled="organization_event_cancelled",e.OrganizationEventPostponed="organization_event_postponed",e.OrganizationEventRescheduled="organization_event_rescheduled",e}({});var up=function(e){return e.Image="image",e.Video="video",e}({});var C=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var xp=function(e){return e.Authentication="authentication",e.BookingTicket="booking_ticket",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation",e}({});var it=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),Q=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),Ip=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Et={[l.Owner]:3,[l.Admin]:2,[l.Manager]:1,[l.Member]:0},Np={[it.Admin]:2,[it.Developer]:1,[it.User]:0};var st=class{static{n(this,"MemoryCacheStore");}cache=new Map;maxSize;constructor(t=1e3){this.maxSize=t;}async get(t){return this.cache.get(t)??null}async set(t,o){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){let i=this.cache.keys().next().value;i!==void 0&&this.cache.delete(i);}this.cache.set(t,o);}async delete(t){this.cache.delete(t);}async clear(){this.cache.clear();}async size(){return this.cache.size}async keys(){return Array.from(this.cache.keys())}};var Fe=class{static{n(this,"CacheManager");}store;options;constructor(t){this.options={enabled:t.enabled,ttl:t.ttl??6e4,maxSize:t.maxSize??1e3,methods:t.methods??["GET"]},this.store=t.store??new st(this.options.maxSize);}generateKey(t,o){return `${t}:${o}`}shouldCache(t){return this.options.enabled&&this.options.methods.includes(t)}isValid(t){return Date.now()-t.timestamp<this.options.ttl}async get(t,o){if(!this.shouldCache(t))return null;let i=this.generateKey(t,o),s=await this.store.get(i);return s?this.isValid(s)?s.data:(await this.store.delete(i),null):null}async set(t,o,i){if(!this.shouldCache(t))return;let s=this.generateKey(t,o);await this.store.set(s,{data:i,timestamp:Date.now()});}async clear(){await this.store.clear();}async stats(){return {size:await this.store.size(),keys:await this.store.keys()}}};var Ut={name:"tonightpass",version:"0.0.266"};var at=function(e){return e.USD="USD",e.EUR="EUR",e.GBP="GBP",e.ARS="ARS",e.AWG="AWG",e.BBD="BBD",e.BMD="BMD",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BZD="BZD",e.CAD="CAD",e.CLP="CLP",e.COP="COP",e.CRC="CRC",e.DOP="DOP",e.FKP="FKP",e.GTQ="GTQ",e.GYD="GYD",e.HNL="HNL",e.HTG="HTG",e.JMD="JMD",e.KYD="KYD",e.MXN="MXN",e.NIO="NIO",e.PAB="PAB",e.PEN="PEN",e.PYG="PYG",e.SRD="SRD",e.TTD="TTD",e.UYU="UYU",e.XCD="XCD",e.ALL="ALL",e.BAM="BAM",e.BGN="BGN",e.BYN="BYN",e.CHF="CHF",e.CZK="CZK",e.DKK="DKK",e.GEL="GEL",e.GIP="GIP",e.HUF="HUF",e.ISK="ISK",e.MDL="MDL",e.MKD="MKD",e.NOK="NOK",e.PLN="PLN",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.SEK="SEK",e.TRY="TRY",e.UAH="UAH",e.AED="AED",e.AFN="AFN",e.AMD="AMD",e.AZN="AZN",e.BDT="BDT",e.BND="BND",e.CNY="CNY",e.HKD="HKD",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.JPY="JPY",e.KGS="KGS",e.KHR="KHR",e.KRW="KRW",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MVR="MVR",e.MYR="MYR",e.NPR="NPR",e.PHP="PHP",e.PKR="PKR",e.QAR="QAR",e.SAR="SAR",e.SGD="SGD",e.THB="THB",e.TJS="TJS",e.TWD="TWD",e.UZS="UZS",e.VND="VND",e.YER="YER",e.AOA="AOA",e.BWP="BWP",e.CDF="CDF",e.CVE="CVE",e.DJF="DJF",e.DZD="DZD",e.EGP="EGP",e.ETB="ETB",e.GMD="GMD",e.GNF="GNF",e.KES="KES",e.KMF="KMF",e.LRD="LRD",e.LSL="LSL",e.MAD="MAD",e.MGA="MGA",e.MUR="MUR",e.MWK="MWK",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.RWF="RWF",e.SCR="SCR",e.SHP="SHP",e.SLE="SLE",e.SOS="SOS",e.STD="STD",e.SZL="SZL",e.TZS="TZS",e.UGX="UGX",e.XAF="XAF",e.XOF="XOF",e.ZAR="ZAR",e.ZMW="ZMW",e.ANG="ANG",e.AUD="AUD",e.BIF="BIF",e.FJD="FJD",e.NZD="NZD",e.PGK="PGK",e.SBD="SBD",e.TOP="TOP",e.VUV="VUV",e.WST="WST",e.XCG="XCG",e.XPF="XPF",e}({}),Ko=["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","UGX","VND","VUV","XAF","XOF","XPF"],Ho={USD:50,AED:200,ARS:50,AUD:50,BRL:50,CAD:50,CHF:50,COP:50,CZK:1500,DKK:250,EUR:50,GBP:30,HKD:400,HUF:17500,IDR:50,ILS:50,INR:50,JPY:50,KRW:50,MXN:1e3,MYR:200,NOK:300,NZD:50,PHP:50,PLN:200,RON:200,RUB:50,SEK:300,SGD:50,THB:1e3,ZAR:50};function Ft(e){return Ko.includes(e)}n(Ft,"isZeroDecimalCurrency");function Jp(e,t){return Ft(t)?Math.round(e):Math.round(e*100)}n(Jp,"toSmallestUnit");function Qr(e,t){return Ft(t)?e:e/100}n(Qr,"fromSmallestUnit");var Bt=new Map;function Vo(e){let t=Bt.get(e);if(t)return t;try{let o=new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(s=>s.type==="currency")?.value,i=o&&o.toUpperCase()!==e?o:e;return Bt.set(e,i),i}catch{return Bt.set(e,e),e}}n(Vo,"getCurrencySymbol");function Cp(e){let t=Vo(e);return t!==e?`${e} (${t})`:e}n(Cp,"formatCurrencyLabel");function Qp(e,t,o){let i=Vo(t);if(e==null)return o?.emptyPlaceholder??`--.-- ${i}`;if(e===0)return o?.freeLabel??"Free";let s=Qr(e,t),r=Ft(t)?0:2;return `${s.toFixed(r)} ${i}`}n(Qp,"formatPrice");var ec=function(e){return e.Europe="Europe",e.NonEurope="Non Europe",e}({}),Ie=95,tc=Ie,To={transactionFee:25,europeRate:1.5,nonEuropeRate:3.25,connectRate:.25},Wo={percentage:50,minimumCommission:Ie},Zo={locality:"Europe"};function oc(e){let t=Ho[e];return t?Math.max(t,Ie):Ie}n(oc,"getMinimumChargeableAmount");function ei(e,t,o=To,i=Wo,s=Zo){if(e<=0)return 0;let a=(s.locality==="Europe"?o.europeRate:o.nonEuropeRate)*e/100,p=o.connectRate*e/100,f=o.transactionFee+a+p,k=i.minimumCommission;return Math.max(t?f+f*i.percentage/100:f/(1-i.percentage/100),k)}n(ei,"calculateTicketFee");function ti(e,t,o,i=To,s=Zo){return ei(e,t,i,{...Wo,minimumCommission:o},s)}n(ti,"calculateTicketFeeWithCurrency");function nc(e,t=Ie){let o=0,i=0,s=0;for(let p of e){let f=Math.round(ti(p.unitAmount,p.isFeesIncluded,t));o+=p.unitAmount*p.quantity,i+=f*p.quantity,p.isFeesIncluded&&(s+=f*p.quantity);}let r=Math.min(s,o),a=o+i-r;return {subtotal:o,fees:i,includedFees:r,total:a}}n(nc,"calculateOrderTotal");function rc(e,t=Ie){return e<=0?e:e<t?t:e}n(rc,"applyMinimumChargeableAmount");var Ae=typeof window<"u";function ee(e,t){let o=new FormData,i=n(s=>s!==null&&typeof s=="object"&&"uri"in s&&"name"in s&&"type"in s,"isFileObject");if(typeof File<"u"&&t instanceof File)o.append(e,t);else if(typeof FileList<"u"&&t instanceof FileList)for(let s of Array.from(t))o.append(e,s);else if(i(t))o.append(e,t);else if(Array.isArray(t))for(let s of t)o.append(e,s);return o}n(ee,"buildFileFormData");function fc(e,t){return Et[e]>=Et[t]}n(fc,"isMemberRoleAtLeast");var ni=oi__default.default.create({headers:{Accept:"application/json",...!Ae&&{"User-Agent":`${Ut.name}/${Ut.version}`}},responseType:"json",transformRequest:[(e,t)=>{if(e instanceof FormData){if(t&&typeof t=="object"){let o={};for(let[i,s]of Object.entries(t)){let r=i.toLowerCase();r!=="content-type"&&(o[r]=s);}Object.keys(t).forEach(i=>delete t[i]),Object.assign(t,o);}return e}if(e!=null)return t&&(t["Content-Type"]="application/json"),JSON.stringify(e)}],withCredentials:Ae}),qo=n(async(e,t)=>{let{apiKey:o,accessToken:i,...s}=t||{},r={...s.headers,...o&&{"X-API-Key":o},...i&&{Authorization:`Bearer ${i}`}};return ni(e,{...s,headers:r}).then(p=>p).catch(p=>{throw p.data?new Ge(p,p.data):(console.error(p),p)})},"request");var Ge=class extends Error{static{n(this,"TonightPassAPIError");}response;data;status;constructor(t,o){super(o.message),this.response=t,this.data=o,this.status=t.status;}},pt=class{static{n(this,"Client");}apiKey;accessToken;cacheManager;baseURL;url;constructor(t){this.baseURL=t.baseURL||Go,this.apiKey=t.apiKey,this.accessToken=t.accessToken,this.url=(o,i)=>pathcat.pathcat(this.baseURL,o,i),t.cache?.enabled&&(this.cacheManager=new Fe(t.cache));}setOptions(t){t.baseURL&&(this.baseURL=t.baseURL),this.apiKey=t.apiKey,this.accessToken=t.accessToken,t.cache?.enabled?this.cacheManager=new Fe(t.cache):this.cacheManager=void 0;}setAccessToken(t){this.accessToken=t;}async clearCache(){await this.cacheManager?.clear();}async getCacheStats(){return this.cacheManager?.stats()}async get(t,o,i){return this.requester("GET",t,void 0,o,i)}async post(t,o,i,s){return this.requester("POST",t,o,i,s)}async put(t,o,i,s){return this.requester("PUT",t,o,i,s)}async patch(t,o,i,s){return this.requester("PATCH",t,o,i,s)}async delete(t,o,i,s){return this.requester("DELETE",t,o,i,s)}async requester(t,o,i,s={},r={}){let a=this.url(o,s);if(i!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");if(this.cacheManager){let k=await this.cacheManager.get(t,a);if(k!==null)return k}let p=await qo(a,{method:t,data:i,apiKey:this.apiKey,accessToken:this.accessToken,...r}),f=p.data;if(!f.success)throw new Ge(p,f);return this.cacheManager&&await this.cacheManager.set(t,a,f.data),f.data}};var te=function(e){return e.PUBLIC="public",e.INTERNAL="internal",e}({}),oe=function(e){return e.User="user",e.App="app",e}({});function ct(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(ct,"_ts_decorate");function dt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(dt,"_ts_metadata");var _e=class{static{n(this,"CreateApiKeyDto");}name;type;tier;allowedOrigins};ct([classValidator.IsString(),classValidator.Length(1,100),dt("design:type",String)],_e.prototype,"name",void 0);ct([classValidator.IsEnum(oe),classValidator.IsOptional(),dt("design:type",typeof oe>"u"?Object:oe)],_e.prototype,"type",void 0);ct([classValidator.IsEnum(te),classValidator.IsOptional(),dt("design:type",typeof te>"u"?Object:te)],_e.prototype,"tier",void 0);ct([classValidator.IsArray(),classValidator.IsUrl({require_protocol:true,require_tld:false},{each:true,message:"Each allowed origin must be a valid URL"}),classValidator.ArrayMaxSize(20),classValidator.IsOptional(),dt("design:type",Array)],_e.prototype,"allowedOrigins",void 0);function Ke(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Ke,"_ts_decorate");function He(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(He,"_ts_metadata");var he=class{static{n(this,"UpdateApiKeyDto");}name;isActive;type;tier;allowedOrigins};Ke([classValidator.IsString(),classValidator.IsOptional(),classValidator.Length(1,100),He("design:type",String)],he.prototype,"name",void 0);Ke([classValidator.IsBoolean(),classValidator.IsOptional(),He("design:type",Boolean)],he.prototype,"isActive",void 0);Ke([classValidator.IsEnum(oe),classValidator.IsOptional(),He("design:type",typeof oe>"u"?Object:oe)],he.prototype,"type",void 0);Ke([classValidator.IsEnum(te),classValidator.IsOptional(),He("design:type",typeof te>"u"?Object:te)],he.prototype,"tier",void 0);Ke([classValidator.IsArray(),classValidator.IsUrl({require_protocol:true,require_tld:false},{each:true,message:"Each allowed origin must be a valid URL"}),classValidator.ArrayMaxSize(20),classValidator.IsOptional(),He("design:type",Array)],he.prototype,"allowedOrigins",void 0);function yi(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(yi,"_ts_decorate");function hi(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(hi,"_ts_metadata");var Kt=class{static{n(this,"AddParticipantDto");}username};yi([classValidator.IsString(),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),hi("design:type",String)],Kt.prototype,"username",void 0);var Yc=function(e){return e.Google="google",e.Facebook="facebook",e.Twitter="twitter",e}({}),kc=function(e){return e.SignUp="signup",e.SignIn="signin",e}({});var Cc=function(e){return e.All="ALL",e.Online="ONLINE",e.Archived="ARCHIVED",e}({}),Qc=function(e){return e.Onsite="ONSITE",e.Remote="REMOTE",e.Hybrid="HYBRID",e}({}),ed=function(e){return e.Anywhere="ANYWHERE",e.Country="COUNTRY",e}({});var ft=function(e){return e.Dislike="dislike",e.HarassmentSelf="harassment_self",e.HarassmentOther="harassment_other",e.SexualHarassmentSelf="sexual_harassment_self",e.NudesSelf="nudes_self",e.SexualContent="sexual_content",e.ChildInvolved="child_involved",e.ThreatTarget="threat_target",e.ViolentContent="violent_content",e.HateSpeech="hate_speech",e.Terrorism="terrorism",e.DrugSale="drug_sale",e.WeaponSale="weapon_sale",e.SelfHarmConcern="self_harm_concern",e.SelfHarmPromotion="self_harm_promotion",e.Other="other",e}({});var ve=function(e){return e.Private="private",e.Group="group",e}({}),nd=function(e){return e.Member="member",e.Admin="admin",e}({}),rd=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var ad=function(e){return e.AuthEmailAlreadyExists="auth.email-already-exists",e.AuthUsernameAlreadyExists="auth.username-already-exists",e.AuthPhoneNumberAlreadyExists="auth.phone-number-already-exists",e.AuthInvalidCredentials="auth.invalid-credentials",e.AuthUserNotFound="auth.user-not-found",e.AuthInvalidToken="auth.invalid-token",e.AuthTokenExpired="auth.token-expired",e.AuthUnauthorized="auth.unauthorized",e.AuthPasswordMismatch="auth.password-mismatch",e.AuthInvalidOAuth2Provider="auth.invalid-oauth2-provider",e.AuthOAuth2Error="auth.oauth2-error",e.UserNotFound="user.not-found",e.UserInvalidUsername="user.invalid-username",e.UserInvalidEmail="user.invalid-email",e.UserInvalidPhoneNumber="user.invalid-phone-number",e.UserInvalidPassword="user.invalid-password",e.UserInvalidBirthDate="user.invalid-birth-date",e.UserInvalidGender="user.invalid-gender",e.UserInvalidRole="user.invalid-role",e.UserInvalidPreferences="user.invalid-preferences",e.UserInvalidLocation="user.invalid-location",e.UserInvalidFile="user.invalid-file",e.UserFileTooLarge="user.file-too-large",e.UserUnsupportedFileType="user.unsupported-file-type",e.OrganizationNotFound="organization.not-found",e.OrganizationInvalidSlug="organization.invalid-slug",e.OrganizationInvalidName="organization.invalid-name",e.OrganizationInvalidDescription="organization.invalid-description",e.OrganizationInvalidLocation="organization.invalid-location",e.OrganizationInvalidSocialLink="organization.invalid-social-link",e.OrganizationAlreadyExists="organization.already-exists",e.OrganizationUnauthorized="organization.unauthorized",e.OrganizationMemberNotFound="organization.member-not-found",e.OrganizationMemberInvalidRole="organization.member-invalid-role",e.OrganizationMemberAlreadyExists="organization.member-already-exists",e.EventNotFound="event.not-found",e.EventInvalidTitle="event.invalid-title",e.EventInvalidDescription="event.invalid-description",e.EventInvalidLocation="event.invalid-location",e.EventInvalidDates="event.invalid-dates",e.EventInvalidTickets="event.invalid-tickets",e.EventInvalidStyles="event.invalid-styles",e.EventInvalidType="event.invalid-type",e.EventInvalidVisibility="event.invalid-visibility",e.EventUnavailable="event.unavailable",e.EventTicketNotFound="event.ticket-not-found",e.EventTicketUnavailable="event.ticket-unavailable",e.EventTicketInvalidQuantity="event.ticket-invalid-quantity",e.OrderNotFound="order.not-found",e.OrderInvalidStatus="order.invalid-status",e.OrderInvalidPayment="order.invalid-payment",e.OrderPaymentFailed="order.payment-failed",e.OrderAlreadyPaid="order.already-paid",e.OrderCancelled="order.cancelled",e.OrderRefunded="order.refunded",e.OrderExpired="order.expired",e.BookingNotFound="booking.not-found",e.BookingInvalidStatus="booking.invalid-status",e.BookingInvalidTickets="booking.invalid-tickets",e.BookingTicketNotFound="booking.ticket-not-found",e.BookingTicketInvalidToken="booking.ticket-invalid-token",e.BookingTicketExpired="booking.ticket-expired",e.BookingTicketUsed="booking.ticket-used",e.FileNotFound="file.not-found",e.FileInvalidType="file.invalid-type",e.FileTooLarge="file.too-large",e.FileUploadFailed="file.upload-failed",e.ValidationError="validation.error",e.DatabaseError="database.error",e.InternalServerError="server.internal-error",e.NotFound="not-found",e.BadRequest="bad-request",e.Unauthorized="unauthorized",e.Forbidden="forbidden",e.TooManyRequests="too-many-requests",e.ServiceUnavailable="service-unavailable",e.TooManyRequestsAuth="rate-limit.auth",e.TooManyRequestsApi="rate-limit.api",e.WebhookInvalidSignature="webhook.invalid-signature",e.WebhookInvalidEvent="webhook.invalid-event",e.WebhookProcessingFailed="webhook.processing-failed",e.PaymentRequired="payment.required",e.PaymentMethodRequired="payment.method-required",e.PaymentFailed="payment.failed",e.PaymentCancelled="payment.cancelled",e.PaymentRefunded="payment.refunded",e.BillingInvalidAccount="billing.invalid-account",e.BillingAccountRequired="billing.account-required",e.NotificationInvalidType="notification.invalid-type",e.NotificationSendingFailed="notification.sending-failed",e.CacheError="cache.error",e.CacheMiss="cache.miss",e.ExternalServiceError="external-service.error",e.ExternalServiceTimeout="external-service.timeout",e.ExternalServiceUnavailable="external-service.unavailable",e}({});var cd=function(e){return e.Following="following",e.Discover="discover",e}({});var fd=function(e){return e.Completed="completed",e.Pending="pending",e.Transferred="transferred",e.Cancelled="cancelled",e}({}),ld=function(e){return e.Pending="pending",e.Succeeded="succeeded",e.Failed="failed",e.RequiresAction="requires_action",e}({});var ne=function(e){return e.Percentage="percentage",e.Fixed="fixed",e}({});function yd(e,t=new Date){if(e.lifecycleStatus===lt.Cancelled)return be.Cancelled;if(e.lifecycleStatus===lt.Postponed)return be.Postponed;let o=e.startAt instanceof Date?e.startAt:new Date(e.startAt),i=e.endAt instanceof Date?e.endAt:new Date(e.endAt);return e.lifecycleStatus===lt.Rescheduled&&t<o?be.Rescheduled:o>t?be.Upcoming:o<=t&&i>=t?be.Ongoing:be.Ended}n(yd,"computeOrganizationEventStatus");var bd=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var re=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),ie=function(e){return e.Entry="entry",e.Package="package",e.Meal="meal",e.Drink="drink",e.Parking="parking",e.Accommodation="accommodation",e.Camping="camping",e.Locker="locker",e.Shuttle="shuttle",e.Other="other",e}({});var se=function(e){return e.Clubbing="clubbing",e.Concert="concert",e.Festival="festival",e.HouseParty="house_party",e.FriendsParty="friends_party",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Spectacle="spectacle",e.Cruise="cruise",e.OutsideAnimation="outside_animation",e.Sport="sport",e.Match="match",e.Seminar="seminar",e.Conference="conference",e.WellnessDay="wellness_day",e.Workshop="workshop",e.TradeFair="trade_fair",e.ConsumerShow="consumer_show",e.Membership="membership",e}({}),ae=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),Sd=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),be=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e.Cancelled="cancelled",e.Postponed="postponed",e.Rescheduled="rescheduled",e}({}),lt=function(e){return e.Cancelled="cancelled",e.Postponed="postponed",e.Rescheduled="rescheduled",e}({}),Id=function(e){return e.Organizer="organizer",e.Support="support",e.ExternalSource="external_source",e}({});var zd=function(e){return e.OrganizationCreated="organization_created",e.Follow="follow",e.OrganizationMemberInvited="organization_member_invited",e.OrganizationMemberJoined="organization_member_joined",e.OrganizationMemberLeft="organization_member_left",e.OrganizationMemberRoleUpdated="organization_member_role_updated",e.OrganizationEventCreated="organization_event_created",e.OrganizationEventUpdated="organization_event_updated",e.OrganizationEventCancelled="organization_event_cancelled",e.OrganizationEventPostponed="organization_event_postponed",e.OrganizationEventRescheduled="organization_event_rescheduled",e.OrganizationEventCancelRefundsCompleted="organization_event_cancel_refunds_completed",e.OrganizationEventCancelRefundsPartial="organization_event_cancel_refunds_partial",e.OrganizationEventMilestone="organization_event_milestone",e.OrderReceived="order_received",e.PayoutCompleted="payout_completed",e.BillingAccountConnected="billing_account_connected",e}({});var Md=function(e){return e.InvitationLink="invitation_link",e}({});var Ed=function(e){return e.Paid="paid",e.Pending="pending",e.InTransit="in_transit",e.Failed="failed",e.Canceled="canceled",e}({}),Ud=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Zd=function(e){return e.User="user",e.Organization="organization",e}({});var $d=["\u{1F44D}","\u2764\uFE0F","\u{1F389}","\u{1F440}","\u{1F680}"],Xd=function(e){return e.ComingSoon="coming-soon",e.Shipped="shipped",e}({});var kd=function(e){return e.FR="fr",e.EN="en",e}({});function Vt(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Vt,"_ts_decorate");function Tt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Tt,"_ts_metadata");var Te=class{static{n(this,"CreateChannelDto");}type;participantUsernames;name};Vt([classValidator.IsEnum(ve),Tt("design:type",typeof ve>"u"?Object:ve)],Te.prototype,"type",void 0);Vt([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ValidateIf(e=>e.type===ve.Private),classValidator.ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),classValidator.ValidateIf(e=>e.type===ve.Group),classValidator.ArrayMinSize(3,{message:"Group channels must have at least 3 participants"}),classValidator.ArrayMaxSize(50,{message:"Group channels can have at most 50 participants"}),classValidator.IsString({each:true}),classValidator.Matches(c.USERNAME,{each:true,message:"user.username.format"}),Tt("design:type",Array)],Te.prototype,"participantUsernames",void 0);Vt([classValidator.IsOptional(),classValidator.ValidateIf(e=>e.type===ve.Group),classValidator.IsString(),classValidator.Length(1,100),Tt("design:type",String)],Te.prototype,"name",void 0);function _i(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(_i,"_ts_decorate");function Oi(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Oi,"_ts_metadata");var Wt=class{static{n(this,"AddReactionDto");}emoji};_i([classValidator.IsString(),classValidator.Length(1,10),Oi("design:type",String)],Wt.prototype,"emoji",void 0);function Pi(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Pi,"_ts_decorate");var Oe=class{static{n(this,"ContentOrAttachmentsConstraint");}validate(t,o){let i=o.object,s=!!(i.content&&i.content.trim().length>0),r=!!(i.attachments&&i.attachments.length>0);return s||r}defaultMessage(){return "Either content or attachments must be provided"}};Oe=Pi([classValidator.ValidatorConstraint({name:"contentOrAttachments",async:false})],Oe);function Zt(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Zt,"_ts_decorate");function qt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(qt,"_ts_metadata");var We=class{static{n(this,"CreateChannelMessageDto");}content;attachments;replyToId};Zt([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.content!==void 0),classValidator.Length(1,1024),qt("design:type",String)],We.prototype,"content",void 0);Zt([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(10),classValidator.Matches(c.CHANNEL_MESSAGE_ATTACHMENT,{each:true}),classValidator.Validate(Oe),qt("design:type",Array)],We.prototype,"attachments",void 0);Zt([classValidator.IsOptional(),classValidator.IsMongoId(),qt("design:type",String)],We.prototype,"replyToId",void 0);function Co(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Co,"_ts_decorate");function Qo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Qo,"_ts_metadata");var mt=class{static{n(this,"ReportChannelMessageDto");}reason;description};Co([classValidator.IsEnum(ft),Qo("design:type",typeof ft>"u"?Object:ft)],mt.prototype,"reason",void 0);Co([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.description&&e.description.trim().length>0),classValidator.Length(1,500),Qo("design:type",String)],mt.prototype,"description",void 0);function Wi(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Wi,"_ts_decorate");function Zi(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Zi,"_ts_metadata");var Xt=class{static{n(this,"UpdateChannelMessageDto");}content};Wi([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,1024),Zi("design:type",String)],Xt.prototype,"content",void 0);function Yi(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Yi,"_ts_decorate");function ki(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ki,"_ts_metadata");var Yt=class{static{n(this,"UpdateChannelDto");}name};Yi([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,100),ki("design:type",String)],Yt.prototype,"name",void 0);function es(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(es,"_ts_decorate");var je=class{static{n(this,"CoordinatesRangeConstraint");}validate(t){if(!Array.isArray(t)||t.length!==2)return false;let[o,i]=t;return i>=-90&&i<=90&&o>=-180&&o<=180}defaultMessage(){return "Coordinates must be within valid geographic ranges"}};je=es([classValidator.ValidatorConstraint({name:"coordinatesRange",async:false})],je);var ut=n((e,t)=>{if(!e)return e;let o=e.split(",").map(J=>J.trim()),i=t.zipCode?.toLowerCase(),s=t.city?.toLowerCase(),r=t.country?.toLowerCase(),a=[i,s,r].filter(J=>!!J),p=i&&s?`${i} ${s}`:void 0,f=n(J=>{let Fo=J.toLowerCase();return !!(a.includes(Fo)||p&&Fo===p)},"isNoise"),k=[];for(let J of o)f(J)||k.push(J);return k.join(", ").trim()||e},"normalizeAddress");function pe(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(pe,"_ts_decorate");function ce(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ce,"_ts_metadata");var D=class{static{n(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point",this.coordinates=[0,0];}};pe([classValidator.IsString(),classValidator.IsNotEmpty(),ce("design:type",String)],D.prototype,"type",void 0);pe([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Validate(je),ce("design:type",Array)],D.prototype,"coordinates",void 0);var _=class{static{n(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),ce("design:type",String)],_.prototype,"name",void 0);pe([classTransformer.Transform(({value:e,obj:t})=>ut(e,{zipCode:t.zipCode,city:t.city,country:t.country})),classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),ce("design:type",String)],_.prototype,"address",void 0);pe([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),ce("design:type",String)],_.prototype,"zipCode",void 0);pe([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),ce("design:type",String)],_.prototype,"city",void 0);pe([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),ce("design:type",String)],_.prototype,"country",void 0);pe([classValidator.ValidateNested(),classTransformer.Type(()=>D),classValidator.IsNotEmpty(),ce("design:type",typeof D>"u"?Object:D)],_.prototype,"geometry",void 0);function Pe(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Pe,"_ts_decorate");function De(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(De,"_ts_metadata");var O=class{static{n(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};Pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),De("design:type",String)],O.prototype,"name",void 0);Pe([classValidator.IsOptional(),classTransformer.Transform(({value:e,obj:t})=>ut(e,{zipCode:t.zipCode,city:t.city,country:t.country})),classValidator.IsString(),classValidator.Length(1,256),De("design:type",String)],O.prototype,"address",void 0);Pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),De("design:type",String)],O.prototype,"zipCode",void 0);Pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),De("design:type",String)],O.prototype,"city",void 0);Pe([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),De("design:type",String)],O.prototype,"country",void 0);Pe([classValidator.IsOptional(),classValidator.ValidateNested(),classTransformer.Type(()=>D),De("design:type",typeof D>"u"?Object:D)],O.prototype,"geometry",void 0);function K(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(K,"_ts_decorate");function H(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(H,"_ts_metadata");var Ne=class{static{n(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};K([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),H("design:type",String)],Ne.prototype,"organizationSlug",void 0);K([classValidator.IsObject(),H("design:type",typeof G>"u"?Object:G)],Ne.prototype,"identity",void 0);K([classValidator.IsArray(),H("design:type",Array)],Ne.prototype,"members",void 0);K([classValidator.IsOptional(),classValidator.IsObject(),H("design:type",typeof Location>"u"?Object:Location)],Ne.prototype,"location",void 0);var G=class{static{n(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};K([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),H("design:type",String)],G.prototype,"displayName",void 0);K([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),H("design:type",String)],G.prototype,"description",void 0);K([classValidator.Matches(c.ORGANIZATION_AVATAR_URL,{message:"organization.avatar.url.invalid"}),H("design:type",String)],G.prototype,"avatarUrl",void 0);K([classValidator.IsOptional(),classValidator.Matches(c.ORGANIZATION_BANNER_URL,{message:"organization.banner.url.invalid"}),H("design:type",String)],G.prototype,"bannerUrl",void 0);K([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),H("design:type",Array)],G.prototype,"links",void 0);function gt(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(gt,"_ts_decorate");function yt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(yt,"_ts_metadata");var Me=class{static{n(this,"CancelOrganizationEventDto");}reason;refundOrders;notifyHolders;allowEndedCancel};gt([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,500),yt("design:type",String)],Me.prototype,"reason",void 0);gt([classValidator.IsOptional(),classValidator.IsBoolean(),yt("design:type",Boolean)],Me.prototype,"refundOrders",void 0);gt([classValidator.IsOptional(),classValidator.IsBoolean(),yt("design:type",Boolean)],Me.prototype,"notifyHolders",void 0);gt([classValidator.IsOptional(),classValidator.IsBoolean(),yt("design:type",Boolean)],Me.prototype,"allowEndedCancel",void 0);function nn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(nn,"_ts_decorate");var Ye=class{static{n(this,"AtLeastOneMediaConstraint");}validate(t,o){let i=o.object,s=i.flyers||[],r=i.trailers||[];return s.length>0||r.length>0}defaultMessage(){return "At least one flyer or trailer must be provided"}};Ye=nn([classValidator.ValidatorConstraint({name:"atLeastOneMedia",async:false})],Ye);function an(e){return (t,o)=>{classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:Ye});}}n(an,"AtLeastOneMedia");var ke=class{static{n(this,"AtLeastOneMediaOnUpdateConstraint");}validate(t,o){let i=o.object;return i.flyers!==void 0&&i.trailers!==void 0?i.flyers.length>0||i.trailers.length>0:i.flyers!==void 0&&i.trailers===void 0?i.flyers.length>0:i.trailers!==void 0&&i.flyers===void 0?i.trailers.length>0:true}defaultMessage(){return "Cannot remove all media from event. At least one flyer or trailer must remain"}};ke=nn([classValidator.ValidatorConstraint({name:"atLeastOneMediaOnUpdate",async:false})],ke);function pn(e){return (t,o)=>{classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:ke});}}n(pn,"AtLeastOneMediaOnUpdate");function hs(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(hs,"_ts_decorate");var Qt=class{static{n(this,"IsAfterNowConstraint");}validate(t){return t instanceof Date?t.getTime()>Date.now():false}defaultMessage(t){return `${t.property} must be in the future`}};Qt=hs([classValidator.ValidatorConstraint({name:"isAfterNow",async:false})],Qt);function V(e){return (t,o)=>{classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:Qt});}}n(V,"IsAfterNow");function eo(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(eo,"_ts_decorate");function to(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(to,"_ts_metadata");var T=class{static{n(this,"EventArtistDto");}id;permalink;username};eo([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Matches(/^\d+$/,{message:"artist.id.numeric"}),to("design:type",String)],T.prototype,"id",void 0);eo([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,100),classValidator.Matches(/^[a-zA-Z0-9_-]+$/,{message:"artist.permalink.format"}),to("design:type",String)],T.prototype,"permalink",void 0);eo([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,100),to("design:type",String)],T.prototype,"username",void 0);function E(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(E,"_ts_decorate");function U(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(U,"_ts_metadata");var b=class{static{n(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;isVisible;isFeesIncluded;startAt;endAt};E([classValidator.IsString(),classValidator.Length(1,128),U("design:type",String)],b.prototype,"name",void 0);E([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),U("design:type",String)],b.prototype,"description",void 0);E([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),U("design:type",Number)],b.prototype,"price",void 0);E([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),U("design:type",Number)],b.prototype,"quantity",void 0);E([classValidator.IsEnum(re),U("design:type",typeof re>"u"?Object:re)],b.prototype,"type",void 0);E([classValidator.IsEnum(ie),U("design:type",typeof ie>"u"?Object:ie)],b.prototype,"category",void 0);E([classValidator.IsBoolean(),U("design:type",Boolean)],b.prototype,"isVisible",void 0);E([classValidator.IsBoolean(),U("design:type",Boolean)],b.prototype,"isFeesIncluded",void 0);E([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),U("design:type",typeof Date>"u"?Object:Date)],b.prototype,"startAt",void 0);E([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),U("design:type",typeof Date>"u"?Object:Date)],b.prototype,"endAt",void 0);function z(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(z,"_ts_decorate");function N(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(N,"_ts_metadata");var u=class{static{n(this,"UpdateOrganizationEventTicketDto");}id;name;description;price;quantity;type;category;isVisible;isFeesIncluded;startAt;endAt};z([classValidator.IsString(),classValidator.IsOptional(),N("design:type",String)],u.prototype,"id",void 0);z([classValidator.IsString(),classValidator.Length(1,128),classValidator.IsOptional(),N("design:type",String)],u.prototype,"name",void 0);z([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),N("design:type",String)],u.prototype,"description",void 0);z([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),N("design:type",Number)],u.prototype,"price",void 0);z([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),N("design:type",Number)],u.prototype,"quantity",void 0);z([classValidator.IsEnum(re),classValidator.IsOptional(),N("design:type",typeof re>"u"?Object:re)],u.prototype,"type",void 0);z([classValidator.IsEnum(ie),classValidator.IsOptional(),N("design:type",typeof ie>"u"?Object:ie)],u.prototype,"category",void 0);z([classValidator.IsBoolean(),classValidator.IsOptional(),N("design:type",Boolean)],u.prototype,"isVisible",void 0);z([classValidator.IsBoolean(),classValidator.IsOptional(),N("design:type",Boolean)],u.prototype,"isFeesIncluded",void 0);z([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),N("design:type",typeof Date>"u"?Object:Date)],u.prototype,"startAt",void 0);z([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),N("design:type",typeof Date>"u"?Object:Date)],u.prototype,"endAt",void 0);function R(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(R,"_ts_decorate");function x(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(x,"_ts_metadata");var m=class{static{n(this,"BaseOrganizationEventDto");}title;slug;description;type;visibility;currency;flyers;trailers;location;styles;artists;startAt;endAt};R([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,64),x("design:type",String)],m.prototype,"title",void 0);R([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG,{message:"organization.event.slug.format"}),x("design:type",String)],m.prototype,"slug",void 0);R([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,2048),x("design:type",String)],m.prototype,"description",void 0);R([classValidator.IsEnum(se),classValidator.IsNotEmpty(),x("design:type",typeof se>"u"?Object:se)],m.prototype,"type",void 0);R([classValidator.IsEnum(ae),classValidator.IsNotEmpty(),x("design:type",typeof ae>"u"?Object:ae)],m.prototype,"visibility",void 0);R([classValidator.IsEnum(at),classValidator.IsNotEmpty(),x("design:type",typeof at>"u"?Object:at)],m.prototype,"currency",void 0);R([classValidator.IsArray(),classValidator.ArrayMaxSize(25),classValidator.Matches(c.EVENT_FLYER_URL,{each:true,message:"organization.event.flyers.url.invalid"}),an(),x("design:type",Array)],m.prototype,"flyers",void 0);R([classValidator.IsArray(),classValidator.ArrayMaxSize(25),classValidator.Matches(c.EVENT_TRAILER_URL,{each:true,message:"organization.event.trailers.url.invalid"}),x("design:type",Array)],m.prototype,"trailers",void 0);R([classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>_),classValidator.IsNotEmpty(),x("design:type",typeof _>"u"?Object:_)],m.prototype,"location",void 0);R([classValidator.IsArray(),classValidator.IsString({each:true}),classValidator.ArrayMinSize(1),x("design:type",Array)],m.prototype,"styles",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(50),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>T),x("design:type",Array)],m.prototype,"artists",void 0);R([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.IsNotEmpty(),V(),x("design:type",typeof Date>"u"?Object:Date)],m.prototype,"startAt",void 0);R([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.IsNotEmpty(),V(),x("design:type",typeof Date>"u"?Object:Date)],m.prototype,"endAt",void 0);var so=class extends m{static{n(this,"CreateOrganizationEventDto");}tickets};R([classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>b),classValidator.IsNotEmpty(),x("design:type",Array)],so.prototype,"tickets",void 0);function jn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(jn,"_ts_decorate");function wn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(wn,"_ts_metadata");var xt=class{static{n(this,"CreateOrganizationEventOrderDto");}cart;promoCode};jn([classValidator.IsArray(),classValidator.IsString({each:true}),wn("design:type",Array)],xt.prototype,"cart",void 0);jn([classValidator.IsOptional(),classValidator.IsString(),wn("design:type",String)],xt.prototype,"promoCode",void 0);function Dn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Dn,"_ts_decorate");function zn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(zn,"_ts_metadata");var St=class{static{n(this,"PostponeOrganizationEventDto");}reason;notifyHolders};Dn([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,500),zn("design:type",String)],St.prototype,"reason",void 0);Dn([classValidator.IsOptional(),classValidator.IsBoolean(),zn("design:type",Boolean)],St.prototype,"notifyHolders",void 0);function de(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(de,"_ts_decorate");function fe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(fe,"_ts_metadata");var B=class{static{n(this,"CreateOrganizationEventPromoCodeDto");}code;type;value;maxUses;isActive;minCartAmount;expiresAt;ticketIds};de([classValidator.IsString(),classValidator.Length(1,32),fe("design:type",String)],B.prototype,"code",void 0);de([classValidator.IsEnum(ne),fe("design:type",typeof ne>"u"?Object:ne)],B.prototype,"type",void 0);de([classValidator.IsNumber(),classValidator.Min(1),classValidator.Max(1e4),fe("design:type",Number)],B.prototype,"value",void 0);de([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(1),fe("design:type",Number)],B.prototype,"maxUses",void 0);de([classValidator.IsOptional(),classValidator.IsBoolean(),fe("design:type",Boolean)],B.prototype,"isActive",void 0);de([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(0),fe("design:type",Number)],B.prototype,"minCartAmount",void 0);de([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),fe("design:type",typeof Date>"u"?Object:Date)],B.prototype,"expiresAt",void 0);de([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),fe("design:type",Array)],B.prototype,"ticketIds",void 0);function le(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(le,"_ts_decorate");function me(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(me,"_ts_metadata");var F=class{static{n(this,"UpdateOrganizationEventPromoCodeDto");}code;type;value;maxUses;isActive;minCartAmount;expiresAt;ticketIds};le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),me("design:type",String)],F.prototype,"code",void 0);le([classValidator.IsOptional(),classValidator.IsEnum(ne),me("design:type",typeof ne>"u"?Object:ne)],F.prototype,"type",void 0);le([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(1),classValidator.Max(1e4),me("design:type",Number)],F.prototype,"value",void 0);le([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(1),me("design:type",Number)],F.prototype,"maxUses",void 0);le([classValidator.IsOptional(),classValidator.IsBoolean(),me("design:type",Boolean)],F.prototype,"isActive",void 0);le([classValidator.IsOptional(),classValidator.IsNumber(),classValidator.Min(0),me("design:type",Number)],F.prototype,"minCartAmount",void 0);le([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),me("design:type",typeof Date>"u"?Object:Date)],F.prototype,"expiresAt",void 0);le([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),me("design:type",Array)],F.prototype,"ticketIds",void 0);function It(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(It,"_ts_decorate");function At(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(At,"_ts_metadata");var Le=class{static{n(this,"RescheduleOrganizationEventDto");}startAt;endAt;reason;notifyHolders};It([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),V(),At("design:type",typeof Date>"u"?Object:Date)],Le.prototype,"startAt",void 0);It([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),V(),At("design:type",typeof Date>"u"?Object:Date)],Le.prototype,"endAt",void 0);It([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,500),At("design:type",String)],Le.prototype,"reason",void 0);It([classValidator.IsOptional(),classValidator.IsBoolean(),At("design:type",Boolean)],Le.prototype,"notifyHolders",void 0);var _t=class{static{n(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var Fn=class extends _t{static{n(this,"UpdateOrganizationEventStyleDto");}};function S(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(S,"_ts_decorate");function I(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(I,"_ts_metadata");var g=class{static{n(this,"UpdateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;artists;startAt;endAt};S([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,64),I("design:type",String)],g.prototype,"title",void 0);S([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG,{message:"organization.event.slug.format"}),I("design:type",String)],g.prototype,"slug",void 0);S([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(16,2048),I("design:type",String)],g.prototype,"description",void 0);S([classValidator.IsOptional(),classValidator.IsEnum(se),I("design:type",typeof se>"u"?Object:se)],g.prototype,"type",void 0);S([classValidator.IsOptional(),classValidator.IsEnum(ae),I("design:type",typeof ae>"u"?Object:ae)],g.prototype,"visibility",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.Matches(c.EVENT_FLYER_URL_UPDATE,{each:true,message:"organization.event.flyers.url.invalid"}),pn(),I("design:type",Array)],g.prototype,"flyers",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.Matches(c.EVENT_TRAILER_URL_UPDATE,{each:true,message:"organization.event.trailers.url.invalid"}),I("design:type",Array)],g.prototype,"trailers",void 0);S([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>O),I("design:type",typeof O>"u"?Object:O)],g.prototype,"location",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>u),I("design:type",Array)],g.prototype,"tickets",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),I("design:type",Array)],g.prototype,"styles",void 0);S([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(50),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>T),I("design:type",Array)],g.prototype,"artists",void 0);S([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),V(),I("design:type",typeof Date>"u"?Object:Date)],g.prototype,"startAt",void 0);S([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),V(),I("design:type",typeof Date>"u"?Object:Date)],g.prototype,"endAt",void 0);function Xs(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Xs,"_ts_decorate");function Ys(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Ys,"_ts_metadata");var So=class{static{n(this,"AcceptOrganizationMemberInvitationDto");}token};Xs([classValidator.IsString(),classValidator.IsNotEmpty(),Ys("design:type",String)],So.prototype,"token",void 0);function Vn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Vn,"_ts_decorate");function Tn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Tn,"_ts_metadata");var jt=class{static{n(this,"CreateOrganizationMemberDto");}user;role};Vn([classValidator.IsString(),classValidator.IsNotEmpty(),Tn("design:type",String)],jt.prototype,"user",void 0);Vn([classValidator.IsEnum(l),classValidator.IsNotEmpty(),Tn("design:type",typeof l>"u"?Object:l)],jt.prototype,"role",void 0);function ea(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(ea,"_ts_decorate");function ta(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ta,"_ts_metadata");var Io=class{static{n(this,"CreateOrganizationMemberInvitationLinkDto");}role};ea([classValidator.IsEnum(l),classValidator.IsOptional(),ta("design:type",typeof l>"u"?Object:l)],Io.prototype,"role",void 0);function ra(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(ra,"_ts_decorate");function ia(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ia,"_ts_metadata");var Ao=class{static{n(this,"UpdateOrganizationMemberDto");}role};ra([classValidator.IsEnum(l),classValidator.IsNotEmpty(),ia("design:type",typeof l>"u"?Object:l)],Ao.prototype,"role",void 0);function q(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(q,"_ts_decorate");function $(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n($,"_ts_metadata");var Ee=class{static{n(this,"UpdateOrganizationDto");}slug;identity;members;location};q([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"organization.slug.format"}),$("design:type",String)],Ee.prototype,"slug",void 0);q([classValidator.IsObject(),classValidator.IsOptional(),$("design:type",typeof Z>"u"?Object:Z)],Ee.prototype,"identity",void 0);q([classValidator.IsOptional(),classValidator.IsArray(),$("design:type",Array)],Ee.prototype,"members",void 0);q([classValidator.IsOptional(),classValidator.IsObject(),$("design:type",typeof Location>"u"?Object:Location)],Ee.prototype,"location",void 0);var Z=class{static{n(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};q([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),$("design:type",String)],Z.prototype,"displayName",void 0);q([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),$("design:type",String)],Z.prototype,"description",void 0);q([classValidator.IsOptional(),classValidator.Matches(c.ORGANIZATION_AVATAR_URL),$("design:type",String)],Z.prototype,"avatarUrl",void 0);q([classValidator.IsOptional(),classValidator.Matches(c.ORGANIZATION_BANNER_URL),$("design:type",String)],Z.prototype,"bannerUrl",void 0);q([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),$("design:type",Array)],Z.prototype,"links",void 0);function j(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(j,"_ts_decorate");function w(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(w,"_ts_metadata");var et=class{static{n(this,"CreateUserDto");}identifier;identity;password};j([classValidator.ValidateNested(),classTransformer.Type(()=>Ue),w("design:type",typeof Ue>"u"?Object:Ue)],et.prototype,"identifier",void 0);j([classValidator.ValidateNested(),classTransformer.Type(()=>L),w("design:type",typeof L>"u"?Object:L)],et.prototype,"identity",void 0);j([classValidator.IsString(),classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),w("design:type",String)],et.prototype,"password",void 0);var Ue=class{static{n(this,"CreateUserIdentifierDto");}email;phoneNumber;username};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),w("design:type",String)],Ue.prototype,"email",void 0);j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),w("design:type",String)],Ue.prototype,"phoneNumber",void 0);j([classValidator.IsString(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),w("design:type",String)],Ue.prototype,"username",void 0);var L=class{static{n(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate;links};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),w("design:type",String)],L.prototype,"firstName",void 0);j([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),w("design:type",String)],L.prototype,"lastName",void 0);j([classValidator.IsEnum(Q),w("design:type",typeof Q>"u"?Object:Q)],L.prototype,"gender",void 0);j([classValidator.IsOptional(),classValidator.Matches(c.USER_AVATAR_URL_CREATE,{message:"user.avatar.url.invalid"}),w("design:type",String)],L.prototype,"avatarUrl",void 0);j([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>{if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t}),classValidator.IsDate(),w("design:type",typeof Date>"u"?Object:Date)],L.prototype,"birthDate",void 0);j([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),w("design:type",Array)],L.prototype,"links",void 0);function xa(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(xa,"_ts_decorate");function Sa(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Sa,"_ts_metadata");var Po=class{static{n(this,"GoogleOneTapDto");}credential};xa([classValidator.IsNotEmpty(),classValidator.IsString(),Sa("design:type",String)],Po.prototype,"credential",void 0);function Yn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Yn,"_ts_decorate");function kn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(kn,"_ts_metadata");var wt=class{static{n(this,"CreateUserPostCommentDto");}content;replyToId};Yn([classValidator.IsString(),classValidator.Length(1,280),kn("design:type",String)],wt.prototype,"content",void 0);Yn([classValidator.IsOptional(),classValidator.IsString(),kn("design:type",String)],wt.prototype,"replyToId",void 0);function ja(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(ja,"_ts_decorate");function wa(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(wa,"_ts_metadata");var Do=class{static{n(this,"UpdateUserPostCommentDto");}content};ja([classValidator.IsString(),classValidator.Length(1,280),wa("design:type",String)],Do.prototype,"content",void 0);function zo(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(zo,"_ts_decorate");function No(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(No,"_ts_metadata");var tt=class{static{n(this,"CreateUserPostDto");}content;mediaUrls;visibility};zo([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),No("design:type",String)],tt.prototype,"content",void 0);zo([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ArrayMaxSize(10),classValidator.Matches(c.USER_POST_MEDIA_URL,{each:true}),No("design:type",Array)],tt.prototype,"mediaUrls",void 0);zo([classValidator.IsOptional(),classValidator.IsEnum(C),No("design:type",typeof C>"u"?Object:C)],tt.prototype,"visibility",void 0);function Fa(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Fa,"_ts_decorate");function Ga(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Ga,"_ts_metadata");var Mo=class{static{n(this,"CreateUserPostRepostDto");}comment};Fa([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,280),Ga("design:type",String)],Mo.prototype,"comment",void 0);function Qn(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Qn,"_ts_decorate");function er(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(er,"_ts_metadata");var Pt=class{static{n(this,"UpdateUserPostDto");}content;visibility};Qn([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),er("design:type",String)],Pt.prototype,"content",void 0);Qn([classValidator.IsOptional(),classValidator.IsEnum(C),er("design:type",typeof C>"u"?Object:C)],Pt.prototype,"visibility",void 0);function qa(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(qa,"_ts_decorate");function $a(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n($a,"_ts_metadata");var Lo=class{static{n(this,"RecoveryDto");}identifier};qa([classValidator.IsNotEmpty(),classValidator.IsString(),$a("design:type",String)],Lo.prototype,"identifier",void 0);function Eo(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(Eo,"_ts_decorate");function Uo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Uo,"_ts_metadata");var ot=class{static{n(this,"RecoveryResetDto");}tokenId;tokenValue;password};Eo([classValidator.IsString(),classValidator.IsNotEmpty(),Uo("design:type",String)],ot.prototype,"tokenId",void 0);Eo([classValidator.IsString(),classValidator.IsNotEmpty(),Uo("design:type",String)],ot.prototype,"tokenValue",void 0);Eo([classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),classValidator.IsNotEmpty({message:"Password is required"}),Uo("design:type",String)],ot.prototype,"password",void 0);function nr(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(nr,"_ts_decorate");function rr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(rr,"_ts_metadata");var zt=class{static{n(this,"SignInUserDto");}identifier;password};nr([classValidator.IsNotEmpty(),classValidator.IsString(),rr("design:type",String)],zt.prototype,"identifier",void 0);nr([classValidator.IsNotEmpty(),classValidator.IsString(),rr("design:type",String)],zt.prototype,"password",void 0);function y(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(y,"_ts_decorate");function h(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(h,"_ts_metadata");var nt=class{static{n(this,"UpdateUserDto");}identifier;identity;password};y([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>Be),h("design:type",typeof Be>"u"?Object:Be)],nt.prototype,"identifier",void 0);y([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>P),h("design:type",typeof P>"u"?Object:P)],nt.prototype,"identity",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),h("design:type",String)],nt.prototype,"password",void 0);var Be=class{static{n(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};y([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),h("design:type",String)],Be.prototype,"email",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),h("design:type",String)],Be.prototype,"phoneNumber",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),h("design:type",String)],Be.prototype,"username",void 0);var P=class{static{n(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate;links};y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),h("design:type",String)],P.prototype,"firstName",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),h("design:type",String)],P.prototype,"lastName",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),h("design:type",String)],P.prototype,"displayName",void 0);y([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),h("design:type",String)],P.prototype,"description",void 0);y([classValidator.IsOptional(),classValidator.Matches(c.USER_AVATAR_URL),h("design:type",Object)],P.prototype,"avatarUrl",void 0);y([classValidator.IsOptional(),classValidator.Matches(c.USER_BANNER_URL),h("design:type",Object)],P.prototype,"bannerUrl",void 0);y([classValidator.IsOptional(),classValidator.IsEnum(Q),h("design:type",typeof Q>"u"?Object:Q)],P.prototype,"gender",void 0);y([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>{if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t}),classValidator.IsDate(),h("design:type",typeof Date>"u"?Object:Date)],P.prototype,"birthDate",void 0);y([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),h("design:type",Array)],P.prototype,"links",void 0);function dr(e,t,o,i){var s=arguments.length,r=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(s<3?a(r):s>3?a(t,o,r):a(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r}n(dr,"_ts_decorate");function fr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(fr,"_ts_metadata");var Nt=class{static{n(this,"VerifyEmailConfirmDto");}tokenId;tokenValue};dr([classValidator.IsString(),classValidator.IsNotEmpty(),fr("design:type",String)],Nt.prototype,"tokenId",void 0);dr([classValidator.IsString(),classValidator.IsNotEmpty(),fr("design:type",String)],Nt.prototype,"tokenValue",void 0);function d(e){return e}n(d,"sdk");var ur=e=>({getAll:n(async()=>e.get("/api-keys"),"getAll"),get:n(async t=>e.get("/api-keys/:apiKeyId",{apiKeyId:t}),"get"),create:n(async t=>e.post("/api-keys",t),"create"),update:n(async(t,o)=>e.put("/api-keys/:apiKeyId",o,{apiKeyId:t}),"update"),delete:n(async t=>e.delete("/api-keys/:apiKeyId",void 0,{apiKeyId:t}),"delete")});var gr=e=>({top:n(async t=>e.get("/artists/top",t),"top"),search:n(async t=>e.get("/artists/search",t),"search"),get:n(async t=>e.get("/artists/:idOrPermalink",t),"get"),follow:n(async t=>e.post("/artists/:idOrPermalink/follow",void 0,t),"follow"),unfollow:n(async t=>e.delete("/artists/:idOrPermalink/follow",void 0,t),"unfollow"),events:n(async t=>e.get("/artists/:idOrPermalink/events",t),"events")});var yr=e=>({signIn:n(async t=>e.post("/auth/sign-in",t),"signIn"),signUp:n(async t=>e.post("/auth/sign-up",t),"signUp"),signOut:n(async()=>e.post("/auth/sign-out",void 0),"signOut"),refreshToken:n(async()=>e.post("/auth/refresh-token",void 0),"refreshToken"),recovery:n(async t=>e.post("/auth/recovery",t),"recovery"),recoveryReset:n(async t=>e.post("/auth/recovery/reset",t),"recoveryReset"),verifyEmail:{send:n(async()=>e.post("/auth/verify/email/send",void 0),"send"),confirm:n(async t=>e.post("/auth/verify/email/confirm",t),"confirm")},oauth2:{connect:n((t,o)=>e.url("/oauth2/:provider",{provider:t,...o}),"connect"),disconnect:n(async t=>e.delete("/oauth2/:provider",void 0,{provider:t}),"disconnect"),googleOneTap:n(async t=>e.post("/oauth2/google/one-tap",t),"googleOneTap")}});var hr=e=>({categories:{getAll:n(async t=>e.get("/careers/categories",t),"getAll")},employmentTypes:{getAll:n(async t=>e.get("/careers/employmentTypes",t),"getAll")},jobs:{getAll:n(async t=>e.get("/careers/jobs",t),"getAll"),get:n(async t=>e.get("/careers/jobs/:jobId",{jobId:t}),"get")},offices:{getAll:n(async t=>e.get("/careers/offices",t),"getAll")}});var vr=e=>({getAll:n(async(t,o)=>e.get("/channels/~me/:channelId/messages",{channelId:t,...o}),"getAll"),getAllByOrganization:n(async(t,o,i)=>e.get("/channels/:organizationSlug/:channelId/messages",{organizationSlug:t,channelId:o,...i}),"getAllByOrganization"),get:n(async(t,o)=>e.get("/channels/~me/:channelId/messages/:messageId",{channelId:t,messageId:o}),"get"),getByOrganization:n(async(t,o,i)=>e.get("/channels/:organizationSlug/:channelId/messages/:messageId",{organizationSlug:t,channelId:o,messageId:i}),"getByOrganization"),create:n(async(t,o)=>e.post("/channels/~me/:channelId/messages",o,{channelId:t}),"create"),createByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/messages",i,{organizationSlug:t,channelId:o}),"createByOrganization"),update:n(async(t,o,i)=>e.put("/channels/~me/:channelId/messages/:messageId",i,{channelId:t,messageId:o}),"update"),updateByOrganization:n(async(t,o,i,s)=>e.put("/channels/:organizationSlug/:channelId/messages/:messageId",s,{organizationSlug:t,channelId:o,messageId:i}),"updateByOrganization"),delete:n(async(t,o)=>e.delete("/channels/~me/:channelId/messages/:messageId",void 0,{channelId:t,messageId:o}),"delete"),deleteByOrganization:n(async(t,o,i)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId",void 0,{organizationSlug:t,channelId:o,messageId:i}),"deleteByOrganization"),addReaction:n(async(t,o,i)=>e.post("/channels/~me/:channelId/messages/:messageId/reactions",i,{channelId:t,messageId:o}),"addReaction"),addReactionByOrganization:n(async(t,o,i,s)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/reactions",s,{organizationSlug:t,channelId:o,messageId:i}),"addReactionByOrganization"),removeReaction:n(async(t,o,i)=>e.delete("/channels/~me/:channelId/messages/:messageId/reactions/:emoji",void 0,{channelId:t,messageId:o,emoji:i}),"removeReaction"),removeReactionByOrganization:n(async(t,o,i,s)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji",void 0,{organizationSlug:t,channelId:o,messageId:i,emoji:s}),"removeReactionByOrganization"),markAsRead:n(async(t,o)=>e.post("/channels/~me/:channelId/messages/:messageId/read",void 0,{channelId:t,messageId:o}),"markAsRead"),markAsReadByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/read",void 0,{organizationSlug:t,channelId:o,messageId:i}),"markAsReadByOrganization"),uploadFile:n(async(t,o)=>e.post("/channels/~me/:channelId/files",o,{channelId:t}),"uploadFile"),uploadFileByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/files",i,{organizationSlug:t,channelId:o}),"uploadFileByOrganization"),report:n(async(t,o,i)=>e.post("/channels/~me/:channelId/messages/:messageId/report",i,{channelId:t,messageId:o}),"report"),reportByOrganization:n(async(t,o,i,s)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/report",s,{organizationSlug:t,channelId:o,messageId:i}),"reportByOrganization")});var br=e=>({me:n(async t=>e.get("/channels/~me",t),"me"),getByOrganization:n(async(t,o)=>e.get("/channels/:organizationSlug",{organizationSlug:t,...o}),"getByOrganization"),countMe:n(async t=>e.get("/users/~me/channels/count",t),"countMe"),countByOrganization:n(async(t,o)=>e.get("/users/@:organizationSlug/channels/count",{organizationSlug:t,...o}),"countByOrganization"),get:n(async t=>e.get("/channels/~me/:channelId",{channelId:t}),"get"),getByOrganizationChannel:n(async(t,o)=>e.get("/channels/:organizationSlug/:channelId",{organizationSlug:t,channelId:o}),"getByOrganizationChannel"),create:n(async t=>e.post("/channels/~me",t),"create"),createByOrganization:n(async(t,o)=>e.post("/channels/:organizationSlug",o,{organizationSlug:t}),"createByOrganization"),update:n(async(t,o)=>e.put("/channels/~me/:channelId",o,{channelId:t}),"update"),updateByOrganization:n(async(t,o,i)=>e.put("/channels/:organizationSlug/:channelId",i,{organizationSlug:t,channelId:o}),"updateByOrganization"),delete:n(async t=>e.delete("/channels/~me/:channelId",void 0,{channelId:t}),"delete"),deleteByOrganization:n(async(t,o)=>e.delete("/channels/:organizationSlug/:channelId",void 0,{organizationSlug:t,channelId:o}),"deleteByOrganization"),addParticipant:n(async(t,o)=>e.post("/channels/~me/:channelId/participants",o,{channelId:t}),"addParticipant"),addParticipantByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/participants",i,{organizationSlug:t,channelId:o}),"addParticipantByOrganization"),removeParticipant:n(async(t,o)=>e.delete("/channels/~me/:channelId/participants/:username",void 0,{channelId:t,username:o}),"removeParticipant"),removeParticipantByOrganization:n(async(t,o,i)=>e.delete("/channels/:organizationSlug/:channelId/participants/:username",void 0,{organizationSlug:t,channelId:o,username:i}),"removeParticipantByOrganization"),getMembers:n(async(t,o)=>e.get("/channels/~me/:channelId/members",{channelId:t,...o}),"getMembers"),getMembersByOrganization:n(async(t,o,i)=>e.get("/channels/:organizationSlug/:channelId/members",{organizationSlug:t,channelId:o,...i}),"getMembersByOrganization"),messages:vr(e)});var Rr=e=>({getRates:n(()=>e.get("/currencies/rates"),"getRates"),convert:n(t=>e.post("/currencies/convert",t),"convert"),convertAmount:n((t,o,i)=>e.post("/currencies/convert",{from:t,to:o,amount:i}),"convertAmount")});var xr=e=>({getFollowing:n(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:n(async t=>e.get("/feed/discover",t),"getDiscover")});var Sr=e=>({getAll:n(async()=>e.get("/health"),"getAll"),database:n(async()=>e.get("/health/database"),"database"),api:n(async()=>e.get("/health/api"),"api"),app:n(async()=>e.get("/health/app"),"app"),memory:n(async()=>e.get("/health/memory"),"memory")});var Ir=e=>({registerToBeta:n(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var Ar=e=>({getAll:n(async t=>e.get("/orders",t),"getAll"),get:n(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var _r=n(e=>({account:n(async t=>e.get("/organizations/@:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:n(t=>{if(Ae)window.location.href=e.url("/organizations/@:organizationSlug/billing/link",{organizationSlug:t});else throw new Error("Billing link is only available in the browser")},"link"),balance:n(async t=>e.get("/organizations/@:organizationSlug/billing/balance",{organizationSlug:t}),"balance"),pending:n(async t=>e.get("/organizations/@:organizationSlug/billing/pending",{organizationSlug:t}),"pending"),dashboard:n(t=>{if(Ae)window.location.href=e.url("/organizations/@:organizationSlug/billing/dashboard",{organizationSlug:t});else throw new Error("Billing dashboard is only available in the browser")},"dashboard")}),"organizationsBilling");var Or=e=>({getAll:n(async t=>e.get("/organizations/@:organizationSlug/customers",{organizationSlug:t}),"getAll"),get:n(async(t,o)=>e.get("/organizations/@:organizationSlug/customers/:username",{organizationSlug:t,username:o}),"get")});var jr=n(e=>({create:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/orders",i,{organizationSlug:t,eventSlug:o}),"create")}),"organizationsEventsOrders");var wr=n(e=>({getAll:n(async(t,o,i)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/promo-codes",{organizationSlug:t,eventSlug:o,...i}),"getAll"),create:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/promo-codes",i,{organizationSlug:t,eventSlug:o}),"create"),update:n(async(t,o,i,s)=>e.put("/organizations/@:organizationSlug/events/:eventSlug/promo-codes/:promoCodeId",s,{organizationSlug:t,eventSlug:o,promoCodeId:i}),"update"),delete:n(async(t,o,i)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug/promo-codes/:promoCodeId",void 0,{organizationSlug:t,eventSlug:o,promoCodeId:i}),"delete"),validate:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/promo-codes/validate",{code:i},{organizationSlug:t,eventSlug:o}),"validate")}),"organizationsEventsPromoCodes");var Pr=n(e=>({getAll:n(async t=>e.get("/organizations/events/styles",t),"getAll"),get:n(async t=>e.get("/organizations/events/styles/:styleSlug",{styleSlug:t}),"get"),create:n(async t=>e.post("/organizations/events/styles",t),"create"),update:n(async(t,o)=>e.put("/organizations/events/styles/:styleSlug",o,{styleSlug:t}),"update"),delete:n(async t=>e.delete("/organizations/events/styles/:styleSlug",void 0,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var Dr=n(e=>({getAll:n(async(t,o)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:o}),"getAll"),get:n(async(t,o,i)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:o,ticketId:i}),"get"),create:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/tickets",i,{organizationSlug:t,eventSlug:o}),"create"),update:n(async(t,o,i,s)=>e.put("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",s,{organizationSlug:t,eventSlug:o,ticketId:i}),"update"),delete:n(async(t,o,i)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:o,ticketId:i}),"delete")}),"organizationsEventsTickets");var zr=n(e=>({record:n(async(t,o)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:o}),"record"),getStreamUrl:n(t=>e.url("/organizations/events/views/stream",t),"getStreamUrl")}),"organizationsEventsViews");var Nr=n(e=>({search:n(async(t,o)=>e.get("/organizations/events/search",{q:t,...o}),"search"),getCalendar:n(async(t,o)=>e.get("/organizations/events/calendar/:year/:month",{year:t.toString(),month:o.toString()}),"getCalendar"),getAll:n(async(t,o)=>t?e.get("/organizations/@:organizationSlug/events",{organizationSlug:t,...o}):e.get("/organizations/events",o),"getAll"),getSuggestions:n(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:n(async t=>e.get("/organizations/events/nearby",t),"getNearby"),get:n(async(t,o)=>e.get("/organizations/@:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:o}),"get"),create:n(async(t,o)=>e.post("/organizations/@:organizationSlug/events",o,{organizationSlug:t}),"create"),update:n(async(t,o,i)=>e.put("/organizations/@:organizationSlug/events/:eventSlug",i,{organizationSlug:t,eventSlug:o}),"update"),delete:n(async(t,o)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug",void 0,{organizationSlug:t,eventSlug:o}),"delete"),uploadFile:n(async(t,o)=>e.post("/events/files/:eventFileType",ee("file",o),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:n(async(t,o,i,s)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType",ee("file",s),{organizationSlug:t,eventSlug:o,eventFileType:i}),"uploadOrganizationFile"),request:n(async(t,o)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/request",void 0,{organizationSlug:t,eventSlug:o}),"request"),orders:jr(e),promoCodes:wr(e),styles:Pr(e),tickets:Dr(e),views:zr(e)}),"organizationsEvents");var Mr=n(e=>({getLinks:n(async t=>e.get("/organizations/@:organizationSlug/members/invitations/links",{organizationSlug:t}),"getLinks"),createLink:n(async(t,o={})=>e.post("/organizations/@:organizationSlug/members/invitations/links",o,{organizationSlug:t}),"createLink"),accept:n(async(t,o)=>e.post("/organizations/@:organizationSlug/members/invitations/accept",o,{organizationSlug:t}),"accept")}),"invitations");var Lr=n(e=>({me:n(async()=>e.get("/organizations/members/~me"),"me"),get:n(async t=>e.get("/organizations/@:organizationSlug/members",{organizationSlug:t}),"get"),create:n(async(t,o)=>e.post("/organizations/@:organizationSlug/members",o,{organizationSlug:t}),"create"),update:n(async(t,o,i)=>e.put("/organizations/@:organizationSlug/members/:username",i,{organizationSlug:t,username:o}),"update"),delete:n(async(t,o)=>e.delete("/organizations/@:organizationSlug/members/:username",void 0,{organizationSlug:t,username:o}),"delete"),invitations:Mr(e),accept:n(async t=>e.put("/organizations/@:organizationSlug/members/~me/accept",void 0,{organizationSlug:t}),"accept"),reject:n(async t=>e.delete("/organizations/@:organizationSlug/members/~me/reject",void 0,{organizationSlug:t}),"reject"),leave:n(async t=>e.delete("/organizations/@:organizationSlug/members/~me",void 0,{organizationSlug:t}),"leave")}),"organizationsMembers");var Er=e=>({getAll:n(async t=>e.get("/organizations/@:organizationSlug/orders",t),"getAll"),get:n(async t=>e.get("/organizations/@:organizationSlug/orders/:orderId",t),"get"),getAllByEvent:n(async t=>e.get("/organizations/@:organizationSlug/events/:eventSlug/orders",t),"getAllByEvent"),getBookingsByEvent:n(async t=>e.get("/organizations/@:organizationSlug/events/:eventSlug/bookings",t),"getBookingsByEvent"),getParticipantsByEvent:n(async t=>e.get("/organizations/@:organizationSlug/events/:eventSlug/participants",t),"getParticipantsByEvent")});var Ur=e=>({search:n(async(t,o)=>e.get("/organizations/search",{q:t,limit:o}),"search"),getAll:n(async()=>e.get("/organizations"),"getAll"),get:n(async t=>e.get("/organizations/@:organizationSlug",{organizationSlug:t}),"get"),create:n(async t=>e.post("/organizations",t),"create"),update:n(async(t,o)=>e.put("/organizations/@:organizationSlug",o,{organizationSlug:t}),"update"),delete:n(async t=>e.delete("/organizations/@:organizationSlug",void 0,{organizationSlug:t}),"delete"),uploadFile:n(async(t,o,i)=>e.post("/organizations/@:organizationSlug/files/:organizationFileType",ee("file",i),{organizationSlug:t,organizationFileType:o}),"uploadFile"),billing:_r(e),events:Nr(e),members:Lr(e),customers:Or(e),orders:Er(e)});var Br=e=>({countries:{getAll:n(async t=>e.get("/places/countries",t),"getAll"),get:n(async t=>e.get("/places/countries/:countrySlug",t),"get"),cities:{getAll:n(async t=>e.get("/places/countries/:countrySlug/cities",t),"getAll"),get:n(async t=>e.get("/places/countries/:countrySlug/cities/:citySlug",t),"get"),nearby:n(async t=>e.get("/places/countries/:countrySlug/cities/:citySlug/nearby",t),"nearby")}},cities:{getAll:n(async t=>e.get("/places/cities",t),"getAll"),search:n(async t=>e.get("/places/cities/search",t),"search")}});var Fr=e=>({follow:n(async t=>e.post("/profiles/@:username/relationships/follow",void 0,{username:t}),"follow"),unfollow:n(async t=>e.post("/profiles/@:username/relationships/unfollow",void 0,{username:t}),"unfollow"),getSuggestions:n(async t=>e.get("/profiles/~me/relationships/suggestions",t),"getSuggestions"),getFollowers:n(async(t,o)=>e.get("/profiles/@:username/relationships/followers",{username:t,...o}),"getFollowers")});var Gr=e=>({getAll:n(async t=>e.get("/profiles",t),"getAll"),search:n(async(t,o)=>e.get("/profiles/search",{q:t,...o}),"search"),get:n(async t=>e.get("/profiles/@:username",{username:t}),"get"),relationships:Fr(e)});var Kr=e=>({reactions:{get:n(async t=>e.get("/roadmap/reactions/:featureId",{featureId:t}),"get"),add:n(async(t,o)=>e.post("/roadmap/reactions/:featureId",{reaction:o},{featureId:t}),"add")}});var Hr=e=>({getCounts:n(async()=>e.get("/sitemaps/counts"),"getCounts")});var Vr=e=>({get:n(async t=>e.get("/users/bookings/tickets/:ticketId",{ticketId:t}),"get"),use:n(async(t,o,i)=>e.put("/users/bookings/tickets/:ticketId/use",{tokenId:o,tokenValue:i},{ticketId:t}),"use")});var Tr=e=>({getAll:n(async()=>e.get("/users/bookings"),"getAll"),get:n(async t=>e.get("/users/bookings/:bookingId",{bookingId:t}),"get"),me:n(async()=>e.get("/users/~me/bookings"),"me"),tickets:Vr(e)});var Wr=e=>({me:n(async()=>e.get("/users/~me/notifications"),"me"),count:n(async t=>e.get("/users/~me/notifications/count",t),"count"),read:n(async()=>e.put("/users/~me/notifications/read",void 0),"read")});var Zr=n(e=>({record:n(async(t,o)=>e.post("/users/@:username/posts/:postId/views",void 0,{username:t,postId:o}),"record")}),"usersPostsViews");var qr=e=>({getByUsername:n(async(t,o)=>e.get("/users/@:username/posts",{username:t,...o}),"getByUsername"),getByUsernameAndId:n(async(t,o)=>e.get("/users/@:username/posts/:postId",{username:t,postId:o}),"getByUsernameAndId"),create:n(async t=>e.post("/users/~me/posts",t),"create"),update:n(async(t,o)=>e.put("/users/~me/posts/:postId",o,{postId:t}),"update"),delete:n(async t=>e.delete("/users/~me/posts/:postId",void 0,{postId:t}),"delete"),uploadMedia:n(async t=>e.post("/users/~me/posts/media",t),"uploadMedia"),views:Zr(e)});var $r=e=>({getByPost:n(async(t,o,i)=>e.get("/users/@:username/posts/:postId/comments",{username:t,postId:o,...i}),"getByPost"),create:n(async(t,o)=>e.post("/users/~me/posts/:postId/comments",o,{postId:t}),"create"),update:n(async(t,o,i)=>e.put("/users/~me/posts/:postId/comments/:commentId",i,{postId:t,commentId:o}),"update"),delete:n(async(t,o)=>e.delete("/users/~me/posts/:postId/comments/:commentId",void 0,{postId:t,commentId:o}),"delete")});var Xr=e=>({getByUsername:n(async(t,o)=>e.get("/users/@:username/reposts",{username:t,...o}),"getByUsername"),getByPost:n(async(t,o,i)=>e.get("/users/@:username/posts/:postId/reposts",{username:t,postId:o,...i}),"getByPost"),create:n(async(t,o)=>e.post("/users/~me/posts/:postId/reposts",o||{},{postId:t}),"create"),delete:n(async t=>e.delete("/users/~me/posts/:postId/reposts",void 0,{postId:t}),"delete")});var Yr=e=>({getAll:n(async()=>e.get("/users"),"getAll"),get:n(async t=>e.get("/users/@:userId",{userId:t}),"get"),me:n(async()=>e.get("/users/~me"),"me"),check:n(async(t,o)=>e.get("/users/check/:identifier",{identifier:t,suggestions:o}),"check"),update:n(async(t,o)=>e.put("/users/@:userId",o,{userId:t}),"update"),uploadFile:n(async(t,o,i)=>e.post("/users/@:userId/files/:userFileType",ee("file",i),{userId:t,userFileType:o}),"uploadFile"),uploadTempFile:n(async(t,o)=>e.post("/users/files/:userFileType",ee("file",o),{userFileType:t}),"uploadTempFile"),bookings:Tr(e),notifications:Wr(e),posts:qr(e),postsComments:$r(e),postsReposts:Xr(e)});var kr=class{static{n(this,"TonightPass");}client;apiKeys;artists;auth;careers;channels;currencies;feed;health;orders;organizations;places;profiles;roadmap;sitemaps;users;notifications;constructor(t){this.client=new pt(t),this.apiKeys=ur(this.client),this.artists=gr(this.client),this.auth=yr(this.client),this.careers=hr(this.client),this.channels=br(this.client),this.currencies=Rr(this.client),this.feed=xr(this.client),this.health=Sr(this.client),this.orders=Ar(this.client),this.organizations=Ur(this.client),this.places=Br(this.client),this.profiles=Gr(this.client),this.roadmap=Kr(this.client),this.sitemaps=Hr(this.client),this.users=Yr(this.client),this.notifications=Ir(this.client);}};var Mt=class{static{n(this,"WebSocketClient");}ws;options;reconnectAttempts=0;reconnectTimer;eventHandlers=new Map;isConnected=false;isReconnecting=false;constructor(t={}){this.options={baseURL:"wss://api.tonightpass.com",maxReconnectAttempts:3,reconnectInterval:1e3,debug:false,...t};}log(t,...o){this.options.debug&&console.log(`[WebSocketClient] ${t}`,...o);}getWebSocketURL(t,o){let i={};Object.entries(o).forEach(([r,a])=>{typeof a=="string"&&r!=="token"&&(i[r]=a);});let s=pathcat.pathcat(t,i);return `${this.options.baseURL}${s}`}async connect(t,o){return new Promise((i,s)=>{try{let r=this.getWebSocketURL(t,o);this.log("Connecting to",r);let a=[];"token"in o&&typeof o.token=="string"&&a.push(`access_token.${o.token}`),this.ws=a.length>0?new WebSocket(r,a):new WebSocket(r),this.ws.onopen=()=>{this.log("Connected successfully"),this.isConnected=!0,this.isReconnecting=!1,this.reconnectAttempts=0,i();},this.ws.onmessage=p=>{try{let f=JSON.parse(p.data);this.handleEvent(f);}catch(f){this.log("Error parsing message:",f);}},this.ws.onclose=p=>{this.log("Connection closed",p.code),this.isConnected=!1,this.options.maxReconnectAttempts&&!this.isReconnecting&&this.handleReconnect(t,o);},this.ws.onerror=p=>{this.log("WebSocket error:",p),this.isConnected=!1,s(p);};}catch(r){s(r);}})}handleReconnect(t,o){if(this.reconnectAttempts>=this.options.maxReconnectAttempts){this.log("Max reconnect attempts reached");return}this.isReconnecting=true,this.reconnectAttempts++,this.log(`Attempting to reconnect (${this.reconnectAttempts}/${this.options.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.connect(t,o).catch(i=>{this.log("Reconnection failed:",i);});},this.options.reconnectInterval);}handleEvent(t){this.log("Received event:",t.type);let o=this.eventHandlers.get(t.type);o&&o.forEach(s=>s(t));let i=this.eventHandlers.get("*");i&&i.forEach(s=>s(t));}on(t,o){this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set);let i=n(s=>{o(s);},"wrappedHandler");return this.eventHandlers.get(t)?.add(i),()=>{let s=this.eventHandlers.get(t);s&&(s.delete(i),s.size===0&&this.eventHandlers.delete(t));}}off(t,o){let i=this.eventHandlers.get(t);i&&(i.clear(),this.eventHandlers.delete(t));}send(t){this.ws&&this.isConnected?this.ws.send(JSON.stringify(t)):this.log("Cannot send data: WebSocket not connected");}disconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.ws&&(this.isConnected=false,this.isReconnecting=false,this.ws.close()),this.eventHandlers.clear();}get connected(){return this.isConnected}get reconnecting(){return this.isReconnecting}};var Lt=class extends Mt{static{n(this,"ChannelWebSocketClient");}async connectToChannel(t,o={}){return this.connect("/channels/~me/:channelId/ws",{...o,channelId:t})}async connectToOrganizationChannel(t,o,i={}){return this.connect("/channels/:organizationSlug/:channelId/ws",{...i,organizationSlug:t,channelId:o})}async connectToUserChannels(t={}){return this.connect("/channels/~me/ws",t)}async connectToOrganizationChannels(t,o={}){return this.connect("/channels/:organizationSlug/ws",{...o,organizationSlug:t})}onMessageCreate(t){return this.on("channel_message_create",t)}onMessageUpdate(t){return this.on("channel_message_update",t)}onMessageDelete(t){return this.on("channel_message_delete",t)}onChannelUpdate(t){return this.on("channel_update",t)}onChannelDelete(t){return this.on("channel_delete",t)}onMemberJoin(t){return this.on("channel_member_join",t)}onMemberLeave(t){return this.on("channel_member_leave",t)}onTypingStart(t){return this.on("typing_start",t)}onTypingStop(t){return this.on("typing_stop",t)}startTyping(t){this.send({type:"typing_start",data:{channelId:t}});}stopTyping(t){this.send({type:"typing_stop",data:{channelId:t}});}subscribeToChannel(t){this.send({type:"subscribe",data:{channelId:t}});}unsubscribeFromChannel(t){this.send({type:"unsubscribe",data:{channelId:t}});}};function sb(e){let t=new Lt(e);return {connect:n((o,i)=>t.connectToChannel(o,{token:i}),"connect"),connectToOrganization:n((o,i,s)=>t.connectToOrganizationChannel(o,i,{token:s}),"connectToOrganization"),connectToUserChannels:n(o=>t.connectToUserChannels({token:o}),"connectToUserChannels"),connectToOrganizationChannels:n((o,i)=>t.connectToOrganizationChannels(o,{token:i}),"connectToOrganizationChannels"),onMessageCreate:n(o=>t.onMessageCreate(o),"onMessageCreate"),onMessageUpdate:n(o=>t.onMessageUpdate(o),"onMessageUpdate"),onMessageDelete:n(o=>t.onMessageDelete(o),"onMessageDelete"),onChannelUpdate:n(o=>t.onChannelUpdate(o),"onChannelUpdate"),onChannelDelete:n(o=>t.onChannelDelete(o),"onChannelDelete"),onMemberJoin:n(o=>t.onMemberJoin(o),"onMemberJoin"),onMemberLeave:n(o=>t.onMemberLeave(o),"onMemberLeave"),onTypingStart:n(o=>t.onTypingStart(o),"onTypingStart"),onTypingStop:n(o=>t.onTypingStop(o),"onTypingStop"),onAny:n(o=>t.on("*",o),"onAny"),startTyping:n(o=>t.startTyping(o),"startTyping"),stopTyping:n(o=>t.stopTyping(o),"stopTyping"),subscribeToChannel:n(o=>t.subscribeToChannel(o),"subscribeToChannel"),unsubscribeFromChannel:n(o=>t.unsubscribeFromChannel(o),"unsubscribeFromChannel"),disconnect:n(()=>t.disconnect(),"disconnect"),get connected(){return t.connected},get reconnecting(){return t.reconnecting},client:t}}n(sb,"channelsWS");
|
|
2
2
|
exports.AcceptOrganizationMemberInvitationDto=So;exports.AddParticipantDto=Kt;exports.AddReactionDto=Wt;exports.ApiKeyTier=te;exports.ApiKeyType=oe;exports.AuthFlow=kc;exports.BaseOrganizationEventDto=m;exports.BillingLocality=ec;exports.CacheManager=Fe;exports.CancelOrganizationEventDto=Me;exports.CareersJobStatus=Cc;exports.CareersRemoteType=ed;exports.CareersWorkplaceType=Qc;exports.ChannelMemberRole=nd;exports.ChannelMessageReportReason=ft;exports.ChannelStatus=rd;exports.ChannelType=ve;exports.ChannelWebSocketClient=Lt;exports.Client=pt;exports.CreateApiKeyDto=_e;exports.CreateChannelDto=Te;exports.CreateChannelMessageDto=We;exports.CreateLocationDto=_;exports.CreateOrganizationDto=Ne;exports.CreateOrganizationEventDto=so;exports.CreateOrganizationEventOrderDto=xt;exports.CreateOrganizationEventPromoCodeDto=B;exports.CreateOrganizationEventStyleDto=_t;exports.CreateOrganizationEventTicketDto=b;exports.CreateOrganizationIdentityDto=G;exports.CreateOrganizationMemberDto=jt;exports.CreateOrganizationMemberInvitationLinkDto=Io;exports.CreateUserDto=et;exports.CreateUserIdentityDto=L;exports.CreateUserPostCommentDto=wt;exports.CreateUserPostDto=tt;exports.CreateUserPostRepostDto=Mo;exports.Currency=at;exports.DEFAULT_API_URL=Go;exports.DEFAULT_BILLING_PARAMETERS=Zo;exports.DEFAULT_STRIPE_FEES=To;exports.DEFAULT_TONIGHTPASS_FEES=Wo;exports.ErrorType=ad;exports.EventArtistDto=T;exports.FeedType=cd;exports.GeoPointDto=D;exports.GoogleOneTapDto=Po;exports.Language=kd;exports.MINIMUM_CHARGEABLE_AMOUNT=tc;exports.MINIMUM_CHARGE_AMOUNTS=Ho;exports.MINIMUM_COMMISSION=Ie;exports.MemoryCacheStore=st;exports.OAuth2Provider=Yc;exports.OrderRefundStatus=ld;exports.OrderTransferStatus=fd;exports.OrganizationEventCancelledBy=Id;exports.OrganizationEventFileType=Sd;exports.OrganizationEventLifecycleStatus=lt;exports.OrganizationEventPromoCodeType=ne;exports.OrganizationEventStatus=be;exports.OrganizationEventStyleType=bd;exports.OrganizationEventTicketCategory=ie;exports.OrganizationEventTicketType=re;exports.OrganizationEventType=se;exports.OrganizationEventVisibilityType=ae;exports.OrganizationFileType=Ud;exports.OrganizationMemberRole=l;exports.OrganizationMemberRolePower=Et;exports.OrganizationMemberStatus=cp;exports.OrganizationNotificationType=zd;exports.OrganizationPayoutStatus=Ed;exports.OrganizationTokenType=Md;exports.PostponeOrganizationEventDto=St;exports.ProfileType=Zd;exports.REGEX=c;exports.ROADMAP_REACTIONS=$d;exports.RecoveryDto=Lo;exports.RecoveryResetDto=ot;exports.ReportChannelMessageDto=mt;exports.RescheduleOrganizationEventDto=Le;exports.RoadmapFeatureStatus=Xd;exports.SignInUserDto=zt;exports.TonightPass=kr;exports.TonightPassAPIError=Ge;exports.UpdateApiKeyDto=he;exports.UpdateChannelDto=Yt;exports.UpdateChannelMessageDto=Xt;exports.UpdateLocationDto=O;exports.UpdateOrganizationDto=Ee;exports.UpdateOrganizationEventDto=g;exports.UpdateOrganizationEventPromoCodeDto=F;exports.UpdateOrganizationEventStyleDto=Fn;exports.UpdateOrganizationEventTicketDto=u;exports.UpdateOrganizationIdentityDto=Z;exports.UpdateOrganizationMemberDto=Ao;exports.UpdateUserDto=nt;exports.UpdateUserPostCommentDto=Do;exports.UpdateUserPostDto=Pt;exports.UserFileType=Ip;exports.UserIdentityGender=Q;exports.UserNotificationType=lp;exports.UserPostMediaType=up;exports.UserPostVisibility=C;exports.UserRole=it;exports.UserRolePower=Np;exports.UserTokenType=xp;exports.VerifyEmailConfirmDto=Nt;exports.WebSocketClient=Mt;exports.ZERO_DECIMAL_CURRENCIES=Ko;exports.apiKeys=ur;exports.applyMinimumChargeableAmount=rc;exports.artists=gr;exports.auth=yr;exports.buildFileFormData=ee;exports.calculateOrderTotal=nc;exports.calculateTicketFee=ei;exports.calculateTicketFeeWithCurrency=ti;exports.careers=hr;exports.channels=br;exports.channelsWS=sb;exports.computeOrganizationEventStatus=yd;exports.currencies=Rr;exports.feed=xr;exports.formatCurrencyLabel=Cp;exports.formatPrice=Qp;exports.fromSmallestUnit=Qr;exports.getCurrencySymbol=Vo;exports.getMinimumChargeableAmount=oc;exports.health=Sr;exports.isBrowser=Ae;exports.isMemberRoleAtLeast=fc;exports.isZeroDecimalCurrency=Ft;exports.normalizeAddress=ut;exports.notifications=Ir;exports.orders=Ar;exports.organizations=Ur;exports.places=Br;exports.profiles=Gr;exports.request=qo;exports.roadmap=Kr;exports.sdk=d;exports.sitemaps=Hr;exports.toSmallestUnit=Jp;exports.users=Yr;//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|