@everfur/sdk 0.22.0 → 1.0.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.
@@ -1,5 +1,5 @@
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 client";
3
- import{v3Palette,cssMonoFamily,headingFaceCss,faceCss}from"./chunk-AT7SU763.js";function ok(value,warning){/* @__PURE__ */
3
+ import{v3Palette,cssMonoFamily,headingFaceCss,faceCss}from"./chunk-EMINPX6C.js";function ok(value,warning){/* @__PURE__ */
4
4
  return Object.freeze(warning===void 0?{ok:true,value:value}:{ok:true,value:value,warning:warning})}function err(error){/* @__PURE__ */
5
5
  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 ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function parseUrl(raw,base){let Url=globalThis.URL;if(typeof Url=="function"){let url;try{url=base===void 0?new Url(raw):new Url(raw,base)}catch{return null}try{if(url.protocol)return url}catch{}}return parseByPattern(raw,base)}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,base){let input=raw.trim();if(base!==void 0&&!ABSOLUTE_URL.test(input)){let parsedBase=parseByPattern(base);if(parsedBase===null||!input.startsWith("/")||input.startsWith("//"))return null;input=parsedBase.origin+input}let match=REWRITTEN_BY_STANDARD_PARSER.test(input)?null:WHOLE_URL.exec(input);if(match===null)return null;let[,scheme="",username="",password="",host="",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=host.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:host.toLowerCase(),port:port,origin:special?`${protocol}//${hostPort}`:"null",pathname:pathname,search:query==="?"?"":query,hash:fragment==="#"?"":fragment}}var DESIGN_PLAN_LIGHT=/* @__PURE__ */Object.freeze({black:"#000000",onInk:"#FFFFFF",wash:"rgba(38, 37, 35, 0.06)",scrim:"rgba(38, 37, 35, 0.38)",riskChip:"#FFD8D6",clearChip:"#DDEFC4"});function rgb(color){let c=color.trim(),h=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(c);if(h!==null){let x=h[1].length===3?h[1].split("").map(d=>d+d).join(""):h[1];return[0,2,4].map(k=>parseInt(x.slice(k,k+2),16))}let r=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(c);return r===null?null:[Number(r[1]),Number(r[2]),Number(r[3])]}function mixPlanColor(color,share,ground){let a=rgb(color),b=rgb(ground);if(a===null||b===null)return ground;let to=k=>Math.round(a[k]*share+b[k]*(1-share)).toString(16).padStart(2,"0");return`#${to(0)}${to(1)}${to(2)}`.toUpperCase()}function planTokens(theme){let c=theme.color,v=v3Palette(theme),neutral={ink:v.ink,ink2:v.ink2,ink3:v.ink3,paper:v.paper,tile:v.tile,line:v.line,card:v.card,riskBg:v.riskBg,riskInk:v.riskInk,riskDot:v.riskDot,clearBg:v.clearBg,clearInk:v.clearInk,clearDot:v.clearDot,watchDot:v.watchDot,...v.dark?{black:c.text.primary,onInk:c.background,wash:mixPlanColor(c.text.primary,.08,c.surface),scrim:"rgba(0, 0, 0, 0.6)",riskChip:c.badgeBgCritical,clearChip:c.badgeBgPositive}:DESIGN_PLAN_LIGHT},link=v.link,card=neutral.card;return{...neutral,primary:v.primary,onPrimary:v.onPrimary,accent:v.accent,accent4:mixPlanColor(c.accent,.17,card),accent3:mixPlanColor(c.accent,.25,card),accentChip:mixPlanColor(c.accent,.47,card),link:link,linkWash:(v.dark?void 0:theme.slots.planWash?.backgroundColor)??mixPlanColor(link,.12,card),linkChip:(v.dark?void 0:theme.slots.planChip?.backgroundColor)??mixPlanColor(link,.2,card),sans:faceCss(theme,"regular").fontFamily,serif:headingFaceCss(theme,"bold").fontFamily,mono:cssMonoFamily(theme.type.mono)}}var PLAN_CLASS_PREFIX="efp-",PLAN_CONTEXT=[["font-family","$sans"],["color","$ink"],["font-size","17px"],["line-height","1.5"]],PLAN_RULES=[["h1",[0,0,1],[["color","$n_10462E"],["line-height","1.15"],["font-weight","700"]]],["h2",[0,0,1],[["color","$n_10462E"],["line-height","1.15"],["font-weight","700"]]],["h3",[0,0,1],[["color","$n_10462E"],["line-height","1.15"],["font-weight","700"]]],["h4",[0,0,1],[["color","$n_10462E"],["line-height","1.15"],["font-weight","700"]]],[".efp-ph-sheet > h3.efp-serif",[0,2,1],[["font-size","24px"]]],["*",[0,0,0],[["box-sizing","border-box"]]],["* > .efp-before",[0,1,0],[["box-sizing","border-box"]]],["[hidden]",[0,1,0],[["display","none",1]]],["h1",[0,0,1],[["color","inherit"],["margin","0"],["font-weight","700"],["line-height","1.15"]]],["h2",[0,0,1],[["color","inherit"],["margin","0"],["font-weight","700"],["line-height","1.15"]]],["h3",[0,0,1],[["color","inherit"],["margin","0"],["font-weight","700"],["line-height","1.15"]]],["h4",[0,0,1],[["color","inherit"],["margin","0"],["font-weight","700"],["line-height","1.15"]]],["p",[0,0,1],[["margin","0"]]],["ul",[0,0,1],[["margin","0"]]],["ol",[0,0,1],[["margin","0"]]],["button",[0,0,1],[["font","inherit"],["color","inherit"]]],["input",[0,0,1],[["font","inherit"],["color","inherit"]]],["textarea",[0,0,1],[["font","inherit"],["color","inherit"]]],["button",[0,0,1],[["background","none"],["border","0"],["padding","0"],["cursor","pointer"],["text-align","inherit"],["-webkit-tap-highlight-color","transparent"],["touch-action","manipulation"]]],["img",[0,0,1],[["display","block"]]],["svg",[0,0,1],[["display","block"]]],["a",[0,0,1],[["color","inherit"]]],[".efp-sr-only",[0,1,0],[["position","absolute"],["width","1px"],["height","1px"],["overflow","hidden"],["clip","rect(0 0 0 0)"],["white-space","nowrap"]]],[".efp-serif",[0,1,0],[["font-family","$serif"],["font-weight","800"],["font-variation-settings",'"SOFT" 0, "WONK" 0'],["letter-spacing","-0.01em"],["text-wrap","balance"]]],[".efp-emb-btn",[0,1,0],[["display","inline-flex"],["align-items","center"],["justify-content","center"],["gap","8px"],["min-height","48px"],["padding","0 22px"],["border-radius","999px"],["background","$primary"],["color","$onPrimary"],["font-weight","700"],["font-size","16px"],["text-decoration","none"],["transition","transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease"]]],[".efp-emb-btn svg",[0,1,1],[["width","20px"],["height","20px"]]],[".efp-emb-btn--block",[0,1,0],[["width","100%"]]],[".efp-emb-btn--ghost",[0,1,0],[["background","transparent"],["color","$ink"],["box-shadow","inset 0 0 0 1.5px $ink"]]],[".efp-emb-btn--sm",[0,1,0],[["min-height","40px"],["padding","0 16px"],["font-size","15px"]]],[".efp-emb-btn--lg",[0,1,0],[["min-height","56px"],["padding","0 28px"],["font-size","17px"]]],[".efp-emb-btn[disabled]",[0,2,0],[["opacity",".32"],["pointer-events","none"]]],[".efp-dot",[0,1,0],[["display","inline-block"],["width","9px"],["height","9px"],["border-radius","50%"],["flex","none"]]],[".efp-dot--risk",[0,1,0],[["background","$riskDot"]]],[".efp-ph-scroll",[0,1,0],[["flex","1"],["min-height","0"],["overflow-y","auto"],["overscroll-behavior","contain"],["scrollbar-width","none"]]],[".efp-emb-tile",[0,1,0],[["width","46px"],["height","46px"],["border-radius","13px"],["background","$tile"],["display","grid"],["place-items","center"],["flex","none"],["font-size","22px"]]],[".efp-emb-tile svg",[0,1,1],[["width","23px"],["height","23px"]]],[".efp-emb-tile--cyan",[0,1,0],[["background","$linkWash"],["color","$link"]]],[".efp-ph-push",[0,1,0],[["position","absolute"],["inset","0"],["display","flex"],["flex-direction","column"],["background","$paper"],["pointer-events","auto"],["transform","translateX(100%)"],["visibility","hidden"],["transition","transform 220ms cubic-bezier(0.23, 1, 0.32, 1), visibility 0s linear 220ms"]]],[".efp-ph-push.efp-is-on",[0,2,0],[["transform","none"],["visibility","visible"],["transition","transform 300ms cubic-bezier(0.32, 0.72, 0, 1), visibility 0s"]]],[".efp-bk__radio",[0,1,0],[["width","22px"],["height","22px"],["border-radius","50%"],["box-shadow","inset 0 0 0 2px $n_BDB9B2"],["display","grid"],["place-items","center"]]],[".efp-bk__foot",[0,1,0],[["flex","none"],["padding","12px 18px 34px"],["background","$paper"],["box-shadow","0 -1px 0 $line"]]],[".efp-bk__done",[0,1,0],[["padding","40px 22px 20px"],["text-align","center"]]],[".efp-bk__check",[0,1,0],[["width","76px"],["height","76px"],["border-radius","50%"],["background","$accent"],["display","grid"],["place-items","center"],["margin","0 auto"]]],[".efp-bk__check svg",[0,1,1],[["width","38px"],["height","38px"]]],[".efp-bk__done .efp-bk__title",[0,2,0],[["margin-top","20px"],["font-size","34px"]]],[".efp-bk__when",[0,1,0],[["font-size","16px"],["margin-top","10px"],["font-weight","700"]]],[".efp-bk__who",[0,1,0],[["font-size","15px"],["color","$ink2"],["margin-top","2px"]]],[".efp-ph-scrim",[0,1,0],[["position","absolute"],["inset","0"],["z-index","40"],["background","$scrim"],["opacity","0"],["visibility","hidden"],["transition","opacity 200ms ease, visibility 0s linear 200ms"]]],[".efp-ph-scrim.efp-is-on",[0,2,0],[["opacity","1"],["visibility","visible"],["transition","opacity 240ms ease, visibility 0s"]]],[".efp-ph-sheet",[0,1,0],[["overscroll-behavior","contain"],["position","absolute"],["left","0"],["right","0"],["bottom","0"],["z-index","41"],["max-height","80%"],["overflow-y","auto"],["scrollbar-width","none"],["background","$card"],["border-radius","28px 28px 0 0"],["padding","10px 20px 40px"],["transform","translateY(100%)"],["visibility","hidden"],["transition","transform 220ms cubic-bezier(0.23, 1, 0.32, 1), visibility 0s linear 220ms"]]],[".efp-ph-sheet.efp-is-on",[0,2,0],[["transform","none"],["visibility","visible"],["transition","transform 320ms cubic-bezier(0.32, 0.72, 0, 1), visibility 0s"]]],[".efp-sheet__grab",[0,1,0],[["width","40px"],["height","5px"],["border-radius","3px"],["background","$n_DAD7D1"],["margin","0 auto 10px"]]],[".efp-sheet__top",[0,1,0],[["display","flex"],["align-items","center"],["justify-content","space-between"]]],[".efp-sheet__kicker",[0,1,0],[["font-family","$mono"],["font-size","11px"],["letter-spacing",".08em"],["text-transform","uppercase"],["color","$ink3"]]],[".efp-sheet__x",[0,1,0],[["width","40px"],["height","40px"],["margin-right","-8px"],["display","grid"],["place-items","center"],["border-radius","50%"]]],[".efp-sheet__x svg",[0,1,1],[["width","22px"],["height","22px"]]],[".efp-ph-sheet .efp-sheet__body",[0,2,0],[["display","grid"],["gap","10px"],["margin-top","12px"],["font-size","16px"],["line-height","1.5"],["color","$black"]]],[".efp-ph-toast",[0,1,0],[["position","absolute"],["left","16px"],["right","16px"],["top","112px"],["z-index","50"],["background","$ink"],["color","$onInk"],["border-radius","16px"],["padding","12px 15px"],["font-size","14.5px"],["line-height","1.4"],["opacity","0"],["transform","translateY(-8px)"],["pointer-events","none"],["transition","opacity 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],[".efp-ph-toast.efp-is-on",[0,2,0],[["opacity","1"],["transform","none"],["transition-duration","220ms"]]],[".efp-plan__fine",[0,1,0],[["font-size","12.5px"],["color","$ink3"],["text-align","center"],["margin-top","16px"],["line-height","1.45"]]],[".efp-cp-tag",[0,1,0],[["font-family","$mono"],["font-size","10px"],["letter-spacing",".06em"],["text-transform","uppercase"],["background","$ink"],["color","$onInk"],["padding","2px 6px"],["border-radius","5px"]]],[".efp-cp-tag--s",[0,1,0],[["background","$card"],["color","$ink"]]],[".efp-hp",[0,1,0],[["padding","16px 16px 28px"]]],[".efp-hp-head",[0,1,0],[["display","grid"],["grid-template-columns","minmax(0, 1fr) 56px"],["gap","12px"],["align-items","center"],["padding","2px 2px 0"]]],[".efp-hp-head h2",[0,1,1],[["font-size","29px"],["line-height","1.06"]]],[".efp-hp-head p",[0,1,1],[["font-size","15px"],["color","$ink2"],["margin-top","6px"]]],[".efp-hp-head img",[0,1,1],[["width","56px"],["height","56px"],["border-radius","50%"],["object-fit","cover"],["background","$tile"],["box-shadow","0 0 0 3px $paper, 0 0 0 5.5px $accent"]]],[".efp-hp-need",[0,1,0],[["margin-top","14px"],["padding","16px"],["border-radius","22px"],["background","$card"],["box-shadow","0 1px 3px $wash"],["scroll-margin-top","12px"]]],[".efp-hp-need__k",[0,1,0],[["display","flex"],["align-items","center"],["gap","8px"],["font-size","15px"],["font-weight","800"]]],[".efp-hp-n",[0,1,0],[["flex","none"],["width","24px"],["height","24px"],["border-radius","50%"],["background","$primary"],["color","$onPrimary"],["display","grid"],["place-items","center"],["font-size","12.5px"],["font-weight","800"]]],[".efp-hp-srcs",[0,1,0],[["margin-left","auto"],["display","flex"],["gap","4px"]]],[".efp-hp-src",[0,1,0],[["height","24px"],["padding","0 9px"],["border-radius","999px"],["background","$tile"],["color","$ink2"],["font-size","12px"],["font-weight","700"],["display","inline-flex"],["align-items","center"],["white-space","nowrap"]]],[".efp-hp-src--dna",[0,1,0],[["background","$linkWash"],["color","$link"]]],[".efp-hp-need h3",[0,1,1],[["font-size","19px"],["font-weight","800"],["line-height","1.22"],["margin-top","12px"]]],[".efp-hp-need__s",[0,1,0],[["display","grid"],["grid-template-columns","9px minmax(0, 1fr)"],["gap","9px"],["align-items","baseline"],["margin-top","6px"],["font-size","15px"],["line-height","1.45"],["color","$ink2"]]],[".efp-hp-need__s b",[0,1,1],[["color","$ink"],["font-weight","800"]]],[".efp-hp-need__s .efp-dot",[0,2,0],[["transform","translateY(-1px)"]]],[".efp-hp-odds",[0,1,0],[["display","flex"],["justify-content","space-between"],["align-items","center"],["gap","12px"],["margin-top","12px"],["padding","10px 14px"],["border-radius","14px"],["background","$accent4"]]],[".efp-hp-odds__k",[0,1,0],[["font-size","13.5px"],["font-weight","600"],["line-height","1.35"],["color","$ink2"],["max-width","10em"]]],[".efp-hp-odds__k .efp-cp-tag",[0,2,0],[["display","inline-block"],["margin-top","3px"]]],[".efp-hp-odds__n",[0,1,0],[["display","grid"],["grid-template-columns","auto auto auto"],["align-items","center"],["justify-items","end"],["gap","0 6px"]]],[".efp-hp-odds__n s",[0,1,1],[["font-size","17px"],["font-weight","700"],["color","$ink3"]]],[".efp-hp-odds__n svg",[0,1,1],[["width","16px"],["height","16px"],["color","$ink3"]]],[".efp-hp-odds__n b",[0,1,1],[["font-family","$serif"],["font-size","28px"],["font-weight","800"],["line-height","1"]]],[".efp-hp-odds__n span",[0,1,1],[["grid-column","1 / -1"],["font-size","12.5px"],["font-weight","700"],["color","$link"],["margin-top","3px"]]],[".efp-hp-pick",[0,1,0],[["margin-top","12px"],["padding","12px"],["border-radius","16px"],["background","$paper"]]],[".efp-hp-pick__top",[0,1,0],[["display","grid"],["grid-template-columns","64px minmax(0, 1fr)"],["gap","12px"],["align-items","center"]]],[".efp-hp-pick__img",[0,1,0],[["width","64px"],["height","64px"],["border-radius","14px"],["background","$card"],["overflow","hidden"]]],[".efp-hp-pick__img img",[0,1,1],[["width","100%"],["height","100%"],["object-fit","cover"]]],[".efp-hp-pick h4",[0,1,1],[["font-size","17px"],["font-weight","800"],["line-height","1.2"]]],[".efp-hp-stars",[0,1,0],[["display","flex"],["align-items","center"],["gap","4px"],["margin-top","2px"],["font-size","13.5px"],["font-weight","800"]]],[".efp-hp-stars svg",[0,1,1],[["width","14px"],["height","14px"],["color","$watchDot"]]],[".efp-hp-stars span",[0,1,1],[["font-weight","500"],["color","$ink3"]]],[".efp-hp-pick__line",[0,1,0],[["margin-top","3px"],["font-size","14px"],["line-height","1.4"],["color","$ink2"]]],[".efp-hp-buy",[0,1,0],[["display","flex"],["justify-content","space-between"],["align-items","center"],["gap","12px"],["margin-top","12px"]]],[".efp-hp-price",[0,1,0],[["display","flex"],["flex-wrap","wrap"],["align-items","baseline"],["gap","0 8px"],["min-width","0"]]],[".efp-hp-price b",[0,1,1],[["font-size","24px"],["font-weight","800"],["line-height","1.1"],["font-variant-numeric","tabular-nums"]]],[".efp-hp-price s",[0,1,1],[["font-size","15px"],["font-weight","700"],["color","$riskInk"],["text-decoration-thickness","2px"]]],[".efp-hp-price small",[0,1,1],[["flex-basis","100%"],["margin-top","3px"],["font-size","12.5px"],["line-height","1.35"],["color","$ink3"]]],[".efp-hp-buy .efp-emb-btn",[0,2,0],[["flex","none"],["min-height","46px"],["padding","0 20px"]]],[".efp-hp-more",[0,1,0],[["display","flex"],["flex-wrap","wrap"],["gap","0 18px"],["margin-top","8px"]]],[".efp-hp-more button",[0,1,1],[["min-height","34px"],["font-size","14px"],["font-weight","700"],["color","$link"],["text-decoration","underline"],["text-decoration-thickness","1.5px"],["text-underline-offset","3px"]]],[".efp-hp-need > .efp-hp-more",[0,2,0],[["margin-top","10px"]]],[".efp-hp-on",[0,1,0],[["display","grid"],["grid-template-columns","34px minmax(0, 1fr) auto"],["gap","10px"],["align-items","center"],["margin-top","12px"],["padding","10px 10px 10px 12px"],["border-radius","14px"],["background","$clearBg"]]],[".efp-hp-on__ic",[0,1,0],[["width","34px"],["height","34px"],["border-radius","50%"],["background","$clearDot"],["color","$card"],["display","grid"],["place-items","center"]]],[".efp-hp-on__ic svg",[0,1,1],[["width","18px"],["height","18px"]]],[".efp-hp-on strong",[0,1,1],[["display","block"],["font-size","15px"],["color","$clearInk"],["line-height","1.25"]]],[".efp-hp-on small",[0,1,1],[["display","block"],["margin-top","1px"],["font-size","13px"],["line-height","1.35"],["color","$ink2"]]],[".efp-hp-on button",[0,1,1],[["min-height","38px"],["padding","0 14px"],["border-radius","999px"],["background","$card"],["font-size","14px"],["font-weight","800"],["box-shadow","inset 0 0 0 1.5px $ink"],["transition","transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],[".efp-is-on > .efp-hp-buy",[0,2,0],[["display","none"]]],[".efp-is-on [data-once]",[0,2,0],[["display","none"]]],[".efp-hp-by",[0,1,0],[["display","grid"],["grid-template-columns","40px minmax(0, 1fr)"],["gap","10px"],["align-items","center"],["margin-top","14px"],["padding","0 2px"]]],[".efp-hp-by img",[0,1,1],[["width","40px"],["height","40px"],["border-radius","50%"],["object-fit","cover"],["background","$tile"]]],[".efp-hp-by strong",[0,1,1],[["display","block"],["font-size","15px"],["font-weight","800"],["line-height","1.25"]]],[".efp-hp-by small",[0,1,1],[["display","block"],["margin-top","2px"],["font-family","$mono"],["font-size","10.5px"],["letter-spacing",".05em"],["text-transform","uppercase"],["color","$ink3"]]],[".efp-hp-steps",[0,1,0],[["margin-top","14px"],["padding","16px 12px 12px"],["border-radius","22px"],["background","$card"],["box-shadow","0 1px 3px $wash"]]],[".efp-hp-steps__head",[0,1,0],[["display","flex"],["justify-content","space-between"],["align-items","baseline"],["gap","12px"],["padding","0 4px"]]],[".efp-hp-steps__head h3",[0,1,1],[["font-size","19px"],["font-weight","800"],["line-height","1.2"]]],[".efp-hp-steps__head p",[0,1,1],[["font-family","$mono"],["font-size","11px"],["letter-spacing",".05em"],["text-transform","uppercase"],["color","$ink3"],["white-space","nowrap"]]],[".efp-hp-list",[0,1,0],[["list-style","none"],["margin","6px 0 0"],["padding","0"],["display","grid"],["gap","2px"]]],[".efp-hp-swipe",[0,1,0],[["display","flex"],["gap","10px"],["overflow-x","auto"],["scroll-snap-type","x mandatory"],["overscroll-behavior-x","contain"],["scrollbar-width","none"],["-webkit-overflow-scrolling","touch"]]],[".efp-hp-swipe[data-ef-focus-visible]",[0,2,0],[["border-radius","18px"]]],[".efp-hp-swipe > *",[0,1,0],[["flex","0 0 78%"],["max-width","280px"],["scroll-snap-align","start"]]],[".efp-hp-steps .efp-hp-swipe",[0,2,0],[["margin","10px -12px 0"],["padding","0 12px 2px"],["scroll-padding-inline","12px"]]],[".efp-hp-tip",[0,1,0],[["display","flex"],["flex-direction","column"],["padding","14px 14px 12px"],["border-radius","18px"]]],[".efp-hp-tip--y",[0,1,0],[["background","$accentChip"]]],[".efp-hp-tip--c",[0,1,0],[["background","$linkChip"]]],[".efp-hp-tip--g",[0,1,0],[["background","$clearChip"]]],[".efp-hp-tip--r",[0,1,0],[["background","$riskChip"]]],[".efp-hp-tip__top",[0,1,0],[["display","flex"],["justify-content","space-between"],["align-items","center"]]],[".efp-hp-tip__top svg",[0,1,1],[["width","26px"],["height","26px"],["color","$ink"]]],[".efp-hp-tip__n",[0,1,0],[["font-family","$serif"],["font-size","30px"],["font-weight","900"],["line-height","1"]]],[".efp-hp-tip strong",[0,1,1],[["display","block"],["margin-top","14px"],["font-size","17px"],["font-weight","800"],["line-height","1.25"]]],[".efp-hp-tip small",[0,1,1],[["display","block"],["margin-top","4px"],["font-size","14.5px"],["line-height","1.4"],["color","$ink2"]]],[".efp-hp-tip em",[0,1,1],[["display","block"],["margin-top","auto"],["padding-top","10px"],["font-style","normal"],["font-family","$mono"],["font-size","10.5px"],["letter-spacing",".04em"],["text-transform","uppercase"],["color","$link"]]],[".efp-hp-eyebrow",[0,1,0],[["font-family","$mono"],["font-size","11px"],["letter-spacing",".07em"],["text-transform","uppercase"],["color","$ink3"],["margin-bottom","6px"]]],[".efp-hp-head .efp-hp-eyebrow + h2",[0,2,1],[["margin-top","0"]]],[".efp-hp-by",[0,1,0],[["grid-template-columns","40px minmax(0, 1fr) 22px"],["margin-top","14px"],["padding","10px 12px"],["border-radius","16px"],["background","$card"],["box-shadow","0 1px 3px $wash"]]],[".efp-hp-by__ok",[0,1,0],[["width","22px"],["height","22px"],["color","$link"]]],[".efp-hp-says",[0,1,0],[["display","grid"],["grid-template-columns","32px minmax(0, 1fr)"],["gap","10px"],["align-items","start"],["margin","12px 0 0"],["padding","10px 12px"],["border-radius","14px"],["background","$paper"]]],[".efp-hp-says img",[0,1,1],[["width","32px"],["height","32px"],["border-radius","50%"],["object-fit","cover"]]],[".efp-hp-says p",[0,1,1],[["font-size","14.5px"],["line-height","1.4"],["color","$ink2"]]],[".efp-hp-says b",[0,1,1],[["color","$ink"],["font-weight","800"],["margin-right","2px"]]],[".efp-hp-jump",[0,1,0],[["width","100%"],["display","grid"],["grid-template-columns","44px minmax(0, 1fr) auto"],["gap","12px"],["align-items","center"],["margin-top","12px"],["padding","8px 14px 8px 8px"],["border-radius","14px"],["background","$primary"],["color","$onPrimary"],["text-align","left"],["transition","transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],[".efp-hp-jump img",[0,1,1],[["width","44px"],["height","44px"],["border-radius","10px"],["object-fit","cover"],["background","$card"]]],[".efp-hp-jump small",[0,1,1],[["display","block"],["font-size","13px"],["font-weight","800"],["color","$accent"]]],[".efp-hp-jump strong",[0,1,1],[["display","block"],["font-size","15px"],["font-weight","800"],["line-height","1.25"]]],[".efp-hp-jump__go",[0,1,0],[["font-size","14px"],["font-weight","800"]]],[".efp-hp-n",[0,1,0],[["flex","none"]]],[".efp-hp-steps__head h3",[0,1,1],[["display","flex"],["align-items","center"],["gap","10px"],["font-size","19px"],["font-weight","800"],["line-height","1.2"]]],[".efp-hp-sec__h",[0,1,0],[["display","flex"],["align-items","center"],["gap","10px"],["font-size","19px"],["font-weight","800"],["line-height","1.2"]]],[".efp-hp-sec",[0,1,0],[["margin-top","14px"],["padding","16px"],["border-radius","22px"],["background","$card"],["box-shadow","0 1px 3px $wash"],["scroll-margin-top","12px"]]],[".efp-hp-sec .efp-hp-pick",[0,2,0],[["margin-top","14px"],["padding","0"],["background","none"]]],[".efp-hp-sec .efp-hp-pick__top",[0,2,0],[["grid-template-columns","76px minmax(0, 1fr)"]]],[".efp-hp-sec .efp-hp-pick__img",[0,2,0],[["width","76px"],["height","76px"],["background","$paper"]]],[".efp-hp-mini",[0,1,0],[["font-family","$mono"],["font-size","10.5px"],["letter-spacing",".06em"],["text-transform","uppercase"],["color","$ink3"]]],[".efp-hp-why",[0,1,0],[["margin-top","14px"],["padding","12px 14px"],["border-radius","16px"],["box-shadow","inset 0 0 0 1.5px $ink"]]],[".efp-hp-why ul",[0,1,1],[["list-style","none"],["margin","0"],["padding","0"]]],[".efp-hp-dose ul",[0,1,1],[["list-style","none"],["margin","0"],["padding","0"]]],[".efp-hp-why li",[0,1,1],[["display","grid"],["grid-template-columns","58px minmax(0, 1fr)"],["gap","10px"],["align-items","start"],["margin-top","10px"]]],[".efp-hp-why strong",[0,1,1],[["display","block"],["font-size","15px"],["font-weight","800"],["line-height","1.3"]]],[".efp-hp-why small",[0,1,1],[["display","block"],["margin-top","1px"],["font-size","14px"],["line-height","1.4"],["color","$ink2"]]],[".efp-hp-chip",[0,1,0],[["height","22px"],["border-radius","6px"],["display","grid"],["place-items","center"],["font-family","$mono"],["font-size","10.5px"],["font-weight","700"],["letter-spacing",".04em"],["text-transform","uppercase"]]],[".efp-hp-chip--dna",[0,1,0],[["background","$linkWash"],["color","$link"]]],[".efp-hp-chip--ask",[0,1,0],[["background","$accent4"],["color","$ink"]]],[".efp-hp-chip--rec",[0,1,0],[["background","$tile"],["color","$ink2"]]],[".efp-hp-dose",[0,1,0],[["margin-top","10px"],["padding","12px 14px 14px"],["border-radius","16px"],["background","$linkWash"]]],[".efp-hp-dose .efp-hp-mini",[0,2,0],[["color","$link"]]],[".efp-hp-dose ul",[0,1,1],[["display","grid"],["grid-template-columns","repeat(3, minmax(0, 1fr))"],["gap","8px"],["margin-top","10px"]]],[".efp-hp-dose li",[0,1,1],[["display","grid"],["justify-items","center"],["gap","2px"],["padding","10px 4px"],["border-radius","12px"],["background","$card"],["text-align","center"]]],[".efp-hp-dose b",[0,1,1],[["font-family","$mono"],["font-size","21px"],["font-weight","700"],["line-height","1.1"],["font-variant-numeric","tabular-nums"]]],[".efp-hp-dose small",[0,1,1],[["font-size","12.5px"],["line-height","1.3"],["color","$ink2"]]],[".efp-hp-dose > p:last-child",[0,2,1],[["margin-top","10px"],["font-size","14px"],["line-height","1.45"],["color","$link"]]],[".efp-hp-in",[0,1,0],[["display","flex"],["flex-wrap","wrap"],["gap","6px"],["margin-top","12px"]]],[".efp-hp-in span",[0,1,1],[["padding","6px 10px"],["border-radius","999px"],["background","$tile"],["font-size","13.5px"],["font-weight","600"]]],[".efp-hp-opts",[0,1,0],[["display","grid"],["gap","8px"],["margin-top","14px"]]],[".efp-hp-opt",[0,1,0],[["width","100%"],["display","flex"],["justify-content","space-between"],["align-items","center"],["gap","12px"],["padding","14px"],["border-radius","16px"],["background","$card"],["text-align","left"],["box-shadow","inset 0 0 0 1.5px $n_DEDCD7"],["transition","box-shadow 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],['.efp-hp-opt[aria-checked="true"]',[0,2,0],[["box-shadow","inset 0 0 0 2.5px $ink"]]],[".efp-hp-opt__t",[0,1,0],[["display","grid"],["justify-items","start"],["gap","2px"]]],[".efp-hp-opt__t strong",[0,1,1],[["font-size","16px"],["font-weight","800"]]],[".efp-hp-opt__t small",[0,1,1],[["font-size","13.5px"],["color","$ink2"]]],[".efp-hp-opt__tag",[0,1,0],[["margin-bottom","4px"],["padding","2px 8px"],["border-radius","6px"],["background","$riskInk"],["color","$card"],["font-size","12px"],["font-weight","800"]]],[".efp-hp-opt__p",[0,1,0],[["font-size","18px"],["font-weight","800"]]],[".efp-hp-opt .efp-hp-price",[0,2,0],[["display","flex"],["flex-direction","column"],["align-items","flex-end"],["flex-wrap","nowrap"]]],[".efp-hp-opt .efp-hp-price s",[0,2,1],[["order","-1"]]],[".efp-hp-opt .efp-hp-price small",[0,2,1],[["display","none"]]],[".efp-hp-sec .efp-hp-buy",[0,2,0],[["display","block"],["margin-top","12px"]]],[".efp-hp-sec .efp-hp-buy .efp-emb-btn",[0,3,0],[["width","100%"],["min-height","52px"],["font-size","17px"]]],[".efp-hp-trust",[0,1,0],[["list-style","none"],["margin","12px 0 0"],["padding","0"],["display","grid"],["grid-template-columns","repeat(3, minmax(0, 1fr))"],["gap","6px"]]],[".efp-hp-trust li",[0,1,1],[["display","grid"],["justify-items","center"],["gap","4px"],["font-size","12.5px"],["font-weight","600"],["line-height","1.3"],["text-align","center"],["color","$ink2"]]],[".efp-hp-trust svg",[0,1,1],[["width","20px"],["height","20px"],["color","$link"]]],[".efp-is-on > .efp-hp-opts",[0,2,0],[["display","none"]]],[".efp-is-on > .efp-hp-trust",[0,2,0],[["display","none"]]],[".efp-hp-fine",[0,1,0],[["margin-top","8px"],["font-size","13px"],["line-height","1.45"],["color","$ink3"]]],[".efp-hp-sign",[0,1,0],[["margin-top","12px"],["padding","14px"],["border-radius","16px"],["box-shadow","inset 0 0 0 1.5px $n_DEDCD7"]]],[".efp-hp-sign h4",[0,1,1],[["display","flex"],["align-items","center"],["gap","8px"],["font-size","16px"],["font-weight","800"],["line-height","1.25"]]],[".efp-hp-sign p",[0,1,1],[["margin-top","4px"],["font-size","15px"],["line-height","1.45"],["color","$ink2"]]],[".efp-hp-sign--er",[0,1,0],[["background","$riskBg"],["box-shadow","none"]]],[".efp-hp-sign--er h4",[0,1,1],[["color","$riskInk"]]],[".efp-hp-sign--er h4 svg",[0,1,2],[["width","20px"],["height","20px"]]],[".efp-hp-sign--er p",[0,1,1],[["color","$ink"]]],[".efp-hp-qs",[0,1,0],[["margin","10px 0 0"],["padding-left","22px"],["display","grid"],["gap","6px"],["font-size","15px"],["line-height","1.45"]]],[".efp-hp-sec .efp-hp-add",[0,2,0],[["display","flex"],["align-items","center"],["justify-content","center"],["width","100%"],["padding","0 16px"],["min-height","48px"],["margin-top","14px"],["border-radius","999px"],["font-size","16px"],["font-weight","800"],["box-shadow","inset 0 0 0 2px $ink"],["transition","transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 180ms ease"]]],['.efp-hp-sec .efp-hp-add[aria-pressed="true"]',[0,3,0],[["background","$clearBg"],["color","$clearInk"],["box-shadow","none"]]],[".efp-hp-revs",[0,1,0],[["margin","12px -16px 0"],["padding","0 16px"],["scroll-padding-inline","16px"]]],[".efp-hp-rev",[0,1,0],[["margin","0"],["padding","12px 14px"],["border-radius","14px"],["background","$paper"]]],[".efp-hp-rev__s",[0,1,0],[["display","flex"],["gap","1px"],["color","$watchDot"]]],[".efp-hp-rev__s svg",[0,1,1],[["width","13px"],["height","13px"]]],[".efp-hp-rev blockquote",[0,1,1],[["margin","5px 0 0"],["font-size","15px"],["line-height","1.4"]]],[".efp-hp-rev figcaption",[0,1,1],[["margin-top","4px"],["font-size","13px"],["color","$ink3"]]],[".efp-hp-score",[0,1,0],[["display","flex"],["justify-content","space-between"],["align-items","center"],["gap","8px"],["margin-top","12px"],["padding","11px 12px 11px 14px"],["border-radius","12px"],["background","$primary"],["color","$onPrimary"],["font-size","14.5px"],["font-weight","800"],["line-height","1.3"]]],[".efp-hp-score b",[0,1,1],[["flex","none"],["font-family","$mono"],["font-size","16px"],["font-weight","700"],["color","$accent"]]],[".efp-hp-opt--once",[0,1,0],[["padding","10px 14px"],["background","$paper"],["box-shadow","none"]]],[".efp-hp-opt--once .efp-hp-opt__t strong",[0,2,1],[["font-size","15px"],["font-weight","700"]]],[".efp-hp-opt--once .efp-hp-opt__t small",[0,2,1],[["font-size","13px"]]],[".efp-hp-opt--once .efp-hp-opt__p",[0,2,0],[["font-size","15px"],["font-weight","700"],["color","$ink2"]]],['.efp-hp-opt--once[aria-checked="true"]',[0,2,0],[["background","$card"],["box-shadow","inset 0 0 0 2px $ink"]]],[".efp-hp-proof",[0,1,0],[["display","flex"],["justify-content","center"],["align-items","center"],["gap","6px"],["margin-top","10px"],["font-size","14.5px"],["font-weight","800"],["color","$riskInk"]]],[".efp-hp-proof svg",[0,1,1],[["width","21px"],["height","21px"],["flex","none"],["margin-top","-2px"]]],[".efp-is-on > .efp-hp-proof",[0,2,0],[["display","none"]]],[".efp-hp-qs__k",[0,1,0],[["margin-top","18px"],["font-size","16px"],["font-weight","800"],["line-height","1.25"]]],[".efp-hp-qs__k + .efp-hp-qs",[0,2,0],[["margin-top","6px"]]],[".efp-hp-xs",[0,1,0],[["margin-top","22px"],["display","grid"],["gap","10px"]]],[".efp-hp-xs .efp-hp-eyebrow",[0,2,0],[["margin","0 4px"],["font-weight","400"]]],[".efp-hp-x",[0,1,0],[["display","grid"],["grid-template-columns","56px minmax(0, 1fr)"],["gap","4px 12px"],["align-items","start"],["padding","14px"],["border-radius","22px"],["background","$card"],["box-shadow","0 1px 3px $wash"]]],[".efp-hp-x > img",[0,1,1],[["width","56px"],["height","56px"],["border-radius","14px"],["object-fit","cover"],["background","$card"]]],[".efp-hp-x__ic",[0,1,0],[["width","56px"],["height","56px"],["border-radius","14px"],["object-fit","cover"],["background","$card"]]],[".efp-hp-x__ic",[0,1,0],[["display","grid"],["place-items","center"],["background","$linkWash"],["color","$link"]]],[".efp-hp-x__ic svg",[0,1,1],[["width","26px"],["height","26px"]]],[".efp-hp-x h4",[0,1,1],[["font-size","17px"],["font-weight","800"],["line-height","1.2"]]],[".efp-hp-x h4.efp-serif",[0,2,1],[["font-size","21px"]]],[".efp-hp-x p",[0,1,1],[["margin-top","3px"],["font-size","14.5px"],["line-height","1.4"],["color","$ink2"]]],[".efp-hp-x .efp-hp-x__p",[0,2,0],[["display","flex"],["flex-wrap","wrap"],["align-items","center"],["gap","0 8px"],["margin-top","6px"],["color","$ink"]]],[".efp-hp-x__p b",[0,1,1],[["font-size","19px"],["font-weight","800"],["font-variant-numeric","tabular-nums"]]],[".efp-hp-x__p s",[0,1,1],[["font-size","14px"],["font-weight","700"],["color","$ink3"]]],[".efp-hp-x__go",[0,1,0],[["grid-column","2"],["justify-self","start"],["margin-top","8px"],["min-height","40px"],["padding","0 18px"],["border-radius","999px"],["background","$primary"],["color","$onPrimary"],["font-size","14.5px"],["font-weight","800"],["transition","transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 180ms ease"]]],['.efp-hp-x__go[aria-pressed="true"]',[0,2,0],[["background","$clearBg"],["color","$clearInk"]]],[".efp-hp-x--kit",[0,1,0],[["background","$linkWash"],["box-shadow","none"]]],[".efp-hp-x--kit > img",[0,1,1],[["background","$card"]]],[".efp-hp-next",[0,1,0],[["list-style","none"],["margin","22px 0 0"],["padding","4px 16px"],["border-radius","18px"],["background","$card"],["text-align","left"],["box-shadow","0 1px 3px $wash"]]],[".efp-hp-next li",[0,1,1],[["display","grid"],["grid-template-columns","36px minmax(0, 1fr)"],["gap","12px"],["align-items","center"],["padding","10px 0"]]],[".efp-hp-next__ic",[0,1,0],[["width","36px"],["height","36px"],["border-radius","11px"],["background","$linkWash"],["color","$link"],["display","grid"],["place-items","center"]]],[".efp-hp-next__ic svg",[0,1,1],[["width","19px"],["height","19px"]]],[".efp-hp-next small",[0,1,1],[["display","block"],["font-family","$mono"],["font-size","10.5px"],["letter-spacing",".05em"],["text-transform","uppercase"],["color","$ink3"]]],[".efp-hp-next span",[0,1,1],[["display","block"],["margin-top","1px"],["font-size","15px"],["font-weight","600"],["line-height","1.35"]]],[".efp-co",[0,1,0],[["display","grid"],["gap","10px"],["margin-top","2px"]]],[".efp-co-prod",[0,1,0],[["display","grid"],["grid-template-columns","56px minmax(0, 1fr)"],["gap","12px"],["align-items","center"]]],[".efp-co-prod__img",[0,1,0],[["width","56px"],["height","56px"],["border-radius","14px"],["background","$accent3"],["color","$ink"],["overflow","hidden"],["display","grid"],["place-items","center"]]],[".efp-co-prod__img img",[0,1,1],[["width","100%"],["height","100%"],["object-fit","cover"]]],[".efp-co-prod__img svg",[0,1,1],[["width","30px"],["height","30px"]]],[".efp-co-prod p",[0,1,1],[["margin-top","2px"],["font-size","14px"],["line-height","1.35"],["color","$ink2"]]],[".efp-co-prod__t",[0,1,0],[["font-size","20px"],["font-weight","800"],["line-height","1.2"],["color","$ink"]]],[".efp-co-prod .efp-co-prod__t",[0,2,0],[["margin-top","0"]]],[".efp-co-opts",[0,1,0],[["display","grid"],["gap","8px"]]],[".efp-co-opt",[0,1,0],[["border-radius","16px"],["box-shadow","inset 0 0 0 1.5px $n_DAD7D1"],["transition","box-shadow 160ms ease, background-color 160ms ease"]]],[".efp-co-opt.efp-is-on",[0,2,0],[["background","$accent4"],["box-shadow","inset 0 0 0 2px $ink"]]],[".efp-co-opt.efp-is-on .efp-bk__radio",[0,3,0],[["box-shadow","inset 0 0 0 7px $ink"]]],[".efp-co-opt__hit",[0,1,0],[["width","100%"],["display","grid"],["grid-template-columns","22px minmax(0, 1fr) auto"],["gap","2px 12px"],["align-items","start"],["padding","12px 14px"],["border-radius","16px"],["text-align","left"]]],[".efp-co-opt__hit strong",[0,1,1],[["font-size","16px"],["line-height","1.35"]]],[".efp-co-opt__p",[0,1,0],[["text-align","right"],["font-size","16px"],["font-weight","800"],["line-height","1.35"],["font-variant-numeric","tabular-nums"]]],[".efp-co-opt__p s",[0,1,1],[["display","block"],["font-size","13px"],["font-weight","600"],["color","$riskInk"]]],[".efp-co-opt__hit small",[0,1,1],[["grid-column","2 / -1"],["font-size","13px"],["line-height","1.4"],["color","$ink2"]]],[".efp-co-k",[0,1,0],[["font-family","$mono"],["font-size","10.5px"],["letter-spacing",".06em"],["text-transform","uppercase"],["color","$ink3"],["margin-bottom","6px"]]],[".efp-co-every",[0,1,0],[["display","grid"],["grid-template-columns","repeat(3, minmax(0, 1fr))"],["gap","4px"],["padding","4px"],["border-radius","999px"],["background","$card"],["box-shadow","inset 0 0 0 1.5px $n_DAD7D1"]]],[".efp-co-when",[0,1,0],[["padding","0 14px 12px 48px"]]],[".efp-co-every button",[0,1,1],[["min-height","36px"],["padding","0 6px"],["border-radius","999px"],["font-size","14px"],["font-weight","700"],["text-align","center"],["white-space","nowrap"],["transition","background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],['.efp-co-every button[aria-checked="true"]',[0,2,1],[["background","$primary"],["color","$onPrimary"]]],[".efp-co-rows",[0,1,0],[["list-style","none"],["margin","0"],["padding","2px 14px"],["border-radius","16px"],["background","$paper"]]],[".efp-co-rows li",[0,1,1],[["display","grid"],["grid-template-columns","20px 4.6rem minmax(0, 1fr)"],["gap","10px"],["align-items","center"],["min-height","40px"],["font-size","14.5px"]]],[".efp-co-rows svg",[0,1,1],[["width","20px"],["height","20px"],["color","$ink2"]]],[".efp-co-rows span",[0,1,1],[["color","$ink3"]]],[".efp-co-rows b",[0,1,1],[["font-weight","700"]]],[".efp-co-fine",[0,1,0],[["font-size","12.5px"],["line-height","1.45"],["color","$ink3"],["text-align","center"]]],[".efp-mg-cancel",[0,1,0],[["justify-self","center"],["min-height","40px"],["font-size","14.5px"],["font-weight","700"],["color","$riskInk"]]],[".efp-hp-tools",[0,1,0],[["display","flex"],["align-items","center"],["justify-content","space-between"],["gap","8px"],["margin","-8px -6px 2px 2px"]]],[".efp-hp-tools .efp-hp-eyebrow",[0,2,0],[["margin","0"]]],[".efp-hp-tools__end",[0,1,0],[["display","flex"],["align-items","center"],["gap","2px"]]],[".efp-hp-orders",[0,1,0],[["display","inline-flex"],["align-items","center"],["gap","6px"],["min-height","44px"],["padding","0 8px"],["border-radius","999px"],["font-size","15px"],["font-weight","700"]]],[".efp-hp-orders svg",[0,1,1],[["width","21px"],["height","21px"]]],[".efp-hp-cart",[0,1,0],[["position","relative"],["width","44px"],["height","44px"],["display","grid"],["place-items","center"],["border-radius","50%"]]],[".efp-hp-cart svg",[0,1,1],[["width","26px"],["height","26px"]]],[".efp-hp-cart__n",[0,1,0],[["position","absolute"],["top","3px"],["right","1px"],["min-width","20px"],["height","20px"],["padding","0 5px"],["border-radius","999px"],["background","$riskDot"],["color","$card"],["font-size","12px"],["font-weight","800"],["line-height","20px"],["text-align","center"],["font-variant-numeric","tabular-nums"],["box-shadow","0 0 0 2px $paper"]]],[".efp-hp-ask-row",[0,1,0],[["width","100%"],["display","grid"],["grid-template-columns","40px minmax(0, 1fr) 18px"],["gap","12px"],["align-items","center"],["margin-top","10px"],["padding","12px 14px 12px 12px"],["border-radius","16px"],["background","$linkWash"],["text-align","left"],["transition","transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],[".efp-hp-ask-row__ic",[0,1,0],[["width","40px"],["height","40px"],["border-radius","11px"],["background","$card"],["color","$link"],["display","grid"],["place-items","center"]]],[".efp-hp-ask-row__ic svg",[0,1,1],[["width","21px"],["height","21px"]]],[".efp-hp-ask-row strong",[0,1,1],[["display","block"],["font-size","15.5px"],["font-weight","800"],["line-height","1.3"]]],[".efp-hp-ask-row small",[0,1,1],[["display","block"],["margin-top","1px"],["font-size","14px"],["line-height","1.4"],["color","$ink2"]]],[".efp-hp-ask-row > svg",[0,1,1],[["width","18px"],["height","18px"],["color","$ink2"]]],[".efp-hp-sec .efp-hp-ask-row",[0,2,0],[["margin-top","12px"]]],[".efp-hp-wait",[0,1,0],[["margin-top","14px"],["padding","16px"],["border-radius","22px"],["background","$card"],["box-shadow","0 1px 3px $wash"]]],[".efp-hp-wait__top",[0,1,0],[["display","grid"],["grid-template-columns","46px minmax(0, 1fr)"],["gap","12px"],["align-items","center"]]],[".efp-hp-wait__top h3",[0,1,1],[["font-size","26px"],["line-height","1.05"],["margin-top","2px"]]],[".efp-hp-wait .efp-sh-track",[0,2,0],[["margin-top","14px"]]],[".efp-hp-wait__k",[0,1,0],[["margin-top","18px"],["font-size","16px"],["font-weight","800"]]],[".efp-hp-next--in",[0,1,0],[["margin-top","8px"],["background","$paper"],["box-shadow","none"]]],[".efp-hp-wait__text",[0,1,0],[["display","flex"],["align-items","center"],["gap","8px"],["margin","16px 0 12px"],["font-size","15.5px"],["font-weight","700"]]],[".efp-hp-wait__text svg",[0,1,1],[["width","20px"],["height","20px"],["color","$link"],["flex","none"]]],[".efp-sh-track",[0,1,0],[["list-style","none"],["margin","0"],["padding","0"]]],[".efp-sh-track li",[0,1,1],[["position","relative"],["display","grid"],["grid-template-columns","22px minmax(0, 1fr)"],["gap","12px"],["padding-bottom","16px"]]],[".efp-sh-track li:last-child",[0,2,1],[["padding-bottom","0"]]],[".efp-sh-track li > .efp-before",[0,2,1],[["position","absolute"],["left","10px"],["top","20px"],["bottom","-2px"],["width","2px"],["border-radius","1px"],["background","$n_E2DFD9"]]],[".efp-sh-track li:last-child > .efp-before",[0,3,1],[["display","none"]]],[".efp-sh-track li.efp-is-done:has(+ li.efp-is-done) > .efp-before",[0,4,2],[["background","$primary"]]],[".efp-sh-track__dot",[0,1,0],[["width","22px"],["height","22px"],["border-radius","50%"],["display","grid"],["place-items","center"],["background","$card"],["box-shadow","inset 0 0 0 2px $n_CFCBC4"],["position","relative"],["z-index","1"]]],[".efp-sh-track__dot svg",[0,1,1],[["width","13px"],["height","13px"],["color","$card"]]],[".efp-sh-track .efp-is-done .efp-sh-track__dot",[0,3,0],[["background","$primary"],["box-shadow","none"]]],[".efp-sh-track .efp-is-now .efp-sh-track__dot",[0,3,0],[["background","$accent"],["box-shadow","inset 0 0 0 2px $ink"]]],[".efp-sh-track strong",[0,1,1],[["display","block"],["font-size","15.5px"],["font-weight","800"],["line-height","1.3"]]],[".efp-sh-track small",[0,1,1],[["display","block"],["margin-top","1px"],["font-size","14px"],["line-height","1.35"],["color","$ink3"]]],[".efp-sh-track li:not(.efp-is-done):not(.efp-is-now) strong",[0,3,2],[["color","$ink3"],["font-weight","700"]]],[".efp-sh",[0,1,0],[["display","grid"],["gap","12px"],["padding","8px 18px 28px"]]],[".efp-sh-title",[0,1,0],[["font-size","29px"],["line-height","1.08"]]],[".efp-sh-sub2",[0,1,0],[["margin-top","-6px"],["font-size","15px"],["line-height","1.45"],["color","$ink2"]]],[".efp-sh-k",[0,1,0],[["margin","6px 2px -4px"],["font-size","16px"],["font-weight","800"]]],[".efp-sh-card",[0,1,0],[["padding","14px 16px"],["border-radius","22px"],["background","$card"],["box-shadow","0 1px 3px $wash"]]],[".efp-sh-items",[0,1,0],[["list-style","none"],["margin","0"],["padding","0"],["display","grid"],["gap","18px"]]],[".efp-sh-item",[0,1,0],[["display","grid"],["grid-template-columns","64px minmax(0, 1fr)"],["gap","12px"],["align-items","start"]]],[".efp-sh-item__img",[0,1,0],[["width","64px"],["height","64px"],["border-radius","14px"],["overflow","hidden"],["display","grid"],["place-items","center"],["background","$linkWash"],["color","$link"]]],[".efp-sh-item__img img",[0,1,1],[["width","100%"],["height","100%"],["object-fit","cover"]]],[".efp-sh-item__img svg",[0,1,1],[["width","28px"],["height","28px"]]],[".efp-sh-item h3",[0,1,1],[["font-size","16.5px"],["font-weight","800"],["line-height","1.25"]]],[".efp-sh-item__p",[0,1,0],[["display","flex"],["flex-wrap","wrap"],["align-items","center"],["gap","2px 8px"],["margin-top","3px"]]],[".efp-sh-item__p b",[0,1,1],[["font-size","16px"],["font-weight","800"],["font-variant-numeric","tabular-nums"]]],[".efp-sh-item__p s",[0,1,1],[["font-size","14px"],["font-weight","600"],["color","$ink3"]]],[".efp-sh-item__p small",[0,1,1],[["font-size","14px"],["color","$ink3"]]],[".efp-sh-item__acts",[0,1,0],[["display","flex"],["align-items","center"],["gap","16px"],["margin-top","8px"]]],[".efp-sh-step",[0,1,0],[["display","inline-grid"],["grid-template-columns","40px 30px 40px"],["align-items","center"],["height","40px"],["border-radius","999px"],["background","$card"],["box-shadow","inset 0 0 0 1.5px $n_DAD7D1"]]],[".efp-sh-step button",[0,1,1],[["height","40px"],["display","grid"],["place-items","center"],["border-radius","999px"],["transition","transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],[".efp-sh-step button svg",[0,1,2],[["width","16px"],["height","16px"]]],[".efp-sh-step button[disabled]",[0,2,1],[["opacity",".3"],["cursor","default"]]],[".efp-sh-step output",[0,1,1],[["text-align","center"],["font-size","15.5px"],["font-weight","800"],["font-variant-numeric","tabular-nums"]]],[".efp-sh-rm",[0,1,0],[["min-height","40px"],["font-size","14.5px"],["font-weight","700"],["color","$ink2"],["text-decoration","underline"],["text-decoration-thickness","1.5px"],["text-underline-offset","3px"]]],[".efp-sh-mode",[0,1,0],[["display","grid"],["gap","6px"],["margin-top","8px"]]],[".efp-sh-mode button",[0,1,1],[["display","flex"],["justify-content","space-between"],["align-items","center"],["gap","10px"],["min-height","44px"],["padding","8px 12px"],["border-radius","12px"],["background","$paper"],["font-size","14.5px"],["font-weight","700"],["line-height","1.3"],["text-align","left"],["transition","box-shadow 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],['.efp-sh-mode button[aria-checked="true"]',[0,2,1],[["background","$card"],["box-shadow","inset 0 0 0 2px $ink"]]],[".efp-sh-mode b",[0,1,1],[["font-weight","800"],["font-variant-numeric","tabular-nums"]]],[".efp-sh-item .efp-co-every",[0,2,0],[["margin-top","8px"]]],[".efp-sh-sum li.efp-is-renew",[0,2,1],[["min-height","28px"],["margin-top","-6px"],["font-size","14px"]]],[".efp-sh-sum",[0,1,0],[["list-style","none"],["margin","0"],["padding","6px 16px"],["border-radius","16px"],["background","$card"],["box-shadow","0 1px 3px $wash"]]],[".efp-sh-sum li",[0,1,1],[["display","flex"],["justify-content","space-between"],["align-items","center"],["gap","12px"],["min-height","34px"],["font-size","15px"],["font-variant-numeric","tabular-nums"]]],[".efp-sh-sum li > span:first-child",[0,2,2],[["color","$ink2"],["display","inline-flex"],["align-items","center"],["gap","8px"]]],[".efp-sh-sum li.efp-is-total",[0,2,1],[["min-height","42px"],["font-size","17px"],["font-weight","800"]]],[".efp-sh-sum li.efp-is-total span:first-child",[0,3,2],[["color","$ink"]]],[".efp-sh-foot",[0,1,0],[["display","grid"],["gap","8px"]]],[".efp-sh-foot .efp-sh-fine",[0,2,0],[["text-align","center"]]],[".efp-sh-fine",[0,1,0],[["font-size","13px"],["line-height","1.45"],["color","$ink3"]]],[".efp-sh-fine--c",[0,1,0],[["margin-top","14px"],["text-align","center"]]],[".efp-sh-empty",[0,1,0],[["display","grid"],["justify-items","center"],["gap","8px"],["padding","48px 12px 8px"],["text-align","center"]]],[".efp-sh-empty .efp-emb-tile",[0,2,0],[["width","72px"],["height","72px"],["border-radius","20px"],["margin-bottom","8px"]]],[".efp-sh-empty .efp-emb-tile svg",[0,2,1],[["width","34px"],["height","34px"]]],[".efp-sh-empty h2",[0,1,1],[["font-size","28px"],["line-height","1.1"]]],[".efp-sh-empty p",[0,1,1],[["max-width","30ch"],["font-size","15.5px"],["line-height","1.45"],["color","$ink2"],["text-wrap","pretty"]]],[".efp-sh-empty .efp-emb-btn",[0,2,0],[["margin-top","12px"]]],[".efp-sh-link",[0,1,0],[["min-height","40px"],["font-size","15px"],["font-weight","700"],["color","$link"],["text-decoration","underline"],["text-decoration-thickness","1.5px"],["text-underline-offset","3px"]]],[".efp-sh-subc",[0,1,0],[["display","grid"],["grid-template-columns","56px minmax(0, 1fr) auto"],["gap","12px"],["align-items","center"],["padding","12px 14px 12px 12px"],["border-radius","22px"],["background","$clearBg"]]],[".efp-sh-subc img",[0,1,1],[["width","56px"],["height","56px"],["border-radius","14px"],["object-fit","cover"],["background","$card"]]],[".efp-sh-subc strong",[0,1,1],[["display","block"],["font-size","16px"],["font-weight","800"],["line-height","1.25"]]],[".efp-sh-subc small",[0,1,1],[["display","block"],["margin-top","2px"],["font-size","14px"],["line-height","1.35"],["color","$ink2"]]],[".efp-sh-subc button",[0,1,1],[["min-height","40px"],["padding","0 14px"],["border-radius","999px"],["background","$card"],["font-size","14px"],["font-weight","800"],["box-shadow","inset 0 0 0 1.5px $ink"],["transition","transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],[".efp-sh-orders",[0,1,0],[["list-style","none"],["margin","0"],["padding","0"],["display","grid"],["gap","10px"]]],[".efp-sh-order",[0,1,0],[["width","100%"],["display","grid"],["grid-template-columns","minmax(0, 1fr) 18px"],["gap","10px"],["align-items","center"],["padding","14px 14px 14px 16px"],["border-radius","22px"],["background","$card"],["box-shadow","0 1px 3px $wash"],["text-align","left"],["transition","transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"]]],[".efp-sh-order > svg",[0,1,1],[["width","18px"],["height","18px"],["color","$ink3"]]],[".efp-sh-order__top",[0,1,0],[["display","flex"],["flex-wrap","wrap"],["align-items","center"],["gap","4px 10px"]]],[".efp-sh-order__no",[0,1,0],[["font-family","$mono"],["font-size","12px"],["letter-spacing",".04em"],["color","$ink3"]]],[".efp-sh-order__what",[0,1,0],[["display","block"],["margin-top","8px"],["font-size","16px"],["font-weight","800"],["line-height","1.3"]]],[".efp-sh-order__meta",[0,1,0],[["display","block"],["margin-top","2px"],["font-size","14px"],["line-height","1.4"],["color","$ink3"]]],[".efp-sh-order__pics",[0,1,0],[["display","flex"],["gap","6px"],["margin-top","10px"]]],[".efp-sh-order__pics span",[0,1,1],[["width","40px"],["height","40px"],["border-radius","10px"],["overflow","hidden"],["display","grid"],["place-items","center"],["background","$linkWash"],["color","$link"]]],[".efp-sh-order__pics img",[0,1,1],[["width","100%"],["height","100%"],["object-fit","cover"]]],[".efp-sh-order__pics svg",[0,1,1],[["width","20px"],["height","20px"]]],[".efp-sh-pill",[0,1,0],[["display","inline-flex"],["align-items","center"],["gap","6px"],["min-height","26px"],["padding","0 10px"],["border-radius","999px"],["font-size","13px"],["font-weight","800"],["background","$accent3"],["color","$ink"]]],[".efp-sh-pill--done",[0,1,0],[["background","$clearBg"],["color","$clearInk"]]],[".efp-sh-pill--sub",[0,1,0],[["background","$linkWash"],["color","$link"]]],[".efp-sh-carrier",[0,1,0],[["display","grid"],["grid-template-columns","40px minmax(0, 1fr)"],["gap","4px 12px"],["align-items","center"]]],[".efp-sh-carrier__ic",[0,1,0],[["width","40px"],["height","40px"],["border-radius","11px"],["background","$linkWash"],["color","$link"],["display","grid"],["place-items","center"]]],[".efp-sh-carrier__ic svg",[0,1,1],[["width","21px"],["height","21px"]]],[".efp-sh-carrier strong",[0,1,1],[["display","block"],["font-size","16px"],["font-weight","800"]]],[".efp-sh-carrier small",[0,1,1],[["display","flex"],["flex-wrap","wrap"],["align-items","center"],["gap","2px 8px"],["margin-top","1px"],["font-family","$mono"],["font-size","13px"],["letter-spacing",".02em"],["color","$ink2"]]],[".efp-sh-carrier .efp-emb-btn",[0,2,0],[["grid-column","1 / -1"],["margin-top","10px"]]],[".efp-sh-carrier__wait",[0,1,0],[["grid-column","2"],["font-size","14.5px"],["line-height","1.4"],["color","$ink2"]]],[".efp-sh-acts",[0,1,0],[["display","grid"],["gap","4px"],["justify-items","center"],["margin-top","4px"]]],[".efp-hp-next__ic img",[0,1,1],[["width","100%"],["height","100%"],["object-fit","cover"],["border-radius","11px"]]],[".efp-co-items",[0,1,0],[["list-style","none"],["margin","0"],["padding","0"],["display","grid"],["gap","10px"]]],[".efp-co-items li",[0,1,1],[["display","grid"],["grid-template-columns","44px minmax(0, 1fr) auto"],["gap","12px"],["align-items","center"],["font-size","15px"]]],[".efp-co-items .efp-sh-order__pics",[0,2,0],[["margin","0"]]],[".efp-co-items strong",[0,1,1],[["display","block"],["font-size","15.5px"],["font-weight","800"],["line-height","1.25"]]],[".efp-co-items small",[0,1,1],[["display","block"],["font-size","13.5px"],["color","$ink3"]]],[".efp-co-items b",[0,1,1],[["font-weight","800"],["font-variant-numeric","tabular-nums"]]],[".efp-co .efp-sh-sum",[0,2,0],[["background","$paper"],["box-shadow","none"]]],[".efp-co-items .efp-sh-order__pics span",[0,2,1],[["width","44px"],["height","44px"]]],[".efp-sh .efp-co-rows",[0,2,0],[["background","$card"],["box-shadow","0 1px 3px $wash"]]],[".efp-wt-f",[0,1,0],[["display","grid"],["gap","8px"],["margin-top","14px"],["font-size","15px"],["font-weight","700"]]],[".efp-wt-f__in",[0,1,0],[["position","relative"]]],[".efp-wt-f input",[0,1,1],[["width","100%"],["height","58px"],["border","0"],["border-radius","16px"],["padding","0 56px 0 18px"],["background","$card"],["box-shadow","inset 0 0 0 1.5px $n_DAD7D1"],["font-size","24px"],["font-weight","800"],["font-variant-numeric","tabular-nums"],["outline","none"]]],[".efp-wt-f input[data-ef-focus]",[0,2,1],[["box-shadow","inset 0 0 0 2.5px $ink"]]],[".efp-wt-f__u",[0,1,0],[["position","absolute"],["right","18px"],["top","50%"],["translate","0 -50%"],["font-size","17px"],["font-weight","700"],["color","$ink3"],["pointer-events","none"]]],[".efp-wt-err",[0,1,0],[["min-height","20px"],["margin-top","6px"],["font-size","14px"],["font-weight","700"],["color","$riskInk"]]],[".efp-wt-acts",[0,1,0],[["display","grid"],["gap","8px"],["margin-top","10px"]]],[".efp-hp-ask-row strong",[0,1,1],[["text-wrap","balance"]]],[".efp-sh-order__what",[0,1,0],[["text-wrap","balance"]]],[".efp-sh-item h3",[0,1,1],[["text-wrap","balance"]]],[".efp-co-items strong",[0,1,1],[["text-wrap","balance"]]],[".efp-sh-subc strong",[0,1,1],[["text-wrap","balance"]]],[".efp-hp-ask-row small",[0,1,1],[["text-wrap","pretty"]]],[".efp-hp-tip small",[0,1,1],[["text-wrap","pretty"]]],[".efp-sh-carrier__wait",[0,1,0],[["text-wrap","pretty"]]],[".efp-sh-fine",[0,1,0],[["text-wrap","pretty"]]],[".efp-sh-sub2",[0,1,0],[["text-wrap","pretty"]]],[".efp-hp-next span",[0,1,1],[["text-wrap","pretty"]]],[".efp-hp-wait__text",[0,1,0],[["text-wrap","pretty"]]],[".efp-wt-err",[0,1,0],[["text-wrap","pretty"]]],[".efp-hp-foot-stack",[0,1,0],[["display","grid"],["gap","10px"]]],[".efp-blanks",[0,1,0],[["display","grid"],["gap","8px"],["background","$paper"],["border-radius","20px"],["padding","12px 12px 13px"]]],[".efp-blanks__h",[0,1,0],[["display","flex"],["justify-content","space-between"],["align-items","center"],["gap","10px"],["padding","0 2px 2px"],["font-size","12.5px"],["font-weight","800"],["letter-spacing",".07em"],["text-transform","uppercase"],["color","$ink3"]]],[".efp-blanks__h em",[0,1,1],[["font-style","normal"],["letter-spacing",".01em"],["text-transform","none"],["font-size","13px"],["font-weight","800"],["color","$ink"],["background","$accent"],["border-radius","999px"],["padding","2px 10px"],["white-space","nowrap"]]],['.efp-blanks[data-st="filled"] .efp-blanks__h em',[0,3,1],[["background","$clearBg"],["color","$clearInk"]]],[".efp-blanks ol",[0,1,1],[["list-style","none"],["margin","0"],["padding","0"],["display","grid"],["gap","7px"]]],[".efp-blanks li",[0,1,1],[["display","grid"],["grid-template-columns","34px minmax(0, 1fr)"],["column-gap","11px"],["align-items","center"],["background","$card"],["border-radius","15px"],["padding","9px 12px 9px 9px"]]],[".efp-blanks li > b",[0,1,2],[["grid-row","span 2"],["width","34px"],["height","40px"],["border-radius","11px"],["display","grid"],["place-items","center"],["font-family","$serif"],["font-size","22px"],["font-weight","800"]]],[".efp-blanks li > b",[0,1,2],[["background","$accentChip"]]],[".efp-blanks li > span",[0,1,2],[["font-size","16px"],["font-weight","700"],["line-height","1.35"]]],[".efp-blanks li > small",[0,1,2],[["font-size","13.5px"],["color","$ink3"]]],[".efp-blank",[0,1,0],[["display","inline-block"],["min-width","36px"],["height","20px"],["vertical-align","-3px"],["border-radius","6px"],["background","$accent4"],["box-shadow","inset 0 0 0 1.5px $accent"],["font-style","normal"]]],[".efp-blank--s",[0,1,0],[["min-width","24px"]]],[".efp-blank--l",[0,1,0],[["min-width","64px"]]],['.efp-blanks[data-st="filled"] .efp-blank',[0,3,0],[["height","auto"],["min-width","0"],["vertical-align","0"],["background","none"],["box-shadow","none"],["padding","0 3px"],["margin","0 -3px"],["border-radius","6px"]]],[".efp-hp-blanks",[0,1,0],[["margin-top","14px"]]],[".efp-hp-blanks .efp-blanks",[0,2,0],[["background","$card"],["box-shadow","0 1px 3px $wash"]]],[".efp-hp-blanks .efp-blanks li",[0,2,1],[["background","$paper"]]],[".efp-mg-orders",[0,1,0],[["justify-self","center"]]],[".efp-hp",[0,1,0],[["background","$paper"]]],[".efp-ph-toast",[0,1,0],[["top","calc(112px - 50px)"]]],[".efp-hp-jump:not(:has(> img))",[0,1,1],[["grid-template-columns","minmax(0, 1fr) auto"]]],[".efp-hp-by:not(:has(> img))",[0,1,1],[["grid-template-columns","minmax(0, 1fr) 22px"],["grid-template-rows","minmax(40px, auto)"]]],[".efp-hp-others",[0,1,0],[["list-style","none"],["margin-bottom","0"]]],[".efp-hp-today .efp-hp-odds__k",[0,2,0],[["text-wrap","balance"]]],[".efp-co-opts",[0,1,0],[["list-style","none"],["padding","0"]]],[".efp-sheet__x",[0,1,0],[["position","relative"]]],[".efp-ph-sheet",[0,2,0],[["max-height","calc(100% - 8px)"],["padding","8px 20px 14px"]],1],[".efp-sheet__grab",[0,2,0],[["display","none"]],1],[".efp-co",[0,2,0],[["gap","8px"]],1],[".efp-co-rows li",[0,2,1],[["min-height","36px"]],1],[".efp-hp-swipe",[0,2,0],[["scrollbar-width","thin"],["scrollbar-color","$n_CFCBC4 transparent"],["padding-bottom","10px"]],1],[".efp-ph-toast.efp-ph-toast--card",[0,2,0],[["background","none"],["padding","0"],["border-radius","0"]]]],PLAN_PRESS=[[".efp-emb-btn","scale(.97)"],[".efp-hp-on button","scale(.96)"],[".efp-hp-jump","scale(.98)"],[".efp-hp-opt","scale(.98)"],[".efp-hp-sec .efp-hp-add","scale(.98)"],[".efp-hp-x__go","scale(.96)"],[".efp-co-every button","scale(.96)"],[".efp-hp-ask-row","scale(.98)"],[".efp-sh-step button","scale(.9)"],[".efp-sh-mode button","scale(.98)"],[".efp-sh-subc button","scale(.96)"],[".efp-sh-order","scale(.98)"]],PLAN_ICONS={shield:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"},[["path",{d:"M12 3l7 3v6c0 4.5-3 7.5-7 9-4-1.5-7-4.5-7-9V6z"},[]],["path",{d:"m9 12 2 2 4-4"},[]]]]],arrow:[["path",{d:"M4.5 12h14.5M13.5 6.5 19 12l-5.5 5.5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[]]],check:[["path",{d:"m5 12.6 4.4 4.4L19 7.4",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"},[]]],star:[["path",{d:"m12 3.5 2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.9l-5.2 2.7 1-5.8-4.3-4.1 5.9-.9z",fill:"currentColor"},[]]],truck:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"},[["path",{d:"M2.8 6.5h11.4v9.5H2.8zM14.2 9.5h3.6l3.4 3.4v3.1h-7"},[]],["circle",{cx:"6.8",cy:"17.6",r:"1.8"},[]],["circle",{cx:"17.2",cy:"17.6",r:"1.8"},[]]]]],refresh:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"},[["path",{d:"M4 12a8 8 0 1 0 3-6.2"},[]],["path",{d:"M4 4v4h4"},[]]]]],card:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"},[["rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.2"},[]],["path",{d:"M3 9.5h18M6.5 15h4",strokeLinecap:"round"},[]]]]],alert:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"},[["path",{d:"M12 3.5 21.5 20h-19z"},[]],["path",{d:"M12 10v4.5M12 17.2h.01"},[]]]]],x:[["path",{d:"M6.5 6.5l11 11M17.5 6.5l-11 11",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},[]]],chat:[["path",{d:"M5 5.2h14a1.6 1.6 0 0 1 1.6 1.6v8.6a1.6 1.6 0 0 1-1.6 1.6h-8.7l-4.8 3.6v-3.6H5a1.6 1.6 0 0 1-1.6-1.6V6.8A1.6 1.6 0 0 1 5 5.2z",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"},[]]],repeat:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"},[["path",{d:"M4.5 11a7.5 7.5 0 0 1 12.8-5.3L19.5 8M19.5 3.5V8H15M19.5 13a7.5 7.5 0 0 1-12.8 5.3L4.5 16M4.5 20.5V16H9"},[]]]]],calendar:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"},[["rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2.5"},[]],["path",{d:"M4 10h16M8.5 3.5v4M15.5 3.5v4"},[]]]]],flame:[["path",{fillRule:"evenodd",d:"M12 2.5c.4 2.9-1.3 4.6-2.9 6.3C7.6 10.4 6 12.2 6 14.9 6 18.3 8.7 21 12 21s6-2.7 6-6.1c0-2.3-1-4.1-2.3-5.6-.1 1.5-.9 2.6-2 3.1.6-3.9-.5-7.3-1.7-8.9zM12 19.2c-1.5 0-2.6-1.1-2.6-2.5 0-1.5 1.2-2.4 2.1-3.4.3 1 .9 1.6 1.6 1.9.1-.5.1-1 0-1.5 1 .9 1.6 1.9 1.6 3 0 1.4-1.2 2.5-2.7 2.5z",fill:"currentColor"},[]]],box:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"},[["path",{d:"M3.8 7.8 12 4l8.2 3.8v8.6L12 20l-8.2-3.6z"},[]],["path",{d:"m3.8 7.8 8.2 3.8 8.2-3.8M12 11.6V20"},[]]]]],cart:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"},[["path",{d:"M2.8 4h2.6l2.3 10.6a1.4 1.4 0 0 0 1.4 1.1h8.2a1.4 1.4 0 0 0 1.4-1.1L20.4 7.6H6.3"},[]],["circle",{cx:"9.6",cy:"19.6",r:"1.3"},[]],["circle",{cx:"17.1",cy:"19.6",r:"1.3"},[]]]]],minus:[["path",{d:"M6 12h12",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round"},[]]],plus:[["path",{d:"M12 6v12M6 12h12",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round"},[]]],chev:[["path",{d:"m9 5.5 6.5 6.5L9 18.5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[]]],pulse:[["path",{d:"M3 12.5h3.8l2.4-5.6 4.2 10.6 2.4-5h5.2",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"},[]]],file:[["path",{d:"M7 3.5h7.2l4.3 4.3v12.2a.6.6 0 0 1-.6.6H7a.6.6 0 0 1-.6-.6V4.1a.6.6 0 0 1 .6-.6zM14 3.6V8h4.4M9.4 12.4h5.2M9.4 15.8h5.2",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"},[]]],kit:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"},[["path",{d:"M4 7.6 12 3.6l8 4v8.8l-8 4-8-4z"},[]],["path",{d:"m4 7.6 8 4 8-4M12 11.6v8.8"},[]]]]],dna:[["path",{d:"M7 3.5c0 4.2 10 4.3 10 8.5s-10 4.3-10 8.5M17 3.5c0 4.2-10 4.3-10 8.5s10 4.3 10 8.5M8.6 6.3h6.8M8.6 17.7h6.8M10.4 9.6h3.2M10.4 14.4h3.2",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"},[]]],heart:[["path",{d:"M12 20.2s-7.6-4.6-7.6-10.1A4.3 4.3 0 0 1 12 7.6a4.3 4.3 0 0 1 7.6 2.5c0 5.5-7.6 10.1-7.6 10.1z",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"},[]]],bottle:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"},[["rect",{x:"8",y:"2.8",width:"8",height:"3.4",rx:"1"},[]],["path",{d:"M7.2 6.2h9.6a1 1 0 0 1 1 1v12.3a1.7 1.7 0 0 1-1.7 1.7H7.9a1.7 1.7 0 0 1-1.7-1.7V7.2a1 1 0 0 1 1-1z"},[]],["path",{d:"M9 11h6v5H9z"},[]]]]],harness:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",strokeLinecap:"round"},[["path",{d:"M7.5 4.5c0 4.2 2 6.8 4.5 6.8s4.5-2.6 4.5-6.8"},[]],["path",{d:"M5 12.6h14v4.6a2.3 2.3 0 0 1-2.3 2.3H7.3A2.3 2.3 0 0 1 5 17.2z"},[]],["circle",{cx:"12",cy:"10.2",r:"1.3"},[]],["path",{d:"M8.2 15.3h7.6"},[]]]]],ramp:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",strokeLinecap:"round"},[["path",{d:"M2.5 19.5h19"},[]],["path",{d:"M3.5 19.5v-3h4.5v-3h4.5v-3H17V7.5h3.5v12"},[]],["path",{d:"M3.5 16.5 20.5 7.5",opacity:".35"},[]]]]]};var PLAN_BEFORE_CLASS="efp-before";export{EverfurConfigError,PLAN_BEFORE_CLASS,PLAN_CLASS_PREFIX,PLAN_CONTEXT,PLAN_ICONS,PLAN_PRESS,PLAN_RULES,err,ok,parseUrl,planTokens};
@@ -1,6 +1,6 @@
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 client";
3
- import{everfurTheme,iconCss,skeletonCss,useEfdsPart,useTheme,useImageShown,BlockImg,BlockIcon,cx,dataOf,useLinkComponent,Skeleton,itemTestID,stepTo,ThemeProvider,useDsStyles,quantityStepperSpec,MIN_TARGET,clampStep,pillSpec,useEverfurTheme,SvgIcon,useWebPressLayer,faceCss,cssMonoFamily,headingFaceCss,EVERFUR_LIGHT,EVERFUR_DARK,v3Palette,mixColor}from"./chunk-AT7SU763.js";import{forwardRef,useState,createElement,useMemo}from"react";import{jsx,jsxs}from"react/jsx-runtime";var UI_ICON_BOX={viewBox:"0 0 24 24",children:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"},[]],["path",{d:"M12 22V12"},[]],["path",{d:"M3.29 7 12 12l8.71-5"},[]],["path",{d:"m7.5 4.27 9 5.15"},[]]]]]};var UI_ICON_MINUS={viewBox:"0 0 24 24",children:[["path",{d:"M5 12h14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},[]]]};var UI_ICON_PLUS={viewBox:"0 0 16 16",children:[["g",{fill:"none"},[["g",{},[["path",{d:"M3.33333 8H12.6667",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"},[]],["path",{d:"M8 3.33333V12.6667",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"},[]]]]]]]};var Pill=/* @__PURE__ */forwardRef(function({label:label,tone:tone="plain",testID:testID,className:className,style:style,...rest},ref){useEfdsPart("pill");let t=useTheme(),dot=pillSpec(t,tone).dot!==null;/* @__PURE__ */
3
+ import{everfurTheme,iconCss,skeletonCss,useEfdsPart,useTheme,useImageShown,BlockImg,BlockIcon,cx,dataOf,useLinkComponent,Skeleton,itemTestID,stepTo,ThemeProvider,useDsStyles,quantityStepperSpec,MIN_TARGET,clampStep,pillSpec,useEverfurTheme,SvgIcon,useWebPressLayer,faceCss,cssMonoFamily,headingFaceCss,EVERFUR_LIGHT,EVERFUR_DARK,v3Palette,mixColor}from"./chunk-EMINPX6C.js";import{forwardRef,useState,createElement,useMemo}from"react";import{jsx,jsxs}from"react/jsx-runtime";var UI_ICON_BOX={viewBox:"0 0 24 24",children:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"},[]],["path",{d:"M12 22V12"},[]],["path",{d:"M3.29 7 12 12l8.71-5"},[]],["path",{d:"m7.5 4.27 9 5.15"},[]]]]]};var UI_ICON_MINUS={viewBox:"0 0 24 24",children:[["path",{d:"M5 12h14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},[]]]};var UI_ICON_PLUS={viewBox:"0 0 16 16",children:[["g",{fill:"none"},[["g",{},[["path",{d:"M3.33333 8H12.6667",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"},[]],["path",{d:"M8 3.33333V12.6667",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"},[]]]]]]]};var Pill=/* @__PURE__ */forwardRef(function({label:label,tone:tone="plain",testID:testID,className:className,style:style,...rest},ref){useEfdsPart("pill");let t=useTheme(),dot=pillSpec(t,tone).dot!==null;/* @__PURE__ */
4
4
  return jsxs("span",{ref:ref,...dataOf(rest),"data-testid":testID,className:cx("efds-pill",tone!=="plain"&&`efds-pill--${tone}`,className),style:style,children:[dot?/* @__PURE__ */jsx("span",{"aria-hidden":"true",className:"efds-pill__dot"}):null,label]})});function StepButton({off:off,bound:bound,name:name,label:label,small:small,part:part,onPress:onPress,trackId:trackId,testID:testID}){let press=useWebPressLayer("QuantityStepper",{testID:testID,item:name==="minus"?"fewer":"more",label:label,trackId:trackId,disabled:off},off?void 0:onPress);/* @__PURE__ */
5
5
  return jsxs("button",{type:"button","aria-label":label,disabled:off&&!bound,"aria-disabled":off&&bound||void 0,"data-testid":testID,className:`${part}__button`,onClick:press.onPress,onPointerDown:press.onPointerDown,children:[small?/* @__PURE__ */jsx("span",{"aria-hidden":"true","data-hit":"",className:"efds-hit efds-hit--x"}):null,
6
6
  /* @__PURE__ */jsx(SvgIcon,{icon:name==="minus"?UI_ICON_MINUS:UI_ICON_PLUS})]})}var QuantityStepper=/* @__PURE__ */forwardRef(function({value:value,min:min=1,max:max,label:label,fewerLabel:fewerLabel,moreLabel:moreLabel,disabled:disabled=false,variant:variant="standard",onChange:onChange,trackId:trackId,haptic:_haptic,testID:testID,className:className,style:style,...rest},ref){useEfdsPart("quantityStepper");let t=useTheme(),compact=variant==="compact",part=compact?"efds-cstepper":"efds-stepper",small=(compact?t.metrics.variants.stepper.button.h:quantityStepperSpec(t).button)<MIN_TARGET,lessOff=disabled||value<=min,moreOff=disabled||max!==void 0&&value>=max;/* @__PURE__ */
@@ -1,6 +1,6 @@
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 client";
3
- import{iconCss,skeletonCss,useEfdsPart,cx,dataOf,Skeleton,SvgIcon,UI_ICON_CHEVRON,BlockIcon,useTheme,useImageShown,blocksMetrics,BlockImg,useUiSurface,buttonSpec,useWebPressLayer,MIN_TARGET,ariaOf,Icon,partClass,useLinkComponent}from"./chunk-AT7SU763.js";import{forwardRef,useState,createElement}from"react";import{jsx,jsxs,Fragment}from"react/jsx-runtime";var UI_ICON_ARROW_LEFT={viewBox:"0 0 24 24",children:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[["path",{d:"m12 19-7-7 7-7"},[]],["path",{d:"M19 12H5"},[]]]]]};function webSrc(image){return typeof image=="string"?image||null:image&&typeof image=="object"&&image.uri||null}function Photo({image:image,onImageError:onImageError,className:className,img:img}){let[failed,setFailed]=useState(null),src=webSrc(image),live=src&&failed!==image?src:null,{shown:shown,onLoad:onLoad,ref:ref}=useImageShown(live);return live?/* @__PURE__ */jsx(BlockImg,{src:live,alt:"",imageLoading:img.imageLoading,imageReferrerPolicy:img.imageReferrerPolicy,shown:shown,onLoad:onLoad,imgRef:ref,onError:()=>{image!=null&&(setFailed(image),onImageError?.(image))},className:className}):/* @__PURE__ */jsx("span",{"aria-hidden":"true",className:className})}function jumpStrip(jump,testID,k,img){let photo=webSrc(jump.image)!==null,inner=/* @__PURE__ */jsxs(Fragment,{children:[photo?/* @__PURE__ */jsx(Photo,{image:jump.image,onImageError:jump.onImageError,className:"efds-plan-need__jump-img",img:img}):null,
3
+ import{iconCss,skeletonCss,useEfdsPart,cx,dataOf,Skeleton,SvgIcon,UI_ICON_CHEVRON,BlockIcon,useTheme,useImageShown,blocksMetrics,BlockImg,useUiSurface,buttonSpec,useWebPressLayer,MIN_TARGET,ariaOf,Icon,partClass,useLinkComponent}from"./chunk-EMINPX6C.js";import{forwardRef,useState,createElement}from"react";import{jsx,jsxs,Fragment}from"react/jsx-runtime";var UI_ICON_ARROW_LEFT={viewBox:"0 0 24 24",children:[["g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[["path",{d:"m12 19-7-7 7-7"},[]],["path",{d:"M19 12H5"},[]]]]]};function webSrc(image){return typeof image=="string"?image||null:image&&typeof image=="object"&&image.uri||null}function Photo({image:image,onImageError:onImageError,className:className,img:img}){let[failed,setFailed]=useState(null),src=webSrc(image),live=src&&failed!==image?src:null,{shown:shown,onLoad:onLoad,ref:ref}=useImageShown(live);return live?/* @__PURE__ */jsx(BlockImg,{src:live,alt:"",imageLoading:img.imageLoading,imageReferrerPolicy:img.imageReferrerPolicy,shown:shown,onLoad:onLoad,imgRef:ref,onError:()=>{image!=null&&(setFailed(image),onImageError?.(image))},className:className}):/* @__PURE__ */jsx("span",{"aria-hidden":"true",className:className})}function jumpStrip(jump,testID,k,img){let photo=webSrc(jump.image)!==null,inner=/* @__PURE__ */jsxs(Fragment,{children:[photo?/* @__PURE__ */jsx(Photo,{image:jump.image,onImageError:jump.onImageError,className:"efds-plan-need__jump-img",img:img}):null,
4
4
  /* @__PURE__ */jsxs("span",{className:"efds-plan-need__jump-words",children:[
5
5
  /* @__PURE__ */jsx("small",{className:"efds-plan-need__jump-kicker",children:jump.kicker}),
6
6
  /* @__PURE__ */jsx("strong",{className:"efds-plan-need__jump-title",children:jump.title})]}),
@@ -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 zod=require("zod");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}}function contractDocUrl(entry){return entry.envelope==="sse_frame"?`/errors#sse-${entry.wireCode}`:entry.envelope==="oauth_error"?`/errors#oauth-${entry.wireCode}`:`/errors#${entry.wireCode}`}var DOC_SITE_ORIGIN=null;function publishedDocUrl(entry){return null}var EVERFUR_ERROR_CODES=/* @__PURE__ */Object.freeze(["authExpired","authRejected","sessionRequired","accessDenied","paymentRequired","quotaExceeded","rateLimited","validationFailed","sdkUpdateRequired","conflict","idempotencyConflict","idempotencyInFlight","conversationNotFound","petNotFound","resourceNotFound","streamTimeout","mediaUploadFailed","moderationBlocked","upstreamLlmTimeout","internalError","notImplemented","serviceUnavailable","streamIncomplete","identitySignatureRequired","runtimeDisposed","unknown"]),EVERFUR_ERROR_CATEGORIES=/* @__PURE__ */Object.freeze(["authentication","authorization","entitlement","rateLimit","invalidRequest","notFound","conflict","connection","server","media","policy","unknown"]),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"}}function fromHttpStatus(status){return status===401?"authExpired":status===403?"accessDenied":status===404?"conversationNotFound":status===409?"idempotencyConflict":status===421?"unknown":status===429?"rateLimited":status===400||status===422?"unknown":status>=500?"internalError":"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)}function shouldRetry(code,frameRetryable=false){return frameRetryable||isAutoRetryable(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)}function canRecreateOnNotFound(code){return code==="conversationNotFound"}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 isLinkedAccountReadOnly(error){return error!=null&&error.code==="conflict"&&error.reasonCode===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 ok(value,warning){/* @__PURE__ */
3
3
  return Object.freeze(warning===void 0?{ok:true,value:value}:{ok:true,value:value,warning:warning})}function err(error){/* @__PURE__ */
4
- return Object.freeze({ok:false,error:error})}function isOk(r){return r.ok}function isErr(r){return!r.ok}var EverfurThrownError=class _EverfurThrownError extends Error{constructor(error){super(`${error.code}: ${error.displayMessage}`),this.name="EverfurThrownError",this.error=error,this.code=error.code,this.category=error.category,Object.setPrototypeOf(this,_EverfurThrownError.prototype)}};function unwrap(r){if(r.ok)return r.value;throw new EverfurThrownError(r.error)}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;var SDK_VERSION="0.22.0";var SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
+ return Object.freeze({ok:false,error:error})}function isOk(r){return r.ok}function isErr(r){return!r.ok}var EverfurThrownError=class _EverfurThrownError extends Error{constructor(error){super(`${error.code}: ${error.displayMessage}`),this.name="EverfurThrownError",this.error=error,this.code=error.code,this.category=error.category,Object.setPrototypeOf(this,_EverfurThrownError.prototype)}};function unwrap(r){if(r.ok)return r.value;throw new EverfurThrownError(r.error)}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;var SDK_VERSION="1.0.0";var SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
5
5
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function checkPublishableKey(raw){let publishableKey=typeof raw=="string"?raw.trim():"";return publishableKey.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(publishableKey)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}function tryResolveClientConfig(config,options){let keyFailure=checkPublishableKey(config?.publishableKey);if(keyFailure!==null)/* @__PURE__ */
6
6
  return Object.freeze({ok:false,failure:keyFailure});let publishableKey=config.publishableKey.trim(),baseUrl=tryResolveApiBaseUrl(config.apiBaseUrl);if(!baseUrl.ok)return baseUrl;let contractVersion=config.contractVersion?.trim()||DEFAULT_CONTRACT_VERSION;/* @__PURE__ */
7
7
  return Object.freeze({ok:true,config:/* @__PURE__ */Object.freeze({publishableKey:publishableKey,apiBaseUrl:baseUrl.value,contractVersion:contractVersion,sdkVersion:SDK_VERSION,platform:options?.platform??SDK_PLATFORM,debug:config.debug===true})})}function resolveClientConfig(config,options){let outcome=tryResolveClientConfig(config,options);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.config}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
@@ -86,7 +86,7 @@ declare function publishedDocUrl(entry: ContractErrorRow): string | null;
86
86
  * Package semver, sent as X-Everfur-SDK-Version. MUST track package.json version (release checklist Item 12
87
87
  * keeps the npm semver tag and this constant in lockstep). Set inside the SDK, never by partner code.
88
88
  */
89
- declare const SDK_VERSION = "0.22.0";
89
+ declare const SDK_VERSION = "1.0.0";
90
90
 
91
91
  /**
92
92
  * Parse a permissive colour into a normalized string (`#RRGGBB` when opaque, else `rgba(r,g,b,a)`), or null.
@@ -86,7 +86,7 @@ declare function publishedDocUrl(entry: ContractErrorRow): string | null;
86
86
  * Package semver, sent as X-Everfur-SDK-Version. MUST track package.json version (release checklist Item 12
87
87
  * keeps the npm semver tag and this constant in lockstep). Set inside the SDK, never by partner code.
88
88
  */
89
- declare const SDK_VERSION = "0.22.0";
89
+ declare const SDK_VERSION = "1.0.0";
90
90
 
91
91
  /**
92
92
  * Parse a permissive colour into a normalized string (`#RRGGBB` when opaque, else `rgba(r,g,b,a)`), or null.
@@ -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
  import{z}from"zod";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}}function contractDocUrl(entry){return entry.envelope==="sse_frame"?`/errors#sse-${entry.wireCode}`:entry.envelope==="oauth_error"?`/errors#oauth-${entry.wireCode}`:`/errors#${entry.wireCode}`}var DOC_SITE_ORIGIN=null;function publishedDocUrl(entry){return null}var EVERFUR_ERROR_CODES=/* @__PURE__ */Object.freeze(["authExpired","authRejected","sessionRequired","accessDenied","paymentRequired","quotaExceeded","rateLimited","validationFailed","sdkUpdateRequired","conflict","idempotencyConflict","idempotencyInFlight","conversationNotFound","petNotFound","resourceNotFound","streamTimeout","mediaUploadFailed","moderationBlocked","upstreamLlmTimeout","internalError","notImplemented","serviceUnavailable","streamIncomplete","identitySignatureRequired","runtimeDisposed","unknown"]),EVERFUR_ERROR_CATEGORIES=/* @__PURE__ */Object.freeze(["authentication","authorization","entitlement","rateLimit","invalidRequest","notFound","conflict","connection","server","media","policy","unknown"]),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"}}function fromHttpStatus(status){return status===401?"authExpired":status===403?"accessDenied":status===404?"conversationNotFound":status===409?"idempotencyConflict":status===421?"unknown":status===429?"rateLimited":status===400||status===422?"unknown":status>=500?"internalError":"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)}function shouldRetry(code,frameRetryable=false){return frameRetryable||isAutoRetryable(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)}function canRecreateOnNotFound(code){return code==="conversationNotFound"}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 isLinkedAccountReadOnly(error){return error!=null&&error.code==="conflict"&&error.reasonCode===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 ok(value,warning){/* @__PURE__ */
3
3
  return Object.freeze(warning===void 0?{ok:true,value:value}:{ok:true,value:value,warning:warning})}function err(error){/* @__PURE__ */
4
- return Object.freeze({ok:false,error:error})}function isOk(r){return r.ok}function isErr(r){return!r.ok}var EverfurThrownError=class _EverfurThrownError extends Error{constructor(error){super(`${error.code}: ${error.displayMessage}`),this.name="EverfurThrownError",this.error=error,this.code=error.code,this.category=error.category,Object.setPrototypeOf(this,_EverfurThrownError.prototype)}};function unwrap(r){if(r.ok)return r.value;throw new EverfurThrownError(r.error)}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;var SDK_VERSION="0.22.0";var SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
+ return Object.freeze({ok:false,error:error})}function isOk(r){return r.ok}function isErr(r){return!r.ok}var EverfurThrownError=class _EverfurThrownError extends Error{constructor(error){super(`${error.code}: ${error.displayMessage}`),this.name="EverfurThrownError",this.error=error,this.code=error.code,this.category=error.category,Object.setPrototypeOf(this,_EverfurThrownError.prototype)}};function unwrap(r){if(r.ok)return r.value;throw new EverfurThrownError(r.error)}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;var SDK_VERSION="1.0.0";var SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
5
5
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function checkPublishableKey(raw){let publishableKey=typeof raw=="string"?raw.trim():"";return publishableKey.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(publishableKey)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}function tryResolveClientConfig(config,options){let keyFailure=checkPublishableKey(config?.publishableKey);if(keyFailure!==null)/* @__PURE__ */
6
6
  return Object.freeze({ok:false,failure:keyFailure});let publishableKey=config.publishableKey.trim(),baseUrl=tryResolveApiBaseUrl(config.apiBaseUrl);if(!baseUrl.ok)return baseUrl;let contractVersion=config.contractVersion?.trim()||DEFAULT_CONTRACT_VERSION;/* @__PURE__ */
7
7
  return Object.freeze({ok:true,config:/* @__PURE__ */Object.freeze({publishableKey:publishableKey,apiBaseUrl:baseUrl.value,contractVersion:contractVersion,sdkVersion:SDK_VERSION,platform:options?.platform??SDK_PLATFORM,debug:config.debug===true})})}function resolveClientConfig(config,options){let outcome=tryResolveClientConfig(config,options);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.config}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
@@ -10,7 +10,7 @@ return Object.freeze({kind:"done",terminal:true,conversationId:fields.conversati
10
10
  return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:fields.serverRequestId??null})}function analysisStartedFrame(requestId,lastEventId,serverRequestId=null){/* @__PURE__ */
11
11
  return Object.freeze({kind:"analysisStarted",requestId:requestId,lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function analysisCompleteFrame(fields,serverRequestId=null){/* @__PURE__ */
12
12
  return Object.freeze({kind:"analysisComplete",terminal:false,resultId:fields.resultId,analysisType:fields.analysisType,modelVersion:fields.modelVersion,confidence:fields.confidence,detections:/* @__PURE__ */Object.freeze([...fields.detections]),interpretation:fields.interpretation,lastEventId:fields.lastEventId,serverRequestId:serverRequestId})}function unknownFrame(raw,lastEventId,serverRequestId=null){/* @__PURE__ */
13
- return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}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 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 createIdentityProvider(userRef,getToken,onMinted,onRejected){let cached=null,rejectionReported=false,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,rejectionReported=!1,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null},reportRejected(){revoked||rejectionReported||(rejectionReported=true,onRejected?.())}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}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}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}function createFallbackUtf8Decoder(){let pending=[];return{decode(input,options){let stream=options?.stream===true,bytes=pending.length>0?pending.slice():[];if(input!==void 0)for(let i2=0;i2<input.length;i2+=1)bytes.push(input[i2]);pending=[];let out="",i=0;for(;i<bytes.length;){let b0=bytes[i];if(b0<128){out+=String.fromCharCode(b0),i+=1;continue}let need,lower=128,upper=191,cp;if(b0>=194&&b0<=223)need=1,cp=b0&31;else if(b0>=224&&b0<=239)need=2,cp=b0&15,b0===224&&(lower=160),b0===237&&(upper=159);else if(b0>=240&&b0<=244)need=3,cp=b0&7,b0===240&&(lower=144),b0===244&&(upper=143);else{out+="�",i+=1;continue}let j=1,valid=true;for(;j<=need&&!(i+j>=bytes.length);){let b=bytes[i+j],lo=j===1?lower:128,hi=j===1?upper:191;if(b<lo||b>hi){valid=false;break}cp=cp<<6|b&63,j+=1}if(!valid){out+="�",i+=j;continue}if(j<=need){stream?pending=bytes.slice(i):out+="�";break}out+=String.fromCodePoint(cp),i+=need+1}return out}}}function createUtf8Decoder(){let Native=globalThis.TextDecoder;return typeof Native=="function"?new Native("utf-8"):createFallbackUtf8Decoder()}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */zod.z.record(/* @__PURE__ */zod.z.string(),/* @__PURE__ */zod.z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=createUtf8Decoder(),buffer="",scanFrom=0,sawDelta=false;for await(let chunk2 of bytes){for(buffer+=decoder.decode(chunk2,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line2=rawLine.replace(/\s+$/,"");line2.length===0||line2.startsWith(":")||(line2.startsWith("id:")?id=line2.slice(3).trim():line2.startsWith("data:")&&dataLines.push(line2.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function parseUrl(raw,base){let Url=globalThis.URL;if(typeof Url=="function"){let url;try{url=base===void 0?new Url(raw):new Url(raw,base)}catch{return null}try{if(url.protocol)return url}catch{}}return parseByPattern(raw,base)}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,base){let input=raw.trim();if(base!==void 0&&!ABSOLUTE_URL.test(input)){let parsedBase=parseByPattern(base);if(parsedBase===null||!input.startsWith("/")||input.startsWith("//"))return null;input=parsedBase.origin+input}let match=REWRITTEN_BY_STANDARD_PARSER.test(input)?null:WHOLE_URL.exec(input);if(match===null)return null;let[,scheme="",username="",password="",host="",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=host.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:host.toLowerCase(),port:port,origin:special?`${protocol}//${hostPort}`:"null",pathname:pathname,search:query==="?"?"":query,hash:fragment==="#"?"":fragment}}var SDK_VERSION="0.22.0";var SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
13
+ return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}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 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 createIdentityProvider(userRef,getToken,onMinted,onRejected){let cached=null,rejectionReported=false,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,rejectionReported=!1,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null},reportRejected(){revoked||rejectionReported||(rejectionReported=true,onRejected?.())}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}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}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}function createFallbackUtf8Decoder(){let pending=[];return{decode(input,options){let stream=options?.stream===true,bytes=pending.length>0?pending.slice():[];if(input!==void 0)for(let i2=0;i2<input.length;i2+=1)bytes.push(input[i2]);pending=[];let out="",i=0;for(;i<bytes.length;){let b0=bytes[i];if(b0<128){out+=String.fromCharCode(b0),i+=1;continue}let need,lower=128,upper=191,cp;if(b0>=194&&b0<=223)need=1,cp=b0&31;else if(b0>=224&&b0<=239)need=2,cp=b0&15,b0===224&&(lower=160),b0===237&&(upper=159);else if(b0>=240&&b0<=244)need=3,cp=b0&7,b0===240&&(lower=144),b0===244&&(upper=143);else{out+="�",i+=1;continue}let j=1,valid=true;for(;j<=need&&!(i+j>=bytes.length);){let b=bytes[i+j],lo=j===1?lower:128,hi=j===1?upper:191;if(b<lo||b>hi){valid=false;break}cp=cp<<6|b&63,j+=1}if(!valid){out+="�",i+=j;continue}if(j<=need){stream?pending=bytes.slice(i):out+="�";break}out+=String.fromCodePoint(cp),i+=need+1}return out}}}function createUtf8Decoder(){let Native=globalThis.TextDecoder;return typeof Native=="function"?new Native("utf-8"):createFallbackUtf8Decoder()}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */zod.z.record(/* @__PURE__ */zod.z.string(),/* @__PURE__ */zod.z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=createUtf8Decoder(),buffer="",scanFrom=0,sawDelta=false;for await(let chunk2 of bytes){for(buffer+=decoder.decode(chunk2,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line2=rawLine.replace(/\s+$/,"");line2.length===0||line2.startsWith(":")||(line2.startsWith("id:")?id=line2.slice(3).trim():line2.startsWith("data:")&&dataLines.push(line2.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function parseUrl(raw,base){let Url=globalThis.URL;if(typeof Url=="function"){let url;try{url=base===void 0?new Url(raw):new Url(raw,base)}catch{return null}try{if(url.protocol)return url}catch{}}return parseByPattern(raw,base)}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,base){let input=raw.trim();if(base!==void 0&&!ABSOLUTE_URL.test(input)){let parsedBase=parseByPattern(base);if(parsedBase===null||!input.startsWith("/")||input.startsWith("//"))return null;input=parsedBase.origin+input}let match=REWRITTEN_BY_STANDARD_PARSER.test(input)?null:WHOLE_URL.exec(input);if(match===null)return null;let[,scheme="",username="",password="",host="",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=host.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:host.toLowerCase(),port:port,origin:special?`${protocol}//${hostPort}`:"null",pathname:pathname,search:query==="?"?"":query,hash:fragment==="#"?"":fragment}}var SDK_VERSION="1.0.0";var SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
14
14
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function checkPublishableKey(raw){let publishableKey=typeof raw=="string"?raw.trim():"";return publishableKey.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(publishableKey)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}function tryResolveClientConfig(config,options){let keyFailure=checkPublishableKey(config?.publishableKey);if(keyFailure!==null)/* @__PURE__ */
15
15
  return Object.freeze({ok:false,failure:keyFailure});let publishableKey=config.publishableKey.trim(),baseUrl=tryResolveApiBaseUrl(config.apiBaseUrl);if(!baseUrl.ok)return baseUrl;let contractVersion=config.contractVersion?.trim()||DEFAULT_CONTRACT_VERSION;/* @__PURE__ */
16
16
  return Object.freeze({ok:true,config:/* @__PURE__ */Object.freeze({publishableKey:publishableKey,apiBaseUrl:baseUrl.value,contractVersion:contractVersion,sdkVersion:SDK_VERSION,platform:options?.platform??SDK_PLATFORM,debug:config.debug===true})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */