/*! For license information please see memberstack.js.LICENSE.txt */ (()=>{var __webpack_modules__={800:(e,t,n)=>{"use strict";n.d(t,{default:()=>S});class r{constructor(e){this.options=e}log(...e){this.options.consoleLogs&&console.log(...e)}warn(...e){this.options.consoleLogs&&console.warn(...e)}error(...e){this.options.consoleLogs&&console.error(...e)}}const o=JSON.parse('{"HV":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"string","name":"transaction_hash","type":"string"}],"name":"Confirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"string","name":"payload","type":"string"}],"name":"Sent","type":"event"},{"inputs":[{"internalType":"string","name":"payload","type":"string"}],"name":"send","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"transaction_hash","type":"string"}],"name":"confirm","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]}');class i{constructor(e){this.options=e,this.apiKey=this.options.apiKey,this.channel=this.options.channelId,this.blockchainTestMode=this.options.blockchainTestMode,this.blockchainGasFee=this.options.blockchainGasFee,this.blockchainTestMode?this.contractAddress="0x2321c321828946153a845e69ee168f413e85c90d":this.contractAddress="0x2a840CA40E082DbF24610B62a978900BfCaB23D3"}async init(){const e=new Web3(window.ethereum),t=await ethereum.request({method:"eth_requestAccounts"});this.account=t[0],this.contract=new e.eth.Contract(o.HV,this.contractAddress)}checkWeb3(){return"undefined"==typeof Web3?(console.log("Web3.js is not installed!"),!1):void 0!==window.ethereum||(console.log("MetaMask is not installed!"),!1)}async confirm(e){return new Promise((async(t,n)=>{if(this.checkWeb3()){this.contract||await this.init();const r=this.contract.methods.confirm(e).send({from:this.account,gas:this.blockchainGasFee});r.on("transactionHash",t),r.on("error",(e=>{n(e)}))}}))}async send(e){return new Promise((async(t,n)=>{if(this.checkWeb3()){this.contract||await this.init();const r=await this.getTransactionHash(e),o=this.contract.methods.send(r.payload).send({from:this.account,gas:this.blockchainGasFee});o.on("transactionHash",(e=>{t({hash:e,id:r.transaction_id})})),o.on("error",(e=>{n(e)}))}else"undefined"==typeof Web3?n("Please install Web3.js"):n("Please install MetaMask")}))}async getTransactionHash(e){return new Promise(((t,n)=>{const r=new FormData;r.append("apiKey",this.apiKey),r.append("channel",this.channel),r.append("message",JSON.stringify(e)),r.append("contract",this.contractAddress);const o=new XMLHttpRequest;o.addEventListener("readystatechange",(function(){if(4===this.readyState)try{const e=JSON.parse(this.responseText);e.errors&&(console.error(`PieSocket Error: ${JSON.stringify(e.errors)}`),n()),e.success?t(e.success):n("Unknown error")}catch(e){console.error("Could not connect to Blockchain Messaging API, try later"),n()}})),o.addEventListener("error",(()=>{console.error("Blockchain Messaging API seems unreachable at the moment, try later"),n()})),o.open("POST","https://www.piesocket.com/api/blockchain/payloadHash"),o.setRequestHeader("Accept","application/json"),o.send(r)}))}}const s=WebSocket;class a{constructor(e,t,n=!0){this.events={},this.listeners={},this.members=[],this.portal=null,this.uuid=null,this.onSocketConnected=()=>{},this.onSocketError=()=>{},n&&this.init(e,t)}init(e,t){this.endpoint=e,this.identity=t,this.connection=this.connect(),this.shouldReconnect=!1,this.logger=new r(t)}getMemberByUUID(e){let t=null;for(let n=0;n{null!=t.candidate&&this.channel.publish("system:portal_candidate",{from:this.channel.uuid,to:e.from,ice:t.candidate})},n.ontrack=t=>{"video"==t.track.kind&&(this.participants[e.from].streams=t.streams,"function"==typeof this.identity.onParticipantJoined&&this.identity.onParticipantJoined(e.from,t.streams[0]))},n.onsignalingstatechange=t=>{this.isNegotiating[e.from]="stable"!=n.signalingState},this.localStream&&this.localStream.getTracks().forEach((e=>{n.addTrack(e,this.localStream)})),this.isNegotiating[e.from]=!1,n.onnegotiationneeded=async()=>{await this.sendVideoOffer(e,n,t)},this.participants[e.from]={rtc:n}}async sendVideoOffer(e,t,n){if(!n)return;if(this.isNegotiating[e.from])return void console.log("SKIP nested negotiations");this.isNegotiating[e.from]=!0;const r=await t.createOffer();await t.setLocalDescription(r),console.log("Making offer"),this.channel.publish("system:video_offer",{from:this.channel.uuid,to:e.from,sdp:t.localDescription})}removeParticipant(e){delete this.participants[e],"function"==typeof this.identity.onParticipantLeft&&this.identity.onParticipantLeft(e)}addIceCandidate(e){this.participants[e.from].rtc.addIceCandidate(new c(e.ice))}createAnswer(e){return new Promise((async(t,n)=>{if(this.participants[e.from]&&this.participants[e.from].rtc||(console.log("Starting call in createAnswer"),this.shareVideo(e,!1)),await this.participants[e.from].rtc.setRemoteDescription(new d(e.sdp)),"offer"==e.sdp.type){this.logger.log("Got an offer from "+e.from,e);const n=await this.participants[e.from].rtc.createAnswer();await this.participants[e.from].rtc.setLocalDescription(n),this.channel.publish("system:video_answer",{from:this.channel.uuid,to:e.from,sdp:this.participants[e.from].rtc.localDescription}),t()}else this.logger.log("Got an asnwer from "+e.from),t()}))}handleAnswer(e){this.participants[e.from].rtc.setRemoteDescription(new d(e.sdp))}getUserMediaSuccess(e){this.localStream=e,"function"==typeof this.identity.onLocalVideo&&this.identity.onLocalVideo(e,this),this.requestPeerVideo()}requestPeerVideo(){var e="system:portal_broadcaster";this.identity.shouldBroadcast||(e="system:portal_watcher"),this.channel.publish(e,{from:this.channel.uuid,isBroadcasting:this.identity.shouldBroadcast})}requestOfferFromPeer(){this.channel.publish("system:video_request",{from:this.channel.uuid,isBroadcasting:this.identity.shouldBroadcast})}errorHandler(e){this.logger.error("Portal error",e)}}class m{constructor(e=null,t="InvalidAuthException"){this.message=e||"Auth endpoint did not return a valid JWT Token, please see: https://www.piesocket.com/docs/3.0/authentication",this.name=t}}const p={version:3,clusterId:"demo",clusterDomain:null,apiKey:"oCdCMcMPQpbvNjUIzqtvF1d2X2okWpDQj4AwARJuAgtjhzKxVEjQU6IdCjwm",consoleLogs:!1,notifySelf:0,jwt:null,presence:0,authEndpoint:"/broadcasting/auth",authHeaders:{},forceAuth:!1,userId:null,blockchainTestMode:!1,blockchainGasFee:41e3};var f,g=new Uint8Array(16);function y(){if(!f&&!(f="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f(g)}const b=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var v=[],w=0;w<256;++w)v.push((w+256).toString(16).substr(1));const _=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(v[e[t+0]]+v[e[t+1]]+v[e[t+2]]+v[e[t+3]]+"-"+v[e[t+4]]+v[e[t+5]]+"-"+v[e[t+6]]+v[e[t+7]]+"-"+v[e[t+8]]+v[e[t+9]]+"-"+v[e[t+10]]+v[e[t+11]]+v[e[t+12]]+v[e[t+13]]+v[e[t+14]]+v[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&b.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},E=function(e,t,n){var r=(e=e||{}).random||(e.rng||y)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return _(r)};class S{constructor(e){e=e||{},this.options={...p,...e},this.connections={},this.logger=new r(this.options)}async subscribe(e,t={}){return new Promise((async(n,r)=>{(t.video||t.audio||t.portal)&&(this.options.notifySelf=!0);const o=E(),i=await this.getEndpoint(e,o);if(this.connections[e])this.logger.log("Returning existing channel",e),n(this.connections[e]);else{this.logger.log("Creating new channel",e);const s=new a(i,{channelId:e,onSocketConnected:()=>{s.uuid=o,(t.video||t.audio||t.portal)&&(s.portal=new h(s,{...this.options,...t})),this.connections[e]=s,n(s)},onSocketError:()=>{r("Failed to make websocket connection")},...this.options});"undefined"==typeof WebSocket&&(s.uuid=o,this.connections[e]=s,n(s))}}))}unsubscribe(e){return!!this.connections[e]&&(this.connections[e].shouldReconnect=!1,this.connections[e].connection.close(),delete this.connections[e],!0)}getConnections(){return this.connections}async getAuthToken(e){return new Promise(((t,n)=>{const r=new FormData;r.append("channel_name",e);const o=new XMLHttpRequest;o.withCredentials=!0,o.addEventListener("readystatechange",(function(){if(4===this.readyState)try{const e=JSON.parse(this.responseText);t(e)}catch(e){n(new m("Could not fetch auth token","AuthEndpointResponseError"))}})),o.addEventListener("error",(()=>{n(new m("Could not fetch auth token","AuthEndpointError"))})),o.open("POST",this.options.authEndpoint),Object.keys(this.options.authHeaders).forEach((e=>{o.setRequestHeader(e,this.options.authHeaders[e])})),o.send(r)}))}isGuarded(e){return!!this.options.forceAuth||(""+e).startsWith("private-")}async getEndpoint(e,t){let n=`wss://${null==this.options.clusterDomain?`${this.options.clusterId}.piesocket.com`:this.options.clusterDomain}/v${this.options.version}/${e}?api_key=${this.options.apiKey}¬ify_self=${this.options.notifySelf}&source=jssdk&v=4.2.3&presence=${this.options.presence}`;if(this.options.jwt)n=n+"&jwt="+this.options.jwt;else if(this.isGuarded(e)){const t=await this.getAuthToken(e);t.auth&&(n=n+"&jwt="+t.auth)}return this.options.userId&&(n=n+"&user="+this.options.userId),n=n+"&uuid="+t,n}}},250:(e,t,n)=>{e.exports=n(800).default},467:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cancel:()=>b,format:()=>h,register:()=>s,render:()=>v});var r=["second","minute","hour","day","week","month","year"],o=["秒","分钟","小时","天","周","个月","年"],i={},s=function(e,t){i[e]=t},a=function(e){return i[e]||i.en_US},c=[60,60,24,7,365/7/12,12];function l(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function d(e,t){for(var n=e<0?1:0,r=e=Math.abs(e),o=0;e>=c[o]&&o(0==(o*=2)?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function u(e,t){return(+(t?l(t):new Date)-+l(e))/1e3}var h=function(e,t,n){return d(u(e,n&&n.relativeDate),a(t))},m="timeago-id";function p(e){return parseInt(e.getAttribute(m))}var f={},g=function(e){clearTimeout(e),delete f[e]};function y(e,t,n,r){g(p(e));var o=r.relativeDate,i=r.minInterval,s=u(t,o);e.innerText=d(s,n);var a=setTimeout((function(){y(e,t,n,r)}),Math.min(1e3*Math.max(function(e){for(var t=1,n=0,r=Math.abs(e);e>=c[n]&&n1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]})),s("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var n=o[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}))},593:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]4e6)return[2,c.default.methods._showMessage("Image must be less than 2MB.",!0)];i.label=1;case 1:return i.trys.push([1,3,,4]),(0,d.showLoader)(),[4,(0,c.default.methods.updateMemberProfileImage)({profileImage:t})];case 2:return r=i.sent(),o=r.data,s=r._internalUseOnly.message,l.default.mergeMember({profileImage:o.profileImage}),a=l.default.getCachedMember(),(0,d.personalizeText)(a),s&&c.default.methods._showMessage(s,!1),[3,4];case 3:return u=i.sent(),console.log(u),u.message&&c.default.methods._showMessage(u.message,!0),[3,4];case 4:return(0,d.hideLoader)(),[2]}}))}))}))}))},t.resendVerificationEmail=function(){var e=Array.from(document.querySelectorAll(a.buttons.sendVerificationEmail));l.default.getCachedMember()&&e.map((function(e){e.addEventListener("click",(function(e){return o(void 0,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:e.preventDefault(),e.stopPropagation(),(0,d.showLoader)(),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,(0,c.default.methods.sendMemberVerificationEmail)()];case 2:return t=r.sent()._internalUseOnly.message,c.default.methods._showMessage(t,!1),[3,5];case 3:return n=r.sent(),console.log(n),[3,5];case 4:return(0,d.hideLoader)(),[7];case 5:return[2]}}))}))}))}))},t.initReturnToCheckoutButtons=function(){Array.from(document.querySelectorAll(a.buttons.returnToCheckout)).map((function(e){e.addEventListener("click",(function(e){return o(void 0,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:e.preventDefault(),e.stopPropagation(),t=c.default.selectedPrice,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,d.launchCheckout)({priceId:t})];case 2:return r.sent(),[3,4];case 3:return n=r.sent(),c.default.methods._hideLoader(),c.default.methods._showMessage(n,!0),[3,4];case 4:return[2]}}))}))}))}))},t.initLoginRedirectButtons=function(){return o(void 0,void 0,void 0,(function(){function e(){var e=this,t=Array.from(document.querySelectorAll(a.buttons.loginRedirect));l.default.getCachedMember()&&t.map((function(t){t.addEventListener("click",(function(t){return o(e,void 0,void 0,(function(){var e;return i(this,(function(n){return t.preventDefault(),t.stopPropagation(),e=l.default.getCachedMember().loginRedirect,window.location.href=e,[2]}))}))}))}))}return i(this,(function(t){switch(t.label){case 0:return l.default.getCachedMember()&&e(),[4,l.default.initialRefetch()];case 1:return t.sent(),e(),[2]}}))}))},t.initOpenCustomerPortalButtons=function(){Array.from(document.querySelectorAll(a.buttons.customerPortal)).map((function(e){e.addEventListener("click",(function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return e.preventDefault(),e.stopPropagation(),(0,d.showLoader)(),t=window._memberstackPortalConfig,[4,c.default.methods.launchStripeCustomerPortal({configuration:t||void 0})];case 1:return n.sent(),[2]}}))}))}))}))},t.initLoginModalButtons=function(){var e=Array.from(document.querySelectorAll(a.buttons.login)),t=!1;e.map((function(e){e.addEventListener("click",(function(n){return o(void 0,void 0,void 0,(function(){var r,o,s,a,u,h;return i(this,(function(i){switch(i.label){case 0:if(n.preventDefault(),n.stopPropagation(),t)return[2];t=!0,r=Boolean(e.hasAttribute("data-ms-social-auth-allow-signup")),i.label=1;case 1:return i.trys.push([1,10,11,12]),[4,c.default.getApp()];case 2:return o=i.sent(),[4,c.default.methods.openModal("LOGIN",{app:o,login:{allowSignup:r}})];case 3:if("LOGIN"!==(s=i.sent()).type&&"SIGNUP"!==s.type)return[3,9];if(l.default.setMember(s.data.member),c.default.mergeApp({contentGroups:s.data.contentGroups}),a=c.default.selectedPrice,"SIGNUP"!==s.type||!a)return[3,8];i.label=4;case 4:return i.trys.push([4,6,,7]),[4,(0,d.launchCheckout)({priceId:a})];case 5:return i.sent(),[3,7];case 6:return u=i.sent(),c.default.methods._hideLoader(),c.default.methods._showMessage(u,!0),[3,7];case 7:return[2];case 8:(0,d.handleRedirect)(s.data.redirect||s.data.member.loginRedirect,null),c.default.methods.hideModal(),i.label=9;case 9:return[3,12];case 10:return h=i.sent(),console.log(h),[3,12];case 11:return t=!1,[7];case 12:return[2]}}))}))}))}))},t.initSignupModalButtons=function(){var e=Array.from(document.querySelectorAll(a.buttons.signup)),t=!1;e.map((function(e){e.addEventListener("click",(function(){return o(void 0,void 0,void 0,(function(){var n,o,s,a,u,h;return i(this,(function(i){switch(i.label){case 0:if(t)return[2];t=!0,i.label=1;case 1:return i.trys.push([1,13,14,15]),l.default.getCachedMember()&&c.default.selectedPrice?[4,(0,d.launchCheckout)({priceId:c.default.selectedPrice})]:[3,3];case 2:return[2,i.sent()];case 3:return n=c.default.selectedPlan||e.getAttribute("data-ms-plan:add"),[4,c.default.getApp()];case 4:return o=i.sent(),[4,c.default.methods.openModal("SIGNUP",r({app:o},n&&{signup:{plans:[n]}}))];case 5:return"LOGIN"!==(s=i.sent()).type&&"SIGNUP"!==s.type||(l.default.setMember(s.data.member),c.default.mergeApp({contentGroups:s.data.contentGroups})),"LOGIN"!==s.type?[3,6]:((0,d.handleRedirect)(s.data.redirect,null),[3,12]);case 6:if("SIGNUP"!==s.type)return[3,12];if(!(a=c.default.selectedPrice))return[3,11];i.label=7;case 7:return i.trys.push([7,9,,10]),[4,(0,d.launchCheckout)({priceId:a})];case 8:return i.sent(),[3,10];case 9:return u=i.sent(),c.default.methods._hideLoader(),c.default.methods._showMessage(u,!0),[3,10];case 10:return[3,12];case 11:(0,d.handleRedirect)(s.data.redirect,null),i.label=12;case 12:return c.default.methods.hideModal(),[3,15];case 13:return h=i.sent(),console.log(h),[3,15];case 14:return t=!1,[7];case 15:return[2]}}))}))}))}))},t.initProfileModalButtons=function(){var e=Array.from(document.querySelectorAll(a.buttons.profile)),t=!1;e.map((function(e){e.addEventListener("click",(function(n){return o(void 0,void 0,void 0,(function(){var o,s,a,d;return i(this,(function(i){switch(i.label){case 0:if(n.preventDefault(),n.stopPropagation(),t)return[2];t=!0,o=e.getAttribute("data-ms-modal-tab"),i.label=1;case 1:return i.trys.push([1,4,5,6]),[4,c.default.getApp()];case 2:return s=i.sent(),[4,c.default.methods.openModal("PROFILE",r({app:s},o&&{profile:{tab:o}}))];case 3:if("LOGOUT"===(a=i.sent()).type){if(l.default.purgeCache(),a.data.redirect&&window.location.pathname!==a.data.redirect)return[2,window.location.href=a.data.redirect];setTimeout((function(){window.location.reload()}),2e3)}return[3,6];case 4:return d=i.sent(),console.log(d),[3,6];case 5:return t=!1,[7];case 6:return[2]}}))}))}))}))},t.initForgotPasswordModalButtons=function(){var e=Array.from(document.querySelectorAll(a.buttons.forgotPassword)),t=!1;e.map((function(e){e.addEventListener("click",(function(){return o(void 0,void 0,void 0,(function(){var e,n,r;return i(this,(function(o){switch(o.label){case 0:if(t)return[2];t=!0,o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,c.default.getApp()];case 2:return e=o.sent(),[4,c.default.methods.openModal("FORGOT_PASSWORD",{app:e})];case 3:return"LOGIN"!==(n=o.sent()).type&&"SIGNUP"!==n.type||(l.default.setMember(n.data.member),c.default.mergeApp({contentGroups:n.data.contentGroups}),(0,d.handleRedirect)(n.data.redirect||n.data.member.loginRedirect,null),c.default.methods.hideModal()),[3,6];case 4:return r=o.sent(),console.log(r),[3,6];case 5:return t=!1,[7];case 6:return[2]}}))}))}))}))},t.initUpdatePlanButtons=function(){Array.from(document.querySelectorAll("[data-ms-price\\:update]")).map((function(e){"FORM"!==e.tagName&&e.addEventListener("click",(function(t){return o(void 0,void 0,void 0,(function(){var n,r,o,s,a;return i(this,(function(i){switch(i.label){case 0:return n=e.getAttribute("data-ms-price:update").split(",").filter(Boolean),r=n[0],o=e.getAttribute("data-ms-coupon"),c.default.setCouponViaBtn(o),(s=l.default.getCachedMember())?(t.preventDefault(),t.stopPropagation(),s.planConnections.some((function(e){return"SUBSCRIPTION"===e.type&&"CANCELED"!==e.status}))?[3,2]:[4,(0,d.launchCheckout)({priceId:r})]):((0,d.trackPricingButtonClick)(r),[2,c.default.setPrice(r)]);case 1:return[2,i.sent()];case 2:return i.trys.push([2,4,,5]),[4,c.default.methods.launchStripeCustomerPortal({priceIds:n})];case 3:return i.sent(),[3,5];case 4:return a=i.sent(),(0,d.hideLoader)(),c.default.methods._showMessage(a.message,!0),[3,5];case 5:return[2]}}))}))}))}))},t.initPlanRemoveButtons=function(){Array.from(document.querySelectorAll("[data-ms-plan\\:remove]")).map((function(e){e.addEventListener("click",(function(t){return o(void 0,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){switch(i.label){case 0:t.preventDefault(),t.stopPropagation(),(0,d.showLoader)(),n=e.getAttribute("data-ms-plan:remove"),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,c.default.methods.removePlan)({planId:n})];case 2:return r=i.sent()._internalUseOnly.message,(0,d.hideLoader)(),c.default.methods._showMessage(r,!1),setTimeout((function(){window.location.reload()}),2e3),[3,4];case 3:return o=i.sent(),(0,d.hideLoader)(),c.default.methods._showMessage(o.message,!0),[3,4];case 4:return[2]}}))}))}))}))},t.initRemoveSelectedPriceButtons=function(){return o(void 0,void 0,void 0,(function(){return i(this,(function(e){return Array.from(document.querySelectorAll("[data-ms-price\\:remove='all']")).map((function(e){e.addEventListener("click",(function(e){c.default.clearPrice()}))})),[2]}))}))},t.initLaunchCheckoutButtons=function(){Array.from(document.querySelectorAll("[data-ms-price\\:add]")).map((function(e){"FORM"!==e.tagName&&e.addEventListener("click",(function(t){return o(void 0,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:return n=e.getAttribute("data-ms-price:add"),r=e.getAttribute("data-ms-coupon"),c.default.setCouponViaBtn(r),l.default.getCachedMember()?(t.preventDefault(),t.stopPropagation(),[4,(0,d.launchCheckout)({priceId:n})]):((0,d.trackPricingButtonClick)(n),[2,c.default.setPrice(n)]);case 1:return o.sent(),[2]}}))}))}))}))},t.initSignupButtons=function(){Array.from(document.querySelectorAll("[data-ms-plan\\:add]")).map((function(e){"FORM"!==e.tagName&&e.addEventListener("click",(function(t){return o(void 0,void 0,void 0,(function(){var n,o,s,a,u,h;return i(this,(function(i){switch(i.label){case 0:if(n=e.getAttribute("data-ms-plan:add"),o=e.getAttribute("data-ms-success-message"),!l.default.getCachedMember())return[2,c.default.setPlan(n)];t.preventDefault(),t.stopPropagation(),(0,d.showLoader)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,c.default.methods.addPlan)({planId:n})];case 2:return s=i.sent(),a=s.data,u=s._internalUseOnly.message,c.default.mergeApp(r({},a.app)),l.default.mergeMember(r({},a.member)),(0,d.hideLoader)(),a.redirect&&window.location.pathname!==a.redirect?[2,window.location.href=a.redirect]:(c.default.methods._showMessage(o||u,!1),setTimeout((function(){window.location.reload()}),2e3),[3,4]);case 3:return h=i.sent(),(0,d.hideLoader)(),c.default.methods._showMessage(h.message,!0),[3,4];case 4:return[2]}}))}))}))}))},t.initLogoutButtons=function(){document.querySelectorAll(a.buttons.logout).forEach((function(e){e.addEventListener("click",(function(e){return o(void 0,void 0,void 0,(function(){var t,n,r;return i(this,(function(o){switch(o.label){case 0:return e.preventDefault(),e.stopPropagation(),(0,d.showLoader)(),[4,(0,c.default.methods.logout)()];case 1:return t=o.sent(),n=t.data,r=t._internalUseOnly.message,l.default.purgeCache(),[4,c.default.refetchAppMember()];case 2:return o.sent(),(0,d.hideLoader)(),n.redirect&&window.location.pathname!==n.redirect?[2,window.location.href=n.redirect]:(c.default.methods._showMessage(r,!1),setTimeout((function(){window.location.reload()}),2e3),[2])}}))}))}))}))},t.redirectOverrideButtons=function(){document.querySelectorAll("[data-ms-redirect]").forEach((function(e){e.addEventListener("click",(function(t){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){return"current-url"===(t=e.getAttribute("data-ms-redirect"))&&(t=window.location.pathname),sessionStorage.setItem("ms-redirect-override",t),[2]}))}))}))}))},t.deleteMemberButtons=function(){document.querySelectorAll(a.buttons.deleteMember).forEach((function(e){e.addEventListener("click",(function(e){return o(void 0,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:e.preventDefault(),e.stopPropagation(),(0,d.showLoader)(),t=c.default.methods.deleteMember,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,t()];case 2:return r.sent(),l.default.purgeCache(),(0,d.hideLoader)(),window.location.href="proxy.php?url=/",setTimeout((function(){window.location.reload()}),2e3),[3,4];case 3:return n=r.sent(),(0,d.hideLoader)(),c.default.methods._showMessage(n.message,!0),[3,4];case 4:return[2]}}))}))}))}))}},702:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]255?"255+":e.toString();t.innerHTML=r}},this.channelElement=e,this.toggleDisplay("[data-ms-channel-content='has-posts']","none"),this.toggleDisplay("[data-ms-channel-content='!has-posts']","none"),this.channelKey=e.getAttribute("data-ms-channel")||window.location.pathname,this.sortOrder=e.getAttribute("data-ms-channel-sort")||"oldest",this.postContainer=e.querySelector("[data-ms-post='container']"),this.notifyButton=e.querySelector("[data-ms-channel-notify]"),this.notifyDropdown=e.querySelector("[data-ms-channel-notifications]"),!e.querySelector("[data-ms-post='loadMoreAbove']")){var r=null===(t=e.querySelector("[data-ms-post='loadMore']"))||void 0===t?void 0:t.cloneNode(!0);r&&(this.postContainer.parentNode.insertBefore(r,this.postContainer),r.setAttribute("data-ms-post","loadMoreAbove"),r.style.display="none")}this.toggleDisplay("[data-ms-post='loadMoreAbove']","none"),this.toggleDisplay("[data-ms-post='loadMore']","none"),this.uiTemplate=this.postContainer.querySelector("[data-ms-post='item']"),this.uiTemplate.remove(),this.postLoader=this.channelElement.querySelector("[data-ms-post='loading']"),this.postLoader&&(this.postLoader.style.display="none"),this.channelLoader=this.channelElement.querySelector("[data-ms-channel-content='loading']"),this.channelLoader&&(this.channelLoader.style.display="none"),this.isTypingSection=this.channelElement.querySelector("[data-ms-post-content='is-typing-section']"),this.isTypingSection&&(this.isTypingSection.style.display="none"),this.presenceCount=document.querySelector("[data-ms-channel-presence='count']"),this.member=c.default.getCachedMember(),this.member&&(this.activeMemberId=this.member.id);var o=new URLSearchParams(window.location.search);this.specificPostId=o.get("postId"),this.specificPostId&&(this.specificThreadId=o.get("threadId")),this.initializePosts(),this.initListeners(),this.getChannelInfo()}return e.prototype.turnOnNotifyButton=function(){this.notifyButton&&(this.notifyButton.checked=!0)},e.prototype.setNotificationType=function(e){this.notifyDropdown&&(this.notifyDropdown.value=e)},e.prototype.updateTypingDisplay=function(){if(this.isTypingSection)if(this.typingUsers.length>0){this.isTypingSection.style.display="block";var e=this.isTypingSection.querySelector("[data-ms-post='is-typing']");e&&(e.innerHTML=this.getTypingMessage())}else this.isTypingSection.style.display="none"},e.prototype.getTypingMessage=function(){return"A user is typing..."},e.prototype.getChannelInfo=function(){return o(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,a.default.methods.getChannelInfo({channelKey:this.channelKey})];case 1:return(e=r.sent().data)?(t=e.internalOrder,this.realtimeKey="chl-".concat(t),this.activeMemberId&&(this.realtime=new d.Realtime(this)),(null==(n=e.activeMember)?void 0:n.notificationType)&&this.setNotificationType(n.notificationType),[2]):[2]}}))}))},e.prototype.handlePostLoaderVisibility=function(e){this.postLoader&&(this.postLoader.style.display=e?"block":"none")},e.prototype.handleChannelLoaderVisibility=function(e){this.channelLoader&&(this.channelLoader.style.display=e?"block":"none")},e.prototype.initializePosts=function(){return o(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return e=this.specificPostId?"newest"===this.sortOrder?String(Number(this.specificPostId)+1):String(Number(this.specificPostId)-1):void 0,[4,this.fetchPosts(e)];case 1:return t=n.sent().data,this.displayPosts(t),this.handleHasPostsVisibility(),this.setTotalPostCount(),e&&this.toggleDisplay("[data-ms-post='loadMoreAbove']","block"),[2]}}))}))},e.prototype.handleHasPostsVisibility=function(){this.posts.length?(this.toggleDisplay("[data-ms-channel-content='!has-posts']","none"),this.toggleDisplay("[data-ms-channel-content='has-posts']","block")):(this.toggleDisplay("[data-ms-channel-content='!has-posts']","block"),this.toggleDisplay("[data-ms-channel-content='has-posts']","none"))},e.prototype.toggleDisplay=function(e,t){var n=this.channelElement.querySelector(e);n&&(n.style.display=t)},e.prototype.handleLoadMoreVisibility=function(e){!e&&this.totalPostCount>this.totalPostsLoaded?this.toggleDisplay("[data-ms-post='loadMore']","block"):this.toggleDisplay("[data-ms-post='loadMore']","none")},e.prototype.initListeners=function(){var e,t,n,r;return o(this,void 0,void 0,(function(){var s,c,l=this;return i(this,(function(d){return null===(e=this.channelElement.querySelector("[data-ms-post='loadMore']"))||void 0===e||e.addEventListener("click",(function(){return o(l,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loadMorePosts()];case 1:return e.sent(),[2]}}))}))})),null===(t=this.channelElement.querySelector("[data-ms-post='loadMoreAbove']"))||void 0===t||t.addEventListener("click",(function(){return o(l,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loadMorePostsAbove()];case 1:return e.sent(),[2]}}))}))})),null===(n=this.channelElement.querySelector("[data-ms-form='post']"))||void 0===n||n.addEventListener("submit",(function(e){return o(l,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e.preventDefault(),e.stopPropagation(),[4,this.createAndDisplayPost(e.target)];case 1:return t.sent(),[2]}}))}))})),null===(r=this.notifyDropdown)||void 0===r||r.addEventListener("change",(function(e){return o(l,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=e.target.value,console.log(t),[4,a.default.methods.subscribeToChannel({channelKey:this.channelKey,action:t})];case 1:return n.sent(),[2]}}))}))})),s=this.channelElement.querySelector("[data-ms-form='post']"),null==(c=null==s?void 0:s.querySelector("[data-ms-post='content']"))||c.addEventListener("keydown",(function(e){return o(l,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return"Enter"!==(t=e).key||t.shiftKey?[3,2]:(e.preventDefault(),e.stopPropagation(),[4,this.createAndDisplayPost(s)]);case 1:return n.sent(),[3,3];case 2:this.handleIsTypingEvent(),n.label=3;case 3:return[2]}}))}))})),[2]}))}))},e.prototype.handleIsTypingEvent=function(){var e=this;this.activeMemberId&&this.canPublishIsTypingEvent&&this.realtimeKey&&(a.default.methods.postIsTyping({channelKey:this.realtimeKey}),this.canPublishIsTypingEvent=!1,setTimeout((function(){e.canPublishIsTypingEvent=!0}),3e3))},e.prototype.loadMorePosts=function(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.fetchPosts()];case 1:return e=t.sent().data,this.displayPosts(e),[2]}}))}))},e.prototype.loadMorePostsAbove=function(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.fetchPostsAbove()];case 1:return e=t.sent().data,this.displayPostsAbove(e),[2]}}))}))},e.prototype.addPost=function(e){var t=new l.PostItem(this,e);this.posts.push(t);var n=t.postElement;this.totalPostCount+=1,this.setTotalPostCount(),this.handleHasPostsVisibility(),"newest"===this.sortOrder?this.postContainer.insertBefore(n,this.postContainer.firstChild):this.postContainer.appendChild(n),u.default.notify({event:"new-post"})},e.prototype.createAndDisplayPost=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:if(!(t=e.querySelector("[data-ms-post='content']")))return[3,5];if(n=t.value,t.value="",!n)return[2];this.handlePostLoaderVisibility(!0),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,a.default.methods.createPost({channelKey:this.channelKey,content:n})];case 2:return r=i.sent().data,this.addPost(r),[3,4];case 3:return o=i.sent(),console.log(o),a.default.methods._showMessage(o.message,!0),[3,4];case 4:this.handlePostLoaderVisibility(!1),i.label=5;case 5:return[2]}}))}))},e.prototype.fetchPosts=function(e){var t,n;return o(this,void 0,void 0,(function(){var o,s,c;return i(this,(function(i){switch(i.label){case 0:return this.handleChannelLoaderVisibility(!0),o=this.postContainer.getAttribute("data-ms-post-load")||50,[4,a.default.methods.getPosts(r(r({channelKey:this.channelKey,order:this.sortOrder,limit:Number(o)},this.lastPostId&&{after:this.lastPostId}),e&&{after:e}))];case 1:return s=i.sent().data,this.handleChannelLoaderVisibility(!1),this.lastPostId=null===(t=s.posts[s.posts.length-1])||void 0===t?void 0:t.internalOrder,e&&(this.firstPostId=null===(n=s.posts[0])||void 0===n?void 0:n.internalOrder),this.totalPostCount=s.totalCount,this.totalPostsLoaded+=s.posts.length,c=0===s.posts.length,this.handleLoadMoreVisibility(c),[2,{data:s}]}}))}))},e.prototype.fetchPostsAbove=function(){var e;return o(this,void 0,void 0,(function(){var t,n;return i(this,(function(o){switch(o.label){case 0:return this.handleChannelLoaderVisibility(!0),t=this.postContainer.getAttribute("data-ms-post-load")||50,[4,a.default.methods.getPosts(r({channelKey:this.channelKey,order:"newest"===this.sortOrder?"oldest":"newest",limit:Number(t)},this.firstPostId&&{after:this.firstPostId}))];case 1:return n=o.sent().data,this.handleChannelLoaderVisibility(!1),this.firstPostId=null===(e=n.posts[n.posts.length-1])||void 0===e?void 0:e.internalOrder,0===n.posts.length&&this.toggleDisplay("[data-ms-post='loadMoreAbove']","none"),[2,{data:n}]}}))}))},e.prototype.displayPosts=function(e){var t=this;e.posts.forEach((function(e){var n=e.internalOrder===Number(t.specificPostId)&&t.specificThreadId?t.specificThreadId:void 0,r=new l.PostItem(t,e,n);t.posts.push(r);var o=r.postElement;t.postContainer.appendChild(o)})),u.default.notify({event:"posts-loaded"})},e.prototype.displayPostsAbove=function(e){var t=this;e.posts.forEach((function(e){var n=new l.PostItem(t,e);t.posts.unshift(n);var r=n.postElement;t.postContainer.insertBefore(r,t.postContainer.firstChild)})),u.default.notify({event:"posts-loaded"})},e.prototype.setTotalPostCount=function(){var e=this.channelElement.querySelector("[data-ms-post='count']");e&&(e.innerHTML=this.totalPostCount.toString())},e}();t.ChannelSection=h},238:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0?t.style.display="block":t.style.display="none"})),n.forEach((function(t){e.replyCount>0?t.style.display="none":t.style.display="block"}))},e.prototype.memberHasPermissionToEditPost=function(){var e,t,n=Boolean(null===(t=null===(e=this.Channel.member)||void 0===e?void 0:e._comments)||void 0===t?void 0:t.isModerator);return this.post.member.id===this.Channel.activeMemberId||n},e.prototype.incrementReplyCount=function(){this.replyCount+=1,this.updateReplyCount(),this.handleHasThreadsVisibility()},e.prototype.updateReplyCount=function(){this.postElement.querySelector("[data-ms-post='threadCount']")&&(0,a.setInnerHTML)(this.postElement,"[data-ms-post='threadCount']",this.replyCount.toString())},e}();t.PostItem=u;var h=function(e,t){var n=t.member,r=t.content,o=t._count,i=t.createdAt;(0,a.setInnerHTML)(e,"[data-ms-post='content']",r),(0,a.setInnerHTML)(e,"[data-ms-post='likeCount']",o.likedBy),(0,a.setInnerHTML)(e,"[data-ms-post='dislikeCount']",o.dislikedBy),(0,a.setInnerHTML)(e,"[data-ms-post='threadCount']",o.Threads),(0,a.setInnerHTML)(e,"[data-ms-post='date']",(0,c.format)(i,"en_US")),e.setAttribute("data-ms-post-id",t.id);var s=n.customFields||{};e.querySelectorAll("[data-ms-post-creator]").forEach((function(e){var t=e.getAttribute("data-ms-post-creator");s[t]&&(e.innerHTML=s[t])})),n.profileImage&&e.querySelector("[data-ms-post='ownerProfileImage']").setAttribute("src",n.profileImage),e.removeAttribute("data-ms-post")}},331:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]-1&&(this.postOrThread[e].splice(n,1),this.postOrThread._count[e]=this.postOrThread[e].length)},e.prototype.handleVote=function(e,t){switch(e){case"UP":this.handleUpVote(t);break;case"DOWN":this.handleDownVote(t);break;case"NONE":this.handleNeutralVote(t)}this.updatePostReactionCounts()},e.prototype.handleUpVote=function(e){this.addReactionToPost("likedBy",e),this.removeReactionFromPost("dislikedBy",e)},e.prototype.handleDownVote=function(e){this.addReactionToPost("dislikedBy",e),this.removeReactionFromPost("likedBy",e)},e.prototype.handleNeutralVote=function(e){this.removeReactionFromPost("likedBy",e),this.removeReactionFromPost("dislikedBy",e)},e.prototype.updatePostReactionCounts=function(){(0,a.setInnerHTML)(this.postElement,"[data-ms-".concat(this.type,"='likeCount']"),this.postOrThread._count.likedBy.toString()),(0,a.setInnerHTML)(this.postElement,"[data-ms-".concat(this.type,"='dislikeCount']"),this.postOrThread._count.dislikedBy.toString())},e.prototype.sendVote=function(e){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"thread"!==this.type?[3,2]:[4,s.default.methods.threadVote({threadId:this.postOrThread.id,vote:e})];case 1:case 3:return t.sent(),[2];case 2:return[4,s.default.methods.postVote({postId:this.postOrThread.id,vote:e})]}}))}))},e.prototype.handleReactionVisibility=function(){var e=this.postElement.querySelector("[data-ms-".concat(this.type,"='like']"));this.memberLikedPost()?null==e||e.classList.add("is-active"):null==e||e.classList.remove("is-active");var t=this.postElement.querySelector("[data-ms-".concat(this.type,"='dislike']"));this.memberDislikedPost()?null==t||t.classList.add("is-active"):null==t||t.classList.remove("is-active")},e.prototype.memberLikedPost=function(){return this.postOrThread.likedBy.includes(this.Channel.activeMemberId)},e.prototype.memberDislikedPost=function(){return this.postOrThread.dislikedBy.includes(this.Channel.activeMemberId)},e}();t.ReactionItem=c},528:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]this.totalThreadsLoaded?this.toggleDisplay("[data-ms-thread='loadMore']","block"):this.toggleDisplay("[data-ms-thread='loadMore']","none")},e.prototype.initEventListeners=function(){var e,t,n,r,s=this;null===(e=this.loadMoreButton)||void 0===e||e.addEventListener("click",(function(){return o(s,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loadMoreThreads()];case 1:return[2,e.sent()]}}))}))})),null===(t=this.loadMoreAboveButton)||void 0===t||t.addEventListener("click",(function(){return o(s,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loadMoreThreadsAbove()];case 1:return e.sent(),[2]}}))}))})),this.section&&(null===(n=this.section.querySelector("[data-ms-form='thread']"))||void 0===n||n.addEventListener("submit",(function(e){return o(s,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e.preventDefault(),e.stopPropagation(),[4,this.createAndDisplayThread(e.target)];case 1:return t.sent(),[2]}}))}))})));var a=null===(r=this.section)||void 0===r?void 0:r.querySelector("[data-ms-form='thread']"),c=null==a?void 0:a.querySelector("[data-ms-thread='content']");null==c||c.addEventListener("keydown",(function(e){return o(s,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return"Enter"!==(t=e).key||t.shiftKey?[3,2]:(e.preventDefault(),e.stopPropagation(),[4,this.createAndDisplayThread(a)]);case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}))},e.prototype.loadMoreThreads=function(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.fetchThreads()];case 1:return e=t.sent(),this.displayThreads(e),[2]}}))}))},e.prototype.loadMoreThreadsAbove=function(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.fetchThreadsAbove()];case 1:return e=t.sent(),this.displayThreadsAbove(e),[2]}}))}))},e.prototype.fetchThreads=function(){var e,t;return o(this,void 0,void 0,(function(){var n,o,s,c;return i(this,(function(i){switch(i.label){case 0:return this.Post.Channel.handlePostLoaderVisibility(!0),n=this.threadContainer.getAttribute("data-ms-thread-load")||20,o=this.specificThreadId?"newest"===this.threadSortOrder?String(Number(this.specificThreadId)+1):String(Number(this.specificThreadId)-1):void 0,[4,a.default.methods.getThreads(r(r({postId:this.postId,order:this.threadSortOrder,limit:Number(n)},this.lastThreadId&&{after:this.lastThreadId}),o&&{after:o}))];case 1:return s=i.sent().data,this.specificThreadId&&(this.toggleDisplay("[data-ms-thread='loadMoreAbove']","block"),this.firstThreadId=null===(e=s.threads[0])||void 0===e?void 0:e.internalOrder),this.specificThreadId=void 0,this.Post.Channel.handlePostLoaderVisibility(!1),this.totalThreadsLoaded+=s.threads.length,c=0===s.threads.length,this.handleLoadMoreVisibility(c),this.lastThreadId=null===(t=s.threads[s.threads.length-1])||void 0===t?void 0:t.internalOrder,[2,s.threads]}}))}))},e.prototype.fetchThreadsAbove=function(){var e;return o(this,void 0,void 0,(function(){var t,n;return i(this,(function(o){switch(o.label){case 0:return this.Post.Channel.handlePostLoaderVisibility(!0),t=this.threadContainer.getAttribute("data-ms-thread-load")||20,[4,a.default.methods.getThreads(r({postId:this.postId,order:"newest"===this.threadSortOrder?"oldest":"newest",limit:Number(t)},this.firstThreadId&&{after:this.firstThreadId}))];case 1:return n=o.sent().data,this.Post.Channel.handlePostLoaderVisibility(!1),0===n.threads.length&&this.toggleDisplay("[data-ms-thread='loadMoreAbove']","none"),this.firstThreadId=null===(e=n.threads[n.threads.length-1])||void 0===e?void 0:e.internalOrder,[2,n.threads]}}))}))},e.prototype.toggleDisplay=function(e,t){var n=this.section.querySelector(e);n&&(n.style.display=t)},e.prototype.displayThreads=function(e){var t=this;e.forEach((function(e){var n=new c.ThreadItem(t,e);t.threads.push(n);var r=n.threadElement;t.threadContainer.appendChild(r)})),l.default.notify({event:"threads-loaded"})},e.prototype.displayThreadsAbove=function(e){var t=this;e.forEach((function(e){var n=new c.ThreadItem(t,e);t.threads.unshift(n);var r=n.threadElement;t.threadContainer.insertBefore(r,t.threadContainer.firstChild)})),l.default.notify({event:"threads-loaded"})},e.prototype.addThread=function(e){var t=new c.ThreadItem(this,e);this.threads.push(t);var n=t.threadElement;this.totalThreadsLoaded+=1,this.Post.incrementReplyCount(),"newest"===this.threadSortOrder?this.threadContainer.insertBefore(n,this.threadContainer.firstChild):this.threadContainer.appendChild(n),l.default.notify({event:"new-thread"})},e.prototype.createAndDisplayThread=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:if(!(t=e.querySelector("[data-ms-thread='content']")))return[3,5];if(n=t.value,t.value="",!n)return[2];this.Post.Channel.handlePostLoaderVisibility(!0),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,a.default.methods.createThread({postId:this.postId,content:n})];case 2:return r=i.sent().data,this.addThread(r),[3,4];case 3:return o=i.sent(),console.log(o),a.default.methods._showMessage(o.message,!0),[3,4];case 4:this.Post.Channel.handlePostLoaderVisibility(!1),i.label=5;case 5:return[2]}}))}))},e.prototype.hide=function(){this.section.style.display="none",this.isOpen=!1},e.prototype.show=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.section.style.display="block",this.isOpen=!0,0!==this.totalThreadsLoaded?[3,2]:[4,this.loadMoreThreads()];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e}();t.ThreadSection=d},582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initChannels=void 0;var r=n(702);t.initChannels=function(){document.querySelectorAll("[data-ms-channel]").forEach((function(e){return new r.ChannelSection(e)}))}},146:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setInnerHTML=void 0,t.setInnerHTML=function(e,t,n){var r=e.querySelector(t);r&&(r.innerHTML=n)}},299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(588),o=new(function(){function e(){var e=this;this.observer=new Map,window.$msChannelEvents=function(t){return e.channelUpdate(t)}}return e.prototype.subscribe=function(e){if("function"==typeof e){var t=Symbol();return this.observer.set(t,e),t}},e.prototype.unsubscribe=function(e){return this.observer.delete(e)},e.prototype.notify=function(e){this.observer.forEach((function(t){return t(e)})),(0,r.removeContent)()},e.prototype.channelUpdate=function(e){var t=this,n=this.subscribe(e);return{unsubscribe:function(){return t.unsubscribe(n)}}},e}());t.default=o},41:function(e,t){"use strict";var n=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loggerEnabled=t.logger=void 0,t.logger=function(e,t){window.localStorage.getItem("ms_debug")&&(t?console.log(e,t):console.log(e))},t.loggerEnabled=function(){return!!window.localStorage.getItem("ms_debug")}},230:function(e,t,n){"use strict";var r,o,i,s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0&&e.querySelectorAll("[type=checkbox][data-ms-value]").length>0)Array.from(e.querySelectorAll("[type=checkbox][data-ms-value]")).map((function(e){var t,n=e.getAttribute("data-ms-value"),r=(null==o?void 0:o.split(","))||[];e.checked=!!r.includes(n);var i=(null===(t=e.previousElementSibling)||void 0===t?void 0:t.classList.contains("w-checkbox-input--inputType-custom"))?e.previousElementSibling:null;i&&(r.includes(n)?i.classList.add("w--redirected-checked"):i.classList.remove("w--redirected-checked"))}));else{if("IMG"===e.tagName){if(!o)return;var i=e;return i.src=o,void(i.srcset=o)}if("SELECT"!==e.tagName)if("INPUT"!==e.tagName||"checkbox"!==e.type&&"radio"!==e.type){var s="email"===r?data.auth.email:data.customFields[r];s&&(e.innerHTML=s,e.value=s,e.src=s)}else{var a=e;switch(a.type){case"checkbox":var c=!0===o||"true"===o;a.checked=!!c;var l=(null===(t=a.previousElementSibling)||void 0===t?void 0:t.classList.contains("w-checkbox-input--inputType-custom"))?a.previousElementSibling:null;l&&(c?l.classList.add("w--redirected-checked"):l.classList.remove("w--redirected-checked"));break;case"radio":if(o&&o===a.value){a.checked=!0;var d=(null===(n=a.previousElementSibling)||void 0===n?void 0:n.classList.contains("w-form-formradioinput--inputType-custom"))?a.previousElementSibling:null;d&&(a.checked?d.classList.add("w--redirected-checked"):d.classList.remove("w--redirected-checked"))}}}else e.value=o}}));var signupDateText=Array.from(document.querySelectorAll("[data-ms-member^='signup-date']"));signupDateText.map((function(el){var dateSelector=el.getAttribute("data-ms-member"),dateFunction=dateSelector.split(".")[1],date=dateFunction?eval("new Date(data.createdAt).".concat(dateFunction)):new Date(data.createdAt).toDateString();el.innerHTML=date}))};exports.personalizeText=personalizeText;var initMemberText=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,member_1.default.getMember()];case 1:return(e=n.sent())&&(0,exports.personalizeText)(e),[4,member_1.default.initialRefetch()];case 2:return(t=n.sent())?((0,exports.personalizeText)(t),[2]):[2]}}))}))};exports.initMemberText=initMemberText;var removeElement=function(e){var t;try{null==e||e.remove()}catch(n){null===(t=e.parentNode)||void 0===t||t.removeChild(e)}};exports.removeElement=removeElement;var getElements=function(e){return Array.from(document.querySelectorAll(e))};exports.getElements=getElements;var getDynamicContent=function(e){var t,n=[];return e&&(e.planConnections.some((function(e){return"FREE"===e.type}))?n.push("[data-ms-content='!free-plans']"):n.push("[data-ms-content='free-plans']"),e.planConnections.some((function(e){return"FREE"!==e.type&&"CANCELED"!==e.status}))?n.push("[data-ms-content='!paid-plans']"):n.push("[data-ms-content='paid-plans']"),e.planConnections.filter((function(e){return"CANCELED"!==e.status})).length>0?n.push("[data-ms-content='no-plans']"):n.push("[data-ms-content='!no-plans']"),e.planConnections.some((function(e){return"TRIALING"===e.status}))?n.push("[data-ms-content='!is-trialing']"):n.push("[data-ms-content='is-trialing']"),e.planConnections.some((function(e){return"REQUIRES_PAYMENT"===e.status||"REQUIRES_AUTHENTICATION"===e.status}))?n.push("[data-ms-content='!has-failed-payment']"):n.push("[data-ms-content='has-failed-payment']"),e.verified?n.push("[data-ms-content='!verified']","[data-ms-action='resend-verification-email']"):n.push("[data-ms-content='verified']"),(null===(t=e.auth)||void 0===t?void 0:t.hasPassword)?n.push("[data-ms-content='!has-password']"):n.push("[data-ms-content='has-password']"),e.stripeCustomerId||n.push("[data-ms-action='customer-portal']"),memberstack_1.default.selectedPrice||n.push(constants_1.buttons.returnToCheckout),n.push.apply(n,__spreadArray([],__read((0,exports.getRemovePlansToHide)()),!1))),n};exports.getDynamicContent=getDynamicContent;var getRemovePlansToHide=function(){var e=Array.from(document.querySelectorAll("[data-ms-plan\\:remove]"));if(e)return e.map((function(e){var t,n=e.getAttribute("data-ms-plan:remove");return(null===(t=member_1.default.getCachedMember())||void 0===t?void 0:t.planConnections.some((function(e){return e.planId===n&&"CANCELED"!==e.status})))?void 0:"[data-ms-plan\\:remove=".concat(n,"]")}))};exports.getRemovePlansToHide=getRemovePlansToHide;var handleRedirect=function(e,t){var n=sessionStorage.getItem("ms-redirect-override");return"/"===window.location.pathname&&"/"===e?window.location.reload():t?window.location.href=t:n?(sessionStorage.removeItem("ms-redirect-override"),window.location.href="proxy.php?url=/"===n[0]?n:"/".concat(n)):e&&window.location.pathname!==e?window.location.href=e:void 0};exports.handleRedirect=handleRedirect;var getFormCustomFields=function(e){var t={},n=Array.from(e.querySelectorAll("[data-ms-member]")).filter((function(e){var t=e.getAttribute("data-ms-member");return"email"!==t&&"password"!==t&&"new-password"!==t&&"current-password"!==t})),r=n.filter((function(e){return("INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName)&&"checkbox"!==e.type&&"radio"!==e.type})),o=n.filter((function(e){return"INPUT"===e.tagName&&"checkbox"===e.type})),i=n.filter((function(e){return"INPUT"===e.tagName&&"radio"===e.type})),s=n.filter((function(e){return"DIV"===e.tagName}));r.map((function(e){var n=e.getAttribute("data-ms-member");t[n]=e.value})),o.map((function(e){var n=e.getAttribute("data-ms-member");t[n]=e.checked.toString()}));var a=i.reduce((function(e,t){return(e[t.getAttribute("data-ms-member")]=e[t.getAttribute("data-ms-member")]||[]).push(t),e}),{});return Object.keys(a).map((function(e){var n=(a[e]||[]).find((function(e){return!0===e.checked}));n&&(t[e]=n.value)})),s.map((function(e){var n=e.getAttribute("data-ms-member"),r=Array.from(e.querySelectorAll("[data-ms-value]")).filter((function(e){return!0===e.checked})).map((function(e){return e.getAttribute("data-ms-value")}));t[n]=r.join(",")})),t};exports.getFormCustomFields=getFormCustomFields;var getSignupFormPlans=function(e){var t=[],n=e.getAttribute("data-ms-plan")||e.getAttribute("data-ms-plan:add")||e.getAttribute("data-ms-plan:update");return n?"no-plan"!==n&&(t=null==n?void 0:n.split(",").map((function(e){return{planId:e}}))):memberstack_1.default.selectedPlan&&(t=[{planId:memberstack_1.default.selectedPlan}]),t};exports.getSignupFormPlans=getSignupFormPlans;var hideAuthDisconnectButtons=function(e){var t=Array.from(e.querySelectorAll("[data-ms-auth-disconnect]")).map((function(e){e.style.display="none"}));return Boolean(t.length>0)};exports.hideAuthDisconnectButtons=hideAuthDisconnectButtons;var showAuthDisconnectButtons=function(e){Array.from(e.querySelectorAll("[data-ms-auth-disconnect]")).map((function(e){e.style.removeProperty("display")}))};exports.showAuthDisconnectButtons=showAuthDisconnectButtons;var createFileInputElement=function(){var e=document.createElement("input");return e.setAttribute("required",""),e.setAttribute("type","file"),e.setAttribute("accept","image/*"),e.setAttribute("profile-image","true"),e.setAttribute("name","profile-image"),e.setAttribute("data-name","File"),e.setAttribute("hidden",""),e.setAttribute("tabindex","-1"),e};exports.createFileInputElement=createFileInputElement;var emitMemberstackReadyEvent=function(){window.$memberstackReady=!0;var e,t="memberstack.ready";"function"==typeof Event?e=new Event(t):(e=document.createEvent("Event")).initEvent(t,!0,!0),document.dispatchEvent(e)};exports.emitMemberstackReadyEvent=emitMemberstackReadyEvent;var inspectorToolInit=function(){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,memberstack_1.default.initialAppMemberRefetch()];case 1:return t.sent(),"sandbox"===memberstack_1.default.mode&&memberstack_1.default.methods.openModal("inspector"),[3,3];case 2:return e=t.sent(),console.error(e),[3,3];case 3:return[2]}}))}))};exports.inspectorToolInit=inspectorToolInit},321:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ErrorCodes:()=>On,default:()=>Gn,formatErrorForUser:()=>jn,getErrorCategory:()=>Vn,getErrorCode:()=>Un,getErrorDocsUrl:()=>qn,getErrorMessage:()=>Nn,getErrorReport:()=>Hn,getErrorSuggestions:()=>Fn,isErrorCode:()=>Bn,isMemberstackError:()=>xn});var r={};function o(e){for(var t=1;tpe,hasStandardBrowserEnv:()=>ge,hasStandardBrowserWebWorkerEnv:()=>ye,navigator:()=>fe,origin:()=>be});var i=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=o({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+s}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o{const t=a.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const m=e=>(e=e.toLowerCase(),t=>u(t)===e),p=e=>t=>typeof t===e,{isArray:f}=Array,g=p("undefined"),y=m("ArrayBuffer"),b=p("string"),v=p("function"),w=p("number"),_=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==u(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||d in e||l in e)},S=m("Date"),k=m("File"),T=m("Blob"),P=m("FileList"),C=m("URLSearchParams"),[A,I,O,L]=["ReadableStream","Request","Response","Headers"].map(m);function M(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),f(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,x=e=>!g(e)&&e!==D,N=(U="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>U&&e instanceof U);var U;const B=m("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),q=m("RegExp"),V=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};M(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},j=m("AsyncFunction"),H=(G="function"==typeof setImmediate,K=v(D.postMessage),G?setImmediate:K?(W=`axios@${Math.random()}`,$=[],D.addEventListener("message",(({source:e,data:t})=>{e===D&&t===W&&$.length&&$.shift()()}),!1),e=>{$.push(e),D.postMessage(W,"*")}):e=>setTimeout(e));var G,K,W,$;const z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(D):"undefined"!=typeof process&&process.nextTick||H,J={isArray:f,isArrayBuffer:y,isBuffer:function(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=u(e))||"object"===t&&v(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&y(e.buffer),t},isString:b,isNumber:w,isBoolean:e=>!0===e||!1===e,isObject:_,isPlainObject:E,isReadableStream:A,isRequest:I,isResponse:O,isHeaders:L,isUndefined:g,isDate:S,isFile:k,isBlob:T,isRegExp:q,isFunction:v,isStream:e=>_(e)&&v(e.pipe),isURLSearchParams:C,isTypedArray:N,isFileList:P,forEach:M,merge:function e(){const{caseless:t}=x(this)&&this||{},n={},r=(r,o)=>{const i=t&&R(n,o)||o;E(n[i])&&E(r)?n[i]=e(n[i],r):E(r)?n[i]=e({},r):f(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e(M(t,((t,r)=>{n&&v(t)?e[r]=s(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&c(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:u,kindOfTest:m,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!w(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[l]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:B,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:V,freezeMethods:e=>{V(e,((t,n)=>{if(v(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];v(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return f(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:R,global:D,isContextDefined:x,isSpecCompliantForm:function(e){return!!(e&&v(e.append)&&"FormData"===e[d]&&e[l])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(_(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=f(e)?[]:{};return M(e,((e,t)=>{const i=n(e,r+1);!g(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:j,isThenable:e=>e&&(_(e)||v(e))&&v(e.then)&&v(e.catch),setImmediate:H,asap:z,isIterable:e=>null!=e&&v(e[l])};function X(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}J.inherits(X,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}});const Y=X.prototype,Q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Q[e]={value:e}})),Object.defineProperties(X,Q),Object.defineProperty(Y,"isAxiosError",{value:!0}),X.from=(e,t,n,r,o,i)=>{const s=Object.create(Y);return J.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),X.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Z=X;function ee(e){return J.isPlainObject(e)||J.isArray(e)}function te(e){return J.endsWith(e,"[]")?e.slice(0,-2):e}function ne(e,t,n){return e?e.concat(t).map((function(e,t){return e=te(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const re=J.toFlatObject(J,{},null,(function(e){return/^is[A-Z]/.test(e)})),oe=function(e,t,n){if(!J.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=J.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!J.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(t);if(!J.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(J.isDate(e))return e.toISOString();if(J.isBoolean(e))return e.toString();if(!a&&J.isBlob(e))throw new Z("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(e)||J.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(J.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(J.isArray(e)&&function(e){return J.isArray(e)&&!e.some(ee)}(e)||(J.isFileList(e)||J.endsWith(n,"[]"))&&(a=J.toArray(e)))return n=te(n),a.forEach((function(e,r){!J.isUndefined(e)&&null!==e&&t.append(!0===s?ne([n],r,i):null===s?n:n+"[]",c(e))})),!1;return!!ee(e)||(t.append(ne(o,n,i),c(e)),!1)}const d=[],u=Object.assign(re,{defaultVisitor:l,convertValue:c,isVisitable:ee});if(!J.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!J.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),J.forEach(n,(function(n,i){!0===(!(J.isUndefined(n)||null===n)&&o.call(t,n,J.isString(i)?i.trim():i,r,u))&&e(n,r?r.concat(i):[i])})),d.pop()}}(e),t};function ie(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function se(e,t){this._pairs=[],e&&oe(e,this,t)}const ae=se.prototype;ae.append=function(e,t){this._pairs.push([e,t])},ae.toString=function(e){const t=e?function(t){return e.call(this,t,ie)}:ie;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ce=se;function le(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function de(e,t,n){if(!t)return e;const r=n&&n.encode||le;J.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):J.isURLSearchParams(t)?t.toString():new ce(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ue=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){J.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},he={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},me={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ce,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},pe="undefined"!=typeof window&&"undefined"!=typeof document,fe="object"==typeof navigator&&navigator||void 0,ge=pe&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),ye="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,be=pe&&window.location.href||"http://localhost",ve={...r,...me},we=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&J.isArray(r)?r.length:i,a?(J.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&J.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&J.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r{t(function(e){return J.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},_e={transitional:he,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=J.isObject(e);if(o&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return r?JSON.stringify(we(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return oe(e,new ve.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ve.isNode&&J.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=J.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return oe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(J.isString(e))try{return(0,JSON.parse)(e),J.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||_e.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Z.from(e,Z.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],(e=>{_e.headers[e]={}}));const Ee=_e,Se=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ke=Symbol("internals");function Te(e){return e&&String(e).trim().toLowerCase()}function Pe(e){return!1===e||null==e?e:J.isArray(e)?e.map(Pe):String(e)}function Ce(e,t,n,r,o){return J.isFunction(r)?r.call(this,t,n):(o&&(t=n),J.isString(t)?J.isString(r)?-1!==t.indexOf(r):J.isRegExp(r)?r.test(t):void 0:void 0)}class Ae{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Te(t);if(!o)throw new Error("header name must be a non-empty string");const i=J.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Pe(e))}const i=(e,t)=>J.forEach(e,((e,n)=>o(e,n,t)));if(J.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(J.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Se[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(J.isObject(e)&&J.isIterable(e)){let n,r,o={};for(const t of e){if(!J.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?J.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Te(e)){const n=J.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(J.isFunction(t))return t.call(this,e,n);if(J.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Te(e)){const n=J.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Te(e)){const o=J.findKey(n,e);!o||t&&!Ce(0,n[o],o,t)||(delete n[o],r=!0)}}return J.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return J.forEach(this,((r,o)=>{const i=J.findKey(n,o);if(i)return t[i]=Pe(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=Pe(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return J.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&J.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ke]=this[ke]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Te(e);t[r]||(function(e,t){const n=J.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return J.isArray(e)?e.forEach(r):r(e),this}}Ae.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(Ae.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),J.freezeMethods(Ae);const Ie=Ae;function Oe(e,t){const n=this||Ee,r=t||n,o=Ie.from(r.headers);let i=r.data;return J.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Le(e){return!(!e||!e.__CANCEL__)}function Me(e,t,n){Z.call(this,null==e?"canceled":e,Z.ERR_CANCELED,t,n),this.name="CanceledError"}J.inherits(Me,Z,{__CANCEL__:!0});const Re=Me;function De(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Z("Request failed with status code "+n.status,[Z.ERR_BAD_REQUEST,Z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const xe=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[s];o||(o=c),n[i]=a,r[i]=c;let d=s,u=0;for(;d!==i;)u+=n[d++],d%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout((()=>{r=null,s(n)}),i-a)))},()=>n&&s(n)]}((n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,c=o(a);r=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),n)},Ne=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ue=e=>(...t)=>J.asap((()=>e(...t))),Be=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,Fe=ve.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];J.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),J.isString(r)&&s.push("path="+r),J.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qe(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ve=e=>e instanceof Ie?{...e}:e;function je(e,t){t=t||{};const n={};function r(e,t,n,r){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:r},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function o(e,t,n,o){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!J.isUndefined(t))return r(void 0,t)}function s(e,t){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(Ve(e),Ve(t),0,!0)};return J.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);J.isUndefined(s)&&i!==a||(n[r]=s)})),n}const He=e=>{const t=je({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=Ie.from(a),t.url=de(qe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),J.isFormData(r))if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ve.hasStandardBrowserEnv&&(o&&J.isFunction(o)&&(o=o(t)),o||!1!==o&&Be(t.url))){const e=i&&s&&Fe.read(s);e&&a.set(i,e)}return t},Ge="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=He(e);let o=r.data;const i=Ie.from(r.headers).normalize();let s,a,c,l,d,{responseType:u,onUploadProgress:h,onDownloadProgress:m}=r;function p(){l&&l(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let f=new XMLHttpRequest;function g(){if(!f)return;const r=Ie.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());De((function(e){t(e),p()}),(function(e){n(e),p()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(n(new Z("Request aborted",Z.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new Z("Network Error",Z.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||he;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Z(t,o.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,e,f)),f=null},void 0===o&&i.setContentType(null),"setRequestHeader"in f&&J.forEach(i.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),J.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),u&&"json"!==u&&(f.responseType=r.responseType),m&&([c,d]=xe(m,!0),f.addEventListener("progress",c)),h&&f.upload&&([a,l]=xe(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{f&&(n(!t||t.type?new Re(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===ve.protocols.indexOf(y)?n(new Z("Unsupported protocol "+y+":",Z.ERR_BAD_REQUEST,e)):f.send(o||null)}))},Ke=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Z?t:new Re(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Z(`timeout ${t} of ms exceeded`,Z.ETIMEDOUT))}),t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=()=>J.asap(s),a}},We=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*We(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},ze="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Je=ze&&"function"==typeof ReadableStream,Xe=ze&&("function"==typeof TextEncoder?(Ye=new TextEncoder,e=>Ye.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ye;const Qe=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ze=Je&&Qe((()=>{let e=!1;const t=new Request(ve.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),et=Je&&Qe((()=>J.isReadableStream(new Response("").body))),tt={stream:et&&(e=>e.body)};var nt;ze&&(nt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!tt[e]&&(tt[e]=J.isFunction(nt[e])?t=>t[e]():(t,n)=>{throw new Z(`Response type '${e}' is not supported`,Z.ERR_NOT_SUPPORT,n)})})));const rt={http:null,xhr:Ge,fetch:ze&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:d,withCredentials:u="same-origin",fetchOptions:h}=He(e);l=l?(l+"").toLowerCase():"text";let m,p=Ke([o,i&&i.toAbortSignal()],s);const f=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(c&&Ze&&"get"!==n&&"head"!==n&&0!==(g=await(async(e,t)=>{const n=J.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e)){const t=new Request(ve.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return J.isArrayBufferView(e)||J.isArrayBuffer(e)?e.byteLength:(J.isURLSearchParams(e)&&(e+=""),J.isString(e)?(await Xe(e)).byteLength:void 0)})(t):n})(d,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(J.isFormData(r)&&(e=n.headers.get("content-type"))&&d.setContentType(e),n.body){const[e,t]=Ne(g,xe(Ue(c)));r=$e(n.body,65536,e,t)}}J.isString(u)||(u=u?"include":"omit");const o="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:o?u:void 0});let i=await fetch(m,h);const s=et&&("stream"===l||"response"===l);if(et&&(a||s&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=J.toFiniteNumber(i.headers.get("content-length")),[n,r]=a&&Ne(t,xe(Ue(a),!0))||[];i=new Response($e(i.body,65536,n,(()=>{r&&r(),f&&f()})),e)}l=l||"text";let y=await tt[J.findKey(tt,l)||"text"](i,e);return!s&&f&&f(),await new Promise(((t,n)=>{De(t,n,{data:y,headers:Ie.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:m})}))}catch(t){if(f&&f(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Z("Network Error",Z.ERR_NETWORK,e,m),{cause:t.cause||t});throw Z.from(t,t&&t.code,e,m)}})};J.forEach(rt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ot=e=>`- ${e}`,it=e=>J.isFunction(e)||null===e||!1===e,st=e=>{e=J.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(ot).join("\n"):" "+ot(e[0]):"as no adapter specified";throw new Z("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function at(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Re(null,e)}function ct(e){return at(e),e.headers=Ie.from(e.headers),e.data=Oe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),st(e.adapter||Ee.adapter)(e).then((function(t){return at(e),t.data=Oe.call(e,e.transformResponse,t),t.headers=Ie.from(t.headers),t}),(function(t){return Le(t)||(at(e),t&&t.response&&(t.response.data=Oe.call(e,e.transformResponse,t.response),t.response.headers=Ie.from(t.response.headers))),Promise.reject(t)}))}const lt="1.10.0",dt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{dt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const ut={};dt.transitional=function(e,t,n){function r(e,t){return"[Axios v"+lt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Z(r(o," has been removed"+(t?" in "+t:"")),Z.ERR_DEPRECATED);return t&&!ut[o]&&(ut[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},dt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const ht={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Z("options must be an object",Z.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Z("option "+i+" must be "+n,Z.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Z("Unknown option "+i,Z.ERR_BAD_OPTION)}},validators:dt},mt=ht.validators;class pt{constructor(e){this.defaults=e||{},this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=je(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ht.assertOptions(n,{silentJSONParsing:mt.transitional(mt.boolean),forcedJSONParsing:mt.transitional(mt.boolean),clarifyTimeoutError:mt.transitional(mt.boolean)},!1),null!=r&&(J.isFunction(r)?t.paramsSerializer={serialize:r}:ht.assertOptions(r,{encode:mt.function,serialize:mt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ht.assertOptions(t,{baseUrl:mt.spelling("baseURL"),withXsrfToken:mt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&J.merge(o.common,o[t.method]);o&&J.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ie.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[ct.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),d=e.length,l=Promise.resolve(t);u{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Re(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new gt((function(t){e=t})),cancel:e}}}const yt=gt,bt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bt).forEach((([e,t])=>{bt[t]=e}));const vt=bt,wt=function e(t){const n=new ft(t),r=s(ft.prototype.request,n);return J.extend(r,ft.prototype,n,{allOwnKeys:!0}),J.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(je(t,n))},r}(Ee);wt.Axios=ft,wt.CanceledError=Re,wt.CancelToken=yt,wt.isCancel=Le,wt.VERSION=lt,wt.toFormData=oe,wt.AxiosError=Z,wt.Cancel=wt.CanceledError,wt.all=function(e){return Promise.all(e)},wt.spread=function(e){return function(t){return e.apply(null,t)}},wt.isAxiosError=function(e){return J.isObject(e)&&!0===e.isAxiosError},wt.mergeConfig=je,wt.AxiosHeaders=Ie,wt.formToJSON=e=>we(J.isHTMLForm(e)?new FormData(e):e),wt.getAdapter=st,wt.HttpStatusCode=vt,wt.default=wt;const _t=wt;var Et,St=Object.defineProperty,kt=Object.defineProperties,Tt=Object.getOwnPropertyDescriptors,Pt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,It=(e,t,n)=>t in e?St(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ot=(e,t)=>{for(var n in t||(t={}))Ct.call(t,n)&&It(e,n,t[n]);if(Pt)for(var n of Pt(t))At.call(t,n)&&It(e,n,t[n]);return e},Lt=(e,t)=>kt(e,Tt(t)),Mt=(e,t,n)=>new Promise(((r,o)=>{var i=e=>{try{a(n.next(e))}catch(e){o(e)}},s=e=>{try{a(n.throw(e))}catch(e){o(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,s);a((n=n.apply(e,t)).next())}));"undefined"!=typeof window&&((Et=document.createElement("div")).setAttribute("id","ms-status-close"),Et.setAttribute("data-ms-message-close",""),Et.innerHTML='');var Rt="https://client.memberstack.com",Dt=Rt.includes("dev-client"),xt=Rt.includes("localhost"),Nt="https://static.memberstack.com/scripts/v2";"undefined"==typeof Node||Node.prototype.getRootNode||(Node.prototype.getRootNode=function(){let e=this;for(;e.parentNode;)e=e.parentNode;return e});var Ut,Bt=!1,Ft=null,qt=(e=2)=>Mt(void 0,null,(function*(){if(!Bt)return Ft||(Ft=new Promise(((t,n)=>{if("undefined"!=typeof customElements&&customElements.get("memberstack-prebuilt-ui"))return Bt=!0,void t();const r=document.createElement("script");r.src=("undefined"!=typeof window&&window.__MS_PREBUILT_UI_URL__?window.__MS_PREBUILT_UI_URL__:null)||(xt?"http://localhost:5500/packages/prebuilt-uis/public/build/main-dom.js":Dt?`${Nt}/dev/prebuilt-uis/v1.js`:`${Nt}/prebuilt-uis/v1.js`),r.async=!0,r.onload=()=>Mt(void 0,null,(function*(){if(yield new Promise((e=>setTimeout(e,0))),"undefined"!=typeof customElements&&customElements.get("memberstack-prebuilt-ui"))Bt=!0,t();else if(Ft=null,r.remove(),e>0){yield new Promise((e=>setTimeout(e,1e3)));try{yield qt(e-1),t()}catch(e){n(e)}}else n(new Error("Failed to load Memberstack modals: the script loaded but the modal component was not registered. This typically happens when the browser blocks the script body (CORS/ORB). If developing locally, set window.__MS_PREBUILT_UI_URL__ to a locally-served copy of the modal script."))})),r.onerror=()=>Mt(void 0,null,(function*(){if(Ft=null,r.remove(),e>0){yield new Promise((e=>setTimeout(e,1e3)));try{yield qt(e-1),t()}catch(e){n(e)}}else n(new Error("Failed to load Memberstack modals after multiple attempts. Check your internet connection and browser console for CORS/network errors. For local development, set window.__MS_PREBUILT_UI_URL__ to a locally-served copy."))})),document.head.appendChild(r)})))})),Vt=e=>{if(e)return void(e.style.display="block");const t=document.querySelector("[data-ms-loader]");if(t)return void(t.style.display="block");if(document.querySelector("[data-ms-modal-loader]"))return;if(!document.getElementById("ms-loader-styles")){const e=document.createElement("style");e.id="ms-loader-styles",e.textContent="\n @keyframes ms-spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n ",document.head.appendChild(e)}const n=document.createElement("div");n.setAttribute("data-ms-modal-loader","true"),n.style.cssText="position: fixed; inset: 0; display: flex; justify-content: center; align-items: center; z-index: 2147483647; pointer-events: none;";const r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("width","40"),r.setAttribute("height","40"),r.setAttribute("viewBox","0 0 50 50"),r.style.cssText="animation: ms-spin 0.6s linear infinite;";const o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("fill","#007ace"),o.setAttribute("d","M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"),r.appendChild(o),n.appendChild(r),"loading"!==document.readyState?document.body.appendChild(n):document.addEventListener("DOMContentLoaded",(function(e){document.body.appendChild(n)}))},jt=e=>{var t;if(e)return void(e.style.display="none");const n=document.querySelector("[data-ms-loader]");n?n.style.display="none":null==(t=document.querySelector("[data-ms-modal-loader]"))||t.remove()},Ht=null,Gt="_ms-mid",Kt=function(){try{return localStorage.setItem("test","test"),localStorage.removeItem("test"),!0}catch(e){return!1}}(),Wt=!1,$t=!1,zt="",Jt=e=>{var t,n;const r=e.split(".");return r.length>=4&&(null!=(n=null==(t=r[r.length-2])?void 0:t.length)?n:0)<=3?r.slice(-3).join("."):r.slice(-2).join(".")},Xt=(e,t)=>{if(Kt&&!1==(!!Wt&&(!$t||Jt(zt)===Jt(window.location.hostname))))localStorage.setItem(Gt,e);else{const n=Jt(window.location.hostname),r="undefined"!=typeof window&&"https:"===window.location.protocol;i.set(Gt,e,Ot(Ot({expires:t&&Number(t)||14,sameSite:"strict"},r&&{secure:!0}),$t&&{domain:n}))}},Yt=()=>{Kt&&localStorage.removeItem(Gt);const e=Jt(window.location.hostname),t="undefined"!=typeof window&&"https:"===window.location.protocol;i.set(Gt,"",Ot(Ot({expires:-1,sameSite:"strict"},t&&{secure:!0}),$t&&{domain:e}))},Qt=()=>{if(Kt){const e=localStorage.getItem(Gt);if(e)return e}return i.get(Gt)},Zt=()=>{if("undefined"==typeof window)return null;const e=window.localStorage.getItem("ms_session_id");return!e||e.length>26?(window.localStorage.removeItem("ms_session_id"),null):e},en="https://client.memberstack.com",tn=(()=>{const e=new Map;return{subscribe:(t,n)=>{if("function"==typeof n)return e.set(t,n)},unsubscribe:t=>e.delete(t),notify:t=>[...e.values()].forEach((e=>e(t)))}})(),nn=()=>{try{const e=null==localStorage?void 0:localStorage.getItem("_ms-mem");return e?JSON.parse(e):null}catch(e){return null}},rn=e=>{if(e){const t=JSON.stringify(e);t&&(null==localStorage||localStorage.setItem("_ms-mem",t)),tn.notify(e)}},on=()=>{null==localStorage||localStorage.removeItem("_ms-mem"),Yt(),"undefined"!=typeof window?window.localStorage.removeItem("ms_session_id"):console.warn("removeSessionId: window is not defined"),tn.notify(null)},sn=0;function an(e){const t=e-Date.now();return Math.ceil(t/864e5)}var cn,ln,dn,un=e=>{const t=e;return Ot({},(null==t?void 0:t.token)&&{Authorization:`Bearer ${t.token}`})},hn=e=>{var t;const{data:n,origin:r}=e;if(dn===r){if(null==(t=null==n?void 0:n.data)?void 0:t.member){const e=an(n.data.tokens.expires);rn(n.data.member),Xt(n.data.tokens.accessToken,e)}(null==n?void 0:n.error)&&(null==ln||ln(n.error)),null==cn||cn(n)}},mn=null,pn=null,fn=(e,t)=>Mt(void 0,null,(function*(){window.removeEventListener("message",hn);const n=void 0!==window.screenLeft?window.screenLeft:window.screenX,r=void 0!==window.screenTop?window.screenTop:window.screenY,o=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,i=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,s=o/window.screen.availWidth,a=`toolbar=no, menubar=no, width=${600/s}, height=${700/s}, top=${(i-700)/2/s+r}, left=${(o-600)/2/s+n}`;return null===mn||mn.closed?mn=window.open(e,t,a):pn!==e?null==(mn=window.open(e,t,a))||mn.focus():null==mn||mn.focus(),window.addEventListener("message",(e=>hn(e)),!1),pn=e,window.addEventListener("beforeunload",(()=>{null==mn||mn.close()})),new Promise(((e,t)=>{cn=e,ln=t}))}));function gn(){const e=navigator.userAgent;return/Edg/i.test(e)?"EDGE":/Trident/i.test(e)||/MSIE/i.test(e)?"INTERNET_EXPLORER":/Safari/i.test(e)&&!/Chrome/i.test(e)?"SAFARI":/Firefox/i.test(e)?"FIREFOX":/Chrome/i.test(e)&&!/Edg/i.test(e)?"CHROME":/OPR/i.test(e)||/Opera/i.test(e)?"OPERA":"OTHER"}function yn(){const e=navigator.userAgent;return/Windows/i.test(e)?"WINDOWS":/Macintosh|Mac OS X/i.test(e)?"MACOS":/Android/i.test(e)?"ANDROID":/iPhone|iPad|iPod/i.test(e)?"IOS":/Linux/i.test(e)?"LINUX":"OTHER"}function bn(){const e=window.innerWidth;return e<=768?"PHONE":e<=1024?"TABLET":"DESKTOP"}function vn(){const e=new URLSearchParams(window.location.search),t={};return["utm_source","utm_medium","utm_campaign","utm_term","utm_content"].forEach((n=>{e.has(n)&&(t[n]=e.get(n))})),t}function wn(){return{browser:gn(),os:yn(),screenSize:bn(),sessionId:Zt(),utmParams:vn()}}var _n=({publicKey:e,appId:t,token:n,domain:r})=>{const{sendRequest:o,sendRequestWithFetch:i}=(({publicKey:e,appId:t,token:n,customEndpoint:r})=>{const o=t=>{t&&"object"==typeof t&&"code"in t&&"generic-message"===t.code&&"message"in t&&"string"==typeof t.message&&t.message.toLowerCase().includes("disabled")&&!(null==e?void 0:e.includes("_sb_"))&&console.warn("[Memberstack] You're using a Live Mode key (pk_...). If your app hasn't been published yet, use the Test Mode key (pk_sb_...) from Dev Tools in your Memberstack dashboard.")};return{sendRequest:(n,i)=>Mt(void 0,null,(function*(){var s,a,c,l,d,u,h,m;try{const{url:u}=n,h=Qt(),m=Zt(),p=[null==(a=null==(s=n.headers)?void 0:s.Authorization)?void 0:a.replace("Bearer ",""),h,null==i?void 0:i.token].find((e=>e)),f=`${r||en}${u}`,g=yield _t({method:n.method,data:n.data,url:f,headers:Lt(Ot(Ot(Lt(Ot(Ot(Ot({},p&&{authorization:`Bearer ${p}`}),e&&{"X-API-Key":e}),t&&{"X-APP-ID":t}),{"X-User-Agent":"@memberstack/client@1.2.0"}),n.contentType&&{"Content-Type":n.contentType}),m&&{"X-Session-ID":m}),{"referring-path":window.location.pathname}),withCredentials:!0});if((null==(c=null==g?void 0:g.headers)?void 0:c["ms-mid"])&&g.headers["ms-mid"],null==(l=null==g?void 0:g.data)?void 0:l.error){if("JsonWebTokenError"===g.data.error.name)throw{code:"client/invalid-token",message:"An invalid token has been provided. Please make sure the token is valid."};throw o(g.data.error),null==(d=g.data)?void 0:d.error}return null==g?void 0:g.data}catch(e){const t=e;if(!t.response)throw{code:"network-error",message:(null==t?void 0:t.message)||"Network request failed. Please check your internet connection."};const n=(null==(h=null==(u=t.response)?void 0:u.data)?void 0:h.error)||(null==(m=t.response)?void 0:m.data);throw o(n),n}})),sendRequestWithFetch:(n,i)=>Mt(void 0,null,(function*(){var s,a;try{const{url:c,method:l,data:d,headers:u,contentType:h}=n,m=Qt(),p=[null==(s=null==u?void 0:u.Authorization)?void 0:s.replace("Bearer ",""),m,null==i?void 0:i.token].find((e=>e)),f=`${r||en}${c}`,g=Lt(Ot(Ot(Ot({},p&&{Authorization:`Bearer ${p}`}),e&&{"X-API-Key":e}),t&&{"X-APP-ID":t}),{"X-User-Agent":"@memberstack/client@1.2.0","Content-Type":"application/json",Referer:window.location.href}),y=yield fetch(f,{method:l,headers:g,body:d?JSON.stringify(d):void 0,credentials:"include",keepalive:!0}),b=y.headers.get("content-type");let v;if(v=(null==b?void 0:b.includes("application/json"))?yield y.json():(null==b?void 0:b.includes("text"))?yield y.text():204===y.status?null:yield y.text(),y.headers.get("ms-mid")&&y.headers.get("ms-mid"),!y.ok){if("JsonWebTokenError"===(null==(a=null==v?void 0:v.error)?void 0:a.name))throw{code:"client/invalid-token",message:"An invalid token has been provided. Please make sure the token is valid."};throw o((null==v?void 0:v.error)||v),(null==v?void 0:v.error)||v}return v}catch(e){if(e&&"object"==typeof e&&"code"in e&&"message"in e)throw e;throw{code:"network-error",message:(null==e?void 0:e.message)||"Network request failed. Please check your internet connection."}}}))}})({publicKey:e,token:n,customEndpoint:r,appId:t});return dn=r,{_Event(e){return Mt(this,null,(function*(){const t=Ot(Ot({},e.data),wn());return i({method:"POST",url:"/event",data:t})}))},deleteMember(){return Mt(this,null,(function*(){const e=yield o({method:"DELETE",url:"/member"});return on(),e}))},postIsTyping(e){return Mt(this,null,(function*(){return o({method:"POST",url:"/comments/posts/typing",data:{channelKey:e.channelKey}})}))},getChannelInfo(e){return Mt(this,null,(function*(){const t=new URLSearchParams({channelKey:e.channelKey});return o({method:"GET",url:`/comments/channels/info?${t}`})}))},subscribeToChannel(e){return Mt(this,null,(function*(){return o({method:"POST",url:"/comments/channels/manage-subscription",data:{channelKey:e.channelKey,action:e.action}})}))},getPosts(e){return Mt(this,null,(function*(){const t=new URLSearchParams(Ot(Ot(Ot({channelKey:e.channelKey},e.after&&{after:e.after}),e.order&&{order:e.order}),e.limit&&{limit:e.limit.toString()}));return o({method:"GET",url:`/comments/posts?${t}`})}))},getThreads(e){return Mt(this,null,(function*(){const t=new URLSearchParams(Ot(Ot(Ot({postId:e.postId},e.after&&{after:e.after}),e.order&&{order:e.order}),e.limit&&{limit:e.limit.toString()}));return o({method:"GET",url:`/comments/threads?${t}`})}))},createPost(e){return Mt(this,null,(function*(){return o({method:"POST",url:"/comments/posts",data:{channelKey:e.channelKey,content:e.content,_url:window.location.origin+window.location.pathname}})}))},updatePost(e){return Mt(this,null,(function*(){return o({method:"PATCH",url:`/comments/posts/${e.postId}/update`,data:{content:e.content}})}))},postVote(e){return Mt(this,null,(function*(){return o({method:"POST",url:`/comments/posts/${e.postId}/vote`,data:{vote:e.vote}})}))},deletePost(e){return Mt(this,null,(function*(){return o({method:"DELETE",url:`/comments/posts/${e.postId}`})}))},createThread(e){return Mt(this,null,(function*(){return o({method:"POST",url:"/comments/threads",data:{postId:e.postId,content:e.content}})}))},updateThread(e){return Mt(this,null,(function*(){return o({method:"PATCH",url:`/comments/threads/${e.threadId}/update`,data:{content:e.content}})}))},threadVote(e){return Mt(this,null,(function*(){return o({method:"POST",url:`/comments/threads/${e.threadId}/vote`,data:{vote:e.vote}})}))},deleteThread(e){return Mt(this,null,(function*(){return o({method:"DELETE",url:`/comments/threads/${e.threadId}`})}))},getSecureContent(e){return Mt(this,null,(function*(){return yield o({method:"POST",url:"/secure-content",data:{contentId:e.contentId}})}))},signupWithProvider(n){return Mt(this,null,(function*(){const o=encodeURIComponent(n.customFields?JSON.stringify(n.customFields):"{}"),i=encodeURIComponent(n.plans?JSON.stringify(n.plans):"[]"),s=wn(),a=new URLSearchParams(Lt(Ot(Lt(Ot(Ot({provider:n.provider,customFields:o,plans:i,appId:null!=t?t:""},e&&{publicKey:e}),n.inviteToken&&{inviteToken:n.inviteToken}),{url:window.location.pathname,origin:window.location.hostname}),s.sessionId&&{sessionId:s.sessionId}),{browser:s.browser,os:s.os,screenSize:s.screenSize}));return fn(`${r}/auth-provider/signup?${a}`,"signup")}))},loginWithProvider(n){return Mt(this,null,(function*(){const o=encodeURIComponent(!0===n.allowSignup?"true":"false"),i=new URLSearchParams(Lt(Ot({provider:n.provider,appId:null!=t?t:""},e&&{publicKey:e}),{origin:window.location.hostname,allowSignup:o}));return fn(`${r}/auth-provider/login?${i}`,"login")}))},connectProvider(n){return Mt(this,null,(function*(){const o=Qt(),i=new URLSearchParams(Lt(Ot(Ot({provider:n.provider,appId:null!=t?t:""},e&&{publicKey:e}),o&&{member:o}),{origin:window.location.hostname}));return fn(`${r}/auth-provider/connect?${i}`,"connect")}))},disconnectProvider(e){return Mt(this,null,(function*(){return o({method:"POST",url:"/member/disconnect-provider",data:{provider:e.provider}})}))},getAppAndMember(e){return Mt(this,null,(function*(){var t,n;const r=yield o({method:"POST",url:"/app-member",data:{data:{includeSSOText:null==window?void 0:window.ssoUI,trackPageView:null==e?void 0:e.trackPageView,sessionData:Ot({},wn())}}});try{const e=null==(n=null==(t=r.data)?void 0:t.sessionData)?void 0:n.sessionId;Zt()!==e&&(i=e,"undefined"!=typeof window?window.localStorage.setItem("ms_session_id",i):console.warn("setSessionId: window is not defined"))}catch(e){}var i;return r}))},getApp(){return Mt(this,null,(function*(){var e;const t=new URLSearchParams({includeSSOText:String(null!=(e=null==window?void 0:window.ssoUI)?e:"")});return o({method:"GET",url:`/app?${t}`})}))},loginMemberEmailPassword(e,t){return Mt(this,null,(function*(){const n=yield o({method:"POST",url:"/auth/login",data:{email:e.email,password:e.password,options:t}}),r=an(n.data.tokens.expires);return rn(n.data.member),Xt(n.data.tokens.accessToken,r),n}))},sendMemberLoginPasswordlessEmail(e,t){return Mt(this,null,(function*(){return yield o({method:"POST",url:"/auth/passwordless/login/send",data:{email:e.email}})}))},sendMemberSignupPasswordlessEmail(e,t){return Mt(this,null,(function*(){return yield o({method:"POST",url:"/auth/passwordless/signup/send",data:{email:e.email}})}))},loginMemberPasswordless(e,t){return Mt(this,null,(function*(){const n=yield o({method:"POST",url:"/auth/passwordless/login",data:{passwordlessToken:e.passwordlessToken,email:e.email,options:t}}),r=an(n.data.tokens.expires);return rn(n.data.member),Xt(n.data.tokens.accessToken,r),n}))},getPlan(e){return Mt(this,null,(function*(){return o({method:"GET",url:`/app/plans/${e.planId}`})}))},getPlans(){return Mt(this,null,(function*(){const{data:e}=yield o({method:"GET",url:"/app"});return{data:e.plans}}))},getRestrictedUrlGroups(){return Mt(this,null,(function*(){const{data:e}=yield o({method:"GET",url:"/app"});return{data:e.contentGroups}}))},getCurrentMember(e){return Mt(this,null,(function*(){if(!Qt())return{data:null};const t=o({method:"GET",url:"/member",headers:un(e)});return function(){Mt(this,null,(function*(){(e=>{if(e){const t=JSON.stringify(e);t&&(null==localStorage||localStorage.setItem("_ms-mem",t))}else null==localStorage||localStorage.removeItem("_ms-mem"),Yt()})((yield t).data)}))}(),!0===(null==e?void 0:e.useCache)?{data:nn()}:t}))},getMemberJSON(e){return Mt(this,null,(function*(){return o({method:"GET",url:"/member/json",headers:un(e)})}))},updateMemberJSON(e,t){return Mt(this,null,(function*(){return o({method:"POST",url:"/member/json",data:{json:e.json},headers:un(t)})}))},addPlan(e,t){return Mt(this,null,(function*(){var n;const r=yield o({method:"POST",url:"/member/plans/add",data:{planId:e.planId},headers:un(t)});return(null==(n=null==r?void 0:r.data)?void 0:n.member)&&rn(r.data.member),r}))},purchasePlansWithCheckout(e,t){return Mt(this,null,(function*(){function n(e){let t=window.location.href;const n=e;return n&&(t=0===n.indexOf("http://")||0===n.indexOf("https://")?n:window.location.origin+n),t}const r=e.successUrl?n(e.successUrl):void 0,i=e.cancelUrl?n(e.cancelUrl):window.location.href,s=yield o({method:"POST",url:"/member/plans/create-checkout-session",data:{priceId:e.priceId,couponId:e.couponId,metadataForCheckout:e.metadataForCheckout,success_url:r,cancel_url:i,origin_url:window.location.href,conversionData:Ot({url:window.location.pathname},wn())},headers:un(t)});return!1===e.autoRedirect||(window.location.href=s.data.url),s}))},launchStripeCustomerPortal(e,t){return Mt(this,null,(function*(){const n=(null==e?void 0:e.returnUrl)?function(e){let t=window.location.href;const n=e;return n&&(t=0===n.indexOf("http://")||0===n.indexOf("https://")?n:window.location.origin+n),t}(e.returnUrl):void 0,r=yield o({method:"POST",url:"/member/create-billing-portal-session",data:Ot({return_url:n,origin_url:window.location.href},e&&{priceIds:e.priceIds,configuration:e.configuration}),headers:un(t)});return!1===(null==e?void 0:e.autoRedirect)||(window.location.href=r.data.url),r}))},removePlan(e,t){return Mt(this,null,(function*(){var n;const r=yield o({method:"POST",url:"/member/plans/remove",data:{planId:e.planId},headers:un(t)});return(null==(n=null==r?void 0:r.data)?void 0:n.member)&&rn(r.data.member),r}))},updateMember(e,t){return Mt(this,null,(function*(){return o({method:"POST",url:"/member",data:Ot({},e.customFields&&{customFields:e.customFields}),headers:un(t)})}))},updateMemberAuth(e,t){return Mt(this,null,(function*(){return o({method:"POST",url:"/member-auth",data:Ot(Ot(Ot({},e.email&&{email:e.email}),e.oldPassword&&{oldPassword:e.oldPassword}),e.newPassword&&{newPassword:e.newPassword}),headers:un(t)})}))},setPassword(e,t){return Mt(this,null,(function*(){return o({method:"POST",url:"/member/set-password",data:{password:e.password},headers:un(t)})}))},signupMemberPasswordless(e,t){return Mt(this,null,(function*(){var n,r,i;const s=yield o({method:"POST",url:"/auth/signup?isPasswordless=true",data:Ot(Lt(Ot({email:e.email,customFields:e.customFields,passwordlessToken:e.passwordlessToken,metaData:e.metaData},e.plans&&{plans:e.plans}),{origin_domain:window.location.origin,conversionData:Ot(Lt(Ot({},null!=(n=null==e?void 0:e.conversionData)?n:{}),{url:window.location.pathname}),wn()),options:t}),(null==(r=window.Rewardful)?void 0:r.referral)&&{rewardfulData:{referral:window.Rewardful.referral,coupon:null==(i=window.Rewardful.coupon)?void 0:i.id}})}),a=an(s.data.tokens.expires);return rn(s.data.member),Xt(s.data.tokens.accessToken,a),s}))},signupMemberEmailPassword(e,t){return Mt(this,null,(function*(){var n,r,i;const s=yield o({method:"POST",url:"/auth/signup",data:Ot(Lt(Ot({email:e.email,password:e.password,customFields:e.customFields,metaData:e.metaData,captchaToken:e.captchaToken,inviteToken:e.inviteToken},e.plans&&{plans:e.plans}),{origin_domain:window.location.origin,conversionData:Ot(Lt(Ot({},null!=(n=null==e?void 0:e.conversionData)?n:{}),{url:window.location.pathname}),wn()),options:t}),(null==(r=window.Rewardful)?void 0:r.referral)&&{rewardfulData:{referral:window.Rewardful.referral,coupon:null==(i=window.Rewardful.coupon)?void 0:i.id}})}),a=an(s.data.tokens.expires);return rn(s.data.member),Xt(s.data.tokens.accessToken,a),s}))},joinTeam(e,t){return Mt(this,null,(function*(){return o({method:"POST",url:"/member/team/join",data:{inviteToken:e.inviteToken},headers:un(t)})}))},getTeam(e,t){return Mt(this,null,(function*(){return o({method:"GET",url:`/member/team/${e.teamId}`,headers:un(t)})}))},removeMemberFromTeam(e,t){return Mt(this,null,(function*(){return o({method:"POST",url:"/member/team/remove-member",data:{teamId:e.teamId,memberId:e.memberId},headers:un(t)})}))},generateInviteToken(e,t){return Mt(this,null,(function*(){return o({method:"POST",url:"/member/team/generate-invite-link",data:{teamId:e.teamId},headers:un(t)})}))},updateMemberProfileImage(e){return Mt(this,null,(function*(){if(null===e.profileImage)return o({method:"DELETE",url:"/member/profile-image"});const t=new FormData;return t.append("profileImage",e.profileImage),o({method:"POST",url:"/member/profile-image",data:t,contentType:"multipart/form-data"})}))},deleteMemberProfileImage(){return Mt(this,null,(function*(){return o({method:"DELETE",url:"/member/profile-image"})}))},sendMemberVerificationEmail(){return Mt(this,null,(function*(){return o({method:"POST",url:"/auth/send-email-verification",data:{origin_domain:window.location.origin}})}))},sendMemberResetPasswordEmail(e){return Mt(this,null,(function*(){return o({method:"POST",url:"/auth/send-reset-password-email",data:{email:e.email}})}))},resetMemberPassword(e){return Mt(this,null,(function*(){return o({method:"POST",url:"/auth/reset-password",data:{token:e.token,newPassword:e.newPassword}})}))},logout(e){return Mt(this,null,(function*(){const t=yield o({method:"POST",url:"/member/logout",headers:un(e)});return on(),t}))},getDataTables(e){return Mt(this,null,(function*(){return o({method:"GET",url:"/v1/data-tables",headers:un(e)})}))},getDataTable(e,t){return Mt(this,null,(function*(){return o({method:"GET",url:`/v1/data-tables/${e.table||e.tableKey}`,headers:un(t)})}))},getDataRecords(e,t){return Mt(this,null,(function*(){var n;const r={};(e.createdAfter||e.createdBefore)&&(r.where={createdAt:Ot(Ot({},e.createdAfter&&{gte:e.createdAfter}),e.createdBefore&&{lte:e.createdBefore})}),e.sortBy&&(r.orderBy={[e.sortBy]:e.sortDirection||"asc"}),e.limit&&(r.take=e.limit),e.after&&(r.after=e.after);const i=yield o({method:"POST",url:"/v1/data-records/query",data:{table:e.table||e.tableKey,query:{findMany:r}},headers:un(t)});return(null==(n=null==i?void 0:i.data)?void 0:n.records)?{data:Ot({records:i.data.records},i.data.pagination&&{pagination:i.data.pagination})}:i}))},createDataRecord(e,t){return Mt(this,null,(function*(){return o({method:"POST",url:"/v1/data-records",data:Ot({table:e.table,data:e.data},e.memberId&&{memberId:e.memberId}),headers:un(t)})}))},getDataRecord(e,t){return Mt(this,null,(function*(){var n;const r=yield o({method:"POST",url:"/v1/data-records/query",data:{table:e.table,query:{findUnique:{where:{id:e.recordId}}}},headers:un(t)});return(null==(n=null==r?void 0:r.data)?void 0:n.record)?{data:r.data.record}:r}))},updateDataRecord(e,t){return Mt(this,null,(function*(){return o({method:"PUT",url:`/v1/data-records/${e.recordId}`,data:{data:e.data},headers:un(t)})}))},deleteDataRecord(e,t){return Mt(this,null,(function*(){return o({method:"DELETE",url:`/v1/data-records/${e.recordId}`,headers:un(t)})}))},queryDataRecords(e,t){return Mt(this,null,(function*(){return o({method:"POST",url:"/v1/data-records/query",data:{table:e.table||e.tableKey,query:{findMany:e.query}},headers:un(t)})}))}}},En=!1;function Sn(e,...t){En&&console.log(`%c[Memberstack] ${e}`,"color: #6366f1;",...t)}var kn="1.2.0",Tn=!1,Pn=new Promise((e=>{"undefined"!=typeof window&&(window._hcaptchaReady=e)})),Cn={openModal:(e,...t)=>Mt(void 0,[e,...t],(function*(e,t={}){const n=!("inspector"===e.toLowerCase()||Bt);n&&Vt();try{yield qt()}catch(e){throw n&&jt(),console.warn("[Memberstack] Modal failed to load.",e instanceof Error?e.message:e,"\nHint: Set window.__MS_PREBUILT_UI_URL__ to override the CDN URL during local development."),e}finally{n&&jt()}if(Ht){try{Ht.remove()}catch(e){}Ut&&Ut({type:"CLOSED"}),Ht=null,Ut=void 0}const r=new Promise((e=>{Ut=e})),o=document.createElement("memberstack-prebuilt-ui");return o.display=e.toLowerCase(),o.params=t,o.onSuccess=Ut,Ht=o,document.body.appendChild(Ht),r})),hideModal:()=>{try{null==Ht||Ht.remove()}catch(e){}Ut&&Ut({type:"CLOSED"}),Ht=null,Ut=void 0},preloadModals:()=>qt(),_hideLoader:jt,_showLoader:Vt,_showMessage:(e,t,n)=>Mt(void 0,null,(function*(){if(!e)return;yield new Promise((e=>{"loading"!==document.readyState?e(!0):document.addEventListener("DOMContentLoaded",(function(t){e(!0)}))})),document.querySelector("[data-ms-message='success']")||((()=>{const e=document.createElement("style");e.setAttribute("data-ms-style",""),e.appendChild(document.createTextNode("\n\t\t@keyframes fadeIn {\n\t\t\t0% {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\t100% {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t\t.ms-error-message { \n\t\t\t\tposition: fixed;\n\t\t\t\tleft: 50%;\n\t\t\t\tbottom: 3%;\n\t\t\t\ttransform: translate(-50%, -50%);\n\t\t\t\tmargin: 0 auto;\n\t\t\t\tz-index: 10000000; \n\t\t\t\tdisplay: flex; \n\t\t\t\talign-items: center;\n\t\t\t\tpadding: 12px 16px;\n\t\t\t\tborder-radius: 8px; \n\t\t\t\tbackground-color: #0A0A0A; \n\t\t\t\tcolor: #fff; \n\t\t\t\tfont-size: 16.8px; \n\t\t\t\tline-height: 28px; \n\t\t\t\tfont-weight: 500; \n\t\t\t\ttransform-origin: center;\n\t\t\t\tanimation: fadeIn 0.2s ease-in;\n\t\t\t\t-webkit-animation: fadeIn 0.2s ease-in;\n\t\t\t\t-moz-animation: fadeIn 0.2s ease-in;\n\t\t\t\t-o-animation: fadeIn 0.2s ease-in;\n\t\t\t\t-ms-animation: fadeIn 0.2s ease-in;\n\t\t\t}\n\t\t\t@media screen and (max-width: 768px) {\n\t\t\t\t.ms-error-message {\n\t\t\t\t\tbottom: 12px;\n\t\t\t\t\twidth: calc(100% - 24px);\n\t\t\t\t\tmax-width: none;\n\t\t\t\t\tpadding: 10px 12px;\n\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\tline-height: 20px;\n\t\t\t\t}\n\t\t\t}\n\t\t\t#ms-status-icon {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tmargin-right: 12px;\n\t\t\t\t}\n\t\t\t\t#ms-status-close {\n\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t}\n\t\t\t\t\t#ms-status-close svg {\n\t\t\t\t\t\theight: 12px;\n\t\t\t\t\t}")),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ms-status-icon"),e.innerHTML='';const t=`
\n\t\t${e.outerHTML}\n\t\t
\n\t\t${Et.outerHTML}\n\t\t
`,n=document.createElement("div");n.setAttribute("data-ms-message","success"),n.innerHTML=t,n.style.display="none",document.body.appendChild(n)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ms-status-icon"),e.innerHTML='';const t=`
\n\t\t${e.outerHTML}\n\t\t
\n\t\t${Et.outerHTML}\n\t\t
`,n=document.createElement("div");n.setAttribute("data-ms-message","error"),n.innerHTML=t,n.style.display="none",document.body.appendChild(n)})());const r=t?"[data-ms-message='error']":"[data-ms-message='success']";let o=null;if(n&&(o=n.querySelector(r)),o||(o=document.querySelector(r)),!o)return;const i=o.querySelector("[data-ms-message-text]");i&&(i.textContent=e),o.style.display="block";const s=o.querySelector("[data-ms-message-close]");null==s||s.addEventListener("click",(()=>{o.style.display="none"})),setTimeout((()=>{o.style.display="none"}),7e3)})),getMemberCookie:Qt,onAuthChange:e=>{const t=sn++;return tn.subscribe(t,e),{unsubscribe:()=>tn.unsubscribe(t)}},_captchaReady:Pn};function An(){on(),Tn=!1,"undefined"!=typeof window&&(delete window.$memberstackDom,delete window.__MEMBERSTACK_DEBUG__)}var In={init:e=>function(e){e.debug&&(En=!0,"undefined"!=typeof window&&console.log("%c[Memberstack] Debug mode enabled","color: #6366f1; font-weight: bold;"),Sn(`Initializing Memberstack SDK v${kn}`),Sn("Config:",{publicKey:e.publicKey?`${e.publicKey.slice(0,10)}...`:void 0,appId:e.appId,useCookies:e.useCookies,domain:e.domain})),Tn&&e.debug&&console.warn("[Memberstack] init() called multiple times. Previous instance will be replaced. This is usually unintentional — call init() once at app startup."),void 0!==e.sessionDurationDays&&console.warn("[Memberstack] sessionDurationDays is deprecated and no longer used. Session duration is now controlled server-side. You can safely remove this option."),Tn=!0;const t=e.domain||en||"https://client.memberstack.com";var n;(e=>{try{if(e.startsWith("http://")||e.startsWith("https://")){const t=new URL(e);zt=t.hostname}else zt=e}catch(t){zt=e}})(t),e.useCookies&&(n=e.setCookieOnRootDomain,Wt=!0,n&&($t=!0)),(()=>{if("undefined"!=typeof window){const e=new URLSearchParams(window.location.search),t=e.get("memberToken");if(t){Xt(t),e.delete("memberToken");const n=e.toString(),r=n?`${window.location.pathname}?${n}${window.location.hash}`:`${window.location.pathname}${window.location.hash}`;window.history.replaceState({},"",r)}}})();const r=_n({publicKey:e.publicKey,appId:e.appId,token:Qt(),domain:t}),o=Object.assign(Cn,r,{destroy:An});var i;return"undefined"!=typeof window&&(window.$memberstackDom=o,e.debug&&(i={config:{publicKey:e.publicKey,appId:e.appId},getMember:()=>nn(),version:kn},"undefined"!=typeof window&&En&&(window.__MEMBERSTACK_DEBUG__={version:i.version,config:{publicKey:i.config.publicKey,appId:i.config.appId},getMember:i.getMember,isAuthenticated:()=>null!==i.getMember(),timestamp:(new Date).toISOString()},Sn("DevTools integration initialized. Access via window.__MEMBERSTACK_DEBUG__")))),e.debug&&Sn("SDK initialized successfully"),o}(e)},On={INVALID_CREDENTIALS:"invalid-credentials",INVALID_TOKEN:"client/invalid-token",MEMBER_NOT_FOUND:"member-not-found",INVALID_RESET_CODE:"invalid-reset-code",INVALID_PASSWORDLESS_CODE:"invalid-passwordless-login-code",LOGIN_REQUIRED:"login-required",EMAIL_ALREADY_EXISTS:"email-already-in-use",USE_SOCIAL_LOGIN:"use-social-login",USE_EMAIL_LOGIN:"use-email-login",NO_PASSWORD_SET:"no-password-set",ACCOUNT_ALREADY_CONNECTED:"account-already-connected",ACCOUNT_NOT_CONNECTED:"account-not-connected",ACCOUNT_CONNECT_FAILED:"account-connect-failed",ACCOUNT_CONNECT_REQUIRES_LOGIN:"account-connect-requires-login",ACCOUNT_SET_PASSWORD_FIRST:"account-set-password-before-disconnect",ACCOUNT_NOT_FOUND:"account-not-found",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"invalid-password",PASSWORD_TOO_SHORT:"invalid-password-too-short",REQUIRED_FIELD_MISSING:"required-field-missing",INVALID_CAPTCHA:"invalid-captcha",PLAN_NOT_FOUND:"plan-not-found",NO_PLAN_FOUND:"no-plan-found",ALREADY_HAS_PLAN:"already-have-plan",PLAN_NOT_FREE:"plan-not-free",PLAN_MEMBER_LIMIT_REACHED:"plan-member-limit-reached",PLAN_RESTRICTED_TO_ADMIN:"plan-restricted-to-admin",DOMAIN_NOT_PERMITTED:"domain-not-permitted",PRICE_NOT_AVAILABLE:"price-no-longer-available",TEAM_FULL:"team-full",ONE_ACTIVE_TEAM_ONLY:"can-only-have-one-active-team",CANNOT_CHANGE_TEAM:"cannot-change-team-account",INVALID_FILE_TYPE:"invalid-file-type",FILE_TOO_LARGE:"file-size-too-large",DATA_TABLE_NOT_FOUND:"data-table-not-found",DATA_RECORD_NOT_FOUND:"data-record-not-found",INVALID_TABLE_KEY:"invalid-table-key",UNIQUE_CONSTRAINT_VIOLATION:"unique-constraint-violation",FIELD_LIMIT_EXCEEDED:"field-limit-exceeded",INVALID_FIELD_TYPE:"invalid-field-type",INVALID_FIELD_VALUE:"invalid-field-value",ACCESS_DENIED:"access-denied",APP_NOT_FOUND:"app-not-found",TEST_MODE_LIMIT_REACHED:"test-mode-member-limit-reached",NETWORK_ERROR:"network-error",UNKNOWN_ERROR:"unknown-error"},Ln={[On.INVALID_CREDENTIALS]:{message:"Invalid email or password. Please check your credentials and try again.",category:"authentication",suggestions:["Verify the email address is spelled correctly","Check if Caps Lock is enabled when entering the password","Use sendMemberResetPasswordEmail() if you forgot your password","Check if the account was created with a social login provider instead"],docsUrl:"https://docs.memberstack.com/dom/authentication/login"},[On.EMAIL_ALREADY_EXISTS]:{message:"An account with this email already exists.",category:"conflict",suggestions:["Use loginMemberEmailPassword() to sign in instead","Use sendMemberResetPasswordEmail() if you forgot your password","Check if the account was created with social login"],docsUrl:"https://docs.memberstack.com/dom/authentication/login"},[On.USE_SOCIAL_LOGIN]:{message:"This account uses social login. Please sign in with your social provider.",category:"authentication",suggestions:["Use loginWithProvider() with the appropriate provider","Check which social providers are connected to this account","If you want to add email/password login, use setPassword() after logging in"],docsUrl:"https://docs.memberstack.com/dom/authentication/social-login"},[On.USE_EMAIL_LOGIN]:{message:"This account uses email/password login. Please sign in with your email.",category:"authentication",suggestions:["Use loginMemberEmailPassword() instead of social login","Use sendMemberResetPasswordEmail() if you forgot your password"],docsUrl:"https://docs.memberstack.com/dom/authentication/login"},[On.NO_PASSWORD_SET]:{message:"No password is set for this account. Please set a password first.",category:"authentication",suggestions:["Use sendMemberResetPasswordEmail() to set a password","Check your email for the password reset instructions","If you signed up with social login, you may need to add a password"],docsUrl:"https://docs.memberstack.com/dom/authentication/password-reset"},[On.LOGIN_REQUIRED]:{message:"Authentication required. Please log in to access this resource.",category:"authentication",suggestions:["Call loginMemberEmailPassword() or loginWithProvider() first","Check if the member's session has expired","Verify the authentication token is being sent in requests"],docsUrl:"https://docs.memberstack.com/dom/authentication"},[On.INVALID_RESET_CODE]:{message:"The password reset code is invalid or has expired.",category:"authentication",suggestions:["Request a new password reset email using sendMemberResetPasswordEmail()","Reset codes expire after 1 hour - check if the code has expired","Ensure you're using the most recent reset code if multiple were requested"],docsUrl:"https://docs.memberstack.com/dom/authentication/password-reset"},[On.INVALID_PASSWORDLESS_CODE]:{message:"The verification code is invalid or has expired.",category:"authentication",suggestions:["Request a new verification code using sendMemberLoginPasswordlessEmail()","Verification codes expire after 10 minutes","Check for typos when entering the code"],docsUrl:"https://docs.memberstack.com/dom/authentication/passwordless"},[On.INVALID_EMAIL]:{message:"The email address format is invalid.",category:"validation",suggestions:["Ensure the email follows the format: name@domain.com","Check for accidental spaces before or after the email","Verify special characters are properly encoded"]},[On.PASSWORD_TOO_SHORT]:{message:"Password must be at least 8 characters.",category:"validation",suggestions:["Use a password with 8 or more characters","Consider using a mix of letters, numbers, and symbols for better security"],docsUrl:"https://docs.memberstack.com/dom/authentication/signup"},[On.PLAN_NOT_FOUND]:{message:"The specified plan does not exist.",category:"not_found",suggestions:["Use getPlans() to list all available plans","Verify the plan ID is correct","Check if the plan exists in the current environment (SANDBOX vs LIVE)","Ensure the plan has been published"],docsUrl:"https://docs.memberstack.com/dom/plans"},[On.ALREADY_HAS_PLAN]:{message:"This member already has this plan.",category:"conflict",suggestions:["Use getCurrentMember() to check the member's current plans","Use removePlan() if you need to remove and re-add the plan","Consider updating the plan instead of adding it again"],docsUrl:"https://docs.memberstack.com/dom/plans"},[On.PLAN_NOT_FREE]:{message:"This plan requires payment information.",category:"payment",suggestions:["Use purchasePlansWithCheckout() for paid plans","Collect payment information before adding the plan","Check if a free trial is available for this plan"],docsUrl:"https://docs.memberstack.com/dom/payments"},[On.DATA_TABLE_NOT_FOUND]:{message:"The specified data table does not exist.",category:"data_tables",suggestions:["Verify the table ID or key is correct","Check if the table exists in the dashboard","Ensure you have permission to access this table"],docsUrl:"https://docs.memberstack.com/data-tables"},[On.DATA_RECORD_NOT_FOUND]:{message:"The specified record was not found in the table.",category:"data_tables",suggestions:["Verify the record ID is correct","Check if the record was deleted","Query the table to find available records"],docsUrl:"https://docs.memberstack.com/data-tables"},[On.APP_NOT_FOUND]:{message:"Application not found. Check your public key.",category:"not_found",suggestions:["Verify your public key is correct in your Memberstack configuration","Check if you're using the correct environment (SANDBOX vs LIVE)","Ensure the app exists in your Memberstack dashboard"],docsUrl:"https://docs.memberstack.com/getting-started"},[On.TEST_MODE_LIMIT_REACHED]:{message:"Sandbox mode is limited to 50 members for testing.",category:"limit",suggestions:["Delete unused test members to continue testing","Switch to LIVE mode for production use","Use the dashboard to bulk delete test members"],docsUrl:"https://docs.memberstack.com/dashboard/environments"},[On.INVALID_FILE_TYPE]:{message:"Invalid file type. Only PNG, JPG, and JPEG images are supported.",category:"validation",suggestions:["Convert your image to PNG, JPG, or JPEG format","Check the file extension matches the actual file type","Use an image converter tool if needed"]},[On.FILE_TOO_LARGE]:{message:"File size exceeds the 1MB limit.",category:"validation",suggestions:["Compress the image to reduce file size","Use a lower resolution version of the image","Try an online image compression tool"]},[On.TEAM_FULL]:{message:"This team has reached its seat limit.",category:"limit",suggestions:["Contact the team owner to add more seats","Remove inactive team members to free up space","Upgrade the team's plan for more seats"],docsUrl:"https://docs.memberstack.com/dom/teams"},[On.NETWORK_ERROR]:{message:"Network request failed. Please check your connection.",category:"network",suggestions:["Check your internet connection","Try refreshing the page","If the problem persists, contact support"]},[On.INVALID_TOKEN]:{message:"Your session has expired. Please log in again.",category:"authentication",suggestions:["Call logout() then log in again","Check if cookies are enabled in your browser","Clear your browser cache and try again"],docsUrl:"https://docs.memberstack.com/dom/authentication"},[On.MEMBER_NOT_FOUND]:{message:"No member found with this identifier.",category:"authentication",suggestions:["Verify the email address is correct","The member may not have signed up yet — use signupMemberEmailPassword()","Check if the member exists in the correct environment (SANDBOX vs LIVE)"],docsUrl:"https://docs.memberstack.com/dom/authentication/login"},[On.ACCOUNT_NOT_FOUND]:{message:"No account found with these credentials.",category:"authentication",suggestions:["The member may need to sign up first","Check if the account was created with a different auth method (email vs social)","Verify the correct environment (SANDBOX vs LIVE)"]},[On.ACCOUNT_ALREADY_CONNECTED]:{message:"This social account is already connected.",category:"conflict",suggestions:["Use disconnectProvider() first if you need to reconnect","Check the member's connected providers with getCurrentMember()"],docsUrl:"https://docs.memberstack.com/dom/authentication/social-login"},[On.ACCOUNT_NOT_CONNECTED]:{message:"This social account is not connected to the member.",category:"not_found",suggestions:["Use connectProvider() to connect the social account first","Check the member's connected providers with getCurrentMember()"],docsUrl:"https://docs.memberstack.com/dom/authentication/social-login"},[On.ACCOUNT_CONNECT_FAILED]:{message:"Failed to connect the social account.",category:"authentication",suggestions:["Try the connection again — this may be a temporary issue","Ensure the social provider is enabled in your Memberstack dashboard","Check that the OAuth redirect URLs are configured correctly"],docsUrl:"https://docs.memberstack.com/dom/authentication/social-login"},[On.ACCOUNT_CONNECT_REQUIRES_LOGIN]:{message:"You must be logged in to connect a social account.",category:"authentication",suggestions:["Call loginMemberEmailPassword() or loginWithProvider() first","Use getCurrentMember() to verify the member is authenticated"],docsUrl:"https://docs.memberstack.com/dom/authentication/social-login"},[On.ACCOUNT_SET_PASSWORD_FIRST]:{message:"Set a password before disconnecting your last login provider.",category:"authentication",suggestions:["Use setPassword() to add a password before disconnecting","This prevents the member from being locked out of their account"],docsUrl:"https://docs.memberstack.com/dom/authentication/social-login"},[On.INVALID_PASSWORD]:{message:"The password is incorrect.",category:"authentication",suggestions:["Check that the current password is entered correctly","Use sendMemberResetPasswordEmail() to reset the password"]},[On.REQUIRED_FIELD_MISSING]:{message:"A required field is missing.",category:"validation",suggestions:["Check that all required parameters are provided","Review the method documentation for required fields","Custom fields marked as required in the dashboard must be included on signup"]},[On.INVALID_CAPTCHA]:{message:"CAPTCHA verification failed.",category:"validation",suggestions:["Ensure the CAPTCHA token is passed as captchaToken in the request","The token may have expired — request a new CAPTCHA challenge","Check that CAPTCHA is correctly configured in your Memberstack dashboard"]},[On.NO_PLAN_FOUND]:{message:"The member does not have this plan.",category:"not_found",suggestions:["Use getCurrentMember() to check the member's current plans","Verify the plan ID is correct","The plan may have been removed or expired"],docsUrl:"https://docs.memberstack.com/dom/plans"},[On.PLAN_MEMBER_LIMIT_REACHED]:{message:"This plan has reached its member limit.",category:"limit",suggestions:["Contact the app owner to increase the plan's member limit","Check if a different plan is available"],docsUrl:"https://docs.memberstack.com/dom/plans"},[On.PLAN_RESTRICTED_TO_ADMIN]:{message:"This plan can only be assigned by an admin.",category:"authorization",suggestions:["Plans with this restriction cannot be self-assigned by members","Use the Admin API or dashboard to assign this plan"],docsUrl:"https://docs.memberstack.com/dom/plans"},[On.DOMAIN_NOT_PERMITTED]:{message:"Your email domain is not permitted for this plan.",category:"authorization",suggestions:["This plan restricts signup to specific email domains","Check the plan's domain restrictions in your Memberstack dashboard","Use an email address with an allowed domain"],docsUrl:"https://docs.memberstack.com/dom/plans"},[On.PRICE_NOT_AVAILABLE]:{message:"This pricing option is no longer available.",category:"not_found",suggestions:["Use getPlans() to see currently available pricing options","The price may have been archived or deactivated","Check your Stripe dashboard for the price status"],docsUrl:"https://docs.memberstack.com/dom/payments"},[On.ONE_ACTIVE_TEAM_ONLY]:{message:"A member can only belong to one active team.",category:"conflict",suggestions:["Remove the member from their current team first using removeMemberFromTeam()","Check the member's current team with getTeam()"],docsUrl:"https://docs.memberstack.com/dom/teams"},[On.CANNOT_CHANGE_TEAM]:{message:"Cannot change team while it has active members.",category:"conflict",suggestions:["Remove all team members before making this change","Use removeMemberFromTeam() to remove members first"],docsUrl:"https://docs.memberstack.com/dom/teams"},[On.INVALID_TABLE_KEY]:{message:"The table key format is invalid.",category:"data_tables",suggestions:["Table keys should be lowercase alphanumeric with hyphens","Use getDataTables() to list available tables and their keys","Check the table key in your Memberstack dashboard"],docsUrl:"https://docs.memberstack.com/data-tables"},[On.UNIQUE_CONSTRAINT_VIOLATION]:{message:"A record with this value already exists (unique constraint).",category:"data_tables",suggestions:["The field has a unique constraint — use a different value","Use queryDataRecords() to check for existing records before creating","If updating, use updateDataRecord() instead of createDataRecord()"],docsUrl:"https://docs.memberstack.com/data-tables"},[On.FIELD_LIMIT_EXCEEDED]:{message:"Maximum number of fields reached for this table.",category:"data_tables",suggestions:["Remove unused fields before adding new ones","Consider using a separate table for additional data","Check your plan's field limits in the dashboard"],docsUrl:"https://docs.memberstack.com/data-tables"},[On.INVALID_FIELD_TYPE]:{message:"This field type is not supported.",category:"data_tables",suggestions:["Check the supported field types in the documentation","Use getDataTable() to see the table schema and field types"],docsUrl:"https://docs.memberstack.com/data-tables"},[On.INVALID_FIELD_VALUE]:{message:"The field value does not match the expected type.",category:"data_tables",suggestions:["Check the field type — e.g., number fields require numeric values","Use getDataTable() to see the expected field types","Ensure dates are in ISO 8601 format for date fields"],docsUrl:"https://docs.memberstack.com/data-tables"},[On.ACCESS_DENIED]:{message:"You do not have permission to access this resource.",category:"authorization",suggestions:["Check that the member has the required plan or permissions","Verify the content group configuration in the dashboard","Use getCurrentMember() to check the member's permissions array"],docsUrl:"https://docs.memberstack.com/dom/content-protection"},[On.UNKNOWN_ERROR]:{message:"An unexpected error occurred.",category:"unknown",suggestions:["Try the request again","Check the Memberstack status page for any ongoing issues","If the problem persists, contact support with the error details"]}};function Mn(e){return e.toLowerCase().replace(/_/g,"-")}function Rn(e){if(Ln[e])return Ln[e];const t=Mn(e);for(const e of Object.keys(Ln))if(Mn(e)===t)return Ln[e]}var Dn=new Set(Object.values(On));function xn(e){if("object"!=typeof e||null===e||!("code"in e)||!("message"in e)||"string"!=typeof e.code||"string"!=typeof e.message)return!1;const t=e.code;return!(!Dn.has(t)&&!Dn.has(Mn(t)))||t.includes("-")||t.includes("/")}function Nn(e,t="An unexpected error occurred"){return xn(e)||e instanceof Error?e.message:"string"==typeof e?e:t}function Un(e){if(xn(e))return e.code}function Bn(e,t){return!!xn(e)&&(e.code===t||e.code.toLowerCase().replace(/_/g,"-")===t.toLowerCase().replace(/_/g,"-"))}function Fn(e){if(!xn(e))return[];if(e.suggestions&&e.suggestions.length>0)return e.suggestions;const t=Rn(e.code);return(null==t?void 0:t.suggestions)||[]}function qn(e){if(!xn(e))return;if(e.docsUrl)return e.docsUrl;const t=Rn(e.code);return null==t?void 0:t.docsUrl}function Vn(e){if(!xn(e))return"unknown";if(e.category)return e.category;const t=Rn(e.code);return(null==t?void 0:t.category)||"unknown"}function jn(e){if(!xn(e))return"An unexpected error occurred. Please try again.";const t=Rn(e.code);return t?t.message:"Something went wrong. Please try again or contact support."}function Hn(e){return xn(e)?{code:e.code,message:e.message,category:Vn(e),statusCode:e.statusCode,suggestions:Fn(e),docsUrl:qn(e)}:{code:void 0,message:e instanceof Error?e.message:"Unknown error",category:"unknown",statusCode:void 0,suggestions:[],docsUrl:void 0}}var Gn={init:In.init}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__(230),__webpack_require__(966);var e=__webpack_require__(75),t=__webpack_require__(593),n=__webpack_require__(517),r=__webpack_require__(588),o=__webpack_require__(629),i=__webpack_require__(582);function s(){(0,o.secureContent)(),(0,r.removeContent)(),(0,i.initChannels)(),(0,n.initMemberText)(),(0,n.initLoader)(),(0,n.initMessageBoxes)(),(0,n.handleMessagesOnLoad)(),(0,e.initLoginForms)(),(0,e.initPasswordlessLoginForms)(),(0,e.initPasswordlessSingupForms)(),(0,e.initSignupForms)(),(0,e.initForgotPasswordForm)(),(0,e.initResetPasswordForm)(),(0,e.initProfileForms)(),(0,e.initUpdateEmailForms)(),(0,e.initChangePasswordForms)(),(0,e.initConnectAuthProviderForms)(),(0,t.initProfileImageButtons)(),(0,t.initOpenCustomerPortalButtons)(),(0,t.initLoginRedirectButtons)(),(0,t.initLoginModalButtons)(),(0,t.initSignupModalButtons)(),(0,t.initForgotPasswordModalButtons)(),(0,t.initProfileModalButtons)(),(0,t.initSignupButtons)(),(0,t.initLogoutButtons)(),(0,t.initLaunchCheckoutButtons)(),(0,t.initUpdatePlanButtons)(),(0,t.initPlanRemoveButtons)(),(0,t.initRemoveSelectedPriceButtons)(),(0,t.resendVerificationEmail)(),(0,t.initReturnToCheckoutButtons)(),(0,t.redirectOverrideButtons)(),(0,t.deleteMemberButtons)(),(0,n.inspectorToolInit)()}(0,r.protectPages)(),(0,r.initCSS)(),"loading"!==document.readyState?s():document.addEventListener("DOMContentLoaded",(function(e){s()})),(0,n.emitMemberstackReadyEvent)()})()})();