@mediquo/elements 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -1
- package/dist/chunks/api-chat-client-CqMn2JEn.js +1 -0
- package/dist/chunks/{apple-pay-outcomes-BNkcTbbM.js → apple-pay-outcomes-CjCnBYOD.js} +1 -1
- package/dist/chunks/chunk-4FFT6DC2-CVWibomC.js +1 -0
- package/dist/chunks/chunk-GZF3YFSX-DM-GTqxg.js +1 -0
- package/dist/chunks/chunk-RCFIJTXZ-C6Ir0-sM.js +1 -0
- package/dist/chunks/chunk-S5RWG6G2-DPesx3Od.js +1 -0
- package/dist/chunks/chunk-YMQSBQHL-De_r7BNk.js +1 -0
- package/dist/chunks/chunk-YTQUGGS3-DmCGIoFy.js +1 -0
- package/dist/chunks/consume-CovVqBjI.js +1 -0
- package/dist/chunks/context-consumer-ESdICVAb.js +1 -0
- package/dist/chunks/context-provider--AKuwfs9.js +1 -0
- package/dist/chunks/create-context-DqP79qjF.js +1 -0
- package/dist/chunks/documentation-view-fFbvjJqx.js +1 -0
- package/dist/chunks/external-CJj32K_p.js +1 -0
- package/dist/chunks/{format-Cm3B1GMy.js → format-CRFiCNHw.js} +1 -1
- package/dist/chunks/get-appointment-query-Ck68BEMg.js +1 -0
- package/dist/chunks/get-patient-profile-query-B0tUDJmT.js +1 -0
- package/dist/chunks/i18n-formats-DYS91YEa.js +1 -0
- package/dist/chunks/index-CGnPsMVQ.js +1 -0
- package/dist/chunks/index-CLdWVaEs.js +1 -0
- package/dist/chunks/index-CvDnN2NR.js +1 -0
- package/dist/chunks/index-DNUbmrQl.d.ts +31 -0
- package/dist/chunks/index-Xcn-xs13.js +1 -0
- package/dist/chunks/index-czcKClL3.d.ts +47 -0
- package/dist/chunks/isBefore-CPpTogxo.js +1 -0
- package/dist/chunks/{isSameDay-DPfclwIL.js → isSameDay-CuhZMy1T.js} +1 -1
- package/dist/chunks/localized-decorator-BlOuLhym.js +1 -0
- package/dist/chunks/mq-layout-CGcdxGMQ.js +1 -0
- package/dist/chunks/mq-professional-presence-sync-cmg6CXhz.d.ts +22 -0
- package/dist/chunks/mq-unread-count-sync-DTn9dfR4.d.ts +22 -0
- package/dist/chunks/mutation-controller-CR2qcqhH.js +1 -0
- package/dist/chunks/parseISO-Dj3qSTG8.js +1 -0
- package/dist/chunks/price-BmA2Dl9f.js +1 -0
- package/dist/chunks/professional-overview-CfjgnTw4.js +1 -0
- package/dist/chunks/{provide-CfT7g_Zi.js → provide-D2fnEhT2.js} +1 -1
- package/dist/chunks/query-Cjvi4_dT.js +1 -0
- package/dist/chunks/query-controller-BlO1Ax65.js +1 -0
- package/dist/chunks/{refund-cancel-policy-CnbrIqH0.js → refund-cancel-policy-D_tUYPyv.js} +1 -1
- package/dist/chunks/schemas.d-5LR6aN9I.d.ts +134 -0
- package/dist/chunks/telemetry-client-Ca71sobH.js +1 -0
- package/dist/env.js +1 -1
- package/dist/i18n.js +1 -1
- package/dist/mq-apple-pay-checkout.js +1 -1
- package/dist/mq-appointment-checkout.js +1 -1
- package/dist/mq-appointment-documentation.d.ts +48 -0
- package/dist/mq-appointment-documentation.js +1 -0
- package/dist/mq-chat-room.js +1 -1
- package/dist/mq-checkout.js +1 -1
- package/dist/mq-documents.d.ts +46 -0
- package/dist/mq-documents.js +1 -0
- package/dist/mq-google-pay-checkout.js +1 -1
- package/dist/mq-immediate-videocall-checkout.js +1 -1
- package/dist/mq-my-appointments.d.ts +48 -178
- package/dist/mq-my-appointments.js +1 -1
- package/dist/mq-professional-presence-sync.d.ts +30 -0
- package/dist/mq-professional-presence-sync.js +1 -0
- package/dist/mq-query-client-provider.js +1 -1
- package/dist/mq-schedule-success.d.ts +9 -0
- package/dist/mq-schedule-success.js +2 -2
- package/dist/mq-schedule.d.ts +22 -10
- package/dist/mq-schedule.js +1 -1
- package/dist/mq-session-provider.d.ts +28 -0
- package/dist/mq-session-provider.js +1 -0
- package/dist/mq-socket-provider.js +1 -1
- package/dist/mq-support-chat.js +1 -1
- package/dist/mq-terms-and-conditions.d.ts +23 -0
- package/dist/mq-terms-and-conditions.js +1 -0
- package/dist/mq-unread-count-sync.d.ts +21 -0
- package/dist/mq-unread-count-sync.js +1 -0
- package/dist/mq-videocall.d.ts +35 -26
- package/dist/mq-videocall.js +1 -1
- package/dist/react/mq-apple-pay-checkout.js +1 -1
- package/dist/react/mq-appointment-checkout.js +1 -1
- package/dist/react/mq-appointment-documentation.d.ts +28 -0
- package/dist/react/mq-appointment-documentation.js +2 -0
- package/dist/react/mq-chat-room.d.ts +2 -0
- package/dist/react/mq-chat-room.js +1 -1
- package/dist/react/mq-checkout.js +1 -1
- package/dist/react/mq-documents.d.ts +13 -0
- package/dist/react/mq-documents.js +2 -0
- package/dist/react/mq-google-pay-checkout.js +1 -1
- package/dist/react/mq-immediate-videocall-checkout.js +1 -1
- package/dist/react/mq-my-appointments.d.ts +1 -0
- package/dist/react/mq-my-appointments.js +1 -1
- package/dist/react/mq-professional-presence-sync.d.ts +7 -0
- package/dist/react/mq-professional-presence-sync.js +2 -0
- package/dist/react/mq-query-client-provider.js +1 -1
- package/dist/react/mq-schedule-success.d.ts +3 -0
- package/dist/react/mq-schedule-success.js +1 -1
- package/dist/react/mq-schedule.d.ts +2 -0
- package/dist/react/mq-schedule.js +1 -1
- package/dist/react/mq-session-provider.d.ts +10 -0
- package/dist/react/mq-session-provider.js +2 -0
- package/dist/react/mq-socket-provider.js +1 -1
- package/dist/react/mq-support-chat.js +1 -1
- package/dist/react/mq-terms-and-conditions.d.ts +14 -0
- package/dist/react/mq-terms-and-conditions.js +2 -0
- package/dist/react/mq-toast-container.d.ts +8 -0
- package/dist/react/mq-toast-container.js +2 -0
- package/dist/react/mq-unread-count-sync.d.ts +7 -0
- package/dist/react/mq-unread-count-sync.js +2 -0
- package/dist/react/mq-videocall.d.ts +14 -2
- package/dist/react/mq-videocall.js +1 -1
- package/dist/toast.d.ts +3 -0
- package/dist/toast.js +1 -0
- package/dist/ui/mq-calendar.js +1 -1
- package/dist/ui/mq-time-slot-picker.js +1 -1
- package/dist/ui/mq-toast.js +1 -1
- package/package.json +29 -1
- package/dist/chunks/api-chat-client-C8SqZtCa.js +0 -1
- package/dist/chunks/chunk-S5RWG6G2-oTcdgk2H.js +0 -1
- package/dist/chunks/chunk-YTQUGGS3-DN-JZpgG.js +0 -1
- package/dist/chunks/context-provider-CiMFpvDA.js +0 -1
- package/dist/chunks/exports-G_7Ih_GH.js +0 -1
- package/dist/chunks/external-zAbuzxDj.js +0 -1
- package/dist/chunks/get-patient-profile-query-C8T8DJ7z.js +0 -1
- package/dist/chunks/index-Bxh8Qfwr.js +0 -1
- package/dist/chunks/index-DiqYAEHW.js +0 -1
- package/dist/chunks/isBefore-Cof0D841.js +0 -1
- package/dist/chunks/mq-layout-CpIZTsV2.js +0 -1
- package/dist/chunks/mutation-controller-OVT8NEt6.js +0 -1
- package/dist/chunks/parseISO-jT42c8Ob.js +0 -1
- package/dist/chunks/price-tImUmtpX.js +0 -1
- package/dist/chunks/query-QJ1INUTG.js +0 -1
- package/dist/chunks/telemetry-client-BRVJU-fZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,t as e,c as n,n as r,s as a,m as o,b as i,g as u}from"./parseISO-jT42c8Ob.js";function s(e,n){return t(e,{...n,weekStartsOn:1})}function c(t,r){const a=e(t,r?.in),o=a.getFullYear(),i=n(a,0);i.setFullYear(o+1,0,4),i.setHours(0,0,0,0);const u=s(i),c=n(a,0);c.setFullYear(o,0,4),c.setHours(0,0,0,0);const d=s(c);return a.getTime()>=u.getTime()?o+1:a.getTime()>=d.getTime()?o:o-1}function d(t){const n=e(t),r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return r.setUTCFullYear(n.getFullYear()),+t-+r}function h(t){return!(!((n=t)instanceof Date||"object"==typeof n&&"[object Date]"===Object.prototype.toString.call(n))&&"number"!=typeof t||isNaN(+e(t)));var n}const l={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function m(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const f={date:m({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:m({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:m({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},g={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function w(t){return(e,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):e;r=t.formattingValues[a]||t.formattingValues[e]}else{const e=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;r=t.values[a]||t.values[e]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function b(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(a);if(!o)return null;const i=o[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(u)?function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n;return}(u,t=>t.test(i)):function(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n;return}(u,t=>t.test(i));let c;c=t.valueCallback?t.valueCallback(s):s,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:e.slice(i.length)}}}var y;const p={code:"en-US",formatDistance:(t,e,n)=>{let r;const a=l[t];return r="string"==typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:f,formatRelative:(t,e,n,r)=>g[t],localize:{ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:w({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:w({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:w({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:w({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:w({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(y={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const n=t.match(y.matchPattern);if(!n)return null;const r=n[0],a=t.match(y.parsePattern);if(!a)return null;let o=y.valueCallback?y.valueCallback(a[0]):a[0];return o=e.valueCallback?e.valueCallback(o):o,{value:o,rest:t.slice(r.length)}}),era:b({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:b({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:b({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:b({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function M(t,n){const i=e(t,n?.in),u=function(t,e,n){const[i,u]=r(n?.in,t,e),s=a(i),c=a(u),h=+s-d(s),l=+c-d(c);return Math.round((h-l)/o)}(i,function(t,n){const r=e(t,n?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}(i));return u+1}function v(t,r){const a=e(t,r?.in),o=+s(a)-+function(t,e){const r=c(t,e),a=n(t,0);return a.setFullYear(r,0,4),a.setHours(0,0,0,0),s(a)}(a);return Math.round(o/i)+1}function x(r,a){const o=e(r,a?.in),i=o.getFullYear(),s=u(),c=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,d=n(a?.in||r,0);d.setFullYear(i+1,0,c),d.setHours(0,0,0,0);const h=t(d,a),l=n(a?.in||r,0);l.setFullYear(i,0,c),l.setHours(0,0,0,0);const m=t(l,a);return+o>=+h?i+1:+o>=+m?i:i-1}function P(r,a){const o=e(r,a?.in),s=+t(o,a)-+function(e,r){const a=u(),o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=x(e,r),s=n(r?.in||e,0);return s.setFullYear(i,0,o),s.setHours(0,0,0,0),t(s,r)}(o,a);return Math.round(s/i)+1}function k(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const S={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return k("yy"===e?r%100:r,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):k(n+1,2)},d:(t,e)=>k(t.getDate(),e.length),a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>k(t.getHours()%12||12,e.length),H:(t,e)=>k(t.getHours(),e.length),m:(t,e)=>k(t.getMinutes(),e.length),s:(t,e)=>k(t.getSeconds(),e.length),S(t,e){const n=e.length,r=t.getMilliseconds();return k(Math.trunc(r*Math.pow(10,n-3)),e.length)}},W="midnight",D="noon",T="morning",Y="afternoon",C="evening",q="night",F={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear(),r=e>0?e:1-e;return n.ordinalNumber(r,{unit:"year"})}return S.y(t,e)},Y:function(t,e,n,r){const a=x(t,r),o=a>0?a:1-a;if("YY"===e){return k(o%100,2)}return"Yo"===e?n.ordinalNumber(o,{unit:"year"}):k(o,e.length)},R:function(t,e){return k(c(t),e.length)},u:function(t,e){return k(t.getFullYear(),e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return k(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return k(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return S.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return k(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=P(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):k(a,e.length)},I:function(t,e,n){const r=v(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):k(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):S.d(t,e)},D:function(t,e,n){const r=M(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):k(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return k(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return k(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return k(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(a=12===r?D:0===r?W:r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(a=r>=17?C:r>=12?Y:r>=4?T:q,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return S.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):S.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):k(r,e.length)},k:function(t,e,n){let r=t.getHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):k(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):S.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):S.s(t,e)},S:function(t,e){return S.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return O(r);case"XXXX":case"XX":return E(r);default:return E(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return O(r);case"xxxx":case"xx":return E(r);default:return E(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+N(r,":");default:return"GMT"+E(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+N(r,":");default:return"GMT"+E(r,":")}},t:function(t,e,n){return k(Math.trunc(+t/1e3),e.length)},T:function(t,e,n){return k(+t,e.length)}};function N(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),o=r%60;return 0===o?n+String(a):n+String(a)+e+k(o,2)}function O(t,e){if(t%60==0){return(t>0?"-":"+")+k(Math.abs(t)/60,2)}return E(t,e)}function E(t,e=""){const n=t>0?"-":"+",r=Math.abs(t);return n+k(Math.trunc(r/60),2)+e+k(r%60,2)}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},z=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},j={p:z,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"})}return o.replace("{{date}}",H(r,e)).replace("{{time}}",z(a,e))}},L=/^D+$/,Q=/^Y+$/,G=["D","DD","YY","YYYY"];const X=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,A=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,B=/^'([^]*?)'?$/,$=/''/g,J=/[a-zA-Z]/;function I(t,n,r){const a=u(),o=a.locale??p,i=a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=a.weekStartsOn??a.locale?.options?.weekStartsOn??0,c=e(t,r?.in);if(!h(c))throw new RangeError("Invalid time value");let d=n.match(A).map(t=>{const e=t[0];if("p"===e||"P"===e){return(0,j[e])(t,o.formatLong)}return t}).join("").match(X).map(t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:R(t)};if(F[e])return{isToken:!0,value:t};if(e.match(J))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}});o.localize.preprocessor&&(d=o.localize.preprocessor(c,d));const l={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return d.map(e=>{if(!e.isToken)return e.value;const r=e.value;(function(t){return Q.test(t)}(r)||function(t){return L.test(t)}(r))&&function(t,e,n){const r=function(t,e,n){const r="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,n);if(console.warn(r),G.includes(t))throw new RangeError(r)}(r,n,String(t));return(0,F[r[0]])(c,r,o.localize,l)}).join("")}function R(t){const e=t.match(B);return e?e[1].replace($,"'"):t}export{I as f,h as i};
|
|
1
|
+
import{a as t,t as e,c as n,n as r,s as a,m as o,b as i,g as u}from"./parseISO-Dj3qSTG8.js";function s(e,n){return t(e,{...n,weekStartsOn:1})}function c(t,r){const a=e(t,r?.in),o=a.getFullYear(),i=n(a,0);i.setFullYear(o+1,0,4),i.setHours(0,0,0,0);const u=s(i),c=n(a,0);c.setFullYear(o,0,4),c.setHours(0,0,0,0);const d=s(c);return a.getTime()>=u.getTime()?o+1:a.getTime()>=d.getTime()?o:o-1}function d(t){const n=e(t),r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return r.setUTCFullYear(n.getFullYear()),+t-+r}function h(t){return!(!((n=t)instanceof Date||"object"==typeof n&&"[object Date]"===Object.prototype.toString.call(n))&&"number"!=typeof t||isNaN(+e(t)));var n}const l={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function m(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const f={date:m({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:m({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:m({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},g={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function w(t){return(e,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):e;r=t.formattingValues[a]||t.formattingValues[e]}else{const e=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;r=t.values[a]||t.values[e]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function b(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(a);if(!o)return null;const i=o[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(u)?function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n;return}(u,t=>t.test(i)):function(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n;return}(u,t=>t.test(i));let c;c=t.valueCallback?t.valueCallback(s):s,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:e.slice(i.length)}}}var y;const p={code:"en-US",formatDistance:(t,e,n)=>{let r;const a=l[t];return r="string"==typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:f,formatRelative:(t,e,n,r)=>g[t],localize:{ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:w({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:w({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:w({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:w({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:w({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(y={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const n=t.match(y.matchPattern);if(!n)return null;const r=n[0],a=t.match(y.parsePattern);if(!a)return null;let o=y.valueCallback?y.valueCallback(a[0]):a[0];return o=e.valueCallback?e.valueCallback(o):o,{value:o,rest:t.slice(r.length)}}),era:b({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:b({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:b({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:b({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function M(t,n){const i=e(t,n?.in),u=function(t,e,n){const[i,u]=r(n?.in,t,e),s=a(i),c=a(u),h=+s-d(s),l=+c-d(c);return Math.round((h-l)/o)}(i,function(t,n){const r=e(t,n?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}(i));return u+1}function v(t,r){const a=e(t,r?.in),o=+s(a)-+function(t,e){const r=c(t,e),a=n(t,0);return a.setFullYear(r,0,4),a.setHours(0,0,0,0),s(a)}(a);return Math.round(o/i)+1}function x(r,a){const o=e(r,a?.in),i=o.getFullYear(),s=u(),c=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,d=n(a?.in||r,0);d.setFullYear(i+1,0,c),d.setHours(0,0,0,0);const h=t(d,a),l=n(a?.in||r,0);l.setFullYear(i,0,c),l.setHours(0,0,0,0);const m=t(l,a);return+o>=+h?i+1:+o>=+m?i:i-1}function P(r,a){const o=e(r,a?.in),s=+t(o,a)-+function(e,r){const a=u(),o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=x(e,r),s=n(r?.in||e,0);return s.setFullYear(i,0,o),s.setHours(0,0,0,0),t(s,r)}(o,a);return Math.round(s/i)+1}function k(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const S={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return k("yy"===e?r%100:r,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):k(n+1,2)},d:(t,e)=>k(t.getDate(),e.length),a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>k(t.getHours()%12||12,e.length),H:(t,e)=>k(t.getHours(),e.length),m:(t,e)=>k(t.getMinutes(),e.length),s:(t,e)=>k(t.getSeconds(),e.length),S(t,e){const n=e.length,r=t.getMilliseconds();return k(Math.trunc(r*Math.pow(10,n-3)),e.length)}},W="midnight",D="noon",T="morning",Y="afternoon",C="evening",q="night",F={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear(),r=e>0?e:1-e;return n.ordinalNumber(r,{unit:"year"})}return S.y(t,e)},Y:function(t,e,n,r){const a=x(t,r),o=a>0?a:1-a;if("YY"===e){return k(o%100,2)}return"Yo"===e?n.ordinalNumber(o,{unit:"year"}):k(o,e.length)},R:function(t,e){return k(c(t),e.length)},u:function(t,e){return k(t.getFullYear(),e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return k(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return k(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return S.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return k(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=P(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):k(a,e.length)},I:function(t,e,n){const r=v(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):k(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):S.d(t,e)},D:function(t,e,n){const r=M(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):k(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return k(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return k(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return k(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(a=12===r?D:0===r?W:r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(a=r>=17?C:r>=12?Y:r>=4?T:q,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return S.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):S.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):k(r,e.length)},k:function(t,e,n){let r=t.getHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):k(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):S.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):S.s(t,e)},S:function(t,e){return S.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return O(r);case"XXXX":case"XX":return E(r);default:return E(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return O(r);case"xxxx":case"xx":return E(r);default:return E(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+N(r,":");default:return"GMT"+E(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+N(r,":");default:return"GMT"+E(r,":")}},t:function(t,e,n){return k(Math.trunc(+t/1e3),e.length)},T:function(t,e,n){return k(+t,e.length)}};function N(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),o=r%60;return 0===o?n+String(a):n+String(a)+e+k(o,2)}function O(t,e){if(t%60==0){return(t>0?"-":"+")+k(Math.abs(t)/60,2)}return E(t,e)}function E(t,e=""){const n=t>0?"-":"+",r=Math.abs(t);return n+k(Math.trunc(r/60),2)+e+k(r%60,2)}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},z=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},j={p:z,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"})}return o.replace("{{date}}",H(r,e)).replace("{{time}}",z(a,e))}},L=/^D+$/,Q=/^Y+$/,G=["D","DD","YY","YYYY"];const X=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,A=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,B=/^'([^]*?)'?$/,$=/''/g,J=/[a-zA-Z]/;function I(t,n,r){const a=u(),o=a.locale??p,i=a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=a.weekStartsOn??a.locale?.options?.weekStartsOn??0,c=e(t,r?.in);if(!h(c))throw new RangeError("Invalid time value");let d=n.match(A).map(t=>{const e=t[0];if("p"===e||"P"===e){return(0,j[e])(t,o.formatLong)}return t}).join("").match(X).map(t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:R(t)};if(F[e])return{isToken:!0,value:t};if(e.match(J))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}});o.localize.preprocessor&&(d=o.localize.preprocessor(c,d));const l={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return d.map(e=>{if(!e.isToken)return e.value;const r=e.value;(function(t){return Q.test(t)}(r)||function(t){return L.test(t)}(r))&&function(t,e,n){const r=function(t,e,n){const r="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,n);if(console.warn(r),G.includes(t))throw new RangeError(r)}(r,n,String(t));return(0,F[r[0]])(c,r,o.localize,l)}).join("")}function R(t){const e=t.match(B);return e?e[1].replace($,"'"):t}export{I as f,h as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(n,t,e){return{queryKey:["appointments",t.id],queryFn:()=>n.appointments.getAppointment(t),...e}}export{n as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,r){return{queryKey:["patient-profile"],queryFn:()=>e.profile.getPatientProfile(),...r}}export{e as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function o(o,a){return{queryKey:["organization-specialties"],queryFn:()=>o.organizations.getOrganizationSpecialties(),...a}}var a={digestive_system:{de_DE:"Verdauungssystem",en_US:"Digestive System",es_ES:"Aparato Digestivo",ca_ES:"Aparell Digestiu",pt_PT:"Aparelho Digestivo"},orthopedic_surgery_traumatology:{de_DE:"Traumatologie und Orthopädische Chirurgie",en_US:"Traumatology and Orthopedic Surgery",es_ES:"Traumatología y Cirugía Ortopédica",ca_ES:"Traumatologia i Cirurgia Ortopèdica",pt_PT:"Traumatologia e Cirurgia Ortopédica"},gynecology:{de_DE:"Gynäkologie",en_US:"Gynecology",es_ES:"Ginecología",ca_ES:"Ginecologia",pt_PT:"Ginecologia"},endocrinology:{de_DE:"Endokrinologie",en_US:"Endocrinology",es_ES:"Endocrinología",ca_ES:"Endocrinologia",pt_PT:"Endocrinologia"},psychiatry:{de_DE:"Psychiatrie",en_US:"Psychiatry",es_ES:"Psiquiatría",ca_ES:"Psiquiatria",pt_PT:"Psiquiatria"}},e={videocall:{de_DE:"Videosprechstunde",en_US:"Videocall",es_ES:"Videoconsulta",ca_ES:"Videoconsulta",pt_PT:"Videoconsulta"},phonecall:{de_DE:"Telefonische Behandlung",en_US:"Phone consultation",es_ES:"Consulta telefónica",ca_ES:"Consulta telefònica",pt_PT:"Consulta telefónica"}},i={de_DE:"Konsultationspreis",en_US:"Consultation price",es_ES:"Precio de consulta",ca_ES:"Preu de consulta",pt_PT:"Preço da consulta"},n={videocall:"videocall",phonecall:"phonecall",adeslas_videocall:"videocall",adeslas_prod_videocall:"videocall",adeslas_phonecall:"phonecall",adeslas_prod_phonecall:"phonecall"};function t(o,a,t){if(!o)return t??"";const l=n[o];return l?e[l][a]:t??i[a]}var l={consulta_telefonica:"phonecall",videoconsulta:"videocall"},c={"aparato-digestivo":"digestive_system","cirugia-ortopedica-y-traumatologia":"orthopedic_surgery_traumatology",ginecologia:"gynecology",endocrinologia:"endocrinology",psiquiatria:"psychiatry"};function r(o,e,i){const n=i?.trim();if(n)return n;const t=a[o]?.[e];return void 0!==t?t:o}export{l as S,r as a,c as b,t as c,a as d,o as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{x as a,i,a as r}from"./lit-element-DiWJYFwC.js";import{n as s}from"./property-scuRaFcM.js";import{e as o}from"./class-map-Co76I6aw.js";import{t as n,c as l,p as d,s as c}from"./parseISO-Dj3qSTG8.js";import{f as h}from"./format-CRFiCNHw.js";import"../ui/mq-skeleton.js";import{m}from"./runtime-Bg1WXVCx.js";import{l as v}from"./localized-decorator-BlOuLhym.js";import{i as p}from"./isSameDay-CuhZMy1T.js";function u(t,e,a){const i=n(t,a?.in);return isNaN(e)?l(t,NaN):e?(i.setDate(i.getDate()+e),i):i}function g(t,e){const a=d(t);if(e)try{const t=new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(a),i=e=>t.find(t=>t.type===e)?.value??"";return{dateKey:`${i("year")}-${i("month")}-${i("day")}`,label:`${i("hour")}:${i("minute")}`}}catch{}return{dateKey:h(c(a),"yyyy-MM-dd"),label:h(a,"HH:mm")}}const y=i`:host{display:block;font-family:var(--font-body)}.time-slot-picker{display:flex;flex-direction:column;gap:var(--sp-4);border-radius:var(--border-radius-lg);transition:opacity .2s}.time-slot-picker.is-loading{opacity:.6}.picker-content{display:flex;flex-direction:column;gap:var(--sp-4)}.columns-wrapper{position:relative;display:flex;flex-direction:column;gap:var(--sp-4);flex:1;min-width:0}.grid-container{display:grid;grid-template-columns:repeat(var(--visible-days,4),1fr);gap:var(--sp-2);position:relative}.dates-header{position:sticky;top:0;display:contents;z-index:10;padding-bottom:var(--sp-2)}.nav-button{position:absolute;top:var(--sp-9);transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:var(--size-6);height:var(--size-6);border:none;cursor:pointer;transition:background-color .2s;background:var(--color-primary);color:var(--color-white);border-radius:var(--border-radius-full);padding:0;z-index:20}.nav-button-prev{left:0;transform:translate(-50%,-50%)}.nav-button-next{right:0;transform:translate(50%,-50%)}.nav-button:hover:not(:disabled){background:var(--color-primary-dark)}.nav-button:disabled{background:var(--color-neutrals-background-disabled);color:var(--color-neutrals-text-medium);cursor:not-allowed}.date-card{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--sp-2) var(--sp-3);border:1px solid var(--color-neutrals-border-disabled);background:var(--color-white);border-radius:var(--border-radius-lg);transition:all .2s;min-width:var(--sp-16);height:var(--sp-18);flex:1}.date-weekday{font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);text-transform:capitalize}.date-day{font-size:var(--text-xl);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}.date-month{font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);text-transform:capitalize}.time-slots-container{display:contents}.time-slots-column{display:flex;flex-direction:column;gap:var(--sp-2)}.time-slot{padding:var(--sp-2) var(--sp-1);border:1px solid var(--color-border);background:var(--color-muted);border-radius:var(--border-radius-md);cursor:pointer;transition:all .2s;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);color:var(--color-neutrals-text-default);text-align:center;min-width:var(--sp-16);height:var(--sp-11)}.time-slot:hover{background:var(--color-primary-light)}.time-slot.selected{border-color:var(--color-primary);background:var(--color-primary);color:var(--color-white);font-weight:var(--font-weight-bold)}.empty-state{display:flex;align-items:center;justify-content:center;padding:var(--sp-12) var(--sp-6);text-align:center;grid-column:1/-1;font-size:var(--text-sm);color:var(--color-neutrals-text-weak)}`;class WindowChangeEvent extends Event{static{this.eventName="window-change"}constructor(t){super(WindowChangeEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class SlotSelectEvent extends Event{static{this.eventName="slot-select"}constructor(t){super(SlotSelectEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let f=class MqTimeSlotPicker extends r{constructor(){super(...arguments),this.locale="es-ES",this.slots=[],this.visibleDays=4,this.isLoading=!1,this.handlePrevious=()=>{if(!this.canGoPrevious)return;const t=u(this.getStartDate(),-this.visibleDays),e=c(new Date),a=t<e?e:t,i=this.formatDate(a);this.dispatchEvent(new WindowChangeEvent({windowStartDate:i}))},this.handleNext=()=>{const t=u(this.getStartDate(),this.visibleDays),e=this.formatDate(t);this.dispatchEvent(new WindowChangeEvent({windowStartDate:e}))},this.handleTimeSlotSelect=(t,e)=>{const a=this.formatDate(t.date);this.selectedDate=a,this.selectedSlotKey=e.key,this.dispatchEvent(new SlotSelectEvent({slot:{key:e.key,date:e.date}}))}}static{this.styles=[y]}getStartDate(){return this.windowStartDate?c(d(this.windowStartDate)):c(new Date)}get slotsByDate(){const t=new Map;for(const e of this.slots){const{dateKey:a,label:i}=g(e.date,this.timezone);t.has(a)||t.set(a,[]),t.get(a)?.push({key:e.key,label:i,date:e.date})}for(const e of t.values())e.sort((t,e)=>{const a=d(t.date),i=d(e.date);return a.getTime()-i.getTime()});return t}get visibleDaysList(){const t=this.getStartDate(),e=[],a=this.slotsByDate;for(let i=0;i<this.visibleDays;i++){const r=u(t,i),s=this.formatDate(r),o=a.get(s)||[];e.push({date:r,slots:o})}return e}get canGoPrevious(){return this.getStartDate()>c(new Date)}formatDate(t){return h(t,"yyyy-MM-dd")}formatDayHeader(t){return{weekday:new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(t),day:new Intl.DateTimeFormat(this.locale,{day:"numeric"}).format(t),month:new Intl.DateTimeFormat(this.locale,{month:"short"}).format(t)}}isDateSelected(t){if(!this.selectedDate)return!1;const e=d(this.selectedDate);return p(t,e)}isTimeSlotSelected(t,e){return this.isDateSelected(t.date)&&this.selectedSlotKey===e.key}get hasSlots(){return this.slots.length>0}renderSkeletonSlots(){return a`${Array.from({length:this.visibleDays}).map((t,e)=>{const i=[2,3,4,3],r=i[e%i.length]??3;return a`<div class="time-slots-column">${Array.from({length:r}).map(()=>a`<mq-skeleton width="100%" height="40px" border-radius="md"></mq-skeleton>`)}</div>`})}`}renderEmptyState(){return a`<div class="empty-state">${m("No hay horarios disponibles")}</div>`}render(){const t=this.canGoPrevious,e=!this.isLoading&&!this.hasSlots;return a`<div class="${o({"time-slot-picker":!0,"is-loading":this.isLoading})}" style="--visible-days:${this.visibleDays}"><div class="picker-content"><div class="columns-wrapper">${t?a`<button class="nav-button nav-button-prev" @click="${this.handlePrevious}" ?disabled="${this.isLoading}" aria-label="${m("Fechas anteriores")}">${a`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1510_1791)"><path d="M8.05454 11.9155L2.72136 6.29527C2.69487 6.26742 2.67385 6.23433 2.65951 6.19791C2.64517 6.16149 2.63779 6.12245 2.63779 6.08302C2.63779 6.04359 2.64517 6.00454 2.65951 5.96812C2.67385 5.9317 2.69487 5.89862 2.72136 5.87077L8.2124 0.0844726L8.61523 0.508968L3.32539 6.08302L8.45738 11.491L8.05454 11.9155Z" fill="currentColor"/></g><defs><clipPath id="clip0_1510_1791"><rect width="11.831" height="11.2273" fill="currentColor" transform="translate(11.2402 0.0844727) rotate(90)"/></clipPath></defs></svg>`}</button>`:null} ${a`<button class="nav-button nav-button-next" @click="${this.handleNext}" ?disabled="${this.isLoading}" aria-label="${m("Fechas siguientes")}">${a`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1510_474)"><path d="M3.94546 0.0845423L9.27864 5.70473C9.30513 5.73258 9.32615 5.76566 9.34049 5.80209C9.35483 5.83851 9.36221 5.87755 9.36221 5.91698C9.36221 5.95641 9.35483 5.99546 9.34049 6.03188C9.32615 6.0683 9.30513 6.10138 9.27864 6.12923L3.7876 11.9155L3.38477 11.491L8.67461 5.91698L3.54262 0.509039L3.94546 0.0845423Z" fill="currentColor"/></g><defs><clipPath id="clip0_1510_474"><rect width="11.831" height="11.2273" fill="currentColor" transform="translate(0.759766 11.9155) rotate(-90)"/></clipPath></defs></svg>`}</button>`}<div class="grid-container"><div class="dates-header">${this.visibleDaysList.map(t=>{const{weekday:e,day:i,month:r}=this.formatDayHeader(t.date);return a`<div class="date-card"><div class="date-weekday">${e}</div><div class="date-day">${i}</div><div class="date-month">${r}</div></div>`})}</div><div class="time-slots-container">${e?this.renderEmptyState():this.isLoading?this.renderSkeletonSlots():this.visibleDaysList.map(t=>{const e=this.isDateSelected(t.date);return a`<div class="${o({"time-slots-column":!0,active:e})}">${t.slots.map(e=>{const i=this.isTimeSlotSelected(t,e);return a`<button class="${o({"time-slot":!0,selected:i})}" @click="${()=>this.handleTimeSlotSelect(t,e)}">${e.label}</button>`})}</div>`})}</div></div></div></div></div>`}};t([s({type:String})],f.prototype,"locale",void 0),t([s({type:String})],f.prototype,"timezone",void 0),t([s({type:Array})],f.prototype,"slots",void 0),t([s({type:String,attribute:"selected-date"})],f.prototype,"selectedDate",void 0),t([s({type:String,attribute:"selected-slot-key"})],f.prototype,"selectedSlotKey",void 0),t([s({type:String,attribute:"window-start-date"})],f.prototype,"windowStartDate",void 0),t([s({type:Number,attribute:"visible-days"})],f.prototype,"visibleDays",void 0),t([s({type:Boolean,attribute:"is-loading"})],f.prototype,"isLoading",void 0),f=t([v(),e("mq-time-slot-picker")],f);export{f as M,SlotSelectEvent as S,WindowChangeEvent as W,u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{i,a as o,x as n}from"./lit-element-DiWJYFwC.js";import{n as a}from"./property-scuRaFcM.js";import{r as s}from"./state-LQivXIgA.js";import"../ui/mq-checkbox.js";import"../ui/mq-button.js";import{M as r}from"./mutation-controller-CR2qcqhH.js";import{setEnv as l}from"../env.js";import{a as h}from"./api-chat-client-CqMn2JEn.js";const c=i`.page-header{box-sizing:border-box;width:100%;display:none}.page-title{font-family:var(--font-body);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.page-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.page-subtitle{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-subtle)}.page-subtitle ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-section{box-sizing:border-box;width:100%;display:flex;flex-direction:column;gap:var(--sp-6);background-color:var(--color-neutrals-background-weak);padding:var(--sp-6);border-radius:var(--border-radius-md)}.terms-title{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.terms-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-description{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}.terms-description ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.checkbox-container{display:flex;gap:var(--sp-3);align-items:flex-start;cursor:pointer}.checkbox-label{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);flex:1}@media (min-width:768px){.page-header{display:block;margin-bottom:var(--sp-10)}.page-title{font-size:var(--text-3xl);line-height:var(--text-3xl--line-height)}.page-title ::slotted(*){font-size:inherit;line-height:inherit}.page-subtitle{font-size:var(--text-base);line-height:var(--text-base--line-height)}.page-subtitle ::slotted(*){font-size:inherit;line-height:inherit}.terms-title{font-size:var(--text-2xl);line-height:var(--text-2xl--line-height)}.terms-title ::slotted(*){font-size:inherit;line-height:inherit}.terms-description{font-size:var(--text-base);line-height:var(--text-base--line-height)}.terms-description ::slotted(*){font-size:inherit;line-height:inherit}.checkbox-label{font-size:var(--text-base);line-height:var(--text-base--line-height)}}`;let d=class MqTermsAndConditions extends o{constructor(){super(...arguments),this.disabled=!1,this.hasCommercialCommunications=!1,this._accepted=!1,this.acceptLegalConsentMutation=new r(this,{mutationFn:async t=>h.profile.acceptLegalConsent(t),onSuccess:()=>{this.dispatchEvent(new CustomEvent("continue"))}})}static{this.styles=c}willUpdate(t){t.has("env")&&this.env&&l(this.env),t.has("apiKey")&&this.apiKey&&h.setApiKey(this.apiKey),t.has("token")&&this.token&&h.setAuthToken(this.token)}handleCheckboxChange(t){this._accepted=t.detail.checked}handleContinue(){this._accepted&&!this.disabled&&this.acceptLegalConsentMutation.run({terms_accepted:!0,privacy_accepted:!0,commercial_accepted:this.hasCommercialCommunications})}render(){const t=!this._accepted||this.disabled;return n`<div class="page-header"><div class="page-title"><slot name="page-title"></slot></div><div class="page-subtitle"><slot name="page-subtitle"></slot></div></div><div class="terms-section"><div><div class="terms-title"><slot name="terms-title"></slot></div><div class="terms-description"><slot name="terms-description"></slot></div></div><div class="checkbox-container"><mq-checkbox id="terms-checkbox" @change="${this.handleCheckboxChange}" ?disabled="${this.disabled}"></mq-checkbox><label class="checkbox-label" for="terms-checkbox"><slot name="checkbox-label"></slot></label></div><mq-button variant="primary" size="md" fullwidth ?disabled="${this.acceptLegalConsentMutation.isPending||t}" @click="${this.handleContinue}"><slot name="button-text"></slot></mq-button></div>`}};t([a({type:Boolean})],d.prototype,"disabled",void 0),t([a({type:Boolean})],d.prototype,"hasCommercialCommunications",void 0),t([a({type:String,attribute:"api-key"})],d.prototype,"apiKey",void 0),t([a({type:String,attribute:"token"})],d.prototype,"token",void 0),t([a({type:String,attribute:"env"})],d.prototype,"env",void 0),t([s()],d.prototype,"_accepted",void 0),d=t([e("mq-terms-and-conditions")],d);export{d as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{m as a}from"./runtime-Bg1WXVCx.js";import{l as r}from"./localized-decorator-BlOuLhym.js";import{i as n,a as s,x as o}from"./lit-element-DiWJYFwC.js";import{n as i}from"./property-scuRaFcM.js";import{r as l}from"./state-LQivXIgA.js";import{e as d}from"./class-map-Co76I6aw.js";import{chevronLeftIcon as c}from"../ui/icons/chevron-left-icon.js";import{chevronRightIcon as v}from"../ui/icons/chevron-right-icon.js";import{spinnerIcon as h}from"../ui/icons/spinner-icon.js";import{t as u,c as p,n as g,g as m,p as y,a as b,s as f}from"./parseISO-Dj3qSTG8.js";import{i as D}from"./isSameDay-CuhZMy1T.js";import{i as k}from"./isBefore-CPpTogxo.js";function w(t,e,a){const r=u(t,a?.in);if(isNaN(e))return p(t,NaN);if(!e)return r;const n=r.getDate(),s=p(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);return n>=s.getDate()?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}function M(t,e){const a=u(t,e?.in),r=a.getMonth();return a.setFullYear(a.getFullYear(),r+1,0),a.setHours(23,59,59,999),a}function x(t,e){const{start:a,end:r}=function(t,e){const[a,r]=g(t,e.start,e.end);return{start:a,end:r}}(e?.in,t);let n=+a>+r;const s=n?+a:+r,o=n?r:a;o.setHours(0,0,0,0);const i=[];for(;+o<=s;)i.push(p(a,o)),o.setDate(o.getDate()+1),o.setHours(0,0,0,0);return n?i.reverse():i}function S(t,e){const a=u(t,e?.in);return a.setDate(1),a.setHours(0,0,0,0),a}function j(t,e){const a=m(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,n=u(t,e?.in),s=n.getDay(),o=6+(s<r?-7:0)-(s-r);return n.setDate(n.getDate()+o),n.setHours(23,59,59,999),n}function E(t,e){return+u(t)>+u(e)}function $(t,e){return D(p(t,t),function(t){return p(t,Date.now())}(t))}const N=n`:host{display:block;font-family:var(--font-body)}.calendar{background:var(--color-card);border-radius:var(--border-radius-lg);user-select:none}.calendar-header{display:flex;align-items:center;justify-content:space-between;background:var(--color-primary-background-extraWeak);padding:var(--sp-4);border-radius:var(--border-radius-lg) var(--border-radius-lg) 0 0}.calendar-header-title{font-family:var(--font-titles);font-size:var(--text-lg);font-weight:var(--font-weight-bold);color:var(--color-gray-darkest)}.calendar-body{position:relative;transition:opacity .2s}.calendar-body.loading{opacity:.4;pointer-events:none}.calendar-nav{display:flex;gap:var(--sp-2)}.calendar-nav-button{display:flex;align-items:center;justify-content:center;width:var(--size-8);height:var(--size-8);border:none;background:0 0;border-radius:var(--border-radius-md);cursor:pointer;transition:background-color .2s;color:var(--color-gray-darkest);padding:0}.calendar-nav-button:hover{background:var(--color-background-primary-light)}.calendar-nav-button:disabled{opacity:.3;cursor:not-allowed}.calendar-weekdays{display:grid;grid-template-columns:repeat(7,var(--sp-11));justify-content:space-between;padding:var(--sp-4) var(--sp-4) var(--sp-2) var(--sp-4)}.calendar-weekday{text-align:center;font-size:var(--text-sm);font-weight:var(--font-weight-bold);color:var(--color-gray-darkest);padding:var(--sp-2)}.calendar-days{display:grid;gap:var(--sp-1);grid-template-columns:repeat(7,var(--sp-11));justify-content:space-between;padding:0 var(--sp-4) var(--sp-4) var(--sp-4)}.calendar-day{width:var(--sp-11);height:var(--sp-11);display:flex;align-items:center;justify-content:center;border:none;background:0 0;border-radius:var(--border-radius-full);cursor:pointer;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);color:var(--color-gray-darkest);transition:all .2s;padding:0;position:relative}.calendar-day:hover:not(:disabled):not(.other-month){background:var(--color-gray-lighter)}.calendar-day.other-month{color:var(--color-gray-medium);background:0 0}.calendar-day:disabled{color:var(--color-gray-medium);background:0 0;cursor:not-allowed}.calendar-day.available:not(.selected){background:var(--color-primary);color:var(--color-white);font-weight:var(--font-weight-semibold)}.calendar-day.available:hover:not(:disabled):not(.selected){background:var(--color-primary-dark)}.calendar-day.selected{background:var(--color-primary);color:var(--color-white);font-weight:var(--font-weight-bold)}.calendar-day.selected:hover:not(:disabled){background:var(--color-primary-dark)}.calendar-day-empty{width:var(--sp-11);height:var(--sp-11)}.calendar-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:10}@media (min-width:640px){.calendar-weekdays{gap:var(--sp-2)}.calendar-days{gap:var(--sp-2)}}@media (min-width:768px){.calendar-weekdays{gap:var(--sp-3)}.calendar-days{gap:var(--sp-3)}}@media (min-width:1024px){.calendar-weekdays{gap:var(--sp-4)}.calendar-days{gap:var(--sp-4)}}`;class DateSelectEvent extends Event{static{this.eventName="date-select"}constructor(t){super(DateSelectEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class PrevMonthEvent extends Event{static{this.eventName="prev-month"}constructor(t){super(PrevMonthEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class NextMonthEvent extends Event{static{this.eventName="next-month"}constructor(t){super(NextMonthEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let C=class MqCalendar extends s{constructor(){super(...arguments),this.locale="es-ES",this.isLoading=!1,this.handlePrevMonth=()=>{const t=this.getCurrentMonthDate(),e=w(t,-1,a);var a;this.dispatchEvent(new PrevMonthEvent({currentMonth:e.toISOString()}))},this.handleNextMonth=()=>{const t=w(this.getCurrentMonthDate(),1);this.dispatchEvent(new NextMonthEvent({currentMonth:t.toISOString()}))},this.handleDayClick=t=>{t.isDisabled||(this.selectedDate=t.date,this.value=t.date.toISOString(),this.dispatchEvent(new DateSelectEvent({date:t.date.toISOString()})),this.requestUpdate())}}static{this.styles=[N]}connectedCallback(){super.connectedCallback(),this.value&&(this.selectedDate=y(this.value))}getMonthYear(){const t=this.getCurrentMonthDate();return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}getCurrentMonthDate(){return this.currentMonth?y(this.currentMonth):new Date}getWeekdays(){const t=b(new Date(2024,0,1),{weekStartsOn:1}),e=x({start:t,end:j(t,{weekStartsOn:1})}),a=new Intl.DateTimeFormat(this.locale,{weekday:"narrow"});return e.map(t=>a.format(t).toUpperCase())}getDaysInMonth(){const t=this.getCurrentMonthDate(),e=S(t),a=M(t);return x({start:b(e,{weekStartsOn:1}),end:j(a,{weekStartsOn:1})}).map(e=>{const a=function(t,e,a){const[r,n]=g(a?.in,t,e);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}(e,t);return this.createCalendarDay(e,a)})}createCalendarDay(t,e){const a=f(t),r=$(a),n=this.isDateAvailable(a);return{date:a,isCurrentMonth:e,isToday:r,isDisabled:this.isDateDisabled(a,n),isSelected:!!this.selectedDate&&D(a,this.selectedDate),isAvailable:n}}isDateAvailable(t){if(!this.availableDays||0===this.availableDays.length)return!1;const e=f(t);return this.availableDays.some(t=>{const a=f(y(t));return D(e,a)})}isDateDisabled(t,e){const a=f(t);if(this.availableDays&&this.availableDays.length>0)return!e;if(this.minDate){const t=f(y(this.minDate));if(k(a,t))return!0}if(this.maxDate){if(E(a,f(y(this.maxDate))))return!0}return!1}render(){const t=this.getDaysInMonth(),e=this.getWeekdays();return o`<div class="calendar"><div class="calendar-header"><button class="calendar-nav-button" @click="${this.handlePrevMonth}" aria-label="${a("Mes anterior")}">${c({size:24})}</button><div class="calendar-header-title">${this.getMonthYear()}</div><button class="calendar-nav-button" @click="${this.handleNextMonth}" aria-label="${a("Mes siguiente")}">${v({size:24})}</button></div><div class="calendar-body ${this.isLoading?"loading":""}"><div class="calendar-weekdays">${e.map(t=>o`<div class="calendar-weekday">${t}</div>`)}</div><div class="calendar-days">${t.map(t=>t.isCurrentMonth?o`<button class="${d({"calendar-day":!0,"other-month":!t.isCurrentMonth,today:t.isToday,selected:t.isSelected,available:t.isAvailable})}" ?disabled="${t.isDisabled||this.isLoading}" @click="${()=>this.handleDayClick(t)}" aria-label="${t.date.toLocaleDateString(this.locale)}">${t.date.getDate()}</button>`:o`<div class="calendar-day-empty"></div>`)}</div>${this.isLoading?o`<div class="calendar-spinner">${h({size:40,color:"var(--color-primary)"})}</div>`:""}</div></div>`}};t([i({type:String})],C.prototype,"locale",void 0),t([i({type:String,attribute:"min-date"})],C.prototype,"minDate",void 0),t([i({type:String,attribute:"max-date"})],C.prototype,"maxDate",void 0),t([i({type:String})],C.prototype,"value",void 0),t([i({type:Boolean,attribute:"is-loading"})],C.prototype,"isLoading",void 0),t([i({type:String,attribute:"current-month"})],C.prototype,"currentMonth",void 0),t([i({type:Array,attribute:"available-days"})],C.prototype,"availableDays",void 0),t([l()],C.prototype,"selectedDate",void 0),C=t([r(),e("mq-calendar")],C);export{DateSelectEvent as D,C as M,NextMonthEvent as N,PrevMonthEvent as P,M as e,E as i,S as s};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
3
|
+
import { LitElement } from 'lit';
|
|
4
|
+
import '../ui/mq-button.js';
|
|
5
|
+
import z from 'zod';
|
|
6
|
+
|
|
7
|
+
declare const DocumentTypeSchema: z.ZodEnum<["prescription", "report", "diagnosticTestPrescription"]>;
|
|
8
|
+
type DocumentType = z.infer<typeof DocumentTypeSchema>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @fires download-file - Fired when the user requests a download (bubbles, composed; `url` and `filename` on the event)
|
|
12
|
+
*/
|
|
13
|
+
declare class PatientDocument extends LitElement {
|
|
14
|
+
static styles: lit.CSSResult;
|
|
15
|
+
kind: DocumentType;
|
|
16
|
+
filename: string;
|
|
17
|
+
specialty: string;
|
|
18
|
+
description: string;
|
|
19
|
+
date: string;
|
|
20
|
+
downloadUrl: string;
|
|
21
|
+
isDownloading: boolean;
|
|
22
|
+
private getFormatter;
|
|
23
|
+
private _handleDownload;
|
|
24
|
+
private formatKind;
|
|
25
|
+
render(): lit_html.TemplateResult<1>;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
"patient-document": PatientDocument;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{i as o,a as i,x as r}from"./lit-element-DiWJYFwC.js";import{n}from"./property-scuRaFcM.js";import{r as a}from"./state-LQivXIgA.js";import{downloadIcon as s}from"../ui/icons/download-icon.js";import"../ui/mq-button.js";import{m as l}from"./runtime-Bg1WXVCx.js";import{l as d}from"./localized-decorator-BlOuLhym.js";import{a as p,D as c}from"./api-chat-client-CqMn2JEn.js";import{DownloadFileEvent as m}from"../events.js";import{getLocale as f}from"../i18n.js";const h=o`:host{display:flex;justify-content:space-between;align-items:center;gap:var(--sp-4);width:100%}.left{display:flex;flex-direction:column;gap:var(--sp-1);flex:1;min-width:0}.tag{border-radius:var(--border-radius-sm);display:inline-flex;align-items:center;justify-content:center;padding:var(--sp-0_5) var(--sp-2);background-color:#e5e5e5;width:fit-content}.tag-label{font-family:var(--font-body);font-size:11px;font-weight:var(--font-weight-medium);color:var(--color-neutrals-text-default);text-transform:uppercase;letter-spacing:3px;line-height:normal}.title{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.description{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;let u=class PatientDocument extends i{constructor(){super(...arguments),this.isDownloading=!1}static{this.styles=h}getFormatter(){const t=f().replace("_","-");return new Intl.DateTimeFormat(t,{year:"numeric",month:"numeric",day:"numeric"})}async _handleDownload(){this.isDownloading=!0;const t=await p.flash.downloadDocument({url:this.downloadUrl}),e=await async function(t){return new Promise((e,o)=>{const i=new FileReader;i.onloadend=()=>e(i.result),i.onerror=o,i.readAsDataURL(t)})}(t);this.dispatchEvent(new m({url:e,filename:`${this.filename}.pdf`})),this.isDownloading=!1}formatKind(t){switch(t){case c.prescription:return l("Receta");case c.report:return l("Informe");case c.diagnosticTestPrescription:return l("Prescripción")}}render(){const t=this.getFormatter().format(new Date(this.date));return r`<div class="left"><div class="tag"><span class="tag-label">${this.formatKind(this.kind)}</span></div><div class="title">${t} - ${this.specialty}</div><div class="description">${this.description}</div></div><mq-button variant="ghost" size="icon-lg" @click="${this._handleDownload}" ?disabled="${this.isDownloading}">${s({size:24})}</mq-button>`}};t([n({type:String})],u.prototype,"kind",void 0),t([n({type:String})],u.prototype,"filename",void 0),t([n({type:String})],u.prototype,"specialty",void 0),t([n({type:String})],u.prototype,"description",void 0),t([n({type:String})],u.prototype,"date",void 0),t([n({type:String})],u.prototype,"downloadUrl",void 0),t([a()],u.prototype,"isDownloading",void 0),u=t([d(),e("patient-document")],u);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
3
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
4
|
+
import '../ui/mq-checkbox.js';
|
|
5
|
+
import '../ui/mq-button.js';
|
|
6
|
+
import { Env } from '../env.js';
|
|
7
|
+
|
|
8
|
+
type TermsAndConditionsAcceptEvent = CustomEvent<{
|
|
9
|
+
accepted: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
type TermsAndConditionsContinueEvent = CustomEvent<void>;
|
|
12
|
+
/**
|
|
13
|
+
* @fires continue - Fired when the continue button is clicked
|
|
14
|
+
*
|
|
15
|
+
* @slot - Default slot for checkbox label content (can include links)
|
|
16
|
+
* @slot page-title - Slot for the main page title (can include any HTML)
|
|
17
|
+
* @slot page-subtitle - Slot for the main page subtitle (can include any HTML)
|
|
18
|
+
* @slot terms-title - Slot for the terms section title (can include any HTML)
|
|
19
|
+
* @slot terms-description - Slot for the terms section description (can include any HTML)
|
|
20
|
+
* @slot checkbox-label - Slot for the checkbox label (can include any HTML)
|
|
21
|
+
* @slot button-text - Slot for the button text (can include any HTML)
|
|
22
|
+
*/
|
|
23
|
+
declare class MqTermsAndConditions extends LitElement {
|
|
24
|
+
static styles: lit.CSSResult;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
hasCommercialCommunications: boolean;
|
|
27
|
+
/** Mediquo API key. Required when used standalone (outside mq-router). */
|
|
28
|
+
apiKey?: string;
|
|
29
|
+
/** Already-exchanged access token. Required when used standalone. */
|
|
30
|
+
token?: string;
|
|
31
|
+
/** Environment override ("development" | "production"). Optional. */
|
|
32
|
+
env?: Env;
|
|
33
|
+
private _accepted;
|
|
34
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
35
|
+
private handleCheckboxChange;
|
|
36
|
+
private acceptLegalConsentMutation;
|
|
37
|
+
private handleContinue;
|
|
38
|
+
render(): lit_html.TemplateResult<1>;
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
interface HTMLElementTagNameMap {
|
|
42
|
+
"mq-terms-and-conditions": MqTermsAndConditions;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { MqTermsAndConditions as M };
|
|
47
|
+
export type { TermsAndConditionsContinueEvent as T, TermsAndConditionsAcceptEvent as a };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as r}from"./parseISO-Dj3qSTG8.js";function t(t,o){return+r(t)<+r(o)}export{t as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as s,s as n}from"./parseISO-
|
|
1
|
+
import{n as s,s as n}from"./parseISO-Dj3qSTG8.js";function r(r,o,t){const[a,i]=s(t?.in,r,o);return+n(a)===+n(i)}export{r as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as t}from"./runtime-Bg1WXVCx.js";class LocalizeController{constructor(t){this.__litLocalizeEventHandler=t=>{"ready"===t.detail.status&&this.host.requestUpdate()},this.host=t}hostConnected(){window.addEventListener(t,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(t,this.__litLocalizeEventHandler)}}const e=t=>t.addController(new LocalizeController(t)),o=()=>(t,o)=>(t.addInitializer(e),t);export{o as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,t as o}from"./custom-element-DA9Fxvxd.js";import{m as C}from"./runtime-Bg1WXVCx.js";import{l as a}from"./localized-decorator-BlOuLhym.js";import{a as r,i as e,x as i}from"./lit-element-DiWJYFwC.js";import{n}from"./property-scuRaFcM.js";let d=class MQLayout extends r{constructor(){super(...arguments),this.background="default",this.variant="default",this.showMediquoBranding=!0}static{this.styles=e`:host{--content-max-width:560px;display:flex;flex-direction:column;height:100%;width:100%;max-width:var(--content-max-width);margin:0 auto;background-color:var(--color-background)}:host([background=solid]){background-color:var(--color-background)}:host([background=transparent]){background-color:transparent}:host([variant=wide]){--content-max-width:1000px}.content{flex:1;padding:var(--mq-layout-padding,0)}footer{display:flex;flex-direction:column;align-items:center;gap:var(--sp-4);padding-top:var(--sp-10);padding-bottom:var(--sp-3);padding-inline:var(--mq-layout-padding,0);margin-bottom:var(--sp-3);text-align:center}.branding{display:flex;justify-content:center;align-items:center;gap:var(--size-2);font-family:var(--font-body);font-size:var(--text-sm);line-height:normal;font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}`}render(){return this.showMediquoBranding?i`<div class="content"><slot></slot></div><footer><div class="branding">${C("Servicio y plataforma prestados por")} ${i`<svg width="82" height="16" viewBox="0 0 82 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M52.4506 8.97739V10.5665C52.4506 11.1054 52.0077 11.5477 51.4682 11.5477C50.9288 11.5477 50.486 11.1054 50.486 10.5665V8.97739H48.8531C48.3276 8.97739 47.8984 8.54894 47.8984 8.02383C47.8984 7.49893 48.3276 7.07053 48.8531 7.07053H50.486V5.48128C50.486 4.94243 50.9288 4.5002 51.4682 4.5002C52.0077 4.5002 52.4506 4.94243 52.4506 5.48128V7.07053H54.0836C54.609 7.07053 55.0379 7.49893 55.0379 8.02383C55.0379 8.54894 54.609 8.97739 54.0836 8.97739H52.4506ZM56.8563 5.46693C56.055 3.75203 54.5229 2.55033 52.6531 2.16979C52.3272 2.10809 51.9339 2.06818 51.5273 2.05679C48.7327 2.10005 46.4191 3.93204 45.7665 6.6209C45.397 8.13705 45.6843 9.78156 46.555 11.134C47.4258 12.4867 48.8053 13.431 50.3396 13.7243C51.7168 13.9883 53.0199 13.8046 54.2312 13.1767L54.2853 13.1506C54.554 13.0306 54.8304 12.9977 55.1481 13.0559L55.2243 13.0728C55.8277 13.2312 56.4308 13.389 57.0345 13.5467C56.8787 12.9784 56.7231 12.4168 56.5656 11.86L56.5512 11.8035C56.4673 11.4258 56.5163 11.0837 56.7011 10.7579C57.5947 9.11014 57.6548 7.17549 56.8563 5.46693ZM59.2901 15.5846C59.0891 15.8486 58.7811 16 58.4446 16C58.2872 16 58.1621 15.967 58.0617 15.9405L57.0944 15.6878C56.3739 15.4997 55.6553 15.312 54.936 15.1233C53.8594 15.6379 52.7204 15.8988 51.5464 15.8988C51.0243 15.8988 50.4877 15.8466 49.9521 15.7439C47.8668 15.3452 45.9973 14.0703 44.823 12.2461C43.6488 10.4223 43.2634 8.19505 43.7656 6.13553C44.6446 2.51324 47.7615 0.0472629 51.5211 0.000260881L51.5409 0L51.5605 0.000391321C52.0913 0.0140876 52.5926 0.0651767 53.0508 0.152094C55.5798 0.666768 57.6424 2.28597 58.7224 4.59729C59.7655 6.82947 59.7232 9.34593 58.6144 11.5401C58.8921 12.5275 59.1643 13.5268 59.4414 14.5471C59.4869 14.7106 59.6124 15.1611 59.2901 15.5846ZM79.7577 8.77869C79.7577 7.05748 78.5162 5.63246 76.7557 5.63246C74.9582 5.63246 73.8092 7.03887 73.8092 8.7416V8.77869C73.8092 10.4814 75.0508 11.9064 76.7927 11.9064C78.6089 11.9064 79.7577 10.4999 79.7577 8.81573V8.77869ZM76.7557 13.868C73.7722 13.868 71.5669 11.5915 71.5669 8.81573V8.77869C71.5669 5.98404 73.7907 3.67068 76.7927 3.67068C79.7949 3.67068 82 5.94717 82 8.7416V8.77869C82 11.5545 79.7764 13.868 76.7557 13.868ZM68.7934 13.7387C68.1816 13.7387 67.6628 13.2571 67.6628 12.6281V12.1285C67.0328 13.0538 66.1247 13.8495 64.6051 13.8495C62.4 13.8495 61.1213 12.3691 61.1213 10.0925V4.89208C61.1213 4.2631 61.6216 3.76329 62.2331 3.76329C62.8633 3.76329 63.3637 4.2631 63.3637 4.89208V9.42637C63.3637 10.944 64.1233 11.7951 65.4575 11.7951C66.7547 11.7951 67.6628 10.9071 67.6628 9.38919V4.89208C67.6628 4.2631 68.1631 3.76329 68.7934 3.76329C69.4048 3.76329 69.9236 4.2631 69.9236 4.89208V12.6281C69.9236 13.2386 69.4233 13.7387 68.7934 13.7387ZM40.4153 3.76329C41.0454 3.76329 41.5457 4.2631 41.5457 4.89208V12.6281C41.5457 13.2571 41.0454 13.7387 40.4153 13.7387C39.8038 13.7387 39.3034 13.2571 39.3034 12.6281V4.89208C39.3034 4.2631 39.7852 3.76329 40.4153 3.76329ZM40.4153 2.4678C39.6925 2.4678 39.1368 2.02361 39.1368 1.35732V1.2464C39.1368 0.580156 39.6925 0.154442 40.4153 0.154442C41.1379 0.154442 41.694 0.580156 41.694 1.2464V1.35732C41.694 2.02361 41.1379 2.4678 40.4153 2.4678ZM34.7693 8.7416C34.7693 6.85382 33.435 5.6139 31.9339 5.6139C30.3961 5.6139 29.1173 6.79821 29.1173 8.7416V8.77869C29.1173 10.6665 30.4145 11.9064 31.9339 11.9064C33.435 11.9064 34.7693 10.6476 34.7693 8.77869V8.7416ZM35.8627 13.7387C35.2325 13.7387 34.7321 13.2571 34.7321 12.6281V12.0172C34.0095 13.0353 32.9903 13.8495 31.3966 13.8495C29.0988 13.8495 26.8566 12.0172 26.8566 8.77869V8.7416C26.8566 5.50298 29.0616 3.67068 31.3966 3.67068C33.0088 3.67068 34.028 4.4665 34.7321 5.39189V1.15383C34.7321 0.524632 35.2325 0.0434802 35.8439 0.0434802C36.4742 0.0434802 36.9745 0.524632 36.9745 1.15383V12.6281C36.9745 13.2571 36.4742 13.7387 35.8627 13.7387ZM21.0065 5.50298C19.6353 5.50298 18.6718 6.55763 18.4678 8.07548H23.4897C23.3416 6.63203 22.4892 5.50298 21.0065 5.50298ZM24.6203 9.55589H18.4864C18.7272 11.1477 19.8578 12.0357 21.3032 12.0357C22.2482 12.0357 22.9895 11.7028 23.6196 11.1846C23.7863 11.0548 23.9346 10.981 24.194 10.981C24.6945 10.981 25.0836 11.3698 25.0836 11.8879C25.0836 12.1654 24.9539 12.406 24.787 12.5727C23.8975 13.3683 22.7858 13.868 21.2662 13.868C18.4308 13.868 16.244 11.8136 16.244 8.79712V8.76021C16.244 5.96556 18.227 3.67068 21.0253 3.67068C24.1384 3.67068 25.6765 6.22475 25.6765 8.48246C25.6765 9.1117 25.1948 9.55589 24.6203 9.55589ZM13.7686 13.7387C13.1387 13.7387 12.6382 13.2571 12.6382 12.6281V8.09396C12.6382 6.53915 11.9155 5.70655 10.6555 5.70655C9.43232 5.70655 8.56142 6.55763 8.56142 8.13083V12.6281C8.56142 13.2571 8.06108 13.7387 7.44958 13.7387C6.81941 13.7387 6.3192 13.2571 6.3192 12.6281V8.07548C6.3192 6.55763 5.57796 5.70655 4.33625 5.70655C3.09479 5.70655 2.24235 6.63203 2.24235 8.13083V12.6281C2.24235 13.2571 1.74205 13.7387 1.1118 13.7387C0.500341 13.7387 0 13.2571 0 12.6281V4.89208C0 4.2631 0.481844 3.76329 1.1118 3.76329C1.74205 3.76329 2.24235 4.2631 2.24235 4.89208V5.35475C2.87235 4.48511 3.72475 3.67068 5.22586 3.67068C6.63431 3.67068 7.63481 4.35545 8.15378 5.39189C8.93198 4.35545 9.96987 3.67068 11.4522 3.67068C13.5833 3.67068 14.8804 5.02183 14.8804 7.40919V12.6281C14.8804 13.2571 14.3988 13.7387 13.7686 13.7387Z" fill="#0A0A22"/></svg>`}</div></footer>`:i`<div class="content"><slot></slot></div>`}};t([n({type:String})],d.prototype,"background",void 0),t([n()],d.prototype,"variant",void 0),t([n({type:Boolean,attribute:"show-mediquo-branding"})],d.prototype,"showMediquoBranding",void 0),d=t([a(),o("mq-layout")],d);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Headless element that runs the {@link ProfessionalPresenceSyncController}.
|
|
5
|
+
* Renders nothing — mount it once under the socket + query-client providers and
|
|
6
|
+
* it keeps cached professional presence (`active_absence`) current from realtime
|
|
7
|
+
* socket events. Standalone replacement for the equivalent `mq-router` internal,
|
|
8
|
+
* consumable from any host (React included via
|
|
9
|
+
* `@mediquo/elements/react/mq-professional-presence-sync`).
|
|
10
|
+
*/
|
|
11
|
+
declare class MqProfessionalPresenceSync extends LitElement {
|
|
12
|
+
private _controller;
|
|
13
|
+
createRenderRoot(): this;
|
|
14
|
+
render(): symbol;
|
|
15
|
+
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface HTMLElementTagNameMap {
|
|
18
|
+
"mq-professional-presence-sync": MqProfessionalPresenceSync;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { MqProfessionalPresenceSync as M };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Headless element that runs the {@link UnreadCountSyncController}. Renders
|
|
5
|
+
* nothing — mount it once anywhere under the socket + query-client providers
|
|
6
|
+
* (e.g. next to your sidebar) and it keeps cached unread counts current from
|
|
7
|
+
* realtime socket messages. This is the standalone replacement for the
|
|
8
|
+
* equivalent `mq-router` internal, consumable from any host (React included via
|
|
9
|
+
* `@mediquo/elements/react/mq-unread-count-sync`).
|
|
10
|
+
*/
|
|
11
|
+
declare class MqUnreadCountSync extends LitElement {
|
|
12
|
+
private _controller;
|
|
13
|
+
createRenderRoot(): this;
|
|
14
|
+
render(): symbol;
|
|
15
|
+
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface HTMLElementTagNameMap {
|
|
18
|
+
"mq-unread-count-sync": MqUnreadCountSync;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { MqUnreadCountSync as M };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=class{constructor(t,s){this.host=t,this.options=s,this._isPending=!1,this._isError=!1,this._isSuccess=!1,this._data=void 0,this._error=void 0,this.host.addController(this)}hostConnected(){}hostDisconnected(){}async run(t){this._isPending=!0,this._isError=!1,this._isSuccess=!1,this._data=void 0,this._error=void 0,this.host.requestUpdate();try{const s=await this.options.mutationFn(t);return this._isPending=!1,this._isSuccess=!0,this._data=s,this.host.requestUpdate(),this.options.onSuccess&&await this.options.onSuccess(s,t),this.options.onSettled&&await this.options.onSettled(s,void 0,t),s}catch(s){if(this._isPending=!1,this._isError=!0,this._error=s,this.host.requestUpdate(),this.options.onError&&await this.options.onError(s,t),this.options.onSettled&&await this.options.onSettled(void 0,s,t),this.options.throwOnError)throw s;return}}reset(){this._isPending=!1,this._isError=!1,this._isSuccess=!1,this._data=void 0,this._error=void 0,this.host.requestUpdate()}updateOptions(t){this.options={...this.options,...t}}get isPending(){return this._isPending}get isError(){return this._isError}get isSuccess(){return this._isSuccess}get isIdle(){return!this._isPending&&!this._isError&&!this._isSuccess}get data(){return this._data}get error(){return this._error}};export{t as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=6048e5,e=864e5,n=6e4,r=36e5,i=Symbol.for("constructDateFrom");function a(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&i in t?t[i](e):t instanceof Date?new t.constructor(e):new Date(e)}function o(t,e){return a(e||t,t)}let s={};function u(){return s}function c(t,e){const n=u(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=o(t,e?.in),a=i.getDay(),s=(a<r?7:0)+a-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function l(t,...e){const n=a.bind(null,e.find(t=>"object"==typeof t));return e.map(n)}function f(t,e){const n=o(t,e?.in);return n.setHours(0,0,0,0),n}function d(t,e){const i=()=>a(e?.in,NaN),s=function(t){const e={},n=t.split(m.dateTimeDelimiter);let r;if(n.length>2)return e;/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],m.timeZoneDelimiter.test(e.date)&&(e.date=t.split(m.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length)));if(r){const t=m.timezone.exec(r);t?(e.time=r.replace(t[1],""),e.timezone=t[1]):e.time=r}return e}(t);let u;if(s.date){const t=function(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:t.slice((r[1]||r[2]).length)}}(s.date,2);u=function(t,e){if(null===e)return new Date(NaN);const n=t.match(D);if(!n)return new Date(NaN);const r=!!n[4],i=p(n[1]),a=p(n[2])-1,o=p(n[3]),s=p(n[4]),u=p(n[5])-1;if(r)return function(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}(0,s,u)?function(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const i=r.getUTCDay()||7,a=7*(e-1)+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}(e,s,u):new Date(NaN);{const t=new Date(0);return function(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(w[e]||(C(t)?29:28))}(e,a,o)&&function(t,e){return e>=1&&e<=(C(t)?366:365)}(e,i)?(t.setUTCFullYear(e,a,Math.max(i,o)),t):new Date(NaN)}}(t.restDateString,t.year)}if(!u||isNaN(+u))return i();const c=+u;let l,f=0;if(s.time&&(f=function(t){const e=t.match(N);if(!e)return NaN;const i=T(e[1]),a=T(e[2]),o=T(e[3]);if(!function(t,e,n){if(24===t)return 0===e&&0===n;return n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}(i,a,o))return NaN;return i*r+a*n+1e3*o}(s.time),isNaN(f)))return i();if(!s.timezone){const t=new Date(c+f),n=o(0,e?.in);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}return l=function(t){if("Z"===t)return 0;const e=t.match(g);if(!e)return 0;const i="+"===e[1]?-1:1,a=parseInt(e[2]),o=e[3]&&parseInt(e[3])||0;if(!function(t,e){return e>=0&&e<=59}(0,o))return NaN;return i*(a*r+o*n)}(s.timezone),isNaN(l)?i():o(c+f+l,e?.in)}const m={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},D=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,N=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,g=/^([+-])(\d{2})(?::?(\d{2}))?$/;function p(t){return t?parseInt(t):1}function T(t){return t&&parseFloat(t.replace(",","."))||0}const w=[31,null,31,30,31,30,31,31,30,31,30,31];function C(t){return t%400==0||t%4==0&&t%100!=0}export{c as a,t as b,a as c,u as g,e as m,l as n,d as p,f as s,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{m as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{b as n}from"./api-chat-client-CqMn2JEn.js";import{a as r}from"./telemetry-client-Ca71sobH.js";import{i as a,a as s,E as l,x as m}from"./lit-element-DiWJYFwC.js";import{n as p}from"./property-scuRaFcM.js";import{e as c}from"./class-map-Co76I6aw.js";import{getLocale as h}from"../i18n.js";import{briefcaseIcon as d}from"../ui/icons/briefcase-icon.js";import{calendarIcon as u}from"../ui/icons/calendar-icon.js";import{clockIcon as f}from"../ui/icons/clock-icon.js";import{messageBubbleIcon as v}from"../ui/icons/message-bubble-icon.js";import{phoneIcon as w}from"../ui/icons/phone-icon.js";const y=a`.appointment-details{display:flex;flex-direction:column;gap:var(--sp-3)}.detail-row{display:inline-flex;width:fit-content;align-items:center;gap:var(--sp-2);color:var(--color-neutrals-text-default);font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-bold)}.detail-row svg{flex-shrink:0}.detail-row span::first-letter{text-transform:uppercase}.detail-row.full-width{width:100%}:host([strike-through]) .detail-row span{text-decoration:line-through}@media (min-width:768px){.appointment-details.wide{flex-direction:row;flex-wrap:wrap}}`;let g=class AppointmentDetails extends s{constructor(){super(...arguments),this.channel=void 0,this.variant="default",this.strikeThrough=!1,this.timezone=void 0,this._appointmentChannelToLabel=t=>{switch(t){case"videocall":return i("Videoconsulta");case"chat":return i("Chat");case"phonecall":return i("Consulta telefónica");default:return""}},this._appointmentChannelToIcon=t=>{switch(t){case"videocall":return d({size:24});case"chat":return v({size:24});case"phonecall":return w({size:24});default:return l}}}static{this.styles=y}render(){const t=h().replace("_","-"),e=new Intl.DateTimeFormat(t,{weekday:"long",year:"numeric",month:"long",day:"numeric",...this.timezone?{timeZone:this.timezone}:{}}),i=new Intl.DateTimeFormat(t,{timeStyle:"short",...this.timezone?{timeZone:this.timezone}:{}}),o=new Date(this.startsAt),a=r(o,this.duration),s=e.format(o),p=i.format(o),d=i.format(a),v=this.timezone?n(this.timezone,o):"";return m`<div class="${c({"appointment-details":!0,wide:"wide"===this.variant})}"><div class="detail-row">${u({size:24})} <span>${s}</span></div><div class="detail-row">${f({size:24})} <span>${p} - ${d}${v?` (${v})`:""}</span></div>${this.channel?m`<div class="detail-row full-width">${this._appointmentChannelToIcon(this.channel)} <span>${this._appointmentChannelToLabel(this.channel)}</span></div>`:l}</div>`}};function x(t){return t/100}function z(t,e){const i=e.replaceAll("_","-");return new Intl.NumberFormat(i,{style:"currency",currency:t.currency}).format(x(t.amount))}function j(t){return null!=t&&t.amount>0}t([p({type:String})],g.prototype,"startsAt",void 0),t([p({type:Number})],g.prototype,"duration",void 0),t([p({type:String})],g.prototype,"channel",void 0),t([p({type:String})],g.prototype,"variant",void 0),t([p({type:Boolean,attribute:"strike-through"})],g.prototype,"strikeThrough",void 0),t([p({type:String})],g.prototype,"timezone",void 0),g=t([o(),e("appointment-details")],g);export{g as A,x as c,z as f,j as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{m as a,s as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{i as s,a as r,x as n,E as l}from"./lit-element-DiWJYFwC.js";import{n as d}from"./property-scuRaFcM.js";import{r as p}from"./state-LQivXIgA.js";import{getLocale as m}from"../i18n.js";import{chevronDownIcon as f}from"../ui/icons/chevron-down-icon.js";import"../ui/mq-text-button.js";import"../ui/mq-avatar.js";const g=s`.header{display:flex;align-items:center;gap:var(--sp-4);margin-bottom:0}.header.expanded{margin-bottom:var(--sp-4)}@media (max-width:768px){.header{--avatar-size-lg:var(--avatar-size-md)}}.professional-info{flex:1}.professional-name{font-family:var(--font-titles);font-size:var(--text-lg);line-height:var(--text-lg--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutral-link-dark);margin:0}.professional-specialty{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutral-text-default);margin:0}.collegiate-number{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);color:var(--color-neutrals-text-medium);margin:0;text-transform:uppercase}.languages{display:flex;flex-wrap:wrap;gap:var(--sp-3)}.language-pill{display:inline-block;background-color:#e5e5e5;color:var(--colors-neutral-text-default);font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-medium);padding:var(--sp-1) var(--sp-2);border-radius:26px;text-transform:uppercase}.description{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-normal);margin-bottom:0;color:var(--color-neutrals-text-medium)}.icon{transition:transform .1s ease-in-out}.rotate-180{transform:rotate(180deg)}.details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease-out;overflow:hidden}.details[data-expanded=true]{grid-template-rows:1fr}.details-content{overflow:hidden}.details-content>:not(:first-child){margin-top:var(--sp-3)}@media (min-width:769px){:host([always-expanded-on-desktop]) .details{grid-template-rows:1fr}:host([always-expanded-on-desktop]) mq-text-button{display:none}:host([always-expanded-on-desktop]) .header{margin-bottom:var(--sp-4)}}`;let c=class ProfessionalOverview extends r{constructor(){super(...arguments),this.alwaysExpandedOnDesktop=!1,this.detailsExpanded=!1}static{this.styles=g}render(){const t=m().replace("_","-"),e=this.languages.map(e=>n`<span class="language-pill">${new Intl.DisplayNames(t,{type:"language"}).of(e)}</span>`);return n`<div class="header ${this.detailsExpanded?"expanded":""}"><mq-avatar src="${this.avatar}" fallback="${this.name}" alt="${this.name}" size="lg"></mq-avatar><div class="professional-info"><h2 class="professional-name">${this.name}</h2>${this.specialtyName?n`<p class="professional-specialty">${this.specialtyName}</p>`:l}<mq-text-button type="button" size="sm" fontWeight="bold" @click="${()=>{this.detailsExpanded=!this.detailsExpanded}}">${this.detailsExpanded?a("Ocultar detalles"):a("Ver detalles")} ${f({size:24,className:"icon "+(this.detailsExpanded?"rotate-180":"")})}</mq-text-button></div></div><div class="details" data-expanded="${this.detailsExpanded}"><div class="details-content"><div class="languages">${e}</div>${this.collegiateNumber?n`<p class="collegiate-number">${a(i`Nº COL. ${this.collegiateNumber}`)}</p>`:l}<p class="description">${this.description}</p></div></div>`}};t([d({type:String})],c.prototype,"name",void 0),t([d({type:String})],c.prototype,"specialtyName",void 0),t([d({type:String})],c.prototype,"collegiateNumber",void 0),t([d({type:String})],c.prototype,"description",void 0),t([d({type:Array})],c.prototype,"languages",void 0),t([d({type:String})],c.prototype,"avatar",void 0),t([d({type:Boolean,reflect:!0,attribute:"always-expanded-on-desktop"})],c.prototype,"alwaysExpandedOnDesktop",void 0),t([p()],c.prototype,"detailsExpanded",void 0),c=t([o(),e("professional-overview")],c);export{c as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as t}from"./context-provider
|
|
1
|
+
import{i as t}from"./context-provider--AKuwfs9.js";function e({context:e}){return(r,n)=>{const s=new WeakMap;if("object"==typeof n)return{get(){return r.get.call(this)},set(t){return s.get(this).setValue(t),r.set.call(this,t)},init(r){return s.set(this,new t(this,{context:e,initialValue:r})),r}};{r.constructor.addInitializer(r=>{s.set(r,new t(r,{context:e}))});const i=Object.getOwnPropertyDescriptor(r,n);let o;if(void 0===i){const t=new WeakMap;o={get(){return t.get(this)},set(e){s.get(this).setValue(e),t.set(this,e)},configurable:!0,enumerable:!0}}else{const t=i.set;o={...i,set(e){s.get(this).setValue(e),t?.call(this,e)}}}return void Object.defineProperty(r,n,o)}}}export{e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},e={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},s=new class{#t=e;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}};var i="undefined"==typeof window||"Deno"in globalThis;function n(){}function r(t,e){return"function"==typeof t?t(e):t}function a(t){return"number"==typeof t&&t>=0&&t!==1/0}function o(t,e){return Math.max(t+(e||0)-Date.now(),0)}function c(t,e){return"function"==typeof t?t(e):t}function u(t,e){return"function"==typeof t?t(e):t}function h(t,e){const{type:s="all",exact:i,fetchStatus:n,predicate:r,queryKey:a,stale:o}=t;if(a)if(i){if(e.queryHash!==d(a,e.options))return!1}else if(!p(e.queryKey,a))return!1;if("all"!==s){const t=e.isActive();if("active"===s&&!t)return!1;if("inactive"===s&&t)return!1}return("boolean"!=typeof o||e.isStale()===o)&&((!n||n===e.state.fetchStatus)&&!(r&&!r(e)))}function l(t,e){const{exact:s,status:i,predicate:n,mutationKey:r}=t;if(r){if(!e.options.mutationKey)return!1;if(s){if(f(e.options.mutationKey)!==f(r))return!1}else if(!p(e.options.mutationKey,r))return!1}return(!i||e.state.status===i)&&!(n&&!n(e))}function d(t,e){return(e?.queryKeyHashFn||f)(t)}function f(t){return JSON.stringify(t,(t,e)=>g(e)?Object.keys(e).sort().reduce((t,s)=>(t[s]=e[s],t),{}):e)}function p(t,e){return t===e||typeof t==typeof e&&(!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&Object.keys(e).every(s=>p(t[s],e[s])))}var y=Object.prototype.hasOwnProperty;function v(t,e){if(t===e)return t;const s=m(t)&&m(e);if(!(s||g(t)&&g(e)))return e;const i=(s?t:Object.keys(t)).length,n=s?e:Object.keys(e),r=n.length,a=s?new Array(r):{};let o=0;for(let c=0;c<r;c++){const r=s?c:n[c],u=t[r],h=e[r];if(u===h){a[r]=u,(s?c<i:y.call(t,r))&&o++;continue}if(null===u||null===h||"object"!=typeof u||"object"!=typeof h){a[r]=h;continue}const l=v(u,h);a[r]=l,l===u&&o++}return i===r&&o===i?t:a}function b(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function m(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function g(t){if(!S(t))return!1;const e=t.constructor;if(void 0===e)return!0;const s=e.prototype;return!!S(s)&&(!!s.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype)}function S(t){return"[object Object]"===Object.prototype.toString.call(t)}function w(t,e,s){return"function"==typeof s.structuralSharing?s.structuralSharing(t,e):!1!==s.structuralSharing?v(t,e):e}function O(t,e,s=0){const i=[...t,e];return s&&i.length>s?i.slice(1):i}function F(t,e,s=0){const i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}var C=Symbol();function T(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==C?t.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`))}var j=new class extends t{#s;#i;#n;constructor(){super(),this.#n=t=>{if(!i&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#i||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(t){this.#n=t,this.#i?.(),this.#i=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#s!==t&&(this.#s=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#s?this.#s:"hidden"!==globalThis.document?.visibilityState}};function q(){let t,e;const s=new Promise((s,i)=>{t=s,e=i});function i(t){Object.assign(s,t),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=e=>{i({status:"fulfilled",value:e}),t(e)},s.reject=t=>{i({status:"rejected",reason:t}),e(t)},s}var U=function(t){setTimeout(t,0)};var A=function(){let t=[],e=0,s=t=>{t()},i=t=>{t()},n=U;const r=i=>{e?t.push(i):n(()=>{s(i)})};return{batch:r=>{let a;e++;try{a=r()}finally{e--,e||(()=>{const e=t;t=[],e.length&&n(()=>{i(()=>{e.forEach(t=>{s(t)})})})})()}return a},batchCalls:t=>(...e)=>{r(()=>{t(...e)})},schedule:r,setNotifyFunction:t=>{s=t},setBatchNotifyFunction:t=>{i=t},setScheduler:t=>{n=t}}}(),E=new class extends t{#r=!0;#i;#n;constructor(){super(),this.#n=t=>{if(!i&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#i||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(t){this.#n=t,this.#i?.(),this.#i=t(this.setOnline.bind(this))}setOnline(t){this.#r!==t&&(this.#r=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#r}};function R(t){return Math.min(1e3*2**t,3e4)}function P(t){return"online"!==(t??"online")||E.isOnline()}var D=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function L(t){let e,n=!1,r=0;const a=q(),o=()=>"pending"!==a.status,c=()=>j.isFocused()&&("always"===t.networkMode||E.isOnline())&&t.canRun(),u=()=>P(t.networkMode)&&t.canRun(),h=t=>{o()||(e?.(),a.resolve(t))},l=t=>{o()||(e?.(),a.reject(t))},d=()=>new Promise(s=>{e=t=>{(o()||c())&&s(t)},t.onPause?.()}).then(()=>{e=void 0,o()||t.onContinue?.()}),f=()=>{if(o())return;let e;const a=0===r?t.initialPromise:void 0;try{e=a??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(h).catch(e=>{if(o())return;const a=t.retry??(i?0:3),u=t.retryDelay??R,h="function"==typeof u?u(r,e):u,p=!0===a||"number"==typeof a&&r<a||"function"==typeof a&&a(r,e);var y;!n&&p?(r++,t.onFail?.(r,e),(y=h,new Promise(t=>{s.setTimeout(t,y)})).then(()=>c()?void 0:d()).then(()=>{n?l(e):f()})):l(e)})};return{promise:a,status:()=>a.status,cancel:e=>{if(!o()){const s=new D(e);l(s),t.onCancel?.(s)}},continue:()=>(e?.(),a),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:u,start:()=>(u()?f():d().then(f),a)}}var I=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),a(this.gcTime)&&(this.#a=s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(i?1/0:3e5))}clearGcTimeout(){this.#a&&(s.clearTimeout(this.#a),this.#a=void 0)}},k=class extends I{#o;#c;#u;#h;#l;#d;#f;constructor(t){super(),this.#f=!1,this.#d=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#h=t.client,this.#u=this.#h.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#o=M(this.options),this.state=t.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(t){if(this.options={...this.#d,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const t=M(this.options);void 0!==t.data&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#o=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(t,e){const s=w(this.state.data,t,this.options);return this.#p({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#p({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#l?.promise;return this.#l?.cancel(t),e?e.then(n).catch(n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(t=>!1!==u(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===C||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===c(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!o(this.state.dataUpdatedAt,t))}onFocus(){const t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){const t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#l&&(this.#f?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(t,e){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#l?.status())if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise;if(t&&this.setOptions(t),!this.options.queryFn){const t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}const s=new AbortController,i=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#f=!0,s.signal)})},n=()=>{const t=T(this.options,e),s=(()=>{const t={client:this.#h,queryKey:this.queryKey,meta:this.meta};return i(t),t})();return this.#f=!1,this.options.persister?this.options.persister(t,s,this):t(s)},r=(()=>{const t={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#h,state:this.state,fetchFn:n};return i(t),t})();this.options.behavior?.onFetch(r,this),this.#c=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===r.fetchOptions?.meta||this.#p({type:"fetch",meta:r.fetchOptions?.meta}),this.#l=L({initialPromise:e?.initialPromise,fn:r.fetchFn,onCancel:t=>{t instanceof D&&t.revert&&this.setState({...this.#c,fetchStatus:"idle"}),s.abort()},onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:r.options.retry,retryDelay:r.options.retryDelay,networkMode:r.options.networkMode,canRun:()=>!0});try{const t=await this.#l.start();if(void 0===t)throw new Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#u.config.onSuccess?.(t,this),this.#u.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof D){if(t.silent)return this.#l.promise;if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#p({type:"error",error:t}),this.#u.config.onError?.(t,this),this.#u.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#p(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...K(e.data,this.options),fetchMeta:t.meta??null};case"success":const s={...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#c=t.manual?s:void 0,s;case"error":const i=t.error;return{...e,error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),A.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:t})})}};function K(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function M(t){const e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,i=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}export{k as Q,I as R,t as S,c as a,a as b,s as c,K as d,w as e,j as f,A as g,T as h,i,F as j,O as k,L as l,l as m,n,d as o,q as p,h as q,u as r,b as s,o as t,E as u,r as v,f as w,p as x,C as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Q as t}from"./chunk-RCFIJTXZ-C6Ir0-sM.js";import{s as e}from"./context-consumer-ESdICVAb.js";import{S as s,p as r,r as i,s as n,a as u,n as a,i as h,b as o,t as c,c as l,f as d,d as p,e as f,g as y}from"./query-Cjvi4_dT.js";var b=class extends s{constructor(t,e){super(),this.options=e,this.#t=t,this.#e=null,this.#s=r(),this.bindMethods(),this.setOptions(e)}#t;#r=void 0;#i=void 0;#n=void 0;#u;#a;#s;#e;#h;#o;#c;#l;#d;#p;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#r.addObserver(this),R(this.#r,this.options)?this.#y():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return v(this.#r,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return v(this.#r,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#v(),this.#r.removeObserver(this)}setOptions(t){const e=this.options,s=this.#r;if(this.options=this.#t.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof i(this.options.enabled,this.#r))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#Q(),this.#r.setOptions(this.options),e._defaulted&&!n(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#r,observer:this});const r=this.hasListeners();r&&Q(this.#r,s,this.options,e)&&this.#y(),this.updateResult(),!r||this.#r===s&&i(this.options.enabled,this.#r)===i(e.enabled,this.#r)&&u(this.options.staleTime,this.#r)===u(e.staleTime,this.#r)||this.#m();const a=this.#I();!r||this.#r===s&&i(this.options.enabled,this.#r)===i(e.enabled,this.#r)&&a===this.#p||this.#O(a)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),s=this.createResult(e,t);return function(t,e){if(!n(t.getCurrentResult(),e))return!0;return!1}(this,s)&&(this.#n=s,this.#a=this.options,this.#u=this.#r.state),s}getCurrentResult(){return this.#n}trackResult(t,e){return new Proxy(t,{get:(t,s)=>(this.trackProp(s),e?.(s),"promise"!==s||this.options.experimental_prefetchInRender||"pending"!==this.#s.status||this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(t,s))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#r}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),s=this.#t.getQueryCache().build(this.#t,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#y({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#y(t){this.#Q();let e=this.#r.fetch(this.options,t);return t?.throwOnError||(e=e.catch(a)),e}#m(){this.#R();const t=u(this.options.staleTime,this.#r);if(h||this.#n.isStale||!o(t))return;const e=c(this.#n.dataUpdatedAt,t)+1;this.#l=l.setTimeout(()=>{this.#n.isStale||this.updateResult()},e)}#I(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#r):this.options.refetchInterval)??!1}#O(t){this.#v(),this.#p=t,!h&&!1!==i(this.options.enabled,this.#r)&&o(this.#p)&&0!==this.#p&&(this.#d=l.setInterval(()=>{(this.options.refetchIntervalInBackground||d.isFocused())&&this.#y()},this.#p))}#b(){this.#m(),this.#O(this.#I())}#R(){this.#l&&(l.clearTimeout(this.#l),this.#l=void 0)}#v(){this.#d&&(l.clearInterval(this.#d),this.#d=void 0)}createResult(t,e){const s=this.#r,n=this.options,u=this.#n,a=this.#u,h=this.#a,o=t!==s?t.state:this.#i,{state:c}=t;let l,d={...c},y=!1;if(e._optimisticResults){const r=this.hasListeners(),i=!r&&R(t,e),u=r&&Q(t,s,e,n);(i||u)&&(d={...d,...p(c.data,t.options)}),"isRestoring"===e._optimisticResults&&(d.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:I}=d;l=d.data;let O=!1;if(void 0!==e.placeholderData&&void 0===l&&"pending"===I){let t;u?.isPlaceholderData&&e.placeholderData===h?.placeholderData?(t=u.data,O=!0):t="function"==typeof e.placeholderData?e.placeholderData(this.#c?.state.data,this.#c):e.placeholderData,void 0!==t&&(I="success",l=f(u?.data,t,e),y=!0)}if(e.select&&void 0!==l&&!O)if(u&&l===a?.data&&e.select===this.#h)l=this.#o;else try{this.#h=e.select,l=e.select(l),l=f(u?.data,l,e),this.#o=l,this.#e=null}catch(t){this.#e=t}this.#e&&(b=this.#e,l=this.#o,v=Date.now(),I="error");const g="fetching"===d.fetchStatus,w="pending"===I,C="error"===I,S=w&&g,T=void 0!==l,F={status:I,fetchStatus:d.fetchStatus,isPending:w,isSuccess:"success"===I,isError:C,isInitialLoading:S,isLoading:S,data:l,dataUpdatedAt:d.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>o.dataUpdateCount||d.errorUpdateCount>o.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:C&&!T,isPaused:"paused"===d.fetchStatus,isPlaceholderData:y,isRefetchError:C&&T,isStale:m(t,e),refetch:this.refetch,promise:this.#s,isEnabled:!1!==i(e.enabled,t)};if(this.options.experimental_prefetchInRender){const e=t=>{"error"===F.status?t.reject(F.error):void 0!==F.data&&t.resolve(F.data)},i=()=>{const t=this.#s=F.promise=r();e(t)},n=this.#s;switch(n.status){case"pending":t.queryHash===s.queryHash&&e(n);break;case"fulfilled":"error"!==F.status&&F.data===n.value||i();break;case"rejected":"error"===F.status&&F.error===n.reason||i()}}return F}updateResult(){const t=this.#n,e=this.createResult(this.#r,this.options);if(this.#u=this.#r.state,this.#a=this.options,void 0!==this.#u.data&&(this.#c=this.#r),n(e,t))return;this.#n=e;this.#g({listeners:(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,s="function"==typeof e?e():e;if("all"===s||!s&&!this.#f.size)return!0;const r=new Set(s??this.#f);return this.options.throwOnError&&r.add("error"),Object.keys(this.#n).some(e=>{const s=e;return this.#n[s]!==t[s]&&r.has(s)})})()})}#Q(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#r)return;const e=this.#r;this.#r=t,this.#i=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#g(t){y.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#t.getQueryCache().notify({query:this.#r,type:"observerResultsUpdated"})})}};function R(t,e){return function(t,e){return!1!==i(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||void 0!==t.state.data&&v(t,e,e.refetchOnMount)}function v(t,e,s){if(!1!==i(e.enabled,t)&&"static"!==u(e.staleTime,t)){const r="function"==typeof s?s(t):s;return"always"===r||!1!==r&&m(t,e)}return!1}function Q(t,e,s,r){return(t!==e||!1===i(r.enabled,t))&&(!s.suspense||"error"!==t.state.status)&&m(t,s)}function m(t,e){return!1!==i(e.enabled,t)&&t.isStaleByTime(u(e.staleTime,t))}Promise.withResolvers||(Promise.withResolvers=function(){let t,e;const s=new this((s,r)=>{t=s,e=r});return{resolve:t,reject:e,promise:s}});var I=class{constructor(s,r,i){this.host=s,this.optionsFn=r,this._queryClient=i,this.whenQueryClient=Promise.withResolvers(),this.whenQueryObserver=Promise.withResolvers(),this.host.addController(this),this.context=new e(this.host,{context:t,subscribe:!0,callback:t=>{t&&(this.queryClient=t)}}),this.optionsFn&&this.observeQuery(this.optionsFn)}set queryClient(t){this._queryClient=t,t&&this.whenQueryClient.resolve(t),this.host.requestUpdate()}get queryClient(){return this._queryClient}async observeQuery(t,e=!0){const s=await this.whenQueryClient.promise,r=await this.getDefaultedOptions("function"==typeof t?t():t);this.queryObserver=new b(s,r),this.result=e?this.queryObserver.getOptimisticResult(r):void 0,this.host.requestUpdate(),this.whenQueryObserver.resolve(this.queryObserver)}async hostUpdate(){if(this.optionsFn){const t=await this.whenQueryObserver.promise,e=await this.getDefaultedOptions(this.optionsFn());t.setOptions(e)}}hostConnected(){this.subscribe()}async subscribe(){const t=await this.whenQueryObserver.promise;this.unsubscribe?.(),this.unsubscribe=t.subscribe(t=>{this.result=t,this.host.requestUpdate()}),t.updateResult(),this.host.requestUpdate()}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}async getDefaultedOptions(t){return(await this.whenQueryClient.promise).defaultQueryOptions(t)}render(t){const e=this.result;return"pending"!==e?.status||"idle"!==e?.fetchStatus||e?.data?e?.isPending?t.pending?.()??null:e?.isError?t.error?.(e?.error)??null:e?.isSuccess?t.complete(e?.data):t.initial?.()??null:t.initial?.()??null}};export{I as Q};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as e}from"./api-chat-client-CqMn2JEn.js";import{t}from"./parseISO-Dj3qSTG8.js";function n(e,n,r){const s=function(e,n){return+t(e)-+t(n)}(e,n)/1e3;return(c=r?.roundingMethod,e=>{const t=(c?Math[c]:Math.trunc)(e);return 0===t?0:t})(s);var c}function r(e){return{queryKey:["schedule-services"],queryFn:()=>e.schedules.getScheduleServices()}}function s(t){const{startsAtIso:r,refundPolicySeconds:s,now:c=new Date}=t,o=n(e(r),c);return!(o<0)&&(null==s||o>=s)}export{s as c,r as g};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const LoginTokenResponseSchema: z.ZodObject<{
|
|
4
|
+
access_token: z.ZodString;
|
|
5
|
+
patient: z.ZodObject<{
|
|
6
|
+
hash: z.ZodString;
|
|
7
|
+
country_code: z.ZodString;
|
|
8
|
+
timezone: z.ZodString;
|
|
9
|
+
first_name: z.ZodString;
|
|
10
|
+
last_name: z.ZodString;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
birth_date: z.ZodString;
|
|
13
|
+
email: z.ZodString;
|
|
14
|
+
language_code: z.ZodString;
|
|
15
|
+
phone: z.ZodString;
|
|
16
|
+
phone_prefix: z.ZodString;
|
|
17
|
+
tax_id: z.ZodString;
|
|
18
|
+
legal_consent: z.ZodObject<{
|
|
19
|
+
accepted_at: z.ZodNullable<z.ZodString>;
|
|
20
|
+
last_version_at: z.ZodNullable<z.ZodString>;
|
|
21
|
+
terms_url: z.ZodString;
|
|
22
|
+
privacy_url: z.ZodString;
|
|
23
|
+
has_commercial_communications: z.ZodBoolean;
|
|
24
|
+
organization_name: z.ZodString;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
accepted_at: string | null;
|
|
27
|
+
last_version_at: string | null;
|
|
28
|
+
terms_url: string;
|
|
29
|
+
privacy_url: string;
|
|
30
|
+
has_commercial_communications: boolean;
|
|
31
|
+
organization_name: string;
|
|
32
|
+
}, {
|
|
33
|
+
accepted_at: string | null;
|
|
34
|
+
last_version_at: string | null;
|
|
35
|
+
terms_url: string;
|
|
36
|
+
privacy_url: string;
|
|
37
|
+
has_commercial_communications: boolean;
|
|
38
|
+
organization_name: string;
|
|
39
|
+
}>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
hash: string;
|
|
42
|
+
name: string;
|
|
43
|
+
country_code: string;
|
|
44
|
+
timezone: string;
|
|
45
|
+
first_name: string;
|
|
46
|
+
last_name: string;
|
|
47
|
+
birth_date: string;
|
|
48
|
+
email: string;
|
|
49
|
+
language_code: string;
|
|
50
|
+
phone: string;
|
|
51
|
+
phone_prefix: string;
|
|
52
|
+
tax_id: string;
|
|
53
|
+
legal_consent: {
|
|
54
|
+
accepted_at: string | null;
|
|
55
|
+
last_version_at: string | null;
|
|
56
|
+
terms_url: string;
|
|
57
|
+
privacy_url: string;
|
|
58
|
+
has_commercial_communications: boolean;
|
|
59
|
+
organization_name: string;
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
hash: string;
|
|
63
|
+
name: string;
|
|
64
|
+
country_code: string;
|
|
65
|
+
timezone: string;
|
|
66
|
+
first_name: string;
|
|
67
|
+
last_name: string;
|
|
68
|
+
birth_date: string;
|
|
69
|
+
email: string;
|
|
70
|
+
language_code: string;
|
|
71
|
+
phone: string;
|
|
72
|
+
phone_prefix: string;
|
|
73
|
+
tax_id: string;
|
|
74
|
+
legal_consent: {
|
|
75
|
+
accepted_at: string | null;
|
|
76
|
+
last_version_at: string | null;
|
|
77
|
+
terms_url: string;
|
|
78
|
+
privacy_url: string;
|
|
79
|
+
has_commercial_communications: boolean;
|
|
80
|
+
organization_name: string;
|
|
81
|
+
};
|
|
82
|
+
}>;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
patient: {
|
|
85
|
+
hash: string;
|
|
86
|
+
name: string;
|
|
87
|
+
country_code: string;
|
|
88
|
+
timezone: string;
|
|
89
|
+
first_name: string;
|
|
90
|
+
last_name: string;
|
|
91
|
+
birth_date: string;
|
|
92
|
+
email: string;
|
|
93
|
+
language_code: string;
|
|
94
|
+
phone: string;
|
|
95
|
+
phone_prefix: string;
|
|
96
|
+
tax_id: string;
|
|
97
|
+
legal_consent: {
|
|
98
|
+
accepted_at: string | null;
|
|
99
|
+
last_version_at: string | null;
|
|
100
|
+
terms_url: string;
|
|
101
|
+
privacy_url: string;
|
|
102
|
+
has_commercial_communications: boolean;
|
|
103
|
+
organization_name: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
access_token: string;
|
|
107
|
+
}, {
|
|
108
|
+
patient: {
|
|
109
|
+
hash: string;
|
|
110
|
+
name: string;
|
|
111
|
+
country_code: string;
|
|
112
|
+
timezone: string;
|
|
113
|
+
first_name: string;
|
|
114
|
+
last_name: string;
|
|
115
|
+
birth_date: string;
|
|
116
|
+
email: string;
|
|
117
|
+
language_code: string;
|
|
118
|
+
phone: string;
|
|
119
|
+
phone_prefix: string;
|
|
120
|
+
tax_id: string;
|
|
121
|
+
legal_consent: {
|
|
122
|
+
accepted_at: string | null;
|
|
123
|
+
last_version_at: string | null;
|
|
124
|
+
terms_url: string;
|
|
125
|
+
privacy_url: string;
|
|
126
|
+
has_commercial_communications: boolean;
|
|
127
|
+
organization_name: string;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
access_token: string;
|
|
131
|
+
}>;
|
|
132
|
+
type LoginTokenResponse = z.infer<typeof LoginTokenResponseSchema>;
|
|
133
|
+
|
|
134
|
+
export type { LoginTokenResponse as L };
|