@everfur/sdk 1.5.3 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/chat-cards/package.json +8 -0
  2. package/dist/{Chat.d-BCfyvzX8.d.ts → Chat.d-B4GybUU4.d.ts} +1 -1
  3. package/dist/{Chat.d-Od44h51D.d.cts → Chat.d-DPM2ncxi.d.cts} +1 -1
  4. package/dist/chat/index.cjs +174 -174
  5. package/dist/chat/index.d.cts +4 -4
  6. package/dist/chat/index.d.ts +4 -4
  7. package/dist/chat/index.js +340 -340
  8. package/dist/chat/lite/index.cjs +174 -174
  9. package/dist/chat/lite/index.d.cts +4 -4
  10. package/dist/chat/lite/index.d.ts +4 -4
  11. package/dist/chat/lite/index.js +339 -339
  12. package/dist/chat-cards/index.cjs +18 -0
  13. package/dist/chat-cards/index.d.cts +15 -0
  14. package/dist/chat-cards/index.d.ts +15 -0
  15. package/dist/chat-cards/index.js +18 -0
  16. package/dist/{chatHandoffToken.d-BjfmIxXk.d.cts → chatHandoffToken.d-Cap2z62P.d.cts} +1 -1
  17. package/dist/{chatHandoffToken.d-CFiI6IMc.d.ts → chatHandoffToken.d-zdp23Ukr.d.ts} +1 -1
  18. package/dist/{checkin.d-CokpahFL.d.ts → checkin.d-BoZXWjxX.d.ts} +8 -0
  19. package/dist/{checkin.d-BP3ZWBfX.d.cts → checkin.d-CuIUahcd.d.cts} +8 -0
  20. package/dist/{chunk-CFEHTNKX.js → chunk-CQUKIPRU.js} +1 -1
  21. package/dist/{chunk-ZGL2GEEI.js → chunk-DBQYQLJT.js} +1 -1
  22. package/dist/{chunk-OU5RMGKD.js → chunk-RF4N4WUN.js} +18 -18
  23. package/dist/{chunk-XGF2HYNN.js → chunk-ZSCVH4UW.js} +14 -14
  24. package/dist/client/index.cjs +1 -1
  25. package/dist/client/index.d.cts +1 -1
  26. package/dist/client/index.d.ts +1 -1
  27. package/dist/client/index.js +1 -1
  28. package/dist/{context.d-DS1GXUEY.d.ts → context.d-D7zX6Q0J.d.ts} +1 -1
  29. package/dist/{context.d-Bj6-xYPA.d.cts → context.d-guaLkx5t.d.cts} +1 -1
  30. package/dist/core/index.cjs +22 -22
  31. package/dist/core/index.d.cts +10 -4
  32. package/dist/core/index.d.ts +10 -4
  33. package/dist/core/index.js +31 -31
  34. package/dist/index.cjs +247 -247
  35. package/dist/index.d.cts +7 -7
  36. package/dist/index.d.ts +7 -7
  37. package/dist/index.js +364 -364
  38. package/dist/notifications/index.d.cts +3 -3
  39. package/dist/notifications/index.d.ts +3 -3
  40. package/dist/records/index.cjs +1 -1
  41. package/dist/records/index.js +1 -1
  42. package/dist/{route.d-DtuKY5dM.d.ts → route.d-B3u14HJT.d.ts} +1 -1
  43. package/dist/{route.d-Nt-r-7IO.d.cts → route.d-QBCoO62z.d.cts} +1 -1
  44. package/dist/{runtimeTypes.d-CL4l7ta4.d.cts → runtimeTypes.d-BSxuUCOX.d.cts} +1 -1
  45. package/dist/{runtimeTypes.d-BzUig75K.d.ts → runtimeTypes.d-hjN6xvxm.d.ts} +1 -1
  46. package/dist/server/events/index.cjs +1 -1
  47. package/dist/server/events/index.js +1 -1
  48. package/dist/server/index.cjs +1 -1
  49. package/dist/server/index.js +1 -1
  50. package/dist/testing/index.cjs +1 -1
  51. package/dist/testing/index.js +1 -1
  52. package/dist/testing/rn/index.d.cts +2 -2
  53. package/dist/testing/rn/index.d.ts +2 -2
  54. package/dist/testing/web/index.d.cts +2 -2
  55. package/dist/testing/web/index.d.ts +2 -2
  56. package/dist/{useUnread.d-CedFK4k6.d.ts → useUnread.d-4SbFChbd.d.ts} +30 -3
  57. package/dist/{useUnread.d-DST1GMmL.d.cts → useUnread.d-B0YhhR_D.d.cts} +30 -3
  58. package/dist/web/health-plan/index.cjs +1 -1
  59. package/dist/web/health-plan/index.js +1 -1
  60. package/dist/web/index.cjs +173 -173
  61. package/dist/web/index.d.cts +7 -7
  62. package/dist/web/index.d.ts +7 -7
  63. package/dist/web/index.js +182 -182
  64. package/dist/web/notifications/index.d.cts +2 -2
  65. package/dist/web/notifications/index.d.ts +2 -2
  66. package/dist/web/records-sheet/index.cjs +1 -1
  67. package/dist/web/records-sheet/index.js +1 -1
  68. package/dist/web/shop/index.cjs +1 -1
  69. package/dist/web/shop/index.js +1 -1
  70. package/dist/web/televet/booking/index.cjs +1 -1
  71. package/dist/web/televet/booking/index.js +1 -1
  72. package/dist/web/televet/call/index.cjs +1 -1
  73. package/dist/web/televet/call/index.js +1 -1
  74. package/dist/web/ui/index.cjs +1 -1
  75. package/dist/web/ui/index.js +41 -41
  76. package/package.json +16 -1
@@ -0,0 +1,18 @@
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
+ "use strict";var e=require("react"),t=require("react-native"),r=require("react/jsx-runtime");var n=/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({efDarkGreen:"#10462E",efWhite:"#FFFFFF",efBlack:"#000000",efDustyPink:"#FFC3BC",efBrightGreen:"#07C168",efYellow:"#F2C763",efDustyBlue:"#A8B9DA",efSkyBlue:"#4E98C9",efCharcoal:"#3D3D3D",efIconHoney:"#926F06",efIconLeaf:"#16864A",efIconSky:"#1E7AB7",efIconTeal:"#05827E",efIconCocoa:"#865B3F",efIconNavy:"#223E80",efIconBerry:"#B6407F",efIconAmber:"#B25E05",efIconMoss:"#5E7E1E",efIconSlate:"#5A6087",efIconRose:"#CA4463",efRedDeep:"#6D1D14",efRedBright:"#C03410",bg:"#FFFFFF",bgBrand:"#10462E",bgAccent:"#FFC3BC",bgAccentB2b:"#A8B9DA",bgWarm:"#F2C763",text:"#000000",textBrand:"#10462E",textOnBrand:"#FFFFFF",textCta:"#07C168",textMuted:"#6B6B6B",bgMist:"#F1F5F2",border:"#E4E4E4",borderStrong:"#3D3D3D",hi:"#DAF6E8",hiStrong:"#ABEACC",hiEdge:"#0B8A4E",now:"#0C844B",alert:"#C03410",alertDeep:"#6D1D14",btnPrimaryBg:"#10462E",btnPrimaryText:"#FFFFFF",btnSecondaryBg:"rgba(0, 0, 0, 0)",btnSecondaryText:"#10462E",btnSecondaryBorder:"#10462E",mixMint:"#7FE8AE",mixLegal:"#A9C4B5",mixPromptGreen:"#BFEFD8",mixPromptYellow:"#F7DC9E",mixRx:"#E0E6F2",mixShelf:"#F3F3F3",mixEar:"#F09FA3",efBone:"#FAF9F6",efTennisBall:"#DCEF5A",efFawn:"#E8CAA4",efPine:"#12301F",efPine70:"rgba(18, 48, 31, 0.72)",efLiver:"#7A4330",efMerle:"#AEB8C1",efNose:"#E9B6A6"}),font:/* @__PURE__ */Object.freeze({family:/* @__PURE__ */Object.freeze({base:'Azeret, "Helvetica Neue", Arial, sans-serif',mono:'"Azeret Mono", ui-monospace, "SF Mono", Menlo, monospace'}),size:/* @__PURE__ */Object.freeze({xs:13,sm:15,md:17,lg:20,xl:24,"2xl":32,"3xl":40,"4xl":56}),lineHeight:/* @__PURE__ */Object.freeze({body:1.55,display:1.15}),weight:/* @__PURE__ */Object.freeze({regular:400,medium:500,bold:700})}),space:/* @__PURE__ */Object.freeze({1:4,2:8,3:12,4:16,5:24,6:32,7:48,8:64,9:96}),radius:/* @__PURE__ */Object.freeze({sm:6,md:10,lg:20,xl:28,pill:999}),shadow:/* @__PURE__ */Object.freeze({sm:/* @__PURE__ */Object.freeze({x:0,y:1,blur:2,spread:0,color:"rgba(16, 70, 46, 0.06)"}),md:/* @__PURE__ */Object.freeze({x:0,y:4,blur:16,spread:0,color:"rgba(16, 70, 46, 0.08)"})}),layout:/* @__PURE__ */Object.freeze({container:1200,containerNarrow:720}),motion:/* @__PURE__ */Object.freeze({easing:/* @__PURE__ */Object.freeze({out:/* @__PURE__ */Object.freeze([.23,1,.32,1]),inOut:/* @__PURE__ */Object.freeze([.77,0,.175,1]),drawer:/* @__PURE__ */Object.freeze([.32,.72,0,1]),expo:/* @__PURE__ */Object.freeze([.16,1,.3,1]),bark:/* @__PURE__ */Object.freeze([.34,1.56,.64,1])}),duration:/* @__PURE__ */Object.freeze({press:160,fade:200,enter:300,sheet:420,sheetOut:240,draw:900})}),web:/* @__PURE__ */Object.freeze({serif:'Azeret, "Helvetica Neue", Arial, sans-serif',sans:'Azeret, "Helvetica Neue", Arial, sans-serif',tSmall:14,max:1312}),role:/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({ink:"#10462E",go:"#07C168",muted:"#6B6B6B",line:"#E4E4E4",pink50:"#FFE1DE",tintSage:"#E6ECE8",tintPink:"#FFEAE8",tintPinkSoft:"#FFF6F5",tintBlue:"#EAEEF6",tintYellow:"#FCF0D6",tintYellowEdge:"#F6D892",tintRed:"#FBF1EE",tintGo:"#DCF6EA",icoGrey:"#6B6B6B",icoSage:"#819E90",icoBlue:"#4E98C9",icoWarm:"#D6D0C2",icoAmber:"#B67B3F",amberText:"#A05E32",wxSun:"#F2C763",wxSunEdge:"#D5AD47",wxCloud:"#FFFFFF",wxCloudEdge:"#DEDEDE",wxCloudDark:"#EAEAEA",wxCloudDarkEdge:"#C5C5C5",wxRain:"#75AFD5",wxSnow:"#AFD1E7",wxMist:"#D4D4D4",cwShelf:"#FFFFFF",cwShelfDeep:"#F1F4F2",cwRx:"#E0E6F2",cwRxInk:"#5A6087",cwEdgeC:"#C6D3CD",nItch:"#CA4463",nJoints:"#5E7E1E",nItchC:"#FFC3BC",nJointsC:"#D8E0C9",lvlGood:"#77DDAC",lvlOk:"#F4CF7A",lvlHot:"#DC8F7C",lvlStorm:"#8DA4BB",mapLand:"#F5F5F5",mapEdge:"#EAEAEA",mapPark:"#D7F5E7",mapWater:"#D8E0EE",mapSand:"#FCF3DD"}),size:/* @__PURE__ */Object.freeze({max:1440,gutter:16,sideW:220,cardPad:16,barH:48,tabH:58,dock:64,side:16,stackGap:12})})});var i={button:{ink:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},go:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},outline:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:400,lineHeight:1,iconSize:24},pink:{fill:true,minHeight:60,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:18,fontWeight:700,lineHeight:1,iconSize:24},danger:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1.55,iconSize:20},inkSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},goSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},outlineSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:400,lineHeight:1,iconSize:20},pinkSm:{fill:true,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},row:{fill:false,minHeight:36,paddingX:14,gap:8,borderWidth:1.5,ring:false,fontSize:14,fontWeight:400,lineHeight:1,iconSize:17},outlineInSheetWeight:700,money:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"pink",fg:"ink",edgeColor:"ink"},moneySm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"pink",fg:"ink",edgeColor:"ink"},warn:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"none",fg:"alertDeep",edgeColor:"alert"},warnSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"none",fg:"alertDeep",edgeColor:"alert"},text:{fontSize:15,fontWeight:700,lineHeight:1.4,color:"ink",pressOpacity:.6}},pill:{minHeight:24,paddingX:10,fontSize:12,fontWeight:700,lineHeight:1,letterSpacing:.72,ring:{soon:1.25,overdue:1.25,clear:1.5,later:1.25,plain:1.5,new:1.5},plainRingAlpha:.2,dot:6,dotGap:6,allergyDot:{size:6,gap:6,color:"alert"},mono:true,upper:true,tones:{rx:{bg:"#E0E6F2",fg:"ink",ring:0,ringColor:"ink"},soon:{bg:"surface",fg:"ink",ring:1.25,ringColor:"tintYellowEdge"},overdue:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},clear:{bg:"surface",fg:"go",ring:1.5,ringColor:"go"},stable:{bg:"tintGo",fg:"ink",ring:0,ringColor:"ink"},later:{bg:"surface",fg:"muted",ring:1.25,ringColor:"line"},plain:{bg:"surface",fg:"ink",ring:1.5,ringColor:"ink/0.2"},new:{bg:"surface",fg:"ink",ring:1.5,ringColor:"go"},pink:{bg:"tintPink",fg:"ink",ring:0,ringColor:"ink"},watch:{bg:"#F9E6B9",fg:"ink",ring:0,ringColor:"ink"},high:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},allergy:{bg:"surface",fg:"alertDeep",ring:1.25,ringColor:"alert"}}},chip:{minHeight:42,paddingX:16,gap:8,borderWidth:1,fontSize:15,fontWeight:500,lineHeight:1.3},card:{padding:16,radius:20,borderWidth:1,titleSize:18,titleWeight:700,titleLineHeight:1.25,titleTracking:-.36,titleGap:12,leadSize:15,leadLineHeight:1.5,leadGap:12,headGapX:16,headGapY:8,headGap:12,bodySize:17,bodyLineHeight:1.55,ghost:{borderStyle:"dashed",borderColor:"#B9C9C2"}},sectionHeader:{gapX:12,gapY:8,marginTop:8},kicker:{fontSize:12,fontWeight:700,lineHeight:1.55,letterSpacing:.96,gap:8},quantityStepper:{borderWidth:1,borderColor:"line",ring:false,button:40,icon:18,valueMinWidth:28,offColor:"line",offOpacity:1,valueSize:17,valueWeight:700,valueLineHeight:1.55},tabs:{minHeight:44,gap:6,fontSize:15,fontWeight:500,currentWeight:700,lineHeight:1.55,indicator:3,hairline:1,dot:7},sheet:{radius:28,grabHeight:20,grabBarWidth:36,grabBarHeight:5,grabBarRadius:3,headPaddingTop:4,headPaddingX:16,headPaddingBottom:12,headGap:12,titlesGap:2,titleSize:18,close:36,closeIcon:20,bodyGap:12,bodyPaddingX:16,bodyPaddingBottom:24,actsGap:12,actsMarginTop:4},empty:{gap:8,titleSize:22,titleWeight:500,titleLineHeight:1.2,titleTracking:-.33,leadSize:15,leadLineHeight:1.5,actsGap:12,actsMarginTop:12,buttonMinWidth:200,linkMinHeight:44,linkPaddingX:4,linkSize:15,linkWeight:700,linkUnderlineOffset:3},skeleton:{gap:10,lineHeight:12,widths:[100,82,64]},summary:{paddingX:24,paddingY:0,radius:20,borderWidth:1,background:"surface",shadow:{color:"",x:0,y:0,blur:0,spread:0},rowDivider:1,rowMinHeight:0,rowCenter:false,rowPaddingY:14,termColor:"muted",valueColor:"ink",tabular:false,totalRowMinHeight:0,totalTermSize:15,totalTermWeight:400,totalTermColor:"muted",totalWeight:700,rowGapX:16,rowGapY:2,termSize:15,termLineHeight:1.55,valueSize:15,valueWeight:700,valueLineHeight:1.4,totalSize:20,totalLineHeight:1.4,off:{shown:true,size:15,weight:700,lineHeight:21,color:"go",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},icon:{size:24},timeline:{row:{shown:true,w:361,h:69.281,padding:[0,0,24,0],marginTop:0,marginBottom:0,gap:[16,16],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},done:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"ink",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"surface",fit:"cover",x:0,y:0,dy:0},now:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},next:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},nowInner:{size:10,color:"go"},check:{shown:true,w:16,h:16,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},lineDoneDone:{x:13,top:30,bottom:2,width:2,color:"ink"},lineDoneNow:{x:13,top:30,bottom:2,width:2,color:"ink"},lineNowNext:{x:13,top:30,bottom:2,width:2,color:"line"},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},head:{shown:true,w:317,h:27,padding:[3,0,0,0],marginTop:0,marginBottom:0,gap:[8,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},nextTitle:{shown:true,size:17,weight:700,lineHeight:22.1,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},when:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},thumbnail:{xs:{frame:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},img:{shown:false,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},sm:{frame:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},md:{frame:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:156,h:156,padding:[10,10,10,10],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},lg:{frame:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:174.5,h:174.5,padding:[14,14,18,14],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false}},text:{display:{shown:true,size:40,weight:500,lineHeight:39.2,color:"ink",tracking:-1.2,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},headline:{shown:true,size:30,weight:500,lineHeight:33,color:"ink",tracking:-.45,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:22,weight:500,lineHeight:26.4,color:"ink",tracking:-.33,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},heading:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},lead:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},meta:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"mono",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},caption:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},overline:{shown:true,size:12,weight:700,lineHeight:16.8,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},kicker:{shown:true,size:12,weight:700,lineHeight:18.6,color:"muted",tracking:.96,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},field:{gap:6,label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},input:{shown:true,w:361,h:52,padding:[0,16,0,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},focusEdge:"ink",errorEdge:"alert",value:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:1},valueInset:[2,1],icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},area:{shown:true,w:361,h:158,padding:[12,16,12,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},areaValue:{shown:true,size:17,weight:400,lineHeight:25.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:2},areaValueMinHeight:132,areaInset:[2,2],hint:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},error:{shown:true,size:15,weight:400,lineHeight:21.75,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},placeholder:"muted"},checkbox:{row:{shown:true,w:361,h:45,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},labelX:34,box:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1.5,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"ink",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},tick:{w:5,h:10,stroke:2,color:"surface",rotate:45,dy:-1},label:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},boxed:{shown:true,w:361,h:50.5,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"bgMist",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0}},choice:{row:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},selected:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"pink",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},radio:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1.5,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},radioOn:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:6,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},textX:34,title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},strut:26.35,meta:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},end:{shown:true,size:13,weight:400,lineHeight:20.15,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},group:{gap:8,legend:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},legendPaddingX:2,legendGap:0}},switch:{track:{shown:true,w:48,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"#D0D6D3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:"ink",thumb:{size:22,inset:3,travel:20,color:"surface",shadow:{color:"rgba(16, 70, 46, 0.06)",x:0,y:1,blur:2,spread:0}}},iconButton:{bare:{shown:true,w:44,h:44,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[22,22],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},bareIcon:22,offColor:"line",ring:{shown:true,w:36,h:36,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[18,18],bg:"surface",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},ringIcon:18,ringPressed:"tintSage",ringPressScale:.94},link:{text:{shown:true,size:17,weight:400,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},danger:{shown:true,size:15,weight:700,lineHeight:23.25,color:"alert",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},inline:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},lists:{rows:{row:{shown:true,w:327,h:94.781,padding:[16,0,16,0],marginTop:0,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:1,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},tiles:{list:{shown:true,w:343,h:175.813,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},outdent:8,row:{shown:true,w:343,h:62.281,padding:[10,8,10,8],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},leading:22,leadingFace:40,icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},text:{shown:true,w:261,h:42.281,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[2,2],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},pressed:"#EDF2EF",alert:{bg:"tintRed",icon:"alert",title:"alertDeep",subtitle:"alert"}},end:{text:{shown:true,size:15,weight:400,lineHeight:23.25,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},gap:8,chevron:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#819D90",fit:"cover",x:0,y:0,dy:0}},section:{title:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},titleGap:12,head:{shown:true,w:361,h:22.5,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[12,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},note:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:12,paddingTop:0}},avatar:{sizes:{xs:20,sm:36,md:48,lg:64,xl:128},face:40,bg:"surface",edge:{width:1,color:"line",ring:true},initials:{shown:true,size:15,weight:700,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},initialsXs:{shown:true,size:9,weight:700,lineHeight:13.95,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tints:{default:"tintPink",pink:"#FFCFC9",blue:"#C2CEE5",yellow:"#F6D78F",sage:"#C6D3CD"},ring:{width:2,offset:2,color:"go"},ringXl:{width:3,offset:4,color:"go"},dot:{size:12,edge:2,edgeColor:"surface"}},stack:{size:28,overlap:-8,initialsSize:12,halo:{width:2,color:"surface"}},banner:{box:{shown:true,w:361,h:155.391,padding:[16,16,16,16],marginTop:0,marginBottom:0,gap:[12,4],minHeight:0,radius:[20,20],bg:"#F1F5F2",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},iconRows:3,kicker:{shown:true,size:12,weight:700,lineHeight:16.8,color:"#5B5B5B",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:295,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tones:{info:{bg:"#F1F5F2",icon:"ink"},success:{bg:"tintGo",icon:"ink"},warn:{bg:"#FCF0D6",icon:"#926F06"},danger:{bg:"tintRed",icon:"alert"}}},toast:{box:{shown:true,w:200.281,h:40.25,padding:[10,16,10,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:15,weight:400,lineHeight:20.25,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:10},inset:16,rise:8,fade:200,hold:2600},spinner:{size:16,border:2,turn:700,openSide:true,reducedOpacity:.5},offbar:{box:{shown:true,w:361,h:56,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:44,radius:[0,0],bg:"#FCF0D6",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:48,dy:0},text:{shown:true,size:15,weight:500,lineHeight:19.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},action:{shown:true,w:69.859,h:44,padding:[0,2,0,2],marginTop:0,marginBottom:0,gap:[6,6],minHeight:44,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},actionText:{shown:true,size:15,weight:700,lineHeight:19.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},online:{bg:"ink",color:"onInk"},fade:200},progress:{track:{shown:true,w:361,h:4,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"line",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},fill:"go",move:300},divider:{width:1,color:"line",label:{shown:true,size:12,weight:400,lineHeight:18.6,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},labelGap:12,labelLine:{width:1,color:"line"}},errorInline:{text:{shown:true,size:15,weight:400,lineHeight:21,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:361,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},linkPressedOpacity:.6},variants:{drawer:{frame:{shown:true,w:393,h:226.594,padding:[10,20,40,20],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[28,0],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:293.406,dy:0},maxHeight:.8,grab:{shown:true,w:40,h:5,padding:[0,0,0,0],marginTop:0,marginBottom:10,gap:[0,0],minHeight:0,radius:[2.5,2.5],bg:"#DAD7D1",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},top:{shown:true,w:353,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},kicker:{shown:true,size:11,weight:400,lineHeight:16.5,color:"muted",tracking:.88,face:"mono",upper:true,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},close:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},closeEnd:-8,closeIcon:22,title:{shown:true,size:24,weight:800,lineHeight:27.6,color:"ink",tracking:-.24,face:"serif",upper:false,wrap:"balance",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,w:353,h:82,padding:[0,0,0,0],marginTop:12,marginBottom:0,gap:[10,10],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:16,weight:400,lineHeight:24,color:"text",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},scrim:"ink/0.38",motion:{enterMs:320,enterEasing:[.32,.72,0,1],exitMs:220,exitEasing:[.23,1,.32,1],scrimEnterMs:240,scrimExitMs:200,scrimEasing:[.25,.1,.25,1]}},button:{ink:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:0,ring:false,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},outline:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:1.5,ring:true,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},sm:{fill:false,minHeight:40,paddingX:16,gap:8,borderWidth:1.5,ring:true,fontSize:15,fontWeight:700,lineHeight:1.5,iconSize:20},lg:{fill:false,minHeight:56,paddingX:28,gap:8,borderWidth:0,ring:false,fontSize:17,fontWeight:700,lineHeight:1.5,iconSize:20},disabledOpacity:.32,press:.97,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease"},segmented:{track:{shown:true,w:361,h:44,padding:[4,4,4,4],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[22,22],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},option:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},label:{shown:true,size:14,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},chosen:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:0,y:0,dy:0},chosenLabel:{shown:true,size:14,weight:700,lineHeight:21,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},press:.96,transition:"background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},stepper:{track:{shown:true,w:110,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},button:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},icon:16,value:{shown:true,size:15.5,weight:800,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},valueWidth:30,disabledOpacity:.3,press:.9,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},summary:{box:{shown:true,w:361,h:144,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"rgba(38, 37, 35, 0.06)",x:0,y:1,blur:3,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},row:{shown:true,w:329,h:34,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:34,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},term:{shown:true,size:15,weight:400,lineHeight:22.5,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},value:{shown:true,size:15,weight:400,lineHeight:22.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},totalRow:{shown:true,w:329,h:42,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:42,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},totalTerm:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},total:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renewRow:{shown:true,w:329,h:28,padding:[0,0,0,0],marginTop:-6,marginBottom:0,gap:[12,12],minHeight:28,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},renewTerm:{shown:true,size:14,weight:400,lineHeight:21,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renew:{shown:true,size:14,weight:400,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},inset:{shown:true,w:361,h:88,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"bg",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0}},toast:{box:{shown:true,w:361,h:64.594,padding:[12,15,12,15],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:16,y:62,dy:0},text:{shown:true,size:14.5,weight:400,lineHeight:20.3,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:12},motion:{enterMs:220,exitMs:160,easing:[.23,1,.32,1],rise:-8}},focus:{width:2,offset:2,color:"ink"}},press:{button:.97,iconButton:.94,card:.98},colors:{grab:"#C9C9C9",scrim:"rgba(0, 0, 0, 0.32)",watch:"#F9E6B9",planInk:"#262523",planOnInk:"#FFFFFF",planAccent:"#FFCE34",planLink:"#00707C",planAccentWash:"#FFF7DC",planAccentChip:"#FFE7A1",planLinkWash:"#E0FDFF",planLinkChip:"#C8F4F8"}};function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e))for(let t of Object.values(e))deepFreeze(t);return e}var o=n,a=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#preset@v1");function l(e){return Object.defineProperty(e,a,{value:e,enumerable:true}),deepFreeze(e)}var s={content:0,heading:2,control:1.8,compact:1.5,badge:1.3},d=l({name:"everfur",colors:{bg:o.color.bg,surface:o.color.efWhite,text:o.color.text,ink:o.role.color.ink,onInk:o.color.efWhite,muted:o.role.color.muted,line:o.role.color.line,go:o.role.color.go,onGo:o.role.color.ink,pink:o.color.efDustyPink,onPink:o.role.color.ink,alert:o.color.alert,alertDeep:o.color.alertDeep,icoSage:o.role.color.icoSage,bgMist:o.color.bgMist,tintSage:o.role.color.tintSage,tintBlue:o.role.color.tintBlue,tintGo:o.role.color.tintGo,tintPink:o.role.color.tintPink,tintYellowEdge:o.role.color.tintYellowEdge,tintWatch:i.colors.watch,tintRed:o.role.color.tintRed,scrim:i.colors.scrim,grab:i.colors.grab,focus:o.role.color.ink,planInk:i.colors.planInk,planOnInk:i.colors.planOnInk,planAccent:i.colors.planAccent,planLink:i.colors.planLink,planAccentWash:i.colors.planAccentWash,planAccentChip:i.colors.planAccentChip,planLinkWash:i.colors.planLinkWash,planLinkChip:i.colors.planLinkChip},radius:{...o.radius},space:{...o.space},type:{family:o.font.family.base,mono:o.font.family.mono,faces:{regular:"Azeret-Regular",medium:"Azeret-Medium",bold:"Azeret-Bold",mono:"AzeretMono-Regular",monoBold:"AzeretMono-Bold"},namedFaces:true,size:{xs:o.font.size.xs,sm:o.font.size.sm,md:o.font.size.md,lg:o.font.size.lg,xl:o.font.size.xl},weight:{...o.font.weight},lineHeight:{...o.font.lineHeight},scaleCaps:s},motion:{duration:{press:o.motion.duration.press,fade:o.motion.duration.fade,enter:o.motion.duration.enter,sheet:o.motion.duration.sheet,sheetOut:o.motion.duration.sheetOut},easing:{out:o.motion.easing.out,drawer:o.motion.easing.drawer},pop:{duration:o.motion.duration.enter,from:.95,peakAt:.55,amplitude:.035,switchAmplitude:.06},reduced:false},metrics:i});function c(e){return e[a]??d}function u(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function p(e,t){if(!u(e)||!u(t))return t===void 0?e:t;let r={...e};for(let[n,i]of Object.entries(t))i!==void 0&&(r[n]=p(e[n],i));return r}function resolveTheme(e,t=d){if(!e)return t;let r=p(t,e),n=e.colors;if(n){let e=r.colors;for(let[t,r,i]of f){let o=n[r];o!==void 0&&n[t]===void 0&&(e[t]=g(o,i,e.surface)??e[t]??o)}}return deepFreeze(r)}var f=[["planAccentWash","planAccent",.17],["planAccentChip","planAccent",.47],["planLinkWash","planLink",.12],["planLinkChip","planLink",.2]];function g(e,t,r){let n=e=>{let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e??"");return t?[t[1],t[2],t[3]].map(e=>parseInt(e,16)):void 0},[i,o]=[n(e),n(r)];if(!(!i||!o))return`#${i.map((e,r)=>Math.round(e*t+(o[r]??0)*(1-t)).toString(16).padStart(2,"0")).join("").toUpperCase()}`}var h=/* @__PURE__ */(()=>{let t=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#ThemeContext@v1"),r=globalThis,n=r[t]??(r[t]=e.createContext(null));return n.displayName??(n.displayName="EverfurThemeContext"),n})();function ThemeProvider({theme:t,children:r}){let n=x(),i=t===void 0||b(t)?t:m(t),o=e.useMemo(()=>b(t)?k(t):resolveTheme(t,n),[i,n]);return e.createElement(h.Provider,{value:o},r)}function m(e){return JSON.stringify(e,(e,t)=>u(t)&&!Array.isArray(t)?Object.fromEntries(Object.keys(t).sort().map(e=>[e,t[e]])):t)}function b(e){return e!==void 0&&Object.isFrozen(e)&&y.every(t=>t in e)}var y=["name","colors","radius","space","type","motion","metrics"];function w(e,t){if(e===void 0)return true;if(!u(e))return t!==void 0;if(!u(t))return false;for(let r of Object.keys(e))if(!w(e[r],t[r]))return false;return true}var v=/* @__PURE__ */new WeakMap;function k(e){let t=v.get(e);if(t)return t;if(w(d,e))return v.set(e,e),e;let r=c(e),n=p(d,r===d?e:p(r,e));n[a]=r;let i=deepFreeze(n);return v.set(e,i),i}function x(){let t=e.useContext(h);return t?k(t):d}var _=e=>Math.round(e*1e3)/1e3;function S(e,t=false){return t?e>450?"monoBold":"mono":e>500?"bold":e>450?"medium":"regular"}function C(e,t){let r=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!r)return e;let[n,i,o]=[r[1],r[2],r[3]].map(e=>parseInt(e,16));return`rgba(${n}, ${i}, ${o}, ${t})`}function T(e){let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(t)return[t[1],t[2],t[3]].map(e=>parseInt(e,16));let r=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(e);return r?[r[1],r[2],r[3]].map(Number):void 0}function F(e,t,r,n){let[i,o]=[T(e),T(r)];return!i||!o?n:`rgb(${i.map((e,r)=>Math.round(e*t+(o[r]??0)*(1-t))).join(", ")})`}function E(e,t){let r=/^([a-zA-Z]+)(?:\/([\d.]+))?$/.exec(t),n=r?.[1];if(!r||n===void 0||!(n in e.colors))return t;let i=e.colors[n];return r[2]===void 0?i:C(i,Number(r[2]))}function z(e,t){return t==="none"?"transparent":E(e,t)}var I=.45;function O(e,t,r,n=false){let i=e.metrics.button;if(t==="text"){let t=i.text;return{minHeight:0,paddingX:0,gap:i.ink.gap,radius:0,borderWidth:0,borderColor:"transparent",background:"transparent",iconSize:i.inkSm.iconSize,text:{size:t.fontSize,weight:t.fontWeight,lineHeight:_(t.fontSize*t.lineHeight),color:E(e,t.color)},pressScale:1,pressOpacity:t.pressOpacity,disabledOpacity:i.blockedOpacity??I,fill:false,ring:false}}let o=e.metrics.variants.button,a=H(r),l=t==="outline"||t==="danger"||t==="warn",s=a?{...r==="compactSm"?o.sm:r==="compactLg"?o.lg:o.ink,borderWidth:l?o.outline.borderWidth:0,ring:o.outline.ring}:r==="row"?i.row:t==="danger"?i.danger:r==="sm"?i[`${t}Sm`]:i[t],d=e.colors,c=t==="money"||t==="warn"?i[t]:void 0,u={ink:{bg:d.ink,fg:d.onInk,edge:d.ink},go:{bg:d.go,fg:d.onGo,edge:d.ink},outline:{bg:"transparent",fg:d.ink,edge:d.ink},pink:{bg:d.pink,fg:d.onPink,edge:d.ink},danger:{bg:d.surface,fg:d.alert,edge:d.alert}},p=c?{bg:z(e,c.bg),fg:E(e,c.fg),edge:E(e,c.edgeColor)}:u[t],f=t==="outline"&&n&&!a?i.outlineInSheetWeight:s.fontWeight;return{minHeight:s.minHeight,paddingX:s.paddingX,gap:s.gap,radius:e.radius.pill,borderWidth:s.borderWidth,borderColor:p.edge,background:p.bg,iconSize:s.iconSize,text:{size:s.fontSize,weight:f,lineHeight:_(s.fontSize*s.lineHeight),color:p.fg},pressScale:e.motion.reduced?1:a?o.press:e.metrics.press.button,pressOpacity:1,disabledOpacity:a?o.disabledOpacity:i.blockedOpacity??I,fill:s.fill,ring:s.ring}}function H(e){return e==="compact"||e==="compactSm"||e==="compactLg"}function D(e,t){let r=e.metrics.sheet,n=r.titleSize,i=r.titleLineHeight??e.metrics.card.titleLineHeight;return{size:n,weight:r.titleWeight??e.metrics.card.titleWeight,lineHeight:_(n*i),color:E(e,r.titleColor??"ink"),tracking:r.titleTracking??e.metrics.card.titleTracking}}function A(e){let t=e.metrics,r=e.colors;return{cardTitle:{size:t.card.titleSize,weight:t.card.titleWeight,lineHeight:_(t.card.titleSize*t.card.titleLineHeight),color:r.ink,tracking:t.card.titleTracking},cardLead:{size:t.card.leadSize,weight:e.type.weight.regular,lineHeight:_(t.card.leadSize*t.card.leadLineHeight),color:r.text},body:{size:t.card.bodySize,weight:e.type.weight.regular,lineHeight:_(t.card.bodySize*t.card.bodyLineHeight),color:r.text},kicker:{size:t.kicker.fontSize,weight:t.kicker.fontWeight,lineHeight:_(t.kicker.fontSize*t.kicker.lineHeight),color:r.muted,mono:true,tracking:t.kicker.letterSpacing,upper:true},sheetTitle:D(e),stepperValue:{size:t.quantityStepper.valueSize,weight:t.quantityStepper.valueWeight,lineHeight:_(t.quantityStepper.valueSize*t.quantityStepper.valueLineHeight),color:E(e,t.quantityStepper.valueColor??"text")},tab:{size:t.tabs.fontSize,weight:t.tabs.fontWeight,lineHeight:_(t.tabs.fontSize*t.tabs.lineHeight),color:r.muted},tabCurrent:{size:t.tabs.fontSize,weight:t.tabs.currentWeight,lineHeight:_(t.tabs.fontSize*t.tabs.lineHeight),color:r.ink},emptyTitle:{size:t.empty.titleSize,weight:t.empty.titleWeight,lineHeight:_(t.empty.titleSize*t.empty.titleLineHeight),color:r.ink,tracking:t.empty.titleTracking},emptyLead:{size:t.empty.leadSize,weight:e.type.weight.regular,lineHeight:_(t.empty.leadSize*t.empty.leadLineHeight),color:r.text},emptyLink:{size:t.empty.linkSize,weight:t.empty.linkWeight,lineHeight:_(t.empty.linkSize*t.card.bodyLineHeight),color:r.ink},sumTerm:{size:t.summary.termSize,weight:e.type.weight.regular,lineHeight:_(t.summary.termSize*t.summary.termLineHeight),color:r.muted},sumValue:{size:t.summary.valueSize,weight:t.summary.valueWeight,lineHeight:_(t.summary.valueSize*t.summary.valueLineHeight),color:r.ink},sumTotal:{size:t.summary.totalSize,weight:t.summary.valueWeight,lineHeight:_(t.summary.totalSize*t.summary.totalLineHeight),color:r.ink}}}function B(e,t){return{size:t.size,weight:t.weight,lineHeight:t.lineHeight,color:E(e,t.color),...t.face==="mono"?{mono:true}:{},...t.face==="serif"?{serif:true}:{},...t.tracking?{tracking:t.tracking}:{},...t.upper?{upper:true}:{},...t.deco==="none"?{}:{deco:t.deco==="strike"?"strike":"underline",decoOffset:t.decoOffset,decoThickness:t.decoThickness},...t.tabular?{tabular:true}:{},...t.wrap==="auto"?{}:{wrap:t.wrap==="balance"?"balance":"pretty"}}}var j=/* @__PURE__ */(()=>{let t=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#SurfaceContext@v1"),r=globalThis;return r[t]??(r[t]=e.createContext(null))})();function R(){return e.useContext(j)}var M={display:"heading",headline:"heading",title:"heading",heading:"heading",body:"content",lead:"content",label:"control",meta:"compact",caption:"content",overline:"compact",kicker:"compact"};function P(e,t){let r=e.colors;switch(t){case"ink":return r.ink;case"text":return r.text;case"muted":return r.muted;case"danger":return r.alertDeep;case"inverse":return r.onInk;default:return}}function W(e,t,r,n){let i=B(e,e.metrics.text[t]),o=P(e,r);return{...i,...o?{color:o}:{},...n?{weight:e.type.weight[n]}:{}}}var L=/* @__PURE__ */(()=>{let t=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#PressFeedbackContext@v1"),r=globalThis,n=r[t]??(r[t]=e.createContext(null));return n.displayName??(n.displayName="EverfurPressFeedbackContext"),n})();function N(){return e.useContext(L)}function q(e,t,r,n={}){if(!e||n.disabled)return{onPress:r,onPressIn:void 0};let{onPressIn:i,onPress:o,haptic:a}=e,l=n.haptics!==false&&t.haptic&&a?a:void 0;return{onPress:r&&(o||l)?()=>{l?.(t),o?.(t),r()}:r,onPressIn:i?()=>i(t):void 0}}function U(e,t,r=1){return e?.pressScale?.[t]??r}var G={display:"balance",headline:"balance",title:"balance",heading:"balance",body:"pretty",lead:"pretty",meta:"pretty",caption:"pretty",label:"auto",overline:"auto",kicker:"auto"};function $(e,t){return e.type.variantTiers?.[t]??M[t]}var X=/* @__PURE__ */(()=>{let t=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#ReducedMotionContext@v1"),r=globalThis,n=r[t]??(r[t]=e.createContext(null));return n.displayName??(n.displayName="EverfurReducedMotionContext"),n})();function V(){return e.useContext(X)}function Y(e,r){let n=S(r.weight,r.mono===true);return{fontFamily:r.serif?e.type.faces.serif??e.type.faces.bold:e.type.faces[n],...e.type.namedFaces?{}:{fontWeight:String(r.weight)},fontSize:r.size,lineHeight:r.lineHeight,color:r.color,...r.tracking?{letterSpacing:r.tracking}:{},...r.upper?{textTransform:"uppercase"}:{},...r.deco?K(r):{},...r.tabular?{fontVariant:["tabular-nums"]}:{},...r.wrap&&t.Platform.OS==="web"?{textWrap:r.wrap}:{}}}function K(e){let r={textDecorationLine:e.deco==="strike"?"line-through":"underline"};return t.Platform.OS!=="web"?r:{...r,...e.decoOffset?{textUnderlineOffset:e.decoOffset}:{},...e.decoThickness?{textDecorationThickness:e.decoThickness}:{}}}function Z(){if(t.Platform.OS!=="web")return false;let e=globalThis;return typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)").matches}function Q(r){let[n,i]=e.useState(()=>r===null&&Z());return e.useEffect(()=>{if(r!==null)return;let e=true,n=t.AccessibilityInfo?.isReduceMotionEnabled;if(typeof n=="function"){let r=n.call(t.AccessibilityInfo);r!=null&&typeof r.then=="function"&&r.then(t=>{e&&i(t===true)},()=>{})}let o=t.AccessibilityInfo?.addEventListener?.("reduceMotionChanged",e=>i(e===true));return()=>{e=false,o?.remove?.()}},[r]),r??n}function J(e){let t=Q(V());return e.motion.reduced||t}function ee(e,t,r){return{...e===void 0?{}:{expanded:e},...t===void 0?{}:{checked:t},...r===void 0?{}:{selected:r!==false}}}function te(e){let t=Math.max(0,Math.ceil((44-e)/2));return t===0?void 0:{top:t,bottom:t,left:t,right:t}}function re(e,r,n){let i={position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:n};return t.Platform.OS==="web"?{...i,boxShadow:`inset 0 0 0 ${e}px ${r}`}:{...i,borderWidth:e,borderColor:r}}function ne(e){return Math.round(e*100)/100}function ie(e,t){let r=Number(t.weight),n=t.letterSpacing??0;return{...Y(e,{size:t.size,weight:r,lineHeight:ne(t.size*t.lineHeight),color:e.colors.text,tracking:n?ne(t.size*n):0,mono:t.face==="mono",upper:t.uppercase===true}),flexShrink:1}}function oe(e){return e==="auto"?null:t.Platform.OS==="ios"?{lineBreakStrategyIOS:"push-out"}:t.Platform.OS==="android"&&e==="balance"?{textBreakStrategy:"balanced"}:null}function ae(e,t){let r=e.type.weight[t];return e.type.namedFaces?{fontFamily:e.type.faces[S(r)]}:{fontWeight:String(r)}}function Text({tier:r,variant:n,tone:i,weight:o,level:a,lineBreak:l,typeRole:s,...d}){let c=x();if(s){let n=c.type.scaleCaps[r??s.tier??"content"],i=l?oe(l):null;return e.createElement(t.Text,{...n>0?{maxFontSizeMultiplier:n}:{},...i,...d,style:[ie(c,s),d.style]})}let u=c.type.scaleCaps[r??(n?$(c,n):"content")],p=oe(l??(n?G[n]:"auto"));if(n===void 0&&i===void 0&&o===void 0&&a===void 0)return p?e.createElement(t.Text,{...u>0?{maxFontSizeMultiplier:u}:{},...p,...d}):e.createElement(t.Text,u>0?{maxFontSizeMultiplier:u,...d}:d);let f=P(c,i),g=n?Y(c,W(c,n,i,o)):{...f?{color:f}:{},...o?ae(c,o):{}},h=a===void 0?{}:{accessibilityRole:"header",...t.Platform.OS==="web"?{"aria-level":a}:{}};return e.createElement(t.Text,{...u>0?{maxFontSizeMultiplier:u}:{},...p,...h,...d,style:[g,d.style]})}var le=24,se=16,de=.8,ce=e=>Math.round(e*se);function ue(e,t,r,n,i,o){let a=e-r/2,l=t-n/2,s=Math.round(a),d=Math.round(l);return{position:"absolute",left:s,top:d,width:r,height:n,transform:[{translateX:a-s},{translateY:l-d},{rotate:`${Math.atan2(o,i)*180/Math.PI}deg`},{scale:1/se}]}}function pe(e,t,r){for(let n of e.strokes){let e=n.width*t,i=n.points,o=i.length/2,a=n.closed?o:o-1;for(let l=0;l<a;l+=1){let a=(l+1)%o,s=(i[l*2]??0)*t,d=(i[l*2+1]??0)*t,c=(i[a*2]??0)*t-s,u=(i[a*2+1]??0)*t-d,p=Math.hypot(c,u);if(p===0&&!(o===2&&n.cap))continue;let f=p===0?1:c/p,g=p===0?0:u/p,h=n.closed||l>0||n.cap?e/2:0,m=n.closed||a!==o-1||n.cap?e/2:0,b=(p+m-h)/2;r.push({paint:"backgroundColor",style:{...ue(s+f*b,d+g*b,ce(p+h+m),ce(e),f,g),borderTopLeftRadius:h>0?ce(e)/2:0,borderBottomLeftRadius:h>0?ce(e)/2:0,borderTopRightRadius:m>0?ce(e)/2:0,borderBottomRightRadius:m>0?ce(e)/2:0,...n.opacity===void 0?{}:{opacity:n.opacity}}})}}}function fe(e,t,r){for(let n of e.boxes){let e=(n.w+n.width)*t,i=(n.h+n.width)*t;r.push({paint:"borderColor",style:{...ue((n.x-n.width/2)*t+e/2,(n.y-n.width/2)*t+i/2,ce(e),ce(i),1,0),borderWidth:ce(n.width*t),borderRadius:(n.radius+n.width/2)*t*se,...n.opacity===void 0?{}:{opacity:n.opacity}}})}}function ge(e,t,r){for(let n of e.triangles){let e=[0,1,2].map(e=>[(n[e*2]??0)*t,(n[e*2+1]??0)*t]),i=0,o=-1;for(let t=0;t<3;t+=1){let r=e[t]??[0,0],n=e[(t+1)%3]??[0,0],a=Math.hypot(n[0]-r[0],n[1]-r[1]);a>o&&(o=a,i=t)}if(o<=0)continue;let a=e[i]??[0,0],l=e[(i+1)%3]??[0,0],s=e[(i+2)%3]??[0,0],d=(l[0]-a[0])/o,c=(l[1]-a[1])/o,u=(s[0]-a[0])*d+(s[1]-a[1])*c,p=(s[0]-a[0])*-c+(s[1]-a[1])*d,f=Math.abs(p),g=p<0,h=g?-f/2:f/2,m=ce(u),b=ce(o)-m,y=ce(f);r.push({paint:g?"borderBottomColor":"borderTopColor",style:{...ue(a[0]+d*(o/2)-c*h,a[1]+c*(o/2)+d*h,m+b,y,d,c),width:0,height:0,borderLeftWidth:m,borderRightWidth:b,borderLeftColor:"transparent",borderRightColor:"transparent",...g?{borderBottomWidth:y}:{borderTopWidth:y}}})}for(let n of e.seams){let e=(n[0]??0)*t,i=(n[1]??0)*t,o=(n[2]??0)*t-e,a=(n[3]??0)*t-i,l=Math.hypot(o,a),s=de*(n[4]??0),d=de*(n[5]??0),c=l-s-d;if(l===0||c<=0)continue;let u=s+c/2;r.push({paint:"backgroundColor",style:ue(e+o/l*u,i+a/l*u,ce(c),ce(de),o/l,a/l)})}}var he=/* @__PURE__ */new WeakMap;function me(e,t){let r=he.get(e);r===void 0&&(r=/* @__PURE__ */new Map,he.set(e,r));let n=r.get(t);if(n!==void 0)return n;let i=[],o=t/le;return fe(e,o,i),pe(e,o,i),ge(e,o,i),r.set(t,i),i}function Glyph({icon:e,size:n,color:i,label:o,testID:a,style:l}){let s=x(),d=n??s.metrics.icon.size,c=i??s.colors.ink;/* @__PURE__ */
3
+ return r.jsx(t.View,{testID:a,pointerEvents:"none",style:[{width:d,height:d},l],...o?{accessible:true,accessibilityRole:"image",accessibilityLabel:o}:{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"},children:me(e,d).map((e,n)=>/* @__PURE__ */r.jsx(t.View,{style:[e.style,{[e.paint]:c}]},n))})}var be=/* @__PURE__ */(()=>{let e=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#icons@v1"),t=globalThis;return t[e]??(t[e]={icons:{},warned:/* @__PURE__ */new Set})})();function ye(e){Object.assign(be.icons,e)}function we(e){let t=be.icons[e];return t===void 0&&(typeof __DEV__<"u"?__DEV__:typeof process<"u"&&process.env.NODE_ENV!=="production")&&!be.warned.has(e)&&(be.warned.add(e),console.warn(`@everfur-health/ui-native: no icon "${e}" is registered. The lean entry draws only the icons an app registers: registerIcons({ ... }) with the UI_RN_ICON_* exports, or pass a drawing.`)),t}function Icon({name:e,...t}){let n=we(e);return n?/* @__PURE__ */r.jsx(Glyph,{icon:n,...t}):null}function ve(e,t,r,n=1){return ke(N(),e,t,r,n)}function ke(e,t,r,n,i=1){let o=q(e,{component:t,testID:r.testID,...r.item===void 0?{}:{item:r.item},label:r.label,trackId:r.trackId,haptic:r.haptic===true},n,{disabled:r.disabled});return{props:o.onPressIn?{onPress:o.onPress,onPressIn:o.onPressIn}:{onPress:o.onPress},scale:U(e,t,i)}}var xe=e=>`cubic-bezier(${e.join(", ")})`,_e=(e,t)=>typeof e=="function"?e({pressed:t}):e,Se;function Ce(){return Se??(Se=t.Animated.createAnimatedComponent(t.Pressable))}function Te(e,r,n){let[i,o,a,l]=e.motion.easing.out;return t.Animated.timing(r,{toValue:n,duration:e.motion.duration.press,easing:t.Easing.bezier(i,o,a,l),useNativeDriver:true})}function PressBox({style:r,scale:n,still:i,pop:o,onPressIn:a,onPressOut:l,...s}){let d=x(),c=e.useRef(null),[u,p]=e.useState(false),f=!i&&n!==1,g=!i&&o?.scale!=null;if(t.Platform.OS==="web"){let i=f?{transitionProperty:"transform",transitionDuration:`${d.motion.duration.press}ms`,transitionTimingFunction:xe(d.motion.easing.out)}:null;return e.createElement(t.Pressable,{...s,...o?{ref:o.ref}:null,onPressIn:a,onPressOut:l,style:({pressed:e})=>[_e(r,e),i,f&&e?{transform:[{scale:n}]}:null]})}if(!f&&!g)return e.createElement(t.Pressable,{...s,onPressIn:a,onPressOut:l,style:r});let h=c.current??(c.current=new t.Animated.Value(0)),m=f?h.interpolate({inputRange:[0,1],outputRange:[1,n]}):null,b=m&&g?t.Animated.multiply(m,o?.scale):m??o?.scale;return e.createElement(Ce(),{...s,onPressIn:e=>{s.disabled||(p(true),f&&Te(d,h,1).start(),a?.(e))},onPressOut:e=>{p(false),f&&Te(d,h,0).start(),l?.(e)},style:[_e(r,u),{transform:[{scale:b}]}]})}function Button({label:e,onPress:n,tone:i="ink",size:o="md",icon:a,disabled:l=false,loading:s=false,loadingLabel:d,loadingIndicator:c="spinner",fullWidth:u,accessibilityLabel:p,trackId:f,haptic:g,testID:h,style:m,children:b,nativeID:y,onPressIn:w,"aria-expanded":v,"aria-pressed":k,"aria-current":_}){let S=x(),C=R()==="sheet",T=J(S),F=O(S,i,o,C),E=l||s,z=u??(C||F.fill),I=s&&c!=="none",H=I&&d?d:p??(I&&d?d:e),D=ve("Button",{testID:h,label:H,trackId:f,haptic:g,disabled:E},n,F.pressScale),A=D.props.onPressIn,B=w&&A?()=>{A(),w()}:w??A;/* @__PURE__ */
4
+ return r.jsxs(PressBox,{...D.props,onPressIn:B,scale:D.scale,still:T,disabled:E,nativeID:y,hitSlop:te(Math.max(F.minHeight,F.text.lineHeight)),accessibilityRole:"button",accessibilityLabel:H,accessibilityState:{disabled:E,busy:s,...ee(v,k,_)},"aria-busy":s,testID:h,style:({pressed:e})=>[Fe.base,{minHeight:Math.max(F.minHeight,0),paddingHorizontal:F.paddingX,columnGap:F.gap,borderRadius:F.radius,borderWidth:F.ring?0:F.borderWidth,borderColor:F.borderColor,backgroundColor:F.background},z?Fe.block:Fe.auto,E?{opacity:F.disabledOpacity}:null,e&&F.pressOpacity!==1&&!E?{opacity:F.pressOpacity}:null,m],children:[I?/* @__PURE__ */r.jsx(t.ActivityIndicator,{size:"small",color:F.text.color,animating:!T,hidesWhenStopped:false,accessibilityLabel:H}):a?/* @__PURE__ */r.jsx(Icon,{name:a,size:F.iconSize,color:F.text.color}):null,
5
+ /* @__PURE__ */r.jsx(t.View,{style:Fe.labelBox,children:/* @__PURE__ */r.jsx(Text,{tier:"control",style:[Y(S,F.text),Fe.label],children:I&&d?d:b??e})}),F.ring&&F.borderWidth>0?/* @__PURE__ */r.jsx(t.View,{pointerEvents:"none",style:re(F.borderWidth,F.borderColor,F.radius)}):null]})}var Fe=t.StyleSheet.create({base:{flexDirection:"row",alignItems:"center",justifyContent:"center"},block:{alignSelf:"stretch"},auto:{alignSelf:"flex-start"},labelBox:{flexShrink:1},label:{textAlign:"center"}}),Ee={bg:"#FDFBF8",radius:10,padding:15,borderWidth:1,borderColor:"rgba(0, 0, 0, 0.15)"};function Card({title:e,action:n,lead:i,children:o,tone:a="default",headGap:l,onPress:s,accessibilityLabel:d,trackId:c,haptic:u,variant:p="standard",tint:f,borderColor:g,testID:h,style:m}){let b=x(),y=J(b),w=b.metrics.card,v=A(b),k=d??e,_=ve("Card",{testID:h,label:k,trackId:c,haptic:u},s,b.metrics.press.card),S=e?/* @__PURE__ */r.jsx(Text,{accessibilityRole:"header",tier:"heading",lineBreak:"balance",style:[Y(b,v.cardTitle),ze.shrink],children:e}):null,C=a==="ghost",T=p==="plain"?Ee:null,F=T?{padding:T.padding,borderWidth:T.borderWidth,borderColor:g??(C?E(b,w.ghost.borderColor):T.borderColor),...C?{borderStyle:w.ghost.borderStyle}:null,borderRadius:T.radius,borderCurve:"continuous",backgroundColor:f??T.bg}:{padding:w.padding,borderWidth:w.borderWidth,borderColor:g??(C?E(b,w.ghost.borderColor):b.colors.line),...C?{borderStyle:w.ghost.borderStyle}:null,borderRadius:w.radius,backgroundColor:f??b.colors.surface},z=/* @__PURE__ */r.jsxs(r.Fragment,{children:[n?/* @__PURE__ */r.jsxs(t.View,{style:[ze.head,S?null:ze.end,{columnGap:w.headGapX,rowGap:w.headGapY,marginBottom:l??w.headGap}],children:[S,n]}):S?/* @__PURE__ */r.jsx(t.View,{style:{marginBottom:i||o?l??w.titleGap:0},children:S}):null,i?/* @__PURE__ */r.jsx(Text,{style:[Y(b,v.cardLead),{marginBottom:o?w.leadGap:0}],children:i}):null,o]});return s?/* @__PURE__ */r.jsx(PressBox,{testID:h,..._.props,scale:_.scale,still:y,accessibilityRole:"button",accessibilityLabel:k,style:[F,m],children:z}):/* @__PURE__ */r.jsx(t.View,{testID:h,style:[F,m],children:z})}var ze=t.StyleSheet.create({head:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},shrink:{flexShrink:1},end:{justifyContent:"flex-end"}});t.StyleSheet.create({chip:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"}});t.StyleSheet.create({st:{alignItems:"center",alignSelf:"stretch"},center:{textAlign:"center"},acts:{alignItems:"center",alignSelf:"stretch"},link:{alignItems:"center",justifyContent:"center"},underline:{textDecorationLine:"underline"},compact:{alignItems:"center"},iconBox:{alignItems:"center",justifyContent:"center"},pill:{alignItems:"center",justifyContent:"center"}});t.StyleSheet.create({acts:{flexDirection:"row",flexWrap:"wrap",alignItems:"center"},st:{alignItems:"center",alignSelf:"stretch"},center:{textAlign:"center"},stActs:{alignItems:"center",alignSelf:"stretch"},link:{alignItems:"center",justifyContent:"center"},underline:{textDecorationLine:"underline"}});t.StyleSheet.create({pill:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",maxWidth:"100%"},label:{flexShrink:1}});var Ie={strokes:[{width:2,cap:true,closed:false,points:[16,13,21.223,16.482,21.736,16.507,22,16.066,22,7.87,21.749,7.436,21.248,7.438,16,10.5]}],boxes:[{x:2,y:6,w:14,h:12,radius:2,width:2}],triangles:[],seams:[]};t.StyleSheet.create({qty:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"},button:{alignItems:"center",justifyContent:"center"}});t.StyleSheet.create({row:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},compact:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},titles:{flexShrink:1},edit:{flexDirection:"row",alignItems:"center",justifyContent:"center"},pressed:{opacity:.6}});t.StyleSheet.create({row:{flexDirection:"row",alignSelf:"stretch"},hairline:{position:"absolute",left:0,right:0},tab:{flex:1,flexBasis:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},center:{flexShrink:1,textAlign:"center"}});t.StyleSheet.create({scrim:{flex:1,justifyContent:"flex-end"},sheet:{maxHeight:"100%"},grab:{alignItems:"center",justifyContent:"center"},head:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},titles:{flexShrink:1,flexGrow:1},close:{alignItems:"center",justifyContent:"center"},closeEnd:{marginLeft:"auto"},scroll:{flexGrow:0},top:{flexDirection:"row",alignItems:"center"}});t.StyleSheet.create({row:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between"},cardRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},value:{marginLeft:"auto",textAlign:"right"},tabular:{fontVariant:["tabular-nums"]}});t.StyleSheet.create({row:{flexDirection:"row",alignItems:"flex-start"},noGap:{columnGap:0},box:{alignItems:"center",justifyContent:"center"},grow:{flex:1,minWidth:0}});t.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"},words:{flex:1,minWidth:0},center:{alignItems:"center",justifyContent:"center"}});t.StyleSheet.create({hintRow:{flexDirection:"row",alignItems:"flex-start"},grow:{flex:1}});t.StyleSheet.create({base:{alignItems:"center",justifyContent:"center",alignSelf:"flex-start"}});t.StyleSheet.create({base:{alignSelf:"flex-start"}});t.StyleSheet.create({track:{alignSelf:"flex-start"},thumb:{position:"absolute"}});t.StyleSheet.create({box:{flexDirection:"row"},line:{alignItems:"center"},area:{alignItems:"stretch"},input:{flex:1,minWidth:0,margin:0,borderWidth:0,backgroundColor:"transparent"},hidden:{position:"absolute",width:1,height:1,overflow:"hidden",opacity:0}});t.StyleSheet.create({clip:{overflow:"hidden"},center:{alignItems:"center",justifyContent:"center"},stack:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"}});t.StyleSheet.create({leadAuto:{flexShrink:0},words:{flex:1,minWidth:0},below:{alignSelf:"flex-start"},end:{flexDirection:"row",alignItems:"center",flexShrink:1,maxWidth:"45%",justifyContent:"flex-end"},flush:{marginTop:0}});t.StyleSheet.create({offRow:{flexDirection:"row",alignItems:"center",alignSelf:"stretch"},offText:{flexShrink:1,minWidth:0},offAction:{flexDirection:"row",alignItems:"center",marginLeft:"auto",flexShrink:0},row:{flexDirection:"row",alignItems:"flex-start"},copy:{flex:1,minWidth:0},acts:{flexDirection:"row",flexWrap:"wrap",alignItems:"center"}});t.StyleSheet.create({fill:{flex:1},host:{position:"absolute",left:0,right:0,alignItems:"center"},cardHost:{position:"absolute"},card:{alignSelf:"stretch"},start:{textAlign:"left"},pill:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"center",alignSelf:"center",maxWidth:"100%"},center:{textAlign:"center"},shrink:{flexShrink:1},topHost:{position:"absolute",alignItems:"center",zIndex:1e3},top:{flexDirection:"row",alignItems:"center"},copy:{flex:1}});t.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"}});function Oe(e){let t=0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);n<128?t+=1:n<2048?t+=2:n>=55296&&n<=56319&&r+1<e.length?(t+=4,r++):t+=3}return t}var He="a2ui",De="a2ui_cards";var Ae="1.0",Be=/* @__PURE__ */Object.freeze({frameBytes:16*1024,surfaceBytes:32*1024,messages:1,updates:8,depth:8,pointer:128,components:64}),je=/* @__PURE__ */new Set(["__proto__","constructor","prototype"]),Re=/^[A-Za-z0-9_.:-]{1,128}$/,Me=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function Pe(e){if(typeof e!="string"||e.length>Be.pointer||!e.startsWith("/"))return null;let t=e.slice(1).split("/").map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~"));return t.length>Be.depth||t.some(e=>e===""||je.has(e))?null:t}function We(e,t,r){if(t===void 0||t===""||t==="/")return Me(r)?r:null;let n=Pe(t);if(n===null)return null;let i={...e},o=i;for(let e of n.slice(0,-1)){let t=Me(o[e])?{...o[e]}:{};o[e]=t,o=t}let a=n[n.length-1];return r===null?delete o[a]:o[a]=r,i}var Le=(e,t,r)=>{let n=e.revision??t.revision??(Me(r)?r.revision:void 0);return Number.isSafeInteger(n)&&n>=0?n:null},Ne=e=>e.path==="/revision"?{revision:e.value}:e.path===void 0||e.path===""||e.path==="/"?e.value:void 0;function qe(e){return e.flat().slice(0,8).map(e=>Me(e)&&e.type===void 0&&"messages"in e?{type:He,a2ui:e}:e)}function Ue(e){let t=/* @__PURE__ */new Map;for(let r of qe(e)){if(!Me(r)||r.type!==He||!Me(r.a2ui))return{ok:false,reason:"frame"};let e;try{e=Oe(JSON.stringify(r))}catch{return{ok:false,reason:"frame"}}if(e>Be.frameBytes)return{ok:false,reason:"too_large"};let n=r.a2ui,i=n.messages;if(n.version!==Ae||!Array.isArray(i)||i.length>Be.messages)return{ok:false,reason:"version"};let o=/* @__PURE__ */new Set;for(let e of i){if(!Me(e)||e.version!==void 0&&e.version!==Ae)return{ok:false,reason:"version"};if([e.createSurface,e.updateDataModel,e.updateComponents].filter(e=>e!==void 0).length!==1)return{ok:false,reason:"message"};let r=Me(e.createSurface)?e.createSurface:null,i=Me(e.updateDataModel)?e.updateDataModel:null,a=Me(e.updateComponents)?e.updateComponents:null,l=r??i??a;if(l===null)return{ok:false,reason:"message"};let s=l.surfaceId;if(typeof s!="string"||!Re.test(s))return{ok:false,reason:"message"};let d=t.get(s);if(r!==null){if(d!==void 0)continue;let e=r.components,i=r.dataModel;if(!Array.isArray(e)||e.length>Be.components||!(i===void 0||Me(i)))return{ok:false,reason:"message"};let a={surfaceId:s,catalogId:r.catalogId,revision:Le(r,n,i)??0,components:e.filter(Me),dataModel:i??{},updates:0,bytes:0};t.set(s,a),o.add(a);continue}if(d===void 0)continue;let c=Le(l,n,i===null?void 0:Ne(i));if(!(c===null||c<=d.revision)){if(++d.updates>Be.updates)return{ok:false,reason:"updates"};if(i!==null){if(i.value===void 0)return{ok:false,reason:"message"};let e=We(d.dataModel,i.path,i.value);if(e===null)return{ok:false,reason:"pointer"};d.dataModel=e}else{let e=l.components;if(!Array.isArray(e))return{ok:false,reason:"message"};let t=new Map(d.components.map(e=>[e.id,e]));for(let r of e)Me(r)&&typeof r.id=="string"&&t.set(r.id,r);if(t.size>Be.components)return{ok:false,reason:"message"};d.components=[...t.values()]}d.revision=c,o.add(d)}}for(let t of o)if(t.bytes+=e,t.bytes>Be.surfaceBytes)return{ok:false,reason:"too_large"}}return{ok:true,surfaces:[...t.values()].map(e=>({surfaceId:e.surfaceId,catalogId:e.catalogId,revision:e.revision,components:e.components,dataModel:e.dataModel}))}}var Ge="everfur_chat_cards_v1",$e="chat.cards",Xe=/* @__PURE__ */Object.freeze({cards:4,buttons:3,text:200}),Ve=["visit"],Ye=["book_vet"],Ke=["caution"],Ze=["ink","outline"],Qe=["urgency_soon"],Je=/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*){0,4}$/,et=/^[A-Za-z0-9_.-]{1,64}$/,tt=/* @__PURE__ */new Set(["CardStack","ChatCard","ActionRow","ActionButton"]),rt=/<\s*[A-Za-z/!?]|&[A-Za-z#][A-Za-z0-9]*;/,nt=/[\u0000-\u001f\u007f-\u009f\u061c\u200b-\u200f\u2028-\u202e\u2060-\u2064\u2066-\u2069\ufeff]/,it=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ot=(e,t)=>e.includes(t);function at(e,t){let r=Pe(t);if(r===null)return;let n=e;for(let e of r)if(Me(n)&&it(n,e))n=n[e];else return;return n}var lt=e=>typeof e=="string"&&e.trim()!==""&&e.length<=Xe.text&&!rt.test(e)&&!nt.test(e),st=class{constructor(e){this.model=e;this.reason=null;this.byId=/* @__PURE__ */new Map;this.used=/* @__PURE__ */new Set(["root"])}refuse(e){return this.reason??=e,null}index(e){for(let t of e){let e=t.id;if(typeof e!="string"||!et.test(e)||this.byId.has(e))return this.refuse("surface")??false;if(!tt.has(t.component))return this.refuse("component")??false;this.byId.set(e,t)}return true}node(e){return this.byId.get(e)}unused(){return this.byId.size-[...this.used].filter(e=>this.byId.has(e)).length}take(e,t){let r=typeof e=="string"&&!this.used.has(e)?this.byId.get(e):void 0;return r?.component!==t?this.refuse("component"):(this.used.add(e),r)}children(e,t,r){let n=e.children??[];return Array.isArray(n)?n.length>r?this.refuse("limit"):n.length<t?this.refuse("component"):n:this.refuse("component")}text(e,t,r){if(!it(e,t))return r?void 0:this.refuse("text");let n=e[t],i=Me(n)&&Object.keys(n).length===1?at(this.model,n["@path"]):void 0;return lt(i)?i:this.refuse("text")}pick(e,t){return ot(e,t)?t:this.refuse("component")}action(e){let t=Me(e)&&Object.keys(e).length===1&&Me(e.functionCall)?e.functionCall:null,r=t!==null&&Me(t.args)&&Object.keys(t.args).length===1?t.args:null;if(t===null||r===null)return this.refuse("action");switch(t["@call"]){case"navigate":return ot(Ve,r.route)?{kind:"navigate",route:r.route}:this.refuse("action");case"track":return typeof r.event=="string"&&Je.test(r.event)?{kind:"track",event:r.event}:this.refuse("action");default:return this.refuse("action")}}button(e){let t=this.take(e,"ActionButton");if(t===null)return null;let r=t["@accessibility"],n=this.text(t,"label",false),i=Me(r)?this.text(r,"label",false):this.refuse("text"),o=this.pick(Ze,t.tone),a=this.action(t.action);return n==null||i==null||o===null||a===null?null:{id:t.id,label:n,a11y:i,tone:o,action:a}}card(e){let t=this.take(e,"ChatCard"),r=t===null?null:this.children(t,0,1);if(t===null||r===null)return null;let n=[];for(let e of r){let t=this.take(e,"ActionRow"),r=t===null?null:this.children(t,1,Xe.buttons);if(r===null)return null;for(let e of r){let t=this.button(e);if(t===null)return null;n.push(t)}}let i=this.pick(Ye,t.card),o=this.pick(Ke,t.tone),a=this.text(t,"title",false),l=this.text(t,"body",true);return i===null||o===null||a==null||l===null?null:{id:t.id,card:i,tone:o,title:a,body:l??null,buttons:n}}};function dt(e){if(e.catalogId!==Ge)return{refused:"catalog"};let t=e.dataModel,r=new st(t),n=()=>({refused:r.reason??"surface"});if(!r.index(e.components))return n();let i=r.node("root");if(i?.component!=="CardStack")return{refused:"surface"};let o=r.children(i,1,Xe.cards);if(o===null)return n();let a=[];for(let e of o){let t=r.card(e);if(t===null)return n();a.push(t)}let l=Array.isArray(t.covers)?Qe.filter(e=>t.covers.includes(e)):[];return{cards:a,covers:l,unused:r.unused()}}function ct(e){let t=Ue(e);if(!t.ok)return t;let r=[],n=/* @__PURE__ */new Set,i=0;for(let e of t.surfaces){let t=dt(e);if("refused"in t)return{ok:false,reason:t.refused};r.push(...t.cards);for(let e of t.covers)n.add(e);i+=t.unused}return r.length>Xe.cards?{ok:false,reason:"limit"}:r.length===0?{ok:false,reason:"empty"}:{ok:true,cards:{surfaceIds:t.surfaces.map(e=>e.surfaceId),cards:r,covers:[...n],unused:i}}}function ut(petRef,e){let t={entry:"chat",petRef:petRef};return e?.returnTo!==void 0&&(t.returnTo=e.returnTo),e?.usState!==void 0&&(t.usState=e.usState),e?.prefer!==void 0&&(t.prefer=e.prefer),t}function ok(e,t){/* @__PURE__ */
6
+ return Object.freeze({ok:true,value:e})}function err(e){/* @__PURE__ */
7
+ return Object.freeze({ok:false,error:e})}var pt=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var ft=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),gt=globalThis,ht=gt[ft]??(gt[ft]=e.createContext(null));ht.displayName??="EverfurContext";function mt(){let t=e.useContext(ht);if(t===null)throw new pt("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return t}var bt=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],yt=/* @__PURE__ */Object.freeze(bt.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(yt.map(e=>e.wireCode));var wt=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),vt=/* @__PURE__ */Object.freeze(yt.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:wt[e.wireCode]}))),kt=new Map(vt.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),xt=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(vt.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let e of[t??"http_envelope",...xt]){let t=kt.get(e+r);if(t)return t}}var _t=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return _t[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),n=r.replace(/[^A-Z0-9]/g,"");if(n==="AUTHREJECTED")return"authRejected";if(r.startsWith("AUTH"))return"authExpired";switch(n){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var St=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return St.has(e)}var Ct=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||Ct.has(e)}var Tt=500,Ft=8e3,Et=4;function backoffDelayMs(e,t=Math.random){let r=Math.max(0,e),n=Math.min(Tt*2**r,Ft);return Math.floor(t()*n)}var zt="This feature isn't available on your account right now.",It="Something in that request was not right. Check the details and try again.",Ot=/* @__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:zt,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:It,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:zt,runtimeDisposed:It,unknown:"Something went wrong. Please try again."}),Ht="This session has ended. Please sign in again.",Dt="linked_account_read_only";function At(e,t,r){return e==="conflict"&&r===Dt?zt:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?Ht:userFacingError(e)}function userFacingError(e){return Ot[e]}function Bt(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false})}var jt=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let r=contractErrorFor(t?.wireCode,t?.wireEnvelope),n=e==="conflict"&&t?.reasonCode===Dt,i={code:e,category:categoryFor(e),retryable:t?.retryable??(n?false:isRetryableCode(e)),displayMessage:At(e,t?.wireCode,n?Dt:null)};t?.httpStatus!==void 0&&(i.httpStatus=t.httpStatus),t?.requestId&&(i.requestId=t.requestId),typeof t?.reasonCode=="string"&&jt.test(t.reasonCode)&&(i.reasonCode=t.reasonCode);let o=t?.retryAfterSeconds;if(typeof o=="number"&&Number.isFinite(o)&&o>=0&&(i.retryAfterSeconds=Math.round(o)),r);return t?.wireMessage&&Bt(i,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&Bt(i,"raw",t.raw),/* @__PURE__ */Object.freeze(i)}function errorFrame(e){/* @__PURE__ */
8
+ return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var Rt="x-everfur-anon-token",Mt="anonTokenInvalid";async function Pt(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function Wt(e,t){let r=e instanceof Error?e.message:typeof e=="string"?e:null;return makeEverfurError("authRejected",{retryable:false,...t?.wireCode?{wireCode:t.wireCode}:{},...t?.requestId?{requestId:t.requestId}:{},...r?{wireMessage:r}:{},...e!=null?{raw:e}:{}})}function authHeaders(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:(t["x-everfur-partner-key"]=e.publishableKey,e.anonToken&&(t[Rt]=e.anonToken)),e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}function withAuthHeaders(e,t){return{...e,headers:{...Lt(e.headers),...authHeaders(t)}}}function Lt(e){if(!e)return{};let t={};for(let[r,n]of Object.entries(e)){let e=r.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===Rt||(t[r]=n)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let r=await Pt(t),n=await t.transport.request(withAuthHeaders(e,Nt(t,r)));if(n.ok||Ut(n.error.raw)!==Mt||t.anonIdentity===void 0||t.userRef!==null)return n;let i=await t.anonIdentity.token({forceRefresh:true});return i===null||i===r?n:t.transport.request(withAuthHeaders(e,Nt(t,i)))}let r;try{r=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(Wt(e))}let n=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(n.ok||n.error.httpStatus!==401)return n;let i;try{i=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(Wt(e,{wireCode:Ut(n.error.raw),requestId:n.error.requestId}))}let o=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:i,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!o.ok&&o.error.httpStatus===401?(t.identity.reportRejected?.(),err(qt(o.error))):o}function Nt(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function qt(e){let t=e.raw,r=Ut(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...r?{wireCode:r}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function Ut(e){if(typeof e!="object"||e===null)return null;let t=e,r=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof r=="string"&&r.length>0?r:null}function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:Gt(e)})}function Gt(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var $t=3e4,Xt=Ft*2,Vt="idempotency-key",Yt=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),Kt=/* @__PURE__ */Object.freeze({onEvent(){}}),Zt=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function Qt(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}function createRequestFunnel(e){let t=e.observer??Kt,r=e.timers??Zt,n=e.rng??Math.random,i=e.sleep??((e,t)=>gr(e,r,t)),o=e.maxAttempts??Et,a=e.unaryTimeoutMs??$t,l=e.newIdempotencyKey??er(),s=e=>{try{t.onEvent(e)}catch{}};async function d(t,d,c){let u=c?.maxAttempts,p=Math.max(1,u??o),f=c?.idempotent??Yt.has(d.method),g=c?.idempotencyKey===void 0?null:Qt(c.idempotencyKey),h=f?g??l():null,m=Jt(d,h),b=0;for(;;){let o=e=>/* @__PURE__ */Object.freeze({call:t,method:d.method,path:d.path,attempt:b,...h?{idempotencyKey:h}:{},...e});s(o({phase:"attempt"}));let l=pr(a,r),c=fr(l.signal,d.signal),f;try{f=await authedSend({...m,signal:c.signal},e.auth)}catch(e){f=err(networkError(e))}finally{c.dispose(),l.cancel()}if(f.ok)return s(o({phase:"settled",ok:true,reason:"ok"})),f;let g=f.error,y=rr(g,b,{maxAttempts:p,rng:n,now:r.now(),aborted:d.signal?.aborted===true,...u!==void 0?{perCallMaxAttempts:u}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),w={ok:false,code:g.code,reason:y.reason,...g.httpStatus!==void 0?{httpStatus:g.httpStatus}:{},...g.requestId!==void 0?{requestId:g.requestId}:{}};if(!y.retry)return s(o({phase:"settled",...w})),err(g);if(s(o({phase:"retry",...w,delayMs:y.delayMs})),await i(y.delayMs,d.signal),d.signal?.aborted===true)return s(o({phase:"settled",...w,reason:"aborted"})),err(g);b+=1}}async function c(t){return withAuthHeaders(t,await ur(e.auth))}async function*u(t,r,n){s(
9
+ /* @__PURE__ */Object.freeze({call:t,phase:"stream.open",method:r.method,path:r.path,attempt:0}));try{yield*e.auth.transport.stream(r,n)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
10
+ return Object.freeze({send:d,authorize:c,stream:u})}function Jt(e,t){let r={};for(let[t,n]of Object.entries(e.headers??{}))t.toLowerCase()!==Vt&&(r[t]=n);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}function er(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var tr=10;function rr(e,t,r){if(r.aborted)return{retry:false,reason:"aborted"};let n=nr(e);if(n==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(n!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let i=n==="burst"?"burst-throttle":"retryable-code";if((()=>{if(r.policy===void 0)return false;try{return!r.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let o=()=>{if(r.policy===void 0)return null;let t;try{t=r.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(tr,Math.floor(t)))},a=r.perCallMaxAttempts??o()??r.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=ir(e,r.now);return l!==null?l>Xt?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:i,delayMs:l}:{retry:true,reason:i,delayMs:backoffDelayMs(t,r.rng)}}function nr(e){let t=e.code==="unknown"?fromWire(dr(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function ir(e,t){let r=ar(e.raw);if(r!==null){let e=r-t;return e>0?e:0}let n=or(e.raw);return n===null?null:Math.round(n*1e3)}function or(e){for(let t of lr(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function ar(e){for(let t of lr(e)){let e=t.resets_at,r=sr(e);if(r!==null)return r}return null}function lr(e){if(!cr(e))return[];let t=[e];for(let r of["error","detail"]){let n=e[r];cr(n)&&t.push(n)}return t}function sr(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function dr(e){for(let t of lr(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function cr(e){return typeof e=="object"&&e!==null}async function ur(e){if(e.mode==="anonymous"){let t=await Pt(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function pr(e,t){let r=new AbortController,n=t.setTimeout(()=>r.abort(),e);return{signal:r.signal,cancel:()=>t.clearTimeout(n)}}function fr(e,t){let r=()=>{};if(!t)return{signal:e,dispose:r};let n=new AbortController;if(e.aborted||t.aborted)return n.abort(),{signal:n.signal,dispose:r};let i=()=>n.abort();return e.addEventListener("abort",i,{once:true}),t.addEventListener("abort",i,{once:true}),{signal:n.signal,dispose:()=>{e.removeEventListener("abort",i),t.removeEventListener("abort",i)}}}function gr(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(n=>{let i=t.setTimeout(()=>{r?.removeEventListener("abort",o),n()},e),o=()=>{t.clearTimeout(i),n()};r?.addEventListener("abort",o,{once:true})})}var hr=/* @__PURE__ */Object.freeze(["visit","join","summary","messages"]);function isVetVisitIntent(e){return typeof e=="string"&&hr.includes(e)}var mr="/widget/v1/televet/handoffs",br="/widget/v1/televet/availability",yr="/widget/v1/televet/chat-entry",wr=/^[a-z0-9][a-z0-9_-]{0,39}$/,vr=/^[A-Za-z0-9_-]{22}$/;var kr=32,xr=128,_r=64;function vetVisitErrorReasonOf(e){let t=e.httpStatus;switch(e.code){case"sessionRequired":return"sessionRequired";case"authExpired":case"authRejected":return"authRejected";case"sdkUpdateRequired":return"sdkUpdateRequired";case"validationFailed":return"invalidRequest";case"rateLimited":case"quotaExceeded":return"rateLimited"}return t===void 0?e.code==="internalError"?"network":"unknown":t===429?"rateLimited":t===404?"unavailable":t===403?"accessDenied":t===401?"authRejected":t===400||t===422?"invalidRequest":t>=500?"serverError":"unknown"}function Sr(e){return err(makeEverfurError("validationFailed",{retryable:false,wireMessage:e}))}function Cr(e){return err(makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:e}))}function Tr(petRef,e){let t={};petRef!==void 0&&(t.pet_ref=petRef);let r=e?.returnTo;if(r!=null){if(typeof r!="string"||!wr.test(r))return{ok:false,message:"returnTo must be a registered return destination key"};t.return_to=r}let n=e?.entry;if(n!=null){if(n!=="chat"||petRef===void 0)return{ok:false,message:"entry 'chat' needs the pet the chat is about"};t.entry=n}let i=e?.visitRef,o=e?.intent,a=i!=null;if(a){let e=typeof i=="string"?i.trim():"";if(e.length<1||[...e].length>_r)return{ok:false,message:`visitRef must be 1..${_r} characters`};t.visit_ref=e}if(o!=null){if(!a)return{ok:false,message:"intent needs the visitRef it opens"};if(!isVetVisitIntent(o))return{ok:false,message:`intent must be one of ${hr.join(", ")}`};t.intent=o}return{ok:true,body:t}}function Fr(e){if(typeof e!="object"||e===null)return null;let{visit_ref:t,intent:r}=e;return typeof t!="string"||t.length===0||!isVetVisitIntent(r)?null:/* @__PURE__ */Object.freeze({visitRef:t,intent:r})}function Er(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=e.telemetry,n=e=>(Ar(r,"televet.visit.handoff_failed",{reason:vetVisitErrorReasonOf(e)}),err(e));return{async createHandoff(petRef,e){let i;if(petRef!=null){let e=typeof petRef=="string"?[...petRef].length:0;if(e<1||e>xr)return n(makeEverfurError("validationFailed",{retryable:false,wireMessage:`pet_ref must be 1..${xr} characters`}));i=petRef}let o=Tr(i,e);if(!o.ok){let e=Sr(o.message);return e.ok?e:n(e.error)}let a=o.body,l=await t.send("televet.visit.handoff",{method:"POST",path:mr,body:a},{idempotent:false,maxAttempts:1});if(!l.ok)return n(l.error);let s=zr(l.value),d=a.return_to!==void 0,c=d?l.value?.flow_id:void 0;if(d&&(typeof c!="string"||!vr.test(c))){let e=Cr("the handoff response carried no usable return flow id");return e.ok?e:n(e.error)}let u=a.visit_ref!==void 0,p=u?Fr(l.value?.visit):null;if(u&&p===null){let e=Cr("the handoff response did not confirm the visit it opens");return e.ok?e:n(e.error)}let f=s===null?null:/* @__PURE__ */Object.freeze({...s,...d?{flowId:c}:{},...p!==null?{visit:p}:{}});return f===null?n(makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:"the handoff response carried no usable visit url"})):(Ar(r,"televet.visit.handoff_created",{pet_scoped:a.pet_ref!==void 0}),ok(f))},async checkAvailability(e){if(typeof e!="string"||e.length>kr)return Sr(`state must be at most ${kr} characters`);let r=await t.send("televet.visit.availability",{method:"POST",path:br,body:{state:e}},{idempotent:false,maxAttempts:1});if(!r.ok)return err(r.error);let n=r.value?.available;return typeof n!="boolean"?Cr("the availability response carried no usable answer"):ok(/* @__PURE__ */Object.freeze({available:n}))},async chatEntryOpen(){try{let e=await t.send("televet.visit.chat_entry",{method:"GET",path:yr},{maxAttempts:1});return e.ok&&e.value?.open===!0}catch{return false}}}}function zr(e){if(typeof e!="object"||e===null)return null;let{url:t,expires_at:r}=e;return typeof t!="string"||typeof r!="string"||r.length===0||!Dr(t)?null:/* @__PURE__ */Object.freeze({url:t,expiresAt:r})}var Ir=/* @__PURE__ */new Set(["localhost","127.0.0.1","[::1]"]),Or=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/,Hr=/[\s\u0000-\u001f\u007f]/;function Dr(e){if(Hr.test(e))return false;let t=Or.exec(e);if(t===null)return false;let r=(t[1]??"").toLowerCase(),n=t[2]??"";if(n.length===0||n.includes("@"))return false;let i=n.replace(/:\d+$/,"").toLowerCase(),o=r==="https",a=r==="http"&&Ir.has(i);if(!o&&!a)return false;let l=e.indexOf("#");if(l<0)return false;let s=e.slice(l);return s.startsWith("#h=")&&s.length>3}function Ar(e,t,r){if(e)try{e.track(t,r)}catch{}}var Br=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(e){return Br[e]}function decideCapability(e,t,r){let n=requires(e),i=/* @__PURE__ */new Map;for(let e of t)i.set(e.resource,e);if(r?.isPending===true&&n.some(e=>!i.has(e)))return Mr({name:e,enabled:false,isPending:true,limits:{}});let o=jr(n,i);return n.filter(e=>i.get(e)?.granted!==true).length===0?Mr({name:e,enabled:true,isPending:false,limits:o}):Mr({name:e,enabled:false,isPending:false,limits:o,disabled:Rr(n,i)})}function jr(e,t){let r={};for(let n of e){let e=t.get(n)?.limits;if(e)for(let[t,n]of Object.entries(e)){let e=r[t];r[t]=e===void 0?n:Math.min(e,n)}}return r}function Rr(e,t){for(let r of e){let e=t.get(r)?.disabled;if(e)/* @__PURE__ */
11
+ return Object.freeze({reason:e.reason,level:e.level,recoverable:e.recoverable})}/* @__PURE__ */
12
+ return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function Mr(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function useCapability(t){let{runtime:r}=mt(),n=r.entitlements,i=e.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot);return e.useMemo(()=>decideCapability(t,i.decisions,{isPending:i.isPending}),[t,i])}function Pr(e,...t){}var Wr=/* @__PURE__ */Symbol.for("@everfur/sdk/televet");function Lr(){let e=globalThis,t=e[Wr];if(t!==void 0)return t;let r={presenter:null,snapshot:/* @__PURE__ */Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:/* @__PURE__ */new Set,dailyRegistered:false};return e[Wr]=r,r}function Nr(e){let t=Lr();t.snapshot=/* @__PURE__ */Object.freeze({...t.snapshot,...e});for(let e of[...t.listeners])try{e()}catch{}}function qr(e){let t=Lr().presenter;if(t===null)return"absent";try{return t(e)===!1?"declined":"presented"}catch(e){return console.warn("[everfur] Your registerEverfurTelevetFlow presenter threw; the in-app visit opened instead.",e),"threw"}}function Ur(){return Lr().hosts.length>0}function Gr(e){if(!Ur())return false;let t=/* @__PURE__ */Object.freeze({...e});return Nr({request:t,serial:Lr().snapshot.serial+1}),true}var $r=false;function Xr(e,t){return t!==void 0?(Pr(t,e),"onStartInApp"):qr(e)==="presented"?"presenter":Gr(e)?"experience":($r||($r=true,console.warn("[everfur] A vet visit had nowhere to open: mount <EverfurTelevetHost /> in your EverfurProvider, or pass prefer: 'redirect'.")),null)}var Vr=/* @__PURE__ */Object.freeze({status:"idle",error:null,errorReason:null});function Yr(t,r,n){let{usState:i,chat:o,scope:a}=n,l=r&&(i!==null||o),s=`${i??""}|${o?"chat":""}`,[d,c]=e.useState(null);if(e.useEffect(()=>{if(!l)return;let e=true,r=t.current;return c(null),(async()=>{try{if(o&&!(r.chatEntryOpen&&await r.chatEntryOpen()))return!1;if(i===null)return!0;if(!r.checkAvailability)return!1;let e=await r.checkAvailability(i);return e.ok&&e.value.available}catch{return false}})().then(t=>{e&&c({key:s,open:t})}),()=>{e=false}},[l,s,i,o,a,t]),!l)return null;let u=d!==null&&d.key===s;return{open:u&&d.open,pending:!u}}var Kr=/* @__PURE__ */Object.freeze({status:"opening",error:null,errorReason:null});function Zr(t,r={}){let{runtime:n,userRef:userRef,scopeEpoch:i}=mt(),o=useCapability("televet"),a=o.enabled&&userRef!==null,l=r.usState??null,s=r.entry==="chat",d=r.petRef??null,c=r.prefer==="redirect",u=e.useMemo(()=>{if(r.controller)return r.controller;let{services:e}=n.registry;return Er({auth:e.authFor(userRef),telemetry:e.telemetry,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}})},[n,userRef,i,r.controller]),p=e.useRef(u);p.current=u;let f=e.useMemo(()=>({runtime:n,userRef:userRef,scopeEpoch:i}),[n,userRef,i]),g=Yr(p,a,{usState:l,chat:s,scope:f}),h=a&&(g===null||g.open)&&(!s||d!==null),m=r.returnTo??null,[b,y]=e.useState(Vr),w=e.useRef(null),v=e.useRef({runtime:n,userRef:userRef,scopeEpoch:i});v.current={runtime:n,userRef:userRef,scopeEpoch:i};let k=e.useRef(u);k.current=u;let x=e.useRef(h);x.current=h;let _=e.useCallback((petRef,e)=>{if(w.current)return w.current;let r=(e,t)=>(y({status:e==="cancelled"?"idle":"error",error:t,errorReason:e==="cancelled"?null:e}),/* @__PURE__ */Object.freeze({opened:false,reason:e,error:t}));if(!x.current)return Promise.resolve(r("unavailable",null));let n=t.prepare();if(!n.ok)return Promise.resolve(r(n.reason,null));let i=v.current,o=k.current;y(Kr);let a=(async()=>{let a,l={...m!==null?{returnTo:m}:{},...s?{entry:"chat"}:{},...e!==null?{visitRef:e.visitRef}:{},...e!==null&&e.intent!==null&&e.intent!==void 0?{intent:e.intent}:{}},c=Object.keys(l).length===0?void 0:l,u=petRef===void 0?d:petRef;try{a=await(c===void 0?o.createHandoff(u):o.createHandoff(u,c))}catch{return t.abandon(n.value),r("unknown",null)}let p=v.current;if(p.runtime!==i.runtime||p.userRef!==i.userRef||p.scopeEpoch!==i.scopeEpoch)return t.abandon(n.value),r("cancelled",null);if(!a.ok)return t.abandon(n.value),r(vetVisitErrorReasonOf(a.error),a.error);let f=await t.finish(n.value,a.value);return f!==null?r(f,null):(y(Vr),/* @__PURE__ */Object.freeze(a.value.flowId===void 0?{opened:true}:{opened:true,flowId:a.value.flowId}))})().finally(()=>{w.current===a&&(w.current=null)});return w.current=a,a},[t,d,m,s]),S=e.useCallback((petRef,e)=>{if(!x.current)return y({status:"error",error:null,errorReason:"unavailable"}),Promise.resolve(/* @__PURE__ */Object.freeze({opened:false,reason:"unavailable",error:null}));let t=petRef===void 0?d:petRef,r={...t!==null?{petRef:t}:{},...l!==null?{usState:l}:{},...e!==null&&"consultId"in e?{consultId:e.consultId}:{},...e!==null&&"visitRef"in e?{visitRef:e.visitRef,intent:e.intent}:{}};return Xr(r)===null?(y({status:"error",error:null,errorReason:"unavailable"}),Promise.resolve(/* @__PURE__ */Object.freeze({opened:false,reason:"unavailable",error:null}))):(y(Vr),Promise.resolve(/* @__PURE__ */Object.freeze({opened:true})))},[d,l]),C=e.useCallback(petRef=>c?_(petRef,null):S(petRef,null),[c,_,S]),T=e.useCallback((e,t)=>c?_(void 0,{visitRef:e,intent:t??null}):S(void 0,{visitRef:e,intent:t??null}),[c,_,S]),F=e.useCallback(e=>c?_(void 0,null):S(void 0,{consultId:e.trim()}),[c,_,S]);return{available:h,isPending:o.isPending||(g?.pending??false),status:b.status,error:b.error,errorReason:b.errorReason,open:C,openVisit:T,joinVisit:F}}var Qr=e=>t.Linking.openURL(e);function useVetVisit(t={}){let{openUrl:r,...n}=t,i=e.useMemo(()=>{let e=r??Qr;return{prepare:()=>({ok:true,value:null}),async finish(t,r){try{return await e(r.url),null}catch{return"openFailed"}},abandon:()=>{}}},[r]);return Zr(i,n)}var Jr=class extends e.Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(e,t){return Object.is(e.resetKey,t.key)?null:{failed:false,key:e.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:e}){return e()}function HostRender({render:t,fallback:r,resetKey:n}){return e.createElement(Jr,{fallback:r,resetKey:n,children:e.createElement(RenderHost,{render:t})})}var en=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var tn=Object.freeze;function rn(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){tn(e);for(let t of Object.keys(e))rn(e[t])}return e}var nn=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var on={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},an={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},ln={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},sn={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},dn={regular:"400",medium:"500",bold:"700"},cn={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},un=0,pn="System",fn="monospace",gn=["content","heading","control","compact","badge"];function hn(e){let t={};for(let r of gn)t[r]=e;return t}var mn=[];function bn(){return{family:pn,mono:fn,fontUrl:null,families:{regular:pn,medium:pn,bold:pn,mono:fn,monoMedium:fn,monoBold:fn},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:ln,tierSizes:hn(ln),lineHeight:sn,weight:dn,letterSpacing:cn,scale:1,maxScale:un,scaleCaps:nn,headingFamily:null,headingWeight:null,fontSources:mn,roles:en,typeScale:1}}var yn={},wn=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var vn={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(wn.standard),emphasized:cssCubicBezier(wn.emphasized),exit:cssCubicBezier(wn.exit)},reducedMotion:false},kn={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},xn=rn({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:kn,space:on,radius:an,type:bn(),motion:vn,slots:yn}),_n={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"},Sn=rn({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:_n,space:on,radius:an,type:bn(),motion:vn,slots:yn});var Cn=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let r=e.type,n=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:n}:{fontFamily:n,fontWeight:r.weight[Cn[t]]}}function headingFace(e,t="bold"){let{headingFamily:r,headingWeight:n}=e.type;if(r===null&&n===null)return face(e,t);if(r!==null)return{fontFamily:r,fontWeight:n??e.type.weight[Cn[t]]};let i=face(e,t);return i.fontWeight===void 0||n===null?i:{fontFamily:i.fontFamily,fontWeight:n}}function Tn(e){if(typeof e=="number")return zn(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return Fn(t.slice(1));if(t.toLowerCase().startsWith("0x"))return Fn(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return En(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=Fn(t);if(e!==null)return e}return/^\d+$/.test(t)?zn(Number.parseInt(t,10)):null}function Fn(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:On(t[0]),g:On(t[1]),b:On(t[2]),a:1};if(t.length===6)return{r:In(t,0),g:In(t,2),b:In(t,4),a:1};if(t.length===8){let e=In(t,0);return{r:In(t,2),g:In(t,4),b:In(t,6),a:e/255}}return null}function En(e){let t=e.indexOf("("),r=e.indexOf(")");if(t<0||r<0||r<t)return null;let n=e.slice(t+1,r).split(",").map(e=>e.trim());if(n.length<3)return null;let i=Hn(Number(n[0])),o=Hn(Number(n[1])),a=Hn(Number(n[2]));if(i===null||o===null||a===null)return null;let l=1;if(n.length>=4){let e=Number(n[3]);if(!Number.isFinite(e))return null;l=Math.min(1,Math.max(0,e))}return{r:i,g:o,b:a,a:l}}function zn(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,r=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:r===0?1:r/255}}function In(e,t){return Number.parseInt(e.slice(t,t+2),16)}function On(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function Hn(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function Dn(e,t,r){return`#${An(e)}${An(t)}${An(r)}`.toUpperCase()}function An(e){return e.toString(16).padStart(2,"0")}var Bn="#111111",jn="#FFFFFF",Rn="#000000";function readableOn(e){let t=Tn(e);if(t===null)return jn;let r=Wn(t),n=Wn({r:17,g:17,b:17}),i=Wn({r:255,g:255,b:255});return Nn(r,i)>=Nn(r,n)?jn:Bn}function Mn(e,t){let r=readableOn(e);return contrastRatio(r,e)>=t?r:contrastRatio(jn,e)>=contrastRatio(Rn,e)?jn:Rn}function Pn(e){let t=t=>e.reduce((e,r)=>Math.min(e,contrastRatio(t,r)),Number.POSITIVE_INFINITY);return t(jn)>=t(Rn)?jn:Rn}function Wn(e){let t=Ln(e.r/255),r=Ln(e.g/255),n=Ln(e.b/255);return.2126*t+.7152*r+.0722*n}function Ln(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Nn(e,t){let r=Math.max(e,t),n=Math.min(e,t);return(r+.05)/(n+.05)}function contrastRatio(e,t){let r=Tn(e),n=Tn(t);if(r===null||n===null)return 1;let i=n.a>=1?n:{...n},o=r.a>=1?r:qn(r,i);return Nn(Wn(o),Wn(i))}function qn(e,t){let r=e.a,n=(e,t)=>Math.round(e*r+t*(1-r));return{r:n(e.r,t.r),g:n(e.g,t.g),b:n(e.b,t.b),a:1}}function Un(e,t){let r=Tn(e),n=Tn(t);if(r===null||n===null)return null;let i=r.a>=1?r:qn(r,{...n});return Dn(i.r,i.g,i.b)}var Gn=.05;function $n(e,t,r,n){let i=t[0];if(i===void 0)return r;let o=e=>t.every(t=>contrastRatio(e,t)>=n);if(Tn(e)===null)return r;if(o(e))return e;let a=Un(e,i),l=a===null?null:Tn(a),s=Tn(r);if(l===null||s===null)return r;for(let e=1;e<1/Gn;e+=1){let t=e*Gn,r=(e,r)=>Math.round(e+(r-e)*t),n=Dn(r(l.r,s.r),r(l.g,s.g),r(l.b,s.b));if(o(n))return n}return r}var Xn=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),Vn=/* @__PURE__ */new WeakMap;function Yn(e){let t=Vn.get(e);if(t!==void 0)return t;let r=e.color,n=e.brightness==="dark",i=n?{dark:n,ink:r.text.primary,ink2:r.text.secondary,ink3:r.text.muted,paper:r.background,card:r.surface,line:r.borderRingCream,tile:r.surfaceSubtle,shadow:r.shadow,riskBg:r.badgeBgCritical,riskInk:r.danger,riskDot:r.danger,clearBg:r.badgeBgPositive,clearInk:r.success,clearDot:r.success,watchDot:r.warningStrong}:{dark:n,...Xn},o=(e,t)=>$n(e,t,Pn(t),Kn),a=(e,t)=>contrastRatio(e,t)>=Kn?e:Mn(t,Kn),l=[i.card,i.paper].map(e=>Un(r.brandSoft,e)??e),s={primary:r.primary,onPrimary:a(r.onPrimary,r.primary),accent:r.accent,onAccent:a(r.onAccent,r.accent),link:o(r.linkInk,[i.card,i.paper,i.tile]),badge:r.brandSoft,onBadge:o(r.brandInk,l)},d=/* @__PURE__ */Object.freeze({...i,...s});return Vn.set(e,d),d}var Kn=4.5;var Zn=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),Qn=globalThis,Jn=Qn[Zn]??(Qn[Zn]=e.createContext(xn));Jn.displayName??="EverfurThemeContext";function useEverfurTheme(){return e.useContext(Jn)}var ei=e=>{let t=e.type.namedFaces,r=t=>face(e,t).fontFamily;return{family:r("regular"),mono:r("mono"),faces:{regular:r("regular"),medium:r("medium"),bold:r("bold"),mono:r("mono"),monoBold:r("monoBold"),serif:headingFace(e,"bold").fontFamily},namedFaces:t.regular&&t.medium&&t.bold}},ti=/* @__PURE__ */new WeakMap;function ri(e,t,r=d){if(r!==d)return ni(e,t,r);let n=ti.get(t);n===void 0&&ti.set(t,n=/* @__PURE__ */new WeakMap);let i=n.get(e);return i===void 0&&n.set(e,i=ni(e,t,r)),i}function ni(e,t,r){let n=e.color,i=xn.color,o=e.brightness==="dark",a=o?Sn:xn,l=e=>n[e]!==i[e],s={};if(l("primary")?(Object.assign(s,{ink:n.primary,onInk:n.onPrimary,focus:n.primary}),l("accent")||Object.assign(s,{go:n.primary,onGo:n.onPrimary})):l("onPrimary")&&(s.onInk=n.onPrimary),l("accent")&&Object.assign(s,{go:n.accent,onGo:n.onAccent}),l("brandSoft")&&(s.tintSage=n.brandSoft),l("danger")&&Object.assign(s,{alert:n.danger,alertDeep:n.danger}),o)Object.assign(s,{bg:n.background,surface:n.surface,text:n.text.primary,muted:n.text.muted,line:n.borderRingCream});else{let e=a.color;n.background!==e.background&&(s.bg=n.background),n.surface!==e.surface&&(s.surface=n.surface),n.text.primary!==e.text.primary&&(s.text=n.text.primary),n.text.muted!==e.text.muted&&(s.muted=n.text.muted)}let d={};Object.keys(s).length>0&&(d.colors={...s});let c=e.radius,u=a.radius;if(c.xs!==u.xs||c.sm!==u.sm||c.lg!==u.lg||c.xl!==u.xl||c.pill!==u.pill){let e={};c.xs!==u.xs&&(e.sm=c.xs),c.sm!==u.sm&&(e.md=c.sm),c.lg!==u.lg&&(e.lg=c.lg),c.xl!==u.xl&&(e.xl=c.xl),c.pill!==u.pill&&(e.pill=c.pill),d.radius=e,(c.lg!==u.lg||c.xl!==u.xl)&&(d.metrics={...c.lg!==u.lg?{card:{radius:c.lg},summary:{radius:c.lg}}:{},...c.xl!==u.xl?{sheet:{radius:c.xl}}:{}})}if(e.space.xs!==a.space.xs){let t=e.space.xs/a.space.xs,n=r.space,i=e=>Math.round(e*t);d.space={1:i(n[1]),2:i(n[2]),3:i(n[3]),4:i(n[4]),5:i(n[5]),6:i(n[6]),7:i(n[7]),8:i(n[8]),9:i(n[9])}}let p=e.type.size,f=a.type.size,g=p.caption!==f.caption||p.bodyTight!==f.bodyTight||p.body!==f.body||p.subtitle!==f.subtitle||p.verdict!==f.verdict,h=e.type.lineHeight,m=a.type.lineHeight,b=h.relaxed!==m.relaxed||h.tight!==m.tight,y=e.type.scaleCaps,w=a.type.scaleCaps,v=y.content!==w.content||y.heading!==w.heading||y.control!==w.control||y.compact!==w.compact||y.badge!==w.badge,k=g||b||v;d.type={...g?{size:{xs:p.caption,sm:p.bodyTight,md:p.body,lg:p.subtitle,xl:p.verdict}}:{},...b?{lineHeight:{body:h.relaxed,display:h.tight}}:{},...v?{scaleCaps:{content:y.content,heading:y.heading,control:y.control,compact:y.compact,badge:y.badge}}:{},...t(e)},e.motion.reducedMotion&&!r.motion.reduced&&(d.motion={reduced:true});let x=k||Object.keys(s).length>0||Object.keys(d).some(e=>e!=="type"&&e!=="colors")||e.type.families.regular!==xn.type.families.regular,_=ai(e,a,s.surface??r.colors.surface),S=Object.entries(_).filter(([e,t])=>t!==r.colors[e]);return S.length>0&&(d.colors={...s,...Object.fromEntries(S)}),x?{name:"partner",...d}:d}var ii={planAccent:d.colors.planAccent,planLink:d.colors.planLink},oi={planAccentWash:["accent",.17],planAccentChip:["accent",.47],planLinkWash:["link",.12],planLinkChip:["link",.2]};function ai(e,t,r){let n=Yn(e),i=Yn(t),o=e.color,a={};(o.primary!==t.color.primary||o.onPrimary!==t.color.onPrimary)&&Object.assign(a,{planInk:o.primary,planOnInk:n.onPrimary}),o.accent!==t.color.accent&&(a.planAccent=o.accent),n.link!==i.link&&(a.planLink=n.link);let l={accent:a.planAccent??ii.planAccent,link:a.planLink??ii.planLink},s={planLinkWash:n.dark?void 0:e.slots.planWash?.backgroundColor,planLinkChip:n.dark?void 0:e.slots.planChip?.backgroundColor},d=r.toLowerCase()!==n.card.toLowerCase();for(let[e,[t,r]]of Object.entries(oi)){let i=s[e];i!==void 0?a[e]=i:d&&(a[e]=F(l[t],r,n.card,n.card))}return a}function li(t){let r=useEverfurTheme();return e.useMemo(()=>ri(r,t),[r,t])}function BlockScope({children:t}){let r=li(ei);return e.createElement(ThemeProvider,{theme:r},t)}var si=()=>globalThis[/* @__PURE__ */Symbol.for("everfur.sdk.chatCards.v1")]??={loader:null,lazy:null};var di=/\/widget\/v1\/conversations\/[^/?]+\/messages(?:\?|$)/,ci=50,ui=(e,t)=>{let r=si(),n=r.frames??=/* @__PURE__ */new Map;if(r.loader===null||t.method!=="POST"||!di.test(e))return null;let i=[];return{headers:{"X-Everfur-Client-Capabilities":De},watch:e=>e.addEventListener("message",e=>{let t=e.data??"";if(i.length===0&&!t.includes('"a2ui"'))return;let r;try{r=JSON.parse(t)}catch{return}if(r===null||typeof r!="object")return;let o=r;o.type===He?i.length<8&&i.push(o):o.done===true&&typeof o.message_id=="string"&&i.length>0&&!n.has(o.message_id)&&(n.set(o.message_id,i),n.size>ci&&n.delete(n.keys().next().value))})}};var pi=si();pi.frames??=/* @__PURE__ */new Map;pi.tap=ui;var fi={book_vet:"video"};ye({video:Ie});var gi={caution:e=>e.tintWatch};function hi(e,t,r){try{e.registry.services.telemetry.track(t,r)}catch{}}function mi(e){let{runtime:t}=mt(),r=useVetVisit(ut(e.petRef,e.vet));return{run:(e,n)=>{switch(e.kind){case"navigate":return e.route==="visit"&&r.available?()=>{r.open()}:null;case"track":return()=>hi(t,"slots.track",{slot:$e,part:n,event:e.event})}},opening:r.status==="opening"}}function CardView({card:e,run:n,opening:i}){let o=x();/* @__PURE__ */
13
+ return r.jsxs(Card,{variant:"plain",tint:gi[e.tone](o.colors),testID:`everfur-card-${e.id}`,children:[
14
+ /* @__PURE__ */r.jsxs(t.View,{style:yi.head,children:[
15
+ /* @__PURE__ */r.jsx(Icon,{name:fi[e.card],size:22,color:o.colors.ink}),
16
+ /* @__PURE__ */r.jsxs(t.View,{style:yi.words,children:[
17
+ /* @__PURE__ */r.jsx(Text,{variant:"heading",level:3,children:e.title}),e.body!==null?/* @__PURE__ */r.jsx(Text,{variant:"body",children:e.body}):null]})]}),e.buttons.length===0?null:/* @__PURE__ */r.jsx(t.View,{style:yi.buttons,children:e.buttons.map(t=>/* @__PURE__ */r.jsx(Button,{label:t.label,accessibilityLabel:t.a11y,tone:t.tone,loading:i&&t.action.kind==="navigate"&&t.action.route==="visit",loadingIndicator:"none",onPress:n(t.action,e.id)??void 0,testID:`everfur-card-${t.id}`,style:yi.button},t.id))})]})}function bi(e,t,r){e.cover(e=>r.includes("urgency_soon")?t:e===t?null:e)}function Uncovered({messageId:t,host:r}){return e.useEffect(()=>bi(r,t,[]),[t,r]),null}function ServerCards(e){/* @__PURE__ */
18
+ return r.jsx(HostRender,{resetKey:e.a2ui,fallback:/* @__PURE__ */r.jsx(Uncovered,{messageId:e.message.id,host:e.host}),render:()=>/* @__PURE__ */r.jsx(Cards,{...e})})}function Cards({message:n,a2ui:i,host:o}){let a=n.id,{runtime:l}=mt(),{run:s,opening:d}=mi(o),c=e.useMemo(()=>ct(i),[i]),u=c.ok&&c.cards.cards.every(e=>e.buttons.every(t=>s(t.action,e.id)!==null)),p=c.ok&&u?c.cards:null,f=c.ok?u?null:"unrunnable":c.reason,g=p===null?"":p.covers.join(",");return e.useEffect(()=>{f!==null?hi(l,"chat.a2ui.refused",{reason:f}):hi(l,"chat.a2ui.drawn",{cards:c.ok?c.cards.cards.length:0,unused:c.ok?c.cards.unused:0})},[c,f,l]),e.useEffect(()=>{bi(o,a,g===""?[]:g.split(","))},[o,a,g]),p===null?null:/* @__PURE__ */r.jsx(BlockScope,{children:/* @__PURE__ */r.jsx(t.View,{style:yi.stack,testID:"everfur-server-cards",children:p.cards.map(e=>/* @__PURE__ */r.jsx(CardView,{card:e,run:s,opening:d},e.id))})})}var yi=t.StyleSheet.create({stack:{gap:10,marginTop:10,alignSelf:"stretch"},head:{flexDirection:"row",gap:10,alignItems:"flex-start"},words:{flex:1,gap:4},buttons:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:12},button:{minHeight:44}});var wi=ServerCards;exports.ServerCards=wi;
@@ -0,0 +1,15 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
+ import { ComponentType } from 'react';
3
+
4
+ /**
5
+ * The server-sent chat cards renderer. Hand this module to `registerEverfurChatCards`; the chat mounts it under each
6
+ * reply that carries cards, with props only the chat supplies, so it is never mounted directly.
7
+ *
8
+ * Everfur internal preview, not part of the partner API: it may change or go away in any release, and the platform
9
+ * sends cards only to tenants Everfur enables.
10
+ *
11
+ * @internal
12
+ */
13
+ declare const ServerCards: ComponentType<never>;
14
+
15
+ export { ServerCards };
@@ -0,0 +1,15 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
+ import { ComponentType } from 'react';
3
+
4
+ /**
5
+ * The server-sent chat cards renderer. Hand this module to `registerEverfurChatCards`; the chat mounts it under each
6
+ * reply that carries cards, with props only the chat supplies, so it is never mounted directly.
7
+ *
8
+ * Everfur internal preview, not part of the partner API: it may change or go away in any release, and the platform
9
+ * sends cards only to tenants Everfur enables.
10
+ *
11
+ * @internal
12
+ */
13
+ declare const ServerCards: ComponentType<never>;
14
+
15
+ export { ServerCards };