UNPKG

chat-widget-sdk

Version:

Neubinary chat skd

1,398 lines 126 kB
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:Fira Code,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.fixed{position:fixed}.bottom-24{bottom:6rem}.bottom-6{bottom:1.5rem}.right-6{right:1.5rem}.z-40{z-index:40}.z-50{z-index:50}.mt-1{margin-top:.25rem}.flex{display:flex}.h-\\[500px\\]{height:500px}.w-\\[370px\\]{width:370px}.max-w-\\[80\\%\\]{max-width:80%}.flex-1{flex:1 1 0%}.cursor-not-allowed{cursor:not-allowed}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.375rem}.rounded-2xl{border-radius:1.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.75rem}.rounded-xl{border-radius:1rem}.rounded-bl-none{border-bottom-left-radius:0}.rounded-br-none{border-bottom-right-radius:0}.border{border-width:1px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-right{text-align:right}.text-\\[10px\\]{font-size:10px}.text-base{font-size:1rem}.text-sm{font-size:.875rem}.text-xs{font-size:.75rem}.font-semibold{font-weight:600}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\\/80{color:#fffc}.shadow-2xl{--tw-shadow: 0 25px 50px rgba(0, 0, 0, .25);--tw-shadow-colored: 0 25px 50px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px rgba(0, 0, 0, .1);--tw-shadow-colored: 0 10px 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}`)),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); import { jsxs as T, jsx as y } from "react/jsx-runtime"; import { forwardRef as Ce, createElement as G, useState as N, useRef as le, useEffect as de } from "react"; const Pe = 6048e5, ze = 864e5, pe = Symbol.for("constructDateFrom"); function S(n, e) { return typeof n == "function" ? n(e) : n && typeof n == "object" && pe in n ? n[pe](e) : n instanceof Date ? new n.constructor(e) : new Date(e); } function v(n, e) { return S(e || n, n); } let Ke = {}; function H() { return Ke; } function L(n, e) { const t = H(), s = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? t.weekStartsOn ?? t.locale?.options?.weekStartsOn ?? 0, r = v(n, e?.in), i = r.getDay(), o = (i < s ? 7 : 0) + i - s; return r.setDate(r.getDate() - o), r.setHours(0, 0, 0, 0), r; } function V(n, e) { return L(n, { ...e, weekStartsOn: 1 }); } function Ae(n, e) { const t = v(n, e?.in), s = t.getFullYear(), r = S(t, 0); r.setFullYear(s + 1, 0, 4), r.setHours(0, 0, 0, 0); const i = V(r), o = S(t, 0); o.setFullYear(s, 0, 4), o.setHours(0, 0, 0, 0); const a = V(o); return t.getTime() >= i.getTime() ? s + 1 : t.getTime() >= a.getTime() ? s : s - 1; } function me(n) { const e = v(n), t = new Date( Date.UTC( e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds() ) ); return t.setUTCFullYear(e.getFullYear()), +n - +t; } function Je(n, ...e) { const t = S.bind( null, e.find((s) => typeof s == "object") ); return e.map(t); } function ge(n, e) { const t = v(n, e?.in); return t.setHours(0, 0, 0, 0), t; } function Ge(n, e, t) { const [s, r] = Je( t?.in, n, e ), i = ge(s), o = ge(r), a = +i - me(i), c = +o - me(o); return Math.round((a - c) / ze); } function Ze(n, e) { const t = Ae(n, e), s = S(n, 0); return s.setFullYear(t, 0, 4), s.setHours(0, 0, 0, 0), V(s); } function et(n) { return n instanceof Date || typeof n == "object" && Object.prototype.toString.call(n) === "[object Date]"; } function tt(n) { return !(!et(n) && typeof n != "number" || isNaN(+v(n))); } function nt(n, e) { const t = v(n, e?.in); return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t; } const st = { 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" } }, rt = (n, e, t) => { let s; const r = st[n]; return typeof r == "string" ? s = r : e === 1 ? s = r.one : s = r.other.replace("{{count}}", e.toString()), t?.addSuffix ? t.comparison && t.comparison > 0 ? "in " + s : s + " ago" : s; }; function j(n) { return (e = {}) => { const t = e.width ? String(e.width) : n.defaultWidth; return n.formats[t] || n.formats[n.defaultWidth]; }; } const it = { full: "EEEE, MMMM do, y", long: "MMMM do, y", medium: "MMM d, y", short: "MM/dd/yyyy" }, ot = { full: "h:mm:ss a zzzz", long: "h:mm:ss a z", medium: "h:mm:ss a", short: "h:mm a" }, at = { full: "{{date}} 'at' {{time}}", long: "{{date}} 'at' {{time}}", medium: "{{date}}, {{time}}", short: "{{date}}, {{time}}" }, ct = { date: j({ formats: it, defaultWidth: "full" }), time: j({ formats: ot, defaultWidth: "full" }), dateTime: j({ formats: at, defaultWidth: "full" }) }, ht = { lastWeek: "'last' eeee 'at' p", yesterday: "'yesterday at' p", today: "'today at' p", tomorrow: "'tomorrow at' p", nextWeek: "eeee 'at' p", other: "P" }, ut = (n, e, t, s) => ht[n]; function R(n) { return (e, t) => { const s = t?.context ? String(t.context) : "standalone"; let r; if (s === "formatting" && n.formattingValues) { const o = n.defaultFormattingWidth || n.defaultWidth, a = t?.width ? String(t.width) : o; r = n.formattingValues[a] || n.formattingValues[o]; } else { const o = n.defaultWidth, a = t?.width ? String(t.width) : n.defaultWidth; r = n.values[a] || n.values[o]; } const i = n.argumentCallback ? n.argumentCallback(e) : e; return r[i]; }; } const ft = { narrow: ["B", "A"], abbreviated: ["BC", "AD"], wide: ["Before Christ", "Anno Domini"] }, lt = { narrow: ["1", "2", "3", "4"], abbreviated: ["Q1", "Q2", "Q3", "Q4"], wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] }, dt = { 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" ] }, pt = { 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" ] }, mt = { 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" } }, gt = { 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" } }, yt = (n, e) => { const t = Number(n), s = t % 100; if (s > 20 || s < 10) switch (s % 10) { case 1: return t + "st"; case 2: return t + "nd"; case 3: return t + "rd"; } return t + "th"; }, bt = { ordinalNumber: yt, era: R({ values: ft, defaultWidth: "wide" }), quarter: R({ values: lt, defaultWidth: "wide", argumentCallback: (n) => n - 1 }), month: R({ values: dt, defaultWidth: "wide" }), day: R({ values: pt, defaultWidth: "wide" }), dayPeriod: R({ values: mt, defaultWidth: "wide", formattingValues: gt, defaultFormattingWidth: "wide" }) }; function M(n) { return (e, t = {}) => { const s = t.width, r = s && n.matchPatterns[s] || n.matchPatterns[n.defaultMatchWidth], i = e.match(r); if (!i) return null; const o = i[0], a = s && n.parsePatterns[s] || n.parsePatterns[n.defaultParseWidth], c = Array.isArray(a) ? _t(a, (f) => f.test(o)) : ( // [TODO] -- I challenge you to fix the type wt(a, (f) => f.test(o)) ); let d; d = n.valueCallback ? n.valueCallback(c) : c, d = t.valueCallback ? ( // [TODO] -- I challenge you to fix the type t.valueCallback(d) ) : d; const u = e.slice(o.length); return { value: d, rest: u }; }; } function wt(n, e) { for (const t in n) if (Object.prototype.hasOwnProperty.call(n, t) && e(n[t])) return t; } function _t(n, e) { for (let t = 0; t < n.length; t++) if (e(n[t])) return t; } function vt(n) { return (e, t = {}) => { const s = e.match(n.matchPattern); if (!s) return null; const r = s[0], i = e.match(n.parsePattern); if (!i) return null; let o = n.valueCallback ? n.valueCallback(i[0]) : i[0]; o = t.valueCallback ? t.valueCallback(o) : o; const a = e.slice(r.length); return { value: o, rest: a }; }; } const kt = /^(\d+)(th|st|nd|rd)?/i, Ot = /\d+/i, Et = { 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 }, xt = { any: [/^b/i, /^(a|c)/i] }, St = { narrow: /^[1234]/i, abbreviated: /^q[1234]/i, wide: /^[1234](th|st|nd|rd)? quarter/i }, Tt = { any: [/1/i, /2/i, /3/i, /4/i] }, Ct = { 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 }, Pt = { 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 ] }, At = { 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 }, Nt = { 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] }, Rt = { 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 }, Mt = { 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 } }, Bt = { ordinalNumber: vt({ matchPattern: kt, parsePattern: Ot, valueCallback: (n) => parseInt(n, 10) }), era: M({ matchPatterns: Et, defaultMatchWidth: "wide", parsePatterns: xt, defaultParseWidth: "any" }), quarter: M({ matchPatterns: St, defaultMatchWidth: "wide", parsePatterns: Tt, defaultParseWidth: "any", valueCallback: (n) => n + 1 }), month: M({ matchPatterns: Ct, defaultMatchWidth: "wide", parsePatterns: Pt, defaultParseWidth: "any" }), day: M({ matchPatterns: At, defaultMatchWidth: "wide", parsePatterns: Nt, defaultParseWidth: "any" }), dayPeriod: M({ matchPatterns: Rt, defaultMatchWidth: "any", parsePatterns: Mt, defaultParseWidth: "any" }) }, Dt = { code: "en-US", formatDistance: rt, formatLong: ct, formatRelative: ut, localize: bt, match: Bt, options: { weekStartsOn: 0, firstWeekContainsDate: 1 } }; function Lt(n, e) { const t = v(n, e?.in); return Ge(t, nt(t)) + 1; } function qt(n, e) { const t = v(n, e?.in), s = +V(t) - +Ze(t); return Math.round(s / Pe) + 1; } function Ne(n, e) { const t = v(n, e?.in), s = t.getFullYear(), r = H(), i = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = S(e?.in || n, 0); o.setFullYear(s + 1, 0, i), o.setHours(0, 0, 0, 0); const a = L(o, e), c = S(e?.in || n, 0); c.setFullYear(s, 0, i), c.setHours(0, 0, 0, 0); const d = L(c, e); return +t >= +a ? s + 1 : +t >= +d ? s : s - 1; } function Wt(n, e) { const t = H(), s = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? t.firstWeekContainsDate ?? t.locale?.options?.firstWeekContainsDate ?? 1, r = Ne(n, e), i = S(e?.in || n, 0); return i.setFullYear(r, 0, s), i.setHours(0, 0, 0, 0), L(i, e); } function Ft(n, e) { const t = v(n, e?.in), s = +L(t, e) - +Wt(t, e); return Math.round(s / Pe) + 1; } function l(n, e) { const t = n < 0 ? "-" : "", s = Math.abs(n).toString().padStart(e, "0"); return t + s; } const E = { // Year y(n, e) { const t = n.getFullYear(), s = t > 0 ? t : 1 - t; return l(e === "yy" ? s % 100 : s, e.length); }, // Month M(n, e) { const t = n.getMonth(); return e === "M" ? String(t + 1) : l(t + 1, 2); }, // Day of the month d(n, e) { return l(n.getDate(), e.length); }, // AM or PM a(n, e) { const t = n.getHours() / 12 >= 1 ? "pm" : "am"; switch (e) { case "a": case "aa": return t.toUpperCase(); case "aaa": return t; case "aaaaa": return t[0]; case "aaaa": default: return t === "am" ? "a.m." : "p.m."; } }, // Hour [1-12] h(n, e) { return l(n.getHours() % 12 || 12, e.length); }, // Hour [0-23] H(n, e) { return l(n.getHours(), e.length); }, // Minute m(n, e) { return l(n.getMinutes(), e.length); }, // Second s(n, e) { return l(n.getSeconds(), e.length); }, // Fraction of second S(n, e) { const t = e.length, s = n.getMilliseconds(), r = Math.trunc( s * Math.pow(10, t - 3) ); return l(r, e.length); } }, P = { midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, ye = { // Era G: function(n, e, t) { const s = n.getFullYear() > 0 ? 1 : 0; switch (e) { // AD, BC case "G": case "GG": case "GGG": return t.era(s, { width: "abbreviated" }); // A, B case "GGGGG": return t.era(s, { width: "narrow" }); // Anno Domini, Before Christ case "GGGG": default: return t.era(s, { width: "wide" }); } }, // Year y: function(n, e, t) { if (e === "yo") { const s = n.getFullYear(), r = s > 0 ? s : 1 - s; return t.ordinalNumber(r, { unit: "year" }); } return E.y(n, e); }, // Local week-numbering year Y: function(n, e, t, s) { const r = Ne(n, s), i = r > 0 ? r : 1 - r; if (e === "YY") { const o = i % 100; return l(o, 2); } return e === "Yo" ? t.ordinalNumber(i, { unit: "year" }) : l(i, e.length); }, // ISO week-numbering year R: function(n, e) { const t = Ae(n); return l(t, e.length); }, // Extended year. This is a single number designating the year of this calendar system. // The main difference between `y` and `u` localizers are B.C. years: // | Year | `y` | `u` | // |------|-----|-----| // | AC 1 | 1 | 1 | // | BC 1 | 1 | 0 | // | BC 2 | 2 | -1 | // Also `yy` always returns the last two digits of a year, // while `uu` pads single digit years to 2 characters and returns other years unchanged. u: function(n, e) { const t = n.getFullYear(); return l(t, e.length); }, // Quarter Q: function(n, e, t) { const s = Math.ceil((n.getMonth() + 1) / 3); switch (e) { // 1, 2, 3, 4 case "Q": return String(s); // 01, 02, 03, 04 case "QQ": return l(s, 2); // 1st, 2nd, 3rd, 4th case "Qo": return t.ordinalNumber(s, { unit: "quarter" }); // Q1, Q2, Q3, Q4 case "QQQ": return t.quarter(s, { width: "abbreviated", context: "formatting" }); // 1, 2, 3, 4 (narrow quarter; could be not numerical) case "QQQQQ": return t.quarter(s, { width: "narrow", context: "formatting" }); // 1st quarter, 2nd quarter, ... case "QQQQ": default: return t.quarter(s, { width: "wide", context: "formatting" }); } }, // Stand-alone quarter q: function(n, e, t) { const s = Math.ceil((n.getMonth() + 1) / 3); switch (e) { // 1, 2, 3, 4 case "q": return String(s); // 01, 02, 03, 04 case "qq": return l(s, 2); // 1st, 2nd, 3rd, 4th case "qo": return t.ordinalNumber(s, { unit: "quarter" }); // Q1, Q2, Q3, Q4 case "qqq": return t.quarter(s, { width: "abbreviated", context: "standalone" }); // 1, 2, 3, 4 (narrow quarter; could be not numerical) case "qqqqq": return t.quarter(s, { width: "narrow", context: "standalone" }); // 1st quarter, 2nd quarter, ... case "qqqq": default: return t.quarter(s, { width: "wide", context: "standalone" }); } }, // Month M: function(n, e, t) { const s = n.getMonth(); switch (e) { case "M": case "MM": return E.M(n, e); // 1st, 2nd, ..., 12th case "Mo": return t.ordinalNumber(s + 1, { unit: "month" }); // Jan, Feb, ..., Dec case "MMM": return t.month(s, { width: "abbreviated", context: "formatting" }); // J, F, ..., D case "MMMMM": return t.month(s, { width: "narrow", context: "formatting" }); // January, February, ..., December case "MMMM": default: return t.month(s, { width: "wide", context: "formatting" }); } }, // Stand-alone month L: function(n, e, t) { const s = n.getMonth(); switch (e) { // 1, 2, ..., 12 case "L": return String(s + 1); // 01, 02, ..., 12 case "LL": return l(s + 1, 2); // 1st, 2nd, ..., 12th case "Lo": return t.ordinalNumber(s + 1, { unit: "month" }); // Jan, Feb, ..., Dec case "LLL": return t.month(s, { width: "abbreviated", context: "standalone" }); // J, F, ..., D case "LLLLL": return t.month(s, { width: "narrow", context: "standalone" }); // January, February, ..., December case "LLLL": default: return t.month(s, { width: "wide", context: "standalone" }); } }, // Local week of year w: function(n, e, t, s) { const r = Ft(n, s); return e === "wo" ? t.ordinalNumber(r, { unit: "week" }) : l(r, e.length); }, // ISO week of year I: function(n, e, t) { const s = qt(n); return e === "Io" ? t.ordinalNumber(s, { unit: "week" }) : l(s, e.length); }, // Day of the month d: function(n, e, t) { return e === "do" ? t.ordinalNumber(n.getDate(), { unit: "date" }) : E.d(n, e); }, // Day of year D: function(n, e, t) { const s = Lt(n); return e === "Do" ? t.ordinalNumber(s, { unit: "dayOfYear" }) : l(s, e.length); }, // Day of week E: function(n, e, t) { const s = n.getDay(); switch (e) { // Tue case "E": case "EE": case "EEE": return t.day(s, { width: "abbreviated", context: "formatting" }); // T case "EEEEE": return t.day(s, { width: "narrow", context: "formatting" }); // Tu case "EEEEEE": return t.day(s, { width: "short", context: "formatting" }); // Tuesday case "EEEE": default: return t.day(s, { width: "wide", context: "formatting" }); } }, // Local day of week e: function(n, e, t, s) { const r = n.getDay(), i = (r - s.weekStartsOn + 8) % 7 || 7; switch (e) { // Numerical value (Nth day of week with current locale or weekStartsOn) case "e": return String(i); // Padded numerical value case "ee": return l(i, 2); // 1st, 2nd, ..., 7th case "eo": return t.ordinalNumber(i, { unit: "day" }); case "eee": return t.day(r, { width: "abbreviated", context: "formatting" }); // T case "eeeee": return t.day(r, { width: "narrow", context: "formatting" }); // Tu case "eeeeee": return t.day(r, { width: "short", context: "formatting" }); // Tuesday case "eeee": default: return t.day(r, { width: "wide", context: "formatting" }); } }, // Stand-alone local day of week c: function(n, e, t, s) { const r = n.getDay(), i = (r - s.weekStartsOn + 8) % 7 || 7; switch (e) { // Numerical value (same as in `e`) case "c": return String(i); // Padded numerical value case "cc": return l(i, e.length); // 1st, 2nd, ..., 7th case "co": return t.ordinalNumber(i, { unit: "day" }); case "ccc": return t.day(r, { width: "abbreviated", context: "standalone" }); // T case "ccccc": return t.day(r, { width: "narrow", context: "standalone" }); // Tu case "cccccc": return t.day(r, { width: "short", context: "standalone" }); // Tuesday case "cccc": default: return t.day(r, { width: "wide", context: "standalone" }); } }, // ISO day of week i: function(n, e, t) { const s = n.getDay(), r = s === 0 ? 7 : s; switch (e) { // 2 case "i": return String(r); // 02 case "ii": return l(r, e.length); // 2nd case "io": return t.ordinalNumber(r, { unit: "day" }); // Tue case "iii": return t.day(s, { width: "abbreviated", context: "formatting" }); // T case "iiiii": return t.day(s, { width: "narrow", context: "formatting" }); // Tu case "iiiiii": return t.day(s, { width: "short", context: "formatting" }); // Tuesday case "iiii": default: return t.day(s, { width: "wide", context: "formatting" }); } }, // AM or PM a: function(n, e, t) { const r = n.getHours() / 12 >= 1 ? "pm" : "am"; switch (e) { case "a": case "aa": return t.dayPeriod(r, { width: "abbreviated", context: "formatting" }); case "aaa": return t.dayPeriod(r, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "aaaaa": return t.dayPeriod(r, { width: "narrow", context: "formatting" }); case "aaaa": default: return t.dayPeriod(r, { width: "wide", context: "formatting" }); } }, // AM, PM, midnight, noon b: function(n, e, t) { const s = n.getHours(); let r; switch (s === 12 ? r = P.noon : s === 0 ? r = P.midnight : r = s / 12 >= 1 ? "pm" : "am", e) { case "b": case "bb": return t.dayPeriod(r, { width: "abbreviated", context: "formatting" }); case "bbb": return t.dayPeriod(r, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "bbbbb": return t.dayPeriod(r, { width: "narrow", context: "formatting" }); case "bbbb": default: return t.dayPeriod(r, { width: "wide", context: "formatting" }); } }, // in the morning, in the afternoon, in the evening, at night B: function(n, e, t) { const s = n.getHours(); let r; switch (s >= 17 ? r = P.evening : s >= 12 ? r = P.afternoon : s >= 4 ? r = P.morning : r = P.night, e) { case "B": case "BB": case "BBB": return t.dayPeriod(r, { width: "abbreviated", context: "formatting" }); case "BBBBB": return t.dayPeriod(r, { width: "narrow", context: "formatting" }); case "BBBB": default: return t.dayPeriod(r, { width: "wide", context: "formatting" }); } }, // Hour [1-12] h: function(n, e, t) { if (e === "ho") { let s = n.getHours() % 12; return s === 0 && (s = 12), t.ordinalNumber(s, { unit: "hour" }); } return E.h(n, e); }, // Hour [0-23] H: function(n, e, t) { return e === "Ho" ? t.ordinalNumber(n.getHours(), { unit: "hour" }) : E.H(n, e); }, // Hour [0-11] K: function(n, e, t) { const s = n.getHours() % 12; return e === "Ko" ? t.ordinalNumber(s, { unit: "hour" }) : l(s, e.length); }, // Hour [1-24] k: function(n, e, t) { let s = n.getHours(); return s === 0 && (s = 24), e === "ko" ? t.ordinalNumber(s, { unit: "hour" }) : l(s, e.length); }, // Minute m: function(n, e, t) { return e === "mo" ? t.ordinalNumber(n.getMinutes(), { unit: "minute" }) : E.m(n, e); }, // Second s: function(n, e, t) { return e === "so" ? t.ordinalNumber(n.getSeconds(), { unit: "second" }) : E.s(n, e); }, // Fraction of second S: function(n, e) { return E.S(n, e); }, // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) X: function(n, e, t) { const s = n.getTimezoneOffset(); if (s === 0) return "Z"; switch (e) { // Hours and optional minutes case "X": return we(s); // Hours, minutes and optional seconds without `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `XX` case "XXXX": case "XX": return C(s); // Hours, minutes and optional seconds with `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `XXX` case "XXXXX": case "XXX": // Hours and minutes with `:` delimiter default: return C(s, ":"); } }, // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) x: function(n, e, t) { const s = n.getTimezoneOffset(); switch (e) { // Hours and optional minutes case "x": return we(s); // Hours, minutes and optional seconds without `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `xx` case "xxxx": case "xx": return C(s); // Hours, minutes and optional seconds with `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `xxx` case "xxxxx": case "xxx": // Hours and minutes with `:` delimiter default: return C(s, ":"); } }, // Timezone (GMT) O: function(n, e, t) { const s = n.getTimezoneOffset(); switch (e) { // Short case "O": case "OO": case "OOO": return "GMT" + be(s, ":"); // Long case "OOOO": default: return "GMT" + C(s, ":"); } }, // Timezone (specific non-location) z: function(n, e, t) { const s = n.getTimezoneOffset(); switch (e) { // Short case "z": case "zz": case "zzz": return "GMT" + be(s, ":"); // Long case "zzzz": default: return "GMT" + C(s, ":"); } }, // Seconds timestamp t: function(n, e, t) { const s = Math.trunc(+n / 1e3); return l(s, e.length); }, // Milliseconds timestamp T: function(n, e, t) { return l(+n, e.length); } }; function be(n, e = "") { const t = n > 0 ? "-" : "+", s = Math.abs(n), r = Math.trunc(s / 60), i = s % 60; return i === 0 ? t + String(r) : t + String(r) + e + l(i, 2); } function we(n, e) { return n % 60 === 0 ? (n > 0 ? "-" : "+") + l(Math.abs(n) / 60, 2) : C(n, e); } function C(n, e = "") { const t = n > 0 ? "-" : "+", s = Math.abs(n), r = l(Math.trunc(s / 60), 2), i = l(s % 60, 2); return t + r + e + i; } const _e = (n, e) => { switch (n) { case "P": return e.date({ width: "short" }); case "PP": return e.date({ width: "medium" }); case "PPP": return e.date({ width: "long" }); case "PPPP": default: return e.date({ width: "full" }); } }, Re = (n, e) => { switch (n) { case "p": return e.time({ width: "short" }); case "pp": return e.time({ width: "medium" }); case "ppp": return e.time({ width: "long" }); case "pppp": default: return e.time({ width: "full" }); } }, Yt = (n, e) => { const t = n.match(/(P+)(p+)?/) || [], s = t[1], r = t[2]; if (!r) return _e(n, e); let i; switch (s) { case "P": i = e.dateTime({ width: "short" }); break; case "PP": i = e.dateTime({ width: "medium" }); break; case "PPP": i = e.dateTime({ width: "long" }); break; case "PPPP": default: i = e.dateTime({ width: "full" }); break; } return i.replace("{{date}}", _e(s, e)).replace("{{time}}", Re(r, e)); }, It = { p: Re, P: Yt }, Ut = /^D+$/, Vt = /^Y+$/, Ht = ["D", "DD", "YY", "YYYY"]; function $t(n) { return Ut.test(n); } function Xt(n) { return Vt.test(n); } function Qt(n, e, t) { const s = jt(n, e, t); if (console.warn(s), Ht.includes(n)) throw new RangeError(s); } function jt(n, e, t) { const s = n[0] === "Y" ? "years" : "days of the month"; return `Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${s} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`; } const zt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Kt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Jt = /^'([^]*?)'?$/, Gt = /''/g, Zt = /[a-zA-Z]/; function en(n, e, t) { const s = H(), r = s.locale ?? Dt, i = s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, o = s.weekStartsOn ?? s.locale?.options?.weekStartsOn ?? 0, a = v(n, t?.in); if (!tt(a)) throw new RangeError("Invalid time value"); let c = e.match(Kt).map((u) => { const f = u[0]; if (f === "p" || f === "P") { const b = It[f]; return b(u, r.formatLong); } return u; }).join("").match(zt).map((u) => { if (u === "''") return { isToken: !1, value: "'" }; const f = u[0]; if (f === "'") return { isToken: !1, value: tn(u) }; if (ye[f]) return { isToken: !0, value: u }; if (f.match(Zt)) throw new RangeError( "Format string contains an unescaped latin alphabet character `" + f + "`" ); return { isToken: !1, value: u }; }); r.localize.preprocessor && (c = r.localize.preprocessor(a, c)); const d = { firstWeekContainsDate: i, weekStartsOn: o, locale: r }; return c.map((u) => { if (!u.isToken) return u.value; const f = u.value; (Xt(f) || $t(f)) && Qt(f, e, String(n)); const b = ye[f[0]]; return b(a, f, r.localize, d); }).join(""); } function tn(n) { const e = n.match(Jt); return e ? e[1].replace(Gt, "'") : n; } /** * @license lucide-react v0.525.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const nn = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), sn = (n) => n.replace( /^([A-Z])|[\s-_]+(\w)/g, (e, t, s) => s ? s.toUpperCase() : t.toLowerCase() ), ve = (n) => { const e = sn(n); return e.charAt(0).toUpperCase() + e.slice(1); }, Me = (...n) => n.filter((e, t, s) => !!e && e.trim() !== "" && s.indexOf(e) === t).join(" ").trim(), rn = (n) => { for (const e in n) if (e.startsWith("aria-") || e === "role" || e === "title") return !0; }; /** * @license lucide-react v0.525.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ var on = { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }; /** * @license lucide-react v0.525.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const an = Ce( ({ color: n = "currentColor", size: e = 24, strokeWidth: t = 2, absoluteStrokeWidth: s, className: r = "", children: i, iconNode: o, ...a }, c) => G( "svg", { ref: c, ...on, width: e, height: e, stroke: n, strokeWidth: s ? Number(t) * 24 / Number(e) : t, className: Me("lucide", r), ...!i && !rn(a) && { "aria-hidden": "true" }, ...a }, [ ...o.map(([d, u]) => G(d, u)), ...Array.isArray(i) ? i : [i] ] ) ); /** * @license lucide-react v0.525.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const ie = (n, e) => { const t = Ce( ({ className: s, ...r }, i) => G(an, { ref: i, iconNode: e, className: Me( `lucide-${nn(ve(n))}`, `lucide-${n}`, s ), ...r }) ); return t.displayName = ve(n), t; }; /** * @license lucide-react v0.525.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const cn = [ ["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }] ], hn = ie("message-circle", cn); /** * @license lucide-react v0.525.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const un = [ [ "path", { d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z", key: "1ffxy3" } ], ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }] ], fn = ie("send", un); /** * @license lucide-react v0.525.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const ln = [ ["path", { d: "M18 6 6 18", key: "1bl5f8" }], ["path", { d: "m6 6 12 12", key: "d8bk6v" }] ], ke = ie("x", ln), O = /* @__PURE__ */ Object.create(null); O.open = "0"; O.close = "1"; O.ping = "2"; O.pong = "