1(this["webpackJsonpjoor-react"]=this["webpackJsonpjoor-react"]||[]).push([[100],{1624:function(e,n,t){"use strict";t.d(n,"a",function(){return r});var i=t(6);const r=()=>{const e=Object(i.Ub)().addToasts;return{showSuccessToast:function(){return e([{title:"Success",description:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"The action has been completed successfully",type:"success"}])},showErrorToast:function(){return e([{title:"Error",description:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"There has been an error",type:"error"}])},showInfoToast:function(){return e([{title:"Info",description:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"For your information.",type:"info"}])},showWarningToast:function(){return e([{title:"Warning",description:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Something needs your attention.",type:"warning"}])}}}},1940:function(e,n,t){"use strict";t.d(n,"b",function(){return u}),t.d(n,"a",function(){return p});var i,r,a=t(5),o=t(3),c=t(236),l=t(22),s=t(21),d=t(23);Object(d.a)(i||(i=Object(o.a)(["\n mutation CreateCustomerPortalLink {\n createCustomerPortalLink\n }\n"])));const u=()=>{const e=Object(c.a)(l.Bb,{client:s.a}),n=Object(a.a)(e,2),t=n[0];return{createCustomerPortalLink:function(){return t()},loading:n[1].loading}};Object(d.a)(r||(r=Object(o.a)(["\n mutation CreateStripeProductLink($priceId: String!, $returnUrl: String) {\n createStripeProductLink(priceId: $priceId, returnUrl: $returnUrl)\n }\n"])));const p=()=>{const e=Object(c.a)(l.Jb,{client:s.a}),n=Object(a.a)(e,2),t=n[0];return{createStripeProductLink:function(e){if(!e)throw new Error("createStripeProductLink can only be called with a price id");return t({variables:{priceId:e,returnUrl:window.location.href}})},loading:n[1].loading}}},2795:function(e,n,t){"use strict";t.r(n);var i,r=t(2),a=t(5),o=t(3),c=t(0),l=t(6),s=t(13),d=t(42),u=t(4),p=t(98),b=t(1624),j=t(14),v=t(531),x=t(1);const h=u.default.div(i||(i=Object(o.a)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n .warning-icon svg g {\n fill: var(--color-error-600);\n }\n\n .refresh-button {\n color: var(--color-secondary-800);\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n }\n"])));var m,g,f,O,y,w,S,E=()=>Object(x.jsxs)(h,{children:[Object(x.jsx)(l.D,{className:"warning-icon",iconName:"exclamation",iconSize:"extraLarge",plain:!0}),Object(x.jsx)(l.zb,{children:"Error loading page"}),Object(x.jsxs)(l.bb,{textAlign:"center",children:["We were unable to load this page,"," ",Object(x.jsx)("span",{onClick:()=>{window.location.reload()},className:"refresh-button",children:"refresh"}),Object(x.jsx)("br",{})," to try again."]})]}),C=t(22);const A=u.default.div(m||(m=Object(o.a)(["\n display: grid;\n grid-template-columns: minmax(180px, 320px) 2fr 1fr;\n padding: 16px;\n align-items: center;\n justify-content: center;\n gap: 40px;\n width: 100%;\n\n @media (max-width: 1180px) {\n grid-template-columns: 1fr;\n grid-template-rows: auto auto;\n gap: 12px;\n padding: 12px;\n align-items: start;\n }\n"]))),L=u.default.div(g||(g=Object(o.a)(["\n width: 100%;\n min-width: 180px;\n max-width: 320px;\n height: 213px;\n background: var(--color-neutral-100);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n\n @media (max-width: 1180px) {\n min-width: 100%;\n max-width: 100%;\n height: 120px;\n }\n"]))),k=u.default.div(f||(f=Object(o.a)(["\n display: contents;\n\n @media (max-width: 1180px) {\n display: grid;\n grid-template-columns: 1.5fr 1fr;\n gap: 12px;\n }\n"]))),I=u.default.div(O||(O=Object(o.a)(["\n display: grid;\n grid-template-rows: auto 1fr;\n align-items: start;\n height: 100%;\n\n .feature-description {\n white-space: pre-wrap !important;\n }\n\n @media (max-width: 1180px) {\n height: auto;\n }\n"]))),N=u.default.div(y||(y=Object(o.a)(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 12px;\n margin-bottom: 12px;\n\n h2 {\n margin-bottom: 0;\n }\n\n a {\n color: var(--color-secondary-800) !important;\n white-space: nowrap !important;\n font-size: var(--size-font-small);\n &:hover {\n text-decoration: underline;\n }\n &:active {\n color: var(--color-secondary-800) !important;\n }\n }\n"]))),P=Object(u.default)(l.N)(w||(w=Object(o.a)(["\n &&& {\n ","\n font-weight: lighter;\n color: var(--color-secondary-800);\n line-height: 1.25;\n }\n"])),l.Tb.alpha.primaryActive.headline2),D=u.default.h2(S||(S=Object(o.a)(["\n &&& {\n ","\n font-weight: lighter;\n color: var(--color-primary-800);\n line-height: 1.25;\n }\n"])),l.Tb.alpha.primaryActive.headline2),R=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:25;return(null===e||void 0===e?void 0:e.length)>n?e.substring(0,n).trim()+"...":e},_=e=>{let n=e.children,t=e.feature,i=e.index;const r=R(t.name,55),a=null===t||void 0===t?void 0:t.marketingUrl,o=!!a;return Object(x.jsxs)(A,{children:[(null===t||void 0===t?void 0:t.image)&&Object(x.jsx)(L,{children:Object(x.jsx)("img",{className:"feature-image",alt:"feat"+i,src:t.image})}),Object(x.jsxs)(k,{children:[Object(x.jsxs)(I,{children:[Object(x.jsxs)(N,{children:[null!==t&&void 0!==t&&t.internalUrl?Object(x.jsxs)(P,{title:t.name&&t.name.length>55?t.name:"",href:t.internalUrl,children:[r," "]}):Object(x.jsxs)(D,{title:t.name&&t.name.length>55?t.name:"",children:[r," "]}),o&&Object(x.jsx)(l.N,{href:a,target:"_blank",color:"secondary-800",children:"Learn More"})]}),Object(x.jsx)(l.Hb,{className:"feature-description",letterSpacing:"tight",color:"primary-500",title:t.description&&t.description.length>195?t.description:"",children:t.description&&R(t.description,195)})]}),n]})]})};var T=t(37),H=t(20),U=t(824),F=t(15),V=t.n(F);const B="premium-features",q="feature-card",z={CustomerPortal:"".concat(B,"__").
1concat("subscriptions-page","__customer-portal")},M={Card:"".concat(B,"__").concat(q,"__card"),Status:"".concat(B,"__").concat(q,"__status"),OpenFreeTrialText:"".concat(B,"__").concat(q,"__open-free-trial-text"),ManageBillingLink:"".concat(B,"__").concat(q,"__manage-billing-link"),PurchaseButton:"".concat(B,"__").concat(q,"__purchase-button")};var W,G,$;const X=u.default.a(W||(W=Object(o.a)(["\n display: inline-flex;\n align-items: center;\n gap: 5px;\n color: var(--color-secondary-800) !important;\n cursor: pointer;\n pointer-events: auto;\n\n &:hover {\n color: var(--color-secondary-600) !important;\n text-decoration: underline;\n }\n\n svg circle {\n stroke: var(--color-secondary-800);\n }\n\n &.disabled-link {\n pointer-events: none;\n opacity: 0.6;\n cursor: not-allowed;\n\n &:hover {\n color: var(--color-secondary-800) !important;\n text-decoration: none;\n }\n }\n"]))),J=u.default.span(G||(G=Object(o.a)(["\n display: inline-block;\n cursor: not-allowed;\n"]))),K=Object(u.default)(l.Nb)($||($=Object(o.a)(["\n cursor: not-allowed;\n"]))),Q=e=>{var n,t,i,r,a,o;let c=e.onClick,l=void 0===c?()=>{}:c,s=e.disabled,d=void 0!==s&&s,u=e.text,p=void 0===u?"Manage Billing & Subscription":u;return Object(U.a)(),d?Object(x.jsx)(K,{content:"Only the subscription owner can manage this subscription",children:Object(x.jsx)(J,{children:Object(x.jsx)(X,{as:"span","aria-disabled":"true",className:V()("disabled-link",M.ManageBillingLink),onClick:()=>{},children:null===(n=window)||void 0===n||null===(t=n.Localize)||void 0===t||null===(i=t.translate)||void 0===i?void 0:i.call(t,p)})})}):Object(x.jsx)(X,{as:"span",className:M.ManageBillingLink,onClick:()=>l(),children:null===(r=window)||void 0===r||null===(a=r.Localize)||void 0===a||null===(o=a.translate)||void 0===o?void 0:o.call(a,p)})};var Y,Z,ee,ne,te=t(1940);function ie(e){return e.charAt(0).toUpperCase()+e.slice(1)}const re=u.default.div(Y||(Y=Object(o.a)(["\n border-left: 1px solid var(--color-primary-200);\n padding: 10px 20px 16px;\n min-height: 180px;\n\n &.borderless {\n border: none;\n padding-left: 0;\n padding-bottom: 0;\n }\n\n @media (max-width: 1180px) {\n height: auto;\n padding: 0 0 0 12px;\n }\n"]))),ae=u.default.div(Z||(Z=Object(o.a)(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: auto;\n\n .price {\n display: grid;\n grid-template-rows: 34px 60px 34px;\n justify-items: center;\n gap: 18px;\n padding-top: 15px;\n padding-bottom: 15px;\n }\n\n > * {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n\n > *:not(:first-child) {\n border-left: 1px solid var(--color-primary-200);\n padding-left: 20px;\n margin-left: 20px;\n }\n\n @media (min-width: 1300px) {\n > *:not(:first-child) {\n padding-left: 30px;\n margin-left: 30px;\n }\n }\n"]))),oe=u.default.div(ee||(ee=Object(o.a)(["\n display: flex;\n flex-direction: column;\n gap: 40px;\n padding-right: 20px;\n\n .disabled-text {\n cursor: not-allowed;\n }\n\n @media (max-width: 1180px) {\n padding-right: 0;\n gap: 16px;\n }\n"]))),ce=e=>{let n=e.priceInfo,t=e.setIsOpen,i=e.isInOpenTrial;const r=Object(te.a)(),a=r.createStripeProductLink,o=r.loading,c=Object(b.a)().showErrorToast,s=Boolean(n.trialDays&&n.trialDays>0&&!i);return Object(x.jsxs)("div",{className:"price",children:[Object(x.jsxs)(l.Hb,{as:"span",color:"primary-500",children:[Object(x.jsxs)(l.Hb,{as:"span",fontWeight:"bold",fontSize:"large",fontFamily:"numeric",margin:"0 12px 0 0",color:"primary-900",children:["$",Object(H.c)(n.amount)]}),"USD"]}),Object(x.jsxs)(l.Hb,{className:"billing-info",textAlign:"center",children:[Object(x.jsx)("span",{children:"Billed"})," ",Object(x.jsx)("span",{children:n.frequency.toLowerCase()})," ",Object(x.jsx)("span",{children:s&&"after ".concat(n.trialDays,"-day trial")})]}),Object(x.jsx)(l.e,{className:"cta-button",loading:o,onClick:async()=>{t(!0);try{var e;const t=await a(n.id);if(null===(e=t.data)||void 0===e||!e.createStripeProductLink)throw new Error;var i;window.location.assign(null===(i=t.data)||void 0===i?void 0:i.createStripeProductLink)}catch(r){t(!1),c("An error occurred while redirecting to the checkout page. Please try again.")}},id:M.PurchaseButton+"-".concat(n.id),children:s?"Start Free Trial":"Purchase"})]})},le=u.default.div(ne||(ne=Object(o.a)(["\n display: flex;\n flex-direction: column;\n gap: 14px;\n"]))),se=e=>{var n,t,i,r,a;let o=e.feature,c=e.setIsOpen;Object(U.a)();const d=Object(b.a)().showErrorToast,u=Object(te.a)().createStripeProductLink,p=Object(s.d)(j.t),v=o.subscriptionsView,h=null===v||void 0===v?void 0:v.current,m=(null===h||void 0===h?void 0:h.status)===C.tf.PROCESSING,g=(null===h||void 0===h?void 0:h.status)===C.tf.ACTIVE,f=(null===h||void 0===h?void 0:h.status)===C.tf.CANCELLED,O=(null===h||void 0===h?void 0:h.status)===C.tf.EXPIRED,y=(null===h||void 0===h?void 0:h.status)===C.tf.SCHEDULED,w=(null===h||void 0===h?void 0:h.status)===C.tf.AVAILABLE_FOR_PURCHASE,S=!(null===h||void 0===h||!h.isTrial),E=h&&((null===o||void 0===o||null===(n=o.subscriptionsView)||void 0===n?void 0:n.count)||0)>1&&(null===o||void 0===o||null===(t=o.subscriptionsView)||void 0===t||null===(i=t.scheduledSubscriptions)||void 0===i?void 0:i.length),A=!(null===o||void 0===o||null===(r=o.subscriptionsView)||void 0===r||null===(a=r.current)||void 0===a||!a.isOwner),L=o.packagesStatus,k=null===L||void 0===L?void 0:L.every(e=>e.status===C.tf.AVAILABLE_FOR_PURCHASE),I=async()=>{try{var e;c(!0);const n=null===h||void 0===h?void 0:h.priceId,t=await u(n);if(null===t||void 0===t||null===(e=t.data)||void 0===e||!e.createStripeProductLink)throw new Error;window.location.assign(t.data.createStripeProductLink)}catch(n){c(!1),d("An error occurred while redirecting to the customer portal. Please try again.")}};if(w){var N,P,D;const e="number"===typeof(null===o||void 0===o?void 0:o.openTrialDaysRemaining)&&!Number.isNaN(null===o||void 0===o?void 0:o.openTrialDaysRemaining)&&(null===o||void 0===o?void 0:o.openTrialDaysRemaining)>0,n=(null===o||void 0===o?void 0:o.openTrialDaysRemaining)||0,t=new Date(Date.now()+864e5*(n-1)),i=null!==(R=o.prices)&&void 0!==R&&R.length?[...R].sort((e,n)=>Number(e.amount)-Number(n.amount)):[];return Object(x.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100%"},children:[Object(x.jsx)(ae,{children:i.map(n=>Object(x.jsx)(ce,{priceInfo:n,setIsOpen:c,isInOpenTrial:e},n.id))}),e&&k&&Object(x.jsx)(l.Hb,{className:M.OpenFreeTrialText,margin:"15px 0 0 0",fontSize:"small",children:null===(N=window)||void 0===N||null===(P=N.Localize)||void 0===P||null===(D=P.translate)||void 0===D?void 0:D.call(P,"Free Trial ends %{date}. Purchase now to stay subscribed. No charges until then.",{date:"".concat(Object(T.k)(t,p)," ")}
1)})]})}var R;if(m)return Object(x.jsx)("div",{style:{display:"flex",alignItems:"center",height:"100%"},children:Object(x.jsx)(l.Hb,{letterSpacing:"tight",color:"warning-800",textAlign:"center",children:"It may take a few minutes for you to gain access to this feature. Feel free to navigate away or close this page. This process will continue in the background."})});if(E){var _;const e=null===o||void 0===o||null===(_=o.subscriptionsView)||void 0===_?void 0:_.scheduledSubscriptions[0],n=Object(T.k)(Object(T.C)(h.expiryDate,1),p),t=Object(T.k)(e.startDate,p),i="".concat(ie(h.frequency)," Subscription - Active"),r="Ends on ".concat(n),a="".concat(ie(e.frequency)," Subscription - Scheduled"),c="Begins on ".concat(t);return Object(x.jsx)(oe,{children:Object(x.jsxs)(le,{children:[Object(x.jsxs)(l.Hb,{className:"sub-frequency",children:[Object(x.jsx)("span",{children:i}),Object(x.jsx)("br",{}),Object(x.jsx)("span",{children:r})]}),Object(x.jsxs)(l.Hb,{className:"sub-frequency",children:[Object(x.jsx)("span",{children:a}),Object(x.jsx)("br",{}),Object(x.jsx)("span",{children:c})]}),Object(x.jsx)(l.Hb,{lineHeight:"20px",children:Object(x.jsx)(Q,{disabled:!A,onClick:()=>I()})})]})})}if(f){var H,F;const e=Object(T.k)(h.expiryDate,p);return Object(x.jsxs)(oe,{children:[Object(x.jsxs)(le,{children:[Object(x.jsxs)(l.Hb,{className:"sub-frequency",children:[Object(x.jsx)("span",{children:"".concat(ie(h.frequency)," Subscription")})," ","-"," ",Object(x.jsx)(l.Hb,{as:"span",color:"error-600",children:"Cancelled"})]}),Object(x.jsx)(l.Hb,{children:"Ends on ".concat(e)})]}),Object(x.jsxs)(l.Hb,{lineHeight:"20px",children:[Object(x.jsx)(Q,{disabled:!A,onClick:()=>I()}),null===(H=window.Localize)||void 0===H||null===(F=H.translate)||void 0===F?void 0:F.call(H,"before subscription ends to keep %{featureName}",{featureName:o.name}),"."]})]})}if(g||y){var V,B,q;const e=S||y,n=Object(T.k)(Object(T.C)(h.expiryDate,1),p),t=Object(T.k)(h.expiryDate,p),i="Free Trial - Active",r="Ends on ".concat(n),a="".concat(ie(h.frequency)," Subscription - ").concat(e?"Scheduled":"Active"),o=e?"Begins on %{date}":"Auto-renews on %{date}";return Object(x.jsx)(oe,{children:Object(x.jsxs)(le,{children:[S&&Object(x.jsxs)(l.Hb,{className:"sub-frequency",children:[Object(x.jsx)("span",{children:i}),Object(x.jsx)("br",{}),Object(x.jsx)("span",{children:r})]}),Object(x.jsxs)(l.Hb,{className:"sub-frequency",children:[Object(x.jsx)("span",{children:a}),Object(x.jsx)("br",{}),Object(x.jsx)("span",{children:null===(V=window)||void 0===V||null===(B=V.Localize)||void 0===B||null===(q=B.translate)||void 0===q?void 0:q.call(B,o,{date:t})})]}),Object(x.jsx)(l.Hb,{lineHeight:"20px",children:Object(x.jsx)(Q,{disabled:!A,onClick:()=>I()})})]})})}if(O){var z,W;const e=Object(T.k)(h.expiryDate,p);return Object(x.jsx)(oe,{children:Object(x.jsxs)(l.Hb,{className:A?"":"disabled-text",lineHeight:"20px",children:[Object(x.jsx)(Q,{disabled:!A,onClick:()=>I(),text:"Update billing"})," ",null===(z=window.Localize)||void 0===z||null===(W=z.translate)||void 0===W?void 0:W.call(z,"by %{date} to prevent feature interruption.",{date:e})]})})}return null},de=e=>{var n,t;let i=e.feature,r=e.setIsOpen;return Object(x.jsx)(re,{className:(null===i||void 0===i||null===(n=i.subscriptionsView)||void 0===n||null===(t=n.current)||void 0===t?void 0:t.status)===C.tf.AVAILABLE_FOR_PURCHASE?"borderless":"",children:Object(x.jsx)(se,{feature:i,setIsOpen:r})})};var ue,pe;const be=u.default.div(ue||(ue=Object(o.a)(["\n display: flex;\n width: 90%;\n align-items: stretch;\n border-radius: 10px;\n border: 1px solid var(--color-primary-200);\n\n @media (max-width: 1180px) {\n height: auto;\n }\n"]))),je=u.default.div(pe||(pe=Object(o.a)(["\n writing-mode: sideways-lr;\n padding: 0 10px;\n border-radius: 10px 0 0 10px;\n background-color: green;\n text-align: center;\n width: 40px;\n\n @media (max-width: 1180px) {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"]))),ve={[C.tf.AVAILABLE_FOR_PURCHASE]:{text:"Available For Purchase",color:"var(--color-secondary-300)"},[C.tf.SCHEDULED]:{text:"Scheduled",color:"var(--color-warning-200)"},[C.tf.PROCESSING]:{text:"Processing Feature",color:"var(--color-warning-200)"},[C.tf.CANCELLED]:{text:"Cancelled Subscription",color:"var(--color-primary-200)"},[C.tf.EXPIRED]:{text:"Payment Failure",color:"var(--color-error-200)"},[C.tf.ACTIVE]:{text:"Active Feature",color:"var(--color-success-200)"},[C.tf.ERROR]:{text:"Error",color:"var(--color-primary-200)"},[C.tf.UNKNOWN]:{text:"",color:""}},xe=e=>{var n,t,i,r,a;let o=e.feature,c=null!==o&&void 0!==o&&null!==(n=o.subscriptionsView)&&void 0!==n&&n.current?ve[null===o||void 0===o||null===(t=o.subscriptionsView)||void 0===t||null===(i=t.current)||void 0===i?void 0:i.status]:void 0;const s=o.packagesStatus,d="number"===typeof(null===o||void 0===o?void 0:o.openTrialDaysRemaining)&&!Number.isNaN(null===o||void 0===o?void 0:o.openTrialDaysRemaining)&&(null===o||void 0===o?void 0:o.openTrialDaysRemaining)>0,u=null===s||void 0===s?void 0:s.every(e=>e.status===C.tf.AVAILABLE_FOR_PURCHASE),p=d&&(!s||u),b=(null===o||void 0===o||null===(r=o.subscriptionsView)||void 0===r||null===(a=r.current)||void 0===a?void 0:a.status)===C.tf.CANCELLED;return(p||b)&&(c=ve[C.tf.ACTIVE]),Object(x.jsx)(je,{className:M.Status,style:{backgroundColor:c?c.color:void 0},children:Object(x.jsx)(l.Hb,{textAlign:"center",letterSpacing:"tight",color:"primary-500",children:c?c.text:void 0})})},he=e=>{let n=e.feature,t=e.index,i=e.setIsOpen;return Object(x.jsxs)(be,{className:M.Card,children:[Object(x.jsx)(xe,{feature:n}),Object(x.jsx)(_,{feature:n,index:t,children:Object(x.jsx)(de,{feature:n,setIsOpen:i})})]},n.id)};var me=t(134),ge=t(21),fe=t(23);const Oe=e=>({id:"",status:e,accountAccessCount:0,frequency:"",expiryDate:"",priceId:"",isOwner:!1,isTrial:!1}),ye={[C.tf.PROCESSING]:0,[C.tf.EXPIRED]:1,[C.tf.AVAILABLE_FOR_PURCHASE]:2,[C.tf.ACTIVE]:4,[C.tf.CANCELLED]:4,[C.tf.SCHEDULED]:
15,[C.tf.ERROR]:6,[C.tf.UNKNOWN]:7};var we;Object(fe.a)(we||(we=Object(o.a)(["\nquery PremiumFeatures {\n premiumFeatures {\n id\n name\n description\n internalUrl\n marketingUrl\n image\n groupId\n groupLevel\n openTrialDaysRemaining\n prices {\n id\n amount\n frequency\n trialDays\n }\n subscriptions {\n id\n priceId\n accountAccessCount\n expiryDate\n startDate\n frequency\n status\n isOwner\n isTrial\n }\n }\n}"])));const Se={[C.tf.ACTIVE]:"activeSubscriptions",[C.tf.SCHEDULED]:"scheduledSubscriptions",[C.tf.CANCELLED]:"cancelledSubscriptions",[C.tf.ERROR]:"errorSubscriptions",[C.tf.PROCESSING]:"processingSubscriptions"};function Ee(e,n){const t=n.status,i=Se[t];return i&&e[i].push(n),null!==e&&void 0!==e&&e.current&&n.status===C.tf.SCHEDULED||(e.current=n),e}var Ce,Ae,Le,ke,Ie;const Ne=Object(u.default)(l.mb)(Ce||(Ce=Object(o.a)(["\n svg circle {\n stroke: var(--color-primary-500);\n }\n"]))),Pe=u.default.div(Ae||(Ae=Object(o.a)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 20px 16px 20px;\n"]))),De=Object(u.default)(l.C)(Le||(Le=Object(o.a)(["\n display: flex;\n align-items: center;\n gap: 8px;\n"]))),Re=u.default.div(ke||(ke=Object(o.a)(["\n display: flex;\n align-items: center;\n gap: 8px;\n"]))),_e=u.default.div(Ie||(Ie=Object(o.a)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 40px 20px;\n"]))),Te=()=>{var e;const n=Object(d.e)(),t=Object(a.a)(n,1)[0],i=Object(c.useState)(!1),o=Object(a.a)(i,2),s=o[0],u=o[1],j=Object(p.a)(),v=t.get("featureId")?decodeURIComponent(t.get("featureId")):void 0,h=(()=>{var e,n,t,i;const o=Object(d.e)(),l=Object(a.a)(o,1)[0],s=l.get("featureId")?decodeURIComponent(l.get("featureId")):void 0,u="true"===l.get("success"),p=Object(c.useState)(void 0),b=Object(a.a)(p,2),j=b[0],v=b[1],x=Object(me.b)(C.ge,{client:ge.a,pollInterval:j}),h=x.data,m=x.loading,g=x.error,f=s&&u?null===h||void 0===h||null===(e=h.premiumFeatures)||void 0===e?void 0:e.find(e=>e.id===s):void 0,O=f&&(0===(null===(n=f.subscriptions)||void 0===n?void 0:n.length)||(null===f||void 0===f||null===(t=f.subscriptions)||void 0===t?void 0:t.some(e=>e.status===C.tf.CANCELLED||e.status===C.tf.EXPIRED))),y={premiumFeatures:null===h||void 0===h||null===(i=h.premiumFeatures)||void 0===i?void 0:i.map(e=>O&&e.id===s?Object(r.a)(Object(r.a)({},e),{},{subscriptions:[Oe(C.tf.PROCESSING)]}):0===e.subscriptions.length?Object(r.a)(Object(r.a)({},e),{},{subscriptions:[Oe(C.tf.AVAILABLE_FOR_PURCHASE)]}):e).map(e=>{return Object(r.a)(Object(r.a)({},e),{},{subscriptionsView:(n=e.subscriptions,n.reduce(Ee,{current:null,count:n.length,activeSubscriptions:[],scheduledSubscriptions:[],cancelledSubscriptions:[],errorSubscriptions:[],processingSubscriptions:[]}))});var n})};return Object(c.useEffect)(()=>{v(O?1e4:void 0)},[O]),{data:y,loading:m,error:g}})(),m=h.data,g=h.loading,f=h.error,O=Object(b.a)().showErrorToast,y=Object(te.b)(),w=y.createCustomerPortalLink,S=y.loading,A=null===m||void 0===m||null===(e=m.premiumFeatures)||void 0===e?void 0:e.some(e=>{var n;return null===e||void 0===e||null===(n=e.subscriptions)||void 0===n?void 0:n.some(e=>null===e||void 0===e?void 0:e.isOwner)}),L=[...(null===m||void 0===m?void 0:m.premiumFeatures)||[]].filter(e=>{var n;return e.prices&&(null===(n=e.prices)||void 0===n?void 0:n.length)>0}),k=L.map(e=>Object(r.a)(Object(r.a)({},e),{},{packagesStatus:null!==e&&void 0!==e&&e.groupId?null===L||void 0===L?void 0:L.filter(n=>n.groupId===e.groupId).map(e=>{var n,t;return{id:e.id,status:null===e||void 0===e||null===(n=e.subscriptionsView)||void 0===n||null===(t=n.current)||void 0===t?void 0:t.status}}):void 0})),I=null===k||void 0===k?void 0:k.sort((e,n)=>{var t,i,r;return((e,n,t)=>{var i,r;if(t){if((null===e||void 0===e?void 0:e.id)===t)return-1;if((null===n||void 0===n?void 0:n.id)===t)return 1}const a=null!==e&&void 0!==e&&e.status?null===e||void 0===e?void 0:e.status:C.tf.AVAILABLE_FOR_PURCHASE,o=null!==n&&void 0!==n&&n.status?null===n||void 0===n?void 0:n.status:C.tf.AVAILABLE_FOR_PURCHASE,c=ye[a]-ye[o];if(0!==c)return c;const l=null!==(i=null===e||void 0===e?void 0:e.name)&&void 0!==i?i:"",s=null!==(r=null===n||void 0===n?void 0:n.name)&&void 0!==r?r:"";return l.localeCompare(s,void 0)})({id:e.id,name:e.name,status:null===e||void 0===e||null===(t=e.subscriptionsView)||void 0===t||null===(i=t.current)||void 0===i?void 0:i.status},{id:n.id,name:n.name,status:null===(r=n.subscriptionsView.current)||void 0===r?void 0:r.status},v)});return g?null:f?Object(x.jsxs)("div",{children:[Object(x.jsx)(Pe,{children:Object(x.jsxs)(De,{type:"h4",children:["Premium Features ",Object(x.jsx)(l.D,{plain:!0,iconName:"unlock"})]})}),Object(x.jsx)("hr",{style:{border:"0.5px solid var(--color-primary-200)",marginBottom:80}}),Object(x.jsx)(E,{})]}):Object(x.jsxs)("div",{children:[Object(x.jsxs)(Pe,{children:[Object(x.jsxs)(De,{type:"h4",children:["Premium Features ",Object(x.jsx)(l.D,{plain:!0,iconName:"unlock"})]}),A&&Object(x.jsx)(Ne,{id:z.CustomerPortal,onClick:async()=>{try{var e;u(!0);const n=await w();if(null===n||void 0===n||null===(e=n.data)||void 0===e||!e.createCustomerPortalLink)throw new Error;window.location.assign(n.data.createCustomerPortalLink)}catch(n){u(!1),O("An error occurred while redirecting to the customer portal. Please try again.")}},loading:S,children:Object(x.jsxs)(Re,{children:[Object(x.jsx)(l.D,{plain:!0,iconSize:"small",iconName:"link-out"})," ",Object(x.jsx)("span",{children:"Manage Billing & Subscriptions"})]})})]}),Object(x.jsx)("hr",{style:{border:"0.5px solid var(--color-primary-200)"}}),Object(x.jsx)(_e,{children:null===I||void 0===I?void 0:I.map((e,n)=>Object(x.jsx)(he,{feature:e,index:n,setIsOpen:u},e.id))}),Object(x.jsx)(j,{children:Object(x.jsx)(l.U,{children:s&&Object(x.jsx)(l.P,{title:{text:"Please wait while we redirect you to Stripe."},onClose:()=>{}
1,disableBackgroundClick:!0,isOpen:s})})})]})};n.default=function(){return Object(s.d)(j.U)?Object(x.jsx)(Te,{}):Object(x.jsx)(v.default,{})}}}]); 2//# sourceMappingURL=100.63ee386d.chunk.js.map
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.