1import{J as D}from"./index-BS0Z4XCZ.js";import"./main-Cx62WSPe.js";function j(t,e,i,n){function a(o){return o instanceof i?o:new i(function(s){s(o)})}return new(i||(i=Promise))(function(o,s){function c(u){try{d(n.next(u))}catch(f){s(f)}}function r(u){try{d(n.throw(u))}catch(f){s(f)}}function d(u){u.done?o(u.value):a(u.value).then(c,r)}d((n=n.apply(t,[])).next())})}function ce(t,e,i,n){if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)}const C=D({useNativeBigInt:!0});class p{constructor(e,i,n){this.method=e,this.attribute=i,n!==void 0&&(Array.isArray(n)?this.values=n:this.values=[n])}toString(){return C.stringify({method:this.method,attribute:this.attribute,values:this.values})}}p.equal=(t,e)=>new p("equal",t,e).toString();p.notEqual=(t,e)=>new p("notEqual",t,e).toString();p.regex=(t,e)=>new p("regex",t,e).toString();p.lessThan=(t,e)=>new p("lessThan",t,e).toString();p.lessThanEqual=(t,e)=>new p("lessThanEqual",t,e).toString();p.greaterThan=(t,e)=>new p("greaterThan",t,e).toString();p.greaterThanEqual=(t,e)=>new p("greaterThanEqual",t,e).toString();p.isNull=t=>new p("isNull",t).toString();p.isNotNull=t=>new p("isNotNull",t).toString();p.exists=t=>new p("exists",void 0,t).toString();p.notExists=t=>new p("notExists",void 0,t).toString();p.between=(t,e,i)=>new p("between",t,[e,i]).toString();p.startsWith=(t,e)=>new p("startsWith",t,e).toString();p.endsWith=(t,e)=>new p("endsWith",t,e).toString();p.select=t=>new p("select",void 0,t).toString();p.search=(t,e)=>new p("search",t,e).toString();p.orderDesc=t=>new p("orderDesc",t).toString();p.orderAsc=t=>new p("orderAsc",t).toString();p.orderRandom=()=>new p("orderRandom").toString();p.cursorAfter=t=>new p("cursorAfter",void 0,t).toString();p.cursorBefore=t=>new p("cursorBefore",void 0,t).toString();p.limit=t=>new p("limit",void 0,t).toString();p.offset=t=>new p("offset",void 0,t).toString();p.contains=(t,e)=>new p("contains",t,e).toString();p.containsAny=(t,e)=>new p("containsAny",t,e).toString();p.containsAll=(t,e)=>new p("containsAll",t,e).toString();p.notContains=(t,e)=>new p("notContains",t,e).toString();p.notSearch=(t,e)=>new p("notSearch",t,e).toString();p.notBetween=(t,e,i)=>new p("notBetween",t,[e,i]).toString();p.notStartsWith=(t,e)=>new p("notStartsWith",t,e).toString();p.notEndsWith=(t,e)=>new p("notEndsWith",t,e).toString();p.createdBefore=t=>p.lessThan("$createdAt",t);p.createdAfter=t=>p.greaterThan("$createdAt",t);p.createdBetween=(t,e)=>p.between("$createdAt",t,e);p.updatedBefore=t=>p.lessThan("$updatedAt",t);p.updatedAfter=t=>p.greaterThan("$updatedAt",t);p.updatedBetween=(t,e)=>p.between("$updatedAt",t,e);p.or=t=>new p("or",void 0,t.map(e=>C.parse(e))).toString();p.and=t=>new p("and",void 0,t.map(e=>C.parse(e))).toString();p.elemMatch=(t,e)=>new p("elemMatch",t,e.map(i=>C.parse(i))).toString();p.distanceEqual=(t,e,i,n=!0)=>new p("distanceEqual",t,[[e,i,n]]).toString();p.distanceNotEqual=(t,e,i,n=!0)=>new p("distanceNotEqual",t,[[e,i,n]]).toString();p.distanceGreaterThan=(t,e,i,n=!0)=>new p("distanceGreaterThan",t,[[e,i,n]]).toString();p.distanceLessThan=(t,e,i,n=!0)=>new p("distanceLessThan",t,[[e,i,n]]).toString();p.intersects=(t,e)=>new p("intersects",t,[e]).toString();p.notIntersects=(t,e)=>new p("notIntersects",t,[e]).toString();p.crosses=(t,e)=>new p("crosses",t,[e]).toString();p.notCrosses=(t,e)=>new p("notCrosses",t,[e]).toString();p.overlaps=(t,e)=>new p("overlaps",t,[e]).toString();p.notOverlaps=(t,e)=>new p("notOverlaps",t,[e]).toString();p.touches=(t,e)=>new p("touches",t,[e]).toString();p.notTouches=(t,e)=>new p("notTouches",t,[e]).toString();const se=D({storeAsString:!1}),re=D({useNativeBigInt:!0}),de=BigInt(Number.MAX_SAFE_INTEGER),le=BigInt(Number.MIN_SAFE_INTEGER),ue=BigInt("9223372036854775807"),fe=BigInt("-9223372036854775808");function pe(t){return t!==null&&typeof t=="object"&&t._isBigNumber===!0&&typeof t.isInteger=="function"&&typeof t.toFixed=="function"&&typeof t.toNumber=="function"}function he(t,e){if(pe(e)){if(e.isInteger()){const i=e.toFixed(),n=BigInt(i);return n>=le&&n<=de?Number(i):n>=fe&&n<=ue?n:e.toNumber()}return e.toNumber()}return e}const M={parse:t=>se.parse(t,he),stringify:re.stringify};
1class l extends Error{constructor(e,i=0,n="",a=""){super(e),this.name="AppwriteException",this.message=e,this.code=i,this.type=n,this.response=a}}class q{constructor(){this.config={endpoint:"https://cloud.appwrite.io/v1",endpointRealtime:"",project:"",jwt:"",locale:"",session:"",devkey:""},this.headers={"x-sdk-name":"Web","x-sdk-platform":"client","x-sdk-language":"web","x-sdk-version":"22.4.1","X-Appwrite-Response-Format":"1.8.0"},this.realtime={socket:void 0,timeout:void 0,heartbeat:void 0,url:"",channels:new Set,queries:new Set,subscriptions:new Map,slotToSubscriptionId:new Map,subscriptionIdToSlot:new Map,subscriptionsCounter:0,reconnect:!0,reconnectAttempts:0,lastMessage:void 0,connect:()=>{clearTimeout(this.realtime.timeout),this.realtime.timeout=window?.setTimeout(()=>{this.realtime.createSocket()},50)},getTimeout:()=>{switch(!0){case this.realtime.reconnectAttempts<5:return 1e3;case this.realtime.reconnectAttempts<15:return 5e3;case this.realtime.reconnectAttempts<100:return 1e4;default:return 6e4}},createHeartbeat:()=>{this.realtime.heartbeat&&clearTimeout(this.realtime.heartbeat),this.realtime.heartbeat=window?.setInterval(()=>{var e;(e=this.realtime.socket)===null||e===void 0||e.send(M.stringify({type:"ping"}))},2e4)},createSocket:()=>{var e,i,n,a;if(this.realtime.subscriptions.size<1){this.realtime.reconnect=!1,(e=this.realtime.socket)===null||e===void 0||e.close();return}let s="project="+encodeURIComponent((i=this.config.project)!==null&&i!==void 0?i:"");this.realtime.channels.forEach(d=>{s+="&channels[]="+encodeURIComponent(d)});const c=p.select(["*"]).toString();this.realtime.subscriptions.forEach((d,u)=>{const f=d.queries.length>0?d.queries:[c];d.channels.forEach(h=>{f.forEach(y=>{s+="&"+encodeURIComponent(h)+"["+u+"][]="+encodeURIComponent(y)})})});const r=this.config.endpointRealtime+"/realtime?"+s;(r!==this.realtime.url||!this.realtime.socket||((n=this.realtime.socket)===null||n===void 0?void 0:n.readyState)>WebSocket.OPEN)&&(this.realtime.socket&&((a=this.realtime.socket)===null||a===void 0?void 0:a.readyState)<WebSocket.CLOSING&&(this.realtime.reconnect=!1,this.realtime.socket.close()),this.realtime.url=r,this.realtime.socket=new WebSocket(r),this.realtime.socket.addEventListener("message",this.realtime.onMessage),this.realtime.socket.addEventListener("open",d=>{this.realtime.reconnectAttempts=0,this.realtime.createHeartbeat()}),this.realtime.socket.addEventListener("close",d=>{var u,f,h;if(!this.realtime.reconnect||((f=(u=this.realtime)===null||u===void 0?void 0:u.lastMessage)===null||f===void 0?void 0:f.type)==="error"&&((h=this.realtime)===null||h===void 0?void 0:h.lastMessage.data).code===1008){this.realtime.reconnect=!0;return}const y=this.realtime.getTimeout();console.error(`Realtime got disconnected. Reconnect will be attempted in ${y/1e3} seconds.`,d.reason),setTimeout(()=>{this.realtime.reconnectAttempts++,this.realtime.createSocket()},y)}))},onMessage:e=>{var i,n;try{const a=M.parse(e.data);switch(this.realtime.lastMessage=a,a.type){case"connected":{const o=a.data;if(o?.subscriptions){this.realtime.slotToSubscriptionId.clear(),this.realtime.subscriptionIdToSlot.clear();for(const[c,r]of Object.entries(o.subscriptions)){const d=Number(c);!isNaN(d)&&typeof r=="string"&&(this.realtime.slotToSubscriptionId.set(d,r),this.realtime.subscriptionIdToSlot.set(r,d))}}let s=this.config.session;if(!s){const c=M.parse((i=window.localStorage.getItem("cookieFallback"))!==null&&i!==void 0?i:"{}");s=c?.[`a_session_${this.config.project}`]}s&&!o?.user&&((n=this.realtime.socket)===null||n===void 0||n.send(M.stringify({type:"authentication",data:{session:s}})));break}case"event":{const o=a.data;if(!o?.channels)break;const s=o.subscriptions;if(s&&s.length>0)for(const c of s){const r=this.realtime.subscriptionIdToSlot.get(c);if(r!==void 0){const d=this.realtime.subscriptions.get(r);d&&setTimeout(()=>d.callback(o))}}else{if(!o.channels.some(r=>this.realtime.channels.has(r)))break;this.realtime.subscriptions.forEach(r=>{o.channels.some(d=>r.channels.includes(d))&&setTimeout(()=>r.callback(o))})}break}case"pong":break;case"error":throw a.data;default:break}}catch(a){console.error(a)}},cleanUp:(e,i)=>
1{this.realtime.channels.forEach(n=>{e.includes(n)&&(Array.from(this.realtime.subscriptions).some(([o,s])=>s.channels.includes(n))||this.realtime.channels.delete(n))}),this.realtime.queries.forEach(n=>{i.includes(n)&&(Array.from(this.realtime.subscriptions).some(([o,s])=>{var c;return(c=s.queries)===null||c===void 0?void 0:c.includes(n)})||this.realtime.queries.delete(n))})}}}setEndpoint(e){if(!e||typeof e!="string")throw new l("Endpoint must be a valid string");if(!e.startsWith("http://")&&!e.startsWith("https://"))throw new l("Invalid endpoint URL: "+e);return this.config.endpoint=e,this.config.endpointRealtime=e.replace("https://","wss://").replace("http://","ws://"),this}setEndpointRealtime(e){if(!e||typeof e!="string")throw new l("Endpoint must be a valid string");if(!e.startsWith("ws://")&&!e.startsWith("wss://"))throw new l("Invalid realtime endpoint URL: "+e);return this.config.endpointRealtime=e,this}setProject(e){return this.headers["X-Appwrite-Project"]=e,this.config.project=e,this}setJWT(e){return this.headers["X-Appwrite-JWT"]=e,this.config.jwt=e,this}setLocale(e){return this.headers["X-Appwrite-Locale"]=e,this.config.locale=e,this}setSession(e){return this.headers["X-Appwrite-Session"]=e,this.config.session=e,this}setDevKey(e){return this.headers["X-Appwrite-Dev-Key"]=e,this.config.devkey=e,this}subscribe(e,i,n=[]){const o=(Array.isArray(e)?e:[e]).map(r=>typeof r=="string"?r:r&&typeof r.toString=="function"?r.toString():String(r));o.forEach(r=>this.realtime.channels.add(r));const s=(n??[]).map(r=>typeof r=="string"?r:r.toString());s.forEach(r=>this.realtime.queries.add(r));const c=this.realtime.subscriptionsCounter++;return this.realtime.subscriptions.set(c,{channels:o,queries:s,callback:i}),this.realtime.connect(),()=>{this.realtime.subscriptions.delete(c),this.realtime.cleanUp(o,s),this.realtime.connect()}}prepareRequest(e,i,n={},a={}){if(e=e.toUpperCase(),n=Object.assign({},this.headers,n),typeof window<"u"&&window.localStorage){const s=window.localStorage.getItem("cookieFallback");s&&(n["X-Fallback-Cookies"]=s)}let o={method:e,headers:n};if(n["X-Appwrite-Dev-Key"]===void 0&&(o.credentials="include"),e==="GET")for(const[s,c]of Object.entries(q.flatten(a)))i.searchParams.append(s,c);else switch(n["content-type"]){case"application/json":o.body=M.stringify(a);break;case"multipart/form-data":const s=new FormData;for(const[c,r]of Object.entries(a))if(r instanceof File)s.append(c,r,r.name);else if(Array.isArray(r))for(const d of r)s.append(`${c}[]`,d);else s.append(c,r);o.body=s,delete n["content-type"];break}return{uri:i.toString(),options:o}}chunkedUpload(e,i,n={},a={},o){var s;return j(this,void 0,void 0,function*(){const[c,r]=(s=Object.entries(a).find(([f,h])=>h instanceof File))!==null&&s!==void 0?s:[];if(!r||!c)throw new Error("File not found in payload");if(r.size<=q.CHUNK_SIZE)return yield this.call(e,i,n,a);let d=0,u=null;for(;d<r.size;){let f=d+q.CHUNK_SIZE;f>=r.size&&(f=r.size),n["content-range"]=`bytes ${d}-${f-1}/${r.size}`;const h=r.slice(d,f);let y=Object.assign({},a);y[c]=new File([h],r.name),u=yield this.call(e,i,n,y),o&&typeof o=="function"&&o({$id:u.$id,progress:Math.round(f/r.size*100),sizeUploaded:f,chunksTotal:Math.ceil(r.size/q.CHUNK_SIZE),chunksUploaded:Math.ceil(f/q.CHUNK_SIZE)}),u&&u.$id&&(n["x-appwrite-id"]=u.$id),d=f}return u})}ping(){return j(this,void 0,void 0,function*(){return this.call("GET",new URL(this.config.endpoint+"/ping"))})}call(e,i,n={},a={},o="json"){var s,c;return j(this,void 0,void 0,function*(){const{uri:r,options:d}=this.prepareRequest(e,i,n,a);let u=null;const f=yield fetch(r,d);if(f.type==="opaque")throw new l(`Invalid Origin. Register your new client (${window.location.host}) as a new Web platform on your project console dashboard`,403,"forbidden","");const h=f.headers.get("x-appwrite-warning");if(h&&h.split(";").forEach(w=>console.warn("Warning: "+w)),!((s=f.headers.get("content-type"))===null||s===void 0)&&s.includes("application/json")?u=M.parse(yield f.text()):o==="arrayBuffer"?u=yield f.arrayBuffer():u={message:yield f.text()},400<=f.status){let w="";throw!((c=f.headers.get("content-type"))===null||c===void 0)&&c.includes("application/json")||o==="arrayBuffer"?w=M.stringify(u):w=u?.message,new l(u?.message,f.status,u?.type,w)}const y=f.headers.get("X-Fallback-Cookies");return typeof window<"u"&&window.localStorage&&y&&(window.console.warn("Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint."),window.localStorage.setItem("cookieFallback",y)),u})}static flatten(e,i=""){let n={};
1for(const[a,o]of Object.entries(e)){let s=i?i+"["+a+"]":a;Array.isArray(o)?n=Object.assign(Object.assign({},n),q.flatten(o,s)):n[s]=o}return n}}q.CHUNK_SIZE=1024*1024*5;class A{constructor(e){this.client=e}static flatten(e,i=""){let n={};for(const[a,o]of Object.entries(e)){let s=i?i+"["+a+"]":a;Array.isArray(o)?n=Object.assign(Object.assign({},n),A.flatten(o,s)):n[s]=o}return n}}A.CHUNK_SIZE=5*1024*1024;class we{constructor(e){this.client=e}get(){const e="/account",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}create(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,email:i[0],password:i[1],name:i[2]};const a=n.userId,o=n.email,s=n.password,c=n.name;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "email"');if(typeof s>"u")throw new l('Missing required parameter: "password"');const r="/account",d={};typeof a<"u"&&(d.userId=a),typeof o<"u"&&(d.email=o),typeof s<"u"&&(d.password=s),typeof c<"u"&&(d.name=c);const u=new URL(this.client.config.endpoint+r),f={"content-type":"application/json"};return this.client.call("post",u,f,d)}updateEmail(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={email:e,password:i[0]};const a=n.email,o=n.password;if(typeof a>"u")throw new l('Missing required parameter: "email"');if(typeof o>"u")throw new l('Missing required parameter: "password"');const s="/account/email",c={};typeof a<"u"&&(c.email=a),typeof o<"u"&&(c.password=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("patch",r,d,c)}listIdentities(e,...i){let n;!e||e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={queries:e,total:i[0]};const a=n.queries,o=n.total,s="/account/identities",c={};typeof a<"u"&&(c.queries=a),typeof o<"u"&&(c.total=o);const r=new URL(this.client.config.endpoint+s),d={};return this.client.call("get",r,d,c)}deleteIdentity(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={identityId:e};const n=i.identityId;if(typeof n>"u")throw new l('Missing required parameter: "identityId"');const a="/account/identities/{identityId}".replace("{identityId}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("delete",s,c,o)}createJWT(e){let i;!e||e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={duration:e};const n=i.duration,a="/account/jwts",o={};typeof n<"u"&&(o.duration=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("post",s,c,o)}listLogs(e,...i){let n;!e||e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={queries:e,total:i[0]};const a=n.queries,o=n.total,s="/account/logs",c={};typeof a<"u"&&(c.queries=a),typeof o<"u"&&(c.total=o);const r=new URL(this.client.config.endpoint+s),d={};return this.client.call("get",r,d,c)}updateMFA(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={mfa:e};const n=i.mfa;if(typeof n>"u")throw new l('Missing required parameter: "mfa"');const a="/account/mfa",o={};typeof n<"u"&&(o.mfa=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("patch",s,c,o)}createMfaAuthenticator(e){let i;e&&typeof e=="object"&&!Array.isArray(e)&&"type"in e?i=e||{}:i={type:e};const n=i.type;if(typeof n>"u")throw new l('Missing required parameter: "type"');const a="/account/mfa/authenticators/{type}".replace("{type}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("post",s,c,o)}createMFAAuthenticator(e){let i;e&&typeof e=="object"&&!Array.isArray(e)&&"type"in e?i=e||{}:i={type:e};const n=i.type;if(typeof n>"u")throw new l('Missing required parameter: "type"');const a="/account/mfa/authenticators/{type}".replace("{type}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("post",s,c,o)}updateMfaAuthenticator(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)&&("type"in e||"otp"in e)?n=e||{}:n={type:e,otp:i[0]};const a=n.type,o=n.otp;if(typeof a>"u")throw new l('Missing required parameter: "type"');if(typeof o>"u")throw new l('Missing required parameter: "otp"');const s="/account/mfa/authenticators/{type}".replace("{type}",a),c={};typeof o<"u"&&(c.otp=o);
1const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}updateMFAAuthenticator(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)&&("type"in e||"otp"in e)?n=e||{}:n={type:e,otp:i[0]};const a=n.type,o=n.otp;if(typeof a>"u")throw new l('Missing required parameter: "type"');if(typeof o>"u")throw new l('Missing required parameter: "otp"');const s="/account/mfa/authenticators/{type}".replace("{type}",a),c={};typeof o<"u"&&(c.otp=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}deleteMfaAuthenticator(e){let i;e&&typeof e=="object"&&!Array.isArray(e)&&"type"in e?i=e||{}:i={type:e};const n=i.type;if(typeof n>"u")throw new l('Missing required parameter: "type"');const a="/account/mfa/authenticators/{type}".replace("{type}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("delete",s,c,o)}deleteMFAAuthenticator(e){let i;e&&typeof e=="object"&&!Array.isArray(e)&&"type"in e?i=e||{}:i={type:e};const n=i.type;if(typeof n>"u")throw new l('Missing required parameter: "type"');const a="/account/mfa/authenticators/{type}".replace("{type}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("delete",s,c,o)}createMfaChallenge(e){let i;e&&typeof e=="object"&&!Array.isArray(e)&&"factor"in e?i=e||{}:i={factor:e};const n=i.factor;if(typeof n>"u")throw new l('Missing required parameter: "factor"');const a="/account/mfa/challenges",o={};typeof n<"u"&&(o.factor=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("post",s,c,o)}createMFAChallenge(e){let i;e&&typeof e=="object"&&!Array.isArray(e)&&"factor"in e?i=e||{}:i={factor:e};const n=i.factor;if(typeof n>"u")throw new l('Missing required parameter: "factor"');const a="/account/mfa/challenges",o={};typeof n<"u"&&(o.factor=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("post",s,c,o)}updateMfaChallenge(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={challengeId:e,otp:i[0]};const a=n.challengeId,o=n.otp;if(typeof a>"u")throw new l('Missing required parameter: "challengeId"');if(typeof o>"u")throw new l('Missing required parameter: "otp"');const s="/account/mfa/challenges",c={};typeof a<"u"&&(c.challengeId=a),typeof o<"u"&&(c.otp=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}updateMFAChallenge(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={challengeId:e,otp:i[0]};const a=n.challengeId,o=n.otp;if(typeof a>"u")throw new l('Missing required parameter: "challengeId"');if(typeof o>"u")throw new l('Missing required parameter: "otp"');const s="/account/mfa/challenges",c={};typeof a<"u"&&(c.challengeId=a),typeof o<"u"&&(c.otp=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}listMfaFactors(){const e="/account/mfa/factors",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}listMFAFactors(){const e="/account/mfa/factors",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}getMfaRecoveryCodes(){const e="/account/mfa/recovery-codes",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}getMFARecoveryCodes(){const e="/account/mfa/recovery-codes",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}createMfaRecoveryCodes(){const e="/account/mfa/recovery-codes",i={},n=new URL(this.client.config.endpoint+e),a={"content-type":"application/json"};return this.client.call("post",n,a,i)}createMFARecoveryCodes(){const e="/account/mfa/recovery-codes",i={},n=new URL(this.client.config.endpoint+e),a={"content-type":"application/json"};return this.client.call("post",n,a,i)}updateMfaRecoveryCodes(){const e="/account/mfa/recovery-codes",i={},n=new URL(this.client.config.endpoint+e),a={"content-type":"application/json"};return this.client.call("patch",n,a,i)}updateMFARecoveryCodes(){const e="/account/mfa/recovery-codes",i={},n=new URL(this.client.config.endpoint+e),a={"content-type":"application/json"};return this.client.call("patch",n,a,i)}updateName(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={name:e};const n=i.name;if(typeof n>"u")throw new l('Missing required parameter: "name"');const a="/account/name",o={};typeof n<"u"&&(o.name=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("patch",s,c,o)}updatePassword(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={password:e,oldPassword:i[0]};const a=n.password,o=n.oldPassword;if(typeof a>"u")throw new l('Missing required parameter: "password"');const s="/account/password",c={};typeof a<"u"&&(c.password=a),typeof o<"u"&&(c.oldPassword=o);
1const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("patch",r,d,c)}updatePhone(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={phone:e,password:i[0]};const a=n.phone,o=n.password;if(typeof a>"u")throw new l('Missing required parameter: "phone"');if(typeof o>"u")throw new l('Missing required parameter: "password"');const s="/account/phone",c={};typeof a<"u"&&(c.phone=a),typeof o<"u"&&(c.password=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("patch",r,d,c)}getPrefs(){const e="/account/prefs",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}updatePrefs(e){let i;e&&typeof e=="object"&&!Array.isArray(e)&&"prefs"in e?i=e||{}:i={prefs:e};const n=i.prefs;if(typeof n>"u")throw new l('Missing required parameter: "prefs"');const a="/account/prefs",o={};typeof n<"u"&&(o.prefs=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("patch",s,c,o)}createRecovery(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={email:e,url:i[0]};const a=n.email,o=n.url;if(typeof a>"u")throw new l('Missing required parameter: "email"');if(typeof o>"u")throw new l('Missing required parameter: "url"');const s="/account/recovery",c={};typeof a<"u"&&(c.email=a),typeof o<"u"&&(c.url=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("post",r,d,c)}updateRecovery(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,secret:i[0],password:i[1]};const a=n.userId,o=n.secret,s=n.password;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "secret"');if(typeof s>"u")throw new l('Missing required parameter: "password"');const c="/account/recovery",r={};typeof a<"u"&&(r.userId=a),typeof o<"u"&&(r.secret=o),typeof s<"u"&&(r.password=s);const d=new URL(this.client.config.endpoint+c),u={"content-type":"application/json"};return this.client.call("put",d,u,r)}listSessions(){const e="/account/sessions",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}deleteSessions(){const e="/account/sessions",i={},n=new URL(this.client.config.endpoint+e),a={"content-type":"application/json"};return this.client.call("delete",n,a,i)}createAnonymousSession(){const e="/account/sessions/anonymous",i={},n=new URL(this.client.config.endpoint+e),a={"content-type":"application/json"};return this.client.call("post",n,a,i)}createEmailPasswordSession(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={email:e,password:i[0]};const a=n.email,o=n.password;if(typeof a>"u")throw new l('Missing required parameter: "email"');if(typeof o>"u")throw new l('Missing required parameter: "password"');const s="/account/sessions/email",c={};typeof a<"u"&&(c.email=a),typeof o<"u"&&(c.password=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("post",r,d,c)}updateMagicURLSession(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,secret:i[0]};const a=n.userId,o=n.secret;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "secret"');const s="/account/sessions/magic-url",c={};typeof a<"u"&&(c.userId=a),typeof o<"u"&&(c.secret=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}createOAuth2Session(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)&&("provider"in e||"success"in e||"failure"in e||"scopes"in e)?n=e||{}:n={provider:e,success:i[0],failure:i[1],scopes:i[2]};const a=n.provider,o=n.success,s=n.failure,c=n.scopes;if(typeof a>"u")throw new l('Missing required parameter: "provider"');const r="/account/sessions/oauth2/{provider}".replace("{provider}",a),d={};typeof o<"u"&&(d.success=o),typeof s<"u"&&(d.failure=s),typeof c<"u"&&(d.scopes=c);const u=new URL(this.client.config.endpoint+r);d.project=this.client.config.project;for(const[f,h]of Object.entries(A.flatten(d)))u.searchParams.append(f,h);if(typeof window<"u"&&window?.location){window.location.href=u.toString();return}else return u.toString()}updatePhoneSession(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,secret:i[0]};const a=n.userId,o=n.secret;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "secret"');const s="/account/sessions/phone",c={};typeof a<"u"&&(c.userId=a),typeof o<"u"&&(c.secret=o);
1const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}createSession(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,secret:i[0]};const a=n.userId,o=n.secret;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "secret"');const s="/account/sessions/token",c={};typeof a<"u"&&(c.userId=a),typeof o<"u"&&(c.secret=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("post",r,d,c)}getSession(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={sessionId:e};const n=i.sessionId;if(typeof n>"u")throw new l('Missing required parameter: "sessionId"');const a="/account/sessions/{sessionId}".replace("{sessionId}",n),o={},s=new URL(this.client.config.endpoint+a),c={};return this.client.call("get",s,c,o)}updateSession(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={sessionId:e};const n=i.sessionId;if(typeof n>"u")throw new l('Missing required parameter: "sessionId"');const a="/account/sessions/{sessionId}".replace("{sessionId}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("patch",s,c,o)}deleteSession(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={sessionId:e};const n=i.sessionId;if(typeof n>"u")throw new l('Missing required parameter: "sessionId"');const a="/account/sessions/{sessionId}".replace("{sessionId}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("delete",s,c,o)}updateStatus(){const e="/account/status",i={},n=new URL(this.client.config.endpoint+e),a={"content-type":"application/json"};return this.client.call("patch",n,a,i)}createPushTarget(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={targetId:e,identifier:i[0],providerId:i[1]};const a=n.targetId,o=n.identifier,s=n.providerId;if(typeof a>"u")throw new l('Missing required parameter: "targetId"');if(typeof o>"u")throw new l('Missing required parameter: "identifier"');const c="/account/targets/push",r={};typeof a<"u"&&(r.targetId=a),typeof o<"u"&&(r.identifier=o),typeof s<"u"&&(r.providerId=s);const d=new URL(this.client.config.endpoint+c),u={"content-type":"application/json"};return this.client.call("post",d,u,r)}updatePushTarget(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={targetId:e,identifier:i[0]};const a=n.targetId,o=n.identifier;if(typeof a>"u")throw new l('Missing required parameter: "targetId"');if(typeof o>"u")throw new l('Missing required parameter: "identifier"');const s="/account/targets/{targetId}/push".replace("{targetId}",a),c={};typeof o<"u"&&(c.identifier=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}deletePushTarget(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={targetId:e};const n=i.targetId;if(typeof n>"u")throw new l('Missing required parameter: "targetId"');const a="/account/targets/{targetId}/push".replace("{targetId}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("delete",s,c,o)}createEmailToken(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,email:i[0],phrase:i[1]};const a=n.userId,o=n.email,s=n.phrase;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "email"');const c="/account/tokens/email",r={};typeof a<"u"&&(r.userId=a),typeof o<"u"&&(r.email=o),typeof s<"u"&&(r.phrase=s);const d=new URL(this.client.config.endpoint+c),u={"content-type":"application/json"};return this.client.call("post",d,u,r)}createMagicURLToken(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,email:i[0],url:i[1],phrase:i[2]};const a=n.userId,o=n.email,s=n.url,c=n.phrase;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "email"');const r="/account/tokens/magic-url",d={};typeof a<"u"&&(d.userId=a),typeof o<"u"&&(d.email=o),typeof s<"u"&&(d.url=s),typeof c<"u"&&(d.phrase=c);const u=new URL(this.client.config.endpoint+r),f={"content-type":"application/json"};return this.client.call("post",u,f,d)}createOAuth2Token(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)&&("provider"in e||"success"in e||"failure"in e||"scopes"in e)?n=e||{}:n={provider:e,success:i[0],failure:i[1],scopes:i[2]};const a=n.provider,o=n.success,s=n.failure,c=n.scopes;if(typeof a>"u")throw new l('Missing required parameter: "provider"');const r="/account/tokens/oauth2/{provider}".replace("{provider}",a),d={};typeof o<"u"&&(d.success=o),typeof s<"u"&&(d.failure=s),typeof c<"u"&&(d.scopes=c);const u=new URL(this.client.config.endpoint+r);d.project=this.client.config.project;for(const[f,h]of Object.entries(A.flatten(d)))u.searchParams.append(f,h);if(typeof window<"u"&&window?.location){window.location.href=u.toString();return}else return u.toString()}createPhoneToken(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,phone:i[0]};const a=n.userId,o=n.phone;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "phone"');const s="/account/tokens/phone",c={};typeof a<"u"&&(c.userId=a),typeof o<"u"&&(c.phone=o);
1const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("post",r,d,c)}createEmailVerification(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={url:e};const n=i.url;if(typeof n>"u")throw new l('Missing required parameter: "url"');const a="/account/verifications/email",o={};typeof n<"u"&&(o.url=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("post",s,c,o)}createVerification(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={url:e};const n=i.url;if(typeof n>"u")throw new l('Missing required parameter: "url"');const a="/account/verifications/email",o={};typeof n<"u"&&(o.url=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("post",s,c,o)}updateEmailVerification(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,secret:i[0]};const a=n.userId,o=n.secret;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "secret"');const s="/account/verifications/email",c={};typeof a<"u"&&(c.userId=a),typeof o<"u"&&(c.secret=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}updateVerification(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,secret:i[0]};const a=n.userId,o=n.secret;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "secret"');const s="/account/verifications/email",c={};typeof a<"u"&&(c.userId=a),typeof o<"u"&&(c.secret=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}createPhoneVerification(){const e="/account/verifications/phone",i={},n=new URL(this.client.config.endpoint+e),a={"content-type":"application/json"};return this.client.call("post",n,a,i)}updatePhoneVerification(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={userId:e,secret:i[0]};const a=n.userId,o=n.secret;if(typeof a>"u")throw new l('Missing required parameter: "userId"');if(typeof o>"u")throw new l('Missing required parameter: "secret"');const s="/account/verifications/phone",c={};typeof a<"u"&&(c.userId=a),typeof o<"u"&&(c.secret=o);const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}}class Ie{constructor(e){this.client=e}getBrowser(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)&&("code"in e||"width"in e||"height"in e||"quality"in e)?n=e||{}:n={code:e,width:i[0],height:i[1],quality:i[2]};const a=n.code,o=n.width,s=n.height,c=n.quality;if(typeof a>"u")throw new l('Missing required parameter: "code"');const r="/avatars/browsers/{code}".replace("{code}",a),d={};typeof o<"u"&&(d.width=o),typeof s<"u"&&(d.height=s),typeof c<"u"&&(d.quality=c);const u=new URL(this.client.config.endpoint+r);d.project=this.client.config.project;for(const[f,h]of Object.entries(A.flatten(d)))u.searchParams.append(f,h);return u.toString()}getCreditCard(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)&&("code"in e||"width"in e||"height"in e||"quality"in e)?n=e||{}:n={code:e,width:i[0],height:i[1],quality:i[2]};const a=n.code,o=n.width,s=n.height,c=n.quality;if(typeof a>"u")throw new l('Missing required parameter: "code"');const r="/avatars/credit-cards/{code}".replace("{code}",a),d={};typeof o<"u"&&(d.width=o),typeof s<"u"&&(d.height=s),typeof c<"u"&&(d.quality=c);const u=new URL(this.client.config.endpoint+r);d.project=this.client.config.project;for(const[f,h]of Object.entries(A.flatten(d)))u.searchParams.append(f,h);return u.toString()}getFavicon(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={url:e};const n=i.url;if(typeof n>"u")throw new l('Missing required parameter: "url"');const a="/avatars/favicon",o={};typeof n<"u"&&(o.url=n);const s=new URL(this.client.config.endpoint+a);o.project=this.client.config.project;
1for(const[c,r]of Object.entries(A.flatten(o)))s.searchParams.append(c,r);return s.toString()}getFlag(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)&&("code"in e||"width"in e||"height"in e||"quality"in e)?n=e||{}:n={code:e,width:i[0],height:i[1],quality:i[2]};const a=n.code,o=n.width,s=n.height,c=n.quality;if(typeof a>"u")throw new l('Missing required parameter: "code"');const r="/avatars/flags/{code}".replace("{code}",a),d={};typeof o<"u"&&(d.width=o),typeof s<"u"&&(d.height=s),typeof c<"u"&&(d.quality=c);const u=new URL(this.client.config.endpoint+r);d.project=this.client.config.project;for(const[f,h]of Object.entries(A.flatten(d)))u.searchParams.append(f,h);return u.toString()}getImage(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={url:e,width:i[0],height:i[1]};const a=n.url,o=n.width,s=n.height;if(typeof a>"u")throw new l('Missing required parameter: "url"');const c="/avatars/image",r={};typeof a<"u"&&(r.url=a),typeof o<"u"&&(r.width=o),typeof s<"u"&&(r.height=s);const d=new URL(this.client.config.endpoint+c);r.project=this.client.config.project;for(const[u,f]of Object.entries(A.flatten(r)))d.searchParams.append(u,f);return d.toString()}getInitials(e,...i){let n;!e||e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={name:e,width:i[0],height:i[1],background:i[2]};const a=n.name,o=n.width,s=n.height,c=n.background,r="/avatars/initials",d={};typeof a<"u"&&(d.name=a),typeof o<"u"&&(d.width=o),typeof s<"u"&&(d.height=s),typeof c<"u"&&(d.background=c);const u=new URL(this.client.config.endpoint+r);d.project=this.client.config.project;for(const[f,h]of Object.entries(A.flatten(d)))u.searchParams.append(f,h);return u.toString()}getQR(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={text:e,size:i[0],margin:i[1],download:i[2]};const a=n.text,o=n.size,s=n.margin,c=n.download;if(typeof a>"u")throw new l('Missing required parameter: "text"');const r="/avatars/qr",d={};typeof a<"u"&&(d.text=a),typeof o<"u"&&(d.size=o),typeof s<"u"&&(d.margin=s),typeof c<"u"&&(d.download=c);const u=new URL(this.client.config.endpoint+r);d.project=this.client.config.project;for(const[f,h]of Object.entries(A.flatten(d)))u.searchParams.append(f,h);return u.toString()}getScreenshot(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={url:e,headers:i[0],viewportWidth:i[1],viewportHeight:i[2],scale:i[3],theme:i[4],userAgent:i[5],fullpage:i[6],locale:i[7],timezone:i[8],latitude:i[9],longitude:i[10],accuracy:i[11],touch:i[12],permissions:i[13],sleep:i[14],width:i[15],height:i[16],quality:i[17],output:i[18]};const a=n.url,o=n.headers,s=n.viewportWidth,c=n.viewportHeight,r=n.scale,d=n.theme,u=n.userAgent,f=n.fullpage,h=n.locale,y=n.timezone,w=n.latitude,S=n.longitude,v=n.accuracy,R=n.touch,L=n.permissions,g=n.sleep,P=n.width,U=n.height,N=n.quality,x=n.output;if(typeof a>"u")throw new l('Missing required parameter: "url"');const ie="/avatars/screenshots",I={};typeof a<"u"&&(I.url=a),typeof o<"u"&&(I.headers=o),typeof s<"u"&&(I.viewportWidth=s),typeof c<"u"&&(I.viewportHeight=c),typeof r<"u"&&(I.scale=r),typeof d<"u"&&(I.theme=d),typeof u<"u"&&(I.userAgent=u),typeof f<"u"&&(I.fullpage=f),typeof h<"u"&&(I.locale=h),typeof y<"u"&&(I.timezone=y),typeof w<"u"&&(I.latitude=w),typeof S<"u"&&(I.longitude=S),typeof v<"u"&&(I.accuracy=v),typeof R<"u"&&(I.touch=R),typeof L<"u"&&(I.permissions=L),typeof g<"u"&&(I.sleep=g),typeof P<"u"&&(I.width=P),typeof U<"u"&&(I.height=U),typeof N<"u"&&(I.quality=N),typeof x<"u"&&(I.output=x);const B=new URL(this.client.config.endpoint+ie);I.project=this.client.config.project;for(const[ae,oe]of Object.entries(A.flatten(I)))B.searchParams.append(ae,oe);return B.toString()}}class ge{constructor(e){this.client=e}listTransactions(e){let i;!e||e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={queries:e};const n=i.queries,a="/databases/transactions",o={};typeof n<"u"&&(o.queries=n);const s=new URL(this.client.config.endpoint+a),c={};return this.client.call("get",s,c,o)}createTransaction(e){let i;!e||e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={ttl:e};const n=i.ttl,a="/databases/transactions",o={};typeof n<"u"&&(o.ttl=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("post",s,c,o)}getTransaction(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={transactionId:e};const n=i.transactionId;if(typeof n>"u")throw new l('Missing required parameter: "transactionId"');const a="/databases/transactions/{transactionId}".replace("{transactionId}",n),o={},s=new URL(this.client.config.endpoint+a),c={};return this.client.call("get",s,c,o)}updateTransaction(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={transactionId:e,commit:i[0],rollback:i[1]};const a=n.transactionId,o=n.commit,s=n.rollback;if(typeof a>"u")throw new l('Missing required parameter: "transactionId"');const c="/databases/transactions/{transactionId}".replace("{transactionId}",a),r={};typeof o<"u"&&(r.commit=o),typeof s<"u"&&(r.rollback=s);const d=new URL(this.client.config.endpoint+c),u={"content-type":"application/json"};return this.client.call("patch",d,u,r)}deleteTransaction(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={transactionId:e};const n=i.transactionId;if(typeof n>"u")throw new l('Missing required parameter: "transactionId"');const a="/databases/transactions/{transactionId}".replace("{transactionId}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("delete",s,c,o)}createOperations(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={transactionId:e,operations:i[0]};const a=n.transactionId,o=n.operations;if(typeof a>"u")throw new l('Missing required parameter: "transactionId"');const s="/databases/transactions/{transactionId}/operations".replace("{transactionId}",a),c={};typeof o<"u"&&(c.operations=o);
1const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("post",r,d,c)}listDocuments(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,collectionId:i[0],queries:i[1],transactionId:i[2],total:i[3]};const a=n.databaseId,o=n.collectionId,s=n.queries,c=n.transactionId,r=n.total;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "collectionId"');const d="/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}",a).replace("{collectionId}",o),u={};typeof s<"u"&&(u.queries=s),typeof c<"u"&&(u.transactionId=c),typeof r<"u"&&(u.total=r);const f=new URL(this.client.config.endpoint+d),h={};return this.client.call("get",f,h,u)}createDocument(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,collectionId:i[0],documentId:i[1],data:i[2],permissions:i[3],transactionId:i[4]};const a=n.databaseId,o=n.collectionId,s=n.documentId,c=n.data,r=n.permissions,d=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "collectionId"');if(typeof s>"u")throw new l('Missing required parameter: "documentId"');if(typeof c>"u")throw new l('Missing required parameter: "data"');const u="/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}",a).replace("{collectionId}",o),f={};typeof s<"u"&&(f.documentId=s),typeof c<"u"&&(f.data=c),typeof r<"u"&&(f.permissions=r),typeof d<"u"&&(f.transactionId=d);const h=new URL(this.client.config.endpoint+u),y={"content-type":"application/json"};return this.client.call("post",h,y,f)}getDocument(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,collectionId:i[0],documentId:i[1],queries:i[2],transactionId:i[3]};const a=n.databaseId,o=n.collectionId,s=n.documentId,c=n.queries,r=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "collectionId"');if(typeof s>"u")throw new l('Missing required parameter: "documentId"');const d="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",a).replace("{collectionId}",o).replace("{documentId}",s),u={};typeof c<"u"&&(u.queries=c),typeof r<"u"&&(u.transactionId=r);const f=new URL(this.client.config.endpoint+d),h={};return this.client.call("get",f,h,u)}upsertDocument(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,collectionId:i[0],documentId:i[1],data:i[2],permissions:i[3],transactionId:i[4]};const a=n.databaseId,o=n.collectionId,s=n.documentId,c=n.data,r=n.permissions,d=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "collectionId"');if(typeof s>"u")throw new l('Missing required parameter: "documentId"');const u="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",a).replace("{collectionId}",o).replace("{documentId}",s),f={};typeof c<"u"&&(f.data=c),typeof r<"u"&&(f.permissions=r),typeof d<"u"&&(f.transactionId=d);const h=new URL(this.client.config.endpoint+u),y={"content-type":"application/json"};return this.client.call("put",h,y,f)}updateDocument(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,collectionId:i[0],documentId:i[1],data:i[2],permissions:i[3],transactionId:i[4]};const a=n.databaseId,o=n.collectionId,s=n.documentId,c=n.data,r=n.permissions,d=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "collectionId"');if(typeof s>"u")throw new l('Missing required parameter: "documentId"');const u="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",a).replace("{collectionId}",o).replace("{documentId}",s),f={};typeof c<"u"&&(f.data=c),typeof r<"u"&&(f.permissions=r),typeof d<"u"&&(f.transactionId=d);const h=new URL(this.client.config.endpoint+u),y={"content-type":"application/json"};return this.client.call("patch",h,y,f)}deleteDocument(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,collectionId:i[0],documentId:i[1],transactionId:i[2]};const a=n.databaseId,o=n.collectionId,s=n.documentId,c=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "collectionId"');if(typeof s>"u")throw new l('Missing required parameter: "documentId"');const r="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",a).replace("{collectionId}",o).replace("{documentId}",s),d={};typeof c<"u"&&(d.transactionId=c);const u=new URL(this.client.config.endpoint+r),f={"content-type":"application/json"};return this.client.call("delete",u,f,d)}decrementDocumentAttribute(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,collectionId:i[0],documentId:i[1],attribute:i[2],value:i[3],min:i[4],transactionId:i[5]};const a=n.databaseId,o=n.collectionId,s=n.documentId,c=n.attribute,r=n.value,d=n.min,u=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "collectionId"');if(typeof s>"u")throw new l('Missing required parameter: "documentId"');if(typeof c>"u")throw new l('Missing required parameter: "attribute"');const f="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement".replace("{databaseId}",a).replace("{collectionId}",o).replace("{documentId}",s).replace("{attribute}",c),h={};typeof r<"u"&&(h.value=r),typeof d<"u"&&(h.min=d),typeof u<"u"&&(h.transactionId=u);const y=new URL(this.client.config.endpoint+f),w={"content-type":"application/json"};return this.client.call("patch",y,w,h)}incrementDocumentAttribute(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,collectionId:i[0],documentId:i[1],attribute:i[2],value:i[3],max:i[4],transactionId:i[5]};const a=n.databaseId,o=n.collectionId,s=n.documentId,c=n.attribute,r=n.value,d=n.max,u=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "collectionId"');if(typeof s>"u")throw new l('Missing required parameter: "documentId"');if(typeof c>"u")throw new l('Missing required parameter: "attribute"');const f="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment".replace("{databaseId}",a).replace("{collectionId}",o).replace("{documentId}",s).replace("{attribute}",c),h={};typeof r<"u"&&(h.value=r),typeof d<"u"&&(h.max=d),typeof u<"u"&&(h.transactionId=u);const y=new URL(this.client.config.endpoint+f),w={"content-type":"application/json"};return this.client.call("patch",y,w,h)}}class Ae{constructor(e){this.client=e}listExecutions(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={functionId:e,queries:i[0],total:i[1]};const a=n.functionId,o=n.queries,s=n.total;if(typeof a>"u")throw new l('Missing required parameter: "functionId"');const c="/functions/{functionId}/executions".replace("{functionId}",a),r={};typeof o<"u"&&(r.queries=o),typeof s<"u"&&(r.total=s);const d=new URL(this.client.config.endpoint+c),u={};return this.client.call("get",d,u,r)}createExecution(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={functionId:e,body:i[0],async:i[1],xpath:i[2],method:i[3],headers:i[4],scheduledAt:i[5]};const a=n.functionId,o=n.body,s=n.async,c=n.xpath,r=n.method,d=n.headers,u=n.scheduledAt;if(typeof a>"u")throw new l('Missing required parameter: "functionId"');const f="/functions/{functionId}/executions".replace("{functionId}",a),h={};typeof o<"u"&&(h.body=o),typeof s<"u"&&(h.async=s),typeof c<"u"&&(h.path=c),typeof r<"u"&&(h.method=r),typeof d<"u"&&(h.headers=d),typeof u<"u"&&(h.scheduledAt=u);const y=new URL(this.client.config.endpoint+f),w={"content-type":"application/json"};return this.client.call("post",y,w,h)}getExecution(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={functionId:e,executionId:i[0]};const a=n.functionId,o=n.executionId;if(typeof a>"u")throw new l('Missing required parameter: "functionId"');if(typeof o>"u")throw new l('Missing required parameter: "executionId"');const s="/functions/{functionId}/executions/{executionId}".replace("{functionId}",a).replace("{executionId}",o),c={},r=new URL(this.client.config.endpoint+s),d={};return this.client.call("get",r,d,c)}}class me{constructor(e){this.client=e}query(e){let i;e&&typeof e=="object"&&!Array.isArray(e)&&"query"in e?i=e||{}:i={query:e};const n=i.query;if(typeof n>"u")throw new l('Missing required parameter: "query"');const a="/graphql",o={};typeof n<"u"&&(o.query=n);const s=new URL(this.client.config.endpoint+a),c={"x-sdk-graphql":"true","content-type":"application/json"};return this.client.call("post",s,c,o)}mutation(e){let i;e&&typeof e=="object"&&!Array.isArray(e)&&"query"in e?i=e||{}:i={query:e};const n=i.query;if(typeof n>"u")throw new l('Missing required parameter: "query"');const a="/graphql/mutation",o={};typeof n<"u"&&(o.query=n);const s=new URL(this.client.config.endpoint+a),c={"x-sdk-graphql":"true","content-type":"application/json"};return this.client.call("post",s,c,o)}}class ke{constructor(e){this.client=e}get(){const e="/locale",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}listCodes(){const e="/locale/codes",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}listContinents(){const e="/locale/continents",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}listCountries(){const e="/locale/countries",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}listCountriesEU(){const e="/locale/countries/eu",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}listCountriesPhones(){const e="/locale/countries/phones",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}listCurrencies(){const e="/locale/currencies",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}listLanguages(){const e="/locale/languages",i={},n=new URL(this.client.config.endpoint+e),a={};return this.client.call("get",n,a,i)}}class qe{constructor(e){this.client=e}createSubscriber(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={topicId:e,subscriberId:i[0],targetId:i[1]};const a=n.topicId,o=n.subscriberId,s=n.targetId;if(typeof a>"u")throw new l('Missing required parameter: "topicId"');if(typeof o>"u")throw new l('Missing required parameter: "subscriberId"');if(typeof s>"u")throw new l('Missing required parameter: "targetId"');const c="/messaging/topics/{topicId}/subscribers".replace("{topicId}",a),r={};typeof o<"u"&&(r.subscriberId=o),typeof s<"u"&&(r.targetId=s);const d=new URL(this.client.config.endpoint+c),u={"content-type":"application/json"};return this.client.call("post",d,u,r)}deleteSubscriber(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={topicId:e,subscriberId:i[0]};const a=n.topicId,o=n.subscriberId;if(typeof a>"u")throw new l('Missing required parameter: "topicId"');if(typeof o>"u")throw new l('Missing required parameter: "subscriberId"');const s="/messaging/topics/{topicId}/subscribers/{subscriberId}".replace("{topicId}",a).replace("{subscriberId}",o),c={},r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("delete",r,d,c)}}class je{constructor(e){this.client=e}listFiles(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={bucketId:e,queries:i[0],search:i[1],total:i[2]};const a=n.bucketId,o=n.queries,s=n.search,c=n.total;if(typeof a>"u")throw new l('Missing required parameter: "bucketId"');const r="/storage/buckets/{bucketId}/files".replace("{bucketId}",a),d={};typeof o<"u"&&(d.queries=o),typeof s<"u"&&(d.search=s),typeof c<"u"&&(d.total=c);const u=new URL(this.client.config.endpoint+r),f={};return this.client.call("get",u,f,d)}createFile(e,...i){let n,a;e&&typeof e=="object"&&!Array.isArray(e)?(n=e||{},a=e?.onProgress):(n={bucketId:e,fileId:i[0],file:i[1],permissions:i[2]},a=i[3]);const o=n.bucketId,s=n.fileId,c=n.file,r=n.permissions;
1if(typeof o>"u")throw new l('Missing required parameter: "bucketId"');if(typeof s>"u")throw new l('Missing required parameter: "fileId"');if(typeof c>"u")throw new l('Missing required parameter: "file"');const d="/storage/buckets/{bucketId}/files".replace("{bucketId}",o),u={};typeof s<"u"&&(u.fileId=s),typeof c<"u"&&(u.file=c),typeof r<"u"&&(u.permissions=r);const f=new URL(this.client.config.endpoint+d),h={"content-type":"multipart/form-data"};return this.client.chunkedUpload("post",f,h,u,a)}getFile(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={bucketId:e,fileId:i[0]};const a=n.bucketId,o=n.fileId;if(typeof a>"u")throw new l('Missing required parameter: "bucketId"');if(typeof o>"u")throw new l('Missing required parameter: "fileId"');const s="/storage/buckets/{bucketId}/files/{fileId}".replace("{bucketId}",a).replace("{fileId}",o),c={},r=new URL(this.client.config.endpoint+s),d={};return this.client.call("get",r,d,c)}updateFile(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={bucketId:e,fileId:i[0],name:i[1],permissions:i[2]};const a=n.bucketId,o=n.fileId,s=n.name,c=n.permissions;
1if(typeof a>"u")throw new l('Missing required parameter: "bucketId"');if(typeof o>"u")throw new l('Missing required parameter: "fileId"');const r="/storage/buckets/{bucketId}/files/{fileId}".replace("{bucketId}",a).replace("{fileId}",o),d={};typeof s<"u"&&(d.name=s),typeof c<"u"&&(d.permissions=c);const u=new URL(this.client.config.endpoint+r),f={"content-type":"application/json"};return this.client.call("put",u,f,d)}deleteFile(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={bucketId:e,fileId:i[0]};const a=n.bucketId,o=n.fileId;if(typeof a>"u")throw new l('Missing required parameter: "bucketId"');if(typeof o>"u")throw new l('Missing required parameter: "fileId"');const s="/storage/buckets/{bucketId}/files/{fileId}".replace("{bucketId}",a).replace("{fileId}",o),c={},r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("delete",r,d,c)}getFileDownload(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={bucketId:e,fileId:i[0],token:i[1]};const a=n.bucketId,o=n.fileId,s=n.token;if(typeof a>"u")throw new l('Missing required parameter: "bucketId"');if(typeof o>"u")throw new l('Missing required parameter: "fileId"');const c="/storage/buckets/{bucketId}/files/{fileId}/download".replace("{bucketId}",a).replace("{fileId}",o),r={};typeof s<"u"&&(r.token=s);const d=new URL(this.client.config.endpoint+c);r.project=this.client.config.project;for(const[u,f]of Object.entries(A.flatten(r)))d.searchParams.append(u,f);return d.toString()}getFilePreview(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={bucketId:e,fileId:i[0],width:i[1],height:i[2],gravity:i[3],quality:i[4],borderWidth:i[5],borderColor:i[6],borderRadius:i[7],opacity:i[8],rotation:i[9],background:i[10],output:i[11],token:i[12]};const a=n.bucketId,o=n.fileId,s=n.width,c=n.height,r=n.gravity,d=n.quality,u=n.borderWidth,f=n.borderColor,h=n.borderRadius,y=n.opacity,w=n.rotation,S=n.background,v=n.output,R=n.token;if(typeof a>"u")throw new l('Missing required parameter: "bucketId"');if(typeof o>"u")throw new l('Missing required parameter: "fileId"');const L="/storage/buckets/{bucketId}/files/{fileId}/preview".replace("{bucketId}",a).replace("{fileId}",o),g={};typeof s<"u"&&(g.width=s),typeof c<"u"&&(g.height=c),typeof r<"u"&&(g.gravity=r),typeof d<"u"&&(g.quality=d),typeof u<"u"&&(g.borderWidth=u),typeof f<"u"&&(g.borderColor=f),typeof h<"u"&&(g.borderRadius=h),typeof y<"u"&&(g.opacity=y),typeof w<"u"&&(g.rotation=w),typeof S<"u"&&(g.background=S),typeof v<"u"&&(g.output=v),typeof R<"u"&&(g.token=R);const P=new URL(this.client.config.endpoint+L);g.project=this.client.config.project;for(const[U,N]of Object.entries(A.flatten(g)))P.searchParams.append(U,N);return P.toString()}getFileView(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={bucketId:e,fileId:i[0],token:i[1]};const a=n.bucketId,o=n.fileId,s=n.token;if(typeof a>"u")throw new l('Missing required parameter: "bucketId"');if(typeof o>"u")throw new l('Missing required parameter: "fileId"');const c="/storage/buckets/{bucketId}/files/{fileId}/view".replace("{bucketId}",a).replace("{fileId}",o),r={};typeof s<"u"&&(r.token=s);const d=new URL(this.client.config.endpoint+c);r.project=this.client.config.project;for(const[u,f]of Object.entries(A.flatten(r)))d.searchParams.append(u,f);return d.toString()}}class Me{constructor(e){this.client=e}listTransactions(e){let i;!e||e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={queries:e};const n=i.queries,a="/tablesdb/transactions",o={};typeof n<"u"&&(o.queries=n);const s=new URL(this.client.config.endpoint+a),c={};return this.client.call("get",s,c,o)}createTransaction(e){let i;!e||e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={ttl:e};const n=i.ttl,a="/tablesdb/transactions",o={};typeof n<"u"&&(o.ttl=n);const s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("post",s,c,o)}getTransaction(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={transactionId:e};const n=i.transactionId;if(typeof n>"u")throw new l('Missing required parameter: "transactionId"');const a="/tablesdb/transactions/{transactionId}".replace("{transactionId}",n),o={},s=new URL(this.client.config.endpoint+a),c={};return this.client.call("get",s,c,o)}updateTransaction(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={transactionId:e,commit:i[0],rollback:i[1]};const a=n.transactionId,o=n.commit,s=n.rollback;if(typeof a>"u")throw new l('Missing required parameter: "transactionId"');const c="/tablesdb/transactions/{transactionId}".replace("{transactionId}",a),r={};typeof o<"u"&&(r.commit=o),typeof s<"u"&&(r.rollback=s);const d=new URL(this.client.config.endpoint+c),u={"content-type":"application/json"};return this.client.call("patch",d,u,r)}deleteTransaction(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={transactionId:e};const n=i.transactionId;if(typeof n>"u")throw new l('Missing required parameter: "transactionId"');const a="/tablesdb/transactions/{transactionId}".replace("{transactionId}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("delete",s,c,o)}createOperations(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={transactionId:e,operations:i[0]};const a=n.transactionId,o=n.operations;if(typeof a>"u")throw new l('Missing required parameter: "transactionId"');const s="/tablesdb/transactions/{transactionId}/operations".replace("{transactionId}",a),c={};typeof o<"u"&&(c.operations=o);
1const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("post",r,d,c)}listRows(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,tableId:i[0],queries:i[1],transactionId:i[2],total:i[3]};const a=n.databaseId,o=n.tableId,s=n.queries,c=n.transactionId,r=n.total;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "tableId"');const d="/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}",a).replace("{tableId}",o),u={};typeof s<"u"&&(u.queries=s),typeof c<"u"&&(u.transactionId=c),typeof r<"u"&&(u.total=r);const f=new URL(this.client.config.endpoint+d),h={};return this.client.call("get",f,h,u)}createRow(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,tableId:i[0],rowId:i[1],data:i[2],permissions:i[3],transactionId:i[4]};const a=n.databaseId,o=n.tableId,s=n.rowId,c=n.data,r=n.permissions,d=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "tableId"');if(typeof s>"u")throw new l('Missing required parameter: "rowId"');if(typeof c>"u")throw new l('Missing required parameter: "data"');const u="/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}",a).replace("{tableId}",o),f={};typeof s<"u"&&(f.rowId=s),typeof c<"u"&&(f.data=c),typeof r<"u"&&(f.permissions=r),typeof d<"u"&&(f.transactionId=d);const h=new URL(this.client.config.endpoint+u),y={"content-type":"application/json"};return this.client.call("post",h,y,f)}getRow(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,tableId:i[0],rowId:i[1],queries:i[2],transactionId:i[3]};const a=n.databaseId,o=n.tableId,s=n.rowId,c=n.queries,r=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "tableId"');if(typeof s>"u")throw new l('Missing required parameter: "rowId"');const d="/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}",a).replace("{tableId}",o).replace("{rowId}",s),u={};typeof c<"u"&&(u.queries=c),typeof r<"u"&&(u.transactionId=r);const f=new URL(this.client.config.endpoint+d),h={};return this.client.call("get",f,h,u)}upsertRow(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,tableId:i[0],rowId:i[1],data:i[2],permissions:i[3],transactionId:i[4]};const a=n.databaseId,o=n.tableId,s=n.rowId,c=n.data,r=n.permissions,d=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "tableId"');if(typeof s>"u")throw new l('Missing required parameter: "rowId"');const u="/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}",a).replace("{tableId}",o).replace("{rowId}",s),f={};typeof c<"u"&&(f.data=c),typeof r<"u"&&(f.permissions=r),typeof d<"u"&&(f.transactionId=d);const h=new URL(this.client.config.endpoint+u),y={"content-type":"application/json"};return this.client.call("put",h,y,f)}updateRow(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,tableId:i[0],rowId:i[1],data:i[2],permissions:i[3],transactionId:i[4]};const a=n.databaseId,o=n.tableId,s=n.rowId,c=n.data,r=n.permissions,d=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "tableId"');if(typeof s>"u")throw new l('Missing required parameter: "rowId"');const u="/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}",a).replace("{tableId}",o).replace("{rowId}",s),f={};typeof c<"u"&&(f.data=c),typeof r<"u"&&(f.permissions=r),typeof d<"u"&&(f.transactionId=d);const h=new URL(this.client.config.endpoint+u),y={"content-type":"application/json"};return this.client.call("patch",h,y,f)}deleteRow(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,tableId:i[0],rowId:i[1],transactionId:i[2]};const a=n.databaseId,o=n.tableId,s=n.rowId,c=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "tableId"');if(typeof s>"u")throw new l('Missing required parameter: "rowId"');const r="/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}",a).replace("{tableId}",o).replace("{rowId}",s),d={};typeof c<"u"&&(d.transactionId=c);const u=new URL(this.client.config.endpoint+r),f={"content-type":"application/json"};return this.client.call("delete",u,f,d)}decrementRowColumn(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,tableId:i[0],rowId:i[1],column:i[2],value:i[3],min:i[4],transactionId:i[5]};const a=n.databaseId,o=n.tableId,s=n.rowId,c=n.column,r=n.value,d=n.min,u=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "tableId"');if(typeof s>"u")throw new l('Missing required parameter: "rowId"');if(typeof c>"u")throw new l('Missing required parameter: "column"');const f="/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement".replace("{databaseId}",a).replace("{tableId}",o).replace("{rowId}",s).replace("{column}",c),h={};typeof r<"u"&&(h.value=r),typeof d<"u"&&(h.min=d),typeof u<"u"&&(h.transactionId=u);const y=new URL(this.client.config.endpoint+f),w={"content-type":"application/json"};return this.client.call("patch",y,w,h)}incrementRowColumn(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={databaseId:e,tableId:i[0],rowId:i[1],column:i[2],value:i[3],max:i[4],transactionId:i[5]};const a=n.databaseId,o=n.tableId,s=n.rowId,c=n.column,r=n.value,d=n.max,u=n.transactionId;if(typeof a>"u")throw new l('Missing required parameter: "databaseId"');if(typeof o>"u")throw new l('Missing required parameter: "tableId"');if(typeof s>"u")throw new l('Missing required parameter: "rowId"');if(typeof c>"u")throw new l('Missing required parameter: "column"');const f="/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment".replace("{databaseId}",a).replace("{tableId}",o).replace("{rowId}",s).replace("{column}",c),h={};typeof r<"u"&&(h.value=r),typeof d<"u"&&(h.max=d),typeof u<"u"&&(h.transactionId=u);const y=new URL(this.client.config.endpoint+f),w={"content-type":"application/json"};return this.client.call("patch",y,w,h)}}class Se{constructor(e){this.client=e}list(e,...i){let n;!e||e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={queries:e,search:i[0],total:i[1]};const a=n.queries,o=n.search,s=n.total,c="/teams",r={};typeof a<"u"&&(r.queries=a),typeof o<"u"&&(r.search=o),typeof s<"u"&&(r.total=s);const d=new URL(this.client.config.endpoint+c),u={};return this.client.call("get",d,u,r)}create(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={teamId:e,name:i[0],roles:i[1]};const a=n.teamId,o=n.name,s=n.roles;if(typeof a>"u")throw new l('Missing required parameter: "teamId"');if(typeof o>"u")throw new l('Missing required parameter: "name"');const c="/teams",r={};typeof a<"u"&&(r.teamId=a),typeof o<"u"&&(r.name=o),typeof s<"u"&&(r.roles=s);const d=new URL(this.client.config.endpoint+c),u={"content-type":"application/json"};return this.client.call("post",d,u,r)}get(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={teamId:e};const n=i.teamId;if(typeof n>"u")throw new l('Missing required parameter: "teamId"');const a="/teams/{teamId}".replace("{teamId}",n),o={},s=new URL(this.client.config.endpoint+a),c={};return this.client.call("get",s,c,o)}updateName(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={teamId:e,name:i[0]};const a=n.teamId,o=n.name;if(typeof a>"u")throw new l('Missing required parameter: "teamId"');if(typeof o>"u")throw new l('Missing required parameter: "name"');const s="/teams/{teamId}".replace("{teamId}",a),c={};typeof o<"u"&&(c.name=o);
1const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}delete(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={teamId:e};const n=i.teamId;if(typeof n>"u")throw new l('Missing required parameter: "teamId"');const a="/teams/{teamId}".replace("{teamId}",n),o={},s=new URL(this.client.config.endpoint+a),c={"content-type":"application/json"};return this.client.call("delete",s,c,o)}listMemberships(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={teamId:e,queries:i[0],search:i[1],total:i[2]};const a=n.teamId,o=n.queries,s=n.search,c=n.total;if(typeof a>"u")throw new l('Missing required parameter: "teamId"');const r="/teams/{teamId}/memberships".replace("{teamId}",a),d={};typeof o<"u"&&(d.queries=o),typeof s<"u"&&(d.search=s),typeof c<"u"&&(d.total=c);const u=new URL(this.client.config.endpoint+r),f={};return this.client.call("get",u,f,d)}createMembership(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={teamId:e,roles:i[0],email:i[1],userId:i[2],phone:i[3],url:i[4],name:i[5]};const a=n.teamId,o=n.roles,s=n.email,c=n.userId,r=n.phone,d=n.url,u=n.name;if(typeof a>"u")throw new l('Missing required parameter: "teamId"');if(typeof o>"u")throw new l('Missing required parameter: "roles"');const f="/teams/{teamId}/memberships".replace("{teamId}",a),h={};typeof s<"u"&&(h.email=s),typeof c<"u"&&(h.userId=c),typeof r<"u"&&(h.phone=r),typeof o<"u"&&(h.roles=o),typeof d<"u"&&(h.url=d),typeof u<"u"&&(h.name=u);const y=new URL(this.client.config.endpoint+f),w={"content-type":"application/json"};return this.client.call("post",y,w,h)}getMembership(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={teamId:e,membershipId:i[0]};const a=n.teamId,o=n.membershipId;if(typeof a>"u")throw new l('Missing required parameter: "teamId"');if(typeof o>"u")throw new l('Missing required parameter: "membershipId"');const s="/teams/{teamId}/memberships/{membershipId}".replace("{teamId}",a).replace("{membershipId}",o),c={},r=new URL(this.client.config.endpoint+s),d={};return this.client.call("get",r,d,c)}updateMembership(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={teamId:e,membershipId:i[0],roles:i[1]};const a=n.teamId,o=n.membershipId,s=n.roles;if(typeof a>"u")throw new l('Missing required parameter: "teamId"');if(typeof o>"u")throw new l('Missing required parameter: "membershipId"');if(typeof s>"u")throw new l('Missing required parameter: "roles"');const c="/teams/{teamId}/memberships/{membershipId}".replace("{teamId}",a).replace("{membershipId}",o),r={};typeof s<"u"&&(r.roles=s);const d=new URL(this.client.config.endpoint+c),u={"content-type":"application/json"};return this.client.call("patch",d,u,r)}deleteMembership(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={teamId:e,membershipId:i[0]};const a=n.teamId,o=n.membershipId;if(typeof a>"u")throw new l('Missing required parameter: "teamId"');if(typeof o>"u")throw new l('Missing required parameter: "membershipId"');const s="/teams/{teamId}/memberships/{membershipId}".replace("{teamId}",a).replace("{membershipId}",o),c={},r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("delete",r,d,c)}updateMembershipStatus(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={teamId:e,membershipId:i[0],userId:i[1],secret:i[2]};const a=n.teamId,o=n.membershipId,s=n.userId,c=n.secret;if(typeof a>"u")throw new l('Missing required parameter: "teamId"');if(typeof o>"u")throw new l('Missing required parameter: "membershipId"');if(typeof s>"u")throw new l('Missing required parameter: "userId"');if(typeof c>"u")throw new l('Missing required parameter: "secret"');const r="/teams/{teamId}/memberships/{membershipId}/status".replace("{teamId}",a).replace("{membershipId}",o),d={};typeof s<"u"&&(d.userId=s),typeof c<"u"&&(d.secret=c);const u=new URL(this.client.config.endpoint+r),f={"content-type":"application/json"};return this.client.call("patch",u,f,d)}getPrefs(e){let i;e&&typeof e=="object"&&!Array.isArray(e)?i=e||{}:i={teamId:e};const n=i.teamId;if(typeof n>"u")throw new l('Missing required parameter: "teamId"');const a="/teams/{teamId}/prefs".replace("{teamId}",n),o={},s=new URL(this.client.config.endpoint+a),c={};return this.client.call("get",s,c,o)}updatePrefs(e,...i){let n;e&&typeof e=="object"&&!Array.isArray(e)?n=e||{}:n={teamId:e,prefs:i[0]};const a=n.teamId,o=n.prefs;if(typeof a>"u")throw new l('Missing required parameter: "teamId"');if(typeof o>"u")throw new l('Missing required parameter: "prefs"');const s="/teams/{teamId}/prefs".replace("{teamId}",a),c={};typeof o<"u"&&(c.prefs=o);
1const r=new URL(this.client.config.endpoint+s),d={"content-type":"application/json"};return this.client.call("put",r,d,c)}}var H;(function(t){t[t.NORMAL_CLOSURE=1e3]="NORMAL_CLOSURE",t[t.POLICY_VIOLATION=1008]="POLICY_VIOLATION",t[t.UNKNOWN_ERROR=-1]="UNKNOWN_ERROR"})(H||(H={}));class ve{constructor(e){this.TYPE_ERROR="error",this.TYPE_EVENT="event",this.TYPE_PONG="pong",this.TYPE_CONNECTED="connected",this.DEBOUNCE_MS=1,this.HEARTBEAT_INTERVAL=2e4,this.activeSubscriptions=new Map,this.slotToSubscriptionId=new Map,this.subscriptionIdToSlot=new Map,this.subCallDepth=0,this.reconnectAttempts=0,this.subscriptionsCounter=0,this.connectionId=0,this.reconnect=!0,this.onErrorCallbacks=[],this.onCloseCallbacks=[],this.onOpenCallbacks=[],this.client=e}onError(e){this.onErrorCallbacks.push(e)}onClose(e){this.onCloseCallbacks.push(e)}onOpen(e){this.onOpenCallbacks.push(e)}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=window.setInterval(()=>{this.socket&&this.socket.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify({type:"ping"}))},this.HEARTBEAT_INTERVAL)}stopHeartbeat(){this.heartbeatTimer&&(window.clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0)}createSocket(){return j(this,void 0,void 0,function*(){if(this.activeSubscriptions.size===0){this.reconnect=!1,yield this.closeSocket();return}const e=this.client.config.project;if(!e)throw new l("Missing project ID");const i=new Set;for(const r of this.activeSubscriptions.values())for(const d of r.channels)i.add(d);let n=`project=${e}`;for(const r of i)n+=`&channels[]=${encodeURIComponent(r)}`;const a=p.select(["*"]).toString();for(const[r,d]of this.activeSubscriptions){const u=d.queries.length===0?[a]:d.queries;for(const f of d.channels)for(const h of u)n+=`&${encodeURIComponent(f)}[${r}][]=${encodeURIComponent(h)}`}const c=`${(this.client.config.endpointRealtime!==""?this.client.config.endpointRealtime:this.client.config.endpoint||"").replace("https://","wss://").replace("http://","ws://")}/realtime?${n}`;return this.socket&&(this.reconnect=!1,this.socket.readyState<WebSocket.CLOSING&&(yield this.closeSocket()),this.reconnect=!0),new Promise((r,d)=>{try{const u=++this.connectionId,f=this.socket=new WebSocket(c);f.addEventListener("open",()=>{u===this.connectionId&&(this.reconnectAttempts=0,this.onOpenCallbacks.forEach(h=>h()),this.startHeartbeat(),r())}),f.addEventListener("message",h=>{if(u===this.connectionId)try{const y=JSON.parse(h.data);this.handleMessage(y)}catch(y){console.error("Failed to parse message:",y)}}),f.addEventListener("close",h=>j(this,void 0,void 0,function*(){if(u!==this.connectionId||f!==this.socket)return;if(this.stopHeartbeat(),this.onCloseCallbacks.forEach(w=>w()),!this.reconnect||h.code===H.POLICY_VIOLATION){this.reconnect=!0;return}const y=this.getTimeout();console.log(`Realtime disconnected. Re-connecting in ${y/1e3} seconds.`),yield this.sleep(y),this.reconnectAttempts++;try{yield this.createSocket()}catch(w){console.error("Failed to reconnect:",w)}})),f.addEventListener("error",h=>{if(u!==this.connectionId||f!==this.socket)return;this.stopHeartbeat();const y=new Error("WebSocket error");console.error("WebSocket error:",y.message),this.onErrorCallbacks.forEach(w=>w(y)),d(y)})}catch(u){d(u)}})})}closeSocket(){return j(this,void 0,void 0,function*(){if(this.stopHeartbeat(),this.socket)return new Promise(e=>{if(!this.socket){e();return}this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING?(this.socket.addEventListener("close",()=>{e()},{once:!0}),this.socket.close(H.NORMAL_CLOSURE)):e()})})}getTimeout(){return this.reconnectAttempts<5?1e3:this.reconnectAttempts<15?5e3:this.reconnectAttempts<100?1e4:6e4}sleep(e){return new Promise(i=>setTimeout(i,e))}channelToString(e){return typeof e=="string"?e:e&&typeof e.toString=="function"?e.toString():String(e)}subscribe(e,i,n=[]){return j(this,void 0,void 0,function*(){const o=(Array.isArray(e)?e:[e]).map(d=>this.channelToString(d)),s=new Set(o),c=[];for(const d of n??[])if(Array.isArray(d))for(const u of d)c.push(typeof u=="string"?u:u.toString());
1else c.push(typeof d=="string"?d:d.toString());this.subscriptionsCounter++;const r=this.subscriptionsCounter;return this.activeSubscriptions.set(r,{channels:s,queries:c,callback:i}),this.subCallDepth++,yield this.sleep(this.DEBOUNCE_MS),this.subCallDepth===1&&(yield this.createSocket()),this.subCallDepth--,{close:()=>j(this,void 0,void 0,function*(){const d=this.slotToSubscriptionId.get(r);this.activeSubscriptions.delete(r),this.slotToSubscriptionId.delete(r),d&&this.subscriptionIdToSlot.delete(d),yield this.createSocket()})}})}handleMessage(e){if(e.type)switch(e.type){case this.TYPE_CONNECTED:this.handleResponseConnected(e);break;case this.TYPE_ERROR:this.handleResponseError(e);break;case this.TYPE_EVENT:this.handleResponseEvent(e);break;case this.TYPE_PONG:break}}handleResponseConnected(e){var i,n;if(!e.data)return;const a=e.data;if(a.subscriptions){this.slotToSubscriptionId.clear(),this.subscriptionIdToSlot.clear();for(const[s,c]of Object.entries(a.subscriptions)){const r=Number(s);isNaN(r)||(this.slotToSubscriptionId.set(r,c),this.subscriptionIdToSlot.set(c,r))}}let o=this.client.config.session;if(!o)try{const s=JSON.parse((i=window.localStorage.getItem("cookieFallback"))!==null&&i!==void 0?i:"{}");o=s?.[`a_session_${this.client.config.project}`]}catch(s){console.error("Failed to parse cookie fallback:",s)}o&&!a.user&&((n=this.socket)===null||n===void 0||n.send(JSON.stringify({type:"authentication",data:{session:o}})))}handleResponseError(e){var i,n;const a=new l(((i=e.data)===null||i===void 0?void 0:i.message)||"Unknown error"),o=(n=e.data)===null||n===void 0?void 0:n.code;this.onErrorCallbacks.forEach(s=>s(a,o))}handleResponseEvent(e){const i=e.data;if(!i)return;const n=i.channels,a=i.events,o=i.payload,s=i.timestamp,c=i.subscriptions;if(!(!n||!a||!o||!c||c.length===0))for(const r of c){const d=this.subscriptionIdToSlot.get(r);if(d!==void 0){const u=this.activeSubscriptions.get(d);if(u){const f={events:a,channels:n,timestamp:s,payload:o,subscriptions:c};u.callback(f)}}}}}class E{}E.read=t=>`read("${t}")`;E.write=t=>`write("${t}")`;E.create=t=>`create("${t}")`;E.update=t=>`update("${t}")`;E.delete=t=>`delete("${t}")`;class Re{static any(){return"any"}static user(e,i=""){return i===""?`user:${e}`:`user:${e}/${i}`}static users(e=""){return e===""?"users":`users/${e}`}static guests(){return"guests"}static team(e,i=""){return i===""?`team:${e}`:`team:${e}/${i}`}static member(e){return`member:${e}`}static label(e){return`label:${e}`}}var te,ne;class _{static custom(e){return e}static unique(e=7){const i=ce(_,te,"m",ne).call(_);let n="";for(let a=0;a<e;a++){const o=Math.floor(Math.random()*16).toString(16);n+=o}return i+n}}te=_,ne=function(){const e=new Date,i=Math.floor(e.getTime()/1e3),n=e.getMilliseconds();return i.toString(16)+n.toString(16).padStart(5,"0")};function k(t){const e=t.trim();return e===""?"*":e}class m{constructor(e){this.segments=e}next(e,i){const n=i===void 0?[...this.segments,e]:[...this.segments,e,k(i)];return new m(n)}resolve(e){return new m([...this.segments,e])}toString(){return this.segments.join(".")}collection(e){return this.next("collections",e??"*")}document(e){return this.next("documents",e)}table(e){return this.next("tables",e??"*")}row(e){return this.next("rows",e)}file(e){return this.next("files",e)}create(){return this.resolve("create")}upsert(){return this.resolve("upsert")}update(){return this.resolve("update")}delete(){return this.resolve("delete")}static database(e="*"){return new m(["databases",k(e)])}static execution(e="*"){return new m(["executions",k(e)])}static tablesdb(e="*"){return new m(["tablesdb",k(e)])}static bucket(e="*"){return new m(["buckets",k(e)])}static function(e="*"){return new m(["functions",k(e)])}static team(e="*"){return new m(["teams",k(e)])}static membership(e="*"){return new m(["memberships",k(e)])}static account(){return"account"}static documents(){return"documents"}static rows(){return"rows"}static files(){return"files"}static executions(){return"executions"}static teams(){return"teams"}static memberships(){return"memberships"}}var G;(function(t){t.Equal="equal",t.NotEqual="notEqual",t.GreaterThan="greaterThan",t.GreaterThanEqual="greaterThanEqual",t.LessThan="lessThan",t.LessThanEqual="lessThanEqual",t.Contains="contains",t.IsNull="isNull",t.IsNotNull="isNotNull"})(G||(G={}));class b{constructor(e,i){this.method=e,i!==void 0&&(Array.isArray(i)?this.values=i:this.values=[i])}toString(){return JSON.stringify({method:this.method,values:this.values})}}b.increment=(t=1,e)=>{if(isNaN(t)||!isFinite(t))throw new Error("Value cannot be NaN or Infinity");if(e!==void 0&&(isNaN(e)||!isFinite(e)))throw new Error("Max cannot be NaN or Infinity");const i=[t];return e!==void 0&&i.push(e),new b("increment",i).toString()};b.decrement=(t=1,e)=>{if(isNaN(t)||!isFinite(t))throw new Error("Value cannot be NaN or Infinity");if(e!==void 0&&(isNaN(e)||!isFinite(e)))throw new Error("Min cannot be NaN or Infinity");const i=[t];return e!==void 0&&i.push(e),new b("decrement",i).toString()};b.multiply=(t,e)=>{if(isNaN(t)||!isFinite(t))throw new Error("Factor cannot be NaN or Infinity");if(e!==void 0&&(isNaN(e)||!isFinite(e)))throw new Error("Max cannot be NaN or Infinity");const i=[t];return e!==void 0&&i.push(e),new b("multiply",i).toString()};b.divide=(t,e)=>{if(isNaN(t)||!isFinite(t))throw new Error("Divisor cannot be NaN or Infinity");if(e!==void 0&&(isNaN(e)||!isFinite(e)))throw new Error("Min cannot be NaN or Infinity");if(t===0)throw new Error("Divisor cannot be zero");const i=[t];return e!==void 0&&i.push(e),new b("divide",i).toString()};b.modulo=t=>{if(isNaN(t)||!isFinite(t))throw new Error("Divisor cannot be NaN or Infinity");if(t===0)throw new Error("Divisor cannot be zero");return new b("modulo",[t]).toString()};b.power=(t,e)=>{if(isNaN(t)||!isFinite(t))throw new Error("Exponent cannot be NaN or Infinity");if(e!==void 0&&(isNaN(e)||!isFinite(e)))throw new Error("Max cannot be NaN or Infinity");const i=[t];return e!==void 0&&i.push(e),new b("power",i).toString()};b.arrayAppend=t=>new b("arrayAppend",t).toString();b.arrayPrepend=t=>new b("arrayPrepend",t).toString();b.arrayInsert=(t,e)=>new b("arrayInsert",[t,e]).toString();b.arrayRemove=t=>new b("arrayRemove",[t]).toString();b.arrayUnique=()=>new b("arrayUnique",[]).toString();b.arrayIntersect=t=>new b("arrayIntersect",t).toString();b.arrayDiff=t=>new b("arrayDiff",t).toString();b.arrayFilter=(t,e)=>{const i=[t,e===void 0?null:e];return new b("arrayFilter",i).toString()};b.stringConcat=t=>new b("stringConcat",[t]).toString();b.stringReplace=(t,e)=>new b("stringReplace",[t,e]).toString();b.toggle=()=>new b("toggle",[]).toString();b.dateAddDays=t=>new b("dateAddDays",[t]).toString();b.dateSubDays=t=>new b("dateSubDays",[t]).toString();b.dateSetNow=()=>new b("dateSetNow",[]).toString();var K;(function(t){t.Totp="totp"})(K||(K={}));var W;(function(t){t.Email="email",t.Phone="phone",t.Totp="totp",t.Recoverycode="recoverycode"})(W||(W={}));var $;(function(t){t.Amazon="amazon",t.Apple="apple",t.Auth0="auth0",t.Authentik="authentik",t.Autodesk="autodesk",t.Bitbucket="bitbucket",t.Bitly="bitly",t.Box="box",t.Dailymotion="dailymotion",t.Discord="discord",t.Disqus="disqus",t.Dropbox="dropbox",t.Etsy="etsy",t.Facebook="facebook",t.Figma="figma",t.Github="github",t.Gitlab="gitlab",t.Google="google",t.Linkedin="linkedin",t.Microsoft="microsoft",t.Notion="notion",t.Oidc="oidc",t.Okta="okta",t.Paypal="paypal",t.PaypalSandbox="paypalSandbox",t.Podio="podio",t.Salesforce="salesforce",t.Slack="slack",t.Spotify="spotify",t.Stripe="stripe",t.Tradeshift="tradeshift",t.TradeshiftBox="tradeshiftBox",t.Twitch="twitch",t.Wordpress="wordpress",t.Yahoo="yahoo",t.Yammer="yammer",t.Yandex="yandex",t.Zoho="zoho",t.Zoom="zoom"})($||($={}));var V;(function(t){t.AvantBrowser="aa",t.AndroidWebViewBeta="an",t.GoogleChrome="ch",t.GoogleChromeIOS="ci",t.GoogleChromeMobile="cm",t.Chromium="cr",t.MozillaFirefox="ff",t.Safari="sf",t.MobileSafari="mf",t.MicrosoftEdge="ps",t.MicrosoftEdgeIOS="oi",t.OperaMini="om",t.Opera="op",t.OperaNext="on"})(V||(V={}));var J;(function(t){t.AmericanExpress="amex",t.Argencard="argencard",t.Cabal="cabal",t.Cencosud="cencosud",t.DinersClub="diners",t.Discover="discover",t.Elo="elo",t.Hipercard="hipercard",t.JCB="jcb",t.Mastercard="mastercard",t.Naranja="naranja",t.TarjetaShopping="targeta-shopping",t.UnionPay="unionpay",t.Visa="visa",t.MIR="mir",t.Maestro="maestro",t.Rupay="rupay"})(J||(J={}));var Y;(function(t){t.Afghanistan="af",t.Angola="ao",t.Albania="al",t.Andorra="ad",t.UnitedArabEmirates="ae",t.Argentina="ar",t.Armenia="am",t.AntiguaAndBarbuda="ag",t.Australia="au",t.Austria="at",t.Azerbaijan="az",t.Burundi="bi",t.Belgium="be",t.Benin="bj",t.BurkinaFaso="bf",t.Bangladesh="bd",t.Bulgaria="bg",t.Bahrain="bh",t.Bahamas="bs",t.BosniaAndHerzegovina="ba",t.Belarus="by",t.Belize="bz",t.Bolivia="bo",t.Brazil="br",t.Barbados="bb",t.BruneiDarussalam="bn",t.Bhutan="bt",t.Botswana="bw",t.CentralAfricanRepublic="cf",t.Canada="ca",t.Switzerland="ch",t.Chile="cl",t.China="cn",t.CoteDIvoire="ci",t.Cameroon="cm",t.DemocraticRepublicOfTheCongo="cd",t.RepublicOfTheCongo="cg",t.Colombia="c
1o",t.Comoros="km",t.CapeVerde="cv",t.CostaRica="cr",t.Cuba="cu",t.Cyprus="cy",t.CzechRepublic="cz",t.Germany="de",t.Djibouti="dj",t.Dominica="dm",t.Denmark="dk",t.DominicanRepublic="do",t.Algeria="dz",t.Ecuador="ec",t.Egypt="eg",t.Eritrea="er",t.Spain="es",t.Estonia="ee",t.Ethiopia="et",t.Finland="fi",t.Fiji="fj",t.France="fr",t.MicronesiaFederatedStatesOf="fm",t.Gabon="ga",t.UnitedKingdom="gb",t.Georgia="ge",t.Ghana="gh",t.Guinea="gn",t.Gambia="gm",t.GuineaBissau="gw",t.EquatorialGuinea="gq",t.Greece="gr",t.Grenada="gd",t.Guatemala="gt",t.Guyana="gy",t.Honduras="hn",t.Croatia="hr",t.Haiti="ht",t.Hungary="hu",t.Indonesia="id",t.India="in",t.Ireland="ie",t.IranIslamicRepublicOf="ir",t.Iraq="iq",t.Iceland="is",t.Israel="il",t.Italy="it",t.Jamaica="jm",t.Jordan="jo",t.Japan="jp",t.Kazakhstan="kz",t.Kenya="ke",t.Kyrgyzstan="kg",t.Cambodia="kh",t.Kiribati="ki",t.SaintKittsAndNevis="kn",t.SouthKorea="kr",t.Kuwait="kw",t.LaoPeopleSDemocraticRepublic="la",t.Lebanon="lb",t.Liberia="lr",t.Libya="ly",t.SaintLucia="lc",t.Liechtenstein="li",t.SriLanka="lk",t.Lesotho="ls",t.Lithuania="lt",t.Luxembourg="lu",t.Latvia="lv",t.Morocco="ma",t.Monaco="mc",t.Moldova="md",t.Madagascar="mg",t.Maldives="mv",t.Mexico="mx",t.MarshallIslands="mh",t.NorthMacedonia="mk",t.Mali="ml",t.Malta="mt",t.Myanmar="mm",t.Montenegro="me",t.Mongolia="mn",t.Mozambique="mz",t.Mauritania="mr",t.Mauritius="mu",t.Malawi="mw",t.Malaysia="my",t.Namibia="na",t.Niger="ne",t.Nigeria="ng",t.Nicaragua="ni",t.Netherlands="nl",t.Norway="no",t.Nepal="np",t.Nauru="nr",t.NewZealand="nz",t.Oman="om",t.Pakistan="pk",t.Panama="pa",t.Peru="pe",t.Philippines="ph",t.Palau="pw",t.PapuaNewGuinea="pg",t.Poland="pl",t.FrenchPolynesia="pf",t.NorthKorea="kp",t.Portugal="pt",t.Paraguay="py",t.Qatar="qa",t.Romania="ro",t.Russia="ru",t.Rwanda="rw",t.SaudiArabia="sa",t.Sudan="sd",t.Senegal="sn",t.Singapore="sg",t.SolomonIslands="sb",t.SierraLeone="sl",t.ElSalvador="sv",t.SanMarino="sm",t.Somalia="so",t.Serbia="rs",t.SouthSudan="ss",t.SaoTomeAndPrincipe="st",t.Suriname="sr",t.Slovakia="sk",t.Slovenia="si",t.Sweden="se",t.Eswatini="sz",t.Seychelles="sc",t.Syria="sy",t.Chad="td",t.Togo="tg",t.Thailand="th",t.Tajikistan="tj",t.Turkmenistan="tm",t.TimorLeste="tl",t.Tonga="to",t.TrinidadAndTobago="tt",t.Tunisia="tn",t.Turkey="tr",t.Tuvalu="tv",t.Tanzania="tz",t.Uganda="ug",t.Ukraine="ua",t.Uruguay="uy",t.UnitedStates="us",t.Uzbekistan="uz",t.VaticanCity="va",t.SaintVincentAndTheGrenadines="vc",t.Venezuela="ve",t.Vietnam="vn",t.Vanuatu="vu",t.Samoa="ws",t.Yemen="ye",t.SouthAfrica="za",t.Zambia="zm",t.Zimbabwe="zw"})(Y||(Y={}));var X;(function(t){t.Light="light",t.Dark="dark"})(X||(X={}));var Z;(function(t){t.AfricaAbidjan="africa/abidjan",t.AfricaAccra="africa/accra",t.AfricaAddisAbaba="africa/addis_ababa",t.AfricaAlgiers="africa/algiers",t.AfricaAsmara="africa/asmara",t.AfricaBamako="africa/bamako",t.AfricaBangui="africa/bangui",t.AfricaBanjul="africa/banjul",t.AfricaBissau="africa/bissau",t.AfricaBlantyre="africa/blantyre",t.AfricaBrazzaville="africa/brazzaville",t.AfricaBujumbura="africa/bujumbura",t.AfricaCairo="africa/cairo",t.AfricaCasablanca="africa/casablanca",t.AfricaCeuta="africa/ceuta",t.AfricaConakry="africa/conakry",t.AfricaDakar="africa/dakar",t.AfricaDarEsSalaam="africa/dar_es_salaam",t.AfricaDjibouti="africa/djibouti",t.AfricaDouala="africa/douala",t.AfricaElAaiun="africa/el_aaiun",t.AfricaFreetown="africa/freetown",t.AfricaGaborone="africa/gaborone",t.AfricaHarare="africa/harare",t.AfricaJohannesburg="africa/johannesburg",t.AfricaJuba="africa/juba",t.AfricaKampala="africa/kampala",t.AfricaKhartoum="africa/khartoum",t.AfricaKigali="africa/kigali",t.AfricaKinshasa="africa/kinshasa",t.AfricaLagos="africa/lagos",t.AfricaLibreville="africa/libreville",t.AfricaLome="africa/lome",t.AfricaLuanda="africa/luanda",t.AfricaLubumbashi="africa/lubumbashi",t.AfricaLusaka="africa/lusaka",t.AfricaMalabo="africa/malabo",t.AfricaMaputo="africa/maputo",t.AfricaMaseru="africa/maseru",t.AfricaMbabane="africa/mbabane",t.AfricaMogadishu="africa/mogadishu",t.AfricaMonrovia="africa/monrovia",t.AfricaNairobi="africa/nairobi",t.AfricaNdjamena="africa/ndjamena",t.AfricaNiamey="africa/niamey",t.AfricaNouakchott="africa/nouakchott",t.AfricaOuagadougou="africa/ouagadougou",t.AfricaPortonovo="africa/porto-novo",t.AfricaSaoTome="africa/sao_tome",t.AfricaTripoli="africa/tripoli",t.AfricaTunis="africa/tunis",t.AfricaWindhoek="africa/windhoek",t.AmericaAdak="america/adak",t.AmericaAnchorage="america/anchorage",t.AmericaAnguilla="america/anguilla",t.AmericaAntigua="america/antigua",t.AmericaAraguaina="america/araguaina",t.AmericaArgentinaBuenosAires="america/argentina/buenos_aires",t.AmericaArgentinaCatamarca="america/argentina/catamarca",t.AmericaArgentinaCordoba="america/argentina/cordoba",t.AmericaArgentinaJujuy="america/argentina/jujuy",t.AmericaArgentinaLaRioja="america/argentina/la_rioja",t.AmericaArgentinaMendoza="america/argentina/mendoza",t.AmericaArgentinaRioGallegos="america/argentina/rio_gallegos",t.AmericaArgentinaSalta="america/argentina/salta",t.AmericaArgentinaSanJuan="america/argentina/san_juan",t.AmericaArgentinaSanLuis="america/argentina/san_luis",t.AmericaArgentinaTucuman="america/argentina/tucuman",t.AmericaArgentinaUshuaia="america/argentina/ushuaia",t.AmericaAruba="america/aruba",t.AmericaAsuncion="america/asuncion",t.AmericaAtikokan="america/atikokan",t.AmericaBahia="america/bahia",t.AmericaBahiaBanderas="america/bahia_banderas",t.AmericaBarbados="america/barbados",t.AmericaBelem="america/belem",t.AmericaBelize="america/belize",t.AmericaBlancsablon="america/blanc-sablon",t.AmericaBoaVista="america/boa_vista",t.AmericaBogota="america/bogota",t.AmericaBoise="america/boise",t.AmericaCambridgeBay="america/cambridge_bay",t.AmericaCampoGrande="amer
1ica/campo_grande",t.AmericaCancun="america/cancun",t.AmericaCaracas="america/caracas",t.AmericaCayenne="america/cayenne",t.AmericaCayman="america/cayman",t.AmericaChicago="america/chicago",t.AmericaChihuahua="america/chihuahua",t.AmericaCiudadJuarez="america/ciudad_juarez",t.AmericaCostaRica="america/costa_rica",t.AmericaCoyhaique="america/coyhaique",t.AmericaCreston="america/creston",t.AmericaCuiaba="america/cuiaba",t.AmericaCuracao="america/curacao",t.AmericaDanmarkshavn="america/danmarkshavn",t.AmericaDawson="america/dawson",t.AmericaDawsonCreek="america/dawson_creek",t.AmericaDenver="america/denver",t.AmericaDetroit="america/detroit",t.AmericaDominica="america/dominica",t.AmericaEdmonton="america/edmonton",t.AmericaEirunepe="america/eirunepe",t.AmericaElSalvador="america/el_salvador",t.AmericaFortNelson="america/fort_nelson",t.AmericaFortaleza="america/fortaleza",t.AmericaGlaceBay="america/glace_bay",t.AmericaGooseBay="america/goose_bay",t.AmericaGrandTurk="america/grand_turk",t.AmericaGrenada="america/grenada",t.AmericaGuadeloupe="america/guadeloupe",t.AmericaGuatemala="america/guatemala",t.AmericaGuayaquil="america/guayaquil",t.AmericaGuyana="america/guyana",t.AmericaHalifax="america/halifax",t.AmericaHavana="america/havana",t.AmericaHermosillo="america/hermosillo",t.AmericaIndianaIndianapolis="america/indiana/indianapolis",t.AmericaIndianaKnox="america/indiana/knox",t.AmericaIndianaMarengo="america/indiana/marengo",t.AmericaIndianaPetersburg="america/indiana/petersburg",t.AmericaIndianaTellCity="america/indiana/tell_city",t.AmericaIndianaVevay="america/indiana/vevay",t.AmericaIndianaVincennes="america/indiana/vincennes",t.AmericaIndianaWinamac="america/indiana/winamac",t.AmericaInuvik="america/inuvik",t.AmericaIqaluit="america/iqaluit",t.AmericaJamaica="america/jamaica",t.AmericaJuneau="america/juneau",t.AmericaKentuckyLouisville="america/kentucky/louisville",t.AmericaKentuckyMonticello="america/kentucky/monticello",t.AmericaKralendijk="america/kralendijk",t.AmericaLaPaz="america/la_paz",t.AmericaLima="america/lima",t.AmericaLosAngeles="america/los_angeles",t.AmericaLowerPrinces="america/lower_princes",t.AmericaMaceio="america/maceio",t.AmericaManagua="america/managua",t.AmericaManaus="america/manaus",t.AmericaMarigot="america/marigot",t.AmericaMartinique="america/martinique",t.AmericaMatamoros="america/matamoros",t.AmericaMazatlan="america/mazatlan",t.AmericaMenominee="america/menominee",t.AmericaMerida="america/merida",t.AmericaMetlakatla="america/metlakatla",t.AmericaMexicoCity="america/mexico_city",t.AmericaMiquelon="america/miquelon",t.AmericaMoncton="america/moncton",t.AmericaMonterrey="america/monterrey",t.AmericaMontevideo="america/montevideo",t.AmericaMontserrat="america/montserrat",t.AmericaNassau="america/nassau",t.AmericaNewYork="america/new_york",t.AmericaNome="america/nome",t.AmericaNoronha="america/noronha",t.AmericaNorthDakotaBeulah="america/north_dakota/beulah",t.AmericaNorthDakotaCenter="america/north_dakota/center",t.AmericaNorthDakotaNewSalem="america/north_dakota/new_salem",t.AmericaNuuk="america/nuuk",t.AmericaOjinaga="america/ojinaga",t.AmericaPanama="america/panama",t.AmericaParamaribo="america/paramaribo",t.AmericaPhoenix="america/phoenix",t.AmericaPortauprince="america/port-au-prince",t.AmericaPortOfSpain="america/port_of_spain",t.AmericaPortoVelho="america/porto_velho",t.AmericaPuertoRico="america/puerto_rico",t.AmericaPuntaArenas="america/punta_arenas",t.AmericaRankinInlet="america/rankin_inlet",t.AmericaRecife="america/recife",t.AmericaRegina="america/regina",t.AmericaResolute="america/resolute",t.AmericaRioBranco="america/rio_branco",t.AmericaSantarem="america/santarem",t.AmericaSantiago="america/santiago",t.AmericaSantoDomingo="america/santo_domingo",t.AmericaSaoPaulo="america/sao_paulo",t.AmericaScoresbysund="america/scoresbysund",t.AmericaSitka="america/sitka",t.AmericaStBarthelemy="america/st_barthelemy",t.AmericaStJohns="america/st_johns",t.AmericaStKitts="america/st_kitts",t.AmericaStLucia="america/st_lucia",t.AmericaStThomas="america/st_thomas",t.AmericaStVincent="america/st_vincent",t.AmericaSwiftCurrent="america/swift_current",t.AmericaTegucigalpa="america/tegucigalpa",t.AmericaThule="america/thule",t.AmericaTijuana="america/tijuana",t.AmericaToronto="america/toronto",t.AmericaTortola="america/tortola",t.AmericaVancouver="america/vancouver",t.AmericaWhitehorse="amer
1ica/whitehorse",t.AmericaWinnipeg="america/winnipeg",t.AmericaYakutat="america/yakutat",t.AntarcticaCasey="antarctica/casey",t.AntarcticaDavis="antarctica/davis",t.AntarcticaDumontdurville="antarctica/dumontdurville",t.AntarcticaMacquarie="antarctica/macquarie",t.AntarcticaMawson="antarctica/mawson",t.AntarcticaMcmurdo="antarctica/mcmurdo",t.AntarcticaPalmer="antarctica/palmer",t.AntarcticaRothera="antarctica/rothera",t.AntarcticaSyowa="antarctica/syowa",t.AntarcticaTroll="antarctica/troll",t.AntarcticaVostok="antarctica/vostok",t.ArcticLongyearbyen="arctic/longyearbyen",t.AsiaAden="asia/aden",t.AsiaAlmaty="asia/almaty",t.AsiaAmman="asia/amman",t.AsiaAnadyr="asia/anadyr",t.AsiaAqtau="asia/aqtau",t.AsiaAqtobe="asia/aqtobe",t.AsiaAshgabat="asia/ashgabat",t.AsiaAtyrau="asia/atyrau",t.AsiaBaghdad="asia/baghdad",t.AsiaBahrain="asia/bahrain",t.AsiaBaku="asia/baku",t.AsiaBangkok="asia/bangkok",t.AsiaBarnaul="asia/barnaul",t.AsiaBeirut="asia/beirut",t.AsiaBishkek="asia/bishkek",t.AsiaBrunei="asia/brunei",t.AsiaChita="asia/chita",t.AsiaColombo="asia/colombo",t.AsiaDamascus="asia/damascus",t.AsiaDhaka="asia/dhaka",t.AsiaDili="asia/dili",t.AsiaDubai="asia/dubai",t.AsiaDushanbe="asia/dushanbe",t.AsiaFamagusta="asia/famagusta",t.AsiaGaza="asia/gaza",t.AsiaHebron="asia/hebron",t.AsiaHoChiMinh="asia/ho_chi_minh",t.AsiaHongKong="asia/hong_kong",t.AsiaHovd="asia/hovd",t.AsiaIrkutsk="asia/irkutsk",t.AsiaJakarta="asia/jakarta",t.AsiaJayapura="asia/jayapura",t.AsiaJerusalem="asia/jerusalem",t.AsiaKabul="asia/kabul",t.AsiaKamchatka="asia/kamchatka",t.AsiaKarachi="asia/karachi",t.AsiaKathmandu="asia/kathmandu",t.AsiaKhandyga="asia/khandyga",t.AsiaKolkata="asia/kolkata",t.AsiaKrasnoyarsk="asia/krasnoyarsk",t.AsiaKualaLumpur="asia/kuala_lumpur",t.AsiaKuching="asia/kuching",t.AsiaKuwait="asia/kuwait",t.AsiaMacau="asia/macau",t.AsiaMagadan="asia/magadan",t.AsiaMakassar="asia/makassar",t.AsiaManila="asia/manila",t.AsiaMuscat="asia/muscat",t.AsiaNicosia="asia/nicosia",t.AsiaNovokuznetsk="asia/novokuznetsk",t.AsiaNovosibirsk="asia/novosibirsk",t.AsiaOmsk="asia/omsk",t.AsiaOral="asia/oral",t.AsiaPhnomPenh="asia/phnom_penh",t.AsiaPontianak="asia/pontianak",t.AsiaPyongyang="asia/pyongyang",t.AsiaQatar="asia/qatar",t.AsiaQostanay="asia/qostanay",t.AsiaQyzylorda="asia/qyzylorda",t.AsiaRiyadh="asia/riyadh",t.AsiaSakhalin="asia/sakhalin",t.AsiaSamarkand="asia/samarkand",t.AsiaSeoul="asia/seoul",t.AsiaShanghai="asia/shanghai",t.AsiaSingapore="asia/singapore",t.AsiaSrednekolymsk="asia/srednekolymsk",t.AsiaTaipei="asia/taipei",t.AsiaTashkent="asia/tashkent",t.AsiaTbilisi="asia/tbilisi",t.AsiaTehran="asia/tehran",t.AsiaThimphu="asia/thimphu",t.AsiaTokyo="asia/tokyo",t.AsiaTomsk="asia/tomsk",t.AsiaUlaanbaatar="asia/ulaanbaatar",t.AsiaUrumqi="asia/urumqi",t.AsiaUstnera="asia/ust-nera",t.AsiaVientiane="asia/vientiane",t.AsiaVladivostok="asia/vladivostok",t.AsiaYakutsk="asia/yakutsk",t.AsiaYangon="asia/yangon",t.AsiaYekaterinburg="asia/yekaterinburg",t.AsiaYerevan="asia/yerevan",t.AtlanticAzores="atlantic/azores",t.AtlanticBermuda="atlantic/bermuda",t.AtlanticCanary="atlantic/canary",t.AtlanticCapeVerde="atlantic/cape_verde",t.AtlanticFaroe="atlantic/faroe",t.AtlanticMadeira="atlantic/madeira",t.AtlanticReykjavik="atlantic/reykjavik",t.AtlanticSouthGeorgia="atlantic/south_georgia",t.AtlanticStHelena="atlantic/st_helena",t.AtlanticStanley="atlantic/stanley",t.AustraliaAdelaide="australia/adelaide",t.AustraliaBrisbane="australia/brisbane",t.AustraliaBrokenHill="australia/broken_hill",t.AustraliaDarwin="australia/darwin",t.AustraliaEucla="australia/eucla",t.AustraliaHobart="australia/hobart",t.AustraliaLindeman="australia/lindeman",t.AustraliaLordHowe="australia/lord_howe",t.AustraliaMelbourne="australia/melbourne",t.AustraliaPerth="australia/perth",t.AustraliaSydney="australia/sydney",t.EuropeAmsterdam="europe/amsterdam",t.EuropeAndorra="europe/andorra",t.EuropeAstrakhan="europe/astrakhan",t.EuropeAthens="europe/athens",t.EuropeBelgrade="europe/belgrade",t.EuropeBerlin="europe/berlin",t.EuropeBratislava="europe/bratislava",t.EuropeBrussels="europe/brussels",t.EuropeBucharest="europe/bucharest",t.EuropeBudapest="europe/budapest",t.EuropeBusingen="europe/busingen",t.EuropeChisinau="europe/chisinau",t.EuropeCopenhagen="europe/copenhagen",t.EuropeDublin="europe/dublin",t.EuropeGibraltar="europe/gibraltar",t.EuropeGuernsey="europe/guernsey",t.EuropeHelsinki="europe/helsinki",t.EuropeIsleOfMan="europe/isle_of_man",t.EuropeIstanbul="europe/istanbul",t.EuropeJersey="europe/jersey",t.EuropeKaliningrad="europe/kaliningrad",t.EuropeKirov="europe/kirov",t.EuropeKyiv="europe/kyiv",t.EuropeLisbon="europe/lisbon",t.EuropeLjubljana="europe/ljubljana",t.EuropeLondon="europe/london",t.EuropeLuxembourg="europe/luxembourg",t.EuropeMadrid="europe/madrid",t.EuropeMalta="europe/malta",t.EuropeMariehamn="europe/mariehamn",t.EuropeMinsk="europe/minsk",t.EuropeMonaco="europe/monaco",t.EuropeMoscow="europe/moscow",t.EuropeOslo="europe/oslo",t.EuropeParis="europe/paris",t.EuropePodgorica="europe/podgorica",t.EuropePrague="europe/prague",t.EuropeRiga="europe/riga",t.EuropeRome="europe/rome",t.EuropeSamara="europe/samara",t.EuropeSanMarino="europe/san_marino",t.EuropeSarajevo="europe/sarajevo",t.EuropeSaratov="europe/saratov",t.EuropeSimferopol="europe/simferopol",t.EuropeSkopje="europe/skopje",t.EuropeSofia="europe/sofia",t.EuropeStockholm="europe/stockholm",t.EuropeTallinn="europe/tallinn",t.EuropeTirane="europe/tirane",t.EuropeUlyanovsk="europe/ulyanovsk",t.EuropeVaduz="europe/vaduz",t.EuropeVatican="europe/vatican",t.EuropeVienna="europe/vienna",t.EuropeVilnius="europe/vilnius",t.EuropeVolgograd="europe/volgograd",t.EuropeWarsaw="europe/warsaw",t.EuropeZagreb="europe/zagreb",t.EuropeZurich="europe/zurich",t.IndianAntananarivo="indian/antananarivo",t.IndianChagos="indian/chagos",t.IndianChristmas="indian/christmas",t.IndianCocos="indian/cocos",t.IndianComoro="indian/comoro",t.IndianKerguelen="indian/kerguelen",t.IndianMahe="indian/mahe",t.IndianMaldives="indian/maldives",t.IndianMauritius="indian/mauritius",t.IndianMayotte="indian/mayotte",t.IndianReunion="indian/reunion",t.PacificApia="pacific/apia",t.PacificAuckland="pacific/auckland",t.PacificBougainville="pacific/bougainville",t.PacificChatham="pacific/chatham",t.PacificChuuk="pacific/chuuk",t.PacificEaster="pacific/easter",t.PacificEfate="pacific/efate",t.PacificFakaofo="pacific/fakaofo",t.PacificFiji="pacific/fiji",t.PacificFunafuti="pacific/funafuti",t.PacificGalapagos="pacific/galapagos",t.PacificGambier="pacific/gambier",t.PacificGuadalcanal="pacific/guadalcanal",t.PacificGuam="pacific/guam",t.PacificHonolulu="pacific/honolulu",t.PacificKanton="pacific/kanton",t.PacificKiritimati="pacific/kiritimati",t.PacificKosrae="pacific/kosrae",t.PacificKwajalein="pacific/kwajalein",t.PacificMajuro="pacific/majuro",t.PacificMarquesas="pacific/marquesas",t.PacificMidway="pacific/midway",t.PacificNauru="pacific/nauru",t.PacificNiue="pacific/niue",t.PacificNorfolk="pacific/norfolk",t.PacificNoumea="pacific/noumea",t.PacificPagoPago="pacific/pago_pago",t.PacificPalau="pacific/palau",t.PacificPitcairn="pacific/pitcairn",t.PacificPohnpei="pacific/pohnpei",t.PacificPortMoresby="pacific/port_moresby",t.PacificRarotonga="pacific/rarotonga",t.PacificSaipan="pacific/saipan",t.PacificTahiti="pacific/tahiti",t.PacificTarawa="pacific/tarawa",t.PacificTongatapu="pacific/tongatapu",t.PacificWake="pacific/wake",t.PacificWallis="pacific/wallis",t.Utc="utc"})(Z||(Z={}));var Q;(function(t){t.Geolocation="geolocation",t.Camera="camera",t.Microphone="microphone",t.Notifications="notifications",t.Midi="midi",t.Push="push",t.Clipboardread="clipboard-read",t.Clipboardwrite="clipboard-write",t.Paymenthandler="payment-handler",t.Usb="usb",t.Bluetooth="bluetooth",t.Accelerometer="accelerometer",t.Gyroscope="gyroscope",t.Magnetometer="magnetometer",t.Ambientlightsensor="ambient-light-sensor",t.Backgroun
1dsync="background-sync",t.Persistentstorage="persistent-storage",t.Screenwakelock="screen-wake-lock",t.Webshare="web-share",t.Xrspatialtracking="xr-spatial-tracking"})(Q||(Q={}));var T;(function(t){t.Jpg="jpg",t.Jpeg="jpeg",t.Png="png",t.Webp="webp",t.Heic="heic",t.Avif="avif",t.Gif="gif"})(T||(T={}));var z;(function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH",t.DELETE="DELETE",t.OPTIONS="OPTIONS",t.HEAD="HEAD"})(z||(z={}));var O;(function(t){t.Center="center",t.Topleft="top-left",t.Top="top",t.Topright="top-right",t.Left="left",t.Right="right",t.Bottomleft="bottom-left",t.Bottom="bottom",t.Bottomright="bottom-right"})(O||(O={}));var F;(function(t){t.Http="http",t.Schedule="schedule",t.Event="event"})(F||(F={}));var ee;(function(t){t.Waiting="waiting",t.Processing="processing",t.Completed="completed",t.Failed="failed",t.Scheduled="scheduled"})(ee||(ee={}));export{we as Account,l as AppwriteException,W as AuthenticationFactor,K as AuthenticatorType,Ie as Avatars,V as Browser,Q as BrowserPermission,m as Channel,q as Client,G as Condition,J as CreditCard,ge as Databases,z as ExecutionMethod,ee as ExecutionStatus,F as ExecutionTrigger,Y as Flag,Ae as Functions,me as Graphql,_ as ID,T as ImageFormat,O as ImageGravity,ke as Locale,qe as Messaging,$ as OAuthProvider,b as Operator,E as Permission,p as Query,ve as Realtime,Re as Role,je as Storage,Me as TablesDB,Se as Teams,X as Theme,Z as Timezone};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.