@everfur/sdk 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/care/index.cjs +2 -2
- package/dist/care/index.js +2 -2
- package/dist/chat/index.cjs +235 -234
- package/dist/chat/index.js +311 -310
- package/dist/chat/lite/index.cjs +339 -338
- package/dist/chat/lite/index.js +314 -313
- package/dist/{chunk-NBAOR5TJ.js → chunk-2T5CB5MW.js} +21 -21
- package/dist/{chunk-RD6ZGYEJ.js → chunk-ASE36WGP.js} +7 -7
- package/dist/{chunk-IO4CGYHT.js → chunk-CMDCBYUH.js} +1 -1
- package/dist/{chunk-ZYHPCQVM.js → chunk-K7YHXFPQ.js} +1 -1
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/core/index.cjs +31 -31
- package/dist/core/index.js +31 -31
- package/dist/health-plan/index.cjs +266 -266
- package/dist/health-plan/index.js +443 -443
- package/dist/{inbox.d-DJ9xgU1Z.d.ts → inbox.d-B2JXK0uI.d.ts} +1 -1
- package/dist/{inbox.d-CPcMMz-Y.d.cts → inbox.d-CwA1ogzV.d.cts} +1 -1
- package/dist/index.cjs +257 -256
- package/dist/index.js +364 -363
- package/dist/notifications/inbox/index.cjs +28 -28
- package/dist/notifications/inbox/index.d.cts +5 -5
- package/dist/notifications/inbox/index.d.ts +5 -5
- package/dist/notifications/inbox/index.js +53 -53
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.d.cts +3 -3
- package/dist/notifications/index.d.ts +3 -3
- package/dist/notifications/index.js +1 -1
- package/dist/{parse.d-Cj3fURer.d.ts → parse.d-QjB2LJCd.d.ts} +19 -10
- package/dist/{parse.d-cH7ZmMeo.d.cts → parse.d-_Ttu2h5g.d.cts} +19 -10
- package/dist/records/depth/index.cjs +80 -80
- package/dist/records/depth/index.js +115 -115
- package/dist/records/index.cjs +653 -653
- package/dist/records/index.js +1074 -1074
- package/dist/{route.d-DSYEd2MR.d.ts → route.d-DtuKY5dM.d.ts} +1 -1
- package/dist/{route.d-DCzQh4ix.d.cts → route.d-Nt-r-7IO.d.cts} +1 -1
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/shop/index.cjs +188 -188
- package/dist/shop/index.js +386 -386
- package/dist/shop/orders-v2/index.cjs +72 -72
- package/dist/shop/orders-v2/index.js +126 -126
- package/dist/tabs/index.cjs +114 -111
- package/dist/tabs/index.d.cts +18 -5
- package/dist/tabs/index.d.ts +18 -5
- package/dist/tabs/index.js +191 -188
- package/dist/televet/booking/index.cjs +214 -211
- package/dist/televet/booking/index.js +344 -341
- package/dist/televet/call/index.cjs +53 -53
- package/dist/televet/call/index.js +67 -67
- package/dist/{useInboxUnread.d-CXiaR3BZ.d.ts → useInboxUnread.d-0DrQPn7J.d.ts} +1 -1
- package/dist/{useInboxUnread.d-DERpMelw.d.cts → useInboxUnread.d-CRcOTkmu.d.cts} +1 -1
- package/dist/web/health-plan/index.cjs +1 -1
- package/dist/web/health-plan/index.js +1 -1
- package/dist/web/inbox/index.cjs +1 -1
- package/dist/web/inbox/index.d.cts +6 -6
- package/dist/web/inbox/index.d.ts +6 -6
- package/dist/web/inbox/index.js +1 -1
- package/dist/web/index.cjs +184 -184
- package/dist/web/index.js +181 -181
- package/dist/web/notifications/index.cjs +1 -1
- package/dist/web/notifications/index.d.cts +2 -2
- package/dist/web/notifications/index.d.ts +2 -2
- package/dist/web/notifications/index.js +1 -1
- package/dist/web/records-sheet/index.cjs +1 -1
- package/dist/web/records-sheet/index.js +1 -1
- package/dist/web/shop/index.cjs +1 -1
- package/dist/web/shop/index.js +2 -2
- package/dist/web/televet/booking/index.cjs +1 -1
- package/dist/web/televet/booking/index.js +1 -1
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/ui/index.cjs +1 -1
- package/dist/web/ui/index.js +16 -16
- package/package.json +1 -1
|
@@ -1,447 +1,447 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import{createContext,forwardRef as e,createElement as t,useState as n,useMemo as r,useContext as i,useEffect as o,useSyncExternalStore as l,useCallback as a,useRef as s,Fragment as c,useLayoutEffect as d,Component as u}from"react";import
|
|
2
|
+
import{createContext,forwardRef as e,createElement as t,useState as n,useMemo as r,useContext as i,useEffect as o,useSyncExternalStore as l,useCallback as a,useRef as s,Fragment as c,useLayoutEffect as d,Component as u}from"react";import*as p from"react-native";import{TextInput as h,StyleSheet as g,View as f,Pressable as m,Animated as y,Easing as b,ScrollView as k,useWindowDimensions as w,Modal as v,KeyboardAvoidingView as x,Platform as S,Image as T,Text as C,Linking as I,AppState as H,AccessibilityInfo as F}from"react-native";import{jsxs as R,jsx as P,Fragment as z}from"react/jsx-runtime";import{useSafeAreaInsets as D}from"react-native-safe-area-context";import{useEverfurRecords}from"@everfur/sdk/records";var $=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let n=e.type,r=n.families[t];return t==="mono"||n.namedFaces[t]?{fontFamily:r}:{fontFamily:r,fontWeight:n.weight[$[t]]}}function headingFace(e,t="bold"){let{headingFamily:n,headingWeight:r}=e.type;if(n===null&&r===null)return face(e,t);if(n!==null)return{fontFamily:n,fontWeight:r??e.type.weight[$[t]]};let i=face(e,t);return i.fontWeight===void 0||r===null?i:{fontFamily:i.fontFamily,fontWeight:r}}function O(e){return e<=450?"regular":e<=650?"medium":"bold"}var B={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=_.get(e);n===void 0&&(n=/* @__PURE__ */new Map,_.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i=L(e,t);return n.set(t,i),i}var _=/* @__PURE__ */new WeakMap;function L(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,i=O(Number(r)),o=n.face==="mono"?face(e,B[i]):n.face==="heading"?headingFace(e,i):face(e,i),l=n.face==="heading"?e.type.headingWeight??r:r,a=o.fontWeight===void 0?o:{fontFamily:o.fontFamily,fontWeight:l},s=n.size,c={...a,fontSize:s,lineHeight:Math.round(s*n.lineHeight*100)/100};return n.letterSpacing!==0&&(c.letterSpacing=Math.round(s*n.letterSpacing*100)/100),n.uppercase&&(c.textTransform="uppercase"),/* @__PURE__ */Object.freeze(c)}var E=/* @__PURE__ */Object.freeze({loading:"Loading",retry:"Try again",signedOut:"Sign in required",addToCart:"Add to cart",added:"Added",remove:"Remove",checkout:"Checkout",subtotal:"Subtotal",sample:"Sample",cartEmpty:"Your cart is empty.",choosePet:"Choose a pet",emptyTitle:"",emptyBody:"",emptyAsk:""}),A=/* @__PURE__ */Object.freeze({emptyTitle:true,emptyBody:true,emptyAsk:true}),j=/* @__PURE__ */Object.freeze({dna:"",records:"Records",inside:"Inside",profile:""}),W=/* @__PURE__ */Object.freeze({planTitle:e=>`${e}'s care plan`,cartLabel:e=>`${e} cart`}),M=/* @__PURE__ */Object.freeze([...Object.keys(E).filter(e=>A[e]===true&&E[e]==="").map(e=>`HEALTH_PLAN_COPY.${e}`),...["profile"].filter(e=>j[e]==="").map(e=>`HEALTH_PLAN_REASON_LABELS.${e}`)]);var N=/* @__PURE__ */Object.freeze({imageVariant:"wide",reasonVariant:"pills",cartBarVisibility:"whenItems",cartBarPlacement:"sticky",addButtonSize:"full",addedVariant:"link",categoryVariant:"text",showCategory:false,cardShadow:false,cardBorder:true});function U(e,t){return{setInPlan:t,addAll:async()=>{let n=(e?.items??[]).filter(e=>!e.inPlan);return(await Promise.all(n.map(e=>t(e.productId,true)))).every(Boolean)}}}function showHealthPlanCartBar(e,t){return(e??N.cartBarVisibility)==="always"||t>0}var q=/* @__PURE__ */Object.freeze(["showCategory","cardShadow","cardBorder","addButtonSize","addButtonFontSize","addedVariant","categoryVariant","cardPadding","itemTitleSize","itemTitleWeight","priceSize","priceWeight","reasonTextSize","reasonLabelWidth","reasonGap"]);function V(e){let t={};for(let n of q)e[n]!==void 0&&(t[n]=e[n]);return t}function G(e){let t=typeof e=="number"&&Number.isFinite(e)&&e>0?e:e==="compact"?32:44;return{height:t,hit:Math.max(44,t)}}function K(e){if(e.length>200||e.includes(",")&&!/rgba?\(|hsla?\(/i.test(e))return null;let t=/(rgba?\([^)]*\)|hsla?\([^)]*\)|#[0-9a-f]{3,8}\b|[a-z]+)\s*$/i.exec(e.trim())?.[1]??null;if(t===null)return null;let n=e.trim().slice(0,e.trim().length-t.length).trim().split(/\s+/).filter(Boolean);if(n.length<2||n.length>4)return null;let r=n.map(e=>e==="0"?0:/^-?\d*\.?\d+px$/.test(e)?Number(e.slice(0,-2)):Number.NaN);return r.some(e=>!Number.isFinite(e))?null:{color:t,offsetX:r[0]??0,offsetY:r[1]??0,blur:Math.max(0,r[2]??0)}}function X(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:null}function Y(e,t){let n=X(e);return n===null?0:n-t}function isHealthPlanSessionRequired(e){return e!==null&&(e.reasonCode==="session_required"||e.code==="sessionRequired")}var J=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanCartDock@v1"),Q=globalThis,Z=Q[J]??(Q[J]=createContext(null));function HealthPlanCartScope({children:e}){let[i,o]=n(null),l=r(()=>({dock:i,publish:o}),[i]);return t(Z.Provider,{value:l},e)}function useHealthPlanCartDock(){return i(Z)?.dock??null}function ee(e,t,n,petRef,l,a){let c=i(Z)?.publish,d=s(a);o(()=>{d.current=a},[a]);let u=r(()=>U(l,(e,t)=>d.current(e,t)),[l]);o(()=>{if(!(c===void 0||!e))return c(/* @__PURE__ */Object.freeze({cart:t,busy:n,petRef:petRef,plan:l,...u})),()=>c(null)},[c,e,t,n,petRef,l,u])}var te=/* @__PURE__ */Object.freeze({track(){},trackExpectedFailure(){}});function ok(e,t){/* @__PURE__ */
|
|
3
3
|
return Object.freeze({ok:true,value:e})}function err(e){/* @__PURE__ */
|
|
4
|
-
return Object.freeze({ok:false,error:e})}var te=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var ne=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),re=globalThis,ie=re[ne]??(re[ne]=createContext(null));ie.displayName??="EverfurContext";function oe(){let e=i(ie);if(e===null)throw new te("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}var le=/* @__PURE__ */Object.freeze({opened:"health_plan.opened",productClicked:"health_plan.product_clicked",checkoutStarted:"health_plan.checkout_started"});function ae(){return i(ie)?.runtime.registry.services.telemetry??ee}var se=createContext(null);function HealthPlanPetScope({petRef:petRef,children:e}){return t(se.Provider,{value:petRef},e)}function ce(e){let t=i(se),n=i(ie);return t??e??n?.activePet??null}function de(e,petRef,t){let n=ae(),r=s(null);o(()=>{if(!e||petRef===null||r.current===petRef)return;r.current=petRef;let i=t?.items??[];n.track(le.opened,{petRef:petRef,itemsCount:i.length,inPlanCount:i.filter(e=>e.inPlan).length})},[e,petRef,t,n])}function ue(e,petRef,t,n){e.track(le.productClicked,{petRef:petRef,productId:t,inPlan:n})}function pe(e,petRef,t){e.track(le.checkoutStarted,{petRef:petRef,itemsCount:t.count,subtotal:t.subtotal,currency:t.currency})}function he(e){return e!=null&&(e.wait!==void 0||e.pick.hidden===true)}function ge(e){return{...e,pick:{...e.pick,none:true,hidden:true}}}var fe=/* @__PURE__ */Object.freeze({productId:"",partnerSku:null,title:"",description:null,category:null,price:null,currency:null,imageUrl:null,url:null,reasons:[],inPlan:false,sample:false});var me=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],ye=/* @__PURE__ */Object.freeze(me.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(ye.map(e=>e.wireCode));var be=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),ke=/* @__PURE__ */Object.freeze(ye.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:be[e.wireCode]}))),we=new Map(ke.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),ve=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(ke.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...ve]){let t=we.get(e+n);if(t)return t}}var xe=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return xe[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var Se=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return Se.has(e)}var Te=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||Te.has(e)}var Ce=500,Ie=8e3,He=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(Ce*2**n,Ie);return Math.floor(t()*r)}var Fe="This feature isn't available on your account right now.",Re="Something in that request was not right. Check the details and try again.",Pe=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:Fe,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:Re,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:Fe,runtimeDisposed:Re,unknown:"Something went wrong. Please try again."}),ze="This session has ended. Please sign in again.",De="linked_account_read_only";function $e(e,t,n){return e==="conflict"&&n===De?Fe:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?ze:userFacingError(e)}function userFacingError(e){return Pe[e]}function Oe(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var Be=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===De,i={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:$e(e,t?.wireCode,r?De:null)};t?.httpStatus!==void 0&&(i.httpStatus=t.httpStatus),t?.requestId&&(i.requestId=t.requestId),typeof t?.reasonCode=="string"&&Be.test(t.reasonCode)&&(i.reasonCode=t.reasonCode);let o=t?.retryAfterSeconds;if(typeof o=="number"&&Number.isFinite(o)&&o>=0&&(i.retryAfterSeconds=Math.round(o)),n);return t?.wireMessage&&Oe(i,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&Oe(i,"raw",t.raw),/* @__PURE__ */Object.freeze(i)}function assertNever(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}function errorFrame(e){/* @__PURE__ */
|
|
5
|
-
return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var
|
|
4
|
+
return Object.freeze({ok:false,error:e})}var ne=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var re=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),ie=globalThis,oe=ie[re]??(ie[re]=createContext(null));oe.displayName??="EverfurContext";function le(){let e=i(oe);if(e===null)throw new ne("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}var ae=/* @__PURE__ */Object.freeze({opened:"health_plan.opened",productClicked:"health_plan.product_clicked",checkoutStarted:"health_plan.checkout_started"});function se(){return i(oe)?.runtime.registry.services.telemetry??te}var ce=createContext(null);function HealthPlanPetScope({petRef:petRef,children:e}){return t(ce.Provider,{value:petRef},e)}function de(e){let t=i(ce),n=i(oe);return t??e??n?.activePet??null}function ue(e,petRef,t){let n=se(),r=s(null);o(()=>{if(!e||petRef===null||r.current===petRef)return;r.current=petRef;let i=t?.items??[];n.track(ae.opened,{petRef:petRef,itemsCount:i.length,inPlanCount:i.filter(e=>e.inPlan).length})},[e,petRef,t,n])}function pe(e,petRef,t,n){e.track(ae.productClicked,{petRef:petRef,productId:t,inPlan:n})}function he(e,petRef,t){e.track(ae.checkoutStarted,{petRef:petRef,itemsCount:t.count,subtotal:t.subtotal,currency:t.currency})}function ge(e){return e!=null&&(e.wait!==void 0||e.pick.hidden===true)}function fe(e){return{...e,pick:{...e.pick,none:true,hidden:true}}}var me=/* @__PURE__ */Object.freeze({productId:"",partnerSku:null,title:"",description:null,category:null,price:null,currency:null,imageUrl:null,url:null,reasons:[],inPlan:false,sample:false});var ye=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],be=/* @__PURE__ */Object.freeze(ye.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(be.map(e=>e.wireCode));var ke=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),we=/* @__PURE__ */Object.freeze(be.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:ke[e.wireCode]}))),ve=new Map(we.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),xe=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(we.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...xe]){let t=ve.get(e+n);if(t)return t}}var Se=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return Se[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var Te=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return Te.has(e)}var Ce=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||Ce.has(e)}var Ie=500,He=8e3,Fe=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(Ie*2**n,He);return Math.floor(t()*r)}var Re="This feature isn't available on your account right now.",Pe="Something in that request was not right. Check the details and try again.",ze=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:Re,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:Pe,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:Re,runtimeDisposed:Pe,unknown:"Something went wrong. Please try again."}),De="This session has ended. Please sign in again.",$e="linked_account_read_only";function Oe(e,t,n){return e==="conflict"&&n===$e?Re:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?De:userFacingError(e)}function userFacingError(e){return ze[e]}function Be(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var _e=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===$e,i={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:Oe(e,t?.wireCode,r?$e:null)};t?.httpStatus!==void 0&&(i.httpStatus=t.httpStatus),t?.requestId&&(i.requestId=t.requestId),typeof t?.reasonCode=="string"&&_e.test(t.reasonCode)&&(i.reasonCode=t.reasonCode);let o=t?.retryAfterSeconds;if(typeof o=="number"&&Number.isFinite(o)&&o>=0&&(i.retryAfterSeconds=Math.round(o)),n);return t?.wireMessage&&Be(i,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&Be(i,"raw",t.raw),/* @__PURE__ */Object.freeze(i)}function assertNever(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}function errorFrame(e){/* @__PURE__ */
|
|
5
|
+
return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var Le="x-everfur-anon-token",Ee="anonTokenInvalid";async function Ae(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function je(e,t){let n=e instanceof Error?e.message:typeof e=="string"?e:null;return makeEverfurError("authRejected",{retryable:false,...t?.wireCode?{wireCode:t.wireCode}:{},...t?.requestId?{requestId:t.requestId}:{},...n?{wireMessage:n}:{},...e!=null?{raw:e}:{}})}function authHeaders(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:(t["x-everfur-partner-key"]=e.publishableKey,e.anonToken&&(t[Le]=e.anonToken)),e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}function withAuthHeaders(e,t){return{...e,headers:{...We(e.headers),...authHeaders(t)}}}function We(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e)){let e=n.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===Le||(t[n]=r)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let n=await Ae(t),r=await t.transport.request(withAuthHeaders(e,Me(t,n)));if(r.ok||Ue(r.error.raw)!==Ee||t.anonIdentity===void 0||t.userRef!==null)return r;let i=await t.anonIdentity.token({forceRefresh:true});return i===null||i===n?r:t.transport.request(withAuthHeaders(e,Me(t,i)))}let n;try{n=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(je(e))}let r=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:n,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(r.ok||r.error.httpStatus!==401)return r;let i;try{i=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(je(e,{wireCode:Ue(r.error.raw),requestId:r.error.requestId}))}let o=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:i,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!o.ok&&o.error.httpStatus===401?(t.identity.reportRejected?.(),err(Ne(o.error))):o}function Me(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function Ne(e){let t=e.raw,n=Ue(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...n?{wireCode:n}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function Ue(e){if(typeof e!="object"||e===null)return null;let t=e,n=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof n=="string"&&n.length>0?n:null}function qe(e,t){let n=globalThis.URL;if(typeof n=="function"){let r;try{r=t===void 0?new n(e):new n(e,t)}catch{return null}try{if(r.protocol)return r}catch{}}return Xe(e)}var Ve=/^([a-z][a-z0-9+.-]*):\/\/(?:([^:@/?#]*)(?::([^@/?#]*))?@)?(\[[0-9a-f:.]+\]|[\w.~-]+)(?::(\d*))?(\/[^?#]*)?(\?[^#]*)?(#.*)?$/i,Ge=/[\s\u0000-\u001f\u007f\\]/,Ke={"http:":"80","https:":"443"};function Xe(e,t){let n=e.trim();let r=Ge.test(n)?null:Ve.exec(n);if(r===null)return null;let[,i="",o="",l="",a="",s="",c="",d="",u=""]=r,p=`${i.toLowerCase()}:`,h=Number(s);if(h>65535)return null;let g=s===""||String(h)===Ke[p]?"":String(h),f=Ke[p]!==void 0,m=a.toLowerCase()+(g&&`:${g}`),y=c||(f?"/":""),b=o||l?`${o}${l&&`:${l}`}@`:"";return{href:`${p}//${b}${m}${y}${d}${u}`,protocol:p,username:o,password:l,hostname:a.toLowerCase(),port:g,origin:f?`${p}//${m}`:"null",pathname:y,search:d==="?"?"":d,hash:u==="#"?"":u}}function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:Ye(e)})}function Ye(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var Je=3e4,Qe=He*2,Ze="idempotency-key",et=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),tt=/* @__PURE__ */Object.freeze({onEvent(){}}),nt=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function rt(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}function createRequestFunnel(e){let t=e.observer??tt,n=e.timers??nt,r=e.rng??Math.random,i=e.sleep??((e,t)=>kt(e,n,t)),o=e.maxAttempts??Fe,l=e.unaryTimeoutMs??Je,a=e.newIdempotencyKey??ot(),s=e=>{try{t.onEvent(e)}catch{}};async function c(t,c,d){let u=d?.maxAttempts,p=Math.max(1,u??o),h=d?.idempotent??et.has(c.method),g=d?.idempotencyKey===void 0?null:rt(d.idempotencyKey),f=h?g??a():null,m=it(c,f),y=0;for(;;){let o=e=>/* @__PURE__ */Object.freeze({call:t,method:c.method,path:c.path,attempt:y,...f?{idempotencyKey:f}:{},...e});s(o({phase:"attempt"}));let a=yt(l,n),d=bt(a.signal,c.signal),h;try{h=await authedSend({...m,signal:d.signal},e.auth)}catch(e){h=err(networkError(e))}finally{d.dispose(),a.cancel()}if(h.ok)return s(o({phase:"settled",ok:true,reason:"ok"})),h;let g=h.error,b=at(g,y,{maxAttempts:p,rng:r,now:n.now(),aborted:c.signal?.aborted===true,...u!==void 0?{perCallMaxAttempts:u}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),k={ok:false,code:g.code,reason:b.reason,...g.httpStatus!==void 0?{httpStatus:g.httpStatus}:{},...g.requestId!==void 0?{requestId:g.requestId}:{}};if(!b.retry)return s(o({phase:"settled",...k})),err(g);if(s(o({phase:"retry",...k,delayMs:b.delayMs})),await i(b.delayMs,c.signal),c.signal?.aborted===true)return s(o({phase:"settled",...k,reason:"aborted"})),err(g);y+=1}}async function d(t){return withAuthHeaders(t,await mt(e.auth))}async function*u(t,n,r){s(
|
|
6
6
|
/* @__PURE__ */Object.freeze({call:t,phase:"stream.open",method:n.method,path:n.path,attempt:0}));try{yield*e.auth.transport.stream(n,r)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
|
|
7
|
-
return Object.freeze({send:c,authorize:d,stream:u})}function
|
|
8
|
-
return Object.freeze(t)}var
|
|
9
|
-
return Object.freeze(r)}function
|
|
10
|
-
return Object.freeze({petRef:
|
|
11
|
-
return Object.freeze({...e,items:/* @__PURE__ */Object.freeze(r)})}var
|
|
12
|
-
return Object.freeze({items:t,count:t.length,subtotal:r/100,currency:t[0]?.currency??null})}function formatHealthPlanPrice(e,t,n,r){if(e===null||t===null||!Number.isFinite(e))return null;let i=r?.dropZeroCents===true&&Number.isInteger(e);try{return new Intl.NumberFormat(n,{style:"currency",currency:t,...i?{minimumFractionDigits:0,maximumFractionDigits:0}:{}}).format(e)}catch{return`${t} ${i?String(e):e.toFixed(2)}`}}function formatHealthPlanPriceWith(e,t,n){return formatHealthPlanPrice(e,t,n?.locale,n)}function useEverfurHealthPlanRepository(){let{runtime:e}=
|
|
13
|
-
return Object.freeze(t)}function healthPlanSubscriptionFromWire(e){if(e===null||typeof e!="object")return null;let t=e,n=
|
|
14
|
-
return Object.freeze({subscriptionId:n,productId:r,title:
|
|
15
|
-
return Object.freeze({orderId:n,productId:r,title:
|
|
16
|
-
return Object.freeze({status:n,orderNumber:
|
|
17
|
-
return Object.freeze({orders:/* @__PURE__ */Object.freeze(t.map(healthPlanOneBoxOrderFromWire).filter(e=>e!==null)),nextCursor:typeof n=="string"&&n.length>0&&n.length<=
|
|
18
|
-
return Object.freeze({productId:n,currency:r,boxPrice:i,firstBoxPrice:l?
|
|
19
|
-
return Object.freeze(Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null)))}function
|
|
20
|
-
return Object.freeze({petRef
|
|
21
|
-
return Object.freeze({status:n,purchase:r,order:i??o[0]??null,orders:/* @__PURE__ */Object.freeze(o.length>0?o:i===null?[]:[i]),subscription:healthPlanSubscriptionFromWire(t?.subscription)})}function Jn(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e})}function Qn(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the expected shape`})}function Zn(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}var er=e=>typeof e=="string"&&e.length>0&&e.length<=Hn,tr=e=>typeof e=="string"&&e.length<=2048&&/^https?:\/\/[^\s/][^\s]*$/i.test(e);function nr(petRef){return`/widget/v1/pets/${encodeURIComponent(petRef)}/plan`}async function rr(e,petRef,t){if(!er(petRef))return err(Jn("petRef must be 1..128 characters"));let n=await e.send("healthPlan.page.read",{method:"GET",path:`${nr(petRef)}/page`,...t?.signal?{signal:t.signal}:{}});if(!n.ok)return err(n.error);let r=healthPlanPageFromWire(n.value,petRef);return r===null?err(Qn("healthPlan.page.read")):ok(r)}var ir=/* @__PURE__ */new WeakMap;function or(e){let t=ir.get(e);if(t!==void 0)return t;let n=lr(e);return ir.set(e,n),n}function lr(e){return{getPage:(petRef,t)=>{if(e.isDisposed)return Promise.resolve(err(Zn("getPage")));let{services:n}=e.registry,r=xt(createRequestFunnel({auth:n.authFor(null),...n.errorPolicy?{errorPolicy:n.errorPolicy}:{}}));return rr(r,petRef,t)}}}function createHealthPlanPageRepositoryOver(e){let t=xt(e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}));return{getPage:(petRef,e)=>rr(t,petRef,e),async startCheckout(petRef,e,n){if(!er(petRef))return err(Jn("petRef must be 1..128 characters"));if(!er(e.productId))return err(Jn("productId must be 1..128 characters"));if(e.purchase!=="one_box"&&e.purchase!=="subscription")return err(Jn("purchase must be one_box or subscription"));if(e.intervalDays!==void 0&&(!Number.isInteger(e.intervalDays)||e.intervalDays<=0))return err(Jn("intervalDays must be a positive whole number"));if(!tr(e.successUrl)||!tr(e.cancelUrl))return err(Jn("successUrl and cancelUrl must be absolute http(s) URLs"));let r=await t.send("healthPlan.checkout.start",{method:"POST",path:`${nr(petRef)}/checkout`,body:{product_id:e.productId,purchase:e.purchase,...e.purchase==="subscription"&&e.intervalDays!==void 0?{interval_days:e.intervalDays}:{},success_url:e.successUrl,cancel_url:e.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${n}`});if(!r.ok)return err(r.error);let i=healthPlanCheckoutSessionFromWire(r.value);return i===null?err(Qn("healthPlan.checkout.start")):ok(i)},async startCartCheckout(petRef,e,n){if(!er(petRef))return err(Jn("petRef must be 1..128 characters"));let r=e.items;if(!Array.isArray(r)||r.length<1||r.length>Fn)return err(Jn("items must hold 1..10 lines"));let i=/* @__PURE__ */new Set;for(let e of r){if(!er(e.productId)||i.has(e.productId))return err(Jn("each item needs a productId, once per cart"));if(i.add(e.productId),e.purchase!=="one_box"&&e.purchase!=="subscription")return err(Jn("purchase must be one_box or subscription"));let t=e.quantity??1;if(!Number.isInteger(t)||t<1||t>Fn)return err(Jn("quantity must be a whole number 1..10"));if(e.purchase==="subscription"&&t!==1)return err(Jn("a subscription line is quantity 1"));if(e.intervalDays!==void 0&&(!Number.isInteger(e.intervalDays)||e.intervalDays<=0))return err(Jn("intervalDays must be a positive whole number"))}if(!tr(e.successUrl)||!tr(e.cancelUrl))return err(Jn("successUrl and cancelUrl must be absolute http(s) URLs"));let o=await t.send("healthPlan.checkout.start",{method:"POST",path:`${nr(petRef)}/checkout`,body:{items:r.map(e=>({product_id:e.productId,purchase:e.purchase,...e.purchase==="subscription"&&e.intervalDays!==void 0?{interval_days:e.intervalDays}:{},quantity:e.quantity??1})),success_url:e.successUrl,cancel_url:e.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${n}`});if(!o.ok)return err(o.error);let l=healthPlanCheckoutSessionFromWire(o.value);return l===null?err(Qn("healthPlan.checkout.start")):ok(l)},async getCheckout(petRef,e){if(!er(petRef))return err(Jn("petRef must be 1..128 characters"));if(!er(e))return err(Jn("checkoutId must be 1..128 characters"));let n=await t.send("healthPlan.checkout.read",{method:"GET",path:`${nr(petRef)}/checkout/${encodeURIComponent(e)}`});if(!n.ok)return err(n.error);let r=healthPlanCheckoutStateFromWire(n.value);return r===null?err(Qn("healthPlan.checkout.read")):ok(r)}}}function createHealthPlanPageRepository(e){let t=()=>{let{services:t}=e.registry;return createHealthPlanPageRepositoryOver({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})};return{getPage:(petRef,n)=>e.isDisposed?Promise.resolve(err(Zn("getPage"))):t().getPage(petRef,n),startCheckout:(petRef,n,r)=>e.isDisposed?Promise.resolve(err(Zn("startCheckout"))):t().startCheckout(petRef,n,r),startCartCheckout:(petRef,n,r)=>e.isDisposed?Promise.resolve(err(Zn("startCartCheckout"))):t().startCartCheckout?.(petRef,n,r)??Promise.resolve(err(Zn("startCartCheckout"))),getCheckout:(petRef,n)=>e.isDisposed?Promise.resolve(err(Zn("getCheckout"))):t().getCheckout(petRef,n)}}var ar=Qt,sr=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanPageReads@v1");function cr(){let e=globalThis,t=e[sr];if(t instanceof WeakMap)return t;let n=/* @__PURE__ */new WeakMap;return e[sr]=n,n}function dr(e,t,userRef,petRef,n){let r=cr(),i=r.get(t);i===void 0&&(i=/* @__PURE__ */new Map,r.set(t,i));let o=i,l=`${userRef}\0${petRef}`,a=o.get(l);if(!n&&a!==void 0&&(a.at===null||Date.now()-a.at<ar))return a.promise;let s={at:null,promise:e.getPage(petRef).then(e=>(o.get(l)===s&&(e.ok||kt(e.error)?s.at=Date.now():o.delete(l)),e))};return o.set(l,s),s.promise}function useHealthPlanPageRepository(){let{runtime:e}=oe();return r(()=>createHealthPlanPageRepository(e),[e])}function useHealthPlanPage(e){let{userRef:userRef,runtime:t}=oe(),i=r(()=>or(t),[t]),l=e.repository,c=l??i,d=a((e,n)=>l!==void 0||userRef==null?c.getPage(e):dr(i,t,userRef,e,n),[l,c,i,t,userRef]),{petRef:petRef}=e,u=e.enabled!==false&&userRef!=null&&petRef!==null,[p,h]=n({phase:"idle",petRef:null,page:null,error:null}),g=s(0),f=s(0),m=a(async e=>{let t=++g.current;if(!u||petRef===null){h(e=>e.phase==="idle"&&e.petRef===null?e:{phase:"idle",petRef:null,page:null,error:null});return}h(e=>({phase:"loading",petRef:petRef,page:e.petRef===petRef?e.page:null,error:null}));let n=await d(petRef,e);t===g.current&&(n.ok?h({phase:"ready",petRef:petRef,page:n.value,error:null,readyAt:Date.now()}):kt(n.error)?h({phase:"ready",petRef:petRef,page:null,error:null,missing:true,readyAt:Date.now()}):h({phase:"failed",petRef:petRef,page:null,error:n.error}))},[u,petRef,d]),y=a(()=>m(true),[m]),b=p.phase==="ready"&&p.petRef===petRef,k=a(async()=>{if(!u||petRef===null||!b)return;let e=g.current,t=++f.current,n=await d(petRef,true);e!==g.current||t!==f.current||!n.ok||h(e=>e.phase==="ready"&&e.petRef===petRef?{phase:"ready",petRef:petRef,page:n.value,error:null,readyAt:Date.now()}:e)},[u,petRef,b,d]);Zt({lifecycle:e.lifecycle,refreshKey:e.refreshKey,readyAt:b?p.readyAt??null:null,revalidate:()=>{k()},refresh:()=>{b?k():y()}}),o(()=>(m(false),()=>{g.current+=1}),[m]);let w=u&&p.petRef!==petRef;return r(()=>({phase:w?"loading":p.phase,page:w?null:p.page,error:w?null:p.error,missing:!w&&p.missing===true,refresh:y}),[w,p,y])}var ur=()=>()=>{},pr=()=>null;function hr(e,t){return l(t?.subscribe??ur,t?.get??pr,t?.get??pr)??e}var gr=/* @__PURE__ */Object.freeze({chatAnswerStyle:"cards",chatHistoryStyle:"sheet",chatTopCard:"focus",chatFollowUpCount:3,chatFollowUpsExcludeTelevet:false,chatComposerMic:true,chatComposerUpload:true,safetyDisclaimerPlacement:"composer",healthPlanLayout:"focus_plan",recordsTopRiskLine:true,recordsClearResultsFilter:true,chatComposerStyle:"compact",chatComposerPlaceholder:"pet_name",chatHistoryBar:"scroll",chatGeneralBanner:true,chatSendButton:"always_dark",chatTextingAsk:true,serverSlots:false}),fr=/* @__PURE__ */Object.freeze({chatAnswerStyle:"chat_answer_style",chatHistoryStyle:"chat_history_style",chatTopCard:"chat_top_card",chatFollowUpCount:"chat_follow_up_count",chatFollowUpsExcludeTelevet:"chat_follow_ups_exclude_televet",chatComposerMic:"chat_composer_mic",chatComposerUpload:"chat_composer_upload",safetyDisclaimerPlacement:"safety_disclaimer_placement",healthPlanLayout:"health_plan_layout",recordsTopRiskLine:"records_top_risk_line",recordsClearResultsFilter:"records_clear_results_filter",chatComposerStyle:"chat_composer_style",chatComposerPlaceholder:"chat_composer_placeholder",chatHistoryBar:"chat_history_bar",chatGeneralBanner:"chat_general_banner",chatSendButton:"chat_send_button",chatTextingAsk:"chat_texting_ask",serverSlots:"server_slots"}),mr=Object.keys(fr),yr="presentation",br="presentation.";var kr={chatAnswerStyle:["bubbles","cards"],chatHistoryStyle:["drawer","sheet"],chatTopCard:["none","focus"],safetyDisclaimerPlacement:["composer","answer_footer","none"],healthPlanLayout:["standard","focus_plan"],chatComposerStyle:["standard","compact"],chatComposerPlaceholder:["generic","pet_name"],chatHistoryBar:["pinned","scroll"],chatSendButton:["always_dark","dim_when_empty"]},wr=/* @__PURE__ */new Set(["chatFollowUpsExcludeTelevet","chatComposerMic","chatComposerUpload","recordsTopRiskLine","recordsClearResultsFilter","chatGeneralBanner","chatTextingAsk","serverSlots"]);function vr(e,t){if(t==null)return;let n=kr[e];return n!==void 0?typeof t=="string"&&n.includes(t)?t:void 0:wr.has(e)?typeof t=="boolean"?t:void 0:typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=3?t:void 0}function parsePresentation(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n={};for(let e of mr){let r=fr[e],i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[e],o=vr(e,i);o!==void 0&&(n[e]=o)}return Object.keys(n).length===0?null:/* @__PURE__ */Object.freeze(n)}function isPresentationFieldLocked(e,t){if(t==null)return false;let n=`${br}${fr[e]}`;for(let e of t)if(e===yr||e===n)return true;return false}function resolvePresentation(e){let t=parsePresentation(e?.server??null)??{},{safetyDisclaimerPlacement:n,...r}=t,i=n==="none"||n===void 0?r:{...r,safetyDisclaimerPlacement:n},o=parsePresentation(e?.client??null)??{},l=e?.locked?[...e.locked]:null,a={};for(let e of mr){let t=i[e],n=isPresentationFieldLocked(e,l)?void 0:o[e];a[e]=n??t??gr[e]}/* @__PURE__ */
|
|
22
|
-
return Object.freeze(a)}var
|
|
23
|
-
return Object.freeze({profileVersion:typeof t=="number"&&Number.isInteger(t)&&t>=0?t:0,sex:
|
|
24
|
-
return Object.freeze({petRef:
|
|
25
|
-
return Object.freeze(t.flatMap(e=>{let t=widgetPetFromWire(e);return t===null?[]:[t]}))}function createPetsRepository(e){return Oi(createRequestFunnel({auth:e}),createRequestFunnel({auth:e,unaryTimeoutMs:vi}))}function Oi(e,t=e){let n=(e,t)=>t?{...e,signal:t}:e,r=petRef=>Ci(petRef,void 0)??`/widget/v1/pets/${encodeURIComponent(petRef)}`;return{async list(t){let r=await e.send("pets.list",n({method:"GET",path:"/widget/v1/pets"},t?.signal));return r.ok?ok($i(r.value)):err(r.error)},async registerPet(petRef,t,n){let r=Ci(petRef,t);if(r!==null)return err(r);let i=Fi(t);if("error"in i)return err(i.error);let o={method:"POST",path:`/widget/v1/pets/${encodeURIComponent(petRef)}`,body:i.body},l=await e.send("pets.registerPet",n?.signal?{...o,signal:n.signal}:o);return l.ok?ok(zi(l.value,petRef)):err(l.error)},async updatePet(petRef,t,i){let o=r(petRef);if(typeof o!="string")return err(o);let l=Hi(t);if("error"in l)return err(l.error);let a=await e.send("pets.updatePet",n({method:"PATCH",path:o,body:l.body},i?.signal));return a.ok?ok(zi(a.value,petRef)):err(a.error)},async getPetProfile(petRef,t){let i=r(petRef);if(typeof i!="string")return err(i);let o=await e.send("pets.getPetProfile",n({method:"GET",path:`${i}/profile`},t?.signal));if(!o.ok)return err(o.error);let l=Di(o.value);return l===null?err(makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:"the pet profile response carried no pet_ref"})):ok(l)},async deletePet(petRef,t){let i=r(petRef);if(typeof i!="string")return err(i);let o=await e.send("pets.deletePet",n({method:"DELETE",path:i},t?.signal));return o.ok?ok(void 0):err(o.error)},async eraseUserData(e){let r=await t.send("pets.eraseUserData",n({method:"DELETE",path:"/widget/v1/me"},e?.signal),{maxAttempts:1});return r.ok?ok(void 0):err(r.error)}}}var Bi=/* @__PURE__ */new WeakMap;function _i(e,t){let n=Bi.get(e);return n===void 0&&(n=/* @__PURE__ */new Set,Bi.set(e,n)),n.add(t),()=>{n?.delete(t)}}function useEverfurPets(){let{runtime:e,userRef:userRef,activePet:t,scopeEpoch:i}=oe(),l=r(()=>createPetsRepository(e.registry.services.authFor(userRef)),[e,userRef,i]),[c,d]=n({repository:l,pets:[],loading:true,error:null}),u=c.repository===l?c:{pets:[],loading:true,error:null},p=s(0),h=a(async()=>{let e=++p.current;d(e=>({...e,repository:l,loading:true,error:null,pets:e.repository===l?e.pets:[]}));let t=await l.list();e===p.current&&d(t.ok?{repository:l,pets:t.value,loading:false,error:null}:e=>({repository:l,pets:e.repository===l?e.pets:[],loading:false,error:t.error}))},[l]);o(()=>(h(),()=>{p.current+=1}),[h]),o(()=>_i(e,()=>{h()}),[e,h]);let g=r(()=>t===null?null:u.pets.find(e=>e.petRef===t)??null,[t,u.pets]);return r(()=>({pets:u.pets,activePet:g,loading:u.loading,error:u.error,refresh:h}),[u.pets,u.loading,u.error,g,h])}var Li=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var Ei=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Ei(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var Ai=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var ji={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Wi={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},Mi={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},Ni={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Ui={regular:"400",medium:"500",bold:"700"},qi={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Vi=0,Gi="System",Ki="monospace",Xi=["content","heading","control","compact","badge"];function Yi(e){let t={};for(let n of Xi)t[n]=e;return t}var Ji=[];function Qi(){return{family:Gi,mono:Ki,fontUrl:null,families:{regular:Gi,medium:Gi,bold:Gi,mono:Ki,monoMedium:Ki,monoBold:Ki},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:Mi,tierSizes:Yi(Mi),lineHeight:Ni,weight:Ui,letterSpacing:qi,scale:1,maxScale:Vi,scaleCaps:Ai,headingFamily:null,headingWeight:null,fontSources:Ji,roles:Li,typeScale:1}}var Zi={},eo=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var to={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(eo.standard),emphasized:cssCubicBezier(eo.emphasized),exit:cssCubicBezier(eo.exit)},reducedMotion:false},no={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},ro=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:no,space:ji,radius:Wi,type:Qi(),motion:to,slots:Zi}),io={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"},oo=deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:io,space:ji,radius:Wi,type:Qi(),motion:to,slots:Zi});var lo=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ao=globalThis,so=ao[lo]??(ao[lo]=createContext(ro));so.displayName??="EverfurThemeContext";function useEverfurTheme(){return i(so)}function co(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:n,...r}){let i=useEverfurTheme(),o=n===void 0?void 0:i.type.roles[n],l=co(i.type,e??o?.tier??"content"),a=n===void 0?r:{...r,style:[{...textRole(i,n),color:i.color.text.primary,flexShrink:1},r.style]};return t(T,l===void 0?a:{maxFontSizeMultiplier:l,...a})}e(function(e,n){return t(p,{...e,...n===null?{}:{ref:n}})});var uo=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(e){return uo[e]}function decideCapability(e,t,n){let r=requires(e),i=/* @__PURE__ */new Map;for(let e of t)i.set(e.resource,e);if(n?.isPending===true&&r.some(e=>!i.has(e)))return go({name:e,enabled:false,isPending:true,limits:{}});let o=po(r,i);return r.filter(e=>i.get(e)?.granted!==true).length===0?go({name:e,enabled:true,isPending:false,limits:o}):go({name:e,enabled:false,isPending:false,limits:o,disabled:ho(r,i)})}function po(e,t){let n={};for(let r of e){let e=t.get(r)?.limits;if(e)for(let[t,r]of Object.entries(e)){let e=n[t];n[t]=e===void 0?r:Math.min(e,r)}}return n}function ho(e,t){for(let n of e){let e=t.get(n)?.disabled;if(e)/* @__PURE__ */
|
|
7
|
+
return Object.freeze({send:c,authorize:d,stream:u})}function it(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==Ze&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function ot(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var lt=10;function at(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=st(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let i=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let o=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(lt,Math.floor(t)))},l=n.perCallMaxAttempts??o()??n.maxAttempts;if(t+1>=l)return{retry:false,reason:"attempts-exhausted"};let a=ct(e,n.now);return a!==null?a>Qe?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:i,delayMs:a}:{retry:true,reason:i,delayMs:backoffDelayMs(t,n.rng)}}function st(e){let t=e.code==="unknown"?fromWire(gt(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function ct(e,t){let n=ut(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=dt(e.raw);return r===null?null:Math.round(r*1e3)}function dt(e){for(let t of pt(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function ut(e){for(let t of pt(e)){let e=t.resets_at,n=ht(e);if(n!==null)return n}return null}function pt(e){if(!ft(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];ft(r)&&t.push(r)}return t}function ht(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function gt(e){for(let t of pt(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function ft(e){return typeof e=="object"&&e!==null}async function mt(e){if(e.mode==="anonymous"){let t=await Ae(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function yt(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function bt(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let i=()=>r.abort();return e.addEventListener("abort",i,{once:true}),t.addEventListener("abort",i,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",i),t.removeEventListener("abort",i)}}}function kt(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let i=t.setTimeout(()=>{n?.removeEventListener("abort",o),r()},e),o=()=>{t.clearTimeout(i),r()};n?.addEventListener("abort",o,{once:true})})}function wt(e){return e!=null&&(e.httpStatus===404||e.category==="notFound")}function vt(e){return e.code!=="conversationNotFound"?e:makeEverfurError("resourceNotFound",{retryable:false,...e.httpStatus===void 0?{}:{httpStatus:e.httpStatus},...e.requestId===void 0?{}:{requestId:e.requestId},...e.reasonCode===void 0?{}:{reasonCode:e.reasonCode},...e.wireMessage===void 0?{}:{wireMessage:e.wireMessage},...e.raw===void 0?{}:{raw:e.raw}})}function xt(e){return e.ok?e:err(vt(e.error))}function St(e){return{send:async(...t)=>xt(await e.send(...t)),authorize:t=>e.authorize(t),stream:(t,n,r)=>e.stream(t,n,r)}}var Tt=/* @__PURE__ */Object.freeze(["dna","records","inside","profile"]),Ct=128;function It(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e})}function Ht(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function Ft(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response carried no plan`})}var Rt=(e,t=4e3)=>typeof e=="string"&&e.trim().length>0&&e.length<=t?e.trim():null;function Pt(e){let t=Rt(e,2048);return t===null?null:/^https:\/\/[^\s]+$/i.test(t)?t:null}function zt(e){let t=typeof e=="number"?e:typeof e=="string"&&/^\d+(\.\d+)?$/.test(e.trim())?Number(e):Number.NaN;return Number.isFinite(t)&&t>=0?t:null}function Dt(e){return typeof e=="string"&&/^[A-Za-z]{3}$/.test(e)?e.toUpperCase():null}function $t(e){if(!Array.isArray(e))/* @__PURE__ */return Object.freeze([]);let t=[];for(let n of e){if(n===null||typeof n!="object")continue;let e=n,r=Rt(e.text,1e3);if(r===null)continue;let i=typeof e.kind=="string"&&Tt.includes(e.kind)?e.kind:"profile";t.push(/* @__PURE__ */Object.freeze({kind:i,text:r}))}/* @__PURE__ */
|
|
8
|
+
return Object.freeze(t)}var Ot=6;function Bt(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=400?e:null}function _t(e,t,n){if(!Array.isArray(e))/* @__PURE__ */return Object.freeze([]);let r=[];for(let i of e){if(r.length>=n)break;if(i===null||typeof i!="object"||Array.isArray(i))continue;let e=t(i);e!==null&&r.push(e)}/* @__PURE__ */
|
|
9
|
+
return Object.freeze(r)}function Lt(e){let t=Rt(e.title,80),n=Rt(e.body,600);return t===null||n===null?null:/* @__PURE__ */Object.freeze({title:t,body:n})}function Et(e){if(e===null||typeof e!="object"||Array.isArray(e))return;let t=e,n=[];if(Array.isArray(t.gallery))for(let e of t.gallery){let t=Pt(e);t!==null&&n.length<Ot&&n.push(t)}let r=_t(t.doses,e=>{let t=Rt(e.label,60),n=Rt(e.amount,60);return t===null||n===null?null:/* @__PURE__ */Object.freeze({label:t,amount:n,minLb:Bt(e.minLb??e.min_lb),maxLb:Bt(e.maxLb??e.max_lb)})},Ot),i=_t(t.details,Lt,Ot),o=t.fit,l=o!==null&&typeof o=="object"&&!Array.isArray(o)?Lt(o):null,a=l!==null&&o.pet===true?/* @__PURE__ */Object.freeze({...l,pet:true}):l,s=/* @__PURE__ */Object.freeze({kicker:Rt(t.kicker,80),gallery:/* @__PURE__ */Object.freeze(n),doses:r,details:i,fine:Rt(t.fine,300),fit:a});return s.kicker===null&&n.length===0&&r.length===0&&i.length===0&&s.fine===null&&a===null?void 0:s}function At(e){let t=typeof e.rating=="number"&&Number.isFinite(e.rating)&&e.rating>=0&&e.rating<=5?Math.round(e.rating*10)/10:null,n=typeof e.review_count=="number"&&Number.isInteger(e.review_count)&&e.review_count>=0?e.review_count:null,r=_t(e.reviews,e=>{let t=typeof e.stars=="number"&&Number.isInteger(e.stars)&&e.stars>=1&&e.stars<=5?e.stars:null,n=Rt(e.text,300),r=Rt(e.by,80);return t===null||n===null||r===null?null:/* @__PURE__ */Object.freeze({stars:t,text:n,by:r})},5),i=[];if(Array.isArray(e.ingredients))for(let t of e.ingredients){let e=Rt(t,60);e!==null&&i.length<12&&i.push(e)}let o=Et(e.detail);return{...t===null?{}:{rating:t},...n===null?{}:{reviewCount:n},...r.length===0?{}:{reviews:r},...i.length===0?{}:{ingredients:/* @__PURE__ */Object.freeze(i)},...o===void 0?{}:{detail:o}}}function jt(e){if(e===null||typeof e!="object")return null;let t=e,n=t.product_id,r=typeof n=="number"&&Number.isInteger(n)?String(n):Rt(n,Ct),i=Rt(t.title,300);return r===null||i===null?null:/* @__PURE__ */Object.freeze({productId:r,partnerSku:Rt(t.partner_sku,200),title:i,description:Rt(t.description),category:Rt(t.category,60),price:zt(t.price),currency:Dt(t.currency),imageUrl:Pt(t.image_url),url:Pt(t.url),reasons:$t(t.reasons),inPlan:t.in_plan===true,sample:t.sample===true,...At(t)})}function healthPlanFromWire(e,petRef){if(e===null||typeof e!="object")return null;let t=e;if(!Array.isArray(t.items))return null;let n=[],r=/* @__PURE__ */new Set;for(let e of t.items){let t=jt(e);t===null||r.has(t.productId)||(r.add(t.productId),n.push(t))}/* @__PURE__ */
|
|
10
|
+
return Object.freeze({petRef:Rt(t.pet_ref,Ct)??petRef,headline:Rt(t.headline,300),items:/* @__PURE__ */Object.freeze(n),updatedAt:Rt(t.updated_at,64),...t.tracking_texts_enabled===true?{trackingTextsEnabled:true}:{}})}function Wt(e){return typeof e=="string"&&e.length>0&&e.length<=Ct}function Mt(petRef){return`/widget/v1/pets/${encodeURIComponent(petRef)}/plan`}function createHealthPlanRepository(e){let t=()=>{let{services:t}=e.registry;return createHealthPlanRepositoryOver({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})};return{read:(petRef,n)=>e.isDisposed?Promise.resolve(err(Ht("read"))):t().read(petRef,n),addItem:(petRef,n)=>e.isDisposed?Promise.resolve(err(Ht("addItem"))):t().addItem(petRef,n),removeItem:(petRef,n)=>e.isDisposed?Promise.resolve(err(Ht("removeItem"))):t().removeItem(petRef,n)}}function createHealthPlanRepositoryOver(e){let t=St(e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}})),n=async(e,petRef,n)=>{if(!Wt(petRef))return err(It("petRef must be 1..128 characters"));if(!Wt(n))return err(It("productId must be 1..128 characters"));let r=e==="PUT"?"healthPlan.item.add":"healthPlan.item.remove",i=await t.send(r,{method:e,path:`${Mt(petRef)}/items/${encodeURIComponent(n)}`});return i.ok?i.value===null||i.value===void 0||i.value===""?ok(null):ok(healthPlanFromWire(i.value,petRef)):err(i.error)};return{async read(petRef,e){if(!Wt(petRef))return err(It("petRef must be 1..128 characters"));let n={method:"GET",path:Mt(petRef),...e?.signal?{signal:e.signal}:{}},r=await t.send("healthPlan.read",n);if(!r.ok)return err(r.error);let i=healthPlanFromWire(r.value,petRef);return i===null?err(Ft("healthPlan.read")):ok(i)},addItem:(petRef,e)=>n("PUT",petRef,e),removeItem:(petRef,e)=>n("DELETE",petRef,e)}}var Nt=/* @__PURE__ */Object.freeze({phase:"idle",petRef:null,plan:null,pending:/* @__PURE__ */Object.freeze([]),itemErrors:/* @__PURE__ */Object.freeze({}),error:null});function Ut(e,t,n){let r=e.items.map(e=>e.productId===t?/* @__PURE__ */Object.freeze({...e,inPlan:n}):e);/* @__PURE__ */
|
|
11
|
+
return Object.freeze({...e,items:/* @__PURE__ */Object.freeze(r)})}var qt=class{constructor(e){this.repository=e;this.snapshot=Nt;this.listeners=/* @__PURE__ */new Set;this.generation=0;this.writes=0;this.revalidations=0;this.refreshAfterWrites=false;this.disposed=false;this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});this.getSnapshot=()=>this.snapshot}set(e){if(!this.disposed){this.snapshot=/* @__PURE__ */Object.freeze({...this.snapshot,...e});for(let e of this.listeners)e()}}async load(petRef){let e=++this.generation;if(this.refreshAfterWrites=false,petRef===null){this.set({...Nt});return}let t=this.snapshot.petRef===petRef;this.set({phase:"loading",petRef:petRef,plan:t?this.snapshot.plan:null,pending:/* @__PURE__ */Object.freeze([]),itemErrors:t?this.snapshot.itemErrors:/* @__PURE__ */Object.freeze({}),error:null});let n=await this.repository.read(petRef);if(e===this.generation){if(!n.ok){this.set({phase:"failed",error:n.error});return}this.set({phase:"ready",plan:n.value,error:null,itemErrors:/* @__PURE__ */Object.freeze({})})}}async revalidate(){let{phase:e,petRef:petRef,pending:t}=this.snapshot;if(e!=="ready"||petRef===null||t.length>0)return;let n=this.generation,r=this.writes,i=++this.revalidations,o=await this.repository.read(petRef);n!==this.generation||r!==this.writes||i!==this.revalidations||this.snapshot.pending.length>0||this.snapshot.petRef!==petRef||o.ok&&this.set({plan:o.value,itemErrors:/* @__PURE__ */Object.freeze({})})}async refresh(){let{phase:e,petRef:petRef,pending:t}=this.snapshot;if(!(petRef===null||e==="idle")){if(e!=="ready")return this.load(petRef);if(t.length>0){this.refreshAfterWrites=true;return}return this.revalidate()}}settleWrite(){!this.refreshAfterWrites||this.snapshot.pending.length>0||(this.refreshAfterWrites=false,this.revalidate())}async setInPlan(e,t){let{plan:n,petRef:petRef,pending:r}=this.snapshot;if(this.snapshot.phase!=="ready"||n===null||petRef===null||r.includes(e))return false;let i=n.items.find(t=>t.productId===e);if(i===void 0||i.inPlan===t)return false;this.writes+=1;let o=this.generation,l=Object.fromEntries(Object.entries(this.snapshot.itemErrors).filter(([t])=>t!==e));this.set({plan:Ut(n,e,t),pending:/* @__PURE__ */Object.freeze([...r,e]),itemErrors:/* @__PURE__ */Object.freeze(l)});let a=t?await this.repository.addItem(petRef,e):await this.repository.removeItem(petRef,e);if(o!==this.generation)return a.ok;let s=this.snapshot.plan??n,c=/* @__PURE__ */Object.freeze(this.snapshot.pending.filter(t=>t!==e));if(!a.ok)return this.set({plan:Ut(s,e,i.inPlan),pending:c,itemErrors:/* @__PURE__ */Object.freeze({...this.snapshot.itemErrors,[e]:a.error})}),this.settleWrite(),false;let d=a.value??s;for(let e of c){let t=s.items.find(t=>t.productId===e);t!==void 0&&(d=Ut(d,e,t.inPlan))}return this.set({plan:d,pending:c}),this.settleWrite(),true}dispose(){this.generation+=1,this.disposed=true,this.listeners.clear()}};function Vt(e,t){let[r,i]=n(e),l=s(false);return o(()=>{let t=r;return l.current&&(t=e(),i(t)),l.current=true,()=>t.dispose()},t),r}function Gt(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e)}catch{}}function Kt(e){return(typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}function Xt(e,...t){if(typeof e=="function")try{let n=e(...t);return Kt(n)&&Promise.resolve(n).then(void 0,Gt),n}catch(e){Gt(e);return}}var Yt=/* @__PURE__ */new WeakMap;function Jt(e){if(typeof e!="function")return;let t=Yt.get(e);if(t!==void 0)return t;let n=(...t)=>{Xt(e,...t)};return Yt.set(e,n),n}function Qt(e,t){let n=null;for(let r of t){let t=e[r];typeof t=="function"&&(n??={...e},n[r]=Jt(t))}return n??e}var Zt=6e4;function en({lifecycle:e,refreshKey:t,readyAt:n,revalidate:r,refresh:i,now:l=Date.now}){let a=s({readyAt:n,revalidate:r,refresh:i??r,now:l});a.current={readyAt:n,revalidate:r,refresh:i??r,now:l},o(()=>{if(e==null)return;let t=Xt(()=>e.onForeground(()=>{let{readyAt:e,revalidate:t,now:n}=a.current;e!==null&&n()-e>=Zt&&t()}));return()=>{typeof t=="function"&&Xt(t)}},[e]);let c=s(t);o(()=>{Object.is(c.current,t)||(c.current=t,a.current.refresh())},[t])}function healthPlanCart(e){let t=/* @__PURE__ */Object.freeze((e?.items??[]).filter(e=>e.inPlan));if(t.length===0)/* @__PURE__ */return Object.freeze({items:t,count:0,subtotal:null,currency:null});let n=new Set(t.map(e=>e.currency));if(!t.every(e=>e.price!==null)||n.size!==1)/* @__PURE__ */return Object.freeze({items:t,count:t.length,subtotal:null,currency:null});let r=t.reduce((e,t)=>e+Math.round(t.price*100),0);/* @__PURE__ */
|
|
12
|
+
return Object.freeze({items:t,count:t.length,subtotal:r/100,currency:t[0]?.currency??null})}function formatHealthPlanPrice(e,t,n,r){if(e===null||t===null||!Number.isFinite(e))return null;let i=r?.dropZeroCents===true&&Number.isInteger(e);try{return new Intl.NumberFormat(n,{style:"currency",currency:t,...i?{minimumFractionDigits:0,maximumFractionDigits:0}:{}}).format(e)}catch{return`${t} ${i?String(e):e.toFixed(2)}`}}function formatHealthPlanPriceWith(e,t,n){return formatHealthPlanPrice(e,t,n?.locale,n)}function useEverfurHealthPlanRepository(){let{runtime:e}=le();return r(()=>createHealthPlanRepository(e),[e])}function useEverfurHealthPlan(e){let{userRef:userRef,activePet:t,scopeEpoch:i}=le(),a=useEverfurHealthPlanRepository(),petRef=e?.petRef??t??null,s=Vt(()=>new qt(a),[a,userRef,i]);o(()=>{s.load(userRef===null?null:petRef)},[s,userRef,petRef]);let c=l(s.subscribe,s.getSnapshot,s.getSnapshot),d=r(()=>healthPlanCart(c.plan),[c.plan]),[u,p]=n(null);o(()=>{p(c.phase==="ready"&&c.plan!==null?Date.now():null)},[c.phase,c.plan]),en({lifecycle:e?.lifecycle,refreshKey:e?.refreshKey,readyAt:u,revalidate:()=>{s.revalidate()},refresh:()=>{s.refresh()}});let h;return userRef===null?h="signedOut":petRef===null?h="noPet":c.petRef!==petRef||c.phase==="idle"||c.phase==="loading"?h="loading":c.phase==="failed"?h=wt(c.error)?"empty":"failed":h=(c.plan?.items.length??0)===0?"empty":"ready",r(()=>({status:h,petRef:petRef,plan:c.petRef===petRef?c.plan:null,cart:d,pending:c.pending,itemErrors:c.itemErrors,error:h==="empty"?null:c.error,setInPlan:(e,t)=>s.setInPlan(e,t),refresh:()=>s.load(userRef===null?null:petRef)}),[h,petRef,c,d,s,userRef])}var tn=128,nn=/^\d{4}-\d{2}-\d{2}$/,rn=/* @__PURE__ */new Set(["first_box_ships","checkin","refill_reminder","next_box_ships"]);function isHealthPlanSubscriptionUnavailable(e){return e!=null&&(e.httpStatus===404||e.category==="notFound")}var on=(e,t=300)=>typeof e=="string"&&e.trim().length>0&&e.length<=t?e.trim():null;function ln(e){let t=typeof e=="number"?e:typeof e=="string"&&/^\d+(\.\d+)?$/.test(e.trim())?Number(e):Number.NaN;return Number.isFinite(t)&&t>=0?t:null}function an(e){return typeof e=="number"&&Number.isInteger(e)&&e>0?e:null}function sn(e){return typeof e=="number"&&Number.isInteger(e)?String(e):on(e,tn)}function cn(e){return typeof e=="string"&&/^[A-Za-z]{3}$/.test(e)?e.toUpperCase():null}function dn(e){return typeof e=="string"&&nn.test(e)?e:null}function un(e){return Array.isArray(e)?/* @__PURE__ */Object.freeze(e.map(an).filter(e=>e!==null)):/* @__PURE__ */Object.freeze([])}function pn(e){if(e===null||typeof e!="object")return null;let t=e,n=ln(t.amount),r=cn(t.currency),i=an(t.interval_days);return n===null||r===null||i===null?null:/* @__PURE__ */Object.freeze({amount:n,currency:r,intervalDays:i})}function hn(e){if(!Array.isArray(e))/* @__PURE__ */return Object.freeze([]);let t=[];for(let n of e){if(n===null||typeof n!="object")continue;let e=n,r=dn(e.on);typeof e.step!="string"||!rn.has(e.step)||r===null||t.push(/* @__PURE__ */Object.freeze({step:e.step,on:r}))}/* @__PURE__ */
|
|
13
|
+
return Object.freeze(t)}function healthPlanSubscriptionFromWire(e){if(e===null||typeof e!="object")return null;let t=e,n=sn(t.subscription_id),r=sn(t.product_id),i=t.status==="active"||t.status==="cancelled"?t.status:null,o=an(t.interval_days),l=cn(t.currency),a=ln(t.box_price);if(n===null||r===null||i===null||o===null||l===null||a===null)return null;let s=un(t.interval_options);/* @__PURE__ */
|
|
14
|
+
return Object.freeze({subscriptionId:n,productId:r,title:on(t.title),status:i,intervalDays:o,intervalOptions:s.length>0?s:/* @__PURE__ */Object.freeze([o]),currency:l,boxPrice:a,firstBoxPrice:ln(t.first_box_price)??a,offerApplied:t.offer_applied===true,nextBoxDate:i==="active"?dn(t.next_box_date):null,renewal:pn(t.renewal),timeline:i==="active"?hn(t.timeline):/* @__PURE__ */Object.freeze([])})}function healthPlanOneBoxOrderFromWire(e){if(e===null||typeof e!="object")return null;let t=e,n=sn(t.order_id),r=sn(t.product_id),i=cn(t.currency),o=ln(t.price);if(n===null||r===null||i===null||o===null)return null;let l=an(t.quantity),a=l!==null&&l<=gn?l:1;/* @__PURE__ */
|
|
15
|
+
return Object.freeze({orderId:n,productId:r,title:on(t.title),currency:i,boxPrice:ln(t.box_price)??o,price:o,discountPercent:an(t.discount_percent)??0,shipsOn:dn(t.ships_on),createdAt:wn(t.created_at),quantity:a,total:ln(t.total)??Math.round(o*a*100)/100,...kn(t.tracking)})}var gn=10,fn=/* @__PURE__ */new Set(["ordered","shipped","delivered"]),mn=/[\u0000-\u001f\u007f\u202a-\u202e\u2066-\u2069]/;function yn(e,t){if(typeof e!="string"||mn.test(e))return null;let n=e.trim();return n.length>0&&n.length<=t?n:null}function bn(e){return typeof e!="string"||e.length>2048||mn.test(e)||/[\s@]/.test(e)||!/^https:\/\/[^/]/i.test(e)?null:qe(e)?.protocol==="https:"?e:null}function healthPlanOrderTrackingFromWire(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n=typeof t.status=="string"&&fn.has(t.status)?t.status:"ordered";/* @__PURE__ */
|
|
16
|
+
return Object.freeze({status:n,orderNumber:yn(t.order_number,64),carrier:yn(t.carrier,64),trackingNumber:yn(t.tracking_number,128),trackingUrl:bn(t.tracking_url),shippedAt:wn(t.shipped_at),estimatedDelivery:dn(t.estimated_delivery),updatedAt:wn(t.updated_at)})}function kn(e){let t=healthPlanOrderTrackingFromWire(e);return t===null?{}:{tracking:t}}function healthPlanOneBoxOrderPageFromWire(e){let t=e!==null&&typeof e=="object"?e.orders:null;if(!Array.isArray(t))return null;let n=e.next_cursor;/* @__PURE__ */
|
|
17
|
+
return Object.freeze({orders:/* @__PURE__ */Object.freeze(t.map(healthPlanOneBoxOrderFromWire).filter(e=>e!==null)),nextCursor:typeof n=="string"&&n.length>0&&n.length<=tn?n:null})}function wn(e){return typeof e!="string"||e.length>40||!/^\d{4}-\d{2}-\d{2}T/.test(e)||Number.isNaN(Date.parse(e))?null:e}function vn(e,t){if(e===null||typeof e!="object")return null;let n=e,r=ln(n.price);return r===null||r>t?null:/* @__PURE__ */Object.freeze({price:r,discountPercent:an(n.discount_percent)??0})}function healthPlanSubscriptionQuoteFromWire(e){if(e===null||typeof e!="object")return null;let t=e,n=sn(t.product_id),r=cn(t.currency),i=ln(t.box_price),o=un(t.interval_options);if(n===null||r===null||i===null||o.length===0)return null;let l=t.offer_applies===true,a=an(t.default_interval_days),s=t.supply,c=null;if(s!==null&&typeof s=="object"){let e=s,t=an(e.units_per_box),n=ln(e.units_per_day),r=an(e.supply_days);t!==null&&n!==null&&r!==null&&(c=/* @__PURE__ */Object.freeze({unitsPerBox:t,unitLabel:on(e.unit_label,30),unitsPerDay:n,supplyDays:r,doseBasis:e.dose_basis==="weight"?"weight":"assumed"}))}let d=an(t.first_box_discount_percent)??0;/* @__PURE__ */
|
|
18
|
+
return Object.freeze({productId:n,currency:r,boxPrice:i,firstBoxPrice:l?ln(t.first_box_price)??i:i,firstBoxDiscountPercent:l?d:0,offerApplies:l,oneBox:vn(t.one_box,i),intervalOptions:o,defaultIntervalDays:a!==null&&o.includes(a)?a:o[0],supply:c,firstBoxShipsOn:dn(t.first_box_ships_on),subscription:healthPlanSubscriptionFromWire(t.subscription)})}function xn(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e})}function Sn(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response carried no subscription`})}function Tn(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}var Cn=e=>typeof e=="string"&&e.length>0&&e.length<=tn;function In(petRef){return`/widget/v1/pets/${encodeURIComponent(petRef)}/plan/subscriptions`}function createHealthPlanSubscriptionRepositoryOver(e){let t=St(e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}})),n=async(e,petRef,n,r,i)=>{if(!Cn(petRef))return err(xn("petRef must be 1..128 characters"));let o=await t.send(e,{method:n,path:`${In(petRef)}${r}`,...i===void 0?{}:{body:i}});if(!o.ok)return err(o.error);let l=healthPlanSubscriptionFromWire(o.value);return l===null?err(Sn(e)):ok(l)},r=(e,t="")=>Cn(e)?`/${encodeURIComponent(e)}${t}`:null;return{async quote(petRef,e){if(!Cn(petRef))return err(xn("petRef must be 1..128 characters"));if(!Cn(e))return err(xn("productId must be 1..128 characters"));let n=await t.send("healthPlan.subscription.quote",{method:"GET",path:`${In(petRef)}/quote`,query:{product_id:e}});if(!n.ok)return err(n.error);let r=healthPlanSubscriptionQuoteFromWire(n.value);return r===null?err(Sn("healthPlan.subscription.quote")):ok(r)},async list(petRef){if(!Cn(petRef))return err(xn("petRef must be 1..128 characters"));let e=await t.send("healthPlan.subscription.list",{method:"GET",path:In(petRef)});if(!e.ok)return err(e.error);let n=e.value!==null&&typeof e.value=="object"?e.value.subscriptions:null;return Array.isArray(n)?ok(/* @__PURE__ */Object.freeze(n.map(healthPlanSubscriptionFromWire).filter(e=>e!==null))):err(Sn("healthPlan.subscription.list"))},create(petRef,e,t){return Cn(e)?n("healthPlan.subscription.create",petRef,"POST","",{product_id:e,...t===void 0?{}:{interval_days:t}}):Promise.resolve(err(xn("productId must be 1..128 characters")))},changeInterval(petRef,e,t){let i=r(e);return i===null?Promise.resolve(err(xn("subscriptionId must be 1..128 characters"))):n("healthPlan.subscription.interval",petRef,"PATCH",i,{interval_days:t})},skip(petRef,e){let t=r(e,"/skip");return t===null?Promise.resolve(err(xn("subscriptionId must be 1..128 characters"))):n("healthPlan.subscription.skip",petRef,"POST",t,{})},cancel(petRef,e){let t=r(e,"/cancel");return t===null?Promise.resolve(err(xn("subscriptionId must be 1..128 characters"))):n("healthPlan.subscription.cancel",petRef,"POST",t,{})},restart(petRef,e,t){let i=r(e,"/restart");return i===null?Promise.resolve(err(xn("subscriptionId must be 1..128 characters"))):n("healthPlan.subscription.restart",petRef,"POST",i,t===void 0?{}:{interval_days:t})},async buyOneBox(petRef,e,n){if(!Cn(petRef))return err(xn("petRef must be 1..128 characters"));if(!Cn(e))return err(xn("productId must be 1..128 characters"));let r=await t.send("healthPlan.subscription.oneBox",{method:"POST",path:`${In(petRef)}/one-box`,body:{product_id:e}},{idempotent:true,...n===void 0?{}:{idempotencyKey:`hp-one-box:${n}`}});if(!r.ok)return err(r.error);let i=healthPlanOneBoxOrderFromWire(r.value);return i===null?err(Sn("healthPlan.subscription.oneBox")):ok(i)},async listOneBoxOrders(petRef){if(!Cn(petRef))return err(xn("petRef must be 1..128 characters"));let e=await t.send("healthPlan.subscription.oneBoxList",{method:"GET",path:`${In(petRef)}/one-box`});if(!e.ok)return err(e.error);let n=healthPlanOneBoxOrderPageFromWire(e.value);return n===null?err(Sn("healthPlan.subscription.oneBoxList")):ok(n.orders)},async listOneBoxOrderPage(petRef,e){if(!Cn(petRef))return err(xn("petRef must be 1..128 characters"));let n=e?.limit;if(n!==void 0&&!(Number.isInteger(n)&&n>=1&&n<=50))return err(xn("limit must be a whole number 1..50"));if(e?.cursor!==void 0&&!Cn(e.cursor))return err(xn("cursor must be 1..128 characters"));let r={...n!==void 0?{limit:String(n)}:{},...e?.cursor!==void 0?{cursor:e.cursor}:{}},i=await t.send("healthPlan.subscription.oneBoxList",{method:"GET",path:`${In(petRef)}/one-box`,query:r});if(!i.ok)return err(i.error);let o=healthPlanOneBoxOrderPageFromWire(i.value);return o===null?err(Sn("healthPlan.subscription.oneBoxList")):ok(o)}}}function createHealthPlanSubscriptionRepository(e){let t=()=>{let{services:t}=e.registry;return createHealthPlanSubscriptionRepositoryOver({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=(n,r)=>(...i)=>e.isDisposed?Promise.resolve(err(Tn(n))):r(t(),...i);return{quote:n("quote",(e,t,n)=>e.quote(t,n)),list:n("list",(e,t)=>e.list(t)),create:n("create",(e,t,n,r)=>e.create(t,n,r)),changeInterval:n("changeInterval",(e,t,n,r)=>e.changeInterval(t,n,r)),skip:n("skip",(e,t,n)=>e.skip(t,n)),cancel:n("cancel",(e,t,n)=>e.cancel(t,n)),restart:n("restart",(e,t,n,r)=>e.restart(t,n,r)),buyOneBox:n("buyOneBox",(e,t,n,r)=>e.buyOneBox(t,n,r)),listOneBoxOrders:n("listOneBoxOrders",(e,t)=>e.listOneBoxOrders(t)),listOneBoxOrderPage:n("listOneBoxOrderPage",(e,t,n)=>e.listOneBoxOrderPage(t,n))}}var Hn=/* @__PURE__ */new Set(["cart_disabled","cart_has_subscription","cart_currency_mixed","sample_product","partner_endpoint_missing","checkout_pending","already_subscribed"]);function healthPlanCheckoutRefusal(e){if(e==null||e.httpStatus!==409)return null;let t=$n(e.raw);for(let n of[e.reasonCode,e.wireMessage,t?.detail,t?.message,t?.reason_code])if(typeof n=="string"&&Hn.has(n.trim()))return n.trim();return null}var Fn=128,Rn=10,Pn=/* @__PURE__ */new Set(["shield","arrow","check","star","truck","refresh","card","alert","x","chat","repeat","calendar","flame","box","cart","minus","plus","chev","pulse","file","kit","dna","heart","bottle","harness","ramp"]),zn=/* @__PURE__ */new Set(["y","c","g","r"]),Dn=/* @__PURE__ */new Set(["done","now","next"]),$n=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null,On=(e,t=1e3)=>typeof e=="string"&&e.trim().length>0&&e.length<=t?e.trim():null,Bn=e=>typeof e=="string"&&/^[A-Za-z0-9_-]{1,40}$/.test(e)?e:null,_n=e=>typeof e=="string"&&Pn.has(e)?e:null;function Ln(e){let t=On(e,2048);return t===null||/\s/.test(t)?null:/^https:\/\/[^/]/i.test(t)||/^\/(?![/\\])/.test(t)?t:null}var En=e=>typeof e=="number"&&Number.isInteger(e)?String(e):On(e,Fn);function An(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null}function jn(e){/* @__PURE__ */
|
|
19
|
+
return Object.freeze(Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null)))}function Wn(e,t,n=20){if(!Array.isArray(e))return null;let r=[];for(let i of e){if(r.length>=n)break;let e=t(i);e!==null&&r.push(e)}return r.length===0?null:/* @__PURE__ */Object.freeze(r)}var Mn=(e,t=12,n=300)=>Wn(e,e=>On(e,n),t);function Nn(e){let t=$n(e),n=On(t?.kicker,120),r=On(t?.title,300);if(t===null||n===null||r===null)return null;let i=$n(t.risk),o=$n(t.odds),l=$n(t.quote),a=$n(t.jump);return jn({kicker:n,title:r,sources:Wn(t.sources,e=>{let t=On($n(e)?.label,60);return t===null?null:jn({label:t,kind:Bn($n(e)?.kind)})},6),risk:On(i?.lead,300)===null?null:jn({lead:On(i?.lead,300),body:On(i?.body),kind:Bn(i?.kind)}),odds:On(o?.label,120)===null||On(o?.from,20)===null||On(o?.to,20)===null?null:jn({label:On(o?.label,120),tag:On(o?.tag,40),from:On(o?.from,20),to:On(o?.to,20),toLabel:On(o?.toLabel,120)}),quote:On(l?.text)===null?null:jn({kicker:On(l?.kicker,120),tag:On(l?.tag,40),text:On(l?.text)}),jump:On(a?.title,300)===null||On(a?.go,60)===null?null:jn({title:On(a?.title,300),go:On(a?.go,60)}),report:Un(t.report)})}function Un(e){let t=$n(e),n=On(t?.label,120),r=On(t?.text,1200);return n===null||r===null?null:jn({label:n,text:r,actions:Mn(t?.actions,5,300)})}function qn(e){let t=$n(e),n=On(t?.title,300),r=Wn(t?.steps,e=>{let t=$n(e),n=On(t?.title,300),r=t?.tone;return n===null?null:jn({title:n,body:On(t?.body),source:On(t?.source,200),tone:typeof r=="string"&&zn.has(r)?r:null,icon:_n(t?.icon),fromVet:t?.fromVet===true?true:null})});return n===null||r===null?null:jn({title:n,label:On(t?.label,60),steps:r})}function Vn(e){let t=$n(e),n=On(t?.title,300);if(t===null||n===null)return null;let r=$n(t.rating),i=$n(t.reviews),o=$n(t.why),l=$n(o?.score),a=$n(t.dose),s=$n(t.ingredients),c=Wn(i?.items,e=>{let t=$n(e),n=t?.stars,r=On(t?.text),i=On(t?.by,80);return typeof n!="number"||!Number.isFinite(n)||n<1||n>5||r===null||i===null?null:jn({stars:Math.round(n),text:r,by:i})},5),d=Wn(o?.rows,e=>{let t=$n(e),n=On(t?.chip,40),r=On(t?.title,300);return n===null||r===null?null:jn({chip:n,kind:Bn(t?.kind),title:r,body:On(t?.body)})}),u=Wn(a?.stats,e=>{let t=$n(e),n=On(t?.value,40),r=On(t?.label,120),i=t?.kind;return n===null||r===null?null:jn({value:n,label:r,kind:i==="weight"||i==="dose"||i==="days"?i:null})},6),p=Mn(s?.items,12,80);return jn({title:n,none:t.none===true?true:null,hidden:t.none===true&&t.hidden===true?true:null,productId:En(t.productId),partnerSku:On(t.partnerSku,200),rating:On(r?.value,20)===null?null:jn({value:On(r?.value,20),label:On(r?.label,120)}),line:On(t.line),reviews:On(i?.label,200)===null||c===null?null:jn({label:On(i?.label,200),items:c}),checkoutLine:On(t.checkoutLine,300),why:On(o?.title,200)===null||d===null?null:jn({title:On(o?.title,200),rows:d,score:On(l?.text,200)===null||On(l?.value,20)===null?null:jn({text:On(l?.text,200),value:On(l?.value,20)})}),dose:On(a?.title,200)===null||u===null?null:jn({title:On(a?.title,200),stats:u,note:On(a?.note)}),doseLabel:On(t.doseLabel,120),ingredients:p===null?null:jn({label:On(s?.label,200),items:p}),proof:On(t.proof,300),trust:Wn(t.trust,e=>{let t=$n(e),n=_n(t?.icon),r=On(t?.label,120);return n===null||r===null?null:jn({icon:n,label:r})},6),more:On(t.more,120),fine:On(t.fine),checkin:On(t.checkin,200),detail:Et(t.detail)??null})}function Gn(e){let t=$n(e),n=On(t?.title,200),r=Wn(t?.items,e=>{let t=$n(e),n=On(t?.title,300),r=On(t?.body);return n===null||r===null?null:jn({title:n,body:r,urgent:t?.urgent===true?true:null,callVet:t?.callVet===true?true:null})});return n===null||r===null?null:jn({title:n,items:r})}function Kn(e){let t=$n(e),n=On(t?.title,200),r=Mn(t?.questions,12,300),i=On(t?.add,80),o=On(t?.added,80);return n===null||r===null||i===null||o===null?null:jn({title:n,questions:r,add:i,added:o})}function Xn(e){let t=$n(e),n=On(t?.title,200),r=Wn(t?.items,e=>{let t=$n(e),n=On(t?.key,Fn),r=On(t?.title,300),i=On(t?.action,80),o=En(t?.productId),l=On(t?.added,80)??(o!==null?i:null);return n===null||r===null||i===null||l===null?null:jn({key:n,productId:o,title:r,body:On(t?.body),price:On(t?.price,40),was:On(t?.was,40),tag:On(t?.tag,40),imageUrl:Ln(t?.imageUrl),icon:_n(t?.icon),kind:Bn(t?.kind),action:i,added:l,owned:t?.owned===true?true:null,detail:Et(t?.detail)??null})},6);return n===null||r===null?null:jn({title:n,items:r})}function Yn(e){let t=$n(e),n=On(t?.kicker,120),r=On(t?.title,120);return t===null||n===null||r===null?null:jn({kicker:n,title:r,icon:_n(t.icon),track:Wn(t.track,e=>{let t=$n(e),n=On(t?.title,120),r=t?.state;return n===null?null:jn({title:n,detail:On(t?.detail,120),state:typeof r=="string"&&Dn.has(r)?r:null,tag:On(t?.tag,40)})},6),heading:On(t.heading,200),rows:Wn(t.rows,e=>{let t=$n(e),n=_n(t?.icon),r=On(t?.label,120);if(n===null||r===null)return null;if(t?.fromVet===true)return jn({icon:n,label:r,text:"",fromVet:true});let i=On(t?.text,300);return i===null?null:jn({icon:n,label:r,text:i})},6),note:On(t.note,300),action:On(t.action,80)})}function healthPlanFocusDesignFromWire(e){let t=$n(e),n=On(t?.title,300),r=Vn(t?.pick);if(t===null||n===null||r===null)return null;let i=$n(t.byline);return jn({eyebrow:On(t.eyebrow,120),title:n,subtitle:On(t.subtitle,300),subtitleNoRecords:On(t.subtitleNoRecords,300),headImageUrl:Ln(t.headImageUrl),byline:On(i?.name,120)===null?null:jn({name:On(i?.name,120),role:On(i?.role,120),imageUrl:Ln(i?.imageUrl),shortName:On(i?.shortName,60)}),focus:Nn(t.focus),routine:qn(t.routine),pick:r,signs:Gn(t.signs),checkup:Kn(t.checkup),extras:Xn(t.extras),wait:Yn(t.wait),fine:On(t.fine),checkoutRows:Wn(t.checkoutRows,e=>{let t=$n(e),n=_n(t?.icon),r=On(t?.label,60),i=On(t?.value,200);return n===null||r===null||i===null?null:jn({icon:n,label:r,value:i})},6)})}function healthPlanPageFromWire(e,petRef){let t=$n(e);if(t===null||!("page"in t))return null;let n=$n(t.pet),r=n?.sex;/* @__PURE__ */
|
|
20
|
+
return Object.freeze({petRef:On(t.pet_ref,Fn)??petRef,pet:/* @__PURE__ */Object.freeze({name:On(n?.name,120),species:On(n?.species,60),sex:r==="female"||r==="male"?r:null,breed:On(n?.breed,120),weightKg:An(n?.weight_kg),weightLb:An(n?.weight_lb)}),checkout:t.checkout==="everfur_stripe"?"everfur_stripe":"partner",page:healthPlanFocusDesignFromWire(t.page),vetReviewed:t.vet_reviewed===true,trackingTextsEnabled:t.tracking_texts_enabled===true})}function healthPlanCheckoutSessionFromWire(e){let t=$n(e),n=En(t?.checkout_id),r=On(t?.url,4096);return n===null||r===null||!/^https:\/\/[^\s/][^\s]*$/i.test(r)?null:/* @__PURE__ */Object.freeze({checkoutId:n,url:r})}var Jn=/* @__PURE__ */new Set(["pending","paid","expired","failed"]);function healthPlanCheckoutStateFromWire(e){let t=$n(e),n=t?.status,r=t?.purchase;if(typeof n!="string"||!Jn.has(n)||r!=="one_box"&&r!=="subscription")return null;let i=healthPlanOneBoxOrderFromWire(t?.order),o=Array.isArray(t?.orders)?(t?.orders).map(healthPlanOneBoxOrderFromWire).filter(e=>e!==null):[];/* @__PURE__ */
|
|
21
|
+
return Object.freeze({status:n,purchase:r,order:i??o[0]??null,orders:/* @__PURE__ */Object.freeze(o.length>0?o:i===null?[]:[i]),subscription:healthPlanSubscriptionFromWire(t?.subscription)})}function Qn(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e})}function Zn(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the expected shape`})}function er(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}var tr=e=>typeof e=="string"&&e.length>0&&e.length<=Fn,nr=e=>typeof e=="string"&&e.length<=2048&&/^https?:\/\/[^\s/][^\s]*$/i.test(e);function rr(petRef){return`/widget/v1/pets/${encodeURIComponent(petRef)}/plan`}async function ir(e,petRef,t){if(!tr(petRef))return err(Qn("petRef must be 1..128 characters"));let n=await e.send("healthPlan.page.read",{method:"GET",path:`${rr(petRef)}/page`,...t?.signal?{signal:t.signal}:{}});if(!n.ok)return err(n.error);let r=healthPlanPageFromWire(n.value,petRef);return r===null?err(Zn("healthPlan.page.read")):ok(r)}var or=/* @__PURE__ */new WeakMap;function lr(e){let t=or.get(e);if(t!==void 0)return t;let n=ar(e);return or.set(e,n),n}function ar(e){return{getPage:(petRef,t)=>{if(e.isDisposed)return Promise.resolve(err(er("getPage")));let{services:n}=e.registry,r=St(createRequestFunnel({auth:n.authFor(null),...n.errorPolicy?{errorPolicy:n.errorPolicy}:{}}));return ir(r,petRef,t)}}}function createHealthPlanPageRepositoryOver(e){let t=St(e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}));return{getPage:(petRef,e)=>ir(t,petRef,e),async startCheckout(petRef,e,n){if(!tr(petRef))return err(Qn("petRef must be 1..128 characters"));if(!tr(e.productId))return err(Qn("productId must be 1..128 characters"));if(e.purchase!=="one_box"&&e.purchase!=="subscription")return err(Qn("purchase must be one_box or subscription"));if(e.intervalDays!==void 0&&(!Number.isInteger(e.intervalDays)||e.intervalDays<=0))return err(Qn("intervalDays must be a positive whole number"));if(!nr(e.successUrl)||!nr(e.cancelUrl))return err(Qn("successUrl and cancelUrl must be absolute http(s) URLs"));let r=await t.send("healthPlan.checkout.start",{method:"POST",path:`${rr(petRef)}/checkout`,body:{product_id:e.productId,purchase:e.purchase,...e.purchase==="subscription"&&e.intervalDays!==void 0?{interval_days:e.intervalDays}:{},success_url:e.successUrl,cancel_url:e.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${n}`});if(!r.ok)return err(r.error);let i=healthPlanCheckoutSessionFromWire(r.value);return i===null?err(Zn("healthPlan.checkout.start")):ok(i)},async startCartCheckout(petRef,e,n){if(!tr(petRef))return err(Qn("petRef must be 1..128 characters"));let r=e.items;if(!Array.isArray(r)||r.length<1||r.length>Rn)return err(Qn("items must hold 1..10 lines"));let i=/* @__PURE__ */new Set;for(let e of r){if(!tr(e.productId)||i.has(e.productId))return err(Qn("each item needs a productId, once per cart"));if(i.add(e.productId),e.purchase!=="one_box"&&e.purchase!=="subscription")return err(Qn("purchase must be one_box or subscription"));let t=e.quantity??1;if(!Number.isInteger(t)||t<1||t>Rn)return err(Qn("quantity must be a whole number 1..10"));if(e.purchase==="subscription"&&t!==1)return err(Qn("a subscription line is quantity 1"));if(e.intervalDays!==void 0&&(!Number.isInteger(e.intervalDays)||e.intervalDays<=0))return err(Qn("intervalDays must be a positive whole number"))}if(!nr(e.successUrl)||!nr(e.cancelUrl))return err(Qn("successUrl and cancelUrl must be absolute http(s) URLs"));let o=await t.send("healthPlan.checkout.start",{method:"POST",path:`${rr(petRef)}/checkout`,body:{items:r.map(e=>({product_id:e.productId,purchase:e.purchase,...e.purchase==="subscription"&&e.intervalDays!==void 0?{interval_days:e.intervalDays}:{},quantity:e.quantity??1})),success_url:e.successUrl,cancel_url:e.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${n}`});if(!o.ok)return err(o.error);let l=healthPlanCheckoutSessionFromWire(o.value);return l===null?err(Zn("healthPlan.checkout.start")):ok(l)},async getCheckout(petRef,e){if(!tr(petRef))return err(Qn("petRef must be 1..128 characters"));if(!tr(e))return err(Qn("checkoutId must be 1..128 characters"));let n=await t.send("healthPlan.checkout.read",{method:"GET",path:`${rr(petRef)}/checkout/${encodeURIComponent(e)}`});if(!n.ok)return err(n.error);let r=healthPlanCheckoutStateFromWire(n.value);return r===null?err(Zn("healthPlan.checkout.read")):ok(r)}}}function createHealthPlanPageRepository(e){let t=()=>{let{services:t}=e.registry;return createHealthPlanPageRepositoryOver({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})};return{getPage:(petRef,n)=>e.isDisposed?Promise.resolve(err(er("getPage"))):t().getPage(petRef,n),startCheckout:(petRef,n,r)=>e.isDisposed?Promise.resolve(err(er("startCheckout"))):t().startCheckout(petRef,n,r),startCartCheckout:(petRef,n,r)=>e.isDisposed?Promise.resolve(err(er("startCartCheckout"))):t().startCartCheckout?.(petRef,n,r)??Promise.resolve(err(er("startCartCheckout"))),getCheckout:(petRef,n)=>e.isDisposed?Promise.resolve(err(er("getCheckout"))):t().getCheckout(petRef,n)}}var sr=Zt,cr=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanPageReads@v1");function dr(){let e=globalThis,t=e[cr];if(t instanceof WeakMap)return t;let n=/* @__PURE__ */new WeakMap;return e[cr]=n,n}function ur(e,t,userRef,petRef,n){let r=dr(),i=r.get(t);i===void 0&&(i=/* @__PURE__ */new Map,r.set(t,i));let o=i,l=`${userRef}\0${petRef}`,a=o.get(l);if(!n&&a!==void 0&&(a.at===null||Date.now()-a.at<sr))return a.promise;let s={at:null,promise:e.getPage(petRef).then(e=>(o.get(l)===s&&(e.ok||wt(e.error)?s.at=Date.now():o.delete(l)),e))};return o.set(l,s),s.promise}function useHealthPlanPageRepository(){let{runtime:e}=le();return r(()=>createHealthPlanPageRepository(e),[e])}function useHealthPlanPage(e){let{userRef:userRef,runtime:t}=le(),i=r(()=>lr(t),[t]),l=e.repository,c=l??i,d=a((e,n)=>l!==void 0||userRef==null?c.getPage(e):ur(i,t,userRef,e,n),[l,c,i,t,userRef]),{petRef:petRef}=e,u=e.enabled!==false&&userRef!=null&&petRef!==null,[p,h]=n({phase:"idle",petRef:null,page:null,error:null}),g=s(0),f=s(0),m=a(async e=>{let t=++g.current;if(!u||petRef===null){h(e=>e.phase==="idle"&&e.petRef===null?e:{phase:"idle",petRef:null,page:null,error:null});return}h(e=>({phase:"loading",petRef:petRef,page:e.petRef===petRef?e.page:null,error:null}));let n=await d(petRef,e);t===g.current&&(n.ok?h({phase:"ready",petRef:petRef,page:n.value,error:null,readyAt:Date.now()}):wt(n.error)?h({phase:"ready",petRef:petRef,page:null,error:null,missing:true,readyAt:Date.now()}):h({phase:"failed",petRef:petRef,page:null,error:n.error}))},[u,petRef,d]),y=a(()=>m(true),[m]),b=p.phase==="ready"&&p.petRef===petRef,k=a(async()=>{if(!u||petRef===null||!b)return;let e=g.current,t=++f.current,n=await d(petRef,true);e!==g.current||t!==f.current||!n.ok||h(e=>e.phase==="ready"&&e.petRef===petRef?{phase:"ready",petRef:petRef,page:n.value,error:null,readyAt:Date.now()}:e)},[u,petRef,b,d]);en({lifecycle:e.lifecycle,refreshKey:e.refreshKey,readyAt:b?p.readyAt??null:null,revalidate:()=>{k()},refresh:()=>{b?k():y()}}),o(()=>(m(false),()=>{g.current+=1}),[m]);let w=u&&p.petRef!==petRef;return r(()=>({phase:w?"loading":p.phase,page:w?null:p.page,error:w?null:p.error,missing:!w&&p.missing===true,refresh:y}),[w,p,y])}var pr=()=>()=>{},hr=()=>null;function gr(e,t){return l(t?.subscribe??pr,t?.get??hr,t?.get??hr)??e}var fr=/* @__PURE__ */Object.freeze({chatAnswerStyle:"cards",chatHistoryStyle:"sheet",chatTopCard:"focus",chatFollowUpCount:3,chatFollowUpsExcludeTelevet:false,chatComposerMic:true,chatComposerUpload:true,safetyDisclaimerPlacement:"composer",healthPlanLayout:"focus_plan",recordsTopRiskLine:true,recordsClearResultsFilter:true,chatComposerStyle:"compact",chatComposerPlaceholder:"pet_name",chatHistoryBar:"scroll",chatGeneralBanner:true,chatSendButton:"always_dark",chatTextingAsk:true,serverSlots:false}),mr=/* @__PURE__ */Object.freeze({chatAnswerStyle:"chat_answer_style",chatHistoryStyle:"chat_history_style",chatTopCard:"chat_top_card",chatFollowUpCount:"chat_follow_up_count",chatFollowUpsExcludeTelevet:"chat_follow_ups_exclude_televet",chatComposerMic:"chat_composer_mic",chatComposerUpload:"chat_composer_upload",safetyDisclaimerPlacement:"safety_disclaimer_placement",healthPlanLayout:"health_plan_layout",recordsTopRiskLine:"records_top_risk_line",recordsClearResultsFilter:"records_clear_results_filter",chatComposerStyle:"chat_composer_style",chatComposerPlaceholder:"chat_composer_placeholder",chatHistoryBar:"chat_history_bar",chatGeneralBanner:"chat_general_banner",chatSendButton:"chat_send_button",chatTextingAsk:"chat_texting_ask",serverSlots:"server_slots"}),yr=Object.keys(mr),br="presentation",kr="presentation.";var wr={chatAnswerStyle:["bubbles","cards"],chatHistoryStyle:["drawer","sheet"],chatTopCard:["none","focus"],safetyDisclaimerPlacement:["composer","answer_footer","none"],healthPlanLayout:["standard","focus_plan"],chatComposerStyle:["standard","compact"],chatComposerPlaceholder:["generic","pet_name"],chatHistoryBar:["pinned","scroll"],chatSendButton:["always_dark","dim_when_empty"]},vr=/* @__PURE__ */new Set(["chatFollowUpsExcludeTelevet","chatComposerMic","chatComposerUpload","recordsTopRiskLine","recordsClearResultsFilter","chatGeneralBanner","chatTextingAsk","serverSlots"]);function xr(e,t){if(t==null)return;let n=wr[e];return n!==void 0?typeof t=="string"&&n.includes(t)?t:void 0:vr.has(e)?typeof t=="boolean"?t:void 0:typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=3?t:void 0}function parsePresentation(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n={};for(let e of yr){let r=mr[e],i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[e],o=xr(e,i);o!==void 0&&(n[e]=o)}return Object.keys(n).length===0?null:/* @__PURE__ */Object.freeze(n)}function isPresentationFieldLocked(e,t){if(t==null)return false;let n=`${kr}${mr[e]}`;for(let e of t)if(e===br||e===n)return true;return false}function resolvePresentation(e){let t=parsePresentation(e?.server??null)??{},{safetyDisclaimerPlacement:n,...r}=t,i=n==="none"||n===void 0?r:{...r,safetyDisclaimerPlacement:n},o=parsePresentation(e?.client??null)??{},l=e?.locked?[...e.locked]:null,a={};for(let e of yr){let t=i[e],n=isPresentationFieldLocked(e,l)?void 0:o[e];a[e]=n??t??fr[e]}/* @__PURE__ */
|
|
22
|
+
return Object.freeze(a)}var Sr=/* @__PURE__ */Object.freeze({branding:null}),Tr=/* @__PURE__ */Object.freeze({subscribe:()=>()=>{},getSnapshot:()=>Sr});function Cr(e){return e?Object.keys(e).sort().map(t=>`${t}=${String(e[t])}`).join("&"):""}function useEverfurPresentation(e){return Ir(e).presentation}function Ir(e){let{runtime:t}=le(),n=t?.entitlements??Tr,i=a(()=>n.getSnapshot()?.branding??null,[n]),o=gr(l(n.subscribe,i,i),t?.sdkConfigHost?.branding),s=Cr(e);return r(()=>{let t=o?.lockedFields??null;return{presentation:resolvePresentation({server:o?.presentation??null,locked:t,client:e??null}),isLocked:e=>isPresentationFieldLocked(e,t)}},[o,s])}function Hr(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}var Fr=/* @__PURE__ */Symbol.for("@everfur/sdk#SlotSwitchContext@v1"),Rr=globalThis,Pr=Rr[Fr]??(Rr[Fr]=createContext(null));Pr.displayName??="EverfurSlotSwitch";function zr(e){let t=i(Pr),n=useEverfurPresentation(void 0).serverSlots;return t===null?n:t}var Dr=class extends u{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(e,t){return Object.is(e.resetKey,t.key)?null:{failed:false,key:e.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:e}){return e()}function HostRender({render:e,fallback:n,resetKey:r}){return t(Dr,{fallback:n,resetKey:r,children:t(RenderHost,{render:e})})}function $r(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(!(n>=56320&&n<=57343))return true;t+=1}else if(n>=56320&&n<=57343)return true}return false}function Or(e){return[...e].length}var Br=/* @__PURE__ */Object.freeze({dog:"dog",canine:"dog",k9:"dog",puppy:"dog",cat:"cat",feline:"cat",kitten:"cat"});function canonicalPetSpecies(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();return Object.prototype.hasOwnProperty.call(Br,t)?Br[t]:null}var _r=50,Lr=128,Er=120,Ar=120,jr=2e3,Wr=120,Mr=80,Nr=/* @__PURE__ */new Set(["male","female","unknown"]),Ur=/* @__PURE__ */new Set(["day","month","year"]),qr=/* @__PURE__ */new Set(["low","medium","high","athletic"]),Vr=/* @__PURE__ */new Set(["indoor","outdoor","both"]),Gr=/* @__PURE__ */new Set(["mild","moderate","severe"]),Kr=/^(\d{4})-(\d{2})-(\d{2})$/,Xr=[["sex","sex"],["spayedNeutered","spayed_neutered"],["birthDate","birth_date"],["birthDatePrecision","birth_date_precision"],["activityLevel","activity_level"],["indoorOutdoor","indoor_outdoor"],["foodBrand","food_brand"],["foodType","food_type"],["microchipId","microchip_id"]],Yr=[["allergies","allergies"],["medications","medications"],["supplements","supplements"],["conditions","conditions"]];/* @__PURE__ */Object.freeze([...Xr,...Yr].map(([e])=>e));function Jr(e){let t=Kr.exec(e);if(t===null)return false;let[n,r,i]=[Number(t[1]),Number(t[2]),Number(t[3])],o=new Date(Date.UTC(n,r-1,i));return o.getUTCFullYear()===n&&o.getUTCMonth()===r-1&&o.getUTCDate()===i}var Qr=e=>(t,n)=>typeof n=="string"&&e.has(n)?null:`${t} must be one of ${[...e].join(", ")}`,Zr=(e,t)=>typeof t=="boolean"?null:`${e} must be true or false`,ei=(e,t)=>typeof t=="string"&&Jr(t)?null:`${e} must be a real date written YYYY-MM-DD`,ti=(e,t={})=>(n,r)=>{if(typeof r!="string")return`${n} must be a string`;if($r(r))return`${n} contains an unpaired surrogate and cannot be encoded`;let i=t.trimmed?r.trim():r;if(t.required&&i.length===0)return`${n} is required and must not be blank`;let o=Or(i);return o<=e?null:`${n} is ${o} characters; the server accepts at most ${e}`},ni={sex:Qr(Nr),spayedNeutered:Zr,birthDate:ei,birthDatePrecision:Qr(Ur),activityLevel:Qr(qr),indoorOutdoor:Qr(Vr),foodBrand:ti(Wr),foodType:ti(Wr),microchipId:ti(Mr)},ri=["ref","ref",false,ti(Lr,{required:true,trimmed:true})],ii=["notes","notes",false,ti(jr,{trimmed:true})],oi=[ri,["name","name",true,ti(Er,{required:true,trimmed:true})],["dose","dose",false,ti(Ar,{trimmed:true})],["frequency","frequency",false,ti(Ar,{trimmed:true})],["startDate","start_date",false,ei],["endDate","end_date",false,ei],ii],li={allergies:[ri,["allergen","allergen",true,ti(Er,{required:true,trimmed:true})],["severity","severity",false,Qr(Gr)],ii],medications:oi,supplements:oi,conditions:[ri,["conditionName","condition_name",true,ti(Er,{required:true,trimmed:true})],["diagnosedDate","diagnosed_date",false,ei],ii]};function ai(e,t,n){let r=`${e}[${t}]`;if(typeof n!="object"||n===null||Array.isArray(n))return{error:`${r} must be an object`};let i=n,o={};for(let[t,n,l,a]of li[e]){let e=i[t];if(e==null){if(l)return{error:`${r}.${t} is required`};e===null&&(o[n]=null);continue}let s=a(`${r}.${t}`,e);if(s!==null)return{error:s};o[n]=e}let l=o.start_date,a=o.end_date;return typeof l=="string"&&typeof a=="string"&&a<l?{error:`${r}.endDate must not be before startDate`}:{item:o}}function si(e,t){if(!Array.isArray(t))return{error:`${e} must be an array (send [] to clear it)`};if(t.length>_r)return{error:`${e} has ${t.length} items; the server accepts at most ${_r}`};let n=[],r=/* @__PURE__ */new Set;for(let i=0;i<t.length;i+=1){let o=ai(e,i,t[i]);if("error"in o)return o;let l=o.item.ref;if(typeof l=="string"){let t=l.trim();if(r.has(t))return{error:`${e}: ref ${JSON.stringify(t)} is used twice; a ref names one item`};r.add(t)}n.push(o.item)}return{items:n}}function ci(e,t){let n=e,r={};for(let[e,t]of Xr){let i=n[e];if(i!==void 0){if(i!==null){let t=ni[e](e,i);if(t!==null)return{error:t}}r[t]=i}}let i=n.birthDate!==void 0,o=n.birthDatePrecision!==void 0;if(i!==o||i&&n.birthDate===null!=(n.birthDatePrecision===null))return{error:"birthDate and birthDatePrecision must be sent together, both set or both null"};for(let[e,t]of Yr){let i=n[e];if(i===void 0)continue;let o=si(e,i);if("error"in o)return o;r[t]=o.items}return Object.keys(r).length>0&&t!==void 0&&canonicalPetSpecies(t)===null?{error:"health fields need a pet Everfur reads as a dog or a cat (dog, canine, k9, puppy, cat, feline, kitten)"}:{body:r}}var di=e=>typeof e=="string"?e:null,ui=(e,t)=>typeof t=="string"&&e.has(t)?t:null,pi=e=>typeof e=="boolean"?e:null;function hi(e,t){return Array.isArray(e)?/* @__PURE__ */Object.freeze(e.flatMap(e=>{if(typeof e!="object"||e===null||Array.isArray(e))return[];let n=t(e);return n===null?[]:[n]})):/* @__PURE__ */Object.freeze([])}function gi(e){let t=di(e.name);return t===null||t.length===0?null:/* @__PURE__ */Object.freeze({ref:di(e.ref),name:t,dose:di(e.dose),frequency:di(e.frequency),startDate:di(e.start_date),endDate:di(e.end_date),notes:di(e.notes)})}function fi(e){let t=e.profile_version;/* @__PURE__ */
|
|
23
|
+
return Object.freeze({profileVersion:typeof t=="number"&&Number.isInteger(t)&&t>=0?t:0,sex:ui(Nr,e.sex),spayedNeutered:pi(e.spayed_neutered),birthDate:di(e.birth_date),birthDatePrecision:ui(Ur,e.birth_date_precision),activityLevel:ui(qr,e.activity_level),indoorOutdoor:ui(Vr,e.indoor_outdoor),foodBrand:di(e.food_brand),foodType:di(e.food_type),microchipId:di(e.microchip_id),allergies:hi(e.allergies,e=>{let t=di(e.allergen);return t===null||t.length===0?null:/* @__PURE__ */Object.freeze({ref:di(e.ref),allergen:t,severity:ui(Gr,e.severity),notes:di(e.notes)})}),medications:hi(e.medications,gi),supplements:hi(e.supplements,gi),conditions:hi(e.conditions,e=>{let t=di(e.condition_name);return t===null||t.length===0?null:/* @__PURE__ */Object.freeze({ref:di(e.ref),conditionName:t,diagnosedDate:di(e.diagnosed_date),notes:di(e.notes)})})})}var mi=100,yi=50,bi=100,ki=50,wi=500,vi=128,xi=6e4;function Si(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e})}function Ti(e,t,n){if(typeof t!="string")return Si(`${e} must be a string`);let r=Or(t);return r<=n?null:Si(`${e} is ${r} characters; the server accepts at most ${n}`)}function Ci(e,t,n){return typeof t=="number"&&Number.isFinite(t)&&t>=0&&t<=n?null:Si(`${e} must be a finite number between 0 and ${n}`)}function Ii(petRef,e){if(typeof petRef!="string")return Si("pet_ref must be a string");if(petRef.trim().length===0)return Si("pet_ref must not be blank");if($r(petRef))return Si("pet_ref contains an unpaired surrogate and cannot be encoded");if(e!=null&&typeof e!="object")return Si("profile must be an object");let t=[Ti("pet_ref",petRef,vi)];return e?.name!==void 0&&t.push(Ti("name",e.name,mi)),e?.species!==void 0&&t.push(Ti("species",e.species,yi)),e?.breed!==void 0&&t.push(Ti("breed",e.breed,bi)),e?.ageYears!==void 0&&t.push(Ci("age_years",e.ageYears,ki)),e?.weightKg!==void 0&&t.push(Ci("weight_kg",e.weightKg,wi)),t.find(e=>e!==null)??null}function Hi(e,t){let n=ci(e,t);return"error"in n?{error:Si(n.error)}:n}function Fi(e){if(typeof e!="object"||e===null)return{error:Si("patch must be an object")};let t=e,n=[["name","name",e=>Ti("name",e,mi)],["species","species",e=>Ti("species",e,yi)],["breed","breed",e=>Ti("breed",e,bi)],["ageYears","age_years",e=>Ci("age_years",e,ki)],["weightKg","weight_kg",e=>Ci("weight_kg",e,wi)]],r={};for(let[e,i,o]of n){let n=t[e];if(n!==void 0){if(n!==null){let e=o(n);if(e!==null)return{error:e}}r[i]=n}}let i=Hi(t,t.species);return"error"in i?i:(Object.assign(r,i.body),Object.keys(r).length===0?{error:Si("patch must change at least one field")}:{body:r})}function Ri(e){if(e==null)return{body:{}};let t=Hi(e,e.species);return"error"in t?t:{body:{...e.name!==void 0?{name:e.name}:{},...e.species!==void 0?{species:e.species}:{},...e.breed!==void 0?{breed:e.breed}:{},...e.ageYears!==void 0?{age_years:e.ageYears}:{},...e.weightKg!==void 0?{weight_kg:e.weightKg}:{},...t.body}}}var Pi=e=>typeof e=="string"?e:null,zi=e=>typeof e=="number"&&Number.isFinite(e)?e:null;function Di(e,petRef){let t=typeof e=="object"&&e!==null?e:{};/* @__PURE__ */
|
|
24
|
+
return Object.freeze({petRef:Pi(t.pet_ref)??petRef,name:Pi(t.name),species:Pi(t.species),breed:Pi(t.breed),ageYears:zi(t.age_years),weightKg:zi(t.weight_kg)})}function widgetPetFromWire(e){if(typeof e!="object"||e===null)return null;let t=e,petRef=Pi(t.pet_ref);return petRef===null||petRef.length===0?null:/* @__PURE__ */Object.freeze({petId:Pi(t.pet_id),petRef:petRef,name:Pi(t.name),species:Pi(t.species),breed:Pi(t.breed),ageYears:zi(t.age_years),weightKg:zi(t.weight_kg),updatedAt:Pi(t.updated_at)})}function $i(e){let t=widgetPetFromWire(e);return t===null?null:/* @__PURE__ */Object.freeze({...t,...fi(e)})}function Oi(e){let t=Array.isArray(e)?e:typeof e=="object"&&e!==null&&Array.isArray(e.pets)?e.pets:[];/* @__PURE__ */
|
|
25
|
+
return Object.freeze(t.flatMap(e=>{let t=widgetPetFromWire(e);return t===null?[]:[t]}))}function createPetsRepository(e){return Bi(createRequestFunnel({auth:e}),createRequestFunnel({auth:e,unaryTimeoutMs:xi}))}function Bi(e,t=e){let n=(e,t)=>t?{...e,signal:t}:e,r=petRef=>Ii(petRef,void 0)??`/widget/v1/pets/${encodeURIComponent(petRef)}`;return{async list(t){let r=await e.send("pets.list",n({method:"GET",path:"/widget/v1/pets"},t?.signal));return r.ok?ok(Oi(r.value)):err(r.error)},async registerPet(petRef,t,n){let r=Ii(petRef,t);if(r!==null)return err(r);let i=Ri(t);if("error"in i)return err(i.error);let o={method:"POST",path:`/widget/v1/pets/${encodeURIComponent(petRef)}`,body:i.body},l=await e.send("pets.registerPet",n?.signal?{...o,signal:n.signal}:o);return l.ok?ok(Di(l.value,petRef)):err(l.error)},async updatePet(petRef,t,i){let o=r(petRef);if(typeof o!="string")return err(o);let l=Fi(t);if("error"in l)return err(l.error);let a=await e.send("pets.updatePet",n({method:"PATCH",path:o,body:l.body},i?.signal));return a.ok?ok(Di(a.value,petRef)):err(a.error)},async getPetProfile(petRef,t){let i=r(petRef);if(typeof i!="string")return err(i);let o=await e.send("pets.getPetProfile",n({method:"GET",path:`${i}/profile`},t?.signal));if(!o.ok)return err(o.error);let l=$i(o.value);return l===null?err(makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:"the pet profile response carried no pet_ref"})):ok(l)},async deletePet(petRef,t){let i=r(petRef);if(typeof i!="string")return err(i);let o=await e.send("pets.deletePet",n({method:"DELETE",path:i},t?.signal));return o.ok?ok(void 0):err(o.error)},async eraseUserData(e){let r=await t.send("pets.eraseUserData",n({method:"DELETE",path:"/widget/v1/me"},e?.signal),{maxAttempts:1});return r.ok?ok(void 0):err(r.error)}}}var _i=/* @__PURE__ */new WeakMap;function Li(e,t){let n=_i.get(e);return n===void 0&&(n=/* @__PURE__ */new Set,_i.set(e,n)),n.add(t),()=>{n?.delete(t)}}function useEverfurPets(){let{runtime:e,userRef:userRef,activePet:t,scopeEpoch:i}=le(),l=r(()=>createPetsRepository(e.registry.services.authFor(userRef)),[e,userRef,i]),[c,d]=n({repository:l,pets:[],loading:true,error:null}),u=c.repository===l?c:{pets:[],loading:true,error:null},p=s(0),h=a(async()=>{let e=++p.current;d(e=>({...e,repository:l,loading:true,error:null,pets:e.repository===l?e.pets:[]}));let t=await l.list();e===p.current&&d(t.ok?{repository:l,pets:t.value,loading:false,error:null}:e=>({repository:l,pets:e.repository===l?e.pets:[],loading:false,error:t.error}))},[l]);o(()=>(h(),()=>{p.current+=1}),[h]),o(()=>Li(e,()=>{h()}),[e,h]);let g=r(()=>t===null?null:u.pets.find(e=>e.petRef===t)??null,[t,u.pets]);return r(()=>({pets:u.pets,activePet:g,loading:u.loading,error:u.error,refresh:h}),[u.pets,u.loading,u.error,g,h])}var Ei=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var Ai=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Ai(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var ji=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var Wi={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Mi={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},Ni={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},Ui={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},qi={regular:"400",medium:"500",bold:"700"},Vi={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Gi=0,Ki="System",Xi="monospace",Yi=["content","heading","control","compact","badge"];function Ji(e){let t={};for(let n of Yi)t[n]=e;return t}var Qi=[];function Zi(){return{family:Ki,mono:Xi,fontUrl:null,families:{regular:Ki,medium:Ki,bold:Ki,mono:Xi,monoMedium:Xi,monoBold:Xi},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:Ni,tierSizes:Ji(Ni),lineHeight:Ui,weight:qi,letterSpacing:Vi,scale:1,maxScale:Gi,scaleCaps:ji,headingFamily:null,headingWeight:null,fontSources:Qi,roles:Ei,typeScale:1}}var eo={},to=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var no={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(to.standard),emphasized:cssCubicBezier(to.emphasized),exit:cssCubicBezier(to.exit)},reducedMotion:false},ro={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},io=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:ro,space:Wi,radius:Mi,type:Zi(),motion:no,slots:eo}),oo={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"},lo=deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:oo,space:Wi,radius:Mi,type:Zi(),motion:no,slots:eo});var ao=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),so=globalThis,co=so[ao]??(so[ao]=createContext(io));co.displayName??="EverfurThemeContext";function useEverfurTheme(){return i(co)}function uo(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:n,...r}){let i=useEverfurTheme(),o=n===void 0?void 0:i.type.roles[n],l=uo(i.type,e??o?.tier??"content"),a=n===void 0?r:{...r,style:[{...textRole(i,n),color:i.color.text.primary,flexShrink:1},r.style]};return t(C,l===void 0?a:{maxFontSizeMultiplier:l,...a})}e(function(e,n){return t(h,{...e,...n===null?{}:{ref:n}})});var po=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(e){return po[e]}function decideCapability(e,t,n){let r=requires(e),i=/* @__PURE__ */new Map;for(let e of t)i.set(e.resource,e);if(n?.isPending===true&&r.some(e=>!i.has(e)))return fo({name:e,enabled:false,isPending:true,limits:{}});let o=ho(r,i);return r.filter(e=>i.get(e)?.granted!==true).length===0?fo({name:e,enabled:true,isPending:false,limits:o}):fo({name:e,enabled:false,isPending:false,limits:o,disabled:go(r,i)})}function ho(e,t){let n={};for(let r of e){let e=t.get(r)?.limits;if(e)for(let[t,r]of Object.entries(e)){let e=n[t];n[t]=e===void 0?r:Math.min(e,r)}}return n}function go(e,t){for(let n of e){let e=t.get(n)?.disabled;if(e)/* @__PURE__ */
|
|
26
26
|
return Object.freeze({reason:e.reason,level:e.level,recoverable:e.recoverable})}/* @__PURE__ */
|
|
27
|
-
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function
|
|
28
|
-
return
|
|
29
|
-
return
|
|
30
|
-
return
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
return
|
|
35
|
-
/* @__PURE__ */R(m.View,{style:b(p),children:r}),a.leaving===null?null:/* @__PURE__ */R(m.View,{pointerEvents:"none",style:[{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:o},b(h)],children:a.leaving})]})}var ol=/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({efDarkGreen:"#10462E",efWhite:"#FFFFFF",efBlack:"#000000",efDustyPink:"#FFC3BC",efBrightGreen:"#07C168",efYellow:"#F2C763",efDustyBlue:"#A8B9DA",efSkyBlue:"#4E98C9",efCharcoal:"#3D3D3D",efIconHoney:"#926F06",efIconLeaf:"#16864A",efIconSky:"#1E7AB7",efIconTeal:"#05827E",efIconCocoa:"#865B3F",efIconNavy:"#223E80",efIconBerry:"#B6407F",efIconAmber:"#B25E05",efIconMoss:"#5E7E1E",efIconSlate:"#5A6087",efIconRose:"#CA4463",efRedDeep:"#6D1D14",efRedBright:"#C03410",bg:"#FFFFFF",bgBrand:"#10462E",bgAccent:"#FFC3BC",bgAccentB2b:"#A8B9DA",bgWarm:"#F2C763",text:"#000000",textBrand:"#10462E",textOnBrand:"#FFFFFF",textCta:"#07C168",textMuted:"#6B6B6B",bgMist:"#F1F5F2",border:"#E4E4E4",borderStrong:"#3D3D3D",hi:"#DAF6E8",hiStrong:"#ABEACC",hiEdge:"#0B8A4E",now:"#0C844B",alert:"#C03410",alertDeep:"#6D1D14",btnPrimaryBg:"#10462E",btnPrimaryText:"#FFFFFF",btnSecondaryBg:"rgba(0, 0, 0, 0)",btnSecondaryText:"#10462E",btnSecondaryBorder:"#10462E",mixMint:"#7FE8AE",mixLegal:"#A9C4B5",mixPromptGreen:"#BFEFD8",mixPromptYellow:"#F7DC9E",mixRx:"#E0E6F2",mixShelf:"#F3F3F3",mixEar:"#F09FA3",efBone:"#FAF9F6",efTennisBall:"#DCEF5A",efFawn:"#E8CAA4",efPine:"#12301F",efPine70:"rgba(18, 48, 31, 0.72)",efLiver:"#7A4330",efMerle:"#AEB8C1",efNose:"#E9B6A6"}),font:/* @__PURE__ */Object.freeze({family:/* @__PURE__ */Object.freeze({base:'Azeret, "Helvetica Neue", Arial, sans-serif',mono:'"Azeret Mono", ui-monospace, "SF Mono", Menlo, monospace'}),size:/* @__PURE__ */Object.freeze({xs:13,sm:15,md:17,lg:20,xl:24,"2xl":32,"3xl":40,"4xl":56}),lineHeight:/* @__PURE__ */Object.freeze({body:1.55,display:1.15}),weight:/* @__PURE__ */Object.freeze({regular:400,medium:500,bold:700})}),space:/* @__PURE__ */Object.freeze({1:4,2:8,3:12,4:16,5:24,6:32,7:48,8:64,9:96}),radius:/* @__PURE__ */Object.freeze({sm:6,md:10,lg:20,xl:28,pill:999}),shadow:/* @__PURE__ */Object.freeze({sm:/* @__PURE__ */Object.freeze({x:0,y:1,blur:2,spread:0,color:"rgba(16, 70, 46, 0.06)"}),md:/* @__PURE__ */Object.freeze({x:0,y:4,blur:16,spread:0,color:"rgba(16, 70, 46, 0.08)"})}),layout:/* @__PURE__ */Object.freeze({container:1200,containerNarrow:720}),motion:/* @__PURE__ */Object.freeze({easing:/* @__PURE__ */Object.freeze({out:/* @__PURE__ */Object.freeze([.23,1,.32,1]),inOut:/* @__PURE__ */Object.freeze([.77,0,.175,1]),drawer:/* @__PURE__ */Object.freeze([.32,.72,0,1]),expo:/* @__PURE__ */Object.freeze([.16,1,.3,1]),bark:/* @__PURE__ */Object.freeze([.34,1.56,.64,1])}),duration:/* @__PURE__ */Object.freeze({press:160,fade:200,enter:300,sheet:420,sheetOut:240,draw:900})}),web:/* @__PURE__ */Object.freeze({serif:'Azeret, "Helvetica Neue", Arial, sans-serif',sans:'Azeret, "Helvetica Neue", Arial, sans-serif',tSmall:14,max:1312}),role:/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({ink:"#10462E",go:"#07C168",muted:"#6B6B6B",line:"#E4E4E4",pink50:"#FFE1DE",tintSage:"#E6ECE8",tintPink:"#FFEAE8",tintPinkSoft:"#FFF6F5",tintBlue:"#EAEEF6",tintYellow:"#FCF0D6",tintYellowEdge:"#F6D892",tintRed:"#FBF1EE",tintGo:"#DCF6EA",icoGrey:"#6B6B6B",icoSage:"#819E90",icoBlue:"#4E98C9",icoWarm:"#D6D0C2",icoAmber:"#B67B3F",amberText:"#A05E32",wxSun:"#F2C763",wxSunEdge:"#D5AD47",wxCloud:"#FFFFFF",wxCloudEdge:"#DEDEDE",wxCloudDark:"#EAEAEA",wxCloudDarkEdge:"#C5C5C5",wxRain:"#75AFD5",wxSnow:"#AFD1E7",wxMist:"#D4D4D4",cwShelf:"#FFFFFF",cwShelfDeep:"#F1F4F2",cwRx:"#E0E6F2",cwRxInk:"#5A6087",cwEdgeC:"#C6D3CD",nItch:"#CA4463",nJoints:"#5E7E1E",nItchC:"#FFC3BC",nJointsC:"#D8E0C9",lvlGood:"#77DDAC",lvlOk:"#F4CF7A",lvlHot:"#DC8F7C",lvlStorm:"#8DA4BB",mapLand:"#F5F5F5",mapEdge:"#EAEAEA",mapPark:"#D7F5E7",mapWater:"#D8E0EE",mapSand:"#FCF3DD"}),size:/* @__PURE__ */Object.freeze({max:1440,gutter:16,sideW:220,cardPad:16,barH:48,tabH:58,dock:64,side:16,stackGap:12})})});var ll={shown:true,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},al={shown:true,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},sl=e=>({...ll,...e}),cl=e=>({...al,...e}),dl={button:{ink:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},go:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},outline:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:400,lineHeight:1,iconSize:24},pink:{fill:true,minHeight:60,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:18,fontWeight:700,lineHeight:1,iconSize:24},danger:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1.55,iconSize:20},inkSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},goSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},outlineSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:400,lineHeight:1,iconSize:20},pinkSm:{fill:true,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},row:{fill:false,minHeight:36,paddingX:14,gap:8,borderWidth:1.5,ring:false,fontSize:14,fontWeight:400,lineHeight:1,iconSize:17},outlineInSheetWeight:700,money:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"pink",fg:"ink",edgeColor:"ink"},moneySm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"pink",fg:"ink",edgeColor:"ink"},warn:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"none",fg:"alertDeep",edgeColor:"alert"},warnSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"none",fg:"alertDeep",edgeColor:"alert"},text:{fontSize:15,fontWeight:700,lineHeight:1.4,color:"ink",pressOpacity:.6}},pill:{minHeight:24,paddingX:10,fontSize:12,fontWeight:700,lineHeight:1,letterSpacing:.72,ring:{soon:1.25,overdue:1.25,clear:1.5,later:1.25,plain:1.5,new:1.5},plainRingAlpha:.2,dot:6,dotGap:6,allergyDot:{size:6,gap:6,color:"alert"},mono:true,upper:true,tones:{rx:{bg:"#E0E6F2",fg:"ink",ring:0,ringColor:"ink"},soon:{bg:"surface",fg:"ink",ring:1.25,ringColor:"tintYellowEdge"},overdue:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},clear:{bg:"surface",fg:"go",ring:1.5,ringColor:"go"},stable:{bg:"tintGo",fg:"ink",ring:0,ringColor:"ink"},later:{bg:"surface",fg:"muted",ring:1.25,ringColor:"line"},plain:{bg:"surface",fg:"ink",ring:1.5,ringColor:"ink/0.2"},new:{bg:"surface",fg:"ink",ring:1.5,ringColor:"go"},pink:{bg:"tintPink",fg:"ink",ring:0,ringColor:"ink"},watch:{bg:"#F9E6B9",fg:"ink",ring:0,ringColor:"ink"},high:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},allergy:{bg:"surface",fg:"alertDeep",ring:1.25,ringColor:"alert"}}},chip:{minHeight:42,paddingX:16,gap:8,borderWidth:1,fontSize:15,fontWeight:500,lineHeight:1.3},card:{padding:16,radius:20,borderWidth:1,titleSize:18,titleWeight:700,titleLineHeight:1.25,titleTracking:-.36,titleGap:12,leadSize:15,leadLineHeight:1.5,leadGap:12,headGapX:16,headGapY:8,headGap:12,bodySize:17,bodyLineHeight:1.55,ghost:{borderStyle:"dashed",borderColor:"#B9C9C2"}},sectionHeader:{gapX:12,gapY:8,marginTop:8},kicker:{fontSize:12,fontWeight:700,lineHeight:1.55,letterSpacing:.96,gap:8},quantityStepper:{borderWidth:1,borderColor:"line",ring:false,button:40,icon:18,valueMinWidth:28,offColor:"line",offOpacity:1,valueSize:17,valueWeight:700,valueLineHeight:1.55},tabs:{minHeight:44,gap:6,fontSize:15,fontWeight:500,currentWeight:700,lineHeight:1.55,indicator:3,hairline:1,dot:7},sheet:{radius:28,grabHeight:20,grabBarWidth:36,grabBarHeight:5,grabBarRadius:3,headPaddingTop:4,headPaddingX:16,headPaddingBottom:12,headGap:12,titlesGap:2,titleSize:18,close:36,closeIcon:20,bodyGap:12,bodyPaddingX:16,bodyPaddingBottom:24,actsGap:12,actsMarginTop:4},empty:{gap:8,titleSize:22,titleWeight:500,titleLineHeight:1.2,titleTracking:-.33,leadSize:15,leadLineHeight:1.5,actsGap:12,actsMarginTop:12,buttonMinWidth:200,linkMinHeight:44,linkPaddingX:4,linkSize:15,linkWeight:700,linkUnderlineOffset:3},skeleton:{gap:10,lineHeight:12,widths:[100,82,64]},summary:{paddingX:24,paddingY:0,radius:20,borderWidth:1,background:"surface",shadow:{color:"",x:0,y:0,blur:0,spread:0},rowDivider:1,rowMinHeight:0,rowCenter:false,rowPaddingY:14,termColor:"muted",valueColor:"ink",tabular:false,totalRowMinHeight:0,totalTermSize:15,totalTermWeight:400,totalTermColor:"muted",totalWeight:700,rowGapX:16,rowGapY:2,termSize:15,termLineHeight:1.55,valueSize:15,valueWeight:700,valueLineHeight:1.4,totalSize:20,totalLineHeight:1.4,off:{shown:true,size:15,weight:700,lineHeight:21,color:"go",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},icon:{size:24},timeline:{row:{shown:true,w:361,h:69.281,padding:[0,0,24,0],marginTop:0,marginBottom:0,gap:[16,16],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},done:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"ink",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"surface",fit:"cover",x:0,y:0,dy:0},now:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},next:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},nowInner:{size:10,color:"go"},check:{shown:true,w:16,h:16,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},lineDoneDone:{x:13,top:30,bottom:2,width:2,color:"ink"},lineDoneNow:{x:13,top:30,bottom:2,width:2,color:"ink"},lineNowNext:{x:13,top:30,bottom:2,width:2,color:"line"},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},head:{shown:true,w:317,h:27,padding:[3,0,0,0],marginTop:0,marginBottom:0,gap:[8,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},nextTitle:{shown:true,size:17,weight:700,lineHeight:22.1,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},when:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},thumbnail:{xs:{frame:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},img:{shown:false,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},sm:{frame:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},md:{frame:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:156,h:156,padding:[10,10,10,10],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},lg:{frame:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:174.5,h:174.5,padding:[14,14,18,14],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false}},text:{display:{shown:true,size:40,weight:500,lineHeight:39.2,color:"ink",tracking:-1.2,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},headline:{shown:true,size:30,weight:500,lineHeight:33,color:"ink",tracking:-.45,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:22,weight:500,lineHeight:26.4,color:"ink",tracking:-.33,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},heading:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},lead:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},meta:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"mono",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},caption:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},overline:{shown:true,size:12,weight:700,lineHeight:16.8,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},kicker:{shown:true,size:12,weight:700,lineHeight:18.6,color:"muted",tracking:.96,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},field:{gap:6,label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},input:{shown:true,w:361,h:52,padding:[0,16,0,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},focusEdge:"ink",errorEdge:"alert",value:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:1},valueInset:[2,1],icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},area:{shown:true,w:361,h:158,padding:[12,16,12,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},areaValue:{shown:true,size:17,weight:400,lineHeight:25.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:2},areaValueMinHeight:132,areaInset:[2,2],hint:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},error:{shown:true,size:15,weight:400,lineHeight:21.75,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},placeholder:"muted"},checkbox:{row:{shown:true,w:361,h:45,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},labelX:34,box:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1.5,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"ink",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},tick:{w:5,h:10,stroke:2,color:"surface",rotate:45,dy:-1},label:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},boxed:{shown:true,w:361,h:50.5,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"bgMist",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0}},choice:{row:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},selected:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"pink",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},radio:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1.5,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},radioOn:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:6,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},textX:34,title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},strut:26.35,meta:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},end:{shown:true,size:13,weight:400,lineHeight:20.15,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},group:{gap:8,legend:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},legendPaddingX:2,legendGap:0}},switch:{track:{shown:true,w:48,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"#D0D6D3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:"ink",thumb:{size:22,inset:3,travel:20,color:"surface",shadow:{color:"rgba(16, 70, 46, 0.06)",x:0,y:1,blur:2,spread:0}}},iconButton:{bare:{shown:true,w:44,h:44,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[22,22],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},bareIcon:22,offColor:"line",ring:{shown:true,w:36,h:36,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[18,18],bg:"surface",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},ringIcon:18,ringPressed:"tintSage",ringPressScale:.94},link:{text:{shown:true,size:17,weight:400,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},danger:{shown:true,size:15,weight:700,lineHeight:23.25,color:"alert",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},inline:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},lists:{rows:{row:{shown:true,w:327,h:94.781,padding:[16,0,16,0],marginTop:0,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:1,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},tiles:{list:{shown:true,w:343,h:175.813,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},outdent:8,row:{shown:true,w:343,h:62.281,padding:[10,8,10,8],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},leading:22,leadingFace:40,icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},text:{shown:true,w:261,h:42.281,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[2,2],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},pressed:"#EDF2EF",alert:{bg:"tintRed",icon:"alert",title:"alertDeep",subtitle:"alert"}},end:{text:{shown:true,size:15,weight:400,lineHeight:23.25,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},gap:8,chevron:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#819D90",fit:"cover",x:0,y:0,dy:0}},section:{title:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},titleGap:12,head:{shown:true,w:361,h:22.5,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[12,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},note:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:12,paddingTop:0}},avatar:{sizes:{xs:20,sm:36,md:48,lg:64,xl:128},face:40,bg:"surface",edge:{width:1,color:"line",ring:true},initials:{shown:true,size:15,weight:700,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},initialsXs:{shown:true,size:9,weight:700,lineHeight:13.95,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tints:{default:"tintPink",pink:"#FFCFC9",blue:"#C2CEE5",yellow:"#F6D78F",sage:"#C6D3CD"},ring:{width:2,offset:2,color:"go"},ringXl:{width:3,offset:4,color:"go"},dot:{size:12,edge:2,edgeColor:"surface"}},stack:{size:28,overlap:-8,initialsSize:12,halo:{width:2,color:"surface"}},banner:{box:{shown:true,w:361,h:155.391,padding:[16,16,16,16],marginTop:0,marginBottom:0,gap:[12,4],minHeight:0,radius:[20,20],bg:"#F1F5F2",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},iconRows:3,kicker:{shown:true,size:12,weight:700,lineHeight:16.8,color:"#5B5B5B",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:295,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tones:{info:{bg:"#F1F5F2",icon:"ink"},success:{bg:"tintGo",icon:"ink"},warn:{bg:"#FCF0D6",icon:"#926F06"},danger:{bg:"tintRed",icon:"alert"}}},toast:{box:{shown:true,w:200.281,h:40.25,padding:[10,16,10,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:15,weight:400,lineHeight:20.25,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:10},inset:16,rise:8,fade:200,hold:2600},spinner:{size:16,border:2,turn:700,openSide:true,reducedOpacity:.5},offbar:{box:{shown:true,w:361,h:56,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:44,radius:[0,0],bg:"#FCF0D6",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:48,dy:0},text:{shown:true,size:15,weight:500,lineHeight:19.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},action:{shown:true,w:69.859,h:44,padding:[0,2,0,2],marginTop:0,marginBottom:0,gap:[6,6],minHeight:44,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},actionText:{shown:true,size:15,weight:700,lineHeight:19.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},online:{bg:"ink",color:"onInk"},fade:200},progress:{track:{shown:true,w:361,h:4,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"line",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},fill:"go",move:300},divider:{width:1,color:"line",label:{shown:true,size:12,weight:400,lineHeight:18.6,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},labelGap:12,labelLine:{width:1,color:"line"}},errorInline:{text:{shown:true,size:15,weight:400,lineHeight:21,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:361,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},linkPressedOpacity:.6},variants:{drawer:{frame:{shown:true,w:393,h:226.594,padding:[10,20,40,20],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[28,0],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:293.406,dy:0},maxHeight:.8,grab:{shown:true,w:40,h:5,padding:[0,0,0,0],marginTop:0,marginBottom:10,gap:[0,0],minHeight:0,radius:[2.5,2.5],bg:"#DAD7D1",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},top:{shown:true,w:353,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},kicker:{shown:true,size:11,weight:400,lineHeight:16.5,color:"muted",tracking:.88,face:"mono",upper:true,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},close:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},closeEnd:-8,closeIcon:22,title:{shown:true,size:24,weight:800,lineHeight:27.6,color:"ink",tracking:-.24,face:"serif",upper:false,wrap:"balance",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,w:353,h:82,padding:[0,0,0,0],marginTop:12,marginBottom:0,gap:[10,10],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:16,weight:400,lineHeight:24,color:"text",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},scrim:"ink/0.38",motion:{enterMs:320,enterEasing:[.32,.72,0,1],exitMs:220,exitEasing:[.23,1,.32,1],scrimEnterMs:240,scrimExitMs:200,scrimEasing:[.25,.1,.25,1]}},button:{ink:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:0,ring:false,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},outline:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:1.5,ring:true,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},sm:{fill:false,minHeight:40,paddingX:16,gap:8,borderWidth:1.5,ring:true,fontSize:15,fontWeight:700,lineHeight:1.5,iconSize:20},lg:{fill:false,minHeight:56,paddingX:28,gap:8,borderWidth:0,ring:false,fontSize:17,fontWeight:700,lineHeight:1.5,iconSize:20},disabledOpacity:.32,press:.97,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease"},segmented:{track:{shown:true,w:361,h:44,padding:[4,4,4,4],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[22,22],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},option:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},label:{shown:true,size:14,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},chosen:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:0,y:0,dy:0},chosenLabel:{shown:true,size:14,weight:700,lineHeight:21,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},press:.96,transition:"background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},stepper:{track:{shown:true,w:110,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},button:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},icon:16,value:{shown:true,size:15.5,weight:800,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},valueWidth:30,disabledOpacity:.3,press:.9,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},summary:{box:{shown:true,w:361,h:144,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"rgba(38, 37, 35, 0.06)",x:0,y:1,blur:3,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},row:{shown:true,w:329,h:34,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:34,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},term:{shown:true,size:15,weight:400,lineHeight:22.5,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},value:{shown:true,size:15,weight:400,lineHeight:22.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},totalRow:{shown:true,w:329,h:42,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:42,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},totalTerm:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},total:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renewRow:{shown:true,w:329,h:28,padding:[0,0,0,0],marginTop:-6,marginBottom:0,gap:[12,12],minHeight:28,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},renewTerm:{shown:true,size:14,weight:400,lineHeight:21,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renew:{shown:true,size:14,weight:400,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},inset:{shown:true,w:361,h:88,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"bg",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0}},toast:{box:{shown:true,w:361,h:64.594,padding:[12,15,12,15],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:16,y:62,dy:0},text:{shown:true,size:14.5,weight:400,lineHeight:20.3,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:12},motion:{enterMs:220,exitMs:160,easing:[.23,1,.32,1],rise:-8}},focus:{width:2,offset:2,color:"ink"}},press:{button:.97,iconButton:.94,card:.98},colors:{grab:"#C9C9C9",scrim:"rgba(0, 0, 0, 0.32)",watch:"#F9E6B9",planInk:"#262523",planOnInk:"#FFFFFF",planAccent:"#FFCE34",planLink:"#00707C",planAccentWash:"#FFF7DC",planAccentChip:"#FFE7A1",planLinkWash:"#E0FDFF",planLinkChip:"#C8F4F8"}};var ul={card:/* @__PURE__ */sl({w:325,h:125.25,padding:[14,16,14,16],radius:[0,20],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.06)",x:0,y:2,blur:3,spread:-1}}),kicker:/* @__PURE__ */sl({w:293,h:24,gap:[8,8],center:true}),kickerText:/* @__PURE__ */cl({size:15,weight:700,lineHeight:23.25}),source:/* @__PURE__ */sl({w:116.719,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#DAF6E8",center:true,color:"ink"}),sourceText:/* @__PURE__ */cl({size:12,weight:700,lineHeight:18.6,color:"ink"}),title:/* @__PURE__ */cl({shown:false,size:15,weight:700,lineHeight:23.25}),signal:/* @__PURE__ */sl({w:293,h:65.25,marginTop:8,gap:[9,9],color:"#4D4D4D"}),signalText:/* @__PURE__ */cl({size:15,weight:400,lineHeight:21.75,color:"#4D4D4D"}),signalLead:/* @__PURE__ */cl({size:15,weight:700,lineHeight:21.75}),dot:/* @__PURE__ */sl({w:9,h:9,radius:[4.5,4.5],bg:"alert",color:"#4D4D4D",dy:-1}),score:/* @__PURE__ */sl({w:293,h:99.859,padding:[10,14,10,14],marginTop:12,gap:[12,12],radius:[10,10],bg:"#FCF0D6",center:true}),scoreLabel:/* @__PURE__ */cl({size:14,weight:600,lineHeight:18.9,color:"#4D4D4D"}),scoreTag:/* @__PURE__ */sl({w:63.125,h:20.188,padding:[2,6,2,6],marginTop:3,radius:[6,6],bg:"surface"}),scoreTagText:/* @__PURE__ */cl({size:12,weight:600,lineHeight:16.2,tracking:.72,face:"mono",upper:true,marginTop:3,paddingTop:2}),scoreNums:/* @__PURE__ */sl({w:106.109,h:51.141,gap:[6,0],center:true}),scoreWas:/* @__PURE__ */cl({size:17,weight:700,lineHeight:26.35,color:"muted",deco:"strike",decoThickness:1.5}),scoreArrow:/* @__PURE__ */sl({w:16,h:16,color:"muted"}),scoreArrowFlip:true,scoreNow:/* @__PURE__ */cl({size:28,weight:700,lineHeight:28,tracking:-.84,tabular:true}),scoreOf:/* @__PURE__ */cl({size:15,weight:700,lineHeight:15,color:"#4D4D4D",tabular:true}),scoreSince:/* @__PURE__ */cl({size:13,weight:700,lineHeight:20.15,color:"ink",marginTop:3})},pl={card:/* @__PURE__ */sl({w:329,h:380.172,padding:[16,16,16,16],marginTop:14,radius:[22,22],bg:"surface",shadow:{color:"rgba(38, 37, 35, 0.06)",x:0,y:1,blur:3,spread:0},color:"#262523"}),kicker:/* @__PURE__ */sl({w:297,h:24,gap:[8,8],center:true,color:"#262523"}),kickerText:/* @__PURE__ */cl({size:15,weight:800,lineHeight:22.5,color:"#262523"}),source:/* @__PURE__ */sl({w:83.375,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#F2F1EE",center:true,color:"#4A4845"}),sourceText:/* @__PURE__ */cl({size:12,weight:700,lineHeight:18,color:"#4A4845"}),title:/* @__PURE__ */cl({size:19,weight:800,lineHeight:23.18,color:"#262523",marginTop:12}),signal:/* @__PURE__ */sl({w:297,h:65.25,marginTop:6,gap:[9,9],color:"#4A4845"}),signalText:/* @__PURE__ */cl({size:15,weight:400,lineHeight:21.75,color:"#4A4845"}),signalLead:/* @__PURE__ */cl({size:15,weight:800,lineHeight:21.75,color:"#262523"}),dot:/* @__PURE__ */sl({w:9,h:9,radius:[4.5,4.5],bg:"#E5372B",color:"#4A4845",dy:-1}),score:/* @__PURE__ */sl({w:297,h:69.75,padding:[10,14,10,14],marginTop:12,gap:[12,12],radius:[14,14],bg:"planAccentWash",center:true,color:"#262523"}),scoreLabel:/* @__PURE__ */cl({size:13.5,weight:600,lineHeight:18.225,color:"#4A4845",wrap:"balance"}),scoreTag:/* @__PURE__ */sl({w:51.609,h:17.5,padding:[2,6,2,6],marginTop:3,radius:[5,5],bg:"surface",color:"#262523"}),scoreTagText:/* @__PURE__ */cl({size:10,weight:600,lineHeight:13.5,color:"#262523",tracking:.6,face:"mono",upper:true,wrap:"balance",marginTop:3,paddingTop:2}),scoreNums:/* @__PURE__ */sl({w:94.75,h:49.75,gap:[6,0],center:true,color:"#262523"}),scoreWas:/* @__PURE__ */cl({size:17,weight:700,lineHeight:25.5,color:"#6B6863",deco:"strike"}),scoreArrow:/* @__PURE__ */sl({w:16,h:16,color:"#6B6863"}),scoreArrowFlip:true,scoreNow:/* @__PURE__ */cl({size:28,weight:800,lineHeight:28,color:"#262523"}),scoreOf:/* @__PURE__ */cl({size:13,weight:800,lineHeight:13,color:"muted"}),scoreSince:/* @__PURE__ */cl({size:12.5,weight:700,lineHeight:18.75,color:"planLink",marginTop:3}),sources:/* @__PURE__ */sl({w:131.375,h:24,gap:[4,4],color:"#262523"}),sourceDna:/* @__PURE__ */sl({w:44,h:24,padding:[0,9,0,9],radius:[999,999],bg:"planLinkWash",center:true,color:"planLink"}),sourceDnaText:/* @__PURE__ */cl({size:12,weight:700,lineHeight:18,color:"planLink"}),dotWatch:/* @__PURE__ */sl({w:9,h:9,radius:[4.5,4.5],bg:"#E5A000",color:"#4A4845",dy:-1}),dotClear:/* @__PURE__ */sl({w:9,h:9,radius:[4.5,4.5],bg:"#5FA82B",color:"#4A4845",dy:-1}),scoreLabelMax:135,says:/* @__PURE__ */sl({w:297,h:52,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysImg:/* @__PURE__ */sl({w:32,h:32,radius:[16,16],color:"#262523"}),saysText:/* @__PURE__ */cl({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845"}),saysBy:/* @__PURE__ */cl({size:14.5,weight:800,lineHeight:20.3,color:"#262523"}),saysByGap:2,saysTag:/* @__PURE__ */sl({w:51.609,h:15,padding:[2,6,2,6],radius:[5,5],bg:"surface",color:"#262523"}),saysTagText:/* @__PURE__ */cl({size:10,weight:400,lineHeight:14,color:"#262523",tracking:.6,face:"mono",upper:true,paddingTop:2}),saysBare:/* @__PURE__ */sl({w:297,h:81,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysKicker:/* @__PURE__ */cl({size:17,weight:400,lineHeight:25.5,color:"#262523"}),saysSerif:/* @__PURE__ */cl({size:17,weight:800,lineHeight:25.5,color:"#262523",tracking:-.17,wrap:"balance"}),jump:/* @__PURE__ */sl({w:297,h:60,padding:[8,14,8,8],marginTop:12,gap:[12,12],radius:[14,14],bg:"planInk",center:true,color:"planOnInk"}),jumpImg:/* @__PURE__ */sl({w:44,h:44,radius:[10,10],bg:"surface",color:"surface"}),jumpKicker:/* @__PURE__ */cl({size:13,weight:800,lineHeight:19.5,color:"planAccent"}),jumpTitle:/* @__PURE__ */cl({size:15,weight:800,lineHeight:18.75,color:"planOnInk"}),jumpGo:/* @__PURE__ */cl({size:14,weight:800,lineHeight:21,color:"planOnInk"}),jumpPressScale:.98,more:/* @__PURE__ */sl({w:87.547,h:36,marginTop:6,marginBottom:-4,gap:[4,4],minHeight:36,center:true,color:"planLink"}),moreText:/* @__PURE__ */cl({size:15,weight:800,lineHeight:22.5,color:"planLink"}),moreIcon:/* @__PURE__ */sl({w:16,h:16,color:"planLink"}),moreInset:16,moreTurn:{closed:90,open:-90},rep:/* @__PURE__ */sl({w:297,h:48.5,padding:[14,14,12,14],marginTop:10,radius:[16,16],bg:"#F8F7F4",color:"#262523"})},hl={card:/* @__PURE__ */sl({w:201.5,h:275.031,padding:[8,10,10,10],radius:[20,20],bg:"#FCF0D6"}),tones:{y:"#FCF0D6",c:"tintBlue",g:"tintGo",r:"tintPink"},img:/* @__PURE__ */sl({w:181.5,h:113.438,radius:[10,10],bg:"#F3F3F3"}),n:/* @__PURE__ */sl({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:/* @__PURE__ */cl({size:14,weight:700,lineHeight:14}),title:/* @__PURE__ */cl({size:16,weight:700,lineHeight:20,marginTop:10}),text:/* @__PURE__ */cl({size:15,weight:400,lineHeight:21,color:"#4D4D4D",marginTop:4}),foot:/* @__PURE__ */sl({w:181.5,h:26.594,padding:[8,0,0,0],gap:[4,4],center:true,color:"ink"}),footText:/* @__PURE__ */cl({size:12,weight:400,lineHeight:18.6,color:"ink",tracking:.48,face:"mono",upper:true,paddingTop:8}),footArrow:/* @__PURE__ */sl({w:14,h:14,color:"ink"}),footArrowFlip:true,pressScale:.98,bare:/* @__PURE__ */sl({w:181.5,h:42,padding:[2,0,0,0],center:true}),thumb:/* @__PURE__ */sl({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:/* @__PURE__ */sl({w:22,h:22})},gl={card:/* @__PURE__ */sl({w:221,h:152,padding:[8,8,12,8],radius:[20,20],bg:"#FCF0D6"}),tones:{y:"#FCF0D6",c:"#EEDCC8",g:"tintGo",r:"tintPink"},img:/* @__PURE__ */sl({w:205,h:102.5,radius:[10,10],bg:"#F3F3F3"}),imgAspect:2,n:/* @__PURE__ */sl({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:/* @__PURE__ */cl({size:14,weight:700,lineHeight:14}),title:/* @__PURE__ */cl({size:15,weight:700,lineHeight:19.5,marginTop:10}),titleInset:4,pressScale:.98,bare:/* @__PURE__ */sl({w:205,h:42,padding:[2,0,0,0],center:true}),thumb:/* @__PURE__ */sl({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:/* @__PURE__ */sl({w:22,h:22,color:"ink"})},fl={card:/* @__PURE__ */sl({w:226,h:172.047,gap:[10,10]}),img:/* @__PURE__ */sl({w:226,h:141.25,radius:[14,14]}),imgAspect:1.6,title:/* @__PURE__ */cl({size:16,weight:700,lineHeight:20.8,wrap:"balance"}),coverRadius:10,row:{from:440,card:/* @__PURE__ */sl({w:400,h:80,padding:[6,0,6,0],gap:[10,10],minHeight:80,center:true}),img:/* @__PURE__ */sl({w:64,h:64,radius:[10,10]}),arrowColumn:18,arrow:/* @__PURE__ */sl({w:18,h:18,color:"ink"}),arrowTurn:180},phone:{upTo:639,card:/* @__PURE__ */sl({w:216,h:162.5,gap:[8,8]}),img:/* @__PURE__ */sl({w:216,h:135,radius:[14,14]}),imgAspect:1.6,title:/* @__PURE__ */cl({size:15,weight:700,lineHeight:19.5,wrap:"balance"}),smallUpTo:359,smallW:208},mark:{tile:/* @__PURE__ */sl({w:226,h:141.25,radius:[14,14],bg:"#F5F5F5",center:true,color:"ink"}),icon:{share:.36,min:16,max:40,color:"ink"}},ring:{width:2,offset:2,color:"text"},hoverOffset:3},ml={card:/* @__PURE__ */sl({w:225.406,h:182.844,padding:[14,14,12,14],radius:[18,18],bg:"planAccentChip",color:"#262523"}),tones:{y:"planAccentChip",c:"planLinkChip",g:"#DDEFC4",r:"#FFD8D6"},top:/* @__PURE__ */sl({w:197.406,h:30,center:true,color:"#262523"}),nText:/* @__PURE__ */cl({size:30,weight:900,lineHeight:30,color:"#262523"}),icon:/* @__PURE__ */sl({w:26,h:26,color:"#262523"}),title:/* @__PURE__ */cl({size:17,weight:800,lineHeight:21.25,color:"#262523",marginTop:14}),text:/* @__PURE__ */cl({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845",marginTop:4}),foot:/* @__PURE__ */sl({w:197.406,h:25.75,padding:[10,0,0,0],color:"planLink"}),footText:/* @__PURE__ */cl({size:10.5,weight:400,lineHeight:15.75,color:"planLink",tracking:.42,face:"mono",upper:true,paddingTop:10})};function yl(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e))for(let t of Object.values(e))yl(t);return e}var bl=ol,kl=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#preset@v1");function wl(e){return Object.defineProperty(e,kl,{value:e,enumerable:true}),yl(e)}var vl={content:0,heading:2,control:1.8,compact:1.5,badge:1.3},xl=wl({name:"everfur",colors:{bg:bl.color.bg,surface:bl.color.efWhite,text:bl.color.text,ink:bl.role.color.ink,onInk:bl.color.efWhite,muted:bl.role.color.muted,line:bl.role.color.line,go:bl.role.color.go,onGo:bl.role.color.ink,pink:bl.color.efDustyPink,onPink:bl.role.color.ink,alert:bl.color.alert,alertDeep:bl.color.alertDeep,icoSage:bl.role.color.icoSage,bgMist:bl.color.bgMist,tintSage:bl.role.color.tintSage,tintBlue:bl.role.color.tintBlue,tintGo:bl.role.color.tintGo,tintPink:bl.role.color.tintPink,tintYellowEdge:bl.role.color.tintYellowEdge,tintWatch:dl.colors.watch,tintRed:bl.role.color.tintRed,scrim:dl.colors.scrim,grab:dl.colors.grab,focus:bl.role.color.ink,planInk:dl.colors.planInk,planOnInk:dl.colors.planOnInk,planAccent:dl.colors.planAccent,planLink:dl.colors.planLink,planAccentWash:dl.colors.planAccentWash,planAccentChip:dl.colors.planAccentChip,planLinkWash:dl.colors.planLinkWash,planLinkChip:dl.colors.planLinkChip},radius:{...bl.radius},space:{...bl.space},type:{family:bl.font.family.base,mono:bl.font.family.mono,faces:{regular:"Azeret-Regular",medium:"Azeret-Medium",bold:"Azeret-Bold",mono:"AzeretMono-Regular",monoBold:"AzeretMono-Bold"},namedFaces:true,size:{xs:bl.font.size.xs,sm:bl.font.size.sm,md:bl.font.size.md,lg:bl.font.size.lg,xl:bl.font.size.xl},weight:{...bl.font.weight},lineHeight:{...bl.font.lineHeight},scaleCaps:vl},motion:{duration:{press:bl.motion.duration.press,fade:bl.motion.duration.fade,enter:bl.motion.duration.enter,sheet:bl.motion.duration.sheet,sheetOut:bl.motion.duration.sheetOut},easing:{out:bl.motion.easing.out,drawer:bl.motion.easing.drawer},pop:{duration:bl.motion.duration.enter,from:.95,peakAt:.55,amplitude:.035,switchAmplitude:.06},reduced:false},metrics:dl});function Sl(e){return e[kl]??xl}function Tl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Cl(e,t){if(!Tl(e)||!Tl(t))return t===void 0?e:t;let n={...e};for(let[r,i]of Object.entries(t))i!==void 0&&(n[r]=Cl(e[r],i));return n}function resolveTheme(e,t=xl){if(!e)return t;let n=Cl(t,e),r=e.colors;if(r){let e=n.colors;for(let[t,n,i]of Il){let o=r[n];o!==void 0&&r[t]===void 0&&(e[t]=Hl(o,i,e.surface)??e[t]??o)}}return yl(n)}var Il=[["planAccentWash","planAccent",.17],["planAccentChip","planAccent",.47],["planLinkWash","planLink",.12],["planLinkChip","planLink",.2]];function Hl(e,t,n){let r=e=>{let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e??"");return t?[t[1],t[2],t[3]].map(e=>parseInt(e,16)):void 0},[i,o]=[r(e),r(n)];if(!(!i||!o))return`#${i.map((e,n)=>Math.round(e*t+(o[n]??0)*(1-t)).toString(16).padStart(2,"0")).join("").toUpperCase()}`}var Fl=/* @__PURE__ */(()=>{let e=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#ThemeContext@v1"),t=globalThis,n=t[e]??(t[e]=createContext(null));return n.displayName??(n.displayName="EverfurThemeContext"),n})();function ThemeProvider({theme:e,children:n}){let i=Bl(),o=e===void 0||Pl(e)?e:Rl(e),l=r(()=>Pl(e)?Ol(e):resolveTheme(e,i),[o,i]);return t(Fl.Provider,{value:l},n)}function Rl(e){return JSON.stringify(e,(e,t)=>Tl(t)&&!Array.isArray(t)?Object.fromEntries(Object.keys(t).sort().map(e=>[e,t[e]])):t)}function Pl(e){return e!==void 0&&Object.isFrozen(e)&&zl.every(t=>t in e)}var zl=["name","colors","radius","space","type","motion","metrics"];function Dl(e,t){if(e===void 0)return true;if(!Tl(e))return t!==void 0;if(!Tl(t))return false;for(let n of Object.keys(e))if(!Dl(e[n],t[n]))return false;return true}var $l=/* @__PURE__ */new WeakMap;function Ol(e){let t=$l.get(e);if(t)return t;if(Dl(xl,e))return $l.set(e,e),e;let n=Sl(e),r=Cl(xl,n===xl?e:Cl(n,e));r[kl]=n;let i=yl(r);return $l.set(e,i),i}function Bl(){let e=i(Fl);return e?Ol(e):xl}var _l=e=>Math.round(e*1e3)/1e3;function Ll(e,t=false){return t?e>450?"monoBold":"mono":e>500?"bold":e>450?"medium":"regular"}function El(e,t){let n=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!n)return e;let[r,i,o]=[n[1],n[2],n[3]].map(e=>parseInt(e,16));return`rgba(${r}, ${i}, ${o}, ${t})`}function Al(e){let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(t)return[t[1],t[2],t[3]].map(e=>parseInt(e,16));let n=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(e);return n?[n[1],n[2],n[3]].map(Number):void 0}function jl(e,t,n,r){let[i,o]=[Al(e),Al(n)];return!i||!o?r:`rgb(${i.map((e,n)=>Math.round(e*t+(o[n]??0)*(1-t))).join(", ")})`}function Wl(e,t){let n=/^([a-zA-Z]+)(?:\/([\d.]+))?$/.exec(t),r=n?.[1];if(!n||r===void 0||!(r in e.colors))return t;let i=e.colors[r];return n[2]===void 0?i:El(i,Number(n[2]))}function Ml(e,t){return{size:t.size,weight:t.weight,lineHeight:t.lineHeight,color:Wl(e,t.color),...t.face==="mono"?{mono:true}:{},...t.face==="serif"?{serif:true}:{},...t.tracking?{tracking:t.tracking}:{},...t.upper?{upper:true}:{},...t.deco==="none"?{}:{deco:t.deco==="strike"?"strike":"underline",decoOffset:t.decoOffset,decoThickness:t.decoThickness},...t.tabular?{tabular:true}:{},...t.wrap==="auto"?{}:{wrap:t.wrap==="balance"?"balance":"pretty"}}}function Nl(e,t){return t==="none"?void 0:Wl(e,t)}function Ul(e){let t=e.metrics.summary,n=(e,t)=>_l(e*t);return{paddingX:t.paddingX,paddingY:t.paddingY,radius:t.radius,borderWidth:t.borderWidth,borderColor:e.colors.line,background:Wl(e,t.background),shadow:t.shadow,row:{paddingY:t.rowPaddingY,minHeight:t.rowMinHeight,gapX:t.rowGapX,gapY:t.rowGapY,divider:t.rowDivider,center:t.rowCenter},totalRowMinHeight:t.totalRowMinHeight,gap:t.gap??0,totalMarginTop:t.totalMarginTop??0,tabular:t.tabular,term:{size:t.termSize,weight:e.type.weight.regular,lineHeight:n(t.termSize,t.termLineHeight),color:Wl(e,t.termColor)},value:{size:t.valueSize,weight:t.valueWeight,lineHeight:n(t.valueSize,t.valueLineHeight),color:Wl(e,t.valueColor)},totalTerm:{size:t.totalTermSize,weight:t.totalTermWeight,lineHeight:n(t.totalTermSize,t.termLineHeight),color:Wl(e,t.totalTermColor)},total:{size:t.totalSize,weight:t.totalWeight,lineHeight:n(t.totalSize,t.totalLineHeight),color:Wl(e,t.valueColor)},off:Ml(e,e.metrics.summary.off)}}function ql(e,t){let n=e.metrics.skeleton.widths;return`${n[t%n.length]}%`}function Vl(e,t,n){return n!==void 0?n:e===void 0?void 0:`${e}-${t}`}function Gl(e){return e==="warn"||e==="danger"}var Kl=e=>e,Xl=e=>"edge"in e&&"shadow"in e&&"fit"in e,Yl=e=>"deco"in e&&"face"in e&&"tabular"in e;function Jl(e){let t=/* @__PURE__ */new Map;for(let[n,r]of Object.entries(e))t.has(r)||t.set(r,n);return t}var Ql,Zl=/* @__PURE__ */new WeakMap;function ea(e,t,n){let r=e.get(n),i=r===void 0?void 0:t[r];return typeof i=="number"?i:n}function ta(e){let t=xl;return e.space===t.space&&e.radius===t.radius&&e.type.size===t.type.size&&e.type.weight===t.type.weight}function na(e,t){let n=xl;Ql??(Ql={space:Jl(Kl(n.space)),radius:Jl(Kl(n.radius)),size:Jl(Kl(n.type.size)),weight:Jl(Kl(n.type.weight))});let r=Ql,i=t=>ea(r.space,Kl(e.space),t),o=t=>ea(r.radius,Kl(e.radius),t),l=t=>Array.isArray(t)?t.map(l):t===null||typeof t!="object"?t:Xl(t)?{...t,padding:t.padding.map(i),gap:t.gap.map(i),marginTop:i(t.marginTop),marginBottom:i(t.marginBottom),radius:t.radius.map(o)}:Yl(t)?{...t,size:ea(r.size,Kl(e.type.size),t.size),weight:ea(r.weight,Kl(e.type.weight),t.weight),marginTop:i(t.marginTop),paddingTop:i(t.paddingTop)}:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,l(t)]));return l(t)}function ra(e,t){if(ta(e))return t;let n=Zl.get(t);n||Zl.set(t,n=/* @__PURE__ */new WeakMap);let r=n.get(e);if(r)return r;let i=na(e,t);return n.set(e,i),i}var ia={display:"heading",headline:"heading",title:"heading",heading:"heading",body:"content",lead:"content",label:"control",meta:"compact",caption:"content",overline:"compact",kicker:"compact"};function oa(e,t){let n=e.colors;switch(t){case"ink":return n.ink;case"text":return n.text;case"muted":return n.muted;case"danger":return n.alertDeep;case"inverse":return n.onInk;default:return}}function la(e,t,n,r){let i=Ml(e,e.metrics.text[t]),o=oa(e,n);return{...i,...o?{color:o}:{},...r?{weight:e.type.weight[r]}:{}}}var aa={display:"balance",headline:"balance",title:"balance",heading:"balance",body:"pretty",lead:"pretty",meta:"pretty",caption:"pretty",label:"auto",overline:"auto",kicker:"auto"};function sa(e,t){return e.type.variantTiers?.[t]??ia[t]}var ca=/* @__PURE__ */(()=>{let e=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#ReducedMotionContext@v1"),t=globalThis,n=t[e]??(t[e]=createContext(null));return n.displayName??(n.displayName="EverfurReducedMotionContext"),n})();function da(){return i(ca)}function ua(e,t){let n=Ll(t.weight,t.mono===true);return{fontFamily:t.serif?e.type.faces.serif??e.type.faces.bold:e.type.faces[n],...e.type.namedFaces?{}:{fontWeight:String(t.weight)},fontSize:t.size,lineHeight:t.lineHeight,color:t.color,...t.tracking?{letterSpacing:t.tracking}:{},...t.upper?{textTransform:"uppercase"}:{},...t.deco?pa(t):{},...t.tabular?{fontVariant:["tabular-nums"]}:{},...t.wrap&&x.OS==="web"?{textWrap:t.wrap}:{}}}function pa(e){let t={textDecorationLine:e.deco==="strike"?"line-through":"underline"};return x.OS!=="web"?t:{...t,...e.decoOffset?{textUnderlineOffset:e.decoOffset}:{},...e.decoThickness?{textDecorationThickness:e.decoThickness}:{}}}function ha(e,t){let[n=0,r=0,i=0,o=0]=t.padding,[l=0,a=0]=t.radius,s=Nl(e,t.bg);return{paddingTop:n,paddingRight:r,paddingBottom:i,paddingLeft:o,...t.marginTop?{marginTop:t.marginTop}:{},...t.gap[0]?{columnGap:t.gap[0]}:{},...t.gap[1]?{rowGap:t.gap[1]}:{},...l===a?l?{borderRadius:l}:{}:{borderTopLeftRadius:l,borderTopRightRadius:l,borderBottomLeftRadius:a,borderBottomRightRadius:a},...s?{backgroundColor:s}:{},...t.edge.width>0&&!t.edge.ring?{borderWidth:t.edge.width,borderColor:Wl(e,t.edge.color)}:{},...t.minHeight?{minHeight:t.minHeight}:{},...ba(t.shadow)}}function ga(){if(x.OS!=="web")return false;let e=globalThis;return typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)").matches}function fa(e){let[t,r]=n(()=>e===null&&ga());return o(()=>{if(e!==null)return;let t=true,n=H?.isReduceMotionEnabled;if(typeof n=="function"){let e=n.call(H);e!=null&&typeof e.then=="function"&&e.then(e=>{t&&r(e===true)},()=>{})}let i=H?.addEventListener?.("reduceMotionChanged",e=>r(e===true));return()=>{t=false,i?.remove?.()}},[e]),e??t}function ma(e){let t=fa(da());return e.motion.reduced||t}function ya(e){let t=Math.max(0,Math.ceil((44-e)/2));return t===0?void 0:{top:t,bottom:t,left:t,right:t}}function ba(e){return e.blur===0&&e.y===0&&e.x===0?null:{shadowColor:e.color,shadowOffset:{width:e.x,height:e.y},shadowOpacity:1,shadowRadius:e.blur,elevation:1}}function ka(e){return Math.round(e*100)/100}function wa(e,t){let n=Number(t.weight),r=t.letterSpacing??0;return{...ua(e,{size:t.size,weight:n,lineHeight:ka(t.size*t.lineHeight),color:e.colors.text,tracking:r?ka(t.size*r):0,mono:t.face==="mono",upper:t.uppercase===true}),flexShrink:1}}function va(e){return e==="auto"?null:x.OS==="ios"?{lineBreakStrategyIOS:"push-out"}:x.OS==="android"&&e==="balance"?{textBreakStrategy:"balanced"}:null}function xa(e,t){let n=e.type.weight[t];return e.type.namedFaces?{fontFamily:e.type.faces[Ll(n)]}:{fontWeight:String(n)}}function Text2({tier:e,variant:n,tone:r,weight:i,level:o,lineBreak:l,typeRole:a,...s}){let c=Bl();if(a){let n=c.type.scaleCaps[e??a.tier??"content"],r=l?va(l):null;return t(T,{...n>0?{maxFontSizeMultiplier:n}:{},...r,...s,style:[wa(c,a),s.style]})}let d=c.type.scaleCaps[e??(n?sa(c,n):"content")],u=va(l??(n?aa[n]:"auto"));if(n===void 0&&r===void 0&&i===void 0&&o===void 0)return u?t(T,{...d>0?{maxFontSizeMultiplier:d}:{},...u,...s}):t(T,d>0?{maxFontSizeMultiplier:d,...s}:s);let p=oa(c,r),h=n?ua(c,la(c,n,r,i)):{...p?{color:p}:{},...i?xa(c,i):{}},g=o===void 0?{}:{accessibilityRole:"header",...x.OS==="web"?{"aria-level":o}:{}};return t(T,{...d>0?{maxFontSizeMultiplier:d}:{},...u,...g,...s,style:[h,s.style]})}var Sa=24,Ta=16,Ca=.8,Ia=e=>Math.round(e*Ta);function Ha(e,t,n,r,i,o){let l=e-n/2,a=t-r/2,s=Math.round(l),c=Math.round(a);return{position:"absolute",left:s,top:c,width:n,height:r,transform:[{translateX:l-s},{translateY:a-c},{rotate:`${Math.atan2(o,i)*180/Math.PI}deg`},{scale:1/Ta}]}}function Fa(e,t,n){for(let r of e.strokes){let e=r.width*t,i=r.points,o=i.length/2,l=r.closed?o:o-1;for(let a=0;a<l;a+=1){let l=(a+1)%o,s=(i[a*2]??0)*t,c=(i[a*2+1]??0)*t,d=(i[l*2]??0)*t-s,u=(i[l*2+1]??0)*t-c,p=Math.hypot(d,u);if(p===0&&!(o===2&&r.cap))continue;let h=p===0?1:d/p,g=p===0?0:u/p,f=r.closed||a>0||r.cap?e/2:0,m=r.closed||l!==o-1||r.cap?e/2:0,y=(p+m-f)/2;n.push({paint:"backgroundColor",style:{...Ha(s+h*y,c+g*y,Ia(p+f+m),Ia(e),h,g),borderTopLeftRadius:f>0?Ia(e)/2:0,borderBottomLeftRadius:f>0?Ia(e)/2:0,borderTopRightRadius:m>0?Ia(e)/2:0,borderBottomRightRadius:m>0?Ia(e)/2:0,...r.opacity===void 0?{}:{opacity:r.opacity}}})}}}function Ra(e,t,n){for(let r of e.boxes){let e=(r.w+r.width)*t,i=(r.h+r.width)*t;n.push({paint:"borderColor",style:{...Ha((r.x-r.width/2)*t+e/2,(r.y-r.width/2)*t+i/2,Ia(e),Ia(i),1,0),borderWidth:Ia(r.width*t),borderRadius:(r.radius+r.width/2)*t*Ta,...r.opacity===void 0?{}:{opacity:r.opacity}}})}}function Pa(e,t,n){for(let r of e.triangles){let e=[0,1,2].map(e=>[(r[e*2]??0)*t,(r[e*2+1]??0)*t]),i=0,o=-1;for(let t=0;t<3;t+=1){let n=e[t]??[0,0],r=e[(t+1)%3]??[0,0],l=Math.hypot(r[0]-n[0],r[1]-n[1]);l>o&&(o=l,i=t)}if(o<=0)continue;let l=e[i]??[0,0],a=e[(i+1)%3]??[0,0],s=e[(i+2)%3]??[0,0],c=(a[0]-l[0])/o,d=(a[1]-l[1])/o,u=(s[0]-l[0])*c+(s[1]-l[1])*d,p=(s[0]-l[0])*-d+(s[1]-l[1])*c,h=Math.abs(p),g=p<0,f=g?-h/2:h/2,m=Ia(u),y=Ia(o)-m,b=Ia(h);n.push({paint:g?"borderBottomColor":"borderTopColor",style:{...Ha(l[0]+c*(o/2)-d*f,l[1]+d*(o/2)+c*f,m+y,b,c,d),width:0,height:0,borderLeftWidth:m,borderRightWidth:y,borderLeftColor:"transparent",borderRightColor:"transparent",...g?{borderBottomWidth:b}:{borderTopWidth:b}}})}for(let r of e.seams){let e=(r[0]??0)*t,i=(r[1]??0)*t,o=(r[2]??0)*t-e,l=(r[3]??0)*t-i,a=Math.hypot(o,l),s=Ca*(r[4]??0),c=Ca*(r[5]??0),d=a-s-c;if(a===0||d<=0)continue;let u=s+d/2;n.push({paint:"backgroundColor",style:Ha(e+o/a*u,i+l/a*u,Ia(d),Ia(Ca),o/a,l/a)})}}var za=/* @__PURE__ */new WeakMap;function Da(e,t){let n=za.get(e);n===void 0&&(n=/* @__PURE__ */new Map,za.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i=[],o=t/Sa;return Ra(e,o,i),Fa(e,o,i),Pa(e,o,i),n.set(t,i),i}function Glyph({icon:e,size:t,color:n,label:r,testID:i,style:o}){let l=Bl(),a=t??l.metrics.icon.size,s=n??l.colors.ink;/* @__PURE__ */
|
|
36
|
-
return
|
|
37
|
-
return
|
|
38
|
-
return
|
|
39
|
-
return
|
|
40
|
-
return
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
return
|
|
44
|
-
return
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
return
|
|
48
|
-
return
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
return
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
return
|
|
62
|
-
return
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
return
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
return
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */R(f,{testID:G("cover"),onPress:p,onPressIn:()=>B(true),onPressOut:()=>B(false),accessibilityRole:"button",accessibilityLabel:m??r,style:{position:"absolute",top:0,right:0,bottom:0,left:0}})]}):V?/* @__PURE__ */R(f,{testID:w,onPress:p,accessibilityRole:"button",accessibilityLabel:m??r,style:({pressed:e})=>[...j,e&&!S&&M!==1?{transform:[{scale:M}]}:null],children:ie}):/* @__PURE__ */R(g,{testID:w,style:j,children:ie})}var es=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),ts=/* @__PURE__ */new WeakMap;function ns(e){let t=ts.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",i=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...es},o=(e,t)=>Eo(e,t,zo(t),rs),l=(e,t)=>contrastRatio(e,t)>=rs?e:Po(t,rs),a=[i.card,i.paper].map(e=>_o(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:l(n.onPrimary,n.primary),accent:n.accent,onAccent:l(n.onAccent,n.accent),link:o(n.linkInk,[i.card,i.paper,i.tile]),badge:n.brandSoft,onBadge:o(n.brandInk,a)},c=/* @__PURE__ */Object.freeze({...i,...s});return ts.set(e,c),c}var rs=4.5;var is="#DAD7D1";function os(e,t=false){let n=t=>e.roles[t]??t,r=t=>e.dark?n("line"):t,i=(e,t={})=>({bg:e,...t}),o=e=>({color:e}),l={color:"",x:0,y:0,blur:0,spread:0},a=Object.fromEntries(Object.entries({planInk:"primary",planOnInk:"onPrimary",planAccent:"accent",planLink:"link",planAccentWash:"accent4",planAccentChip:"accentChip",planLinkWash:"linkWash",planLinkChip:"linkChip"}).flatMap(([t,n])=>e.roles[n]===void 0?[]:[[t,e.roles[n]]]));return{colors:{bg:n("paper"),surface:n("card"),text:n("black"),ink:n(t?"ink":"primary"),onInk:n("onPrimary"),muted:n("ink3"),line:n("line"),scrim:n("scrim"),grab:r(is),focus:n("ink"),...a},type:e.type,motion:{reduced:e.reduced},metrics:{variants:{drawer:{frame:i(n("card"),{color:n("ink")}),grab:i(r(is)),kicker:o(n("ink3")),close:{color:n("ink")},title:{color:n("ink"),wrap:"auto"},text:o(n("black")),scrim:n("scrim")},segmented:{track:i(n("card"),{edge:{color:r(is)}}),label:o(n("ink")),chosen:i(n("primary")),chosenLabel:o(n("onPrimary"))},stepper:{track:i(n("card"),{edge:{color:r(is)}}),button:{color:n("ink")},value:o(n("ink"))},summary:{box:i(n("card"),e.dark?{shadow:l}:{}),term:o(n("ink2")),value:o(n("ink")),totalTerm:o(n("ink")),total:o(n("ink")),renewTerm:o(n("ink2")),renew:o(n("ink")),inset:i(n("paper"))},toast:{box:i(n("ink")),text:o(n("onInk"))},focus:{color:n("ink")}}}}}var ls=/* @__PURE__ */new WeakMap;function as(e,t,n,r=false){let i=ls.get(t);i===void 0&&(i={fill:/* @__PURE__ */new WeakMap,outline:/* @__PURE__ */new WeakMap},ls.set(t,i));let o=i[r?"outline":"fill"],l=o.get(e);return l===void 0&&(l=resolveTheme(os(n(),r),t),o.set(e,l)),l}var ss=e=>{let t=e.type.namedFaces,n=t=>face(e,t).fontFamily;return{family:n("regular"),mono:n("mono"),faces:{regular:n("regular"),medium:n("medium"),bold:n("bold"),mono:n("mono"),monoBold:n("monoBold"),serif:headingFace(e,"bold").fontFamily},namedFaces:t.regular&&t.medium&&t.bold}},cs=/* @__PURE__ */new WeakMap;function ds(e,t,n=xl){if(n!==xl)return us(e,t,n);let r=cs.get(t);r===void 0&&cs.set(t,r=/* @__PURE__ */new WeakMap);let i=r.get(e);return i===void 0&&r.set(e,i=us(e,t,n)),i}function us(e,t,n){let r=e.color,i=ro.color,o=e.brightness==="dark",l=o?oo:ro,a=e=>r[e]!==i[e],s={};if(a("primary")?(Object.assign(s,{ink:r.primary,onInk:r.onPrimary,focus:r.primary}),a("accent")||Object.assign(s,{go:r.primary,onGo:r.onPrimary})):a("onPrimary")&&(s.onInk=r.onPrimary),a("accent")&&Object.assign(s,{go:r.accent,onGo:r.onAccent}),a("brandSoft")&&(s.tintSage=r.brandSoft),a("danger")&&Object.assign(s,{alert:r.danger,alertDeep:r.danger}),o)Object.assign(s,{bg:r.background,surface:r.surface,text:r.text.primary,muted:r.text.muted,line:r.borderRingCream});else{let e=l.color;r.background!==e.background&&(s.bg=r.background),r.surface!==e.surface&&(s.surface=r.surface),r.text.primary!==e.text.primary&&(s.text=r.text.primary),r.text.muted!==e.text.muted&&(s.muted=r.text.muted)}let c={};Object.keys(s).length>0&&(c.colors={...s});let d=e.radius,u=l.radius;if(d.xs!==u.xs||d.sm!==u.sm||d.lg!==u.lg||d.xl!==u.xl||d.pill!==u.pill){let e={};d.xs!==u.xs&&(e.sm=d.xs),d.sm!==u.sm&&(e.md=d.sm),d.lg!==u.lg&&(e.lg=d.lg),d.xl!==u.xl&&(e.xl=d.xl),d.pill!==u.pill&&(e.pill=d.pill),c.radius=e,(d.lg!==u.lg||d.xl!==u.xl)&&(c.metrics={...d.lg!==u.lg?{card:{radius:d.lg},summary:{radius:d.lg}}:{},...d.xl!==u.xl?{sheet:{radius:d.xl}}:{}})}if(e.space.xs!==l.space.xs){let t=e.space.xs/l.space.xs,r=n.space,i=e=>Math.round(e*t);c.space={1:i(r[1]),2:i(r[2]),3:i(r[3]),4:i(r[4]),5:i(r[5]),6:i(r[6]),7:i(r[7]),8:i(r[8]),9:i(r[9])}}let p=e.type.size,h=l.type.size,g=p.caption!==h.caption||p.bodyTight!==h.bodyTight||p.body!==h.body||p.subtitle!==h.subtitle||p.verdict!==h.verdict,f=e.type.lineHeight,m=l.type.lineHeight,y=f.relaxed!==m.relaxed||f.tight!==m.tight,b=e.type.scaleCaps,k=l.type.scaleCaps,w=b.content!==k.content||b.heading!==k.heading||b.control!==k.control||b.compact!==k.compact||b.badge!==k.badge,v=g||y||w;c.type={...g?{size:{xs:p.caption,sm:p.bodyTight,md:p.body,lg:p.subtitle,xl:p.verdict}}:{},...y?{lineHeight:{body:f.relaxed,display:f.tight}}:{},...w?{scaleCaps:{content:b.content,heading:b.heading,control:b.control,compact:b.compact,badge:b.badge}}:{},...t(e)},e.motion.reducedMotion&&!n.motion.reduced&&(c.motion={reduced:true});let x=v||Object.keys(s).length>0||Object.keys(c).some(e=>e!=="type"&&e!=="colors")||e.type.families.regular!==ro.type.families.regular,S=gs(e,l,s.surface??n.colors.surface),T=Object.entries(S).filter(([e,t])=>t!==n.colors[e]);return T.length>0&&(c.colors={...s,...Object.fromEntries(T)}),x?{name:"partner",...c}:c}var ps={planAccent:xl.colors.planAccent,planLink:xl.colors.planLink},hs={planAccentWash:["accent",.17],planAccentChip:["accent",.47],planLinkWash:["link",.12],planLinkChip:["link",.2]};function gs(e,t,n){let r=ns(e),i=ns(t),o=e.color,l={};(o.primary!==t.color.primary||o.onPrimary!==t.color.onPrimary)&&Object.assign(l,{planInk:o.primary,planOnInk:r.onPrimary}),o.accent!==t.color.accent&&(l.planAccent=o.accent),r.link!==i.link&&(l.planLink=r.link);let a={accent:l.planAccent??ps.planAccent,link:l.planLink??ps.planLink},s={planLinkWash:r.dark?void 0:e.slots.planWash?.backgroundColor,planLinkChip:r.dark?void 0:e.slots.planChip?.backgroundColor},c=n.toLowerCase()!==r.card.toLowerCase();for(let[e,[t,n]]of Object.entries(hs)){let i=s[e];i!==void 0?l[e]=i:c&&(l[e]=jl(a[t],n,r.card,r.card))}return l}function fs(e){let t=useEverfurTheme();return r(()=>ds(t,e),[t,e])}function ms(e,t){return as(e,xl,()=>({roles:t,dark:ns(e).dark,type:{...ss(e),scaleCaps:e.type.scaleCaps},reduced:e.motion.reducedMotion}))}function PlanDs(e){return t(ThemeProvider,{theme:e.theme},e.children)}var ys=/* @__PURE__ */Object.freeze({root:{backgroundColor:"$paper",color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:28,paddingLeft:16,paddingRight:16,paddingTop:16},pageFine:{color:"$ink3",fontFamily:"sans",fontSize:12.5,lineHeight:18.13,marginBottom:0,marginLeft:0,marginRight:0,marginTop:16,textAlign:"center"},tools:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:8,justifyContent:"space-between",lineHeight:25.5,marginBottom:2,marginLeft:2,marginRight:-6,marginTop:-8},toolsEyebrow:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.77,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},toolsEnd:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5},orders:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:6,lineHeight:22.5,minHeight:44,paddingBottom:0,paddingLeft:8,paddingRight:8,paddingTop:0},ordersIcon:{height:21,width:21},cart:{alignItems:"center",backgroundColor:"transparent",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,height:44,justifyContent:"center",lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,position:"relative",width:44},cartIcon:{height:26,width:26},cartCount:{backgroundColor:"$riskDot",borderRadius:999,color:"$card",fontFamily:"sans",fontSize:12,fontVariant:["tabular-nums"],fontWeight:"800",height:20,lineHeight:20,minWidth:20,paddingBottom:0,paddingLeft:5,paddingRight:5,paddingTop:0,position:"absolute",right:1,ring:[{width:2,color:"$paper"}],textAlign:"center",top:3},head:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:["fr",56],lineHeight:25.5,paddingBottom:0,paddingLeft:2,paddingRight:2,paddingTop:2},eyebrow:{color:"$ink2",fontFamily:"mono",fontSize:15,letterSpacing:1.05,lineHeight:22.5,marginBottom:6,marginLeft:0,marginRight:0,marginTop:6,textTransform:"uppercase"},title:{color:"$ink",fontFamily:"serif",fontSize:29,fontWeight:"800",letterSpacing:-.29,lineHeight:30.74,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},subtitle:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6},headImage:{backgroundColor:"$tile",borderRadius:28,height:56,ring:[{width:3,color:"$paper"},{width:5.5,color:"$accent"}],width:56},by:{alignItems:"center",backgroundColor:"$card",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[40,"fr",22],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:10,paddingLeft:12,paddingRight:12,paddingTop:10,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},byImage:{backgroundColor:"$tile",borderRadius:20,height:40,width:40},byName:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:18.75},byRole:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.53,lineHeight:15.75,marginTop:2,textTransform:"uppercase"},byOk:{color:"$link",height:22,width:22},byIcon:{alignItems:"center",backgroundColor:"$tile",borderRadius:20,color:"$ink",height:40,justifyContent:"center",width:40},byIconSvg:{height:20,width:20},need:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},needKicker:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"800",gap:8,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},sources:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"800",gap:4,lineHeight:22.5,marginLeft:"auto"},source:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$tile",borderRadius:999,color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:12,fontWeight:"700",height:24,lineHeight:18,paddingBottom:0,paddingLeft:9,paddingRight:9,paddingTop:0},sourceDna:{backgroundColor:"$linkWash",color:"$link"},needTitle:{color:"$ink",fontFamily:"sans",fontSize:19,fontWeight:"800",lineHeight:23.18,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12},needRisk:{alignItems:"baseline",color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:15,gap:9,grid:[9,"fr"],lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6},needRiskLead:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:21.75},dot:{alignSelf:"flex-start",borderRadius:4.5,flexGrow:0,flexShrink:0,height:9,width:9},dotRisk:{backgroundColor:"$riskDot"},odds:{alignItems:"center",backgroundColor:"$accent4",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,marginTop:12,paddingBottom:10,paddingLeft:14,paddingRight:14,paddingTop:10},oddsKicker:{color:"$ink2",fontFamily:"sans",fontSize:13.5,fontWeight:"600",lineHeight:18.23,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:135},oddsTag:{alignSelf:"flex-start",backgroundColor:"$card",borderRadius:5,color:"$ink",fontFamily:"mono",fontSize:10,fontWeight:"600",letterSpacing:.6,lineHeight:13.5,marginTop:3,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},oddsNumbers:{alignItems:"center",color:"$ink",columnGap:6,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:["auto","auto","auto"],justifyItems:"flex-end",lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,rowGap:0},oddsFrom:{color:"$ink3",fontFamily:"sans",fontSize:17,fontWeight:"700",lineHeight:25.5,textDecorationLine:"line-through"},oddsIcon:{color:"$ink3",height:16,width:16},oddsTo:{color:"$ink",fontFamily:"serif",fontSize:28,fontWeight:"800",lineHeight:28},oddsLabel:{color:"$link",fontFamily:"sans",fontSize:12.5,fontWeight:"700",lineHeight:18.75,marginTop:3},says:{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[32,"fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14},saysImage:{borderRadius:16,height:32,width:32},saysText:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},saysBy:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontWeight:"800",lineHeight:20.3,marginRight:2},saysSerif:{color:"$ink",fontFamily:"serif",fontSize:17,fontWeight:"800",letterSpacing:-.17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},saysKicker:{alignItems:"center",color:"$ink3",flexDirection:"row",fontFamily:"mono",fontSize:10.5,justifyContent:"space-between",letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},saysQuote:{color:"$ink",fontFamily:"serif",fontSize:17,fontWeight:"800",letterSpacing:-.17,lineHeight:23.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8},tag:{backgroundColor:"$card",borderRadius:5,color:"$ink",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:14,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},jump:{alignItems:"center",backgroundColor:"$primary",borderRadius:14,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[44,"fr","auto"],lineHeight:25.5,marginTop:12,paddingBottom:8,paddingLeft:8,paddingRight:14,paddingTop:8,textAlign:"left",width:"100%"},jumpNoImage:{grid:["fr","auto"]},jumpImage:{backgroundColor:"$card",borderRadius:10,height:44,width:44},jumpSmall:{color:"$accent",fontFamily:"sans",fontSize:13,fontWeight:"800",lineHeight:19.5,textAlign:"left"},jumpStrong:{color:"$onPrimary",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:18.75,textAlign:"left"},jumpGo:{color:"$onPrimary",fontFamily:"sans",fontSize:14,fontWeight:"800",lineHeight:21,textAlign:"left"},steps:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:12,paddingLeft:12,paddingRight:12,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},stepsHead:{alignItems:"baseline",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,paddingBottom:0,paddingLeft:4,paddingRight:4,paddingTop:0},stepsTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:19,fontWeight:"800",gap:10,lineHeight:22.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},stepsLabel:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.55,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},n:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:12.5,fontWeight:"800",height:24,justifyContent:"center",lineHeight:15,width:24},tips:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:-12,marginRight:-12,marginTop:10,paddingBottom:2,paddingLeft:12,paddingRight:12,paddingTop:0},tip:{borderRadius:18,color:"$ink",flexBasis:"78%",flexDirection:"column",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,maxWidth:280,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:14},tipY:{backgroundColor:"$accentChip"},tipC:{backgroundColor:"$linkChip"},tipG:{backgroundColor:"$clearChip"},tipR:{backgroundColor:"$riskChip"},tipTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,justifyContent:"space-between",lineHeight:25.5},tipIcon:{color:"$ink",height:26,width:26},tipN:{color:"$ink",fontFamily:"serif",fontSize:30,fontWeight:"900",lineHeight:30},tipStrong:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:21.25,marginTop:14},tipSmall:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginTop:4},tipEm:{color:"$link",fontFamily:"mono",fontSize:10.5,fontStyle:"normal",letterSpacing:.42,lineHeight:15.75,marginTop:"auto",paddingTop:10,textTransform:"uppercase"},tipList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},tipRow:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[28,"fr"],lineHeight:25.5,paddingBottom:10,paddingLeft:6,paddingRight:6,paddingTop:10},tipRowN:{alignItems:"center",backgroundColor:"$accent4",borderRadius:8,color:"$ink",fontFamily:"serif",fontSize:16,fontWeight:"800",height:28,justifyContent:"center",lineHeight:16,width:28},tipRowStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20,marginTop:3},tipRowSmall:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginTop:3},tipRowEm:{color:"$link",fontFamily:"mono",fontSize:10.5,fontStyle:"normal",letterSpacing:.42,lineHeight:15.75,marginTop:5,textTransform:"uppercase"},sec:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},secTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:19,fontWeight:"800",gap:10,lineHeight:22.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},secN:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:12.5,fontWeight:"800",height:24,justifyContent:"center",lineHeight:15,width:24},pick:{backgroundColor:"transparent",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},pickTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[76,"fr"],lineHeight:25.5},pickImage:{backgroundColor:"$paper",borderRadius:14,height:76,overflow:"hidden",width:76},pickTitle:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:20.4,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},stars:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:13.5,fontWeight:"800",gap:4,lineHeight:20.25,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},starsIcon:{color:"$watchDot",height:14,width:14},starsLabel:{color:"$ink3",fontFamily:"sans",fontSize:13.5,fontWeight:"500",lineHeight:20.25},pickLine:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginBottom:0,marginLeft:0,marginRight:0,marginTop:3},reviews:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:-16,marginRight:-16,marginTop:12,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0},review:{backgroundColor:"$paper",borderRadius:14,color:"$ink",flexBasis:"78%",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:280,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},reviewsStack:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:12},reviewCard:{backgroundColor:"$paper",borderRadius:14,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},reviewStars:{color:"$watchDot",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:1,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},reviewStar:{height:13,width:13},reviewText:{color:"$ink",fontFamily:"sans",fontSize:15,lineHeight:21,marginBottom:0,marginLeft:0,marginRight:0,marginTop:5},reviewBy:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:19.5,marginTop:4},why:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$ink"},lineHeight:25.5,marginTop:14,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},whyMini:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},whyList:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},whyRow:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[58,"fr"],lineHeight:25.5,marginTop:10},whyStrong:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:19.5},whySmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:1},chip:{alignItems:"center",borderRadius:6,color:"$ink",fontFamily:"mono",fontSize:10.5,fontWeight:"700",height:22,justifyContent:"center",letterSpacing:.42,lineHeight:15.75,textTransform:"uppercase"},chipDna:{backgroundColor:"$linkWash",color:"$link"},chipAsk:{backgroundColor:"$accent4",color:"$ink"},chipRec:{backgroundColor:"$tile",color:"$ink2"},score:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"800",gap:8,justifyContent:"space-between",lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:11,paddingLeft:14,paddingRight:12,paddingTop:11},scoreValue:{color:"$accent",flexGrow:0,flexShrink:0,fontFamily:"mono",fontSize:16,fontWeight:"700",lineHeight:20.8},dose:{backgroundColor:"$linkWash",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:10,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:12},doseMini:{color:"$link",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},doseList:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:8,grid:["fr","fr","fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},doseItem:{alignItems:"center",backgroundColor:"$card",borderRadius:12,color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,paddingBottom:10,paddingLeft:4,paddingRight:4,paddingTop:10,textAlign:"center"},doseValue:{color:"$ink",fontFamily:"mono",fontSize:21,fontVariant:["tabular-nums"],fontWeight:"700",lineHeight:23.1,textAlign:"center"},doseLabel:{color:"$ink2",fontFamily:"sans",fontSize:12.5,lineHeight:16.25,textAlign:"center"},doseNote:{color:"$link",fontFamily:"sans",fontSize:14,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10},ingredients:{color:"$ink",flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12},ingredient:{backgroundColor:"$tile",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:13.5,fontWeight:"600",lineHeight:20.25,paddingBottom:6,paddingLeft:10,paddingRight:10,paddingTop:6},opts:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:14},opt:{alignItems:"center",backgroundColor:"$card",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,inner:{width:1.5,color:"$n_DEDCD7"},justifyContent:"space-between",lineHeight:25.5,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14,textAlign:"left",width:"100%"},optOn:{inner:{width:2.5,color:"$ink"}},optOnce:{backgroundColor:"$paper",inner:null,paddingBottom:10,paddingLeft:14,paddingRight:14,paddingTop:10,shadow:null},optOnceOn:{backgroundColor:"$card",inner:{width:2,color:"$ink"}},optText:{alignItems:"flex-start",color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,textAlign:"left"},optStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24,textAlign:"left"},optOnceStrong:{fontSize:15,fontWeight:"700",lineHeight:22.5},optSmall:{color:"$ink2",fontFamily:"sans",fontSize:13.5,lineHeight:20.25,textAlign:"left"},optOnceSmall:{fontSize:13,lineHeight:19.5},optTag:{backgroundColor:"$riskInk",borderRadius:6,color:"$card",fontFamily:"sans",fontSize:12,fontWeight:"800",lineHeight:18,marginBottom:4,paddingBottom:2,paddingLeft:8,paddingRight:8,paddingTop:2,textAlign:"left"},price:{alignItems:"flex-end",color:"$ink",columnGap:8,flexDirection:"column",flexWrap:"nowrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,minWidth:0,rowGap:0,textAlign:"left"},priceValue:{color:"$ink",fontFamily:"sans",fontSize:24,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:26.4,textAlign:"left"},priceWas:{color:"$riskInk",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,textAlign:"left",textDecorationLine:"line-through"},optPrice:{color:"$ink",fontFamily:"sans",fontSize:18,fontWeight:"800",lineHeight:27,textAlign:"left"},optOncePrice:{color:"$ink2",fontSize:15,fontWeight:"700",lineHeight:22.5},buy:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,marginTop:12},button:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:25.5,minHeight:52,paddingBottom:0,paddingLeft:20,paddingRight:20,paddingTop:0,textDecorationLine:"none",width:"100%"},buttonDisabled:{opacity:.32},proof:{alignItems:"center",color:"$riskInk",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"800",gap:6,justifyContent:"center",lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10},proofIcon:{flexGrow:0,flexShrink:0,height:21,marginTop:-2,width:21},trust:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:6,grid:["fr","fr","fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},trustItem:{alignItems:"center",color:"$ink2",fontFamily:"sans",fontSize:12.5,fontWeight:"600",gap:4,lineHeight:16.25,textAlign:"center"},trustIcon:{color:"$link",height:20,width:20},on:{alignItems:"center",backgroundColor:"$clearBg",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[34,"fr","auto"],lineHeight:25.5,marginTop:12,paddingBottom:10,paddingLeft:12,paddingRight:10,paddingTop:10},onIcon:{alignItems:"center",backgroundColor:"$clearDot",borderRadius:17,color:"$card",fontFamily:"sans",fontSize:17,height:34,justifyContent:"center",lineHeight:25.5,width:34},onIconSvg:{height:18,width:18},onStrong:{color:"$clearInk",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:18.75},onSmall:{color:"$ink2",fontFamily:"sans",fontSize:13,lineHeight:17.55,marginTop:1},onButton:{backgroundColor:"$card",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"800",inner:{width:1.5,color:"$ink"},lineHeight:21,minHeight:38,paddingBottom:0,paddingLeft:14,paddingRight:14,paddingTop:0},more:{color:"$ink",columnGap:18,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8,rowGap:0},moreButton:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,minHeight:34,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},fine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8},others:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},sign:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$n_DEDCD7"},lineHeight:25.5,marginTop:12,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14},signUrgent:{backgroundColor:"$riskBg",inner:null,shadow:null},signTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"800",gap:8,lineHeight:20,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},signUrgentTitle:{color:"$riskInk"},signUrgentIcon:{height:20,width:20},signBody:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:4},signUrgentBody:{color:"$ink"},questionsKicker:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20,marginBottom:0,marginLeft:0,marginRight:0,marginTop:18},questions:{color:"$ink",fontFamily:"sans",fontSize:15,gap:6,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,paddingLeft:22},questionsAfterKicker:{marginTop:6},add:{alignItems:"center",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"800",inner:{width:2,color:"$ink"},justifyContent:"center",lineHeight:24,marginTop:14,minHeight:48,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0,width:"100%"},addOn:{backgroundColor:"$clearBg",color:"$clearInk",inner:null,shadow:null},askRow:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[40,"fr",18],lineHeight:25.5,marginTop:10,paddingBottom:12,paddingLeft:12,paddingRight:14,paddingTop:12,textAlign:"left",width:"100%"},askRowInSec:{marginTop:12},askRowIcon:{alignItems:"center",backgroundColor:"$card",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,textAlign:"left",width:40},askRowIconSvg:{height:21,width:21},askRowStrong:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:20.15,textAlign:"left"},askRowSmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:1,textAlign:"left"},askRowChev:{color:"$ink2",height:18,width:18},extras:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginTop:22},extrasTitle:{color:"$ink3",fontFamily:"mono",fontSize:11,fontWeight:"400",letterSpacing:.77,lineHeight:12.65,marginBottom:0,marginLeft:4,marginRight:4,marginTop:0,textTransform:"uppercase"},extra:{alignItems:"flex-start",backgroundColor:"$card",borderRadius:22,color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[56,"fr"],lineHeight:25.5,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14,rowGap:4,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},extraKit:{backgroundColor:"$linkWash",inner:null,shadow:null},extraImage:{backgroundColor:"$card",borderRadius:14,height:56,width:56},extraKitImage:{backgroundColor:"$card"},extraIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:14,color:"$link",height:56,justifyContent:"center",width:56},extraIconSvg:{height:26,width:26},extraTitle:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:20.4,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},extraTitleSerif:{fontFamily:"serif",fontSize:21,fontWeight:"800",letterSpacing:-.21,lineHeight:25.2},extraBody:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:3},extraPrice:{alignItems:"center",color:"$ink",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,rowGap:0},extraPriceValue:{color:"$ink",fontFamily:"sans",fontSize:19,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:26.6},extraPriceWas:{color:"$ink3",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:19.6,textDecorationLine:"line-through"},extraGo:{backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",fontFamily:"sans",fontSize:14.5,fontWeight:"800",lineHeight:21.75,marginTop:8,minHeight:40,paddingBottom:0,paddingLeft:18,paddingRight:18,paddingTop:0},extraGoOn:{backgroundColor:"$clearBg",color:"$clearInk"},wait:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},waitTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[46,"fr"],lineHeight:25.5},waitTile:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:13,color:"$link",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:22,height:46,justifyContent:"center",lineHeight:33,width:46},waitTileSvg:{height:23,width:23},waitMini:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},waitTitle:{color:"$ink",fontFamily:"serif",fontSize:26,fontWeight:"800",letterSpacing:-.26,lineHeight:27.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},waitKey:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:18},waitText:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15.5,fontWeight:"700",gap:8,lineHeight:23.25,marginBottom:12,marginLeft:0,marginRight:0,marginTop:16},waitTextSvg:{color:"$link",flexGrow:0,flexShrink:0,height:20,width:20},waitButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textDecorationLine:"none",width:"100%"},track:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},trackStep:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[22,"fr"],lineHeight:25.5,paddingBottom:16,position:"relative"},trackStepLast:{paddingBottom:0},trackLine:{backgroundColor:"$n_E2DFD9",borderRadius:1,bottom:-2,left:10,position:"absolute",top:20,width:2},trackLineDone:{backgroundColor:"$primary"},trackDot:{alignItems:"center",backgroundColor:"$card",borderRadius:11,height:22,inner:{width:2,color:"$n_CFCBC4"},justifyContent:"center",position:"relative",width:22,zIndex:1},trackDotDone:{backgroundColor:"$primary",inner:null,shadow:null},trackDotNow:{backgroundColor:"$accent",inner:{width:2,color:"$ink"}},trackDotSvg:{color:"$card",height:13,width:13},trackTitle:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:20.15},trackTitleTodo:{color:"$ink3",fontWeight:"700"},trackDetail:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginTop:1},trackTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:13.5,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},next:{backgroundColor:"$card",borderRadius:18,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:22,paddingBottom:4,paddingLeft:16,paddingRight:16,paddingTop:4,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06},textAlign:"left"},nextIn:{backgroundColor:"$paper",inner:null,marginTop:8,shadow:null},nextRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[36,"fr"],lineHeight:25.5,paddingBottom:10,paddingLeft:0,paddingRight:0,paddingTop:10,textAlign:"left"},nextIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:36,justifyContent:"center",lineHeight:25.5,textAlign:"left",width:36},nextIconSvg:{height:19,width:19},nextIconImage:{borderRadius:11,height:"100%",width:"100%"},nextLabel:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.53,lineHeight:15.75,textAlign:"left",textTransform:"uppercase"},nextText:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"600",lineHeight:20.25,marginTop:1,textAlign:"left"},done:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:20,paddingLeft:22,paddingRight:22,paddingTop:40,textAlign:"center"},doneCheck:{alignItems:"center",backgroundColor:"$accent",borderRadius:38,color:"$ink",fontFamily:"sans",fontSize:17,height:76,justifyContent:"center",lineHeight:25.5,marginBottom:0,marginLeft:"auto",marginRight:"auto",marginTop:0,textAlign:"center",width:76},doneCheckSvg:{height:38,width:38},doneTitle:{color:"$ink",fontFamily:"serif",fontSize:34,fontWeight:"800",letterSpacing:-.34,lineHeight:39.1,marginBottom:0,marginLeft:0,marginRight:0,marginTop:20,textAlign:"center"},doneWhen:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,textAlign:"center"},doneWho:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2,textAlign:"center"},pushFoot:{backgroundColor:"$paper",borderTopColor:"$line",borderTopWidth:1,color:"$ink",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:34,paddingLeft:18,paddingRight:18,paddingTop:12},pushFootStack:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5},shop:{color:"$ink",fontFamily:"sans",fontSize:17,gap:12,lineHeight:25.5,paddingBottom:28,paddingLeft:18,paddingRight:18,paddingTop:8},shopTitle:{color:"$ink",fontFamily:"serif",fontSize:29,fontWeight:"800",letterSpacing:-.29,lineHeight:31.32,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},shopSub:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:-6},shopKey:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:18.4,marginBottom:-4,marginLeft:2,marginRight:2,marginTop:6},shopCard:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:14,paddingLeft:16,paddingRight:16,paddingTop:14,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},shopFine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},shopFineCenter:{marginTop:14,textAlign:"center"},shopEmpty:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:8,paddingLeft:12,paddingRight:12,paddingTop:48,textAlign:"center"},shopEmptyTile:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:20,color:"$link",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:22,height:72,justifyContent:"center",lineHeight:33,marginBottom:8,textAlign:"center",width:72},shopEmptyTileSvg:{height:34,width:34},shopEmptyTitle:{color:"$ink",fontFamily:"serif",fontSize:28,fontWeight:"800",letterSpacing:-.28,lineHeight:30.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},shopEmptyText:{color:"$ink2",fontFamily:"sans",fontSize:15.5,lineHeight:22.48,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:298.07,textAlign:"center"},shopEmptyButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,marginTop:12,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textAlign:"center",textDecorationLine:"none"},shopLink:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},shopActions:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:4,lineHeight:25.5,marginTop:4},orderList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},order:{alignItems:"center",backgroundColor:"$card",borderRadius:22,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:["fr",18],lineHeight:25.5,paddingBottom:14,paddingLeft:16,paddingRight:14,paddingTop:14,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06},textAlign:"left",width:"100%"},orderChev:{color:"$ink3",height:18,width:18},orderTop:{alignItems:"center",color:"$ink",columnGap:10,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,rowGap:4,textAlign:"left"},orderNo:{color:"$ink3",fontFamily:"mono",fontSize:12,letterSpacing:.48,lineHeight:18,textAlign:"left"},orderWhat:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20.8,marginTop:8,textAlign:"left"},orderMeta:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:2,textAlign:"left"},orderPics:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginTop:10,textAlign:"left"},orderPic:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:10,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,overflow:"hidden",textAlign:"left",width:40},orderPicImage:{height:"100%",width:"100%"},orderPicSvg:{height:20,width:20},pill:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$accent3",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:13,fontWeight:"800",gap:6,lineHeight:19.5,minHeight:26,paddingBottom:0,paddingLeft:10,paddingRight:10,paddingTop:0,textAlign:"left"},pillDone:{backgroundColor:"$clearBg",color:"$clearInk"},pillSub:{backgroundColor:"$linkWash",color:"$link"},cartItems:{color:"$ink",fontFamily:"sans",fontSize:17,gap:18,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},cartItem:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[64,"fr"],lineHeight:25.5},cartItemImage:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:14,color:"$link",fontFamily:"sans",fontSize:17,height:64,justifyContent:"center",lineHeight:25.5,overflow:"hidden",width:64},cartItemImageSvg:{height:28,width:28},cartItemTitle:{color:"$ink",fontFamily:"sans",fontSize:16.5,fontWeight:"800",lineHeight:20.63,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},cartItemPrice:{alignItems:"center",color:"$ink",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:3,rowGap:2},cartItemPriceValue:{color:"$ink",fontFamily:"sans",fontSize:16,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:24},cartItemPriceWas:{color:"$ink3",fontFamily:"sans",fontSize:14,fontWeight:"600",lineHeight:21,textDecorationLine:"line-through"},cartItemPriceNote:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:21},cartItemActions:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:16,lineHeight:25.5,marginTop:8},stepper:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$card",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[40,30,40],height:40,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5},stepperButton:{alignItems:"center",backgroundColor:"transparent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},stepperButtonDisabled:{opacity:.3},stepperButtonSvg:{height:16,width:16},stepperValue:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:23.25,textAlign:"center"},remove:{backgroundColor:"transparent",color:"$ink2",fontFamily:"sans",fontSize:14.5,fontWeight:"700",lineHeight:21.75,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},mode:{color:"$ink",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginTop:8},modeButton:{alignItems:"center",backgroundColor:"$paper",borderRadius:12,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"700",gap:10,justifyContent:"space-between",lineHeight:18.85,minHeight:44,paddingBottom:8,paddingLeft:12,paddingRight:12,paddingTop:8,textAlign:"left"},modeButtonOn:{backgroundColor:"$card",inner:{width:2,color:"$ink"}},modePrice:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:18.85,textAlign:"left"},every:{backgroundColor:"$card",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:4,grid:["fr","fr","fr"],inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5,marginTop:8,paddingBottom:4,paddingLeft:4,paddingRight:4,paddingTop:4},everyButton:{backgroundColor:"transparent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,minHeight:36,paddingBottom:0,paddingLeft:6,paddingRight:6,paddingTop:0,textAlign:"center"},everyButtonOn:{backgroundColor:"$primary",color:"$onPrimary"},summary:{backgroundColor:"$card",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:6,paddingLeft:16,paddingRight:16,paddingTop:6,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},summaryRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],gap:12,justifyContent:"space-between",lineHeight:22.5,minHeight:34},summaryLabel:{alignItems:"center",alignSelf:"flex-start",color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],gap:8,lineHeight:22.5},summaryTotal:{fontSize:17,fontWeight:"800",lineHeight:25.5,minHeight:42},summaryTotalLabel:{color:"$ink"},summaryRenew:{fontSize:14,lineHeight:21,marginTop:-6,minHeight:28},summaryTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,fontVariant:["tabular-nums"],letterSpacing:.6,lineHeight:15,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},foot:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5},footFine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},co:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginTop:2},coProduct:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[56,"fr"],lineHeight:25.5},coProductImage:{alignItems:"center",backgroundColor:"$accent3",borderRadius:14,color:"$ink",fontFamily:"sans",fontSize:17,height:56,justifyContent:"center",lineHeight:25.5,overflow:"hidden",width:56},coProductImageSvg:{height:30,width:30},coProductTitle:{color:"$ink2",fontFamily:"sans",fontSize:14,fontWeight:"800",lineHeight:18.9,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},coProductLine:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},coOptions:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},coOption:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5},coOptionOn:{backgroundColor:"$accent4",inner:{width:2,color:"$ink"}},coOptionHit:{alignItems:"flex-start",backgroundColor:"transparent",borderRadius:16,color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[22,"fr","auto"],lineHeight:25.5,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12,rowGap:2,textAlign:"left",width:"100%"},coOptionStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:21.6,textAlign:"left"},coOptionSmall:{color:"$ink2",fontFamily:"sans",fontSize:13,lineHeight:18.2,textAlign:"left"},coOptionPrice:{color:"$ink",fontFamily:"sans",fontSize:16,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:21.6,textAlign:"right"},coOptionPriceWas:{color:"$riskInk",fontFamily:"sans",fontSize:13,fontVariant:["tabular-nums"],fontWeight:"600",lineHeight:17.55,textAlign:"right",textDecorationLine:"line-through"},coRadio:{alignItems:"center",borderRadius:11,height:22,inner:{width:2,color:"$n_BDB9B2"},justifyContent:"center",width:22},coRadioOn:{inner:{width:7,color:"$ink"}},coKicker:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:6,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},coWhen:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:12,paddingLeft:48,paddingRight:14,paddingTop:0},coItems:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},coItem:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,gap:12,grid:[44,"fr","auto"],lineHeight:22.5},coItemPic:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:10,color:"$link",fontFamily:"sans",fontSize:15,height:44,justifyContent:"center",lineHeight:22.5,overflow:"hidden",width:44},coItemStrong:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:19.38},coItemSmall:{color:"$ink3",fontFamily:"sans",fontSize:13.5,lineHeight:20.25},coItemValue:{color:"$ink",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:22.5},coRows:{backgroundColor:"$paper",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:2,paddingLeft:14,paddingRight:14,paddingTop:2},coRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:14.5,gap:10,grid:[20,73.6,"fr"],lineHeight:21.75,minHeight:40},coRowSvg:{color:"$ink2",height:20,width:20},coRowLabel:{color:"$ink3",fontFamily:"sans",fontSize:14.5,lineHeight:21.75},coRowValue:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontWeight:"700",lineHeight:21.75},coRowsShop:{backgroundColor:"$card",shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},coFine:{color:"$ink3",fontFamily:"sans",fontSize:12.5,lineHeight:18.13,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},coSummary:{backgroundColor:"$paper",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:null,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:6,paddingLeft:16,paddingRight:16,paddingTop:6,shadow:null},weightField:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:8,lineHeight:22.5,marginTop:14},weightInputWrap:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,position:"relative"},weightInput:{backgroundColor:"$card",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:24,fontVariant:["tabular-nums"],fontWeight:"800",height:58,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:36,paddingBottom:0,paddingLeft:18,paddingRight:56,paddingTop:0,width:"100%"},weightInputFocus:{inner:{width:2.5,color:"$ink"}},weightUnit:{color:"$ink3",fontFamily:"sans",fontSize:17,fontWeight:"700",lineHeight:25.5,position:"absolute",right:18,top:"50%"},weightError:{color:"$riskInk",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,minHeight:20},weightActions:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:10},subCard:{alignItems:"center",backgroundColor:"$clearBg",borderRadius:22,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[56,"fr","auto"],lineHeight:25.5,paddingBottom:12,paddingLeft:12,paddingRight:14,paddingTop:12},subCardImage:{backgroundColor:"$card",borderRadius:14,height:56,width:56},subCardStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20},subCardSmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginTop:2},subCardButton:{backgroundColor:"$card",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"800",inner:{width:1.5,color:"$ink"},lineHeight:21,minHeight:40,paddingBottom:0,paddingLeft:14,paddingRight:14,paddingTop:0},carrier:{alignItems:"center",color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[40,"fr"],lineHeight:25.5,rowGap:4},carrierIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,width:40},carrierIconSvg:{height:21,width:21},carrierStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24},carrierSmall:{alignItems:"center",color:"$ink2",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"mono",fontSize:13,letterSpacing:.26,lineHeight:19.5,marginTop:1,rowGap:2},carrierButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:8,inner:{width:1.5,color:"$ink"},justifyContent:"center",lineHeight:22.5,marginTop:10,minHeight:40,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0,textDecorationLine:"none"},carrierWait:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3},carrierTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:15,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},toast:{backgroundColor:"$ink",borderRadius:16,color:"$onInk",fontFamily:"sans",fontSize:14.5,left:16,lineHeight:20.3,opacity:1,paddingBottom:12,paddingLeft:15,paddingRight:15,paddingTop:12,position:"absolute",right:16,top:62,zIndex:50},scrim:{backgroundColor:"$scrim",bottom:0,left:0,opacity:1,position:"absolute",right:0,top:0,zIndex:40},sheet:{backgroundColor:"$card",borderBottomLeftRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:28,borderTopRightRadius:28,bottom:0,color:"$ink",fontFamily:"sans",fontSize:17,left:0,lineHeight:25.5,maxHeight:"80%",paddingBottom:40,paddingLeft:20,paddingRight:20,paddingTop:10,position:"absolute",right:0,zIndex:41},sheetGrab:{backgroundColor:"$n_DAD7D1",borderRadius:3,height:5,marginBottom:10,marginLeft:"auto",marginRight:"auto",marginTop:0,width:40},sheetTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,justifyContent:"space-between",lineHeight:25.5},sheetKicker:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.88,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},sheetClose:{alignItems:"center",backgroundColor:"transparent",borderRadius:20,color:"$ink",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,marginRight:-8,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,position:"relative",width:40},sheetCloseSvg:{height:22,width:22},sheetTitle:{color:"$ink",fontFamily:"serif",fontSize:24,fontWeight:"800",letterSpacing:-.24,lineHeight:27.6,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},sheetBody:{color:"$black",fontFamily:"sans",fontSize:16,gap:10,lineHeight:24,marginTop:12},coButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:17,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:25.5,minHeight:56,paddingBottom:0,paddingLeft:28,paddingRight:28,paddingTop:0,textDecorationLine:"none",width:"100%"},footButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textDecorationLine:"none",width:"100%"},blanksWrap:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14},blanksCard:{backgroundColor:"$card",borderRadius:20,color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:13,paddingLeft:12,paddingRight:12,paddingTop:12,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},blanksHead:{alignItems:"center",color:"$ink3",flexDirection:"row",fontFamily:"sans",fontSize:12.5,fontWeight:"800",gap:10,justifyContent:"space-between",letterSpacing:.88,lineHeight:18.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:2,paddingLeft:2,paddingRight:2,paddingTop:0,textTransform:"uppercase"},blanksPill:{backgroundColor:"$accent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:13,fontStyle:"normal",fontWeight:"800",letterSpacing:.13,lineHeight:19.5,paddingBottom:2,paddingLeft:10,paddingRight:10,paddingTop:2,textTransform:"none"},blanksPillFilled:{backgroundColor:"$clearBg",color:"$clearInk"},blanksList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:7,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},blanksRow:{alignItems:"center",backgroundColor:"$paper",borderRadius:15,color:"$ink",columnGap:11,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[34,"fr"],lineHeight:25.5,paddingBottom:9,paddingLeft:9,paddingRight:12,paddingTop:9},blanksNum:{alignItems:"center",backgroundColor:"$accentChip",borderRadius:11,color:"$ink",fontFamily:"serif",fontSize:22,fontWeight:"800",height:40,justifyContent:"center",lineHeight:33,width:34},blanksText:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:21.6},blanksSource:{color:"$ink3",fontFamily:"sans",fontSize:13.5,lineHeight:20.25},blank:{alignSelf:"flex-start",backgroundColor:"$accent4",borderRadius:6,color:"$ink",fontFamily:"sans",fontSize:16,fontStyle:"normal",fontWeight:"700",height:20,inner:{width:1.5,color:"$accent"},lineHeight:21.6,minWidth:36},blankS:{minWidth:24},blankL:{minWidth:64},blankFilled:{backgroundColor:"transparent",borderRadius:6,height:"auto",inner:null,marginBottom:0,marginLeft:-3,marginRight:-3,marginTop:0,minWidth:0,paddingBottom:0,paddingLeft:3,paddingRight:3,paddingTop:0,shadow:null},manageOrders:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"}}),bs=/* @__PURE__ */Object.freeze({shield:{strokes:[{width:1.8,cap:true,closed:true,points:[12,3,19,6,19,12,18.759,14.125,18.074,16,17,17.625,15.593,19,13.907,20.125,12,21,10.093,20.125,8.407,19,7,17.625,5.926,16,5.241,14.125,5,12,5,6]},{width:1.8,cap:true,closed:false,points:[9,12,11,14,15,10]}],boxes:[],triangles:[],seams:[]},arrow:{strokes:[{width:2,cap:true,closed:false,points:[4.5,12,19,12]},{width:2,cap:true,closed:false,points:[13.5,6.5,19,12,13.5,17.5]}],boxes:[],triangles:[],seams:[]},check:{strokes:[{width:2.4,cap:true,closed:false,points:[5,12.6,9.4,17,19,7.4]}],boxes:[],triangles:[],seams:[]},star:{strokes:[],boxes:[],triangles:[[12,16.9,6.8,19.6,7.8,13.8],[16.2,13.8,17.2,19.6,12,16.9],[7.8,13.8,3.5,9.7,9.4,8.8],[14.6,8.8,20.5,9.7,16.2,13.8],[9.4,8.8,12,3.5,14.6,8.8],[16.2,13.8,12,16.9,7.8,13.8],[14.6,8.8,16.2,13.8,7.8,13.8],[14.6,8.8,7.8,13.8,9.4,8.8]],seams:[[12,16.9,7.8,13.8,.245,.677],[12,16.9,16.2,13.8,.245,.677],[7.8,13.8,9.4,8.8,.69,.248],[14.6,8.8,16.2,13.8,.248,.243],[14.6,8.8,9.4,8.8,.68,.245],[16.2,13.8,7.8,13.8,.677,.68],[14.6,8.8,7.8,13.8,.68,.69]]},truck:{strokes:[{width:1.7,cap:false,closed:true,points:[2.8,6.5,14.2,6.5,14.2,16,2.8,16]},{width:1.7,cap:false,closed:false,points:[14.2,9.5,17.8,9.5,21.2,12.9,21.2,16,14.2,16]}],boxes:[{x:5,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7},{x:15.4,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7}],triangles:[],seams:[]},refresh:{strokes:[{width:1.7,cap:true,closed:false,points:[4,12,4.343,14.363,5.368,16.52,6.985,18.278,9.048,19.48,11.374,20.021,13.756,19.85,15.981,18.984,17.852,17.5,19.201,15.53,19.909,13.249,19.912,10.861,19.21,8.578,17.865,6.605,15.998,5.116,13.775,4.245,11.393,4.068,9.066,4.602,7,5.8]},{width:1.7,cap:true,closed:false,points:[4,4,4,8,8,8]}],boxes:[],triangles:[],seams:[]},card:{strokes:[{width:1.7,cap:true,closed:false,points:[3,9.5,21,9.5]},{width:1.7,cap:true,closed:false,points:[6.5,15,10.5,15]}],boxes:[{x:3,y:5.5,w:18,h:13,radius:2.2,width:1.7}],triangles:[],seams:[]},alert:{strokes:[{width:1.9,cap:true,closed:true,points:[12,3.5,21.5,20,2.5,20]},{width:1.9,cap:true,closed:false,points:[12,10,12,14.5]},{width:1.9,cap:true,closed:false,points:[12,17.2,12.01,17.2]}],boxes:[],triangles:[],seams:[]},x:{strokes:[{width:2,cap:true,closed:false,points:[6.5,6.5,17.5,17.5]},{width:2,cap:true,closed:false,points:[17.5,6.5,6.5,17.5]}],boxes:[],triangles:[],seams:[]},chat:{strokes:[{width:1.7,cap:false,closed:true,points:[5,5.2,19,5.2,19.8,5.414,20.386,6,20.6,6.8,20.6,15.4,20.386,16.2,19.8,16.786,19,17,10.3,17,5.5,20.6,5.5,17,5,17,4.2,16.786,3.614,16.2,3.4,15.4,3.4,6.8,3.614,6,4.2,5.414,5,5.2]}],boxes:[],triangles:[],seams:[]},repeat:{strokes:[{width:1.8,cap:true,closed:false,points:[4.5,11,4.824,8.824,5.766,6.837,7.244,5.208,9.131,4.077,11.264,3.543,13.461,3.65,15.533,4.391,17.3,5.7,19.5,8]},{width:1.8,cap:true,closed:false,points:[19.5,3.5,19.5,8,15,8]},{width:1.8,cap:true,closed:false,points:[19.5,13,19.176,15.176,18.234,17.163,16.756,18.792,14.869,19.923,12.736,20.457,10.539,20.35,8.467,19.609,6.7,18.3,4.5,16]},{width:1.8,cap:true,closed:false,points:[4.5,20.5,4.5,16,9,16]}],boxes:[],triangles:[],seams:[]},calendar:{strokes:[{width:1.8,cap:true,closed:false,points:[4,10,20,10]},{width:1.8,cap:true,closed:false,points:[8.5,3.5,8.5,7.5]},{width:1.8,cap:true,closed:false,points:[15.5,3.5,15.5,7.5]}],boxes:[{x:4,y:5.5,w:16,h:15,radius:2.5,width:1.8}],triangles:[],seams:[]},flame:{strokes:[],boxes:[],triangles:[[12.15,14.513,13.1,15.2,13.1,13.7],[11.5,13.3,12.15,14.513,13.1,13.7],[16.874,10.907,15.7,9.3,15.381,10.659],[14.7,16.7,16.838,18.516,17.693,16.84],[14.7,16.7,14.489,17.681,16.838,18.516],[18,14.9,14.507,15.633,17.693,16.84],[16.874,10.907,15.381,10.659,14.685,11.707],[17.693,12.759,16.874,10.907,14.685,11.707],[15.538,19.832,16.838,18.516,14.489,17.681],[14.685,11.707,13.959,14.633,17.693,12.759],[17.693,12.759,13.959,14.633,18,14.9],[13.891,20.692,13.055,19.006,12,21],[12,21,12,19.2,10.109,20.692],[8.462,19.832,10.109,20.692,10.659,18.863],[10.659,18.863,9.741,17.97,8.462,19.832],[6.307,16.84,9.602,15.677,6,14.9],[6.273,13.033,6,14.9,9.602,15.677],[9.602,15.677,10.113,14.812,6.273,13.033],[6.988,11.438,6.273,13.033,10.113,14.812],[13.525,7.088,12.856,5.017,12,3.5],[13.856,9.589,13.525,7.088,12,3.5],[13.7,12.4,13.856,9.589,12,3.5],[10.113,14.812,10.792,14.042,6.988,11.438],[14.7,16.7,17.693,16.84,14.507,15.633],[13.7,12.4,13.959,14.633,14.685,11.707],[14.507,15.633,18,14.9,13.959,14.633],[13.1,13.7,13.959,14.633,13.7,12.4],[11.5,13.3,13.1,13.7,13.7,12.4],[7.983,10.048,6.988,11.438,10.792,14.042],[10.792,14.042,11.5,13.3,7.983,10.048],[14.489,17.681,13.913,18.475,15.538,19.832],[13.891,20.692,15.538,19.832,13.913,18.475],[13.891,20.692,13.913,18.475,13.055,19.006],[12,19.2,12,21,13.055,19.006],[10.659,18.863,10.109,20.692,12,19.2],[7.162,18.516,8.462,19.832,9.741,17.97],[9.741,17.97,9.4,16.7,7.162,18.516],[6.307,16.84,7.162,18.516,9.4,16.7],[6.307,16.84,9.4,16.7,9.602,15.677],[9.1,8.8,7.983,10.048,11.5,13.3],[11.5,13.3,13.7,12.4,9.1,8.8],[10.054,7.77,9.1,8.8,13.7,12.4],[10.927,6.683,10.054,7.77,13.7,12.4],[11.613,5.481,10.927,6.683,13.7,12.4],[12.006,4.106,11.613,5.481,13.7,12.4],[12,2.5,12.006,4.106,13.7,12.4],[12,2.5,13.7,12.4,12,3.5]],seams:[[12.15,14.513,13.1,13.7,.121,.428],[11.5,13.3,13.1,13.7,.681,.356],[15.381,10.659,16.874,10.907,.033,.883],[14.7,16.7,16.838,18.516,.648,1.318],[14.7,16.7,17.693,16.84,.648,1.533],[14.489,17.681,16.838,18.516,.51,1.318],[14.507,15.633,18,14.9,.782,1.787],[14.507,15.633,17.693,16.84,.782,1.533],[14.685,11.707,16.874,10.907,.68,.883],[14.685,11.707,17.693,12.759,.61,.484],[14.489,17.681,15.538,19.832,.51,1.115],[13.959,14.633,14.685,11.707,1.333,.576],[13.959,14.633,17.693,12.759,.851,.484],[13.959,14.633,18,14.9,.851,1.787],[13.055,19.006,13.891,20.692,.36,.984],[12,21,13.055,19.006,.945,.395],[12,19.2,12,21,.394,.945],[10.109,20.692,12,19.2,.715,.394],[10.109,20.692,10.659,18.863,.715,.428],[10.659,18.863,8.462,19.832,.428,.809],[8.462,19.832,9.741,17.97,.809,.525],[6.307,16.84,9.602,15.677,1.65,.812],[6,14.9,9.602,15.677,.194,1.012],[6.273,13.033,9.602,15.677,2.068,1.012],[10.113,14.812,6.273,13.033,1.217,2.068],[10.113,14.812,6.988,11.438,1.217,2.2],[12,3.5,13.525,7.088,4.697,5.571],[12,3.5,13.856,9.589,4.697,3.017],[12,3.5,13.7,12.4,4.648,26.765],[10.792,14.042,6.988,11.438,1.339,2.2],[13.7,12.4,13.959,14.633,.819,1.333],[13.1,13.7,13.7,12.4,0,.819],[11.5,13.3,13.7,12.4,.681,.537],[10.792,14.042,7.983,10.048,1.339,2.328],[11.5,13.3,7.983,10.048,1.438,2.328],[13.913,18.475,15.538,19.832,.409,1.115],[13.891,20.692,13.913,18.475,.984,.409],[7.162,18.516,9.741,17.97,.977,.525],[7.162,18.516,9.4,16.7,.977,.677],[6.307,16.84,9.4,16.7,1.65,.677],[11.5,13.3,9.1,8.8,1.438,1.129],[13.7,12.4,9.1,8.8,2.046,1.129],[10.054,7.77,13.7,12.4,.079,2.285],[10.927,6.683,13.7,12.4,.237,3.126],[11.613,5.481,13.7,12.4,.475,5.451],[12.006,4.106,13.7,12.4,.961,15.892],[12,2.5,13.7,12.4,2.974,26.765]]},box:{strokes:[{width:1.7,cap:false,closed:true,points:[3.8,7.8,12,4,20.2,7.8,20.2,16.4,12,20,3.8,16.4]},{width:1.7,cap:false,closed:false,points:[3.8,7.8,12,11.6,20.2,7.8]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20]}],boxes:[],triangles:[],seams:[]},cart:{strokes:[{width:1.8,cap:true,closed:false,points:[2.8,4,5.4,4,7.7,14.6,8.203,15.401,9.1,15.7,17.3,15.7,18.197,15.401,18.7,14.6,20.4,7.6,6.3,7.6]}],boxes:[{x:8.3,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8},{x:15.8,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8}],triangles:[],seams:[]},minus:{strokes:[{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},plus:{strokes:[{width:2.2,cap:true,closed:false,points:[12,6,12,18]},{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},chev:{strokes:[{width:2,cap:true,closed:false,points:[9,5.5,15.5,12,9,18.5]}],boxes:[],triangles:[],seams:[]},pulse:{strokes:[{width:1.8,cap:true,closed:false,points:[3,12.5,6.8,12.5,9.2,6.9,13.4,17.5,15.8,12.5,21,12.5]}],boxes:[],triangles:[],seams:[]},file:{strokes:[{width:1.7,cap:true,closed:true,points:[7,3.5,14.2,3.5,18.5,7.8,18.5,20,18.324,20.424,17.9,20.6,7,20.6,6.576,20.424,6.4,20,6.4,4.1,6.576,3.676,7,3.5]},{width:1.7,cap:true,closed:false,points:[14,3.6,14,8,18.4,8]},{width:1.7,cap:true,closed:false,points:[9.4,12.4,14.6,12.4]},{width:1.7,cap:true,closed:false,points:[9.4,15.8,14.6,15.8]}],boxes:[],triangles:[],seams:[]},kit:{strokes:[{width:1.7,cap:false,closed:true,points:[4,7.6,12,3.6,20,7.6,20,16.4,12,20.4,4,16.4]},{width:1.7,cap:false,closed:false,points:[4,7.6,12,11.6,20,7.6]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20.4]}],boxes:[],triangles:[],seams:[]},dna:{strokes:[{width:1.7,cap:true,closed:false,points:[7,3.5,7.28,4.645,8.04,5.594,9.16,6.394,10.52,7.097,12,7.75,13.48,8.403,14.84,9.106,15.96,9.906,16.72,10.855,17,12,16.72,13.145,15.96,14.094,14.84,14.894,13.48,15.597,12,16.25,10.52,16.903,9.16,17.606,8.04,18.406,7.28,19.355,7,20.5]},{width:1.7,cap:true,closed:false,points:[17,3.5,16.72,4.645,15.96,5.594,14.84,6.394,13.48,7.097,12,7.75,10.52,8.403,9.16,9.106,8.04,9.906,7.28,10.855,7,12,7.28,13.145,8.04,14.094,9.16,14.894,10.52,15.597,12,16.25,13.48,16.903,14.84,17.606,15.96,18.406,16.72,19.355,17,20.5]},{width:1.7,cap:true,closed:false,points:[8.6,6.3,15.4,6.3]},{width:1.7,cap:true,closed:false,points:[8.6,17.7,15.4,17.7]},{width:1.7,cap:true,closed:false,points:[10.4,9.6,13.6,9.6]},{width:1.7,cap:true,closed:false,points:[10.4,14.4,13.6,14.4]}],boxes:[],triangles:[],seams:[]},heart:{strokes:[{width:1.8,cap:false,closed:true,points:[12,20.2,11.739,20.035,11.041,19.559,10.03,18.804,8.831,17.799,7.569,16.575,6.37,15.163,5.359,13.593,4.661,11.895,4.4,10.1,4.833,8.454,5.87,7.105,7.349,6.264,9.039,6.062,10.675,6.532,12,7.6,13.325,6.532,14.961,6.062,16.651,6.264,18.13,7.105,19.167,8.454,19.6,10.1,19.339,11.895,18.641,13.593,17.63,15.163,16.431,16.575,15.169,17.799,13.97,18.804,12.959,19.559,12.261,20.035,12,20.2]}],boxes:[],triangles:[],seams:[]},bottle:{strokes:[{width:1.7,cap:false,closed:true,points:[7.2,6.2,16.8,6.2,17.507,6.493,17.8,7.2,17.8,19.5,17.572,20.35,16.95,20.972,16.1,21.2,7.9,21.2,7.05,20.972,6.428,20.35,6.2,19.5,6.2,7.2,6.493,6.493,7.2,6.2]},{width:1.7,cap:false,closed:true,points:[9,11,15,11,15,16,9,16]}],boxes:[{x:8,y:2.8,w:8,h:3.4,radius:1,width:1.7}],triangles:[],seams:[]},harness:{strokes:[{width:1.5,cap:true,closed:false,points:[7.5,4.5,7.728,6.82,8.364,8.708,9.336,10.116,10.572,10.996,12,11.3,13.428,10.996,14.664,10.116,15.636,8.708,16.272,6.82,16.5,4.5]},{width:1.5,cap:true,closed:true,points:[5,12.6,19,12.6,19,17.2,18.692,18.35,17.85,19.192,16.7,19.5,7.3,19.5,6.15,19.192,5.308,18.35,5,17.2]},{width:1.5,cap:true,closed:false,points:[8.2,15.3,15.8,15.3]}],boxes:[{x:10.7,y:8.9,w:2.6,h:2.6,radius:1.3,width:1.5}],triangles:[],seams:[]},ramp:{strokes:[{width:1.5,cap:true,closed:false,points:[2.5,19.5,21.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,19.5,3.5,16.5,8,16.5,8,13.5,12.5,13.5,12.5,10.5,17,10.5,17,7.5,20.5,7.5,20.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,16.5,20.5,7.5],opacity:.35}],boxes:[],triangles:[],seams:[]}});var ks=/* @__PURE__ */Object.freeze({black:"#000000",onInk:"#FFFFFF",wash:"rgba(38, 37, 35, 0.06)",scrim:"rgba(38, 37, 35, 0.38)",riskChip:"#FFD8D6",clearChip:"#DDEFC4"});function ws(e){let t=e.trim(),n=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(t);if(n!==null){let e=n[1].length===3?n[1].split("").map(e=>e+e).join(""):n[1];return[0,2,4].map(t=>parseInt(e.slice(t,t+2),16))}let r=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(t);return r===null?null:[Number(r[1]),Number(r[2]),Number(r[3])]}function vs(e,t,n){let r=ws(e),i=ws(n);if(r===null||i===null)return n;let o=e=>Math.round(r[e]*t+i[e]*(1-t)).toString(16).padStart(2,"0");return`#${o(0)}${o(1)}${o(2)}`.toUpperCase()}function xs(e){let t=ws(e);return t===null?"transparent":`rgba(${t[0]}, ${t[1]}, ${t[2]}, 0)`}function Ss(e){let t=e.color,n=ns(e),r=n.card,i=n.link;return{ink:n.ink,ink2:n.ink2,ink3:n.ink3,paper:n.paper,tile:n.tile,line:n.line,card:r,...Ts(e)?{paper:t.background}:{},riskBg:n.riskBg,riskInk:n.riskInk,riskDot:n.riskDot,clearBg:n.clearBg,clearInk:n.clearInk,clearDot:n.clearDot,watchDot:n.watchDot,...n.dark?{black:t.text.primary,onInk:t.background,wash:vs(t.text.primary,.08,t.surface),scrim:"rgba(0, 0, 0, 0.6)",riskChip:t.badgeBgCritical,clearChip:t.badgeBgPositive}:ks,primary:n.primary,onPrimary:n.onPrimary,accent:n.accent,accent4:vs(t.accent,.17,r),accent3:vs(t.accent,.25,r),accentChip:vs(t.accent,.47,r),link:i,linkWash:(n.dark?void 0:e.slots.planWash?.backgroundColor)??vs(i,.12,r),linkChip:(n.dark?void 0:e.slots.planChip?.backgroundColor)??vs(i,.2,r)}}function Ts(e){return e.brightness==="dark"?false:e.meta.displayName!==ro.meta.displayName||e.color.background!==ro.color.background}var Cs=["sec","steps","need","by","extra"],Is=["sec","steps","need"],Hs=["button","coButton","footButton"];function Fs(e,t){if(e.brightness==="dark")return;let n=e.slots.card,r=e.slots.primaryButton,i=(e,n)=>{let r=t[e];t[e]={...r,box:{...r.box,...n}}};if(n!==void 0)for(let e of Cs)i(e,{...n.backgroundColor===void 0?{}:{backgroundColor:n.backgroundColor},...n.borderRadius===void 0||!Is.includes(e)?{}:{borderRadius:n.borderRadius}});if(r?.borderRadius!==void 0)for(let e of Hs)i(e,{borderRadius:r.borderRadius})}var Rs=/* @__PURE__ */new Set(["fontSize","fontWeight","fontFamily","fontStyle","letterSpacing","lineHeight","textTransform","color","textAlign","textDecorationLine","fontVariant"]),Ps=/* @__PURE__ */new Set(["justifyItems"]);function zs(e,t,n){let r=Number(n??400);if(t==="serif"){let t=headingFace(e,"bold");return t.fontWeight===void 0?{fontFamily:t.fontFamily}:{fontFamily:t.fontFamily,fontWeight:String(r)}}let i=t==="mono",o=r>=650?i?"monoBold":"bold":r>=450?i?"monoMedium":"medium":i?"mono":"regular",l=face(e,o);return e.type.namedFaces[o]?{fontFamily:l.fontFamily}:{fontFamily:l.fontFamily,fontWeight:String(r)}}function Ds(e,t,n,r,i){let o={},l={},a=e=>{if(!e.startsWith("$"))return e;let n=e.slice(1);return n.startsWith("n_")?r?i:`#${n.slice(2)}`:t[n]??e},s=[],c;for(let[t,i]of Object.entries(n))if(!(i===void 0||Ps.has(t)||t==="grid"||t==="fontWeight"))if(t==="fontFamily")Object.assign(l,zs(e,String(i),n.fontWeight));else if(t==="shadow"){if(i===null)Object.assign(o,{shadowOpacity:0,elevation:0});else if(!r){let e=i;Object.assign(o,{shadowColor:a(e.color),shadowOpacity:e.opacity,shadowRadius:e.blur,shadowOffset:{width:e.x,height:e.y},elevation:Math.max(1,Math.round(e.blur/2))})}}else if(t==="inner"){let e=i;c=e===null?null:{position:"absolute",top:0,right:0,bottom:0,left:0,borderWidth:e.width,borderColor:a(e.color),pointerEvents:"none"}}else if(t==="ring"){let e=i,t=typeof n.borderRadius=="number"?n.borderRadius:0;s=e.map((n,r)=>({borderWidth:n.width-(e[r-1]?.width??0),borderColor:a(n.color),borderRadius:t+n.width})).reverse()}else t==="color"||t.endsWith("Color")?(t==="color"?l:o)[t]=a(String(i)):(Rs.has(t)?l:o)[t]=i;n.fontWeight!==void 0&&n.fontFamily===void 0&&Object.assign(l,zs(e,"sans",n.fontWeight));let d=s[0];if(d!==void 0){let e=n.ring.reduce((e,t)=>Math.max(e,t.width),0),t={...d};if(o.position==="absolute"){for(let e of["position","zIndex"])o[e]!==void 0&&(t[e]=o[e]);for(let n of["top","right","bottom","left"])typeof o[n]=="number"&&(t[n]=o[n]-e);for(let e of["position","zIndex","top","right","bottom","left"])delete o[e]}else{for(let n of["marginTop","marginRight","marginBottom","marginLeft"])t[n]=(typeof o[n]=="number"?o[n]:0)-e,delete o[n];o.alignSelf!==void 0&&(t.alignSelf=o.alignSelf,delete o.alignSelf)}s[0]=t}return{box:o,text:l,rings:s,...c===void 0?{}:{inner:c},grid:n.grid??[]}}var $s=/* @__PURE__ */new WeakMap;function Os(e){let t=$s.get(e);if(t!==void 0)return t;let n=Ss(e),r=e.brightness==="dark",i={roles:n};for(let[t,o]of Object.entries(ys))i[t]=Ds(e,n,o,r,n.line);Fs(e,i);let o=i;return $s.set(e,o),o}function Bs(e,t){let n=e.grid[t];return n===void 0?{}:n==="fr"?{flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0}:n==="auto"?{flexShrink:0}:typeof n=="number"?{width:n,flexShrink:0}:{}}var _s=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Ls=["margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical"],Es=/* @__PURE__ */new WeakMap;function As(e){let n=Es.get(e);if(n!==void 0)return n;let r=e=>e.filter(e=>typeof e=="string"),i={bx:(...t)=>r(t).map(t=>e[t].box),im:(...t)=>r(t).map(t=>e[t].box),tx:(...t)=>r(t).map(t=>e[t].text),tb:(...t)=>r(t).flatMap(t=>[e[t].box,e[t].text]),ring:(n,r,i)=>{let o=e[n].rings;return o.length===0?r:o.reduceRight((e,n,r)=>t(g,{key:r,style:r===0&&i!==void 0?[n,i]:n},e),r)},inner:(...n)=>{let i=null,o={};for(let t of r(n)){let n=e[t];n.inner!==void 0&&(i=n.inner);for(let e of _s)n.box[e]!==void 0&&(o={...o,[e]:n.box[e]})}return i===null?null:t(g,{style:[i,o]})},ink:(t,n)=>typeof e[t].text.color=="string"?e[t].text.color:n,side:(t,n)=>typeof e[t].box.width=="number"?e[t].box.width:n,mod:(t,n)=>{if(n===void 0||n==="")return null;let r=`${t}${n.charAt(0).toUpperCase()}${n.slice(1)}`;return r!=="roles"&&r in e?r:null},scroll:t=>{let n={},r={};for(let[i,o]of Object.entries(e[t].box))(Ls.includes(i)?n:r)[i]=o;return{place:n,content:r}},swipe:(t,n)=>{let r=e[t].box,i=typeof r.flexBasis=="string"&&r.flexBasis.endsWith("%")?Number(r.flexBasis.slice(0,-1))/100:1,o=typeof r.maxWidth=="number"?r.maxWidth:1/0;return Math.round(Math.min(o,n*i)*100)/100}};return Es.set(e,i),i}var js=/* @__PURE__ */Object.freeze({button:.97,onButton:.96,jump:.98,opt:.98,add:.98,extraGo:.96,every:.96,askRow:.98,stepper:.9,mode:.98,order:.98,subCard:.96});function Ws(e,t,n){return n?e:({pressed:n})=>n?[e,{transform:[{scale:t}]}]:e}var Ms=["ordered","shipped","out_for_delivery","delivered"],Ns={ordered:0,shipped:1,delivered:3};function Us(e){let t=Math.max(0,Ms.indexOf(e.status));return{key:e.key,number:e.number??null,step:t,dates:e.dates??[],everfur:false,steps:[0,1,2,3],productId:null,items:e.items.map(e=>({title:e.title,quantity:e.quantity,price:e.price,imageUrl:e.imageUrl??null,icon:e.icon??null})),total:Math.round(e.items.reduce((e,t)=>e+t.price,0)*100)/100,currency:e.currency,subscriptionBox:e.subscriptionBox===true,carrier:e.carrier??null,trackingNumber:e.trackingNumber??null,trackingTag:e.trackingTag??null,trackingUrl:e.trackingUrl??null}}function qs(e,t){let n=t.find(t=>t.productId===e.productId),r=e.tracking,i=e.quantity??1,o=e.total??Math.round(e.price*i*100)/100,l=r===void 0?0:Ns[r.status];return{key:e.orderId,number:r?.orderNumber??null,step:l,dates:r===void 0?[e.createdAt??null]:[e.createdAt??null,r.shippedAt,null,l===3?null:r.estimatedDelivery],steps:r===void 0?[0]:[0,1,3],everfur:true,productId:e.productId,items:[{title:e.title??n?.title??"",quantity:i,price:o,imageUrl:n?.imageUrl??null,icon:null}],total:o,currency:e.currency,subscriptionBox:false,carrier:r?.carrier??null,trackingNumber:r?.trackingNumber??null,trackingTag:null,trackingUrl:r?.trackingUrl??null}}function Vs(e,t,n=/* @__PURE__ */new Date){if(e==null)return null;let r=/^\d{4}-\d{2}-\d{2}$/.test(e),i=new Date(r?`${e}T00:00:00Z`:e);if(Number.isNaN(i.getTime()))return null;let o=r?"UTC":void 0,l=Number(new Intl.DateTimeFormat("en-US",{year:"numeric",...o?{timeZone:o}:{}}).format(i));try{return new Intl.DateTimeFormat(t??"en-US",l!==n.getFullYear()?{month:"short",day:"numeric",year:"numeric",...o?{timeZone:o}:{}}:{weekday:"short",month:"short",day:"numeric",...o?{timeZone:o}:{}}).format(i)}catch{return e}}function Gs(e){return e.length<=1?e[0]??"":`${e.slice(0,-1).join(", ")} and ${e[e.length-1]??""}`}var Ks={justifyContent:"center"},Xs={flexShrink:1},Ys={width:"100%",height:"100%"},Js={flexWrap:"wrap"},Qs={width:"100%",alignSelf:"stretch"},Zs={top:2,bottom:2,left:2,right:2},ec={alignSelf:"auto"},tc={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",borderWidth:0},nc=(e,t,n)=>/* @__PURE__ */F(P,{children:[" ",
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
return
|
|
83
|
-
return
|
|
84
|
-
return
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
return
|
|
92
|
-
return
|
|
93
|
-
return
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
return
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
return
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
return
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
return
|
|
118
|
-
return
|
|
119
|
-
return
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
return
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
return
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
return
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
return
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
return R(bc.Provider,{value:c,children:/* @__PURE__ */R(kc.Provider,{value:d,children:/* @__PURE__ */R(g,{ref:i,style:n,collapsable:false,children:t})})})}function wc(){return i(bc)}function vc(){return i(kc)}var xc=false;function Sc(e){if(xc||!e)return;xc=true;let t=globalThis.console;try{t?.warn?.("[everfur] A ConnectedHealthPlan* block was drawn outside HealthPlanFocusProvider, so it draws nothing. Wrap it in HealthPlanFocusProvider (or HealthPlanFocus), or use the pure block with your own data.")}catch{}}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,i=n===""?"Your pet":n;return t==="female"?{name:r,Name:i,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:i,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:i,poss:`${r}'s`,Poss:`${i}'s`,obj:r}}var Tc=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,Cc=/* @__PURE__ */Object.freeze({onceFine:"",cartFine:Tc,startedWhat:()=>""});function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${Tc(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}var Ic=healthPlanFocusCopyFor({sex:"female"});function formatHealthPlanDay(e,t){if(e===null||!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let n=/* @__PURE__ */new Date(`${e}T00:00:00Z`);if(Number.isNaN(n.getTime()))return null;try{return new Intl.DateTimeFormat(t??"en-US",{month:"short",day:"numeric",timeZone:"UTC"}).format(n)}catch{return e}}var Hc=/* @__PURE__ */Object.freeze({loaded:false,orders:[],next:null,loading:false});function Fc(e,t){return[...e.filter(e=>e.kind!==t.kind),t]}function Rc(e,t,n){return e!==null?e.kind:Pc(t,n)}function Pc(e,t){return e!==null?"started":t!==void 0?t.kind:null}function zc(e,t){let n=/* @__PURE__ */new Set;return[...e,...t].filter(e=>n.has(e.orderId)?false:(n.add(e.orderId),true))}function Dc(e,t){return[...t,...e.filter(e=>!t.some(t=>t.orderId===e.orderId))]}function $c(e,t){return{loaded:true,orders:[...e.orders,...t.orders.filter(t=>!e.orders.some(e=>e.orderId===t.orderId))],next:t.nextCursor,loading:false}}function Oc(e,t,n){if(e===null)return null;let r=t.find(t=>t.orderId===e);return r!==void 0?r.tracking?.orderNumber??null:n.find(t=>t.key===e)?.number??null}function Bc(e,t,n){return e.flatMap(e=>e.productId!==t?[e]:n(e)??[])}async function _c(e,petRef,t){if(e.listOneBoxOrderPage!==void 0)return e.listOneBoxOrderPage(petRef,{limit:20,...t===null?{}:{cursor:t}});if(t!==null||e.listOneBoxOrders===void 0)return{ok:true,value:{orders:[],nextCursor:null}};let n=await e.listOneBoxOrders(petRef);return n.ok?{ok:true,value:{orders:n.value,nextCursor:null}}:n}function Lc(e){if(e.httpStatus!==422)return false;let t=e.raw!==null&&typeof e.raw=="object"?e.raw:null;return[e.reasonCode,e.wireMessage,t?.detail,t?.message].some(e=>e==="invalid_cursor")}var Ec=e=>Math.round(e*100)/100;function useHealthPlanSubscriptionRepository(){let{runtime:e}=oe();return r(()=>createHealthPlanSubscriptionRepository(e),[e])}function useHealthPlanSubscription(e){let{userRef:userRef}=oe(),t=useHealthPlanSubscriptionRepository(),i=e.repository??t,l=e.enabled!==false&&userRef!==null&&e.petRef!==null&&e.productId!==null,{petRef:petRef,productId:c}=e,[d,u]=n("idle"),[p,h]=n(null),[g,f]=n(null),[m,y]=n(false),[b,k]=n(null),[w,v]=n(null),x=s(0),S=s(0),T=s(0),C=s(false),I=s(false),H=s(()=>Promise.resolve()),F=a(async()=>{let e=++x.current;if(I.current=false,v(null),!l||petRef===null||c===null){u("idle"),h(null),f(null);return}u("loading");let t=await i.quote(petRef,c);if(e===x.current){if(!t.ok){h(null),f(null),k(t.error),u(isHealthPlanSubscriptionUnavailable(t.error)?"unavailable":"failed");return}k(null),h(t.value),f(t.value.subscription),u("ready"),v(Date.now())}},[l,petRef,c,i]),R=l&&d==="ready",P=a(async()=>{if(!R||C.current||petRef===null||c===null)return;let e=x.current,t=S.current,n=++T.current,r=await i.quote(petRef,c);e!==x.current||t!==S.current||n!==T.current||C.current||!r.ok||(h(r.value),f(r.value.subscription),v(Date.now()))},[R,petRef,c,i]);H.current=P;let z=()=>{if(!R){F();return}if(C.current){I.current=true;return}P()};Zt({lifecycle:e.lifecycle,refreshKey:e.refreshKey,readyAt:R?w:null,revalidate:()=>{P()},refresh:z});let D=a(()=>{I.current&&(I.current=false,H.current())},[]);o(()=>(F(),()=>{x.current+=1}),[F]);let $=a(async e=>{let t=x.current;S.current+=1,C.current=true,y(true);let n=await e();return C.current=false,t!==x.current?n:(y(false),n.ok?(k(null),f(n.value),D(),n):(k(n.error),isHealthPlanSubscriptionUnavailable(n.error)?u("unavailable"):D(),n))},[D]),O=a(async e=>{let t=x.current;S.current+=1,C.current=true,y(true);let n=await i.buyOneBox(petRef,c,e);return C.current=false,t!==x.current?n:(y(false),n.ok?(k(null),F(),n):(k(n.error),isHealthPlanSubscriptionUnavailable(n.error)?u("unavailable"):D(),n))},[i,petRef,c,F,D]);return r(()=>{let e=petRef,t=g?.subscriptionId??"",n=()=>Promise.resolve(err(makeEverfurError("validationFailed",{retryable:false,wireMessage:"the subscription quote is not ready"})));return{phase:d,quote:p,subscription:g,busy:m,error:b,subscribe:t=>R&&c!==null?$(()=>i.create(e,c,t)):n(),changeInterval:r=>R&&t!==""?$(()=>i.changeInterval(e,t,r)):n(),skip:()=>R&&t!==""?$(()=>i.skip(e,t)):n(),cancel:()=>R&&t!==""?$(()=>i.cancel(e,t)):n(),restart:r=>R&&t!==""?$(()=>i.restart(e,t,r)):n(),buyOneBox:e=>R&&c!==null?O(e):n(),refresh:F}},[d,p,g,m,b,R,petRef,c,i,$,O,F])}var Ac=2.20462262;function jc(e,t){return{weightKg:t?e:Math.round(e/Ac*100)/100,pounds:t?Math.round(e*Ac*10)/10:e}}var Wc=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),Mc=globalThis;function Nc(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var Uc=Mc[Wc],qc=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),Vc=Nc(Uc)?Uc:Mc[Wc]=qc(),Gc=Vc.landed,Kc=Vc.noVet,Xc=Vc.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...Gc])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return Gc.add(e),()=>{Gc.delete(e)}}function setHealthPlanNoVet(petRef,e){if((Xc.get(petRef)??false)!==e){e?Xc.set(petRef,true):Xc.delete(petRef);for(let t of[...Kc])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return Xc.get(petRef)??false}function onHealthPlanNoVet(e){return Kc.add(e),()=>{Kc.delete(e)}}function Yc(e){let{petRef:petRef,noVet:t,blanksFacts:r,store:i,say:l,line:a}=e,[c,d]=n(()=>healthPlanNoVet(petRef));o(()=>(d(healthPlanNoVet(petRef)),onHealthPlanNoVet((e,t)=>{e===petRef&&d(t)})),[petRef]);let u=t??c,[p,h]=n(null),g=s(false);o(()=>(g.current=false,onHealthPlanRecordsLanded((e,t)=>{e===petRef&&t==="host"&&(g.current=true)})),[petRef]);let f=r?.phase??null,m=r?.requestId??null,y=s({say:l,line:a});return y.current={say:l,line:a},o(()=>{if(m===null)return;let e=true,t=()=>{let t=i.readBlanksMemo(petRef);if(f==="wait"){t.waited!==m&&i.writeBlanksMemo(petRef,{...t,waited:m});return}!e||t.flashed===m||(i.writeBlanksMemo(petRef,{...t,flashed:m}),!(t.waited!==m&&!g.current)&&(g.current=false,h(m),y.current.line!==""&&y.current.say(y.current.line),notifyHealthPlanRecordsLanded(petRef,"plan")))};return i.loadBlanksMemo===void 0?t():i.loadBlanksMemo(petRef).then(t),()=>{e=false}},[f,m,petRef,i]),{noVet:u,flashKey:p}}function Jc(e){let{shop:t,ordersOpen:n,subsRepo:r,petRef:petRef,everfurOrders:i,setEverfurOrders:l,say:a}=e,c=s(false),d=s(false),u=s(a);return u.current=a,o(()=>{if(!t||!n)return;let e=true;return c.current=true,_c(r,petRef,null).then(t=>{e&&(t.ok?l({loaded:true,orders:t.value.orders,next:t.value.nextCursor,loading:false}):(l(e=>({...e,loaded:true,loading:false})),u.current(t.error.displayMessage)))}),()=>{e=false,c.current=false}},[t,n,petRef,r]),{moreOrders:()=>{let e=i.next;e===null||d.current||(d.current=true,l(e=>({...e,loading:true})),_c(r,petRef,e).then(async e=>{let t=!e.ok&&Lc(e.error)?await _c(r,petRef,null):null;if(d.current=false,!!c.current){if(t!==null){t.ok?l({loaded:true,orders:t.value.orders,next:t.value.nextCursor,loading:false}):(l(e=>({...e,next:null,loading:false})),u.current(t.error.displayMessage));return}if(e.ok){let t=e.value;l(e=>$c(e,t))}else l(e=>({...e,loading:false})),u.current(e.error.displayMessage)}}))}}}var Qc=.5,Zc=90,ed=1,td=200,nd=2600,rd={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)};function id(e,t,r,i){let{design:l,item:c,petRef:petRef,petName:d,locale:u}=e,{store:p,callHost:h}=r,g=r.clock??rd,f=ae(),{runtime:m}=oe(),y=useHealthPlanSubscription({petRef:petRef,productId:c.productId,enabled:e.subscriptions!==false&&l.pick.none!==true,...e.subscriptionRepository?{repository:e.subscriptionRepository}:{},...e.lifecycle!==void 0?{lifecycle:e.lifecycle}:{},...e.refreshKey!==void 0?{refreshKey:e.refreshKey}:{}}),[b,k]=n("sub"),[w,v]=n(false),[x,S]=n(()=>/* @__PURE__ */new Set),[T,C]=n(null),[I,H]=n(null),F=s(null),[R,P]=n(null),z=s(null),D=s(g);D.current=g,o(()=>()=>{z.current!==null&&D.current.clearTimeout(z.current)},[]);let $=e=>[e,t.trackingComesByText].filter(e=>e!=="").join(" "),O=e=>{i.dropEmptyToast&&e===""||(P(e),z.current!==null&&g.clearTimeout(z.current),z.current=g.setTimeout(()=>P(null),nd))},B=e.checkout==="everfur_stripe"&&i.checkoutReachable,_=useHealthPlanPageRepository(),L=e.pageRepository??_,E=s(null),[A,j]=n(false),W=e.shop??B,[M,N]=n(()=>W?p.readCart(petRef):[]),U=s(M);o(()=>{if(!W||p.loadCart===void 0)return;let e=true;return p.loadCart(petRef).then(()=>{if(!e)return;let t=p.readCart(petRef);U.current.length===0&&t.length>0&&(U.current=t,N(t))}),()=>{e=false}},[W,p,petRef]);let q=a(e=>{let t=e(U.current);U.current=t,p.writeCart(petRef,t),N(t)},[petRef,p]),[V,G]=n([]),K=useHealthPlanSubscriptionRepository(),X=e.subscriptionRepository??K,[Y,J]=n(Hc),[Q,Z]=n(false),[ee,te]=n(false),[ne,re]=n([]),ie=e.others??[],le=[c,...ie],se=zc(ne,Y.orders),ce=e.shopOrders??[],de=e=>Oc(e,se,ce),ue=a(e=>{C(null),G(t=>Fc(t,e))},[]),he=V.length>0?V[V.length-1]:void 0,ge=Rc(T,I,he),fe=Pc(I,he),me=a(()=>{C(null),H(null),G([])},[]),ye=a(()=>{T!==null?C(null):I!==null?H(null):G(e=>e.slice(0,-1))},[T,I]),be=(e=>{switch(e){case"started":return I?.kind==="once"?t.placedHeader:t.startedHeader;case"cart":return t.cartTitle;case"placed":return t.placedHeader;case"orders":return t.orders;case"order":return t.orderTitle(de(he?.kind==="order"?he.key:null));case"product":{let e=he?.kind==="product"?he.productId:null;return e===null?void 0:le.find(t=>t.productId===e)?.title}default:return}})(fe),ke=fe==="started"||fe==="cart"||fe==="placed"||fe==="product",we=e.onOverlayChange,ve=s(h);ve.current=h,o(()=>{we!==void 0&&ve.current(we,ge,{close:me,back:ye,...be===void 0?{}:{title:be},...ke?{full:ke}:{}})},[ge,we,me,ye,be,ke]);let xe=y.phase==="ready"?y.quote:null,Se=y.subscription,Te=Se?.status==="active",Ce=(xe?.boxPrice??c.price)!==null,Ie=xe!==null&&(!i.subscribeNeedsPrice||Ce),He=Ie&&xe.offerApplies&&Se===null,Fe=Te?Se.intervalDays:Ie?xe.defaultIntervalDays:0,Re=(t,n)=>formatHealthPlanPriceWith(t,n,{dropZeroCents:false,...e.priceFormat,...u?{locale:u}:{}}),Pe=(t,n)=>formatHealthPlanPriceWith(t,n,{dropZeroCents:true,...e.priceFormat,...u?{locale:u}:{}}),ze=xe?.currency??c.currency,De=xe?.boxPrice??c.price,$e=xe?.oneBox??null,Oe=(e,t=c.title)=>({petName:d,productName:t,first:Re(He&&xe?xe.firstBoxPrice:De,ze),box:Re(De,ze),once:Re($e?.price??De,ze),onceDiscountPercent:$e?.discountPercent??0,intervalDays:e,discountPercent:He&&xe?xe.firstBoxDiscountPercent:0,offer:He}),Be=Oe(Fe),_e=Be.box!==null,Le=Ie?b:"once",Ee=e=>formatHealthPlanDay(e,u),Ae=e=>Ee(e.timeline.find(e=>e.step==="next_box_ships")?.on??e.nextBoxDate),je=(t=c)=>{e.onBuy?h(e.onBuy,t):e.onCheckout&&h(e.onCheckout,[t])},We=e.onBuy!==void 0||e.onCheckout!==void 0,Me=t=>t.ok?(e.onSubscriptionChange&&h(e.onSubscriptionChange,t.value),t.value):(O(t.error.displayMessage),null),Ne=async(e,t,n=c)=>{if(A)return;let i=r.returnUrls();if(i===null)return;let o=`${n.productId}:${e}:${t??""}`;E.current?.sig!==o&&(E.current={sig:o,key:r.mintKey()}),j(true);let l=await L.startCheckout(petRef,{productId:n.productId,purchase:e,...t===null?{}:{intervalDays:t},...i},E.current.key);if(j(false),!l.ok){O(l.error.displayMessage);return}p.rememberCheckout(petRef,l.value.checkoutId),r.openUrl(l.value.url)},Ue=e=>le.find(t=>t.productId===e),qe=e=>M.find(t=>t.productId===e),Ve=e=>e===c.productId,Ge=e=>Ve(e.productId)&&Ie&&!Te&&e.mode==="sub",Ke=e=>Ve(e.productId)?Ge(e)?He&&xe?xe.firstBoxPrice:De:$e?.price??De:Ue(e.productId)?.price??null,Xe=M.filter(e=>Ue(e.productId)!==void 0),Ye=Xe.reduce((e,t)=>e+t.qty,0),Je=Ec(Xe.reduce((e,t)=>e+(Ke(t)??0)*t.qty,0)),Qe=Xe.find(Ge)??null,Ze=B&&!Q&&L.startCartCheckout!==void 0,et=!B&&e.onCheckoutLines!==void 0,tt=Ze||et,nt=(e,t)=>{let n=/^[^\d]*(\d+(?:\.\d{1,2})?)[^\d]*$/.exec(e.replace(/,/g,""));return(n?Re(Number(n[1]),t??ze):null)??e},rt=e=>{let n=Ue(e.productId)??c,r=Ge(e),o=Ve(e.productId),a=o||!i.linesFromExtras?void 0:l.extras?.items.find(t=>t.productId===e.productId),s=o?Oe(e.every,n.title):{...Oe(0,n.title),offer:false};return{key:e.productId,name:n.title,imageUrl:n.imageUrl??a?.imageUrl??null,quantity:e.qty,subscription:r,price:Re(Ke(e),o?ze:n.currency),was:o?r?He?s.box:null:$e!==null&&De!==null&&$e.price<De?s.box:null:a?.was?nt(a.was,n.currency):null,note:o?r?t.cartSubLine(s):t.cartOnceLine(s,Te):null,...i.linesFromExtras?{tag:a?.tag??null}:{},modes:o&&Ie&&!Te?{label:t.cartModeLabel(n.title),sub:{label:t.cartModeSubscribe(s),price:s.first},once:{label:t.cartModeOnce(s),price:s.once}}:null,every:r&&xe!==null?{options:xe.intervalOptions,selected:e.every}:null,maxQuantity:tt&&!r?5:1,lp:s}},it=Xe.map(rt),ot=Qe===null?null:Oe(Qe.every),lt=(e,n,r=1,i=false)=>{if(qe(e.productId)){ue({kind:"cart"});return}let o=Ve(e.productId)&&Ie&&!Te&&n==="sub",l=o?1:Math.max(1,Math.min(tt?5:1,r));q(t=>[...t,{productId:e.productId,mode:o?"sub":"once",every:xe?.defaultIntervalDays??0,qty:l}]),i||O(t.addedToCart(Ve(e.productId)?Be:{...Oe(0,e.title),offer:false},o))},at=()=>G(e=>{let t=e.findIndex(e=>e.kind==="cart");return t>=0?e.slice(0,t+1):[...e,{kind:"cart"}]}),st=(e,t)=>q(n=>Bc(n,e,t)),ct=(e,t)=>st(e,e=>({...e,qty:Math.max(1,Math.min(tt&&!Ge(e)?5:1,e.qty+t))})),dt=e=>{st(e,()=>null),O(t.removedFromCart(Ue(e)?.title??""))},ut=Ze&&Qe!==null&&Xe.length>1,pt=ut?Xe.filter(e=>!Ge(e)):Xe,ht=Ec(pt.reduce((e,t)=>e+(Ke(t)??0)*t.qty,0)),gt=pt.find(Ge)??null,ft=gt===null?null:Oe(gt.every),mt=Xe.length>0&&Xe.every(e=>Ke(e)!==null)&&(Xe.length===1&&(Xe[0]?.qty??0)===1?true:Ze?pt.length>0&&pt.length<=10:!B&&(e.onCheckout!==void 0||et)&&Xe.every(e=>!Ge(e))),yt=async e=>{if(A||L.startCartCheckout===void 0)return;let n=r.returnUrls();if(n===null)return;let i=`cart:${e.map(e=>`${e.productId}:${e.qty}:${Ge(e)?e.every:""}`).join("|")}`;E.current?.sig!==i&&(E.current={sig:i,key:r.mintKey()}),j(true);let o=await L.startCartCheckout(petRef,{items:e.map(e=>{let t=Ge(e);return{productId:e.productId,purchase:t?"subscription":"one_box",...t?{intervalDays:e.every}:{},quantity:t?1:e.qty}}),...n},E.current.key);if(j(false),!o.ok){let e=healthPlanCheckoutRefusal(o.error);if(e==="cart_disabled"){Z(true),C(null),O(t.cartOneAtATime===""?o.error.displayMessage:t.cartOneAtATime);return}if(e==="cart_has_subscription"){C(null),O(t.cartSubscriptionApart===""?o.error.displayMessage:t.cartSubscriptionApart);return}O(o.error.displayMessage);return}p.rememberCheckout(petRef,o.value.checkoutId),r.openUrl(o.value.url)},bt=async()=>{F.current===null&&(F.current=r.mintKey());let t=await y.buyOneBox(F.current);return t.ok?(F.current=null,e.onOneBoxOrder&&h(e.onOneBoxOrder,t.value),t.value):(O(t.error.displayMessage),null)},kt=async()=>{if(!mt)return;if(B&&Ze&&!(pt.length===1&&(pt[0]?.qty??0)===1)){pt.map(e=>Ue(e.productId)).filter(e=>e!==void 0);pe(f,petRef,{count:pt.reduce((e,t)=>e+t.qty,0),subtotal:ht,currency:ze}),await yt(pt);return}if(et&&!(Xe.length===1&&(Xe[0]?.qty??0)===1)){let t=Xe.flatMap(e=>{let t=Ue(e.productId);return t===void 0?[]:[{item:t,quantity:e.qty}]});pe(f,petRef,{items:t.map(e=>e.item),count:t.reduce((e,t)=>e+t.quantity,0),subtotal:Je,currency:ze}),qt(Xe.map(e=>e.productId)),C(null),G([]),e.onCheckoutLines&&h(e.onCheckoutLines,t);return}let t=pt.length===1?pt[0]:Xe.length===1?Xe[0]:void 0;if(t===void 0){e.onCheckout&&h(e.onCheckout,Xe.map(e=>Ue(e.productId)).filter(e=>e!==void 0));return}let n=Ue(t.productId)??c,r=Ge(t);if(pe(f,petRef,{count:1,subtotal:Ke(t),currency:Ve(t.productId)?ze:n.currency}),B){await Ne(r?"subscription":"one_box",r?t.every:null,n);return}if(r){let e=Me(await y.subscribe(t.every));if(e===null)return;qt([e.productId]),C(null),G([]),H({kind:"sub",sub:e});return}if(!Ve(t.productId)||$e===null){C(null),et&&(qt([t.productId]),G([])),je(n);return}let i=await bt();i!==null&&(qt([i.productId]),Ut([i]))},wt=()=>{if(pe(f,petRef,{count:1,subtotal:c.price,currency:c.price===null?null:c.currency}),!Ie){B?Ne("one_box",null):je();return}F.current=null,C({kind:"checkout",mode:Le,every:xe.defaultIntervalDays})},vt=e=>{pe(f,petRef,{count:1,subtotal:e.price,currency:e.price===null?null:e.currency}),B?Ne("one_box",null,e):je(e)},xt=async()=>{if(T?.kind!=="checkout")return;let e=T.mode==="sub";if(B){await Ne(e?"subscription":"one_box",e?T.every:null);return}if(!e){if($e===null){C(null),je();return}let e=await bt();if(e===null)return;C(null),Ut([e]);return}let t=Me(await y.subscribe(T.every));t!==null&&(C(null),H({kind:"sub",sub:t}))},St=e=>{Se===null||e===Se.intervalDays||y.changeInterval(e).then(Me)},Tt=async()=>{let e=Me(await y.skip());e!==null&&O(t.skipped(Oe(e.intervalDays),Ae(e)))},Ct=async()=>{let e=Oe(Se?.intervalDays??Fe);Me(await y.cancel())!==null&&(C(null),k("sub"),O(t.cancelled(e)))},It=()=>{C(null),he?.kind!=="orders"&&ue({kind:"orders"})},Ht=t=>{let n=!w;v(n),e.onAddToVisit&&h(e.onAddToVisit,n,t)},Ft=(t,n)=>{let r=!n;S(e=>{let n=new Set(e);return r?n.add(t):n.delete(t),n}),e.onExtra&&h(e.onExtra,t,r)},Rt=(e,t,n)=>{if(t!==void 0){W?lt(t,"once"):vt(t);return}Ft(e,n)},Pt=V.some(e=>e.kind==="orders"||e.kind==="order"),{moreOrders:zt}=Jc({shop:W,ordersOpen:Pt,subsRepo:X,petRef:petRef,everfurOrders:Y,setEverfurOrders:J,say:O}),Dt=e.weightKnown!==false||ee,$t=e.weightUnit==="kg",[Ot,Bt]=n(""),[_t,Lt]=n(""),[Et,At]=n(false),jt=()=>{Lt(""),C({kind:"weight"})},Wt=async()=>{let n=Math.round(Number.parseFloat(Ot.replace(",","."))*10)/10;if(!($t?n>=Qc&&n<=Zc:n>=ed&&n<=td)){Lt($t?t.weightErrorKg:t.weightError);return}let{weightKg:r,pounds:i}=jc(n,$t);At(true);let o=e.onSaveWeight?await e.onSaveWeight(r,i):await m.updatePet(petRef,{weightKg:r});if(At(false),!o.ok){Lt(o.error.displayMessage);return}Lt(""),te(true),C(null),O($t?t.weightSavedKg(String(n)):t.weightSaved(String(i))),e.onWeightSaved&&h(e.onWeightSaved,r)},{noVet:Mt,flashKey:Nt}=Yc({petRef:petRef,noVet:e.noVet,blanksFacts:e.blanksFacts,store:p,say:O,line:t.recordsLanded}),Ut=e=>{let t=e[0];if(t!==void 0){if(!W){H({kind:"once",order:t});return}re(t=>Dc(t,e)),C(null),G([{kind:"placed",orders:e}])}},qt=e=>{let t=new Set(e.filter(e=>e!==null));t.size>0&&q(e=>e.filter(e=>!t.has(e.productId)))};return{sub:y,copy:t,everfur:B,shop:W,partnerBuys:We,redirecting:A,pages:L,quote:xe,subscription:Se,active:Te,canSubscribe:Ie,offer:He,every:Fe,currency:ze,boxPrice:De,oneBox:$e,pr:Be,priced:_e,mode:b,buyMode:Le,fmt:Re,fmtWhole:Pe,prices:Oe,day:Ee,nextBoxDay:Ae,withTracking:$,sheet:T,started:I,screens:V,top:he,overlay:ge,under:fe,title:be,full:ke,toast:R,added:w,extras:x,planItems:le,cart:M,lines:Xe,lineCount:Ye,cartTotal:Je,subLine:Qe,cartOn:Ze,hostLines:et,boxesOn:tt,wasOf:nt,views:it,renewPrices:ot,apart:ut,batch:pt,batchTotal:ht,batchSub:gt,batchRenew:ft,cartReady:mt,itemOf:Ue,inCart:qe,isPick:Ve,lineSub:Ge,unitOf:Ke,lineView:rt,everfurOrders:Y,ownOrders:se,orderNumber:de,weightKnown:Dt,kg:$t,weightInput:Ot,weightError:_t,savingWeight:Et,noVet:Mt,flashKey:Nt,say:O,setMode:k,openSheet:C,closeSheet:()=>C(null),push:ue,replaceScreens:G,closeStarted:()=>H(null),closeOverlays:me,back:ye,toggleAdded:Ht,toggleExtra:Ft,pressExtra:Rt,buyOnce:je,press:wt,pressOther:vt,confirmCheckout:xt,changeInterval:St,skip:Tt,cancel:Ct,seeOrdersFromManage:It,addToCart:lt,showCart:at,editLine:st,stepQuantity:ct,removeLine:dt,placeCart:kt,moreOrders:zt,openWeight:jt,setWeightInput:Bt,saveWeight:Wt,returnHandlers:{onPaid:t=>{let n=t.subscription,r=t.orders??(t.order===null?[]:[t.order]);if(n!==null)e.onSubscriptionChange&&h(e.onSubscriptionChange,n),i.closeOnReturn&&(C(null),G([])),H({kind:"sub",sub:n});else if(r.length>0){for(let t of r)e.onOneBoxOrder&&h(e.onOneBoxOrder,t);Ut(r)}qt([n?.productId??null,...r.map(e=>e.productId)]),y.refresh()},onFailed:()=>{C(null),W&&(i.closeOnReturn&&H(null),G([{kind:"cart"}])),t.checkoutFailed!==""&&O(t.checkoutFailed)},onCancel:()=>j(false),onTimeout:()=>{W&&(C(null),i.closeOnReturn&&H(null),G([{kind:"orders"}]))},onError:e=>O(e.displayMessage)}}}function od(e,petRef){let[t,r]=n(null);return o(()=>{if(e===void 0)return;let t=true;return e.getRecord(petRef).then(e=>{t&&r(e.ok?e.value.withheld!==true&&e.value.is_empty===true:null)}).catch(()=>{}),()=>{t=false}},[e,petRef]),t}var ld="Close",ad=/* @__PURE__ */Object.freeze({action:e=>e.possessive===null?null:`See ${e.possessive} Health Plan`,ask:"What does it mean?",askPrompt:(e,t)=>e.risk?.lead?`${e.risk.lead} ${t}`:`${e.title}: ${t}`,close:e=>e.possessive===null?null:`Close ${e.possessive} focus`,resultsKicker:e=>e.possessive===null?null:`${sd(e.possessive)} results`,resultsClose:e=>e.possessive===null?null:`Close ${e.possessive} results`,resultsTopRisk:"Top risk"});function sd(e){return e.charAt(0).toUpperCase()+e.slice(1)}function healthPlanPossessive(e){let t=typeof e.sex=="string"?e.sex.trim().toLowerCase():null;if(t==="female")return"her";if(t==="male")return"his";let n=typeof e.name=="string"?e.name.trim():"";return n!==""?`${n}'s`:null}function healthPlanTopCard(e,t={}){let n=e?.page?.focus;if(e===null||n===void 0||n.title.trim()===""||n.kicker.trim()==="")return;let r={...ad,...t.copy},i={pet:e.pet,possessive:healthPlanPossessive(e.pet)},o=n.sources?.find(e=>e.label.trim()!=="")?.label,l=t.onOpenPlan,a=l===void 0?null:r.action(i),s=r.close(i),c=r.ask.trim(),d=t.results!==void 0&&n.report!==void 0?t.results:void 0;if(d!==void 0){let e=r.resultsKicker(i)?.trim()||n.kicker,s=r.resultsClose(i),u=d.onTopRisk??l,p={key:"top-risk",label:r.resultsTopRisk,title:n.title,...n.risk?.lead?{line:n.risk.lead}:{},tone:"risk",...u===void 0?{}:{onPress:u}};return{kicker:e,...o===void 0?{}:{badge:o},title:n.title,results:[p,...d.rows??[]],...a===null||a.trim()===""||l===void 0?{}:{action:{label:a,onPress:l}},...c===""?{}:{ask:{label:c,prompt:r.askPrompt(n,c)}},closeLabel:s===null||s.trim()===""?ld:s,pill:e,...t.renderIcon===void 0?{}:{renderIcon:t.renderIcon}}}return{kicker:n.kicker,...o===void 0?{}:{badge:o},title:n.title,...n.risk?.lead?{lead:n.risk.lead}:{},...n.risk?.body?{body:n.risk.body}:{},...a===null||a.trim()===""||l===void 0?{}:{action:{label:a,onPress:l}},...c===""?{}:{ask:{label:c,prompt:r.askPrompt(n,c)}},closeLabel:s===null||s.trim()===""?ld:s,pill:n.kicker,...t.renderIcon===void 0?{}:{renderIcon:t.renderIcon}}}var cd=/* @__PURE__ */Object.freeze({...Ic,firstBoxShips:"Her first box ships.",placedShips:"It ships.",trackingComesByText:"",trackingByText:"",moreOrders:"Load more",checkoutFailed:"That didn't go through. Please try again.",back:"Back"}),dd=e=>e===""?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function healthPlanPetCopy(e){let t=e.name?.trim()??"",n=healthPlanPossessive(e)??"your pet's",r=dd(n),i=e.sex==="female"?"her":e.sex==="male"?"him":t!==""?t:"your pet",o=Ic,l=healthPlanFocusCopyFor({name:e.name,sex:e.sex});return{jumpKicker:(e,t)=>t?`In ${n} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${n} first box`:o.jumpKicker(e,false),firstBoxShips:e.trackingTexts===true?`${r} first box ships. Tracking comes by text.`:`${r} first box ships.`,placedShips:o.placedShips,trackingComesByText:e.trackingTexts===true?o.trackingComesByText:"",trackingByText:e.trackingTexts===true?o.trackingByText:"",refill:`A text 3 days before ${n} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${r} next box ships, ${e.box??""}.`,startedDone:`Back to ${n} plan`,skipped:(e,t)=>t===null?"Skipped.":`Skipped. ${r} next box ships ${t}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${n} plan anytime.`,seeOrders:`See ${n} orders`,cartOnceLine:(e,t)=>t?`An extra box. ${r} plan keeps shipping.`:o.cartOnceLine(e,false),herSubscription:`${r} subscription`,ordersHeading:e=>e?"Orders":`${r} orders`,addWeightTitle:`Add ${n} weight to size ${n} dose`,addWeightBody:`From a home scale or ${n} last vet visit.`,connectRecordsTitle:`Connect ${n} vet records`,connectRecordsBody:`${r} weight, visits and labs make ${n} plan sharper.`,weightKicker:`${r} weight`,weightBody:`From a home scale or ${n} last vet visit. ${r} plan uses it to size ${n} dose.`,weightField:`${r} weight`,weightError:`Enter ${n} weight in pounds, like 14.1.`,weightSave:`Save ${n} weight`,weightSaved:e=>`Saved: ${e} lb. ${r} dose is sized for ${i}.`,weightErrorKg:l.weightErrorKg,weightSavedKg:l.weightSavedKg,signalsFit:l.signalsFit,noPick:l.noPick,saveForCheckup:l.saveForCheckup,savedForCheckup:l.savedForCheckup,blanksLabel:l.blanksLabel,blanksFilledKicker:l.blanksFilledKicker,blanksWeight:l.blanksWeight,blanksWeightSource:l.blanksWeightSource,blanksDoseSource:l.blanksDoseSource,blanksShots:l.blanksShots,blanksShotsSource:l.blanksShotsSource,recordsLanded:l.recordsLanded}}var ud="everfur.healthPlan.blanks",pd=/* @__PURE__ */Object.freeze({waited:null,flashed:null}),hd=/* @__PURE__ */new Map,gd=/* @__PURE__ */new Map,fd=petRef=>`${ud}:${petRef}`;function md(e){if(e===null)return pd;try{let t=JSON.parse(e);if(t===null||typeof t!="object")return pd;let n=t;return{waited:typeof n.waited=="string"?n.waited:null,flashed:typeof n.flashed=="string"?n.flashed:null}}catch{return pd}}function yd(e,petRef){let t=hd.get(petRef);if(t!==void 0)return Promise.resolve(t);let n=gd.get(petRef);return n===void 0&&(n=(async()=>{let t=pd;try{t=e?md(await e.getItem(fd(petRef))):pd}catch{}let n=hd.get(petRef)??t;return hd.set(petRef,n),n})(),gd.set(petRef,n)),n}function bd(petRef){return hd.get(petRef)??pd}function kd(e,petRef,t){if(hd.set(petRef,t),!!e)try{e.setItem(fd(petRef),JSON.stringify(t)).catch(()=>{})}catch{}}var wd="everfur_checkout",vd="everfur_checkout_cancel",xd="{CHECKOUT_SESSION_ID}",Sd=2e3,Td=30;function Cd(e){return typeof e!="string"?false:/^https:\/\/[^/?#\s]+[^\s]*$/i.test(e.trim())}var Id=new RegExp(`([?&])(?:${wd}|${vd})=[^&#]*&?`,"g");function Hd(e,t,n){let r=e.indexOf("#"),i=r===-1?"":e.slice(r),o=r===-1?e:e.slice(0,r);o=o.replace(Id,"$1").replace(/[?&]$/,"");let l=o.includes("?")?"&":"?";return`${o}${l}${t}=${n}${i}`}function Fd(e,t){let n=e=>e.split(/[?#]/)[0]?.replace(/\/+$/,"").toLowerCase()??"";if(n(e)!==n(t))return null;let r=e.split("#")[0]?.split("?")[1]??"",i=/* @__PURE__ */new Map;for(let e of r.split("&")){if(e==="")continue;let t=e.indexOf("="),n=t===-1?e:e.slice(0,t),r=t===-1?"":e.slice(t+1);try{r=decodeURIComponent(r)}catch{}i.set(n,r)}if(i.has(vd))return{kind:"cancel"};let o=i.get(wd);return o===void 0?null:{kind:"return",sessionId:o===""||o===xd?null:o}}function Rd(){let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`tap-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`}var Pd="everfur.healthPlan.cart",zd="everfur.healthPlan.checkout",Dd=/* @__PURE__ */new Map,$d=/* @__PURE__ */new Map,Od=/* @__PURE__ */new Set,Bd=/* @__PURE__ */new Set,_d=/* @__PURE__ */new WeakMap,Ld=Promise.resolve();function Ed(e){if(e===null)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>{if(e===null||typeof e!="object")return[];let t=e,n=t.productId,r=t.mode,i=t.every,o=t.qty;return typeof n!="string"||r!=="sub"&&r!=="once"||typeof i!="number"||typeof o!="number"?[]:[{productId:n,mode:r,every:i,qty:Math.max(1,Math.min(r==="sub"?1:5,Math.round(o)))}]}):[]}catch{return[]}}function Ad(e,t,n){if(e)try{(n===null?e.removeItem(t):e.setItem(t,n)).catch(()=>{})}catch{}}function jd(e,petRef){if(!e)return Ld;let t=_d.get(e);t===void 0&&(t=/* @__PURE__ */new Map,_d.set(e,t));let n=t.get(petRef);return n===void 0&&(n=(async()=>{let t=[],n=null;try{let[r,i]=await Promise.all([e.getItem(`${Pd}:${petRef}`),e.getItem(`${zd}:${petRef}`)]);t=Ed(r),n=typeof i=="string"&&i!==""?i:null}catch{}!Bd.has(petRef)&&t.length>0&&$d.set(petRef,t),!Od.has(petRef)&&n!==null&&Dd.set(petRef,n)})(),t.set(petRef,n)),n}function Wd(petRef,e,t){Od.add(petRef),Dd.set(petRef,e),Ad(t,`${zd}:${petRef}`,e)}function Md(petRef){return Dd.get(petRef)??null}function Nd(petRef,e){Od.add(petRef),Dd.delete(petRef),Ad(e,`${zd}:${petRef}`,null)}function Ud(petRef){return $d.get(petRef)??[]}function qd(petRef,e,t){Bd.add(petRef),e.length===0?$d.delete(petRef):$d.set(petRef,e),Ad(t,`${Pd}:${petRef}`,e.length===0?null:JSON.stringify(e))}function Vd(e){return{readCart:Ud,writeCart:(petRef,t)=>qd(petRef,t,e),loadCart:petRef=>jd(e,petRef),rememberCheckout:(petRef,t)=>Wd(petRef,t,e),readBlanksMemo:bd,writeBlanksMemo:(petRef,t)=>kd(e,petRef,t),loadBlanksMemo:petRef=>yd(e,petRef)}}var Gd=/* @__PURE__ */Object.freeze({dropEmptyToast:true,subscribeNeedsPrice:false,closeOnReturn:true,linesFromExtras:false});var Kd=/* @__PURE__ */new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review"]),Xd=/vaccin|rabies|dhpp|booster|bordetella|lepto|lyme|parvo|distemper/i,Yd=2.20462262;function Jd(e){if(e==null||e.length===0)return null;let t=Date.parse(/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e);return Number.isNaN(t)?null:t}function Qd(e,t){return e===null||!Number.isFinite(e)||e<=0||t===null?null:/^\s*kg|kilo/i.test(t)?e:/^\s*(lb|lbs|pound)/i.test(t)?e/Yd:null}function healthPlanRecordsWeightKg(e){if(e===null||e.isEmpty||e.withheld)return null;let t=[];for(let n of e.entitySeries)if(n.key.startsWith("body_weight"))for(let e of n.points){if(e.origin==="owner_reported")continue;let n=Jd(e.at),r=e.display?.replace(/^[\d.,\s]+/,"")??null,i=Qd(e.value,r);n!==null&&i!==null&&t.push({at:n,kg:i})}for(let n of e.entities){if(n.category!=="body_weight"||n.origin==="owner_reported")continue;let e=Jd(n.observedAt),r=Qd(n.value===null?null:Number.parseFloat(n.value),n.unit);e!==null&&r!==null&&t.push({at:e,kg:r})}return t.length===0?null:(t.sort((e,t)=>t.at-e.at),t[0]?.kg??null)}function healthPlanNextShotsAt(e,t){if(e===null||e.isEmpty||e.withheld)return null;let n=null;for(let r of e.forwardLooking){if(!Xd.test(r.title))continue;let e=Jd(r.dueAt);e===null||e<t||(n===null||e<n)&&(n=e)}return n}function Zd(e){return e.filter(e=>e.source==="clinic_request").slice().sort((e,t)=>(Jd(t.createdAt)??0)-(Jd(e.createdAt)??0))[0]}function eu(e,t){let n=Zd(e.requests);if(n===void 0||n.status!=="published"||e.record===null||e.record.withheld)return false;let r=Math.floor(t/864e5)*864e5;return healthPlanRecordsWeightKg(e.record)===null&&healthPlanNextShotsAt(e.record,r)===null}function healthPlanBlanksFacts(e,t){let n=Zd(e.requests);if(n===void 0)return null;let r=n.clinicName?.trim()?n.clinicName.trim():null;if(Kd.has(n.status))return{phase:"wait",requestId:String(n.id),clinicName:r,weightKg:null,nextShotsAt:null};if(n.status!=="published"||e.record===null||e.record.isEmpty||e.record.withheld)return null;let i=Math.floor(t/864e5)*864e5,o=healthPlanRecordsWeightKg(e.record),l=healthPlanNextShotsAt(e.record,i);return o===null&&l===null?null:{phase:"filled",requestId:String(n.id),clinicName:r,weightKg:o,nextShotsAt:l}}var tu=3600*1e3;function nu(e,t=true){let[r,i]=n(()=>Date.now()),l=s(true);return o(()=>{if(l.current){l.current=false;return}t&&i(Date.now())},[e,t]),o(()=>{if(!t)return;let e=setInterval(()=>i(Date.now()),tu),n=()=>{document.visibilityState==="visible"&&i(Date.now())},r=typeof document<"u"&&typeof document.addEventListener=="function"?document:null;return r?.addEventListener("visibilitychange",n),()=>{clearInterval(e),r?.removeEventListener("visibilitychange",n)}},[e,t]),r}function RecordsProbe(e){let{status:t,requests:n,record:i,refresh:l}=useEverfurRecords({petRef:e.petRef}),{onRead:a,petRef:petRef}=e,c=nu(),d=r(()=>healthPlanBlanksFacts({requests:n,record:i},c),[n,i,c]),u=r(()=>eu({requests:n,record:i},c),[n,i,c]);o(()=>{a({missing:t==="empty"||u,blanks:d})},[t,u,d,a]);let p=s(l);return p.current=l,o(()=>onHealthPlanRecordsLanded((e,t)=>{e===petRef&&t==="host"&&p.current()}),[petRef]),null}var ru=/* @__PURE__ */new Set;function iu(e){let{enabled:t,petRef:petRef,pages:n,returnUrl:r,lifecycle:i,kv:l}=e,a=s(e);a.current=e,o(()=>{if(!t||r===null)return;let e=true,o=false,s=0,c=null,d=async(t,r,i)=>{let u=await n.getCheckout(petRef,t);if(!(!e||i!==s)){if(u.ok&&u.value.status==="paid"){o=false,Nd(petRef,l),a.current.onPaid(u.value);return}if(u.ok&&(u.value.status==="failed"||u.value.status==="expired")){o=false,Nd(petRef,l),a.current.onFailed();return}if(!u.ok&&!u.error.retryable){o=false,Nd(petRef,l),a.current.onError(u.error);return}if(r<=1){o=false,Nd(petRef,l),a.current.onTimeout();return}c=setTimeout(()=>{d(t,r-1,i)},Sd)}},u=e=>{o||(o=true,d(e,Td,s))},p=jd(l,petRef),h=t=>{let n=Fd(t,r);if(n!==null){if(n.kind==="cancel"){s+=1,o=false,c!==null&&clearTimeout(c),c=null,Nd(petRef,l),a.current.onCancel();return}p.then(()=>{if(!e)return;let t=Md(petRef)??n.sessionId;t!==null&&u(t)})}},g=()=>{p.then(()=>{if(!e)return;let t=Md(petRef);t!==null&&u(t)})},f=C.addEventListener("url",e=>h(e.url));C.getInitialURL().then(t=>{!e||t===null||t===void 0||ru.has(t)||Fd(t,r)!==null&&(ru.add(t),h(t))}).catch(()=>{}).then(g);let m;if(i)m=i.onForeground(g);else{let e=I.addEventListener("change",e=>{e==="active"&&g()});m=()=>e.remove()}return()=>{e=false,c!==null&&clearTimeout(c),f.remove(),m()}},[t,petRef,n,r,i,l])}var ou=24,lu=16,au=.8,su=e=>Math.round(e*lu);function cu(e,t,n,r,i,o){let l=e-n/2,a=t-r/2,s=Math.round(l),c=Math.round(a);return{position:"absolute",left:s,top:c,width:n,height:r,transform:[{translateX:l-s},{translateY:a-c},{rotate:`${Math.atan2(o,i)*180/Math.PI}deg`},{scale:1/lu}]}}function du(e,t,n){for(let r of e.strokes){let e=r.width*t,i=r.points,o=i.length/2,l=r.closed?o:o-1;for(let a=0;a<l;a+=1){let l=(a+1)%o,s=(i[a*2]??0)*t,c=(i[a*2+1]??0)*t,d=(i[l*2]??0)*t-s,u=(i[l*2+1]??0)*t-c,p=Math.hypot(d,u);if(p===0&&!(o===2&&r.cap))continue;let h=p===0?1:d/p,g=p===0?0:u/p,f=r.closed||a>0||r.cap?e/2:0,m=r.closed||l!==o-1||r.cap?e/2:0,y=(p+m-f)/2;n.push({paint:"backgroundColor",style:{...cu(s+h*y,c+g*y,su(p+f+m),su(e),h,g),borderTopLeftRadius:f>0?su(e)/2:0,borderBottomLeftRadius:f>0?su(e)/2:0,borderTopRightRadius:m>0?su(e)/2:0,borderBottomRightRadius:m>0?su(e)/2:0,...r.opacity===void 0?{}:{opacity:r.opacity}}})}}}function uu(e,t,n){for(let r of e.boxes){let e=(r.w+r.width)*t,i=(r.h+r.width)*t;n.push({paint:"borderColor",style:{...cu((r.x-r.width/2)*t+e/2,(r.y-r.width/2)*t+i/2,su(e),su(i),1,0),borderWidth:su(r.width*t),borderRadius:(r.radius+r.width/2)*t*lu,...r.opacity===void 0?{}:{opacity:r.opacity}}})}}function pu(e,t,n){for(let r of e.triangles){let e=[0,1,2].map(e=>[(r[e*2]??0)*t,(r[e*2+1]??0)*t]),i=0,o=-1;for(let t=0;t<3;t+=1){let n=e[t]??[0,0],r=e[(t+1)%3]??[0,0],l=Math.hypot(r[0]-n[0],r[1]-n[1]);l>o&&(o=l,i=t)}if(o<=0)continue;let l=e[i]??[0,0],a=e[(i+1)%3]??[0,0],s=e[(i+2)%3]??[0,0],c=(a[0]-l[0])/o,d=(a[1]-l[1])/o,u=(s[0]-l[0])*c+(s[1]-l[1])*d,p=(s[0]-l[0])*-d+(s[1]-l[1])*c,h=Math.abs(p),g=p<0,f=g?-h/2:h/2,m=su(u),y=su(o)-m,b=su(h);n.push({paint:g?"borderBottomColor":"borderTopColor",style:{...cu(l[0]+c*(o/2)-d*f,l[1]+d*(o/2)+c*f,m+y,b,c,d),width:0,height:0,borderLeftWidth:m,borderRightWidth:y,borderLeftColor:"transparent",borderRightColor:"transparent",...g?{borderBottomWidth:b}:{borderTopWidth:b}}})}for(let r of e.seams){let e=(r[0]??0)*t,i=(r[1]??0)*t,o=(r[2]??0)*t-e,l=(r[3]??0)*t-i,a=Math.hypot(o,l),s=au*(r[4]??0),c=au*(r[5]??0),d=a-s-c;if(a===0||d<=0)continue;let u=s+d/2;n.push({paint:"backgroundColor",style:cu(e+o/a*u,i+l/a*u,su(d),su(au),o/a,l/a)})}}var hu=/* @__PURE__ */new Map;function gu(e,t){let n=`${e}:${t}`,r=hu.get(n);if(r!==void 0)return r;let i=bs[e],o=[],l=t/ou;return uu(i,l,o),du(i,l,o),pu(i,l,o),hu.set(n,o),o}function FocusIcon({name:e,size:t=18,color:n}){let r=bs[e]===void 0?[]:gu(e,t);/* @__PURE__ */
|
|
172
|
-
return
|
|
173
|
-
return
|
|
174
|
-
return
|
|
175
|
-
return
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
return
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
return
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
return
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
return
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
return
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
return
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
return
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
return
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
return
|
|
214
|
-
return
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */
|
|
219
|
-
return
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
return
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
return
|
|
226
|
-
return
|
|
227
|
-
return
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
return
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
return
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
/* @__PURE__ */
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
-
return
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
return
|
|
263
|
-
return
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
-
return
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
return
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
return
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
return
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
return
|
|
297
|
-
return
|
|
298
|
-
return
|
|
299
|
-
return
|
|
300
|
-
return
|
|
301
|
-
return
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
return
|
|
312
|
-
return
|
|
313
|
-
return
|
|
314
|
-
return
|
|
315
|
-
return
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
/* @__PURE__ */
|
|
318
|
-
return
|
|
319
|
-
return
|
|
320
|
-
return
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
return
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
return
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
return
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
return
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
return
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
return
|
|
348
|
-
return
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
return
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
return
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
return
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
return
|
|
372
|
-
return
|
|
373
|
-
return
|
|
374
|
-
return
|
|
375
|
-
return
|
|
376
|
-
return
|
|
377
|
-
return Object.freeze(t)}function
|
|
378
|
-
return Object.freeze(t)}function
|
|
379
|
-
return Object.freeze({settings:{},bind:{},actions:{},...e})}var
|
|
380
|
-
return Object.freeze({schema:Ip,slot:e,docVersion:null,minBlocks:1,tokens:{},parts:/* @__PURE__ */Object.freeze([...t]),copy:{}})}var eh=Qp,th=/* @__PURE__ */Object.freeze({"health_plan.focus":Zp("health_plan.focus",[eh.focus,eh.tips]),"today.health":Zp("today.health",[eh.focus,eh.tips]),"shop.shelf":Zp("shop.shelf",[eh.shelf]),"shop.cart":Zp("shop.cart",[eh.cartLines,eh.cartSummary]),"shop.orders":Zp("shop.orders",[eh.orders])});function nh(e){return Object.prototype.hasOwnProperty.call(th,e)?th[e]??null:null}function rh(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function ih(e){let t=3421674724,n=2216829733;for(let r of rh(e)){n=(n^r)>>>0;let e=n*435,i=Math.floor(e/4294967296),o=e>>>0;t=t*435+i+n*256>>>0,n=o}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var oh=/* @__PURE__ */new WeakMap;function lh(e){return oh.get(e)}var ah="sha256-0IDdNTQTtW2+pJ9GBCa/aWJrH/lf2X2jHhTQaCt6g5E=";var sh={CartBar:{since:"0.4.0",variants:["standard","web"],platforms:["native","web"],settings:{lines:{type:"lines",values:["thumbs","total","sub","actionHiddenWord"]},variant:{type:"enum",values:["standard","web"],prop:"variant"}},props:["actionAccessibilityLabel","actionHiddenWord","actionLabel","busy","count","countLabel","disabled","fallback","loading","loadingLabel","sub","testID","thumbs","total","variant","visible"],required:["actionLabel","count"],fallback:"hide"},CartLine:{since:"0.2.0",variants:["standard","square","web","plan","drawer"],platforms:["native","web"],settings:{align:{type:"enum",values:["top","center"],prop:"align"},lines:{type:"lines",values:["badge","meta","wasPrice","smalls","note","metas","plan"]},thumbSize:{type:"enum",values:["sm","md","lg"],prop:"thumbSize"},variant:{type:"enum",values:["standard","square","web","plan","drawer"],prop:"variant"}},props:["actions","align","badge","error","fallback","image","imageAlt","loading","loadingLabel","meta","metas","name","namePress","note","plan","price","quantity","removeLabel","smalls","testID","thumbSize","variant","wasPrice"],required:["name"],fallback:null},CheckinSheet:{since:"0.4.0",variants:[],platforms:["native","web"],settings:{lines:{type:"lines",values:["kicker","note","doneText"]}},props:["action","closeLabel","doneText","fallback","flowLabel","image","imageKind","kicker","loading","loadingLabel","note","open","steps","testID","title"],required:["steps"],fallback:"hide"},OrderRow:{since:"0.2.0",variants:["standard","quiet","web"],platforms:["native","web"],settings:{actionGrid:{type:"boolean",prop:"actionGrid"},lines:{type:"lines",values:["meta","total","status","shots","notes"]},variant:{type:"enum",values:["standard","quiet","web"],prop:"variant"}},props:["accessibilityLabel","actionGrid","actions","error","loading","loadingLabel","meta","metaLink","notes","number","shots","status","testID","title","total","variant"],required:["title"],fallback:null},PlanNeedCard:{since:"0.2.0",variants:["standard","plan"],platforms:["native","web"],settings:{lines:{type:"lines",values:["source","sources","title","score","quote","jump"]},variant:{type:"enum",values:["standard","plan"],prop:"variant"}},props:["jump","kicker","loading","loadingLabel","more","quote","score","signals","source","sources","testID","title","variant"],required:["kicker","signals"],fallback:null},PriceSummary:{since:"0.2.0",variants:[],platforms:["native","web"],settings:{lines:{type:"lines",values:["total","note"]},size:{type:"enum",values:["checkout","drawer"],prop:"size",platforms:["web"],default:"checkout"},variant:{type:"enum",values:["standard","web"],prop:"variant",platforms:["web"],default:"standard"}},props:["loading","loadingLabel","note","rows","testID","total"],required:["rows"],fallback:null},ProductTile:{since:"0.2.0",variants:["standard","blend","web"],platforms:["native","web"],settings:{addLift:{type:"boolean",prop:"addLift"},ground:{type:"enum",values:["shelf","white"],prop:"ground"},imageInset:{type:"enum",values:["standard","even"],prop:"imageInset"},layout:{type:"enum",values:["tile","row","card"],prop:"layout"},lines:{type:"lines",values:["kicker","meta","price","wasPrice","per","badge","tag"]},metaTone:{type:"enum",values:["auto","autoDark"],prop:"metaTone"},variant:{type:"enum",values:["standard","blend","web"],prop:"variant"}},props:["action","addLift","badge","fallback","ground","image","imageAlt","imageInset","kicker","layout","loading","loadingLabel","meta","metaTone","name","per","price","stepper","tag","testID","variant","wasPrice"],required:["name"],fallback:null},ScoreLights:{since:"0.4.0",variants:[],platforms:["native","web"],settings:{lines:{type:"lines",values:["heading","since","source","next"]}},props:["heading","loading","loadingLabel","next","pill","since","source","state","testID","values","vizLabel"],required:["pill","state","values","vizLabel"],fallback:"hide"},SummaryList:{since:"0.1.0",variants:["standard","flush","card","inset"],platforms:["native","web"],settings:{lines:{type:"lines",values:["trailingRows","note"]},variant:{type:"enum",values:["standard","flush","card","inset"],prop:"variant"}},props:["loading","loadingLabel","note","rows","testID","total","trailingRows","variant"],required:["rows"],fallback:null},TipCard:{since:"0.2.0",variants:["standard","photo","web","plan"],platforms:["native","web"],settings:{footArrow:{type:"boolean",prop:"footArrow"},lines:{type:"lines",values:["text","foot"]},tone:{type:"enum",values:["y","c","g","r"],prop:"tone"},variant:{type:"enum",values:["standard","photo","web","plan"],prop:"variant"}},props:["accessibilityLabel","foot","footArrow","footPress","icon","image","loading","loadingLabel","number","pressTarget","testID","text","title","tone","variant"],required:["number","title"],fallback:null},WeatherAlert:{since:"0.4.0",variants:[],platforms:["native","web"],settings:{},props:["accessibilityLabel","loading","loadingLabel","testID","text","title"],required:["title"],fallback:"TipCard",fallbackProps:{number:{const:"!"},text:{from:"text"},title:{from:"title"},tone:{const:"r"}}},WeatherCard:{since:"0.4.0",variants:["walk","summary","tile","web"],platforms:["native","web"],settings:{lines:{type:"lines",values:["heading","condition","details","verdict","advice","comfort","label","note","action","units","tags"]},sky:{type:"enum",values:["sun","blue"],prop:"sky"},variant:{type:"enum",values:["walk","summary","tile","web"],prop:"variant"}},props:["action","advice","comfort","condition","details","glyph","heading","label","level","loading","loadingLabel","note","sky","tags","tagsLabel","temperature","testID","units","variant","verdict"],required:["temperature"],fallback:"hide"},WeatherDetails:{since:"0.4.0",variants:[],platforms:["native","web"],settings:{},props:["items","label","loading","loadingLabel","testID"],required:["items"],fallback:"hide"},WeatherForecast:{since:"0.4.0",variants:["plain","walk"],platforms:["native","web"],settings:{variant:{type:"enum",values:["plain","walk"],prop:"variant"}},props:["days","label","loading","loadingLabel","testID","variant"],required:["days"],fallback:"hide"},WeatherHours:{since:"0.4.0",variants:["plain","walk"],platforms:["native","web"],settings:{lines:{type:"lines",values:["windows","legend"]},variant:{type:"enum",values:["plain","walk"],prop:"variant"}},props:["hours","label","legend","loading","loadingLabel","testID","variant","windows"],required:["hours"],fallback:"hide"},WeatherLevels:{since:"0.4.0",variants:["phone","web"],platforms:["native","web"],settings:{variant:{type:"enum",values:["phone","web"],prop:"variant"}},props:["label","loading","loadingLabel","rows","testID","variant"],required:["rows"],fallback:"hide"},WeatherReading:{since:"0.4.0",variants:["phone","web"],platforms:["native","web"],settings:{lines:{type:"lines",values:["word","choices"]},variant:{type:"enum",values:["phone","web"],prop:"variant"}},props:["choices","loading","loadingLabel","testID","tone","value","variant","word"],required:["value"],fallback:"hide"},WhySheet:{since:"0.4.0",variants:["standard","web","plan"],platforms:["native","web"],settings:{lines:{type:"lines",values:["kind","sub","sections","link","score"]},tone:{type:"enum",values:["calm","y","c","g","r"],prop:"tone"},variant:{type:"enum",values:["standard","web","plan"],prop:"variant"}},props:["action","closeLabel","fallback","heading","image","imageKind","kind","link","loading","loadingLabel","rows","score","sections","sub","testID","title","tone","variant"],required:[],fallback:"hide"}};var ch="everfur.slots.v2",dh="everfur.slots.installId.v2";var uh=6e4,ph=3e5,hh=15e3,gh=10080*60*1e3,fh=/^(W\/)?"[^"]{1,200}"$/,mh=/^[A-Za-z0-9_-]{8,128}$/,yh=/(?:^|,)\s*max-age\s*=\s*"?(\d{1,10})"?\s*(?:,|$)/i,bh=/(?:^|,)\s*(?:no-store|no-cache)\s*(?:,|$)/i,kh=/* @__PURE__ */Object.freeze({doc:"default",tenant:"default",epoch:0});function wh(){let e="";for(let t=0;t<4;t++)e+=Math.floor(Math.random()*4294967296).toString(36).padStart(7,"0");return e}function vh(e){if(e===null)return uh;if(bh.test(e))return 0;let t=yh.exec(e);return t===null?uh:Math.min(Number(t[1])*1e3,ph)}var xh=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function Sh(e){let t=e.now??Date.now,n=()=>{try{return e.scope?.()??kh}catch{return kh}},r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Map,o=/* @__PURE__ */new Map,l=null,a=null,s=false,c=Promise.resolve(),d=(t,n)=>{try{e.telemetry?.track(t,n)}catch{}},u=e=>{a!==e.epoch&&(a!==null&&(r.clear(),i.clear(),l=null,s=true),a=e.epoch)},p=e=>{let t=n();return t.epoch!==e.epoch||t.doc!==e.doc},h=async(t,n,r)=>{if(!p(t))return false;try{await e.kv.getItem(n)===r&&await e.kv.removeItem(n)}catch{}return true},g=t=>{let n=ih(t.tenant);if(l?.tenant===n)return l.id;let r=s;s=false;let i=(async()=>{if(!r)try{let t=await e.kv.getItem(dh),r=t===null?null:JSON.parse(t);if(r?.tenant===n&&typeof r.id=="string"&&mh.test(r.id))return r.id}catch{}try{let r=(e.newId??wh)();if(!mh.test(r))return null;let i=JSON.stringify({tenant:n,id:r});return await e.kv.setItem(dh,i),await h(t,dh,i)?null:r}catch{return null}})();return l={tenant:n,id:i},i},f=async t=>{try{let n=await e.kv.getItem(ch),r=n===null?null:JSON.parse(n);return r?.scope!==t||r.docs===null||typeof r.docs!="object"||Array.isArray(r.docs)?{docs:{}}:{docs:r.docs}}catch{return{docs:{}}}},m=async(e,n)=>{let r=await f(ih(e.doc)),i=xh(r.docs,n)?r.docs[n]:void 0;if(i==null||typeof i.at!="number")return null;let o=t()-i.at;if(!(o<gh)||o<-ph)return null;let l=Xp(i.doc,n);if(!l.ok)return null;let a=typeof i.etag=="string"&&fh.test(i.etag)?i.etag:null;return{doc:l.doc,etag:a}},y=(t,n,r)=>{let i=ih(t.doc);return c=c.then(async()=>{if(!p(t))try{let o=await f(i);if(p(t))return;let l={...o.docs},a=r(xh(l,n)?l[n]:void 0);if(a===null?delete l[n]:l[n]=a,Object.keys(l).length===0)await e.kv.removeItem(ch);else{let n=JSON.stringify({scope:i,docs:l});await e.kv.setItem(ch,n),await h(t,ch,n)}}catch{}}),c},b=async(n,o)=>{let l=`${n.doc}|${o}`,a=r.get(l),s=a===void 0?await m(n,o):null,c=a!==void 0?{doc:a.doc,etag:a.etag}:s,u=await g(n),h={"x-everfur-blocks":e.blocks??ah};u!==null&&(h["x-everfur-install-id"]=u),c?.doc&&c.etag!==null&&(h["if-none-match"]=c.etag);let f=null,b=uh,k=await e.send("slots.read",{method:"GET",path:`/widget/v1/slots/${encodeURIComponent(o)}`,headers:h,rawText:65536,onResponseHeaders:e=>{let t=e("etag");f=t!==null&&fh.test(t)?t:null,b=vh(e("cache-control"))}}).catch(()=>null),w=()=>c?.doc?{doc:c.doc,source:a!==void 0?"cache":"last-known-good"}:{doc:null,source:"bundled"},v=e=>(i.set(l,t()),d("slots.read_failed",{slot:o,status:e}),w());if(p(n))return{doc:null,source:"bundled"};if(k===null)return v(null);if(k.ok){let e=Yp(k.value);if(!e.ok)return d("slots.refused",{slot:o,reason:e.reason}),w();let i=Xp(e.raw,o);if(!i.ok)return d("slots.refused",{slot:o,reason:i.reason}),w();let a=t();return r.set(l,{doc:i.doc,etag:f,at:a,ttl:b}),await y(n,o,()=>({etag:f,doc:e.raw,at:a})),{doc:i.doc,source:"live"}}let x=k.error.httpStatus;if(x===304&&c?.doc){let e=t();return r.set(l,{doc:c.doc,etag:c.etag,at:e,ttl:b}),await y(n,o,t=>t===void 0?null:{...t,at:e}),{doc:c.doc,source:"live"}}return x===404?(r.set(l,{doc:null,etag:null,at:t(),ttl:b}),await y(n,o,()=>null),{doc:null,source:"bundled"}):v(x??null)},k=(e,n)=>{let i=r.get(`${e.doc}|${n}`);return i===void 0||t()-i.at>=i.ttl?null:i.doc===null?{doc:null,source:"bundled"}:{doc:i.doc,source:"cache"}},w=async(e,t)=>{let n=r.get(`${e.doc}|${t}`);if(n!==void 0)return n.doc===null?{doc:null,source:"bundled"}:{doc:n.doc,source:"cache"};let i=await m(e,t);return i===null?{doc:null,source:"bundled"}:{doc:i.doc,source:"last-known-good"}};return{peek(e){let t=n();return u(t),k(t,e)},stored(e){let t=n();return u(t),w(t,e).catch(()=>({doc:null,source:"bundled"}))},load(e){let r=n();u(r);let l=k(r,e);if(l!==null)return Promise.resolve(l);let a=`${r.doc}|${e}`,s=`${r.epoch}|${a}`,c=o.get(s);if(c!==void 0)return c;let d=i.get(a),p=(d!==void 0&&t()-d<hh?w(r,e):b(r,e)).catch(()=>({doc:null,source:"bundled"})).finally(()=>o.delete(s));return o.set(s,p),p}}}function Th(e){let t=lh(e)??"unknown",n=e.registry.services.authFor(null),r=n.mode==="personalized"?`u:${n.userRef??""}`:`a:${n.userRef??""}`;return{doc:`${t}|${r}`,tenant:t,epoch:e.scopeEpoch??0}}var Ch=/* @__PURE__ */Symbol.for("@everfur/sdk#SlotClients@v1");function Ih(e,t=Hh){let n=globalThis,r=n[Ch];r instanceof WeakMap||(r=/* @__PURE__ */new WeakMap,n[Ch]=r);let i=r,o=i.get(e);return o===void 0&&(o=t(e),i.set(e,o)),o}function Hh(e){let{services:t}=e.registry;return Sh({send:(e,n)=>createRequestFunnel({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}}).send(e,n),kv:t.kv,telemetry:t.telemetry,scope:()=>Th(e)})}function Fh(e,t){return{doc:t.doc??nh(e),source:t.source}}function Rh(e,t){let{runtime:r,scopeEpoch:i}=oe(),l=t?Ih(r):null,[a,s]=n(()=>{let t=l?.peek(e);return t?{slot:e,epoch:i,value:Fh(e,t)}:null});return o(()=>{if(l===null)return;let t=true,n=false,r=l.peek(e);if(r!==null){s({slot:e,epoch:i,value:Fh(e,r)});return}return l.stored(e).then(r=>{t&&!n&&s({slot:e,epoch:i,value:Fh(e,r)})}),l.load(e).then(r=>{n=true,t&&s({slot:e,epoch:i,value:Fh(e,r)})}),()=>{t=false}},[l,e,i]),t?a!==null&&a.slot===e&&a.epoch===i?a.value:{doc:null,source:"pending"}:{doc:nh(e),source:"bundled"}}function Ph(e){return{knows(t,n){let r=Object.prototype.hasOwnProperty.call(sh,t)?sh[t]:void 0;if(r===void 0||!r.platforms.includes(e))return false;if(n===void 0)return true;let i=r.settings.variant;return n===i?.default?true:r.variants.includes(n)?i?.platforms===void 0||i.platforms.includes(e):false}}}function zh(e){return{id:e.id,...e.repeat?{repeat:e.repeat}:{},...e.visibleIf?{visibleIf:e.visibleIf}:{}}}function Dh(e,t){if(t.knows(e.type,e.variant))return e;if(e.fallback==="hide")return null;let n=Bh(e,t);if(n!==null)return n;let r=Object.prototype.hasOwnProperty.call(sh,e.type)?sh[e.type]:void 0,i=r?.fallback??null;if(i===null||i==="hide"||!t.knows(i))return null;let o=sh[i];if(r?.fallbackProps!==void 0&&o!==void 0)return Oh(e,r,i,o);let l={};for(let[t,n]of Object.entries(e.bind))o?.props.includes(t)&&(l[t]=n);return{...zh(e),type:i,settings:{},bind:l,actions:{}}}function $h(e,t){return e.type==="boolean"?typeof t=="boolean":e.type==="enum"?typeof t=="string"&&(e.values??[]).includes(t):e.type==="lines"?Array.isArray(t)&&new Set(t).size===t.length&&t.every(t=>typeof t=="string"&&(e.values??[]).includes(t)):false}function Oh(e,t,n,r){let i={},o={},l={},a;for(let[n,s]of Object.entries(t.fallbackProps??{})){if("from"in s){Object.prototype.hasOwnProperty.call(e.bind,s.from)&&(i[n]=e.bind[s.from]);continue}let t=s.const;if(n==="variant"){typeof t=="string"&&r.variants.includes(t)&&(a=t);continue}let c=Object.entries(r.settings).find(([e,t])=>e!=="variant"&&t.prop===n);c!==void 0&&$h(c[1],t)?o[c[0]]=t:typeof t=="string"&&(l[n]=t)}let s=/* @__PURE__ */new Set([...Object.keys(i),...Object.keys(l),...Object.keys(o).map(e=>r.settings[e]?.prop)]);return a!==void 0&&s.add("variant"),r.required.some(e=>!s.has(e))?null:{...zh(e),type:n,...a!==void 0?{variant:a}:{},settings:o,bind:i,actions:{},...Object.keys(l).length>0?{fixed:l}:{}}}function Bh(e,t){let n=e.fallback;return n===void 0||n==="hide"||!t.knows(n.type,n.variant)?null:{...zh(e),type:n.type,...n.variant?{variant:n.variant}:{},settings:n.settings,bind:n.bind,actions:n.actions}}function _h(e,t){let n=[];for(let r of e.parts){let e=Dh(r,t);e!==null&&n.push(e)}return n.length===0||n.length<e.minBlocks?null:n}var Lh=/* @__PURE__ */Object.freeze(["everfur.com","www.everfur.com","docs.everfur.com"]),Eh=/* @__PURE__ */Object.freeze(["chat","health_plan","plan.detail","records","shop","shop.cart","shop.orders","visit"]),Ah=/* @__PURE__ */Object.freeze(["health_plan.checkout","health_plan.manage","health_plan.weight"]),jh=/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*){0,4}$/,Wh=/^https:\/\/([A-Za-z0-9.-]+)(?:[/?#][^\s]*)?$/,Mh=512;function Nh(e){if(e.length>Mh)return false;let t=Wh.exec(e);return t!==null&&Lh.includes((t[1]??"").toLowerCase())}function Uh(e){if(typeof e!="string")return null;let t=e.indexOf(":");if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);switch(n){case"navigate":return Eh.includes(r)?{kind:n,route:r}:null;case"open_sheet":return Ah.includes(r)?{kind:n,id:r}:null;case"track":return jh.test(r)?{kind:n,event:r}:null;case"external":return Nh(r)?{kind:n,url:r}:null;default:return null}}var qh=/* @__PURE__ */Object.freeze({"plan.needs":"list","plan.tips":"list","plan.items":"list","cart.lines":"list","cart.summary":"item","orders.recent":"list"});function Vh(e){return Object.prototype.hasOwnProperty.call(qh,e)}function Gh(e){if(e===void 0)return null;let t=e.indexOf(":");if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);return r===""?null:n==="data"?Vh(r)?{kind:n,name:r}:null:n==="item"||n==="copy"?{kind:n,name:r}:null}var Kh=/* @__PURE__ */new Set(["action","actions","busy","disabled","error","fallback","footPress","link","loading","loadingLabel","metaLink","namePress","next","open","quantity","stepper","testID","visible"]),Xh=/* @__PURE__ */Object.freeze({CartBar:["actionLabel","actionAccessibilityLabel","actionHiddenWord","countLabel","sub","total"],CartLine:["name","imageAlt","meta","price","wasPrice","removeLabel","note"],CheckinSheet:["kicker","title","flowLabel","doneText","closeLabel"],OrderRow:["number","title","meta","total","accessibilityLabel"],PlanNeedCard:["kicker","source","title"],PriceSummary:["note"],ProductTile:["name","imageAlt","kicker","meta","price","wasPrice","per","badge"],ScoreLights:["heading","pill","since","vizLabel"],SummaryList:["note"],TipCard:["number","title","text","foot","accessibilityLabel"],WeatherAlert:["title","text","accessibilityLabel"],WeatherCard:["heading","temperature","condition","details","verdict","advice","label","note","tagsLabel"],WeatherDetails:["label"],WeatherForecast:["label"],WeatherHours:["label"],WeatherLevels:["label"],WeatherReading:["value","word"],WhySheet:["kind","title","sub","heading","closeLabel"]}),Yh=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function Jh(e){return e==null||e===""?false:!Array.isArray(e)||e.length>0}function Qh(e,t){return Yh(e,t)?e[t]:void 0}function Zh(e,t,n){let r=e.visibleIf;if(r===void 0)return true;let i=Gh(r.source);if(i===null)return false;if(i.kind==="item")return true;let o=i.kind==="data"?Jh(Qh(t,i.name)):Yh(n,i.name);return r.op==="present"?o:!o}function eg(e,t){let n=Gh(e.visibleIf?.source);if(n?.kind!=="item")return true;let r=Jh(t[n.name]);return e.visibleIf?.op==="present"?r:!r}function tg(e,t,n,r,i){let o=sh[e.type],l=o?.props??[],a=Xh[e.type]??[],s={};for(let e of l)Yh(t,e)&&!Kh.has(e)&&t[e]!==void 0&&(s[e]=t[e]);for(let[i,o]of Object.entries(e.bind)){if(!l.includes(i)||Kh.has(i))continue;let e=Gh(o);if(e===null)continue;let c,d=i;if(e.kind==="copy"){if(!a.includes(i))continue;c=Yh(r,e.name)?r[e.name]:void 0,d=""}else if(e.kind==="item")d=e.name,c=Yh(t,d)?t[d]:void 0;else{let t=Qh(n,e.name)?.[0];c=t!==void 0&&Yh(t,i)?t[i]:void 0}e.kind!=="copy"&&d!==i&&!(a.includes(i)&&typeof c=="string")||(c===void 0?delete s[i]:s[i]=c)}for(let[t,n]of Object.entries(e.fixed??{}))l.includes(t)&&!Kh.has(t)&&(s[t]=n);e.variant!==void 0&&l.includes("variant")&&(s.variant=e.variant);for(let[t,n]of Object.entries(e.settings)){let e=o?.settings[t];if(!(e===void 0||e.platforms!==void 0&&!e.platforms.includes(i)))if(e.type==="lines"){if(!Array.isArray(n))continue;for(let t of e.values??[])n.includes(t)||delete s[t]}else e.prop!==void 0&&l.includes(e.prop)&&(e.type==="boolean"&&typeof n=="boolean"||e.type==="enum"&&typeof n=="string"&&(e.values??[]).includes(n))&&(s[e.prop]=n)}return s}function ng(e,t){let n=e.key;return typeof n=="string"&&n!==""?`${n}#${t}`:String(t)}function rg(e,t){let n=sh[e];return n!==void 0&&n.required.every(e=>t[e]!==void 0&&t[e]!==null)}function ig(e,t,n,r="native"){if(sh[e.type]===void 0||!Zh(e,t,n))return null;let i=Gh(e.repeat),o;if(e.repeat!==void 0){if(i?.kind!=="data")return null;o=Qh(t,i.name)??[]}else{let n=Object.values(e.bind).map(e=>Gh(e)).find(e=>e?.kind==="data");if(n){let e=Qh(t,n.name)?.[0];o=e===void 0?[]:[e]}else o=[{}]}let l=[],a=0;if(o.forEach((i,o)=>{if(!eg(e,i))return;let s=tg(e,i,t,n,r);rg(e.type,s)?l.push({key:ng(i,o),props:/* @__PURE__ */Object.freeze(s)}):a+=1}),l.length===0&&a===0)return null;let s={};for(let[t,n]of Object.entries(e.actions)){let e=Uh(n);e!==null&&(s[t]=e)}return{part:e,blocks:l,incomplete:a,actions:s}}function og(e){let t=Ph("native");return{knows:(n,r)=>Object.prototype.hasOwnProperty.call(e,n)&&t.knows(n,r)}}function lg(e,t,n){let r=og(n);if(e!==null){let t=_h(e,r);if(t!==null)return t}let i=nh(t);return i===null?[]:_h(i,r)??[]}var ag=new Set(Object.keys(xl.colors)),sg=new Set(Object.keys(xl.radius)),cg=new Set(Object.keys(xl.space));function dg(e){let t={},n={},r={};for(let[i,o]of Object.entries(e)){let[e,l,a]=i.split(".");l===void 0||a!==void 0||((e==="color"||e==="colors")&&typeof o=="string"&&ag.has(l)?t[l]=o:e==="radius"&&typeof o=="number"&&o>=0&&sg.has(l)?n[l]=o:e==="space"&&typeof o=="number"&&o>=0&&cg.has(l)&&(r[l]=o))}let i={};return Object.keys(t).length>0&&(i.colors=t),Object.keys(n).length>0&&(i.radius=n),Object.keys(r).length>0&&(i.space=r),Object.keys(i).length===0?null:i}function ug(e,t,n,r){switch(e.kind){case"navigate":Kt(n.onNavigate,e.route,t);return;case"open_sheet":Kt(n.onOpenSheet,e.id,t);return;case"track":r("slots.track",{slot:t.slot,part:t.part,event:e.event});return;case"external":n.onOpenUrl?Kt(n.onOpenUrl,e.url):C.openURL(e.url).catch(()=>{})}}function pg(e,t){return e.kind==="navigate"?t.onNavigate!==void 0:e.kind==="open_sheet"?t.onOpenSheet!==void 0:true}function DrawnPart({blocks:e,resolved:n,slot:r,handlers:i,track:o}){let l=Object.prototype.hasOwnProperty.call(e,n.part.type)?e[n.part.type]:void 0;if(l===void 0)return null;let a=n.actions.onPress;/* @__PURE__ */
|
|
381
|
-
return
|
|
382
|
-
return
|
|
383
|
-
return
|
|
384
|
-
return
|
|
385
|
-
return
|
|
386
|
-
return
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
return
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
/* @__PURE__ */
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
return
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
return
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
-
return
|
|
432
|
-
return
|
|
433
|
-
return
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
/* @__PURE__ */
|
|
438
|
-
return
|
|
439
|
-
return
|
|
440
|
-
return
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
return
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */
|
|
27
|
+
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function fo(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function useCapability(e){let{runtime:t}=le(),n=t.entitlements,i=l(n.subscribe,n.getSnapshot,n.getSnapshot);return r(()=>decideCapability(e,i.decisions,{isPending:i.isPending}),[e,i])}var mo=48;function yo(e){return e.isPending?"pending":e.enabled?"enabled":"disabled"}function CapabilityGate(e){let{capability:t,children:n,renderDisabled:i,renderPending:o,style:l}=e,a=useCapability(t),s=r(()=>yo(a),[a]);switch(s){case"enabled":return n;case"pending":return o?/* @__PURE__ */P(HostRender,{render:o,fallback:/* @__PURE__ */P(PendingSkeleton,{capability:t,style:l})}):/* @__PURE__ */P(PendingSkeleton,{capability:t,style:l});case"disabled":return i?/* @__PURE__ */P(HostRender,{render:()=>i(a),fallback:/* @__PURE__ */P(OffState,{decision:a,style:l}),resetKey:a}):/* @__PURE__ */P(OffState,{decision:a,style:l});default:return assertNever(s)}}function PendingSkeleton({capability:e,style:t}){let n=useEverfurTheme(),i=r(()=>bo(n),[n]);/* @__PURE__ */
|
|
28
|
+
return P(f,{style:[i.offstate,t],accessible:true,accessibilityState:{busy:true},accessibilityLabel:`Loading ${e}`,children:/* @__PURE__ */P(f,{style:i.skeletonBar})})}function OffState({decision:e,style:t}){let n=useEverfurTheme(),i=r(()=>bo(n),[n]),o=e.disabled?.reason??"";/* @__PURE__ */
|
|
29
|
+
return P(f,{style:[i.offstate,t],accessible:true,accessibilityRole:"text",accessibilityLabel:o,children:o.length>0?/* @__PURE__ */P(Text,{style:i.offstateText,children:o}):null})}function bo(e){let{color:t,space:n,radius:r,type:i}=e;return g.create({offstate:{minHeight:mo,justifyContent:"center",paddingHorizontal:n.lg,paddingVertical:n.md,backgroundColor:t.surfaceCream,borderRadius:r.md,borderWidth:g.hairlineWidth,borderColor:t.brandBorder},offstateText:{...face(e,"regular"),fontSize:i.size.body,lineHeight:Math.round(i.size.body*i.lineHeight.normal),color:t.text.muted},skeletonBar:{height:n.md,borderRadius:r.xs,backgroundColor:t.brandSofter}})}function ko(e){if(typeof e=="number")return xo(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return wo(t.slice(1));if(t.toLowerCase().startsWith("0x"))return wo(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return vo(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=wo(t);if(e!==null)return e}return/^\d+$/.test(t)?xo(Number.parseInt(t,10)):null}function wo(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:To(t[0]),g:To(t[1]),b:To(t[2]),a:1};if(t.length===6)return{r:So(t,0),g:So(t,2),b:So(t,4),a:1};if(t.length===8){let e=So(t,0);return{r:So(t,2),g:So(t,4),b:So(t,6),a:e/255}}return null}function vo(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let i=Co(Number(r[0])),o=Co(Number(r[1])),l=Co(Number(r[2]));if(i===null||o===null||l===null)return null;let a=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;a=Math.min(1,Math.max(0,e))}return{r:i,g:o,b:l,a:a}}function xo(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function So(e,t){return Number.parseInt(e.slice(t,t+2),16)}function To(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function Co(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function Io(e,t,n){return`#${Ho(e)}${Ho(t)}${Ho(n)}`.toUpperCase()}function Ho(e){return e.toString(16).padStart(2,"0")}var Fo="#111111",Ro="#FFFFFF",Po="#000000";function readableOn(e){let t=ko(e);if(t===null)return Ro;let n=$o(t),r=$o({r:17,g:17,b:17}),i=$o({r:255,g:255,b:255});return Bo(n,i)>=Bo(n,r)?Ro:Fo}function zo(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(Ro,e)>=contrastRatio(Po,e)?Ro:Po}function Do(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(Ro)>=t(Po)?Ro:Po}function $o(e){let t=Oo(e.r/255),n=Oo(e.g/255),r=Oo(e.b/255);return.2126*t+.7152*n+.0722*r}function Oo(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bo(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=ko(e),r=ko(t);if(n===null||r===null)return 1;let i=r.a>=1?r:{...r},o=n.a>=1?n:_o(n,i);return Bo($o(o),$o(i))}function _o(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function Lo(e,t){let n=ko(e),r=ko(t);if(n===null||r===null)return null;let i=n.a>=1?n:_o(n,{...r});return Io(i.r,i.g,i.b)}var Eo=.05;function Ao(e,t,n,r){let i=t[0];if(i===void 0)return n;let o=e=>t.every(t=>contrastRatio(e,t)>=r);if(ko(e)===null)return n;if(o(e))return e;let l=Lo(e,i),a=l===null?null:ko(l),s=ko(n);if(a===null||s===null)return n;for(let e=1;e<1/Eo;e+=1){let t=e*Eo,n=(e,n)=>Math.round(e+(n-e)*t),r=Io(n(a.r,s.r),n(a.g,s.g),n(a.b,s.b));if(o(r))return r}return n}var jo={ink:"#10462E",go:"#07C168",alert:"#C03410",tintSage:"#E6ECE8"},Wo=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#ThemeContext@v1");function Mo(){let e=globalThis,t=e[Wo];return t===void 0&&(t=createContext(null),t.displayName="EverfurThemeContext",e[Wo]=t),t}var No=(e,t)=>e.toUpperCase()===t.toUpperCase();function Uo(e){let t=ko(e);return t!==null&&$o(t)<.18}var qo=/* @__PURE__ */new WeakMap;function Vo(e,t){if(t===null)return e;let n=qo.get(e);n===void 0&&(n=/* @__PURE__ */new WeakMap,qo.set(e,n));let r=n.get(t);return r===void 0&&(r=Go(e,t),n.set(t,r)),r}function Go(e,t){let n=t.colors,r=!No(n.ink,jo.ink),i=!No(n.go,jo.go),o=e===io&&Uo(n.bg),l=o?lo:e,a=l.color,s=e=>o||a[e]===io.color[e],c={};r&&s("primary")&&(Object.assign(c,{primary:n.ink,onPrimary:n.onInk,brand:n.ink,brandInk:n.ink}),s("linkInk")&&(c.linkInk=n.ink),!i&&s("accent")&&Object.assign(c,{accent:n.ink,onAccent:n.onInk})),i&&s("accent")&&Object.assign(c,{accent:n.go,onAccent:n.onGo}),!No(n.alert,jo.alert)&&s("danger")&&(c.danger=n.alert),!No(n.tintSage,jo.tintSage)&&s("brandSoft")&&(c.brandSoft=n.tintSage,s("brandSofter")&&(c.brandSofter=n.tintSage)),o&&Object.assign(c,{background:n.bg,surface:n.surface,text:{...a.text,primary:n.text,muted:n.muted},borderRingCream:n.line});let d=t.motion?.reduced===true&&!l.motion.reducedMotion;return!o&&!d&&Object.keys(c).length===0?e:{...l,color:{...a,...c},...d?{motion:{...l.motion,reducedMotion:true}}:{}}}function Ko(){let e=useEverfurTheme(),t=i(Mo());return r(()=>Vo(e,t),[e,t])}var Xo=640,Yo=600,Jo=/* @__PURE__ */Object.freeze({width:0,height:0}),Qo="useWindowDimensions"in p&&typeof p.useWindowDimensions=="function"?p.useWindowDimensions:()=>Jo,Zo=/* @__PURE__ */Object.freeze({width:"100%",maxWidth:Xo,alignSelf:"center"});/* @__PURE__ */Object.freeze({...Zo,flex:1});var el=/* @__PURE__ */Object.freeze({...Zo,flexGrow:1,flexShrink:1});function tl(){return Qo().width>=Yo}function nl(){let{width:e}=Qo();return e>=Yo?Math.min(e,Xo):e}function rl(e="flow"){let{width:t}=Qo();if(t<Yo)return null;if(e==="flow")return Zo;let n=Math.max(0,Math.round((t-Xo)/2));return{left:n,right:n}}function il(e,t){return t===null?e:[e,t]}var ol=/* @__PURE__ */Symbol.for("@everfur/sdk#InSdkColumn@v1"),ll=globalThis,al=ll[ol]??(ll[ol]=createContext(false));al.displayName??="EverfurInSdkColumn";function SdkTabletColumn({children:e,style:t,testID:n}){let r=tl(),o=i(al);return!r||o?e:/* @__PURE__ */P(f,{style:t===void 0?el:[el,t],testID:n??"everfur-tablet-column",children:/* @__PURE__ */P(al.Provider,{value:true,children:e})})}function sl(e,t){if(e===void 0)return{};let n={};return e.backgroundColor!==void 0&&(n.backgroundColor=e.backgroundColor),e.borderColor!==void 0&&(n.borderColor=e.borderColor,n.borderWidth=t??1),e.borderRadius!==void 0&&(n.borderRadius=e.borderRadius),n}function cl(e){return e?.textColor===void 0?{}:{color:e.textColor}}function HealthPlanCartBar(e){let{cart:t,onCheckout:n,busy:i=false,priceFormat:o,style:l}=Qt(e,["onCheckout"]),a=Ko(),s=r(()=>dl(a),[a]),c=formatHealthPlanPriceWith(t.subtotal,t.currency,o),d=t.count===0||i,u=se(),petRef=de(useHealthPlanCartDock()?.petRef);/* @__PURE__ */
|
|
30
|
+
return R(f,{style:[s.bar,l],accessibilityLabel:W.cartLabel(a.meta.displayName),children:[
|
|
31
|
+
/* @__PURE__ */R(f,{style:s.copy,children:[
|
|
32
|
+
/* @__PURE__ */R(f,{style:s.labelRow,children:[
|
|
33
|
+
/* @__PURE__ */P(Text,{style:s.label,children:W.cartLabel(a.meta.displayName)}),t.count>0?/* @__PURE__ */P(f,{style:s.count,accessibilityElementsHidden:true,importantForAccessibility:"no",children:/* @__PURE__ */P(Text,{tier:"badge",style:s.countLabel,children:String(t.count)})}):null]}),t.count===0?/* @__PURE__ */P(Text,{style:s.line,children:E.cartEmpty}):c===null?null:/* @__PURE__ */R(Text,{style:s.line,children:[E.subtotal," ",c]})]}),n===void 0?null:/* @__PURE__ */P(m,{onPress:()=>{he(u,petRef,t),n(t.items)},disabled:d,accessibilityRole:"button",accessibilityLabel:E.checkout,accessibilityState:{disabled:d,busy:i},style:[s.checkout,d?s.dimmed:null],testID:"health-plan-checkout",children:/* @__PURE__ */P(Text,{tier:"control",style:s.checkoutLabel,children:E.checkout})})]})}function dl(e){let{color:t,radius:n,space:r,type:i,slots:o}=e,l=o.cartBar?.textColor??t.text.onBrand,a=o.cartBar?.backgroundColor??t.brandInk,s=(t,n,r)=>({...face(e,r),fontSize:t,lineHeight:Math.round(t*i.lineHeight.snug),color:n});return g.create({bar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:r.md,paddingHorizontal:r.lg,paddingVertical:r.md,borderRadius:n.lg,backgroundColor:t.brand,...sl(o.cartBar)},copy:{flex:1,gap:2},labelRow:{flexDirection:"row",alignItems:"center",gap:r.sm},label:s(i.size.body,l,"bold"),count:{minWidth:22,height:22,paddingHorizontal:r.xs,borderRadius:n.pill,alignItems:"center",justifyContent:"center",backgroundColor:l},countLabel:s(i.size.caption,a,"bold"),line:s(i.size.caption,l,"regular"),checkout:{minHeight:44,paddingHorizontal:r.lg,borderRadius:n.pill,alignItems:"center",justifyContent:"center",backgroundColor:l},checkoutLabel:s(i.size.body,a,"bold"),dimmed:{opacity:.5}})}var ul={in:320,out:220,inCurve:"drawer",outCurve:"out"},pl={in:240,out:200,inCurve:"ease",outCurve:"ease"},hl={in:300,out:220,inCurve:"drawer",outCurve:"out"},gl={in:220,out:160,inCurve:"out",outCurve:"out"},fl={in:160,out:160,inCurve:"ease",outCurve:"ease"},ml={};function yl(e){let t=ml[e];if(t!==void 0)return t;let[n,r,i,o]=e==="drawer"?[.32,.72,0,1]:e==="out"?[.23,1,.32,1]:[.25,.1,.25,1],l=b.bezier(n,r,i,o);return ml[e]=l,l}function bl(e,t,n,r){let i=t.length,o=t.map((t,r)=>y.timing(e[r],{toValue:n?1:0,duration:n?t.in:t.out,easing:yl(n?t.inCurve:t.outCurve),useNativeDriver:true}));for(let e of o)e.start(({finished:e})=>{i-=1,e&&i===0&&r()});return()=>{for(let e of o)e.stop()}}function PlanLinger({draw:e,motions:t}){let r=e!==null,[i,l]=n(null);r&&i?.draw!==e&&l({draw:e});let a=s(new y.Value(0)).current,c=s(new y.Value(0)).current,d=[a,c];o(()=>{if(!(!r&&i===null))return bl(d,t,r,()=>{r||l(null)})},[r]);let u=e??i?.draw;return u===void 0?null:u(d)}function PlanPushes({id:e,depth:t,node:r,width:i,paper:o,still:l}){let[a,c]=n({id:e,depth:t,node:r,leaving:null}),u=e!==a.id;(u||r!==a.node)&&c({id:e,depth:t,node:r,leaving:u?t<a.depth?a.node:null:a.leaving});let p=s(new y.Value(1)).current,h=s(new y.Value(1)).current,g=l?fl:hl,m=s(t);d(()=>{let e=m.current;if(m.current=t,t>e)return p.setValue(0),bl([p],[g],true,()=>{});if(t!==e)return h.setValue(1),bl([h],[g],false,()=>c(e=>({...e,leaving:null})))},[e]);let b=e=>l?{opacity:e}:{transform:[{translateX:e.interpolate({inputRange:[0,1],outputRange:[i,0]})}]};/* @__PURE__ */
|
|
34
|
+
return R(f,{children:[
|
|
35
|
+
/* @__PURE__ */P(y.View,{style:b(p),children:r}),a.leaving===null?null:/* @__PURE__ */P(y.View,{pointerEvents:"none",style:[{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:o},b(h)],children:a.leaving})]})}var kl=/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({efDarkGreen:"#10462E",efWhite:"#FFFFFF",efBlack:"#000000",efDustyPink:"#FFC3BC",efBrightGreen:"#07C168",efYellow:"#F2C763",efDustyBlue:"#A8B9DA",efSkyBlue:"#4E98C9",efCharcoal:"#3D3D3D",efIconHoney:"#926F06",efIconLeaf:"#16864A",efIconSky:"#1E7AB7",efIconTeal:"#05827E",efIconCocoa:"#865B3F",efIconNavy:"#223E80",efIconBerry:"#B6407F",efIconAmber:"#B25E05",efIconMoss:"#5E7E1E",efIconSlate:"#5A6087",efIconRose:"#CA4463",efRedDeep:"#6D1D14",efRedBright:"#C03410",bg:"#FFFFFF",bgBrand:"#10462E",bgAccent:"#FFC3BC",bgAccentB2b:"#A8B9DA",bgWarm:"#F2C763",text:"#000000",textBrand:"#10462E",textOnBrand:"#FFFFFF",textCta:"#07C168",textMuted:"#6B6B6B",bgMist:"#F1F5F2",border:"#E4E4E4",borderStrong:"#3D3D3D",hi:"#DAF6E8",hiStrong:"#ABEACC",hiEdge:"#0B8A4E",now:"#0C844B",alert:"#C03410",alertDeep:"#6D1D14",btnPrimaryBg:"#10462E",btnPrimaryText:"#FFFFFF",btnSecondaryBg:"rgba(0, 0, 0, 0)",btnSecondaryText:"#10462E",btnSecondaryBorder:"#10462E",mixMint:"#7FE8AE",mixLegal:"#A9C4B5",mixPromptGreen:"#BFEFD8",mixPromptYellow:"#F7DC9E",mixRx:"#E0E6F2",mixShelf:"#F3F3F3",mixEar:"#F09FA3",efBone:"#FAF9F6",efTennisBall:"#DCEF5A",efFawn:"#E8CAA4",efPine:"#12301F",efPine70:"rgba(18, 48, 31, 0.72)",efLiver:"#7A4330",efMerle:"#AEB8C1",efNose:"#E9B6A6"}),font:/* @__PURE__ */Object.freeze({family:/* @__PURE__ */Object.freeze({base:'Azeret, "Helvetica Neue", Arial, sans-serif',mono:'"Azeret Mono", ui-monospace, "SF Mono", Menlo, monospace'}),size:/* @__PURE__ */Object.freeze({xs:13,sm:15,md:17,lg:20,xl:24,"2xl":32,"3xl":40,"4xl":56}),lineHeight:/* @__PURE__ */Object.freeze({body:1.55,display:1.15}),weight:/* @__PURE__ */Object.freeze({regular:400,medium:500,bold:700})}),space:/* @__PURE__ */Object.freeze({1:4,2:8,3:12,4:16,5:24,6:32,7:48,8:64,9:96}),radius:/* @__PURE__ */Object.freeze({sm:6,md:10,lg:20,xl:28,pill:999}),shadow:/* @__PURE__ */Object.freeze({sm:/* @__PURE__ */Object.freeze({x:0,y:1,blur:2,spread:0,color:"rgba(16, 70, 46, 0.06)"}),md:/* @__PURE__ */Object.freeze({x:0,y:4,blur:16,spread:0,color:"rgba(16, 70, 46, 0.08)"})}),layout:/* @__PURE__ */Object.freeze({container:1200,containerNarrow:720}),motion:/* @__PURE__ */Object.freeze({easing:/* @__PURE__ */Object.freeze({out:/* @__PURE__ */Object.freeze([.23,1,.32,1]),inOut:/* @__PURE__ */Object.freeze([.77,0,.175,1]),drawer:/* @__PURE__ */Object.freeze([.32,.72,0,1]),expo:/* @__PURE__ */Object.freeze([.16,1,.3,1]),bark:/* @__PURE__ */Object.freeze([.34,1.56,.64,1])}),duration:/* @__PURE__ */Object.freeze({press:160,fade:200,enter:300,sheet:420,sheetOut:240,draw:900})}),web:/* @__PURE__ */Object.freeze({serif:'Azeret, "Helvetica Neue", Arial, sans-serif',sans:'Azeret, "Helvetica Neue", Arial, sans-serif',tSmall:14,max:1312}),role:/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({ink:"#10462E",go:"#07C168",muted:"#6B6B6B",line:"#E4E4E4",pink50:"#FFE1DE",tintSage:"#E6ECE8",tintPink:"#FFEAE8",tintPinkSoft:"#FFF6F5",tintBlue:"#EAEEF6",tintYellow:"#FCF0D6",tintYellowEdge:"#F6D892",tintRed:"#FBF1EE",tintGo:"#DCF6EA",icoGrey:"#6B6B6B",icoSage:"#819E90",icoBlue:"#4E98C9",icoWarm:"#D6D0C2",icoAmber:"#B67B3F",amberText:"#A05E32",wxSun:"#F2C763",wxSunEdge:"#D5AD47",wxCloud:"#FFFFFF",wxCloudEdge:"#DEDEDE",wxCloudDark:"#EAEAEA",wxCloudDarkEdge:"#C5C5C5",wxRain:"#75AFD5",wxSnow:"#AFD1E7",wxMist:"#D4D4D4",cwShelf:"#FFFFFF",cwShelfDeep:"#F1F4F2",cwRx:"#E0E6F2",cwRxInk:"#5A6087",cwEdgeC:"#C6D3CD",nItch:"#CA4463",nJoints:"#5E7E1E",nItchC:"#FFC3BC",nJointsC:"#D8E0C9",lvlGood:"#77DDAC",lvlOk:"#F4CF7A",lvlHot:"#DC8F7C",lvlStorm:"#8DA4BB",mapLand:"#F5F5F5",mapEdge:"#EAEAEA",mapPark:"#D7F5E7",mapWater:"#D8E0EE",mapSand:"#FCF3DD"}),size:/* @__PURE__ */Object.freeze({max:1440,gutter:16,sideW:220,cardPad:16,barH:48,tabH:58,dock:64,side:16,stackGap:12})})});var wl={shown:true,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},vl={shown:true,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},xl=e=>({...wl,...e}),Sl=e=>({...vl,...e}),Tl={button:{ink:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},go:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},outline:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:400,lineHeight:1,iconSize:24},pink:{fill:true,minHeight:60,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:18,fontWeight:700,lineHeight:1,iconSize:24},danger:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1.55,iconSize:20},inkSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},goSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},outlineSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:400,lineHeight:1,iconSize:20},pinkSm:{fill:true,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},row:{fill:false,minHeight:36,paddingX:14,gap:8,borderWidth:1.5,ring:false,fontSize:14,fontWeight:400,lineHeight:1,iconSize:17},outlineInSheetWeight:700,money:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"pink",fg:"ink",edgeColor:"ink"},moneySm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"pink",fg:"ink",edgeColor:"ink"},warn:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"none",fg:"alertDeep",edgeColor:"alert"},warnSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"none",fg:"alertDeep",edgeColor:"alert"},text:{fontSize:15,fontWeight:700,lineHeight:1.4,color:"ink",pressOpacity:.6}},pill:{minHeight:24,paddingX:10,fontSize:12,fontWeight:700,lineHeight:1,letterSpacing:.72,ring:{soon:1.25,overdue:1.25,clear:1.5,later:1.25,plain:1.5,new:1.5},plainRingAlpha:.2,dot:6,dotGap:6,allergyDot:{size:6,gap:6,color:"alert"},mono:true,upper:true,tones:{rx:{bg:"#E0E6F2",fg:"ink",ring:0,ringColor:"ink"},soon:{bg:"surface",fg:"ink",ring:1.25,ringColor:"tintYellowEdge"},overdue:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},clear:{bg:"surface",fg:"go",ring:1.5,ringColor:"go"},stable:{bg:"tintGo",fg:"ink",ring:0,ringColor:"ink"},later:{bg:"surface",fg:"muted",ring:1.25,ringColor:"line"},plain:{bg:"surface",fg:"ink",ring:1.5,ringColor:"ink/0.2"},new:{bg:"surface",fg:"ink",ring:1.5,ringColor:"go"},pink:{bg:"tintPink",fg:"ink",ring:0,ringColor:"ink"},watch:{bg:"#F9E6B9",fg:"ink",ring:0,ringColor:"ink"},high:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},allergy:{bg:"surface",fg:"alertDeep",ring:1.25,ringColor:"alert"}}},chip:{minHeight:42,paddingX:16,gap:8,borderWidth:1,fontSize:15,fontWeight:500,lineHeight:1.3},card:{padding:16,radius:20,borderWidth:1,titleSize:18,titleWeight:700,titleLineHeight:1.25,titleTracking:-.36,titleGap:12,leadSize:15,leadLineHeight:1.5,leadGap:12,headGapX:16,headGapY:8,headGap:12,bodySize:17,bodyLineHeight:1.55,ghost:{borderStyle:"dashed",borderColor:"#B9C9C2"}},sectionHeader:{gapX:12,gapY:8,marginTop:8},kicker:{fontSize:12,fontWeight:700,lineHeight:1.55,letterSpacing:.96,gap:8},quantityStepper:{borderWidth:1,borderColor:"line",ring:false,button:40,icon:18,valueMinWidth:28,offColor:"line",offOpacity:1,valueSize:17,valueWeight:700,valueLineHeight:1.55},tabs:{minHeight:44,gap:6,fontSize:15,fontWeight:500,currentWeight:700,lineHeight:1.55,indicator:3,hairline:1,dot:7},sheet:{radius:28,grabHeight:20,grabBarWidth:36,grabBarHeight:5,grabBarRadius:3,headPaddingTop:4,headPaddingX:16,headPaddingBottom:12,headGap:12,titlesGap:2,titleSize:18,close:36,closeIcon:20,bodyGap:12,bodyPaddingX:16,bodyPaddingBottom:24,actsGap:12,actsMarginTop:4},empty:{gap:8,titleSize:22,titleWeight:500,titleLineHeight:1.2,titleTracking:-.33,leadSize:15,leadLineHeight:1.5,actsGap:12,actsMarginTop:12,buttonMinWidth:200,linkMinHeight:44,linkPaddingX:4,linkSize:15,linkWeight:700,linkUnderlineOffset:3},skeleton:{gap:10,lineHeight:12,widths:[100,82,64]},summary:{paddingX:24,paddingY:0,radius:20,borderWidth:1,background:"surface",shadow:{color:"",x:0,y:0,blur:0,spread:0},rowDivider:1,rowMinHeight:0,rowCenter:false,rowPaddingY:14,termColor:"muted",valueColor:"ink",tabular:false,totalRowMinHeight:0,totalTermSize:15,totalTermWeight:400,totalTermColor:"muted",totalWeight:700,rowGapX:16,rowGapY:2,termSize:15,termLineHeight:1.55,valueSize:15,valueWeight:700,valueLineHeight:1.4,totalSize:20,totalLineHeight:1.4,off:{shown:true,size:15,weight:700,lineHeight:21,color:"go",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},icon:{size:24},timeline:{row:{shown:true,w:361,h:69.281,padding:[0,0,24,0],marginTop:0,marginBottom:0,gap:[16,16],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},done:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"ink",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"surface",fit:"cover",x:0,y:0,dy:0},now:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},next:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},nowInner:{size:10,color:"go"},check:{shown:true,w:16,h:16,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},lineDoneDone:{x:13,top:30,bottom:2,width:2,color:"ink"},lineDoneNow:{x:13,top:30,bottom:2,width:2,color:"ink"},lineNowNext:{x:13,top:30,bottom:2,width:2,color:"line"},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},head:{shown:true,w:317,h:27,padding:[3,0,0,0],marginTop:0,marginBottom:0,gap:[8,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},nextTitle:{shown:true,size:17,weight:700,lineHeight:22.1,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},when:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},thumbnail:{xs:{frame:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},img:{shown:false,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},sm:{frame:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},md:{frame:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:156,h:156,padding:[10,10,10,10],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},lg:{frame:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:174.5,h:174.5,padding:[14,14,18,14],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false}},text:{display:{shown:true,size:40,weight:500,lineHeight:39.2,color:"ink",tracking:-1.2,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},headline:{shown:true,size:30,weight:500,lineHeight:33,color:"ink",tracking:-.45,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:22,weight:500,lineHeight:26.4,color:"ink",tracking:-.33,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},heading:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},lead:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},meta:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"mono",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},caption:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},overline:{shown:true,size:12,weight:700,lineHeight:16.8,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},kicker:{shown:true,size:12,weight:700,lineHeight:18.6,color:"muted",tracking:.96,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},field:{gap:6,label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},input:{shown:true,w:361,h:52,padding:[0,16,0,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},focusEdge:"ink",errorEdge:"alert",value:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:1},valueInset:[2,1],icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},area:{shown:true,w:361,h:158,padding:[12,16,12,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},areaValue:{shown:true,size:17,weight:400,lineHeight:25.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:2},areaValueMinHeight:132,areaInset:[2,2],hint:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},error:{shown:true,size:15,weight:400,lineHeight:21.75,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},placeholder:"muted"},checkbox:{row:{shown:true,w:361,h:45,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},labelX:34,box:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1.5,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"ink",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},tick:{w:5,h:10,stroke:2,color:"surface",rotate:45,dy:-1},label:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},boxed:{shown:true,w:361,h:50.5,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"bgMist",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0}},choice:{row:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},selected:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"pink",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},radio:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1.5,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},radioOn:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:6,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},textX:34,title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},strut:26.35,meta:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},end:{shown:true,size:13,weight:400,lineHeight:20.15,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},group:{gap:8,legend:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},legendPaddingX:2,legendGap:0}},switch:{track:{shown:true,w:48,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"#D0D6D3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:"ink",thumb:{size:22,inset:3,travel:20,color:"surface",shadow:{color:"rgba(16, 70, 46, 0.06)",x:0,y:1,blur:2,spread:0}}},iconButton:{bare:{shown:true,w:44,h:44,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[22,22],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},bareIcon:22,offColor:"line",ring:{shown:true,w:36,h:36,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[18,18],bg:"surface",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},ringIcon:18,ringPressed:"tintSage",ringPressScale:.94},link:{text:{shown:true,size:17,weight:400,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},danger:{shown:true,size:15,weight:700,lineHeight:23.25,color:"alert",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},inline:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},lists:{rows:{row:{shown:true,w:327,h:94.781,padding:[16,0,16,0],marginTop:0,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:1,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},tiles:{list:{shown:true,w:343,h:175.813,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},outdent:8,row:{shown:true,w:343,h:62.281,padding:[10,8,10,8],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},leading:22,leadingFace:40,icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},text:{shown:true,w:261,h:42.281,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[2,2],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},pressed:"#EDF2EF",alert:{bg:"tintRed",icon:"alert",title:"alertDeep",subtitle:"alert"}},end:{text:{shown:true,size:15,weight:400,lineHeight:23.25,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},gap:8,chevron:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#819D90",fit:"cover",x:0,y:0,dy:0}},section:{title:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},titleGap:12,head:{shown:true,w:361,h:22.5,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[12,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},note:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:12,paddingTop:0}},avatar:{sizes:{xs:20,sm:36,md:48,lg:64,xl:128},face:40,bg:"surface",edge:{width:1,color:"line",ring:true},initials:{shown:true,size:15,weight:700,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},initialsXs:{shown:true,size:9,weight:700,lineHeight:13.95,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tints:{default:"tintPink",pink:"#FFCFC9",blue:"#C2CEE5",yellow:"#F6D78F",sage:"#C6D3CD"},ring:{width:2,offset:2,color:"go"},ringXl:{width:3,offset:4,color:"go"},dot:{size:12,edge:2,edgeColor:"surface"}},stack:{size:28,overlap:-8,initialsSize:12,halo:{width:2,color:"surface"}},banner:{box:{shown:true,w:361,h:155.391,padding:[16,16,16,16],marginTop:0,marginBottom:0,gap:[12,4],minHeight:0,radius:[20,20],bg:"#F1F5F2",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},iconRows:3,kicker:{shown:true,size:12,weight:700,lineHeight:16.8,color:"#5B5B5B",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:295,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tones:{info:{bg:"#F1F5F2",icon:"ink"},success:{bg:"tintGo",icon:"ink"},warn:{bg:"#FCF0D6",icon:"#926F06"},danger:{bg:"tintRed",icon:"alert"}}},toast:{box:{shown:true,w:200.281,h:40.25,padding:[10,16,10,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:15,weight:400,lineHeight:20.25,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:10},inset:16,rise:8,fade:200,hold:2600},spinner:{size:16,border:2,turn:700,openSide:true,reducedOpacity:.5},offbar:{box:{shown:true,w:361,h:56,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:44,radius:[0,0],bg:"#FCF0D6",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:48,dy:0},text:{shown:true,size:15,weight:500,lineHeight:19.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},action:{shown:true,w:69.859,h:44,padding:[0,2,0,2],marginTop:0,marginBottom:0,gap:[6,6],minHeight:44,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},actionText:{shown:true,size:15,weight:700,lineHeight:19.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},online:{bg:"ink",color:"onInk"},fade:200},progress:{track:{shown:true,w:361,h:4,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"line",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},fill:"go",move:300},divider:{width:1,color:"line",label:{shown:true,size:12,weight:400,lineHeight:18.6,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},labelGap:12,labelLine:{width:1,color:"line"}},errorInline:{text:{shown:true,size:15,weight:400,lineHeight:21,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:361,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},linkPressedOpacity:.6},variants:{drawer:{frame:{shown:true,w:393,h:226.594,padding:[10,20,40,20],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[28,0],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:293.406,dy:0},maxHeight:.8,grab:{shown:true,w:40,h:5,padding:[0,0,0,0],marginTop:0,marginBottom:10,gap:[0,0],minHeight:0,radius:[2.5,2.5],bg:"#DAD7D1",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},top:{shown:true,w:353,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},kicker:{shown:true,size:11,weight:400,lineHeight:16.5,color:"muted",tracking:.88,face:"mono",upper:true,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},close:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},closeEnd:-8,closeIcon:22,title:{shown:true,size:24,weight:800,lineHeight:27.6,color:"ink",tracking:-.24,face:"serif",upper:false,wrap:"balance",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,w:353,h:82,padding:[0,0,0,0],marginTop:12,marginBottom:0,gap:[10,10],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:16,weight:400,lineHeight:24,color:"text",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},scrim:"ink/0.38",motion:{enterMs:320,enterEasing:[.32,.72,0,1],exitMs:220,exitEasing:[.23,1,.32,1],scrimEnterMs:240,scrimExitMs:200,scrimEasing:[.25,.1,.25,1]}},button:{ink:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:0,ring:false,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},outline:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:1.5,ring:true,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},sm:{fill:false,minHeight:40,paddingX:16,gap:8,borderWidth:1.5,ring:true,fontSize:15,fontWeight:700,lineHeight:1.5,iconSize:20},lg:{fill:false,minHeight:56,paddingX:28,gap:8,borderWidth:0,ring:false,fontSize:17,fontWeight:700,lineHeight:1.5,iconSize:20},disabledOpacity:.32,press:.97,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease"},segmented:{track:{shown:true,w:361,h:44,padding:[4,4,4,4],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[22,22],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},option:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},label:{shown:true,size:14,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},chosen:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:0,y:0,dy:0},chosenLabel:{shown:true,size:14,weight:700,lineHeight:21,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},press:.96,transition:"background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},stepper:{track:{shown:true,w:110,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},button:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},icon:16,value:{shown:true,size:15.5,weight:800,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},valueWidth:30,disabledOpacity:.3,press:.9,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},summary:{box:{shown:true,w:361,h:144,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"rgba(38, 37, 35, 0.06)",x:0,y:1,blur:3,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},row:{shown:true,w:329,h:34,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:34,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},term:{shown:true,size:15,weight:400,lineHeight:22.5,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},value:{shown:true,size:15,weight:400,lineHeight:22.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},totalRow:{shown:true,w:329,h:42,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:42,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},totalTerm:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},total:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renewRow:{shown:true,w:329,h:28,padding:[0,0,0,0],marginTop:-6,marginBottom:0,gap:[12,12],minHeight:28,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},renewTerm:{shown:true,size:14,weight:400,lineHeight:21,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renew:{shown:true,size:14,weight:400,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},inset:{shown:true,w:361,h:88,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"bg",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0}},toast:{box:{shown:true,w:361,h:64.594,padding:[12,15,12,15],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:16,y:62,dy:0},text:{shown:true,size:14.5,weight:400,lineHeight:20.3,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:12},motion:{enterMs:220,exitMs:160,easing:[.23,1,.32,1],rise:-8}},focus:{width:2,offset:2,color:"ink"}},press:{button:.97,iconButton:.94,card:.98},colors:{grab:"#C9C9C9",scrim:"rgba(0, 0, 0, 0.32)",watch:"#F9E6B9",planInk:"#262523",planOnInk:"#FFFFFF",planAccent:"#FFCE34",planLink:"#00707C",planAccentWash:"#FFF7DC",planAccentChip:"#FFE7A1",planLinkWash:"#E0FDFF",planLinkChip:"#C8F4F8"}};var Cl={card:/* @__PURE__ */xl({w:325,h:125.25,padding:[14,16,14,16],radius:[0,20],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.06)",x:0,y:2,blur:3,spread:-1}}),kicker:/* @__PURE__ */xl({w:293,h:24,gap:[8,8],center:true}),kickerText:/* @__PURE__ */Sl({size:15,weight:700,lineHeight:23.25}),source:/* @__PURE__ */xl({w:116.719,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#DAF6E8",center:true,color:"ink"}),sourceText:/* @__PURE__ */Sl({size:12,weight:700,lineHeight:18.6,color:"ink"}),title:/* @__PURE__ */Sl({shown:false,size:15,weight:700,lineHeight:23.25}),signal:/* @__PURE__ */xl({w:293,h:65.25,marginTop:8,gap:[9,9],color:"#4D4D4D"}),signalText:/* @__PURE__ */Sl({size:15,weight:400,lineHeight:21.75,color:"#4D4D4D"}),signalLead:/* @__PURE__ */Sl({size:15,weight:700,lineHeight:21.75}),dot:/* @__PURE__ */xl({w:9,h:9,radius:[4.5,4.5],bg:"alert",color:"#4D4D4D",dy:-1}),score:/* @__PURE__ */xl({w:293,h:99.859,padding:[10,14,10,14],marginTop:12,gap:[12,12],radius:[10,10],bg:"#FCF0D6",center:true}),scoreLabel:/* @__PURE__ */Sl({size:14,weight:600,lineHeight:18.9,color:"#4D4D4D"}),scoreTag:/* @__PURE__ */xl({w:63.125,h:20.188,padding:[2,6,2,6],marginTop:3,radius:[6,6],bg:"surface"}),scoreTagText:/* @__PURE__ */Sl({size:12,weight:600,lineHeight:16.2,tracking:.72,face:"mono",upper:true,marginTop:3,paddingTop:2}),scoreNums:/* @__PURE__ */xl({w:106.109,h:51.141,gap:[6,0],center:true}),scoreWas:/* @__PURE__ */Sl({size:17,weight:700,lineHeight:26.35,color:"muted",deco:"strike",decoThickness:1.5}),scoreArrow:/* @__PURE__ */xl({w:16,h:16,color:"muted"}),scoreArrowFlip:true,scoreNow:/* @__PURE__ */Sl({size:28,weight:700,lineHeight:28,tracking:-.84,tabular:true}),scoreOf:/* @__PURE__ */Sl({size:15,weight:700,lineHeight:15,color:"#4D4D4D",tabular:true}),scoreSince:/* @__PURE__ */Sl({size:13,weight:700,lineHeight:20.15,color:"ink",marginTop:3})},Il={card:/* @__PURE__ */xl({w:329,h:380.172,padding:[16,16,16,16],marginTop:14,radius:[22,22],bg:"surface",shadow:{color:"rgba(38, 37, 35, 0.06)",x:0,y:1,blur:3,spread:0},color:"#262523"}),kicker:/* @__PURE__ */xl({w:297,h:24,gap:[8,8],center:true,color:"#262523"}),kickerText:/* @__PURE__ */Sl({size:15,weight:800,lineHeight:22.5,color:"#262523"}),source:/* @__PURE__ */xl({w:83.375,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#F2F1EE",center:true,color:"#4A4845"}),sourceText:/* @__PURE__ */Sl({size:12,weight:700,lineHeight:18,color:"#4A4845"}),title:/* @__PURE__ */Sl({size:19,weight:800,lineHeight:23.18,color:"#262523",marginTop:12}),signal:/* @__PURE__ */xl({w:297,h:65.25,marginTop:6,gap:[9,9],color:"#4A4845"}),signalText:/* @__PURE__ */Sl({size:15,weight:400,lineHeight:21.75,color:"#4A4845"}),signalLead:/* @__PURE__ */Sl({size:15,weight:800,lineHeight:21.75,color:"#262523"}),dot:/* @__PURE__ */xl({w:9,h:9,radius:[4.5,4.5],bg:"#E5372B",color:"#4A4845",dy:-1}),score:/* @__PURE__ */xl({w:297,h:69.75,padding:[10,14,10,14],marginTop:12,gap:[12,12],radius:[14,14],bg:"planAccentWash",center:true,color:"#262523"}),scoreLabel:/* @__PURE__ */Sl({size:13.5,weight:600,lineHeight:18.225,color:"#4A4845",wrap:"balance"}),scoreTag:/* @__PURE__ */xl({w:51.609,h:17.5,padding:[2,6,2,6],marginTop:3,radius:[5,5],bg:"surface",color:"#262523"}),scoreTagText:/* @__PURE__ */Sl({size:10,weight:600,lineHeight:13.5,color:"#262523",tracking:.6,face:"mono",upper:true,wrap:"balance",marginTop:3,paddingTop:2}),scoreNums:/* @__PURE__ */xl({w:94.75,h:49.75,gap:[6,0],center:true,color:"#262523"}),scoreWas:/* @__PURE__ */Sl({size:17,weight:700,lineHeight:25.5,color:"#6B6863",deco:"strike"}),scoreArrow:/* @__PURE__ */xl({w:16,h:16,color:"#6B6863"}),scoreArrowFlip:true,scoreNow:/* @__PURE__ */Sl({size:28,weight:800,lineHeight:28,color:"#262523"}),scoreOf:/* @__PURE__ */Sl({size:13,weight:800,lineHeight:13,color:"muted"}),scoreSince:/* @__PURE__ */Sl({size:12.5,weight:700,lineHeight:18.75,color:"planLink",marginTop:3}),sources:/* @__PURE__ */xl({w:131.375,h:24,gap:[4,4],color:"#262523"}),sourceDna:/* @__PURE__ */xl({w:44,h:24,padding:[0,9,0,9],radius:[999,999],bg:"planLinkWash",center:true,color:"planLink"}),sourceDnaText:/* @__PURE__ */Sl({size:12,weight:700,lineHeight:18,color:"planLink"}),dotWatch:/* @__PURE__ */xl({w:9,h:9,radius:[4.5,4.5],bg:"#E5A000",color:"#4A4845",dy:-1}),dotClear:/* @__PURE__ */xl({w:9,h:9,radius:[4.5,4.5],bg:"#5FA82B",color:"#4A4845",dy:-1}),scoreLabelMax:135,says:/* @__PURE__ */xl({w:297,h:52,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysImg:/* @__PURE__ */xl({w:32,h:32,radius:[16,16],color:"#262523"}),saysText:/* @__PURE__ */Sl({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845"}),saysBy:/* @__PURE__ */Sl({size:14.5,weight:800,lineHeight:20.3,color:"#262523"}),saysByGap:2,saysTag:/* @__PURE__ */xl({w:51.609,h:15,padding:[2,6,2,6],radius:[5,5],bg:"surface",color:"#262523"}),saysTagText:/* @__PURE__ */Sl({size:10,weight:400,lineHeight:14,color:"#262523",tracking:.6,face:"mono",upper:true,paddingTop:2}),saysBare:/* @__PURE__ */xl({w:297,h:81,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysKicker:/* @__PURE__ */Sl({size:17,weight:400,lineHeight:25.5,color:"#262523"}),saysSerif:/* @__PURE__ */Sl({size:17,weight:800,lineHeight:25.5,color:"#262523",tracking:-.17,wrap:"balance"}),jump:/* @__PURE__ */xl({w:297,h:60,padding:[8,14,8,8],marginTop:12,gap:[12,12],radius:[14,14],bg:"planInk",center:true,color:"planOnInk"}),jumpImg:/* @__PURE__ */xl({w:44,h:44,radius:[10,10],bg:"surface",color:"surface"}),jumpKicker:/* @__PURE__ */Sl({size:13,weight:800,lineHeight:19.5,color:"planAccent"}),jumpTitle:/* @__PURE__ */Sl({size:15,weight:800,lineHeight:18.75,color:"planOnInk"}),jumpGo:/* @__PURE__ */Sl({size:14,weight:800,lineHeight:21,color:"planOnInk"}),jumpPressScale:.98,more:/* @__PURE__ */xl({w:87.547,h:36,marginTop:6,marginBottom:-4,gap:[4,4],minHeight:36,center:true,color:"planLink"}),moreText:/* @__PURE__ */Sl({size:15,weight:800,lineHeight:22.5,color:"planLink"}),moreIcon:/* @__PURE__ */xl({w:16,h:16,color:"planLink"}),moreInset:16,moreTurn:{closed:90,open:-90},rep:/* @__PURE__ */xl({w:297,h:48.5,padding:[14,14,12,14],marginTop:10,radius:[16,16],bg:"#F8F7F4",color:"#262523"})},Hl={card:/* @__PURE__ */xl({w:201.5,h:275.031,padding:[8,10,10,10],radius:[20,20],bg:"#FCF0D6"}),tones:{y:"#FCF0D6",c:"tintBlue",g:"tintGo",r:"tintPink"},img:/* @__PURE__ */xl({w:181.5,h:113.438,radius:[10,10],bg:"#F3F3F3"}),n:/* @__PURE__ */xl({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:/* @__PURE__ */Sl({size:14,weight:700,lineHeight:14}),title:/* @__PURE__ */Sl({size:16,weight:700,lineHeight:20,marginTop:10}),text:/* @__PURE__ */Sl({size:15,weight:400,lineHeight:21,color:"#4D4D4D",marginTop:4}),foot:/* @__PURE__ */xl({w:181.5,h:26.594,padding:[8,0,0,0],gap:[4,4],center:true,color:"ink"}),footText:/* @__PURE__ */Sl({size:12,weight:400,lineHeight:18.6,color:"ink",tracking:.48,face:"mono",upper:true,paddingTop:8}),footArrow:/* @__PURE__ */xl({w:14,h:14,color:"ink"}),footArrowFlip:true,pressScale:.98,bare:/* @__PURE__ */xl({w:181.5,h:42,padding:[2,0,0,0],center:true}),thumb:/* @__PURE__ */xl({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:/* @__PURE__ */xl({w:22,h:22})},Fl={card:/* @__PURE__ */xl({w:221,h:152,padding:[8,8,12,8],radius:[20,20],bg:"#FCF0D6"}),tones:{y:"#FCF0D6",c:"#EEDCC8",g:"tintGo",r:"tintPink"},img:/* @__PURE__ */xl({w:205,h:102.5,radius:[10,10],bg:"#F3F3F3"}),imgAspect:2,n:/* @__PURE__ */xl({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:/* @__PURE__ */Sl({size:14,weight:700,lineHeight:14}),title:/* @__PURE__ */Sl({size:15,weight:700,lineHeight:19.5,marginTop:10}),titleInset:4,pressScale:.98,bare:/* @__PURE__ */xl({w:205,h:42,padding:[2,0,0,0],center:true}),thumb:/* @__PURE__ */xl({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:/* @__PURE__ */xl({w:22,h:22,color:"ink"})},Rl={card:/* @__PURE__ */xl({w:226,h:172.047,gap:[10,10]}),img:/* @__PURE__ */xl({w:226,h:141.25,radius:[14,14]}),imgAspect:1.6,title:/* @__PURE__ */Sl({size:16,weight:700,lineHeight:20.8,wrap:"balance"}),coverRadius:10,row:{from:440,card:/* @__PURE__ */xl({w:400,h:80,padding:[6,0,6,0],gap:[10,10],minHeight:80,center:true}),img:/* @__PURE__ */xl({w:64,h:64,radius:[10,10]}),arrowColumn:18,arrow:/* @__PURE__ */xl({w:18,h:18,color:"ink"}),arrowTurn:180},phone:{upTo:639,card:/* @__PURE__ */xl({w:216,h:162.5,gap:[8,8]}),img:/* @__PURE__ */xl({w:216,h:135,radius:[14,14]}),imgAspect:1.6,title:/* @__PURE__ */Sl({size:15,weight:700,lineHeight:19.5,wrap:"balance"}),smallUpTo:359,smallW:208},mark:{tile:/* @__PURE__ */xl({w:226,h:141.25,radius:[14,14],bg:"#F5F5F5",center:true,color:"ink"}),icon:{share:.36,min:16,max:40,color:"ink"}},ring:{width:2,offset:2,color:"text"},hoverOffset:3},Pl={card:/* @__PURE__ */xl({w:225.406,h:182.844,padding:[14,14,12,14],radius:[18,18],bg:"planAccentChip",color:"#262523"}),tones:{y:"planAccentChip",c:"planLinkChip",g:"#DDEFC4",r:"#FFD8D6"},top:/* @__PURE__ */xl({w:197.406,h:30,center:true,color:"#262523"}),nText:/* @__PURE__ */Sl({size:30,weight:900,lineHeight:30,color:"#262523"}),icon:/* @__PURE__ */xl({w:26,h:26,color:"#262523"}),title:/* @__PURE__ */Sl({size:17,weight:800,lineHeight:21.25,color:"#262523",marginTop:14}),text:/* @__PURE__ */Sl({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845",marginTop:4}),foot:/* @__PURE__ */xl({w:197.406,h:25.75,padding:[10,0,0,0],color:"planLink"}),footText:/* @__PURE__ */Sl({size:10.5,weight:400,lineHeight:15.75,color:"planLink",tracking:.42,face:"mono",upper:true,paddingTop:10})};function zl(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e))for(let t of Object.values(e))zl(t);return e}var Dl=kl,$l=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#preset@v1");function Ol(e){return Object.defineProperty(e,$l,{value:e,enumerable:true}),zl(e)}var Bl={content:0,heading:2,control:1.8,compact:1.5,badge:1.3},_l=Ol({name:"everfur",colors:{bg:Dl.color.bg,surface:Dl.color.efWhite,text:Dl.color.text,ink:Dl.role.color.ink,onInk:Dl.color.efWhite,muted:Dl.role.color.muted,line:Dl.role.color.line,go:Dl.role.color.go,onGo:Dl.role.color.ink,pink:Dl.color.efDustyPink,onPink:Dl.role.color.ink,alert:Dl.color.alert,alertDeep:Dl.color.alertDeep,icoSage:Dl.role.color.icoSage,bgMist:Dl.color.bgMist,tintSage:Dl.role.color.tintSage,tintBlue:Dl.role.color.tintBlue,tintGo:Dl.role.color.tintGo,tintPink:Dl.role.color.tintPink,tintYellowEdge:Dl.role.color.tintYellowEdge,tintWatch:Tl.colors.watch,tintRed:Dl.role.color.tintRed,scrim:Tl.colors.scrim,grab:Tl.colors.grab,focus:Dl.role.color.ink,planInk:Tl.colors.planInk,planOnInk:Tl.colors.planOnInk,planAccent:Tl.colors.planAccent,planLink:Tl.colors.planLink,planAccentWash:Tl.colors.planAccentWash,planAccentChip:Tl.colors.planAccentChip,planLinkWash:Tl.colors.planLinkWash,planLinkChip:Tl.colors.planLinkChip},radius:{...Dl.radius},space:{...Dl.space},type:{family:Dl.font.family.base,mono:Dl.font.family.mono,faces:{regular:"Azeret-Regular",medium:"Azeret-Medium",bold:"Azeret-Bold",mono:"AzeretMono-Regular",monoBold:"AzeretMono-Bold"},namedFaces:true,size:{xs:Dl.font.size.xs,sm:Dl.font.size.sm,md:Dl.font.size.md,lg:Dl.font.size.lg,xl:Dl.font.size.xl},weight:{...Dl.font.weight},lineHeight:{...Dl.font.lineHeight},scaleCaps:Bl},motion:{duration:{press:Dl.motion.duration.press,fade:Dl.motion.duration.fade,enter:Dl.motion.duration.enter,sheet:Dl.motion.duration.sheet,sheetOut:Dl.motion.duration.sheetOut},easing:{out:Dl.motion.easing.out,drawer:Dl.motion.easing.drawer},pop:{duration:Dl.motion.duration.enter,from:.95,peakAt:.55,amplitude:.035,switchAmplitude:.06},reduced:false},metrics:Tl});function Ll(e){return e[$l]??_l}function El(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Al(e,t){if(!El(e)||!El(t))return t===void 0?e:t;let n={...e};for(let[r,i]of Object.entries(t))i!==void 0&&(n[r]=Al(e[r],i));return n}function resolveTheme(e,t=_l){if(!e)return t;let n=Al(t,e),r=e.colors;if(r){let e=n.colors;for(let[t,n,i]of jl){let o=r[n];o!==void 0&&r[t]===void 0&&(e[t]=Wl(o,i,e.surface)??e[t]??o)}}return zl(n)}var jl=[["planAccentWash","planAccent",.17],["planAccentChip","planAccent",.47],["planLinkWash","planLink",.12],["planLinkChip","planLink",.2]];function Wl(e,t,n){let r=e=>{let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e??"");return t?[t[1],t[2],t[3]].map(e=>parseInt(e,16)):void 0},[i,o]=[r(e),r(n)];if(!(!i||!o))return`#${i.map((e,n)=>Math.round(e*t+(o[n]??0)*(1-t)).toString(16).padStart(2,"0")).join("").toUpperCase()}`}var Ml=/* @__PURE__ */(()=>{let e=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#ThemeContext@v1"),t=globalThis,n=t[e]??(t[e]=createContext(null));return n.displayName??(n.displayName="EverfurThemeContext"),n})();function ThemeProvider({theme:e,children:n}){let i=Xl(),o=e===void 0||Ul(e)?e:Nl(e),l=r(()=>Ul(e)?Kl(e):resolveTheme(e,i),[o,i]);return t(Ml.Provider,{value:l},n)}function Nl(e){return JSON.stringify(e,(e,t)=>El(t)&&!Array.isArray(t)?Object.fromEntries(Object.keys(t).sort().map(e=>[e,t[e]])):t)}function Ul(e){return e!==void 0&&Object.isFrozen(e)&&ql.every(t=>t in e)}var ql=["name","colors","radius","space","type","motion","metrics"];function Vl(e,t){if(e===void 0)return true;if(!El(e))return t!==void 0;if(!El(t))return false;for(let n of Object.keys(e))if(!Vl(e[n],t[n]))return false;return true}var Gl=/* @__PURE__ */new WeakMap;function Kl(e){let t=Gl.get(e);if(t)return t;if(Vl(_l,e))return Gl.set(e,e),e;let n=Ll(e),r=Al(_l,n===_l?e:Al(n,e));r[$l]=n;let i=zl(r);return Gl.set(e,i),i}function Xl(){let e=i(Ml);return e?Kl(e):_l}var Yl=e=>Math.round(e*1e3)/1e3;function Jl(e,t=false){return t?e>450?"monoBold":"mono":e>500?"bold":e>450?"medium":"regular"}function Ql(e,t){let n=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!n)return e;let[r,i,o]=[n[1],n[2],n[3]].map(e=>parseInt(e,16));return`rgba(${r}, ${i}, ${o}, ${t})`}function Zl(e){let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(t)return[t[1],t[2],t[3]].map(e=>parseInt(e,16));let n=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(e);return n?[n[1],n[2],n[3]].map(Number):void 0}function ea(e,t,n,r){let[i,o]=[Zl(e),Zl(n)];return!i||!o?r:`rgb(${i.map((e,n)=>Math.round(e*t+(o[n]??0)*(1-t))).join(", ")})`}function ta(e,t){let n=/^([a-zA-Z]+)(?:\/([\d.]+))?$/.exec(t),r=n?.[1];if(!n||r===void 0||!(r in e.colors))return t;let i=e.colors[r];return n[2]===void 0?i:Ql(i,Number(n[2]))}function na(e,t){return{size:t.size,weight:t.weight,lineHeight:t.lineHeight,color:ta(e,t.color),...t.face==="mono"?{mono:true}:{},...t.face==="serif"?{serif:true}:{},...t.tracking?{tracking:t.tracking}:{},...t.upper?{upper:true}:{},...t.deco==="none"?{}:{deco:t.deco==="strike"?"strike":"underline",decoOffset:t.decoOffset,decoThickness:t.decoThickness},...t.tabular?{tabular:true}:{},...t.wrap==="auto"?{}:{wrap:t.wrap==="balance"?"balance":"pretty"}}}function ra(e,t){return t==="none"?void 0:ta(e,t)}function ia(e){let t=e.metrics.summary,n=(e,t)=>Yl(e*t);return{paddingX:t.paddingX,paddingY:t.paddingY,radius:t.radius,borderWidth:t.borderWidth,borderColor:e.colors.line,background:ta(e,t.background),shadow:t.shadow,row:{paddingY:t.rowPaddingY,minHeight:t.rowMinHeight,gapX:t.rowGapX,gapY:t.rowGapY,divider:t.rowDivider,center:t.rowCenter},totalRowMinHeight:t.totalRowMinHeight,gap:t.gap??0,totalMarginTop:t.totalMarginTop??0,tabular:t.tabular,term:{size:t.termSize,weight:e.type.weight.regular,lineHeight:n(t.termSize,t.termLineHeight),color:ta(e,t.termColor)},value:{size:t.valueSize,weight:t.valueWeight,lineHeight:n(t.valueSize,t.valueLineHeight),color:ta(e,t.valueColor)},totalTerm:{size:t.totalTermSize,weight:t.totalTermWeight,lineHeight:n(t.totalTermSize,t.termLineHeight),color:ta(e,t.totalTermColor)},total:{size:t.totalSize,weight:t.totalWeight,lineHeight:n(t.totalSize,t.totalLineHeight),color:ta(e,t.valueColor)},off:na(e,e.metrics.summary.off)}}function oa(e,t){let n=e.metrics.skeleton.widths;return`${n[t%n.length]}%`}function la(e,t,n){return n!==void 0?n:e===void 0?void 0:`${e}-${t}`}function aa(e){return e==="warn"||e==="danger"}var sa=e=>e,ca=e=>"edge"in e&&"shadow"in e&&"fit"in e,da=e=>"deco"in e&&"face"in e&&"tabular"in e;function ua(e){let t=/* @__PURE__ */new Map;for(let[n,r]of Object.entries(e))t.has(r)||t.set(r,n);return t}var pa,ha=/* @__PURE__ */new WeakMap;function ga(e,t,n){let r=e.get(n),i=r===void 0?void 0:t[r];return typeof i=="number"?i:n}function fa(e){let t=_l;return e.space===t.space&&e.radius===t.radius&&e.type.size===t.type.size&&e.type.weight===t.type.weight}function ma(e,t){let n=_l;pa??(pa={space:ua(sa(n.space)),radius:ua(sa(n.radius)),size:ua(sa(n.type.size)),weight:ua(sa(n.type.weight))});let r=pa,i=t=>ga(r.space,sa(e.space),t),o=t=>ga(r.radius,sa(e.radius),t),l=t=>Array.isArray(t)?t.map(l):t===null||typeof t!="object"?t:ca(t)?{...t,padding:t.padding.map(i),gap:t.gap.map(i),marginTop:i(t.marginTop),marginBottom:i(t.marginBottom),radius:t.radius.map(o)}:da(t)?{...t,size:ga(r.size,sa(e.type.size),t.size),weight:ga(r.weight,sa(e.type.weight),t.weight),marginTop:i(t.marginTop),paddingTop:i(t.paddingTop)}:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,l(t)]));return l(t)}function ya(e,t){if(fa(e))return t;let n=ha.get(t);n||ha.set(t,n=/* @__PURE__ */new WeakMap);let r=n.get(e);if(r)return r;let i=ma(e,t);return n.set(e,i),i}var ba={display:"heading",headline:"heading",title:"heading",heading:"heading",body:"content",lead:"content",label:"control",meta:"compact",caption:"content",overline:"compact",kicker:"compact"};function ka(e,t){let n=e.colors;switch(t){case"ink":return n.ink;case"text":return n.text;case"muted":return n.muted;case"danger":return n.alertDeep;case"inverse":return n.onInk;default:return}}function wa(e,t,n,r){let i=na(e,e.metrics.text[t]),o=ka(e,n);return{...i,...o?{color:o}:{},...r?{weight:e.type.weight[r]}:{}}}var va={display:"balance",headline:"balance",title:"balance",heading:"balance",body:"pretty",lead:"pretty",meta:"pretty",caption:"pretty",label:"auto",overline:"auto",kicker:"auto"};function xa(e,t){return e.type.variantTiers?.[t]??ba[t]}var Sa=/* @__PURE__ */(()=>{let e=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#ReducedMotionContext@v1"),t=globalThis,n=t[e]??(t[e]=createContext(null));return n.displayName??(n.displayName="EverfurReducedMotionContext"),n})();function Ta(){return i(Sa)}function Ca(e,t){let n=Jl(t.weight,t.mono===true);return{fontFamily:t.serif?e.type.faces.serif??e.type.faces.bold:e.type.faces[n],...e.type.namedFaces?{}:{fontWeight:String(t.weight)},fontSize:t.size,lineHeight:t.lineHeight,color:t.color,...t.tracking?{letterSpacing:t.tracking}:{},...t.upper?{textTransform:"uppercase"}:{},...t.deco?Ia(t):{},...t.tabular?{fontVariant:["tabular-nums"]}:{},...t.wrap&&S.OS==="web"?{textWrap:t.wrap}:{}}}function Ia(e){let t={textDecorationLine:e.deco==="strike"?"line-through":"underline"};return S.OS!=="web"?t:{...t,...e.decoOffset?{textUnderlineOffset:e.decoOffset}:{},...e.decoThickness?{textDecorationThickness:e.decoThickness}:{}}}function Ha(e,t){let[n=0,r=0,i=0,o=0]=t.padding,[l=0,a=0]=t.radius,s=ra(e,t.bg);return{paddingTop:n,paddingRight:r,paddingBottom:i,paddingLeft:o,...t.marginTop?{marginTop:t.marginTop}:{},...t.gap[0]?{columnGap:t.gap[0]}:{},...t.gap[1]?{rowGap:t.gap[1]}:{},...l===a?l?{borderRadius:l}:{}:{borderTopLeftRadius:l,borderTopRightRadius:l,borderBottomLeftRadius:a,borderBottomRightRadius:a},...s?{backgroundColor:s}:{},...t.edge.width>0&&!t.edge.ring?{borderWidth:t.edge.width,borderColor:ta(e,t.edge.color)}:{},...t.minHeight?{minHeight:t.minHeight}:{},...Da(t.shadow)}}function Fa(){if(S.OS!=="web")return false;let e=globalThis;return typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ra(e){let[t,r]=n(()=>e===null&&Fa());return o(()=>{if(e!==null)return;let t=true,n=F?.isReduceMotionEnabled;if(typeof n=="function"){let e=n.call(F);e!=null&&typeof e.then=="function"&&e.then(e=>{t&&r(e===true)},()=>{})}let i=F?.addEventListener?.("reduceMotionChanged",e=>r(e===true));return()=>{t=false,i?.remove?.()}},[e]),e??t}function Pa(e){let t=Ra(Ta());return e.motion.reduced||t}function za(e){let t=Math.max(0,Math.ceil((44-e)/2));return t===0?void 0:{top:t,bottom:t,left:t,right:t}}function Da(e){return e.blur===0&&e.y===0&&e.x===0?null:{shadowColor:e.color,shadowOffset:{width:e.x,height:e.y},shadowOpacity:1,shadowRadius:e.blur,elevation:1}}function $a(e){return Math.round(e*100)/100}function Oa(e,t){let n=Number(t.weight),r=t.letterSpacing??0;return{...Ca(e,{size:t.size,weight:n,lineHeight:$a(t.size*t.lineHeight),color:e.colors.text,tracking:r?$a(t.size*r):0,mono:t.face==="mono",upper:t.uppercase===true}),flexShrink:1}}function Ba(e){return e==="auto"?null:S.OS==="ios"?{lineBreakStrategyIOS:"push-out"}:S.OS==="android"&&e==="balance"?{textBreakStrategy:"balanced"}:null}function _a(e,t){let n=e.type.weight[t];return e.type.namedFaces?{fontFamily:e.type.faces[Jl(n)]}:{fontWeight:String(n)}}function Text2({tier:e,variant:n,tone:r,weight:i,level:o,lineBreak:l,typeRole:a,...s}){let c=Xl();if(a){let n=c.type.scaleCaps[e??a.tier??"content"],r=l?Ba(l):null;return t(C,{...n>0?{maxFontSizeMultiplier:n}:{},...r,...s,style:[Oa(c,a),s.style]})}let d=c.type.scaleCaps[e??(n?xa(c,n):"content")],u=Ba(l??(n?va[n]:"auto"));if(n===void 0&&r===void 0&&i===void 0&&o===void 0)return u?t(C,{...d>0?{maxFontSizeMultiplier:d}:{},...u,...s}):t(C,d>0?{maxFontSizeMultiplier:d,...s}:s);let p=ka(c,r),h=n?Ca(c,wa(c,n,r,i)):{...p?{color:p}:{},...i?_a(c,i):{}},g=o===void 0?{}:{accessibilityRole:"header",...S.OS==="web"?{"aria-level":o}:{}};return t(C,{...d>0?{maxFontSizeMultiplier:d}:{},...u,...g,...s,style:[h,s.style]})}var La=24,Ea=16,Aa=.8,ja=e=>Math.round(e*Ea);function Wa(e,t,n,r,i,o){let l=e-n/2,a=t-r/2,s=Math.round(l),c=Math.round(a);return{position:"absolute",left:s,top:c,width:n,height:r,transform:[{translateX:l-s},{translateY:a-c},{rotate:`${Math.atan2(o,i)*180/Math.PI}deg`},{scale:1/Ea}]}}function Ma(e,t,n){for(let r of e.strokes){let e=r.width*t,i=r.points,o=i.length/2,l=r.closed?o:o-1;for(let a=0;a<l;a+=1){let l=(a+1)%o,s=(i[a*2]??0)*t,c=(i[a*2+1]??0)*t,d=(i[l*2]??0)*t-s,u=(i[l*2+1]??0)*t-c,p=Math.hypot(d,u);if(p===0&&!(o===2&&r.cap))continue;let h=p===0?1:d/p,g=p===0?0:u/p,f=r.closed||a>0||r.cap?e/2:0,m=r.closed||l!==o-1||r.cap?e/2:0,y=(p+m-f)/2;n.push({paint:"backgroundColor",style:{...Wa(s+h*y,c+g*y,ja(p+f+m),ja(e),h,g),borderTopLeftRadius:f>0?ja(e)/2:0,borderBottomLeftRadius:f>0?ja(e)/2:0,borderTopRightRadius:m>0?ja(e)/2:0,borderBottomRightRadius:m>0?ja(e)/2:0,...r.opacity===void 0?{}:{opacity:r.opacity}}})}}}function Na(e,t,n){for(let r of e.boxes){let e=(r.w+r.width)*t,i=(r.h+r.width)*t;n.push({paint:"borderColor",style:{...Wa((r.x-r.width/2)*t+e/2,(r.y-r.width/2)*t+i/2,ja(e),ja(i),1,0),borderWidth:ja(r.width*t),borderRadius:(r.radius+r.width/2)*t*Ea,...r.opacity===void 0?{}:{opacity:r.opacity}}})}}function Ua(e,t,n){for(let r of e.triangles){let e=[0,1,2].map(e=>[(r[e*2]??0)*t,(r[e*2+1]??0)*t]),i=0,o=-1;for(let t=0;t<3;t+=1){let n=e[t]??[0,0],r=e[(t+1)%3]??[0,0],l=Math.hypot(r[0]-n[0],r[1]-n[1]);l>o&&(o=l,i=t)}if(o<=0)continue;let l=e[i]??[0,0],a=e[(i+1)%3]??[0,0],s=e[(i+2)%3]??[0,0],c=(a[0]-l[0])/o,d=(a[1]-l[1])/o,u=(s[0]-l[0])*c+(s[1]-l[1])*d,p=(s[0]-l[0])*-d+(s[1]-l[1])*c,h=Math.abs(p),g=p<0,f=g?-h/2:h/2,m=ja(u),y=ja(o)-m,b=ja(h);n.push({paint:g?"borderBottomColor":"borderTopColor",style:{...Wa(l[0]+c*(o/2)-d*f,l[1]+d*(o/2)+c*f,m+y,b,c,d),width:0,height:0,borderLeftWidth:m,borderRightWidth:y,borderLeftColor:"transparent",borderRightColor:"transparent",...g?{borderBottomWidth:b}:{borderTopWidth:b}}})}for(let r of e.seams){let e=(r[0]??0)*t,i=(r[1]??0)*t,o=(r[2]??0)*t-e,l=(r[3]??0)*t-i,a=Math.hypot(o,l),s=Aa*(r[4]??0),c=Aa*(r[5]??0),d=a-s-c;if(a===0||d<=0)continue;let u=s+d/2;n.push({paint:"backgroundColor",style:Wa(e+o/a*u,i+l/a*u,ja(d),ja(Aa),o/a,l/a)})}}var qa=/* @__PURE__ */new WeakMap;function Va(e,t){let n=qa.get(e);n===void 0&&(n=/* @__PURE__ */new Map,qa.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i=[],o=t/La;return Na(e,o,i),Ma(e,o,i),Ua(e,o,i),n.set(t,i),i}function Glyph({icon:e,size:t,color:n,label:r,testID:i,style:o}){let l=Xl(),a=t??l.metrics.icon.size,s=n??l.colors.ink;/* @__PURE__ */
|
|
36
|
+
return P(f,{testID:i,pointerEvents:"none",style:[{width:a,height:a},o],...r?{accessible:true,accessibilityRole:"image",accessibilityLabel:r}:{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"},children:Va(e,a).map((e,t)=>/* @__PURE__ */P(f,{style:[e.style,{[e.paint]:s}]},t))})}var Ga=/* @__PURE__ */(()=>{let e=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#icons@v1"),t=globalThis;return t[e]??(t[e]={icons:{},warned:/* @__PURE__ */new Set})})();function Ka(e){Object.assign(Ga.icons,e)}function Xa(e){let t=Ga.icons[e];return t===void 0&&(typeof __DEV__<"u"?__DEV__:typeof process<"u"&&process.env.NODE_ENV!=="production")&&!Ga.warned.has(e)&&(Ga.warned.add(e),console.warn(`@everfur-health/ui-native: no icon "${e}" is registered. The lean entry draws only the icons an app registers: registerIcons({ ... }) with the UI_RN_ICON_* exports, or pass a drawing.`)),t}function Icon({name:e,...t}){let n=Xa(e);return n?/* @__PURE__ */P(Glyph,{icon:n,...t}):null}g.create({base:{flexDirection:"row",alignItems:"center",justifyContent:"center"},block:{alignSelf:"stretch"},auto:{alignSelf:"flex-start"},labelBox:{flexShrink:1},label:{textAlign:"center"}});var Ya={block:{height:16,radius:8},shimmer:{duration:1150,bandShare:.6,bandMin:28,band:"rgba(255, 255, 255, 0.42)",skew:-14}},Ja={padding:[10,16],gap:10,copyGap:2,radius:28,bg:"ink",dangerBg:"alertDeep",icon:20,iconColor:"onInk",title:{size:15,weight:700,lineHeight:21.75,tracking:0,color:"onInk"},message:{size:15,weight:400,lineHeight:21.75,tracking:0,color:"onInk"}};g.create({head:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},shrink:{flexShrink:1},end:{justifyContent:"flex-end"}});g.create({chip:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"}});function Qa(e,t){return Ca(e,{size:t.size,weight:t.weight,lineHeight:t.lineHeight,color:ta(e,t.color),tracking:t.tracking,mono:t.mono===true,upper:t.upper===true})}g.create({st:{alignItems:"center",alignSelf:"stretch"},center:{textAlign:"center"},acts:{alignItems:"center",alignSelf:"stretch"},link:{alignItems:"center",justifyContent:"center"},underline:{textDecorationLine:"underline"},compact:{alignItems:"center"},iconBox:{alignItems:"center",justifyContent:"center"},pill:{alignItems:"center",justifyContent:"center"}});function Za(e,t){return Ca(e,na(e,t))}g.create({acts:{flexDirection:"row",flexWrap:"wrap",alignItems:"center"},st:{alignItems:"center",alignSelf:"stretch"},center:{textAlign:"center"},stActs:{alignItems:"center",alignSelf:"stretch"},link:{alignItems:"center",justifyContent:"center"},underline:{textDecorationLine:"underline"}});g.create({pill:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",maxWidth:"100%"},label:{flexShrink:1}});var es={strokes:[{width:2,cap:true,closed:false,points:[21.73,18,13.73,4,12.997,3.258,11.99,2.986,10.983,3.258,10.25,4,2.25,18,1.982,19.005,2.254,20.008,2.994,20.739,4,21,20,21,20.999,20.731,21.731,19.999,21.998,18.999,21.73,18]},{width:2,cap:true,closed:false,points:[12,9,12,13]},{width:2,cap:true,closed:false,points:[12,17,12.01,17]}],boxes:[],triangles:[],seams:[]},ts={strokes:[{width:2,cap:true,closed:false,points:[12,19,5,12,12,5]},{width:2,cap:true,closed:false,points:[19,12,5,12]}],boxes:[],triangles:[],seams:[]};var ns={strokes:[{width:2,cap:true,closed:false,points:[20,6,9,17,4,12]}],boxes:[],triangles:[],seams:[]},rs={strokes:[{width:2,cap:true,closed:false,points:[9,18.001,15,12.001,9,6.001]}],boxes:[],triangles:[],seams:[]};var is={strokes:[{width:2,cap:true,closed:false,points:[12,16,12,12]},{width:2,cap:true,closed:false,points:[12,8,12.01,8]}],boxes:[{x:2,y:2,w:20,h:20,radius:10,width:2}],triangles:[],seams:[]},os={strokes:[{width:2,cap:true,closed:true,points:[11,20,8.727,19.628,6.697,18.538,5.131,16.848,4.199,14.741,4.001,12.446,4.558,10.211,5.811,8.278,7.624,6.856,9.8,6.1,12.322,5.587,14.274,5.099,15.788,4.568,16.993,3.921,18.02,3.088,19,2,19.734,3.557,20.375,5.318,20.828,7.42,21,10,20.72,12.286,19.931,14.388,18.708,16.245,17.127,17.796,15.265,18.98,13.198,19.735,11,20]},{width:2,cap:true,closed:false,points:[2,21,2.218,19.285,2.858,17.776,3.896,16.524,5.311,15.582,7.08,15,8.885,14.469,10.573,13.695,11.993,12.823,13,12]}],boxes:[],triangles:[],seams:[]};var ls={strokes:[{width:2,cap:true,closed:true,points:[9,10,10.913,10.381,12.536,11.464,13.619,13.087,14,15,14,18.5,13.615,20.094,12.547,21.338,11.029,21.959,9.395,21.82,8.003,20.952,7.16,19.545,6.576,18.327,5.676,17.425,4.46,16.84,3.054,15.997,2.186,14.607,2.046,12.974,2.665,11.456,3.907,10.387,5.5,10]}],boxes:[{x:9,y:2,w:4,h:4,radius:2,width:2},{x:16,y:6,w:4,h:4,radius:2,width:2},{x:18,y:14,w:4,h:4,radius:2,width:2}],triangles:[],seams:[]};g.create({qty:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"},button:{alignItems:"center",justifyContent:"center"}});g.create({row:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},compact:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},titles:{flexShrink:1},edit:{flexDirection:"row",alignItems:"center",justifyContent:"center"},pressed:{opacity:.6}});g.create({row:{flexDirection:"row",alignSelf:"stretch"},hairline:{position:"absolute",left:0,right:0},tab:{flex:1,flexBasis:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},center:{flexShrink:1,textAlign:"center"}});g.create({scrim:{flex:1,justifyContent:"flex-end"},sheet:{maxHeight:"100%"},grab:{alignItems:"center",justifyContent:"center"},head:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},titles:{flexShrink:1,flexGrow:1},close:{alignItems:"center",justifyContent:"center"},closeEnd:{marginLeft:"auto"},scroll:{flexGrow:0},top:{flexDirection:"row",alignItems:"center"}});function Skeleton({lines:e=3,shape:t,label:n,testID:r,style:i,block:o,color:l}){let a=Xl(),s=a.metrics.skeleton,c=l??s.color??a.colors.tintSage,d=n?{accessible:true,accessibilityRole:"progressbar",accessibilityLabel:n,accessibilityState:{busy:true}}:{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};return o?/* @__PURE__ */P(SkeletonBox,{block:o,fill:c,testID:r,style:i,named:d}):t?/* @__PURE__ */P(f,{testID:r,style:[as(a,t,c),i],...d}):/* @__PURE__ */P(f,{testID:r,style:[{rowGap:s.gap,alignSelf:"stretch"},i],...d,children:Array.from({length:Math.max(1,e)},(e,t)=>/* @__PURE__ */P(f,{style:{height:s.lineHeight,width:oa(a,t),borderRadius:a.radius.pill,backgroundColor:c}},t))})}function SkeletonBox({block:e,fill:t,testID:r,style:i,named:l}){let a=Xl(),c=Pa(a),d=Ya,u=d.shimmer,p=e.shimmer===true&&!c,[h,g]=n(0),m=s(new y.Value(0)).current;o(()=>{if(!p||h<=0)return;m.setValue(0);let e=y.loop(y.timing(m,{toValue:1,duration:u.duration,easing:b.inOut(b.ease),useNativeDriver:S.OS!=="web"}));return e.start(),()=>e.stop()},[p,h,m,u.duration]);let k=Math.max(u.bandMin,h*u.bandShare);/* @__PURE__ */
|
|
37
|
+
return P(f,{testID:r,onLayout:p?e=>g(Math.round(e.nativeEvent.layout.width)):void 0,style:[{width:e.width??"100%",height:e.height??d.block.height,borderRadius:e.radius??d.block.radius,borderCurve:"continuous",backgroundColor:t,overflow:"hidden"},i],...l,children:p&&h>0?/* @__PURE__ */P(y.View,{pointerEvents:"none",style:{position:"absolute",top:-6,bottom:-6,left:0,width:k,backgroundColor:u.band,transform:[{translateX:m.interpolate({inputRange:[0,1],outputRange:[-k,h+k]})},{skewX:`${u.skew}deg`}]}}):null})}function as(e,t,n){let r=t.radius==="circle",i=t.width??(r?t.height:void 0),o=ss(e,t,i);return{height:t.height,...i===void 0?{alignSelf:"stretch"}:{width:i},borderRadius:o,backgroundColor:n}}function ss(e,t,n){let r=t.radius??"pill";return r==="none"?0:r==="circle"?(typeof n=="number"?Math.min(n,t.height):t.height)/2:e.radius[r]}function SummaryList({rows:e,total:t=false,trailingRows:n=[],loading:r=false,loadingLabel:i,variant:o="standard",note:l,grouped:a=true,lineBreak:s,testID:c,style:d}){let u=Xl(),p=ia(u);if(r)/* @__PURE__ */
|
|
38
|
+
return P(f,{testID:c,style:[{padding:p.paddingX,borderRadius:p.radius,backgroundColor:u.colors.surface},d],children:/* @__PURE__ */P(Skeleton,{lines:4,label:i})});let h=typeof t=="object"?[...e,{...t,key:t.key??"total"}]:e,g=t!==false;if(h.length===0)return null;let m=e=>a?{accessible:true,accessibilityLabel:`${e.term}, ${e.value}`}:null,y=s===void 0?null:{lineBreak:s},b=l?{...l,key:l.key??"note"}:void 0,k=[...h,...n,...b?[b]:[]];if(o!=="standard"&&o!=="flush"){let e=u.metrics.variants.summary;/* @__PURE__ */
|
|
39
|
+
return P(f,{testID:c,style:[Ha(u,o==="inset"?e.inset:e.box),d],children:k.map((t,n)=>{let r=t===b?"note":g&&n===h.length-1?"total":"row",i=r==="note"?e.renewRow:r==="total"?e.totalRow:e.row,o=r==="note"?e.renewTerm:r==="total"?e.totalTerm:e.term,l=r==="note"?e.renew:r==="total"?e.total:e.value;/* @__PURE__ */
|
|
40
|
+
return R(f,{testID:la(c,t.key??n,t.testID),...m(t),style:[cs.cardRow,{columnGap:i.gap[0]??0,minHeight:i.minHeight||void 0,marginTop:i.marginTop||void 0}],children:[
|
|
41
|
+
/* @__PURE__ */P(Text2,{...y,style:Ca(u,na(u,o)),children:t.term}),
|
|
42
|
+
/* @__PURE__ */P(Text2,{...y,style:Ca(u,na(u,l)),children:t.value})]},t.key??`${n}`)})})}let w=o==="flush";/* @__PURE__ */
|
|
43
|
+
return P(f,{testID:c,style:[{paddingHorizontal:w?0:p.paddingX,paddingVertical:w?0:p.paddingY,borderWidth:w?0:p.borderWidth,borderColor:p.borderColor,borderRadius:p.radius,backgroundColor:p.background},Da(p.shadow),d],children:k.map((e,t)=>{let n=t===k.length-1,r=g&&t===h.length-1,i=r?p.totalRowMinHeight:p.row.minHeight;/* @__PURE__ */
|
|
44
|
+
return R(f,{testID:la(c,e.key??t,e.testID),...m(e),style:[cs.row,{alignItems:p.row.center?"center":"baseline",paddingVertical:p.row.paddingY,columnGap:p.row.gapX,rowGap:p.row.gapY},i?{minHeight:i}:null,n||p.row.divider===0?null:{borderBottomWidth:p.row.divider,borderBottomColor:p.borderColor}],children:[
|
|
45
|
+
/* @__PURE__ */P(Text2,{...y,style:Ca(u,r?p.totalTerm:p.term),children:e.term}),
|
|
46
|
+
/* @__PURE__ */P(Text2,{...y,style:[Ca(u,r?p.total:e.tone==="off"?p.off:p.value),cs.value,p.tabular?cs.tabular:null],children:e.value})]},e.key??`${t}`)})})}var cs=g.create({row:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between"},cardRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},value:{marginLeft:"auto",textAlign:"right"},tabular:{fontVariant:["tabular-nums"]}});function BlockIcon({icon:e,size:t,color:n,style:r}){let i=Xl();return typeof e=="function"?e({size:t,color:n??i.colors.ink}):typeof e!="string"?/* @__PURE__ */P(Glyph,{icon:e,size:t,color:n,style:r}):/* @__PURE__ */P(Icon,{name:e,size:t,color:n,style:r})}function FadeImage({onShown:e,onLoad:t,style:n,...r}){let i=Xl(),o=Pa(i),l=s(new y.Value(0)).current;/* @__PURE__ */
|
|
47
|
+
return P(y.Image,{...r,fadeDuration:0,onLoad:n=>{t?.(n);let r=i.motion.duration.fade;if(o||r<=0){l.setValue(1),e?.();return}y.timing(l,{toValue:1,duration:r,easing:b.out(b.cubic),useNativeDriver:S.OS!=="web"}).start(()=>e?.())},style:[n,{opacity:l}]})}g.create({row:{flexDirection:"row",alignItems:"flex-start"},noGap:{columnGap:0},box:{alignItems:"center",justifyContent:"center"},grow:{flex:1,minWidth:0}});g.create({row:{flexDirection:"row",alignItems:"center"},words:{flex:1,minWidth:0},center:{alignItems:"center",justifyContent:"center"}});g.create({hintRow:{flexDirection:"row",alignItems:"flex-start"},grow:{flex:1}});g.create({base:{alignItems:"center",justifyContent:"center",alignSelf:"flex-start"}});g.create({base:{alignSelf:"flex-start"}});g.create({track:{alignSelf:"flex-start"},thumb:{position:"absolute"}});g.create({box:{flexDirection:"row"},line:{alignItems:"center"},area:{alignItems:"stretch"},input:{flex:1,minWidth:0,margin:0,borderWidth:0,backgroundColor:"transparent"},hidden:{position:"absolute",width:1,height:1,overflow:"hidden",opacity:0}});g.create({clip:{overflow:"hidden"},center:{alignItems:"center",justifyContent:"center"},stack:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"}});g.create({leadAuto:{flexShrink:0},words:{flex:1,minWidth:0},below:{alignSelf:"flex-start"},end:{flexDirection:"row",alignItems:"center",flexShrink:1,maxWidth:"45%",justifyContent:"flex-end"},flush:{marginTop:0}});g.create({offRow:{flexDirection:"row",alignItems:"center",alignSelf:"stretch"},offText:{flexShrink:1,minWidth:0},offAction:{flexDirection:"row",alignItems:"center",marginLeft:"auto",flexShrink:0},row:{flexDirection:"row",alignItems:"flex-start"},copy:{flex:1,minWidth:0},acts:{flexDirection:"row",flexWrap:"wrap",alignItems:"center"}});function Toast({message:e,action:t,variant:n="pill",title:r,tone:i="info",onPress:o,testID:l,style:a}){let s=Xl();if(n==="top")/* @__PURE__ */return P(TopToast,{message:e,title:r,tone:i,onPress:o,testID:l,style:a,t:s});let c=n==="card",d=s.metrics.lists.toast,u=s.metrics.variants.toast,p=c?u.box:d.box,[h=0,g=0,y=0,b=0]=p.padding,k=Za(s,c?u.text:d.text);/* @__PURE__ */
|
|
48
|
+
return R(f,{testID:l,style:[c?us.card:[us.pill,{marginHorizontal:d.inset}],{paddingTop:h,paddingRight:g,paddingBottom:y,paddingLeft:b,borderRadius:p.radius[0]??0,backgroundColor:ra(s,p.bg)},a],children:[
|
|
49
|
+
/* @__PURE__ */P(Text2,{style:[k,c?us.start:us.center,us.shrink],children:e}),t?/* @__PURE__ */P(m,{onPress:t.onPress,accessibilityRole:"button",accessibilityLabel:t.label,testID:l?`${l}-action`:void 0,style:({pressed:e})=>[{marginLeft:s.metrics.lists.banner.acts.gap[0]??0},e?{opacity:s.metrics.lists.linkPressedOpacity}:null],children:/* @__PURE__ */P(Text2,{tier:"control",style:Za(s,{...c?u.text:d.text,weight:s.metrics.lists.banner.link.weight}),children:t.label})}):null]})}function ds(e){return e==="success"?ns:e==="info"?is:es}function TopToast({message:e,title:t,tone:n,onPress:r,testID:i,style:o,t:l}){let a=Ja,s=aa(n),[c,d]=a.padding;/* @__PURE__ */
|
|
50
|
+
return R(m,{testID:i,onPress:r,accessibilityRole:s?"alert":"text",accessibilityLiveRegion:s?"assertive":"polite",accessibilityLabel:t?`${t}. ${e}`:e,style:[us.top,{columnGap:a.gap,paddingVertical:c,paddingHorizontal:d,borderRadius:a.radius,backgroundColor:ta(l,n==="danger"?a.dangerBg:a.bg)},o],children:[
|
|
51
|
+
/* @__PURE__ */P(Glyph,{icon:ds(n),size:a.icon,color:ta(l,a.iconColor)}),
|
|
52
|
+
/* @__PURE__ */R(f,{style:[us.copy,{rowGap:a.copyGap}],children:[t?/* @__PURE__ */P(Text2,{style:Qa(l,a.title),children:t}):null,
|
|
53
|
+
/* @__PURE__ */P(Text2,{style:Qa(l,a.message),children:e})]})]})}var us=g.create({fill:{flex:1},host:{position:"absolute",left:0,right:0,alignItems:"center"},cardHost:{position:"absolute"},card:{alignSelf:"stretch"},start:{textAlign:"left"},pill:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"center",alignSelf:"center",maxWidth:"100%"},center:{textAlign:"center"},shrink:{flexShrink:1},topHost:{position:"absolute",alignItems:"center",zIndex:1e3},top:{flexDirection:"row",alignItems:"center"},copy:{flex:1}});g.create({row:{flexDirection:"row",alignItems:"center"}});function ps(e){return typeof e=="number"?e:typeof e=="string"?e?{uri:e}:null:e&&typeof e=="object"&&e.uri?e:null}function Photo({image:e,onImageError:t,box:r,testID:i}){let o=Xl(),[l,a]=n(null),s=ps(e),c=[Ha(o,r),{width:r.w,height:r.h,overflow:"hidden"}];return!s||l===e?/* @__PURE__ */P(f,{style:c}):/* @__PURE__ */P(f,{style:c,children:/* @__PURE__ */P(FadeImage,{testID:i,source:s,resizeMode:"cover",onError:()=>{e!=null&&(a(e),t?.(e))},style:{position:"absolute",top:0,right:0,bottom:0,left:0}},JSON.stringify(s))})}function Quote({quote:e,m:t,testID:n}){let r=Xl(),i=e=>Ca(r,na(r,e)),o=e.tag?/* @__PURE__ */P(f,{testID:n===void 0?void 0:`${n}-tag`,style:Ha(r,t.saysTag),children:/* @__PURE__ */P(Text2,{style:[i(t.saysTagText),{paddingTop:0,lineHeight:t.saysTag.h-(t.saysTag.padding?.[0]??0)-(t.saysTag.padding?.[2]??0)}],children:e.tag})}):null;return ps(e.image)===null?/* @__PURE__ */R(f,{testID:n,style:[Ha(r,t.says),{flexDirection:"column",rowGap:t.saysBare.gap[1],marginTop:t.says.marginTop}],children:[e.by||o?/* @__PURE__ */R(Text2,{style:i(t.saysKicker),children:[e.by,e.by&&o?" ":null,o]}):null,
|
|
54
|
+
/* @__PURE__ */P(Text2,{style:i(t.saysSerif),children:e.text})]}):/* @__PURE__ */R(f,{testID:n,style:[Ha(r,t.says),{flexDirection:"row",alignItems:"flex-start",columnGap:t.says.gap[0],marginTop:t.says.marginTop}],children:[
|
|
55
|
+
/* @__PURE__ */P(Photo,{image:e.image,onImageError:e.onImageError,box:t.saysImg}),
|
|
56
|
+
/* @__PURE__ */R(Text2,{style:[i(t.saysText),{flex:1}],children:[e.by?/* @__PURE__ */P(Text2,{style:i(t.saysBy),children:e.by}):null,e.by?" ":null,e.text,o?" ":null,o]})]})}function Jump({jump:e,m:t,testID:n}){let r=Xl(),i=Pa(r),o=e=>Ca(r,na(r,e)),l=ps(e.image)!==null,a=[Ha(r,t.jump),{flexDirection:"row",alignItems:"center",columnGap:t.jump.gap[0],marginTop:t.jump.marginTop}],s=/* @__PURE__ */R(z,{children:[l?/* @__PURE__ */P(Photo,{image:e.image,onImageError:e.onImageError,box:t.jumpImg}):null,
|
|
57
|
+
/* @__PURE__ */R(f,{style:{flex:1,minWidth:0},children:[
|
|
58
|
+
/* @__PURE__ */P(Text2,{style:o(t.jumpKicker),children:e.kicker}),
|
|
59
|
+
/* @__PURE__ */P(Text2,{style:o(t.jumpTitle),children:e.title})]}),
|
|
60
|
+
/* @__PURE__ */P(Text2,{style:o(t.jumpGo),children:e.go})]});return e.onPress?/* @__PURE__ */P(m,{testID:n,onPress:e.onPress,accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??`${e.kicker}, ${e.title}`,style:({pressed:e})=>[...a,e&&!i?{transform:[{scale:t.jumpPressScale}]}:null],children:s}):/* @__PURE__ */P(f,{testID:n,style:a,children:s})}function PlanNeedCard({kicker:e,source:t,sources:n,title:r,signals:i,score:o,more:l,quote:a,jump:s,variant:c="standard",children:d,beforeJump:u,loading:p=false,loadingLabel:h,testID:g,style:y}){let b=Xl(),k=c==="plan",w=ya(b,Il),v=k?w:ya(b,Cl),x=e=>g===void 0?void 0:`${g}-${e}`,S=n??(t?[{label:t}]:[]),T=e=>Ca(b,na(b,e)),C=[Ha(b,v.card),{marginTop:0},y];if(p)/* @__PURE__ */
|
|
61
|
+
return P(f,{testID:g,style:C,children:/* @__PURE__ */P(Skeleton,{lines:3,label:h})});let I=T(v.signalText);/* @__PURE__ */
|
|
62
|
+
return R(f,{testID:g,style:C,children:[
|
|
63
|
+
/* @__PURE__ */R(f,{style:{flexDirection:"row",alignItems:"center",columnGap:v.kicker.gap[0],minHeight:S.length>0?v.kicker.h:void 0},children:[
|
|
64
|
+
/* @__PURE__ */P(Text2,{style:T(v.kickerText),children:e}),S.length>0?/* @__PURE__ */P(f,{style:{marginLeft:"auto",flexDirection:"row",columnGap:w.sources.gap[0],flexShrink:1},children:S.map((e,t)=>{let r=e.kind==="dna";/* @__PURE__ */
|
|
65
|
+
return P(f,{testID:x(n?`source-${t}`:"source"),style:[Ha(b,v.source),r?{backgroundColor:ta(b,w.sourceDna.bg)}:null,{height:v.source.h,justifyContent:"center"}],children:/* @__PURE__ */P(Text2,{numberOfLines:1,style:T(r?w.sourceDnaText:v.sourceText),children:e.label})},`${t}-${e.label}`)})}):null]}),r?/* @__PURE__ */P(Text2,{accessibilityRole:"header",style:[T(v.title),{marginTop:v.title.marginTop}],children:r}):null,i.map(e=>/* @__PURE__ */R(f,{style:{flexDirection:"row",columnGap:v.signal.gap[0],marginTop:v.signal.marginTop},children:[e.dot===false?null:e.dot==="space"?/* @__PURE__ */P(f,{style:{width:v.dot.w}}):/* @__PURE__ */P(f,{style:{height:I.lineHeight,justifyContent:"center",paddingTop:(I.fontSize??0)*.4-v.dot.h/2},children:/* @__PURE__ */P(f,{style:{width:v.dot.w,height:v.dot.h,borderRadius:v.dot.w/2,backgroundColor:ta(b,k&&e.tone==="watch"?w.dotWatch.bg:k&&e.tone==="clear"?w.dotClear.bg:v.dot.bg),transform:[{translateY:v.dot.dy}]}})}),
|
|
66
|
+
/* @__PURE__ */R(Text2,{style:[I,{flex:1}],children:[e.lead?/* @__PURE__ */P(Text2,{style:T(v.signalLead),children:e.lead}):null,e.lead?" ":null,e.text]})]},e.key)),k&&l?/* @__PURE__ */R(z,{children:[
|
|
67
|
+
/* @__PURE__ */R(m,{testID:x("more"),onPress:l.onPress,accessibilityRole:"button",accessibilityState:{expanded:l.expanded},"aria-expanded":l.expanded,style:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",columnGap:w.more.gap[0],minHeight:w.more.minHeight,marginTop:w.more.marginTop,marginBottom:w.more.marginBottom,marginLeft:w.moreInset},children:[
|
|
68
|
+
/* @__PURE__ */P(Text2,{style:T(w.moreText),children:l.label}),
|
|
69
|
+
/* @__PURE__ */P(Glyph,{icon:rs,size:w.moreIcon.w,color:ta(b,w.moreText.color),style:{transform:[{rotate:`${l.expanded?w.moreTurn.open:w.moreTurn.closed}deg`}]}})]}),l.expanded?/* @__PURE__ */P(f,{testID:x("more-panel"),nativeID:l.panelId,style:[Ha(b,w.rep),{marginTop:w.rep.marginTop}],children:l.content}):null]}):null,o?/* @__PURE__ */R(f,{testID:g===void 0?void 0:`${g}-score`,style:[Ha(b,v.score),{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}],children:[
|
|
70
|
+
/* @__PURE__ */P(f,{style:{flexShrink:1,minWidth:0,maxWidth:k&&w.scoreLabelMax?w.scoreLabelMax:void 0},children:/* @__PURE__ */R(Text2,{style:T(v.scoreLabel),children:[o.label,o.tag?" ":null,o.tag?/* @__PURE__ */P(f,{testID:x("tag"),style:Ha(b,v.scoreTag),children:/* @__PURE__ */P(Text2,{style:T(v.scoreTagText),children:o.tag})}):null]})}),
|
|
71
|
+
/* @__PURE__ */R(f,{accessible:o.accessibilityLabel!==void 0,accessibilityLabel:o.accessibilityLabel,style:{flexShrink:0,alignItems:"flex-end"},children:[
|
|
72
|
+
/* @__PURE__ */R(f,{style:{flexDirection:"row",alignItems:"center",columnGap:v.scoreNums.gap[0]},children:[o.was?/* @__PURE__ */P(Text2,{style:T(v.scoreWas),children:o.was}):null,o.was?o.icon!==void 0?/* @__PURE__ */P(f,{testID:x("arrow"),children:/* @__PURE__ */P(BlockIcon,{icon:o.icon,size:v.scoreArrow.w,color:ta(b,v.scoreArrow.color)})}):/* @__PURE__ */P(Glyph,{testID:x("arrow"),icon:ts,size:v.scoreArrow.w,color:ta(b,v.scoreArrow.color),style:v.scoreArrowFlip?{transform:[{rotate:"180deg"}]}:void 0}):null,
|
|
73
|
+
/* @__PURE__ */R(Text2,{style:T(v.scoreNow),children:[o.now,o.of?/* @__PURE__ */P(Text2,{style:T(v.scoreOf),children:o.of}):null]})]}),o.since?/* @__PURE__ */P(Text2,{style:[T(v.scoreSince),{marginTop:v.scoreSince.marginTop}],children:o.since}):null]})]}):null,k&&a?/* @__PURE__ */P(Quote,{quote:a,m:w,testID:x("quote")}):null,k?u:null,k&&s?/* @__PURE__ */P(Jump,{jump:s,m:w,testID:x("jump")}):null,d]})}function hs(e){return typeof e=="number"?e:typeof e=="string"?e?{uri:e}:null:e&&typeof e=="object"&&e.uri?e:null}function TipCard(e){let{number:t,title:r,text:i,foot:o,footArrow:l=false,footPress:a,tone:s="y",image:c,onImageError:d,icon:u=os,onPress:p,pressTarget:h="title",accessibilityLabel:g,variant:y="standard",loading:b=false,loadingLabel:k,testID:w,style:v}=e,x=Xl(),S=Pa(x),T=ya(x,Hl),C=ya(x,Fl),I=ya(x,Rl),H=ya(x,Pl),F=y==="web",D=y==="photo",$=y==="plan",[O,B]=n(false),[_,L]=n(null),E=e=>Ca(x,na(x,e)),A=D?{...T,card:C.card,tones:C.tones,img:C.img,n:C.n,nText:C.nText,title:C.title,pressScale:C.pressScale,bare:C.bare,thumb:C.thumb,thumbIcon:C.thumbIcon}:$?{...T,card:H.card,tones:H.tones,title:H.title,text:H.text,footText:H.footText,foot:H.foot,pressScale:1}:T,j=F?[Ha(x,I.card),v]:[Ha(x,A.card),{backgroundColor:ta(x,A.tones[s])},v],W=F?I.imgAspect:D?C.imgAspect:T.img.w/T.img.h,M=F?1:A.pressScale;if(b)/* @__PURE__ */
|
|
74
|
+
return P(f,{testID:w,style:j,children:/* @__PURE__ */P(Skeleton,{lines:3,label:k})});let N=A.n,U=F?null:/* @__PURE__ */P(f,{style:[Ha(x,N),{position:"absolute",left:N.x,top:N.y,width:N.w,height:N.h,alignItems:"center",justifyContent:"center"}],children:/* @__PURE__ */P(Text2,{style:E(A.nText),children:t})}),q=/* @__PURE__ */P(Text2,{style:E(F?I.title:A.title),children:r}),V=p!==void 0&&(F||h==="card"),G=e=>w===void 0?void 0:`${w}-${e}`,K=$?null:hs(c),X=K&&_!==c?K:null,Y=E(A.footText),J=l||a?/* @__PURE__ */P(Glyph,{icon:ts,size:T.footArrow.w,color:typeof Y.color=="string"?Y.color:void 0,style:T.footArrowFlip?{transform:[{rotate:"180deg"}]}:void 0}):null,Q=/* @__PURE__ */P(Text2,{style:Y,children:o}),Z={flexDirection:"row",alignItems:"center",columnGap:T.foot.gap[0]},ee=o&&!F&&!D?a?/* @__PURE__ */R(m,{testID:a.testID??G("foot"),onPress:a.onPress,accessibilityRole:"link",accessibilityLabel:a.accessibilityLabel??o,hitSlop:za(Y.lineHeight??T.footArrow.w),style:[Z,{marginTop:"auto",paddingTop:A.foot.padding[0],alignSelf:"flex-start",zIndex:1}],children:[Q,J]}):J?/* @__PURE__ */R(f,{style:[Z,{marginTop:"auto",paddingTop:A.foot.padding[0]}],children:[Q,J]}):/* @__PURE__ */P(Text2,{style:[Y,{marginTop:"auto",paddingTop:A.foot.padding[0]}],children:o}):null,te=()=>{c!=null&&(L(c),d?.(c))},ne=e=>/* @__PURE__ */P(BlockIcon,{icon:u,size:e.w,color:ta(x,e.color)}),re=$?/* @__PURE__ */R(f,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",minHeight:H.top.h},children:[
|
|
75
|
+
/* @__PURE__ */P(Text2,{style:E(H.nText),children:t}),
|
|
76
|
+
/* @__PURE__ */P(BlockIcon,{icon:u,size:H.icon.w,color:ta(x,H.icon.color)})]}):!F&&!X?/* @__PURE__ */R(f,{testID:G("thumb"),accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[Ha(x,A.bare),{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}],children:[
|
|
77
|
+
/* @__PURE__ */P(f,{style:[Ha(x,N),{width:N.w,height:N.h,alignItems:"center",justifyContent:"center"}],children:/* @__PURE__ */P(Text2,{style:E(A.nText),children:t})}),
|
|
78
|
+
/* @__PURE__ */P(f,{style:[Ha(x,A.thumb),{width:A.thumb.w,height:A.thumb.h,alignItems:"center",justifyContent:"center"}],children:ne(A.thumbIcon)})]}):/* @__PURE__ */R(f,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[Ha(x,F?I.img:A.img),{width:"100%",aspectRatio:W,overflow:"hidden"}],children:[X?/* @__PURE__ */P(FadeImage,{testID:G("image"),source:X,resizeMode:"cover",onError:te,style:{position:"absolute",top:0,right:0,bottom:0,left:0}},typeof c=="string"?c:JSON.stringify(c)):null,U]}),ie=/* @__PURE__ */R(z,{children:[re,
|
|
79
|
+
/* @__PURE__ */P(f,{style:F?null:{marginTop:A.title.marginTop,marginHorizontal:D?C.titleInset:0},children:p&&!V?/* @__PURE__ */P(m,{onPress:p,accessibilityRole:"button",accessibilityLabel:r,children:q}):q}),i&&!F&&!D?/* @__PURE__ */P(Text2,{style:[E(A.text),{marginTop:A.text.marginTop}],children:i}):null,ee]});return V&&a?/* @__PURE__ */R(f,{testID:w,style:[...j,O&&!S?{transform:[{scale:M}]}:null],children:[ie,
|
|
80
|
+
/* @__PURE__ */P(m,{testID:G("cover"),onPress:p,onPressIn:()=>B(true),onPressOut:()=>B(false),accessibilityRole:"button",accessibilityLabel:g??r,style:{position:"absolute",top:0,right:0,bottom:0,left:0}})]}):V?/* @__PURE__ */P(m,{testID:w,onPress:p,accessibilityRole:"button",accessibilityLabel:g??r,style:({pressed:e})=>[...j,e&&!S&&M!==1?{transform:[{scale:M}]}:null],children:ie}):/* @__PURE__ */P(f,{testID:w,style:j,children:ie})}var gs=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),fs=/* @__PURE__ */new WeakMap;function ms(e){let t=fs.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",i=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...gs},o=(e,t)=>Ao(e,t,Do(t),ys),l=(e,t)=>contrastRatio(e,t)>=ys?e:zo(t,ys),a=[i.card,i.paper].map(e=>Lo(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:l(n.onPrimary,n.primary),accent:n.accent,onAccent:l(n.onAccent,n.accent),link:o(n.linkInk,[i.card,i.paper,i.tile]),badge:n.brandSoft,onBadge:o(n.brandInk,a)},c=/* @__PURE__ */Object.freeze({...i,...s});return fs.set(e,c),c}var ys=4.5;var bs="#DAD7D1";function ks(e,t=false){let n=t=>e.roles[t]??t,r=t=>e.dark?n("line"):t,i=(e,t={})=>({bg:e,...t}),o=e=>({color:e}),l={color:"",x:0,y:0,blur:0,spread:0},a=Object.fromEntries(Object.entries({planInk:"primary",planOnInk:"onPrimary",planAccent:"accent",planLink:"link",planAccentWash:"accent4",planAccentChip:"accentChip",planLinkWash:"linkWash",planLinkChip:"linkChip"}).flatMap(([t,n])=>e.roles[n]===void 0?[]:[[t,e.roles[n]]]));return{colors:{bg:n("paper"),surface:n("card"),text:n("black"),ink:n(t?"ink":"primary"),onInk:n("onPrimary"),muted:n("ink3"),line:n("line"),scrim:n("scrim"),grab:r(bs),focus:n("ink"),...a},type:e.type,motion:{reduced:e.reduced},metrics:{variants:{drawer:{frame:i(n("card"),{color:n("ink")}),grab:i(r(bs)),kicker:o(n("ink3")),close:{color:n("ink")},title:{color:n("ink"),wrap:"auto"},text:o(n("black")),scrim:n("scrim")},segmented:{track:i(n("card"),{edge:{color:r(bs)}}),label:o(n("ink")),chosen:i(n("primary")),chosenLabel:o(n("onPrimary"))},stepper:{track:i(n("card"),{edge:{color:r(bs)}}),button:{color:n("ink")},value:o(n("ink"))},summary:{box:i(n("card"),e.dark?{shadow:l}:{}),term:o(n("ink2")),value:o(n("ink")),totalTerm:o(n("ink")),total:o(n("ink")),renewTerm:o(n("ink2")),renew:o(n("ink")),inset:i(n("paper"))},toast:{box:i(n("ink")),text:o(n("onInk"))},focus:{color:n("ink")}}}}}var ws=/* @__PURE__ */new WeakMap;function vs(e,t,n,r=false){let i=ws.get(t);i===void 0&&(i={fill:/* @__PURE__ */new WeakMap,outline:/* @__PURE__ */new WeakMap},ws.set(t,i));let o=i[r?"outline":"fill"],l=o.get(e);return l===void 0&&(l=resolveTheme(ks(n(),r),t),o.set(e,l)),l}var xs=e=>{let t=e.type.namedFaces,n=t=>face(e,t).fontFamily;return{family:n("regular"),mono:n("mono"),faces:{regular:n("regular"),medium:n("medium"),bold:n("bold"),mono:n("mono"),monoBold:n("monoBold"),serif:headingFace(e,"bold").fontFamily},namedFaces:t.regular&&t.medium&&t.bold}},Ss=/* @__PURE__ */new WeakMap;function Ts(e,t,n=_l){if(n!==_l)return Cs(e,t,n);let r=Ss.get(t);r===void 0&&Ss.set(t,r=/* @__PURE__ */new WeakMap);let i=r.get(e);return i===void 0&&r.set(e,i=Cs(e,t,n)),i}function Cs(e,t,n){let r=e.color,i=io.color,o=e.brightness==="dark",l=o?lo:io,a=e=>r[e]!==i[e],s={};if(a("primary")?(Object.assign(s,{ink:r.primary,onInk:r.onPrimary,focus:r.primary}),a("accent")||Object.assign(s,{go:r.primary,onGo:r.onPrimary})):a("onPrimary")&&(s.onInk=r.onPrimary),a("accent")&&Object.assign(s,{go:r.accent,onGo:r.onAccent}),a("brandSoft")&&(s.tintSage=r.brandSoft),a("danger")&&Object.assign(s,{alert:r.danger,alertDeep:r.danger}),o)Object.assign(s,{bg:r.background,surface:r.surface,text:r.text.primary,muted:r.text.muted,line:r.borderRingCream});else{let e=l.color;r.background!==e.background&&(s.bg=r.background),r.surface!==e.surface&&(s.surface=r.surface),r.text.primary!==e.text.primary&&(s.text=r.text.primary),r.text.muted!==e.text.muted&&(s.muted=r.text.muted)}let c={};Object.keys(s).length>0&&(c.colors={...s});let d=e.radius,u=l.radius;if(d.xs!==u.xs||d.sm!==u.sm||d.lg!==u.lg||d.xl!==u.xl||d.pill!==u.pill){let e={};d.xs!==u.xs&&(e.sm=d.xs),d.sm!==u.sm&&(e.md=d.sm),d.lg!==u.lg&&(e.lg=d.lg),d.xl!==u.xl&&(e.xl=d.xl),d.pill!==u.pill&&(e.pill=d.pill),c.radius=e,(d.lg!==u.lg||d.xl!==u.xl)&&(c.metrics={...d.lg!==u.lg?{card:{radius:d.lg},summary:{radius:d.lg}}:{},...d.xl!==u.xl?{sheet:{radius:d.xl}}:{}})}if(e.space.xs!==l.space.xs){let t=e.space.xs/l.space.xs,r=n.space,i=e=>Math.round(e*t);c.space={1:i(r[1]),2:i(r[2]),3:i(r[3]),4:i(r[4]),5:i(r[5]),6:i(r[6]),7:i(r[7]),8:i(r[8]),9:i(r[9])}}let p=e.type.size,h=l.type.size,g=p.caption!==h.caption||p.bodyTight!==h.bodyTight||p.body!==h.body||p.subtitle!==h.subtitle||p.verdict!==h.verdict,f=e.type.lineHeight,m=l.type.lineHeight,y=f.relaxed!==m.relaxed||f.tight!==m.tight,b=e.type.scaleCaps,k=l.type.scaleCaps,w=b.content!==k.content||b.heading!==k.heading||b.control!==k.control||b.compact!==k.compact||b.badge!==k.badge,v=g||y||w;c.type={...g?{size:{xs:p.caption,sm:p.bodyTight,md:p.body,lg:p.subtitle,xl:p.verdict}}:{},...y?{lineHeight:{body:f.relaxed,display:f.tight}}:{},...w?{scaleCaps:{content:b.content,heading:b.heading,control:b.control,compact:b.compact,badge:b.badge}}:{},...t(e)},e.motion.reducedMotion&&!n.motion.reduced&&(c.motion={reduced:true});let x=v||Object.keys(s).length>0||Object.keys(c).some(e=>e!=="type"&&e!=="colors")||e.type.families.regular!==io.type.families.regular,S=Fs(e,l,s.surface??n.colors.surface),T=Object.entries(S).filter(([e,t])=>t!==n.colors[e]);return T.length>0&&(c.colors={...s,...Object.fromEntries(T)}),x?{name:"partner",...c}:c}var Is={planAccent:_l.colors.planAccent,planLink:_l.colors.planLink},Hs={planAccentWash:["accent",.17],planAccentChip:["accent",.47],planLinkWash:["link",.12],planLinkChip:["link",.2]};function Fs(e,t,n){let r=ms(e),i=ms(t),o=e.color,l={};(o.primary!==t.color.primary||o.onPrimary!==t.color.onPrimary)&&Object.assign(l,{planInk:o.primary,planOnInk:r.onPrimary}),o.accent!==t.color.accent&&(l.planAccent=o.accent),r.link!==i.link&&(l.planLink=r.link);let a={accent:l.planAccent??Is.planAccent,link:l.planLink??Is.planLink},s={planLinkWash:r.dark?void 0:e.slots.planWash?.backgroundColor,planLinkChip:r.dark?void 0:e.slots.planChip?.backgroundColor},c=n.toLowerCase()!==r.card.toLowerCase();for(let[e,[t,n]]of Object.entries(Hs)){let i=s[e];i!==void 0?l[e]=i:c&&(l[e]=ea(a[t],n,r.card,r.card))}return l}function Rs(e){let t=useEverfurTheme();return r(()=>Ts(t,e),[t,e])}function Ps(e,t){return vs(e,_l,()=>({roles:t,dark:ms(e).dark,type:{...xs(e),scaleCaps:e.type.scaleCaps},reduced:e.motion.reducedMotion}))}function PlanDs(e){return t(ThemeProvider,{theme:e.theme},e.children)}var zs=/* @__PURE__ */Object.freeze({root:{backgroundColor:"$paper",color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:28,paddingLeft:16,paddingRight:16,paddingTop:16},pageFine:{color:"$ink3",fontFamily:"sans",fontSize:12.5,lineHeight:18.13,marginBottom:0,marginLeft:0,marginRight:0,marginTop:16,textAlign:"center"},tools:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:8,justifyContent:"space-between",lineHeight:25.5,marginBottom:2,marginLeft:2,marginRight:-6,marginTop:-8},toolsEyebrow:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.77,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},toolsEnd:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5},orders:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:6,lineHeight:22.5,minHeight:44,paddingBottom:0,paddingLeft:8,paddingRight:8,paddingTop:0},ordersIcon:{height:21,width:21},cart:{alignItems:"center",backgroundColor:"transparent",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,height:44,justifyContent:"center",lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,position:"relative",width:44},cartIcon:{height:26,width:26},cartCount:{backgroundColor:"$riskDot",borderRadius:999,color:"$card",fontFamily:"sans",fontSize:12,fontVariant:["tabular-nums"],fontWeight:"800",height:20,lineHeight:20,minWidth:20,paddingBottom:0,paddingLeft:5,paddingRight:5,paddingTop:0,position:"absolute",right:1,ring:[{width:2,color:"$paper"}],textAlign:"center",top:3},head:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:["fr",56],lineHeight:25.5,paddingBottom:0,paddingLeft:2,paddingRight:2,paddingTop:2},eyebrow:{color:"$ink2",fontFamily:"mono",fontSize:15,letterSpacing:1.05,lineHeight:22.5,marginBottom:6,marginLeft:0,marginRight:0,marginTop:6,textTransform:"uppercase"},title:{color:"$ink",fontFamily:"serif",fontSize:29,fontWeight:"800",letterSpacing:-.29,lineHeight:30.74,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},subtitle:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6},headImage:{backgroundColor:"$tile",borderRadius:28,height:56,ring:[{width:3,color:"$paper"},{width:5.5,color:"$accent"}],width:56},by:{alignItems:"center",backgroundColor:"$card",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[40,"fr",22],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:10,paddingLeft:12,paddingRight:12,paddingTop:10,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},byImage:{backgroundColor:"$tile",borderRadius:20,height:40,width:40},byName:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:18.75},byRole:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.53,lineHeight:15.75,marginTop:2,textTransform:"uppercase"},byOk:{color:"$link",height:22,width:22},byIcon:{alignItems:"center",backgroundColor:"$tile",borderRadius:20,color:"$ink",height:40,justifyContent:"center",width:40},byIconSvg:{height:20,width:20},need:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},needKicker:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"800",gap:8,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},sources:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"800",gap:4,lineHeight:22.5,marginLeft:"auto"},source:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$tile",borderRadius:999,color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:12,fontWeight:"700",height:24,lineHeight:18,paddingBottom:0,paddingLeft:9,paddingRight:9,paddingTop:0},sourceDna:{backgroundColor:"$linkWash",color:"$link"},needTitle:{color:"$ink",fontFamily:"sans",fontSize:19,fontWeight:"800",lineHeight:23.18,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12},needRisk:{alignItems:"baseline",color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:15,gap:9,grid:[9,"fr"],lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6},needRiskLead:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:21.75},dot:{alignSelf:"flex-start",borderRadius:4.5,flexGrow:0,flexShrink:0,height:9,width:9},dotRisk:{backgroundColor:"$riskDot"},odds:{alignItems:"center",backgroundColor:"$accent4",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,marginTop:12,paddingBottom:10,paddingLeft:14,paddingRight:14,paddingTop:10},oddsKicker:{color:"$ink2",fontFamily:"sans",fontSize:13.5,fontWeight:"600",lineHeight:18.23,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:135},oddsTag:{alignSelf:"flex-start",backgroundColor:"$card",borderRadius:5,color:"$ink",fontFamily:"mono",fontSize:10,fontWeight:"600",letterSpacing:.6,lineHeight:13.5,marginTop:3,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},oddsNumbers:{alignItems:"center",color:"$ink",columnGap:6,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:["auto","auto","auto"],justifyItems:"flex-end",lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,rowGap:0},oddsFrom:{color:"$ink3",fontFamily:"sans",fontSize:17,fontWeight:"700",lineHeight:25.5,textDecorationLine:"line-through"},oddsIcon:{color:"$ink3",height:16,width:16},oddsTo:{color:"$ink",fontFamily:"serif",fontSize:28,fontWeight:"800",lineHeight:28},oddsLabel:{color:"$link",fontFamily:"sans",fontSize:12.5,fontWeight:"700",lineHeight:18.75,marginTop:3},says:{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[32,"fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14},saysImage:{borderRadius:16,height:32,width:32},saysText:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},saysBy:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontWeight:"800",lineHeight:20.3,marginRight:2},saysSerif:{color:"$ink",fontFamily:"serif",fontSize:17,fontWeight:"800",letterSpacing:-.17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},saysKicker:{alignItems:"center",color:"$ink3",flexDirection:"row",fontFamily:"mono",fontSize:10.5,justifyContent:"space-between",letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},saysQuote:{color:"$ink",fontFamily:"serif",fontSize:17,fontWeight:"800",letterSpacing:-.17,lineHeight:23.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8},tag:{backgroundColor:"$card",borderRadius:5,color:"$ink",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:14,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},jump:{alignItems:"center",backgroundColor:"$primary",borderRadius:14,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[44,"fr","auto"],lineHeight:25.5,marginTop:12,paddingBottom:8,paddingLeft:8,paddingRight:14,paddingTop:8,textAlign:"left",width:"100%"},jumpNoImage:{grid:["fr","auto"]},jumpImage:{backgroundColor:"$card",borderRadius:10,height:44,width:44},jumpSmall:{color:"$accent",fontFamily:"sans",fontSize:13,fontWeight:"800",lineHeight:19.5,textAlign:"left"},jumpStrong:{color:"$onPrimary",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:18.75,textAlign:"left"},jumpGo:{color:"$onPrimary",fontFamily:"sans",fontSize:14,fontWeight:"800",lineHeight:21,textAlign:"left"},steps:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:12,paddingLeft:12,paddingRight:12,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},stepsHead:{alignItems:"baseline",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,paddingBottom:0,paddingLeft:4,paddingRight:4,paddingTop:0},stepsTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:19,fontWeight:"800",gap:10,lineHeight:22.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},stepsLabel:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.55,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},n:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:12.5,fontWeight:"800",height:24,justifyContent:"center",lineHeight:15,width:24},tips:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:-12,marginRight:-12,marginTop:10,paddingBottom:2,paddingLeft:12,paddingRight:12,paddingTop:0},tip:{borderRadius:18,color:"$ink",flexBasis:"78%",flexDirection:"column",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,maxWidth:280,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:14},tipY:{backgroundColor:"$accentChip"},tipC:{backgroundColor:"$linkChip"},tipG:{backgroundColor:"$clearChip"},tipR:{backgroundColor:"$riskChip"},tipTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,justifyContent:"space-between",lineHeight:25.5},tipIcon:{color:"$ink",height:26,width:26},tipN:{color:"$ink",fontFamily:"serif",fontSize:30,fontWeight:"900",lineHeight:30},tipStrong:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:21.25,marginTop:14},tipSmall:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginTop:4},tipEm:{color:"$link",fontFamily:"mono",fontSize:10.5,fontStyle:"normal",letterSpacing:.42,lineHeight:15.75,marginTop:"auto",paddingTop:10,textTransform:"uppercase"},tipList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},tipRow:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[28,"fr"],lineHeight:25.5,paddingBottom:10,paddingLeft:6,paddingRight:6,paddingTop:10},tipRowN:{alignItems:"center",backgroundColor:"$accent4",borderRadius:8,color:"$ink",fontFamily:"serif",fontSize:16,fontWeight:"800",height:28,justifyContent:"center",lineHeight:16,width:28},tipRowStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20,marginTop:3},tipRowSmall:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginTop:3},tipRowEm:{color:"$link",fontFamily:"mono",fontSize:10.5,fontStyle:"normal",letterSpacing:.42,lineHeight:15.75,marginTop:5,textTransform:"uppercase"},sec:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},secTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:19,fontWeight:"800",gap:10,lineHeight:22.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},secN:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:12.5,fontWeight:"800",height:24,justifyContent:"center",lineHeight:15,width:24},pick:{backgroundColor:"transparent",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},pickTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[76,"fr"],lineHeight:25.5},pickImage:{backgroundColor:"$paper",borderRadius:14,height:76,overflow:"hidden",width:76},pickTitle:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:20.4,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},stars:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:13.5,fontWeight:"800",gap:4,lineHeight:20.25,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},starsIcon:{color:"$watchDot",height:14,width:14},starsLabel:{color:"$ink3",fontFamily:"sans",fontSize:13.5,fontWeight:"500",lineHeight:20.25},pickLine:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginBottom:0,marginLeft:0,marginRight:0,marginTop:3},reviews:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:-16,marginRight:-16,marginTop:12,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0},review:{backgroundColor:"$paper",borderRadius:14,color:"$ink",flexBasis:"78%",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:280,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},reviewsStack:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:12},reviewCard:{backgroundColor:"$paper",borderRadius:14,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},reviewStars:{color:"$watchDot",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:1,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},reviewStar:{height:13,width:13},reviewText:{color:"$ink",fontFamily:"sans",fontSize:15,lineHeight:21,marginBottom:0,marginLeft:0,marginRight:0,marginTop:5},reviewBy:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:19.5,marginTop:4},why:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$ink"},lineHeight:25.5,marginTop:14,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},whyMini:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},whyList:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},whyRow:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[58,"fr"],lineHeight:25.5,marginTop:10},whyStrong:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:19.5},whySmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:1},chip:{alignItems:"center",borderRadius:6,color:"$ink",fontFamily:"mono",fontSize:10.5,fontWeight:"700",height:22,justifyContent:"center",letterSpacing:.42,lineHeight:15.75,textTransform:"uppercase"},chipDna:{backgroundColor:"$linkWash",color:"$link"},chipAsk:{backgroundColor:"$accent4",color:"$ink"},chipRec:{backgroundColor:"$tile",color:"$ink2"},score:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"800",gap:8,justifyContent:"space-between",lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:11,paddingLeft:14,paddingRight:12,paddingTop:11},scoreValue:{color:"$accent",flexGrow:0,flexShrink:0,fontFamily:"mono",fontSize:16,fontWeight:"700",lineHeight:20.8},dose:{backgroundColor:"$linkWash",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:10,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:12},doseMini:{color:"$link",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},doseList:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:8,grid:["fr","fr","fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},doseItem:{alignItems:"center",backgroundColor:"$card",borderRadius:12,color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,paddingBottom:10,paddingLeft:4,paddingRight:4,paddingTop:10,textAlign:"center"},doseValue:{color:"$ink",fontFamily:"mono",fontSize:21,fontVariant:["tabular-nums"],fontWeight:"700",lineHeight:23.1,textAlign:"center"},doseLabel:{color:"$ink2",fontFamily:"sans",fontSize:12.5,lineHeight:16.25,textAlign:"center"},doseNote:{color:"$link",fontFamily:"sans",fontSize:14,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10},ingredients:{color:"$ink",flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12},ingredient:{backgroundColor:"$tile",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:13.5,fontWeight:"600",lineHeight:20.25,paddingBottom:6,paddingLeft:10,paddingRight:10,paddingTop:6},opts:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:14},opt:{alignItems:"center",backgroundColor:"$card",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,inner:{width:1.5,color:"$n_DEDCD7"},justifyContent:"space-between",lineHeight:25.5,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14,textAlign:"left",width:"100%"},optOn:{inner:{width:2.5,color:"$ink"}},optOnce:{backgroundColor:"$paper",inner:null,paddingBottom:10,paddingLeft:14,paddingRight:14,paddingTop:10,shadow:null},optOnceOn:{backgroundColor:"$card",inner:{width:2,color:"$ink"}},optText:{alignItems:"flex-start",color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,textAlign:"left"},optStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24,textAlign:"left"},optOnceStrong:{fontSize:15,fontWeight:"700",lineHeight:22.5},optSmall:{color:"$ink2",fontFamily:"sans",fontSize:13.5,lineHeight:20.25,textAlign:"left"},optOnceSmall:{fontSize:13,lineHeight:19.5},optTag:{backgroundColor:"$riskInk",borderRadius:6,color:"$card",fontFamily:"sans",fontSize:12,fontWeight:"800",lineHeight:18,marginBottom:4,paddingBottom:2,paddingLeft:8,paddingRight:8,paddingTop:2,textAlign:"left"},price:{alignItems:"flex-end",color:"$ink",columnGap:8,flexDirection:"column",flexWrap:"nowrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,minWidth:0,rowGap:0,textAlign:"left"},priceValue:{color:"$ink",fontFamily:"sans",fontSize:24,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:26.4,textAlign:"left"},priceWas:{color:"$riskInk",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,textAlign:"left",textDecorationLine:"line-through"},optPrice:{color:"$ink",fontFamily:"sans",fontSize:18,fontWeight:"800",lineHeight:27,textAlign:"left"},optOncePrice:{color:"$ink2",fontSize:15,fontWeight:"700",lineHeight:22.5},buy:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,marginTop:12},button:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:25.5,minHeight:52,paddingBottom:0,paddingLeft:20,paddingRight:20,paddingTop:0,textDecorationLine:"none",width:"100%"},buttonDisabled:{opacity:.32},proof:{alignItems:"center",color:"$riskInk",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"800",gap:6,justifyContent:"center",lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10},proofIcon:{flexGrow:0,flexShrink:0,height:21,marginTop:-2,width:21},trust:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:6,grid:["fr","fr","fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},trustItem:{alignItems:"center",color:"$ink2",fontFamily:"sans",fontSize:12.5,fontWeight:"600",gap:4,lineHeight:16.25,textAlign:"center"},trustIcon:{color:"$link",height:20,width:20},on:{alignItems:"center",backgroundColor:"$clearBg",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[34,"fr","auto"],lineHeight:25.5,marginTop:12,paddingBottom:10,paddingLeft:12,paddingRight:10,paddingTop:10},onIcon:{alignItems:"center",backgroundColor:"$clearDot",borderRadius:17,color:"$card",fontFamily:"sans",fontSize:17,height:34,justifyContent:"center",lineHeight:25.5,width:34},onIconSvg:{height:18,width:18},onStrong:{color:"$clearInk",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:18.75},onSmall:{color:"$ink2",fontFamily:"sans",fontSize:13,lineHeight:17.55,marginTop:1},onButton:{backgroundColor:"$card",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"800",inner:{width:1.5,color:"$ink"},lineHeight:21,minHeight:38,paddingBottom:0,paddingLeft:14,paddingRight:14,paddingTop:0},more:{color:"$ink",columnGap:18,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8,rowGap:0},moreButton:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,minHeight:34,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},fine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8},others:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},sign:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$n_DEDCD7"},lineHeight:25.5,marginTop:12,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14},signUrgent:{backgroundColor:"$riskBg",inner:null,shadow:null},signTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"800",gap:8,lineHeight:20,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},signUrgentTitle:{color:"$riskInk"},signUrgentIcon:{height:20,width:20},signBody:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:4},signUrgentBody:{color:"$ink"},questionsKicker:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20,marginBottom:0,marginLeft:0,marginRight:0,marginTop:18},questions:{color:"$ink",fontFamily:"sans",fontSize:15,gap:6,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,paddingLeft:22},questionsAfterKicker:{marginTop:6},add:{alignItems:"center",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"800",inner:{width:2,color:"$ink"},justifyContent:"center",lineHeight:24,marginTop:14,minHeight:48,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0,width:"100%"},addOn:{backgroundColor:"$clearBg",color:"$clearInk",inner:null,shadow:null},askRow:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[40,"fr",18],lineHeight:25.5,marginTop:10,paddingBottom:12,paddingLeft:12,paddingRight:14,paddingTop:12,textAlign:"left",width:"100%"},askRowInSec:{marginTop:12},askRowIcon:{alignItems:"center",backgroundColor:"$card",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,textAlign:"left",width:40},askRowIconSvg:{height:21,width:21},askRowStrong:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:20.15,textAlign:"left"},askRowSmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:1,textAlign:"left"},askRowChev:{color:"$ink2",height:18,width:18},extras:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginTop:22},extrasTitle:{color:"$ink3",fontFamily:"mono",fontSize:11,fontWeight:"400",letterSpacing:.77,lineHeight:12.65,marginBottom:0,marginLeft:4,marginRight:4,marginTop:0,textTransform:"uppercase"},extra:{alignItems:"flex-start",backgroundColor:"$card",borderRadius:22,color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[56,"fr"],lineHeight:25.5,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14,rowGap:4,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},extraKit:{backgroundColor:"$linkWash",inner:null,shadow:null},extraImage:{backgroundColor:"$card",borderRadius:14,height:56,width:56},extraKitImage:{backgroundColor:"$card"},extraIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:14,color:"$link",height:56,justifyContent:"center",width:56},extraIconSvg:{height:26,width:26},extraTitle:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:20.4,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},extraTitleSerif:{fontFamily:"serif",fontSize:21,fontWeight:"800",letterSpacing:-.21,lineHeight:25.2},extraBody:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:3},extraPrice:{alignItems:"center",color:"$ink",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,rowGap:0},extraPriceValue:{color:"$ink",fontFamily:"sans",fontSize:19,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:26.6},extraPriceWas:{color:"$ink3",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:19.6,textDecorationLine:"line-through"},extraGo:{backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",fontFamily:"sans",fontSize:14.5,fontWeight:"800",lineHeight:21.75,marginTop:8,minHeight:40,paddingBottom:0,paddingLeft:18,paddingRight:18,paddingTop:0},extraGoOn:{backgroundColor:"$clearBg",color:"$clearInk"},wait:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},waitTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[46,"fr"],lineHeight:25.5},waitTile:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:13,color:"$link",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:22,height:46,justifyContent:"center",lineHeight:33,width:46},waitTileSvg:{height:23,width:23},waitMini:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},waitTitle:{color:"$ink",fontFamily:"serif",fontSize:26,fontWeight:"800",letterSpacing:-.26,lineHeight:27.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},waitKey:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:18},waitText:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15.5,fontWeight:"700",gap:8,lineHeight:23.25,marginBottom:12,marginLeft:0,marginRight:0,marginTop:16},waitTextSvg:{color:"$link",flexGrow:0,flexShrink:0,height:20,width:20},waitButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textDecorationLine:"none",width:"100%"},track:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},trackStep:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[22,"fr"],lineHeight:25.5,paddingBottom:16,position:"relative"},trackStepLast:{paddingBottom:0},trackLine:{backgroundColor:"$n_E2DFD9",borderRadius:1,bottom:-2,left:10,position:"absolute",top:20,width:2},trackLineDone:{backgroundColor:"$primary"},trackDot:{alignItems:"center",backgroundColor:"$card",borderRadius:11,height:22,inner:{width:2,color:"$n_CFCBC4"},justifyContent:"center",position:"relative",width:22,zIndex:1},trackDotDone:{backgroundColor:"$primary",inner:null,shadow:null},trackDotNow:{backgroundColor:"$accent",inner:{width:2,color:"$ink"}},trackDotSvg:{color:"$card",height:13,width:13},trackTitle:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:20.15},trackTitleTodo:{color:"$ink3",fontWeight:"700"},trackDetail:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginTop:1},trackTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:13.5,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},next:{backgroundColor:"$card",borderRadius:18,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:22,paddingBottom:4,paddingLeft:16,paddingRight:16,paddingTop:4,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06},textAlign:"left"},nextIn:{backgroundColor:"$paper",inner:null,marginTop:8,shadow:null},nextRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[36,"fr"],lineHeight:25.5,paddingBottom:10,paddingLeft:0,paddingRight:0,paddingTop:10,textAlign:"left"},nextIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:36,justifyContent:"center",lineHeight:25.5,textAlign:"left",width:36},nextIconSvg:{height:19,width:19},nextIconImage:{borderRadius:11,height:"100%",width:"100%"},nextLabel:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.53,lineHeight:15.75,textAlign:"left",textTransform:"uppercase"},nextText:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"600",lineHeight:20.25,marginTop:1,textAlign:"left"},done:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:20,paddingLeft:22,paddingRight:22,paddingTop:40,textAlign:"center"},doneCheck:{alignItems:"center",backgroundColor:"$accent",borderRadius:38,color:"$ink",fontFamily:"sans",fontSize:17,height:76,justifyContent:"center",lineHeight:25.5,marginBottom:0,marginLeft:"auto",marginRight:"auto",marginTop:0,textAlign:"center",width:76},doneCheckSvg:{height:38,width:38},doneTitle:{color:"$ink",fontFamily:"serif",fontSize:34,fontWeight:"800",letterSpacing:-.34,lineHeight:39.1,marginBottom:0,marginLeft:0,marginRight:0,marginTop:20,textAlign:"center"},doneWhen:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,textAlign:"center"},doneWho:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2,textAlign:"center"},pushFoot:{backgroundColor:"$paper",borderTopColor:"$line",borderTopWidth:1,color:"$ink",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:34,paddingLeft:18,paddingRight:18,paddingTop:12},pushFootStack:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5},shop:{color:"$ink",fontFamily:"sans",fontSize:17,gap:12,lineHeight:25.5,paddingBottom:28,paddingLeft:18,paddingRight:18,paddingTop:8},shopTitle:{color:"$ink",fontFamily:"serif",fontSize:29,fontWeight:"800",letterSpacing:-.29,lineHeight:31.32,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},shopSub:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:-6},shopKey:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:18.4,marginBottom:-4,marginLeft:2,marginRight:2,marginTop:6},shopCard:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:14,paddingLeft:16,paddingRight:16,paddingTop:14,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},shopFine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},shopFineCenter:{marginTop:14,textAlign:"center"},shopEmpty:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:8,paddingLeft:12,paddingRight:12,paddingTop:48,textAlign:"center"},shopEmptyTile:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:20,color:"$link",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:22,height:72,justifyContent:"center",lineHeight:33,marginBottom:8,textAlign:"center",width:72},shopEmptyTileSvg:{height:34,width:34},shopEmptyTitle:{color:"$ink",fontFamily:"serif",fontSize:28,fontWeight:"800",letterSpacing:-.28,lineHeight:30.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},shopEmptyText:{color:"$ink2",fontFamily:"sans",fontSize:15.5,lineHeight:22.48,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:298.07,textAlign:"center"},shopEmptyButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,marginTop:12,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textAlign:"center",textDecorationLine:"none"},shopLink:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},shopActions:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:4,lineHeight:25.5,marginTop:4},orderList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},order:{alignItems:"center",backgroundColor:"$card",borderRadius:22,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:["fr",18],lineHeight:25.5,paddingBottom:14,paddingLeft:16,paddingRight:14,paddingTop:14,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06},textAlign:"left",width:"100%"},orderChev:{color:"$ink3",height:18,width:18},orderTop:{alignItems:"center",color:"$ink",columnGap:10,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,rowGap:4,textAlign:"left"},orderNo:{color:"$ink3",fontFamily:"mono",fontSize:12,letterSpacing:.48,lineHeight:18,textAlign:"left"},orderWhat:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20.8,marginTop:8,textAlign:"left"},orderMeta:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:2,textAlign:"left"},orderPics:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginTop:10,textAlign:"left"},orderPic:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:10,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,overflow:"hidden",textAlign:"left",width:40},orderPicImage:{height:"100%",width:"100%"},orderPicSvg:{height:20,width:20},pill:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$accent3",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:13,fontWeight:"800",gap:6,lineHeight:19.5,minHeight:26,paddingBottom:0,paddingLeft:10,paddingRight:10,paddingTop:0,textAlign:"left"},pillDone:{backgroundColor:"$clearBg",color:"$clearInk"},pillSub:{backgroundColor:"$linkWash",color:"$link"},cartItems:{color:"$ink",fontFamily:"sans",fontSize:17,gap:18,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},cartItem:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[64,"fr"],lineHeight:25.5},cartItemImage:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:14,color:"$link",fontFamily:"sans",fontSize:17,height:64,justifyContent:"center",lineHeight:25.5,overflow:"hidden",width:64},cartItemImageSvg:{height:28,width:28},cartItemTitle:{color:"$ink",fontFamily:"sans",fontSize:16.5,fontWeight:"800",lineHeight:20.63,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},cartItemPrice:{alignItems:"center",color:"$ink",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:3,rowGap:2},cartItemPriceValue:{color:"$ink",fontFamily:"sans",fontSize:16,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:24},cartItemPriceWas:{color:"$ink3",fontFamily:"sans",fontSize:14,fontWeight:"600",lineHeight:21,textDecorationLine:"line-through"},cartItemPriceNote:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:21},cartItemActions:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:16,lineHeight:25.5,marginTop:8},stepper:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$card",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[40,30,40],height:40,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5},stepperButton:{alignItems:"center",backgroundColor:"transparent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},stepperButtonDisabled:{opacity:.3},stepperButtonSvg:{height:16,width:16},stepperValue:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:23.25,textAlign:"center"},remove:{backgroundColor:"transparent",color:"$ink2",fontFamily:"sans",fontSize:14.5,fontWeight:"700",lineHeight:21.75,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},mode:{color:"$ink",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginTop:8},modeButton:{alignItems:"center",backgroundColor:"$paper",borderRadius:12,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"700",gap:10,justifyContent:"space-between",lineHeight:18.85,minHeight:44,paddingBottom:8,paddingLeft:12,paddingRight:12,paddingTop:8,textAlign:"left"},modeButtonOn:{backgroundColor:"$card",inner:{width:2,color:"$ink"}},modePrice:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:18.85,textAlign:"left"},every:{backgroundColor:"$card",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:4,grid:["fr","fr","fr"],inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5,marginTop:8,paddingBottom:4,paddingLeft:4,paddingRight:4,paddingTop:4},everyButton:{backgroundColor:"transparent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,minHeight:36,paddingBottom:0,paddingLeft:6,paddingRight:6,paddingTop:0,textAlign:"center"},everyButtonOn:{backgroundColor:"$primary",color:"$onPrimary"},summary:{backgroundColor:"$card",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:6,paddingLeft:16,paddingRight:16,paddingTop:6,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},summaryRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],gap:12,justifyContent:"space-between",lineHeight:22.5,minHeight:34},summaryLabel:{alignItems:"center",alignSelf:"flex-start",color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],gap:8,lineHeight:22.5},summaryTotal:{fontSize:17,fontWeight:"800",lineHeight:25.5,minHeight:42},summaryTotalLabel:{color:"$ink"},summaryRenew:{fontSize:14,lineHeight:21,marginTop:-6,minHeight:28},summaryTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,fontVariant:["tabular-nums"],letterSpacing:.6,lineHeight:15,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},foot:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5},footFine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},co:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginTop:2},coProduct:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[56,"fr"],lineHeight:25.5},coProductImage:{alignItems:"center",backgroundColor:"$accent3",borderRadius:14,color:"$ink",fontFamily:"sans",fontSize:17,height:56,justifyContent:"center",lineHeight:25.5,overflow:"hidden",width:56},coProductImageSvg:{height:30,width:30},coProductTitle:{color:"$ink2",fontFamily:"sans",fontSize:14,fontWeight:"800",lineHeight:18.9,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},coProductLine:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},coOptions:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},coOption:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5},coOptionOn:{backgroundColor:"$accent4",inner:{width:2,color:"$ink"}},coOptionHit:{alignItems:"flex-start",backgroundColor:"transparent",borderRadius:16,color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[22,"fr","auto"],lineHeight:25.5,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12,rowGap:2,textAlign:"left",width:"100%"},coOptionStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:21.6,textAlign:"left"},coOptionSmall:{color:"$ink2",fontFamily:"sans",fontSize:13,lineHeight:18.2,textAlign:"left"},coOptionPrice:{color:"$ink",fontFamily:"sans",fontSize:16,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:21.6,textAlign:"right"},coOptionPriceWas:{color:"$riskInk",fontFamily:"sans",fontSize:13,fontVariant:["tabular-nums"],fontWeight:"600",lineHeight:17.55,textAlign:"right",textDecorationLine:"line-through"},coRadio:{alignItems:"center",borderRadius:11,height:22,inner:{width:2,color:"$n_BDB9B2"},justifyContent:"center",width:22},coRadioOn:{inner:{width:7,color:"$ink"}},coKicker:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:6,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},coWhen:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:12,paddingLeft:48,paddingRight:14,paddingTop:0},coItems:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},coItem:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,gap:12,grid:[44,"fr","auto"],lineHeight:22.5},coItemPic:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:10,color:"$link",fontFamily:"sans",fontSize:15,height:44,justifyContent:"center",lineHeight:22.5,overflow:"hidden",width:44},coItemStrong:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:19.38},coItemSmall:{color:"$ink3",fontFamily:"sans",fontSize:13.5,lineHeight:20.25},coItemValue:{color:"$ink",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:22.5},coRows:{backgroundColor:"$paper",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:2,paddingLeft:14,paddingRight:14,paddingTop:2},coRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:14.5,gap:10,grid:[20,73.6,"fr"],lineHeight:21.75,minHeight:40},coRowSvg:{color:"$ink2",height:20,width:20},coRowLabel:{color:"$ink3",fontFamily:"sans",fontSize:14.5,lineHeight:21.75},coRowValue:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontWeight:"700",lineHeight:21.75},coRowsShop:{backgroundColor:"$card",shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},coFine:{color:"$ink3",fontFamily:"sans",fontSize:12.5,lineHeight:18.13,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},coSummary:{backgroundColor:"$paper",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:null,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:6,paddingLeft:16,paddingRight:16,paddingTop:6,shadow:null},weightField:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:8,lineHeight:22.5,marginTop:14},weightInputWrap:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,position:"relative"},weightInput:{backgroundColor:"$card",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:24,fontVariant:["tabular-nums"],fontWeight:"800",height:58,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:36,paddingBottom:0,paddingLeft:18,paddingRight:56,paddingTop:0,width:"100%"},weightInputFocus:{inner:{width:2.5,color:"$ink"}},weightUnit:{color:"$ink3",fontFamily:"sans",fontSize:17,fontWeight:"700",lineHeight:25.5,position:"absolute",right:18,top:"50%"},weightError:{color:"$riskInk",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,minHeight:20},weightActions:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:10},subCard:{alignItems:"center",backgroundColor:"$clearBg",borderRadius:22,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[56,"fr","auto"],lineHeight:25.5,paddingBottom:12,paddingLeft:12,paddingRight:14,paddingTop:12},subCardImage:{backgroundColor:"$card",borderRadius:14,height:56,width:56},subCardStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20},subCardSmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginTop:2},subCardButton:{backgroundColor:"$card",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"800",inner:{width:1.5,color:"$ink"},lineHeight:21,minHeight:40,paddingBottom:0,paddingLeft:14,paddingRight:14,paddingTop:0},carrier:{alignItems:"center",color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[40,"fr"],lineHeight:25.5,rowGap:4},carrierIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,width:40},carrierIconSvg:{height:21,width:21},carrierStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24},carrierSmall:{alignItems:"center",color:"$ink2",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"mono",fontSize:13,letterSpacing:.26,lineHeight:19.5,marginTop:1,rowGap:2},carrierButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:8,inner:{width:1.5,color:"$ink"},justifyContent:"center",lineHeight:22.5,marginTop:10,minHeight:40,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0,textDecorationLine:"none"},carrierWait:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3},carrierTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:15,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},toast:{backgroundColor:"$ink",borderRadius:16,color:"$onInk",fontFamily:"sans",fontSize:14.5,left:16,lineHeight:20.3,opacity:1,paddingBottom:12,paddingLeft:15,paddingRight:15,paddingTop:12,position:"absolute",right:16,top:62,zIndex:50},scrim:{backgroundColor:"$scrim",bottom:0,left:0,opacity:1,position:"absolute",right:0,top:0,zIndex:40},sheet:{backgroundColor:"$card",borderBottomLeftRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:28,borderTopRightRadius:28,bottom:0,color:"$ink",fontFamily:"sans",fontSize:17,left:0,lineHeight:25.5,maxHeight:"80%",paddingBottom:40,paddingLeft:20,paddingRight:20,paddingTop:10,position:"absolute",right:0,zIndex:41},sheetGrab:{backgroundColor:"$n_DAD7D1",borderRadius:3,height:5,marginBottom:10,marginLeft:"auto",marginRight:"auto",marginTop:0,width:40},sheetTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,justifyContent:"space-between",lineHeight:25.5},sheetKicker:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.88,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},sheetClose:{alignItems:"center",backgroundColor:"transparent",borderRadius:20,color:"$ink",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,marginRight:-8,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,position:"relative",width:40},sheetCloseSvg:{height:22,width:22},sheetTitle:{color:"$ink",fontFamily:"serif",fontSize:24,fontWeight:"800",letterSpacing:-.24,lineHeight:27.6,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},sheetBody:{color:"$black",fontFamily:"sans",fontSize:16,gap:10,lineHeight:24,marginTop:12},coButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:17,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:25.5,minHeight:56,paddingBottom:0,paddingLeft:28,paddingRight:28,paddingTop:0,textDecorationLine:"none",width:"100%"},footButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textDecorationLine:"none",width:"100%"},blanksWrap:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14},blanksCard:{backgroundColor:"$card",borderRadius:20,color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:13,paddingLeft:12,paddingRight:12,paddingTop:12,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},blanksHead:{alignItems:"center",color:"$ink3",flexDirection:"row",fontFamily:"sans",fontSize:12.5,fontWeight:"800",gap:10,justifyContent:"space-between",letterSpacing:.88,lineHeight:18.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:2,paddingLeft:2,paddingRight:2,paddingTop:0,textTransform:"uppercase"},blanksPill:{backgroundColor:"$accent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:13,fontStyle:"normal",fontWeight:"800",letterSpacing:.13,lineHeight:19.5,paddingBottom:2,paddingLeft:10,paddingRight:10,paddingTop:2,textTransform:"none"},blanksPillFilled:{backgroundColor:"$clearBg",color:"$clearInk"},blanksList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:7,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},blanksRow:{alignItems:"center",backgroundColor:"$paper",borderRadius:15,color:"$ink",columnGap:11,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[34,"fr"],lineHeight:25.5,paddingBottom:9,paddingLeft:9,paddingRight:12,paddingTop:9},blanksNum:{alignItems:"center",backgroundColor:"$accentChip",borderRadius:11,color:"$ink",fontFamily:"serif",fontSize:22,fontWeight:"800",height:40,justifyContent:"center",lineHeight:33,width:34},blanksText:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:21.6},blanksSource:{color:"$ink3",fontFamily:"sans",fontSize:13.5,lineHeight:20.25},blank:{alignSelf:"flex-start",backgroundColor:"$accent4",borderRadius:6,color:"$ink",fontFamily:"sans",fontSize:16,fontStyle:"normal",fontWeight:"700",height:20,inner:{width:1.5,color:"$accent"},lineHeight:21.6,minWidth:36},blankS:{minWidth:24},blankL:{minWidth:64},blankFilled:{backgroundColor:"transparent",borderRadius:6,height:"auto",inner:null,marginBottom:0,marginLeft:-3,marginRight:-3,marginTop:0,minWidth:0,paddingBottom:0,paddingLeft:3,paddingRight:3,paddingTop:0,shadow:null},manageOrders:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"}}),Ds=/* @__PURE__ */Object.freeze({shield:{strokes:[{width:1.8,cap:true,closed:true,points:[12,3,19,6,19,12,18.759,14.125,18.074,16,17,17.625,15.593,19,13.907,20.125,12,21,10.093,20.125,8.407,19,7,17.625,5.926,16,5.241,14.125,5,12,5,6]},{width:1.8,cap:true,closed:false,points:[9,12,11,14,15,10]}],boxes:[],triangles:[],seams:[]},arrow:{strokes:[{width:2,cap:true,closed:false,points:[4.5,12,19,12]},{width:2,cap:true,closed:false,points:[13.5,6.5,19,12,13.5,17.5]}],boxes:[],triangles:[],seams:[]},check:{strokes:[{width:2.4,cap:true,closed:false,points:[5,12.6,9.4,17,19,7.4]}],boxes:[],triangles:[],seams:[]},star:{strokes:[],boxes:[],triangles:[[12,16.9,6.8,19.6,7.8,13.8],[16.2,13.8,17.2,19.6,12,16.9],[7.8,13.8,3.5,9.7,9.4,8.8],[14.6,8.8,20.5,9.7,16.2,13.8],[9.4,8.8,12,3.5,14.6,8.8],[16.2,13.8,12,16.9,7.8,13.8],[14.6,8.8,16.2,13.8,7.8,13.8],[14.6,8.8,7.8,13.8,9.4,8.8]],seams:[[12,16.9,7.8,13.8,.245,.677],[12,16.9,16.2,13.8,.245,.677],[7.8,13.8,9.4,8.8,.69,.248],[14.6,8.8,16.2,13.8,.248,.243],[14.6,8.8,9.4,8.8,.68,.245],[16.2,13.8,7.8,13.8,.677,.68],[14.6,8.8,7.8,13.8,.68,.69]]},truck:{strokes:[{width:1.7,cap:false,closed:true,points:[2.8,6.5,14.2,6.5,14.2,16,2.8,16]},{width:1.7,cap:false,closed:false,points:[14.2,9.5,17.8,9.5,21.2,12.9,21.2,16,14.2,16]}],boxes:[{x:5,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7},{x:15.4,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7}],triangles:[],seams:[]},refresh:{strokes:[{width:1.7,cap:true,closed:false,points:[4,12,4.343,14.363,5.368,16.52,6.985,18.278,9.048,19.48,11.374,20.021,13.756,19.85,15.981,18.984,17.852,17.5,19.201,15.53,19.909,13.249,19.912,10.861,19.21,8.578,17.865,6.605,15.998,5.116,13.775,4.245,11.393,4.068,9.066,4.602,7,5.8]},{width:1.7,cap:true,closed:false,points:[4,4,4,8,8,8]}],boxes:[],triangles:[],seams:[]},card:{strokes:[{width:1.7,cap:true,closed:false,points:[3,9.5,21,9.5]},{width:1.7,cap:true,closed:false,points:[6.5,15,10.5,15]}],boxes:[{x:3,y:5.5,w:18,h:13,radius:2.2,width:1.7}],triangles:[],seams:[]},alert:{strokes:[{width:1.9,cap:true,closed:true,points:[12,3.5,21.5,20,2.5,20]},{width:1.9,cap:true,closed:false,points:[12,10,12,14.5]},{width:1.9,cap:true,closed:false,points:[12,17.2,12.01,17.2]}],boxes:[],triangles:[],seams:[]},x:{strokes:[{width:2,cap:true,closed:false,points:[6.5,6.5,17.5,17.5]},{width:2,cap:true,closed:false,points:[17.5,6.5,6.5,17.5]}],boxes:[],triangles:[],seams:[]},chat:{strokes:[{width:1.7,cap:false,closed:true,points:[5,5.2,19,5.2,19.8,5.414,20.386,6,20.6,6.8,20.6,15.4,20.386,16.2,19.8,16.786,19,17,10.3,17,5.5,20.6,5.5,17,5,17,4.2,16.786,3.614,16.2,3.4,15.4,3.4,6.8,3.614,6,4.2,5.414,5,5.2]}],boxes:[],triangles:[],seams:[]},repeat:{strokes:[{width:1.8,cap:true,closed:false,points:[4.5,11,4.824,8.824,5.766,6.837,7.244,5.208,9.131,4.077,11.264,3.543,13.461,3.65,15.533,4.391,17.3,5.7,19.5,8]},{width:1.8,cap:true,closed:false,points:[19.5,3.5,19.5,8,15,8]},{width:1.8,cap:true,closed:false,points:[19.5,13,19.176,15.176,18.234,17.163,16.756,18.792,14.869,19.923,12.736,20.457,10.539,20.35,8.467,19.609,6.7,18.3,4.5,16]},{width:1.8,cap:true,closed:false,points:[4.5,20.5,4.5,16,9,16]}],boxes:[],triangles:[],seams:[]},calendar:{strokes:[{width:1.8,cap:true,closed:false,points:[4,10,20,10]},{width:1.8,cap:true,closed:false,points:[8.5,3.5,8.5,7.5]},{width:1.8,cap:true,closed:false,points:[15.5,3.5,15.5,7.5]}],boxes:[{x:4,y:5.5,w:16,h:15,radius:2.5,width:1.8}],triangles:[],seams:[]},flame:{strokes:[],boxes:[],triangles:[[12.15,14.513,13.1,15.2,13.1,13.7],[11.5,13.3,12.15,14.513,13.1,13.7],[16.874,10.907,15.7,9.3,15.381,10.659],[14.7,16.7,16.838,18.516,17.693,16.84],[14.7,16.7,14.489,17.681,16.838,18.516],[18,14.9,14.507,15.633,17.693,16.84],[16.874,10.907,15.381,10.659,14.685,11.707],[17.693,12.759,16.874,10.907,14.685,11.707],[15.538,19.832,16.838,18.516,14.489,17.681],[14.685,11.707,13.959,14.633,17.693,12.759],[17.693,12.759,13.959,14.633,18,14.9],[13.891,20.692,13.055,19.006,12,21],[12,21,12,19.2,10.109,20.692],[8.462,19.832,10.109,20.692,10.659,18.863],[10.659,18.863,9.741,17.97,8.462,19.832],[6.307,16.84,9.602,15.677,6,14.9],[6.273,13.033,6,14.9,9.602,15.677],[9.602,15.677,10.113,14.812,6.273,13.033],[6.988,11.438,6.273,13.033,10.113,14.812],[13.525,7.088,12.856,5.017,12,3.5],[13.856,9.589,13.525,7.088,12,3.5],[13.7,12.4,13.856,9.589,12,3.5],[10.113,14.812,10.792,14.042,6.988,11.438],[14.7,16.7,17.693,16.84,14.507,15.633],[13.7,12.4,13.959,14.633,14.685,11.707],[14.507,15.633,18,14.9,13.959,14.633],[13.1,13.7,13.959,14.633,13.7,12.4],[11.5,13.3,13.1,13.7,13.7,12.4],[7.983,10.048,6.988,11.438,10.792,14.042],[10.792,14.042,11.5,13.3,7.983,10.048],[14.489,17.681,13.913,18.475,15.538,19.832],[13.891,20.692,15.538,19.832,13.913,18.475],[13.891,20.692,13.913,18.475,13.055,19.006],[12,19.2,12,21,13.055,19.006],[10.659,18.863,10.109,20.692,12,19.2],[7.162,18.516,8.462,19.832,9.741,17.97],[9.741,17.97,9.4,16.7,7.162,18.516],[6.307,16.84,7.162,18.516,9.4,16.7],[6.307,16.84,9.4,16.7,9.602,15.677],[9.1,8.8,7.983,10.048,11.5,13.3],[11.5,13.3,13.7,12.4,9.1,8.8],[10.054,7.77,9.1,8.8,13.7,12.4],[10.927,6.683,10.054,7.77,13.7,12.4],[11.613,5.481,10.927,6.683,13.7,12.4],[12.006,4.106,11.613,5.481,13.7,12.4],[12,2.5,12.006,4.106,13.7,12.4],[12,2.5,13.7,12.4,12,3.5]],seams:[[12.15,14.513,13.1,13.7,.121,.428],[11.5,13.3,13.1,13.7,.681,.356],[15.381,10.659,16.874,10.907,.033,.883],[14.7,16.7,16.838,18.516,.648,1.318],[14.7,16.7,17.693,16.84,.648,1.533],[14.489,17.681,16.838,18.516,.51,1.318],[14.507,15.633,18,14.9,.782,1.787],[14.507,15.633,17.693,16.84,.782,1.533],[14.685,11.707,16.874,10.907,.68,.883],[14.685,11.707,17.693,12.759,.61,.484],[14.489,17.681,15.538,19.832,.51,1.115],[13.959,14.633,14.685,11.707,1.333,.576],[13.959,14.633,17.693,12.759,.851,.484],[13.959,14.633,18,14.9,.851,1.787],[13.055,19.006,13.891,20.692,.36,.984],[12,21,13.055,19.006,.945,.395],[12,19.2,12,21,.394,.945],[10.109,20.692,12,19.2,.715,.394],[10.109,20.692,10.659,18.863,.715,.428],[10.659,18.863,8.462,19.832,.428,.809],[8.462,19.832,9.741,17.97,.809,.525],[6.307,16.84,9.602,15.677,1.65,.812],[6,14.9,9.602,15.677,.194,1.012],[6.273,13.033,9.602,15.677,2.068,1.012],[10.113,14.812,6.273,13.033,1.217,2.068],[10.113,14.812,6.988,11.438,1.217,2.2],[12,3.5,13.525,7.088,4.697,5.571],[12,3.5,13.856,9.589,4.697,3.017],[12,3.5,13.7,12.4,4.648,26.765],[10.792,14.042,6.988,11.438,1.339,2.2],[13.7,12.4,13.959,14.633,.819,1.333],[13.1,13.7,13.7,12.4,0,.819],[11.5,13.3,13.7,12.4,.681,.537],[10.792,14.042,7.983,10.048,1.339,2.328],[11.5,13.3,7.983,10.048,1.438,2.328],[13.913,18.475,15.538,19.832,.409,1.115],[13.891,20.692,13.913,18.475,.984,.409],[7.162,18.516,9.741,17.97,.977,.525],[7.162,18.516,9.4,16.7,.977,.677],[6.307,16.84,9.4,16.7,1.65,.677],[11.5,13.3,9.1,8.8,1.438,1.129],[13.7,12.4,9.1,8.8,2.046,1.129],[10.054,7.77,13.7,12.4,.079,2.285],[10.927,6.683,13.7,12.4,.237,3.126],[11.613,5.481,13.7,12.4,.475,5.451],[12.006,4.106,13.7,12.4,.961,15.892],[12,2.5,13.7,12.4,2.974,26.765]]},box:{strokes:[{width:1.7,cap:false,closed:true,points:[3.8,7.8,12,4,20.2,7.8,20.2,16.4,12,20,3.8,16.4]},{width:1.7,cap:false,closed:false,points:[3.8,7.8,12,11.6,20.2,7.8]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20]}],boxes:[],triangles:[],seams:[]},cart:{strokes:[{width:1.8,cap:true,closed:false,points:[2.8,4,5.4,4,7.7,14.6,8.203,15.401,9.1,15.7,17.3,15.7,18.197,15.401,18.7,14.6,20.4,7.6,6.3,7.6]}],boxes:[{x:8.3,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8},{x:15.8,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8}],triangles:[],seams:[]},minus:{strokes:[{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},plus:{strokes:[{width:2.2,cap:true,closed:false,points:[12,6,12,18]},{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},chev:{strokes:[{width:2,cap:true,closed:false,points:[9,5.5,15.5,12,9,18.5]}],boxes:[],triangles:[],seams:[]},pulse:{strokes:[{width:1.8,cap:true,closed:false,points:[3,12.5,6.8,12.5,9.2,6.9,13.4,17.5,15.8,12.5,21,12.5]}],boxes:[],triangles:[],seams:[]},file:{strokes:[{width:1.7,cap:true,closed:true,points:[7,3.5,14.2,3.5,18.5,7.8,18.5,20,18.324,20.424,17.9,20.6,7,20.6,6.576,20.424,6.4,20,6.4,4.1,6.576,3.676,7,3.5]},{width:1.7,cap:true,closed:false,points:[14,3.6,14,8,18.4,8]},{width:1.7,cap:true,closed:false,points:[9.4,12.4,14.6,12.4]},{width:1.7,cap:true,closed:false,points:[9.4,15.8,14.6,15.8]}],boxes:[],triangles:[],seams:[]},kit:{strokes:[{width:1.7,cap:false,closed:true,points:[4,7.6,12,3.6,20,7.6,20,16.4,12,20.4,4,16.4]},{width:1.7,cap:false,closed:false,points:[4,7.6,12,11.6,20,7.6]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20.4]}],boxes:[],triangles:[],seams:[]},dna:{strokes:[{width:1.7,cap:true,closed:false,points:[7,3.5,7.28,4.645,8.04,5.594,9.16,6.394,10.52,7.097,12,7.75,13.48,8.403,14.84,9.106,15.96,9.906,16.72,10.855,17,12,16.72,13.145,15.96,14.094,14.84,14.894,13.48,15.597,12,16.25,10.52,16.903,9.16,17.606,8.04,18.406,7.28,19.355,7,20.5]},{width:1.7,cap:true,closed:false,points:[17,3.5,16.72,4.645,15.96,5.594,14.84,6.394,13.48,7.097,12,7.75,10.52,8.403,9.16,9.106,8.04,9.906,7.28,10.855,7,12,7.28,13.145,8.04,14.094,9.16,14.894,10.52,15.597,12,16.25,13.48,16.903,14.84,17.606,15.96,18.406,16.72,19.355,17,20.5]},{width:1.7,cap:true,closed:false,points:[8.6,6.3,15.4,6.3]},{width:1.7,cap:true,closed:false,points:[8.6,17.7,15.4,17.7]},{width:1.7,cap:true,closed:false,points:[10.4,9.6,13.6,9.6]},{width:1.7,cap:true,closed:false,points:[10.4,14.4,13.6,14.4]}],boxes:[],triangles:[],seams:[]},heart:{strokes:[{width:1.8,cap:false,closed:true,points:[12,20.2,11.739,20.035,11.041,19.559,10.03,18.804,8.831,17.799,7.569,16.575,6.37,15.163,5.359,13.593,4.661,11.895,4.4,10.1,4.833,8.454,5.87,7.105,7.349,6.264,9.039,6.062,10.675,6.532,12,7.6,13.325,6.532,14.961,6.062,16.651,6.264,18.13,7.105,19.167,8.454,19.6,10.1,19.339,11.895,18.641,13.593,17.63,15.163,16.431,16.575,15.169,17.799,13.97,18.804,12.959,19.559,12.261,20.035,12,20.2]}],boxes:[],triangles:[],seams:[]},bottle:{strokes:[{width:1.7,cap:false,closed:true,points:[7.2,6.2,16.8,6.2,17.507,6.493,17.8,7.2,17.8,19.5,17.572,20.35,16.95,20.972,16.1,21.2,7.9,21.2,7.05,20.972,6.428,20.35,6.2,19.5,6.2,7.2,6.493,6.493,7.2,6.2]},{width:1.7,cap:false,closed:true,points:[9,11,15,11,15,16,9,16]}],boxes:[{x:8,y:2.8,w:8,h:3.4,radius:1,width:1.7}],triangles:[],seams:[]},harness:{strokes:[{width:1.5,cap:true,closed:false,points:[7.5,4.5,7.728,6.82,8.364,8.708,9.336,10.116,10.572,10.996,12,11.3,13.428,10.996,14.664,10.116,15.636,8.708,16.272,6.82,16.5,4.5]},{width:1.5,cap:true,closed:true,points:[5,12.6,19,12.6,19,17.2,18.692,18.35,17.85,19.192,16.7,19.5,7.3,19.5,6.15,19.192,5.308,18.35,5,17.2]},{width:1.5,cap:true,closed:false,points:[8.2,15.3,15.8,15.3]}],boxes:[{x:10.7,y:8.9,w:2.6,h:2.6,radius:1.3,width:1.5}],triangles:[],seams:[]},ramp:{strokes:[{width:1.5,cap:true,closed:false,points:[2.5,19.5,21.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,19.5,3.5,16.5,8,16.5,8,13.5,12.5,13.5,12.5,10.5,17,10.5,17,7.5,20.5,7.5,20.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,16.5,20.5,7.5],opacity:.35}],boxes:[],triangles:[],seams:[]}});var $s=/* @__PURE__ */Object.freeze({black:"#000000",onInk:"#FFFFFF",wash:"rgba(38, 37, 35, 0.06)",scrim:"rgba(38, 37, 35, 0.38)",riskChip:"#FFD8D6",clearChip:"#DDEFC4"});function Os(e){let t=e.trim(),n=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(t);if(n!==null){let e=n[1].length===3?n[1].split("").map(e=>e+e).join(""):n[1];return[0,2,4].map(t=>parseInt(e.slice(t,t+2),16))}let r=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(t);return r===null?null:[Number(r[1]),Number(r[2]),Number(r[3])]}function Bs(e,t,n){let r=Os(e),i=Os(n);if(r===null||i===null)return n;let o=e=>Math.round(r[e]*t+i[e]*(1-t)).toString(16).padStart(2,"0");return`#${o(0)}${o(1)}${o(2)}`.toUpperCase()}function _s(e){let t=Os(e);return t===null?"transparent":`rgba(${t[0]}, ${t[1]}, ${t[2]}, 0)`}function Ls(e){let t=e.color,n=ms(e),r=n.card,i=n.link;return{ink:n.ink,ink2:n.ink2,ink3:n.ink3,paper:n.paper,tile:n.tile,line:n.line,card:r,...Es(e)?{paper:t.background}:{},riskBg:n.riskBg,riskInk:n.riskInk,riskDot:n.riskDot,clearBg:n.clearBg,clearInk:n.clearInk,clearDot:n.clearDot,watchDot:n.watchDot,...n.dark?{black:t.text.primary,onInk:t.background,wash:Bs(t.text.primary,.08,t.surface),scrim:"rgba(0, 0, 0, 0.6)",riskChip:t.badgeBgCritical,clearChip:t.badgeBgPositive}:$s,primary:n.primary,onPrimary:n.onPrimary,accent:n.accent,accent4:Bs(t.accent,.17,r),accent3:Bs(t.accent,.25,r),accentChip:Bs(t.accent,.47,r),link:i,linkWash:(n.dark?void 0:e.slots.planWash?.backgroundColor)??Bs(i,.12,r),linkChip:(n.dark?void 0:e.slots.planChip?.backgroundColor)??Bs(i,.2,r)}}function Es(e){return e.brightness==="dark"?false:e.meta.displayName!==io.meta.displayName||e.color.background!==io.color.background}var As=["sec","steps","need","by","extra"],js=["sec","steps","need"],Ws=["button","coButton","footButton"];function Ms(e,t){if(e.brightness==="dark")return;let n=e.slots.card,r=e.slots.primaryButton,i=(e,n)=>{let r=t[e];t[e]={...r,box:{...r.box,...n}}};if(n!==void 0)for(let e of As)i(e,{...n.backgroundColor===void 0?{}:{backgroundColor:n.backgroundColor},...n.borderRadius===void 0||!js.includes(e)?{}:{borderRadius:n.borderRadius}});if(r?.borderRadius!==void 0)for(let e of Ws)i(e,{borderRadius:r.borderRadius})}var Ns=/* @__PURE__ */new Set(["fontSize","fontWeight","fontFamily","fontStyle","letterSpacing","lineHeight","textTransform","color","textAlign","textDecorationLine","fontVariant"]),Us=/* @__PURE__ */new Set(["justifyItems"]);function qs(e,t,n){let r=Number(n??400);if(t==="serif"){let t=headingFace(e,"bold");return t.fontWeight===void 0?{fontFamily:t.fontFamily}:{fontFamily:t.fontFamily,fontWeight:String(r)}}let i=t==="mono",o=r>=650?i?"monoBold":"bold":r>=450?i?"monoMedium":"medium":i?"mono":"regular",l=face(e,o);return e.type.namedFaces[o]?{fontFamily:l.fontFamily}:{fontFamily:l.fontFamily,fontWeight:String(r)}}function Vs(e,t,n,r,i){let o={},l={},a=e=>{if(!e.startsWith("$"))return e;let n=e.slice(1);return n.startsWith("n_")?r?i:`#${n.slice(2)}`:t[n]??e},s=[],c;for(let[t,i]of Object.entries(n))if(!(i===void 0||Us.has(t)||t==="grid"||t==="fontWeight"))if(t==="fontFamily")Object.assign(l,qs(e,String(i),n.fontWeight));else if(t==="shadow"){if(i===null)Object.assign(o,{shadowOpacity:0,elevation:0});else if(!r){let e=i;Object.assign(o,{shadowColor:a(e.color),shadowOpacity:e.opacity,shadowRadius:e.blur,shadowOffset:{width:e.x,height:e.y},elevation:Math.max(1,Math.round(e.blur/2))})}}else if(t==="inner"){let e=i;c=e===null?null:{position:"absolute",top:0,right:0,bottom:0,left:0,borderWidth:e.width,borderColor:a(e.color),pointerEvents:"none"}}else if(t==="ring"){let e=i,t=typeof n.borderRadius=="number"?n.borderRadius:0;s=e.map((n,r)=>({borderWidth:n.width-(e[r-1]?.width??0),borderColor:a(n.color),borderRadius:t+n.width})).reverse()}else t==="color"||t.endsWith("Color")?(t==="color"?l:o)[t]=a(String(i)):(Ns.has(t)?l:o)[t]=i;n.fontWeight!==void 0&&n.fontFamily===void 0&&Object.assign(l,qs(e,"sans",n.fontWeight));let d=s[0];if(d!==void 0){let e=n.ring.reduce((e,t)=>Math.max(e,t.width),0),t={...d};if(o.position==="absolute"){for(let e of["position","zIndex"])o[e]!==void 0&&(t[e]=o[e]);for(let n of["top","right","bottom","left"])typeof o[n]=="number"&&(t[n]=o[n]-e);for(let e of["position","zIndex","top","right","bottom","left"])delete o[e]}else{for(let n of["marginTop","marginRight","marginBottom","marginLeft"])t[n]=(typeof o[n]=="number"?o[n]:0)-e,delete o[n];o.alignSelf!==void 0&&(t.alignSelf=o.alignSelf,delete o.alignSelf)}s[0]=t}return{box:o,text:l,rings:s,...c===void 0?{}:{inner:c},grid:n.grid??[]}}var Gs=/* @__PURE__ */new WeakMap;function Ks(e){let t=Gs.get(e);if(t!==void 0)return t;let n=Ls(e),r=e.brightness==="dark",i={roles:n};for(let[t,o]of Object.entries(zs))i[t]=Vs(e,n,o,r,n.line);Ms(e,i);let o=i;return Gs.set(e,o),o}function Xs(e,t){let n=e.grid[t];return n===void 0?{}:n==="fr"?{flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0}:n==="auto"?{flexShrink:0}:typeof n=="number"?{width:n,flexShrink:0}:{}}var Ys=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Js=["margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical"],Qs=/* @__PURE__ */new WeakMap;function Zs(e){let n=Qs.get(e);if(n!==void 0)return n;let r=e=>e.filter(e=>typeof e=="string"),i={bx:(...t)=>r(t).map(t=>e[t].box),im:(...t)=>r(t).map(t=>e[t].box),tx:(...t)=>r(t).map(t=>e[t].text),tb:(...t)=>r(t).flatMap(t=>[e[t].box,e[t].text]),ring:(n,r,i)=>{let o=e[n].rings;return o.length===0?r:o.reduceRight((e,n,r)=>t(f,{key:r,style:r===0&&i!==void 0?[n,i]:n},e),r)},inner:(...n)=>{let i=null,o={};for(let t of r(n)){let n=e[t];n.inner!==void 0&&(i=n.inner);for(let e of Ys)n.box[e]!==void 0&&(o={...o,[e]:n.box[e]})}return i===null?null:t(f,{style:[i,o]})},ink:(t,n)=>typeof e[t].text.color=="string"?e[t].text.color:n,side:(t,n)=>typeof e[t].box.width=="number"?e[t].box.width:n,mod:(t,n)=>{if(n===void 0||n==="")return null;let r=`${t}${n.charAt(0).toUpperCase()}${n.slice(1)}`;return r!=="roles"&&r in e?r:null},scroll:t=>{let n={},r={};for(let[i,o]of Object.entries(e[t].box))(Js.includes(i)?n:r)[i]=o;return{place:n,content:r}},swipe:(t,n)=>{let r=e[t].box,i=typeof r.flexBasis=="string"&&r.flexBasis.endsWith("%")?Number(r.flexBasis.slice(0,-1))/100:1,o=typeof r.maxWidth=="number"?r.maxWidth:1/0;return Math.round(Math.min(o,n*i)*100)/100}};return Qs.set(e,i),i}var ec=/* @__PURE__ */Object.freeze({button:.97,onButton:.96,jump:.98,opt:.98,add:.98,extraGo:.96,every:.96,askRow:.98,stepper:.9,mode:.98,order:.98,subCard:.96});function tc(e,t,n){return n?e:({pressed:n})=>n?[e,{transform:[{scale:t}]}]:e}var nc=["ordered","shipped","out_for_delivery","delivered"],rc={ordered:0,shipped:1,delivered:3};function ic(e){let t=Math.max(0,nc.indexOf(e.status));return{key:e.key,number:e.number??null,step:t,dates:e.dates??[],everfur:false,steps:[0,1,2,3],productId:null,items:e.items.map(e=>({title:e.title,quantity:e.quantity,price:e.price,imageUrl:e.imageUrl??null,icon:e.icon??null})),total:Math.round(e.items.reduce((e,t)=>e+t.price,0)*100)/100,currency:e.currency,subscriptionBox:e.subscriptionBox===true,carrier:e.carrier??null,trackingNumber:e.trackingNumber??null,trackingTag:e.trackingTag??null,trackingUrl:e.trackingUrl??null}}function oc(e,t){let n=t.find(t=>t.productId===e.productId),r=e.tracking,i=e.quantity??1,o=e.total??Math.round(e.price*i*100)/100,l=r===void 0?0:rc[r.status];return{key:e.orderId,number:r?.orderNumber??null,step:l,dates:r===void 0?[e.createdAt??null]:[e.createdAt??null,r.shippedAt,null,l===3?null:r.estimatedDelivery],steps:r===void 0?[0]:[0,1,3],everfur:true,productId:e.productId,items:[{title:e.title??n?.title??"",quantity:i,price:o,imageUrl:n?.imageUrl??null,icon:null}],total:o,currency:e.currency,subscriptionBox:false,carrier:r?.carrier??null,trackingNumber:r?.trackingNumber??null,trackingTag:null,trackingUrl:r?.trackingUrl??null}}function lc(e,t,n=/* @__PURE__ */new Date){if(e==null)return null;let r=/^\d{4}-\d{2}-\d{2}$/.test(e),i=new Date(r?`${e}T00:00:00Z`:e);if(Number.isNaN(i.getTime()))return null;let o=r?"UTC":void 0,l=Number(new Intl.DateTimeFormat("en-US",{year:"numeric",...o?{timeZone:o}:{}}).format(i));try{return new Intl.DateTimeFormat(t??"en-US",l!==n.getFullYear()?{month:"short",day:"numeric",year:"numeric",...o?{timeZone:o}:{}}:{weekday:"short",month:"short",day:"numeric",...o?{timeZone:o}:{}}).format(i)}catch{return e}}function ac(e){return e.length<=1?e[0]??"":`${e.slice(0,-1).join(", ")} and ${e[e.length-1]??""}`}var sc={justifyContent:"center"},cc={flexShrink:1},dc={width:"100%",height:"100%"},uc={flexWrap:"wrap"},pc={width:"100%",alignSelf:"stretch"},hc={top:2,bottom:2,left:2,right:2},gc={alignSelf:"auto"},fc={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",borderWidth:0},mc=(e,t,n)=>/* @__PURE__ */R(z,{children:[" ",
|
|
81
|
+
/* @__PURE__ */P(f,{style:e.S.D.bx(n),children:/* @__PURE__ */P(Text,{style:e.S.D.tx(n),children:t})})]});function yc(e,t,n,r={}){let{S:i}=e,{bx:o,tx:l}=i.D,a=r.disabled===true,s=r.part??"button";/* @__PURE__ */
|
|
82
|
+
return P(m,{onPress:a?void 0:n,disabled:a,accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{disabled:a},style:tc(r.ghost?[i.buttonGhost,a?i.disabled:null]:o(s,a&&"buttonDisabled"),ec.button,a),...r.testID?{testID:r.testID}:{},children:/* @__PURE__ */P(Text,{tier:"control",style:r.ghost?i.buttonGhostText:l(s),children:t})})}function bc(e,t,n,r){let{bx:i,tx:o}=e.S.D;/* @__PURE__ */
|
|
83
|
+
return P(m,{onPress:n,accessibilityRole:"button",accessibilityLabel:t,style:[...i("shopLink"),sc],...r?{testID:r}:{},children:/* @__PURE__ */P(Text,{tier:"control",style:o("shopLink"),children:t})})}function kc(e,t,n=false){if(t.length===0)return null;let{bx:r,tx:i,ink:o,side:l}=e.S.D,a=e.S.X;/* @__PURE__ */
|
|
84
|
+
return P(f,{style:r("coRows",n&&"coRowsShop"),testID:"health-plan-checkout-rows",children:t.map(t=>/* @__PURE__ */R(f,{style:r("coRow"),children:[
|
|
85
|
+
/* @__PURE__ */P(f,{style:Xs(a.coRow,0),children:e.icon(t.icon,o("coRowSvg",a.roles.ink2??""),l("coRowSvg",20))}),
|
|
86
|
+
/* @__PURE__ */P(Text,{style:[...i("coRowLabel"),{minWidth:Xs(a.coRow,1).width,flexShrink:0}],numberOfLines:1,children:t.label}),
|
|
87
|
+
/* @__PURE__ */P(Text,{style:[...i("coRow","coRowValue"),Xs(a.coRow,2)],children:t.value})]},t.label))})}function wc(e,t,n={}){let{S:r,copy:i}=e,o=n.renew??null,l=i.shippingValue!=="";return o!==null||l&&n.tag===true&&i.shippingTag!==""?vc(e,t,n):/* @__PURE__ */P(PlanDs,{theme:r.ds,children:/* @__PURE__ */P(SummaryList,{variant:n.inCheckout?"inset":"card",rows:[{key:"subtotal",term:i.subtotal,value:t},...l?[{key:"shipping",term:i.shipping,value:i.shippingValue}]:[]],total:{key:"total",term:i.total,value:t},testID:"health-plan-summary"})})}function vc(e,t,n){let{S:r,copy:i}=e,{bx:o,tx:l}=r.D,a=n.renew??null,s=(e,t,n,r)=>/* @__PURE__ */R(f,{style:o("summaryRow",n),children:[
|
|
88
|
+
/* @__PURE__ */R(f,{style:[...o("summaryLabel"),cc,gc],children:[
|
|
89
|
+
/* @__PURE__ */P(Text,{style:[...l("summaryRow",n,n==="summaryTotal"?"summaryTotalLabel":"summaryLabel"),cc],children:e}),r===void 0?null:/* @__PURE__ */P(f,{style:o("summaryTag"),testID:"health-plan-summary-tag",children:/* @__PURE__ */P(Text,{style:l("summaryTag"),children:r})})]}),
|
|
90
|
+
/* @__PURE__ */P(Text,{style:l("summaryRow",n),children:t})]});/* @__PURE__ */
|
|
91
|
+
return R(f,{style:o(n.inCheckout?"coSummary":"summary"),children:[s(i.subtotal,t),i.shippingValue===""?null:s(i.shipping,i.shippingValue,void 0,n.tag&&i.shippingTag!==""?i.shippingTag:void 0),s(a===null?i.total:i.dueToday,t,"summaryTotal"),a===null?null:s(i.thenRenews(a),i.renewsEvery(a),"summaryRenew")]})}function xc(e,t,n){let{S:r}=e,{bx:i,tx:o,tb:l,inner:a,ink:s,side:c}=r.D;/* @__PURE__ */
|
|
92
|
+
return P(f,{style:i("track"),accessibilityLabel:n,testID:"health-plan-track",children:t.map((n,d)=>{let u=n.state==="done",p=n.state==="now",h=d===t.length-1;/* @__PURE__ */
|
|
93
|
+
return R(f,{style:i("trackStep",h&&"trackStepLast"),children:[h?null:/* @__PURE__ */P(f,{style:i("trackLine",u&&t[d+1]?.state==="done"&&"trackLineDone")}),
|
|
94
|
+
/* @__PURE__ */R(f,{style:[...i("trackDot",u&&"trackDotDone",p&&"trackDotNow"),Xs(r.X.trackStep,0)],children:[a("trackDot",u&&"trackDotDone",p&&"trackDotNow"),u?e.icon("check",s("trackDotSvg",r.X.roles.card??""),c("trackDotSvg",13)):null]}),
|
|
95
|
+
/* @__PURE__ */R(f,{style:Xs(r.X.trackStep,1),children:[
|
|
96
|
+
/* @__PURE__ */P(Text,{style:o("trackTitle",!u&&!p&&"trackTitleTodo"),children:n.title}),n.detail?/* @__PURE__ */R(Text,{style:l("trackDetail"),children:[n.detail,n.tag?mc(e,n.tag,"trackTag"):null]}):null]})]},n.title)})})}function Sc(e,t,n,r,i,o,l=false){let{S:a}=e,{bx:s,tx:c,tb:d,ink:u,side:p}=a.D;if(n==="")return null;let h=a.X;/* @__PURE__ */
|
|
97
|
+
return R(m,{onPress:i,accessibilityRole:"button",accessibilityLabel:n,style:tc(s("askRow",l&&"askRowInSec"),ec.askRow,false),testID:o,children:[
|
|
98
|
+
/* @__PURE__ */P(f,{style:[...s("askRowIcon"),Xs(h.askRow,0)],children:e.icon(t,u("askRowIcon",h.roles.link??""),p("askRowIconSvg",21))}),
|
|
99
|
+
/* @__PURE__ */R(f,{style:Xs(h.askRow,1),children:[
|
|
100
|
+
/* @__PURE__ */P(Text,{style:c("askRowStrong"),children:n}),r===""?null:/* @__PURE__ */P(Text,{style:d("askRowSmall"),children:r})]}),
|
|
101
|
+
/* @__PURE__ */P(f,{style:Xs(h.askRow,2),children:e.icon("chev",u("askRowChev",h.roles.ink2??""),p("askRowChev",18))})]})}function Tc(e,t,n,r=null){let{S:i}=e,{bx:o,tx:l,tb:a,ink:s,side:c}=i.D,d=i.X,u=d.roles.link??"",p=(t.rows??[]).flatMap(t=>t.fromVet!==true?[t]:r===null?[]:[{...t,text:e.copy.waitVetTips(r)}]);/* @__PURE__ */
|
|
102
|
+
return R(f,{style:o("wait"),testID:"health-plan-wait",children:[
|
|
103
|
+
/* @__PURE__ */R(f,{style:o("waitTop"),children:[
|
|
104
|
+
/* @__PURE__ */P(f,{style:[...o("waitTile"),Xs(d.waitTop,0)],children:e.icon(t.icon??"kit",s("waitTile",u),c("waitTileSvg",23))}),
|
|
105
|
+
/* @__PURE__ */R(f,{style:Xs(d.waitTop,1),children:[
|
|
106
|
+
/* @__PURE__ */P(Text,{style:a("waitMini"),children:t.kicker}),
|
|
107
|
+
/* @__PURE__ */P(Text,{style:a("waitTitle"),accessibilityRole:"header",children:t.title})]})]}),t.track&&t.track.length>0?xc(e,t.track,t.kicker):null,t.heading?/* @__PURE__ */P(Text,{style:a("waitKey"),children:t.heading}):null,p.length>0?/* @__PURE__ */P(f,{style:o("next","nextIn"),children:p.map(t=>/* @__PURE__ */R(f,{style:o("nextRow"),children:[
|
|
108
|
+
/* @__PURE__ */P(f,{style:[...o("nextIcon"),Xs(d.nextRow,0)],children:e.icon(t.icon,s("nextIcon",u),c("nextIconSvg",19))}),
|
|
109
|
+
/* @__PURE__ */R(f,{style:Xs(d.nextRow,1),children:[
|
|
110
|
+
/* @__PURE__ */P(Text,{style:l("nextLabel"),children:t.label}),
|
|
111
|
+
/* @__PURE__ */P(Text,{style:a("nextText"),children:t.text})]})]},t.label))}):null,t.note?/* @__PURE__ */R(f,{style:o("waitText"),children:[e.icon("chat",s("waitTextSvg",u),c("waitTextSvg",20)),
|
|
112
|
+
/* @__PURE__ */P(Text,{style:[...l("waitText"),cc],children:t.note})]}):null,t.action&&n?yc(e,t.action,n,{part:"waitButton"}):null]})}function Cc(e,t,n,r,i){let{bx:o,tb:l,ink:a,side:s}=e.S.D;/* @__PURE__ */
|
|
113
|
+
return R(f,{style:o("shopEmpty"),children:[
|
|
114
|
+
/* @__PURE__ */P(f,{style:o("shopEmptyTile"),children:e.icon(t,a("shopEmptyTile",e.S.X.roles.link??""),s("shopEmptyTileSvg",34))}),
|
|
115
|
+
/* @__PURE__ */P(Text,{style:l("shopEmptyTitle"),accessibilityRole:"header",children:n}),
|
|
116
|
+
/* @__PURE__ */P(Text,{style:l("shopEmptyText"),children:r}),i]})}var Ic=(e,t,n,r,i="box")=>{let{bx:o,ink:l}=e.S.D;/* @__PURE__ */
|
|
117
|
+
return P(f,{style:o(n),children:t?/* @__PURE__ */P(T,{source:{uri:t},style:dc,accessibilityIgnoresInvertColors:true}):e.icon(i,l(n,e.S.X.roles.link??""),r)})};function Hc(e,t,n,r,i,o){let{S:l,copy:a}=e,{bx:s,tx:c,tb:d,inner:u,side:p}=l.D,h=l.X;if(t.length===0)/* @__PURE__ */
|
|
118
|
+
return P(f,{style:s("shop"),testID:"health-plan-cart-empty",children:Cc(e,"cart",a.cartEmptyTitle,a.cartEmptyBody(i),bc(e,a.seeOrders,o.onOrders,"health-plan-cart-orders"))});let g=(t,n,r,i,o,l)=>/* @__PURE__ */P(m,{onPress:r?void 0:i,disabled:r,accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{disabled:r},hitSlop:hc,style:tc([...s("stepperButton",r&&"stepperButtonDisabled"),Xs(h.stepper,l)],ec.stepper,r),testID:o,children:e.icon(n,void 0,p("stepperButtonSvg",16))});/* @__PURE__ */
|
|
119
|
+
return R(f,{style:s("shop"),testID:"health-plan-cart",children:[
|
|
120
|
+
/* @__PURE__ */P(f,{style:s("shopCard"),children:/* @__PURE__ */P(f,{style:s("cartItems"),children:t.map(t=>/* @__PURE__ */R(f,{style:s("cartItem"),testID:`health-plan-cart-line-${t.key}`,children:[
|
|
121
|
+
/* @__PURE__ */P(f,{style:Xs(h.cartItem,0),children:Ic(e,t.imageUrl,"cartItemImage",p("cartItemImageSvg",28))}),
|
|
122
|
+
/* @__PURE__ */R(f,{style:Xs(h.cartItem,1),children:[
|
|
123
|
+
/* @__PURE__ */P(Text,{style:d("cartItemTitle"),children:t.name}),
|
|
124
|
+
/* @__PURE__ */R(f,{style:s("cartItemPrice"),children:[t.price===null?null:/* @__PURE__ */P(Text,{style:c("cartItemPriceValue"),children:t.price}),t.was===null?null:/* @__PURE__ */P(Text,{style:c("cartItemPriceWas"),children:t.was}),t.note===null?null:/* @__PURE__ */P(Text,{style:c("cartItemPriceNote"),children:t.note})]}),t.modes===null?null:/* @__PURE__ */P(f,{style:s("mode"),accessibilityRole:"radiogroup",accessibilityLabel:t.modes.label,children:["sub","once"].map(e=>{let n=e==="sub"?t.modes?.sub:t.modes?.once,r=e==="sub"?t.subscription:!t.subscription;return n===void 0?null:/* @__PURE__ */R(m,{onPress:()=>o.onMode(t.key,e),accessibilityRole:"radio",accessibilityLabel:n.label,accessibilityState:{checked:r},style:tc(s("modeButton",r&&"modeButtonOn"),ec.mode,false),children:[u("modeButton",r&&"modeButtonOn"),
|
|
125
|
+
/* @__PURE__ */P(Text,{style:[...c("modeButton"),cc],children:n.label}),n.price===null?null:/* @__PURE__ */P(Text,{style:c("modeButton","modePrice"),children:n.price})]},e)})}),t.every===null?null:/* @__PURE__ */R(f,{style:s("every"),accessibilityRole:"radiogroup",accessibilityLabel:a.shipsEvery,children:[u("every"),t.every.options.map((e,n)=>{let r=t.every?.selected===e;/* @__PURE__ */
|
|
126
|
+
return P(m,{onPress:()=>o.onEvery(t.key,e),accessibilityRole:"radio",accessibilityState:{checked:r},accessibilityLabel:a.days(e),style:tc([...s("everyButton",r&&"everyButtonOn"),Xs(h.every,n),sc],ec.every,false),children:/* @__PURE__ */P(Text,{style:c("everyButton",r&&"everyButtonOn"),children:a.days(e)})},e)})]}),
|
|
127
|
+
/* @__PURE__ */R(f,{style:s("cartItemActions"),children:[t.subscription?null:/* @__PURE__ */R(f,{style:s("stepper"),accessibilityLabel:a.quantityLabel(t.name),children:[u("stepper"),g(a.fewer,"minus",t.quantity<=1,()=>o.onQuantity(t.key,-1),`health-plan-fewer-${t.key}`,0),
|
|
128
|
+
/* @__PURE__ */P(Text,{style:[...c("stepperValue"),Xs(h.stepper,1)],accessibilityLiveRegion:"polite",children:String(t.quantity)}),g(a.more,"plus",t.quantity>=t.maxQuantity,()=>o.onQuantity(t.key,1),`health-plan-more-${t.key}`,2)]}),
|
|
129
|
+
/* @__PURE__ */P(m,{onPress:()=>o.onRemove(t.key),accessibilityRole:"button",accessibilityLabel:a.remove,hitSlop:hc,style:[...s("remove"),sc],testID:`health-plan-remove-${t.key}`,children:/* @__PURE__ */P(Text,{tier:"control",style:c("remove"),children:a.remove})})]})]})]},t.key))})}),wc(e,n,{tag:true,renew:r}),
|
|
130
|
+
/* @__PURE__ */P(f,{style:s("shopActions"),children:bc(e,a.seeOrders,o.onOrders,"health-plan-cart-orders")})]})}function Fc(e,t,n,r,i,o,l,a){let{S:s,copy:c}=e,{bx:d,tx:u,tb:p}=s.D,h=s.X;/* @__PURE__ */
|
|
131
|
+
return R(f,{style:d("co"),testID:"health-plan-cart-checkout-sheet",children:[
|
|
132
|
+
/* @__PURE__ */P(Text,{style:fc,accessibilityRole:"header",testID:"health-plan-cart-checkout-title",children:c.cartCheckoutTitle}),
|
|
133
|
+
/* @__PURE__ */P(f,{style:d("coItems"),children:t.map(t=>/* @__PURE__ */R(f,{style:d("coItem"),children:[
|
|
134
|
+
/* @__PURE__ */P(f,{style:Xs(h.coItem,0),children:Ic(e,t.imageUrl,"coItemPic",20)}),
|
|
135
|
+
/* @__PURE__ */R(f,{style:Xs(h.coItem,1),children:[
|
|
136
|
+
/* @__PURE__ */P(Text,{style:u("coItemStrong"),children:t.name}),
|
|
137
|
+
/* @__PURE__ */P(Text,{style:u("coItemSmall"),children:t.subscription?c.cartItemSubscription(t.lp):c.cartItemQuantity(t.quantity)})]}),
|
|
138
|
+
/* @__PURE__ */P(Text,{style:[...u("coItem","coItemValue"),Xs(h.coItem,2)],children:n(t)??""})]},t.key))}),kc(e,r),wc(e,i,{renew:o,inCheckout:true}),yc(e,l.label,l.onPress,{disabled:l.disabled,testID:"health-plan-place-order"}),a===""?null:/* @__PURE__ */P(Text,{style:p("coFine"),children:a})]})}function Rc(e,t,n,r,i){let{S:o,copy:l}=e,{bx:a,im:s,tx:c,tb:d,ink:u,side:p}=o.D,h=o.X,g=t.step===3,y=t.dates[3]??null,b=r(y),k=g?b===null?null:l.deliveredOn(b):b===null?null:l.arrivesBy(b),w=n(t.total,t.currency),v=ac(t.items.map(e=>e.title));/* @__PURE__ */
|
|
139
|
+
return R(m,{onPress:()=>i(t.key),accessibilityRole:"button",accessibilityLabel:v,style:tc(a("order"),ec.order,false),testID:`health-plan-order-${t.key}`,children:[
|
|
140
|
+
/* @__PURE__ */R(f,{style:Xs(h.order,0),children:[
|
|
141
|
+
/* @__PURE__ */R(f,{style:a("orderTop"),children:[
|
|
142
|
+
/* @__PURE__ */P(f,{style:a("pill",g&&"pillDone"),children:/* @__PURE__ */P(Text,{style:c("pill",g&&"pillDone"),children:l.orderSteps[t.step]??""})}),t.subscriptionBox?/* @__PURE__ */P(f,{style:a("pill","pillSub"),children:/* @__PURE__ */P(Text,{style:c("pill","pillSub"),children:l.subscriptionBox})}):null,t.number===null?null:/* @__PURE__ */P(Text,{style:c("orderNo"),children:t.number})]}),
|
|
143
|
+
/* @__PURE__ */P(Text,{style:d("orderWhat"),children:v}),
|
|
144
|
+
/* @__PURE__ */P(Text,{style:d("orderMeta"),children:[k,w].filter(e=>e!==null).join(" · ")}),t.items.length===0?null:/* @__PURE__ */P(f,{style:a("orderPics"),children:t.items.map(t=>/* @__PURE__ */P(f,{style:a("orderPic"),children:t.imageUrl?/* @__PURE__ */P(T,{source:{uri:t.imageUrl},style:s("orderPicImage"),accessibilityIgnoresInvertColors:true}):e.icon(t.icon??"box",u("orderPic",h.roles.link??""),p("orderPicSvg",20))},t.title))})]}),
|
|
145
|
+
/* @__PURE__ */P(f,{style:Xs(h.order,1),children:e.icon("chev",u("orderChev",h.roles.ink3??""),p("orderChev",18))})]},t.key)}function Pc(e,t){let{S:n,copy:r}=e,{bx:i,im:o,tx:l,tb:a,inner:s,ink:c}=n.D,d=n.X,u=t.subscription;return!t.loaded&&u===null?/* @__PURE__ */P(f,{style:i("shop"),testID:"health-plan-orders-loading"}):t.loaded&&t.orders.length===0&&u===null?/* @__PURE__ */P(f,{style:i("shop"),testID:"health-plan-orders-empty",children:Cc(e,"box",r.ordersEmptyTitle,r.ordersEmptyBody(t.petPrices),yc(e,r.startedDone,t.onBack,{part:"shopEmptyButton"}))}):/* @__PURE__ */R(f,{style:i("shop"),testID:"health-plan-orders",children:[u===null?null:/* @__PURE__ */R(z,{children:[
|
|
146
|
+
/* @__PURE__ */P(Text,{style:a("shopKey"),children:r.herSubscription}),
|
|
147
|
+
/* @__PURE__ */R(f,{style:i("subCard"),testID:"health-plan-orders-subscription",children:[u.imageUrl?/* @__PURE__ */P(T,{source:{uri:u.imageUrl},style:[...o("subCardImage"),{flexShrink:0}],accessibilityIgnoresInvertColors:true}):/* @__PURE__ */P(f,{style:[...i("subCardImage"),Xs(d.subCard,0),sc,{alignItems:"center"}],children:e.icon("box",c("subCardImage",d.roles.link??""))}),
|
|
148
|
+
/* @__PURE__ */R(f,{style:Xs(d.subCard,1),children:[
|
|
149
|
+
/* @__PURE__ */P(Text,{style:a("subCardStrong"),children:u.name}),u.next===null?null:/* @__PURE__ */P(Text,{style:a("subCardSmall"),children:r.nextBox(u.next)}),
|
|
150
|
+
/* @__PURE__ */P(Text,{style:a("subCardSmall"),children:r.everyDays(u.every)})]}),
|
|
151
|
+
/* @__PURE__ */R(m,{onPress:u.onManage,accessibilityRole:"button",accessibilityLabel:r.manage,hitSlop:hc,style:tc([...i("subCardButton"),Xs(d.subCard,2),sc],ec.subCard,false),testID:"health-plan-orders-manage",children:[s("subCardButton"),
|
|
152
|
+
/* @__PURE__ */P(Text,{tier:"control",style:l("subCardButton"),children:r.manage})]})]})]}),t.orders.length>0?/* @__PURE__ */R(z,{children:[
|
|
153
|
+
/* @__PURE__ */P(Text,{style:a("shopKey"),children:r.ordersHeading(u!==null)}),
|
|
154
|
+
/* @__PURE__ */P(f,{style:i("orderList"),children:t.orders.map(n=>Rc(e,n,t.fmt,t.day,t.onOpen))}),t.more&&r.moreOrders!==""?yc(e,r.moreOrders,t.more.onMore,{ghost:true,disabled:t.more.loading,testID:"health-plan-orders-more"}):null,r.ordersFine===""?null:/* @__PURE__ */P(Text,{style:a("shopFine"),children:r.ordersFine})]}):null]})}function zc(e,t){let{S:n,copy:r}=e,{bx:i,tx:o,tb:l,inner:a,ink:s,side:c}=n.D,d=n.X,u=t.order,p=u.step===3,h=u.dates[3]??null,g=t.day(h),y=p?g===null?null:r.deliveredOn(g):g===null?null:r.arrivesBy(g),b=(u.steps??(u.everfur?[0,1,2,3].slice(0,u.step+1):[0,1,2,3])).flatMap(e=>{let n=r.orderSteps[e];if(n===void 0)return[];let i=t.day(u.dates[e]??null);return[e<=u.step?{title:n,state:"done",...i===null?{}:{detail:i}}:{title:n,state:"next",...i===null?{}:{detail:r.expected(i)}}]}),k=u.trackingUrl!==null&&/^https:\/\//i.test(u.trackingUrl)?u.trackingUrl:null,w=k===null?"":u.carrier!==null?r.trackOn(u.carrier):r.trackLink,v=t.fmt(u.total,u.currency)??"",x=[r.ordersFine,u.everfur?r.orderNote:""].filter(e=>e!=="").join(" ");/* @__PURE__ */
|
|
155
|
+
return R(f,{style:i("shop"),testID:"health-plan-order",children:[
|
|
156
|
+
/* @__PURE__ */P(Text,{style:l("shopTitle"),accessibilityRole:"header",children:p?r.orderSteps[3]:r.orderSteps[0]}),y===null?null:/* @__PURE__ */P(Text,{style:l("shopSub"),children:y}),
|
|
157
|
+
/* @__PURE__ */P(f,{style:i("shopCard"),children:xc(e,b,r.tracking)}),u.carrier===null&&u.trackingNumber===null?null:/* @__PURE__ */P(f,{style:i("shopCard"),testID:"health-plan-carrier",children:/* @__PURE__ */R(f,{style:[...i("carrier"),uc],children:[
|
|
158
|
+
/* @__PURE__ */P(f,{style:[...i("carrierIcon"),Xs(d.carrier,0)],children:e.icon("truck",s("carrierIcon",d.roles.link??""),c("carrierIconSvg",21))}),
|
|
159
|
+
/* @__PURE__ */R(f,{style:Xs(d.carrier,1),children:[u.carrier===null?null:/* @__PURE__ */P(Text,{style:l("carrierStrong"),children:u.carrier}),u.trackingNumber===null?null:
|
|
160
|
+
/* @__PURE__ */R(f,{style:[...i("carrierSmall"),uc],children:[
|
|
161
|
+
/* @__PURE__ */P(Text,{style:o("carrierSmall"),selectable:true,children:u.trackingNumber}),u.trackingTag===null?null:/* @__PURE__ */P(f,{style:i("carrierTag"),testID:"health-plan-tracking-tag",children:/* @__PURE__ */P(Text,{style:o("carrierTag"),children:u.trackingTag})})]}),u.trackingNumber===null&&r.trackingByText!==""?/* @__PURE__ */P(Text,{style:l("carrierWait"),children:r.trackingByText}):null]}),k===null||w===""||u.trackingNumber===null?null:/* @__PURE__ */R(m,{onPress:()=>{I.openURL(k).catch(()=>{})},accessibilityRole:"button",accessibilityLabel:w,hitSlop:hc,style:tc([...i("carrierButton"),pc],ec.button,false),testID:"health-plan-track-link",children:[a("carrierButton"),
|
|
162
|
+
/* @__PURE__ */P(Text,{tier:"control",style:o("carrierButton"),children:w})]})]})}),
|
|
163
|
+
/* @__PURE__ */P(Text,{style:l("shopKey"),children:r.inThisOrder}),
|
|
164
|
+
/* @__PURE__ */P(f,{style:i("shopCard"),children:/* @__PURE__ */P(f,{style:i("cartItems"),children:u.items.map(n=>/* @__PURE__ */R(f,{style:i("cartItem"),testID:"health-plan-order-line",children:[
|
|
165
|
+
/* @__PURE__ */P(f,{style:Xs(d.cartItem,0),children:Ic(e,n.imageUrl,"cartItemImage",c("cartItemImageSvg",28),n.icon??"box")}),
|
|
166
|
+
/* @__PURE__ */R(f,{style:Xs(d.cartItem,1),children:[
|
|
167
|
+
/* @__PURE__ */P(Text,{style:l("cartItemTitle"),children:n.title}),
|
|
168
|
+
/* @__PURE__ */R(f,{style:i("cartItemPrice"),children:[
|
|
169
|
+
/* @__PURE__ */P(Text,{style:o("cartItemPriceValue"),children:t.fmt(n.price,u.currency)??""}),
|
|
170
|
+
/* @__PURE__ */P(Text,{style:o("cartItemPriceNote"),children:r.orderItemLine(n.quantity,u.subscriptionBox)})]})]})]},n.title))})}),wc(e,v),kc(e,t.rows,true),t.onBuyAgain===null?null:yc(e,r.buyAgain,t.onBuyAgain,{ghost:true,testID:"health-plan-buy-again"}),t.onHelp===null?null:bc(e,r.orderHelp,t.onHelp),x===""?null:/* @__PURE__ */P(Text,{style:l("shopFine"),children:x})]})}var Dc=createContext(null),$c=createContext(null);function HealthPlanScrollScope({scrollRef:e,children:t,style:n}){let i=s(null),o=Ko().motion.reducedMotion,l=a(t=>{let n=i.current,r=e.current;if(!(t===null||n===null||r===null))try{t.measureLayout(n,(e,t)=>r.scrollTo({y:Math.max(0,t),animated:!o}),()=>{})}catch{}},[e,o]),c=r(()=>l,[l]),d=r(()=>({measure:t=>{let n=e.current;if(typeof n?.measureInWindow=="function")try{n.measureInWindow((e,n,r,i)=>{i>0&&t({y:n,height:i})})}catch{}},top:t=>{let n=i.current,r=e.current;if(!(t===null||n===null||r===null))try{t.measureLayout(n,(e,t)=>r.scrollTo({y:Math.max(0,t),animated:!1}),()=>{})}catch{}}}),[e]);/* @__PURE__ */
|
|
171
|
+
return P(Dc.Provider,{value:c,children:/* @__PURE__ */P($c.Provider,{value:d,children:/* @__PURE__ */P(f,{ref:i,style:n,collapsable:false,children:t})})})}function Oc(){return i(Dc)}function Bc(){return i($c)}var _c=false;function Lc(e){if(_c||!e)return;_c=true;let t=globalThis.console;try{t?.warn?.("[everfur] A ConnectedHealthPlan* block was drawn outside HealthPlanFocusProvider, so it draws nothing. Wrap it in HealthPlanFocusProvider (or HealthPlanFocus), or use the pure block with your own data.")}catch{}}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,i=n===""?"Your pet":n;return t==="female"?{name:r,Name:i,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:i,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:i,poss:`${r}'s`,Poss:`${i}'s`,obj:r}}var Ec=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,Ac=/* @__PURE__ */Object.freeze({onceFine:"",cartFine:Ec,startedWhat:()=>""});function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${Ec(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}var jc=healthPlanFocusCopyFor({sex:"female"});function formatHealthPlanDay(e,t){if(e===null||!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let n=/* @__PURE__ */new Date(`${e}T00:00:00Z`);if(Number.isNaN(n.getTime()))return null;try{return new Intl.DateTimeFormat(t??"en-US",{month:"short",day:"numeric",timeZone:"UTC"}).format(n)}catch{return e}}var Wc=/* @__PURE__ */Object.freeze({loaded:false,orders:[],next:null,loading:false});function Mc(e,t){return[...e.filter(e=>e.kind!==t.kind),t]}function Nc(e,t,n){return e!==null?e.kind:Uc(t,n)}function Uc(e,t){return e!==null?"started":t!==void 0?t.kind:null}function qc(e,t){let n=/* @__PURE__ */new Set;return[...e,...t].filter(e=>n.has(e.orderId)?false:(n.add(e.orderId),true))}function Vc(e,t){return[...t,...e.filter(e=>!t.some(t=>t.orderId===e.orderId))]}function Gc(e,t){return{loaded:true,orders:[...e.orders,...t.orders.filter(t=>!e.orders.some(e=>e.orderId===t.orderId))],next:t.nextCursor,loading:false}}function Kc(e,t,n){if(e===null)return null;let r=t.find(t=>t.orderId===e);return r!==void 0?r.tracking?.orderNumber??null:n.find(t=>t.key===e)?.number??null}function Xc(e,t,n){return e.flatMap(e=>e.productId!==t?[e]:n(e)??[])}async function Yc(e,petRef,t){if(e.listOneBoxOrderPage!==void 0)return e.listOneBoxOrderPage(petRef,{limit:20,...t===null?{}:{cursor:t}});if(t!==null||e.listOneBoxOrders===void 0)return{ok:true,value:{orders:[],nextCursor:null}};let n=await e.listOneBoxOrders(petRef);return n.ok?{ok:true,value:{orders:n.value,nextCursor:null}}:n}function Jc(e){if(e.httpStatus!==422)return false;let t=e.raw!==null&&typeof e.raw=="object"?e.raw:null;return[e.reasonCode,e.wireMessage,t?.detail,t?.message].some(e=>e==="invalid_cursor")}var Qc=e=>Math.round(e*100)/100;function useHealthPlanSubscriptionRepository(){let{runtime:e}=le();return r(()=>createHealthPlanSubscriptionRepository(e),[e])}function useHealthPlanSubscription(e){let{userRef:userRef}=le(),t=useHealthPlanSubscriptionRepository(),i=e.repository??t,l=e.enabled!==false&&userRef!==null&&e.petRef!==null&&e.productId!==null,{petRef:petRef,productId:c}=e,[d,u]=n("idle"),[p,h]=n(null),[g,f]=n(null),[m,y]=n(false),[b,k]=n(null),[w,v]=n(null),x=s(0),S=s(0),T=s(0),C=s(false),I=s(false),H=s(()=>Promise.resolve()),F=a(async()=>{let e=++x.current;if(I.current=false,v(null),!l||petRef===null||c===null){u("idle"),h(null),f(null);return}u("loading");let t=await i.quote(petRef,c);if(e===x.current){if(!t.ok){h(null),f(null),k(t.error),u(isHealthPlanSubscriptionUnavailable(t.error)?"unavailable":"failed");return}k(null),h(t.value),f(t.value.subscription),u("ready"),v(Date.now())}},[l,petRef,c,i]),R=l&&d==="ready",P=a(async()=>{if(!R||C.current||petRef===null||c===null)return;let e=x.current,t=S.current,n=++T.current,r=await i.quote(petRef,c);e!==x.current||t!==S.current||n!==T.current||C.current||!r.ok||(h(r.value),f(r.value.subscription),v(Date.now()))},[R,petRef,c,i]);H.current=P;let z=()=>{if(!R){F();return}if(C.current){I.current=true;return}P()};en({lifecycle:e.lifecycle,refreshKey:e.refreshKey,readyAt:R?w:null,revalidate:()=>{P()},refresh:z});let D=a(()=>{I.current&&(I.current=false,H.current())},[]);o(()=>(F(),()=>{x.current+=1}),[F]);let $=a(async e=>{let t=x.current;S.current+=1,C.current=true,y(true);let n=await e();return C.current=false,t!==x.current?n:(y(false),n.ok?(k(null),f(n.value),D(),n):(k(n.error),isHealthPlanSubscriptionUnavailable(n.error)?u("unavailable"):D(),n))},[D]),O=a(async e=>{let t=x.current;S.current+=1,C.current=true,y(true);let n=await i.buyOneBox(petRef,c,e);return C.current=false,t!==x.current?n:(y(false),n.ok?(k(null),F(),n):(k(n.error),isHealthPlanSubscriptionUnavailable(n.error)?u("unavailable"):D(),n))},[i,petRef,c,F,D]);return r(()=>{let e=petRef,t=g?.subscriptionId??"",n=()=>Promise.resolve(err(makeEverfurError("validationFailed",{retryable:false,wireMessage:"the subscription quote is not ready"})));return{phase:d,quote:p,subscription:g,busy:m,error:b,subscribe:t=>R&&c!==null?$(()=>i.create(e,c,t)):n(),changeInterval:r=>R&&t!==""?$(()=>i.changeInterval(e,t,r)):n(),skip:()=>R&&t!==""?$(()=>i.skip(e,t)):n(),cancel:()=>R&&t!==""?$(()=>i.cancel(e,t)):n(),restart:r=>R&&t!==""?$(()=>i.restart(e,t,r)):n(),buyOneBox:e=>R&&c!==null?O(e):n(),refresh:F}},[d,p,g,m,b,R,petRef,c,i,$,O,F])}var Zc=2.20462262;function ed(e,t){return{weightKg:t?e:Math.round(e/Zc*100)/100,pounds:t?Math.round(e*Zc*10)/10:e}}var td=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),nd=globalThis;function rd(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var id=nd[td],od=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),ld=rd(id)?id:nd[td]=od(),ad=ld.landed,sd=ld.noVet,cd=ld.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...ad])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return ad.add(e),()=>{ad.delete(e)}}function setHealthPlanNoVet(petRef,e){if((cd.get(petRef)??false)!==e){e?cd.set(petRef,true):cd.delete(petRef);for(let t of[...sd])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return cd.get(petRef)??false}function onHealthPlanNoVet(e){return sd.add(e),()=>{sd.delete(e)}}function dd(e){let{petRef:petRef,noVet:t,blanksFacts:r,store:i,say:l,line:a}=e,[c,d]=n(()=>healthPlanNoVet(petRef));o(()=>(d(healthPlanNoVet(petRef)),onHealthPlanNoVet((e,t)=>{e===petRef&&d(t)})),[petRef]);let u=t??c,[p,h]=n(null),g=s(false);o(()=>(g.current=false,onHealthPlanRecordsLanded((e,t)=>{e===petRef&&t==="host"&&(g.current=true)})),[petRef]);let f=r?.phase??null,m=r?.requestId??null,y=s({say:l,line:a});return y.current={say:l,line:a},o(()=>{if(m===null)return;let e=true,t=()=>{let t=i.readBlanksMemo(petRef);if(f==="wait"){t.waited!==m&&i.writeBlanksMemo(petRef,{...t,waited:m});return}!e||t.flashed===m||(i.writeBlanksMemo(petRef,{...t,flashed:m}),!(t.waited!==m&&!g.current)&&(g.current=false,h(m),y.current.line!==""&&y.current.say(y.current.line),notifyHealthPlanRecordsLanded(petRef,"plan")))};return i.loadBlanksMemo===void 0?t():i.loadBlanksMemo(petRef).then(t),()=>{e=false}},[f,m,petRef,i]),{noVet:u,flashKey:p}}function ud(e){let{shop:t,ordersOpen:n,subsRepo:r,petRef:petRef,everfurOrders:i,setEverfurOrders:l,say:a}=e,c=s(false),d=s(false),u=s(a);return u.current=a,o(()=>{if(!t||!n)return;let e=true;return c.current=true,Yc(r,petRef,null).then(t=>{e&&(t.ok?l({loaded:true,orders:t.value.orders,next:t.value.nextCursor,loading:false}):(l(e=>({...e,loaded:true,loading:false})),u.current(t.error.displayMessage)))}),()=>{e=false,c.current=false}},[t,n,petRef,r]),{moreOrders:()=>{let e=i.next;e===null||d.current||(d.current=true,l(e=>({...e,loading:true})),Yc(r,petRef,e).then(async e=>{let t=!e.ok&&Jc(e.error)?await Yc(r,petRef,null):null;if(d.current=false,!!c.current){if(t!==null){t.ok?l({loaded:true,orders:t.value.orders,next:t.value.nextCursor,loading:false}):(l(e=>({...e,next:null,loading:false})),u.current(t.error.displayMessage));return}if(e.ok){let t=e.value;l(e=>Gc(e,t))}else l(e=>({...e,loading:false})),u.current(e.error.displayMessage)}}))}}}var pd=.5,hd=90,gd=1,fd=200,md=2600,yd={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)};function bd(e,t,r,i){let{design:l,item:c,petRef:petRef,petName:d,locale:u}=e,{store:p,callHost:h}=r,g=r.clock??yd,f=se(),{runtime:m}=le(),y=useHealthPlanSubscription({petRef:petRef,productId:c.productId,enabled:e.subscriptions!==false&&l.pick.none!==true,...e.subscriptionRepository?{repository:e.subscriptionRepository}:{},...e.lifecycle!==void 0?{lifecycle:e.lifecycle}:{},...e.refreshKey!==void 0?{refreshKey:e.refreshKey}:{}}),[b,k]=n("sub"),[w,v]=n(false),[x,S]=n(()=>/* @__PURE__ */new Set),[T,C]=n(null),[I,H]=n(null),F=s(null),[R,P]=n(null),z=s(null),D=s(g);D.current=g,o(()=>()=>{z.current!==null&&D.current.clearTimeout(z.current)},[]);let $=e=>[e,t.trackingComesByText].filter(e=>e!=="").join(" "),O=e=>{i.dropEmptyToast&&e===""||(P(e),z.current!==null&&g.clearTimeout(z.current),z.current=g.setTimeout(()=>P(null),md))},B=e.checkout==="everfur_stripe"&&i.checkoutReachable,_=useHealthPlanPageRepository(),L=e.pageRepository??_,E=s(null),[A,j]=n(false),W=e.shop??B,[M,N]=n(()=>W?p.readCart(petRef):[]),U=s(M);o(()=>{if(!W||p.loadCart===void 0)return;let e=true;return p.loadCart(petRef).then(()=>{if(!e)return;let t=p.readCart(petRef);U.current.length===0&&t.length>0&&(U.current=t,N(t))}),()=>{e=false}},[W,p,petRef]);let q=a(e=>{let t=e(U.current);U.current=t,p.writeCart(petRef,t),N(t)},[petRef,p]),[V,G]=n([]),K=useHealthPlanSubscriptionRepository(),X=e.subscriptionRepository??K,[Y,J]=n(Wc),[Q,Z]=n(false),[ee,te]=n(false),[ne,re]=n([]),ie=e.others??[],oe=[c,...ie],ae=qc(ne,Y.orders),ce=e.shopOrders??[],de=e=>Kc(e,ae,ce),ue=a(e=>{C(null),G(t=>Mc(t,e))},[]),pe=V.length>0?V[V.length-1]:void 0,ge=Nc(T,I,pe),fe=Uc(I,pe),me=a(()=>{C(null),H(null),G([])},[]),ye=a(()=>{T!==null?C(null):I!==null?H(null):G(e=>e.slice(0,-1))},[T,I]),be=(e=>{switch(e){case"started":return I?.kind==="once"?t.placedHeader:t.startedHeader;case"cart":return t.cartTitle;case"placed":return t.placedHeader;case"orders":return t.orders;case"order":return t.orderTitle(de(pe?.kind==="order"?pe.key:null));case"product":{let e=pe?.kind==="product"?pe.productId:null;return e===null?void 0:oe.find(t=>t.productId===e)?.title}default:return}})(fe),ke=fe==="started"||fe==="cart"||fe==="placed"||fe==="product",we=e.onOverlayChange,ve=s(h);ve.current=h,o(()=>{we!==void 0&&ve.current(we,ge,{close:me,back:ye,...be===void 0?{}:{title:be},...ke?{full:ke}:{}})},[ge,we,me,ye,be,ke]);let xe=y.phase==="ready"?y.quote:null,Se=y.subscription,Te=Se?.status==="active",Ce=(xe?.boxPrice??c.price)!==null,Ie=xe!==null&&(!i.subscribeNeedsPrice||Ce),He=Ie&&xe.offerApplies&&Se===null,Fe=Te?Se.intervalDays:Ie?xe.defaultIntervalDays:0,Re=(t,n)=>formatHealthPlanPriceWith(t,n,{dropZeroCents:false,...e.priceFormat,...u?{locale:u}:{}}),Pe=(t,n)=>formatHealthPlanPriceWith(t,n,{dropZeroCents:true,...e.priceFormat,...u?{locale:u}:{}}),ze=xe?.currency??c.currency,De=xe?.boxPrice??c.price,$e=xe?.oneBox??null,Oe=(e,t=c.title)=>({petName:d,productName:t,first:Re(He&&xe?xe.firstBoxPrice:De,ze),box:Re(De,ze),once:Re($e?.price??De,ze),onceDiscountPercent:$e?.discountPercent??0,intervalDays:e,discountPercent:He&&xe?xe.firstBoxDiscountPercent:0,offer:He}),Be=Oe(Fe),_e=Be.box!==null,Le=Ie?b:"once",Ee=e=>formatHealthPlanDay(e,u),Ae=e=>Ee(e.timeline.find(e=>e.step==="next_box_ships")?.on??e.nextBoxDate),je=(t=c)=>{e.onBuy?h(e.onBuy,t):e.onCheckout&&h(e.onCheckout,[t])},We=e.onBuy!==void 0||e.onCheckout!==void 0,Me=t=>t.ok?(e.onSubscriptionChange&&h(e.onSubscriptionChange,t.value),t.value):(O(t.error.displayMessage),null),Ne=async(e,t,n=c)=>{if(A)return;let i=r.returnUrls();if(i===null)return;let o=`${n.productId}:${e}:${t??""}`;E.current?.sig!==o&&(E.current={sig:o,key:r.mintKey()}),j(true);let l=await L.startCheckout(petRef,{productId:n.productId,purchase:e,...t===null?{}:{intervalDays:t},...i},E.current.key);if(j(false),!l.ok){O(l.error.displayMessage);return}p.rememberCheckout(petRef,l.value.checkoutId),r.openUrl(l.value.url)},Ue=e=>oe.find(t=>t.productId===e),qe=e=>M.find(t=>t.productId===e),Ve=e=>e===c.productId,Ge=e=>Ve(e.productId)&&Ie&&!Te&&e.mode==="sub",Ke=e=>Ve(e.productId)?Ge(e)?He&&xe?xe.firstBoxPrice:De:$e?.price??De:Ue(e.productId)?.price??null,Xe=M.filter(e=>Ue(e.productId)!==void 0),Ye=Xe.reduce((e,t)=>e+t.qty,0),Je=Qc(Xe.reduce((e,t)=>e+(Ke(t)??0)*t.qty,0)),Qe=Xe.find(Ge)??null,Ze=B&&!Q&&L.startCartCheckout!==void 0,et=!B&&e.onCheckoutLines!==void 0,tt=Ze||et,nt=(e,t)=>{let n=/^[^\d]*(\d+(?:\.\d{1,2})?)[^\d]*$/.exec(e.replace(/,/g,""));return(n?Re(Number(n[1]),t??ze):null)??e},rt=e=>{let n=Ue(e.productId)??c,r=Ge(e),o=Ve(e.productId),a=o||!i.linesFromExtras?void 0:l.extras?.items.find(t=>t.productId===e.productId),s=o?Oe(e.every,n.title):{...Oe(0,n.title),offer:false};return{key:e.productId,name:n.title,imageUrl:n.imageUrl??a?.imageUrl??null,quantity:e.qty,subscription:r,price:Re(Ke(e),o?ze:n.currency),was:o?r?He?s.box:null:$e!==null&&De!==null&&$e.price<De?s.box:null:a?.was?nt(a.was,n.currency):null,note:o?r?t.cartSubLine(s):t.cartOnceLine(s,Te):null,...i.linesFromExtras?{tag:a?.tag??null}:{},modes:o&&Ie&&!Te?{label:t.cartModeLabel(n.title),sub:{label:t.cartModeSubscribe(s),price:s.first},once:{label:t.cartModeOnce(s),price:s.once}}:null,every:r&&xe!==null?{options:xe.intervalOptions,selected:e.every}:null,maxQuantity:tt&&!r?5:1,lp:s}},it=Xe.map(rt),ot=Qe===null?null:Oe(Qe.every),lt=(e,n,r=1,i=false)=>{if(qe(e.productId)){ue({kind:"cart"});return}let o=Ve(e.productId)&&Ie&&!Te&&n==="sub",l=o?1:Math.max(1,Math.min(tt?5:1,r));q(t=>[...t,{productId:e.productId,mode:o?"sub":"once",every:xe?.defaultIntervalDays??0,qty:l}]),i||O(t.addedToCart(Ve(e.productId)?Be:{...Oe(0,e.title),offer:false},o))},at=()=>G(e=>{let t=e.findIndex(e=>e.kind==="cart");return t>=0?e.slice(0,t+1):[...e,{kind:"cart"}]}),st=(e,t)=>q(n=>Xc(n,e,t)),ct=(e,t)=>st(e,e=>({...e,qty:Math.max(1,Math.min(tt&&!Ge(e)?5:1,e.qty+t))})),dt=e=>{st(e,()=>null),O(t.removedFromCart(Ue(e)?.title??""))},ut=Ze&&Qe!==null&&Xe.length>1,pt=ut?Xe.filter(e=>!Ge(e)):Xe,ht=Qc(pt.reduce((e,t)=>e+(Ke(t)??0)*t.qty,0)),gt=pt.find(Ge)??null,ft=gt===null?null:Oe(gt.every),mt=Xe.length>0&&Xe.every(e=>Ke(e)!==null)&&(Xe.length===1&&(Xe[0]?.qty??0)===1?true:Ze?pt.length>0&&pt.length<=10:!B&&(e.onCheckout!==void 0||et)&&Xe.every(e=>!Ge(e))),yt=async e=>{if(A||L.startCartCheckout===void 0)return;let n=r.returnUrls();if(n===null)return;let i=`cart:${e.map(e=>`${e.productId}:${e.qty}:${Ge(e)?e.every:""}`).join("|")}`;E.current?.sig!==i&&(E.current={sig:i,key:r.mintKey()}),j(true);let o=await L.startCartCheckout(petRef,{items:e.map(e=>{let t=Ge(e);return{productId:e.productId,purchase:t?"subscription":"one_box",...t?{intervalDays:e.every}:{},quantity:t?1:e.qty}}),...n},E.current.key);if(j(false),!o.ok){let e=healthPlanCheckoutRefusal(o.error);if(e==="cart_disabled"){Z(true),C(null),O(t.cartOneAtATime===""?o.error.displayMessage:t.cartOneAtATime);return}if(e==="cart_has_subscription"){C(null),O(t.cartSubscriptionApart===""?o.error.displayMessage:t.cartSubscriptionApart);return}O(o.error.displayMessage);return}p.rememberCheckout(petRef,o.value.checkoutId),r.openUrl(o.value.url)},bt=async()=>{F.current===null&&(F.current=r.mintKey());let t=await y.buyOneBox(F.current);return t.ok?(F.current=null,e.onOneBoxOrder&&h(e.onOneBoxOrder,t.value),t.value):(O(t.error.displayMessage),null)},kt=async()=>{if(!mt)return;if(B&&Ze&&!(pt.length===1&&(pt[0]?.qty??0)===1)){pt.map(e=>Ue(e.productId)).filter(e=>e!==void 0);he(f,petRef,{count:pt.reduce((e,t)=>e+t.qty,0),subtotal:ht,currency:ze}),await yt(pt);return}if(et&&!(Xe.length===1&&(Xe[0]?.qty??0)===1)){let t=Xe.flatMap(e=>{let t=Ue(e.productId);return t===void 0?[]:[{item:t,quantity:e.qty}]});he(f,petRef,{items:t.map(e=>e.item),count:t.reduce((e,t)=>e+t.quantity,0),subtotal:Je,currency:ze}),qt(Xe.map(e=>e.productId)),C(null),G([]),e.onCheckoutLines&&h(e.onCheckoutLines,t);return}let t=pt.length===1?pt[0]:Xe.length===1?Xe[0]:void 0;if(t===void 0){e.onCheckout&&h(e.onCheckout,Xe.map(e=>Ue(e.productId)).filter(e=>e!==void 0));return}let n=Ue(t.productId)??c,r=Ge(t);if(he(f,petRef,{count:1,subtotal:Ke(t),currency:Ve(t.productId)?ze:n.currency}),B){await Ne(r?"subscription":"one_box",r?t.every:null,n);return}if(r){let e=Me(await y.subscribe(t.every));if(e===null)return;qt([e.productId]),C(null),G([]),H({kind:"sub",sub:e});return}if(!Ve(t.productId)||$e===null){C(null),et&&(qt([t.productId]),G([])),je(n);return}let i=await bt();i!==null&&(qt([i.productId]),Ut([i]))},wt=()=>{if(he(f,petRef,{count:1,subtotal:c.price,currency:c.price===null?null:c.currency}),!Ie){B?Ne("one_box",null):je();return}F.current=null,C({kind:"checkout",mode:Le,every:xe.defaultIntervalDays})},vt=e=>{he(f,petRef,{count:1,subtotal:e.price,currency:e.price===null?null:e.currency}),B?Ne("one_box",null,e):je(e)},xt=async()=>{if(T?.kind!=="checkout")return;let e=T.mode==="sub";if(B){await Ne(e?"subscription":"one_box",e?T.every:null);return}if(!e){if($e===null){C(null),je();return}let e=await bt();if(e===null)return;C(null),Ut([e]);return}let t=Me(await y.subscribe(T.every));t!==null&&(C(null),H({kind:"sub",sub:t}))},St=e=>{Se===null||e===Se.intervalDays||y.changeInterval(e).then(Me)},Tt=async()=>{let e=Me(await y.skip());e!==null&&O(t.skipped(Oe(e.intervalDays),Ae(e)))},Ct=async()=>{let e=Oe(Se?.intervalDays??Fe);Me(await y.cancel())!==null&&(C(null),k("sub"),O(t.cancelled(e)))},It=()=>{C(null),pe?.kind!=="orders"&&ue({kind:"orders"})},Ht=t=>{let n=!w;v(n),e.onAddToVisit&&h(e.onAddToVisit,n,t)},Ft=(t,n)=>{let r=!n;S(e=>{let n=new Set(e);return r?n.add(t):n.delete(t),n}),e.onExtra&&h(e.onExtra,t,r)},Rt=(e,t,n)=>{if(t!==void 0){W?lt(t,"once"):vt(t);return}Ft(e,n)},Pt=V.some(e=>e.kind==="orders"||e.kind==="order"),{moreOrders:zt}=ud({shop:W,ordersOpen:Pt,subsRepo:X,petRef:petRef,everfurOrders:Y,setEverfurOrders:J,say:O}),Dt=e.weightKnown!==false||ee,$t=e.weightUnit==="kg",[Ot,Bt]=n(""),[_t,Lt]=n(""),[Et,At]=n(false),jt=()=>{Lt(""),C({kind:"weight"})},Wt=async()=>{let n=Math.round(Number.parseFloat(Ot.replace(",","."))*10)/10;if(!($t?n>=pd&&n<=hd:n>=gd&&n<=fd)){Lt($t?t.weightErrorKg:t.weightError);return}let{weightKg:r,pounds:i}=ed(n,$t);At(true);let o=e.onSaveWeight?await e.onSaveWeight(r,i):await m.updatePet(petRef,{weightKg:r});if(At(false),!o.ok){Lt(o.error.displayMessage);return}Lt(""),te(true),C(null),O($t?t.weightSavedKg(String(n)):t.weightSaved(String(i))),e.onWeightSaved&&h(e.onWeightSaved,r)},{noVet:Mt,flashKey:Nt}=dd({petRef:petRef,noVet:e.noVet,blanksFacts:e.blanksFacts,store:p,say:O,line:t.recordsLanded}),Ut=e=>{let t=e[0];if(t!==void 0){if(!W){H({kind:"once",order:t});return}re(t=>Vc(t,e)),C(null),G([{kind:"placed",orders:e}])}},qt=e=>{let t=new Set(e.filter(e=>e!==null));t.size>0&&q(e=>e.filter(e=>!t.has(e.productId)))};return{sub:y,copy:t,everfur:B,shop:W,partnerBuys:We,redirecting:A,pages:L,quote:xe,subscription:Se,active:Te,canSubscribe:Ie,offer:He,every:Fe,currency:ze,boxPrice:De,oneBox:$e,pr:Be,priced:_e,mode:b,buyMode:Le,fmt:Re,fmtWhole:Pe,prices:Oe,day:Ee,nextBoxDay:Ae,withTracking:$,sheet:T,started:I,screens:V,top:pe,overlay:ge,under:fe,title:be,full:ke,toast:R,added:w,extras:x,planItems:oe,cart:M,lines:Xe,lineCount:Ye,cartTotal:Je,subLine:Qe,cartOn:Ze,hostLines:et,boxesOn:tt,wasOf:nt,views:it,renewPrices:ot,apart:ut,batch:pt,batchTotal:ht,batchSub:gt,batchRenew:ft,cartReady:mt,itemOf:Ue,inCart:qe,isPick:Ve,lineSub:Ge,unitOf:Ke,lineView:rt,everfurOrders:Y,ownOrders:ae,orderNumber:de,weightKnown:Dt,kg:$t,weightInput:Ot,weightError:_t,savingWeight:Et,noVet:Mt,flashKey:Nt,say:O,setMode:k,openSheet:C,closeSheet:()=>C(null),push:ue,replaceScreens:G,closeStarted:()=>H(null),closeOverlays:me,back:ye,toggleAdded:Ht,toggleExtra:Ft,pressExtra:Rt,buyOnce:je,press:wt,pressOther:vt,confirmCheckout:xt,changeInterval:St,skip:Tt,cancel:Ct,seeOrdersFromManage:It,addToCart:lt,showCart:at,editLine:st,stepQuantity:ct,removeLine:dt,placeCart:kt,moreOrders:zt,openWeight:jt,setWeightInput:Bt,saveWeight:Wt,returnHandlers:{onPaid:t=>{let n=t.subscription,r=t.orders??(t.order===null?[]:[t.order]);if(n!==null)e.onSubscriptionChange&&h(e.onSubscriptionChange,n),i.closeOnReturn&&(C(null),G([])),H({kind:"sub",sub:n});else if(r.length>0){for(let t of r)e.onOneBoxOrder&&h(e.onOneBoxOrder,t);Ut(r)}qt([n?.productId??null,...r.map(e=>e.productId)]),y.refresh()},onFailed:()=>{C(null),W&&(i.closeOnReturn&&H(null),G([{kind:"cart"}])),t.checkoutFailed!==""&&O(t.checkoutFailed)},onCancel:()=>j(false),onTimeout:()=>{W&&(C(null),i.closeOnReturn&&H(null),G([{kind:"orders"}]))},onError:e=>O(e.displayMessage)}}}function kd(e,petRef){let[t,r]=n(null);return o(()=>{if(e===void 0)return;let t=true;return e.getRecord(petRef).then(e=>{t&&r(e.ok?e.value.withheld!==true&&e.value.is_empty===true:null)}).catch(()=>{}),()=>{t=false}},[e,petRef]),t}var wd="Close",vd=/* @__PURE__ */Object.freeze({action:e=>e.possessive===null?null:`See ${e.possessive} Health Plan`,ask:"What does it mean?",askPrompt:(e,t)=>e.risk?.lead?`${e.risk.lead} ${t}`:`${e.title}: ${t}`,close:e=>e.possessive===null?null:`Close ${e.possessive} focus`,resultsKicker:e=>e.possessive===null?null:`${xd(e.possessive)} results`,resultsClose:e=>e.possessive===null?null:`Close ${e.possessive} results`,resultsTopRisk:"Top risk"});function xd(e){return e.charAt(0).toUpperCase()+e.slice(1)}function healthPlanPossessive(e){let t=typeof e.sex=="string"?e.sex.trim().toLowerCase():null;if(t==="female")return"her";if(t==="male")return"his";let n=typeof e.name=="string"?e.name.trim():"";return n!==""?`${n}'s`:null}function healthPlanTopCard(e,t={}){let n=e?.page?.focus;if(e===null||n===void 0||n.title.trim()===""||n.kicker.trim()==="")return;let r={...vd,...t.copy},i={pet:e.pet,possessive:healthPlanPossessive(e.pet)},o=n.sources?.find(e=>e.label.trim()!=="")?.label,l=t.onOpenPlan,a=l===void 0?null:r.action(i),s=r.close(i),c=r.ask.trim(),d=t.results!==void 0&&n.report!==void 0?t.results:void 0;if(d!==void 0){let e=r.resultsKicker(i)?.trim()||n.kicker,s=r.resultsClose(i),u=d.onTopRisk??l,p={key:"top-risk",label:r.resultsTopRisk,title:n.title,...n.risk?.lead?{line:n.risk.lead}:{},tone:"risk",...u===void 0?{}:{onPress:u}};return{kicker:e,...o===void 0?{}:{badge:o},title:n.title,results:[p,...d.rows??[]],...a===null||a.trim()===""||l===void 0?{}:{action:{label:a,onPress:l}},...c===""?{}:{ask:{label:c,prompt:r.askPrompt(n,c)}},closeLabel:s===null||s.trim()===""?wd:s,pill:e,...t.renderIcon===void 0?{}:{renderIcon:t.renderIcon}}}return{kicker:n.kicker,...o===void 0?{}:{badge:o},title:n.title,...n.risk?.lead?{lead:n.risk.lead}:{},...n.risk?.body?{body:n.risk.body}:{},...a===null||a.trim()===""||l===void 0?{}:{action:{label:a,onPress:l}},...c===""?{}:{ask:{label:c,prompt:r.askPrompt(n,c)}},closeLabel:s===null||s.trim()===""?wd:s,pill:n.kicker,...t.renderIcon===void 0?{}:{renderIcon:t.renderIcon}}}var Sd=/* @__PURE__ */Object.freeze({...jc,firstBoxShips:"Her first box ships.",placedShips:"It ships.",trackingComesByText:"",trackingByText:"",moreOrders:"Load more",checkoutFailed:"That didn't go through. Please try again.",back:"Back"}),Td=e=>e===""?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function healthPlanPetCopy(e){let t=e.name?.trim()??"",n=healthPlanPossessive(e)??"your pet's",r=Td(n),i=e.sex==="female"?"her":e.sex==="male"?"him":t!==""?t:"your pet",o=jc,l=healthPlanFocusCopyFor({name:e.name,sex:e.sex});return{jumpKicker:(e,t)=>t?`In ${n} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${n} first box`:o.jumpKicker(e,false),firstBoxShips:e.trackingTexts===true?`${r} first box ships. Tracking comes by text.`:`${r} first box ships.`,placedShips:o.placedShips,trackingComesByText:e.trackingTexts===true?o.trackingComesByText:"",trackingByText:e.trackingTexts===true?o.trackingByText:"",refill:`A text 3 days before ${n} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${r} next box ships, ${e.box??""}.`,startedDone:`Back to ${n} plan`,skipped:(e,t)=>t===null?"Skipped.":`Skipped. ${r} next box ships ${t}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${n} plan anytime.`,seeOrders:`See ${n} orders`,cartOnceLine:(e,t)=>t?`An extra box. ${r} plan keeps shipping.`:o.cartOnceLine(e,false),herSubscription:`${r} subscription`,ordersHeading:e=>e?"Orders":`${r} orders`,addWeightTitle:`Add ${n} weight to size ${n} dose`,addWeightBody:`From a home scale or ${n} last vet visit.`,connectRecordsTitle:`Connect ${n} vet records`,connectRecordsBody:`${r} weight, visits and labs make ${n} plan sharper.`,weightKicker:`${r} weight`,weightBody:`From a home scale or ${n} last vet visit. ${r} plan uses it to size ${n} dose.`,weightField:`${r} weight`,weightError:`Enter ${n} weight in pounds, like 14.1.`,weightSave:`Save ${n} weight`,weightSaved:e=>`Saved: ${e} lb. ${r} dose is sized for ${i}.`,weightErrorKg:l.weightErrorKg,weightSavedKg:l.weightSavedKg,signalsFit:l.signalsFit,noPick:l.noPick,saveForCheckup:l.saveForCheckup,savedForCheckup:l.savedForCheckup,blanksLabel:l.blanksLabel,blanksFilledKicker:l.blanksFilledKicker,blanksWeight:l.blanksWeight,blanksWeightSource:l.blanksWeightSource,blanksDoseSource:l.blanksDoseSource,blanksShots:l.blanksShots,blanksShotsSource:l.blanksShotsSource,recordsLanded:l.recordsLanded}}var Cd="everfur.healthPlan.blanks",Id=/* @__PURE__ */Object.freeze({waited:null,flashed:null}),Hd=/* @__PURE__ */new Map,Fd=/* @__PURE__ */new Map,Rd=petRef=>`${Cd}:${petRef}`;function Pd(e){if(e===null)return Id;try{let t=JSON.parse(e);if(t===null||typeof t!="object")return Id;let n=t;return{waited:typeof n.waited=="string"?n.waited:null,flashed:typeof n.flashed=="string"?n.flashed:null}}catch{return Id}}function zd(e,petRef){let t=Hd.get(petRef);if(t!==void 0)return Promise.resolve(t);let n=Fd.get(petRef);return n===void 0&&(n=(async()=>{let t=Id;try{t=e?Pd(await e.getItem(Rd(petRef))):Id}catch{}let n=Hd.get(petRef)??t;return Hd.set(petRef,n),n})(),Fd.set(petRef,n)),n}function Dd(petRef){return Hd.get(petRef)??Id}function $d(e,petRef,t){if(Hd.set(petRef,t),!!e)try{e.setItem(Rd(petRef),JSON.stringify(t)).catch(()=>{})}catch{}}var Od="everfur_checkout",Bd="everfur_checkout_cancel",_d="{CHECKOUT_SESSION_ID}",Ld=2e3,Ed=30;function Ad(e){return typeof e!="string"?false:/^https:\/\/[^/?#\s]+[^\s]*$/i.test(e.trim())}var jd=new RegExp(`([?&])(?:${Od}|${Bd})=[^&#]*&?`,"g");function Wd(e,t,n){let r=e.indexOf("#"),i=r===-1?"":e.slice(r),o=r===-1?e:e.slice(0,r);o=o.replace(jd,"$1").replace(/[?&]$/,"");let l=o.includes("?")?"&":"?";return`${o}${l}${t}=${n}${i}`}function Md(e,t){let n=e=>e.split(/[?#]/)[0]?.replace(/\/+$/,"").toLowerCase()??"";if(n(e)!==n(t))return null;let r=e.split("#")[0]?.split("?")[1]??"",i=/* @__PURE__ */new Map;for(let e of r.split("&")){if(e==="")continue;let t=e.indexOf("="),n=t===-1?e:e.slice(0,t),r=t===-1?"":e.slice(t+1);try{r=decodeURIComponent(r)}catch{}i.set(n,r)}if(i.has(Bd))return{kind:"cancel"};let o=i.get(Od);return o===void 0?null:{kind:"return",sessionId:o===""||o===_d?null:o}}function Nd(){let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`tap-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`}var Ud="everfur.healthPlan.cart",qd="everfur.healthPlan.checkout",Vd=/* @__PURE__ */new Map,Gd=/* @__PURE__ */new Map,Kd=/* @__PURE__ */new Set,Xd=/* @__PURE__ */new Set,Yd=/* @__PURE__ */new WeakMap,Jd=Promise.resolve();function Qd(e){if(e===null)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>{if(e===null||typeof e!="object")return[];let t=e,n=t.productId,r=t.mode,i=t.every,o=t.qty;return typeof n!="string"||r!=="sub"&&r!=="once"||typeof i!="number"||typeof o!="number"?[]:[{productId:n,mode:r,every:i,qty:Math.max(1,Math.min(r==="sub"?1:5,Math.round(o)))}]}):[]}catch{return[]}}function Zd(e,t,n){if(e)try{(n===null?e.removeItem(t):e.setItem(t,n)).catch(()=>{})}catch{}}function eu(e,petRef){if(!e)return Jd;let t=Yd.get(e);t===void 0&&(t=/* @__PURE__ */new Map,Yd.set(e,t));let n=t.get(petRef);return n===void 0&&(n=(async()=>{let t=[],n=null;try{let[r,i]=await Promise.all([e.getItem(`${Ud}:${petRef}`),e.getItem(`${qd}:${petRef}`)]);t=Qd(r),n=typeof i=="string"&&i!==""?i:null}catch{}!Xd.has(petRef)&&t.length>0&&Gd.set(petRef,t),!Kd.has(petRef)&&n!==null&&Vd.set(petRef,n)})(),t.set(petRef,n)),n}function tu(petRef,e,t){Kd.add(petRef),Vd.set(petRef,e),Zd(t,`${qd}:${petRef}`,e)}function nu(petRef){return Vd.get(petRef)??null}function ru(petRef,e){Kd.add(petRef),Vd.delete(petRef),Zd(e,`${qd}:${petRef}`,null)}function iu(petRef){return Gd.get(petRef)??[]}function ou(petRef,e,t){Xd.add(petRef),e.length===0?Gd.delete(petRef):Gd.set(petRef,e),Zd(t,`${Ud}:${petRef}`,e.length===0?null:JSON.stringify(e))}function lu(e){return{readCart:iu,writeCart:(petRef,t)=>ou(petRef,t,e),loadCart:petRef=>eu(e,petRef),rememberCheckout:(petRef,t)=>tu(petRef,t,e),readBlanksMemo:Dd,writeBlanksMemo:(petRef,t)=>$d(e,petRef,t),loadBlanksMemo:petRef=>zd(e,petRef)}}var au=/* @__PURE__ */Object.freeze({dropEmptyToast:true,subscribeNeedsPrice:false,closeOnReturn:true,linesFromExtras:false});var su=/* @__PURE__ */new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review"]),cu=/vaccin|rabies|dhpp|booster|bordetella|lepto|lyme|parvo|distemper/i,du=2.20462262;function uu(e){if(e==null||e.length===0)return null;let t=Date.parse(/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e);return Number.isNaN(t)?null:t}function pu(e,t){return e===null||!Number.isFinite(e)||e<=0||t===null?null:/^\s*kg|kilo/i.test(t)?e:/^\s*(lb|lbs|pound)/i.test(t)?e/du:null}function healthPlanRecordsWeightKg(e){if(e===null||e.isEmpty||e.withheld)return null;let t=[];for(let n of e.entitySeries)if(n.key.startsWith("body_weight"))for(let e of n.points){if(e.origin==="owner_reported")continue;let n=uu(e.at),r=e.display?.replace(/^[\d.,\s]+/,"")??null,i=pu(e.value,r);n!==null&&i!==null&&t.push({at:n,kg:i})}for(let n of e.entities){if(n.category!=="body_weight"||n.origin==="owner_reported")continue;let e=uu(n.observedAt),r=pu(n.value===null?null:Number.parseFloat(n.value),n.unit);e!==null&&r!==null&&t.push({at:e,kg:r})}return t.length===0?null:(t.sort((e,t)=>t.at-e.at),t[0]?.kg??null)}function healthPlanNextShotsAt(e,t){if(e===null||e.isEmpty||e.withheld)return null;let n=null;for(let r of e.forwardLooking){if(!cu.test(r.title))continue;let e=uu(r.dueAt);e===null||e<t||(n===null||e<n)&&(n=e)}return n}function hu(e){return e.filter(e=>e.source==="clinic_request").slice().sort((e,t)=>(uu(t.createdAt)??0)-(uu(e.createdAt)??0))[0]}function gu(e,t){let n=hu(e.requests);if(n===void 0||n.status!=="published"||e.record===null||e.record.withheld)return false;let r=Math.floor(t/864e5)*864e5;return healthPlanRecordsWeightKg(e.record)===null&&healthPlanNextShotsAt(e.record,r)===null}function healthPlanBlanksFacts(e,t){let n=hu(e.requests);if(n===void 0)return null;let r=n.clinicName?.trim()?n.clinicName.trim():null;if(su.has(n.status))return{phase:"wait",requestId:String(n.id),clinicName:r,weightKg:null,nextShotsAt:null};if(n.status!=="published"||e.record===null||e.record.isEmpty||e.record.withheld)return null;let i=Math.floor(t/864e5)*864e5,o=healthPlanRecordsWeightKg(e.record),l=healthPlanNextShotsAt(e.record,i);return o===null&&l===null?null:{phase:"filled",requestId:String(n.id),clinicName:r,weightKg:o,nextShotsAt:l}}var fu=3600*1e3;function mu(e,t=true){let[r,i]=n(()=>Date.now()),l=s(true);return o(()=>{if(l.current){l.current=false;return}t&&i(Date.now())},[e,t]),o(()=>{if(!t)return;let e=setInterval(()=>i(Date.now()),fu),n=()=>{document.visibilityState==="visible"&&i(Date.now())},r=typeof document<"u"&&typeof document.addEventListener=="function"?document:null;return r?.addEventListener("visibilitychange",n),()=>{clearInterval(e),r?.removeEventListener("visibilitychange",n)}},[e,t]),r}function RecordsProbe(e){let{status:t,requests:n,record:i,refresh:l}=useEverfurRecords({petRef:e.petRef}),{onRead:a,petRef:petRef}=e,c=mu(),d=r(()=>healthPlanBlanksFacts({requests:n,record:i},c),[n,i,c]),u=r(()=>gu({requests:n,record:i},c),[n,i,c]);o(()=>{a({missing:t==="empty"||u,blanks:d})},[t,u,d,a]);let p=s(l);return p.current=l,o(()=>onHealthPlanRecordsLanded((e,t)=>{e===petRef&&t==="host"&&p.current()}),[petRef]),null}var yu=/* @__PURE__ */new Set;function bu(e){let{enabled:t,petRef:petRef,pages:n,returnUrl:r,lifecycle:i,kv:l}=e,a=s(e);a.current=e,o(()=>{if(!t||r===null)return;let e=true,o=false,s=0,c=null,d=async(t,r,i)=>{let u=await n.getCheckout(petRef,t);if(!(!e||i!==s)){if(u.ok&&u.value.status==="paid"){o=false,ru(petRef,l),a.current.onPaid(u.value);return}if(u.ok&&(u.value.status==="failed"||u.value.status==="expired")){o=false,ru(petRef,l),a.current.onFailed();return}if(!u.ok&&!u.error.retryable){o=false,ru(petRef,l),a.current.onError(u.error);return}if(r<=1){o=false,ru(petRef,l),a.current.onTimeout();return}c=setTimeout(()=>{d(t,r-1,i)},Ld)}},u=e=>{o||(o=true,d(e,Ed,s))},p=eu(l,petRef),h=t=>{let n=Md(t,r);if(n!==null){if(n.kind==="cancel"){s+=1,o=false,c!==null&&clearTimeout(c),c=null,ru(petRef,l),a.current.onCancel();return}p.then(()=>{if(!e)return;let t=nu(petRef)??n.sessionId;t!==null&&u(t)})}},g=()=>{p.then(()=>{if(!e)return;let t=nu(petRef);t!==null&&u(t)})},f=I.addEventListener("url",e=>h(e.url));I.getInitialURL().then(t=>{!e||t===null||t===void 0||yu.has(t)||Md(t,r)!==null&&(yu.add(t),h(t))}).catch(()=>{}).then(g);let m;if(i)m=i.onForeground(g);else{let e=H.addEventListener("change",e=>{e==="active"&&g()});m=()=>e.remove()}return()=>{e=false,c!==null&&clearTimeout(c),f.remove(),m()}},[t,petRef,n,r,i,l])}var ku=24,wu=16,vu=.8,xu=e=>Math.round(e*wu);function Su(e,t,n,r,i,o){let l=e-n/2,a=t-r/2,s=Math.round(l),c=Math.round(a);return{position:"absolute",left:s,top:c,width:n,height:r,transform:[{translateX:l-s},{translateY:a-c},{rotate:`${Math.atan2(o,i)*180/Math.PI}deg`},{scale:1/wu}]}}function Tu(e,t,n){for(let r of e.strokes){let e=r.width*t,i=r.points,o=i.length/2,l=r.closed?o:o-1;for(let a=0;a<l;a+=1){let l=(a+1)%o,s=(i[a*2]??0)*t,c=(i[a*2+1]??0)*t,d=(i[l*2]??0)*t-s,u=(i[l*2+1]??0)*t-c,p=Math.hypot(d,u);if(p===0&&!(o===2&&r.cap))continue;let h=p===0?1:d/p,g=p===0?0:u/p,f=r.closed||a>0||r.cap?e/2:0,m=r.closed||l!==o-1||r.cap?e/2:0,y=(p+m-f)/2;n.push({paint:"backgroundColor",style:{...Su(s+h*y,c+g*y,xu(p+f+m),xu(e),h,g),borderTopLeftRadius:f>0?xu(e)/2:0,borderBottomLeftRadius:f>0?xu(e)/2:0,borderTopRightRadius:m>0?xu(e)/2:0,borderBottomRightRadius:m>0?xu(e)/2:0,...r.opacity===void 0?{}:{opacity:r.opacity}}})}}}function Cu(e,t,n){for(let r of e.boxes){let e=(r.w+r.width)*t,i=(r.h+r.width)*t;n.push({paint:"borderColor",style:{...Su((r.x-r.width/2)*t+e/2,(r.y-r.width/2)*t+i/2,xu(e),xu(i),1,0),borderWidth:xu(r.width*t),borderRadius:(r.radius+r.width/2)*t*wu,...r.opacity===void 0?{}:{opacity:r.opacity}}})}}function Iu(e,t,n){for(let r of e.triangles){let e=[0,1,2].map(e=>[(r[e*2]??0)*t,(r[e*2+1]??0)*t]),i=0,o=-1;for(let t=0;t<3;t+=1){let n=e[t]??[0,0],r=e[(t+1)%3]??[0,0],l=Math.hypot(r[0]-n[0],r[1]-n[1]);l>o&&(o=l,i=t)}if(o<=0)continue;let l=e[i]??[0,0],a=e[(i+1)%3]??[0,0],s=e[(i+2)%3]??[0,0],c=(a[0]-l[0])/o,d=(a[1]-l[1])/o,u=(s[0]-l[0])*c+(s[1]-l[1])*d,p=(s[0]-l[0])*-d+(s[1]-l[1])*c,h=Math.abs(p),g=p<0,f=g?-h/2:h/2,m=xu(u),y=xu(o)-m,b=xu(h);n.push({paint:g?"borderBottomColor":"borderTopColor",style:{...Su(l[0]+c*(o/2)-d*f,l[1]+d*(o/2)+c*f,m+y,b,c,d),width:0,height:0,borderLeftWidth:m,borderRightWidth:y,borderLeftColor:"transparent",borderRightColor:"transparent",...g?{borderBottomWidth:b}:{borderTopWidth:b}}})}for(let r of e.seams){let e=(r[0]??0)*t,i=(r[1]??0)*t,o=(r[2]??0)*t-e,l=(r[3]??0)*t-i,a=Math.hypot(o,l),s=vu*(r[4]??0),c=vu*(r[5]??0),d=a-s-c;if(a===0||d<=0)continue;let u=s+d/2;n.push({paint:"backgroundColor",style:Su(e+o/a*u,i+l/a*u,xu(d),xu(vu),o/a,l/a)})}}var Hu=/* @__PURE__ */new Map;function Fu(e,t){let n=`${e}:${t}`,r=Hu.get(n);if(r!==void 0)return r;let i=Ds[e],o=[],l=t/ku;return Cu(i,l,o),Tu(i,l,o),Iu(i,l,o),Hu.set(n,o),o}function FocusIcon({name:e,size:t=18,color:n}){let r=Ds[e]===void 0?[]:Fu(e,t);/* @__PURE__ */
|
|
172
|
+
return P(f,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:`health-plan-icon-${e}`,children:/* @__PURE__ */P(f,{style:{width:t,height:t},children:r.map((e,t)=>/* @__PURE__ */P(f,{style:[e.style,{[e.paint]:n}]},t))})})}function Ru(e){let t=e.color;if(e.brightness==="dark")return{ink:t.text.primary,ink2:t.text.secondary,ink3:t.text.muted,paper:t.surfaceSubtle,tile:t.badgeBgNeutral,line:t.brandBorder,card:t.surface,teal:t.brandInk,cyan:t.brandSofter,yellow:t.accent,riskDot:t.errorRed,riskBg:t.badgeBgCritical,riskInk:t.text.primary,clearDot:t.success,clearBg:t.badgeBgPositive,clearInk:t.text.primary,star:t.accent,button:t.primary,onButton:t.onPrimary,jump:t.surfaceSubtle,onJump:t.text.primary,jumpSmall:t.accent,tints:{y:t.badgeBgCaution,c:t.brandSofter,g:t.badgeBgPositive,r:t.badgeBgCritical},scrim:"rgba(0,0,0,0.6)"};let n=ms(e);return{ink:n.ink,ink2:n.ink2,ink3:n.ink3,paper:Ls(e).paper??n.paper,tile:n.tile,line:n.line,card:n.card,teal:t.brandInk,cyan:t.brandSofter,yellow:n.accent,riskDot:n.riskDot,riskBg:n.riskBg,riskInk:n.riskInk,clearDot:n.clearDot,clearBg:n.clearBg,clearInk:n.clearInk,star:n.watchDot,button:n.primary,onButton:n.onPrimary,jump:n.ink,onJump:n.card,jumpSmall:n.accent,tints:{y:"#FFE7A1",c:"#C8F4F8",g:"#DDEFC4",r:"#FFD8D6"},scrim:"rgba(38,37,35,0.45)"}}function Pu(e){let t=Ru(e),{space:n}=e,r=(t,n,r="regular",i=1.35)=>({...face(e,r),fontSize:t,lineHeight:Math.round(t*i),color:n}),i=g.create({shrink:{flexShrink:1,minWidth:0},toolLabel:r(14,t.ink,"bold"),mini:{...r(10.5,t.ink3,"mono"),textTransform:"uppercase",letterSpacing:.9},h3:{...r(19,t.ink,"bold",1.2),marginTop:n.sm},bold:face(e,"bold"),noPick:{...r(15,t.ink2,"regular",1.45),marginTop:14},small:r(13,t.ink3,"regular",1.35),smallInk:r(13,t.ink2,"regular",1.35),buttonGhost:{minHeight:48,borderRadius:999,alignItems:"center",justifyContent:"center",paddingHorizontal:n.lg,borderWidth:2,borderColor:t.ink,marginTop:n.sm},buttonGhostText:{...r(15,t.ink,"bold",1.2),textAlign:"center"},disabled:{opacity:.5},fine:{...r(13,t.ink3,"regular",1.4),marginTop:n.sm},scrim:{flex:1,justifyContent:"flex-end",backgroundColor:t.scrim},sheet:{maxHeight:"92%",paddingHorizontal:n.lg,paddingTop:n.sm,paddingBottom:n.xl,borderTopLeftRadius:22,borderTopRightRadius:22,backgroundColor:t.card},sheetGrab:{alignSelf:"center",width:40,height:4,borderRadius:2,backgroundColor:t.line,marginBottom:n.sm},sheetTop:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},close:{width:44,height:44,alignItems:"center",justifyContent:"center"},screen:{paddingHorizontal:n.lg,paddingBottom:n.xl,gap:n.sm},back:{flexDirection:"row",alignItems:"center",gap:n.xs,minHeight:44,alignSelf:"flex-start"}}),o=Ks(e);return{...i,palette:t,X:o,D:Zs(o),ds:Ps(e,o.roles)}}var zu=createContext(null);function HealthPlanRnKitScope(e){/* @__PURE__ */
|
|
173
|
+
return P(zu.Provider,{value:e.kit,children:e.children})}var Du={...Sd,...healthPlanPetCopy({name:null,sex:null,trackingTexts:false})},$u=/* @__PURE__ */new WeakMap;function Ou(e){let t=$u.get(e);return t===void 0&&(t=Pu(e),$u.set(e,t)),t}function Bu(e,t){let n=Ko(),i=Ou(n),o=i.palette.ink,l=n.motion.reducedMotion;return r(()=>({S:i,icon:(e,n,r)=>(t?Xt(t,e):void 0)??/* @__PURE__ */P(FocusIcon,{name:e,color:n??o,...r===void 0?{}:{size:r}}),copy:e,still:l}),[i,o,e,t,l])}function _u(e={}){let t=i(zu),n=Bu(Du,void 0),o=t??n,{copy:l,renderIcon:a}=e;return r(()=>{if(l===void 0&&a===void 0)return o;let e=l===void 0?o.copy:{...o.copy,...l},t=a===void 0?o.icon:(e,t,n)=>Xt(a,e)??o.icon(e,t,n);return{...o,copy:e,icon:t}},[o,l,a])}var Lu={flexShrink:1},Eu={flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0},Au={flexShrink:0},ju={alignSelf:"flex-start"},Wu={justifyContent:"center"},Mu={flexDirection:"column"};var Nu={position:"relative",top:0,right:0},Uu=(e,t,n)=>e?/* @__PURE__ */P(T,{source:{uri:e},style:t,resizeMode:n,accessibilityIgnoresInvertColors:true}):null,qu={width:64,height:64};function Vu(e,t,n){let{bx:r,tx:i}=e.S.D;return t===void 0||t===""?null:/* @__PURE__ */P(f,{style:r("tag",n),children:/* @__PURE__ */P(Text,{tier:"compact",style:i("tag",n),children:t})})}function Gu(e,t,n){let{bx:r,tx:i}=e.S.D;/* @__PURE__ */
|
|
174
|
+
return P(f,{style:r(n),accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */P(Text,{tier:"badge",style:i(n),children:String(t)})})}function Ku(e,t,n){let{bx:r,tx:i}=e.S.D;/* @__PURE__ */
|
|
175
|
+
return R(f,{style:r("secTitle"),children:[Gu(e,t,"secN"),
|
|
176
|
+
/* @__PURE__ */P(Text,{style:[...i("secTitle"),Lu],accessibilityRole:"header",children:n})]})}var Xu=false;function Yu(){if(globalThis.__DEV__===false||Xu)return;Xu=true;let e=globalThis.console;try{e?.warn?.("[everfur] The Health Plan shop is on with Everfur checkout, but `focus.checkoutReturnUrl` is missing or not an https URL, so the member is never sent to Stripe: checkout keeps the in-app path (your onBuy / onCheckout). Pass the https App Link (Universal Link) your app opens as `checkoutReturnUrl`.")}catch{}}var Ju=e=>e!=null&&/^(dog|canine)$/i.test(e.trim()),Qu=createContext(null);function Zu(){return i(Qu)}function ep(){let e=i(Qu);return e===null&&Lc(globalThis.__DEV__!==false),e}function tp(e){let{design:t,item:i,petRef:petRef}=e,l=e.petName?.trim()?e.petName.trim():null,{runtime:c}=le(),[d,u]=n(null),p=a(e=>u(e),[]),h=e.petSex??null,g=e.trackingTexts===true,f=r(()=>({...Sd,...healthPlanPetCopy({name:l,sex:h,trackingTexts:g}),...t.copy,...e.fromBackend===true?Ac:{},...e.copy}),[l,h,g,t.copy,e.copy,e.fromBackend]),m=Bu(f,e.renderIcon),y=Ad(e.checkoutReturnUrl)?e.checkoutReturnUrl.trim():null,b=Oc(),k=s(null);o(()=>{e.shop===true&&e.checkout==="everfur_stripe"&&y===null&&Yu()},[e.shop,e.checkout,y]);let w=c.registry.services.kv,v=r(()=>lu(w),[w]),x=e.navigate,S=e.recordsRepository,T=S!==void 0&&e.recordsMissing===void 0&&e.onConnectRecords!==void 0,C=kd(T?S:void 0,petRef),H=S===void 0&&e.onConnectRecords!==void 0&&e.recordsMissing===void 0&&e.recordsBlanks===void 0,[F,R]=n(null),z=a(e=>R({pet:petRef,read:e}),[petRef]),D=H&&F!==null&&F.pet===petRef?F.read:null,$=H?/* @__PURE__ */P(RecordsProbe,{petRef:petRef,onRead:z},petRef):null,O=e.recordsMissing??(S!==void 0?C===true:D?.missing===true),B=e.recordsBlanks!==void 0?e.recordsBlanks:D?.blanks??null,{onOverlayChange:_,...L}=e,E=bd({...L,petName:l,blanksFacts:B,..._===void 0?{}:{onOverlayChange:(e,t)=>e==="product"?void 0:_(e,t)}},f,{store:v,returnUrls:()=>y===null?null:{successUrl:Wd(y,Od,_d),cancelUrl:Wd(y,Bd,"1")},openUrl:e=>{x?Xt(x,e):I.openURL(e).catch(()=>{})},callHost:Xt,mintKey:Nd},{...au,checkoutReachable:y!==null}),{shop:A,everfur:j,partnerBuys:W,itemOf:M,inCart:N,weightKnown:U,noVet:q,planItems:V}=E,G=[...E.ownOrders.map(e=>oc(e,V)),...(e.shopOrders??[]).map(ic)];bu({enabled:j,petRef:petRef,pages:E.pages,returnUrl:y,lifecycle:e.lifecycle??null,kv:w,...E.returnHandlers});let K=e.species??null,X=Ju(K),Y=K!==null&&K.trim()!==""&&!X,J=!U&&X,Q=t.pick,Z=e.renderWait?Xt(e.renderWait)??null:null,ee=Z!==null||t.wait!==void 0,te=e.checkoutRows??(e.fromBackend?[]:t.checkoutRows??[]),ne=e.trust??(e.fromBackend?[]:Q.trust??[]),re=t.byline!==void 0&&(e.fromBackend!==true||e.vetReviewed===true)?t.byline:void 0,ie=re??null,oe=Q.none===true,ae=oe&&Q.hidden===true,se=t.extras?.items.some(e=>e.productId!==void 0)===true,ce=e=>q?f.callAVet:O?f.callYourVet:e,de=B!==null&&!ee,ue=(t.extras?.items??[]).filter(e=>e.owned!==true),pe=e=>e.productId!==void 0&&(A||j||W)?M(e.productId):void 0,he=ue.some(t=>pe(t)!==void 0||e.onExtra!==void 0),ge=A&&N(i.productId)!==void 0,fe=e.onJump,me=fe?()=>{Xt(fe)}:b?()=>b(k.current):void 0,ye=1,be={};return t.routine&&!ee&&(be.routine=ye++),!(ee||ae)&&!oe&&(be.pick=ye++),!ee&&t.signs?be.signs=ye++:!ee&&t.checkup&&(be.checkup=ye++),{model:{props:e,hp:E,kit:m,copy:f,petName:l,returnUrl:y,blanksFacts:B,recordsMissing:O,waitNode:Z,waiting:ee,blanksShown:de,rows:te,trust:ne,byline:re,vet:ie,noPick:oe,pickHidden:ae,curated:se,otherSpecies:Y,askWeight:J,pickInCart:ge,jump:me,pickRef:k,pageWidth:d,setPageWidth:p,numbers:be,allOrders:G,extraProduct:pe,extraItems:ue,extrasShown:he,vetSignTitle:ce},recordsProbe:$}}function HealthPlanFocusProvider(e){let{model:t,recordsProbe:n}=tp(e);/* @__PURE__ */
|
|
177
|
+
return P(Qu.Provider,{value:t,children:/* @__PURE__ */R(HealthPlanRnKitScope,{kit:t.kit,children:[e.children,n]})})}var np=900,rp=80,ip=.4,op=()=>b.bezier(0,0,.58,1),lp={flexShrink:1},ap={flexDirection:"row",flexWrap:"wrap",alignItems:"center"},sp={height:void 0,paddingLeft:3,paddingRight:3};function HealthPlanBlanks(e){let{phase:t,rows:n,flashKey:r}=e,i=Ko(),l=i.motion.reducedMotion,a=Ks(i),{bx:c,tx:d,tb:u,inner:p}=Zs(a),h=a.roles.accent??"",g=_s(h),m=a.roles.accent4??"",b=n.every(e=>e.value!==null),k=t==="filled"&&b,w=s([]);for(;w.current.length<n.length;)w.current.push(new y.Value(1));let v=s(null);return o(()=>{if(r==null||v.current===r||t!=="filled"||(v.current=r,l))return;let e=op(),i=n.flatMap((t,n)=>{let r=w.current[n];return t.value===null||r===void 0?[]:(r.setValue(0),[y.sequence([y.delay(n*rp),y.timing(r,{toValue:1,duration:np,easing:e,useNativeDriver:false})])])});for(let e of i)e.start();return()=>{for(let e of i)e.stop()}},[r,t,l]),/* @__PURE__ */R(f,{style:c("blanksWrap","blanksCard"),accessibilityLabel:e.label,testID:"health-plan-blanks",children:[
|
|
178
|
+
/* @__PURE__ */R(f,{style:c("blanksHead"),children:[
|
|
179
|
+
/* @__PURE__ */P(Text,{style:[...d("blanksHead"),lp],tier:"compact",children:e.kicker}),e.pill===""?null:/* @__PURE__ */P(f,{style:c("blanksPill",k&&"blanksPillFilled"),children:/* @__PURE__ */P(Text,{style:d("blanksPill",k&&"blanksPillFilled"),tier:"compact",testID:"health-plan-blanks-pill",children:e.pill})})]}),
|
|
180
|
+
/* @__PURE__ */P(f,{style:c("blanksList"),children:n.map((n,r)=>{let i=t!=="empty"?n.value:null,o=w.current[r],l=i!==null&&o!==void 0?o.interpolate({inputRange:[0,ip,1],outputRange:[h,h,k?g:m]}):null,s=n.width==="s"?"blankS":n.width==="l"?"blankL":null;/* @__PURE__ */
|
|
181
|
+
return R(f,{style:c("blanksRow"),testID:`health-plan-blank-${n.key}`,children:[
|
|
182
|
+
/* @__PURE__ */P(f,{style:[...c("blanksNum"),Xs(a.blanksRow,0)],accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */P(Text,{style:d("blanksNum"),children:String(r+1)})}),
|
|
183
|
+
/* @__PURE__ */R(f,{style:Xs(a.blanksRow,1),children:[
|
|
184
|
+
/* @__PURE__ */R(f,{style:ap,children:[n.lead===""?null:/* @__PURE__ */P(Text,{style:d("blanksText"),children:n.lead}),
|
|
185
|
+
/* @__PURE__ */R(y.View,{style:[...c("blank",s,k&&"blankFilled"),!k&&i!==null?sp:null,l===null?null:{backgroundColor:l}],...i===null?{accessible:true,accessibilityLabel:e.blankLabel}:{},testID:i===null?`health-plan-blank-${n.key}-empty`:`health-plan-blank-${n.key}-value`,children:[p("blank",k&&"blankFilled"),i===null?null:/* @__PURE__ */P(Text,{style:d("blank"),children:i})]}),n.trail===""?null:/* @__PURE__ */P(Text,{style:d("blanksText"),children:n.trail})]}),n.source===""?null:/* @__PURE__ */P(Text,{style:u("blanksSource"),children:n.source})]})]},n.key)})})]})}function BlockScope({children:e}){let n=Rs(xs);return t(ThemeProvider,{theme:n},e)}Ka({paw:ls});var cp={flexWrap:"wrap"},dp={alignItems:"flex-end",flexShrink:0,marginLeft:"auto"},up={flexDirection:"row",alignItems:"center"},pp=320;function hp(e,t,n,r){let i=e.S.X,o=e=>Number(i[e].box.paddingLeft??0)+Number(i[e].box.paddingRight??0);return e.S.D.swipe(n,r.reduce((e,t)=>e-o(t),t))}function HealthPlanToolbar(e){let t=_u(e),{S:n,copy:r,icon:i}=t,l=n.palette,a=n.X,{bx:c,tx:d,tb:u,ring:p,ink:h,side:g}=n.D,k=e.cartCount,w=s(new y.Value(1)).current,v=s(k);o(()=>{let e=k>v.current;if(v.current=k,!e||t.still)return;let n=b.bezier(.23,1,.32,1),r=y.sequence([y.timing(w,{toValue:1.25,duration:pp*.4,easing:n,useNativeDriver:false}),y.timing(w,{toValue:1,duration:pp*.6,easing:n,useNativeDriver:false})]);return r.start(),()=>r.stop()},[k,t.still,w]);let x=a.cartCount.rings[0]??a.cartCount.box,S={position:"absolute",top:x.top,right:x.right};/* @__PURE__ */
|
|
186
|
+
return R(f,{style:c("tools"),children:[e.eyebrow?/* @__PURE__ */P(Text,{style:[...u("toolsEyebrow"),Lu],children:e.eyebrow}):/* @__PURE__ */P(f,{}),
|
|
187
|
+
/* @__PURE__ */R(f,{style:c("toolsEnd"),children:[
|
|
188
|
+
/* @__PURE__ */R(m,{onPress:e.onOpenOrders,accessibilityRole:"button",accessibilityLabel:r.orders,style:c("orders"),testID:"health-plan-orders-button",children:[i("box",h("orders",l.ink),g("ordersIcon",21)),
|
|
189
|
+
/* @__PURE__ */P(Text,{tier:"control",style:d("orders"),children:r.orders})]}),
|
|
190
|
+
/* @__PURE__ */R(m,{onPress:e.onOpenCart,accessibilityRole:"button",accessibilityLabel:r.cartLabel(k),style:c("cart"),testID:"health-plan-cart-button",children:[i("cart",h("cart",l.ink),g("cartIcon",26)),k===0?null:
|
|
191
|
+
/* @__PURE__ */P(y.View,{pointerEvents:"none",style:[S,{transform:[{scale:w}]}],children:p("cartCount",
|
|
192
|
+
/* @__PURE__ */P(f,{style:[...c("cartCount"),a.cartCount.rings.length===0?Nu:null],children:/* @__PURE__ */P(Text,{tier:"badge",style:d("cartCount"),children:String(k)})}),Nu)})]})]})]})}function HealthPlanHeader(e){let t=_u(e),{bx:n,tb:r,im:i,ring:o}=t.S.D;/* @__PURE__ */
|
|
193
|
+
return R(f,{style:n("head"),children:[
|
|
194
|
+
/* @__PURE__ */R(f,{style:Xs(t.S.X.head,0),children:[e.eyebrow?/* @__PURE__ */P(Text,{style:r("eyebrow"),children:e.eyebrow}):null,
|
|
195
|
+
/* @__PURE__ */P(Text,{style:r("title"),accessibilityRole:"header",testID:"health-plan-focus-title",children:e.title}),e.subtitle?/* @__PURE__ */P(Text,{style:r("subtitle"),children:e.subtitle}):null]}),e.imageUrl?o("headImage",Uu(e.imageUrl,i("headImage")),Au):null]})}function HealthPlanByline(e){let t=_u(e),{bx:n,tb:r,im:i,ink:o,side:l}=t.S.D,a=e.vet,s=l("byIconSvg",20);/* @__PURE__ */
|
|
196
|
+
return R(f,{style:n("by"),testID:"health-plan-byline",children:[a.imageUrl?Uu(a.imageUrl,i("byImage")):/* @__PURE__ */P(f,{style:[...n("byIcon"),Au],testID:"health-plan-byline-icon",children:/* @__PURE__ */P(Icon,{name:"paw",size:s,color:o("byIcon",t.S.palette.ink)})}),
|
|
197
|
+
/* @__PURE__ */R(f,{style:Xs(t.S.X.by,1),children:[
|
|
198
|
+
/* @__PURE__ */P(Text,{style:r("byName"),children:t.copy.builtWith(a.name)}),a.role?/* @__PURE__ */P(Text,{style:r("byRole"),children:a.role}):null]}),t.icon("shield",o("byOk",t.S.palette.teal),l("byOk",22))]})}function HealthPlanAskRow(e){let t=_u(e);return Sc(t,e.icon,e.title,e.body,e.onPress,e.testID,e.inSection===true)}function HealthPlanWaitCard(e){let t=_u(e);return Tc(t,e.wait,e.onAction,e.vetName??null)}function HealthPlanVetQuote(e){let t=_u(e),{bx:n,tx:r,tb:i,im:o}=t.S.D,{quote:l,vet:a}=e;if(a.imageUrl)/* @__PURE__ */
|
|
199
|
+
return R(f,{style:n("says"),testID:"health-plan-quote",children:[Uu(a.imageUrl,o("saysImage")),
|
|
200
|
+
/* @__PURE__ */R(Text,{style:[...i("saysText"),Xs(t.S.X.says,1)],children:[a.shortName?/* @__PURE__ */P(Text,{style:i("saysBy"),children:a.shortName}):null,a.shortName?" ":null,l.text,l.tag?" ":null,Vu(t,l.tag)]})]});let s=a.shortName??l.kicker??null;/* @__PURE__ */
|
|
201
|
+
return R(f,{style:[...n("says"),Mu],testID:"health-plan-quote",children:[s||l.tag?/* @__PURE__ */R(f,{style:n("saysKicker"),children:[
|
|
202
|
+
/* @__PURE__ */P(Text,{tier:"compact",style:[...r("saysKicker"),Lu],children:s}),Vu(t,l.tag)]}):null,
|
|
203
|
+
/* @__PURE__ */P(Text,{style:i("saysQuote"),children:`“${l.text}”`})]})}function HealthPlanJumpStrip(e){let t=_u(e),{bx:n,tx:r,im:i}=t.S.D,o=e.onJump;/* @__PURE__ */
|
|
204
|
+
return R(m,{onPress:o,disabled:o===void 0,accessibilityRole:o?"button":"text",style:tc(n("jump",!e.imageUrl&&"jumpNoImage"),ec.jump,o===void 0),testID:"health-plan-jump",children:[Uu(e.imageUrl,i("jumpImage")),
|
|
205
|
+
/* @__PURE__ */R(f,{style:Eu,children:[e.kicker===null?null:/* @__PURE__ */P(Text,{style:r("jumpSmall"),children:e.kicker}),
|
|
206
|
+
/* @__PURE__ */P(Text,{style:r("jumpStrong"),children:e.title})]}),o?/* @__PURE__ */P(Text,{style:r("jumpGo"),children:e.go}):null]})}function HealthPlanFocusCard(e){let t=_u(e),{bx:n,tx:r,tb:i,ink:o,side:l}=t.S.D,a=t.S.X,s=e.focus,c=e.vet,d=e.jump,u=s.risk?.kind,p=u==="risk"||u==="watch"||u==="clear"?u:void 0,h=s.odds,g=h?/* @__PURE__ */R(f,{style:[...n("odds"),cp],testID:"health-plan-score",children:[
|
|
207
|
+
/* @__PURE__ */R(f,{style:[Lu,{maxWidth:a.oddsKicker.box.maxWidth}],children:[
|
|
208
|
+
/* @__PURE__ */P(Text,{style:r("oddsKicker"),children:h.label}),h.tag?/* @__PURE__ */P(f,{style:n("oddsTag"),testID:"health-plan-tag",children:/* @__PURE__ */P(Text,{tier:"compact",style:r("oddsTag"),children:h.tag})}):null]}),
|
|
209
|
+
/* @__PURE__ */R(f,{style:dp,children:[
|
|
210
|
+
/* @__PURE__ */R(f,{style:[...n("oddsNumbers"),up],children:[
|
|
211
|
+
/* @__PURE__ */P(Text,{style:r("oddsFrom"),children:h.from}),t.icon("arrow",o("oddsIcon",t.S.palette.ink),l("oddsIcon",16)),
|
|
212
|
+
/* @__PURE__ */P(Text,{style:r("oddsTo"),children:h.to})]}),h.toLabel?/* @__PURE__ */P(Text,{style:i("oddsLabel"),children:h.toLabel}):null]})]}):null,m=s.quote&&c!==null?/* @__PURE__ */P(HealthPlanVetQuote,{quote:s.quote,vet:c,copy:e.copy,renderIcon:e.renderIcon}):null,y={backgroundColor:a.need.box.backgroundColor,borderRadius:a.need.box.borderRadius};/* @__PURE__ */
|
|
213
|
+
return P(f,{testID:"health-plan-focus-card",style:{marginTop:a.need.box.marginTop},children:/* @__PURE__ */P(BlockScope,{children:/* @__PURE__ */P(PlanNeedCard,{variant:"plan",testID:"health-plan",kicker:s.kicker,sources:s.sources?.map(e=>({label:e.label,kind:e.kind==="dna"?"dna":"records"})),title:s.title,signals:s.risk?[{key:"risk",lead:s.risk.lead,text:s.risk.body??"",tone:p,dot:p===void 0?"space":true}]:[],beforeJump:g||m?/* @__PURE__ */R(z,{children:[g,m]}):void 0,jump:d?{kicker:d.kicker??"",title:d.title,go:d.onJump?d.go:"",image:d.imageUrl??null,onPress:d.onJump}:void 0,style:y})})})}function HealthPlanTips(e){let t=_u(e),n=nl(),{S:r,icon:i}=t,{bx:o,tx:l,tb:a,scroll:s}=r.D,c=e.routine,d=hp(t,e.pageWidth??n,"tip",["root","steps"]),u=n=>n.fromVet?e.vetShortName?t.copy.fromVet(e.vetShortName):void 0:n.source??void 0;/* @__PURE__ */
|
|
214
|
+
return R(f,{style:o("steps"),testID:"health-plan-routine",children:[
|
|
215
|
+
/* @__PURE__ */R(f,{style:o("stepsHead"),children:[
|
|
216
|
+
/* @__PURE__ */R(f,{style:[...o("stepsTitle"),Lu],children:[Gu(t,e.number,"n"),
|
|
217
|
+
/* @__PURE__ */P(Text,{style:[...l("stepsTitle"),Lu],accessibilityRole:"header",children:c.title})]}),c.label?/* @__PURE__ */P(Text,{style:a("stepsLabel"),children:c.label}):null]}),e.variant==="carousel"?
|
|
218
|
+
/* @__PURE__ */P(BlockScope,{children:/* @__PURE__ */P(k,{horizontal:true,showsHorizontalScrollIndicator:false,style:s("tips").place,contentContainerStyle:s("tips").content,children:c.steps.map((e,t)=>{let n=e.icon;/* @__PURE__ */
|
|
219
|
+
return P(TipCard,{variant:"plan",number:String(t+1),title:e.title,text:e.body||void 0,foot:u(e),tone:e.tone??"y",icon:({size:e,color:t})=>n?i(n,t,e):null,style:{width:d,flexBasis:"auto"}},e.title)})})}):
|
|
220
|
+
/* @__PURE__ */P(f,{style:o("tipList"),testID:"health-plan-tip-list",children:c.steps.map((e,t)=>{let n=u(e);/* @__PURE__ */
|
|
221
|
+
return R(f,{style:o("tipRow"),testID:`health-plan-tip-${t}`,children:[
|
|
222
|
+
/* @__PURE__ */P(f,{style:[...o("tipRowN"),Xs(r.X.tipRow,0)],accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */P(Text,{tier:"badge",style:l("tipRowN"),children:String(t+1)})}),
|
|
223
|
+
/* @__PURE__ */R(f,{style:Xs(r.X.tipRow,1),children:[
|
|
224
|
+
/* @__PURE__ */P(Text,{style:a("tipRowStrong"),children:e.title}),e.body?/* @__PURE__ */P(Text,{style:a("tipRowSmall"),children:e.body}):null,n?/* @__PURE__ */P(Text,{style:a("tipRowEm"),children:n}):null]})]},e.title)})})]})}function gp(e,t){return hp(e,t,"review",["root","sec","pick"])}function HealthPlanNoPick(e){let t=_u(e);return e.text===""?null:/* @__PURE__ */P(Text,{style:t.S.noPick,testID:"health-plan-no-pick",children:e.text})}function HealthPlanFine(e){let t=_u(e);/* @__PURE__ */
|
|
225
|
+
return P(Text,{style:t.S.D.tb("pageFine"),children:e.text})}function HealthPlanToast(e){let t=_u(e),n=e.message,r=t.S.X.toast.box,i={position:r.position,top:r.top,left:r.left,right:r.right,zIndex:r.zIndex};/* @__PURE__ */
|
|
226
|
+
return P(PlanLinger,{motions:[gl],draw:n===null?null:([e])=>/* @__PURE__ */P(y.View,{style:[i,{opacity:e},t.still||e===void 0?null:{transform:[{translateY:e.interpolate({inputRange:[0,1],outputRange:[-8,0]})}]}],accessibilityLiveRegion:"polite",accessibilityRole:"alert",testID:"health-plan-toast",children:/* @__PURE__ */P(PlanDs,{theme:t.S.ds,children:/* @__PURE__ */P(Toast,{variant:"card",message:n})})})})}var fp={flexDirection:"row"},mp={alignItems:"center"},yp={flexShrink:0},bp={paddingHorizontal:6};function HealthPlanProductPick(e){let t=_u(e),{S:n,icon:r}=t,i=n.palette,o=n.X,{bx:l,tx:a,tb:s,ink:c,side:d}=n.D,{item:u,pick:p}=e,h=e.onMore;/* @__PURE__ */
|
|
227
|
+
return R(f,{ref:e.viewRef,style:l("sec"),testID:"health-plan-pick",children:[Ku(t,e.number,p.title),
|
|
228
|
+
/* @__PURE__ */R(f,{style:l("pick"),children:[
|
|
229
|
+
/* @__PURE__ */R(f,{style:l("pickTop"),children:[
|
|
230
|
+
/* @__PURE__ */P(f,{style:[...l("pickImage"),Wu,mp],children:Uu(u.imageUrl,qu,"contain")}),
|
|
231
|
+
/* @__PURE__ */R(f,{style:Xs(o.pickTop,1),children:[
|
|
232
|
+
/* @__PURE__ */P(Text,{style:s("pickTitle"),testID:"health-plan-pick-title",children:u.title}),p.rating?/* @__PURE__ */R(f,{style:l("stars"),accessibilityLabel:[p.rating.value,p.rating.label].filter(Boolean).join(" "),children:[r("star",c("starsIcon",i.star),d("starsIcon",14)),
|
|
233
|
+
/* @__PURE__ */P(Text,{style:a("stars"),children:p.rating.value}),p.rating.label?/* @__PURE__ */P(Text,{style:a("starsLabel"),children:p.rating.label}):null]}):null,p.line??u.description?/* @__PURE__ */P(Text,{style:s("pickLine"),children:p.line??u.description}):null]})]}),e.children,p.more&&h?/* @__PURE__ */P(f,{style:l("more"),children:/* @__PURE__ */P(m,{onPress:h,accessibilityRole:"link",accessibilityLabel:p.more,style:[...l("moreButton"),Wu],children:/* @__PURE__ */P(Text,{tier:"control",style:a("moreButton"),children:p.more})})}):null,p.fine?/* @__PURE__ */P(Text,{style:s("fine"),children:p.fine}):null]})]})}function HealthPlanReviews(e){let t=_u(e),n=nl(),{S:r,icon:i}=t,{bx:o,tb:l,ink:a,side:s,scroll:d}=r.D,u=e.reviews;if(u.items.length===0)return null;let p=e.variant==="carousel",h=gp(t,e.pageWidth??n),g=u.items.map(e=>{let t=Math.max(1,Math.min(5,Math.round(e.stars)));/* @__PURE__ */
|
|
234
|
+
return R(f,{style:p?[...o("review"),{width:h,flexBasis:"auto"}]:o("reviewCard"),children:[
|
|
235
|
+
/* @__PURE__ */P(f,{style:o("reviewStars"),accessibilityLabel:`${t} out of 5 stars`,children:Array.from({length:t},(e,t)=>/* @__PURE__ */P(c,{children:i("star",a("reviewStars",r.palette.star),s("reviewStar",13))},t))}),
|
|
236
|
+
/* @__PURE__ */P(Text,{style:l("reviewText"),children:`“${e.text}”`}),
|
|
237
|
+
/* @__PURE__ */P(Text,{style:l("reviewBy"),children:e.by})]},`${e.by}${e.text}`)});return p?/* @__PURE__ */P(k,{horizontal:true,showsHorizontalScrollIndicator:false,style:d("reviews").place,contentContainerStyle:d("reviews").content,accessibilityLabel:u.label,testID:"health-plan-reviews",children:g}):/* @__PURE__ */P(f,{style:o("reviewsStack"),accessibilityLabel:u.label,testID:"health-plan-reviews",children:g})}function HealthPlanWhyItFits(e){let t=_u(e),{S:n,copy:r}=t,i=n.X,{bx:o,tx:l,tb:a,mod:s,inner:c}=n.D,d=e.why;return d.rows.length===0?null:/* @__PURE__ */R(f,{style:o("why"),testID:"health-plan-why",children:[c("why"),
|
|
238
|
+
/* @__PURE__ */P(Text,{style:a("whyMini"),children:d.title}),
|
|
239
|
+
/* @__PURE__ */P(f,{style:o("whyList"),children:d.rows.map(e=>/* @__PURE__ */R(f,{style:o("whyRow"),children:[
|
|
240
|
+
/* @__PURE__ */P(f,{style:[...o("chip",s("chip",e.kind)),yp,{minWidth:Xs(i.whyRow,0).width}],children:/* @__PURE__ */P(Text,{tier:"compact",numberOfLines:1,style:[...l("chip",s("chip",e.kind)),bp],children:e.chip})}),
|
|
241
|
+
/* @__PURE__ */R(f,{style:Xs(i.whyRow,1),children:[
|
|
242
|
+
/* @__PURE__ */P(Text,{style:a("whyStrong"),children:e.title}),e.body?/* @__PURE__ */P(Text,{style:a("whySmall"),children:e.body}):null]})]},e.title))}),d.score&&d.rows.length>=2?/* @__PURE__ */R(f,{style:o("score"),testID:"health-plan-why-score",children:[
|
|
243
|
+
/* @__PURE__ */P(Text,{style:[...l("score"),Lu],children:r.signalsFit(d.rows.length)}),
|
|
244
|
+
/* @__PURE__ */P(Text,{style:a("scoreValue"),accessibilityElementsHidden:true,importantForAccessibility:"no",children:r.signalsValue(d.rows.length)})]}):null]})}function HealthPlanDoseCard(e){let t=_u(e),{bx:n,tb:r}=t.S.D,i=e.dose;/* @__PURE__ */
|
|
245
|
+
return R(f,{style:n("dose"),testID:"health-plan-dose",children:[
|
|
246
|
+
/* @__PURE__ */P(Text,{style:r("doseMini"),children:i.title}),
|
|
247
|
+
/* @__PURE__ */P(f,{style:n("doseList"),children:i.stats.map((e,i)=>/* @__PURE__ */R(f,{style:[...n("doseItem"),Xs(t.S.X.doseList,i)],children:[
|
|
248
|
+
/* @__PURE__ */P(Text,{style:r("doseValue"),numberOfLines:1,adjustsFontSizeToFit:true,children:e.value}),
|
|
249
|
+
/* @__PURE__ */P(Text,{style:r("doseLabel"),children:e.label})]},`${e.value}${e.label}`))}),i.note?/* @__PURE__ */P(Text,{style:r("doseNote"),children:i.note}):null]})}function HealthPlanIngredients(e){let t=_u(e),{bx:n,tb:r}=t.S.D,i=e.ingredients;return i.items.length===0?null:/* @__PURE__ */P(f,{style:n("ingredients"),accessibilityLabel:i.label??i.items.join(", "),children:i.items.map(e=>/* @__PURE__ */P(Text,{style:r("ingredient"),children:e},e))})}function HealthPlanBuyOptions(e){let t=_u(e),{copy:n}=t,{bx:r,tx:i,tb:o,inner:l}=t.S.D,{mode:a,prices:s,offer:c}=e;/* @__PURE__ */
|
|
250
|
+
return R(f,{style:r("opts"),accessibilityRole:"radiogroup",accessibilityLabel:n.optionsLabel,testID:"health-plan-options",children:[
|
|
251
|
+
/* @__PURE__ */R(m,{onPress:()=>e.onModeChange("sub"),accessibilityRole:"radio",accessibilityState:{checked:a==="sub"},accessibilityLabel:n.subscribe,style:tc(r("opt",a==="sub"&&"optOn"),ec.opt,false),testID:"health-plan-opt-sub",children:[l("opt",a==="sub"&&"optOn"),
|
|
252
|
+
/* @__PURE__ */R(f,{style:[...r("optText"),Eu],children:[c?/* @__PURE__ */P(Text,{style:o("optTag"),children:n.bestValue}):null,
|
|
253
|
+
/* @__PURE__ */P(Text,{style:i("optStrong"),children:n.subscribe}),
|
|
254
|
+
/* @__PURE__ */P(Text,{style:i("optSmall"),children:n.subscribeLine(s)})]}),
|
|
255
|
+
/* @__PURE__ */R(f,{style:r("price"),children:[c?/* @__PURE__ */P(Text,{style:i("priceWas"),children:s.box}):null,
|
|
256
|
+
/* @__PURE__ */P(Text,{style:i("priceValue"),children:c?s.first:s.box})]})]}),
|
|
257
|
+
/* @__PURE__ */R(m,{onPress:()=>e.onModeChange("once"),accessibilityRole:"radio",accessibilityState:{checked:a==="once"},accessibilityLabel:n.once,style:tc(r("opt","optOnce",a==="once"&&"optOn",a==="once"&&"optOnceOn"),ec.opt,false),testID:"health-plan-opt-once",children:[l("opt","optOnce",a==="once"&&"optOn",a==="once"&&"optOnceOn"),
|
|
258
|
+
/* @__PURE__ */R(f,{style:[...r("optText"),Eu],children:[
|
|
259
|
+
/* @__PURE__ */P(Text,{style:i("optStrong","optOnceStrong"),children:n.once}),
|
|
260
|
+
/* @__PURE__ */P(Text,{style:i("optSmall","optOnceSmall"),children:n.onceLine(s)})]}),
|
|
261
|
+
/* @__PURE__ */P(Text,{style:i("optPrice","optOncePrice"),children:s.once})]})]})}function HealthPlanBuyButton(e){let t=_u(e);/* @__PURE__ */
|
|
262
|
+
return P(f,{style:t.S.D.bx("buy"),children:yc(t,e.label,e.onPress,{disabled:e.disabled===true,testID:e.testID??"health-plan-buy"})})}function HealthPlanProof(e){let t=_u(e),{bx:n,tx:r,ink:i,side:o}=t.S.D;/* @__PURE__ */
|
|
263
|
+
return R(f,{style:n("proof"),children:[
|
|
264
|
+
/* @__PURE__ */P(f,{style:n("proofIcon"),children:t.icon("flame",i("proof",t.S.palette.riskInk),o("proofIcon",21))}),
|
|
265
|
+
/* @__PURE__ */P(Text,{style:[...r("proof"),Lu],children:e.text})]})}function HealthPlanTrustRow(e){let t=_u(e),{bx:n,tx:r,ink:i,side:o}=t.S.D;return e.items.length===0?null:/* @__PURE__ */P(f,{style:n("trust"),testID:"health-plan-trust",children:e.items.map((e,l)=>/* @__PURE__ */R(f,{style:[...n("trustItem"),Xs(t.S.X.trust,l)],children:[t.icon(e.icon,i("trustIcon",t.S.palette.teal),o("trustIcon",20)),
|
|
266
|
+
/* @__PURE__ */P(Text,{style:r("trustItem"),children:e.label})]},e.label))})}function HealthPlanSubscribedBox(e){let t=_u(e),{copy:n}=t,{bx:r,tx:i,tb:o,inner:l,ink:a,side:s}=t.S.D;/* @__PURE__ */
|
|
267
|
+
return R(f,{style:r("on"),testID:"health-plan-subscribed",children:[
|
|
268
|
+
/* @__PURE__ */P(f,{style:r("onIcon"),children:t.icon("check",a("onIcon",t.S.palette.card),s("onIconSvg",18))}),
|
|
269
|
+
/* @__PURE__ */R(f,{style:Xs(t.S.X.on,1),children:[
|
|
270
|
+
/* @__PURE__ */P(Text,{style:o("onStrong"),children:n.subscribed}),
|
|
271
|
+
/* @__PURE__ */P(Text,{style:o("onSmall"),children:n.subscribedLine(e.prices,e.nextBoxDay)})]}),
|
|
272
|
+
/* @__PURE__ */R(m,{onPress:e.onManage,accessibilityRole:"button",accessibilityLabel:n.manage,style:tc([...r("onButton"),Wu],ec.onButton,false),testID:"health-plan-manage",children:[l("onButton"),
|
|
273
|
+
/* @__PURE__ */P(Text,{tier:"control",style:i("onButton"),children:n.manage})]})]})}function HealthPlanOtherItems(e){let t=_u(e),{S:n}=t,{bx:r,tb:i}=n.D;return e.items.length===0?null:/* @__PURE__ */P(f,{style:r("others"),testID:"health-plan-others",children:e.items.map(({item:o,buyLabel:l,buyDisabled:a,onBuy:s})=>/* @__PURE__ */R(f,{style:r("pick"),testID:`health-plan-other-${o.productId}`,children:[
|
|
274
|
+
/* @__PURE__ */R(f,{style:r("pickTop"),children:[
|
|
275
|
+
/* @__PURE__ */P(f,{style:[...r("pickImage"),Wu,mp],children:Uu(o.imageUrl,qu,"contain")}),
|
|
276
|
+
/* @__PURE__ */R(f,{style:Xs(n.X.pickTop,1),children:[e.showCategory===true&&o.category!==null?/* @__PURE__ */P(Text,{style:n.mini,children:o.category}):null,
|
|
277
|
+
/* @__PURE__ */P(Text,{style:i("pickTitle"),children:o.title}),o.sample?/* @__PURE__ */P(f,{style:ju,children:Vu(t,E.sample)}):null,o.description?/* @__PURE__ */P(Text,{style:i("pickLine"),children:o.description}):null]})]}),
|
|
278
|
+
/* @__PURE__ */P(f,{style:r("buy"),children:yc(t,l,s,{disabled:a,testID:`health-plan-other-buy-${o.productId}`})})]},o.productId))})}function HealthPlanSigns(e){let t=_u(e),{bx:n,tx:r,tb:i,inner:o,ink:l,side:a}=t.S.D,s=e.signs;/* @__PURE__ */
|
|
279
|
+
return R(f,{style:n("sec"),testID:"health-plan-signs",children:[Ku(t,e.number,s.title),s.items.map(s=>/* @__PURE__ */R(f,{style:n("sign",s.urgent===true&&"signUrgent"),children:[o("sign",s.urgent===true&&"signUrgent"),
|
|
280
|
+
/* @__PURE__ */R(f,{style:n("signTitle"),children:[s.urgent?t.icon("alert",l("signUrgentTitle",t.S.palette.riskInk),a("signUrgentIcon",20)):null,
|
|
281
|
+
/* @__PURE__ */P(Text,{style:[...r("signTitle",s.urgent===true&&"signUrgentTitle"),Lu],children:s.callVet===true&&s.urgent!==true?e.callVetTitle??s.title:s.title})]}),
|
|
282
|
+
/* @__PURE__ */P(Text,{style:i("signBody",s.urgent===true&&"signUrgentBody"),children:s.body})]},s.title)),e.children]})}function HealthPlanCheckup(e){let t=_u(e),{bx:n,tx:r,tb:i,inner:o}=t.S.D,{checkup:l,added:a,addLabel:s}=e,c=Number(t.S.X.questions.box.paddingLeft??0),d=/* @__PURE__ */R(z,{children:[e.variant==="kicker"?/* @__PURE__ */P(Text,{style:i("questionsKicker"),accessibilityRole:"header",children:l.title}):Ku(t,e.number??1,l.title),
|
|
283
|
+
/* @__PURE__ */P(f,{style:n("questions",e.variant==="kicker"&&"questionsAfterKicker"),children:l.questions.map((e,t)=>
|
|
284
|
+
/* @__PURE__ */R(f,{style:[fp,{marginLeft:-c}],children:[
|
|
285
|
+
/* @__PURE__ */P(Text,{style:[...r("questions"),{width:c,textAlign:"right"}],accessibilityElementsHidden:true,importantForAccessibility:"no",children:`${t+1}. `}),
|
|
286
|
+
/* @__PURE__ */P(Text,{style:[...r("questions"),Lu],children:e})]},e))}),s===""?null:/* @__PURE__ */R(m,{onPress:()=>e.onToggle(l.questions),accessibilityRole:"button",accessibilityState:{selected:a},accessibilityLabel:s,style:tc(n("add",a&&"addOn"),ec.add,false),testID:"health-plan-add-to-visit",children:[o("add",a&&"addOn"),
|
|
287
|
+
/* @__PURE__ */P(Text,{tier:"control",style:r("add",a&&"addOn"),children:s})]}),e.children]});return e.variant==="kicker"?d:/* @__PURE__ */P(f,{style:n("sec"),testID:"health-plan-checkup",children:d})}function HealthPlanExtras(e){let t=_u(e),{S:n}=t,r=n.X,{bx:i,tx:o,tb:l,im:a,mod:s,ink:c,side:d}=n.D;/* @__PURE__ */
|
|
288
|
+
return R(f,{style:i("extras"),testID:"health-plan-extras",children:[
|
|
289
|
+
/* @__PURE__ */P(Text,{style:l("extrasTitle"),accessibilityRole:"header",children:e.title}),e.items.map(({extra:e,price:u,on:p,label:h,onPress:g})=>{let y=s("extra",e.kind);/* @__PURE__ */
|
|
290
|
+
return R(f,{style:i("extra",y),children:[e.imageUrl?Uu(e.imageUrl,a("extraImage",y==="extraKit"&&"extraKitImage")):e.icon?/* @__PURE__ */P(f,{style:i("extraIcon"),children:t.icon(e.icon,c("extraIcon",n.palette.teal),d("extraIconSvg",26))}):null,
|
|
291
|
+
/* @__PURE__ */R(f,{style:Xs(r.extra,1),children:[
|
|
292
|
+
/* @__PURE__ */R(f,{style:{minHeight:e.imageUrl||e.icon?Number(r.extraImage.box.height??0):0},children:[
|
|
293
|
+
/* @__PURE__ */P(Text,{style:l("extraTitle",e.kind==="kit"&&"extraTitleSerif"),children:e.title}),e.body?/* @__PURE__ */P(Text,{style:l("extraBody"),children:e.body}):null,u?/* @__PURE__ */R(f,{style:i("extraPrice"),children:[
|
|
294
|
+
/* @__PURE__ */P(Text,{style:o("extraPriceValue"),children:u}),e.was?/* @__PURE__ */P(Text,{style:o("extraPriceWas"),children:e.was}):null,Vu(t,e.tag)]}):null]}),
|
|
295
|
+
/* @__PURE__ */P(m,{onPress:g,accessibilityRole:"button",accessibilityState:{selected:p},accessibilityLabel:h,style:tc([...i("extraGo",p&&"extraGoOn"),{marginTop:Number(r.extraGo.box.marginTop??0)+Number(r.extra.box.rowGap??0)},ju,Wu],ec.extraGo,false),children:/* @__PURE__ */P(Text,{tier:"control",style:o("extraGo",p&&"extraGoOn"),children:h})})]})]},e.key)})]})}function ConnectedHealthPlanToolbar(){let e=ep();if(e===null||!e.hp.shop)return null;let{hp:t}=e;/* @__PURE__ */
|
|
296
|
+
return P(HealthPlanToolbar,{eyebrow:void 0,cartCount:t.lineCount,onOpenOrders:()=>t.push({kind:"orders"}),onOpenCart:()=>t.push({kind:"cart"})})}function ConnectedHealthPlanToast(){let e=ep();return e===null?null:/* @__PURE__ */P(HealthPlanToast,{message:e.hp.toast})}function ConnectedHealthPlanHeader(){let e=ep();if(e===null)return null;let{design:t}=e.props,n=e.recordsMissing&&t.subtitleNoRecords?t.subtitleNoRecords:t.subtitle;/* @__PURE__ */
|
|
297
|
+
return P(HealthPlanHeader,{eyebrow:t.eyebrow||void 0,title:t.title,subtitle:n,imageUrl:t.headImageUrl})}function ConnectedHealthPlanBlanks(){let e=ep();if(e===null||!e.blanksShown||e.blanksFacts===null)return null;let{copy:t,hp:n,blanksFacts:r,noPick:i}=e,o=e.props.design.pick,l=n.kg,a=r.phase==="filled",s=r.weightKg,c=o.dose?.stats.some(e=>e.kind!==void 0)===true,d=(i?void 0:c?o.dose?.stats.find(e=>e.kind==="dose"):o.dose?.stats[0])??(i||o.doseLabel===void 0?void 0:{value:null,label:o.doseLabel}),u=[{key:"weight",lead:t.blanksWeight,value:!a||s===null?null:String(l?Math.round(s*10)/10:Math.round(s*Zc)),trail:` ${l?t.weightUnitKg:t.weightUnit}`,source:t.blanksWeightSource},...d===void 0?[]:[{key:"dose",lead:"",value:a&&n.weightKnown?d.value:null,trail:` ${t.blanksDose(d.label,e.props.item.title)}`,source:t.blanksDoseSource,width:"s"}],{key:"shots",lead:t.blanksShots,value:a&&r.nextShotsAt!==null?kp(r.nextShotsAt,e.props.locale):null,trail:"",source:t.blanksShotsSource,width:"l"}],p=u.filter(e=>e.value!==null).length;/* @__PURE__ */
|
|
298
|
+
return P(HealthPlanBlanks,{phase:r.phase,kicker:a?t.blanksFilledKicker:r.clinicName!==null?t.blanksAsked(r.clinicName):t.blanksAskedNoClinic,pill:a?t.blanksFilled(p,u.length):t.blanksWaitPill,rows:u,blankLabel:t.blankEmpty,label:t.blanksLabel,flashKey:n.flashKey})}function ConnectedHealthPlanWaitCard(){let e=ep();if(e===null)return null;if(e.waitNode!==null)/* @__PURE__ */return P(f,{style:e.kit.S.D.bx("wait"),children:e.waitNode});let t=e.props.design.wait;return t?/* @__PURE__ */P(HealthPlanWaitCard,{wait:t,onAction:e.props.onWaitAction,vetName:e.vet?.name??null}):null}function ConnectedHealthPlanByline(){let e=ep();return e===null||!e.byline||e.waiting?null:/* @__PURE__ */P(HealthPlanByline,{vet:e.byline})}function ConnectedHealthPlanFocusCard(){let e=ep(),t=e?.props.design.focus;if(e===null||!t||e.waiting)return null;let{hp:n}=e,r=t.jump&&!e.noPick?{title:t.jump.title,go:t.jump.go,kicker:n.pr.box===null&&!n.canSubscribe?null:e.copy.jumpKicker(n.pr,n.active),imageUrl:e.props.item.imageUrl,onJump:e.jump}:null;/* @__PURE__ */
|
|
299
|
+
return P(HealthPlanFocusCard,{focus:t,vet:e.vet,jump:r})}function ConnectedHealthPlanTips(){let e=ep(),t=e?.props.design.routine;return e===null||!t||e.waiting||e.numbers.routine===void 0?null:/* @__PURE__ */P(HealthPlanTips,{routine:t,number:e.numbers.routine,vetShortName:e.vet?.shortName??null,pageWidth:e.pageWidth??void 0})}function ConnectedHealthPlanReviews(){let e=ep(),t=e?.props.design.pick.reviews;return e===null||!t||t.items.length===0?null:/* @__PURE__ */P(HealthPlanReviews,{reviews:t,pageWidth:e.pageWidth??void 0})}function ConnectedHealthPlanWhyItFits(){let e=ep(),t=e?.props.design.pick.why;return e===null||!t||t.rows.length===0?null:/* @__PURE__ */P(HealthPlanWhyItFits,{why:t})}function ConnectedHealthPlanDoseCard(){let e=ep();if(e===null||e.otherSpecies)return null;let{copy:t}=e;if(e.askWeight)/* @__PURE__ */return P(HealthPlanAskRow,{icon:"pulse",title:t.addWeightTitle,body:t.addWeightBody,onPress:e.hp.openWeight,testID:"health-plan-add-weight",inSection:true});let n=e.props.design.pick.dose;return n?/* @__PURE__ */P(HealthPlanDoseCard,{dose:n}):null}function ConnectedHealthPlanIngredients(){let e=ep(),t=e?.props.design.pick.ingredients;return e===null||!t||t.items.length===0?null:/* @__PURE__ */P(HealthPlanIngredients,{ingredients:t})}function ConnectedHealthPlanBuyOptions(){let e=ep();if(e===null||!e.hp.canSubscribe||!e.hp.priced)return null;let{hp:t}=e;/* @__PURE__ */
|
|
300
|
+
return P(HealthPlanBuyOptions,{mode:t.buyMode,onModeChange:t.setMode,prices:t.pr,offer:t.offer})}function ConnectedHealthPlanBuyButton(){let e=ep();if(e===null)return null;let{hp:t,copy:n,props:r,pickInCart:i}=e,{pr:o,priced:l,buyMode:a,sub:s}=t,c=r.item,d=s.phase==="loading"&&r.subscriptions!==false;return t.shop?/* @__PURE__ */P(HealthPlanBuyButton,{label:i?n.viewCart:l?n.addToCart((a==="sub"?o.first:o.once)??""):E.addToCart,onPress:()=>t.addToCart(c,a),disabled:d||!l&&!i}):/* @__PURE__ */P(HealthPlanBuyButton,{label:a==="sub"?n.subscribe:l?n.buyOnce(o):n.buyOnceOption,onPress:t.press,disabled:d||t.redirecting||t.everfur&&!l||!t.everfur&&!t.canSubscribe&&!t.partnerBuys})}function ConnectedHealthPlanProof(){let e=ep(),t=e?.props.design.pick.proof;return e===null||!t||e.hp.active?null:/* @__PURE__ */P(HealthPlanProof,{text:t})}function ConnectedHealthPlanTrustRow(){let e=ep();return e===null||e.trust.length===0?null:/* @__PURE__ */P(HealthPlanTrustRow,{items:e.trust})}function ConnectedHealthPlanSubscribedBox(){let e=ep();if(e===null)return null;let{hp:t}=e,n=t.subscription;return!t.active||n===null?null:/* @__PURE__ */P(HealthPlanSubscribedBox,{prices:t.pr,nextBoxDay:t.nextBoxDay(n),onManage:()=>t.openSheet({kind:"manage"})})}function ConnectedHealthPlanPickParts(){/* @__PURE__ */
|
|
301
|
+
return R(z,{children:[
|
|
302
|
+
/* @__PURE__ */P(ConnectedHealthPlanReviews,{}),
|
|
303
|
+
/* @__PURE__ */P(ConnectedHealthPlanWhyItFits,{}),
|
|
304
|
+
/* @__PURE__ */P(ConnectedHealthPlanDoseCard,{}),
|
|
305
|
+
/* @__PURE__ */P(ConnectedHealthPlanIngredients,{}),
|
|
306
|
+
/* @__PURE__ */P(ConnectedHealthPlanBuyOptions,{}),
|
|
307
|
+
/* @__PURE__ */P(ConnectedHealthPlanBuyButton,{}),
|
|
308
|
+
/* @__PURE__ */P(ConnectedHealthPlanProof,{}),
|
|
309
|
+
/* @__PURE__ */P(ConnectedHealthPlanTrustRow,{}),
|
|
310
|
+
/* @__PURE__ */P(ConnectedHealthPlanSubscribedBox,{})]})}function ConnectedHealthPlanProductPick(e){let t=ep();if(t===null||t.waiting||t.pickHidden)return null;if(t.noPick)/* @__PURE__ */return P(HealthPlanNoPick,{text:t.copy.noPick});let{item:n,design:r,onMore:i}=t.props;/* @__PURE__ */
|
|
311
|
+
return P(HealthPlanProductPick,{item:n,pick:r.pick,number:t.numbers.pick??1,viewRef:t.pickRef,onMore:i?()=>{Xt(i,n)}:void 0,children:e.children===void 0?/* @__PURE__ */P(ConnectedHealthPlanPickParts,{}):e.children})}function ConnectedHealthPlanOtherItems(){let e=ep(),t=e?.props.others??[];if(e===null||t.length===0||e.waiting||e.noPick||e.curated)return null;let{hp:n,copy:r,petName:i}=e,o=t.map(e=>{let t=n.fmt(e.price,e.currency),o={petName:i,productName:e.title,first:t,box:t,once:t,onceDiscountPercent:0,intervalDays:0,discountPercent:0,offer:false};return n.shop?{item:e,buyLabel:n.inCart(e.productId)?r.viewCart:t===null?E.addToCart:r.addToCart(t),buyDisabled:t===null,onBuy:()=>n.addToCart(e,"once")}:{item:e,buyLabel:t===null?r.buyOnceOption:r.buyOnce(o),buyDisabled:n.redirecting||n.everfur&&t===null||!n.everfur&&!n.partnerBuys,onBuy:()=>n.pressOther(e)}});/* @__PURE__ */
|
|
312
|
+
return P(HealthPlanOtherItems,{items:o,showCategory:e.props.showCategory})}function ConnectedHealthPlanCheckup(e){let t=ep(),n=t?.props.design.checkup;if(t===null||n===void 0)return null;let{hp:r,copy:i}=t,o=r.added,l=t.recordsMissing||r.noVet?o?i.savedForCheckup:i.saveForCheckup:o?n.added:n.add;/* @__PURE__ */
|
|
313
|
+
return P(HealthPlanCheckup,{checkup:n,added:o,addLabel:l,onToggle:r.toggleAdded,variant:e.variant,number:t.numbers.checkup,children:e.children})}function ConnectedHealthPlanConnectRecords(e){let t=ep();if(t===null)return null;let n=t.props.onConnectRecords;if(!((t.recordsMissing||t.hp.noVet)&&n&&!t.blanksShown))return null;let{copy:r}=t;/* @__PURE__ */
|
|
314
|
+
return P(HealthPlanAskRow,{icon:"file",title:r.connectRecordsTitle,body:r.connectRecordsBody,onPress:()=>{Xt(n)},testID:"health-plan-connect-records",inSection:e.inSection===true})}function ConnectedHealthPlanSigns(){let e=ep();if(e===null||e.waiting)return null;let{design:t}=e.props;if(t.signs){let n=e.hp.noVet?e.copy.callAVet:e.recordsMissing?e.copy.callYourVet:void 0;/* @__PURE__ */
|
|
315
|
+
return R(HealthPlanSigns,{signs:t.signs,number:e.numbers.signs??1,callVetTitle:n,children:[
|
|
316
|
+
/* @__PURE__ */P(ConnectedHealthPlanCheckup,{variant:"kicker"}),
|
|
317
|
+
/* @__PURE__ */P(ConnectedHealthPlanConnectRecords,{inSection:true})]})}return t.checkup?/* @__PURE__ */P(ConnectedHealthPlanCheckup,{variant:"section",children:/* @__PURE__ */P(ConnectedHealthPlanConnectRecords,{inSection:true})}):/* @__PURE__ */P(ConnectedHealthPlanConnectRecords,{})}function ConnectedHealthPlanExtras(){let e=ep(),t=e?.props.design.extras;if(e===null||!t||!e.extrasShown)return null;let{hp:n,copy:r}=e,i=[];for(let t of e.extraItems){let o=e.extraProduct(t);if(o===void 0&&e.props.onExtra===void 0)continue;let l=o!==void 0?n.shop&&n.inCart(o.productId)!==void 0:n.extras.has(t.key),a=t.price??(o!==void 0?n.fmtWhole(o.price,o.currency):null),s=o!==void 0&&l?r.viewCart:l?t.added:t.action;i.push({extra:t,price:a,on:l,label:s,onPress:()=>n.pressExtra(t.key,o,l)})}/* @__PURE__ */
|
|
318
|
+
return P(HealthPlanExtras,{title:t.title,items:i})}function ConnectedHealthPlanFine(){let e=ep(),t=e?.props.design.fine;return e===null||!t?null:/* @__PURE__ */P(HealthPlanFine,{text:t})}function kp(e,t){let n=new Date(e);try{return new Intl.DateTimeFormat(t??"en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}).format(n)}catch{return n.toISOString().slice(0,10)}}function wp(e,t){let{ink:n,side:r}=e.S.D;return e.icon(t,n("nextIcon",e.S.X.roles.link??""),r("nextIconSvg",19))}function vp(e){let{bx:t,ink:n,side:r}=e.S.D;/* @__PURE__ */
|
|
319
|
+
return P(f,{style:t("doneCheck"),children:e.icon("check",n("doneCheck",e.S.palette.ink),r("doneCheckSvg",38))})}function xp(e,t){let{bx:n,tx:r,tb:i,im:o}=e.S.D,l=e.S.X,a=t.imageUrl?Uu(t.imageUrl,o("nextIconImage")):wp(e,t.icon);/* @__PURE__ */
|
|
320
|
+
return R(f,{style:n("nextRow"),children:[
|
|
321
|
+
/* @__PURE__ */P(f,{style:[...n("nextIcon"),Xs(l.nextRow,0),t.product===true?{overflow:"hidden"}:null],children:a}),
|
|
322
|
+
/* @__PURE__ */R(f,{style:Xs(l.nextRow,1),children:[
|
|
323
|
+
/* @__PURE__ */P(Text,{style:r("nextLabel"),children:t.when}),
|
|
324
|
+
/* @__PURE__ */P(Text,{style:i("nextText"),children:t.what})]})]},t.key)}function HealthPlanStarted(e){let t=_u(e),{bx:n,tb:r}=t.S.D;/* @__PURE__ */
|
|
325
|
+
return R(f,{style:n("done"),children:[vp(t),
|
|
326
|
+
/* @__PURE__ */P(Text,{style:r("doneTitle"),accessibilityRole:"header",children:e.title}),e.what.trim()===""?null:/* @__PURE__ */P(Text,{style:r("doneWhen"),children:e.what}),e.note?/* @__PURE__ */P(Text,{style:r("doneWho"),children:e.note}):null,
|
|
327
|
+
/* @__PURE__ */P(f,{style:n("next"),accessibilityLabel:t.copy.startedSteps,children:e.steps.map(e=>xp(t,e))})]})}function HealthPlanPlaced(e){let t=_u(e),{copy:n}=t,{bx:r,tb:i}=t.S.D;/* @__PURE__ */
|
|
328
|
+
return R(f,{style:r("done"),testID:"health-plan-placed",children:[vp(t),
|
|
329
|
+
/* @__PURE__ */P(Text,{style:i("doneTitle"),accessibilityRole:"header",children:e.title}),e.arrives===null?null:/* @__PURE__ */P(Text,{style:i("doneWhen"),children:n.arrivesBy(e.arrives)}),e.orderNumber===null?null:/* @__PURE__ */P(Text,{style:i("doneWho"),children:n.orderTitle(e.orderNumber)}),
|
|
330
|
+
/* @__PURE__ */P(f,{style:r("next"),accessibilityLabel:n.placedSteps,children:e.rows.map(e=>xp(t,e))}),e.total!==null?wc(t,e.total):null,e.note?/* @__PURE__ */P(Text,{style:i("shopFine","shopFineCenter"),children:e.note}):null]})}function HealthPlanCart(e){let t=_u(e);return Hc(t,e.lines,e.subtotal,e.renew,e.petPrices,e.handlers)}function HealthPlanOrders(e){let t=_u(e);return Pc(t,e)}function HealthPlanOrder(e){let t=_u(e);return zc(t,e)}function HealthPlanBackRow(e){let t=_u(e),{S:n,copy:r}=t;/* @__PURE__ */
|
|
331
|
+
return R(m,{onPress:e.onBack,accessibilityRole:"button",accessibilityLabel:r.back,style:n.back,testID:"health-plan-back",children:[
|
|
332
|
+
/* @__PURE__ */P(f,{style:{transform:[{scaleX:-1}]},children:t.icon("chev")}),
|
|
333
|
+
/* @__PURE__ */P(Text,{tier:"control",style:n.toolLabel,children:r.back})]})}var Sp={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",borderWidth:0},Tp=/* @__PURE__ */new Set(["position","top","bottom","left","right","zIndex"]),Cp=12;function HealthPlanSheetFrame(e){let t=_u(e),n=w(),{S:r,copy:i,icon:o,still:l}=t,a=e.onClose,s=e.children??null,c=e.kicker,{bx:d,tx:u,ink:p,side:h}=r.D,g=D(),b=Object.fromEntries(Object.entries(r.X.sheet.box).filter(([e])=>!Tp.has(e))),T=Math.max(Number(b.paddingBottom??0),g.bottom+Cp),C=rl();/* @__PURE__ */
|
|
334
|
+
return P(PlanLinger,{motions:[pl,l?fl:ul],draw:s===null?null:([e,t])=>/* @__PURE__ */P(v,{visible:true,transparent:true,animationType:"none",onRequestClose:a,testID:"health-plan-sheet",children:/* @__PURE__ */P(x,{behavior:S.OS==="ios"?"padding":void 0,style:{flex:1},testID:"health-plan-sheet-keyboard",children:/* @__PURE__ */R(f,{style:[r.scrim,{backgroundColor:"transparent"}],children:[
|
|
335
|
+
/* @__PURE__ */P(y.View,{pointerEvents:"none",style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:r.palette.scrim,opacity:e}}),
|
|
336
|
+
/* @__PURE__ */P(m,{style:{flex:1},onPress:a,accessibilityRole:"button",accessibilityLabel:i.close}),
|
|
337
|
+
/* @__PURE__ */R(y.View,{style:[il(b,C),{paddingBottom:T},l||t===void 0?{opacity:t}:{transform:[{translateY:t.interpolate({inputRange:[0,1],outputRange:[n.height,0]})}]}],accessibilityViewIsModal:true,children:[
|
|
338
|
+
/* @__PURE__ */P(f,{style:d("sheetGrab")}),
|
|
339
|
+
/* @__PURE__ */R(f,{style:d("sheetTop"),children:[
|
|
340
|
+
/* @__PURE__ */P(Text,{tier:"compact",style:u("sheetKicker"),children:c}),
|
|
341
|
+
/* @__PURE__ */P(m,{onPress:a,accessibilityRole:"button",accessibilityLabel:i.close,style:d("sheetClose"),testID:"health-plan-sheet-close",children:o("x",p("sheetClose",r.palette.ink),h("sheetCloseSvg",22))})]}),
|
|
342
|
+
/* @__PURE__ */P(k,{keyboardShouldPersistTaps:"handled",children:s})]})]})})})})}var Ip={width:"100%",height:"100%"};function Hp(e,t,n){let{bx:r,tb:i}=e.S.D;/* @__PURE__ */
|
|
343
|
+
return R(f,{style:r("coProduct"),children:[
|
|
344
|
+
/* @__PURE__ */P(f,{style:[...r("coProductImage"),Xs(e.S.X.coProduct,0)],children:t.imageUrl?Uu(t.imageUrl,Ip,"contain"):null}),
|
|
345
|
+
/* @__PURE__ */R(f,{style:Xs(e.S.X.coProduct,1),children:[
|
|
346
|
+
/* @__PURE__ */P(Text,{style:i("coProductTitle"),children:t.title}),n===""?null:/* @__PURE__ */P(Text,{style:i("coProductLine"),children:n})]})]})}function Fp(e,t,n,r,i){let{bx:o,tx:l,inner:a}=e.S.D;/* @__PURE__ */
|
|
347
|
+
return R(f,{style:o("every"),accessibilityRole:"radiogroup",accessibilityLabel:e.copy.shipsEvery,children:[a("every"),t.map((t,a)=>/* @__PURE__ */P(m,{onPress:r?void 0:()=>i(t),disabled:r,accessibilityRole:"radio",accessibilityState:{checked:n===t,disabled:r},accessibilityLabel:e.copy.days(t),style:[...o("everyButton",n===t&&"everyButtonOn"),Xs(e.S.X.every,a),{justifyContent:"center"}],testID:`health-plan-every-${t}`,children:/* @__PURE__ */P(Text,{style:l("everyButton",n===t&&"everyButtonOn"),numberOfLines:1,adjustsFontSizeToFit:true,children:e.copy.days(t)})},t))]})}function Rp(e,t){let n=e.S.X,{bx:r,tx:i,inner:o}=e.S.D,l=n.coOptionHit.grid[0],a=(typeof l=="number"?l:0)+(typeof n.coOptionHit.box.columnGap=="number"?n.coOptionHit.box.columnGap:0);/* @__PURE__ */
|
|
348
|
+
return R(f,{style:r("coOption",t.on&&"coOptionOn"),children:[o("coOption",t.on&&"coOptionOn"),
|
|
349
|
+
/* @__PURE__ */R(m,{onPress:t.onPress,accessibilityRole:"radio",accessibilityState:{checked:t.on},accessibilityLabel:t.label,style:[...r("coOptionHit"),{flexWrap:"wrap"}],testID:t.testID,children:[
|
|
350
|
+
/* @__PURE__ */P(f,{style:[...r("coRadio"),Xs(n.coOptionHit,0)],children:o("coRadio",t.on&&"coRadioOn")}),
|
|
351
|
+
/* @__PURE__ */P(Text,{style:[...i("coOptionStrong"),Xs(n.coOptionHit,1)],children:t.label}),
|
|
352
|
+
/* @__PURE__ */R(f,{style:Xs(n.coOptionHit,2),children:[
|
|
353
|
+
/* @__PURE__ */P(Text,{style:i("coOptionPrice"),children:t.price??""}),t.was===null?null:/* @__PURE__ */P(Text,{style:i("coOptionPriceWas"),children:t.was})]}),t.line===null?null:/* @__PURE__ */P(Text,{style:[...i("coOptionSmall"),{width:"100%",paddingLeft:a}],children:t.line})]}),t.after]})}function HealthPlanCheckoutSheet(e){let t=_u(e),{S:n,copy:r}=t,{bx:i,tb:o}=n.D,l=e.prices,a=e.mode==="sub",s=a?l.first:l.once,c=[a?r.renews(l):r.onceFine,r.checkoutNote].filter(e=>e!=="").join(" ");/* @__PURE__ */
|
|
354
|
+
return R(f,{style:i("co"),testID:"health-plan-checkout-sheet",children:[
|
|
355
|
+
/* @__PURE__ */P(Text,{style:Sp,accessibilityRole:"header",testID:"health-plan-checkout-title",children:r.checkoutTitle(l)}),Hp(t,e.item,e.line),
|
|
356
|
+
/* @__PURE__ */R(f,{style:i("coOptions"),accessibilityRole:"radiogroup",accessibilityLabel:r.optionsLabel,children:[Rp(t,{on:a,label:r.subscribe,price:l.first,was:e.offer?l.box:null,line:e.offer?r.checkoutOffer(l):null,onPress:()=>e.onModeChange("sub"),testID:"health-plan-co-sub",after:a?/* @__PURE__ */R(f,{style:i("coWhen"),children:[
|
|
357
|
+
/* @__PURE__ */P(Text,{style:o("coKicker"),children:r.shipsEvery}),Fp(t,e.intervals,e.every,e.busy,e.onEveryChange)]}):null}),Rp(t,{on:!a,label:r.buyOnceOption,price:l.once,was:l.onceDiscountPercent>0?l.box:null,line:e.oneBoxOffer?r.onceOffer(l):null,onPress:()=>e.onModeChange("once"),testID:"health-plan-co-once"})]}),kc(t,e.rows),yc(t,r.checkoutGo(l,a,s??""),e.onConfirm,{disabled:e.confirmDisabled,testID:"health-plan-checkout-go",part:"coButton"}),c===""?null:/* @__PURE__ */P(Text,{style:o("coFine"),children:c})]})}function HealthPlanManageSheet(e){let t=_u(e),{S:n,copy:r}=t,{bx:i,tb:o}=n.D,l=e.prices,a=e.onSeeOrders??null;/* @__PURE__ */
|
|
358
|
+
return R(f,{style:i("co"),testID:"health-plan-manage-sheet",children:[
|
|
359
|
+
/* @__PURE__ */P(Text,{style:n.h3,accessibilityRole:"header",children:r.manageTitle(l)}),Hp(t,e.item,r.subscribedLine(l,e.nextBoxDay)),
|
|
360
|
+
/* @__PURE__ */R(f,{children:[
|
|
361
|
+
/* @__PURE__ */P(Text,{style:o("coKicker"),children:r.shipsEvery}),Fp(t,e.intervals,e.every,e.busy,e.onEveryChange)]}),yc(t,r.skip,e.onSkip,{ghost:true,disabled:e.busy,testID:"health-plan-skip"}),bc(t,r.cancel,e.onCancel,"health-plan-cancel"),a!==null?bc(t,r.seeOrders,a,"health-plan-manage-orders"):null]})}function HealthPlanCartCheckout(e){let t=_u(e);return Fc(t,e.lines,e.lineTotal,e.rows,e.total,e.renew,e.place,e.fine)}function HealthPlanWeightSheet(e){let t=_u(e),{S:r,copy:i}=t,{bx:o,tx:l,tb:a,inner:s}=r.D,[c,d]=n(false);/* @__PURE__ */
|
|
362
|
+
return R(f,{style:{gap:12},testID:"health-plan-weight-sheet",children:[
|
|
363
|
+
/* @__PURE__ */P(Text,{style:r.h3,accessibilityRole:"header",children:i.weightTitle(e.prices)}),
|
|
364
|
+
/* @__PURE__ */P(Text,{style:a("sheetBody"),children:i.weightBody}),
|
|
365
|
+
/* @__PURE__ */R(f,{style:o("weightField"),children:[
|
|
366
|
+
/* @__PURE__ */P(Text,{style:l("weightField"),children:i.weightField}),
|
|
367
|
+
/* @__PURE__ */R(f,{style:o("weightInputWrap"),children:[
|
|
368
|
+
/* @__PURE__ */P(h,{value:e.value,onChangeText:e.onChange,keyboardType:"decimal-pad",placeholder:"0.0",accessibilityLabel:i.weightField,onSubmitEditing:e.onSave,onFocus:()=>d(true),onBlur:()=>d(false),style:[...o("weightInput"),...l("weightInput")],testID:"health-plan-weight-input"}),s("weightInput",c&&"weightInputFocus"),
|
|
369
|
+
/* @__PURE__ */P(f,{pointerEvents:"none",style:[...o("weightUnit"),{top:0,bottom:0,justifyContent:"center"}],children:/* @__PURE__ */P(Text,{style:l("weightUnit"),children:e.unit==="kg"?i.weightUnitKg:i.weightUnit})})]})]}),e.error===""?null:/* @__PURE__ */P(Text,{style:a("weightError"),accessibilityLiveRegion:"polite",testID:"health-plan-weight-error",children:e.error}),
|
|
370
|
+
/* @__PURE__ */P(f,{style:o("weightActions"),children:yc(t,i.weightSave,e.onSave,{disabled:e.saving,testID:"health-plan-weight-save"})})]})}var Pp="Pay with";function zp(e,t){let{hp:n,copy:r,props:i,rows:o}=e,{sheet:l,quote:a,subscription:s,sub:c,redirecting:d}=n,u=i.item,p=i.design.pick;if(l===null||t!==void 0&&l.kind!==t)return null;let h=a?.intervalOptions??s?.intervalOptions??[];if(l.kind==="checkout"&&a!==null)return{kicker:r.checkoutKicker,body:/* @__PURE__ */P(HealthPlanCheckoutSheet,{item:u,line:p.checkoutLine??p.line??u.description??"",prices:n.prices(l.every),mode:l.mode,every:l.every,intervals:h,offer:n.offer,oneBoxOffer:n.oneBox!==null,rows:o,busy:c.busy,confirmDisabled:c.busy||d,onModeChange:e=>n.openSheet({...l,mode:e}),onEveryChange:e=>n.openSheet({...l,every:e}),onConfirm:()=>{n.confirmCheckout()}})};if(l.kind==="manage"&&s!==null&&n.active)return{kicker:r.manageKicker,body:/* @__PURE__ */P(HealthPlanManageSheet,{item:u,prices:n.prices(s.intervalDays),nextBoxDay:n.nextBoxDay(s),every:s.intervalDays,intervals:h,busy:c.busy,onEveryChange:n.changeInterval,onSkip:()=>{n.skip()},onCancel:()=>{n.cancel()},onSeeOrders:n.shop?n.seeOrdersFromManage:null})};if(l.kind==="cartCheckout"&&n.batch.length>0){let{fmt:e,currency:t,lines:i,unitOf:l,isPick:a,itemOf:s}=n,u=e(n.batchTotal,t)??"";return{kicker:r.checkoutKicker,body:/* @__PURE__ */P(HealthPlanCartCheckout,{lines:n.batch.map(n.lineView),lineTotal:n=>{let r=i.find(e=>e.productId===n.key),o=r===void 0?null:l(r);return o===null||r===void 0?null:e(Math.round(o*r.qty*100)/100,a(r.productId)?t:s(r.productId)?.currency??t)},rows:o,total:u,renew:n.batchRenew,place:{label:r.placeOrder(u,n.batchSub!==null),disabled:!n.cartReady||c.busy||d,onPress:()=>{n.placeCart()}},fine:[r.cartFine(n.batchRenew),n.apart?r.cartSubscriptionApart:"",r.checkoutNote].filter(e=>e!=="").join(" ")})}}return l.kind==="weight"?{kicker:r.weightKicker,body:/* @__PURE__ */P(HealthPlanWeightSheet,{prices:n.pr,value:n.weightInput,onChange:n.setWeightInput,error:n.weightError,saving:n.savingWeight,unit:n.kg?"kg":"lb",onSave:()=>{n.saveWeight()}})}:null}function ConnectedHealthPlanSheet(){let e=ep();if(e===null)return null;let t=zp(e);/* @__PURE__ */
|
|
371
|
+
return P(HealthPlanSheetFrame,{kicker:t?.kicker??"",onClose:e.hp.closeSheet,children:t?.body??null})}function ConnectedHealthPlanCheckoutSheet(){let e=ep();return e===null?null:zp(e,"checkout")?.body??null}function ConnectedHealthPlanManageSheet(){let e=ep();return e===null?null:zp(e,"manage")?.body??null}function ConnectedHealthPlanCartCheckout(){let e=ep();return e===null?null:zp(e,"cartCheckout")?.body??null}function ConnectedHealthPlanWeightSheet(){let e=ep();return e===null?null:zp(e,"weight")?.body??null}function ConnectedHealthPlanStarted(){let e=ep(),t=e?.hp.started??null;if(e===null||t===null)return null;let{hp:n,copy:r,props:i}=e,o=i.design.pick,l=t.kind==="sub"?t.sub:null,a=t.kind==="sub"?t.sub.productId:t.order.productId,s=n.planItems.find(e=>e.productId===a)??i.item,c=n.prices(l?.intervalDays??n.every,s.title),d=(e,t)=>e.step==="first_box_ships"&&t?r.tomorrow:n.day(e.on)??e.on,u=l===null?[{icon:"truck",when:r.tomorrow,what:r.firstBoxShips}]:l.timeline.map((e,t)=>{switch(e.step){case"first_box_ships":return{icon:"truck",when:d(e,t===0),what:r.firstBoxShips};case"checkin":return{icon:"chat",when:d(e,false),what:r.checkin(o.checkin??null)};case"refill_reminder":return{icon:"repeat",when:d(e,false),what:r.refill};default:return{icon:"calendar",when:d(e,false),what:r.nextBoxShips(c)}}});/* @__PURE__ */
|
|
372
|
+
return P(HealthPlanStarted,{title:l===null?r.orderedTitle(c):r.startedTitle(c),what:r.startedWhat(c),note:r.startedNote,steps:u.map(e=>({key:`${e.icon}${e.when}`,...e}))})}function ConnectedHealthPlanCart(){let e=ep();if(e===null||e.hp.started!==null||e.hp.top?.kind!=="cart")return null;let{hp:t}=e;/* @__PURE__ */
|
|
373
|
+
return P(HealthPlanCart,{lines:t.views,subtotal:t.fmt(t.cartTotal,t.currency)??"",renew:t.renewPrices,petPrices:t.pr,handlers:{onQuantity:t.stepQuantity,onRemove:t.removeLine,onMode:(e,n)=>t.editLine(e,e=>({...e,mode:n,qty:1})),onEvery:(e,n)=>t.editLine(e,e=>({...e,every:n})),onOrders:()=>t.push({kind:"orders"})}})}function Dp(e){let{hp:t,props:n}=e,r=t.subscription;return r!==null&&t.active?{name:r.title??n.item.title,imageUrl:n.item.imageUrl??null,next:t.nextBoxDay(r),every:r.intervalDays,onManage:()=>t.openSheet({kind:"manage"})}:null}function ConnectedHealthPlanOrders(){let e=ep();if(e===null||e.hp.started!==null||e.hp.top?.kind!=="orders")return null;let{hp:t}=e,n=e.props.locale;/* @__PURE__ */
|
|
374
|
+
return P(HealthPlanOrders,{subscription:Dp(e),orders:e.allOrders,loaded:t.everfurOrders.loaded,fmt:(e,n)=>t.fmt(e,n),day:e=>lc(e,n),onOpen:e=>t.push({kind:"order",key:e}),onBack:t.closeOverlays,petPrices:t.pr,more:t.everfurOrders.next===null?null:{onMore:t.moreOrders,loading:t.everfurOrders.loading}})}function ConnectedHealthPlanOrder(){let e=ep(),t=e?.hp.top;if(e===null||e.hp.started!==null||t?.kind!=="order")return null;let{hp:n,copy:r,props:i}=e,o=e.allOrders.find(e=>e.key===t.key);if(o===void 0)return null;let l=o.everfur===true&&o.productId!==null?n.itemOf(o.productId):void 0,a=i.onOrderHelp;/* @__PURE__ */
|
|
375
|
+
return P(HealthPlanOrder,{order:o,fmt:(e,t)=>n.fmt(e,t),day:e=>lc(e,i.locale),rows:e.rows.map(e=>e.label===Pp?{...e,label:r.paidWith}:e),onBuyAgain:l===void 0?null:()=>n.addToCart(l,"once"),onHelp:a?()=>{Xt(a,o.key)}:null})}function $p(e){let t=[...new Set(e.filter(e=>e!=null))];return t.length===1?t[0]??null:null}function ConnectedHealthPlanPlaced(){let e=ep(),t=e?.hp.top;if(e===null||e.hp.started!==null||t?.kind!=="placed")return null;let{hp:n,copy:r,props:i}=e,o=t.orders,l=o[0],a=n.prices(n.every,l?.title??(l?n.itemOf(l.productId)?.title:void 0)??i.item.title),s=$p(o.map(e=>e.tracking?.orderNumber)),c=o.length>0&&o.every(e=>e.tracking?.estimatedDelivery)?$p(o.map(e=>e.tracking?.estimatedDelivery)):null,d=n.day(c),u=$p(o.map(e=>e.currency)),p=u===null?null:n.fmt(Math.round(o.reduce((e,t)=>e+(t.total??t.price),0)*100)/100,u),h=[...o.map(e=>{let t=n.itemOf(e.productId);return{key:e.orderId,icon:"box",imageUrl:t?.imageUrl??null,when:r.cartItemQuantity(e.quantity??1),what:e.title??t?.title??"",product:true}}),{key:"ships",icon:"truck",when:r.tomorrow,what:n.withTracking(r.placedShips)},...d===null?[]:[{key:"arrives",icon:"calendar",when:d,what:r.placedArrives}]];/* @__PURE__ */
|
|
376
|
+
return P(HealthPlanPlaced,{title:r.orderedTitle(a),arrives:d,orderNumber:s,rows:h,total:o.length>1&&p!==null?p:null,note:r.startedNote})}var Op=e=>/* @__PURE__ */Object.freeze(e.map(e=>/* @__PURE__ */Object.freeze(e)));function Bp(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}function _p(e){let t=e?.focus;if(!t)return Op([]);let n=e?.byline,r=t.risk?.kind,i=r==="risk"||r==="watch"||r==="clear"?r:void 0;return Op([Bp({kicker:t.kicker,sources:t.sources?.map(e=>({label:e.label,kind:e.kind==="dna"?"dna":"records"})),title:t.title,signals:t.risk?[{key:"risk",lead:t.risk.lead,text:t.risk.body??"",tone:i,dot:i===void 0?"space":true}]:[],score:t.odds?{label:t.odds.label,tag:t.odds.tag,was:t.odds.from,now:t.odds.to,since:t.odds.toLabel}:void 0,quote:t.quote&&n?{text:t.quote.text,by:n.shortName??void 0,image:n.imageUrl??null,tag:t.quote.tag}:void 0})])}function Lp(e){let t=e?.routine?.steps??[],n=e?.byline?.shortName;return Op(t.map((e,t)=>Bp({key:e.title,number:String(t+1),title:e.title,text:e.body||void 0,foot:e.fromVet?n?jc.fromVet(n):void 0:e.source??void 0,tone:e.tone??"y"})))}function Ep(e,t){return formatHealthPlanPrice(e.price,e.currency,t)??void 0}function Ap(e,t){return Op(e.map(e=>Bp({key:e.productId,name:e.title,image:e.imageUrl,imageAlt:e.title,kicker:e.category??void 0,price:Ep(e,t),badge:e.sample?E.sample:void 0})))}var jp="everfur.slot/1";var Wp=/* @__PURE__ */Symbol("bad");function Mp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Np(e,t,n){return typeof e=="string"&&e.length>=t&&e.length<=n?e:Wp}function Up(e,t){return e==null?void 0:Np(e,0,t)}function qp(e){return e===void 0?{}:Mp(e)?e:Wp}function Vp(e){let t=qp(e);if(t===Wp)return Wp;for(let e of Object.values(t))if(typeof e!="string")return Wp;return t}function Gp(e,t,n){return typeof e=="number"&&Number.isInteger(e)&&e>=t&&e<=n?e:Wp}function Kp(e){if(e==null)return;if(e==="hide")return"hide";if(!Mp(e))return Wp;let t=Np(e.type,1,64),n=Up(e.variant,64),r=qp(e.settings),i=Vp(e.bind),o=Vp(e.actions);return t===Wp||n===Wp||r===Wp||i===Wp||o===Wp?Wp:/* @__PURE__ */Object.freeze({type:t,...n?{variant:n}:{},settings:/* @__PURE__ */Object.freeze({...r}),bind:/* @__PURE__ */Object.freeze({...i}),actions:/* @__PURE__ */Object.freeze({...o})})}function Xp(e){if(e==null)return;if(!Mp(e))return Wp;let t=Np(e.source,0,80);return t===Wp||e.op!=="present"&&e.op!=="absent"?Wp:/* @__PURE__ */Object.freeze({source:t,op:e.op})}function Yp(e){if(!Mp(e))return Wp;let t=Np(e.id,1,64),n=Np(e.type,1,64),r=Up(e.variant,64),i=qp(e.settings),o=Vp(e.bind),l=Up(e.repeat,80),a=Xp(e.visibleIf),s=Vp(e.actions),c=Kp(e.fallback);return t===Wp||n===Wp||r===Wp||i===Wp||o===Wp||l===Wp||a===Wp||s===Wp||c===Wp?Wp:/* @__PURE__ */Object.freeze({id:t,type:n,...r?{variant:r}:{},settings:/* @__PURE__ */Object.freeze({...i}),bind:/* @__PURE__ */Object.freeze({...o}),...l?{repeat:l}:{},...a?{visibleIf:a}:{},actions:/* @__PURE__ */Object.freeze({...s}),...c?{fallback:c}:{}})}var Jp=/^everfur\.slot\/(\d{1,4})$/,Qp=/<\s*[A-Za-z/!?]|&[A-Za-z#][A-Za-z0-9]*;/,Zp=/[\u0000-\u0008\u000b-\u001f\u007f\u2028\u2029]/,eh=/^[a-z][a-zA-Z0-9]*(\.[a-zA-Z0-9]+){0,4}$/,th=/^#[0-9a-fA-F]{6}$/,nh=1e4;function rh(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t+=1:r<2048?t+=2:r>=55296&&r<=56319&&n+1<e.length?(t+=4,n++):t+=3}return t}function ih(e){return e.trim()!==""&&!Qp.test(e)&&!Zp.test(e)}function oh(e){try{return rh(JSON.stringify(e)??"")}catch{return Number.POSITIVE_INFINITY}}function lh(e){let t=e!==null&&typeof e=="object"?e.schema:void 0;if(typeof t!="string")return"unparseable";let n=Jp.exec(t);return n===null?"unparseable":Number(n[1])>1?"newer_schema":null}function ah(e){let t={};for(let[n,r]of Object.entries(e))eh.test(n)&&(typeof r=="string"&&th.test(r)||typeof r=="number"&&Number.isFinite(r)&&Math.abs(r)<=nh)&&(t[n]=r);/* @__PURE__ */
|
|
377
|
+
return Object.freeze(t)}function sh(e){let t={};for(let[n,r]of Object.entries(e)){let e=typeof r=="string"?r:r!==null&&typeof r=="object"?r.text:void 0;typeof e=="string"&&e.length<=500&&ih(e)&&(t[n]=e)}/* @__PURE__ */
|
|
378
|
+
return Object.freeze(t)}function ch(e,t){if(oh(e)>65536)return{ok:false,reason:"too_large"};let n=lh(e);if(n!==null)return{ok:false,reason:n};let r=e,i=Np(r.slot,3,64),o=r.docVersion===void 0||r.docVersion===null?null:Gp(r.docVersion,1,Number.MAX_SAFE_INTEGER),l=r.minBlocks===void 0?1:Gp(r.minBlocks,0,50),a=r.theme===void 0||r.theme===null?{}:qp(r.theme),s=a===Wp?Wp:qp(a.tokens),c=qp(r.copy),d=Array.isArray(r.parts)&&r.parts.length>=1&&r.parts.length<=50?r.parts.map(Yp):Wp;return i===Wp||o===Wp||l===Wp||s===Wp||c===Wp?{ok:false,reason:"unparseable"}:d===Wp||d.some(e=>e===Wp)?{ok:false,reason:"unparseable"}:i!==t?{ok:false,reason:"wrong_slot"}:{ok:true,doc:/* @__PURE__ */Object.freeze({schema:jp,slot:i,docVersion:o,minBlocks:l,tokens:ah(s),parts:/* @__PURE__ */Object.freeze(d),copy:sh(c)})}}function dh(e){if(e===null)return{ok:false,reason:"too_large"};if(typeof e!="string")return{ok:true,raw:e};if(e.length>65536||rh(e)>65536)return{ok:false,reason:"too_large"};try{return{ok:!0,raw:JSON.parse(e)}}catch{return{ok:false,reason:"unparseable"}}}function uh(e){/* @__PURE__ */
|
|
379
|
+
return Object.freeze({settings:{},bind:{},actions:{},...e})}var ph=/* @__PURE__ */Object.freeze({focus:uh({id:"focus",type:"PlanNeedCard",variant:"plan",bind:{title:"data:plan.needs"}}),needs:uh({id:"needs",type:"PlanNeedCard",variant:"standard",repeat:"data:plan.needs"}),tips:uh({id:"tips",type:"TipCard",variant:"plan",repeat:"data:plan.tips"}),shelf:uh({id:"shelf",type:"ProductTile",variant:"standard",repeat:"data:plan.items"}),cartLines:uh({id:"cart-lines",type:"CartLine",variant:"plan",repeat:"data:cart.lines"}),cartSummary:uh({id:"cart-summary",type:"PriceSummary",bind:{rows:"data:cart.summary"},visibleIf:{source:"data:cart.summary",op:"present"}}),orders:uh({id:"orders",type:"OrderRow",variant:"quiet",repeat:"data:orders.recent"})});function hh(e,t){/* @__PURE__ */
|
|
380
|
+
return Object.freeze({schema:jp,slot:e,docVersion:null,minBlocks:1,tokens:{},parts:/* @__PURE__ */Object.freeze([...t]),copy:{}})}var gh=ph,fh=/* @__PURE__ */Object.freeze({"health_plan.focus":hh("health_plan.focus",[gh.focus,gh.tips]),"today.health":hh("today.health",[gh.focus,gh.tips]),"shop.shelf":hh("shop.shelf",[gh.shelf]),"shop.cart":hh("shop.cart",[gh.cartLines,gh.cartSummary]),"shop.orders":hh("shop.orders",[gh.orders])});function mh(e){return Object.prototype.hasOwnProperty.call(fh,e)?fh[e]??null:null}function yh(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function bh(e){let t=3421674724,n=2216829733;for(let r of yh(e)){n=(n^r)>>>0;let e=n*435,i=Math.floor(e/4294967296),o=e>>>0;t=t*435+i+n*256>>>0,n=o}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var kh=/* @__PURE__ */new WeakMap;function wh(e){return kh.get(e)}var vh="sha256-0IDdNTQTtW2+pJ9GBCa/aWJrH/lf2X2jHhTQaCt6g5E=";var xh={CartBar:{since:"0.4.0",variants:["standard","web"],platforms:["native","web"],settings:{lines:{type:"lines",values:["thumbs","total","sub","actionHiddenWord"]},variant:{type:"enum",values:["standard","web"],prop:"variant"}},props:["actionAccessibilityLabel","actionHiddenWord","actionLabel","busy","count","countLabel","disabled","fallback","loading","loadingLabel","sub","testID","thumbs","total","variant","visible"],required:["actionLabel","count"],fallback:"hide"},CartLine:{since:"0.2.0",variants:["standard","square","web","plan","drawer"],platforms:["native","web"],settings:{align:{type:"enum",values:["top","center"],prop:"align"},lines:{type:"lines",values:["badge","meta","wasPrice","smalls","note","metas","plan"]},thumbSize:{type:"enum",values:["sm","md","lg"],prop:"thumbSize"},variant:{type:"enum",values:["standard","square","web","plan","drawer"],prop:"variant"}},props:["actions","align","badge","error","fallback","image","imageAlt","loading","loadingLabel","meta","metas","name","namePress","note","plan","price","quantity","removeLabel","smalls","testID","thumbSize","variant","wasPrice"],required:["name"],fallback:null},CheckinSheet:{since:"0.4.0",variants:[],platforms:["native","web"],settings:{lines:{type:"lines",values:["kicker","note","doneText"]}},props:["action","closeLabel","doneText","fallback","flowLabel","image","imageKind","kicker","loading","loadingLabel","note","open","steps","testID","title"],required:["steps"],fallback:"hide"},OrderRow:{since:"0.2.0",variants:["standard","quiet","web"],platforms:["native","web"],settings:{actionGrid:{type:"boolean",prop:"actionGrid"},lines:{type:"lines",values:["meta","total","status","shots","notes"]},variant:{type:"enum",values:["standard","quiet","web"],prop:"variant"}},props:["accessibilityLabel","actionGrid","actions","error","loading","loadingLabel","meta","metaLink","notes","number","shots","status","testID","title","total","variant"],required:["title"],fallback:null},PlanNeedCard:{since:"0.2.0",variants:["standard","plan"],platforms:["native","web"],settings:{lines:{type:"lines",values:["source","sources","title","score","quote","jump"]},variant:{type:"enum",values:["standard","plan"],prop:"variant"}},props:["jump","kicker","loading","loadingLabel","more","quote","score","signals","source","sources","testID","title","variant"],required:["kicker","signals"],fallback:null},PriceSummary:{since:"0.2.0",variants:[],platforms:["native","web"],settings:{lines:{type:"lines",values:["total","note"]},size:{type:"enum",values:["checkout","drawer"],prop:"size",platforms:["web"],default:"checkout"},variant:{type:"enum",values:["standard","web"],prop:"variant",platforms:["web"],default:"standard"}},props:["loading","loadingLabel","note","rows","testID","total"],required:["rows"],fallback:null},ProductTile:{since:"0.2.0",variants:["standard","blend","web"],platforms:["native","web"],settings:{addLift:{type:"boolean",prop:"addLift"},ground:{type:"enum",values:["shelf","white"],prop:"ground"},imageInset:{type:"enum",values:["standard","even"],prop:"imageInset"},layout:{type:"enum",values:["tile","row","card"],prop:"layout"},lines:{type:"lines",values:["kicker","meta","price","wasPrice","per","badge","tag"]},metaTone:{type:"enum",values:["auto","autoDark"],prop:"metaTone"},variant:{type:"enum",values:["standard","blend","web"],prop:"variant"}},props:["action","addLift","badge","fallback","ground","image","imageAlt","imageInset","kicker","layout","loading","loadingLabel","meta","metaTone","name","per","price","stepper","tag","testID","variant","wasPrice"],required:["name"],fallback:null},ScoreLights:{since:"0.4.0",variants:[],platforms:["native","web"],settings:{lines:{type:"lines",values:["heading","since","source","next"]}},props:["heading","loading","loadingLabel","next","pill","since","source","state","testID","values","vizLabel"],required:["pill","state","values","vizLabel"],fallback:"hide"},SummaryList:{since:"0.1.0",variants:["standard","flush","card","inset"],platforms:["native","web"],settings:{lines:{type:"lines",values:["trailingRows","note"]},variant:{type:"enum",values:["standard","flush","card","inset"],prop:"variant"}},props:["loading","loadingLabel","note","rows","testID","total","trailingRows","variant"],required:["rows"],fallback:null},TipCard:{since:"0.2.0",variants:["standard","photo","web","plan"],platforms:["native","web"],settings:{footArrow:{type:"boolean",prop:"footArrow"},lines:{type:"lines",values:["text","foot"]},tone:{type:"enum",values:["y","c","g","r"],prop:"tone"},variant:{type:"enum",values:["standard","photo","web","plan"],prop:"variant"}},props:["accessibilityLabel","foot","footArrow","footPress","icon","image","loading","loadingLabel","number","pressTarget","testID","text","title","tone","variant"],required:["number","title"],fallback:null},WeatherAlert:{since:"0.4.0",variants:[],platforms:["native","web"],settings:{},props:["accessibilityLabel","loading","loadingLabel","testID","text","title"],required:["title"],fallback:"TipCard",fallbackProps:{number:{const:"!"},text:{from:"text"},title:{from:"title"},tone:{const:"r"}}},WeatherCard:{since:"0.4.0",variants:["walk","summary","tile","web"],platforms:["native","web"],settings:{lines:{type:"lines",values:["heading","condition","details","verdict","advice","comfort","label","note","action","units","tags"]},sky:{type:"enum",values:["sun","blue"],prop:"sky"},variant:{type:"enum",values:["walk","summary","tile","web"],prop:"variant"}},props:["action","advice","comfort","condition","details","glyph","heading","label","level","loading","loadingLabel","note","sky","tags","tagsLabel","temperature","testID","units","variant","verdict"],required:["temperature"],fallback:"hide"},WeatherDetails:{since:"0.4.0",variants:[],platforms:["native","web"],settings:{},props:["items","label","loading","loadingLabel","testID"],required:["items"],fallback:"hide"},WeatherForecast:{since:"0.4.0",variants:["plain","walk"],platforms:["native","web"],settings:{variant:{type:"enum",values:["plain","walk"],prop:"variant"}},props:["days","label","loading","loadingLabel","testID","variant"],required:["days"],fallback:"hide"},WeatherHours:{since:"0.4.0",variants:["plain","walk"],platforms:["native","web"],settings:{lines:{type:"lines",values:["windows","legend"]},variant:{type:"enum",values:["plain","walk"],prop:"variant"}},props:["hours","label","legend","loading","loadingLabel","testID","variant","windows"],required:["hours"],fallback:"hide"},WeatherLevels:{since:"0.4.0",variants:["phone","web"],platforms:["native","web"],settings:{variant:{type:"enum",values:["phone","web"],prop:"variant"}},props:["label","loading","loadingLabel","rows","testID","variant"],required:["rows"],fallback:"hide"},WeatherReading:{since:"0.4.0",variants:["phone","web"],platforms:["native","web"],settings:{lines:{type:"lines",values:["word","choices"]},variant:{type:"enum",values:["phone","web"],prop:"variant"}},props:["choices","loading","loadingLabel","testID","tone","value","variant","word"],required:["value"],fallback:"hide"},WhySheet:{since:"0.4.0",variants:["standard","web","plan"],platforms:["native","web"],settings:{lines:{type:"lines",values:["kind","sub","sections","link","score"]},tone:{type:"enum",values:["calm","y","c","g","r"],prop:"tone"},variant:{type:"enum",values:["standard","web","plan"],prop:"variant"}},props:["action","closeLabel","fallback","heading","image","imageKind","kind","link","loading","loadingLabel","rows","score","sections","sub","testID","title","tone","variant"],required:[],fallback:"hide"}};var Sh="everfur.slots.v2",Th="everfur.slots.installId.v2";var Ch=6e4,Ih=3e5,Hh=15e3,Fh=10080*60*1e3,Rh=/^(W\/)?"[^"]{1,200}"$/,Ph=/^[A-Za-z0-9_-]{8,128}$/,zh=/(?:^|,)\s*max-age\s*=\s*"?(\d{1,10})"?\s*(?:,|$)/i,Dh=/(?:^|,)\s*(?:no-store|no-cache)\s*(?:,|$)/i,$h=/* @__PURE__ */Object.freeze({doc:"default",tenant:"default",epoch:0});function Oh(){let e="";for(let t=0;t<4;t++)e+=Math.floor(Math.random()*4294967296).toString(36).padStart(7,"0");return e}function Bh(e){if(e===null)return Ch;if(Dh.test(e))return 0;let t=zh.exec(e);return t===null?Ch:Math.min(Number(t[1])*1e3,Ih)}var _h=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function Lh(e){let t=e.now??Date.now,n=()=>{try{return e.scope?.()??$h}catch{return $h}},r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Map,o=/* @__PURE__ */new Map,l=null,a=null,s=false,c=Promise.resolve(),d=(t,n)=>{try{e.telemetry?.track(t,n)}catch{}},u=e=>{a!==e.epoch&&(a!==null&&(r.clear(),i.clear(),l=null,s=true),a=e.epoch)},p=e=>{let t=n();return t.epoch!==e.epoch||t.doc!==e.doc},h=async(t,n,r)=>{if(!p(t))return false;try{await e.kv.getItem(n)===r&&await e.kv.removeItem(n)}catch{}return true},g=t=>{let n=bh(t.tenant);if(l?.tenant===n)return l.id;let r=s;s=false;let i=(async()=>{if(!r)try{let t=await e.kv.getItem(Th),r=t===null?null:JSON.parse(t);if(r?.tenant===n&&typeof r.id=="string"&&Ph.test(r.id))return r.id}catch{}try{let r=(e.newId??Oh)();if(!Ph.test(r))return null;let i=JSON.stringify({tenant:n,id:r});return await e.kv.setItem(Th,i),await h(t,Th,i)?null:r}catch{return null}})();return l={tenant:n,id:i},i},f=async t=>{try{let n=await e.kv.getItem(Sh),r=n===null?null:JSON.parse(n);return r?.scope!==t||r.docs===null||typeof r.docs!="object"||Array.isArray(r.docs)?{docs:{}}:{docs:r.docs}}catch{return{docs:{}}}},m=async(e,n)=>{let r=await f(bh(e.doc)),i=_h(r.docs,n)?r.docs[n]:void 0;if(i==null||typeof i.at!="number")return null;let o=t()-i.at;if(!(o<Fh)||o<-Ih)return null;let l=ch(i.doc,n);if(!l.ok)return null;let a=typeof i.etag=="string"&&Rh.test(i.etag)?i.etag:null;return{doc:l.doc,etag:a}},y=(t,n,r)=>{let i=bh(t.doc);return c=c.then(async()=>{if(!p(t))try{let o=await f(i);if(p(t))return;let l={...o.docs},a=r(_h(l,n)?l[n]:void 0);if(a===null?delete l[n]:l[n]=a,Object.keys(l).length===0)await e.kv.removeItem(Sh);else{let n=JSON.stringify({scope:i,docs:l});await e.kv.setItem(Sh,n),await h(t,Sh,n)}}catch{}}),c},b=async(n,o)=>{let l=`${n.doc}|${o}`,a=r.get(l),s=a===void 0?await m(n,o):null,c=a!==void 0?{doc:a.doc,etag:a.etag}:s,u=await g(n),h={"x-everfur-blocks":e.blocks??vh};u!==null&&(h["x-everfur-install-id"]=u),c?.doc&&c.etag!==null&&(h["if-none-match"]=c.etag);let f=null,b=Ch,k=await e.send("slots.read",{method:"GET",path:`/widget/v1/slots/${encodeURIComponent(o)}`,headers:h,rawText:65536,onResponseHeaders:e=>{let t=e("etag");f=t!==null&&Rh.test(t)?t:null,b=Bh(e("cache-control"))}}).catch(()=>null),w=()=>c?.doc?{doc:c.doc,source:a!==void 0?"cache":"last-known-good"}:{doc:null,source:"bundled"},v=e=>(i.set(l,t()),d("slots.read_failed",{slot:o,status:e}),w());if(p(n))return{doc:null,source:"bundled"};if(k===null)return v(null);if(k.ok){let e=dh(k.value);if(!e.ok)return d("slots.refused",{slot:o,reason:e.reason}),w();let i=ch(e.raw,o);if(!i.ok)return d("slots.refused",{slot:o,reason:i.reason}),w();let a=t();return r.set(l,{doc:i.doc,etag:f,at:a,ttl:b}),await y(n,o,()=>({etag:f,doc:e.raw,at:a})),{doc:i.doc,source:"live"}}let x=k.error.httpStatus;if(x===304&&c?.doc){let e=t();return r.set(l,{doc:c.doc,etag:c.etag,at:e,ttl:b}),await y(n,o,t=>t===void 0?null:{...t,at:e}),{doc:c.doc,source:"live"}}return x===404?(r.set(l,{doc:null,etag:null,at:t(),ttl:b}),await y(n,o,()=>null),{doc:null,source:"bundled"}):v(x??null)},k=(e,n)=>{let i=r.get(`${e.doc}|${n}`);return i===void 0||t()-i.at>=i.ttl?null:i.doc===null?{doc:null,source:"bundled"}:{doc:i.doc,source:"cache"}},w=async(e,t)=>{let n=r.get(`${e.doc}|${t}`);if(n!==void 0)return n.doc===null?{doc:null,source:"bundled"}:{doc:n.doc,source:"cache"};let i=await m(e,t);return i===null?{doc:null,source:"bundled"}:{doc:i.doc,source:"last-known-good"}};return{peek(e){let t=n();return u(t),k(t,e)},stored(e){let t=n();return u(t),w(t,e).catch(()=>({doc:null,source:"bundled"}))},load(e){let r=n();u(r);let l=k(r,e);if(l!==null)return Promise.resolve(l);let a=`${r.doc}|${e}`,s=`${r.epoch}|${a}`,c=o.get(s);if(c!==void 0)return c;let d=i.get(a),p=(d!==void 0&&t()-d<Hh?w(r,e):b(r,e)).catch(()=>({doc:null,source:"bundled"})).finally(()=>o.delete(s));return o.set(s,p),p}}}function Eh(e){let t=wh(e)??"unknown",n=e.registry.services.authFor(null),r=n.mode==="personalized"?`u:${n.userRef??""}`:`a:${n.userRef??""}`;return{doc:`${t}|${r}`,tenant:t,epoch:e.scopeEpoch??0}}var Ah=/* @__PURE__ */Symbol.for("@everfur/sdk#SlotClients@v1");function jh(e,t=Wh){let n=globalThis,r=n[Ah];r instanceof WeakMap||(r=/* @__PURE__ */new WeakMap,n[Ah]=r);let i=r,o=i.get(e);return o===void 0&&(o=t(e),i.set(e,o)),o}function Wh(e){let{services:t}=e.registry;return Lh({send:(e,n)=>createRequestFunnel({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}}).send(e,n),kv:t.kv,telemetry:t.telemetry,scope:()=>Eh(e)})}function Mh(e,t){return{doc:t.doc??mh(e),source:t.source}}function Nh(e,t){let{runtime:r,scopeEpoch:i}=le(),l=t?jh(r):null,[a,s]=n(()=>{let t=l?.peek(e);return t?{slot:e,epoch:i,value:Mh(e,t)}:null});return o(()=>{if(l===null)return;let t=true,n=false,r=l.peek(e);if(r!==null){s({slot:e,epoch:i,value:Mh(e,r)});return}return l.stored(e).then(r=>{t&&!n&&s({slot:e,epoch:i,value:Mh(e,r)})}),l.load(e).then(r=>{n=true,t&&s({slot:e,epoch:i,value:Mh(e,r)})}),()=>{t=false}},[l,e,i]),t?a!==null&&a.slot===e&&a.epoch===i?a.value:{doc:null,source:"pending"}:{doc:mh(e),source:"bundled"}}function Uh(e){return{knows(t,n){let r=Object.prototype.hasOwnProperty.call(xh,t)?xh[t]:void 0;if(r===void 0||!r.platforms.includes(e))return false;if(n===void 0)return true;let i=r.settings.variant;return n===i?.default?true:r.variants.includes(n)?i?.platforms===void 0||i.platforms.includes(e):false}}}function qh(e){return{id:e.id,...e.repeat?{repeat:e.repeat}:{},...e.visibleIf?{visibleIf:e.visibleIf}:{}}}function Vh(e,t){if(t.knows(e.type,e.variant))return e;if(e.fallback==="hide")return null;let n=Xh(e,t);if(n!==null)return n;let r=Object.prototype.hasOwnProperty.call(xh,e.type)?xh[e.type]:void 0,i=r?.fallback??null;if(i===null||i==="hide"||!t.knows(i))return null;let o=xh[i];if(r?.fallbackProps!==void 0&&o!==void 0)return Kh(e,r,i,o);let l={};for(let[t,n]of Object.entries(e.bind))o?.props.includes(t)&&(l[t]=n);return{...qh(e),type:i,settings:{},bind:l,actions:{}}}function Gh(e,t){return e.type==="boolean"?typeof t=="boolean":e.type==="enum"?typeof t=="string"&&(e.values??[]).includes(t):e.type==="lines"?Array.isArray(t)&&new Set(t).size===t.length&&t.every(t=>typeof t=="string"&&(e.values??[]).includes(t)):false}function Kh(e,t,n,r){let i={},o={},l={},a;for(let[n,s]of Object.entries(t.fallbackProps??{})){if("from"in s){Object.prototype.hasOwnProperty.call(e.bind,s.from)&&(i[n]=e.bind[s.from]);continue}let t=s.const;if(n==="variant"){typeof t=="string"&&r.variants.includes(t)&&(a=t);continue}let c=Object.entries(r.settings).find(([e,t])=>e!=="variant"&&t.prop===n);c!==void 0&&Gh(c[1],t)?o[c[0]]=t:typeof t=="string"&&(l[n]=t)}let s=/* @__PURE__ */new Set([...Object.keys(i),...Object.keys(l),...Object.keys(o).map(e=>r.settings[e]?.prop)]);return a!==void 0&&s.add("variant"),r.required.some(e=>!s.has(e))?null:{...qh(e),type:n,...a!==void 0?{variant:a}:{},settings:o,bind:i,actions:{},...Object.keys(l).length>0?{fixed:l}:{}}}function Xh(e,t){let n=e.fallback;return n===void 0||n==="hide"||!t.knows(n.type,n.variant)?null:{...qh(e),type:n.type,...n.variant?{variant:n.variant}:{},settings:n.settings,bind:n.bind,actions:n.actions}}function Yh(e,t){let n=[];for(let r of e.parts){let e=Vh(r,t);e!==null&&n.push(e)}return n.length===0||n.length<e.minBlocks?null:n}var Jh=/* @__PURE__ */Object.freeze(["everfur.com","www.everfur.com","docs.everfur.com"]),Qh=/* @__PURE__ */Object.freeze(["chat","health_plan","plan.detail","records","shop","shop.cart","shop.orders","visit"]),Zh=/* @__PURE__ */Object.freeze(["health_plan.checkout","health_plan.manage","health_plan.weight"]),eg=/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*){0,4}$/,tg=/^https:\/\/([A-Za-z0-9.-]+)(?:[/?#][^\s]*)?$/,ng=512;function rg(e){if(e.length>ng)return false;let t=tg.exec(e);return t!==null&&Jh.includes((t[1]??"").toLowerCase())}function ig(e){if(typeof e!="string")return null;let t=e.indexOf(":");if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);switch(n){case"navigate":return Qh.includes(r)?{kind:n,route:r}:null;case"open_sheet":return Zh.includes(r)?{kind:n,id:r}:null;case"track":return eg.test(r)?{kind:n,event:r}:null;case"external":return rg(r)?{kind:n,url:r}:null;default:return null}}var og=/* @__PURE__ */Object.freeze({"plan.needs":"list","plan.tips":"list","plan.items":"list","cart.lines":"list","cart.summary":"item","orders.recent":"list"});function lg(e){return Object.prototype.hasOwnProperty.call(og,e)}function ag(e){if(e===void 0)return null;let t=e.indexOf(":");if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);return r===""?null:n==="data"?lg(r)?{kind:n,name:r}:null:n==="item"||n==="copy"?{kind:n,name:r}:null}var sg=/* @__PURE__ */new Set(["action","actions","busy","disabled","error","fallback","footPress","link","loading","loadingLabel","metaLink","namePress","next","open","quantity","stepper","testID","visible"]),cg=/* @__PURE__ */Object.freeze({CartBar:["actionLabel","actionAccessibilityLabel","actionHiddenWord","countLabel","sub","total"],CartLine:["name","imageAlt","meta","price","wasPrice","removeLabel","note"],CheckinSheet:["kicker","title","flowLabel","doneText","closeLabel"],OrderRow:["number","title","meta","total","accessibilityLabel"],PlanNeedCard:["kicker","source","title"],PriceSummary:["note"],ProductTile:["name","imageAlt","kicker","meta","price","wasPrice","per","badge"],ScoreLights:["heading","pill","since","vizLabel"],SummaryList:["note"],TipCard:["number","title","text","foot","accessibilityLabel"],WeatherAlert:["title","text","accessibilityLabel"],WeatherCard:["heading","temperature","condition","details","verdict","advice","label","note","tagsLabel"],WeatherDetails:["label"],WeatherForecast:["label"],WeatherHours:["label"],WeatherLevels:["label"],WeatherReading:["value","word"],WhySheet:["kind","title","sub","heading","closeLabel"]}),dg=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function ug(e){return e==null||e===""?false:!Array.isArray(e)||e.length>0}function pg(e,t){return dg(e,t)?e[t]:void 0}function hg(e,t,n){let r=e.visibleIf;if(r===void 0)return true;let i=ag(r.source);if(i===null)return false;if(i.kind==="item")return true;let o=i.kind==="data"?ug(pg(t,i.name)):dg(n,i.name);return r.op==="present"?o:!o}function gg(e,t){let n=ag(e.visibleIf?.source);if(n?.kind!=="item")return true;let r=ug(t[n.name]);return e.visibleIf?.op==="present"?r:!r}function fg(e,t,n,r,i){let o=xh[e.type],l=o?.props??[],a=cg[e.type]??[],s={};for(let e of l)dg(t,e)&&!sg.has(e)&&t[e]!==void 0&&(s[e]=t[e]);for(let[i,o]of Object.entries(e.bind)){if(!l.includes(i)||sg.has(i))continue;let e=ag(o);if(e===null)continue;let c,d=i;if(e.kind==="copy"){if(!a.includes(i))continue;c=dg(r,e.name)?r[e.name]:void 0,d=""}else if(e.kind==="item")d=e.name,c=dg(t,d)?t[d]:void 0;else{let t=pg(n,e.name)?.[0];c=t!==void 0&&dg(t,i)?t[i]:void 0}e.kind!=="copy"&&d!==i&&!(a.includes(i)&&typeof c=="string")||(c===void 0?delete s[i]:s[i]=c)}for(let[t,n]of Object.entries(e.fixed??{}))l.includes(t)&&!sg.has(t)&&(s[t]=n);e.variant!==void 0&&l.includes("variant")&&(s.variant=e.variant);for(let[t,n]of Object.entries(e.settings)){let e=o?.settings[t];if(!(e===void 0||e.platforms!==void 0&&!e.platforms.includes(i)))if(e.type==="lines"){if(!Array.isArray(n))continue;for(let t of e.values??[])n.includes(t)||delete s[t]}else e.prop!==void 0&&l.includes(e.prop)&&(e.type==="boolean"&&typeof n=="boolean"||e.type==="enum"&&typeof n=="string"&&(e.values??[]).includes(n))&&(s[e.prop]=n)}return s}function mg(e,t){let n=e.key;return typeof n=="string"&&n!==""?`${n}#${t}`:String(t)}function yg(e,t){let n=xh[e];return n!==void 0&&n.required.every(e=>t[e]!==void 0&&t[e]!==null)}function bg(e,t,n,r="native"){if(xh[e.type]===void 0||!hg(e,t,n))return null;let i=ag(e.repeat),o;if(e.repeat!==void 0){if(i?.kind!=="data")return null;o=pg(t,i.name)??[]}else{let n=Object.values(e.bind).map(e=>ag(e)).find(e=>e?.kind==="data");if(n){let e=pg(t,n.name)?.[0];o=e===void 0?[]:[e]}else o=[{}]}let l=[],a=0;if(o.forEach((i,o)=>{if(!gg(e,i))return;let s=fg(e,i,t,n,r);yg(e.type,s)?l.push({key:mg(i,o),props:/* @__PURE__ */Object.freeze(s)}):a+=1}),l.length===0&&a===0)return null;let s={};for(let[t,n]of Object.entries(e.actions)){let e=ig(n);e!==null&&(s[t]=e)}return{part:e,blocks:l,incomplete:a,actions:s}}function kg(e){let t=Uh("native");return{knows:(n,r)=>Object.prototype.hasOwnProperty.call(e,n)&&t.knows(n,r)}}function wg(e,t,n){let r=kg(n);if(e!==null){let t=Yh(e,r);if(t!==null)return t}let i=mh(t);return i===null?[]:Yh(i,r)??[]}var vg=new Set(Object.keys(_l.colors)),xg=new Set(Object.keys(_l.radius)),Sg=new Set(Object.keys(_l.space));function Tg(e){let t={},n={},r={};for(let[i,o]of Object.entries(e)){let[e,l,a]=i.split(".");l===void 0||a!==void 0||((e==="color"||e==="colors")&&typeof o=="string"&&vg.has(l)?t[l]=o:e==="radius"&&typeof o=="number"&&o>=0&&xg.has(l)?n[l]=o:e==="space"&&typeof o=="number"&&o>=0&&Sg.has(l)&&(r[l]=o))}let i={};return Object.keys(t).length>0&&(i.colors=t),Object.keys(n).length>0&&(i.radius=n),Object.keys(r).length>0&&(i.space=r),Object.keys(i).length===0?null:i}function Cg(e,t,n,r){switch(e.kind){case"navigate":Xt(n.onNavigate,e.route,t);return;case"open_sheet":Xt(n.onOpenSheet,e.id,t);return;case"track":r("slots.track",{slot:t.slot,part:t.part,event:e.event});return;case"external":n.onOpenUrl?Xt(n.onOpenUrl,e.url):I.openURL(e.url).catch(()=>{})}}function Ig(e,t){return e.kind==="navigate"?t.onNavigate!==void 0:e.kind==="open_sheet"?t.onOpenSheet!==void 0:true}function DrawnPart({blocks:e,resolved:n,slot:r,handlers:i,track:o}){let l=Object.prototype.hasOwnProperty.call(e,n.part.type)?e[n.part.type]:void 0;if(l===void 0)return null;let a=n.actions.onPress;/* @__PURE__ */
|
|
381
|
+
return P(z,{children:n.blocks.map(e=>{let s=`everfur-slot-${n.part.id}`,d=t(l,{...e.props,testID:s});if(a===void 0||!Ig(a,i))/* @__PURE__ */return P(c,{children:d},e.key);let u={slot:r,part:n.part.id,key:e.key};/* @__PURE__ */
|
|
382
|
+
return P(m,{accessibilityRole:a.kind==="external"?"link":"button",onPress:()=>Cg(a,u,i,o),testID:`${s}-press`,children:d},e.key)})})}var Hg=/* @__PURE__ */new WeakMap,Fg=e=>bh(JSON.stringify(e)),Rg=class extends u{constructor(){super(...arguments);this.state={failed:false}}static getDerivedStateFromError(){return{failed:true}}componentDidCatch(){try{this.props.onError()}catch{}}render(){return this.state.failed?null:this.props.children}};function SlotParts(e){let{slot:t,data:i,blocks:o,override:l}=e,a=e.handlers??Pg,{runtime:c}=le(),[,d]=n(0),u=r(()=>e.doc===null?null:Fg(e.doc),[e.doc]),p=u!==null&&Hg.get(c)?.has(u)===true?null:e.doc,h=r(()=>wg(p,t,o),[p,t,o]),g=r(()=>kg(o),[o]),f=s({doc:p,parts:/* @__PURE__ */new Set});f.current.doc!==p&&(f.current={doc:p,parts:/* @__PURE__ */new Set});let m=p?.copy??zg,y=r(()=>Tg(p?.tokens??Dg),[p]),b=(e,t)=>{try{c.registry.services.telemetry.track(e,t)}catch{}},k=e=>()=>{if(b("slots.part_failed",{slot:t,part:e.id,bundled:p===null}),p===null||u===null)return;let n=Hg.get(c);n===void 0&&Hg.set(c,n=/* @__PURE__ */new Set),n.add(u),d(e=>e+1)},w=p===null?"b":"d",v=h.map(e=>{let n=`${w}:${e.id}`,r=l?.(e)??null;if(r!==null)/* @__PURE__ */
|
|
383
|
+
return P(Rg,{onError:k(e),children:r},n);let s=bg(e,i,m,"native");if(s!==null&&s.blocks.length===0){f.current.parts.has(e.id)||(f.current.parts.add(e.id),b("slots.part_incomplete",{slot:t,part:e.id,type:e.type}));let n=Xh(e,g),r=n===null?null:bg(n,i,m,"native");s=r!==null&&r.blocks.length>0?r:null}if(s===null)return null;let c=/* @__PURE__ */P(DrawnPart,{blocks:o,resolved:s,slot:t,handlers:a,track:b});/* @__PURE__ */
|
|
384
|
+
return P(Rg,{onError:k(e),children:/* @__PURE__ */P(BlockScope,{children:y===null?c:/* @__PURE__ */P(ThemeProvider,{theme:y,children:c})})},n)});/* @__PURE__ */
|
|
385
|
+
return P(z,{children:v})}var Pg=/* @__PURE__ */Object.freeze({}),zg=/* @__PURE__ */Object.freeze({}),Dg=/* @__PURE__ */Object.freeze({});var $g="health_plan.focus",Og=/* @__PURE__ */Object.freeze({PlanNeedCard:PlanNeedCard,SummaryList:SummaryList,TipCard:TipCard});function Bg(e){return e.variant!=="plan"?null:e.type==="PlanNeedCard"&&e.repeat===void 0&&Object.values(e.bind).includes("data:plan.needs")?/* @__PURE__ */P(ConnectedHealthPlanFocusCard,{}):e.type==="TipCard"&&e.repeat==="data:plan.tips"?/* @__PURE__ */P(ConnectedHealthPlanTips,{}):null}function HealthPlanFocusSlot(){let e=ep(),t=zr(),{doc:n,source:i}=Nh($g,t),o=e?.props.design,l=e?.props.item,a=e?.props.others,s=e?.props.priceFormat?.locale??e?.props.locale,c=e===null||e.waiting,d=r(()=>{if(c||o===void 0)return{};let e=[l,...a??[]].filter(e=>e!==void 0&&e!==me);return{"plan.needs":_p(o),"plan.tips":Lp(o),"plan.items":Ap(e,s)}},[c,o,l,a,s]);return e===null||i==="pending"?null:/* @__PURE__ */P(SlotParts,{slot:$g,doc:n,data:d,blocks:Og,override:Bg})}var _g=12;function HealthPlanFocus(e){/* @__PURE__ */
|
|
386
|
+
return P(HealthPlanFocusProvider,{...e,children:/* @__PURE__ */P(FocusLayout,{})})}function FocusLayout(){let e=Zu(),{props:t,hp:r,kit:i}=e,{S:l,copy:a}=i,c=w(),{started:d,top:u,screens:p,toast:h,title:g,back:m,closeOverlays:y}=r,b=t.onOverlayChange,v=Bc(),x=D(),S=s(null),[T,C]=n(null),I=d!==null?"started":u===void 0?null:u.kind==="order"?`order:${u.key}`:u.kind,H=I!==null;o(()=>{if(!H||v===null){C(null);return}v.measure(({y:e,height:t})=>{let n=Math.max(0,c.height-(e+t)),r=Math.max(0,x.bottom-n);C(e=>e!==null&&e.height===t&&e.under===r?e:{height:t,under:r})})},[H,v,c.height,x.bottom]),o(()=>{T!==null&&I!==null&&v?.top(S.current)},[T===null,I,v]);let{bx:F,tb:$}=l.D,O=/* @__PURE__ */R(f,{style:[...F("root"),t.style],testID:"health-plan-focus",onLayout:t=>e.setPageWidth(Math.round(t.nativeEvent.layout.width)),children:[
|
|
387
|
+
/* @__PURE__ */P(ConnectedHealthPlanToolbar,{}),
|
|
388
|
+
/* @__PURE__ */P(ConnectedHealthPlanToast,{}),
|
|
389
|
+
/* @__PURE__ */P(ConnectedHealthPlanHeader,{}),
|
|
390
|
+
/* @__PURE__ */P(ConnectedHealthPlanBlanks,{}),
|
|
391
|
+
/* @__PURE__ */P(ConnectedHealthPlanWaitCard,{}),
|
|
392
|
+
/* @__PURE__ */P(ConnectedHealthPlanByline,{}),
|
|
393
|
+
/* @__PURE__ */P(HealthPlanFocusSlot,{}),
|
|
394
|
+
/* @__PURE__ */P(ConnectedHealthPlanProductPick,{}),
|
|
395
|
+
/* @__PURE__ */P(ConnectedHealthPlanOtherItems,{}),
|
|
396
|
+
/* @__PURE__ */P(ConnectedHealthPlanSigns,{}),
|
|
397
|
+
/* @__PURE__ */P(ConnectedHealthPlanExtras,{}),
|
|
398
|
+
/* @__PURE__ */P(ConnectedHealthPlanFine,{})]}),B=b===void 0?/* @__PURE__ */P(HealthPlanBackRow,{onBack:m}):null,_=(e,t,n,r,i=null)=>{let o=r===null?null:/* @__PURE__ */P(f,{style:[...F("pushFoot",i),{paddingBottom:Math.max(_g,T?.under??0)}],testID:"health-plan-push-foot",children:r}),a=/* @__PURE__ */R(z,{children:[t===null?null:/* @__PURE__ */P(f,{style:l.screen,children:t}),n]});return T===null?/* @__PURE__ */R(f,{ref:S,testID:e,style:{backgroundColor:l.palette.paper},collapsable:false,children:[a,o]}):/* @__PURE__ */R(f,{ref:S,testID:e,style:{height:T.height,backgroundColor:l.palette.paper},collapsable:false,children:[
|
|
399
|
+
/* @__PURE__ */P(k,{style:{flex:1},keyboardShouldPersistTaps:"handled",testID:"health-plan-push-scroll",children:a}),o]})},L=null;if(d!==null)L=_("health-plan-started",null,/* @__PURE__ */P(ConnectedHealthPlanStarted,{}),yc(i,a.startedDone,r.closeStarted,{testID:"health-plan-started-done",part:"footButton"}));else if(u!==void 0){let e=null,t=null,n=null;if(u.kind==="cart"){let{views:o,cartReady:l}=r;e=/* @__PURE__ */P(ConnectedHealthPlanCart,{}),n=o.length===0?null:"foot",t=o.length===0?yc(i,a.startedDone,y):/* @__PURE__ */R(z,{children:[yc(i,a.checkoutCart(r.fmt(r.cartTotal,r.currency)??""),()=>r.openSheet({kind:"cartCheckout"}),{disabled:!l,testID:"health-plan-cart-checkout"}),!l&&a.cartOneAtATime!==""?/* @__PURE__ */P(Text,{style:$("shopFine","shopFineCenter"),children:a.cartOneAtATime}):null]})}else if(u.kind==="orders")e=/* @__PURE__ */P(ConnectedHealthPlanOrders,{});else if(u.kind==="order")e=/* @__PURE__ */P(ConnectedHealthPlanOrder,{});else{let o=u.kind==="placed"?u.orders:[],l=o[0];e=/* @__PURE__ */P(ConnectedHealthPlanPlaced,{}),n="pushFootStack",t=/* @__PURE__ */R(z,{children:[yc(i,o.length===1?a.viewOrder:a.seeOrders,()=>r.replaceScreens(o.length===1&&l!==void 0?[{kind:"order",key:l.orderId}]:[{kind:"orders"}]),{testID:"health-plan-placed-view"}),yc(i,a.startedDone,y,{ghost:true})]})}let o=b===void 0&&g!==void 0?/* @__PURE__ */P(Text,{style:l.h3,accessibilityRole:"header",children:g}):null;L=_(`health-plan-screen-${u.kind}`,B===null&&o===null&&h===null?null:/* @__PURE__ */R(z,{children:[B,o,
|
|
400
|
+
/* @__PURE__ */P(ConnectedHealthPlanToast,{})]}),
|
|
401
|
+
/* @__PURE__ */P(f,{testID:"health-plan-screen-body",children:e}),t,n)}/* @__PURE__ */
|
|
402
|
+
return R(z,{children:[
|
|
403
|
+
/* @__PURE__ */P(PlanPushes,{id:d!==null?"started":u===void 0?"page":u.kind==="order"?`order:${u.key}`:u.kind,depth:p.length+(d!==null?1:0),node:L??O,width:c.width,paper:l.palette.paper,still:i.still}),
|
|
404
|
+
/* @__PURE__ */P(ConnectedHealthPlanSheet,{})]})}function HealthPlanItemCard(e){let{item:t,onToggle:n,pending:i=false,error:o=null,imageVariant:l=N.imageVariant,reasonVariant:a=N.reasonVariant,priceFormat:s,renderFooter:c,showCategory:d=N.showCategory,cardShadow:u=N.cardShadow,cardBorder:p=N.cardBorder,addButtonSize:h=N.addButtonSize,addButtonFontSize:g,addedVariant:y=N.addedVariant,categoryVariant:b=N.categoryVariant,cardPadding:k,itemTitleSize:w,itemTitleWeight:v,priceSize:x,priceWeight:S,reasonTextSize:C,reasonLabelWidth:I,reasonGap:H,style:F}=Qt(e,["onToggle"]),D=Ko(),$=r(()=>Wg(D),[D]),O=(e,t)=>{let n=X(e),r=n===null||n===0?null:{fontSize:n,lineHeight:Math.round(n*D.type.lineHeight.snug)};return r===null&&t===void 0?null:{...r,...t===void 0?null:{fontWeight:String(t)}}},B=O(w,v),_=O(x,S),L=O(C),A=X(I),W=X(H),M=X(k),U=r(()=>jg(u,$.cardShadow,D),[u,$,D]),q=formatHealthPlanPriceWith(t.price,t.currency,s),V=l==="thumbnail",K=a==="rows",Y=q===null?null:/* @__PURE__ */P(Text,{style:[$.price,_],children:q}),J=d&&t.category!==null?/* @__PURE__ */P(Text,{...b==="label"?{tier:"compact"}:{},style:b==="label"?$.categoryLabel:$.category,testID:`health-plan-category-${t.productId}`,children:t.category}):null,Q=h==="full",{height:Z,hit:ee}=G(h),te=(ee-Z)/2,ne=X(g),re=Q?$.add:[$.addCompact,{minHeight:Z,paddingHorizontal:Z>=40?D.space.lg:D.space.md}],ie=e=>[Q||Z>=40?$.addLabel:$.addCompactLabel,e?$.addPressedLabel:null,ne===null||ne===0?null:{fontSize:ne,lineHeight:Math.round(ne*D.type.lineHeight.snug)}],oe=te>0?{top:te,bottom:te,left:0,right:0}:void 0,le=/* @__PURE__ */P(Text,{style:[V?$.thumbTitle:$.title,B],accessibilityRole:"header",children:t.title}),ae=t.sample?/* @__PURE__ */P(f,{style:$.sample,children:/* @__PURE__ */P(Text,{tier:"badge",style:$.sampleLabel,children:E.sample})}):null,se=t.description===null?null:/* @__PURE__ */P(Text,{style:$.body,children:t.description}),ce=t.inPlan&&y==="pressed"?
|
|
405
|
+
/* @__PURE__ */P(m,{onPress:()=>n?.(false),disabled:i,accessibilityRole:"button",accessibilityLabel:E.added,accessibilityState:{disabled:i,busy:i,selected:true},style:[re,$.addPressed,i?$.dimmed:null],...oe?{hitSlop:oe}:{},testID:`health-plan-added-${t.productId}`,children:/* @__PURE__ */P(Text,{tier:"control",style:ie(true),children:E.added})}):t.inPlan?/* @__PURE__ */R(f,{style:$.row,children:[
|
|
406
|
+
/* @__PURE__ */P(Text,{style:$.added,children:E.added}),
|
|
407
|
+
/* @__PURE__ */P(m,{onPress:()=>n?.(false),disabled:i,accessibilityRole:"button",accessibilityLabel:E.remove,accessibilityState:{disabled:i,busy:i},style:$.remove,testID:`health-plan-remove-${t.productId}`,children:/* @__PURE__ */P(Text,{tier:"control",style:$.removeLabel,children:E.remove})})]}):/* @__PURE__ */P(m,{onPress:()=>n?.(true),disabled:i,accessibilityRole:"button",accessibilityLabel:E.addToCart,accessibilityState:{disabled:i,busy:i,...y==="pressed"?{selected:false}:{}},style:[re,i?$.dimmed:null],...oe?{hitSlop:oe}:{},testID:`health-plan-add-${t.productId}`,children:/* @__PURE__ */P(Text,{tier:"control",style:ie(false),children:E.addToCart})});/* @__PURE__ */
|
|
408
|
+
return R(f,{style:[$.card,U,p?null:$.cardNoBorder,M===null?null:{padding:M},F],accessibilityState:{busy:i},testID:`health-plan-item-${t.productId}`,children:[V?/* @__PURE__ */R(f,{style:$.thumbHead,testID:`health-plan-thumb-head-${t.productId}`,children:[t.imageUrl===null?null:/* @__PURE__ */P(T,{source:{uri:t.imageUrl},style:$.thumb,resizeMode:"cover",accessibilityIgnoresInvertColors:true}),
|
|
409
|
+
/* @__PURE__ */R(f,{style:$.thumbCopy,children:[J,le,ae,se]})]}):/* @__PURE__ */R(z,{children:[t.imageUrl===null?null:/* @__PURE__ */P(T,{source:{uri:t.imageUrl},style:$.image,resizeMode:"cover",accessibilityIgnoresInvertColors:true}),J,
|
|
410
|
+
/* @__PURE__ */R(f,{style:$.head,children:[le,Y]}),ae,se]}),t.reasons.map((e,t)=>/* @__PURE__ */R(f,{style:[K?$.reasonRow:$.reason,W===null?null:{gap:W}],testID:`health-plan-reason-${K?"row":"pill"}`,children:[
|
|
411
|
+
/* @__PURE__ */P(Text,{tier:"compact",style:[K?$.reasonRowKind:$.reasonKind,K&&A!==null?{width:A}:null],children:j[e.kind]}),
|
|
412
|
+
/* @__PURE__ */P(Text,{style:[K?$.reasonRowText:$.reasonText,L],children:e.text})]},`${e.kind}-${t}`)),c===void 0?null:/* @__PURE__ */P(HostRender,{resetKey:t,render:()=>c(t),fallback:null}),V?/* @__PURE__ */R(f,{style:$.actionRow,children:[Y,ce]}):ce,o===null?null:/* @__PURE__ */P(Text,{style:$.error,accessibilityLiveRegion:"polite",children:o.displayMessage})]})}var Lg=64,Eg=32,Ag=72;function jg(e,t,n){if(e===true)return t;if(e===void 0||e===false)return null;let r=typeof e=="string"?K(e):e;if(r===null)return null;let i=ko(r.color);if(i===null)return null;let o=Math.max(0,r.blur);return{shadowColor:`rgb(${i.r}, ${i.g}, ${i.b})`,shadowOffset:{width:r.offsetX??0,height:r.offsetY},shadowRadius:o/2,shadowOpacity:Math.min(1,Math.max(0,i.a*(r.opacity??1))),elevation:Math.max(0,Math.min(n.space.lg,Math.round(o/2)))}}function Wg(e){let{color:t,radius:n,space:r,type:i,slots:o}=e,l=(t,n,r)=>({...face(e,r),fontSize:t,lineHeight:Math.round(t*i.lineHeight.snug),color:n}),a=o.planCard?.textColor??o.card?.textColor,s=o.planReasonLabel?.textColor??o.chip?.textColor??t.brandInk;return g.create({card:{gap:r.sm,padding:r.lg,borderRadius:n.lg,borderWidth:1,borderColor:t.brandBorder,backgroundColor:t.surface,...sl(o.card,1),...sl(o.planCard,1)},cardShadow:{shadowColor:t.shadow,shadowOffset:{width:0,height:r.xs},shadowRadius:r.md,shadowOpacity:.08,elevation:r.xs},cardNoBorder:{borderWidth:0},category:l(i.size.caption,a??t.text.secondary,"regular"),categoryLabel:{...face(e,"monoMedium"),fontSize:i.size.micro,lineHeight:Math.round(i.size.micro*i.lineHeight.snug),letterSpacing:i.letterSpacing.monoWide,textTransform:"uppercase",color:s},image:{width:"100%",aspectRatio:4/3,borderRadius:n.md,backgroundColor:t.surfaceSubtle},thumbHead:{flexDirection:"row",alignItems:"flex-start",gap:r.md},thumb:{width:Lg,height:Lg,borderRadius:n.md,backgroundColor:t.surfaceSubtle},thumbCopy:{flex:1,gap:r.xs},thumbTitle:l(i.size.body,a??t.text.primary,"bold"),actionRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:r.sm},reasonRow:{flexDirection:"row",alignItems:"flex-start",gap:r.lg},reasonRowKind:{width:Ag,paddingTop:2,...face(e,"monoMedium"),fontSize:i.size.micro,lineHeight:Math.round(i.size.micro*i.lineHeight.snug),letterSpacing:i.letterSpacing.monoWide,textTransform:"uppercase",color:s},reasonRowText:{flex:1,...l(i.size.caption,a??t.text.secondary,"regular")},head:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",gap:r.sm},title:{flex:1,...l(i.size.body,a??t.text.primary,"bold")},price:l(i.size.body,a??t.text.primary,"bold"),sample:{alignSelf:"flex-start",paddingHorizontal:r.sm,paddingVertical:2,borderRadius:n.pill,backgroundColor:t.badgeBgNeutral},sampleLabel:l(i.size.caption,t.text.secondary,"bold"),body:l(i.size.caption,a??t.text.secondary,"regular"),reason:{flexDirection:"row",alignItems:"baseline",gap:r.sm,paddingHorizontal:r.sm,paddingVertical:r.xs,borderRadius:n.md,backgroundColor:t.brandSofter,...sl(o.chip,1)},reasonKind:{...l(i.size.caption,t.brandInk,"bold"),textTransform:"uppercase",letterSpacing:.4,...cl(o.chip)},reasonText:{flex:1,...l(i.size.caption,t.text.secondary,"regular"),...cl(o.chip)},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:r.sm},added:l(i.size.caption,t.brandInk,"bold"),add:{minHeight:44,paddingHorizontal:r.lg,borderRadius:n.pill,alignItems:"center",justifyContent:"center",backgroundColor:t.brand,...sl(o.primaryButton)},addLabel:{...l(i.size.body,t.text.onBrand,"bold"),...cl(o.primaryButton)},addCompact:{minHeight:Eg,alignSelf:"flex-start",paddingHorizontal:r.md,borderRadius:n.pill,alignItems:"center",justifyContent:"center",backgroundColor:t.brand,...sl(o.primaryButton)},addCompactLabel:{...l(i.size.caption,t.text.onBrand,"bold"),...cl(o.primaryButton)},addPressed:{backgroundColor:t.brandInk,borderWidth:0},addPressedLabel:{color:readableOn(t.brandInk)},remove:{minHeight:44,justifyContent:"center"},removeLabel:{...l(i.size.caption,t.linkInk,"bold"),...cl(o.link)},dimmed:{opacity:.5},error:l(i.size.caption,t.errorRed,"regular")})}var Mg=478;function HealthPlanPageSkeleton({style:e}){let t=_u({}),n=t.S.X,{bx:r}=t.S.D,i=n.roles.tile,o=(e,t,n=0)=>({width:e,height:t,marginTop:n,borderRadius:6,backgroundColor:i}),l=n.title.text,a=n.subtitle.text;/* @__PURE__ */
|
|
413
|
+
return R(f,{style:[...r("root"),{flexGrow:1},e],accessible:true,accessibilityRole:"progressbar",accessibilityLabel:E.loading,accessibilityState:{busy:true},testID:"health-plan-loading",children:[
|
|
414
|
+
/* @__PURE__ */R(f,{style:r("head"),children:[
|
|
415
|
+
/* @__PURE__ */R(f,{style:Xs(n.head,0),children:[
|
|
416
|
+
/* @__PURE__ */P(f,{style:o("40%",Number(n.eyebrow.text.lineHeight??16))}),
|
|
417
|
+
/* @__PURE__ */P(f,{style:o("70%",Number(l.lineHeight??30),6)}),
|
|
418
|
+
/* @__PURE__ */P(f,{style:o("90%",Number(a.lineHeight??22),Number(n.subtitle.box.marginTop??6))})]}),
|
|
419
|
+
/* @__PURE__ */P(f,{style:[...r("headImage"),Au]})]}),
|
|
420
|
+
/* @__PURE__ */R(f,{style:[...r("by"),{minHeight:60}],children:[
|
|
421
|
+
/* @__PURE__ */P(f,{style:[...r("byIcon"),Au]}),
|
|
422
|
+
/* @__PURE__ */R(f,{style:[Xs(n.by,1),{gap:6}],children:[
|
|
423
|
+
/* @__PURE__ */P(f,{style:o("70%",14)}),
|
|
424
|
+
/* @__PURE__ */P(f,{style:o("30%",10)})]})]}),
|
|
425
|
+
/* @__PURE__ */R(f,{style:[...r("need"),{height:Mg,gap:12}],children:[
|
|
426
|
+
/* @__PURE__ */P(f,{style:o("35%",16)}),
|
|
427
|
+
/* @__PURE__ */P(f,{style:o("60%",22)}),
|
|
428
|
+
/* @__PURE__ */P(f,{style:o("100%",44)}),
|
|
429
|
+
/* @__PURE__ */P(f,{style:o("100%",64,4)}),
|
|
430
|
+
/* @__PURE__ */P(f,{style:o("100%",120,4)})]})]})}function HealthPlanErrorCard({style:e,children:t}){let n=_u({}),{bx:r}=n.S.D;/* @__PURE__ */
|
|
431
|
+
return P(f,{style:[...r("root"),e],testID:"health-plan-error",children:/* @__PURE__ */P(f,{style:r("sec"),children:t})})}var Ng=["onBuy","onMore","onExtra","onAddToVisit","onOverlayChange","onSubscriptionChange","onOneBoxOrder","onJump","onOrderHelp","onWeightSaved","onConnectRecords","onWaitAction","navigate"];function EverfurHealthPlan(e){let t=Qt(e,["onCheckout","onAvailability","onAvailabilityChange","onAsk"]),n=Ko(),i=r(()=>qg(n),[n]),o=e.focus,l=r(()=>o===void 0?void 0:Qt(o,Ng),[o]),{lifecycle:a,refreshKey:c,presentation:d,onAvailability:u,onAvailabilityChange:p,...h}=t,g=s({onAvailability:u,onAvailabilityChange:p});g.current={onAvailability:u,onAvailabilityChange:p};let m=r(()=>(e,petRef)=>{let{onAvailability:t,onAvailabilityChange:n}=g.current;t?.(e,petRef),n?.(e)},[]),y=useEverfurPresentation(d===void 0?void 0:Hr({healthPlanLayout:d.healthPlanLayout,serverSlots:d.serverSlots})),b=y.healthPlanLayout,k=useEverfurHealthPlan({...t.petRef===void 0?{}:{petRef:t.petRef},...a===void 0?{}:{lifecycle:a},...c===void 0?{}:{refreshKey:c}});return k.status==="signedOut"?/* @__PURE__ */P(f,{style:[i.page,t.style],children:/* @__PURE__ */P(Text,{style:i.body,children:E.signedOut})}):/* @__PURE__ */P(Pr.Provider,{value:y.serverSlots,children:/* @__PURE__ */P(CapabilityGate,{capability:"healthPlan",...t.renderDisabled?{renderDisabled:t.renderDisabled}:{},style:t.style,children:/* @__PURE__ */P(SdkTabletColumn,{children:/* @__PURE__ */P(PlanBody,{...h,plan:k,styles:i,focusLayout:b==="focus_plan",...l===void 0?{}:{focus:l},onReport:m,...a===void 0?{}:{lifecycle:a},...c===void 0?{}:{refreshKey:c}})})})})}function Ug(e,petRef,t){o(()=>{e!==null&&t(e,petRef)},[e,petRef,t])}function Refused({error:e,retry:t,renderNotice:n,styles:r,style:i}){let o=isHealthPlanSessionRequired(e),l=o?E.signedOut:e?.displayMessage??"";/* @__PURE__ */
|
|
432
|
+
return P(f,{style:i,children:/* @__PURE__ */R(f,{style:r.notice,accessibilityLiveRegion:"polite",children:[e===null?null:/* @__PURE__ */P(HostRender,{resetKey:e,render:()=>n?n(e):/* @__PURE__ */P(Text,{style:r.noticeText,children:l}),fallback:/* @__PURE__ */P(Text,{style:r.noticeText,children:l})}),o?null:/* @__PURE__ */P(m,{onPress:t,accessibilityRole:"button",accessibilityLabel:E.retry,style:r.retry,testID:"health-plan-retry",children:/* @__PURE__ */P(Text,{tier:"control",style:r.retryLabel,children:E.retry})})]})})}function Loading({styles:e,style:t}){/* @__PURE__ */
|
|
433
|
+
return R(f,{style:[e.page,t],accessible:true,accessibilityRole:"progressbar",accessibilityLabel:E.loading,accessibilityState:{busy:true},testID:"health-plan-loading",children:[
|
|
434
|
+
/* @__PURE__ */P(f,{style:e.skeletonTitle}),
|
|
435
|
+
/* @__PURE__ */P(f,{style:e.skeletonCard}),
|
|
436
|
+
/* @__PURE__ */P(f,{style:e.skeletonCard})]})}function Empty({emptyCopy:e,onAsk:t,heading:n,header:r,styles:i,style:o}){let l={emptyTitle:e?.emptyTitle??E.emptyTitle,emptyBody:e?.emptyBody??E.emptyBody,emptyAsk:e?.emptyAsk??E.emptyAsk};return l.emptyTitle.trim()===""&&l.emptyBody.trim()===""?null:/* @__PURE__ */R(f,{style:o,testID:"health-plan-empty",children:[n,r,
|
|
437
|
+
/* @__PURE__ */R(f,{style:i.empty,children:[l.emptyTitle.trim()===""?null:/* @__PURE__ */P(Text,{style:i.subtitle,children:l.emptyTitle}),l.emptyBody.trim()===""?null:/* @__PURE__ */P(Text,{style:i.body,children:l.emptyBody}),l.emptyAsk.trim()===""||t===void 0?null:/* @__PURE__ */P(m,{onPress:()=>t(),accessibilityRole:"button",style:i.retry,testID:"health-plan-empty-ask",children:/* @__PURE__ */P(Text,{tier:"control",style:i.retryLabel,children:l.emptyAsk})})]})]})}function FocusBody({plan:e,focus:t,styles:n,style:r,petName:i,petSpecies:l,onCheckout:a,renderNotice:s,priceFormat:c,showCategory:d,lifecycle:u,refreshKey:p,onAvailable:h,list:g,empty:f}){let m=t.design===void 0,y=useHealthPlanPage({petRef:e.petRef,enabled:m,...t.pageRepository?{repository:t.pageRepository}:{},...u===void 0?{}:{lifecycle:u},...p===void 0?{}:{refreshKey:p}}),b=t.design,k,w=t.weightKnown,v=i,x=t.petSex??null,S=l,T=false,C=false,I="ready";m&&(y.phase==="failed"?I=isHealthPlanSessionRequired(y.error)?"failed":"list":y.missing?I="list":y.page===null?I="loading":y.page.page===null?I="list":(b=y.page.page,k=y.page.checkout,w??=y.page.pet.weightKg!==null,v=y.page.pet.name??i,x=y.page.pet.sex??x,S=y.page.pet.species??l,T=y.page.vetReviewed===true,C=y.page.trackingTextsEnabled===true));let H=e.status==="empty";H&&I!=="loading"&&(I=I==="ready"&&ge(b)?"ready":"hidden"),H&&I==="ready"&&b!==void 0&&(b=fe(b));let F=e.plan?.items??[],R=b?.pick,z=R===void 0?void 0:F.find(e=>R.productId!==void 0&&e.productId===R.productId)??F.find(e=>R.partnerSku!==void 0&&e.partnerSku===R.partnerSku)??F[0]??(H?me:void 0);if(I==="ready"&&(b===void 0||z===void 0||e.petRef===null)&&(I="hidden"),o(()=>{h(I==="ready"||I==="list"?true:I==="hidden"?false:null)},[I,h]),I==="list")return g;if(I==="failed")/* @__PURE__ */
|
|
438
|
+
return P(HealthPlanErrorCard,{style:r,children:/* @__PURE__ */P(Refused,{error:y.error,retry:()=>{y.refresh()},renderNotice:s,styles:n,style:null})});if(I==="loading")/* @__PURE__ */return P(HealthPlanPageSkeleton,{style:r});if(I==="hidden"&&H)return f;if(I==="hidden"||b===void 0||z===void 0||e.petRef===null)return null;let D=t.onWeightSaved,$=y.refresh;/* @__PURE__ */
|
|
439
|
+
return P(HealthPlanFocus,{...t,design:b,...k?{checkout:k}:{},...w===void 0?{}:{weightKnown:w},...m?{onWeightSaved:e=>{D&&Xt(D,e),$()}}:{},item:z,others:F.filter(e=>e!==z),...d!==void 0?{showCategory:d}:{},...u===void 0?{}:{lifecycle:u},...p===void 0?{}:{refreshKey:p},petRef:e.petRef,petName:v,petSex:x,species:S,fromBackend:m,vetReviewed:T,trackingTexts:m?C:t.trackingTexts??e.plan?.trackingTextsEnabled===true,...a?{onCheckout:a}:{},...c?{priceFormat:c}:{},style:r},e.petRef)}function PlanBody({plan:e,styles:t,onCheckout:i,renderNotice:o,style:l,imageVariant:a,reasonVariant:s,cartBarVisibility:d,priceFormat:u,renderHeader:p,renderItemFooter:h,renderFooter:g,titleSize:m,titleGap:y,sectionGap:b,cartBarPlacement:k,titleLineHeight:w,renderBetweenItems:v,focusLayout:x,focus:S,onReport:T,onAsk:C,emptyCopy:I,lifecycle:H,refreshKey:F,...z}){let D=Ko(),{pets:$}=useEverfurPets(),O=$.find(t=>t.petRef===e.petRef),B=O?.name??null,[_,L]=n(null);Ug(e.status==="empty"?x?_:false:e.status==="ready"?x?_:true:null,e.petRef,T);let A=e.plan?.headline??(B===null?null:W.planTitle(B)),j=k==="none";ee(j&&e.status==="ready",e.cart,e.pending.length>0,e.petRef,e.plan,e.setInPlan);let M=se();ue(e.status==="ready"||e.status==="empty",e.petRef,e.plan);let N=X(b),q=N===null?t.page:[t.page,{gap:N}],G=X(m),K=X(w),J=[t.title,G===null||G===0?null:{fontSize:G,lineHeight:Math.round(G*D.type.lineHeight.snug)},K===null||K===0?null:{lineHeight:Math.round((G===null||G===0?D.type.size.heading:G)*K)},{marginBottom:Y(y,N??D.space.lg)}],Q=A===null?null:/* @__PURE__ */P(Text,{style:J,accessibilityRole:"header",children:A}),Z=r(()=>U(e.plan,e.setInPlan),[e.plan,e.setInPlan]),te={petRef:e.petRef,plan:e.plan,cart:e.cart,...Z},ne=V(z),re=(e,t)=>v===void 0||e===0?null:/* @__PURE__ */P(HostRender,{resetKey:t,render:()=>v(e,t),fallback:null}),ie=p===void 0?null:/* @__PURE__ */P(HostRender,{resetKey:e.plan,render:()=>p(te),fallback:null});if(e.status==="noPet")/* @__PURE__ */
|
|
440
|
+
return P(f,{style:[q,l],children:/* @__PURE__ */P(Text,{style:t.body,children:E.choosePet})});if(e.status==="loading")/* @__PURE__ */return P(Loading,{styles:t,style:[N===null?null:{gap:N},l]});if(e.status==="failed")/* @__PURE__ */return P(Refused,{error:e.error,retry:()=>{e.refresh()},renderNotice:o,styles:t,style:[q,l]});let oe=/* @__PURE__ */P(Empty,{emptyCopy:I,onAsk:C,heading:Q,header:ie,styles:t,style:[q,l]});if(e.status==="empty"&&!x)return oe;let le=e.plan?.items??[],ae=/* @__PURE__ */R(f,{style:[q,l],children:[Q,ie,le.map((t,n)=>/* @__PURE__ */R(c,{children:[re(n,t),
|
|
441
|
+
/* @__PURE__ */P(HealthPlanItemCard,{item:t,pending:e.pending.includes(t.productId),error:e.itemErrors[t.productId]??null,onToggle:n=>{pe(M,e.petRef,t.productId,n),e.setInPlan(t.productId,n)},...a?{imageVariant:a}:{},...s?{reasonVariant:s}:{},...u?{priceFormat:u}:{},...h?{renderFooter:h}:{},...ne})]},t.productId)),g===void 0?null:/* @__PURE__ */P(HostRender,{resetKey:e.plan,render:()=>g(te),fallback:null}),!j&&showHealthPlanCartBar(d,e.cart.count)?/* @__PURE__ */P(HealthPlanPetScope,{petRef:e.petRef,children:/* @__PURE__ */P(HealthPlanCartBar,{cart:e.cart,busy:e.pending.length>0,...i?{onCheckout:i}:{},...u?{priceFormat:u}:{}})}):null]});return x?/* @__PURE__ */P(FocusBody,{plan:e,focus:S??{},styles:t,style:l,petName:B,petSpecies:O?.species??null,onCheckout:i,renderNotice:o,priceFormat:u,showCategory:ne.showCategory,lifecycle:H,refreshKey:F,onAvailable:L,list:ae,empty:oe}):ae}function qg(e){let{color:t,radius:n,space:r,type:i}=e,o=(t,n,r)=>({...face(e,r),fontSize:t,lineHeight:Math.round(t*i.lineHeight.snug),color:n});return g.create({page:{gap:r.lg,padding:r.lg},title:{...o(i.size.heading,t.text.primary,"bold"),...headingFace(e,"bold")},subtitle:o(i.size.body,t.text.primary,"bold"),body:o(i.size.body,t.text.secondary,"regular"),notice:{gap:r.xs},noticeText:o(i.size.caption,t.errorRed,"regular"),retry:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},retryLabel:o(i.size.caption,t.linkInk,"bold"),empty:{gap:r.xs,padding:r.lg,borderRadius:n.lg,backgroundColor:t.surfaceSubtle},skeletonTitle:{height:28,width:"50%",borderRadius:n.sm,backgroundColor:t.skeleton},skeletonCard:{height:160,borderRadius:n.lg,backgroundColor:t.skeleton}})}function HealthPlanTopRisk(e){let t=Qt(e,["onOpenPlan"]),n=Ko(),i=r(()=>Vg(n),[n]);/* @__PURE__ */
|
|
442
|
+
return R(f,{style:[i.card,t.style],testID:"health-plan-top-risk",children:[
|
|
443
|
+
/* @__PURE__ */R(f,{style:i.kickerRow,children:[
|
|
444
|
+
/* @__PURE__ */P(f,{style:i.dot}),
|
|
445
|
+
/* @__PURE__ */P(Text,{style:i.kicker,children:t.kicker})]}),
|
|
446
|
+
/* @__PURE__ */P(Text,{style:i.sentence,children:t.sentence}),
|
|
447
|
+
/* @__PURE__ */P(m,{onPress:()=>t.onOpenPlan(),accessibilityRole:"button",accessibilityLabel:t.action,style:i.button,testID:"health-plan-top-risk-open",children:/* @__PURE__ */P(Text,{tier:"control",style:i.buttonLabel,children:t.action})})]})}function Vg(e){let{color:t,radius:n,space:r,type:i}=e;return g.create({card:{gap:r.xs,alignItems:"flex-start",padding:r.md,borderRadius:n.lg,backgroundColor:t.brandSofter},kickerRow:{flexDirection:"row",alignItems:"center",gap:r.xs},kicker:{...face(e,"bold"),fontSize:i.size.caption,lineHeight:Math.round(i.size.caption*i.lineHeight.snug),color:t.text.secondary,textTransform:"uppercase",letterSpacing:i.size.caption*.06},dot:{width:8,height:8,borderRadius:4,backgroundColor:t.errorRed},sentence:{...face(e,"bold"),fontSize:i.size.subtitle,lineHeight:Math.round(i.size.subtitle*i.lineHeight.snug),color:t.text.primary},button:{minHeight:40,justifyContent:"center",paddingHorizontal:r.md,borderRadius:999,backgroundColor:t.primary},buttonLabel:{...face(e,"bold"),fontSize:i.size.caption,color:t.onPrimary}})}function useHealthPlanTopCard(e){let{petRef:petRef,enabled:t,onOpenPlan:n,copy:i,renderIcon:o}=e,{page:l}=useHealthPlanPage({petRef:petRef,...t===void 0?{}:{enabled:t}});return r(()=>healthPlanTopCard(l,{onOpenPlan:n,...i===void 0?{}:{copy:i},...o===void 0?{}:{renderIcon:o}}),[l,n,i,o])}export{ConnectedHealthPlanBlanks,ConnectedHealthPlanBuyButton,ConnectedHealthPlanBuyOptions,ConnectedHealthPlanByline,ConnectedHealthPlanCartCheckout,ConnectedHealthPlanCart as ConnectedHealthPlanCartScreen,ConnectedHealthPlanCheckoutSheet,ConnectedHealthPlanCheckup,ConnectedHealthPlanConnectRecords,ConnectedHealthPlanDoseCard,ConnectedHealthPlanExtras,ConnectedHealthPlanFine,ConnectedHealthPlanFocusCard,ConnectedHealthPlanHeader,ConnectedHealthPlanIngredients,ConnectedHealthPlanManageSheet,ConnectedHealthPlanOrder,ConnectedHealthPlanOrders,ConnectedHealthPlanOtherItems,ConnectedHealthPlanPickParts,ConnectedHealthPlanPlaced,ConnectedHealthPlanProductPick,ConnectedHealthPlanProof,ConnectedHealthPlanReviews,ConnectedHealthPlanSheet,ConnectedHealthPlanSigns,ConnectedHealthPlanStarted,ConnectedHealthPlanSubscribedBox,ConnectedHealthPlanTips,ConnectedHealthPlanToast,ConnectedHealthPlanToolbar,ConnectedHealthPlanTrustRow,ConnectedHealthPlanWaitCard,ConnectedHealthPlanWeightSheet,ConnectedHealthPlanWhyItFits,EverfurHealthPlan,E as HEALTH_PLAN_COPY,M as HEALTH_PLAN_COPY_PLACEHOLDERS,jc as HEALTH_PLAN_FOCUS_COPY,Sd as HEALTH_PLAN_FOCUS_RN_COPY,N as HEALTH_PLAN_LAYOUT_DEFAULTS,Tt as HEALTH_PLAN_REASON_KINDS,j as HEALTH_PLAN_REASON_LABELS,W as HEALTH_PLAN_TEMPLATES,vd as HEALTH_PLAN_TOP_CARD_COPY,HealthPlanAskRow,HealthPlanBackRow,HealthPlanBlanks,HealthPlanBuyButton,HealthPlanBuyOptions,HealthPlanByline,HealthPlanCartBar,HealthPlanCartCheckout,HealthPlanCartScope,HealthPlanCart as HealthPlanCartScreen,HealthPlanCheckoutSheet,HealthPlanCheckup,qt as HealthPlanController,HealthPlanDoseCard,HealthPlanExtras,HealthPlanFine,HealthPlanFocus,HealthPlanFocusCard,HealthPlanFocusProvider,HealthPlanHeader,HealthPlanIngredients,HealthPlanItemCard,HealthPlanJumpStrip,HealthPlanManageSheet,HealthPlanNoPick,HealthPlanOrder,HealthPlanOrders,HealthPlanOtherItems,HealthPlanPlaced,HealthPlanProductPick,HealthPlanProof,HealthPlanReviews,HealthPlanScrollScope,HealthPlanSheetFrame,HealthPlanSigns,HealthPlanStarted,HealthPlanSubscribedBox,HealthPlanTips,HealthPlanToast,HealthPlanToolbar,HealthPlanTopRisk,HealthPlanTrustRow,HealthPlanVetQuote,HealthPlanWaitCard,HealthPlanWeightSheet,HealthPlanWhyItFits,createHealthPlanPageRepository,createHealthPlanPageRepositoryOver,createHealthPlanRepository,createHealthPlanRepositoryOver,createHealthPlanSubscriptionRepository,createHealthPlanSubscriptionRepositoryOver,formatHealthPlanDay,formatHealthPlanPrice,formatHealthPlanPriceWith,healthPlanBlanksFacts,healthPlanCart,healthPlanCheckoutRefusal,healthPlanCheckoutSessionFromWire,healthPlanCheckoutStateFromWire,healthPlanFocusCopyFor,healthPlanFocusDesignFromWire,healthPlanFromWire,healthPlanNextShotsAt,healthPlanNoVet,healthPlanOneBoxOrderFromWire,healthPlanOneBoxOrderPageFromWire,healthPlanOrderTrackingFromWire,healthPlanPageFromWire,healthPlanPetCopy,healthPlanPetWords,healthPlanPossessive,healthPlanRecordsWeightKg,healthPlanSubscriptionFromWire,healthPlanSubscriptionQuoteFromWire,healthPlanTopCard,isHealthPlanSessionRequired,isHealthPlanSubscriptionUnavailable,notifyHealthPlanRecordsLanded,onHealthPlanNoVet,onHealthPlanRecordsLanded,setHealthPlanNoVet,showHealthPlanCartBar,useEverfurHealthPlan,useEverfurHealthPlanRepository,useEverfurPresentation,useHealthPlanCartDock,useHealthPlanPage,useHealthPlanPageRepository,useHealthPlanSubscription,useHealthPlanSubscriptionRepository,useHealthPlanTopCard};
|