PageSourceSearch

https://www.template.net/assets/PricingPlans-BdPr7TkU.mjs

js template.net collected 2026-10-02 02:18:46 UTC 12,800 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dz3ugz34.mjs","assets/globals-BMcmkdEs.mjs","assets/router-PMS2L5za.mjs","assets/globals-store-BSWve6xV.mjs","assets/index-CvO2eCba.mjs","assets/index-BzvP2Ltf.mjs","assets/index-Chjiymov.mjs","assets/index-C6jCJ1W5.mjs","assets/index.esm-sNLTqEoX.mjs","assets/LoadingProgressBar-DG-jjR4l.mjs","assets/common-helpers-DzGTMArf.mjs","assets/EditorIcon-BtqzgUzN.mjs","assets/url-kTDias0L.mjs","assets/useCSR-DrdVbc1K.mjs","assets/common-CUwVOe11.mjs","assets/useCSR-ltI_k6Zc.css","assets/TemplateSlider-DeBgUp3y.mjs","assets/index-DxSE9MMl.css"])))=>i.map(i=>d[i]);
2import{r as l,j as e,f as R,R as se}from"./globals-BMcmkdEs.mjs";import{c as ne,u as w,a as b,b as G,U as $,z as me,A as he,s as xe,B as ge}from"./globals-store-BSWve6xV.mjs";import{A as k,W as re,_ as q,M as fe,V as z,J as B,Y,G as ye}from"./index-CvO2eCba.mjs";import{c as je}from"./format-text-BHigmckY.mjs";import{c as be,d as Pe}from"./router-PMS2L5za.mjs";import{p as ve,g as Me,L as Ne}from"./LoadingProgressBar-DG-jjR4l.mjs";import"./TemplateSlider-DeBgUp3y.mjs";import"./product-CnNEWhFW.mjs";import"./common-helpers-DzGTMArf.mjs";import"./EditorIcon-BtqzgUzN.mjs";import"./common-CUwVOe11.mjs";import"./url-kTDias0L.mjs";const _e=re(()=>q(()=>import("./index-Dz3ugz34.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])).then(P=>({default:P.PremiumPopup}))),J=re(()=>q(()=>import("./index-Dz3ugz34.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])).then(P=>({default:P.SubscriptionSuccess}))),te=l.forwardRef(({className:P,plan:t,options:S,hidden:O,userCount:o=1,defaultOpen:F=!1,highlightTopic:E,autoClick:v,...V},D)=>{const c=ne(n=>n.isClient),g=l.useMemo(()=>ve[t.replace("_monthly","_yearly")],[t]),M=w(n=>n.token?.userRankType),A=b(n=>n.subscription),f=w(n=>n.token?.plan)||A?.plan,i=b(n=>n.prices?.[t]),T=b(n=>n.locale),I=b(n=>n.currency),s=l.useMemo(()=>new Intl.NumberFormat(T,{style:"currency",currency:I.toUpperCase(),currencyDisplay:"symbol",currencySign:"accounting",numberingSystem:"latn"}),[I,T]),ae=be({mutationFn:n=>{const h="https://payments.template.net/api/subscriptions",W=he();return xe.patch(h,{cancelAtPeriodEnd:n,version:W},{withCredentials:!0})},onSuccess(n,h){document.emitEvent("payments:cancel",{isCancelAtPeriodEnd:h}),b.getState().getSubscription(!0)}}),N=l.useCallback((n=!1)=>{const{showModal:h,closeModal:W}=k.getState(),{user:d}=w.getState(),y=Object.keys(G).filter(a=>!d?.userRankType||G[a].includes(d.userRankType));if(d?.userRankType&&d.userRankType!==$.NORMAL){if(!n||!y.includes(t))return;C(!0),me(t,o).then(a=>{if(a.data.type==="paypal"){window.open(a.data.approveUrl,"_blank"),setTimeout(()=>{C(!0)},10);const m=j=>{j.origin==="https://payments.template.net"&&j.data?.type==="PAYPAL_APPROVED"&&(C(!1),h("subscription-success",e.jsx(J,{selectedPlan:t})),window.removeEventListener("message",m))};return window.addEventListener("message",m),a}if(a.data.type!=="razorpay"){if(W("upgrade-popup"),a.data.type!=="done")throw Error("Unexpected subscription paid error.");return h("subscription-success",e.jsx(J,{selectedPlan:t})),a}const x={plus_yearly:"Plus",plus_monthly:"Plus",max_yearly:"Max",max_monthly:"Max"},{subscription:p,customer:_}=a.data;return new Razorpay({customer_id:_.id,order_id:p.id,recurring:"1",theme:{color:"#1e0dff"},notes:{invoice_number:p.notes?.invoice_number,goods_description:x[t]+" Plan Subscription"},name:x[t]+" Plan Subscription",handler:async function(){k.getState().showModal("subscription-success",e.jsx(J,{selectedPlan:t}))}}).open(),a}).catch(()=>document.emitEvent("make-subscription",{plans:S??[t]})).finally(()=>C(!1))}else{const a=k.getState().modals.has("upgrade-popup");a&&k.setState(x=>{const p=new Map(x.modals),_=x.modals.get("upgrade-popup");return p.set("upgrade-popup",{..._,open:!1}),{modals:p}}),w.getState().isLoggedIn?h("pricing-popup",e.jsx(_e,{plans:S??[t],members:o})):document.emitEvent("toggle-modal-Auth",{isSignIn:!1,onBack:a?()=>{k.getState().modals.has("upgrade-popup")&&k.setState(x=>{const p=new Map(x.modals),_=x.modals.get("upgrade-popup");return p.set("upgrade-popup",{..._,open:!0}),{modals:p}})}:void 0,onSuccess:N})}},[S,t,M,o]);l.useEffect(()=>{q(()=>import("./index-Dz3ugz34.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])
2)},[]);const Q=l.useRef(!1);l.useEffect(()=>{v&&c&&!Q.current&&(Q.current=!0,N(!0))},[v,c]);const{data:L}=Pe({queryKey:["upgrade-info",t,o],queryFn:()=>ge({plan:t,members:o}).then(n=>n.data),enabled:!!M&&M!==$.NORMAL}),[ie,C]=l.useState(!1),[le,oe]=l.useMemo(()=>i?.amountMonthly?[s.format(i.amountMonthly*o).replace("$",i.symbol),s.format(i.amountMonthly).replace("$",i.symbol)]:"-",[s,o,i?.amountMonthly]),ce=l.useMemo(()=>i?.unitAmount?s.format(i.unitAmount*o).replace("$",i.symbol):"-",[s,o,i?.unitAmount]),de=l.useMemo(()=>i?.originAmount?s.format(i.originAmount).replace("$",i.symbol):"-",[s,i?.originAmount]),H=l.useMemo(()=>A?.isCancelAtPeriodEnd&&f===t,[A?.isCancelAtPeriodEnd,f]),K=t.endsWith("monthly"),ue=l.useMemo(()=>c?H?"Resubscribe now":!M||M===$.NORMAL?"Get Started":"Upgrade":"Get Started",[]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{...V,className:R("card-pricing bg-white",{"ring-plan":g.ring,"hidden!":c&&(A?.isCancelAtPeriodEnd&&t===f?!1:O)},P),"data-plan":t,ref:D,children:[e.jsxs("strong",{className:"h3 flex items-center gap-xs cursor-pointer",onClick:()=>N(),children:[g.title,t.startsWith("max")&&e.jsx("span",{className:"most-popular",children:"Most Popular"})]}),e.jsx("span",{onClick:()=>N(),className:"cursor-pointer",children:g.heading}),e.jsxs("div",{onClick:()=>N(),className:"cursor-pointer",children:[e.jsx("span",{className:"price",children:le})," /month ",e.jsx("span",{className:R("text-xs text-neutral-600 text-decoration-line-through",{"opacity-0":K}),children:de||"-"}),e.jsxs("div",{className:"text-neutral-600 font-normal text-xs",style:{opacity:K?0:1},children:[e.jsxs("span",{className:"text-success-500",children:["Save ",ce,"/ year."]})," Billed annually"]}),c&&L&&!!L.discount&&e.jsxs("div",{className:"flex flex-col gap-2 mt-2",children:[e.jsxs("div",{className:"text-danger flex justify-between items-center smaller",children:[e.jsx("span",{children:"Discount"}),e.jsx("span",{children:t===f?"-":L.discountFormat})]}),e.jsxs("div",{className:"flex justify-between items-center font-semibold",children:[e.jsx("span",{className:"smaller",children:"Amount due"}),e.jsx("span",{className:"fs-6 font-bold",children:t===f?"-":L.totalFormat})]})]})]}),e.jsx("div",{className:"flex flex-col gap-2",children:e.jsx(fe,{variant:"primary",size:"xl",outlined:!["max_yearly","max_monthly"].includes(t),className:"w-full font-medium",onClick:n=>{H?(n.preventDefault(),ae.mutate(!1)):N(!0)},children:ue})}),e.jsx("div",{className:"feature-list","data-show-feature":!0,onClick:()=>N(),children:Me(g.features,t,E).map(n=>n.split("|")).map((n,h)=>e.jsxs(z.Root,{id:`${t}-features-${h}`,defaultOpen:F,render:e.jsx(l.Fragment,{}),children:[e.jsx("svg",{width:14,height:14,children:e.jsx("use",{href:"/assets/sprites/icon-commons.svg?3f6e14a6#check"})}),n.map((W,d)=>{const[y,a]=W.split("#"),[x,p]=se.useState(!1),_=/\[(.*?)\]/g,Z=/\\b([^\\]+)\\b/g,m=[];let j=0;const U=[];let X;for(;(X=_.exec(y))!==null;)U.push({type:"badge",match:X});let ee;for(;(ee=Z.exec(y))!==null;)U.push({type:"bold",match:ee});if(U.sort((r,u)=>r.match.index-u.match.index),U.forEach(({type:r,match:u})=>{u.index>j&&m.push(y.slice(j,u.index)),r==="badge"?m.push(e.jsx("span",{className:"badge badge-primary me-3xs",children:u[1]},u.index)):r==="bold"&&m.push(e.jsx("span",{className:"font-semibold",children:u[1]},u.index)),j=u.index+u[0].length}),j<y.length){const r=y.slice(j);r.includes("{{perUserMonth}}")?(m.push(r.replace("{{perUserMonth}}","")),m.push(e.jsxs("span",{className:"text-primary",children:["(just ",oe," per user/month)"]}))):m.push(r)}const pe=n.length>1&&d===0||n.length===1?z.Trigger:z.Panel;return e.jsxs(pe,{render:e.jsx("p",{}),className:R("toggle-benefit-item",{"font-semibold flex items-center":n.length>1&&d===0,"text-xs":d>0}),onClick:r=>{n.length>1&&d===0&&(r.preventDefault(),r.stopPropagation())},children:[m.length>0?e.jsx(e.Fragment,{children:m.map((r,u)=>e.jsx(se.Fragment,{children:r},u))}):y,a&&e.jsxs(B,{open:x,onOpenChange:p,children:[e.jsx(B.Trigger,{id:`info-${d}`,render:e.jsx("svg",{width:16,height:16,className:"ms-3xs text-neutral-600",
2style:{marginTop:0},children:e.jsx("use",{href:"/assets/sprites/icon-commons.svg?3f6e14a6#info"})}),onClick:r=>r.stopPropagation(),onTouchStart:r=>{r.preventDefault(),r.stopPropagation(),p(!0)},onTouchEnd:r=>{r.preventDefault(),r.stopPropagation()}}),e.jsxs(B.Content,{style:{borderRadius:".5rem"},children:[a==="ai-tools"&&e.jsxs("ul",{className:"p-3xs",children:[e.jsx("li",{children:"• AI design editor"}),e.jsx("li",{children:"• AI Presentation Maker"}),e.jsx("li",{children:"• AI Document editor"}),e.jsx("li",{children:"• AI Whiteboard "}),e.jsx("li",{children:"• AI Form builder"}),e.jsx("li",{children:"• AI Photo editor and more ..."})]}),a==="ai-editors"&&e.jsxs("ul",{className:"p-3xs",children:[e.jsx("li",{children:"• Presentations"}),e.jsx("li",{children:"• Designs"}),e.jsx("li",{children:"• Docs"}),e.jsx("li",{children:"• Forms"}),e.jsx("li",{children:"• Whiteboard"}),e.jsx("li",{children:"• Charts and Graphs"}),e.jsx("li",{children:"• Images"}),e.jsx("li",{children:"• Voice"}),e.jsx("li",{children:"• Graphics"})]}),a==="ff"&&e.jsxs("ul",{className:"p-3xs",children:[e.jsx("li",{children:"• PPT"}),e.jsx("li",{children:"• Docs"}),e.jsx("li",{children:"• Google Slides"}),e.jsx("li",{children:"• Google Form"}),e.jsx("li",{children:"• Word"}),e.jsx("li",{children:"• Notion"}),e.jsx("li",{children:"• Zoho Writer"}),e.jsx("li",{children:"• Wordpress"}),e.jsx("li",{children:"• HTML 5"}),e.jsx("li",{children:"• SVG Transparent"}),e.jsx("li",{children:"• Tiff"}),e.jsx("li",{children:"• Webp"}),e.jsx("li",{children:"• BMP"}),e.jsx("li",{children:"• GIF"}),e.jsx("li",{children:"• MP4"}),e.jsx("li",{children:"• PDF"}),e.jsx("li",{children:"• QR Code"}),e.jsx("li",{children:"• JPG & PNG and more..."})]})]})]}),n.length>1&&d===0&&e.jsx("svg",{width:16,height:16,className:"toggle-benefit-icon ms-auto",style:{marginTop:0,zIndex:1e4},children:e.jsx("use",{href:"/assets/sprites/icon-commons.svg?3f6e14a6#chevron-down"})})]},d)})]},`${t}-features-${h}`))}),t==="premium_yearly"&&e.jsx("span",{id:"fair-usage",children:"*Fair usage apply"})]}),e.jsx(Y,{open:ie,onOpenChange:C,children:e.jsx(Y.Content,{children:e.jsxs(Y.Body,{className:"flex flex-col items-center gap-xs p-8",children:[e.jsx("div",{children:"Please Wait"}),e.jsx("img",{src:"/assets/icons/new-logo-1.svg",alt:"Template.net small logo",title:"Template.net small logo",width:56}),e.jsx(Ne,{})]})})})]})}),Le=({className:P,userCount:t=1,defaultOpen:S=!1,highlightTopic:O="",initialPlan:o,autoClickSource:F})=>{const E=w(s=>s.token?.userRankType),[v,V]=l.useState(o?!o.endsWith("_monthly"):!0);ne(s=>s.isMobile);const D=b(s=>s.subscription),c=w(s=>s.token?.plan)||D?.plan,g=l.useMemo(()=>Object.keys(G).filter(s=>!E||G[s].includes(E)).filter(s=>s!==c).filter(s=>!c?.endsWith("yearly")||s.endsWith("yearly")),[E,c]);l.useEffect(()=>{b.getState().getPrices(),b.getState().getSubscription();const s=document.createElement("script");s.setAttribute("defer","true"),s.setAttribute("type","module"),s.src="https://checkout.razorpay.com/v1/checkout.js",document.head.appendChild(s)},[]);const M=e.jsxs("div",{id:"period-toggle",style:{height:"1.5rem"},children:[e.jsx("div",{className:"period-monthly",children:"Monthly"}),e.jsx(ye,{id:"toggle-yearly",checked:v,onChange:s=>V(s.target.checked)}),e.jsxs("div",{className:"flex gap-3xs",children:[e.jsx("span",{children:"Yearly"}),e.jsx("span",{className:"text-primary font-semibold",style:{opacity:v?1:0},children:"Upto 50% off"})]})]});if(g.length===0)return null;const A=g.some(s=>s.endsWith("monthly")&&(!c||c?.endsWith("monthly"))),f=v?"plus_yearly":"plus_monthly",i=v?"max_yearly":"max_monthly",T=s=>D?.isCancelAtPeriodEnd&&s===c?!0:g.includes(s),I=F==="button"&&o?.startsWith("plus")?"plus":F==="button"&&o?.startsWith("max")?"max":null;return e.jsxs("div",{className:R("plans",P),children:[A&&e.jsx("div",{style:{flexBasis:"100%",textAlign:"center"},children:M}),e.jsx("div",{className:R({"hidden!":!T(f)}),style:{transition:"opacity 0.3s"},children:e.jsx(te,{plan:f,userCount:t,defaultOpen:S,highlightTopic:je(O),autoClick:I==="plus"})}),e.jsx("div",{className:R("flex flex-col",{"hidden!":!T(i)}),style:{transition:"opacity 0.3s"},children:e.jsx(te,{plan:i,userCount:t<10?10:t,defaultOpen:S,className:"grow",autoClick:I==="max"})})]})};export{Le as PricingPlans,Le as default};

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.