@everfur/sdk 1.0.0 → 1.1.0

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.
Files changed (130) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{Chat.d-DySDBc6L.d.ts → Chat.d-Bt0fKiOQ.d.ts} +1 -1
  3. package/dist/{Chat.d-DDmNIlJn.d.cts → Chat.d-CTVJ_qWQ.d.cts} +1 -1
  4. package/dist/animations/index.cjs +1 -1
  5. package/dist/animations/index.js +1 -1
  6. package/dist/{branding.d-DC4imCYd.d.ts → branding.d-SCzhpyTt.d.ts} +1 -1
  7. package/dist/{branding.d-G7rpxDhI.d.cts → branding.d-eGlNC86j.d.cts} +1 -1
  8. package/dist/chat/index.cjs +10 -10
  9. package/dist/chat/index.d.cts +3 -3
  10. package/dist/chat/index.d.ts +3 -3
  11. package/dist/chat/index.js +10 -10
  12. package/dist/chat/lite/index.cjs +10 -10
  13. package/dist/chat/lite/index.d.cts +3 -3
  14. package/dist/chat/lite/index.d.ts +3 -3
  15. package/dist/chat/lite/index.js +10 -10
  16. package/dist/{chunk-NO7LYPKW.js → chunk-5TWMQIT4.js} +1 -1
  17. package/dist/{chunk-EMINPX6C.js → chunk-LWPM4GD3.js} +2 -2
  18. package/dist/{chunk-QG4ZH45Q.js → chunk-PDZTFXOO.js} +1 -1
  19. package/dist/{chunk-VY5VTLFX.js → chunk-ZZTNGAS7.js} +3 -3
  20. package/dist/client/index.cjs +3 -3
  21. package/dist/client/index.d.cts +6 -6
  22. package/dist/client/index.d.ts +6 -6
  23. package/dist/client/index.js +3 -3
  24. package/dist/consent/index.cjs +1 -1
  25. package/dist/consent/index.js +1 -1
  26. package/dist/{context.d-TArU_9lj.d.ts → context.d-Bl07_JGt.d.ts} +2 -2
  27. package/dist/{context.d-DLHTf-fV.d.cts → context.d-CzMV_7jD.d.cts} +2 -2
  28. package/dist/core/index.cjs +5 -5
  29. package/dist/core/index.d.cts +6 -6
  30. package/dist/core/index.d.ts +6 -6
  31. package/dist/core/index.js +5 -5
  32. package/dist/{entitlementRepository.d-Tj7lvs4e.d.cts → entitlementRepository.d-B4ffomns.d.cts} +1 -1
  33. package/dist/{entitlementRepository.d-CoKN-Ksa.d.ts → entitlementRepository.d-DLMRDNUe.d.ts} +1 -1
  34. package/dist/health-plan/index.cjs +6 -6
  35. package/dist/health-plan/index.d.cts +4 -4
  36. package/dist/health-plan/index.d.ts +4 -4
  37. package/dist/health-plan/index.js +6 -6
  38. package/dist/index.cjs +13 -13
  39. package/dist/index.d.cts +9 -9
  40. package/dist/index.d.ts +9 -9
  41. package/dist/index.js +13 -13
  42. package/dist/notifications/inbox/index.cjs +1 -1
  43. package/dist/notifications/inbox/index.js +1 -1
  44. package/dist/notifications/index.cjs +1 -1
  45. package/dist/notifications/index.js +1 -1
  46. package/dist/photo/index.cjs +1 -1
  47. package/dist/photo/index.js +1 -1
  48. package/dist/{presentation.d-BvZs_jN-.d.cts → presentation.d-tJe7zo12.d.cts} +6 -2
  49. package/dist/{presentation.d-BvZs_jN-.d.ts → presentation.d-tJe7zo12.d.ts} +6 -2
  50. package/dist/records/depth/index.cjs +1 -1
  51. package/dist/records/depth/index.js +1 -1
  52. package/dist/records/index.cjs +3 -3
  53. package/dist/records/index.d.cts +2 -2
  54. package/dist/records/index.d.ts +2 -2
  55. package/dist/records/index.js +3 -3
  56. package/dist/{runtimeTypes.d-BHdN-9aB.d.cts → runtimeTypes.d-6nkdToBS.d.cts} +1 -1
  57. package/dist/{runtimeTypes.d-L_CbeCKS.d.ts → runtimeTypes.d-Byb55WsJ.d.ts} +1 -1
  58. package/dist/server/events/index.cjs +2 -2
  59. package/dist/server/events/index.js +2 -2
  60. package/dist/server/index.cjs +2 -2
  61. package/dist/server/index.js +2 -2
  62. package/dist/shop/index.cjs +8 -8
  63. package/dist/shop/index.js +8 -8
  64. package/dist/slots/index.cjs +40 -40
  65. package/dist/slots/index.js +40 -40
  66. package/dist/tabs/index.cjs +1 -1
  67. package/dist/tabs/index.js +1 -1
  68. package/dist/televet/booking/index.cjs +1 -1
  69. package/dist/televet/booking/index.js +1 -1
  70. package/dist/televet/index.cjs +1 -1
  71. package/dist/televet/index.js +1 -1
  72. package/dist/testing/index.cjs +1 -1
  73. package/dist/testing/index.js +1 -1
  74. package/dist/testing/rn/index.cjs +1 -1
  75. package/dist/testing/rn/index.d.cts +3 -3
  76. package/dist/testing/rn/index.d.ts +3 -3
  77. package/dist/testing/rn/index.js +1 -1
  78. package/dist/testing/web/index.cjs +1 -1
  79. package/dist/testing/web/index.d.cts +3 -3
  80. package/dist/testing/web/index.d.ts +3 -3
  81. package/dist/testing/web/index.js +1 -1
  82. package/dist/texting/index.cjs +1 -1
  83. package/dist/texting/index.js +1 -1
  84. package/dist/{threadOptions.d-FzFN0zsK.d.ts → threadOptions.d-Cjps2yaN.d.ts} +2 -2
  85. package/dist/{threadOptions.d-CS-Qu_rR.d.cts → threadOptions.d-E-ZxhUSg.d.cts} +2 -2
  86. package/dist/{typeStyle.d-BIDpuYpg.d.cts → typeStyle.d-CuKAr0Ly.d.cts} +1 -1
  87. package/dist/{typeStyle.d-aRhFhBpG.d.ts → typeStyle.d-ZszGrWPf.d.ts} +1 -1
  88. package/dist/ui/index.cjs +26 -26
  89. package/dist/ui/index.js +26 -26
  90. package/dist/{usePresentation.d-Dr7iD-4Y.d.ts → usePresentation.d-CoyGEJOl.d.ts} +1 -1
  91. package/dist/{usePresentation.d-BHO_uZ31.d.cts → usePresentation.d-DUHlQyV5.d.cts} +1 -1
  92. package/dist/{useUnread.d-CAeYh82_.d.ts → useUnread.d-CFzIPmZt.d.ts} +1 -1
  93. package/dist/{useUnread.d-DXcRBQw8.d.cts → useUnread.d-D-p7oEW_.d.cts} +1 -1
  94. package/dist/video/index.cjs +1 -1
  95. package/dist/video/index.js +1 -1
  96. package/dist/web/consent/index.cjs +1 -1
  97. package/dist/web/consent/index.js +1 -1
  98. package/dist/web/health-plan/index.cjs +6 -6
  99. package/dist/web/health-plan/index.d.cts +5 -5
  100. package/dist/web/health-plan/index.d.ts +5 -5
  101. package/dist/web/health-plan/index.js +2 -2
  102. package/dist/web/inbox/index.cjs +1 -1
  103. package/dist/web/inbox/index.js +1 -1
  104. package/dist/web/index.cjs +8 -8
  105. package/dist/web/index.d.cts +12 -12
  106. package/dist/web/index.d.ts +12 -12
  107. package/dist/web/index.js +8 -8
  108. package/dist/web/intro/index.cjs +1 -1
  109. package/dist/web/intro/index.js +1 -1
  110. package/dist/web/notifications/index.cjs +1 -1
  111. package/dist/web/notifications/index.js +1 -1
  112. package/dist/web/records/depth/index.cjs +1 -1
  113. package/dist/web/records/depth/index.js +1 -1
  114. package/dist/web/records/index.cjs +1 -1
  115. package/dist/web/records/index.js +1 -1
  116. package/dist/web/records-sheet/index.cjs +3 -3
  117. package/dist/web/records-sheet/index.js +3 -3
  118. package/dist/web/shop/index.cjs +2 -2
  119. package/dist/web/shop/index.js +1 -1
  120. package/dist/web/televet/booking/index.cjs +2 -2
  121. package/dist/web/televet/booking/index.js +2 -2
  122. package/dist/web/televet/call/index.cjs +1 -1
  123. package/dist/web/televet/call/index.js +1 -1
  124. package/dist/web/televet/index.cjs +1 -1
  125. package/dist/web/televet/index.js +1 -1
  126. package/dist/web/texting/index.cjs +1 -1
  127. package/dist/web/texting/index.js +1 -1
  128. package/dist/web/ui/index.cjs +7 -7
  129. package/dist/web/ui/index.js +4 -4
  130. package/package.json +5 -5
@@ -1,7 +1,7 @@
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
2
  "use strict";var react=require("react"),reactNative=require("react-native"),jsxRuntime=require("react/jsx-runtime"),reactNativeSafeAreaContext=require("react-native-safe-area-context"),records=require("@everfur/sdk/records");var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}function headingFace(theme,fallback="bold"){let{headingFamily:headingFamily,headingWeight:headingWeight}=theme.type;if(headingFamily===null&&headingWeight===null)return face(theme,fallback);if(headingFamily!==null)return{fontFamily:headingFamily,fontWeight:headingWeight??theme.type.weight[FACE_WEIGHT[fallback]]};let base3=face(theme,fallback);return base3.fontWeight===void 0||headingWeight===null?base3:{fontFamily:base3.fontFamily,fontWeight:headingWeight}}function weightBucket(weight){return weight<=450?"regular":weight<=650?"medium":"bold"}var MONO_OF={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(theme,role){let byRole=roleCache.get(theme);byRole===void 0&&(byRole=/* @__PURE__ */new Map,roleCache.set(theme,byRole));let hit=byRole.get(role);if(hit!==void 0)return hit;let style=buildRole(theme,role);return byRole.set(role,style),style}var roleCache=/* @__PURE__ */new WeakMap;function buildRole(theme,role){let r=theme.type.roles[role],weight=r.weight==="400"&&r.face!=="mono"?theme.type.weight.regular:r.weight,bucket=weightBucket(Number(weight)),f=r.face==="mono"?face(theme,MONO_OF[bucket]):r.face==="heading"?headingFace(theme,bucket):face(theme,bucket),faceWeight=r.face==="heading"?theme.type.headingWeight??weight:weight,faceStyle=f.fontWeight===void 0?f:{fontFamily:f.fontFamily,fontWeight:faceWeight},fontSize=r.size,out={...faceStyle,fontSize:fontSize,lineHeight:Math.round(fontSize*r.lineHeight*100)/100};return r.letterSpacing!==0&&(out.letterSpacing=Math.round(fontSize*r.letterSpacing*100)/100),r.uppercase&&(out.textTransform="uppercase"),/* @__PURE__ */Object.freeze(out)}var HEALTH_PLAN_COPY=/* @__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:""}),COPY_ASKS=/* @__PURE__ */Object.freeze({emptyTitle:true,emptyBody:true,emptyAsk:true}),HEALTH_PLAN_REASON_LABELS=/* @__PURE__ */Object.freeze({dna:"",records:"Records",inside:"Inside",profile:""}),HEALTH_PLAN_TEMPLATES=/* @__PURE__ */Object.freeze({planTitle:petName=>`${petName}'s care plan`,cartLabel:brand=>`${brand} cart`}),HEALTH_PLAN_COPY_PLACEHOLDERS=/* @__PURE__ */Object.freeze([...Object.keys(HEALTH_PLAN_COPY).filter(key=>COPY_ASKS[key]===true&&HEALTH_PLAN_COPY[key]==="").map(key=>`HEALTH_PLAN_COPY.${key}`),...["profile"].filter(kind=>HEALTH_PLAN_REASON_LABELS[kind]==="").map(kind=>`HEALTH_PLAN_REASON_LABELS.${kind}`)]);var HEALTH_PLAN_LAYOUT_DEFAULTS=/* @__PURE__ */Object.freeze({imageVariant:"wide",reasonVariant:"pills",cartBarVisibility:"whenItems",cartBarPlacement:"sticky",addButtonSize:"full",addedVariant:"link",categoryVariant:"text",showCategory:false,cardShadow:false,cardBorder:true});function healthPlanWrites(plan,setInPlan){return{setInPlan:setInPlan,addAll:async()=>{let missing=(plan?.items??[]).filter(item=>!item.inPlan);return(await Promise.all(missing.map(item=>setInPlan(item.productId,true)))).every(Boolean)}}}function showHealthPlanCartBar(visibility,count){return(visibility??HEALTH_PLAN_LAYOUT_DEFAULTS.cartBarVisibility)==="always"||count>0}var HEALTH_PLAN_CARD_OPTION_KEYS=/* @__PURE__ */Object.freeze(["showCategory","cardShadow","cardBorder","addButtonSize","addButtonFontSize","addedVariant","categoryVariant","cardPadding","itemTitleSize","itemTitleWeight","priceSize","priceWeight","reasonTextSize","reasonLabelWidth","reasonGap"]);function pickHealthPlanCardOptions(props){let out={};for(let key of HEALTH_PLAN_CARD_OPTION_KEYS)props[key]!==void 0&&(out[key]=props[key]);return out}function healthPlanAddButtonHeight(size){let height=typeof size=="number"&&Number.isFinite(size)&&size>0?size:size==="compact"?32:44;return{height:height,hit:Math.max(44,height)}}function parseHealthPlanShadow(css){if(css.length>200||css.includes(",")&&!/rgba?\(|hsla?\(/i.test(css))return null;let color=/(rgba?\([^)]*\)|hsla?\([^)]*\)|#[0-9a-f]{3,8}\b|[a-z]+)\s*$/i.exec(css.trim())?.[1]??null;if(color===null)return null;let lengths=css.trim().slice(0,css.trim().length-color.length).trim().split(/\s+/).filter(Boolean);if(lengths.length<2||lengths.length>4)return null;let px2=lengths.map(part2=>part2==="0"?0:/^-?\d*\.?\d+px$/.test(part2)?Number(part2.slice(0,-2)):Number.NaN);return px2.some(n=>!Number.isFinite(n))?null:{color:color,offsetX:px2[0]??0,offsetY:px2[1]??0,blur:Math.max(0,px2[2]??0)}}function healthPlanLength(value){return typeof value=="number"&&Number.isFinite(value)&&value>=0?value:null}function healthPlanTitleOffset(titleGap,sectionGap){let gap=healthPlanLength(titleGap);return gap===null?0:gap-sectionGap}function isHealthPlanSessionRequired(error){return error!==null&&(error.reasonCode==="session_required"||error.code==="sessionRequired")}var DOCK_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanCartDock@v1"),globalDockHost=globalThis,DockContext=globalDockHost[DOCK_CONTEXT_SYMBOL]??(globalDockHost[DOCK_CONTEXT_SYMBOL]=react.createContext(null));function HealthPlanCartScope({children:children}){let[dock,setDock]=react.useState(null),store=react.useMemo(()=>({dock:dock,publish:setDock}),[dock]);return react.createElement(DockContext.Provider,{value:store},children)}function useHealthPlanCartDock(){return react.useContext(DockContext)?.dock??null}function usePublishHealthPlanCart(enabled,cart,busy,petRef,plan,setInPlan){let publish=react.useContext(DockContext)?.publish,latest=react.useRef(setInPlan);react.useEffect(()=>{latest.current=setInPlan},[setInPlan]);let writes=react.useMemo(()=>healthPlanWrites(plan,(productId,inPlan)=>latest.current(productId,inPlan)),[plan]);react.useEffect(()=>{if(!(publish===void 0||!enabled))return publish(/* @__PURE__ */Object.freeze({cart:cart,busy:busy,petRef:petRef,plan:plan,...writes})),()=>publish(null)},[publish,enabled,cart,busy,petRef,plan,writes])}var noopTelemetry=/* @__PURE__ */Object.freeze({track(){},trackExpectedFailure(){}});function ok(value,warning){/* @__PURE__ */
3
3
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
4
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),globalContextHost=globalThis,EverfurContext=globalContextHost[EVERFUR_CONTEXT_SYMBOL]??(globalContextHost[EVERFUR_CONTEXT_SYMBOL]=react.createContext(null));EverfurContext.displayName??="EverfurContext";function useEverfurContext(){let ctx=react.useContext(EverfurContext);if(ctx===null)throw new EverfurConfigError("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return ctx}var HEALTH_PLAN_EVENTS=/* @__PURE__ */Object.freeze({opened:"health_plan.opened",productClicked:"health_plan.product_clicked",checkoutStarted:"health_plan.checkout_started"});function useHealthPlanTelemetry(){return react.useContext(EverfurContext)?.runtime.registry.services.telemetry??noopTelemetry}var PlanPetContext=react.createContext(null);function HealthPlanPetScope({petRef:petRef,children:children}){return react.createElement(PlanPetContext.Provider,{value:petRef},children)}function useHealthPlanBarPet(dockPet){let page=react.useContext(PlanPetContext),ctx=react.useContext(EverfurContext);return page??dockPet??ctx?.activePet??null}function useHealthPlanOpened(drawn2,petRef,plan){let telemetry=useHealthPlanTelemetry(),sent=react.useRef(null);react.useEffect(()=>{if(!drawn2||petRef===null||sent.current===petRef)return;sent.current=petRef;let items=plan?.items??[];telemetry.track(HEALTH_PLAN_EVENTS.opened,{petRef:petRef,itemsCount:items.length,inPlanCount:items.filter(item=>item.inPlan).length})},[drawn2,petRef,plan,telemetry])}function trackProductClicked(telemetry,petRef,productId,inPlan){telemetry.track(HEALTH_PLAN_EVENTS.productClicked,{petRef:petRef,productId:productId,inPlan:inPlan})}function trackCheckoutStarted(telemetry,petRef,cart){telemetry.track(HEALTH_PLAN_EVENTS.checkoutStarted,{petRef:petRef,itemsCount:cart.count,subtotal:cart.subtotal,currency:cart.currency})}function healthPlanPageDrawsWithoutItems(design){return design!=null&&(design.wait!==void 0||design.pick.hidden===true)}function withoutProductPart(design){return{...design,pick:{...design.pick,none:true,hidden:true}}}var NO_PLAN_ITEM=/* @__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 RETRYABILITY_ROWS=[{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:"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:"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:"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:"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:"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:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{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}],CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze(RETRYABILITY_ROWS.map(row=>/* @__PURE__ */Object.freeze(row)));/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row=>row.wireCode));var NORMALIZED_FOLD=/* @__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",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"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row=BY_KEY.get(candidate+key);if(row)return row}}var CATEGORY_OF=/* @__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(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){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"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 AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__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:ACCESS_DENIED_COPY,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:VALIDATION_FAILED_COPY,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:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."}),SESSION_REVOKED_COPY="This session has ended. Please sign in again.",LINKED_ACCOUNT_READ_ONLY="linked_account_read_only";function displayFor(code,wireCode,reasonCode){return code==="conflict"&&reasonCode===LINKED_ACCOUNT_READ_ONLY?ACCESS_DENIED_COPY:(code==="authRejected"||code==="authExpired")&&typeof wireCode=="string"&&wireCode.trim().toLowerCase()==="session_revoked"?SESSION_REVOKED_COPY:userFacingError(code)}function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),linkedReadOnly=code==="conflict"&&opts?.reasonCode===LINKED_ACCOUNT_READ_ONLY,error={code:code,category:categoryFor(code),retryable:opts?.retryable??(linkedReadOnly?false:isRetryableCode(code)),displayMessage:displayFor(code,opts?.wireCode,linkedReadOnly?LINKED_ACCOUNT_READ_ONLY:null)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}function assertNever(x){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(x)}`)}function errorFrame(fields){/* @__PURE__ */
4
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),globalContextHost=globalThis,EverfurContext=globalContextHost[EVERFUR_CONTEXT_SYMBOL]??(globalContextHost[EVERFUR_CONTEXT_SYMBOL]=react.createContext(null));EverfurContext.displayName??="EverfurContext";function useEverfurContext(){let ctx=react.useContext(EverfurContext);if(ctx===null)throw new EverfurConfigError("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return ctx}var HEALTH_PLAN_EVENTS=/* @__PURE__ */Object.freeze({opened:"health_plan.opened",productClicked:"health_plan.product_clicked",checkoutStarted:"health_plan.checkout_started"});function useHealthPlanTelemetry(){return react.useContext(EverfurContext)?.runtime.registry.services.telemetry??noopTelemetry}var PlanPetContext=react.createContext(null);function HealthPlanPetScope({petRef:petRef,children:children}){return react.createElement(PlanPetContext.Provider,{value:petRef},children)}function useHealthPlanBarPet(dockPet){let page=react.useContext(PlanPetContext),ctx=react.useContext(EverfurContext);return page??dockPet??ctx?.activePet??null}function useHealthPlanOpened(drawn2,petRef,plan){let telemetry=useHealthPlanTelemetry(),sent=react.useRef(null);react.useEffect(()=>{if(!drawn2||petRef===null||sent.current===petRef)return;sent.current=petRef;let items=plan?.items??[];telemetry.track(HEALTH_PLAN_EVENTS.opened,{petRef:petRef,itemsCount:items.length,inPlanCount:items.filter(item=>item.inPlan).length})},[drawn2,petRef,plan,telemetry])}function trackProductClicked(telemetry,petRef,productId,inPlan){telemetry.track(HEALTH_PLAN_EVENTS.productClicked,{petRef:petRef,productId:productId,inPlan:inPlan})}function trackCheckoutStarted(telemetry,petRef,cart){telemetry.track(HEALTH_PLAN_EVENTS.checkoutStarted,{petRef:petRef,itemsCount:cart.count,subtotal:cart.subtotal,currency:cart.currency})}function healthPlanPageDrawsWithoutItems(design){return design!=null&&(design.wait!==void 0||design.pick.hidden===true)}function withoutProductPart(design){return{...design,pick:{...design.pick,none:true,hidden:true}}}var NO_PLAN_ITEM=/* @__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 RETRYABILITY_ROWS=[{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:"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:"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:"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:"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:"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:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{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}],CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze(RETRYABILITY_ROWS.map(row=>/* @__PURE__ */Object.freeze(row)));/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row=>row.wireCode));var NORMALIZED_FOLD=/* @__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"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row=BY_KEY.get(candidate+key);if(row)return row}}var CATEGORY_OF=/* @__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(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){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"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 AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__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:ACCESS_DENIED_COPY,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:VALIDATION_FAILED_COPY,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:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."}),SESSION_REVOKED_COPY="This session has ended. Please sign in again.",LINKED_ACCOUNT_READ_ONLY="linked_account_read_only";function displayFor(code,wireCode,reasonCode){return code==="conflict"&&reasonCode===LINKED_ACCOUNT_READ_ONLY?ACCESS_DENIED_COPY:(code==="authRejected"||code==="authExpired")&&typeof wireCode=="string"&&wireCode.trim().toLowerCase()==="session_revoked"?SESSION_REVOKED_COPY:userFacingError(code)}function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),linkedReadOnly=code==="conflict"&&opts?.reasonCode===LINKED_ACCOUNT_READ_ONLY,error={code:code,category:categoryFor(code),retryable:opts?.retryable??(linkedReadOnly?false:isRetryableCode(code)),displayMessage:displayFor(code,opts?.wireCode,linkedReadOnly?LINKED_ACCOUNT_READ_ONLY:null)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}function assertNever(x){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(x)}`)}function errorFrame(fields){/* @__PURE__ */
5
5
  return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:null})}function mintFailedError(cause,refusal){let message=cause instanceof Error?cause.message:typeof cause=="string"?cause:null;return makeEverfurError("authRejected",{retryable:false,...refusal?.wireCode?{wireCode:refusal.wireCode}:{},...refusal?.requestId?{requestId:refusal.requestId}:{},...message?{wireMessage:message}:{},...cause!=null?{raw:cause}:{}})}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause))}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause,{wireCode:wireCodeOf(first.error.raw),requestId:first.error.requestId}))}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?(ctx.identity.reportRejected?.(),err(refusedAfterRemintError(retry.error))):retry}function refusedAfterRemintError(refusal){let raw=refusal.raw,wireCode=wireCodeOf(raw);return makeEverfurError("authRejected",{retryable:false,...refusal.httpStatus!==void 0?{httpStatus:refusal.httpStatus}:{},...refusal.requestId?{requestId:refusal.requestId}:{},...wireCode?{wireCode:wireCode}:{},...refusal.reasonCode?{reasonCode:refusal.reasonCode}:{},...refusal.wireMessage?{wireMessage:refusal.wireMessage}:{},...raw!=null?{raw:raw}:{}})}function wireCodeOf(body){if(typeof body!="object"||body===null)return null;let b=body,code=(typeof b.error=="object"&&b.error!==null?b.error.code:void 0)??b.code;return typeof code=="string"&&code.length>0?code:null}function parseUrl(raw,base3){let Url=globalThis.URL;if(typeof Url=="function"){let url;try{url=base3===void 0?new Url(raw):new Url(raw,base3)}catch{return null}try{if(url.protocol)return url}catch{}}return parseByPattern(raw)}var WHOLE_URL=/^([a-z][a-z0-9+.-]*):\/\/(?:([^:@/?#]*)(?::([^@/?#]*))?@)?(\[[0-9a-f:.]+\]|[\w.~-]+)(?::(\d*))?(\/[^?#]*)?(\?[^#]*)?(#.*)?$/i,REWRITTEN_BY_STANDARD_PARSER=/[\s\u0000-\u001f\u007f\\]/,DEFAULT_PORTS={"http:":"80","https:":"443"};function parseByPattern(raw,base3){let input=raw.trim();let match=REWRITTEN_BY_STANDARD_PARSER.test(input)?null:WHOLE_URL.exec(input);if(match===null)return null;let[,scheme="",username="",password="",host2="",portText="",path="",query="",fragment=""]=match,protocol=`${scheme.toLowerCase()}:`,portNumber=Number(portText);if(portNumber>65535)return null;let port=portText===""||String(portNumber)===DEFAULT_PORTS[protocol]?"":String(portNumber),special=DEFAULT_PORTS[protocol]!==void 0,hostPort=host2.toLowerCase()+(port&&`:${port}`),pathname=path||(special?"/":""),credentials=username||password?`${username}${password&&`:${password}`}@`:"";return{href:`${protocol}//${credentials}${hostPort}${pathname}${query}${fragment}`,protocol:protocol,username:username,password:password,hostname:host2.toLowerCase(),port:port,origin:special?`${protocol}//${hostPort}`:"null",pathname:pathname,search:query==="?"?"":query,hash:fragment==="#"?"":fragment}}function networkError(cause){return makeEverfurError("internalError",{retryable:true,wireMessage:describeCause(cause)})}function describeCause(cause){return cause instanceof Error?cause.message:typeof cause=="string"?cause:"network request failed"}var FUNNEL_UNARY_TIMEOUT_MS=3e4,RETRY_OVERRIDE_MAX_MS=BACKOFF_CAP_MS*2,IDEMPOTENCY_HEADER="idempotency-key",MUTATING_METHODS=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),NOOP_OBSERVER=/* @__PURE__ */Object.freeze({onEvent(){}}),defaultFunnelTimers=/* @__PURE__ */Object.freeze({setTimeout:(handler,ms)=>setTimeout(handler,ms),clearTimeout:handle=>clearTimeout(handle),now:()=>Date.now()});function seededIdempotencyKey(seed){let safe=seed.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return safe.length===0?null:`efs_${safe}`.slice(0,128)}function createRequestFunnel(deps){let observer=deps.observer??NOOP_OBSERVER,timers=deps.timers??defaultFunnelTimers,rng=deps.rng??Math.random,sleep=deps.sleep??((ms,signal)=>delayAbortable(ms,timers,signal)),ceiling=deps.maxAttempts??MAX_RETRY_ATTEMPTS,timeoutMs=deps.unaryTimeoutMs??FUNNEL_UNARY_TIMEOUT_MS,mintKey=deps.newIdempotencyKey??defaultIdempotencyKeyFactory(),emit=event=>{try{observer.onEvent(event)}catch{}};async function send(call,req,opts){let perCallMaxAttempts=opts?.maxAttempts,maxAttempts=Math.max(1,perCallMaxAttempts??ceiling),idempotent=opts?.idempotent??MUTATING_METHODS.has(req.method),seeded=opts?.idempotencyKey===void 0?null:seededIdempotencyKey(opts.idempotencyKey),idempotencyKey=idempotent?seeded??mintKey():null,base3=assembleHeaders(req,idempotencyKey),attempt=0;for(;;){let stamp=extra=>/* @__PURE__ */Object.freeze({call:call,method:req.method,path:req.path,attempt:attempt,...idempotencyKey?{idempotencyKey:idempotencyKey}:{},...extra});emit(stamp({phase:"attempt"}));let deadline=boundedSignal(timeoutMs,timers),merged=mergeSignals(deadline.signal,req.signal),settled;try{settled=await authedSend({...base3,signal:merged.signal},deps.auth)}catch(cause){settled=err(networkError(cause))}finally{merged.dispose(),deadline.cancel()}if(settled.ok)return emit(stamp({phase:"settled",ok:true,reason:"ok"})),settled;let error=settled.error,decision=decideRetry(error,attempt,{maxAttempts:maxAttempts,rng:rng,now:timers.now(),aborted:req.signal?.aborted===true,...perCallMaxAttempts!==void 0?{perCallMaxAttempts:perCallMaxAttempts}:{},...deps.errorPolicy!==void 0?{policy:deps.errorPolicy}:{}}),settledEvent={ok:false,code:error.code,reason:decision.reason,...error.httpStatus!==void 0?{httpStatus:error.httpStatus}:{},...error.requestId!==void 0?{requestId:error.requestId}:{}};if(!decision.retry)return emit(stamp({phase:"settled",...settledEvent})),err(error);if(emit(stamp({phase:"retry",...settledEvent,delayMs:decision.delayMs})),await sleep(decision.delayMs,req.signal),req.signal?.aborted===true)return emit(stamp({phase:"settled",...settledEvent,reason:"aborted"})),err(error);attempt+=1}}async function authorize(req){return withAuthHeaders(req,await resolveDeviceAuth(deps.auth))}async function*stream(call,req,signal){emit(
6
6
  /* @__PURE__ */Object.freeze({call:call,phase:"stream.open",method:req.method,path:req.path,attempt:0}));try{yield*deps.auth.transport.stream(req,signal)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
7
7
  return Object.freeze({send:send,authorize:authorize,stream:stream})}function assembleHeaders(req,idempotencyKey){let headers={};for(let[key,value]of Object.entries(req.headers??{}))key.toLowerCase()!==IDEMPOTENCY_HEADER&&(headers[key]=value);return idempotencyKey!==null&&(headers["Idempotency-Key"]=idempotencyKey),{...req,headers:headers}}function defaultIdempotencyKeyFactory(){let counter=0;return()=>`efk_${Date.now().toString(36)}_${(counter++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var POLICY_MAX_ATTEMPTS_CAP=10;function decideRetry(error,attempt,ctx){if(ctx.aborted)return{retry:false,reason:"aborted"};let throttle=throttleKind(error);if(throttle==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(throttle!=="burst"&&!isAutoRetryable(error.code))return{retry:false,reason:"terminal-code"};let reason=throttle==="burst"?"burst-throttle":"retryable-code";if((()=>{if(ctx.policy===void 0)return false;try{return!ctx.policy.shouldRetry(error.code,attempt)}catch{return false}})())return{retry:false,reason:"terminal-code"};let policyCeiling=()=>{if(ctx.policy===void 0)return null;let raw;try{raw=ctx.policy.maxAttempts(error.code)}catch{return null}return typeof raw!="number"||!Number.isFinite(raw)?null:Math.max(1,Math.min(POLICY_MAX_ATTEMPTS_CAP,Math.floor(raw)))},ceiling=ctx.perCallMaxAttempts??policyCeiling()??ctx.maxAttempts;if(attempt+1>=ceiling)return{retry:false,reason:"attempts-exhausted"};let override=retryOverrideMs(error,ctx.now);return override!==null?override>RETRY_OVERRIDE_MAX_MS?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:reason,delayMs:override}:{retry:true,reason:reason,delayMs:backoffDelayMs(attempt,ctx.rng)}}function throttleKind(error){let code=error.code==="unknown"?fromWire(rawWireCode(error.raw)):error.code;return code==="quotaExceeded"?"quota":code==="rateLimited"||error.httpStatus===429?"burst":null}function retryOverrideMs(error,now){let at=findResetsAt(error.raw);if(at!==null){let delta=at-now;return delta>0?delta:0}let wait=findRetryAfterSeconds(error.raw);return wait===null?null:Math.round(wait*1e3)}function findRetryAfterSeconds(raw){for(let scope of candidateScopes(raw)){let value=scope.retry_after_seconds;if(typeof value=="number"&&Number.isFinite(value)&&value>=0)return value}return null}function findResetsAt(raw){for(let scope of candidateScopes(raw)){let value=scope.resets_at,parsed=parseInstantMs(value);if(parsed!==null)return parsed}return null}function candidateScopes(raw){if(!isRecord(raw))return[];let out=[raw];for(let nested of["error","detail"]){let value=raw[nested];isRecord(value)&&out.push(value)}return out}function parseInstantMs(value){if(typeof value=="number"&&Number.isFinite(value))return value<1e11?Math.round(value*1e3):Math.round(value);if(typeof value=="string"&&value.trim().length>0){let parsed=Date.parse(value);return Number.isFinite(parsed)?parsed:null}return null}function rawWireCode(raw){for(let scope of candidateScopes(raw)){let code=scope.code;if(typeof code=="string"&&code.length>0)return code}return null}function isRecord(value){return typeof value=="object"&&value!==null}async function resolveDeviceAuth(auth){return auth.mode==="anonymous"?{mode:"anonymous",publishableKey:auth.publishableKey,userRef:auth.userRef,...auth.sessionId?{sessionId:auth.sessionId}:{}}:{mode:"personalized",token:await auth.identity.currentToken(),userRef:auth.userRef,...auth.sessionId?{sessionId:auth.sessionId}:{}}}function boundedSignal(ms,timers){let ctrl=new AbortController,handle=timers.setTimeout(()=>ctrl.abort(),ms);return{signal:ctrl.signal,cancel:()=>timers.clearTimeout(handle)}}function mergeSignals(deadline,caller){let noop=()=>{};if(!caller)return{signal:deadline,dispose:noop};let ctrl=new AbortController;if(deadline.aborted||caller.aborted)return ctrl.abort(),{signal:ctrl.signal,dispose:noop};let onAbort=()=>ctrl.abort();return deadline.addEventListener("abort",onAbort,{once:true}),caller.addEventListener("abort",onAbort,{once:true}),{signal:ctrl.signal,dispose:()=>{deadline.removeEventListener("abort",onAbort),caller.removeEventListener("abort",onAbort)}}}function delayAbortable(ms,timers,signal){return ms<=0||signal?.aborted===true?Promise.resolve():new Promise(resolve=>{let handle=timers.setTimeout(()=>{signal?.removeEventListener("abort",onAbort),resolve()},ms),onAbort=()=>{timers.clearTimeout(handle),resolve()};signal?.addEventListener("abort",onAbort,{once:true})})}function isNotFoundError(error){return error!=null&&(error.httpStatus===404||error.category==="notFound")}function plainNotFound(error){return error.code!=="conversationNotFound"?error:makeEverfurError("resourceNotFound",{retryable:false,...error.httpStatus===void 0?{}:{httpStatus:error.httpStatus},...error.requestId===void 0?{}:{requestId:error.requestId},...error.reasonCode===void 0?{}:{reasonCode:error.reasonCode},...error.wireMessage===void 0?{}:{wireMessage:error.wireMessage},...error.raw===void 0?{}:{raw:error.raw}})}function plainResult(res){return res.ok?res:err(plainNotFound(res.error))}function withPlainNotFound(funnel){return{send:async(...args)=>plainResult(await funnel.send(...args)),authorize:req=>funnel.authorize(req),stream:(call,req,signal)=>funnel.stream(call,req,signal)}}var HEALTH_PLAN_REASON_KINDS=/* @__PURE__ */Object.freeze(["dna","records","inside","profile"]),REF_MAX=128;function invalid(wireMessage){return makeEverfurError("validationFailed",{retryable:false,wireMessage:wireMessage})}function disposed(verb){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${verb} was called after unmount`})}function malformed(call){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${call}: the response carried no plan`})}var str=(value,max=4e3)=>typeof value=="string"&&value.trim().length>0&&value.length<=max?value.trim():null;function httpsUrl(value){let s=str(value,2048);return s===null?null:/^https:\/\/[^\s]+$/i.test(s)?s:null}function priceOf(value){let n=typeof value=="number"?value:typeof value=="string"&&/^\d+(\.\d+)?$/.test(value.trim())?Number(value):Number.NaN;return Number.isFinite(n)&&n>=0?n:null}function currencyOf(value){return typeof value=="string"&&/^[A-Za-z]{3}$/.test(value)?value.toUpperCase():null}function reasonsOf(value){if(!Array.isArray(value))/* @__PURE__ */return Object.freeze([]);let out=[];for(let raw of value){if(raw===null||typeof raw!="object")continue;let o=raw,text2=str(o.text,1e3);if(text2===null)continue;let kind=typeof o.kind=="string"&&HEALTH_PLAN_REASON_KINDS.includes(o.kind)?o.kind:"profile";out.push(/* @__PURE__ */Object.freeze({kind:kind,text:text2}))}/* @__PURE__ */
@@ -18,7 +18,7 @@ return Object.freeze({orders:/* @__PURE__ */Object.freeze(rows.map(healthPlanOne
18
18
  return Object.freeze({productId:productId,currency:currency,boxPrice:boxPrice,firstBoxPrice:offerApplies?money(o.first_box_price)??boxPrice:boxPrice,firstBoxDiscountPercent:offerApplies?pct:0,offerApplies:offerApplies,oneBox:oneBoxOf(o.one_box,boxPrice),intervalOptions:options,defaultIntervalDays:def!==null&&options.includes(def)?def:options[0],supply:supply,firstBoxShipsOn:dateOf(o.first_box_ships_on),subscription:healthPlanSubscriptionFromWire(o.subscription)})}function invalid2(wireMessage){return makeEverfurError("validationFailed",{retryable:false,wireMessage:wireMessage})}function malformed2(call){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${call}: the response carried no subscription`})}function disposed2(verb){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${verb} was called after unmount`})}var validRef2=value=>typeof value=="string"&&value.length>0&&value.length<=REF_MAX2;function base(petRef){return`/widget/v1/pets/${encodeURIComponent(petRef)}/plan/subscriptions`}function createHealthPlanSubscriptionRepositoryOver(deps){let funnel=withPlainNotFound(deps.funnel??createRequestFunnel({auth:deps.auth,...deps.errorPolicy?{errorPolicy:deps.errorPolicy}:{}})),one2=async(call,petRef,method,suffix,body)=>{if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));let res=await funnel.send(call,{method:method,path:`${base(petRef)}${suffix}`,...body===void 0?{}:{body:body}});if(!res.ok)return err(res.error);let sub=healthPlanSubscriptionFromWire(res.value);return sub===null?err(malformed2(call)):ok(sub)},idSuffix=(id,tail="")=>validRef2(id)?`/${encodeURIComponent(id)}${tail}`:null;return{async quote(petRef,productId){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));if(!validRef2(productId))return err(invalid2("productId must be 1..128 characters"));let res=await funnel.send("healthPlan.subscription.quote",{method:"GET",path:`${base(petRef)}/quote`,query:{product_id:productId}});if(!res.ok)return err(res.error);let quote=healthPlanSubscriptionQuoteFromWire(res.value);return quote===null?err(malformed2("healthPlan.subscription.quote")):ok(quote)},async list(petRef){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));let res=await funnel.send("healthPlan.subscription.list",{method:"GET",path:base(petRef)});if(!res.ok)return err(res.error);let rows=res.value!==null&&typeof res.value=="object"?res.value.subscriptions:null;return Array.isArray(rows)?ok(/* @__PURE__ */Object.freeze(rows.map(healthPlanSubscriptionFromWire).filter(s=>s!==null))):err(malformed2("healthPlan.subscription.list"))},create(petRef,productId,intervalDays){return validRef2(productId)?one2("healthPlan.subscription.create",petRef,"POST","",{product_id:productId,...intervalDays===void 0?{}:{interval_days:intervalDays}}):Promise.resolve(err(invalid2("productId must be 1..128 characters")))},changeInterval(petRef,id,intervalDays){let s=idSuffix(id);return s===null?Promise.resolve(err(invalid2("subscriptionId must be 1..128 characters"))):one2("healthPlan.subscription.interval",petRef,"PATCH",s,{interval_days:intervalDays})},skip(petRef,id){let s=idSuffix(id,"/skip");return s===null?Promise.resolve(err(invalid2("subscriptionId must be 1..128 characters"))):one2("healthPlan.subscription.skip",petRef,"POST",s,{})},cancel(petRef,id){let s=idSuffix(id,"/cancel");return s===null?Promise.resolve(err(invalid2("subscriptionId must be 1..128 characters"))):one2("healthPlan.subscription.cancel",petRef,"POST",s,{})},restart(petRef,id,intervalDays){let s=idSuffix(id,"/restart");return s===null?Promise.resolve(err(invalid2("subscriptionId must be 1..128 characters"))):one2("healthPlan.subscription.restart",petRef,"POST",s,intervalDays===void 0?{}:{interval_days:intervalDays})},async buyOneBox(petRef,productId,tapKey){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));if(!validRef2(productId))return err(invalid2("productId must be 1..128 characters"));let res=await funnel.send("healthPlan.subscription.oneBox",{method:"POST",path:`${base(petRef)}/one-box`,body:{product_id:productId}},{idempotent:true,...tapKey===void 0?{}:{idempotencyKey:`hp-one-box:${tapKey}`}});if(!res.ok)return err(res.error);let order=healthPlanOneBoxOrderFromWire(res.value);return order===null?err(malformed2("healthPlan.subscription.oneBox")):ok(order)},async listOneBoxOrders(petRef){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));let res=await funnel.send("healthPlan.subscription.oneBoxList",{method:"GET",path:`${base(petRef)}/one-box`});if(!res.ok)return err(res.error);let page=healthPlanOneBoxOrderPageFromWire(res.value);return page===null?err(malformed2("healthPlan.subscription.oneBoxList")):ok(page.orders)},async listOneBoxOrderPage(petRef,opts){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));let limit=opts?.limit;if(limit!==void 0&&!(Number.isInteger(limit)&&limit>=1&&limit<=50))return err(invalid2("limit must be a whole number 1..50"));if(opts?.cursor!==void 0&&!validRef2(opts.cursor))return err(invalid2("cursor must be 1..128 characters"));let query={...limit!==void 0?{limit:String(limit)}:{},...opts?.cursor!==void 0?{cursor:opts.cursor}:{}},res=await funnel.send("healthPlan.subscription.oneBoxList",{method:"GET",path:`${base(petRef)}/one-box`,query:query});if(!res.ok)return err(res.error);let page=healthPlanOneBoxOrderPageFromWire(res.value);return page===null?err(malformed2("healthPlan.subscription.oneBoxList")):ok(page)}}}function createHealthPlanSubscriptionRepository(runtime){let over=()=>{let{services:services}=runtime.registry;return createHealthPlanSubscriptionRepositoryOver({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}})},guard=(verb,f)=>(...a)=>runtime.isDisposed?Promise.resolve(err(disposed2(verb))):f(over(),...a);return{quote:guard("quote",(r,p,id)=>r.quote(p,id)),list:guard("list",(r,p)=>r.list(p)),create:guard("create",(r,p,id,n)=>r.create(p,id,n)),changeInterval:guard("changeInterval",(r,p,id,n)=>r.changeInterval(p,id,n)),skip:guard("skip",(r,p,id)=>r.skip(p,id)),cancel:guard("cancel",(r,p,id)=>r.cancel(p,id)),restart:guard("restart",(r,p,id,n)=>r.restart(p,id,n)),buyOneBox:guard("buyOneBox",(r,p,id,k2)=>r.buyOneBox(p,id,k2)),listOneBoxOrders:guard("listOneBoxOrders",(r,p)=>r.listOneBoxOrders(p)),listOneBoxOrderPage:guard("listOneBoxOrderPage",(r,p,o)=>r.listOneBoxOrderPage(p,o))}}var REFUSALS=/* @__PURE__ */new Set(["cart_disabled","cart_has_subscription","cart_currency_mixed","sample_product","partner_endpoint_missing","checkout_pending","already_subscribed"]);function healthPlanCheckoutRefusal(error){if(error==null||error.httpStatus!==409)return null;let raw=obj(error.raw);for(let candidate of[error.reasonCode,error.wireMessage,raw?.detail,raw?.message,raw?.reason_code])if(typeof candidate=="string"&&REFUSALS.has(candidate.trim()))return candidate.trim();return null}var REF_MAX3=128,CART_MAX=10,ICONS=/* @__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"]),TONES=/* @__PURE__ */new Set(["y","c","g","r"]),TRACK_STATES=/* @__PURE__ */new Set(["done","now","next"]),obj=value=>value!==null&&typeof value=="object"&&!Array.isArray(value)?value:null,str3=(value,max=1e3)=>typeof value=="string"&&value.trim().length>0&&value.length<=max?value.trim():null,kindOf=value=>typeof value=="string"&&/^[A-Za-z0-9_-]{1,40}$/.test(value)?value:null,iconOf=value=>typeof value=="string"&&ICONS.has(value)?value:null;function imageOf(value){let s=str3(value,2048);return s===null||/\s/.test(s)?null:/^https:\/\/[^/]/i.test(s)||/^\/(?![/\\])/.test(s)?s:null}var idOf2=value=>typeof value=="number"&&Number.isInteger(value)?String(value):str3(value,REF_MAX3);function weightOf(value){return typeof value=="number"&&Number.isFinite(value)&&value>0?value:null}function clean(fields){/* @__PURE__ */
19
19
  return Object.freeze(Object.fromEntries(Object.entries(fields).filter(([,v])=>v!=null)))}function listOf(value,each,max=20){if(!Array.isArray(value))return null;let out=[];for(let row of value){if(out.length>=max)break;let mapped2=each(row);mapped2!==null&&out.push(mapped2)}return out.length===0?null:/* @__PURE__ */Object.freeze(out)}var words=(value,max=12,len=300)=>listOf(value,v=>str3(v,len),max);function focusOf(value){let o=obj(value),kicker=str3(o?.kicker,120),title=str3(o?.title,300);if(o===null||kicker===null||title===null)return null;let risk=obj(o.risk),odds=obj(o.odds),quote=obj(o.quote),jump=obj(o.jump);return clean({kicker:kicker,title:title,sources:listOf(o.sources,r=>{let label=str3(obj(r)?.label,60);return label===null?null:clean({label:label,kind:kindOf(obj(r)?.kind)})},6),risk:str3(risk?.lead,300)===null?null:clean({lead:str3(risk?.lead,300),body:str3(risk?.body),kind:kindOf(risk?.kind)}),odds:str3(odds?.label,120)===null||str3(odds?.from,20)===null||str3(odds?.to,20)===null?null:clean({label:str3(odds?.label,120),tag:str3(odds?.tag,40),from:str3(odds?.from,20),to:str3(odds?.to,20),toLabel:str3(odds?.toLabel,120)}),quote:str3(quote?.text)===null?null:clean({kicker:str3(quote?.kicker,120),tag:str3(quote?.tag,40),text:str3(quote?.text)}),jump:str3(jump?.title,300)===null||str3(jump?.go,60)===null?null:clean({title:str3(jump?.title,300),go:str3(jump?.go,60)}),report:reportOf(o.report)})}function reportOf(value){let o=obj(value),label=str3(o?.label,120),text2=str3(o?.text,1200);return label===null||text2===null?null:clean({label:label,text:text2,actions:words(o?.actions,5,300)})}function routineOf(value){let o=obj(value),title=str3(o?.title,300),steps=listOf(o?.steps,r=>{let s=obj(r),t=str3(s?.title,300),tone=s?.tone;return t===null?null:clean({title:t,body:str3(s?.body),source:str3(s?.source,200),tone:typeof tone=="string"&&TONES.has(tone)?tone:null,icon:iconOf(s?.icon),fromVet:s?.fromVet===true?true:null})});return title===null||steps===null?null:clean({title:title,label:str3(o?.label,60),steps:steps})}function pickOf(value){let o=obj(value),title=str3(o?.title,300);if(o===null||title===null)return null;let rating=obj(o.rating),reviews=obj(o.reviews),why=obj(o.why),score=obj(why?.score),dose=obj(o.dose),ingredients=obj(o.ingredients),reviewItems=listOf(reviews?.items,r=>{let v=obj(r),stars=v?.stars,text2=str3(v?.text),by=str3(v?.by,80);return typeof stars!="number"||!Number.isFinite(stars)||stars<1||stars>5||text2===null||by===null?null:clean({stars:Math.round(stars),text:text2,by:by})},5),whyRows=listOf(why?.rows,r=>{let v=obj(r),chip=str3(v?.chip,40),t=str3(v?.title,300);return chip===null||t===null?null:clean({chip:chip,kind:kindOf(v?.kind),title:t,body:str3(v?.body)})}),stats=listOf(dose?.stats,r=>{let v=obj(r),val=str3(v?.value,40),label=str3(v?.label,120),kind=v?.kind;return val===null||label===null?null:clean({value:val,label:label,kind:kind==="weight"||kind==="dose"||kind==="days"?kind:null})},6),ingredientItems=words(ingredients?.items,12,80);return clean({title:title,none:o.none===true?true:null,hidden:o.none===true&&o.hidden===true?true:null,productId:idOf2(o.productId),partnerSku:str3(o.partnerSku,200),rating:str3(rating?.value,20)===null?null:clean({value:str3(rating?.value,20),label:str3(rating?.label,120)}),line:str3(o.line),reviews:str3(reviews?.label,200)===null||reviewItems===null?null:clean({label:str3(reviews?.label,200),items:reviewItems}),checkoutLine:str3(o.checkoutLine,300),why:str3(why?.title,200)===null||whyRows===null?null:clean({title:str3(why?.title,200),rows:whyRows,score:str3(score?.text,200)===null||str3(score?.value,20)===null?null:clean({text:str3(score?.text,200),value:str3(score?.value,20)})}),dose:str3(dose?.title,200)===null||stats===null?null:clean({title:str3(dose?.title,200),stats:stats,note:str3(dose?.note)}),doseLabel:str3(o.doseLabel,120),ingredients:ingredientItems===null?null:clean({label:str3(ingredients?.label,200),items:ingredientItems}),proof:str3(o.proof,300),trust:listOf(o.trust,r=>{let v=obj(r),icon=iconOf(v?.icon),label=str3(v?.label,120);return icon===null||label===null?null:clean({icon:icon,label:label})},6),more:str3(o.more,120),fine:str3(o.fine),checkin:str3(o.checkin,200),detail:healthPlanItemDetailOf(o.detail)??null})}function signsOf(value){let o=obj(value),title=str3(o?.title,200),items=listOf(o?.items,r=>{let v=obj(r),t=str3(v?.title,300),body=str3(v?.body);return t===null||body===null?null:clean({title:t,body:body,urgent:v?.urgent===true?true:null,callVet:v?.callVet===true?true:null})});return title===null||items===null?null:clean({title:title,items:items})}function checkupOf(value){let o=obj(value),title=str3(o?.title,200),questions=words(o?.questions,12,300),add=str3(o?.add,80),added=str3(o?.added,80);return title===null||questions===null||add===null||added===null?null:clean({title:title,questions:questions,add:add,added:added})}function extrasOf(value){let o=obj(value),title=str3(o?.title,200),items=listOf(o?.items,r=>{let v=obj(r),key=str3(v?.key,REF_MAX3),t=str3(v?.title,300),action=str3(v?.action,80),productId=idOf2(v?.productId),added=str3(v?.added,80)??(productId!==null?action:null);return key===null||t===null||action===null||added===null?null:clean({key:key,productId:productId,title:t,body:str3(v?.body),price:str3(v?.price,40),was:str3(v?.was,40),tag:str3(v?.tag,40),imageUrl:imageOf(v?.imageUrl),icon:iconOf(v?.icon),kind:kindOf(v?.kind),action:action,added:added,owned:v?.owned===true?true:null,detail:healthPlanItemDetailOf(v?.detail)??null})},6);return title===null||items===null?null:clean({title:title,items:items})}function waitOf(value){let o=obj(value),kicker=str3(o?.kicker,120),title=str3(o?.title,120);return o===null||kicker===null||title===null?null:clean({kicker:kicker,title:title,icon:iconOf(o.icon),track:listOf(o.track,r=>{let v=obj(r),t=str3(v?.title,120),state2=v?.state;return t===null?null:clean({title:t,detail:str3(v?.detail,120),state:typeof state2=="string"&&TRACK_STATES.has(state2)?state2:null,tag:str3(v?.tag,40)})},6),heading:str3(o.heading,200),rows:listOf(o.rows,r=>{let v=obj(r),icon=iconOf(v?.icon),label=str3(v?.label,120);if(icon===null||label===null)return null;if(v?.fromVet===true)return clean({icon:icon,label:label,text:"",fromVet:true});let text2=str3(v?.text,300);return text2===null?null:clean({icon:icon,label:label,text:text2})},6),note:str3(o.note,300),action:str3(o.action,80)})}function healthPlanFocusDesignFromWire(raw){let o=obj(raw),title=str3(o?.title,300),pick2=pickOf(o?.pick);if(o===null||title===null||pick2===null)return null;let byline=obj(o.byline);return clean({eyebrow:str3(o.eyebrow,120),title:title,subtitle:str3(o.subtitle,300),subtitleNoRecords:str3(o.subtitleNoRecords,300),headImageUrl:imageOf(o.headImageUrl),byline:str3(byline?.name,120)===null?null:clean({name:str3(byline?.name,120),role:str3(byline?.role,120),imageUrl:imageOf(byline?.imageUrl),shortName:str3(byline?.shortName,60)}),focus:focusOf(o.focus),routine:routineOf(o.routine),pick:pick2,signs:signsOf(o.signs),checkup:checkupOf(o.checkup),extras:extrasOf(o.extras),wait:waitOf(o.wait),fine:str3(o.fine),checkoutRows:listOf(o.checkoutRows,r=>{let v=obj(r),icon=iconOf(v?.icon),label=str3(v?.label,60),val=str3(v?.value,200);return icon===null||label===null||val===null?null:clean({icon:icon,label:label,value:val})},6)})}function healthPlanPageFromWire(raw,petRef){let o=obj(raw);if(o===null||!("page"in o))return null;let pet=obj(o.pet),sex=pet?.sex;/* @__PURE__ */
20
20
  return Object.freeze({petRef:str3(o.pet_ref,REF_MAX3)??petRef,pet:/* @__PURE__ */Object.freeze({name:str3(pet?.name,120),species:str3(pet?.species,60),sex:sex==="female"||sex==="male"?sex:null,breed:str3(pet?.breed,120),weightKg:weightOf(pet?.weight_kg),weightLb:weightOf(pet?.weight_lb)}),checkout:o.checkout==="everfur_stripe"?"everfur_stripe":"partner",page:healthPlanFocusDesignFromWire(o.page),vetReviewed:o.vet_reviewed===true,trackingTextsEnabled:o.tracking_texts_enabled===true})}function healthPlanCheckoutSessionFromWire(raw){let o=obj(raw),checkoutId=idOf2(o?.checkout_id),url=str3(o?.url,4096);return checkoutId===null||url===null||!/^https:\/\/[^\s/][^\s]*$/i.test(url)?null:/* @__PURE__ */Object.freeze({checkoutId:checkoutId,url:url})}var STATUSES=/* @__PURE__ */new Set(["pending","paid","expired","failed"]);function healthPlanCheckoutStateFromWire(raw){let o=obj(raw),status=o?.status,purchase=o?.purchase;if(typeof status!="string"||!STATUSES.has(status)||purchase!=="one_box"&&purchase!=="subscription")return null;let order=healthPlanOneBoxOrderFromWire(o?.order),list=Array.isArray(o?.orders)?(o?.orders).map(healthPlanOneBoxOrderFromWire).filter(x=>x!==null):[];/* @__PURE__ */
21
- return Object.freeze({status:status,purchase:purchase,order:order??list[0]??null,orders:/* @__PURE__ */Object.freeze(list.length>0?list:order===null?[]:[order]),subscription:healthPlanSubscriptionFromWire(o?.subscription)})}function invalid3(wireMessage){return makeEverfurError("validationFailed",{retryable:false,wireMessage:wireMessage})}function malformed3(call){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${call}: the response was not the expected shape`})}function disposed3(verb){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${verb} was called after unmount`})}var validRef3=value=>typeof value=="string"&&value.length>0&&value.length<=REF_MAX3,absoluteUrl=value=>typeof value=="string"&&value.length<=2048&&/^https?:\/\/[^\s/][^\s]*$/i.test(value);function base2(petRef){return`/widget/v1/pets/${encodeURIComponent(petRef)}/plan`}async function readPage(funnel,petRef,opts){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));let res=await funnel.send("healthPlan.page.read",{method:"GET",path:`${base2(petRef)}/page`,...opts?.signal?{signal:opts.signal}:{}});if(!res.ok)return err(res.error);let page=healthPlanPageFromWire(res.value,petRef);return page===null?err(malformed3("healthPlan.page.read")):ok(page)}var readers=/* @__PURE__ */new WeakMap;function createHealthPlanPageReader(runtime){let known=readers.get(runtime);if(known!==void 0)return known;let reader=makeHealthPlanPageReader(runtime);return readers.set(runtime,reader),reader}function makeHealthPlanPageReader(runtime){return{getPage:(petRef,opts)=>{if(runtime.isDisposed)return Promise.resolve(err(disposed3("getPage")));let{services:services}=runtime.registry,funnel=withPlainNotFound(createRequestFunnel({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}}));return readPage(funnel,petRef,opts)}}}function createHealthPlanPageRepositoryOver(deps){let funnel=withPlainNotFound(deps.funnel??createRequestFunnel({auth:deps.auth,...deps.errorPolicy?{errorPolicy:deps.errorPolicy}:{}}));return{getPage:(petRef,opts)=>readPage(funnel,petRef,opts),async startCheckout(petRef,body,idempotencyKey){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));if(!validRef3(body.productId))return err(invalid3("productId must be 1..128 characters"));if(body.purchase!=="one_box"&&body.purchase!=="subscription")return err(invalid3("purchase must be one_box or subscription"));if(body.intervalDays!==void 0&&(!Number.isInteger(body.intervalDays)||body.intervalDays<=0))return err(invalid3("intervalDays must be a positive whole number"));if(!absoluteUrl(body.successUrl)||!absoluteUrl(body.cancelUrl))return err(invalid3("successUrl and cancelUrl must be absolute http(s) URLs"));let res=await funnel.send("healthPlan.checkout.start",{method:"POST",path:`${base2(petRef)}/checkout`,body:{product_id:body.productId,purchase:body.purchase,...body.purchase==="subscription"&&body.intervalDays!==void 0?{interval_days:body.intervalDays}:{},success_url:body.successUrl,cancel_url:body.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${idempotencyKey}`});if(!res.ok)return err(res.error);let session=healthPlanCheckoutSessionFromWire(res.value);return session===null?err(malformed3("healthPlan.checkout.start")):ok(session)},async startCartCheckout(petRef,body,idempotencyKey){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));let items=body.items;if(!Array.isArray(items)||items.length<1||items.length>CART_MAX)return err(invalid3("items must hold 1..10 lines"));let seen=/* @__PURE__ */new Set;for(let it of items){if(!validRef3(it.productId)||seen.has(it.productId))return err(invalid3("each item needs a productId, once per cart"));if(seen.add(it.productId),it.purchase!=="one_box"&&it.purchase!=="subscription")return err(invalid3("purchase must be one_box or subscription"));let q=it.quantity??1;if(!Number.isInteger(q)||q<1||q>CART_MAX)return err(invalid3("quantity must be a whole number 1..10"));if(it.purchase==="subscription"&&q!==1)return err(invalid3("a subscription line is quantity 1"));if(it.intervalDays!==void 0&&(!Number.isInteger(it.intervalDays)||it.intervalDays<=0))return err(invalid3("intervalDays must be a positive whole number"))}if(!absoluteUrl(body.successUrl)||!absoluteUrl(body.cancelUrl))return err(invalid3("successUrl and cancelUrl must be absolute http(s) URLs"));let res=await funnel.send("healthPlan.checkout.start",{method:"POST",path:`${base2(petRef)}/checkout`,body:{items:items.map(it=>({product_id:it.productId,purchase:it.purchase,...it.purchase==="subscription"&&it.intervalDays!==void 0?{interval_days:it.intervalDays}:{},quantity:it.quantity??1})),success_url:body.successUrl,cancel_url:body.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${idempotencyKey}`});if(!res.ok)return err(res.error);let session=healthPlanCheckoutSessionFromWire(res.value);return session===null?err(malformed3("healthPlan.checkout.start")):ok(session)},async getCheckout(petRef,checkoutId){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));if(!validRef3(checkoutId))return err(invalid3("checkoutId must be 1..128 characters"));let res=await funnel.send("healthPlan.checkout.read",{method:"GET",path:`${base2(petRef)}/checkout/${encodeURIComponent(checkoutId)}`});if(!res.ok)return err(res.error);let state2=healthPlanCheckoutStateFromWire(res.value);return state2===null?err(malformed3("healthPlan.checkout.read")):ok(state2)}}}function createHealthPlanPageRepository(runtime){let over=()=>{let{services:services}=runtime.registry;return createHealthPlanPageRepositoryOver({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}})};return{getPage:(petRef,opts)=>runtime.isDisposed?Promise.resolve(err(disposed3("getPage"))):over().getPage(petRef,opts),startCheckout:(petRef,body,key)=>runtime.isDisposed?Promise.resolve(err(disposed3("startCheckout"))):over().startCheckout(petRef,body,key),startCartCheckout:(petRef,body,key)=>runtime.isDisposed?Promise.resolve(err(disposed3("startCartCheckout"))):over().startCartCheckout?.(petRef,body,key)??Promise.resolve(err(disposed3("startCartCheckout"))),getCheckout:(petRef,id)=>runtime.isDisposed?Promise.resolve(err(disposed3("getCheckout"))):over().getCheckout(petRef,id)}}var HEALTH_PLAN_PAGE_SHARE_MS=HEALTH_PLAN_STALE_MS,SHARED_READS_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanPageReads@v1");function sharedReads(){let host2=globalThis,stored2=host2[SHARED_READS_SYMBOL];if(stored2 instanceof WeakMap)return stored2;let made=/* @__PURE__ */new WeakMap;return host2[SHARED_READS_SYMBOL]=made,made}function readShared(reader,runtime,userRef,petRef,fresh2){let all=sharedReads(),reads=all.get(runtime);reads===void 0&&(reads=/* @__PURE__ */new Map,all.set(runtime,reads));let map=reads,key=`${userRef}\0${petRef}`,hit=map.get(key);if(!fresh2&&hit!==void 0&&(hit.at===null||Date.now()-hit.at<HEALTH_PLAN_PAGE_SHARE_MS))return hit.promise;let entry={at:null,promise:reader.getPage(petRef).then(res=>(map.get(key)===entry&&(res.ok||isNotFoundError(res.error)?entry.at=Date.now():map.delete(key)),res))};return map.set(key,entry),entry.promise}function useHealthPlanPageRepository(){let{runtime:runtime}=useEverfurContext();return react.useMemo(()=>createHealthPlanPageRepository(runtime),[runtime])}function useHealthPlanPage(options){let{userRef:userRef,runtime:runtime}=useEverfurContext(),own=react.useMemo(()=>createHealthPlanPageReader(runtime),[runtime]),hostRepository=options.repository,repository=hostRepository??own,getPage=react.useCallback((pet,fresh2)=>hostRepository!==void 0||userRef==null?repository.getPage(pet):readShared(own,runtime,userRef,pet,fresh2),[hostRepository,repository,own,runtime,userRef]),{petRef:petRef}=options,enabled=options.enabled!==false&&userRef!=null&&petRef!==null,[state2,setState]=react.useState({phase:"idle",petRef:null,page:null,error:null}),epoch=react.useRef(0),quiet=react.useRef(0),read=react.useCallback(async fresh2=>{let mine=++epoch.current;if(!enabled||petRef===null){setState(prev=>prev.phase==="idle"&&prev.petRef===null?prev:{phase:"idle",petRef:null,page:null,error:null});return}setState(prev=>({phase:"loading",petRef:petRef,page:prev.petRef===petRef?prev.page:null,error:null}));let res=await getPage(petRef,fresh2);mine===epoch.current&&(res.ok?setState({phase:"ready",petRef:petRef,page:res.value,error:null,readyAt:Date.now()}):isNotFoundError(res.error)?setState({phase:"ready",petRef:petRef,page:null,error:null,missing:true,readyAt:Date.now()}):setState({phase:"failed",petRef:petRef,page:null,error:res.error}))},[enabled,petRef,getPage]),load=react.useCallback(()=>read(true),[read]),ready=state2.phase==="ready"&&state2.petRef===petRef,revalidate=react.useCallback(async()=>{if(!enabled||petRef===null||!ready)return;let mine=epoch.current,seq=++quiet.current,res=await getPage(petRef,true);mine!==epoch.current||seq!==quiet.current||!res.ok||setState(prev=>prev.phase==="ready"&&prev.petRef===petRef?{phase:"ready",petRef:petRef,page:res.value,error:null,readyAt:Date.now()}:prev)},[enabled,petRef,ready,getPage]);useHealthPlanRevalidation({lifecycle:options.lifecycle,refreshKey:options.refreshKey,readyAt:ready?state2.readyAt??null:null,revalidate:()=>{revalidate()},refresh:()=>{ready?revalidate():load()}}),react.useEffect(()=>(read(false),()=>{epoch.current+=1}),[read]);let stale=enabled&&state2.petRef!==petRef;return react.useMemo(()=>({phase:stale?"loading":state2.phase,page:stale?null:state2.page,error:stale?null:state2.error,missing:!stale&&state2.missing===true,refresh:load}),[stale,state2,load])}var DEFAULT_PRESENTATION=/* @__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}),PRESENTATION_WIRE_NAMES=/* @__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"}),FIELDS=Object.keys(PRESENTATION_WIRE_NAMES),PRESENTATION_LOCK="presentation",PRESENTATION_LOCK_PREFIX="presentation.";var ENUMS={chatAnswerStyle:["bubbles","cards"],chatHistoryStyle:["drawer","sheet"],chatTopCard:["none","focus"],safetyDisclaimerPlacement:["composer","answer_footer"],healthPlanLayout:["standard","focus_plan"],chatComposerStyle:["standard","compact"],chatComposerPlaceholder:["generic","pet_name"],chatHistoryBar:["pinned","scroll"],chatSendButton:["always_dark","dim_when_empty"]},BOOLS=/* @__PURE__ */new Set(["chatFollowUpsExcludeTelevet","chatComposerMic","chatComposerUpload","recordsTopRiskLine","recordsClearResultsFilter","chatGeneralBanner","chatTextingAsk","serverSlots"]);function parseField(field,value){if(value==null)return;let allowed=ENUMS[field];return allowed!==void 0?typeof value=="string"&&allowed.includes(value)?value:void 0:BOOLS.has(field)?typeof value=="boolean"?value:void 0:typeof value=="number"&&Number.isInteger(value)&&value>=0&&value<=3?value:void 0}function parsePresentation(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let source=raw,out={};for(let field of FIELDS){let wire=PRESENTATION_WIRE_NAMES[field],value=Object.prototype.hasOwnProperty.call(source,wire)?source[wire]:source[field],parsed=parseField(field,value);parsed!==void 0&&(out[field]=parsed)}return Object.keys(out).length===0?null:/* @__PURE__ */Object.freeze(out)}function isPresentationFieldLocked(field,locked){if(locked==null)return false;let one2=`${PRESENTATION_LOCK_PREFIX}${PRESENTATION_WIRE_NAMES[field]}`;for(let name of locked)if(name===PRESENTATION_LOCK||name===one2)return true;return false}function resolvePresentation(input){let server=parsePresentation(input?.server??null)??{},client=parsePresentation(input?.client??null)??{},locked=input?.locked?[...input.locked]:null,out={};for(let field of FIELDS){let fromServer=server[field],fromClient=isPresentationFieldLocked(field,locked)?void 0:client[field];out[field]=fromClient??fromServer??DEFAULT_PRESENTATION[field]}/* @__PURE__ */
21
+ return Object.freeze({status:status,purchase:purchase,order:order??list[0]??null,orders:/* @__PURE__ */Object.freeze(list.length>0?list:order===null?[]:[order]),subscription:healthPlanSubscriptionFromWire(o?.subscription)})}function invalid3(wireMessage){return makeEverfurError("validationFailed",{retryable:false,wireMessage:wireMessage})}function malformed3(call){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${call}: the response was not the expected shape`})}function disposed3(verb){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${verb} was called after unmount`})}var validRef3=value=>typeof value=="string"&&value.length>0&&value.length<=REF_MAX3,absoluteUrl=value=>typeof value=="string"&&value.length<=2048&&/^https?:\/\/[^\s/][^\s]*$/i.test(value);function base2(petRef){return`/widget/v1/pets/${encodeURIComponent(petRef)}/plan`}async function readPage(funnel,petRef,opts){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));let res=await funnel.send("healthPlan.page.read",{method:"GET",path:`${base2(petRef)}/page`,...opts?.signal?{signal:opts.signal}:{}});if(!res.ok)return err(res.error);let page=healthPlanPageFromWire(res.value,petRef);return page===null?err(malformed3("healthPlan.page.read")):ok(page)}var readers=/* @__PURE__ */new WeakMap;function createHealthPlanPageReader(runtime){let known=readers.get(runtime);if(known!==void 0)return known;let reader=makeHealthPlanPageReader(runtime);return readers.set(runtime,reader),reader}function makeHealthPlanPageReader(runtime){return{getPage:(petRef,opts)=>{if(runtime.isDisposed)return Promise.resolve(err(disposed3("getPage")));let{services:services}=runtime.registry,funnel=withPlainNotFound(createRequestFunnel({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}}));return readPage(funnel,petRef,opts)}}}function createHealthPlanPageRepositoryOver(deps){let funnel=withPlainNotFound(deps.funnel??createRequestFunnel({auth:deps.auth,...deps.errorPolicy?{errorPolicy:deps.errorPolicy}:{}}));return{getPage:(petRef,opts)=>readPage(funnel,petRef,opts),async startCheckout(petRef,body,idempotencyKey){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));if(!validRef3(body.productId))return err(invalid3("productId must be 1..128 characters"));if(body.purchase!=="one_box"&&body.purchase!=="subscription")return err(invalid3("purchase must be one_box or subscription"));if(body.intervalDays!==void 0&&(!Number.isInteger(body.intervalDays)||body.intervalDays<=0))return err(invalid3("intervalDays must be a positive whole number"));if(!absoluteUrl(body.successUrl)||!absoluteUrl(body.cancelUrl))return err(invalid3("successUrl and cancelUrl must be absolute http(s) URLs"));let res=await funnel.send("healthPlan.checkout.start",{method:"POST",path:`${base2(petRef)}/checkout`,body:{product_id:body.productId,purchase:body.purchase,...body.purchase==="subscription"&&body.intervalDays!==void 0?{interval_days:body.intervalDays}:{},success_url:body.successUrl,cancel_url:body.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${idempotencyKey}`});if(!res.ok)return err(res.error);let session=healthPlanCheckoutSessionFromWire(res.value);return session===null?err(malformed3("healthPlan.checkout.start")):ok(session)},async startCartCheckout(petRef,body,idempotencyKey){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));let items=body.items;if(!Array.isArray(items)||items.length<1||items.length>CART_MAX)return err(invalid3("items must hold 1..10 lines"));let seen=/* @__PURE__ */new Set;for(let it of items){if(!validRef3(it.productId)||seen.has(it.productId))return err(invalid3("each item needs a productId, once per cart"));if(seen.add(it.productId),it.purchase!=="one_box"&&it.purchase!=="subscription")return err(invalid3("purchase must be one_box or subscription"));let q=it.quantity??1;if(!Number.isInteger(q)||q<1||q>CART_MAX)return err(invalid3("quantity must be a whole number 1..10"));if(it.purchase==="subscription"&&q!==1)return err(invalid3("a subscription line is quantity 1"));if(it.intervalDays!==void 0&&(!Number.isInteger(it.intervalDays)||it.intervalDays<=0))return err(invalid3("intervalDays must be a positive whole number"))}if(!absoluteUrl(body.successUrl)||!absoluteUrl(body.cancelUrl))return err(invalid3("successUrl and cancelUrl must be absolute http(s) URLs"));let res=await funnel.send("healthPlan.checkout.start",{method:"POST",path:`${base2(petRef)}/checkout`,body:{items:items.map(it=>({product_id:it.productId,purchase:it.purchase,...it.purchase==="subscription"&&it.intervalDays!==void 0?{interval_days:it.intervalDays}:{},quantity:it.quantity??1})),success_url:body.successUrl,cancel_url:body.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${idempotencyKey}`});if(!res.ok)return err(res.error);let session=healthPlanCheckoutSessionFromWire(res.value);return session===null?err(malformed3("healthPlan.checkout.start")):ok(session)},async getCheckout(petRef,checkoutId){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));if(!validRef3(checkoutId))return err(invalid3("checkoutId must be 1..128 characters"));let res=await funnel.send("healthPlan.checkout.read",{method:"GET",path:`${base2(petRef)}/checkout/${encodeURIComponent(checkoutId)}`});if(!res.ok)return err(res.error);let state2=healthPlanCheckoutStateFromWire(res.value);return state2===null?err(malformed3("healthPlan.checkout.read")):ok(state2)}}}function createHealthPlanPageRepository(runtime){let over=()=>{let{services:services}=runtime.registry;return createHealthPlanPageRepositoryOver({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}})};return{getPage:(petRef,opts)=>runtime.isDisposed?Promise.resolve(err(disposed3("getPage"))):over().getPage(petRef,opts),startCheckout:(petRef,body,key)=>runtime.isDisposed?Promise.resolve(err(disposed3("startCheckout"))):over().startCheckout(petRef,body,key),startCartCheckout:(petRef,body,key)=>runtime.isDisposed?Promise.resolve(err(disposed3("startCartCheckout"))):over().startCartCheckout?.(petRef,body,key)??Promise.resolve(err(disposed3("startCartCheckout"))),getCheckout:(petRef,id)=>runtime.isDisposed?Promise.resolve(err(disposed3("getCheckout"))):over().getCheckout(petRef,id)}}var HEALTH_PLAN_PAGE_SHARE_MS=HEALTH_PLAN_STALE_MS,SHARED_READS_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanPageReads@v1");function sharedReads(){let host2=globalThis,stored2=host2[SHARED_READS_SYMBOL];if(stored2 instanceof WeakMap)return stored2;let made=/* @__PURE__ */new WeakMap;return host2[SHARED_READS_SYMBOL]=made,made}function readShared(reader,runtime,userRef,petRef,fresh2){let all=sharedReads(),reads=all.get(runtime);reads===void 0&&(reads=/* @__PURE__ */new Map,all.set(runtime,reads));let map=reads,key=`${userRef}\0${petRef}`,hit=map.get(key);if(!fresh2&&hit!==void 0&&(hit.at===null||Date.now()-hit.at<HEALTH_PLAN_PAGE_SHARE_MS))return hit.promise;let entry={at:null,promise:reader.getPage(petRef).then(res=>(map.get(key)===entry&&(res.ok||isNotFoundError(res.error)?entry.at=Date.now():map.delete(key)),res))};return map.set(key,entry),entry.promise}function useHealthPlanPageRepository(){let{runtime:runtime}=useEverfurContext();return react.useMemo(()=>createHealthPlanPageRepository(runtime),[runtime])}function useHealthPlanPage(options){let{userRef:userRef,runtime:runtime}=useEverfurContext(),own=react.useMemo(()=>createHealthPlanPageReader(runtime),[runtime]),hostRepository=options.repository,repository=hostRepository??own,getPage=react.useCallback((pet,fresh2)=>hostRepository!==void 0||userRef==null?repository.getPage(pet):readShared(own,runtime,userRef,pet,fresh2),[hostRepository,repository,own,runtime,userRef]),{petRef:petRef}=options,enabled=options.enabled!==false&&userRef!=null&&petRef!==null,[state2,setState]=react.useState({phase:"idle",petRef:null,page:null,error:null}),epoch=react.useRef(0),quiet=react.useRef(0),read=react.useCallback(async fresh2=>{let mine=++epoch.current;if(!enabled||petRef===null){setState(prev=>prev.phase==="idle"&&prev.petRef===null?prev:{phase:"idle",petRef:null,page:null,error:null});return}setState(prev=>({phase:"loading",petRef:petRef,page:prev.petRef===petRef?prev.page:null,error:null}));let res=await getPage(petRef,fresh2);mine===epoch.current&&(res.ok?setState({phase:"ready",petRef:petRef,page:res.value,error:null,readyAt:Date.now()}):isNotFoundError(res.error)?setState({phase:"ready",petRef:petRef,page:null,error:null,missing:true,readyAt:Date.now()}):setState({phase:"failed",petRef:petRef,page:null,error:res.error}))},[enabled,petRef,getPage]),load=react.useCallback(()=>read(true),[read]),ready=state2.phase==="ready"&&state2.petRef===petRef,revalidate=react.useCallback(async()=>{if(!enabled||petRef===null||!ready)return;let mine=epoch.current,seq=++quiet.current,res=await getPage(petRef,true);mine!==epoch.current||seq!==quiet.current||!res.ok||setState(prev=>prev.phase==="ready"&&prev.petRef===petRef?{phase:"ready",petRef:petRef,page:res.value,error:null,readyAt:Date.now()}:prev)},[enabled,petRef,ready,getPage]);useHealthPlanRevalidation({lifecycle:options.lifecycle,refreshKey:options.refreshKey,readyAt:ready?state2.readyAt??null:null,revalidate:()=>{revalidate()},refresh:()=>{ready?revalidate():load()}}),react.useEffect(()=>(read(false),()=>{epoch.current+=1}),[read]);let stale=enabled&&state2.petRef!==petRef;return react.useMemo(()=>({phase:stale?"loading":state2.phase,page:stale?null:state2.page,error:stale?null:state2.error,missing:!stale&&state2.missing===true,refresh:load}),[stale,state2,load])}var DEFAULT_PRESENTATION=/* @__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}),PRESENTATION_WIRE_NAMES=/* @__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"}),FIELDS=Object.keys(PRESENTATION_WIRE_NAMES),PRESENTATION_LOCK="presentation",PRESENTATION_LOCK_PREFIX="presentation.";var ENUMS={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"]},BOOLS=/* @__PURE__ */new Set(["chatFollowUpsExcludeTelevet","chatComposerMic","chatComposerUpload","recordsTopRiskLine","recordsClearResultsFilter","chatGeneralBanner","chatTextingAsk","serverSlots"]);function parseField(field,value){if(value==null)return;let allowed=ENUMS[field];return allowed!==void 0?typeof value=="string"&&allowed.includes(value)?value:void 0:BOOLS.has(field)?typeof value=="boolean"?value:void 0:typeof value=="number"&&Number.isInteger(value)&&value>=0&&value<=3?value:void 0}function parsePresentation(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let source=raw,out={};for(let field of FIELDS){let wire=PRESENTATION_WIRE_NAMES[field],value=Object.prototype.hasOwnProperty.call(source,wire)?source[wire]:source[field],parsed=parseField(field,value);parsed!==void 0&&(out[field]=parsed)}return Object.keys(out).length===0?null:/* @__PURE__ */Object.freeze(out)}function isPresentationFieldLocked(field,locked){if(locked==null)return false;let one2=`${PRESENTATION_LOCK_PREFIX}${PRESENTATION_WIRE_NAMES[field]}`;for(let name of locked)if(name===PRESENTATION_LOCK||name===one2)return true;return false}function resolvePresentation(input){let parsedServer=parsePresentation(input?.server??null)??{},{safetyDisclaimerPlacement:serverPlacement,...serverRest}=parsedServer,server=serverPlacement==="none"||serverPlacement===void 0?serverRest:{...serverRest,safetyDisclaimerPlacement:serverPlacement},client=parsePresentation(input?.client??null)??{},locked=input?.locked?[...input.locked]:null,out={};for(let field of FIELDS){let fromServer=server[field],fromClient=isPresentationFieldLocked(field,locked)?void 0:client[field];out[field]=fromClient??fromServer??DEFAULT_PRESENTATION[field]}/* @__PURE__ */
22
22
  return Object.freeze(out)}var NO_SNAPSHOT=/* @__PURE__ */Object.freeze({branding:null}),NO_STORE=/* @__PURE__ */Object.freeze({subscribe:()=>()=>{},getSnapshot:()=>NO_SNAPSHOT});function keyOf(input){return input?Object.keys(input).sort().map(k2=>`${k2}=${String(input[k2])}`).join("&"):""}function useEverfurPresentation(client){return useEverfurPresentationState(client).presentation}function useEverfurPresentationState(client){let{runtime:runtime}=useEverfurContext(),store=runtime?.entitlements??NO_STORE,readBranding=react.useCallback(()=>store.getSnapshot()?.branding??null,[store]),branding=react.useSyncExternalStore(store.subscribe,readBranding,readBranding),clientKey=keyOf(client);return react.useMemo(()=>{let locked=branding?.lockedFields??null;return{presentation:resolvePresentation({server:branding?.presentation??null,locked:locked,client:client??null}),isLocked:field=>isPresentationFieldLocked(field,locked)}},[branding,clientKey])}function definedPresentation(input){let out={};for(let[key,value]of Object.entries(input))value!==void 0&&(out[key]=value);return out}var SLOT_SWITCH_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#SlotSwitchContext@v1"),host=globalThis,SlotSwitchContext=host[SLOT_SWITCH_SYMBOL]??(host[SLOT_SWITCH_SYMBOL]=react.createContext(null));SlotSwitchContext.displayName??="EverfurSlotSwitch";function useSlotSwitch(own){let above=react.useContext(SlotSwitchContext),resolved=useEverfurPresentation(void 0).serverSlots;return above===null?resolved:above}var HostRenderBoundary=class extends react.Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state2){return Object.is(props.resetKey,state2.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return react.createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:react.createElement(RenderHost,{render:render})})}function hasLoneSurrogate(value){for(let i=0;i<value.length;i+=1){let code=value.charCodeAt(i);if(code>=55296&&code<=56319){let low=value.charCodeAt(i+1);if(!(low>=56320&&low<=57343))return true;i+=1}else if(code>=56320&&code<=57343)return true}return false}function serverLength(value){return[...value].length}var SPECIES_ALIASES=/* @__PURE__ */Object.freeze({dog:"dog",canine:"dog",k9:"dog",puppy:"dog",cat:"cat",feline:"cat",kitten:"cat"});function canonicalPetSpecies(raw){if(typeof raw!="string")return null;let key=raw.trim().toLowerCase();return Object.prototype.hasOwnProperty.call(SPECIES_ALIASES,key)?SPECIES_ALIASES[key]:null}var LIST_MAX=50,REF_MAX4=128,NAME_MAX=120,SHORT_MAX=120,NOTES_MAX=2e3,FOOD_MAX=120,MICROCHIP_MAX=80,SEXES=/* @__PURE__ */new Set(["male","female","unknown"]),PRECISIONS=/* @__PURE__ */new Set(["day","month","year"]),ACTIVITY=/* @__PURE__ */new Set(["low","medium","high","athletic"]),INDOOR_OUTDOOR=/* @__PURE__ */new Set(["indoor","outdoor","both"]),SEVERITIES=/* @__PURE__ */new Set(["mild","moderate","severe"]),ISO_DATE=/^(\d{4})-(\d{2})-(\d{2})$/,SCALAR_WIRE=[["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"]],LIST_WIRE=[["allergies","allergies"],["medications","medications"],["supplements","supplements"],["conditions","conditions"]];/* @__PURE__ */Object.freeze([...SCALAR_WIRE,...LIST_WIRE].map(([key])=>key));function isRealDate(value){let match=ISO_DATE.exec(value);if(match===null)return false;let[year,month,day]=[Number(match[1]),Number(match[2]),Number(match[3])],date2=new Date(Date.UTC(year,month-1,day));return date2.getUTCFullYear()===year&&date2.getUTCMonth()===month-1&&date2.getUTCDate()===day}var oneOf=allowed=>(field,value)=>typeof value=="string"&&allowed.has(value)?null:`${field} must be one of ${[...allowed].join(", ")}`,boolean=(field,value)=>typeof value=="boolean"?null:`${field} must be true or false`,date=(field,value)=>typeof value=="string"&&isRealDate(value)?null:`${field} must be a real date written YYYY-MM-DD`,text=(max,opts={})=>(field,value)=>{if(typeof value!="string")return`${field} must be a string`;if(hasLoneSurrogate(value))return`${field} contains an unpaired surrogate and cannot be encoded`;let measured=opts.trimmed?value.trim():value;if(opts.required&&measured.length===0)return`${field} is required and must not be blank`;let length=serverLength(measured);return length<=max?null:`${field} is ${length} characters; the server accepts at most ${max}`},SCALAR_CHECKS={sex:oneOf(SEXES),spayedNeutered:boolean,birthDate:date,birthDatePrecision:oneOf(PRECISIONS),activityLevel:oneOf(ACTIVITY),indoorOutdoor:oneOf(INDOOR_OUTDOOR),foodBrand:text(FOOD_MAX),foodType:text(FOOD_MAX),microchipId:text(MICROCHIP_MAX)},REF_FIELD=["ref","ref",false,text(REF_MAX4,{required:true,trimmed:true})],NOTES_FIELD=["notes","notes",false,text(NOTES_MAX,{trimmed:true})],MEDICATION_FIELDS=[REF_FIELD,["name","name",true,text(NAME_MAX,{required:true,trimmed:true})],["dose","dose",false,text(SHORT_MAX,{trimmed:true})],["frequency","frequency",false,text(SHORT_MAX,{trimmed:true})],["startDate","start_date",false,date],["endDate","end_date",false,date],NOTES_FIELD],ITEM_FIELDS={allergies:[REF_FIELD,["allergen","allergen",true,text(NAME_MAX,{required:true,trimmed:true})],["severity","severity",false,oneOf(SEVERITIES)],NOTES_FIELD],medications:MEDICATION_FIELDS,supplements:MEDICATION_FIELDS,conditions:[REF_FIELD,["conditionName","condition_name",true,text(NAME_MAX,{required:true,trimmed:true})],["diagnosedDate","diagnosed_date",false,date],NOTES_FIELD]};function itemToWire(list,index,raw){let at=`${list}[${index}]`;if(typeof raw!="object"||raw===null||Array.isArray(raw))return{error:`${at} must be an object`};let source=raw,item={};for(let[key,wire,isRequired,check]of ITEM_FIELDS[list]){let value=source[key];if(value==null){if(isRequired)return{error:`${at}.${key} is required`};value===null&&(item[wire]=null);continue}let bad=check(`${at}.${key}`,value);if(bad!==null)return{error:bad};item[wire]=value}let start=item.start_date,end=item.end_date;return typeof start=="string"&&typeof end=="string"&&end<start?{error:`${at}.endDate must not be before startDate`}:{item:item}}function listToWire(list,raw){if(!Array.isArray(raw))return{error:`${list} must be an array (send [] to clear it)`};if(raw.length>LIST_MAX)return{error:`${list} has ${raw.length} items; the server accepts at most ${LIST_MAX}`};let items=[],refs=/* @__PURE__ */new Set;for(let index=0;index<raw.length;index+=1){let mapped2=itemToWire(list,index,raw[index]);if("error"in mapped2)return mapped2;let ref=mapped2.item.ref;if(typeof ref=="string"){let key=ref.trim();if(refs.has(key))return{error:`${list}: ref ${JSON.stringify(key)} is used twice; a ref names one item`};refs.add(key)}items.push(mapped2.item)}return{items:items}}function petHealthToWire(input,species){let source=input,body={};for(let[key,wire]of SCALAR_WIRE){let value=source[key];if(value!==void 0){if(value!==null){let bad=SCALAR_CHECKS[key](key,value);if(bad!==null)return{error:bad}}body[wire]=value}}let dateSent=source.birthDate!==void 0,precisionSent=source.birthDatePrecision!==void 0;if(dateSent!==precisionSent||dateSent&&source.birthDate===null!=(source.birthDatePrecision===null))return{error:"birthDate and birthDatePrecision must be sent together, both set or both null"};for(let[key,wire]of LIST_WIRE){let value=source[key];if(value===void 0)continue;let mapped2=listToWire(key,value);if("error"in mapped2)return mapped2;body[wire]=mapped2.items}return Object.keys(body).length>0&&species!==void 0&&canonicalPetSpecies(species)===null?{error:"health fields need a pet Everfur reads as a dog or a cat (dog, canine, k9, puppy, cat, feline, kitten)"}:{body:body}}var str4=value=>typeof value=="string"?value:null,pick=(allowed,value)=>typeof value=="string"&&allowed.has(value)?value:null,bool=value=>typeof value=="boolean"?value:null;function itemsFromWire(raw,map){return Array.isArray(raw)?/* @__PURE__ */Object.freeze(raw.flatMap(row=>{if(typeof row!="object"||row===null||Array.isArray(row))return[];let item=map(row);return item===null?[]:[item]})):/* @__PURE__ */Object.freeze([])}function medicationFromWire(o){let name=str4(o.name);return name===null||name.length===0?null:/* @__PURE__ */Object.freeze({ref:str4(o.ref),name:name,dose:str4(o.dose),frequency:str4(o.frequency),startDate:str4(o.start_date),endDate:str4(o.end_date),notes:str4(o.notes)})}function petHealthFromWire(o){let version=o.profile_version;/* @__PURE__ */
23
23
  return Object.freeze({profileVersion:typeof version=="number"&&Number.isInteger(version)&&version>=0?version:0,sex:pick(SEXES,o.sex),spayedNeutered:bool(o.spayed_neutered),birthDate:str4(o.birth_date),birthDatePrecision:pick(PRECISIONS,o.birth_date_precision),activityLevel:pick(ACTIVITY,o.activity_level),indoorOutdoor:pick(INDOOR_OUTDOOR,o.indoor_outdoor),foodBrand:str4(o.food_brand),foodType:str4(o.food_type),microchipId:str4(o.microchip_id),allergies:itemsFromWire(o.allergies,row=>{let allergen=str4(row.allergen);return allergen===null||allergen.length===0?null:/* @__PURE__ */Object.freeze({ref:str4(row.ref),allergen:allergen,severity:pick(SEVERITIES,row.severity),notes:str4(row.notes)})}),medications:itemsFromWire(o.medications,medicationFromWire),supplements:itemsFromWire(o.supplements,medicationFromWire),conditions:itemsFromWire(o.conditions,row=>{let conditionName=str4(row.condition_name);return conditionName===null||conditionName.length===0?null:/* @__PURE__ */Object.freeze({ref:str4(row.ref),conditionName:conditionName,diagnosedDate:str4(row.diagnosed_date),notes:str4(row.notes)})})})}var PET_NAME_MAX=100,PET_SPECIES_MAX=50,PET_BREED_MAX=100,PET_AGE_YEARS_MAX=50,PET_WEIGHT_KG_MAX=500,PET_REF_MAX=128,ERASE_USER_DATA_TIMEOUT_MS=6e4;function invalid4(wireMessage){return makeEverfurError("validationFailed",{retryable:false,wireMessage:wireMessage})}function checkString(field,value,max){if(typeof value!="string")return invalid4(`${field} must be a string`);let length=serverLength(value);return length<=max?null:invalid4(`${field} is ${length} characters; the server accepts at most ${max}`)}function outOfRange(field,value,max){return typeof value=="number"&&Number.isFinite(value)&&value>=0&&value<=max?null:invalid4(`${field} must be a finite number between 0 and ${max}`)}function validate(petRef,profile){if(typeof petRef!="string")return invalid4("pet_ref must be a string");if(petRef.trim().length===0)return invalid4("pet_ref must not be blank");if(hasLoneSurrogate(petRef))return invalid4("pet_ref contains an unpaired surrogate and cannot be encoded");if(profile!=null&&typeof profile!="object")return invalid4("profile must be an object");let checks=[checkString("pet_ref",petRef,PET_REF_MAX)];return profile?.name!==void 0&&checks.push(checkString("name",profile.name,PET_NAME_MAX)),profile?.species!==void 0&&checks.push(checkString("species",profile.species,PET_SPECIES_MAX)),profile?.breed!==void 0&&checks.push(checkString("breed",profile.breed,PET_BREED_MAX)),profile?.ageYears!==void 0&&checks.push(outOfRange("age_years",profile.ageYears,PET_AGE_YEARS_MAX)),profile?.weightKg!==void 0&&checks.push(outOfRange("weight_kg",profile.weightKg,PET_WEIGHT_KG_MAX)),checks.find(c=>c!==null)??null}function healthToWire(source,species){let health=petHealthToWire(source,species);return"error"in health?{error:invalid4(health.error)}:health}function patchToWire(patch){if(typeof patch!="object"||patch===null)return{error:invalid4("patch must be an object")};let p=patch,fields=[["name","name",v=>checkString("name",v,PET_NAME_MAX)],["species","species",v=>checkString("species",v,PET_SPECIES_MAX)],["breed","breed",v=>checkString("breed",v,PET_BREED_MAX)],["ageYears","age_years",v=>outOfRange("age_years",v,PET_AGE_YEARS_MAX)],["weightKg","weight_kg",v=>outOfRange("weight_kg",v,PET_WEIGHT_KG_MAX)]],body={};for(let[key,wire,check]of fields){let value=p[key];if(value!==void 0){if(value!==null){let bad=check(value);if(bad!==null)return{error:bad}}body[wire]=value}}let health=healthToWire(p,p.species);return"error"in health?health:(Object.assign(body,health.body),Object.keys(body).length===0?{error:invalid4("patch must change at least one field")}:{body:body})}function toWire(profile){if(profile==null)return{body:{}};let health=healthToWire(profile,profile.species);return"error"in health?health:{body:{...profile.name!==void 0?{name:profile.name}:{},...profile.species!==void 0?{species:profile.species}:{},...profile.breed!==void 0?{breed:profile.breed}:{},...profile.ageYears!==void 0?{age_years:profile.ageYears}:{},...profile.weightKg!==void 0?{weight_kg:profile.weightKg}:{},...health.body}}}var str5=v=>typeof v=="string"?v:null,num=v=>typeof v=="number"&&Number.isFinite(v)?v:null;function fromWire2(raw,petRef){let o=typeof raw=="object"&&raw!==null?raw:{};/* @__PURE__ */
24
24
  return Object.freeze({petRef:str5(o.pet_ref)??petRef,name:str5(o.name),species:str5(o.species),breed:str5(o.breed),ageYears:num(o.age_years),weightKg:num(o.weight_kg)})}function widgetPetFromWire(raw){if(typeof raw!="object"||raw===null)return null;let o=raw,petRef=str5(o.pet_ref);return petRef===null||petRef.length===0?null:/* @__PURE__ */Object.freeze({petId:str5(o.pet_id),petRef:petRef,name:str5(o.name),species:str5(o.species),breed:str5(o.breed),ageYears:num(o.age_years),weightKg:num(o.weight_kg),updatedAt:str5(o.updated_at)})}function widgetPetProfileFromWire(raw){let pet=widgetPetFromWire(raw);return pet===null?null:/* @__PURE__ */Object.freeze({...pet,...petHealthFromWire(raw)})}function petListFromWire(raw){let rows=Array.isArray(raw)?raw:typeof raw=="object"&&raw!==null&&Array.isArray(raw.pets)?raw.pets:[];/* @__PURE__ */
@@ -32,7 +32,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:[styles25.bar,style],accessibilit
32
32
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles25.labelRow,children:[
33
33
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles25.label,children:HEALTH_PLAN_TEMPLATES.cartLabel(theme.meta.displayName)}),cart.count>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles25.count,accessibilityElementsHidden:true,importantForAccessibility:"no",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles25.countLabel,children:String(cart.count)})}):null]}),cart.count===0?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles25.line,children:HEALTH_PLAN_COPY.cartEmpty}):subtotal===null?null:/* @__PURE__ */jsxRuntime.jsxs(Text,{style:styles25.line,children:[HEALTH_PLAN_COPY.subtotal," ",subtotal]})]}),onCheckout===void 0?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>{trackCheckoutStarted(telemetry,petRef,cart),onCheckout(cart.items)},disabled:disabled,accessibilityRole:"button",accessibilityLabel:HEALTH_PLAN_COPY.checkout,accessibilityState:{disabled:disabled,busy:busy},style:[styles25.checkout,disabled?styles25.dimmed:null],testID:"health-plan-checkout",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles25.checkoutLabel,children:HEALTH_PLAN_COPY.checkout})})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,ink=slots.cartBar?.textColor??color.text.onBrand,fill=slots.cartBar?.backgroundColor??color.brandInk,text2=(size,tint,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:tint});return reactNative.StyleSheet.create({bar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:space.md,paddingHorizontal:space.lg,paddingVertical:space.md,borderRadius:radius.lg,backgroundColor:color.brand,...slotBox(slots.cartBar)},copy:{flex:1,gap:2},labelRow:{flexDirection:"row",alignItems:"center",gap:space.sm},label:text2(type.size.body,ink,"bold"),count:{minWidth:22,height:22,paddingHorizontal:space.xs,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:ink},countLabel:text2(type.size.caption,fill,"bold"),line:text2(type.size.caption,ink,"regular"),checkout:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:ink},checkoutLabel:text2(type.size.body,fill,"bold"),dimmed:{opacity:.5}})}var SHEET_MOTION={in:320,out:220,inCurve:"drawer",outCurve:"out"},SCRIM_MOTION={in:240,out:200,inCurve:"ease",outCurve:"ease"},PUSH_MOTION={in:300,out:220,inCurve:"drawer",outCurve:"out"},TOAST_MOTION={in:220,out:160,inCurve:"out",outCurve:"out"},FADE_MOTION={in:160,out:160,inCurve:"ease",outCurve:"ease"},curves={};function curve(name){let made=curves[name];if(made!==void 0)return made;let[a,b,c,d]=name==="drawer"?[.32,.72,0,1]:name==="out"?[.23,1,.32,1]:[.25,.1,.25,1],built=reactNative.Easing.bezier(a,b,c,d);return curves[name]=built,built}function run(values,motions,open,done){let left=motions.length,drivers=motions.map((m,i)=>reactNative.Animated.timing(values[i],{toValue:open?1:0,duration:open?m.in:m.out,easing:curve(open?m.inCurve:m.outCurve),useNativeDriver:true}));for(let d of drivers)d.start(({finished:finished})=>{left-=1,finished&&left===0&&done()});return()=>{for(let d of drivers)d.stop()}}function PlanLinger({draw:draw,motions:motions}){let open=draw!==null,[kept,setKept]=react.useState(null);open&&kept?.draw!==draw&&setKept({draw:draw});let a=react.useRef(new reactNative.Animated.Value(0)).current,b=react.useRef(new reactNative.Animated.Value(0)).current,values=[a,b];react.useEffect(()=>{if(!(!open&&kept===null))return run(values,motions,open,()=>{open||setKept(null)})},[open]);let current=draw??kept?.draw;return current===void 0?null:current(values)}function PlanPushes({id:id,depth:depth,node:node,width:width,paper:paper,still:still}){let[at,setAt]=react.useState({id:id,depth:depth,node:node,leaving:null}),moved=id!==at.id;(moved||node!==at.node)&&setAt({id:id,depth:depth,node:node,leaving:moved?depth<at.depth?at.node:null:at.leaving});let enter=react.useRef(new reactNative.Animated.Value(1)).current,exit=react.useRef(new reactNative.Animated.Value(1)).current,motion=still?FADE_MOTION:PUSH_MOTION,last=react.useRef(depth);react.useLayoutEffect(()=>{let from=last.current;if(last.current=depth,depth>from)return enter.setValue(0),run([enter],[motion],true,()=>{});if(depth!==from)return exit.setValue(1),run([exit],[motion],false,()=>setAt(s=>({...s,leaving:null})))},[id]);let look=v=>still?{opacity:v}:{transform:[{translateX:v.interpolate({inputRange:[0,1],outputRange:[width,0]})}]};/* @__PURE__ */
34
34
  return jsxRuntime.jsxs(reactNative.View,{children:[
35
- /* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{style:look(enter),children:node}),at.leaving===null?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{pointerEvents:"none",style:[{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:paper},look(exit)],children:at.leaving})]})}var everfurTokens=/* @__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 BLOCK_BOX={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},BLOCK_TEXT={shown:true,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},blockBox=p=>({...BLOCK_BOX,...p}),blockText=p=>({...BLOCK_TEXT,...p}),everfurMetrics={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"}},everfurBlocksMetrics={order:{card:blockBox({w:361,h:163.547}),top:blockBox({w:361,h:39.547,gap:[12,12]}),title:blockText({size:16,weight:700,lineHeight:20,tracking:-.16}),meta:blockText({size:13,weight:400,lineHeight:17.55,color:"muted"}),total:blockText({size:16,weight:700,lineHeight:24.8,tabular:true}),shots:blockBox({w:361,h:64,marginTop:8,gap:[8,8]}),acts:blockBox({w:361,h:40,marginTop:12,gap:[8,8]}),go:blockBox({w:176.5,h:40,padding:[0,12,0,12],gap:[6,6],minHeight:40,radius:[999,999],bg:"go",center:true}),goText:blockText({size:14,weight:700,lineHeight:21.7}),plain:blockBox({w:176.5,h:40,padding:[0,12,0,12],gap:[6,6],minHeight:40,radius:[999,999],bg:"#F3F3F3",center:true}),plainText:blockText({size:14,weight:700,lineHeight:21.7}),note:blockText({size:13,weight:500,lineHeight:17.55,marginTop:8}),icon:blockBox({w:16,h:16}),actsColumns:2,shotPressScale:.96},orderQuiet:{top:blockBox({w:361,h:43.547,gap:[12,12]}),when:blockBox({w:300.063,h:24,gap:[8,4],center:true}),title:blockText({size:16,weight:700,lineHeight:20.8}),chip:blockBox({w:86.031,h:24,padding:[0,9,0,5],gap:[4,4],minHeight:24,radius:[999,999],bg:"tintGo",center:true,color:"ink"}),chipText:blockText({size:12,weight:700,lineHeight:15.6,color:"ink"}),chipIcon:blockBox({w:14,h:14,color:"ink"}),meta:blockText({size:13,weight:400,lineHeight:17.55,color:"muted",marginTop:2}),total:blockText({size:16,weight:700,lineHeight:24.8,tabular:true}),shots:blockBox({w:361,h:64,marginTop:8,gap:[8,8]}),shot:blockBox({w:64,h:64,radius:[14,14],bg:"#F3F3F3"}),shotImg:blockBox({w:64,h:64,padding:[6.391,6.391,6.391,6.391],fit:"contain"}),shotBlend:"multiply",acts:blockBox({w:361,h:44,marginTop:12,gap:[12,12],center:true}),plain:blockBox({w:162.109,h:44,padding:[0,16,0,16],gap:[6,6],minHeight:44,radius:[999,999],bg:"#F3F3F3",center:true}),plainText:blockText({size:14,weight:700,lineHeight:21.7}),icon:blockBox({w:16,h:16}),link:blockBox({w:62.578,h:44,padding:[0,6,0,6],minHeight:44}),linkText:blockText({size:14,weight:700,lineHeight:21.7,deco:"underline",decoOffset:3,decoThickness:1.5})},orderWeb:{card:blockBox({w:952,h:127.781,padding:[16,24,16,16],gap:[24,16],radius:[20,20],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.04)",x:0,y:1,blur:2,spread:0},center:true}),lift:{color:"rgba(0, 0, 0, 0.05)",x:0,y:6,blur:20,spread:0},shots:blockBox({w:172,h:72}),sq:blockBox({w:72,h:72,radius:[14,14],bg:"#F3F3F3"}),sqRing:3,sqOverlap:22,imgInset:.1,imgFit:"contain",imgBlend:"multiply",text:blockBox({w:446.547,h:95.781,gap:[2,2]}),when:blockBox({w:446.547,h:26,gap:[12,4],center:true}),title:blockText({size:19,weight:700,lineHeight:24.7,tabular:true}),total:blockText({size:19,weight:900,lineHeight:24.7,tabular:true}),chip:blockBox({w:94.547,h:26,padding:[0,10,0,6],gap:[4,4],minHeight:26,radius:[999,999],bg:"tintGo",center:true,color:"ink"}),chipText:blockText({size:13,weight:700,lineHeight:16.9,color:"ink",tabular:true}),chipIcon:blockBox({w:16,h:16,color:"ink"}),meta:blockText({size:16,weight:400,lineHeight:22.4}),note:blockText({size:15,weight:400,lineHeight:21}),acts:blockBox({w:245.453,h:46,gap:[24,8],center:true}),plain:blockBox({w:160.031,h:46,padding:[0,20,0,20],gap:[8,8],minHeight:46,radius:[999,999],bg:"surface",edge:{width:1.5,color:"#C6D3CD",ring:true},center:true,color:"ink"}),plainText:blockText({size:16,weight:700,lineHeight:19.2,color:"ink"}),icon:blockBox({w:18,h:18,color:"ink"}),link:blockBox({w:61.422,h:44,gap:[8,8],minHeight:44,center:true,color:"ink"}),linkText:blockText({size:17,weight:700,lineHeight:20.4,color:"ink",deco:"underline",decoOffset:4}),go:blockBox({w:228.75,h:52,padding:[0,24,0,24],gap:[8,8],minHeight:52,radius:[999,999],bg:"ink",center:true,color:"surface"}),goText:blockText({size:17,weight:700,lineHeight:20.4,color:"surface",wrap:"auto"}),pressScale:.97,hoverFill:{color:"ink",share:.06,over:"surface"},chipOff:blockBox({w:97.422,h:26,padding:[0,10,0,6],gap:[4,4],minHeight:26,radius:[999,999],center:true,color:"ink"}),metaLink:blockText({size:16,weight:400,lineHeight:22.4,deco:"underline"}),narrow:{upTo:599,card:blockBox({w:560,h:247.391,padding:[16,16,16,16],gap:[24,16],radius:[20,20],bg:"surface",center:true}),sq:blockBox({w:64,h:64,radius:[14,14],bg:"#F3F3F3",shadow:{color:"#FFFFFF",x:0,y:0,blur:0,spread:3}}),sqOverlap:16},phone:{upTo:639,card:blockBox({w:335,h:120.984,gap:[12,8],center:true}),sq:blockBox({w:48,h:48,radius:[12,12],bg:"#F3F3F3"}),sqRing:2,sqOverlap:18,when:blockBox({w:215,h:46.797,gap:[12,2],center:true}),title:blockText({size:16,weight:700,lineHeight:20.8,tabular:true}),total:blockText({size:16,weight:900,lineHeight:20.8,tabular:true}),chip:blockBox({w:90.031,h:24,padding:[0,10,0,6],gap:[4,4],minHeight:24,radius:[999,999],bg:"tintGo",center:true,color:"ink"}),chipText:blockText({size:12,weight:700,lineHeight:15.6,color:"ink",tabular:true}),whatHidden:true,note:blockText({size:13,weight:400,lineHeight:18.2}),acts:blockBox({w:335,h:46,gap:[24,8],center:true}),plain:blockBox({w:144.531,h:46,padding:[0,16,0,16],gap:[8,8],minHeight:46,radius:[999,999],bg:"surface",edge:{width:1.5,color:"#C6D3CD",ring:true},center:true,color:"ink"}),plainText:blockText({size:15,weight:700,lineHeight:18,color:"ink"}),linkText:blockText({size:15,weight:700,lineHeight:18,color:"ink",deco:"underline",decoOffset:4})}},product:{card:blockBox({w:156,h:310.969,gap:[4,4]}),kicker:blockText({size:12,weight:400,lineHeight:15.6,color:"muted",tracking:.12,face:"mono"}),name:blockText({size:15,weight:700,lineHeight:19.5,wrap:"balance"}),meta:blockText({size:13,weight:400,lineHeight:18.2,color:"muted"}),buy:blockBox({w:156,h:36,marginTop:6,gap:[8,8],center:true}),price:blockText({size:15,weight:700,lineHeight:23.25,tabular:true})},productCard:{card:blockBox({w:174.5,h:249.219,gap:[2,2]}),tag:blockBox({w:84.563,h:26,padding:[0,9,0,6],gap:[4,4],minHeight:26,radius:[999,999],bg:"surface",center:true,x:8,y:8}),tagIcon:blockBox({w:16,h:16,color:"#CA4463"}),tagText:blockText({size:12,weight:700,lineHeight:12}),price:blockBox({w:174.5,h:26.344,gap:[6,6]}),priceText:blockText({size:17,weight:700,lineHeight:26.35,tracking:-.17,tabular:true}),was:blockText({size:13,weight:400,lineHeight:20.15,color:"muted",tabular:true,deco:"strike"}),name:blockText({size:14,weight:500,lineHeight:18.2,wrap:"balance"}),meta:blockText({size:12,weight:400,lineHeight:16.2,color:"muted"}),metaAuto:blockText({size:12,weight:500,lineHeight:16.2,color:"#16864A"}),step:blockBox({w:112,h:38,radius:[19,19],bg:"surface",center:true,x:54.5,y:128.5}),stepIn:blockBox({w:112,h:38,radius:[19,19],bg:"ink",center:true,color:"surface",x:54.5,y:128.5}),stepAt:{right:8,bottom:8},stepButton:blockBox({w:38,h:38,radius:[19,19],center:true}),stepIcon:blockBox({w:18,h:18}),count:blockText({size:15,weight:700,lineHeight:23.25,color:"surface",tabular:true}),lift:{color:"rgba(0, 0, 0, 0.14)",x:0,y:2,blur:8,spread:0},per:blockText({size:12,weight:400,lineHeight:16.2,color:"muted",tabular:true}),metaAutoDark:blockText({size:12,weight:500,lineHeight:16.2,color:"ink"}),pill:blockBox({w:62.234,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"go",center:true,x:104.266,y:130.5}),pillText:blockText({size:14,weight:700,lineHeight:21.7}),pillOn:blockBox({w:90.016,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"surface",edge:{width:2,color:"text",ring:true},center:true,x:76.484,y:130.5}),pillOnText:blockText({size:14,weight:700,lineHeight:21.7}),pillIcon:blockBox({w:16,h:16}),pillSoft:blockBox({w:80.125,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.14)",x:0,y:2,blur:8,spread:0},center:true,x:86.375,y:130.5}),pillSoftText:blockText({size:14,weight:700,lineHeight:21.7}),pillAt:{right:8,bottom:8},pillPressScale:.96},productBlend:{img:blockBox({w:174.5,h:174.5,padding:[32,14,16,14],fit:"contain"}),imgBlend:"multiply",lift:{color:"rgba(0, 0, 0, 0.08)",x:0,y:2,blur:8,spread:0},pill:blockBox({w:62.234,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"pink",edge:{width:1,color:"ink",ring:true},center:true,color:"ink",x:104.266,y:130.5}),pillText:blockText({size:14,weight:700,lineHeight:21.7,color:"ink"}),pillOn:blockBox({w:90.016,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"surface",edge:{width:2,color:"ink",ring:true},center:true,color:"ink",x:76.484,y:130.5}),pillOnText:blockText({size:14,weight:700,lineHeight:21.7,color:"ink"}),pillPressScale:.97},productWeb:{card:blockBox({w:306.656,h:370.641,gap:[2,2]}),square:blockBox({w:306.656,h:306.656,marginBottom:10,radius:[20,20],bg:"#F5F5F5"}),imgInsetTag:{share:[.11,.11,.1,.11],px:[26,0,0,0]},imgInset:{share:[.07,.07,.07,.07],px:[0,0,0,0]},imgFit:"contain",imgBlend:"multiply",tag:blockBox({w:112.516,h:30,padding:[0,12,0,8],gap:[5,5],minHeight:30,radius:[999,999],bg:"#F7E3E8",center:true,color:"ink",x:10,y:10}),tagText:blockText({size:13,weight:700,lineHeight:14.3,color:"ink"}),tagIcon:blockBox({w:16,h:16,color:"#CA4463"}),tagMix:.15,name:blockText({size:17,weight:500,lineHeight:22.1,wrap:"balance"}),nameLeading:1.3,coverRadius:20,price:blockBox({w:306.656,h:27.891,gap:[8,2]}),priceText:blockText({size:18,weight:700,lineHeight:27.9,tracking:-.18,tabular:true}),was:blockText({size:15,weight:400,lineHeight:23.25,tabular:true,deco:"strike"}),per:blockText({size:15,weight:400,lineHeight:23.25,tabular:true}),badge:blockBox({w:32.625,h:22,padding:[0,8,0,8],radius:[999,999],bg:"#DEE4F1",edge:{width:1.5,color:"rgba(90, 96, 135, 0.45)",ring:true},center:true}),badgeText:blockText({size:13,weight:700,lineHeight:13,tabular:true}),meta:blockText({size:15,weight:400,lineHeight:21}),add:blockBox({w:44,h:44,radius:[22,22],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.14)",x:0,y:2,blur:8,spread:0},center:true}),addIcon:blockBox({w:20,h:20}),actAt:{right:10,bottom:10},step:blockBox({w:116,h:44,radius:[22,22],bg:"ink",center:true,color:"surface"}),stepButton:blockBox({w:44,h:44,radius:[22,22],center:true,color:"surface"}),stepIcon:blockBox({w:18,h:18,color:"surface"}),count:blockText({size:15,weight:700,lineHeight:23.25,color:"surface",tabular:true}),pill:blockBox({w:68.688,h:44,padding:[0,16,0,16],gap:[6,6],minHeight:44,radius:[999,999],bg:"ink",center:true,color:"surface"}),pillText:blockText({size:15,weight:700,lineHeight:15,color:"surface"}),pillOn:blockBox({w:101.016,h:44,padding:[0,16,0,16],gap:[6,6],minHeight:44,radius:[999,999],bg:"surface",edge:{width:2,color:"ink",ring:true},center:true,color:"ink"}),pillOnText:blockText({size:15,weight:700,lineHeight:15,color:"ink"}),pillIcon:blockBox({w:18,h:18,color:"ink"}),pillSoft:blockBox({w:87.859,h:44,padding:[0,16,0,16],gap:[6,6],minHeight:44,radius:[999,999],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.14)",x:0,y:2,blur:8,spread:0},center:true}),pillSoftText:blockText({size:15,weight:700,lineHeight:15}),nameSteps:[{upTo:599,name:blockText({size:16,weight:500,lineHeight:20.8,wrap:"balance"})},{upTo:399,name:blockText({size:14,weight:500,lineHeight:18.2,wrap:"balance"})}],addPressScale:.94,stepPressScale:.88,pillPressScale:.97,imgInsetEven:{share:[.07,.07,.07,.07],px:[0,0,0,0]},imgInsetWhite:{share:[.11,.11,.14,.11],px:[0,0,0,0]},groundWhite:"surface",focusOffset:3,hover:{ring:{width:1.5,share:.45,color:"ink"},underlineOffset:3}},productRow:{card:blockBox({shown:false,w:361,h:109.328,gap:[12,12],center:true}),name:blockText({shown:false,size:17,weight:700,lineHeight:22.1,color:"ink"}),meta:blockText({shown:false,size:13,weight:400,lineHeight:18.85,color:"muted",marginTop:2})},cart:{line:blockBox({w:361,h:109.328,gap:[12,12],center:true}),name:blockBox({w:289,h:24,gap:[8,4],center:true,color:"ink"}),nameText:blockText({size:17,weight:700,lineHeight:22.1,color:"ink"}),meta:blockText({size:13,weight:400,lineHeight:18.85,color:"muted",marginTop:2}),price:blockText({size:17,weight:700,lineHeight:26.35,color:"ink",tabular:true}),was:blockText({shown:false,size:13,weight:400,lineHeight:18.85,color:"muted",marginTop:2}),acts:blockBox({w:289,h:20.141,marginTop:6,gap:[16,16]}),remove:blockText({size:13,weight:700,lineHeight:20.15,color:"ink",deco:"underline",decoOffset:3}),removeBox:blockBox({w:53.016,h:20.141,color:"ink"}),end:blockBox({w:289,h:26.344,gap:[4,4]})},cartSquare:{line:blockBox({w:361,h:95.094,gap:[12,12]}),sm:blockBox({w:48,h:48,radius:[12,12],bg:"#F3F3F3"}),md:blockBox({w:52,h:52,radius:[12,12],bg:"#F3F3F3"}),lg:blockBox({w:56,h:56,radius:[12,12],bg:"#F3F3F3"}),imgInset:.1,imgFit:"contain",imgBlend:"multiply",name:blockBox({w:239.109,h:20,gap:[6,4],center:true}),nameText:blockText({size:15,weight:700,lineHeight:19.5}),link:blockText({size:15,weight:700,lineHeight:19.5}),linkReach:4,badge:blockBox({w:29.344,h:20,padding:[0,7,0,7],radius:[999,999],bg:"#E0E6F2",edge:{width:1.5,color:"rgba(90, 96, 135, 0.45)",ring:true},center:true}),badgeText:blockText({size:12,weight:700,lineHeight:12}),meta:blockText({size:13,weight:400,lineHeight:17.55,color:"muted",marginTop:2}),acts:blockBox({w:239.109,h:32,marginTop:6,gap:[16,16]}),act:blockText({size:13,weight:700,lineHeight:20.15,color:"ink",deco:"underline",decoOffset:3}),actBox:blockBox({w:84.531,h:32,minHeight:32,color:"ink"}),price:blockText({size:15,weight:700,lineHeight:23.25,tabular:true}),was:blockText({size:13,weight:400,lineHeight:20.15,color:"muted",tabular:true,deco:"strike"})},cartWeb:{line:blockBox({w:404,h:88,gap:[16,0],center:true}),sq:blockBox({w:88,h:88,radius:[14,14],bg:"#F3F3F3"}),imgInset:.1,imgFit:"contain",imgBlend:"multiply",name:blockBox({w:225.875,h:24.688,gap:[8,4],center:true}),nameText:blockText({size:19,weight:700,lineHeight:24.7}),link:blockText({size:19,weight:700,lineHeight:24.7}),linkReach:4,badge:blockBox({w:32.625,h:22,padding:[0,8,0,8],radius:[999,999],bg:"#DEE4F1",center:true}),badgeText:blockText({size:13,weight:700,lineHeight:13}),meta:blockText({size:15,weight:400,lineHeight:21,marginTop:2}),price:blockText({size:19,weight:700,lineHeight:29.45,tabular:true}),was:blockText({size:15,weight:400,lineHeight:23.25,tabular:true,deco:"strike"}),narrow:{upTo:599,sq:blockBox({w:64,h:64,radius:[14,14],bg:"#F3F3F3"}),cost:blockBox({w:432,h:29.438,marginTop:4,gap:[8,8]}),nameText:blockText({size:17,weight:700,lineHeight:22.1}),link:blockText({size:17,weight:700,lineHeight:22.1})},narrower:{upTo:330,sq:blockBox({w:56,h:56,radius:[14,14],bg:"#F3F3F3"}),cost:blockBox({w:216,h:29.438,marginTop:4,gap:[8,8]}),nameText:blockText({size:17,weight:700,lineHeight:22.1}),link:blockText({size:17,weight:700,lineHeight:22.1})},phone:{upTo:639,line:blockBox({w:303,h:81.25,gap:[12,0],center:true}),sq:blockBox({w:56,h:56,radius:[12,12],bg:"#F3F3F3"}),cost:blockBox({w:235,h:23.25,marginTop:2,gap:[8,8]}),nameText:blockText({size:15,weight:700,lineHeight:19.5}),link:blockText({size:15,weight:700,lineHeight:19.5}),meta:blockText({size:13,weight:400,lineHeight:17.55,marginTop:2}),price:blockText({size:15,weight:700,lineHeight:23.25,tabular:true}),was:blockText({size:13,weight:400,lineHeight:20.15,tabular:true,deco:"strike"}),smallUpTo:359,smallSq:48}},cartDrawer:{line:blockBox({w:360,h:147.094,gap:[14,0]}),img:blockBox({w:64,h:64,radius:[14,14],bg:"surface",edge:{width:1.5,color:"#C6D3CD",ring:true}}),imgInset:6,imgFit:"contain",name:blockBox({w:216,h:22.094,gap:[8,4],center:true}),nameText:blockText({size:17,weight:700,lineHeight:22.1,wrap:"auto"}),badge:blockBox({w:32.625,h:22,padding:[0,8,0,8],radius:[999,999],bg:"#DEE4F1",edge:{width:1.5,color:"rgba(90, 96, 135, 0.45)",ring:true},center:true}),badgeText:blockText({size:13,weight:700,lineHeight:13,wrap:"auto"}),meta:blockText({size:15,weight:400,lineHeight:21,marginTop:2}),note:blockText({size:15,weight:700,lineHeight:21,color:"ink",marginTop:2}),acts:blockBox({w:282,h:92,marginTop:10,gap:[12,8],center:true}),plan:blockBox({w:193.703,h:44,padding:[3,3,3,3],radius:[999,999],bg:"surface",edge:{width:1.5,color:"#C6D3CD",ring:true}}),planBtn:blockBox({w:63.859,h:38,padding:[0,14,0,14],minHeight:38,radius:[999,999]}),planText:blockText({size:15,weight:500,lineHeight:23.25,wrap:"auto"}),planOn:blockBox({w:123.844,h:38,padding:[0,14,0,14],minHeight:38,radius:[999,999],bg:"ink",color:"surface"}),planOnText:blockText({size:15,weight:700,lineHeight:23.25,color:"surface",wrap:"auto"}),qty:blockBox({w:104,h:40,radius:[999,999],bg:"surface",edge:{width:1.5,color:"#C6D3CD",ring:true},center:true}),countMin:24,qtyBtn:blockBox({w:40,h:40,radius:[20,20],center:true}),qtyIcon:blockBox({w:16,h:16}),count:blockText({size:15,weight:700,lineHeight:23.25,wrap:"auto",tabular:true}),remove:blockBox({w:58.359,h:40,minHeight:40,color:"ink"}),removeText:blockText({size:15,weight:700,lineHeight:23.25,color:"ink",wrap:"auto",deco:"underline",decoOffset:3}),price:blockText({size:17,weight:700,lineHeight:22.1,wrap:"auto",tabular:true}),was:blockText({size:15,weight:400,lineHeight:19.5,wrap:"auto",tabular:true,deco:"strike"}),pressScale:.9,hover:{color:"ink",share:.06,over:"surface"},motion:{press:140,fill:150,planFill:150}},price:{note:blockText({size:13,weight:400,lineHeight:19.5,color:"muted",marginTop:12}),noteStrong:blockText({size:13,weight:700,lineHeight:19.5,color:"muted"})},priceWeb:{rows:blockBox({w:536,h:166.625,gap:[10,10]}),row:blockBox({w:536,h:26.344,gap:[16,16]}),term:blockText({size:17,weight:400,lineHeight:26.35,wrap:"balance"}),value:blockText({size:17,weight:700,lineHeight:26.35,tabular:true}),off:blockText({size:17,weight:700,lineHeight:26.35,color:"ink",wrap:"balance"}),total:blockBox({w:536,h:49.594,marginTop:8,gap:[16,16]}),totalTerm:blockText({size:20,weight:700,lineHeight:31,wrap:"balance"}),totalValue:blockText({size:32,weight:700,lineHeight:49.6,tracking:-.64,tabular:true}),note:blockText({size:15,weight:400,lineHeight:22.5,marginTop:16}),noteStrong:blockText({size:15,weight:700,lineHeight:22.5,color:"ink"}),phone:{upTo:639,rows:blockBox({w:239,h:145.141,gap:[8,8]}),term:blockText({size:15,weight:400,lineHeight:23.25,wrap:"balance"}),value:blockText({size:15,weight:700,lineHeight:23.25,tabular:true}),totalTerm:blockText({size:18,weight:700,lineHeight:27.9,wrap:"balance"}),totalValue:blockText({size:28,weight:700,lineHeight:43.4,tracking:-.56,tabular:true}),note:blockText({size:15,weight:400,lineHeight:22.5,marginTop:12})},drawer:{rows:blockBox({w:360,h:154.219,marginTop:32,gap:[10,10]}),term:blockText({size:17,weight:400,lineHeight:26.35,wrap:"balance"}),value:blockText({size:17,weight:700,lineHeight:26.35,tabular:true}),totalTerm:blockText({size:20,weight:700,lineHeight:31,wrap:"balance"}),totalValue:blockText({size:24,weight:700,lineHeight:37.2,tabular:true}),note:blockText({size:15,weight:400,lineHeight:22.5,marginTop:12})}},need:{card:blockBox({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:blockBox({w:293,h:24,gap:[8,8],center:true}),kickerText:blockText({size:15,weight:700,lineHeight:23.25}),source:blockBox({w:116.719,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#DAF6E8",center:true,color:"ink"}),sourceText:blockText({size:12,weight:700,lineHeight:18.6,color:"ink"}),title:blockText({shown:false,size:15,weight:700,lineHeight:23.25}),signal:blockBox({w:293,h:65.25,marginTop:8,gap:[9,9],color:"#4D4D4D"}),signalText:blockText({size:15,weight:400,lineHeight:21.75,color:"#4D4D4D"}),signalLead:blockText({size:15,weight:700,lineHeight:21.75}),dot:blockBox({w:9,h:9,radius:[4.5,4.5],bg:"alert",color:"#4D4D4D",dy:-1}),score:blockBox({w:293,h:99.859,padding:[10,14,10,14],marginTop:12,gap:[12,12],radius:[10,10],bg:"#FCF0D6",center:true}),scoreLabel:blockText({size:14,weight:600,lineHeight:18.9,color:"#4D4D4D"}),scoreTag:blockBox({w:63.125,h:20.188,padding:[2,6,2,6],marginTop:3,radius:[6,6],bg:"surface"}),scoreTagText:blockText({size:12,weight:600,lineHeight:16.2,tracking:.72,face:"mono",upper:true,marginTop:3,paddingTop:2}),scoreNums:blockBox({w:106.109,h:51.141,gap:[6,0],center:true}),scoreWas:blockText({size:17,weight:700,lineHeight:26.35,color:"muted",deco:"strike",decoThickness:1.5}),scoreArrow:blockBox({w:16,h:16,color:"muted"}),scoreArrowFlip:true,scoreNow:blockText({size:28,weight:700,lineHeight:28,tracking:-.84,tabular:true}),scoreOf:blockText({size:15,weight:700,lineHeight:15,color:"#4D4D4D",tabular:true}),scoreSince:blockText({size:13,weight:700,lineHeight:20.15,color:"ink",marginTop:3})},needPlan:{card:blockBox({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:blockBox({w:297,h:24,gap:[8,8],center:true,color:"#262523"}),kickerText:blockText({size:15,weight:800,lineHeight:22.5,color:"#262523"}),source:blockBox({w:83.375,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#F2F1EE",center:true,color:"#4A4845"}),sourceText:blockText({size:12,weight:700,lineHeight:18,color:"#4A4845"}),title:blockText({size:19,weight:800,lineHeight:23.18,color:"#262523",marginTop:12}),signal:blockBox({w:297,h:65.25,marginTop:6,gap:[9,9],color:"#4A4845"}),signalText:blockText({size:15,weight:400,lineHeight:21.75,color:"#4A4845"}),signalLead:blockText({size:15,weight:800,lineHeight:21.75,color:"#262523"}),dot:blockBox({w:9,h:9,radius:[4.5,4.5],bg:"#E5372B",color:"#4A4845",dy:-1}),score:blockBox({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:blockText({size:13.5,weight:600,lineHeight:18.225,color:"#4A4845",wrap:"balance"}),scoreTag:blockBox({w:51.609,h:17.5,padding:[2,6,2,6],marginTop:3,radius:[5,5],bg:"surface",color:"#262523"}),scoreTagText:blockText({size:10,weight:600,lineHeight:13.5,color:"#262523",tracking:.6,face:"mono",upper:true,wrap:"balance",marginTop:3,paddingTop:2}),scoreNums:blockBox({w:94.75,h:49.75,gap:[6,0],center:true,color:"#262523"}),scoreWas:blockText({size:17,weight:700,lineHeight:25.5,color:"#6B6863",deco:"strike"}),scoreArrow:blockBox({w:16,h:16,color:"#6B6863"}),scoreArrowFlip:true,scoreNow:blockText({size:28,weight:800,lineHeight:28,color:"#262523"}),scoreOf:blockText({size:13,weight:800,lineHeight:13,color:"muted"}),scoreSince:blockText({size:12.5,weight:700,lineHeight:18.75,color:"planLink",marginTop:3}),sources:blockBox({w:131.375,h:24,gap:[4,4],color:"#262523"}),sourceDna:blockBox({w:44,h:24,padding:[0,9,0,9],radius:[999,999],bg:"planLinkWash",center:true,color:"planLink"}),sourceDnaText:blockText({size:12,weight:700,lineHeight:18,color:"planLink"}),dotWatch:blockBox({w:9,h:9,radius:[4.5,4.5],bg:"#E5A000",color:"#4A4845",dy:-1}),dotClear:blockBox({w:9,h:9,radius:[4.5,4.5],bg:"#5FA82B",color:"#4A4845",dy:-1}),scoreLabelMax:135,says:blockBox({w:297,h:52,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysImg:blockBox({w:32,h:32,radius:[16,16],color:"#262523"}),saysText:blockText({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845"}),saysBy:blockText({size:14.5,weight:800,lineHeight:20.3,color:"#262523"}),saysByGap:2,saysTag:blockBox({w:51.609,h:15,padding:[2,6,2,6],radius:[5,5],bg:"surface",color:"#262523"}),saysTagText:blockText({size:10,weight:400,lineHeight:14,color:"#262523",tracking:.6,face:"mono",upper:true,paddingTop:2}),saysBare:blockBox({w:297,h:81,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysKicker:blockText({size:17,weight:400,lineHeight:25.5,color:"#262523"}),saysSerif:blockText({size:17,weight:800,lineHeight:25.5,color:"#262523",tracking:-.17,wrap:"balance"}),jump:blockBox({w:297,h:60,padding:[8,14,8,8],marginTop:12,gap:[12,12],radius:[14,14],bg:"planInk",center:true,color:"planOnInk"}),jumpImg:blockBox({w:44,h:44,radius:[10,10],bg:"surface",color:"surface"}),jumpKicker:blockText({size:13,weight:800,lineHeight:19.5,color:"planAccent"}),jumpTitle:blockText({size:15,weight:800,lineHeight:18.75,color:"planOnInk"}),jumpGo:blockText({size:14,weight:800,lineHeight:21,color:"planOnInk"}),jumpPressScale:.98,more:blockBox({w:87.547,h:36,marginTop:6,marginBottom:-4,gap:[4,4],minHeight:36,center:true,color:"planLink"}),moreText:blockText({size:15,weight:800,lineHeight:22.5,color:"planLink"}),moreIcon:blockBox({w:16,h:16,color:"planLink"}),moreInset:16,moreTurn:{closed:90,open:-90},rep:blockBox({w:297,h:48.5,padding:[14,14,12,14],marginTop:10,radius:[16,16],bg:"#F8F7F4",color:"#262523"})},tip:{card:blockBox({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:blockBox({w:181.5,h:113.438,radius:[10,10],bg:"#F3F3F3"}),n:blockBox({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:blockText({size:14,weight:700,lineHeight:14}),title:blockText({size:16,weight:700,lineHeight:20,marginTop:10}),text:blockText({size:15,weight:400,lineHeight:21,color:"#4D4D4D",marginTop:4}),foot:blockBox({w:181.5,h:26.594,padding:[8,0,0,0],gap:[4,4],center:true,color:"ink"}),footText:blockText({size:12,weight:400,lineHeight:18.6,color:"ink",tracking:.48,face:"mono",upper:true,paddingTop:8}),footArrow:blockBox({w:14,h:14,color:"ink"}),footArrowFlip:true,pressScale:.98,bare:blockBox({w:181.5,h:42,padding:[2,0,0,0],center:true}),thumb:blockBox({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:blockBox({w:22,h:22})},tipPhoto:{card:blockBox({w:221,h:152,padding:[8,8,12,8],radius:[20,20],bg:"#FCF0D6"}),tones:{y:"#FCF0D6",c:"#EEDCC8",g:"tintGo",r:"tintPink"},img:blockBox({w:205,h:102.5,radius:[10,10],bg:"#F3F3F3"}),imgAspect:2,n:blockBox({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:blockText({size:14,weight:700,lineHeight:14}),title:blockText({size:15,weight:700,lineHeight:19.5,marginTop:10}),titleInset:4,pressScale:.98,bare:blockBox({w:205,h:42,padding:[2,0,0,0],center:true}),thumb:blockBox({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:blockBox({w:22,h:22,color:"ink"})},tipWeb:{card:blockBox({w:226,h:172.047,gap:[10,10]}),img:blockBox({w:226,h:141.25,radius:[14,14]}),imgAspect:1.6,title:blockText({size:16,weight:700,lineHeight:20.8,wrap:"balance"}),coverRadius:10,row:{from:440,card:blockBox({w:400,h:80,padding:[6,0,6,0],gap:[10,10],minHeight:80,center:true}),img:blockBox({w:64,h:64,radius:[10,10]}),arrowColumn:18,arrow:blockBox({w:18,h:18,color:"ink"}),arrowTurn:180},phone:{upTo:639,card:blockBox({w:216,h:162.5,gap:[8,8]}),img:blockBox({w:216,h:135,radius:[14,14]}),imgAspect:1.6,title:blockText({size:15,weight:700,lineHeight:19.5,wrap:"balance"}),smallUpTo:359,smallW:208},mark:{tile:blockBox({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},tipPlan:{card:blockBox({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:blockBox({w:197.406,h:30,center:true,color:"#262523"}),nText:blockText({size:30,weight:900,lineHeight:30,color:"#262523"}),icon:blockBox({w:26,h:26,color:"#262523"}),title:blockText({size:17,weight:800,lineHeight:21.25,color:"#262523",marginTop:14}),text:blockText({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845",marginTop:4}),foot:blockBox({w:197.406,h:25.75,padding:[10,0,0,0],color:"planLink"}),footText:blockText({size:10.5,weight:400,lineHeight:15.75,color:"planLink",tracking:.42,face:"mono",upper:true,paddingTop:10})},cartPlan:{line:blockBox({w:297,h:95.625,gap:[12,12],color:"#262523"}),img:blockBox({w:64,h:64,radius:[14,14],bg:"planLinkWash",center:true,color:"planLink"}),icon:blockBox({w:28,h:28,color:"planLink"}),name:blockText({size:16.5,weight:800,lineHeight:20.625,color:"#262523",wrap:"balance"}),prices:blockBox({w:221,h:24,marginTop:3,gap:[8,2],center:true,color:"#262523"}),price:blockText({size:16,weight:800,lineHeight:24,color:"#262523",tabular:true}),was:blockText({size:14,weight:600,lineHeight:21,color:"#6B6863",deco:"strike"}),small:blockText({size:14,weight:400,lineHeight:21,color:"#6B6863"}),acts:blockBox({w:221,h:40,marginTop:8,gap:[16,16],center:true,color:"#262523"}),step:blockBox({w:110,h:40,radius:[999,999],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},center:true,color:"#262523"}),remove:blockBox({w:56.422,h:40,minHeight:40,color:"#4A4845"}),removeText:blockText({size:14.5,weight:700,lineHeight:21.75,color:"#4A4845",deco:"underline",decoOffset:3,decoThickness:1.5})},cartBar:{bar:blockBox({w:361,h:66,padding:[8,8,8,10],gap:[10,10],minHeight:60,radius:[22,22],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.06)",x:0,y:1,blur:3,spread:0},center:true,x:16}),lift:{color:"rgba(0, 0, 0, 0.09)",x:0,y:10,blur:28,spread:0},thumbs:blockBox({w:88,h:44,padding:[0,4,0,0],center:true}),thumb:blockBox({w:40,h:40,radius:[12,12],bg:"#F3F3F3"}),thumbRing:2,thumbOverlap:18,imgInset:4,imgFit:"contain",imgBlend:"multiply",count:blockBox({w:20,h:20,padding:[0,5,0,5],radius:[10,10],bg:"text",center:true,color:"surface",x:72,y:-4}),countText:blockText({size:12,weight:700,lineHeight:12,color:"surface",tabular:true}),countAt:{top:-4,right:-4},sum:blockBox({w:130.656,h:35.688,gap:[2,2]}),total:blockText({size:17,weight:700,lineHeight:18.7,tracking:-.17,tabular:true}),sub:blockText({size:12,weight:400,lineHeight:15,color:"muted"}),go:blockBox({w:104.344,h:50,padding:[0,18,0,18],gap:[6,6],minHeight:50,radius:[999,999],bg:"pink",edge:{width:1,color:"ink",ring:true},center:true,color:"ink"}),goText:blockText({size:15,weight:700,lineHeight:23.25,color:"ink"}),pressScale:.97,hover:{color:"pink",share:.9,over:"text"},motion:{rise:{duration:240,from:24,fade:false},bump:{duration:240,scale:1.12,peakAt:.5,curve:"ease-out"}}},cartBarWeb:{bar:blockBox({w:600,h:68,padding:[10,10,10,14],gap:[14,14],minHeight:68,radius:[26,26],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.06)",x:0,y:1,blur:3,spread:0},center:true}),lift:{color:"rgba(0, 0, 0, 0.09)",x:0,y:10,blur:28,spread:0},thumbs:blockBox({w:102,h:44,padding:[0,6,0,0],center:true}),thumb:blockBox({w:44,h:44,padding:[4,4,4,4],radius:[12,12],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.14)",x:0,y:1,blur:3,spread:0},fit:"contain"}),thumbRing:2,thumbOverlap:18,imgInset:4,imgFit:"contain",imgBlend:"normal",count:blockBox({w:22,h:22,padding:[0,6,0,6],radius:[11,11],bg:"go",center:true,x:83,y:-5}),countText:blockText({size:12,weight:700,lineHeight:12,wrap:"auto",tabular:true}),countAt:{top:-5,right:-3},sum:blockBox({w:307.484,h:43.5,gap:[2,2]}),total:blockText({size:20,weight:700,lineHeight:22,color:"ink",tracking:-.2,tabular:true}),sub:blockText({size:15,weight:400,lineHeight:19.5}),go:blockBox({w:138.516,h:48,padding:[0,22,0,22],minHeight:48,radius:[999,999],bg:"ink",color:"surface"}),goText:blockText({size:17,weight:700,lineHeight:26.35,color:"surface",wrap:"auto"}),pressScale:.97,hover:{color:"ink",share:.86,over:"text"},motion:{rise:{duration:260,from:24,fade:true},bump:{duration:240,scale:1.1,peakAt:.5,curve:"out"}},phone:{upTo:559,bar:blockBox({w:335,h:79,padding:[8,8,8,10],gap:[10,10],minHeight:64,radius:[22,22],bg:"surface",center:true}),thumb:blockBox({w:40,h:40,padding:[4,4,4,4],radius:[12,12],bg:"surface",shadow:{color:"#FFFFFF",x:0,y:0,blur:0,spread:2},fit:"contain"}),go:blockBox({w:94.594,h:48,padding:[0,18,0,18],minHeight:48,radius:[999,999],bg:"ink",color:"surface"}),lastOnly:true,wordHidden:true}},why:{card:blockBox({w:393,h:655.609}),head:blockBox({w:393,h:126.328,padding:[4,16,12,16],gap:[12,12]}),pic:blockBox({w:64,h:64,radius:[10,10],bg:"#F3F3F3"}),packInset:.08,kind:blockText({size:12,weight:700,lineHeight:18.6,color:"ink",tracking:.72,face:"mono",upper:true}),title:blockText({size:22,weight:700,lineHeight:24.64,tracking:-.55,marginTop:2}),sub:blockText({size:14,weight:400,lineHeight:18.9,color:"#4D4D4D",marginTop:3}),close:blockBox({w:36,h:36,padding:[1,6,1,6],radius:[18,18],center:true,color:"ink"}),closeIcon:blockBox({w:20,h:20,color:"ink"}),body:blockBox({w:393,h:529.281,padding:[0,16,24,16],gap:[12,12]}),box:blockBox({w:361,h:169.281,padding:[14,14,14,14],radius:[20,20],bg:"tintPink"}),heading:blockText({size:17,weight:700,lineHeight:21.25}),rows:blockBox({w:333,h:110.031,marginTop:10,gap:[10,10]}),row:blockText({size:15,weight:400,lineHeight:21.75}),rowHead:blockText({size:12,weight:400,lineHeight:17.4,color:"ink",tracking:.48,face:"mono",upper:true}),secHeading:blockText({size:17,weight:700,lineHeight:21.25}),how:blockBox({w:361,h:49.5,marginTop:8,gap:[6,6]}),bullet:blockBox({w:361,h:21.75,gap:[8,8],color:"#4D4D4D"}),bulletText:blockText({size:15,weight:400,lineHeight:21.75,color:"#4D4D4D"}),bulletColumn:14,dot:{size:6,top:9,color:"ink"},para:blockText({size:15,weight:400,lineHeight:22.5,color:"#4D4D4D",marginTop:6}),acts:blockBox({w:361,h:98,gap:[2,2]}),btn:blockBox({w:361,h:52,padding:[0,20,0,20],gap:[8,8],minHeight:52,radius:[999,999],bg:"ink",center:true,color:"surface"}),btnText:blockText({size:16,weight:700,lineHeight:24.8,color:"surface"}),more:blockBox({w:164.891,h:44,padding:[0,12,0,12],minHeight:44,center:true,color:"ink"}),moreText:blockText({size:15,weight:700,lineHeight:23.25,color:"ink",deco:"underline",decoOffset:3,decoThickness:1.5}),tones:{calm:"tintBlue",y:"#FCF0D6",c:"#EEDCC8",g:"tintGo",r:"tintPink"},photoBg:"#F3F3F3",closeHover:"tintSage",pressScale:.97,hover:{color:"ink",share:.88,over:"surface"}},whyWeb:{card:blockBox({w:558,h:571.375}),head:blockBox({w:558,h:105.375,padding:[24,24,12,24],gap:[12,12]}),pic:blockBox({w:64,h:64,radius:[10,10],bg:"#F5F5F5"}),packInset:.08,kind:blockText({size:15,weight:700,lineHeight:19.5,color:"ink"}),title:blockText({size:22,weight:500,lineHeight:24.64,color:"ink",tracking:-.44,marginTop:2}),sub:blockText({size:15,weight:400,lineHeight:20.25,marginTop:3}),close:blockBox({w:40,h:40,padding:[1,6,1,6],radius:[20,20],center:true}),closeIcon:blockBox({w:20,h:20}),body:blockBox({w:558,h:466,padding:[0,24,24,24],gap:[22,22]}),box:blockBox({w:510,h:129}),heading:blockText({size:16,weight:700,lineHeight:20}),rows:blockBox({w:510,h:99,marginTop:10,gap:[12,12]}),row:blockText({size:15,weight:400,lineHeight:21.75}),rowHead:blockText({size:15,weight:700,lineHeight:21.75,color:"ink"}),secHeading:blockText({size:16,weight:700,lineHeight:20}),how:blockBox({w:510,h:49.5,marginTop:8,gap:[6,6]}),bullet:blockBox({w:510,h:21.75,gap:[8,8]}),bulletText:blockText({size:15,weight:400,lineHeight:21.75}),bulletColumn:14,dot:{size:6,top:9.75,color:"ink"},para:blockText({size:15,weight:400,lineHeight:22.5,marginTop:6}),acts:blockBox({w:510,h:92,gap:[2,2]}),btn:blockBox({w:510,h:46,padding:[0,20,0,20],gap:[8,8],minHeight:46,radius:[999,999],bg:"ink",center:true,color:"surface"}),btnText:blockText({size:17,weight:400,lineHeight:26.35,color:"surface",wrap:"auto"}),more:blockBox({w:164.891,h:44,padding:[0,12,0,12],minHeight:44,center:true,color:"ink"}),moreText:blockText({size:15,weight:700,lineHeight:23.25,color:"ink",wrap:"auto",deco:"underline",decoOffset:3,decoThickness:1.5}),photoBg:"surface",closeHover:"none",pressScale:.97,hover:{color:"ink",share:.88,over:"surface"},phone:{upTo:419,head:blockBox({w:341,h:145.031,padding:[24,24,12,24],gap:[10,10]}),pic:blockBox({w:48,h:48,radius:[10,10],bg:"#F5F5F5"}),title:blockText({size:20,weight:500,lineHeight:22.4,color:"ink",tracking:-.4,marginTop:2})}},whyPlan:{card:blockBox({w:329,h:323.109,padding:[12,14,12,14],radius:[16,16],edge:{width:1.5,color:"#262523",ring:true},color:"#262523"}),heading:blockText({size:10.5,weight:400,lineHeight:15.75,color:"#6B6863",tracking:.63,face:"mono",upper:true}),row:blockBox({w:301,h:59.688,marginTop:10,gap:[10,10],color:"#262523"}),chipColumn:58,chips:{dna:{box:blockBox({w:58,h:22,radius:[6,6],bg:"planLinkWash",center:true,color:"planLink"}),text:blockText({size:10.5,weight:700,lineHeight:15.75,color:"planLink",tracking:.42,face:"mono",upper:true})},record:{box:blockBox({w:58,h:22,radius:[6,6],bg:"#F2F1EE",center:true,color:"#4A4845"}),text:blockText({size:10.5,weight:700,lineHeight:15.75,color:"#4A4845",tracking:.42,face:"mono",upper:true})},ask:{box:blockBox({w:58,h:22,radius:[6,6],bg:"planAccentWash",center:true,color:"#262523"}),text:blockText({size:10.5,weight:700,lineHeight:15.75,color:"#262523",tracking:.42,face:"mono",upper:true})}},rowTitle:blockText({size:15,weight:800,lineHeight:19.5,color:"#262523"}),rowBody:blockText({size:14,weight:400,lineHeight:19.6,color:"#4A4845",marginTop:1}),score:blockBox({w:301,h:42.797,padding:[11,12,11,14],marginTop:12,gap:[8,8],radius:[12,12],bg:"planInk",center:true,color:"planOnInk"}),scoreText:blockText({size:14.5,weight:800,lineHeight:18.85,color:"planOnInk"}),scoreValue:blockText({size:16,weight:700,lineHeight:20.8,color:"planAccent",face:"mono"})},lights:{card:blockBox({w:325,h:134,marginTop:14}),head:blockBox({w:325,h:24,marginBottom:10,gap:[12,12],center:true}),lead:blockText({size:14,weight:400,lineHeight:18.2,color:"#3D3D3D"}),name:blockText({size:14,weight:700,lineHeight:18.2,color:"ink"}),pills:{better:{box:blockBox({w:66.094,h:24,padding:[0,10,0,10],minHeight:24,radius:[999,999],bg:"#D7F5E7",center:true,color:"ink"}),text:blockText({size:12,weight:700,lineHeight:12,color:"ink",tracking:.48,face:"mono"})},same:{box:blockBox({w:50.734,h:24,padding:[0,10,0,10],minHeight:24,radius:[999,999],bg:"#FBEED0",center:true,color:"ink"}),text:blockText({size:12,weight:700,lineHeight:12,color:"ink",tracking:.48,face:"mono"})},worse:{box:blockBox({w:58.406,h:24,padding:[0,10,0,10],minHeight:24,radius:[999,999],bg:"#F6EBDE",center:true,color:"#834D0D"}),text:blockText({size:12,weight:700,lineHeight:12,color:"#834D0D",tracking:.48,face:"mono"})}},viz:blockBox({w:325,h:56}),grid:{rows:10,gap:1.5,radius:1.5,widthShare:.6},zones:{lot:6.5,some:3.5},colors:{go:"go",some:"#E4BA55",lot:"#BC6E13"},src:blockBox({w:325,h:44,gap:[16,0],center:true}),srcBtn:blockBox({w:181.5,h:44,gap:[6,6],minHeight:44,center:true,color:"#4D4D4D"}),srcText:blockText({size:14,weight:400,lineHeight:21.7,color:"#4D4D4D"}),srcIcon:blockBox({w:16,h:16,color:"#5A6087"}),act:blockBox({w:221.172,h:44,padding:[0,20,0,20],marginTop:6,marginBottom:14,minHeight:44,radius:[999,999],bg:"surface",edge:{width:1.5,color:"ink",ring:true},center:true,color:"ink"}),actText:blockText({size:15,weight:700,lineHeight:23.25,color:"ink",marginTop:6})},checkin:{card:blockBox({w:393,h:179.25}),body:blockBox({w:393,h:99.25,padding:[0,16,24,16],gap:[24,24]}),question:blockText({size:17,weight:700,lineHeight:21.25}),picks:blockBox({w:361,h:96,marginTop:10,gap:[8,8]}),pick:blockBox({w:115,h:44,padding:[4,4,4,4],gap:[6,6],minHeight:44,radius:[999,999],bg:"surface",edge:{width:1,color:"ink",ring:false},center:true,color:"ink"}),pickText:blockText({size:15,weight:400,lineHeight:18,color:"ink",wrap:"balance",paddingTop:4}),pickOn:blockBox({w:115,h:44,padding:[4,4,4,4],gap:[6,6],minHeight:44,radius:[999,999],bg:"pink",edge:{width:1,color:"pink",ring:false},center:true,color:"ink"}),pickOnText:blockText({size:15,weight:700,lineHeight:18,color:"ink",wrap:"balance",paddingTop:4}),pickHover:{color:"pink",share:.3,over:"surface"},stepTop:16,row:blockBox({w:361,h:44,gap:[8,8],minHeight:44,center:true}),rowLabel:blockText({size:15,weight:400,lineHeight:18.75}),rowValue:blockText({size:15,weight:700,lineHeight:18.75}),rowIcon:blockBox({w:18,h:18,color:"ink"}),rowTurn:90,rowPressScale:.98,note:blockBox({w:361,h:60.594,padding:[10,12,10,12],marginTop:12,radius:[10,10],bg:"#FFE8E6"}),noteText:blockText({size:14,weight:400,lineHeight:20.3,marginTop:12,paddingTop:10}),noteLink:blockText({size:14,weight:700,lineHeight:20.3,deco:"underline",decoOffset:3}),done:blockText({size:15,weight:400,lineHeight:21,wrap:"balance",marginTop:12}),acts:blockBox({w:361,h:52,gap:[2,2]}),btn:blockBox({w:361,h:52,padding:[0,20,0,20],gap:[8,8],minHeight:52,radius:[999,999],bg:"ink",center:true,color:"surface"}),btnText:blockText({size:16,weight:700,lineHeight:24.8,color:"surface"})},weather:{card:blockBox({w:361,h:321.734,padding:[16,16,16,16],gap:[16,16],radius:[20,20],bg:"#FCF4E0"}),skies:{sun:"#FCF4E0",blue:"tintBlue"},now:blockBox({w:329,h:113.891,gap:[12,12],center:true}),temp:blockText({size:64,weight:700,lineHeight:60.8,color:"ink",tracking:-2.56,tabular:true}),cond:blockText({size:17,weight:700,lineHeight:22.1,color:"ink",marginTop:8}),hl:blockText({size:15,weight:400,lineHeight:21,tabular:true,marginTop:2}),glyph:blockBox({w:88,h:88}),walk:blockBox({w:329,h:159.844,padding:[12,16,12,16],gap:[4,4],radius:[10,10],bg:"surface"}),walkTitle:blockBox({w:297,h:22.094,gap:[8,8],center:true,color:"ink"}),walkTitleText:blockText({size:17,weight:700,lineHeight:22.1,color:"ink"}),walkText:blockText({size:15,weight:400,lineHeight:21.75}),lvl:blockBox({w:10,h:10,radius:[5,5],bg:"#77DDAC",color:"ink"}),levels:{good:"#77DDAC",ok:"#F4CF7A",hot:"#DC8F7C",storm:"#8DA4BB"},comfort:blockBox({w:297,h:32.5,padding:[12,0,0,0],marginTop:8,gap:[8,6],center:true}),comfortRule:{width:1,color:"line"},comfortLabel:blockText({size:13,weight:400,lineHeight:16.9,color:"muted"}),comfortValue:blockText({size:15,weight:700,lineHeight:19.5,color:"ink"}),bar:blockBox({w:82,h:8,gap:[3,3]}),pipOn:blockBox({w:14,h:8,radius:[2,2],bg:"#77DDAC"}),pipOff:blockBox({w:14,h:8,radius:[2,2],bg:"#F1F5F2"})},weatherSummary:{card:blockBox({w:361,h:265.484,padding:[24,16,24,16],radius:[20,20],bg:"#FCF4E0"}),glyph:blockBox({w:88,h:88}),temp:blockText({size:72,weight:700,lineHeight:68.4,color:"ink",tracking:-2.88,tabular:true,marginTop:8}),cond:blockText({size:17,weight:700,lineHeight:22.1,color:"ink",marginTop:8}),hl:blockText({size:15,weight:400,lineHeight:21,tabular:true,marginTop:2})},weatherTile:{card:blockBox({w:272,h:187.984,padding:[16,16,16,16],gap:[8,8],radius:[20,20],bg:"#F5F5F5"}),top:blockBox({w:240,h:24,gap:[8,8],center:true}),label:blockText({size:12,weight:700,lineHeight:15.6,color:"ink",tracking:.72,face:"mono",upper:true}),glyph:blockBox({w:36,h:36,marginTop:-6,marginBottom:-6}),glyphMargin:[-6,-4,-6,0],big:blockText({size:28,weight:700,lineHeight:30.8,color:"ink",tracking:-.56,tabular:true}),small:blockText({size:15,weight:700,lineHeight:16.5,color:"muted",tabular:true}),smallGap:4,meta:blockText({size:14,weight:400,lineHeight:19.6}),btn:blockBox({w:137.375,h:38,padding:[0,12,0,12],gap:[8,8],minHeight:38,radius:[999,999],bg:"ink",edge:{width:1.5,color:"ink",ring:false},center:true,color:"surface"}),btnText:blockText({size:15,weight:700,lineHeight:15,color:"surface"}),btnIcon:blockBox({w:20,h:20,color:"surface"})},weatherWeb:{card:blockBox({w:533.078,h:242,padding:[24,24,24,24],radius:[20,20],bg:"surface",edge:{width:1,color:"line",ring:false}}),head:blockBox({w:483.078,h:34,marginBottom:16,gap:[12,12],center:true}),city:blockText({size:24,weight:700,lineHeight:28.8,color:"ink",tracking:-.48,wrap:"auto"}),units:blockBox({w:78,h:34,padding:[2,2,2,2],radius:[999,999],edge:{width:1,color:"line",ring:false}}),unit:blockBox({w:36,h:28,minHeight:28,radius:[999,999],center:true,color:"muted"}),unitText:blockText({size:13,weight:700,lineHeight:20.15,color:"muted",wrap:"auto"}),unitOn:blockBox({w:36,h:28,minHeight:28,radius:[999,999],bg:"ink",center:true,color:"surface"}),unitOnText:blockText({size:13,weight:700,lineHeight:20.15,color:"surface",wrap:"auto"}),now:blockBox({w:483.078,h:88,gap:[24,12],center:true}),glyph:blockBox({w:88,h:88}),temp:blockText({size:51.2,weight:700,lineHeight:51.2,color:"ink",tracking:-1.536,wrap:"auto",tabular:true}),tempFluid:{min:44,vw:4,max:56},sky:blockText({size:15,weight:400,lineHeight:21,color:"muted",wrap:"auto",marginTop:6}),tags:blockBox({w:483.078,h:30,marginTop:24,gap:[8,8]}),tag:blockBox({w:123.75,h:30,padding:[0,14,0,14],gap:[8,8],minHeight:30,radius:[999,999],bg:"surface",edge:{width:1,color:"#F2C763",ring:false},center:true,color:"ink"}),tagText:blockText({size:13,weight:700,lineHeight:20.15,color:"ink",wrap:"auto"}),dot:7,hues:{red:"alert",yellow:"#F2C763",green:"go",blue:"#4E98C9",plain:"line",plainDot:"muted"},phone:{upTo:559,card:blockBox({w:335,h:272,padding:[18,18,18,18],radius:[20,20],bg:"surface",edge:{width:1,color:"line",ring:false}}),glyph:blockBox({w:64,h:64})}},weatherAlert:{card:blockBox({w:361,h:48,padding:[0,16,0,16],gap:[12,12],minHeight:48,radius:[10,10],bg:"#FBF1EE",center:true,color:"#6D1D14"}),icon:blockBox({w:20,h:20,color:"alert"}),title:blockText({size:15,weight:700,lineHeight:23.25,color:"#6D1D14"}),titleGap:6,text:blockText({size:15,weight:400,lineHeight:23.25,color:"#6D1D14"}),chev:blockBox({w:16,h:16,color:"#6D1D14"}),pressScale:.98},weatherDetails:{grid:blockBox({w:361,h:591.25,gap:[12,12]}),tile:blockBox({w:174.5,h:143.359,padding:[14,14,14,14],gap:[6,6],minHeight:120,radius:[20,20],bg:"surface",edge:{width:1,color:"line",ring:false}}),label:blockText({size:12,weight:700,lineHeight:15.6,color:"muted",tracking:.72,face:"mono",upper:true}),labelGap:6,icon:blockBox({w:16,h:16,color:"ink"}),chev:blockBox({w:14,h:14,color:"muted"}),value:blockText({size:28,weight:700,lineHeight:30.8,color:"ink",tracking:-.56,tabular:true}),valueGap:6,unit:blockText({size:15,weight:700,lineHeight:16.5,color:"ink",tabular:true}),note:blockText({size:13,weight:400,lineHeight:18.2}),pressScale:.98},weatherHours:{cell:blockBox({w:54,h:100,padding:[2,0,0,0],gap:[4,4],center:true}),column:54,rows:[18,32,16,20,6],time:blockText({size:13,weight:400,lineHeight:15.6,color:"muted"}),timeNow:blockText({size:13,weight:700,lineHeight:15.6,color:"ink"}),glyph:blockBox({w:32,h:32}),icon:blockBox({w:24,h:24,color:"#926F06"}),chance:blockText({size:12,weight:700,lineHeight:12,color:"#1E7AB7",face:"mono"}),temp:blockText({size:15,weight:700,lineHeight:18,color:"ink",tabular:true}),quiet:blockText({size:13,weight:400,lineHeight:15.6,color:"muted",tabular:true}),bar:blockBox({w:52,h:6,radius:[3,3],bg:"#77DDAC"}),barInset:1,levels:{good:"#77DDAC",ok:"#F4CF7A",hot:"#DC8F7C",storm:"#8DA4BB"},windows:blockBox({w:327,h:76.594,marginBottom:12,gap:[8,8]}),window:blockBox({w:159.5,h:76.594,padding:[10,12,10,12],gap:[2,2],radius:[10,10],bg:"tintGo"}),windowTitle:blockText({size:15,weight:700,lineHeight:19.5,color:"ink",tabular:true}),windowText:blockText({size:13,weight:400,lineHeight:17.55}),legend:blockBox({w:327,h:18.188,marginTop:12,gap:[14,4],color:"muted"}),legendItem:blockBox({w:47.813,h:18.188,gap:[6,6],center:true,color:"muted"}),legendText:blockText({size:13,weight:400,lineHeight:18.2,color:"muted",marginTop:12}),legendDot:blockBox({w:10,h:10,radius:[5,5],bg:"#77DDAC",color:"muted"})},weatherForecast:{row:blockBox({w:327,h:48,gap:[8,8],minHeight:48,center:true}),rule:{width:1,color:"line"},columns:[48,32,30,155,30],walkColumns:[42,30,28,73,28,86],day:blockText({size:15,weight:700,lineHeight:18,color:"ink"}),sky:blockBox({w:32,h:30,gap:[1,1]}),glyph:blockBox({w:30,h:30}),chance:blockText({size:12,weight:700,lineHeight:12,color:"#1E7AB7",face:"mono"}),low:blockText({size:14,weight:400,lineHeight:14,color:"muted",face:"mono",tabular:true}),high:blockText({size:14,weight:400,lineHeight:14,color:"ink",face:"mono",tabular:true}),bar:blockBox({w:155,h:6,radius:[3,3],bg:"#F1F5F2"}),fill:blockBox({w:99.203,h:6,radius:[3,3],bg:"#DDB44F",x:23.25}),tag:blockBox({w:42.016,h:24,padding:[0,10,0,10],minHeight:24,radius:[999,999],bg:"#FCF0D6",edge:{width:1,color:"tintYellowEdge",ring:true},center:true,color:"ink"}),tagText:blockText({size:12,weight:700,lineHeight:14.4,color:"ink"}),tags:{good:{bg:"tintGo",ring:"#8FE3BB",ringWidth:1,color:"ink"},ok:{bg:"#FCF0D6",ring:"tintYellowEdge",ringWidth:1,color:"ink"},warn:{bg:"#FBF1EE",ring:"#E9B8AB",ringWidth:1,color:"#6D1D14"},rain:{bg:"tintBlue",ring:"#AFD1E7",ringWidth:1,color:"ink"}}},weatherLevels:{phone:{list:blockBox({w:361,h:140,marginTop:16,marginBottom:16,gap:[12,12]}),row:blockBox({w:361,h:26,gap:[8,8],center:true}),columns:[24,56,185,72],icon:blockBox({w:26,h:26}),name:blockText({size:15,weight:400,lineHeight:23.25}),bar:blockBox({w:185,h:8,radius:[999,999],bg:"#ECECEC"}),fills:{high:"#B67A3F",mid:"#F2C763",low:"ink"},level:{high:blockText({size:13,weight:700,lineHeight:20.15,color:"#A05E32",face:"mono"}),mid:blockText({size:13,weight:400,lineHeight:20.15,color:"#A05E32",face:"mono"}),low:blockText({size:13,weight:400,lineHeight:20.15,color:"muted",face:"mono"})}},web:{list:blockBox({w:344.891,h:140,marginTop:16,marginBottom:16,gap:[12,12]}),row:blockBox({w:344.891,h:26,gap:[12,12],center:true}),columns:[26,64,138.891,80],icon:blockBox({w:26,h:26}),name:blockText({size:15,weight:400,lineHeight:23.25,wrap:"auto"}),bar:blockBox({w:138.891,h:8,radius:[999,999],bg:"#ECECEC"}),fills:{high:"#B67A3F",mid:"#F2C763",low:"ink"},level:{high:blockText({size:13,weight:700,lineHeight:20.15,color:"#A05E32",face:"mono",wrap:"auto"}),mid:blockText({size:13,weight:400,lineHeight:20.15,color:"#A05E32",face:"mono",wrap:"auto"}),low:blockText({size:13,weight:400,lineHeight:20.15,color:"muted",face:"mono",wrap:"auto"})}},webPhoneUpTo:559},weatherReading:{phone:{body:blockBox({w:361,h:88.344,gap:[12,12]}),gap:12,picks:blockBox({w:361,h:36,gap:[10,10]}),on:blockBox({w:103.016,h:36,padding:[0,12,0,12],gap:[6,6],minHeight:36,radius:[999,999],bg:"pink",edge:{width:1,color:"pink",ring:false},center:true,color:"ink"}),onText:blockText({size:15,weight:700,lineHeight:19.5,color:"ink"}),off:blockBox({w:86.875,h:36,padding:[0,12,0,12],gap:[6,6],minHeight:36,radius:[999,999],bg:"surface",edge:{width:1,color:"ink",ring:false},center:true,color:"ink"}),offText:blockText({size:15,weight:400,lineHeight:19.5,color:"ink"}),check:blockBox({w:16,h:16,color:"ink"}),read:blockBox({w:361,h:40.344,gap:[12,0]}),value:blockText({size:36,weight:700,lineHeight:37.8,color:"ink",tracking:-.72,tabular:true}),word:blockText({size:17,weight:700,lineHeight:26.35,color:"alert",tracking:.34,face:"mono",upper:true})},web:{body:blockBox({w:344.891,h:140.344}),gap:16,picks:blockBox({w:344.891,h:82,marginTop:16,marginBottom:16,gap:[10,10]}),on:blockBox({w:107.016,h:36,padding:[0,14,0,14],gap:[6,6],minHeight:36,radius:[999,999],bg:"pink",edge:{width:1,color:"pink",ring:false},center:true,color:"ink"}),onText:blockText({size:15,weight:700,lineHeight:19.5,color:"ink",wrap:"auto"}),off:blockBox({w:90.875,h:36,padding:[0,14,0,14],gap:[6,6],minHeight:36,radius:[999,999],bg:"surface",edge:{width:1,color:"ink",ring:false},center:true,color:"ink"}),offText:blockText({size:15,weight:400,lineHeight:19.5,color:"ink",wrap:"auto"}),check:blockBox({w:16,h:16,color:"ink"}),read:blockBox({w:344.891,h:42.344,gap:[12,0]}),value:blockText({size:38.4,weight:700,lineHeight:40.32,color:"ink",tracking:-.768,wrap:"auto",tabular:true}),word:blockText({size:17,weight:700,lineHeight:26.35,color:"#A05E32",tracking:.34,face:"mono",upper:true,wrap:"auto"})},fluid:{min:36,vw:3,max:44},tones:{good:"#0C844B",ok:"#A05E32",low:"alert"}}};function deepFreeze2(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value))for(let v of Object.values(value))deepFreeze2(v);return value}var k=everfurTokens,PRESET=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#preset@v1");function asPreset(theme){return Object.defineProperty(theme,PRESET,{value:theme,enumerable:true}),deepFreeze2(theme)}var SCALE_CAPS={content:0,heading:2,control:1.8,compact:1.5,badge:1.3},everfurTheme=asPreset({name:"everfur",colors:{bg:k.color.bg,surface:k.color.efWhite,text:k.color.text,ink:k.role.color.ink,onInk:k.color.efWhite,muted:k.role.color.muted,line:k.role.color.line,go:k.role.color.go,onGo:k.role.color.ink,pink:k.color.efDustyPink,onPink:k.role.color.ink,alert:k.color.alert,alertDeep:k.color.alertDeep,icoSage:k.role.color.icoSage,bgMist:k.color.bgMist,tintSage:k.role.color.tintSage,tintBlue:k.role.color.tintBlue,tintGo:k.role.color.tintGo,tintPink:k.role.color.tintPink,tintYellowEdge:k.role.color.tintYellowEdge,tintWatch:everfurMetrics.colors.watch,tintRed:k.role.color.tintRed,scrim:everfurMetrics.colors.scrim,grab:everfurMetrics.colors.grab,focus:k.role.color.ink,planInk:everfurMetrics.colors.planInk,planOnInk:everfurMetrics.colors.planOnInk,planAccent:everfurMetrics.colors.planAccent,planLink:everfurMetrics.colors.planLink,planAccentWash:everfurMetrics.colors.planAccentWash,planAccentChip:everfurMetrics.colors.planAccentChip,planLinkWash:everfurMetrics.colors.planLinkWash,planLinkChip:everfurMetrics.colors.planLinkChip},radius:{...k.radius},space:{...k.space},type:{family:k.font.family.base,mono:k.font.family.mono,faces:{regular:"Azeret-Regular",medium:"Azeret-Medium",bold:"Azeret-Bold",mono:"AzeretMono-Regular",monoBold:"AzeretMono-Bold"},namedFaces:true,size:{xs:k.font.size.xs,sm:k.font.size.sm,md:k.font.size.md,lg:k.font.size.lg,xl:k.font.size.xl},weight:{...k.font.weight},lineHeight:{...k.font.lineHeight},scaleCaps:SCALE_CAPS},motion:{duration:{press:k.motion.duration.press,fade:k.motion.duration.fade,enter:k.motion.duration.enter,sheet:k.motion.duration.sheet,sheetOut:k.motion.duration.sheetOut},easing:{out:k.motion.easing.out,drawer:k.motion.easing.drawer},pop:{duration:k.motion.duration.enter,from:.95,peakAt:.55,amplitude:.035,switchAmplitude:.06},reduced:false},metrics:everfurMetrics});function presetOf(theme){return theme[PRESET]??everfurTheme}function isObject(v){return v!==null&&typeof v=="object"&&!Array.isArray(v)}function merge(base3,over){if(!isObject(base3)||!isObject(over))return over===void 0?base3:over;let out={...base3};for(let[key,value]of Object.entries(over))value!==void 0&&(out[key]=merge(base3[key],value));return out}function resolveTheme(partial,base3=everfurTheme){if(!partial)return base3;let merged=merge(base3,partial),given=partial.colors;if(given){let colors=merged.colors;for(let[wash,from,share]of PLAN_WASHES){let c=given[from];c!==void 0&&given[wash]===void 0&&(colors[wash]=mixHex(c,share,colors.surface)??colors[wash]??c)}}return deepFreeze2(merged)}var PLAN_WASHES=[["planAccentWash","planAccent",.17],["planAccentChip","planAccent",.47],["planLinkWash","planLink",.12],["planLinkChip","planLink",.2]];function mixHex(color,share,ground){let ch=v=>{let m=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(v??"");return m?[m[1],m[2],m[3]].map(h=>parseInt(h,16)):void 0},[c,g]=[ch(color),ch(ground)];if(!(!c||!g))return`#${c.map((v,i)=>Math.round(v*share+(g[i]??0)*(1-share)).toString(16).padStart(2,"0")).join("").toUpperCase()}`}var ThemeContext=/* @__PURE__ */(()=>{let key=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#ThemeContext@v1"),host2=globalThis,context=host2[key]??(host2[key]=react.createContext(null));return context.displayName??(context.displayName="EverfurThemeContext"),context})();function ThemeProvider({theme:theme,children:children}){let outer=useTheme(),key=theme===void 0||isComplete(theme)?theme:contentKey(theme),value=react.useMemo(()=>isComplete(theme)?filled(theme):resolveTheme(theme,outer),[key,outer]);return react.createElement(ThemeContext.Provider,{value:value},children)}function contentKey(value){return JSON.stringify(value,(_,v)=>isObject(v)&&!Array.isArray(v)?Object.fromEntries(Object.keys(v).sort().map(k2=>[k2,v[k2]])):v)}function isComplete(theme){return theme!==void 0&&Object.isFrozen(theme)&&GROUPS.every(g=>g in theme)}var GROUPS=["name","colors","radius","space","type","motion","metrics"];function hasEvery(shape,value){if(shape===void 0)return true;if(!isObject(shape))return value!==void 0;if(!isObject(value))return false;for(let key of Object.keys(shape))if(!hasEvery(shape[key],value[key]))return false;return true}var fills=/* @__PURE__ */new WeakMap;function filled(theme){let hit=fills.get(theme);if(hit)return hit;if(hasEvery(everfurTheme,theme))return fills.set(theme,theme),theme;let preset=presetOf(theme),merged=merge(everfurTheme,preset===everfurTheme?theme:merge(preset,theme));merged[PRESET]=preset;let out=deepFreeze2(merged);return fills.set(theme,out),out}function useTheme(){let explicit=react.useContext(ThemeContext);return explicit?filled(explicit):everfurTheme}var px=n=>Math.round(n*1e3)/1e3;function faceOf(weight,mono=false){return mono?weight>450?"monoBold":"mono":weight>500?"bold":weight>450?"medium":"regular"}function withAlpha(color,alpha){let m=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);if(!m)return color;let[r,g,b]=[m[1],m[2],m[3]].map(h=>parseInt(h,16));return`rgba(${r}, ${g}, ${b}, ${alpha})`}function channelsOf(color){let hex=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);if(hex)return[hex[1],hex[2],hex[3]].map(h=>parseInt(h,16));let rgb2=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(color);return rgb2?[rgb2[1],rgb2[2],rgb2[3]].map(Number):void 0}function mixColor(color,share,base3,fallback){let[c,b]=[channelsOf(color),channelsOf(base3)];return!c||!b?fallback:`rgb(${c.map((v,i)=>Math.round(v*share+(b[i]??0)*(1-share))).join(", ")})`}function colorOf(t,value){let m=/^([a-zA-Z]+)(?:\/([\d.]+))?$/.exec(value),role=m?.[1];if(!m||role===void 0||!(role in t.colors))return value;let c=t.colors[role];return m[2]===void 0?c:withAlpha(c,Number(m[2]))}function textPartSpec(t,p){return{size:p.size,weight:p.weight,lineHeight:p.lineHeight,color:colorOf(t,p.color),...p.face==="mono"?{mono:true}:{},...p.face==="serif"?{serif:true}:{},...p.tracking?{tracking:p.tracking}:{},...p.upper?{upper:true}:{},...p.deco==="none"?{}:{deco:p.deco==="strike"?"strike":"underline",decoOffset:p.decoOffset,decoThickness:p.decoThickness},...p.tabular?{tabular:true}:{},...p.wrap==="auto"?{}:{wrap:p.wrap==="balance"?"balance":"pretty"}}}function partFill(t,value){return value==="none"?void 0:colorOf(t,value)}function summarySpec(t){let m=t.metrics.summary,lh=(size,ratio)=>px(size*ratio);return{paddingX:m.paddingX,paddingY:m.paddingY,radius:m.radius,borderWidth:m.borderWidth,borderColor:t.colors.line,background:colorOf(t,m.background),shadow:m.shadow,row:{paddingY:m.rowPaddingY,minHeight:m.rowMinHeight,gapX:m.rowGapX,gapY:m.rowGapY,divider:m.rowDivider,center:m.rowCenter},totalRowMinHeight:m.totalRowMinHeight,gap:m.gap??0,totalMarginTop:m.totalMarginTop??0,tabular:m.tabular,term:{size:m.termSize,weight:t.type.weight.regular,lineHeight:lh(m.termSize,m.termLineHeight),color:colorOf(t,m.termColor)},value:{size:m.valueSize,weight:m.valueWeight,lineHeight:lh(m.valueSize,m.valueLineHeight),color:colorOf(t,m.valueColor)},totalTerm:{size:m.totalTermSize,weight:m.totalTermWeight,lineHeight:lh(m.totalTermSize,m.termLineHeight),color:colorOf(t,m.totalTermColor)},total:{size:m.totalSize,weight:m.totalWeight,lineHeight:lh(m.totalSize,m.totalLineHeight),color:colorOf(t,m.valueColor)},off:textPartSpec(t,t.metrics.summary.off)}}function skeletonWidth(t,index){let widths=t.metrics.skeleton.widths;return`${widths[index%widths.length]}%`}function itemTestID(parent,key,own){return own!==void 0?own:parent===void 0?void 0:`${parent}-${key}`}var nums=group=>group,isBox=v=>"edge"in v&&"shadow"in v&&"fit"in v,isText=v=>"deco"in v&&"face"in v&&"tabular"in v;function byValue(group){let out=/* @__PURE__ */new Map;for(let[k2,v]of Object.entries(group))out.has(v)||out.set(v,k2);return out}var groups,derived=/* @__PURE__ */new WeakMap;function tokenOf(map,theme,v){let k2=map.get(v),t=k2===void 0?void 0:theme[k2];return typeof t=="number"?t:v}function blocksMetrics(theme){let base3=everfurBlocksMetrics,p=everfurTheme;if(theme.space===p.space&&theme.radius===p.radius&&theme.type.size===p.type.size&&theme.type.weight===p.type.weight)return base3;let hit=derived.get(theme);if(hit)return hit;groups??(groups={space:byValue(nums(p.space)),radius:byValue(nums(p.radius)),size:byValue(nums(p.type.size)),weight:byValue(nums(p.type.weight))});let g=groups,space=v=>tokenOf(g.space,nums(theme.space),v),radius=v=>tokenOf(g.radius,nums(theme.radius),v),walk=v=>Array.isArray(v)?v.map(walk):v===null||typeof v!="object"?v:isBox(v)?{...v,padding:v.padding.map(space),gap:v.gap.map(space),marginTop:space(v.marginTop),marginBottom:space(v.marginBottom),radius:v.radius.map(radius)}:isText(v)?{...v,size:tokenOf(g.size,nums(theme.type.size),v.size),weight:tokenOf(g.weight,nums(theme.type.weight),v.weight),marginTop:space(v.marginTop),paddingTop:space(v.paddingTop)}:Object.fromEntries(Object.entries(v).map(([k2,x])=>[k2,walk(x)])),out=walk(base3);return derived.set(theme,out),out}var TEXT_VARIANT_TIERS={display:"heading",headline:"heading",title:"heading",heading:"heading",body:"content",lead:"content",label:"control",meta:"compact",caption:"content",overline:"compact",kicker:"compact"};function textToneColor(t,tone){let c=t.colors;switch(tone){case"ink":return c.ink;case"text":return c.text;case"muted":return c.muted;case"danger":return c.alertDeep;case"inverse":return c.onInk;default:return}}function textVariantSpec(t,variant,tone,weight){let base3=textPartSpec(t,t.metrics.text[variant]),color=textToneColor(t,tone);return{...base3,...color?{color:color}:{},...weight?{weight:t.type.weight[weight]}:{}}}var TEXT_VARIANT_BREAKS={display:"balance",headline:"balance",title:"balance",heading:"balance",body:"pretty",lead:"pretty",meta:"pretty",caption:"pretty",label:"auto",overline:"auto",kicker:"auto"};function textVariantTier(t,variant){return t.type.variantTiers?.[variant]??TEXT_VARIANT_TIERS[variant]}var ReducedMotionContext=/* @__PURE__ */(()=>{let key=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#ReducedMotionContext@v1"),host2=globalThis,context=host2[key]??(host2[key]=react.createContext(null));return context.displayName??(context.displayName="EverfurReducedMotionContext"),context})();function useKnownReducedMotion(){return react.useContext(ReducedMotionContext)}function rnText(t,spec){let face2=faceOf(spec.weight,spec.mono===true);return{fontFamily:spec.serif?t.type.faces.serif??t.type.faces.bold:t.type.faces[face2],...t.type.namedFaces?{}:{fontWeight:String(spec.weight)},fontSize:spec.size,lineHeight:spec.lineHeight,color:spec.color,...spec.tracking?{letterSpacing:spec.tracking}:{},...spec.upper?{textTransform:"uppercase"}:{},...spec.deco?rnDeco(spec):{},...spec.tabular?{fontVariant:["tabular-nums"]}:{},...spec.wrap&&reactNative.Platform.OS==="web"?{textWrap:spec.wrap}:{}}}function rnDeco(spec){let base3={textDecorationLine:spec.deco==="strike"?"line-through":"underline"};return reactNative.Platform.OS!=="web"?base3:{...base3,...spec.decoOffset?{textUnderlineOffset:spec.decoOffset}:{},...spec.decoThickness?{textDecorationThickness:spec.decoThickness}:{}}}function rnBox(t,b){let[pt=0,pr=0,pb=0,pl=0]=b.padding,[rt=0,rb=0]=b.radius,fill=partFill(t,b.bg);return{paddingTop:pt,paddingRight:pr,paddingBottom:pb,paddingLeft:pl,...b.marginTop?{marginTop:b.marginTop}:{},...b.gap[0]?{columnGap:b.gap[0]}:{},...b.gap[1]?{rowGap:b.gap[1]}:{},...rt===rb?rt?{borderRadius:rt}:{}:{borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomLeftRadius:rb,borderBottomRightRadius:rb},...fill?{backgroundColor:fill}:{},...b.edge.width>0&&!b.edge.ring?{borderWidth:b.edge.width,borderColor:colorOf(t,b.edge.color)}:{},...b.minHeight?{minHeight:b.minHeight}:{},...rnShadow(b.shadow)}}function webReducedMotion(){if(reactNative.Platform.OS!=="web")return false;let g=globalThis;return typeof g.matchMedia=="function"&&g.matchMedia("(prefers-reduced-motion: reduce)").matches}function useOsReducedMotion(known){let[reduced,setReduced]=react.useState(()=>known===null&&webReducedMotion());return react.useEffect(()=>{if(known!==null)return;let mounted=true,query=reactNative.AccessibilityInfo?.isReduceMotionEnabled;if(typeof query=="function"){let result=query.call(reactNative.AccessibilityInfo);result!=null&&typeof result.then=="function"&&result.then(value=>{mounted&&setReduced(value===true)},()=>{})}let subscription=reactNative.AccessibilityInfo?.addEventListener?.("reduceMotionChanged",value=>setReduced(value===true));return()=>{mounted=false,subscription?.remove?.()}},[known]),known??reduced}function useRnReduced(t){let os=useOsReducedMotion(useKnownReducedMotion());return t.motion.reduced||os}function slopFor(size){let pad=Math.max(0,Math.ceil((44-size)/2));return pad===0?void 0:{top:pad,bottom:pad,left:pad,right:pad}}function rnShadow(s){return s.blur===0&&s.y===0&&s.x===0?null:{shadowColor:s.color,shadowOffset:{width:s.x,height:s.y},shadowOpacity:1,shadowRadius:s.blur,elevation:1}}function breakProps(mode){return mode==="auto"?null:reactNative.Platform.OS==="ios"?{lineBreakStrategyIOS:"push-out"}:reactNative.Platform.OS==="android"&&mode==="balance"?{textBreakStrategy:"balanced"}:null}function weightStyle(t,weight){let w=t.type.weight[weight];return t.type.namedFaces?{fontFamily:t.type.faces[faceOf(w)]}:{fontWeight:String(w)}}function Text2({tier:tier,variant:variant,tone:tone,weight:weight,level:level,lineBreak:lineBreak,...props}){let t=useTheme(),cap2=t.type.scaleCaps[tier??(variant?textVariantTier(t,variant):"content")],breaks=breakProps(lineBreak??(variant?TEXT_VARIANT_BREAKS[variant]:"auto"));if(variant===void 0&&tone===void 0&&weight===void 0&&level===void 0)return breaks?react.createElement(reactNative.Text,{...cap2>0?{maxFontSizeMultiplier:cap2}:{},...breaks,...props}):react.createElement(reactNative.Text,cap2>0?{maxFontSizeMultiplier:cap2,...props}:props);let color=textToneColor(t,tone),own=variant?rnText(t,textVariantSpec(t,variant,tone,weight)):{...color?{color:color}:{},...weight?weightStyle(t,weight):{}},heading=level===void 0?{}:{accessibilityRole:"header",...reactNative.Platform.OS==="web"?{"aria-level":level}:{}};return react.createElement(reactNative.Text,{...cap2>0?{maxFontSizeMultiplier:cap2}:{},...breaks,...heading,...props,style:[own,props.style]})}var BOX=24,FINE=16,SEAM=.8,fine=dp=>Math.round(dp*FINE);function place(cx,cy,W,H,ux,uy){let left=cx-W/2,top=cy-H/2,x=Math.round(left),y=Math.round(top);return{position:"absolute",left:x,top:y,width:W,height:H,transform:[{translateX:left-x},{translateY:top-y},{rotate:`${Math.atan2(uy,ux)*180/Math.PI}deg`},{scale:1/FINE}]}}function strokePieces(icon,k2,out){for(let s of icon.strokes){let w=s.width*k2,pts=s.points,n=pts.length/2,last=s.closed?n:n-1;for(let i=0;i<last;i+=1){let j=(i+1)%n,px2=(pts[i*2]??0)*k2,py=(pts[i*2+1]??0)*k2,dx=(pts[j*2]??0)*k2-px2,dy=(pts[j*2+1]??0)*k2-py,len=Math.hypot(dx,dy);if(len===0&&!(n===2&&s.cap))continue;let ux=len===0?1:dx/len,uy=len===0?0:dy/len,e0=s.closed||i>0||s.cap?w/2:0,e1=s.closed||j!==n-1||s.cap?w/2:0,along=(len+e1-e0)/2;out.push({paint:"backgroundColor",style:{...place(px2+ux*along,py+uy*along,fine(len+e0+e1),fine(w),ux,uy),borderTopLeftRadius:e0>0?fine(w)/2:0,borderBottomLeftRadius:e0>0?fine(w)/2:0,borderTopRightRadius:e1>0?fine(w)/2:0,borderBottomRightRadius:e1>0?fine(w)/2:0,...s.opacity===void 0?{}:{opacity:s.opacity}}})}}}function boxPieces(icon,k2,out){for(let b of icon.boxes){let w=(b.w+b.width)*k2,h=(b.h+b.width)*k2;out.push({paint:"borderColor",style:{...place((b.x-b.width/2)*k2+w/2,(b.y-b.width/2)*k2+h/2,fine(w),fine(h),1,0),borderWidth:fine(b.width*k2),borderRadius:(b.radius+b.width/2)*k2*FINE,...b.opacity===void 0?{}:{opacity:b.opacity}}})}}function trianglePieces(icon,k2,out){for(let t of icon.triangles){let p=[0,1,2].map(i=>[(t[i*2]??0)*k2,(t[i*2+1]??0)*k2]),base3=0,len=-1;for(let i=0;i<3;i+=1){let a2=p[i]??[0,0],b=p[(i+1)%3]??[0,0],d=Math.hypot(b[0]-a2[0],b[1]-a2[1]);d>len&&(len=d,base3=i)}if(len<=0)continue;let b0=p[base3]??[0,0],b1=p[(base3+1)%3]??[0,0],a=p[(base3+2)%3]??[0,0],ux=(b1[0]-b0[0])/len,uy=(b1[1]-b0[1])/len,along=(a[0]-b0[0])*ux+(a[1]-b0[1])*uy,across=(a[0]-b0[0])*-uy+(a[1]-b0[1])*ux,h=Math.abs(across),up=across<0,mid=up?-h/2:h/2,bl=fine(along),br=fine(len)-bl,bh=fine(h);out.push({paint:up?"borderBottomColor":"borderTopColor",style:{...place(b0[0]+ux*(len/2)-uy*mid,b0[1]+uy*(len/2)+ux*mid,bl+br,bh,ux,uy),width:0,height:0,borderLeftWidth:bl,borderRightWidth:br,borderLeftColor:"transparent",borderRightColor:"transparent",...up?{borderBottomWidth:bh}:{borderTopWidth:bh}}})}for(let e of icon.seams){let x0=(e[0]??0)*k2,y0=(e[1]??0)*k2,dx=(e[2]??0)*k2-x0,dy=(e[3]??0)*k2-y0,d=Math.hypot(dx,dy),in0=SEAM*(e[4]??0),in1=SEAM*(e[5]??0),bar=d-in0-in1;if(d===0||bar<=0)continue;let mid=in0+bar/2;out.push({paint:"backgroundColor",style:place(x0+dx/d*mid,y0+dy/d*mid,fine(bar),fine(SEAM),dx/d,dy/d)})}}var cache2=/* @__PURE__ */new WeakMap;function piecesOf(icon,size){let sizes=cache2.get(icon);sizes===void 0&&(sizes=/* @__PURE__ */new Map,cache2.set(icon,sizes));let hit=sizes.get(size);if(hit!==void 0)return hit;let out=[],k2=size/BOX;return boxPieces(icon,k2,out),strokePieces(icon,k2,out),trianglePieces(icon,k2,out),sizes.set(size,out),out}function Glyph({icon:icon,size:size,color:color,label:label,testID:testID,style:style}){let t=useTheme(),side=size??t.metrics.icon.size,ink=color??t.colors.ink;/* @__PURE__ */
35
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{style:look(enter),children:node}),at.leaving===null?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{pointerEvents:"none",style:[{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:paper},look(exit)],children:at.leaving})]})}var everfurTokens=/* @__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 BLOCK_BOX={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},BLOCK_TEXT={shown:true,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},blockBox=p=>({...BLOCK_BOX,...p}),blockText=p=>({...BLOCK_TEXT,...p}),everfurMetrics={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 needBlockMetrics={card:/* @__PURE__ */blockBox({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__ */blockBox({w:293,h:24,gap:[8,8],center:true}),kickerText:/* @__PURE__ */blockText({size:15,weight:700,lineHeight:23.25}),source:/* @__PURE__ */blockBox({w:116.719,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#DAF6E8",center:true,color:"ink"}),sourceText:/* @__PURE__ */blockText({size:12,weight:700,lineHeight:18.6,color:"ink"}),title:/* @__PURE__ */blockText({shown:false,size:15,weight:700,lineHeight:23.25}),signal:/* @__PURE__ */blockBox({w:293,h:65.25,marginTop:8,gap:[9,9],color:"#4D4D4D"}),signalText:/* @__PURE__ */blockText({size:15,weight:400,lineHeight:21.75,color:"#4D4D4D"}),signalLead:/* @__PURE__ */blockText({size:15,weight:700,lineHeight:21.75}),dot:/* @__PURE__ */blockBox({w:9,h:9,radius:[4.5,4.5],bg:"alert",color:"#4D4D4D",dy:-1}),score:/* @__PURE__ */blockBox({w:293,h:99.859,padding:[10,14,10,14],marginTop:12,gap:[12,12],radius:[10,10],bg:"#FCF0D6",center:true}),scoreLabel:/* @__PURE__ */blockText({size:14,weight:600,lineHeight:18.9,color:"#4D4D4D"}),scoreTag:/* @__PURE__ */blockBox({w:63.125,h:20.188,padding:[2,6,2,6],marginTop:3,radius:[6,6],bg:"surface"}),scoreTagText:/* @__PURE__ */blockText({size:12,weight:600,lineHeight:16.2,tracking:.72,face:"mono",upper:true,marginTop:3,paddingTop:2}),scoreNums:/* @__PURE__ */blockBox({w:106.109,h:51.141,gap:[6,0],center:true}),scoreWas:/* @__PURE__ */blockText({size:17,weight:700,lineHeight:26.35,color:"muted",deco:"strike",decoThickness:1.5}),scoreArrow:/* @__PURE__ */blockBox({w:16,h:16,color:"muted"}),scoreArrowFlip:true,scoreNow:/* @__PURE__ */blockText({size:28,weight:700,lineHeight:28,tracking:-.84,tabular:true}),scoreOf:/* @__PURE__ */blockText({size:15,weight:700,lineHeight:15,color:"#4D4D4D",tabular:true}),scoreSince:/* @__PURE__ */blockText({size:13,weight:700,lineHeight:20.15,color:"ink",marginTop:3})},needPlanBlockMetrics={card:/* @__PURE__ */blockBox({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__ */blockBox({w:297,h:24,gap:[8,8],center:true,color:"#262523"}),kickerText:/* @__PURE__ */blockText({size:15,weight:800,lineHeight:22.5,color:"#262523"}),source:/* @__PURE__ */blockBox({w:83.375,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#F2F1EE",center:true,color:"#4A4845"}),sourceText:/* @__PURE__ */blockText({size:12,weight:700,lineHeight:18,color:"#4A4845"}),title:/* @__PURE__ */blockText({size:19,weight:800,lineHeight:23.18,color:"#262523",marginTop:12}),signal:/* @__PURE__ */blockBox({w:297,h:65.25,marginTop:6,gap:[9,9],color:"#4A4845"}),signalText:/* @__PURE__ */blockText({size:15,weight:400,lineHeight:21.75,color:"#4A4845"}),signalLead:/* @__PURE__ */blockText({size:15,weight:800,lineHeight:21.75,color:"#262523"}),dot:/* @__PURE__ */blockBox({w:9,h:9,radius:[4.5,4.5],bg:"#E5372B",color:"#4A4845",dy:-1}),score:/* @__PURE__ */blockBox({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__ */blockText({size:13.5,weight:600,lineHeight:18.225,color:"#4A4845",wrap:"balance"}),scoreTag:/* @__PURE__ */blockBox({w:51.609,h:17.5,padding:[2,6,2,6],marginTop:3,radius:[5,5],bg:"surface",color:"#262523"}),scoreTagText:/* @__PURE__ */blockText({size:10,weight:600,lineHeight:13.5,color:"#262523",tracking:.6,face:"mono",upper:true,wrap:"balance",marginTop:3,paddingTop:2}),scoreNums:/* @__PURE__ */blockBox({w:94.75,h:49.75,gap:[6,0],center:true,color:"#262523"}),scoreWas:/* @__PURE__ */blockText({size:17,weight:700,lineHeight:25.5,color:"#6B6863",deco:"strike"}),scoreArrow:/* @__PURE__ */blockBox({w:16,h:16,color:"#6B6863"}),scoreArrowFlip:true,scoreNow:/* @__PURE__ */blockText({size:28,weight:800,lineHeight:28,color:"#262523"}),scoreOf:/* @__PURE__ */blockText({size:13,weight:800,lineHeight:13,color:"muted"}),scoreSince:/* @__PURE__ */blockText({size:12.5,weight:700,lineHeight:18.75,color:"planLink",marginTop:3}),sources:/* @__PURE__ */blockBox({w:131.375,h:24,gap:[4,4],color:"#262523"}),sourceDna:/* @__PURE__ */blockBox({w:44,h:24,padding:[0,9,0,9],radius:[999,999],bg:"planLinkWash",center:true,color:"planLink"}),sourceDnaText:/* @__PURE__ */blockText({size:12,weight:700,lineHeight:18,color:"planLink"}),dotWatch:/* @__PURE__ */blockBox({w:9,h:9,radius:[4.5,4.5],bg:"#E5A000",color:"#4A4845",dy:-1}),dotClear:/* @__PURE__ */blockBox({w:9,h:9,radius:[4.5,4.5],bg:"#5FA82B",color:"#4A4845",dy:-1}),scoreLabelMax:135,says:/* @__PURE__ */blockBox({w:297,h:52,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysImg:/* @__PURE__ */blockBox({w:32,h:32,radius:[16,16],color:"#262523"}),saysText:/* @__PURE__ */blockText({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845"}),saysBy:/* @__PURE__ */blockText({size:14.5,weight:800,lineHeight:20.3,color:"#262523"}),saysByGap:2,saysTag:/* @__PURE__ */blockBox({w:51.609,h:15,padding:[2,6,2,6],radius:[5,5],bg:"surface",color:"#262523"}),saysTagText:/* @__PURE__ */blockText({size:10,weight:400,lineHeight:14,color:"#262523",tracking:.6,face:"mono",upper:true,paddingTop:2}),saysBare:/* @__PURE__ */blockBox({w:297,h:81,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysKicker:/* @__PURE__ */blockText({size:17,weight:400,lineHeight:25.5,color:"#262523"}),saysSerif:/* @__PURE__ */blockText({size:17,weight:800,lineHeight:25.5,color:"#262523",tracking:-.17,wrap:"balance"}),jump:/* @__PURE__ */blockBox({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__ */blockBox({w:44,h:44,radius:[10,10],bg:"surface",color:"surface"}),jumpKicker:/* @__PURE__ */blockText({size:13,weight:800,lineHeight:19.5,color:"planAccent"}),jumpTitle:/* @__PURE__ */blockText({size:15,weight:800,lineHeight:18.75,color:"planOnInk"}),jumpGo:/* @__PURE__ */blockText({size:14,weight:800,lineHeight:21,color:"planOnInk"}),jumpPressScale:.98,more:/* @__PURE__ */blockBox({w:87.547,h:36,marginTop:6,marginBottom:-4,gap:[4,4],minHeight:36,center:true,color:"planLink"}),moreText:/* @__PURE__ */blockText({size:15,weight:800,lineHeight:22.5,color:"planLink"}),moreIcon:/* @__PURE__ */blockBox({w:16,h:16,color:"planLink"}),moreInset:16,moreTurn:{closed:90,open:-90},rep:/* @__PURE__ */blockBox({w:297,h:48.5,padding:[14,14,12,14],marginTop:10,radius:[16,16],bg:"#F8F7F4",color:"#262523"})},tipBlockMetrics={card:/* @__PURE__ */blockBox({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__ */blockBox({w:181.5,h:113.438,radius:[10,10],bg:"#F3F3F3"}),n:/* @__PURE__ */blockBox({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:/* @__PURE__ */blockText({size:14,weight:700,lineHeight:14}),title:/* @__PURE__ */blockText({size:16,weight:700,lineHeight:20,marginTop:10}),text:/* @__PURE__ */blockText({size:15,weight:400,lineHeight:21,color:"#4D4D4D",marginTop:4}),foot:/* @__PURE__ */blockBox({w:181.5,h:26.594,padding:[8,0,0,0],gap:[4,4],center:true,color:"ink"}),footText:/* @__PURE__ */blockText({size:12,weight:400,lineHeight:18.6,color:"ink",tracking:.48,face:"mono",upper:true,paddingTop:8}),footArrow:/* @__PURE__ */blockBox({w:14,h:14,color:"ink"}),footArrowFlip:true,pressScale:.98,bare:/* @__PURE__ */blockBox({w:181.5,h:42,padding:[2,0,0,0],center:true}),thumb:/* @__PURE__ */blockBox({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:/* @__PURE__ */blockBox({w:22,h:22})},tipPhotoBlockMetrics={card:/* @__PURE__ */blockBox({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__ */blockBox({w:205,h:102.5,radius:[10,10],bg:"#F3F3F3"}),imgAspect:2,n:/* @__PURE__ */blockBox({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:/* @__PURE__ */blockText({size:14,weight:700,lineHeight:14}),title:/* @__PURE__ */blockText({size:15,weight:700,lineHeight:19.5,marginTop:10}),titleInset:4,pressScale:.98,bare:/* @__PURE__ */blockBox({w:205,h:42,padding:[2,0,0,0],center:true}),thumb:/* @__PURE__ */blockBox({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:/* @__PURE__ */blockBox({w:22,h:22,color:"ink"})},tipWebBlockMetrics={card:/* @__PURE__ */blockBox({w:226,h:172.047,gap:[10,10]}),img:/* @__PURE__ */blockBox({w:226,h:141.25,radius:[14,14]}),imgAspect:1.6,title:/* @__PURE__ */blockText({size:16,weight:700,lineHeight:20.8,wrap:"balance"}),coverRadius:10,row:{from:440,card:/* @__PURE__ */blockBox({w:400,h:80,padding:[6,0,6,0],gap:[10,10],minHeight:80,center:true}),img:/* @__PURE__ */blockBox({w:64,h:64,radius:[10,10]}),arrowColumn:18,arrow:/* @__PURE__ */blockBox({w:18,h:18,color:"ink"}),arrowTurn:180},phone:{upTo:639,card:/* @__PURE__ */blockBox({w:216,h:162.5,gap:[8,8]}),img:/* @__PURE__ */blockBox({w:216,h:135,radius:[14,14]}),imgAspect:1.6,title:/* @__PURE__ */blockText({size:15,weight:700,lineHeight:19.5,wrap:"balance"}),smallUpTo:359,smallW:208},mark:{tile:/* @__PURE__ */blockBox({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},tipPlanBlockMetrics={card:/* @__PURE__ */blockBox({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__ */blockBox({w:197.406,h:30,center:true,color:"#262523"}),nText:/* @__PURE__ */blockText({size:30,weight:900,lineHeight:30,color:"#262523"}),icon:/* @__PURE__ */blockBox({w:26,h:26,color:"#262523"}),title:/* @__PURE__ */blockText({size:17,weight:800,lineHeight:21.25,color:"#262523",marginTop:14}),text:/* @__PURE__ */blockText({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845",marginTop:4}),foot:/* @__PURE__ */blockBox({w:197.406,h:25.75,padding:[10,0,0,0],color:"planLink"}),footText:/* @__PURE__ */blockText({size:10.5,weight:400,lineHeight:15.75,color:"planLink",tracking:.42,face:"mono",upper:true,paddingTop:10})};function deepFreeze2(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value))for(let v of Object.values(value))deepFreeze2(v);return value}var k=everfurTokens,PRESET=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#preset@v1");function asPreset(theme){return Object.defineProperty(theme,PRESET,{value:theme,enumerable:true}),deepFreeze2(theme)}var SCALE_CAPS={content:0,heading:2,control:1.8,compact:1.5,badge:1.3},everfurTheme=asPreset({name:"everfur",colors:{bg:k.color.bg,surface:k.color.efWhite,text:k.color.text,ink:k.role.color.ink,onInk:k.color.efWhite,muted:k.role.color.muted,line:k.role.color.line,go:k.role.color.go,onGo:k.role.color.ink,pink:k.color.efDustyPink,onPink:k.role.color.ink,alert:k.color.alert,alertDeep:k.color.alertDeep,icoSage:k.role.color.icoSage,bgMist:k.color.bgMist,tintSage:k.role.color.tintSage,tintBlue:k.role.color.tintBlue,tintGo:k.role.color.tintGo,tintPink:k.role.color.tintPink,tintYellowEdge:k.role.color.tintYellowEdge,tintWatch:everfurMetrics.colors.watch,tintRed:k.role.color.tintRed,scrim:everfurMetrics.colors.scrim,grab:everfurMetrics.colors.grab,focus:k.role.color.ink,planInk:everfurMetrics.colors.planInk,planOnInk:everfurMetrics.colors.planOnInk,planAccent:everfurMetrics.colors.planAccent,planLink:everfurMetrics.colors.planLink,planAccentWash:everfurMetrics.colors.planAccentWash,planAccentChip:everfurMetrics.colors.planAccentChip,planLinkWash:everfurMetrics.colors.planLinkWash,planLinkChip:everfurMetrics.colors.planLinkChip},radius:{...k.radius},space:{...k.space},type:{family:k.font.family.base,mono:k.font.family.mono,faces:{regular:"Azeret-Regular",medium:"Azeret-Medium",bold:"Azeret-Bold",mono:"AzeretMono-Regular",monoBold:"AzeretMono-Bold"},namedFaces:true,size:{xs:k.font.size.xs,sm:k.font.size.sm,md:k.font.size.md,lg:k.font.size.lg,xl:k.font.size.xl},weight:{...k.font.weight},lineHeight:{...k.font.lineHeight},scaleCaps:SCALE_CAPS},motion:{duration:{press:k.motion.duration.press,fade:k.motion.duration.fade,enter:k.motion.duration.enter,sheet:k.motion.duration.sheet,sheetOut:k.motion.duration.sheetOut},easing:{out:k.motion.easing.out,drawer:k.motion.easing.drawer},pop:{duration:k.motion.duration.enter,from:.95,peakAt:.55,amplitude:.035,switchAmplitude:.06},reduced:false},metrics:everfurMetrics});function presetOf(theme){return theme[PRESET]??everfurTheme}function isObject(v){return v!==null&&typeof v=="object"&&!Array.isArray(v)}function merge(base3,over){if(!isObject(base3)||!isObject(over))return over===void 0?base3:over;let out={...base3};for(let[key,value]of Object.entries(over))value!==void 0&&(out[key]=merge(base3[key],value));return out}function resolveTheme(partial,base3=everfurTheme){if(!partial)return base3;let merged=merge(base3,partial),given=partial.colors;if(given){let colors=merged.colors;for(let[wash,from,share]of PLAN_WASHES){let c=given[from];c!==void 0&&given[wash]===void 0&&(colors[wash]=mixHex(c,share,colors.surface)??colors[wash]??c)}}return deepFreeze2(merged)}var PLAN_WASHES=[["planAccentWash","planAccent",.17],["planAccentChip","planAccent",.47],["planLinkWash","planLink",.12],["planLinkChip","planLink",.2]];function mixHex(color,share,ground){let ch=v=>{let m=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(v??"");return m?[m[1],m[2],m[3]].map(h=>parseInt(h,16)):void 0},[c,g]=[ch(color),ch(ground)];if(!(!c||!g))return`#${c.map((v,i)=>Math.round(v*share+(g[i]??0)*(1-share)).toString(16).padStart(2,"0")).join("").toUpperCase()}`}var ThemeContext=/* @__PURE__ */(()=>{let key=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#ThemeContext@v1"),host2=globalThis,context=host2[key]??(host2[key]=react.createContext(null));return context.displayName??(context.displayName="EverfurThemeContext"),context})();function ThemeProvider({theme:theme,children:children}){let outer=useTheme(),key=theme===void 0||isComplete(theme)?theme:contentKey(theme),value=react.useMemo(()=>isComplete(theme)?filled(theme):resolveTheme(theme,outer),[key,outer]);return react.createElement(ThemeContext.Provider,{value:value},children)}function contentKey(value){return JSON.stringify(value,(_,v)=>isObject(v)&&!Array.isArray(v)?Object.fromEntries(Object.keys(v).sort().map(k2=>[k2,v[k2]])):v)}function isComplete(theme){return theme!==void 0&&Object.isFrozen(theme)&&GROUPS.every(g=>g in theme)}var GROUPS=["name","colors","radius","space","type","motion","metrics"];function hasEvery(shape,value){if(shape===void 0)return true;if(!isObject(shape))return value!==void 0;if(!isObject(value))return false;for(let key of Object.keys(shape))if(!hasEvery(shape[key],value[key]))return false;return true}var fills=/* @__PURE__ */new WeakMap;function filled(theme){let hit=fills.get(theme);if(hit)return hit;if(hasEvery(everfurTheme,theme))return fills.set(theme,theme),theme;let preset=presetOf(theme),merged=merge(everfurTheme,preset===everfurTheme?theme:merge(preset,theme));merged[PRESET]=preset;let out=deepFreeze2(merged);return fills.set(theme,out),out}function useTheme(){let explicit=react.useContext(ThemeContext);return explicit?filled(explicit):everfurTheme}var px=n=>Math.round(n*1e3)/1e3;function faceOf(weight,mono=false){return mono?weight>450?"monoBold":"mono":weight>500?"bold":weight>450?"medium":"regular"}function withAlpha(color,alpha){let m=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);if(!m)return color;let[r,g,b]=[m[1],m[2],m[3]].map(h=>parseInt(h,16));return`rgba(${r}, ${g}, ${b}, ${alpha})`}function channelsOf(color){let hex=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);if(hex)return[hex[1],hex[2],hex[3]].map(h=>parseInt(h,16));let rgb2=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(color);return rgb2?[rgb2[1],rgb2[2],rgb2[3]].map(Number):void 0}function mixColor(color,share,base3,fallback){let[c,b]=[channelsOf(color),channelsOf(base3)];return!c||!b?fallback:`rgb(${c.map((v,i)=>Math.round(v*share+(b[i]??0)*(1-share))).join(", ")})`}function colorOf(t,value){let m=/^([a-zA-Z]+)(?:\/([\d.]+))?$/.exec(value),role=m?.[1];if(!m||role===void 0||!(role in t.colors))return value;let c=t.colors[role];return m[2]===void 0?c:withAlpha(c,Number(m[2]))}function textPartSpec(t,p){return{size:p.size,weight:p.weight,lineHeight:p.lineHeight,color:colorOf(t,p.color),...p.face==="mono"?{mono:true}:{},...p.face==="serif"?{serif:true}:{},...p.tracking?{tracking:p.tracking}:{},...p.upper?{upper:true}:{},...p.deco==="none"?{}:{deco:p.deco==="strike"?"strike":"underline",decoOffset:p.decoOffset,decoThickness:p.decoThickness},...p.tabular?{tabular:true}:{},...p.wrap==="auto"?{}:{wrap:p.wrap==="balance"?"balance":"pretty"}}}function partFill(t,value){return value==="none"?void 0:colorOf(t,value)}function summarySpec(t){let m=t.metrics.summary,lh=(size,ratio)=>px(size*ratio);return{paddingX:m.paddingX,paddingY:m.paddingY,radius:m.radius,borderWidth:m.borderWidth,borderColor:t.colors.line,background:colorOf(t,m.background),shadow:m.shadow,row:{paddingY:m.rowPaddingY,minHeight:m.rowMinHeight,gapX:m.rowGapX,gapY:m.rowGapY,divider:m.rowDivider,center:m.rowCenter},totalRowMinHeight:m.totalRowMinHeight,gap:m.gap??0,totalMarginTop:m.totalMarginTop??0,tabular:m.tabular,term:{size:m.termSize,weight:t.type.weight.regular,lineHeight:lh(m.termSize,m.termLineHeight),color:colorOf(t,m.termColor)},value:{size:m.valueSize,weight:m.valueWeight,lineHeight:lh(m.valueSize,m.valueLineHeight),color:colorOf(t,m.valueColor)},totalTerm:{size:m.totalTermSize,weight:m.totalTermWeight,lineHeight:lh(m.totalTermSize,m.termLineHeight),color:colorOf(t,m.totalTermColor)},total:{size:m.totalSize,weight:m.totalWeight,lineHeight:lh(m.totalSize,m.totalLineHeight),color:colorOf(t,m.valueColor)},off:textPartSpec(t,t.metrics.summary.off)}}function skeletonWidth(t,index){let widths=t.metrics.skeleton.widths;return`${widths[index%widths.length]}%`}function itemTestID(parent,key,own){return own!==void 0?own:parent===void 0?void 0:`${parent}-${key}`}var nums=group=>group,isBox=v=>"edge"in v&&"shadow"in v&&"fit"in v,isText=v=>"deco"in v&&"face"in v&&"tabular"in v;function byValue(group){let out=/* @__PURE__ */new Map;for(let[k2,v]of Object.entries(group))out.has(v)||out.set(v,k2);return out}var groups,derived=/* @__PURE__ */new WeakMap;function tokenOf(map,theme,v){let k2=map.get(v),t=k2===void 0?void 0:theme[k2];return typeof t=="number"?t:v}function everfurTokens2(theme){let p=everfurTheme;return theme.space===p.space&&theme.radius===p.radius&&theme.type.size===p.type.size&&theme.type.weight===p.type.weight}function onTheme(theme,base3){let p=everfurTheme;groups??(groups={space:byValue(nums(p.space)),radius:byValue(nums(p.radius)),size:byValue(nums(p.type.size)),weight:byValue(nums(p.type.weight))});let g=groups,space=v=>tokenOf(g.space,nums(theme.space),v),radius=v=>tokenOf(g.radius,nums(theme.radius),v),walk=v=>Array.isArray(v)?v.map(walk):v===null||typeof v!="object"?v:isBox(v)?{...v,padding:v.padding.map(space),gap:v.gap.map(space),marginTop:space(v.marginTop),marginBottom:space(v.marginBottom),radius:v.radius.map(radius)}:isText(v)?{...v,size:tokenOf(g.size,nums(theme.type.size),v.size),weight:tokenOf(g.weight,nums(theme.type.weight),v.weight),marginTop:space(v.marginTop),paddingTop:space(v.paddingTop)}:Object.fromEntries(Object.entries(v).map(([k2,x])=>[k2,walk(x)]));return walk(base3)}function blockMetrics(theme,base3){if(everfurTokens2(theme))return base3;let perTheme=derived.get(base3);perTheme||derived.set(base3,perTheme=/* @__PURE__ */new WeakMap);let hit=perTheme.get(theme);if(hit)return hit;let out=onTheme(theme,base3);return perTheme.set(theme,out),out}var TEXT_VARIANT_TIERS={display:"heading",headline:"heading",title:"heading",heading:"heading",body:"content",lead:"content",label:"control",meta:"compact",caption:"content",overline:"compact",kicker:"compact"};function textToneColor(t,tone){let c=t.colors;switch(tone){case"ink":return c.ink;case"text":return c.text;case"muted":return c.muted;case"danger":return c.alertDeep;case"inverse":return c.onInk;default:return}}function textVariantSpec(t,variant,tone,weight){let base3=textPartSpec(t,t.metrics.text[variant]),color=textToneColor(t,tone);return{...base3,...color?{color:color}:{},...weight?{weight:t.type.weight[weight]}:{}}}var TEXT_VARIANT_BREAKS={display:"balance",headline:"balance",title:"balance",heading:"balance",body:"pretty",lead:"pretty",meta:"pretty",caption:"pretty",label:"auto",overline:"auto",kicker:"auto"};function textVariantTier(t,variant){return t.type.variantTiers?.[variant]??TEXT_VARIANT_TIERS[variant]}var ReducedMotionContext=/* @__PURE__ */(()=>{let key=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#ReducedMotionContext@v1"),host2=globalThis,context=host2[key]??(host2[key]=react.createContext(null));return context.displayName??(context.displayName="EverfurReducedMotionContext"),context})();function useKnownReducedMotion(){return react.useContext(ReducedMotionContext)}function rnText(t,spec){let face2=faceOf(spec.weight,spec.mono===true);return{fontFamily:spec.serif?t.type.faces.serif??t.type.faces.bold:t.type.faces[face2],...t.type.namedFaces?{}:{fontWeight:String(spec.weight)},fontSize:spec.size,lineHeight:spec.lineHeight,color:spec.color,...spec.tracking?{letterSpacing:spec.tracking}:{},...spec.upper?{textTransform:"uppercase"}:{},...spec.deco?rnDeco(spec):{},...spec.tabular?{fontVariant:["tabular-nums"]}:{},...spec.wrap&&reactNative.Platform.OS==="web"?{textWrap:spec.wrap}:{}}}function rnDeco(spec){let base3={textDecorationLine:spec.deco==="strike"?"line-through":"underline"};return reactNative.Platform.OS!=="web"?base3:{...base3,...spec.decoOffset?{textUnderlineOffset:spec.decoOffset}:{},...spec.decoThickness?{textDecorationThickness:spec.decoThickness}:{}}}function rnBox(t,b){let[pt=0,pr=0,pb=0,pl=0]=b.padding,[rt=0,rb=0]=b.radius,fill=partFill(t,b.bg);return{paddingTop:pt,paddingRight:pr,paddingBottom:pb,paddingLeft:pl,...b.marginTop?{marginTop:b.marginTop}:{},...b.gap[0]?{columnGap:b.gap[0]}:{},...b.gap[1]?{rowGap:b.gap[1]}:{},...rt===rb?rt?{borderRadius:rt}:{}:{borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomLeftRadius:rb,borderBottomRightRadius:rb},...fill?{backgroundColor:fill}:{},...b.edge.width>0&&!b.edge.ring?{borderWidth:b.edge.width,borderColor:colorOf(t,b.edge.color)}:{},...b.minHeight?{minHeight:b.minHeight}:{},...rnShadow(b.shadow)}}function webReducedMotion(){if(reactNative.Platform.OS!=="web")return false;let g=globalThis;return typeof g.matchMedia=="function"&&g.matchMedia("(prefers-reduced-motion: reduce)").matches}function useOsReducedMotion(known){let[reduced,setReduced]=react.useState(()=>known===null&&webReducedMotion());return react.useEffect(()=>{if(known!==null)return;let mounted=true,query=reactNative.AccessibilityInfo?.isReduceMotionEnabled;if(typeof query=="function"){let result=query.call(reactNative.AccessibilityInfo);result!=null&&typeof result.then=="function"&&result.then(value=>{mounted&&setReduced(value===true)},()=>{})}let subscription=reactNative.AccessibilityInfo?.addEventListener?.("reduceMotionChanged",value=>setReduced(value===true));return()=>{mounted=false,subscription?.remove?.()}},[known]),known??reduced}function useRnReduced(t){let os=useOsReducedMotion(useKnownReducedMotion());return t.motion.reduced||os}function slopFor(size){let pad=Math.max(0,Math.ceil((44-size)/2));return pad===0?void 0:{top:pad,bottom:pad,left:pad,right:pad}}function rnShadow(s){return s.blur===0&&s.y===0&&s.x===0?null:{shadowColor:s.color,shadowOffset:{width:s.x,height:s.y},shadowOpacity:1,shadowRadius:s.blur,elevation:1}}function breakProps(mode){return mode==="auto"?null:reactNative.Platform.OS==="ios"?{lineBreakStrategyIOS:"push-out"}:reactNative.Platform.OS==="android"&&mode==="balance"?{textBreakStrategy:"balanced"}:null}function weightStyle(t,weight){let w=t.type.weight[weight];return t.type.namedFaces?{fontFamily:t.type.faces[faceOf(w)]}:{fontWeight:String(w)}}function Text2({tier:tier,variant:variant,tone:tone,weight:weight,level:level,lineBreak:lineBreak,...props}){let t=useTheme(),cap2=t.type.scaleCaps[tier??(variant?textVariantTier(t,variant):"content")],breaks=breakProps(lineBreak??(variant?TEXT_VARIANT_BREAKS[variant]:"auto"));if(variant===void 0&&tone===void 0&&weight===void 0&&level===void 0)return breaks?react.createElement(reactNative.Text,{...cap2>0?{maxFontSizeMultiplier:cap2}:{},...breaks,...props}):react.createElement(reactNative.Text,cap2>0?{maxFontSizeMultiplier:cap2,...props}:props);let color=textToneColor(t,tone),own=variant?rnText(t,textVariantSpec(t,variant,tone,weight)):{...color?{color:color}:{},...weight?weightStyle(t,weight):{}},heading=level===void 0?{}:{accessibilityRole:"header",...reactNative.Platform.OS==="web"?{"aria-level":level}:{}};return react.createElement(reactNative.Text,{...cap2>0?{maxFontSizeMultiplier:cap2}:{},...breaks,...heading,...props,style:[own,props.style]})}var BOX=24,FINE=16,SEAM=.8,fine=dp=>Math.round(dp*FINE);function place(cx,cy,W,H,ux,uy){let left=cx-W/2,top=cy-H/2,x=Math.round(left),y=Math.round(top);return{position:"absolute",left:x,top:y,width:W,height:H,transform:[{translateX:left-x},{translateY:top-y},{rotate:`${Math.atan2(uy,ux)*180/Math.PI}deg`},{scale:1/FINE}]}}function strokePieces(icon,k2,out){for(let s of icon.strokes){let w=s.width*k2,pts=s.points,n=pts.length/2,last=s.closed?n:n-1;for(let i=0;i<last;i+=1){let j=(i+1)%n,px2=(pts[i*2]??0)*k2,py=(pts[i*2+1]??0)*k2,dx=(pts[j*2]??0)*k2-px2,dy=(pts[j*2+1]??0)*k2-py,len=Math.hypot(dx,dy);if(len===0&&!(n===2&&s.cap))continue;let ux=len===0?1:dx/len,uy=len===0?0:dy/len,e0=s.closed||i>0||s.cap?w/2:0,e1=s.closed||j!==n-1||s.cap?w/2:0,along=(len+e1-e0)/2;out.push({paint:"backgroundColor",style:{...place(px2+ux*along,py+uy*along,fine(len+e0+e1),fine(w),ux,uy),borderTopLeftRadius:e0>0?fine(w)/2:0,borderBottomLeftRadius:e0>0?fine(w)/2:0,borderTopRightRadius:e1>0?fine(w)/2:0,borderBottomRightRadius:e1>0?fine(w)/2:0,...s.opacity===void 0?{}:{opacity:s.opacity}}})}}}function boxPieces(icon,k2,out){for(let b of icon.boxes){let w=(b.w+b.width)*k2,h=(b.h+b.width)*k2;out.push({paint:"borderColor",style:{...place((b.x-b.width/2)*k2+w/2,(b.y-b.width/2)*k2+h/2,fine(w),fine(h),1,0),borderWidth:fine(b.width*k2),borderRadius:(b.radius+b.width/2)*k2*FINE,...b.opacity===void 0?{}:{opacity:b.opacity}}})}}function trianglePieces(icon,k2,out){for(let t of icon.triangles){let p=[0,1,2].map(i=>[(t[i*2]??0)*k2,(t[i*2+1]??0)*k2]),base3=0,len=-1;for(let i=0;i<3;i+=1){let a2=p[i]??[0,0],b=p[(i+1)%3]??[0,0],d=Math.hypot(b[0]-a2[0],b[1]-a2[1]);d>len&&(len=d,base3=i)}if(len<=0)continue;let b0=p[base3]??[0,0],b1=p[(base3+1)%3]??[0,0],a=p[(base3+2)%3]??[0,0],ux=(b1[0]-b0[0])/len,uy=(b1[1]-b0[1])/len,along=(a[0]-b0[0])*ux+(a[1]-b0[1])*uy,across=(a[0]-b0[0])*-uy+(a[1]-b0[1])*ux,h=Math.abs(across),up=across<0,mid=up?-h/2:h/2,bl=fine(along),br=fine(len)-bl,bh=fine(h);out.push({paint:up?"borderBottomColor":"borderTopColor",style:{...place(b0[0]+ux*(len/2)-uy*mid,b0[1]+uy*(len/2)+ux*mid,bl+br,bh,ux,uy),width:0,height:0,borderLeftWidth:bl,borderRightWidth:br,borderLeftColor:"transparent",borderRightColor:"transparent",...up?{borderBottomWidth:bh}:{borderTopWidth:bh}}})}for(let e of icon.seams){let x0=(e[0]??0)*k2,y0=(e[1]??0)*k2,dx=(e[2]??0)*k2-x0,dy=(e[3]??0)*k2-y0,d=Math.hypot(dx,dy),in0=SEAM*(e[4]??0),in1=SEAM*(e[5]??0),bar=d-in0-in1;if(d===0||bar<=0)continue;let mid=in0+bar/2;out.push({paint:"backgroundColor",style:place(x0+dx/d*mid,y0+dy/d*mid,fine(bar),fine(SEAM),dx/d,dy/d)})}}var cache2=/* @__PURE__ */new WeakMap;function piecesOf(icon,size){let sizes=cache2.get(icon);sizes===void 0&&(sizes=/* @__PURE__ */new Map,cache2.set(icon,sizes));let hit=sizes.get(size);if(hit!==void 0)return hit;let out=[],k2=size/BOX;return boxPieces(icon,k2,out),strokePieces(icon,k2,out),trianglePieces(icon,k2,out),sizes.set(size,out),out}function Glyph({icon:icon,size:size,color:color,label:label,testID:testID,style:style}){let t=useTheme(),side=size??t.metrics.icon.size,ink=color??t.colors.ink;/* @__PURE__ */
36
36
  return jsxRuntime.jsx(reactNative.View,{testID:testID,pointerEvents:"none",style:[{width:side,height:side},style],...label?{accessible:true,accessibilityRole:"image",accessibilityLabel:label}:{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"},children:piecesOf(icon,side).map((piece,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[piece.style,{[piece.paint]:ink}]},i))})}var REGISTRY=/* @__PURE__ */(()=>{let key=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#icons@v1"),host2=globalThis;return host2[key]??(host2[key]={icons:{},warned:/* @__PURE__ */new Set})})();function registerIcons(icons){Object.assign(REGISTRY.icons,icons)}function iconNamed(name){let icon=REGISTRY.icons[name];return icon===void 0&&(typeof __DEV__<"u"?__DEV__:typeof process<"u"&&process.env.NODE_ENV!=="production")&&!REGISTRY.warned.has(name)&&(REGISTRY.warned.add(name),console.warn(`@everfur-health/ui-native: no icon "${name}" is registered. The lean entry draws only the icons an app registers: registerIcons({ ... }) with the UI_RN_ICON_* exports, or pass a drawing.`)),icon}function Icon({name:name,...rest}){let icon=iconNamed(name);return icon?/* @__PURE__ */jsxRuntime.jsx(Glyph,{icon:icon,...rest}):null}reactNative.StyleSheet.create({base:{flexDirection:"row",alignItems:"center",justifyContent:"center"},block:{alignSelf:"stretch"},auto:{alignSelf:"flex-start"},labelBox:{flexShrink:1},label:{textAlign:"center"}});reactNative.StyleSheet.create({head:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},shrink:{flexShrink:1},end:{justifyContent:"flex-end"}});reactNative.StyleSheet.create({chip:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"}});reactNative.StyleSheet.create({st:{alignItems:"center",alignSelf:"stretch"},center:{textAlign:"center"},acts:{alignItems:"center",alignSelf:"stretch"},link:{alignItems:"center",justifyContent:"center"},underline:{textDecorationLine:"underline"}});function rnTextPart(t,p){return rnText(t,textPartSpec(t,p))}reactNative.StyleSheet.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"}});reactNative.StyleSheet.create({pill:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",maxWidth:"100%"},label:{flexShrink:1}});var UI_RN_ICON_ARROW_LEFT={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 UI_RN_ICON_CHEVRON={strokes:[{width:2,cap:true,closed:false,points:[9,18.001,15,12.001,9,6.001]}],boxes:[],triangles:[],seams:[]};var UI_RN_ICON_LEAF={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 UI_RN_ICON_PAW={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:[]};reactNative.StyleSheet.create({qty:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"},button:{alignItems:"center",justifyContent:"center"}});reactNative.StyleSheet.create({row:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},titles:{flexShrink:1}});reactNative.StyleSheet.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"}});reactNative.StyleSheet.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:lines=3,shape:shape,label:label,testID:testID,style:style}){let t=useTheme(),m=t.metrics.skeleton,named=label?{accessible:true,accessibilityRole:"progressbar",accessibilityLabel:label,accessibilityState:{busy:true}}:{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};return shape?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:testID,style:[shapeStyle(t,shape),style],...named}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:testID,style:[{rowGap:m.gap,alignSelf:"stretch"},style],...named,children:Array.from({length:Math.max(1,lines)},(_,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{height:m.lineHeight,width:skeletonWidth(t,i),borderRadius:t.radius.pill,backgroundColor:t.colors.tintSage}},i))})}function shapeStyle(t,shape){let round=shape.radius==="circle",width=shape.width??(round?shape.height:void 0),radius=shapeRadius(t,shape,width);return{height:shape.height,...width===void 0?{alignSelf:"stretch"}:{width:width},borderRadius:radius,backgroundColor:t.colors.tintSage}}function shapeRadius(t,shape,width){let r=shape.radius??"pill";return r==="none"?0:r==="circle"?(typeof width=="number"?Math.min(width,shape.height):shape.height)/2:t.radius[r]}function SummaryList({rows:given,total:total=false,trailingRows:trailingRows=[],loading:loading=false,loadingLabel:loadingLabel,variant:variant="standard",note:note,grouped:grouped=true,lineBreak:lineBreak,testID:testID,style:style}){let t=useTheme(),s=summarySpec(t);if(loading)/* @__PURE__ */
37
37
  return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[{padding:s.paddingX,borderRadius:s.radius,backgroundColor:t.colors.surface},style],children:/* @__PURE__ */jsxRuntime.jsx(Skeleton,{lines:4,label:loadingLabel})});let rows=typeof total=="object"?[...given,{...total,key:total.key??"total"}]:given,large=total!==false;if(rows.length===0)return null;let read=row=>grouped?{accessible:true,accessibilityLabel:`${row.term}, ${row.value}`}:null,breaks=lineBreak===void 0?null:{lineBreak:lineBreak},noteRow=note?{...note,key:note.key??"note"}:void 0,all=[...rows,...trailingRows,...noteRow?[noteRow]:[]];if(variant!=="standard"&&variant!=="flush"){let su=t.metrics.variants.summary;/* @__PURE__ */
38
38
  return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[rnBox(t,variant==="inset"?su.inset:su.box),style],children:all.map((row,i)=>{let kind=row===noteRow?"note":large&&i===rows.length-1?"total":"row",box=kind==="note"?su.renewRow:kind==="total"?su.totalRow:su.row,term=kind==="note"?su.renewTerm:kind==="total"?su.totalTerm:su.term,value=kind==="note"?su.renew:kind==="total"?su.total:su.value;/* @__PURE__ */
@@ -52,7 +52,7 @@ return jsxRuntime.jsxs(reactNative.View,{testID:testID,style:[card?styles22.card
52
52
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flex:1,minWidth:0},children:[
53
53
  /* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.jumpKicker),children:jump.kicker}),
54
54
  /* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.jumpTitle),children:jump.title})]}),
55
- /* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.jumpGo),children:jump.go})]});return jump.onPress?/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{testID:testID,onPress:jump.onPress,accessibilityRole:"button",accessibilityLabel:jump.accessibilityLabel??`${jump.kicker}, ${jump.title}`,style:({pressed:pressed})=>[...strip,pressed&&!reduced?{transform:[{scale:m.jumpPressScale}]}:null],children:inner}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:testID,style:strip,children:inner})}function PlanNeedCard({kicker:kicker,source:source,sources:givenSources,title:title,signals:signals,score:score,more:more,quote:quote,jump:jump,variant:variant="standard",children:children,beforeJump:beforeJump,loading:loading=false,loadingLabel:loadingLabel,testID:testID,style:style}){let t=useTheme(),plan=variant==="plan",mp=blocksMetrics(t).needPlan,m=plan?mp:blocksMetrics(t).need,part2=n=>testID===void 0?void 0:`${testID}-${n}`,sources=givenSources??(source?[{label:source}]:[]),text2=p=>rnText(t,textPartSpec(t,p)),card=[rnBox(t,m.card),{marginTop:0},style];if(loading)/* @__PURE__ */
55
+ /* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.jumpGo),children:jump.go})]});return jump.onPress?/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{testID:testID,onPress:jump.onPress,accessibilityRole:"button",accessibilityLabel:jump.accessibilityLabel??`${jump.kicker}, ${jump.title}`,style:({pressed:pressed})=>[...strip,pressed&&!reduced?{transform:[{scale:m.jumpPressScale}]}:null],children:inner}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:testID,style:strip,children:inner})}function PlanNeedCard({kicker:kicker,source:source,sources:givenSources,title:title,signals:signals,score:score,more:more,quote:quote,jump:jump,variant:variant="standard",children:children,beforeJump:beforeJump,loading:loading=false,loadingLabel:loadingLabel,testID:testID,style:style}){let t=useTheme(),plan=variant==="plan",mp=blockMetrics(t,needPlanBlockMetrics),m=plan?mp:blockMetrics(t,needBlockMetrics),part2=n=>testID===void 0?void 0:`${testID}-${n}`,sources=givenSources??(source?[{label:source}]:[]),text2=p=>rnText(t,textPartSpec(t,p)),card=[rnBox(t,m.card),{marginTop:0},style];if(loading)/* @__PURE__ */
56
56
  return jsxRuntime.jsx(reactNative.View,{testID:testID,style:card,children:/* @__PURE__ */jsxRuntime.jsx(Skeleton,{lines:3,label:loadingLabel})});let signalText=text2(m.signalText);/* @__PURE__ */
57
57
  return jsxRuntime.jsxs(reactNative.View,{testID:testID,style:card,children:[
58
58
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flexDirection:"row",alignItems:"center",columnGap:m.kicker.gap[0],minHeight:sources.length>0?m.kicker.h:void 0},children:[
@@ -65,7 +65,7 @@ return jsxRuntime.jsx(reactNative.View,{testID:part2(givenSources?`source-${i}`:
65
65
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{flexShrink:1,minWidth:0,maxWidth:plan&&mp.scoreLabelMax?mp.scoreLabelMax:void 0},children:/* @__PURE__ */jsxRuntime.jsxs(Text2,{style:text2(m.scoreLabel),children:[score.label,score.tag?" ":null,score.tag?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:part2("tag"),style:rnBox(t,m.scoreTag),children:/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.scoreTagText),children:score.tag})}):null]})}),
66
66
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{accessible:score.accessibilityLabel!==void 0,accessibilityLabel:score.accessibilityLabel,style:{flexShrink:0,alignItems:"flex-end"},children:[
67
67
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flexDirection:"row",alignItems:"center",columnGap:m.scoreNums.gap[0]},children:[score.was?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.scoreWas),children:score.was}):null,score.was?score.icon!==void 0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:part2("arrow"),children:/* @__PURE__ */jsxRuntime.jsx(BlockIcon,{icon:score.icon,size:m.scoreArrow.w,color:colorOf(t,m.scoreArrow.color)})}):/* @__PURE__ */jsxRuntime.jsx(Glyph,{testID:part2("arrow"),icon:UI_RN_ICON_ARROW_LEFT,size:m.scoreArrow.w,color:colorOf(t,m.scoreArrow.color),style:m.scoreArrowFlip?{transform:[{rotate:"180deg"}]}:void 0}):null,
68
- /* @__PURE__ */jsxRuntime.jsxs(Text2,{style:text2(m.scoreNow),children:[score.now,score.of?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.scoreOf),children:score.of}):null]})]}),score.since?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:[text2(m.scoreSince),{marginTop:m.scoreSince.marginTop}],children:score.since}):null]})]}):null,plan&&quote?/* @__PURE__ */jsxRuntime.jsx(Quote,{quote:quote,m:mp,testID:part2("quote")}):null,plan?beforeJump:null,plan&&jump?/* @__PURE__ */jsxRuntime.jsx(Jump,{jump:jump,m:mp,testID:part2("jump")}):null,children]})}function rnSource3(image){return typeof image=="number"?image:typeof image=="string"?image?{uri:image}:null:image&&typeof image=="object"&&image.uri?image:null}function TipCard(props){let{number:number,title:title,text:line,foot:foot,footArrow:footArrow=false,footPress:footPress,tone:tone="y",image:image,onImageError:onImageError,icon:icon=UI_RN_ICON_LEAF,onPress:onPress,pressTarget:pressTarget="title",accessibilityLabel:accessibilityLabel,variant:variant="standard",loading:loading=false,loadingLabel:loadingLabel,testID:testID,style:style}=props,t=useTheme(),reduced=useRnReduced(t),m=blocksMetrics(t).tip,ph=blocksMetrics(t).tipPhoto,w=blocksMetrics(t).tipWeb,pl=blocksMetrics(t).tipPlan,web=variant==="web",photo=variant==="photo",plan=variant==="plan",[down,setDown]=react.useState(false),[failed,setFailed]=react.useState(null),text2=p=>rnText(t,textPartSpec(t,p)),kit=photo?{...m,card:ph.card,tones:ph.tones,img:ph.img,n:ph.n,nText:ph.nText,title:ph.title,pressScale:ph.pressScale,bare:ph.bare,thumb:ph.thumb,thumbIcon:ph.thumbIcon}:plan?{...m,card:pl.card,tones:pl.tones,title:pl.title,text:pl.text,footText:pl.footText,foot:pl.foot,pressScale:1}:m,card=web?[rnBox(t,w.card),style]:[rnBox(t,kit.card),{backgroundColor:colorOf(t,kit.tones[tone])},style],aspect=web?w.imgAspect:photo?ph.imgAspect:m.img.w/m.img.h,press=web?1:kit.pressScale;if(loading)/* @__PURE__ */
68
+ /* @__PURE__ */jsxRuntime.jsxs(Text2,{style:text2(m.scoreNow),children:[score.now,score.of?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.scoreOf),children:score.of}):null]})]}),score.since?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:[text2(m.scoreSince),{marginTop:m.scoreSince.marginTop}],children:score.since}):null]})]}):null,plan&&quote?/* @__PURE__ */jsxRuntime.jsx(Quote,{quote:quote,m:mp,testID:part2("quote")}):null,plan?beforeJump:null,plan&&jump?/* @__PURE__ */jsxRuntime.jsx(Jump,{jump:jump,m:mp,testID:part2("jump")}):null,children]})}function rnSource3(image){return typeof image=="number"?image:typeof image=="string"?image?{uri:image}:null:image&&typeof image=="object"&&image.uri?image:null}function TipCard(props){let{number:number,title:title,text:line,foot:foot,footArrow:footArrow=false,footPress:footPress,tone:tone="y",image:image,onImageError:onImageError,icon:icon=UI_RN_ICON_LEAF,onPress:onPress,pressTarget:pressTarget="title",accessibilityLabel:accessibilityLabel,variant:variant="standard",loading:loading=false,loadingLabel:loadingLabel,testID:testID,style:style}=props,t=useTheme(),reduced=useRnReduced(t),m=blockMetrics(t,tipBlockMetrics),ph=blockMetrics(t,tipPhotoBlockMetrics),w=blockMetrics(t,tipWebBlockMetrics),pl=blockMetrics(t,tipPlanBlockMetrics),web=variant==="web",photo=variant==="photo",plan=variant==="plan",[down,setDown]=react.useState(false),[failed,setFailed]=react.useState(null),text2=p=>rnText(t,textPartSpec(t,p)),kit=photo?{...m,card:ph.card,tones:ph.tones,img:ph.img,n:ph.n,nText:ph.nText,title:ph.title,pressScale:ph.pressScale,bare:ph.bare,thumb:ph.thumb,thumbIcon:ph.thumbIcon}:plan?{...m,card:pl.card,tones:pl.tones,title:pl.title,text:pl.text,footText:pl.footText,foot:pl.foot,pressScale:1}:m,card=web?[rnBox(t,w.card),style]:[rnBox(t,kit.card),{backgroundColor:colorOf(t,kit.tones[tone])},style],aspect=web?w.imgAspect:photo?ph.imgAspect:m.img.w/m.img.h,press=web?1:kit.pressScale;if(loading)/* @__PURE__ */
69
69
  return jsxRuntime.jsx(reactNative.View,{testID:testID,style:card,children:/* @__PURE__ */jsxRuntime.jsx(Skeleton,{lines:3,label:loadingLabel})});let kn=kit.n,n=web?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[rnBox(t,kn),{position:"absolute",left:kn.x,top:kn.y,width:kn.w,height:kn.h,alignItems:"center",justifyContent:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(kit.nText),children:number})}),titleText=/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(web?w.title:kit.title),children:title}),cover=onPress!==void 0&&(web||pressTarget==="card"),part2=n2=>testID===void 0?void 0:`${testID}-${n2}`,given=plan?null:rnSource3(image),source=given&&failed!==image?given:null,footStyle=text2(kit.footText),arrow=footArrow||footPress?/* @__PURE__ */jsxRuntime.jsx(Glyph,{icon:UI_RN_ICON_ARROW_LEFT,size:m.footArrow.w,color:typeof footStyle.color=="string"?footStyle.color:void 0,style:m.footArrowFlip?{transform:[{rotate:"180deg"}]}:void 0}):null,footText=/* @__PURE__ */jsxRuntime.jsx(Text2,{style:footStyle,children:foot}),footRow={flexDirection:"row",alignItems:"center",columnGap:m.foot.gap[0]},footEl=foot&&!web&&!photo?footPress?/* @__PURE__ */jsxRuntime.jsxs(reactNative.Pressable,{testID:footPress.testID??part2("foot"),onPress:footPress.onPress,accessibilityRole:"link",accessibilityLabel:footPress.accessibilityLabel??foot,hitSlop:slopFor(footStyle.lineHeight??m.footArrow.w),style:[footRow,{marginTop:"auto",paddingTop:kit.foot.padding[0],alignSelf:"flex-start",zIndex:1}],children:[footText,arrow]}):arrow?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[footRow,{marginTop:"auto",paddingTop:kit.foot.padding[0]}],children:[footText,arrow]}):/* @__PURE__ */jsxRuntime.jsx(Text2,{style:[footStyle,{marginTop:"auto",paddingTop:kit.foot.padding[0]}],children:foot}):null,failOn=()=>{image!=null&&(setFailed(image),onImageError?.(image))},thumbIcon=spec=>/* @__PURE__ */jsxRuntime.jsx(BlockIcon,{icon:icon,size:spec.w,color:colorOf(t,spec.color)}),top=plan?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",minHeight:pl.top.h},children:[
70
70
  /* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(pl.nText),children:number}),
71
71
  /* @__PURE__ */jsxRuntime.jsx(BlockIcon,{icon:icon,size:pl.icon.w,color:colorOf(t,pl.icon.color)})]}):!web&&!source?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{testID:part2("thumb"),accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[rnBox(t,kit.bare),{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}],children:[
@@ -372,7 +372,7 @@ return jsxRuntime.jsx(HealthPlanPlaced,{title:copy.orderedTitle(op),arrives:arri
372
372
  return Object.freeze(out)}function copyOf(raw){let out={};for(let[key,entry]of Object.entries(raw)){let text2=typeof entry=="string"?entry:entry!==null&&typeof entry=="object"?entry.text:void 0;typeof text2=="string"&&text2.length<=500&&isPlainText(text2)&&(out[key]=text2)}/* @__PURE__ */
373
373
  return Object.freeze(out)}function parseSlotDoc(raw,slot){if(sizeOf(raw)>65536)return{ok:false,reason:"too_large"};let refusal=schemaRefusal(raw);if(refusal!==null)return{ok:false,reason:refusal};let d=raw,docSlot=str6(d.slot,3,64),docVersion=d.docVersion===void 0||d.docVersion===null?null:int2(d.docVersion,1,Number.MAX_SAFE_INTEGER),minBlocks=d.minBlocks===void 0?1:int2(d.minBlocks,0,50),theme=d.theme===void 0||d.theme===null?{}:rec(d.theme),tokens=theme===BAD?BAD:rec(theme.tokens),copy=rec(d.copy),parts=Array.isArray(d.parts)&&d.parts.length>=1&&d.parts.length<=50?d.parts.map(readPart):BAD;return docSlot===BAD||docVersion===BAD||minBlocks===BAD||tokens===BAD||copy===BAD?{ok:false,reason:"unparseable"}:parts===BAD||parts.some(p=>p===BAD)?{ok:false,reason:"unparseable"}:docSlot!==slot?{ok:false,reason:"wrong_slot"}:{ok:true,doc:/* @__PURE__ */Object.freeze({schema:SLOT_SCHEMA,slot:docSlot,docVersion:docVersion,minBlocks:minBlocks,tokens:tokensOf(tokens),parts:/* @__PURE__ */Object.freeze(parts),copy:copyOf(copy)})}}function slotBodyOf(body){if(body===null)return{ok:false,reason:"too_large"};if(typeof body!="string")return{ok:true,raw:body};if(body.length>65536||utf8Length(body)>65536)return{ok:false,reason:"too_large"};try{return{ok:!0,raw:JSON.parse(body)}}catch{return{ok:false,reason:"unparseable"}}}function part(p){/* @__PURE__ */
374
374
  return Object.freeze({settings:{},bind:{},actions:{},...p})}var SLOT_NAMED_PARTS=/* @__PURE__ */Object.freeze({focus:part({id:"focus",type:"PlanNeedCard",variant:"plan",bind:{title:"data:plan.needs"}}),needs:part({id:"needs",type:"PlanNeedCard",variant:"standard",repeat:"data:plan.needs"}),tips:part({id:"tips",type:"TipCard",variant:"plan",repeat:"data:plan.tips"}),shelf:part({id:"shelf",type:"ProductTile",variant:"standard",repeat:"data:plan.items"}),cartLines:part({id:"cart-lines",type:"CartLine",variant:"plan",repeat:"data:cart.lines"}),cartSummary:part({id:"cart-summary",type:"PriceSummary",bind:{rows:"data:cart.summary"},visibleIf:{source:"data:cart.summary",op:"present"}}),orders:part({id:"orders",type:"OrderRow",variant:"quiet",repeat:"data:orders.recent"})});function doc(slot,parts){/* @__PURE__ */
375
- return Object.freeze({schema:SLOT_SCHEMA,slot:slot,docVersion:null,minBlocks:1,tokens:{},parts:/* @__PURE__ */Object.freeze([...parts]),copy:{}})}var P=SLOT_NAMED_PARTS,BUNDLED_SLOT_DOCS=/* @__PURE__ */Object.freeze({"health_plan.focus":doc("health_plan.focus",[P.focus,P.tips]),"today.health":doc("today.health",[P.focus,P.tips]),"shop.shelf":doc("shop.shelf",[P.shelf]),"shop.cart":doc("shop.cart",[P.cartLines,P.cartSummary]),"shop.orders":doc("shop.orders",[P.orders])});function bundledSlotDoc(slot){return Object.prototype.hasOwnProperty.call(BUNDLED_SLOT_DOCS,slot)?BUNDLED_SLOT_DOCS[slot]??null:null}function utf8Bytes(text2){let out=[];for(let ch of text2){let cp=ch.codePointAt(0);cp<128?out.push(cp):cp<2048?out.push(192|cp>>6,128|cp&63):cp<65536?out.push(224|cp>>12,128|cp>>6&63,128|cp&63):out.push(240|cp>>18,128|cp>>12&63,128|cp>>6&63,128|cp&63)}return out}function fnv1a64Hex(text2){let hi=3421674724,lo=2216829733;for(let byte2 of utf8Bytes(text2)){lo=(lo^byte2)>>>0;let loProduct=lo*435,carry=Math.floor(loProduct/4294967296),nextLo=loProduct>>>0;hi=hi*435+carry+lo*256>>>0,lo=nextLo}return hi.toString(16).padStart(8,"0")+lo.toString(16).padStart(8,"0")}var tenants=/* @__PURE__ */new WeakMap;function runtimeTenantOf(runtime){return tenants.get(runtime)}var SLOT_REGISTRY_HASH="sha256-0IDdNTQTtW2+pJ9GBCa/aWJrH/lf2X2jHhTQaCt6g5E=";var SLOT_BLOCKS={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 SLOT_LKG_KEY="everfur.slots.v2",SLOT_INSTALL_ID_KEY="everfur.slots.installId.v2";var SLOT_CACHE_MS=6e4,SLOT_CACHE_MAX_MS=3e5,SLOT_FAILURE_MS=15e3,SLOT_LKG_MAX_AGE_MS=10080*60*1e3,ETAG=/^(W\/)?"[^"]{1,200}"$/,INSTALL_ID=/^[A-Za-z0-9_-]{8,128}$/,MAX_AGE=/(?:^|,)\s*max-age\s*=\s*"?(\d{1,10})"?\s*(?:,|$)/i,NO_STORE2=/(?:^|,)\s*(?:no-store|no-cache)\s*(?:,|$)/i,FIXED_SCOPE=/* @__PURE__ */Object.freeze({doc:"default",tenant:"default",epoch:0});function randomId(){let out="";for(let i=0;i<4;i++)out+=Math.floor(Math.random()*4294967296).toString(36).padStart(7,"0");return out}function slotCacheMs(cacheControl){if(cacheControl===null)return SLOT_CACHE_MS;if(NO_STORE2.test(cacheControl))return 0;let m=MAX_AGE.exec(cacheControl);return m===null?SLOT_CACHE_MS:Math.min(Number(m[1])*1e3,SLOT_CACHE_MAX_MS)}var has=(obj2,key)=>Object.prototype.hasOwnProperty.call(obj2,key);function createSlotClient(deps){let now=deps.now??Date.now,scopeOf=()=>{try{return deps.scope?.()??FIXED_SCOPE}catch{return FIXED_SCOPE}},memory=/* @__PURE__ */new Map,failures=/* @__PURE__ */new Map,inFlight=/* @__PURE__ */new Map,installId=null,epoch=null,rescoped=false,writes=Promise.resolve(),track=(event,props)=>{try{deps.telemetry?.track(event,props)}catch{}},observe=scope=>{epoch!==scope.epoch&&(epoch!==null&&(memory.clear(),failures.clear(),installId=null,rescoped=true),epoch=scope.epoch)},stale=scope=>{let current=scopeOf();return current.epoch!==scope.epoch||current.doc!==scope.doc},undoIfStale=async(scope,key,written)=>{if(!stale(scope))return false;try{await deps.kv.getItem(key)===written&&await deps.kv.removeItem(key)}catch{}return true},readInstallId=scope=>{let tenant=fnv1a64Hex(scope.tenant);if(installId?.tenant===tenant)return installId.id;let fresh2=rescoped;rescoped=false;let id=(async()=>{if(!fresh2)try{let raw=await deps.kv.getItem(SLOT_INSTALL_ID_KEY),kept=raw===null?null:JSON.parse(raw);if(kept?.tenant===tenant&&typeof kept.id=="string"&&INSTALL_ID.test(kept.id))return kept.id}catch{}try{let made=(deps.newId??randomId)();if(!INSTALL_ID.test(made))return null;let text2=JSON.stringify({tenant:tenant,id:made});return await deps.kv.setItem(SLOT_INSTALL_ID_KEY,text2),await undoIfStale(scope,SLOT_INSTALL_ID_KEY,text2)?null:made}catch{return null}})();return installId={tenant:tenant,id:id},id},readFile=async scopeKey=>{try{let raw=await deps.kv.getItem(SLOT_LKG_KEY),file=raw===null?null:JSON.parse(raw);return file?.scope!==scopeKey||file.docs===null||typeof file.docs!="object"||Array.isArray(file.docs)?{docs:{}}:{docs:file.docs}}catch{return{docs:{}}}},readStored=async(scope,slot)=>{let file=await readFile(fnv1a64Hex(scope.doc)),entry=has(file.docs,slot)?file.docs[slot]:void 0;if(entry==null||typeof entry.at!="number")return null;let age=now()-entry.at;if(!(age<SLOT_LKG_MAX_AGE_MS)||age<-SLOT_CACHE_MAX_MS)return null;let parsed=parseSlotDoc(entry.doc,slot);if(!parsed.ok)return null;let etag=typeof entry.etag=="string"&&ETAG.test(entry.etag)?entry.etag:null;return{doc:parsed.doc,etag:etag}},update=(scope,slot,change)=>{let scopeKey=fnv1a64Hex(scope.doc);return writes=writes.then(async()=>{if(!stale(scope))try{let file=await readFile(scopeKey);if(stale(scope))return;let docs={...file.docs},next=change(has(docs,slot)?docs[slot]:void 0);if(next===null?delete docs[slot]:docs[slot]=next,Object.keys(docs).length===0)await deps.kv.removeItem(SLOT_LKG_KEY);else{let text2=JSON.stringify({scope:scopeKey,docs:docs});await deps.kv.setItem(SLOT_LKG_KEY,text2),await undoIfStale(scope,SLOT_LKG_KEY,text2)}}catch{}}),writes},read=async(scope,slot)=>{let key=`${scope.doc}|${slot}`,mem=memory.get(key),stored2=mem===void 0?await readStored(scope,slot):null,held=mem!==void 0?{doc:mem.doc,etag:mem.etag}:stored2,install=await readInstallId(scope),headers={"x-everfur-blocks":deps.blocks??SLOT_REGISTRY_HASH};install!==null&&(headers["x-everfur-install-id"]=install),held?.doc&&held.etag!==null&&(headers["if-none-match"]=held.etag);let etag=null,ttl=SLOT_CACHE_MS,res=await deps.send("slots.read",{method:"GET",path:`/widget/v1/slots/${encodeURIComponent(slot)}`,headers:headers,rawText:65536,onResponseHeaders:header=>{let value=header("etag");etag=value!==null&&ETAG.test(value)?value:null,ttl=slotCacheMs(header("cache-control"))}}).catch(()=>null),fallBack=()=>held?.doc?{doc:held.doc,source:mem!==void 0?"cache":"last-known-good"}:{doc:null,source:"bundled"},failed=status2=>(failures.set(key,now()),track("slots.read_failed",{slot:slot,status:status2}),fallBack());if(stale(scope))return{doc:null,source:"bundled"};if(res===null)return failed(null);if(res.ok){let body=slotBodyOf(res.value);if(!body.ok)return track("slots.refused",{slot:slot,reason:body.reason}),fallBack();let parsed=parseSlotDoc(body.raw,slot);if(!parsed.ok)return track("slots.refused",{slot:slot,reason:parsed.reason}),fallBack();let at=now();return memory.set(key,{doc:parsed.doc,etag:etag,at:at,ttl:ttl}),await update(scope,slot,()=>({etag:etag,doc:body.raw,at:at})),{doc:parsed.doc,source:"live"}}let status=res.error.httpStatus;if(status===304&&held?.doc){let at=now();return memory.set(key,{doc:held.doc,etag:held.etag,at:at,ttl:ttl}),await update(scope,slot,entry=>entry===void 0?null:{...entry,at:at}),{doc:held.doc,source:"live"}}return status===404?(memory.set(key,{doc:null,etag:null,at:now(),ttl:ttl}),await update(scope,slot,()=>null),{doc:null,source:"bundled"}):failed(status??null)},peekIn=(scope,slot)=>{let mem=memory.get(`${scope.doc}|${slot}`);return mem===void 0||now()-mem.at>=mem.ttl?null:mem.doc===null?{doc:null,source:"bundled"}:{doc:mem.doc,source:"cache"}},storedIn=async(scope,slot)=>{let mem=memory.get(`${scope.doc}|${slot}`);if(mem!==void 0)return mem.doc===null?{doc:null,source:"bundled"}:{doc:mem.doc,source:"cache"};let kept=await readStored(scope,slot);return kept===null?{doc:null,source:"bundled"}:{doc:kept.doc,source:"last-known-good"}};return{peek(slot){let scope=scopeOf();return observe(scope),peekIn(scope,slot)},stored(slot){let scope=scopeOf();return observe(scope),storedIn(scope,slot).catch(()=>({doc:null,source:"bundled"}))},load(slot){let scope=scopeOf();observe(scope);let fromCache=peekIn(scope,slot);if(fromCache!==null)return Promise.resolve(fromCache);let key=`${scope.doc}|${slot}`,flight=`${scope.epoch}|${key}`,pending=inFlight.get(flight);if(pending!==void 0)return pending;let failedAt=failures.get(key),next=(failedAt!==void 0&&now()-failedAt<SLOT_FAILURE_MS?storedIn(scope,slot):read(scope,slot)).catch(()=>({doc:null,source:"bundled"})).finally(()=>inFlight.delete(flight));return inFlight.set(flight,next),next}}}function runtimeSlotScope(runtime){let tenant=runtimeTenantOf(runtime)??"unknown",auth=runtime.registry.services.authFor(null),who=auth.mode==="personalized"?`u:${auth.userRef??""}`:`a:${auth.userRef??""}`;return{doc:`${tenant}|${who}`,tenant:tenant,epoch:runtime.scopeEpoch??0}}var CLIENTS_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#SlotClients@v1");function slotClientFor(runtime,make=runtimeSlotClient){let host2=globalThis,all=host2[CLIENTS_SYMBOL];all instanceof WeakMap||(all=/* @__PURE__ */new WeakMap,host2[CLIENTS_SYMBOL]=all);let map=all,client=map.get(runtime);return client===void 0&&(client=make(runtime),map.set(runtime,client)),client}function runtimeSlotClient(runtime){let{services:services}=runtime.registry;return createSlotClient({send:(call,req)=>createRequestFunnel({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}}).send(call,req),kv:services.kv,telemetry:services.telemetry,scope:()=>runtimeSlotScope(runtime)})}function drawn(slot,load){return{doc:load.doc??bundledSlotDoc(slot),source:load.source}}function useSlotDoc(slot,enabled){let{runtime:runtime,scopeEpoch:scopeEpoch}=useEverfurContext(),client=enabled?slotClientFor(runtime):null,[state2,setState]=react.useState(()=>{let fresh2=client?.peek(slot);return fresh2?{slot:slot,epoch:scopeEpoch,value:drawn(slot,fresh2)}:null});return react.useEffect(()=>{if(client===null)return;let live=true,landed=false,fresh2=client.peek(slot);if(fresh2!==null){setState({slot:slot,epoch:scopeEpoch,value:drawn(slot,fresh2)});return}return client.stored(slot).then(held=>{live&&!landed&&setState({slot:slot,epoch:scopeEpoch,value:drawn(slot,held)})}),client.load(slot).then(load=>{landed=true,live&&setState({slot:slot,epoch:scopeEpoch,value:drawn(slot,load)})}),()=>{live=false}},[client,slot,scopeEpoch]),enabled?state2!==null&&state2.slot===slot&&state2.epoch===scopeEpoch?state2.value:{doc:null,source:"pending"}:{doc:bundledSlotDoc(slot),source:"bundled"}}function registryCatalog(platform){return{knows(type,variant){let spec=Object.prototype.hasOwnProperty.call(SLOT_BLOCKS,type)?SLOT_BLOCKS[type]:void 0;if(spec===void 0||!spec.platforms.includes(platform))return false;if(variant===void 0)return true;let setting=spec.settings.variant;return variant===setting?.default?true:spec.variants.includes(variant)?setting?.platforms===void 0||setting.platforms.includes(platform):false}}}function keep(part2){return{id:part2.id,...part2.repeat?{repeat:part2.repeat}:{},...part2.visibleIf?{visibleIf:part2.visibleIf}:{}}}function replacementFor(part2,catalog){if(catalog.knows(part2.type,part2.variant))return part2;if(part2.fallback==="hide")return null;let own=ownFallbackFor(part2,catalog);if(own!==null)return own;let spec=Object.prototype.hasOwnProperty.call(SLOT_BLOCKS,part2.type)?SLOT_BLOCKS[part2.type]:void 0,named=spec?.fallback??null;if(named===null||named==="hide"||!catalog.knows(named))return null;let target=SLOT_BLOCKS[named];if(spec?.fallbackProps!==void 0&&target!==void 0)return mappedFallback(part2,spec,named,target);let bind={};for(let[prop,value]of Object.entries(part2.bind))target?.props.includes(prop)&&(bind[prop]=value);return{...keep(part2),type:named,settings:{},bind:bind,actions:part2.actions}}function settingTakes(setting,value){return setting.type==="boolean"?typeof value=="boolean":setting.type==="enum"?typeof value=="string"&&(setting.values??[]).includes(value):setting.type==="lines"?Array.isArray(value)&&new Set(value).size===value.length&&value.every(line=>typeof line=="string"&&(setting.values??[]).includes(line)):false}function mappedFallback(part2,spec,named,target){let bind={},settings={},fixed={},variant;for(let[prop,rule]of Object.entries(spec.fallbackProps??{})){if("from"in rule){Object.prototype.hasOwnProperty.call(part2.bind,rule.from)&&(bind[prop]=part2.bind[rule.from]);continue}let value=rule.const;if(prop==="variant"){typeof value=="string"&&target.variants.includes(value)&&(variant=value);continue}let setting=Object.entries(target.settings).find(([key,s])=>key!=="variant"&&s.prop===prop);setting!==void 0&&settingTakes(setting[1],value)?settings[setting[0]]=value:typeof value=="string"&&(fixed[prop]=value)}let set=/* @__PURE__ */new Set([...Object.keys(bind),...Object.keys(fixed),...Object.keys(settings).map(key=>target.settings[key]?.prop)]);return variant!==void 0&&set.add("variant"),target.required.some(prop=>!set.has(prop))?null:{...keep(part2),type:named,...variant!==void 0?{variant:variant}:{},settings:settings,bind:bind,actions:{},...Object.keys(fixed).length>0?{fixed:fixed}:{}}}function ownFallbackFor(part2,catalog){let own=part2.fallback;return own===void 0||own==="hide"||!catalog.knows(own.type,own.variant)?null:{...keep(part2),type:own.type,...own.variant?{variant:own.variant}:{},settings:own.settings,bind:own.bind,actions:own.actions}}function partsToDraw(doc2,catalog){let out=[];for(let part2 of doc2.parts){let next=replacementFor(part2,catalog);next!==null&&out.push(next)}return out.length===0||out.length<doc2.minBlocks?null:out}var SLOT_EXTERNAL_HOSTS=/* @__PURE__ */Object.freeze(["everfur.com","www.everfur.com","docs.everfur.com"]),SLOT_ROUTES=/* @__PURE__ */Object.freeze(["chat","health_plan","plan.detail","records","shop","shop.cart","shop.orders","visit"]),SLOT_SHEETS=/* @__PURE__ */Object.freeze(["health_plan.checkout","health_plan.manage","health_plan.weight"]),EVENT=/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*){0,4}$/,HTTPS_URL=/^https:\/\/([A-Za-z0-9.-]+)(?:[/?#][^\s]*)?$/,URL_MAX=512;function isAllowedExternalUrl(url){if(url.length>URL_MAX)return false;let m=HTTPS_URL.exec(url);return m!==null&&SLOT_EXTERNAL_HOSTS.includes((m[1]??"").toLowerCase())}function parseSlotAction(value){if(typeof value!="string")return null;let at=value.indexOf(":");if(at<=0)return null;let kind=value.slice(0,at),target=value.slice(at+1);switch(kind){case"navigate":return SLOT_ROUTES.includes(target)?{kind:kind,route:target}:null;case"open_sheet":return SLOT_SHEETS.includes(target)?{kind:kind,id:target}:null;case"track":return EVENT.test(target)?{kind:kind,event:target}:null;case"external":return isAllowedExternalUrl(target)?{kind:kind,url:target}:null;default:return null}}var SLOT_DATA_SOURCES=/* @__PURE__ */Object.freeze({"plan.needs":"list","plan.tips":"list","plan.items":"list","cart.lines":"list","cart.summary":"item","orders.recent":"list"});function isSlotDataSource(name){return Object.prototype.hasOwnProperty.call(SLOT_DATA_SOURCES,name)}function parseSlotRef(value){if(value===void 0)return null;let at=value.indexOf(":");if(at<=0)return null;let kind=value.slice(0,at),name=value.slice(at+1);return name===""?null:kind==="data"?isSlotDataSource(name)?{kind:kind,name:name}:null:kind==="item"||kind==="copy"?{kind:kind,name:name}:null}var NOT_BINDABLE=/* @__PURE__ */new Set(["action","actions","busy","disabled","error","fallback","footPress","link","loading","loadingLabel","metaLink","namePress","next","open","quantity","stepper","testID","visible"]),SLOT_TEXT_PROPS=/* @__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"]}),has2=(obj2,key)=>Object.prototype.hasOwnProperty.call(obj2,key);function present(value){return value==null||value===""?false:!Array.isArray(value)||value.length>0}function dataOf(data,name){return has2(data,name)?data[name]:void 0}function partVisible(part2,data,copy){let cond=part2.visibleIf;if(cond===void 0)return true;let ref=parseSlotRef(cond.source);if(ref===null)return false;if(ref.kind==="item")return true;let there=ref.kind==="data"?present(dataOf(data,ref.name)):has2(copy,ref.name);return cond.op==="present"?there:!there}function itemVisible(part2,item){let ref=parseSlotRef(part2.visibleIf?.source);if(ref?.kind!=="item")return true;let there=present(item[ref.name]);return part2.visibleIf?.op==="present"?there:!there}function propsFor(part2,item,data,copy,platform){let spec=SLOT_BLOCKS[part2.type],known=spec?.props??[],text2=SLOT_TEXT_PROPS[part2.type]??[],out={};for(let prop of known)has2(item,prop)&&!NOT_BINDABLE.has(prop)&&item[prop]!==void 0&&(out[prop]=item[prop]);for(let[prop,value]of Object.entries(part2.bind)){if(!known.includes(prop)||NOT_BINDABLE.has(prop))continue;let ref=parseSlotRef(value);if(ref===null)continue;let next,field=prop;if(ref.kind==="copy"){if(!text2.includes(prop))continue;next=has2(copy,ref.name)?copy[ref.name]:void 0,field=""}else if(ref.kind==="item")field=ref.name,next=has2(item,field)?item[field]:void 0;else{let first=dataOf(data,ref.name)?.[0];next=first!==void 0&&has2(first,prop)?first[prop]:void 0}ref.kind!=="copy"&&field!==prop&&!(text2.includes(prop)&&typeof next=="string")||(next===void 0?delete out[prop]:out[prop]=next)}for(let[prop,value]of Object.entries(part2.fixed??{}))known.includes(prop)&&!NOT_BINDABLE.has(prop)&&(out[prop]=value);part2.variant!==void 0&&known.includes("variant")&&(out.variant=part2.variant);for(let[name,value]of Object.entries(part2.settings)){let setting=spec?.settings[name];if(!(setting===void 0||setting.platforms!==void 0&&!setting.platforms.includes(platform)))if(setting.type==="lines"){if(!Array.isArray(value))continue;for(let line of setting.values??[])value.includes(line)||delete out[line]}else setting.prop!==void 0&&known.includes(setting.prop)&&(setting.type==="boolean"&&typeof value=="boolean"||setting.type==="enum"&&typeof value=="string"&&(setting.values??[]).includes(value))&&(out[setting.prop]=value)}return out}function keyOf3(item,index){let key=item.key;return typeof key=="string"&&key!==""?`${key}#${index}`:String(index)}function hasRequiredProps(type,props){let spec=SLOT_BLOCKS[type];return spec!==void 0&&spec.required.every(prop=>props[prop]!==void 0&&props[prop]!==null)}function resolveSlotPart(part2,data,copy,platform="native"){if(SLOT_BLOCKS[part2.type]===void 0||!partVisible(part2,data,copy))return null;let repeat=parseSlotRef(part2.repeat),items;if(part2.repeat!==void 0){if(repeat?.kind!=="data")return null;items=dataOf(data,repeat.name)??[]}else{let subject=Object.values(part2.bind).map(v=>parseSlotRef(v)).find(ref=>ref?.kind==="data");if(subject){let first=dataOf(data,subject.name)?.[0];items=first===void 0?[]:[first]}else items=[{}]}let blocks=[],incomplete=0;if(items.forEach((item,i)=>{if(!itemVisible(part2,item))return;let props=propsFor(part2,item,data,copy,platform);hasRequiredProps(part2.type,props)?blocks.push({key:keyOf3(item,i),props:/* @__PURE__ */Object.freeze(props)}):incomplete+=1}),blocks.length===0&&incomplete===0)return null;let actions={};for(let[name,value]of Object.entries(part2.actions)){let action=parseSlotAction(value);action!==null&&(actions[name]=action)}return{part:part2,blocks:blocks,incomplete:incomplete,actions:actions}}function catalogOf(blocks){let registry=registryCatalog("native");return{knows:(type,variant)=>Object.prototype.hasOwnProperty.call(blocks,type)&&registry.knows(type,variant)}}function slotPartsOf(doc2,slot,blocks){let catalog=catalogOf(blocks);if(doc2!==null){let parts=partsToDraw(doc2,catalog);if(parts!==null)return parts}let bundled=bundledSlotDoc(slot);return bundled===null?[]:partsToDraw(bundled,catalog)??[]}var COLOR_ROLES=new Set(Object.keys(everfurTheme.colors)),RADII2=new Set(Object.keys(everfurTheme.radius)),SPACES=new Set(Object.keys(everfurTheme.space));function slotThemeInput(tokens){let colors={},radius={},space={};for(let[name,value]of Object.entries(tokens)){let[group,key,extra]=name.split(".");key===void 0||extra!==void 0||((group==="color"||group==="colors")&&typeof value=="string"&&COLOR_ROLES.has(key)?colors[key]=value:group==="radius"&&typeof value=="number"&&value>=0&&RADII2.has(key)?radius[key]=value:group==="space"&&typeof value=="number"&&value>=0&&SPACES.has(key)&&(space[key]=value))}let out={};return Object.keys(colors).length>0&&(out.colors=colors),Object.keys(radius).length>0&&(out.radius=radius),Object.keys(space).length>0&&(out.space=space),Object.keys(out).length===0?null:out}function run2(action,context,handlers,track){switch(action.kind){case"navigate":callHost(handlers.onNavigate,action.route,context);return;case"open_sheet":callHost(handlers.onOpenSheet,action.id,context);return;case"track":track("slots.track",{slot:context.slot,part:context.part,event:action.event});return;case"external":handlers.onOpenUrl?callHost(handlers.onOpenUrl,action.url):reactNative.Linking.openURL(action.url).catch(()=>{})}}function canRun(action,handlers){return action.kind==="navigate"?handlers.onNavigate!==void 0:action.kind==="open_sheet"?handlers.onOpenSheet!==void 0:true}function DrawnPart({blocks:blocks,resolved:resolved,slot:slot,handlers:handlers,track:track}){let Block=Object.prototype.hasOwnProperty.call(blocks,resolved.part.type)?blocks[resolved.part.type]:void 0;if(Block===void 0)return null;let press=resolved.actions.onPress;/* @__PURE__ */
375
+ return Object.freeze({schema:SLOT_SCHEMA,slot:slot,docVersion:null,minBlocks:1,tokens:{},parts:/* @__PURE__ */Object.freeze([...parts]),copy:{}})}var P=SLOT_NAMED_PARTS,BUNDLED_SLOT_DOCS=/* @__PURE__ */Object.freeze({"health_plan.focus":doc("health_plan.focus",[P.focus,P.tips]),"today.health":doc("today.health",[P.focus,P.tips]),"shop.shelf":doc("shop.shelf",[P.shelf]),"shop.cart":doc("shop.cart",[P.cartLines,P.cartSummary]),"shop.orders":doc("shop.orders",[P.orders])});function bundledSlotDoc(slot){return Object.prototype.hasOwnProperty.call(BUNDLED_SLOT_DOCS,slot)?BUNDLED_SLOT_DOCS[slot]??null:null}function utf8Bytes(text2){let out=[];for(let ch of text2){let cp=ch.codePointAt(0);cp<128?out.push(cp):cp<2048?out.push(192|cp>>6,128|cp&63):cp<65536?out.push(224|cp>>12,128|cp>>6&63,128|cp&63):out.push(240|cp>>18,128|cp>>12&63,128|cp>>6&63,128|cp&63)}return out}function fnv1a64Hex(text2){let hi=3421674724,lo=2216829733;for(let byte2 of utf8Bytes(text2)){lo=(lo^byte2)>>>0;let loProduct=lo*435,carry=Math.floor(loProduct/4294967296),nextLo=loProduct>>>0;hi=hi*435+carry+lo*256>>>0,lo=nextLo}return hi.toString(16).padStart(8,"0")+lo.toString(16).padStart(8,"0")}var tenants=/* @__PURE__ */new WeakMap;function runtimeTenantOf(runtime){return tenants.get(runtime)}var SLOT_REGISTRY_HASH="sha256-0IDdNTQTtW2+pJ9GBCa/aWJrH/lf2X2jHhTQaCt6g5E=";var SLOT_BLOCKS={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 SLOT_LKG_KEY="everfur.slots.v2",SLOT_INSTALL_ID_KEY="everfur.slots.installId.v2";var SLOT_CACHE_MS=6e4,SLOT_CACHE_MAX_MS=3e5,SLOT_FAILURE_MS=15e3,SLOT_LKG_MAX_AGE_MS=10080*60*1e3,ETAG=/^(W\/)?"[^"]{1,200}"$/,INSTALL_ID=/^[A-Za-z0-9_-]{8,128}$/,MAX_AGE=/(?:^|,)\s*max-age\s*=\s*"?(\d{1,10})"?\s*(?:,|$)/i,NO_STORE2=/(?:^|,)\s*(?:no-store|no-cache)\s*(?:,|$)/i,FIXED_SCOPE=/* @__PURE__ */Object.freeze({doc:"default",tenant:"default",epoch:0});function randomId(){let out="";for(let i=0;i<4;i++)out+=Math.floor(Math.random()*4294967296).toString(36).padStart(7,"0");return out}function slotCacheMs(cacheControl){if(cacheControl===null)return SLOT_CACHE_MS;if(NO_STORE2.test(cacheControl))return 0;let m=MAX_AGE.exec(cacheControl);return m===null?SLOT_CACHE_MS:Math.min(Number(m[1])*1e3,SLOT_CACHE_MAX_MS)}var has=(obj2,key)=>Object.prototype.hasOwnProperty.call(obj2,key);function createSlotClient(deps){let now=deps.now??Date.now,scopeOf=()=>{try{return deps.scope?.()??FIXED_SCOPE}catch{return FIXED_SCOPE}},memory=/* @__PURE__ */new Map,failures=/* @__PURE__ */new Map,inFlight=/* @__PURE__ */new Map,installId=null,epoch=null,rescoped=false,writes=Promise.resolve(),track=(event,props)=>{try{deps.telemetry?.track(event,props)}catch{}},observe=scope=>{epoch!==scope.epoch&&(epoch!==null&&(memory.clear(),failures.clear(),installId=null,rescoped=true),epoch=scope.epoch)},stale=scope=>{let current=scopeOf();return current.epoch!==scope.epoch||current.doc!==scope.doc},undoIfStale=async(scope,key,written)=>{if(!stale(scope))return false;try{await deps.kv.getItem(key)===written&&await deps.kv.removeItem(key)}catch{}return true},readInstallId=scope=>{let tenant=fnv1a64Hex(scope.tenant);if(installId?.tenant===tenant)return installId.id;let fresh2=rescoped;rescoped=false;let id=(async()=>{if(!fresh2)try{let raw=await deps.kv.getItem(SLOT_INSTALL_ID_KEY),kept=raw===null?null:JSON.parse(raw);if(kept?.tenant===tenant&&typeof kept.id=="string"&&INSTALL_ID.test(kept.id))return kept.id}catch{}try{let made=(deps.newId??randomId)();if(!INSTALL_ID.test(made))return null;let text2=JSON.stringify({tenant:tenant,id:made});return await deps.kv.setItem(SLOT_INSTALL_ID_KEY,text2),await undoIfStale(scope,SLOT_INSTALL_ID_KEY,text2)?null:made}catch{return null}})();return installId={tenant:tenant,id:id},id},readFile=async scopeKey=>{try{let raw=await deps.kv.getItem(SLOT_LKG_KEY),file=raw===null?null:JSON.parse(raw);return file?.scope!==scopeKey||file.docs===null||typeof file.docs!="object"||Array.isArray(file.docs)?{docs:{}}:{docs:file.docs}}catch{return{docs:{}}}},readStored=async(scope,slot)=>{let file=await readFile(fnv1a64Hex(scope.doc)),entry=has(file.docs,slot)?file.docs[slot]:void 0;if(entry==null||typeof entry.at!="number")return null;let age=now()-entry.at;if(!(age<SLOT_LKG_MAX_AGE_MS)||age<-SLOT_CACHE_MAX_MS)return null;let parsed=parseSlotDoc(entry.doc,slot);if(!parsed.ok)return null;let etag=typeof entry.etag=="string"&&ETAG.test(entry.etag)?entry.etag:null;return{doc:parsed.doc,etag:etag}},update=(scope,slot,change)=>{let scopeKey=fnv1a64Hex(scope.doc);return writes=writes.then(async()=>{if(!stale(scope))try{let file=await readFile(scopeKey);if(stale(scope))return;let docs={...file.docs},next=change(has(docs,slot)?docs[slot]:void 0);if(next===null?delete docs[slot]:docs[slot]=next,Object.keys(docs).length===0)await deps.kv.removeItem(SLOT_LKG_KEY);else{let text2=JSON.stringify({scope:scopeKey,docs:docs});await deps.kv.setItem(SLOT_LKG_KEY,text2),await undoIfStale(scope,SLOT_LKG_KEY,text2)}}catch{}}),writes},read=async(scope,slot)=>{let key=`${scope.doc}|${slot}`,mem=memory.get(key),stored2=mem===void 0?await readStored(scope,slot):null,held=mem!==void 0?{doc:mem.doc,etag:mem.etag}:stored2,install=await readInstallId(scope),headers={"x-everfur-blocks":deps.blocks??SLOT_REGISTRY_HASH};install!==null&&(headers["x-everfur-install-id"]=install),held?.doc&&held.etag!==null&&(headers["if-none-match"]=held.etag);let etag=null,ttl=SLOT_CACHE_MS,res=await deps.send("slots.read",{method:"GET",path:`/widget/v1/slots/${encodeURIComponent(slot)}`,headers:headers,rawText:65536,onResponseHeaders:header=>{let value=header("etag");etag=value!==null&&ETAG.test(value)?value:null,ttl=slotCacheMs(header("cache-control"))}}).catch(()=>null),fallBack=()=>held?.doc?{doc:held.doc,source:mem!==void 0?"cache":"last-known-good"}:{doc:null,source:"bundled"},failed=status2=>(failures.set(key,now()),track("slots.read_failed",{slot:slot,status:status2}),fallBack());if(stale(scope))return{doc:null,source:"bundled"};if(res===null)return failed(null);if(res.ok){let body=slotBodyOf(res.value);if(!body.ok)return track("slots.refused",{slot:slot,reason:body.reason}),fallBack();let parsed=parseSlotDoc(body.raw,slot);if(!parsed.ok)return track("slots.refused",{slot:slot,reason:parsed.reason}),fallBack();let at=now();return memory.set(key,{doc:parsed.doc,etag:etag,at:at,ttl:ttl}),await update(scope,slot,()=>({etag:etag,doc:body.raw,at:at})),{doc:parsed.doc,source:"live"}}let status=res.error.httpStatus;if(status===304&&held?.doc){let at=now();return memory.set(key,{doc:held.doc,etag:held.etag,at:at,ttl:ttl}),await update(scope,slot,entry=>entry===void 0?null:{...entry,at:at}),{doc:held.doc,source:"live"}}return status===404?(memory.set(key,{doc:null,etag:null,at:now(),ttl:ttl}),await update(scope,slot,()=>null),{doc:null,source:"bundled"}):failed(status??null)},peekIn=(scope,slot)=>{let mem=memory.get(`${scope.doc}|${slot}`);return mem===void 0||now()-mem.at>=mem.ttl?null:mem.doc===null?{doc:null,source:"bundled"}:{doc:mem.doc,source:"cache"}},storedIn=async(scope,slot)=>{let mem=memory.get(`${scope.doc}|${slot}`);if(mem!==void 0)return mem.doc===null?{doc:null,source:"bundled"}:{doc:mem.doc,source:"cache"};let kept=await readStored(scope,slot);return kept===null?{doc:null,source:"bundled"}:{doc:kept.doc,source:"last-known-good"}};return{peek(slot){let scope=scopeOf();return observe(scope),peekIn(scope,slot)},stored(slot){let scope=scopeOf();return observe(scope),storedIn(scope,slot).catch(()=>({doc:null,source:"bundled"}))},load(slot){let scope=scopeOf();observe(scope);let fromCache=peekIn(scope,slot);if(fromCache!==null)return Promise.resolve(fromCache);let key=`${scope.doc}|${slot}`,flight=`${scope.epoch}|${key}`,pending=inFlight.get(flight);if(pending!==void 0)return pending;let failedAt=failures.get(key),next=(failedAt!==void 0&&now()-failedAt<SLOT_FAILURE_MS?storedIn(scope,slot):read(scope,slot)).catch(()=>({doc:null,source:"bundled"})).finally(()=>inFlight.delete(flight));return inFlight.set(flight,next),next}}}function runtimeSlotScope(runtime){let tenant=runtimeTenantOf(runtime)??"unknown",auth=runtime.registry.services.authFor(null),who=auth.mode==="personalized"?`u:${auth.userRef??""}`:`a:${auth.userRef??""}`;return{doc:`${tenant}|${who}`,tenant:tenant,epoch:runtime.scopeEpoch??0}}var CLIENTS_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#SlotClients@v1");function slotClientFor(runtime,make=runtimeSlotClient){let host2=globalThis,all=host2[CLIENTS_SYMBOL];all instanceof WeakMap||(all=/* @__PURE__ */new WeakMap,host2[CLIENTS_SYMBOL]=all);let map=all,client=map.get(runtime);return client===void 0&&(client=make(runtime),map.set(runtime,client)),client}function runtimeSlotClient(runtime){let{services:services}=runtime.registry;return createSlotClient({send:(call,req)=>createRequestFunnel({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}}).send(call,req),kv:services.kv,telemetry:services.telemetry,scope:()=>runtimeSlotScope(runtime)})}function drawn(slot,load){return{doc:load.doc??bundledSlotDoc(slot),source:load.source}}function useSlotDoc(slot,enabled){let{runtime:runtime,scopeEpoch:scopeEpoch}=useEverfurContext(),client=enabled?slotClientFor(runtime):null,[state2,setState]=react.useState(()=>{let fresh2=client?.peek(slot);return fresh2?{slot:slot,epoch:scopeEpoch,value:drawn(slot,fresh2)}:null});return react.useEffect(()=>{if(client===null)return;let live=true,landed=false,fresh2=client.peek(slot);if(fresh2!==null){setState({slot:slot,epoch:scopeEpoch,value:drawn(slot,fresh2)});return}return client.stored(slot).then(held=>{live&&!landed&&setState({slot:slot,epoch:scopeEpoch,value:drawn(slot,held)})}),client.load(slot).then(load=>{landed=true,live&&setState({slot:slot,epoch:scopeEpoch,value:drawn(slot,load)})}),()=>{live=false}},[client,slot,scopeEpoch]),enabled?state2!==null&&state2.slot===slot&&state2.epoch===scopeEpoch?state2.value:{doc:null,source:"pending"}:{doc:bundledSlotDoc(slot),source:"bundled"}}function registryCatalog(platform){return{knows(type,variant){let spec=Object.prototype.hasOwnProperty.call(SLOT_BLOCKS,type)?SLOT_BLOCKS[type]:void 0;if(spec===void 0||!spec.platforms.includes(platform))return false;if(variant===void 0)return true;let setting=spec.settings.variant;return variant===setting?.default?true:spec.variants.includes(variant)?setting?.platforms===void 0||setting.platforms.includes(platform):false}}}function keep(part2){return{id:part2.id,...part2.repeat?{repeat:part2.repeat}:{},...part2.visibleIf?{visibleIf:part2.visibleIf}:{}}}function replacementFor(part2,catalog){if(catalog.knows(part2.type,part2.variant))return part2;if(part2.fallback==="hide")return null;let own=ownFallbackFor(part2,catalog);if(own!==null)return own;let spec=Object.prototype.hasOwnProperty.call(SLOT_BLOCKS,part2.type)?SLOT_BLOCKS[part2.type]:void 0,named=spec?.fallback??null;if(named===null||named==="hide"||!catalog.knows(named))return null;let target=SLOT_BLOCKS[named];if(spec?.fallbackProps!==void 0&&target!==void 0)return mappedFallback(part2,spec,named,target);let bind={};for(let[prop,value]of Object.entries(part2.bind))target?.props.includes(prop)&&(bind[prop]=value);return{...keep(part2),type:named,settings:{},bind:bind,actions:{}}}function settingTakes(setting,value){return setting.type==="boolean"?typeof value=="boolean":setting.type==="enum"?typeof value=="string"&&(setting.values??[]).includes(value):setting.type==="lines"?Array.isArray(value)&&new Set(value).size===value.length&&value.every(line=>typeof line=="string"&&(setting.values??[]).includes(line)):false}function mappedFallback(part2,spec,named,target){let bind={},settings={},fixed={},variant;for(let[prop,rule]of Object.entries(spec.fallbackProps??{})){if("from"in rule){Object.prototype.hasOwnProperty.call(part2.bind,rule.from)&&(bind[prop]=part2.bind[rule.from]);continue}let value=rule.const;if(prop==="variant"){typeof value=="string"&&target.variants.includes(value)&&(variant=value);continue}let setting=Object.entries(target.settings).find(([key,s])=>key!=="variant"&&s.prop===prop);setting!==void 0&&settingTakes(setting[1],value)?settings[setting[0]]=value:typeof value=="string"&&(fixed[prop]=value)}let set=/* @__PURE__ */new Set([...Object.keys(bind),...Object.keys(fixed),...Object.keys(settings).map(key=>target.settings[key]?.prop)]);return variant!==void 0&&set.add("variant"),target.required.some(prop=>!set.has(prop))?null:{...keep(part2),type:named,...variant!==void 0?{variant:variant}:{},settings:settings,bind:bind,actions:{},...Object.keys(fixed).length>0?{fixed:fixed}:{}}}function ownFallbackFor(part2,catalog){let own=part2.fallback;return own===void 0||own==="hide"||!catalog.knows(own.type,own.variant)?null:{...keep(part2),type:own.type,...own.variant?{variant:own.variant}:{},settings:own.settings,bind:own.bind,actions:own.actions}}function partsToDraw(doc2,catalog){let out=[];for(let part2 of doc2.parts){let next=replacementFor(part2,catalog);next!==null&&out.push(next)}return out.length===0||out.length<doc2.minBlocks?null:out}var SLOT_EXTERNAL_HOSTS=/* @__PURE__ */Object.freeze(["everfur.com","www.everfur.com","docs.everfur.com"]),SLOT_ROUTES=/* @__PURE__ */Object.freeze(["chat","health_plan","plan.detail","records","shop","shop.cart","shop.orders","visit"]),SLOT_SHEETS=/* @__PURE__ */Object.freeze(["health_plan.checkout","health_plan.manage","health_plan.weight"]),EVENT=/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*){0,4}$/,HTTPS_URL=/^https:\/\/([A-Za-z0-9.-]+)(?:[/?#][^\s]*)?$/,URL_MAX=512;function isAllowedExternalUrl(url){if(url.length>URL_MAX)return false;let m=HTTPS_URL.exec(url);return m!==null&&SLOT_EXTERNAL_HOSTS.includes((m[1]??"").toLowerCase())}function parseSlotAction(value){if(typeof value!="string")return null;let at=value.indexOf(":");if(at<=0)return null;let kind=value.slice(0,at),target=value.slice(at+1);switch(kind){case"navigate":return SLOT_ROUTES.includes(target)?{kind:kind,route:target}:null;case"open_sheet":return SLOT_SHEETS.includes(target)?{kind:kind,id:target}:null;case"track":return EVENT.test(target)?{kind:kind,event:target}:null;case"external":return isAllowedExternalUrl(target)?{kind:kind,url:target}:null;default:return null}}var SLOT_DATA_SOURCES=/* @__PURE__ */Object.freeze({"plan.needs":"list","plan.tips":"list","plan.items":"list","cart.lines":"list","cart.summary":"item","orders.recent":"list"});function isSlotDataSource(name){return Object.prototype.hasOwnProperty.call(SLOT_DATA_SOURCES,name)}function parseSlotRef(value){if(value===void 0)return null;let at=value.indexOf(":");if(at<=0)return null;let kind=value.slice(0,at),name=value.slice(at+1);return name===""?null:kind==="data"?isSlotDataSource(name)?{kind:kind,name:name}:null:kind==="item"||kind==="copy"?{kind:kind,name:name}:null}var NOT_BINDABLE=/* @__PURE__ */new Set(["action","actions","busy","disabled","error","fallback","footPress","link","loading","loadingLabel","metaLink","namePress","next","open","quantity","stepper","testID","visible"]),SLOT_TEXT_PROPS=/* @__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"]}),has2=(obj2,key)=>Object.prototype.hasOwnProperty.call(obj2,key);function present(value){return value==null||value===""?false:!Array.isArray(value)||value.length>0}function dataOf(data,name){return has2(data,name)?data[name]:void 0}function partVisible(part2,data,copy){let cond=part2.visibleIf;if(cond===void 0)return true;let ref=parseSlotRef(cond.source);if(ref===null)return false;if(ref.kind==="item")return true;let there=ref.kind==="data"?present(dataOf(data,ref.name)):has2(copy,ref.name);return cond.op==="present"?there:!there}function itemVisible(part2,item){let ref=parseSlotRef(part2.visibleIf?.source);if(ref?.kind!=="item")return true;let there=present(item[ref.name]);return part2.visibleIf?.op==="present"?there:!there}function propsFor(part2,item,data,copy,platform){let spec=SLOT_BLOCKS[part2.type],known=spec?.props??[],text2=SLOT_TEXT_PROPS[part2.type]??[],out={};for(let prop of known)has2(item,prop)&&!NOT_BINDABLE.has(prop)&&item[prop]!==void 0&&(out[prop]=item[prop]);for(let[prop,value]of Object.entries(part2.bind)){if(!known.includes(prop)||NOT_BINDABLE.has(prop))continue;let ref=parseSlotRef(value);if(ref===null)continue;let next,field=prop;if(ref.kind==="copy"){if(!text2.includes(prop))continue;next=has2(copy,ref.name)?copy[ref.name]:void 0,field=""}else if(ref.kind==="item")field=ref.name,next=has2(item,field)?item[field]:void 0;else{let first=dataOf(data,ref.name)?.[0];next=first!==void 0&&has2(first,prop)?first[prop]:void 0}ref.kind!=="copy"&&field!==prop&&!(text2.includes(prop)&&typeof next=="string")||(next===void 0?delete out[prop]:out[prop]=next)}for(let[prop,value]of Object.entries(part2.fixed??{}))known.includes(prop)&&!NOT_BINDABLE.has(prop)&&(out[prop]=value);part2.variant!==void 0&&known.includes("variant")&&(out.variant=part2.variant);for(let[name,value]of Object.entries(part2.settings)){let setting=spec?.settings[name];if(!(setting===void 0||setting.platforms!==void 0&&!setting.platforms.includes(platform)))if(setting.type==="lines"){if(!Array.isArray(value))continue;for(let line of setting.values??[])value.includes(line)||delete out[line]}else setting.prop!==void 0&&known.includes(setting.prop)&&(setting.type==="boolean"&&typeof value=="boolean"||setting.type==="enum"&&typeof value=="string"&&(setting.values??[]).includes(value))&&(out[setting.prop]=value)}return out}function keyOf3(item,index){let key=item.key;return typeof key=="string"&&key!==""?`${key}#${index}`:String(index)}function hasRequiredProps(type,props){let spec=SLOT_BLOCKS[type];return spec!==void 0&&spec.required.every(prop=>props[prop]!==void 0&&props[prop]!==null)}function resolveSlotPart(part2,data,copy,platform="native"){if(SLOT_BLOCKS[part2.type]===void 0||!partVisible(part2,data,copy))return null;let repeat=parseSlotRef(part2.repeat),items;if(part2.repeat!==void 0){if(repeat?.kind!=="data")return null;items=dataOf(data,repeat.name)??[]}else{let subject=Object.values(part2.bind).map(v=>parseSlotRef(v)).find(ref=>ref?.kind==="data");if(subject){let first=dataOf(data,subject.name)?.[0];items=first===void 0?[]:[first]}else items=[{}]}let blocks=[],incomplete=0;if(items.forEach((item,i)=>{if(!itemVisible(part2,item))return;let props=propsFor(part2,item,data,copy,platform);hasRequiredProps(part2.type,props)?blocks.push({key:keyOf3(item,i),props:/* @__PURE__ */Object.freeze(props)}):incomplete+=1}),blocks.length===0&&incomplete===0)return null;let actions={};for(let[name,value]of Object.entries(part2.actions)){let action=parseSlotAction(value);action!==null&&(actions[name]=action)}return{part:part2,blocks:blocks,incomplete:incomplete,actions:actions}}function catalogOf(blocks){let registry=registryCatalog("native");return{knows:(type,variant)=>Object.prototype.hasOwnProperty.call(blocks,type)&&registry.knows(type,variant)}}function slotPartsOf(doc2,slot,blocks){let catalog=catalogOf(blocks);if(doc2!==null){let parts=partsToDraw(doc2,catalog);if(parts!==null)return parts}let bundled=bundledSlotDoc(slot);return bundled===null?[]:partsToDraw(bundled,catalog)??[]}var COLOR_ROLES=new Set(Object.keys(everfurTheme.colors)),RADII2=new Set(Object.keys(everfurTheme.radius)),SPACES=new Set(Object.keys(everfurTheme.space));function slotThemeInput(tokens){let colors={},radius={},space={};for(let[name,value]of Object.entries(tokens)){let[group,key,extra]=name.split(".");key===void 0||extra!==void 0||((group==="color"||group==="colors")&&typeof value=="string"&&COLOR_ROLES.has(key)?colors[key]=value:group==="radius"&&typeof value=="number"&&value>=0&&RADII2.has(key)?radius[key]=value:group==="space"&&typeof value=="number"&&value>=0&&SPACES.has(key)&&(space[key]=value))}let out={};return Object.keys(colors).length>0&&(out.colors=colors),Object.keys(radius).length>0&&(out.radius=radius),Object.keys(space).length>0&&(out.space=space),Object.keys(out).length===0?null:out}function run2(action,context,handlers,track){switch(action.kind){case"navigate":callHost(handlers.onNavigate,action.route,context);return;case"open_sheet":callHost(handlers.onOpenSheet,action.id,context);return;case"track":track("slots.track",{slot:context.slot,part:context.part,event:action.event});return;case"external":handlers.onOpenUrl?callHost(handlers.onOpenUrl,action.url):reactNative.Linking.openURL(action.url).catch(()=>{})}}function canRun(action,handlers){return action.kind==="navigate"?handlers.onNavigate!==void 0:action.kind==="open_sheet"?handlers.onOpenSheet!==void 0:true}function DrawnPart({blocks:blocks,resolved:resolved,slot:slot,handlers:handlers,track:track}){let Block=Object.prototype.hasOwnProperty.call(blocks,resolved.part.type)?blocks[resolved.part.type]:void 0;if(Block===void 0)return null;let press=resolved.actions.onPress;/* @__PURE__ */
376
376
  return jsxRuntime.jsx(jsxRuntime.Fragment,{children:resolved.blocks.map(block=>{let testID=`everfur-slot-${resolved.part.id}`,node=react.createElement(Block,{...block.props,testID:testID});if(press===void 0||!canRun(press,handlers))/* @__PURE__ */return jsxRuntime.jsx(react.Fragment,{children:node},block.key);let context={slot:slot,part:resolved.part.id,key:block.key};/* @__PURE__ */
377
377
  return jsxRuntime.jsx(reactNative.Pressable,{accessibilityRole:press.kind==="external"?"link":"button",onPress:()=>run2(press,context,handlers,track),testID:`${testID}-press`,children:node},block.key)})})}var CRASHED=/* @__PURE__ */new WeakMap,slotDocKey=doc2=>fnv1a64Hex(JSON.stringify(doc2)),SlotPartBoundary=class extends react.Component{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(props){let{slot:slot,data:data,blocks:blocks,override:override}=props,handlers=props.handlers??NO_HANDLERS,{runtime:runtime}=useEverfurContext(),[,setCrashes]=react.useState(0),docKey=react.useMemo(()=>props.doc===null?null:slotDocKey(props.doc),[props.doc]),doc2=docKey!==null&&CRASHED.get(runtime)?.has(docKey)===true?null:props.doc,parts=react.useMemo(()=>slotPartsOf(doc2,slot,blocks),[doc2,slot,blocks]),catalog=react.useMemo(()=>catalogOf(blocks),[blocks]),reported=react.useRef({doc:doc2,parts:/* @__PURE__ */new Set});reported.current.doc!==doc2&&(reported.current={doc:doc2,parts:/* @__PURE__ */new Set});let copy=doc2?.copy??NO_COPY,tokens=react.useMemo(()=>slotThemeInput(doc2?.tokens??NO_TOKENS),[doc2]),track=(event,payload)=>{try{runtime.registry.services.telemetry.track(event,payload)}catch{}},failed=part2=>()=>{if(track("slots.part_failed",{slot:slot,part:part2.id,bundled:doc2===null}),doc2===null||docKey===null)return;let crashed=CRASHED.get(runtime);crashed===void 0&&CRASHED.set(runtime,crashed=/* @__PURE__ */new Set),crashed.add(docKey),setCrashes(n=>n+1)},generation=doc2===null?"b":"d",drawn2=parts.map(part2=>{let key=`${generation}:${part2.id}`,own=override?.(part2)??null;if(own!==null)/* @__PURE__ */
378
378
  return jsxRuntime.jsx(SlotPartBoundary,{onError:failed(part2),children:own},key);let resolved=resolveSlotPart(part2,data,copy,"native");if(resolved!==null&&resolved.blocks.length===0){reported.current.parts.has(part2.id)||(reported.current.parts.add(part2.id),track("slots.part_incomplete",{slot:slot,part:part2.id,type:part2.type}));let stand=ownFallbackFor(part2,catalog),next=stand===null?null:resolveSlotPart(stand,data,copy,"native");resolved=next!==null&&next.blocks.length>0?next:null}if(resolved===null)return null;let body=/* @__PURE__ */jsxRuntime.jsx(DrawnPart,{blocks:blocks,resolved:resolved,slot:slot,handlers:handlers,track:track});/* @__PURE__ */