PageSourceSearch

https://ishare.ai/_next/static/chunks/1482.9f5112f8f6657ca0.js

js ishare.ai collected 2026-10-05 14:00:06 UTC 8,341 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1482],{13333:function(e,a,t){var l,r=t(50959);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e}).apply(null,arguments)}a.Z=function(e){return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),l||(l=r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 20h9M16.5 3.5a2.121 2.121 0 1 1 3 3L7 19l-4 1 1-4z"})))}},94553:function(e,a,t){var l=t(11527),r=t(50959),s=t(94985),i=t(32975),n=t(88197),d=t(27363),o=t(8620),u=t(81474),c=t(43352),f=t(36789),m=t(7242),p=t(5754),x=t(57897),g=t(11260);a.Z=e=>{let{accessGroup:a,trialStartedAt:t,offersCount:h,canUpdateCard:v,isOpeningCardUpdatePortal:w,onManagePlan:y,onUpgradePlan:b,onUpdateCard:j}=e,N=(0,s.m)(),{t:P}=(0,m.$G)("popup"),[k,S]=(0,r.useState)(!1),V=c.S.useUtils(),M=c.S.user.get.stripeSubscriptions.useQuery(void 0,{refetchOnWindowFocus:!0,enabled:v&&"subscription"===a.priceType}),I=c.S.user.update.restorePlan.useMutation(),E="free"===a.priceType,C="one_time"!==a.limitInterval?(0,o.sG)({trialPeriodDays:a.trialPeriodDays,trialStartedAt:t}):null,_=null===C?"":0===C?P("profile.trialExpired",{defaultValue:"Expired"}):1===C?P("profile.trialExpiresInDay",{defaultValue:"Expires in 1 day"}):P("profile.trialExpiresInDays",{defaultValue:"Expires in {{days}} days",days:C}),U=(0,r.useMemo)(()=>a.displayName||a.name||a.accessGroupId||P("profile.currentPlanFallback",{defaultValue:"Current plan"}),[a,P]),D=(0,r.useMemo)(()=>a.displayDescription||a.description||"",[a]),L=(0,r.useMemo)(()=>{var e;if(!a.price)return{price:P("pricing.free",{defaultValue:"Free"}),suffix:""};let t=null!==(e=d.m.find(e=>e.id===a.currency))&&void 0!==e?e:d.m[0];return{price:"".concat(t.symbol).concat(a.price.toLocaleString()),suffix:a.priceInterval?"one_time"===a.priceInterval?P("pricing.suffix.one_time.full",{defaultValue:"one-time"}):"/".concat(P("pricing.suffix.".concat(a.priceInterval,".full"),{defaultValue:""})):""}},[a,P]),O=(0,r.useMemo)(()=>a.limit===n.hf?{amount:P("pricing.unlimited",{defaultValue:"Unlimited"}),suffix:""}:{amount:a.limit.toLocaleString(),suffix:a.limitInterval?"/".concat(P("pricing.suffix.".concat(a.limitInterval,".full"),{defaultValue:""})):""},[a,P]),F=(0,r.useMemo)(()=>{var e;return M.data&&null!==(e=M.data.find(e=>{if(!e.cancel_at_period_end)return!1;let t=e.metadata,l=t.productIds?(0,u.as)(t.productIds)||[]:t.tierId?[t.tierId]:[];return l.includes(a.accessGroupId)||a.derivedFromProductIds.every(e=>l.includes(e))}))&&void 0!==e?e:null},[a,M.data]),G=(0,r.useMemo)(()=>{var e,a;let t=null!==(a=null==F?void 0:F.cancel_at)&&void 0!==a?a:null==F?void 0:null===(e=F.items.data[0])||void 0===e?void 0:e.current_period_end;return t?(0,f.WU)(new Date(1e3*t),"MMMM d, yyyy"):""},[F]),Z=async()=>{try{S(!0),await I.mutateAsync(),await Promise.all([V.user.get.accessGroupLink.invalidate(),V.user.get.stripeSubscriptions.invalidate()])}catch(e){alert(N((0,i.Z)(e)))}finally{S(!1)}};return F?(0,l.jsxs)("section",{className:"glass flex items-center justify-between gap-4 bg-white/50 px-8 py-4 glass-dark:bg-black/50",children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-4",children:[(0,l.jsx)("span",{className:"max-w-[14rem] truncate rounded-[var(--portal-roundness)] bg-white/80 px-4 py-2 text-sm font-semibold glass-dark:bg-black/40",title:U,children:U}),G&&(0,l.jsx)("span",{className:"text-sm font-semibold text-red-500",children:P("profile.expiring",{defaultValue:"Expiring {{date}}",date:G})})]}),v&&(0,l.jsx)(g.z,{variant:"primary",className:"shrink-0 rounded-[var(--portal-roundness)]",onClick:Z,disabled:k,children:k?P("managePlan.restoring",{defaultValue:"Restoring..."}):P("profile.renewPlan",{defaultValue:"Renew Plan"})})]}):(0,l.jsxs)("section",{className:"glass flex flex-col gap-6 bg-white/50 px-8 py-6 glass-dark:bg-black/50",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,l.jsx)("h4",{className:"text-lg font-semibold",children:P("profile.currentPlan",{defaultValue:"Current Plan"})}),v&&(0,l.jsx)(x.z,{variant:"glass",className:"h-10 justify-start rounded-[var(--portal-roundness)] bg-white/80 px-4 font-normal",onClick:j,disabled:w,children:w?P("profile.openingCardUpdate",{defaultValue:"Opening..."}):P("profile.updateCard",{defaultValue:"Update card"})})]}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsxs)("div",{className:"flex min-h-[272px] w-[267px] max-w-full flex-col rounded-[var(--portal-roundness)] border p-6 shadow-sm",style:{backgroundColor:"hsl(var(--card))",color:"hsl(var(--card-foreground))"},children:[(0,l.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[a.image&&(0,l.jsxs)(p.qE,{className:"h-10 w-10",children:[a.isDisplayImage&&(0,l.jsx)(p.F$,{src:a.image,alt:U}),(0,l.jsx)(p.Q5,{})]}),(0,l.jsx)("p",{className:"mt-4 truncate text-base font-semibold leading-tight",title:U,children:U}),D&&(0,l.jsx)("p",{className:"mt-2 line-clamp-3 min-h-[3rem] break-words text-xs leading-relaxed opacity-70",title:D,children:D})]}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-3",children:[(0,l.jsxs)("p",{className:"flex items-baseline gap-1 text-lg font-semibold tracking-tight",children:[L.price,L.suffix&&(0,l.jsx)("span",{className:"text-xs font-normal",children:L.suffix})]}),(0,l.jsxs)("div",{className:"border-current/40 flex flex-col border-t pt-2",children:[(0,l.jsx)("span",{className:"text-[10px] font-bold uppercase opacity-60",children:P("pricing.uses",{defaultValue:"USES"})}),(0,l.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,l.jsxs)("p",{className:"text-lg font-semibold",children:[O.amount,O.suffix&&(0,l.jsx)("span",{className:"text-sm font-normal",children:O.suffix})]}),_&&(0,l.jsx)("span",{className:"shrink-0 text-xs font-semibold text-red-500",children:_})]})]}),!!h&&(0,l.jsx)("p",{className:"text-xs opacity-70",children:"+ ".concat(h.toLocaleStr
1ing()," ").concat(P("profile.offers",{defaultValue:"Offers"}))}),(0,l.jsx)(g.z,{variant:"primary",className:"mt-1 w-full rounded-[var(--portal-roundness)]",onClick:E?b:y,children:E?P("pricing.upgrade",{defaultValue:"Upgrade"}):P("profile.managePlan",{defaultValue:"Manage Plan"})})]})]})})]})}},84495:function(e,a,t){t.d(a,{W:function(){return d}});var l=t(50959),r=t(63947),s=t(94985),i=t(32975),n=t(43352);let d=()=>{let e=(0,s.m)(),{currentPage:a}=(0,r.D)(),[t,d]=(0,l.useState)(!1),o=n.S.user.update.cardUpdatePortal.useMutation();return{isOpeningCardUpdatePortal:t,onOpenCardUpdatePortal:async()=>{try{let e;if(d(!0),(null==a?void 0:a.type)==="deployment"){let a=new URL(window.location.href);a.searchParams.set("action","profile"),e=a.toString()}let{url:t}=await o.mutateAsync({returnUrl:e});window.location.href=t}catch(a){d(!1),alert(e((0,i.Z)(a)))}}}}},67395:function(e,a,t){t.d(a,{i:function(){return u}});var l=t(50959),r=t(63947),s=t(94985),i=t(69569),n=t(32975),d=t(43352);let o=e=>(null==e?void 0:e.trim().toLowerCase())||"",u=()=>{let e=(0,s.m)(),{studioUser:a}=(0,i.t)(),{onUpdateCurrentPopup:t}=(0,r.D)(),[u,c]=(0,l.useState)({email:"",name:"",currentPassword:"",newPassword:""}),[f,m]=(0,l.useState)(!1),[p,x]=(0,l.useState)(!1),[g,h]=(0,l.useState)(!1),v=d.S.useUtils(),w=d.S.user.update.user.useMutation(),y=(0,l.useMemo)(()=>{if(!a.data)return!1;if(u.newPassword.trim().length>0)return!0;let{email:e,name:t}=a.data;return u.name!==(t||"")||o(u.email)!==o(e)},[u,a.data]);(0,l.useEffect)(()=>{if(!a.data||f)return;let{email:e,name:t}=a.data;c({email:e||"",name:t||"",currentPassword:"",newPassword:""}),m(!0)},[a.data,f]);let b=async()=>{try{var l,r;x(!0);let e=u.currentPassword.trim(),s=u.newPassword.trim(),i=o(u.email)!==o(null===(l=a.data)||void 0===l?void 0:l.email);await w.mutateAsync({email:u.email.trim()?u.email:(null===(r=a.data)||void 0===r?void 0:r.email)?u.email:void 0,name:u.name,currentPassword:s?e:void 0,newPassword:s||void 0}),await v.user.get.user.invalidate(),h(!0),m(!1),i&&t("verify-email"),await new Promise(e=>setTimeout(e,2e3))}catch(a){alert(e((0,n.Z)(a)))}finally{x(!1),h(!1)}};return{formValues:u,isSaveable:y,isSaving:p,isSaved:g,onSave:b,setFormValues:c}}}}]);

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.