1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[648],{3274:function(e,t,n){var r=n(5787).w_;e.exports.A=function(e){return r({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}}]})(e)}},4232:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/project/[projectId]/checkout/[paddleId]",function(){return n(1723)}])},1723:function(e,t,n){"use strict";n.r(t);var r=n(7568),a=n(4051),u=n.n(a),l=n(5893),o=n(4298),i=n.n(o),s=n(5675),c=n.n(s),d=n(7294),v=n(1664),p=n.n(v),h=n(3274),f=n(8100),m=n(1984),x=n(2779),N=n(7729),D=n(6010),g=n(1163),w={month:"Monthly",year:"Yearly"},S={Standard:"For small teams. Up to 5 users and 500 pages.",Premium:"For medium and large teams."};t.default=function(){var e,t,n,a,o,s,v,R,j,P,y,b,C,M,A,B,T,K,k,L,E,Z,F,G,O,U,H,I,Y=(0,g.useRouter)(),_=(0,d.useState)(null),W=_[0],J=_[1],V=(0,x.g)((function(e){return e.setShow})),X=(0,d.useState)("address"),q=X[0],$=X[1],Q=(0,f.ZP)("me",m.me).data;(0,d.useEffect)((function(){return V(!0),(0,r.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))(),function(){V(!1)}}),[V]);var z=function(){var e=(0,r.Z)(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout((function(){Y.push("/admin/project/".concat(Y.query.projectId,"/general"))}),5e3);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ee=(0,d.useMemo)((function(){var e,t,n,r,a,u,l,o;return(null===N.h||void 0===N.h?void 0:N.h[null===W||void 0===W||null===(e=W.eventData)||void 0===e||null===(t=e.checkout)||void 0===t||null===(n=t.prices)||void 0===n||null===(r=n.customer)||void 0===r?void 0:r.currency])||(null===N.h||void 0===N.h?void 0:N.h[null===W||void 0===W||null===(a=W.eventData)||void 0===a||null===(u=a.checkout)||void 0===u||null===(l=u.prices)||void 0===l||null===(o=l.vendor)||void 0===o?void 0:o.currency])||""}),[null===W||void 0===W||null===(e=W.eventData)||void 0===e||null===(t=e.checkout)||void 0===t||null===(n=t.prices)||void 0===n||null===(a=n.customer)||void 0===a?void 0:a.currency,null===W||void 0===W||null===(o=W.eventData)||void 0===o||null===(s=o.checkout)||void 0===s||null===(v=s.prices)||void 0===v||null===(R=v.vendor)||void 0===R?void 0:R.currency]),te=(0,d.useMemo)((function(){var e,t,n,r;return(null===W||void 0===W||null===(e=W.eventData)||void 0===e||null===(t=e.checkout)||void 0===t||null===(n=t.prices)||void 0===n||null===(r=n.customer)||void 0===r?void 0:r.total)||0}),[null===W||void 0===W||null===(j=W.eventData)||void 0===j||null===(P=j.checkout)||void 0===P||null===(y=P.prices)||void 0===y||null===(b=y.customer)||void 0===b?void 0:b.total]),ne=(0,d.useMemo)((function(){var e,t,n,r;return(null===W||void 0===W||null===(e=W.eventData)||void 0===e||null===(t=e.checkout)||void 0===t||null===(n=t.prices)||void 0===n||null===(r=n.customer)||void 0===r?void 0:r.total_tax)||0}),[null===W||void 0===W||null===(C=W.eventData)||void 0===C||null===(M=C.checkout)||void 0===M||null===(A=M.prices)||void 0===A||null===(B=A.customer)||void 0===B?void 0:B.total_tax]),re=(0,d.useMemo)((function(){var e=100*ne/(te-ne);return Math.round(100*(e+Number.EPSILON))/100}),[ne,te]);return Q?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i(),{strategy:"lazyOnload",src:"https://cdn.paddle.com/paddle/paddle.js",onLoad:function(){var e,t,n,a;console.log("On paddle load"),window.Paddle.Setup({vendor:148011,eventCallback:function(){var e=(0,r.Z)(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("eventCallback",t,J),"Checkout.Location.Submit"===(null===t||void 0===t?void 0:t.event)&&$("payment"),J(t),"Checkout.Loaded"===t.event?(console.log(t.eventData),V(!1)):"Checkout.Complete"===t.event?(console.log(t.eventData),z(t.eventData.checkout.id)):"Checkout.Close"===t.event&&console.log(t.eventData);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()});var l=(null===(e=window)||void 0===e?void 0:e.Rewardful)&&(null===(t=window)||void 0===t||null===(n=t.Rewardful)||void 0===n?void 0:n.referral);window.Paddle.Checkout.open({method:"inline",product:null===Y||void 0===Y?void 0:Y.query.paddleId,email:null===Q||void 0===Q||null===(a=Q.data)||void 0===a?void 0:a.email,allowQuantity:!1,disableLogout:!0,frameTarget:"checkout-container",frameInitialHeight:400,passthrough:JSON.stringify({projectId:Y.query.projectId,rewardful:{referral:l}}),frameStyle:"width:100%; min-width:312px; background-color: transparent; border: none;"})}}),(0,l.jsxs)("div",{className:"flex flex-col flex-auto h-full min-h-screen lg:flex-row",children:[(0,l.jsx)("div",{className:"flex justify-center w-full bg-white lg:hidden",children:(0,l.jsx)(c(),{src:"/images/logo_suncel_pink.svg",alt:"",width:150,height:50})}),(0,l.jsx)("div",{className:"px-4 bg-gray-800 shrink-0 lg:order-2 lg:min-w-0 lg:flex-1 lg:px-20 lg:basis-auto",children:(0,l.jsx)("div",{className:"grid max-w-md grid-cols-1 mx-auto lg:mx-0 lg:max-w-lg",children:(0,l.jsx)("div",{className:"relative pb-10 lg:pt-24",children:(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("div",{className:"flex mt-10 space-x-3 lg:mt-0",children:(0,l.jsxs)("span",{className:"px-3 text-sm font-semibold leading-6 text-white rounded-full bg-magenta",children:[null===W||void 0===W||null===(T=W.eventData)||void 0===T||null===(K=T.product)||void 0===K?void 0:K.name," plan"]})}),(0,l.jsxs)("div",{className:"flex items-center mt-4 space-x-3",children:[(0,l.jsx)("p",{className:"text-4xl font-bold text-white",children:"".concat(ee).concat(te)}),(0,l.jsxs)("p",{className:"text-sm font-semibold text-magenta-200",children:[(null===w||void 0===w?void 0:w[null===W||void 0===W||null===(k=W.eventData)||void 0===k||null===(L=k.checkout)||void 0===L||null===(E=L.recurring_prices)||void 0===E||null===(Z=E.interval)||void 0===Z?void 0:Z.type])||""," ","payment"]})]}),(0,l.jsxs)("p",{className:"mt-1 text-gray-100 lg:hidden",children:["Includes ","".concat(ee).concat(ne)," tax"]}),(0,l.jsx)("p",{className:"mt-6 text-base leading-7 text-magenta-100",children:(null===S||void 0===S?void 0:S[null===W||void 0===W||null===(F=W.eventData)||void 0===F||null===(G=F.product)||void 0===G?void 0:G.name])||""}),(0,l.jsxs)("div",{className:"hidden mt-12 text-base leading-6 text-gray-100 divide-y divide-white/5 lg:block",children:[(null===W||void 0===W||null===(O=W.eventData)||void 0===O||null===(U=O.coupon)||void 0===U?void 0:U.coupon_code)&&(0,l.jsx)("div",{className:"flex",children:(0,l.jsxs)("span",{className:"px-3 mb-6 text-sm font-semibold leading-6 text-gray-800 rounded-md bg-magenta-100",children:["Discount: ",null===W||void 0===W||null===(H=W.eventData)||void 0===H||null===(I=H.coupon)||void 0===I?void 0:I.coupon_code]})}),(0,l.jsxs)("div",{className:"flex justify-between pb-4",children:[(0,l.jsx)("div",{children:"Subtotal"}),(0,l.jsx)("div",{className:"font-semibold text-gray-200",children:"".concat(ee).concat((te-ne).toFixed(2))})]}),(0,l.jsxs)("div",{className:"flex justify-between py-4",children:[(0,l.jsxs)("div",{children:["Taxes (",re,"%)"]}),(0,l.jsx)("div",{className:"font-semibold text-gray-200",children:"".concat(ee).concat(ne)})]}),(0,l.jsxs)("div",{className:"flex justify-between pt-4 font-semibold text-white",children:[(0,l.jsx)("div",{children:"Total price"}),(0,l.jsx)("div",{children:"".concat(ee).concat(te)})]})]})]})})})}),(0,l.jsxs)("div",{className:"relative flex flex-col justify-center px-4 pt-10 bg-white grow pb-28",children:[(0,l.jsx)("div",{className:"justify-center hidden w-full lg:flex",children:(0,l.jsx)(c(),{src:"/images/logo_suncel_pink.svg",alt:"",width:150,height:50})}),(0,l.jsxs)("ul",{className:"justify-center hidden mt-8 space-x-2 text-sm font-medium leading-6 text-gray-700 lg:flex",children:[(0,l.jsxs)("li",{className:"flex",children:[(0,l.jsx)(p(),{href:"/admin/project/".concat(Y.query.projectId,"/plans"),children:"Plan"}),(0,l.jsx)(h.A,{className:"self-center ml-2 text-lg text-gray-400"})]}),(0,l.jsxs)("li",{className:(0,D.Z)("flex",{"text-magenta font-semibold":"address"===q}),children:["Address",(0,l.jsx)(h.A,{className:"self-center ml-2 text-lg text-gray-400"})]}),(0,l.jsx)("li",{className:(0,D.Z)("",{"text-magenta font-semibold":"payment"===q}),children:"Payment"})]}),(0,l.jsxs)("div",{className:"max-w-md mx-auto lg:mt-12 lg:max-w-sm ",children:[(0,l.jsx)("div",{className:"flex items-center justify-between",children:(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Payment Details"})}),(0,l.jsx)("p",{className:"mt-2 text-sm leading-6 text-gray-700",children:"Complete your purchase by providing your payment information."}),(0,l.jsx)("div",{className:"mt-10",children:(0,l.jsx)("div",{className:"-m-[13px]",children:(0,l.jsx)("div",{className:"checkout-container"})})})]})]})]})]}):null}},1057:function(e,t,n){"use strict";n.d(t,{d:function(){return m}});var r,a=n(7568),u=n(1438),l=n(2951),o=n(4051),i=n.n(o),s=n(9669),c=n.n(s),d=n(3299),v="https://api.suncel.io";!function(e){e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError"}(r||(r={}));var p={Accept:"application/json","Content-Type":"application/json; charset=utf-8"},h=function(){var e=(0,a.Z)(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,d.getSession)();case 3:return null!=(null===(n=e.sent)||void 0===n?void 0:n.accessToken)&&t.headers&&(t.headers.Authorization="Bearer ".concat(null===n||void 0===n?void 0:n.accessToken)),e.abrupt("return",t);case 8:throw e.prev=8,e.t0=e.catch(0),new Error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),f=function(){function e(){(0,u.Z)(this,e),this.instance=null}var t=e.prototype;return t.initHttp=function(){var e=this,t=v,n=c().create({baseURL:t,headers:p,withCredentials:!0,timeout:3e4});return n.interceptors.request.use(h,(function(e){return Promise.reject(e)})),n.interceptors.response.use((function(e){return e}),(function(t){var n=t.response;return e.handleError(n)})),this.instance=n,n},t.request=function(e){return this.http.request(e)},t.get=function(e,t){return this.http.get(e,t)},t.getSwr=function(e){return this.http.get(e).then((function(e){return e.data}))},t.post=function(e,t,n){return this.http.post(e,t,n)},t.put=function(e,t,n){return this.http.put(e,t,n)}
1,t.patch=function(e,t,n){return this.http.patch(e,t,n)},t.delete=function(e,t){return this.http.delete(e,t)},t.handleError=function(e){switch(null===e||void 0===e?void 0:e.status){case r.InternalServerError:case r.Forbidden:break;case r.Unauthorized:throw e;case r.TooManyRequests:}return Promise.reject(e)},(0,l.Z)(e,[{key:"http",get:function(){return null!=this.instance?this.instance:this.initHttp()}}]),e}(),m=new f},1984:function(e,t,n){"use strict";n.d(t,{Nq:function(){return s},TH:function(){return p},Zy:function(){return c},gg:function(){return d},me:function(){return v},vX:function(){return r}});var r,a=n(7568),u=n(4051),l=n.n(u),o=n(1057),i=n(3299);!function(e){e.OWNER="Owner",e.ADMIN="Admin",e.EDITOR="Editor"}(r||(r={}));(function(){var e=(0,a.Z)(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.d.get("/projects/users");case 3:return t=e.sent.data,e.abrupt("return",{data:t,error:null});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{data:null,error:e.t0.data});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))})(),function(){var e=(0,a.Z)(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.d.post("/user",t);case 3:return n=e.sent.data,e.abrupt("return",{data:n,error:null});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{data:null,error:e.t0.data});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))}();var s=function(){var e=(0,a.Z)(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.d.put("/user/current-user",t);case 3:return n=e.sent.data,e.abrupt("return",{data:n,error:null});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{data:null,error:e.t0.data});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),c=function(){var e=(0,a.Z)(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.d.put("/user/update-password",t);case 3:return n=e.sent.data,e.abrupt("return",{data:n,error:null});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{data:null,error:e.t0.data});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),d=(function(){var e=(0,a.Z)(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.d.delete("/user/".concat(t.id));case 3:return n=e.sent.data,e.abrupt("return",{data:n,error:null});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{data:null,error:e.t0.data});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))}(),function(){var e=(0,a.Z)(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.d.post("/assets/upload-avatar",t,{headers:{"Content-type":"multipart/form-data"}});case 3:return n=e.sent.data,e.abrupt("return",{data:n.asset,error:null});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{data:null,error:e.t0.data});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()),v=function(){var e=(0,a.Z)(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.d.get("/user/current-user");case 3:return t=e.sent.data,e.abrupt("return",{data:null===t||void 0===t?void 0:t.user,error:null});case 7:return e.prev=7,e.t0=e.catch(0),(0,i.signOut)(),e.abrupt("return",{data:null,error:e.t0.data});case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),p=function(){var e=(0,a.Z)(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.d.get("/user/notifications");case 3:return t=e.sent.data,e.abrupt("return",{data:t.data,error:null});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{data:null,error:e.t0.data});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}()},7729:function(e,t,n){"use strict";n.d(t,{h:function(){return r}});var r={AED:"AED",AFN:"AFN",ALL:"ALL",AMD:"AMD",ANG:"ANG",AOA:"AOA",ARS:"ARS",AUD:"A$",AWG:"AWG",AZN:"AZN",BAM:"BAM",BBD:"BBD",BDT:"BDT",BGN:"BGN",BHD:"BHD",BIF:"BIF",BMD:"BMD",BND:"BND",BOB:"BOB",BOV:"BOV",BRL:"R$",BSD:"BSD",BTN:"BTN",BWP:"BWP",BYN:"BYN",BZD:"BZD",CAD:"CA$",CDF:"CDF",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"CLP",CNH:"CNH",CNY:"CN\xa5",COP:"COP",COU:"COU",CRC:"CRC",CUC:"CUC",CUP:"CUP",CVE:"CVE",CZK:"CZK",DJF:"DJF",DKK:"DKK",DOP:"DOP",DZD:"DZD",EGP:"EGP",ERN:"ERN",ETB:"ETB",EUR:"\u20ac",FJD:"FJD",FKP:"FKP",GBP:"\xa3",GEL:"GEL",GHS:"GHS",GIP:"GIP",GMD:"GMD",GNF:"GNF",GTQ:"GTQ",GYD:"GYD",HKD:"HK$",HNL:"HNL",HRK:"HRK",HTG:"HTG",HUF:"HUF",IDR:"IDR",ILS:"\u20aa",INR:"\u20b9",IQD:"IQD",IRR:"IRR",ISK:"ISK",JMD:"JMD",JOD:"JOD",JPY:"JP\xa5",KES:"KES",KGS:"KGS",KHR:"KHR",KMF:"KMF",KPW:"KPW",KRW:"\u20a9",KWD:"KWD",KYD:"KYD",KZT:"KZT",LAK:"LAK",LBP:"LBP",LKR:"LKR",LRD:"LRD",LSL:"LSL",LYD:"LYD",MAD:"MAD",MDL:"MDL",MGA:"MGA",MKD:"MKD",MMK:"MMK",MNT:"MNT",MOP:"MOP",MRO:"MRO",MUR:"MUR",MWK:"MWK",MXN:"MX$",MXV:"MXV",MYR:"MYR",MZN:"MZN",NAD:"NAD",NGN:"NGN",NIO:"NIO",NOK:"NOK",NPR:"NPR",NZD:"NZ$",OMR:"OMR",PAB:"PAB",PEN:"PEN",PGK:"PGK",PHP:"PHP",PKR:"PKR",PLN:"PLN",PYG:"PYG",QAR:"QAR",RON:"RON",RSD:"RSD",RUB:"RUB",RWF:"RWF",SAR:"SAR",SBD:"SBD",SCR:"SCR",SDG:"SDG",SEK:"SEK",SGD:"SGD",SHP:"SHP",SLL:"SLL",SOS:"SOS",SRD:"SRD",SSP:"SSP",STN:"STN",SYP:"SYP",SZL:"SZL",THB:"THB",TJS:"TJS",TND:"TND",TOP:"TOP",TRY:"TRY",TTD:"TTD",TWD:"NT$",TZS:"TZS",UAH:"UAH",UGX:"UGX",USD:"US$",USN:"USN",UYI:"UYI",UYU:"UYU",UZS:"UZS",VEF:"VEF",VND:"\u20ab",VUV:"VUV",WST:"WST",XAF:"FCFA",XCD:"EC$",XOF:"CFA",XPF:"CFPF",YER:"YER",ZAR:"ZAR",ZMW:"ZMW"}}},function(e){e.O(0,[41,675,273,774,888,179],(function(){return t=4232,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.