PageSourceSearch

https://ashanithealchemist.com/_next/static/immutable/chunks/2m75-vlphtkjd.js

js ashanithealchemist.com collected 2026-09-30 15:01:38 UTC 41,864 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="8b9583f4-fcdf-44b7-15bc-deb4c166b9b8")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,983631,(e,n,t)=>{var r=e.r(924519),i=e.r(460779);n.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},889695,(e,n,t)=>{var r=e.r(593460),i=e.r(377882),a=e.r(983631),o=0/0,l=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;n.exports=function(e){if("number"==typeof e)return e;if(a(e))return o;if(i(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=i(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var t=s.test(e);return t||c.test(e)?u(e.slice(2),t?2:8):l.test(e)?o:+e}},533066,(e,n,t)=>{var r=e.r(377882),i=e.r(850154),a=e.r(889695),o=Math.max,l=Math.min;n.exports=function(e,n,t){var s,c,u,d,m,f,p=0,x=!1,h=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function g(n){var t=s,r=c;return s=c=void 0,p=n,d=e.apply(r,t)}function y(e){var t=e-f,r=e-p;return void 0===f||t>=n||t<0||h&&r>=u}function b(){var e,t,r,a=i();if(y(a))return j(a);m=setTimeout(b,(e=a-f,t=a-p,r=n-e,h?l(r,u-t):r))}function j(e){return(m=void 0,v&&s)?g(e):(s=c=void 0,d)}function C(){var e,t=i(),r=y(t);if(s=arguments,c=this,f=t,r){if(void 0===m)return p=e=f,m=setTimeout(b,n),x?g(e):d;if(h)return clearTimeout(m),m=setTimeout(b,n),g(f)}return void 0===m&&(m=setTimeout(b,n)),d}return n=a(n)||0,r(t)&&(x=!!t.leading,u=(h="maxWait"in t)?o(a(t.maxWait)||0,n):u,v="trailing"in t?!!t.trailing:v),C.cancel=function(){void 0!==m&&clearTimeout(m),p=0,s=f=c=m=void 0},C.flush=function(){return void 0===m?d:j(i())},C}},850154,(e,n,t)=>{var r=e.r(971640);n.exports=function(){return r.Date.now()}},653957,(e,n,t)=>{var r=/\s/;n.exports=function(e){for(var n=e.length;n--&&r.test(e.charAt(n)););return n}},593460,(e,n,t)=>{var r=e.r(653957),i=/^\s+/;n.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},9136,(e,n,t)=>{n.exports=e.r(607681)},960944,e=>{"use strict";var n=e.i(268601),t=e.i(609203),r=e.i(100004),i=e.i(975705);let a={[r.PolicyKindEnumType.RefundPolicy]:"refund-policy",[r.PolicyKindEnumType.PrivacyPolicy]:"privacy-policy",[r.PolicyKindEnumType.TermsOfService]:"terms-of-service"},o={[r.PolicyKindEnumType.PrivacyPolicy]:"Store Privacy Policy",[r.PolicyKindEnumType.RefundPolicy]:"Refund Policy",[r.PolicyKindEnumType.TermsOfService]:"Terms of Service"};e.s(["default",0,function({policy:e}){let[r,a]=(0,i.useState)("");return(0,i.useEffect)(()=>{a((0,t.tiptapJsonToHtml)(e.description))},[e.description]),(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"w-full mx-auto max-w-xl px-3 xs:max-w-3xl pb-6",children:[(0,n.jsx)("h1",{children:o[e.kind]}),(0,n.jsx)("p",{dangerouslySetInnerHTML:{__html:r}})]})})},"mapPolicyKindToTitle",0,o,"policyToSlug",0,a])},654964,65642,355911,e=>{"use strict";var n=e.i(268601),t=e.i(7468),r=e.i(633435),i=e.i(975705),a=e.i(753493),o=e.i(729184),l=e.i(693078),s=e.i(219639);function c(e){return["US","CA","UA","IN"].includes(e)}let u=s.z.object({country:s.z.string(),postalCode:s.z.string().optional()}).refine(e=>!c(e.country)||!!e.postalCode,{message:"Required",path:["postalCode"]});e.s(["BillingLocation",0,u,"isPostalCodeRequired",0,c],65642);let d=(0,i.createContext)(null);function m(){let e=(0,i.useContext)(d);if(!e)throw Error("usePricingContext must be used within a Link Context Provider");return e}e.s(["PricingContext",0,function({children:e,saleDiscount:a,originalPrice:s,stripeAccountId:u,creatorId:m,taxBehavior:f}){let[p,x]=(0,i.useState)(),[h,v]=(0,i.useState)(""),[g,y]=(0,i.useState)("needs-billing-information"),[b,j]=(0,i.useState)(null),[C,k]=(0,i.useState)("US"),[w,N]=(0,i.useState)(null),[S,E]=(0,i.useState)(null),T=S??p??a?.price??s,P=(0,i.useCallback)(({couponCode:e,price:n})=>{v(e),x(n)},[]),[F]=(0,t.useMutation)(l.default,{onError:e=>{throw y("error"),e}}),I=(0,i.useCallback)(async(e,n,t,r)=>{y("is-calculating");try{let{data:i}=await F({variables:{input:{amount:e,currency:n,creatorId:m,billingAddress:{country:t,postalCode:r,
2state:null,city:null,line1:null}}}});if(i?.calculateTax?.__typename==="CalculateTaxPayloadSuccess")j({calculationId:i.calculateTax.calculationId,taxAmount:i.calculateTax.taxAmount,totalAmount:i.calculateTax.totalAmount});else if(i?.calculateTax?.__typename==="TaxCalculationError"&&"INVALID_ADDRESS"===i.calculateTax.code)return void y("invalid-billing-information");else throw i;y("ready")}catch(e){throw j(null),y("error"),e}},[F,m]);return(0,i.useEffect)(()=>{if(T?.amount&&f){if(c(C)&&!w)return void y("needs-billing-information");I(T.amount,T.currencyCode,C,w??null)}},[T?.amount,T?.currencyCode,f,I,C,w]),(0,i.useEffect)(()=>{"error"===g&&r.toast.error("An error occurred while calculating sales tax.")},[g]),(0,n.jsx)(d.Provider,{value:{totalPrice:T,couponCode:h,onApplyCoupon:P,taxCalculation:b,taxCalculationStatus:g,setBillingCountry:k,setBillingPostalCode:N,setOverridePrice:E,taxBehavior:f,saleDiscount:a,originalPrice:S??s},children:(0,n.jsx)(o.StripeElementsProvider,{stripeAccountId:u,price:b?.totalAmount&&T?.currencyCode?{amount:b?.totalAmount,currencyCode:T?.currencyCode}:T,children:e})})},"usePricingContext",0,m],654964);var f=e.i(992472),p=e.i(753);e.i(761911);var x=e.i(762023),h=e.i(124880),v=e.i(57176),g=e.i(30297),y=e.i(222733),b=e.i(908583),j=e.i(469299),C=e.i(986698),k=e.i(956687);let w=C.Root,N=C.Trigger,S=C.Arrow,E=i.forwardRef(({className:e,align:t="center",sideOffset:r=4,...i},a)=>(0,n.jsx)(C.Portal,{children:(0,n.jsx)(C.Content,{ref:a,align:t,sideOffset:r,className:(0,k.cn)("z-50 w-72 rounded border border-neutral-200 bg-white p-4 text-neutral-900 shadow-md outline-none animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})}));E.displayName=C.Content.displayName;var T=e.i(435987),P=e.i(549646),F=e.i(166589),I=e.i(76597),D=e.i(931318),A=e.i(613796),L=e.i(100004),R=e.i(525170),M=e.i(64480),O=e.i(568470),V=e.i(299809),_=e.i(975773);function B({resourceId:e,onApply:t,stripePaymentIntentId:r}){let[a,o]=(0,i.useState)(""),[l,s]=(0,i.useState)(""),[c,{loading:u}]=(0,A.useLazyQuery)(_.default),d=(0,i.useCallback)(async n=>{s("");try{let{data:{calculateDiscounts:i}}=await c({variables:{input:{resourceId:e,couponCode:n,stripePaymentIntentId:r}}});if(!i.originalPrice)throw i;t({couponCode:n,price:i.deductedPrice,discounts:i.discounts})}catch(e){s(e.errors??(e.message||"Invalid coupon code"))}},[c,t,e,r]),m=(0,i.useCallback)(e=>{o(e.target.value?.trim().toUpperCase())},[]),f=(0,i.useCallback)(()=>{let e=!0,n="";return a||(e=!1,n="Coupon code is required"),a.length>32&&(e=!1,n="Coupon code should be less than 32 characters long"),s(n),e},[a]),p=(0,i.useCallback)(e=>{e.preventDefault(),f()&&d(a)},[d,f,a]);return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)(v.Input,{placeholder:"Promo code",value:a,onChange:m,onBlur:f,error:!!l}),(0,n.jsx)(M.Button,{onClick:p,variant:"secondary",type:"button",disabled:u||a?.length===0,children:u?(0,n.jsx)(g.Loader,{}):"Apply"})]}),l&&(0,n.jsx)(O.InputError,{children:"Invalid coupon code"})]})}function $({amount:e}){return(0,n.jsxs)("div",{className:"order-summary-row",children:[(0,n.jsx)("p",{className:"text-xs text-neutral-1000",children:"Total amount"}),(0,n.jsx)("p",{className:"text-xs text-neutral-1000",children:e})]})}function H({type:e,price:t,saleDiscount:r,resourceId:a,stripePaymentIntentId:o,children:l,discounts:s,setDiscounts:c}){let{onApplyCoupon:u,couponCode:d}=m(),[f,{loading:p}]=(0,A.useLazyQuery)(_.default),x=(0,i.useCallback)(async()=>{try{let{data:{calculateDiscounts:e}}=await f({variables:{input:{resourceId:a,couponCode:null,stripePaymentIntentId:o}}});if(!e.originalPrice)throw e;c(e.discounts),u({couponCode:"",price:e.deductedPrice})}catch(e){console.log(e.errors??(e.message||"Invalid coupon code"))}},[f,u,a,o,c]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"divider "}),(0,n.jsx)("h6",{children:"Order Summary"}),(0,n.jsxs)("div",{className:"order-summary-row",children:[(0,n.jsxs)("p",{className:"text-2xs",children:[e," price"]}),(0,n.jsx)("p",{className:"text-2xs",children:t?(0,V.formatAmou
2ntForDisplay)(t.amount/100,t.currencyCode??L.CurrencyCode.Usd):"FREE"})]}),r&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"order-summary-row",children:[(0,n.jsx)("p",{className:"text-2xs",children:"Sale price"}),(0,n.jsx)("p",{className:"text-2xs",children:r&&(0,V.formatAmountForDisplay)(r.price.amount/100,r.price.currencyCode)})]})}),s?.map((e,r)=>e.type===L.DiscountType.Coupon&&(0,n.jsxs)("div",{className:"mt-4",children:[(0,n.jsx)("p",{className:"text-2xs",children:"Coupon discount"}),(0,n.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,n.jsxs)("div",{className:"flex items-center justify-center gap-3 bg-neutral-100 rounded-sm p-2",children:[(0,n.jsx)("span",{className:"text-2xs",children:d}),(0,n.jsx)("button",{children:p?(0,n.jsx)(g.Loader,{}):(0,n.jsx)(M.Button,{onClick:()=>x(),ghost:!0,className:"cursor-pointer group-hover",children:(0,n.jsx)(R.XClose,{width:16,height:16,className:"text-neutral-600 group-hover:text-neutral-700"})})})]}),(0,n.jsxs)("p",{className:"text-2xs",children:[e.amount&&`-${(0,V.formatAmountForDisplay)(e.amount/100,t?.currencyCode)}`,e.percentage&&`${100*e.percentage}%`]})]})]},r)),l]})}var q=e.i(307219),z=e.i(959467),Y=e.i(927752),K=e.i(760998),U=e.i(533066),W=e.i(981798);function G({field:e,country:t}){return(0,n.jsx)(v.Input,{placeholder:`Enter your ${"US"===t?"ZIP":"postal"} code`,ref:e.ref,name:e.name,onBlur:e.onBlur,onChange:function(e){let n=(0,i.useRef)(e);n.current=e;let[t]=(0,i.useState)(()=>(0,U.default)((...e)=>n.current(...e),500));return t}(e.onChange)})}let Q=[...p.CountryCodeEnumValues].sort((e,n)=>e.description.replace(/^The /g,"").localeCompare(n.description.replace(/^The /g,"")));function X({form:e,owner:t,hidePoliciesFooter:a,onPaymentSuccess:o,onPaymentError:l,children:s}){let c=(0,P.useStripe)(),u=(0,F.useRouter)(),{payment_intent:d,payment_intent_client_secret:m}=u.query,[p,x]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{c&&d&&m&&(x(!0),c.retrievePaymentIntent(m).then(function({paymentIntent:e}){if(e)switch(e.status){case"succeeded":case"requires_capture":case"processing":o(z.PAYMENT_TYPE.stripe);break;case"requires_payment_method":l&&l(z.PAYMENT_TYPE.stripe,Error("Payment failed. Please try another payment method.")),r.toast.error("Payment failed. Please try another payment method."),u.replace(u.asPath.split("?")[0],void 0,{shallow:!0});break;default:l&&l(z.PAYMENT_TYPE.stripe,Error("Something went wrong.")),r.toast.error("Something went wrong."),u.replace(u.asPath.split("?")[0],void 0,{shallow:!0})}}).finally(()=>x(!1)))},[d,c,o,l,m,u.asPath.split,u.replace]),p)?(0,n.jsx)(g.Loader,{global:!0}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.Form,{...e,children:(0,n.jsx)("form",{"data-testid":"payment-form",children:s})}),!a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"divider"}),(0,n.jsx)(K.default,{username:t.username,policies:t.policies||[]})]})]})}X.NameField=function(e){return(0,n.jsx)(f.FormField,{control:e.control,name:e.name,render:({field:e})=>(0,n.jsxs)(f.FormItem,{children:[(0,n.jsx)(f.FormLabel,{className:"mb-2",children:"Your name"}),(0,n.jsx)(f.FormControl,{children:(0,n.jsx)(v.Input,{placeholder:"Guy Hawkins",...e})}),(0,n.jsx)(f.FormMessage,{})]})})},X.EmailField=function(e){return(0,n.jsx)(f.FormField,{control:e.control,name:e.name,render:({field:e})=>(0,n.jsxs)(f.FormItem,{className:"mt-3",children:[(0,n.jsx)(f.FormLabel,{className:"mb-2",children:"Email"}),(0,n.jsx)(f.FormControl,{children:(0,n.jsx)(v.Input,{type:"email",placeholder:"Enter your email address",...e})}),(0,n.jsx)(f.FormMessage,{})]})})},X.MarketingConsentField=function({control:e,name:t}){return(0,n.jsx)(f.FormField,{control:e,name:t,render:({field:e})=>(0,n.jsxs)(f.FormItem,{children:[(0,n.jsxs)("div",{className:"flex mt-2",children:[(0,n.jsx)(f.FormControl,{children:(0,n.jsx)(h.Checkbox,{...e,onCheckedChange:e.onChange,checked:e.value})}),(0,n.jsx)(f.FormLabel,{className:"mb-2 ml-2 font-normal",children:"Email me with news and offers"})]}),(0,n.jsx)(f.FormMessage,{})]})})},X.LocationFields=function({countryFieldName:e,postalCodeFieldName:t,control:r}){let{totalPrice:a,taxCalculationStatus:o,setBillingCountry:l,setBillingPostalCode:s}=m(),u=(0,I.useWatch)({name:e,control:r}),d=(0,I.useWatch)({name:t,control:r});(0,i.useEffect)(()=>
2{l(u),s(null)},[s,l,u]),(0,i.useEffect)(()=>{s(d)},[s,d]);let p=(0,I.useFormContext)(),h=p.getFieldState(t).isTouched;(0,i.useEffect)(()=>{h&&("invalid-billing-information"===o?r.setError(t,{type:"location-tax-error",message:"Invalid postal code."}):r.getFieldState(t)?.error?.type==="location-tax-error"&&p.clearErrors(t))},[r,p.clearErrors,t,o,h]);let v=(0,W.useIsMobile)(),[y,C]=(0,i.useState)(!1),[k,T]=(0,i.useState)();return(0,i.useEffect)(()=>{if(k)return;C(!0);let n=new AbortController;return(async()=>{let t=await fetch("/api/user-geo",{signal:n.signal}),r=await t.json();C(!1),Q.map(({name:e})=>e).includes(r.country)&&p.setValue(e,r.country)})().catch(e=>{if("AbortError"!==e.name)throw T(e),C(!1),e}),()=>n.abort()},[e,p.setValue,k]),a?.amount?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"flex gap-3 items-end",children:[(0,n.jsx)(f.FormField,{control:r,name:e,render:({field:e})=>(0,n.jsxs)(f.FormItem,{className:"mt-3 flex-grow",children:[(0,n.jsxs)(f.FormLabel,{children:["Billing location",v?(0,n.jsx)(w,{children:(0,n.jsxs)(N,{children:[(0,n.jsx)(x.InfoCircle,{width:"15",height:"15",className:"text-neutral-700 ml-1 mt-3"}),(0,n.jsxs)(E,{className:"border-none bg-neutral-900 text-neutral-100 shadow-xl z-[60] text-left",side:"right",children:[(0,n.jsx)("p",{children:"We are required to collect this information for tax purposes."}),(0,n.jsx)(S,{className:"fill-neutral-900"})]})]})}):(0,n.jsx)(j.Tooltip,{content:"We are required to collect this information for tax purposes.",children:(0,n.jsx)("button",{className:"ml-1",type:"button",children:(0,n.jsx)(x.InfoCircle,{width:"12",height:"12",className:"text-neutral-700"})})})]}),y?(0,n.jsx)("div",{className:"h-11",children:(0,n.jsx)(g.Loader,{})}):(0,n.jsx)(b.Select,{...e,onValueChange:e.onChange,children:(0,n.jsx)(b.Select.OptionGroup,{children:Q.map(({name:e,description:t})=>(0,n.jsx)(b.Select.Option,{value:e,children:t},e))})}),(0,n.jsx)(f.FormMessage,{})]})}),c(u)?(0,n.jsx)("div",{className:"flex gap-3 items-end",children:(0,n.jsx)(f.FormField,{control:r,name:t,render:({field:e})=>(0,n.jsxs)(f.FormItem,{className:"mt-3",children:[(0,n.jsx)(f.FormMessage,{}),(0,n.jsx)(f.FormControl,{children:(0,n.jsx)(G,{field:e,country:u})})]})})}):null]})}):null},X.PhoneField=function(e){return(0,n.jsx)(f.FormField,{control:e.control,name:e.name,render:({field:t})=>(0,n.jsxs)(f.FormItem,{className:"mt-3",children:[(0,n.jsxs)(f.FormLabel,{className:"mb-2",children:["Phone Number",!e.isPhoneRequired&&(0,n.jsx)("span",{className:"ml-1 font-normal text-neutral-400",children:"(Optional)"})]}),(0,n.jsx)(f.FormControl,{children:(0,n.jsx)(y.PhoneInput,{...t,value:t.value,placeholder:"Enter your phone"})}),(0,n.jsx)(f.FormMessage,{})]})})},X.PhoneConsentField=function({name:e,control:t}){return(0,n.jsx)(f.FormField,{control:t,name:e,render:({field:e})=>(0,n.jsxs)(f.FormItem,{children:[(0,n.jsxs)("div",{className:"flex mt-2",children:[(0,n.jsx)(f.FormControl,{children:(0,n.jsx)(h.Checkbox,{...e,onCheckedChange:e.onChange,checked:e.value})}),(0,n.jsx)(f.FormLabel,{className:"mb-2 ml-2",children:(0,n.jsx)(Y.default,{})})]}),(0,n.jsx)(f.FormMessage,{})]})})},X.Summary=function({resourceId:e,hideCouponInput:t,type:r}){let{originalPrice:a,saleDiscount:o,taxBehavior:l,taxCalculation:s,taxCalculationStatus:c,onApplyCoupon:u,totalPrice:d}=m(),[f,p]=(0,i.useState)([]),x=null;return"is-calculating"===c?x=(0,n.jsx)("span",{className:"text-neutral-600",children:"Calculating …"}):"needs-billing-information"===c?x=(0,n.jsx)("span",{className:"text-neutral-600",children:"Enter billing location"}):"error"===c?x=(0,n.jsx)("span",{className:"text-cherry-800",children:"Error"}):"invalid-billing-information"===c?x=(0,n.jsx)("span",{className:"text-cherry-800",children:"Invalid billing location"}):s&&d&&(x=(0,T.formatAmountForDisplay)(s.taxAmount/100,d.currencyCode)),(0,n.jsx)("div",{className:"mt-4","data-testid":"payment-summary",children:!!d?.amount&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(H,{type:r,price:a,saleDiscount:o,resourceId:e,discounts:f,setDiscounts:p,children:["INCLUSIVE"===l&&(0,n.jsxs)(n.Fragment,{children:[s&&(0,n.jsxs)("div",{className:"order-summary-row",children:[(0,n.jsx)("p",{className:"text-2xs",children:"Subtotal (before tax)"}
2),(0,n.jsx)("p",{className:"text-2xs",children:(0,T.formatAmountForDisplay)((s.totalAmount-s.taxAmount)/100,d.currencyCode)})]}),(0,n.jsxs)("div",{className:"order-summary-row",children:[(0,n.jsx)("p",{className:"text-2xs",children:"Tax (included)"}),(0,n.jsx)("p",{className:"text-2xs",children:x})]})]}),"EXCLUSIVE"===l&&(0,n.jsxs)("div",{className:"order-summary-row",children:[(0,n.jsx)("p",{className:"text-2xs",children:"Tax"}),(0,n.jsx)("p",{className:"text-2xs",children:x})]}),s||d?(0,n.jsx)($,{amount:(0,T.formatAmountForDisplay)((s?.totalAmount||d.amount)/100,d.currencyCode)}):null]}),(0,n.jsx)("div",{className:"divider"}),!t&&(0,n.jsx)(B,{resourceId:e,onApply:({couponCode:e,price:n,discounts:t})=>{p(t),u({couponCode:e,price:n})}})]})})},X.PaymentMethod=function({owner:e,onCreatePaypalOrder:t,onPaymentSuccess:o,onPaymentError:l,onPaypalCancel:s,createFreeOrder:c,freeOrderLoading:u,isProcessing:d,handleSubmitStripePayment:f,ctaCopy:p}){let{taxCalculation:x,taxCalculationStatus:h,couponCode:v,totalPrice:g}=m(),{hasPaypalAccount:y,hasStripeAccount:b,preferences:j,paypalMerchantId:C}=e,{payment_intent:k,payment_intent_client_secret:w}=(0,F.useRouter)().query,[N,S]=(0,i.useState)(!!k&&!!w||!y&&b),E=(0,P.useElements)(),A=(0,P.useStripe)(),L=(0,I.useFormContext)(),R=(0,D.useProductColors)(),M={backgroundColor:R?.buttonFill??"#1f1f1f",color:R?.buttonText??"#ffffff"};return g?.amount?(0,n.jsxs)("div",{className:"mt-4",children:[(0,n.jsx)(a.default,{onPaymentMethodChange:e=>{S(e===z.PAYMENT_TYPE.stripe)},hasPaypalAccount:y,hasStripeAccount:b,stripe:(0,n.jsx)(P.PaymentElement,{options:{layout:{type:"tabs"},fields:{billingDetails:{address:"never"}}}}),paypal:(0,n.jsx)(q.PayPal,{disabled:!y,createOrder:async()=>{if("is-calculating"===h)throw Error("Still computing sales tax. Please try again later.");if("invalid-billing-information"===h)throw Error("Please check your billing location and ensure it is valid.");if("error"===h)throw Error("Something went wrong while computing sales tax. Please try again later.");if(!await L.trigger(void 0,{shouldFocus:!0}))throw Error("Please fix invalid fields.");return t(x?.calculationId)},intent:"capture",currencyCode:g.currencyCode,onSuccess:o,onCancel:s,onError:l,payLater:j?.paypal?.enablePayLaterOption,merchant:C},`${v}-${g.amount}-${g.currencyCode}`)}),N&&(0,n.jsx)("button",{type:"button",className:"w-full mt-4 rounded-md py-2.5 text-2xs font-semibold disabled:opacity-50",disabled:!A||!E||d||"is-calculating"===h,style:M,onClick:async()=>{if(!A)throw r.toast.error(T.genericErrorMessage),Error("Stripe is missing");if(!E)throw r.toast.error(T.genericErrorMessage),Error("Stripe elements are missing");if("invalid-billing-information"===h)return void r.toast.error("Please check your billing location and ensure it is valid.");if("error"===h)throw Error("Something went wrong while computing sales tax. Please try again later.");let{error:e}=await E.submit();if(e)throw r.toast.error(e?.message||T.genericErrorMessage),e;await L.trigger()?f(A,E,x?.calculationId):r.toast.error("Please fix invalid fields.")},children:!A||d?"Processing …":p||"Complete order"})]}):(0,n.jsx)("button",{type:"button",onClick:c,className:"w-full mt-4 rounded-md py-2.5 text-2xs font-semibold disabled:opacity-50",disabled:u,style:M,children:u?"Processing …":p||"Get now for FREE"})},e.s(["default",0,X],355911)},693078,(e,n,t)=>{var r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CalculateTax"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CalculateTaxInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"calculateTax"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CalculateTaxPayloadSuccess"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"calculationId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taxAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalAmount"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TaxCalculationError"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:254}};
2r.loc.source={body:"mutation CalculateTax($input: CalculateTaxInput!) {\n  calculateTax(input: $input) {\n    ... on CalculateTaxPayloadSuccess {\n      calculationId\n      taxAmount\n      totalAmount\n    }\n    ... on TaxCalculationError {\n      code\n      message\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var r=e.definitions[t];if(r.name&&r.name.value==n)return r}}r.definitions.forEach(function(e){if(e.name){var n=new Set;!function e(n,t){if("FragmentSpread"===n.kind)t.add(n.name.value);else if("VariableDefinition"===n.kind){var r=n.type;"NamedType"===r.kind&&t.add(r.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,t)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,t)}),n.definitions&&n.definitions.forEach(function(n){e(n,t)})}(e,n),i[e.name.value]=n}}),n.exports=r,n.exports.CalculateTax=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var r=i[n]||new Set,o=new Set,l=new Set;for(r.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var r=a(e,n);r&&t.definitions.push(r)}),t}(r,"CalculateTax")},975773,(e,n,t)=>{var r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"calculateDiscounts"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CalculateDiscountsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"calculateDiscounts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CalculateDiscountsPayloadSuccess"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discounts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"percentage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"deductedPrice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencyCode"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"originalPrice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencyCode"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InputValidationError"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"NotFoundError"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:515}};r.loc.source={body:"query calculateDiscounts($input: CalculateDiscountsInput!) {\n  calculateDiscounts(input: $input) {\n    ... on CalculateDiscountsPayloadSuccess {\n      discounts {\
2n        amount\n        percentage\n        type\n      }\n      deductedPrice {\n        amount\n        currencyCode\n      }\n      originalPrice {\n        amount\n        currencyCode\n      }\n    }\n\n    ... on InputValidationError {\n      errors {\n        field\n        message\n      }\n    }\n\n    ... on NotFoundError {\n      code\n      message\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var r=e.definitions[t];if(r.name&&r.name.value==n)return r}}r.definitions.forEach(function(e){if(e.name){var n=new Set;!function e(n,t){if("FragmentSpread"===n.kind)t.add(n.name.value);else if("VariableDefinition"===n.kind){var r=n.type;"NamedType"===r.kind&&t.add(r.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,t)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,t)}),n.definitions&&n.definitions.forEach(function(n){e(n,t)})}(e,n),i[e.name.value]=n}}),n.exports=r,n.exports.calculateDiscounts=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var r=i[n]||new Set,o=new Set,l=new Set;for(r.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var r=a(e,n);r&&t.definitions.push(r)}),t}(r,"calculateDiscounts")},598298,e=>{"use strict";var n=e.i(371278);e.s(["Check",()=>n.default])},537143,e=>{"use strict";var n=e.i(384557);e.s(["Minus",()=>n.default])},192118,e=>{"use strict";var n=e.i(268601),t=e.i(766181),r=e.i(975705),i=e.i(956687),a=e.i(385589);let o=r.default.memo(({icon:e})=>(0,n.jsx)("div",{className:"relative box-content flex w-5 h-full items-center align-middle m-0 px-2 leading-none",children:e})),l=(0,t.cva)(["inline-flex items-center justify-center p-2 h-full","text-neutral-700","transition-colors duration-150","focus:outline-none focus-visible:ring-2 focus-visible:ring-cornflower-600"],{variants:{disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{disabled:!1}}),s=({children:e,className:t})=>(0,n.jsx)("div",{className:(0,i.cn)("inline-flex items-center h-full divide-neutral-200",t),children:e}),c=(0,t.cva)(["inline-flex items-center w-full h-11 border rounded-sm","transition duration-50 ease-out hover:ease-in","focus-within:outline-none focus-within:ring-2 focus-within:ring-cornflower-600 focus-within:ring-offset-1"],{variants:{disabled:{true:""},hasError:{true:""}},compoundVariants:[{disabled:!0,hasError:!1,class:"cursor-not-allowed text-neutral-400 border-neutral-400 pointer-events-none bg-neutral-50"}
2,{disabled:!1,hasError:!0,class:"border-cherry-800"},{disabled:!1,hasError:!1,class:"border-neutral-200 hover:border-neutral-600"}],defaultVariants:{}}),u=(0,t.cva)("relative inline-flex h-full items-center",{variants:{disabled:{true:"pointer-events-none"}},defaultVariants:{}}),d=(0,t.cva)(["text-neutral-800 text-2xs shadow-none bg-white border-none outline-none rounded-none w-full h-full min-w-0 appearance-none","disabled:cursor-not-allowed disabled:text-neutral-500 disabled:bg-neutral-50","placeholder-neutral-500"],{variants:{isIconLeft:{true:"pl-0",false:"pl-2"},isIconRight:{true:"pr-0",false:"pr-2"}},defaultVariants:{}}),m=(0,t.cva)("p-3",{variants:{isVisible:{true:"visible",false:"invisible"}},defaultVariants:{}}),f=r.default.forwardRef(function({icon:e,iconRight:t,label:l,labelPosition:f="left",error:p,className:x,onClear:h,children:v,disabled:g=!1,readOnly:y=!1,autoComplete:b="off",placeholder:j="",...C},k){let w=(0,r.useRef)(null);(0,r.useImperativeHandle)(k,()=>w.current);let N=null;r.default.Children.forEach(v,e=>{r.default.isValidElement(e)&&e.type===s&&(N=e)});let S=l&&(0,n.jsx)("div",{className:u({disabled:g||!1}),children:l});return(0,n.jsx)("div",{className:"inline-block w-full border-box",children:(0,n.jsxs)("div",{className:c({disabled:g||!1,hasError:p||!1}),children:["left"===f&&S,(0,n.jsxs)("div",{className:"inline-flex align-middle items-center h-full flex-1	select-none	rounded-sm overflow-hidden",children:[e&&(0,n.jsx)(o,{icon:e}),(0,n.jsx)("input",{type:"text",ref:w,id:C.name,className:(0,i.cn)(d({isIconLeft:!!e,isIconRight:!!t||!!N}),x),disabled:g,readOnly:y,autoComplete:b,placeholder:j,...C}),h&&(0,n.jsx)("div",{onClick:h,role:"button",tabIndex:0,className:m({isVisible:""!==C.value}),children:(0,n.jsx)(a.default,{className:"block"})}),t&&(0,n.jsx)(o,{icon:t}),N]}),"right"===f&&S]})})});s.Item=({children:e,onClick:t,disabled:r=!1,className:a,type:o="button","aria-label":s,asChild:c=!1})=>{let u=(0,i.cn)(l({disabled:r}),a);return c?(0,n.jsx)("div",{"aria-label":s,className:u,children:e}):(0,n.jsx)("button",{type:o,onClick:t,disabled:r,"aria-label":s,className:u,children:e})},f.Actions=s,e.s(["default",0,f,"inputContainerVariants",0,c,"inputVariants",0,d],192118)},568470,e=>{"use strict";var n=e.i(315501);e.s(["InputError",()=>n.default])},951850,e=>{"use strict";var n=e.i(268601);e.i(761911);var t=e.i(279184),t=t,r=e.i(766181),i=e.i(642290),a=e.i(956687);let o=(0,r.cva)("text-2xs text-cornflower-700 hover:text-cornflower-400 active:text-cornflower-900",{variants:{isExternal:{true:"inline-flex items-center"}}});e.s(["Link",0,function({children:e,className:r,isExternal:l,...s}){return(0,n.jsxs)(i.default,{...s,className:(0,a.cn)(o({isExternal:l}),r),children:[e,l&&(0,n.jsx)(t.default,{width:12,height:12,className:"ml-1"})]})}],951850)},222733,927752,760998,e=>{"use strict";var n=e.i(268601),t=e.i(766181),r=e.i(975705),i=e.i(156254);let a=(0,t.cva)([],{variants:{hover:{true:"outline-none ring-2 ring-ring ring-offset-1 !ring-cornflower-600"},error:{true:"!border-cherry-800"}}});e.s(["PhoneInput",0,function({name:e,value:t,onChange:o,onFocus:l,onBlur:s,error:c,disabled:u}){let[d,m]=(0,r.useState)(!1),f=c?{borderColor:"#7D2B28"}:void 0;return(0,n.jsx)(i.default,{containerClass:a({hover:d,error:c}),country:"us",value:t,onChange:o,inputProps:{name:e},buttonStyle:f,inputStyle:f,onFocus:e=>{m(!0),l&&l(e)},onBlur:e=>{m(!1),s&&s(e)},disabled:u})}],222733),e.s(["default",0,function(){return(0,n.jsxs)("p",{className:"text-neutral-600 text-2xs",children:["Check this box to opt in to receiving SMS messages from Planoly at the number entered above. For more information visit our platform"," ",(0,n.jsx)("b",{children:(0,n.jsx)("a",{href:"https://www.planoly.com/terms-of-use",children:"Terms Of Service"})})]})}],927752);var o=e.i(951850),l=e.i(184959),s=e.i(960944);e.s(["default",0,function({username:e,policies:t=[]}){let r=(0,l.useIfCustomDomainName)("/policies",`/${e}/policies`),i=t.filter(e=>e?.description!==null);return(0,n.jsxs)("ul",{className:"flex gap-2",children:[(0,n.jsx)("li",{children:(0,n.jsx)(o.Link,{prefetch:!1,href:"https://www.planoly.com/privacy-policy",target:"_blank",children:"Platform Privacy Policy"})},"platform-policy"),i.map(({kind:e})=>(0,n.jsx)("li",{children:(0,n.jsx)(o.Link,{prefetch:!1,href:`${r}/${s.policyToSlug[e]}`,target:"_blank",children:s.mapPolicyKindToTitle[e]})},e))]})}],760998)},601173,e=>{"use strict";var n=e.i(268601),t=e.i(956687);e.s(["Skeleton",0,function({className:e,...r}){return(0,n.jsx)("div",{className:(0,t.cn)("overflow-hidden animate-pulse rounded bg-neutral-200",e),...r})}],601173)},469299,e=>{"use strict";var n=e.i(268601),t=e.i(975705),r=e.i(174617),i=e.i(286542),a=e.i(935408),o=e.i(770110),l=e.i(865552),s=e.i(81079),c=e.i(218403),u=e.i(304068),d=e.i(805606),m=e.i(609701),f=e.i(112448),p=e.i(292050),[x,h]=(0,a.createContextScope)("Tooltip",[s.createPopperScope]),v=(0,s.createPopperScope)(),g="TooltipProvider",y="tooltip.open",[b,j]=x(g),C=e=>
2{let{__scopeTooltip:r,delayDuration:i=700,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:l}=e,s=t.useRef(!0),c=t.useRef(!1),u=t.useRef(0);return t.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,n.jsx)(b,{scope:r,isOpenDelayedRef:s,delayDuration:i,onOpen:t.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:t.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,a)},[a]),isPointerInTransitRef:c,onPointerInTransitChange:t.useCallback(e=>{c.current=e},[]),disableHoverableContent:o,children:l})};C.displayName=g;var k="Tooltip",[w,N]=x(k),S=e=>{let{__scopeTooltip:r,children:i,open:a,defaultOpen:o,onOpenChange:c,disableHoverableContent:u,delayDuration:d}=e,m=j(k,e.__scopeTooltip),p=v(r),[x,h]=t.useState(null),g=(0,l.useId)(),b=t.useRef(0),C=u??m.disableHoverableContent,N=d??m.delayDuration,S=t.useRef(!1),[E,T]=(0,f.useControllableState)({prop:a,defaultProp:o??!1,onChange:e=>{e?(m.onOpen(),document.dispatchEvent(new CustomEvent(y))):m.onClose(),c?.(e)},caller:k}),P=t.useMemo(()=>E?S.current?"delayed-open":"instant-open":"closed",[E]),F=t.useCallback(()=>{window.clearTimeout(b.current),b.current=0,S.current=!1,T(!0)},[T]),I=t.useCallback(()=>{window.clearTimeout(b.current),b.current=0,T(!1)},[T]),D=t.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{S.current=!0,T(!0),b.current=0},N)},[N,T]);return t.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),(0,n.jsx)(s.Root,{...p,children:(0,n.jsx)(w,{scope:r,contentId:g,open:E,stateAttribute:P,trigger:x,onTriggerChange:h,onTriggerEnter:t.useCallback(()=>{m.isOpenDelayedRef.current?D():F()},[m.isOpenDelayedRef,D,F]),onTriggerLeave:t.useCallback(()=>{C?I():(window.clearTimeout(b.current),b.current=0)},[I,C]),onOpen:F,onClose:I,disableHoverableContent:C,children:i})})};S.displayName=k;var E="TooltipTrigger",T=t.forwardRef((e,a)=>{let{__scopeTooltip:o,...l}=e,c=N(E,o),u=j(E,o),m=v(o),f=t.useRef(null),p=(0,i.useComposedRefs)(a,f,c.onTriggerChange),x=t.useRef(!1),h=t.useRef(!1),g=t.useCallback(()=>x.current=!1,[]);return t.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),(0,n.jsx)(s.Anchor,{asChild:!0,...m,children:(0,n.jsx)(d.Primitive.button,{"aria-describedby":c.open?c.contentId:void 0,"data-state":c.stateAttribute,...l,ref:p,onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(h.current||u.isPointerInTransitRef.current||(c.onTriggerEnter(),h.current=!0))}),onPointerLeave:(0,r.composeEventHandlers)(e.onPointerLeave,()=>{c.onTriggerLeave(),h.current=!1}),onPointerDown:(0,r.composeEventHandlers)(e.onPointerDown,()=>{c.open&&c.onClose(),x.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{x.current||c.onOpen()}),onBlur:(0,r.composeEventHandlers)(e.onBlur,c.onClose),onClick:(0,r.composeEventHandlers)(e.onClick,c.onClose)})})});T.displayName=E;var P="TooltipPortal",[F,I]=x(P,{forceMount:void 0}),D=e=>{let{__scopeTooltip:t,forceMount:r,children:i,container:a}=e,o=N(P,t);return(0,n.jsx)(F,{scope:t,forceMount:r,children:(0,n.jsx)(u.Presence,{present:r||o.open,children:(0,n.jsx)(c.Portal,{asChild:!0,container:a,children:i})})})};D.displayName=P;var A="TooltipContent",L=t.forwardRef((e,t)=>{let r=I(A,e.__scopeTooltip),{forceMount:i=r.forceMount,side:a="top",...o}=e,l=N(A,e.__scopeTooltip);return(0,n.jsx)(u.Presence,{present:i||l.open,children:l.disableHoverableContent?(0,n.jsx)(_,{side:a,...o,ref:t}):(0,n.jsx)(R,{side:a,...o,ref:t})})}),R=t.forwardRef((e,r)=>{let a=N(A,e.__scopeTooltip),o=j(A,e.__scopeTooltip),l=t.useRef(null),s=(0,i.useComposedRefs)(r,l),[c,u]=t.useState(null),{trigger:d,onClose:m}=a,f=l.current,{onPointerInTransitChange:p}=o,x=t.useCallback(()=>{u(null),p(!1)},[p]),h=t.useCallback((e,n)=>{let t,r=e.currentTarget,i={x:e.clientX,y:e.clientY},a=function(e,n){let t=Math.abs(n.top-e.y),r=Math.abs(n.bottom-e.y),i=Math.abs(n.right-e.x),a=Math.abs(n.left-e.x);switch(Math.min(t,r,i,a)){case a:return"left";case i:return"right";case t:return"top";case r:return"bottom";default:throw Error("unreachable")}}(i,r.getBoundingClientRect());u(((t=[...function(e,n,t=5){let r=[];switch(n){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t})}return r}
2(i,a),...function(e){let{top:n,right:t,bottom:r,left:i}=e;return[{x:i,y:n},{x:t,y:n},{x:t,y:r},{x:i,y:r}]}(n.getBoundingClientRect())].slice()).sort((e,n)=>e.x<n.x?-1:e.x>n.x?1:e.y<n.y?-1:1*!!(e.y>n.y)),function(e){if(e.length<=1)return e.slice();let n=[];for(let t=0;t<e.length;t++){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}n.pop();let t=[];for(let n=e.length-1;n>=0;n--){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}return(t.pop(),1===n.length&&1===t.length&&n[0].x===t[0].x&&n[0].y===t[0].y)?n:n.concat(t)}(t))),p(!0)},[p]);return t.useEffect(()=>()=>x(),[x]),t.useEffect(()=>{if(d&&f){let e=e=>h(e,f),n=e=>h(e,d);return d.addEventListener("pointerleave",e),f.addEventListener("pointerleave",n),()=>{d.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",n)}}},[d,f,h,x]),t.useEffect(()=>{if(c){let e=e=>{let n=e.target,t={x:e.clientX,y:e.clientY},r=d?.contains(n)||f?.contains(n),i=!function(e,n){let{x:t,y:r}=e,i=!1;for(let e=0,a=n.length-1;e<n.length;a=e++){let o=n[e],l=n[a],s=o.x,c=o.y,u=l.x,d=l.y;c>r!=d>r&&t<(u-s)*(r-c)/(d-c)+s&&(i=!i)}return i}(t,c);r?x():i&&(x(),m())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[d,f,c,m,x]),(0,n.jsx)(_,{...e,ref:s})}),[M,O]=x(k,{isInside:!1}),V=(0,m.createSlottable)("TooltipContent"),_=t.forwardRef((e,r)=>{let{__scopeTooltip:i,children:a,"aria-label":l,onEscapeKeyDown:c,onPointerDownOutside:u,...d}=e,m=N(A,i),f=v(i),{onClose:x}=m;return t.useEffect(()=>(document.addEventListener(y,x),()=>document.removeEventListener(y,x)),[x]),t.useEffect(()=>{if(m.trigger){let e=e=>{let n=e.target;n?.contains(m.trigger)&&x()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[m.trigger,x]),(0,n.jsx)(o.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:x,children:(0,n.jsxs)(s.Content,{"data-state":m.stateAttribute,...f,...d,ref:r,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,n.jsx)(V,{children:a}),(0,n.jsx)(M,{scope:i,isInside:!0,children:(0,n.jsx)(p.Root,{id:m.contentId,role:"tooltip",children:l||a})})]})})});L.displayName=A;var B="TooltipArrow",$=t.forwardRef((e,t)=>{let{__scopeTooltip:r,...i}=e,a=v(r);return O(B,r).isInside?null:(0,n.jsx)(s.Arrow,{...a,...i,ref:t})});$.displayName=B;var H=e.i(956687);e.s(["Tooltip",0,function({side:e="top",delay:t=0,noArrow:r=!1,content:i,children:a,className:o}){return(0,n.jsx)(C,{delayDuration:t,children:(0,n.jsxs)(S,{children:[(0,n.jsx)(T,{asChild:!0,children:a}),(0,n.jsx)(D,{children:(0,n.jsxs)(L,{className:(0,H.cn)("z-50 overflow-hidden rounded-sm bg-neutral-1000 px-3 py-2 text-white shadow-md w-auto text-3xs",o),side:e,children:[i,!r&&(0,n.jsx)($,{className:"fill-icon-hovered",asChild:!0,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"5",fill:"none",viewBox:"0 0 24 5",children:(0,n.jsx)("path",{fill:"#191919",d:"M24 0H0h4.257c1.025 0 1.99.273 2.606.738l3.834 2.893C12 4.5 12 4.5 13.303 3.631L17.137.738C17.752.273 18.717 0 19.743 0H24z"})})})]})})]})})}],469299)}]);
3
4//# debugId=8b9583f4-fcdf-44b7-15bc-deb4c166b9b8

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.