@chatsystem/client 1.3.1 → 1.3.2
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/dist/index.cjs +416 -266
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.mjs +8034 -7054
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),C=require("react"),Hn=require("react-dom"),Fd=require("lottie-react"),Ud=require("@lottiefiles/dotlottie-react");function Hd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Qe=Hd(C);var Ji=function(e,t){return Ji=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ji(e,t)};function bt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ji(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var te=function(){return te=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},te.apply(this,arguments)};function Vr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function vt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function Ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hr={exports:{}},Ne={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var
|
|
8
|
+
*/var _s;function jd(){if(_s)return Ne;_s=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function p(S){if(typeof S=="object"&&S!==null){var w=S.$$typeof;switch(w){case t:switch(S=S.type,S){case u:case c:case r:case a:case i:case f:return S;default:switch(S=S&&S.$$typeof,S){case o:case d:case g:case h:case s:return S;default:return w}}case n:return w}}}function O(S){return p(S)===c}return Ne.AsyncMode=u,Ne.ConcurrentMode=c,Ne.ContextConsumer=o,Ne.ContextProvider=s,Ne.Element=t,Ne.ForwardRef=d,Ne.Fragment=r,Ne.Lazy=g,Ne.Memo=h,Ne.Portal=n,Ne.Profiler=a,Ne.StrictMode=i,Ne.Suspense=f,Ne.isAsyncMode=function(S){return O(S)||p(S)===u},Ne.isConcurrentMode=O,Ne.isContextConsumer=function(S){return p(S)===o},Ne.isContextProvider=function(S){return p(S)===s},Ne.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Ne.isForwardRef=function(S){return p(S)===d},Ne.isFragment=function(S){return p(S)===r},Ne.isLazy=function(S){return p(S)===g},Ne.isMemo=function(S){return p(S)===h},Ne.isPortal=function(S){return p(S)===n},Ne.isProfiler=function(S){return p(S)===a},Ne.isStrictMode=function(S){return p(S)===i},Ne.isSuspense=function(S){return p(S)===f},Ne.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===a||S===i||S===f||S===m||typeof S=="object"&&S!==null&&(S.$$typeof===g||S.$$typeof===h||S.$$typeof===s||S.$$typeof===o||S.$$typeof===d||S.$$typeof===v||S.$$typeof===A||S.$$typeof===k||S.$$typeof===y)},Ne.typeOf=p,Ne}var Re={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var as;function md(){return as||(as=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,E=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function N(V){return typeof V=="string"||typeof V=="function"||V===r||V===c||V===a||V===i||V===f||V===p||typeof V=="object"&&V!==null&&(V.$$typeof===b||V.$$typeof===h||V.$$typeof===s||V.$$typeof===o||V.$$typeof===d||V.$$typeof===v||V.$$typeof===C||V.$$typeof===A||V.$$typeof===E)}function L(V){if(typeof V=="object"&&V!==null){var ve=V.$$typeof;switch(ve){case t:var ze=V.type;switch(ze){case u:case c:case r:case a:case i:case f:return ze;default:var Ge=ze&&ze.$$typeof;switch(Ge){case o:case d:case b:case h:case s:return Ge;default:return ve}}case n:return ve}}}var w=u,k=c,Y=o,J=s,X=t,I=d,j=r,z=b,U=h,F=n,q=a,he=i,le=f,Ie=!1;function we(V){return Ie||(Ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),m(V)||L(V)===u}function m(V){return L(V)===c}function G(V){return L(V)===o}function ne(V){return L(V)===s}function y(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function K(V){return L(V)===d}function Z(V){return L(V)===r}function W(V){return L(V)===b}function oe(V){return L(V)===h}function ae(V){return L(V)===n}function re(V){return L(V)===a}function se(V){return L(V)===i}function Se(V){return L(V)===f}Re.AsyncMode=w,Re.ConcurrentMode=k,Re.ContextConsumer=Y,Re.ContextProvider=J,Re.Element=X,Re.ForwardRef=I,Re.Fragment=j,Re.Lazy=z,Re.Memo=U,Re.Portal=F,Re.Profiler=q,Re.StrictMode=he,Re.Suspense=le,Re.isAsyncMode=we,Re.isConcurrentMode=m,Re.isContextConsumer=G,Re.isContextProvider=ne,Re.isElement=y,Re.isForwardRef=K,Re.isFragment=Z,Re.isLazy=W,Re.isMemo=oe,Re.isPortal=ae,Re.isProfiler=re,Re.isStrictMode=se,Re.isSuspense=Se,Re.isValidElementType=N,Re.typeOf=L})()),Re}var ss;function ga(){return ss||(ss=1,process.env.NODE_ENV==="production"?rr.exports=pd():rr.exports=md()),rr.exports}var Zr,os;function gd(){if(os)return Zr;os=1;var e=ga(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function s(b){return e.isMemo(b)?i:a[b.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function h(b,E,v){if(typeof E!="string"){if(p){var C=f(E);C&&C!==p&&h(b,C,v)}var A=u(E);c&&(A=A.concat(c(E)));for(var N=s(b),L=s(E),w=0;w<A.length;++w){var k=A[w];if(!n[k]&&!(v&&v[k])&&!(L&&L[k])&&!(N&&N[k])){var Y=d(E,k);try{o(b,k,Y)}catch{}}}}return b}return Zr=h,Zr}gd();function ru(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var xe;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(xe||(xe={}));var Be;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Be||(Be={}));var Tn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Tn||(Tn={}));function us(e){return e.type===Be.literal}function bd(e){return e.type===Be.argument}function iu(e){return e.type===Be.number}function au(e){return e.type===Be.date}function su(e){return e.type===Be.time}function ou(e){return e.type===Be.select}function uu(e){return e.type===Be.plural}function Ed(e){return e.type===Be.pound}function lu(e){return e.type===Be.tag}function cu(e){return!!(e&&typeof e=="object"&&e.type===Tn.number)}function Bi(e){return!!(e&&typeof e=="object"&&e.type===Tn.dateTime)}var du=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Td=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function yd(e){var t={};return e.replace(Td,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var xd=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Sd(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(xd).filter(function(p){return p.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],u=s.slice(1),c=0,d=u;c<d.length;c++){var f=d[c];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:u})}return n}function _d(e){return e.replace(/^(.*?)-/,"")}var ls=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,fu=/^(@+)?(\+|#+)?[rs]?$/g,Cd=/(\*)(0+)|(#+)(0+)|(0+)/g,hu=/^(0+)$/;function cs(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(fu,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function pu(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Ad(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!hu.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ds(e){var t={},n=pu(e);return n||t}function wd(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=_d(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=te(te(te({},t),{notation:"scientific"}),i.options.reduce(function(u,c){return te(te({},u),ds(c))},{}));continue;case"engineering":t=te(te(te({},t),{notation:"engineering"}),i.options.reduce(function(u,c){return te(te({},u),ds(c))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Cd,function(u,c,d,f,p,h){if(c)t.minimumIntegerDigits=d.length;else{if(f&&p)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(hu.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ls.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ls,function(u,c,d,f,p,h){return d==="*"?t.minimumFractionDigits=c.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:p&&h?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+h.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=i.options[0];a==="w"?t=te(te({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=te(te({},t),cs(a)));continue}if(fu.test(i.stem)){t=te(te({},t),cs(i.stem));continue}var s=pu(i.stem);s&&(t=te(te({},t),s));var o=Ad(i.stem);o&&(t=te(te({},t),o))}return t}var ir={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Id(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),u="a",c=vd(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=u;for(;s-- >0;)n=c+n}else i==="J"?n+="H":n+=i}return n}function vd(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=ir[r||""]||ir[n||""]||ir["".concat(n,"-001")]||ir["001"];return i[0]}var ei,kd=new RegExp("^".concat(du.source,"*")),Nd=new RegExp("".concat(du.source,"*$"));function _e(e,t){return{start:e,end:t}}var Rd=!!String.prototype.startsWith&&"_a".startsWith("a",1),Od=!!String.fromCodePoint,Ld=!!Object.fromEntries,Dd=!!String.prototype.codePointAt,Pd=!!String.prototype.trimStart,Md=!!String.prototype.trimEnd,Bd=!!Number.isSafeInteger,Fd=Bd?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Fi=!0;try{var Hd=gu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Fi=((ei=Hd.exec("a"))===null||ei===void 0?void 0:ei[0])==="a"}catch{Fi=!1}var fs=Rd?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Hi=Od?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},hs=Ld?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},mu=Dd?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},Ud=Pd?function(t){return t.trimStart()}:function(t){return t.replace(kd,"")},jd=Md?function(t){return t.trimEnd()}:function(t){return t.replace(Nd,"")};function gu(e,t){return new RegExp(e,t)}var Ui;if(Fi){var ps=gu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ui=function(t,n){var r;ps.lastIndex=n;var i=ps.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Ui=function(t,n){for(var r=[];;){var i=mu(t,n);if(i===void 0||bu(i)||Gd(i))break;r.push(i),n+=i>=65536?2:1}return Hi.apply(void 0,r)};var zd=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Be.pound,location:_e(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(xe.UNMATCHED_CLOSING_TAG,_e(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&ji(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Be.literal,value:"<".concat(i,"/>"),location:_e(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ji(this.char()))return this.error(xe.INVALID_TAG,_e(o,this.clonePosition()));var u=this.clonePosition(),c=this.parseTagName();return i!==c?this.error(xe.UNMATCHED_CLOSING_TAG,_e(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Be.tag,value:i,children:s,location:_e(r,this.clonePosition())},err:null}:this.error(xe.INVALID_TAG,_e(o,this.clonePosition())))}else return this.error(xe.UNCLOSED_TAG,_e(r,this.clonePosition()))}else return this.error(xe.INVALID_TAG,_e(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Yd(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=_e(r,this.clonePosition());return{val:{type:Be.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!$d(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return Hi.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),Hi(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(xe.EXPECT_ARGUMENT_CLOSING_BRACE,_e(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(xe.EMPTY_ARGUMENT,_e(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(xe.MALFORMED_ARGUMENT,_e(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(xe.EXPECT_ARGUMENT_CLOSING_BRACE,_e(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Be.argument,value:i,location:_e(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(xe.EXPECT_ARGUMENT_CLOSING_BRACE,_e(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(xe.MALFORMED_ARGUMENT,_e(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Ui(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=_e(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(xe.EXPECT_ARGUMENT_TYPE,_e(s,u));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var p=jd(f.val);if(p.length===0)return this.error(xe.EXPECT_ARGUMENT_STYLE,_e(this.clonePosition(),this.clonePosition()));var h=_e(d,this.clonePosition());c={style:p,styleLocation:h}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var E=_e(i,this.clonePosition());if(c&&fs(c?.style,"::",0)){var v=Ud(c.style.slice(2));if(o==="number"){var f=this.parseNumberSkeletonFromString(v,c.styleLocation);return f.err?f:{val:{type:Be.number,value:r,location:E,style:f.val},err:null}}else{if(v.length===0)return this.error(xe.EXPECT_DATE_TIME_SKELETON,E);var C=v;this.locale&&(C=Id(v,this.locale));var p={type:Tn.dateTime,pattern:C,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?yd(C):{}},A=o==="date"?Be.date:Be.time;return{val:{type:A,value:r,location:E,style:p},err:null}}}return{val:{type:o==="number"?Be.number:o==="date"?Be.date:Be.time,value:r,location:E,style:(a=c?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var N=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(xe.EXPECT_SELECT_ARGUMENT_OPTIONS,_e(N,te({},N)));this.bumpSpace();var L=this.parseIdentifierIfPossible(),w=0;if(o!=="select"&&L.value==="offset"){if(!this.bumpIf(":"))return this.error(xe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,_e(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(xe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,xe.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),L=this.parseIdentifierIfPossible(),w=f.val}var k=this.tryParsePluralOrSelectOptions(t,o,n,L);if(k.err)return k;var b=this.tryParseArgumentClose(i);if(b.err)return b;var Y=_e(i,this.clonePosition());return o==="select"?{val:{type:Be.select,value:r,options:hs(k.val),location:Y},err:null}:{val:{type:Be.plural,value:r,options:hs(k.val),offset:w,pluralType:o==="plural"?"cardinal":"ordinal",location:Y},err:null}}default:return this.error(xe.INVALID_ARGUMENT_TYPE,_e(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(xe.EXPECT_ARGUMENT_CLOSING_BRACE,_e(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(xe.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,_e(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=Sd(t)}catch{return this.error(xe.INVALID_NUMBER_SKELETON,n)}return{val:{type:Tn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?wd(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],u=new Set,c=i.value,d=i.location;;){if(c.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(xe.EXPECT_PLURAL_ARGUMENT_SELECTOR,xe.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;d=_e(f,this.clonePosition()),c=this.message.slice(f.offset,this.offset())}else break}if(u.has(c))return this.error(n==="select"?xe.DUPLICATE_SELECT_ARGUMENT_SELECTOR:xe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);c==="other"&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?xe.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:xe.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,_e(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(t+1,n,r);if(b.err)return b;var E=this.tryParseArgumentClose(h);if(E.err)return E;o.push([c,{value:b.val,location:_e(h,this.clonePosition())}]),u.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,d=a.location}return o.length===0?this.error(n==="select"?xe.EXPECT_SELECT_ARGUMENT_SELECTOR:xe.EXPECT_PLURAL_ARGUMENT_SELECTOR,_e(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(xe.MISSING_OTHER_CLAUSE,_e(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=_e(i,this.clonePosition());return a?(s*=r,Fd(s)?{val:s,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=mu(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(fs(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&bu(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function ji(e){return e>=97&&e<=122||e>=65&&e<=90}function $d(e){return ji(e)||e===47}function Yd(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function bu(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Gd(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function zi(e){e.forEach(function(t){if(delete t.location,ou(t)||uu(t))for(var n in t.options)delete t.options[n].location,zi(t.options[n].value);else iu(t)&&cu(t.style)||(au(t)||su(t))&&Bi(t.style)?delete t.style.location:lu(t)&&zi(t.children)})}function Vd(e,t){t===void 0&&(t={}),t=te({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new zd(e,t).parse();if(n.err){var r=SyntaxError(xe[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||zi(n.val),n.val}function At(e,t){var n=t&&t.cache?t.cache:Jd,r=t&&t.serializer?t.serializer:Kd,i=t&&t.strategy?t.strategy:Xd;return i(e,{cache:n,serializer:r})}function qd(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Wd(e,t,n,r){var i=qd(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function Eu(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Tu(e,t,n,r,i){return n.bind(t,e,r,i)}function Xd(e,t){var n=e.length===1?Wd:Eu;return Tu(e,this,n,t.cache.create(),t.serializer)}function Qd(e,t){return Tu(e,this,Eu,t.cache.create(),t.serializer)}var Kd=function(){return JSON.stringify(arguments)};function ba(){this.cache=Object.create(null)}ba.prototype.get=function(e){return this.cache[e]};ba.prototype.set=function(e,t){this.cache[e]=t};var Jd={create:function(){return new ba}},wt={variadic:Qd},kt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(kt||(kt={}));var Yt=(function(e){mt(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),ms=(function(e){mt(t,e);function t(n,r,i,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),kt.INVALID_VALUE,a)||this}return t})(Yt),Zd=(function(e){mt(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),kt.INVALID_VALUE,i)||this}return t})(Yt),ef=(function(e){mt(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),kt.MISSING_VALUE,r)||this}return t})(Yt),nt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(nt||(nt={}));function tf(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==nt.literal||n.type!==nt.literal?t.push(n):r.value+=n.value,t},[])}function yu(e){return typeof e=="function"}function mr(e,t,n,r,i,a,s){if(e.length===1&&us(e[0]))return[{type:nt.literal,value:e[0].value}];for(var o=[],u=0,c=e;u<c.length;u++){var d=c[u];if(us(d)){o.push({type:nt.literal,value:d.value});continue}if(Ed(d)){typeof a=="number"&&o.push({type:nt.literal,value:n.getNumberFormat(t).format(a)});continue}var f=d.value;if(!(i&&f in i))throw new ef(f,s);var p=i[f];if(bd(d)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),o.push({type:typeof p=="string"?nt.literal:nt.object,value:p});continue}if(au(d)){var h=typeof d.style=="string"?r.date[d.style]:Bi(d.style)?d.style.parsedOptions:void 0;o.push({type:nt.literal,value:n.getDateTimeFormat(t,h).format(p)});continue}if(su(d)){var h=typeof d.style=="string"?r.time[d.style]:Bi(d.style)?d.style.parsedOptions:r.time.medium;o.push({type:nt.literal,value:n.getDateTimeFormat(t,h).format(p)});continue}if(iu(d)){var h=typeof d.style=="string"?r.number[d.style]:cu(d.style)?d.style.parsedOptions:void 0;h&&h.scale&&(p=p*(h.scale||1)),o.push({type:nt.literal,value:n.getNumberFormat(t,h).format(p)});continue}if(lu(d)){var b=d.children,E=d.value,v=i[E];if(!yu(v))throw new Zd(E,"function",s);var C=mr(b,t,n,r,i,a),A=v(C.map(function(w){return w.value}));Array.isArray(A)||(A=[A]),o.push.apply(o,A.map(function(w){return{type:typeof w=="string"?nt.literal:nt.object,value:w}}))}if(ou(d)){var N=d.options[p]||d.options.other;if(!N)throw new ms(d.value,p,Object.keys(d.options),s);o.push.apply(o,mr(N.value,t,n,r,i));continue}if(uu(d)){var N=d.options["=".concat(p)];if(!N){if(!Intl.PluralRules)throw new Yt(`Intl.PluralRules is not available in this environment.
|
|
15
|
+
*/var Ss;function zd(){return Ss||(Ss=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function p(G){return typeof G=="string"||typeof G=="function"||G===r||G===c||G===a||G===i||G===f||G===m||typeof G=="object"&&G!==null&&(G.$$typeof===g||G.$$typeof===h||G.$$typeof===s||G.$$typeof===o||G.$$typeof===d||G.$$typeof===v||G.$$typeof===A||G.$$typeof===k||G.$$typeof===y)}function O(G){if(typeof G=="object"&&G!==null){var Le=G.$$typeof;switch(Le){case t:var ze=G.type;switch(ze){case u:case c:case r:case a:case i:case f:return ze;default:var rt=ze&&ze.$$typeof;switch(rt){case o:case d:case g:case h:case s:return rt;default:return Le}}case n:return Le}}}var S=u,w=c,B=o,K=s,Y=t,N=d,H=r,$=g,j=h,z=n,Z=a,fe=i,ie=f,ve=!1;function xe(G){return ve||(ve=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),E(G)||O(G)===u}function E(G){return O(G)===c}function W(G){return O(G)===o}function ne(G){return O(G)===s}function _(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function Q(G){return O(G)===d}function ae(G){return O(G)===r}function X(G){return O(G)===g}function se(G){return O(G)===h}function re(G){return O(G)===n}function ce(G){return O(G)===a}function ue(G){return O(G)===i}function ke(G){return O(G)===f}Re.AsyncMode=S,Re.ConcurrentMode=w,Re.ContextConsumer=B,Re.ContextProvider=K,Re.Element=Y,Re.ForwardRef=N,Re.Fragment=H,Re.Lazy=$,Re.Memo=j,Re.Portal=z,Re.Profiler=Z,Re.StrictMode=fe,Re.Suspense=ie,Re.isAsyncMode=xe,Re.isConcurrentMode=E,Re.isContextConsumer=W,Re.isContextProvider=ne,Re.isElement=_,Re.isForwardRef=Q,Re.isFragment=ae,Re.isLazy=X,Re.isMemo=se,Re.isPortal=re,Re.isProfiler=ce,Re.isStrictMode=ue,Re.isSuspense=ke,Re.isValidElementType=p,Re.typeOf=O})()),Re}var Cs;function Oa(){return Cs||(Cs=1,process.env.NODE_ENV==="production"?hr.exports=jd():hr.exports=zd()),hr.exports}var hi,Is;function $d(){if(Is)return hi;Is=1;var e=Oa(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function s(g){return e.isMemo(g)?i:a[g.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;function h(g,y,v){if(typeof y!="string"){if(m){var A=f(y);A&&A!==m&&h(g,A,v)}var k=u(y);c&&(k=k.concat(c(y)));for(var p=s(g),O=s(y),S=0;S<k.length;++S){var w=k[S];if(!n[w]&&!(v&&v[w])&&!(O&&O[w])&&!(p&&p[w])){var B=d(y,w);try{o(g,w,B)}catch{}}}}return g}return hi=h,hi}$d();function Iu(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var Ce;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Ce||(Ce={}));var Fe;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Fe||(Fe={}));var Sn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Sn||(Sn={}));function As(e){return e.type===Fe.literal}function Vd(e){return e.type===Fe.argument}function Au(e){return e.type===Fe.number}function wu(e){return e.type===Fe.date}function vu(e){return e.type===Fe.time}function ku(e){return e.type===Fe.select}function Nu(e){return e.type===Fe.plural}function Wd(e){return e.type===Fe.pound}function Ru(e){return e.type===Fe.tag}function Ou(e){return!!(e&&typeof e=="object"&&e.type===Sn.number)}function Zi(e){return!!(e&&typeof e=="object"&&e.type===Sn.dateTime)}var Lu=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Gd=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Yd(e){var t={};return e.replace(Gd,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var qd=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Xd(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(qd).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],u=s.slice(1),c=0,d=u;c<d.length;c++){var f=d[c];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:u})}return n}function Qd(e){return e.replace(/^(.*?)-/,"")}var ws=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Du=/^(@+)?(\+|#+)?[rs]?$/g,Kd=/(\*)(0+)|(#+)(0+)|(0+)/g,Pu=/^(0+)$/;function vs(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Du,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Mu(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Jd(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Pu.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ks(e){var t={},n=Mu(e);return n||t}function Zd(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Qd(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=te(te(te({},t),{notation:"scientific"}),i.options.reduce(function(u,c){return te(te({},u),ks(c))},{}));continue;case"engineering":t=te(te(te({},t),{notation:"engineering"}),i.options.reduce(function(u,c){return te(te({},u),ks(c))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Kd,function(u,c,d,f,m,h){if(c)t.minimumIntegerDigits=d.length;else{if(f&&m)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Pu.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ws.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ws,function(u,c,d,f,m,h){return d==="*"?t.minimumFractionDigits=c.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:m&&h?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+h.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=i.options[0];a==="w"?t=te(te({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=te(te({},t),vs(a)));continue}if(Du.test(i.stem)){t=te(te({},t),vs(i.stem));continue}var s=Mu(i.stem);s&&(t=te(te({},t),s));var o=Jd(i.stem);o&&(t=te(te({},t),o))}return t}var mr={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function ef(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),u="a",c=tf(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=u;for(;s-- >0;)n=c+n}else i==="J"?n+="H":n+=i}return n}function tf(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=mr[r||""]||mr[n||""]||mr["".concat(n,"-001")]||mr["001"];return i[0]}var mi,nf=new RegExp("^".concat(Lu.source,"*")),rf=new RegExp("".concat(Lu.source,"*$"));function Ie(e,t){return{start:e,end:t}}var af=!!String.prototype.startsWith&&"_a".startsWith("a",1),sf=!!String.fromCodePoint,of=!!Object.fromEntries,uf=!!String.prototype.codePointAt,cf=!!String.prototype.trimStart,lf=!!String.prototype.trimEnd,df=!!Number.isSafeInteger,ff=df?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},ea=!0;try{var hf=Fu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ea=((mi=hf.exec("a"))===null||mi===void 0?void 0:mi[0])==="a"}catch{ea=!1}var Ns=af?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},ta=sf?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},Rs=of?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},Bu=uf?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},mf=cf?function(t){return t.trimStart()}:function(t){return t.replace(nf,"")},pf=lf?function(t){return t.trimEnd()}:function(t){return t.replace(rf,"")};function Fu(e,t){return new RegExp(e,t)}var na;if(ea){var Os=Fu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");na=function(t,n){var r;Os.lastIndex=n;var i=Os.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else na=function(t,n){for(var r=[];;){var i=Bu(t,n);if(i===void 0||Uu(i)||Tf(i))break;r.push(i),n+=i>=65536?2:1}return ta.apply(void 0,r)};var gf=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Fe.pound,location:Ie(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Ce.UNMATCHED_CLOSING_TAG,Ie(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&ra(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Fe.literal,value:"<".concat(i,"/>"),location:Ie(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ra(this.char()))return this.error(Ce.INVALID_TAG,Ie(o,this.clonePosition()));var u=this.clonePosition(),c=this.parseTagName();return i!==c?this.error(Ce.UNMATCHED_CLOSING_TAG,Ie(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Fe.tag,value:i,children:s,location:Ie(r,this.clonePosition())},err:null}:this.error(Ce.INVALID_TAG,Ie(o,this.clonePosition())))}else return this.error(Ce.UNCLOSED_TAG,Ie(r,this.clonePosition()))}else return this.error(Ce.INVALID_TAG,Ie(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Ef(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=Ie(r,this.clonePosition());return{val:{type:Fe.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!bf(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return ta.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),ta(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ce.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Ce.EMPTY_ARGUMENT,Ie(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Ce.MALFORMED_ARGUMENT,Ie(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ce.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Fe.argument,value:i,location:Ie(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ce.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(Ce.MALFORMED_ARGUMENT,Ie(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=na(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=Ie(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(Ce.EXPECT_ARGUMENT_TYPE,Ie(s,u));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var m=pf(f.val);if(m.length===0)return this.error(Ce.EXPECT_ARGUMENT_STYLE,Ie(this.clonePosition(),this.clonePosition()));var h=Ie(d,this.clonePosition());c={style:m,styleLocation:h}}var g=this.tryParseArgumentClose(i);if(g.err)return g;var y=Ie(i,this.clonePosition());if(c&&Ns(c?.style,"::",0)){var v=mf(c.style.slice(2));if(o==="number"){var f=this.parseNumberSkeletonFromString(v,c.styleLocation);return f.err?f:{val:{type:Fe.number,value:r,location:y,style:f.val},err:null}}else{if(v.length===0)return this.error(Ce.EXPECT_DATE_TIME_SKELETON,y);var A=v;this.locale&&(A=ef(v,this.locale));var m={type:Sn.dateTime,pattern:A,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?Yd(A):{}},k=o==="date"?Fe.date:Fe.time;return{val:{type:k,value:r,location:y,style:m},err:null}}}return{val:{type:o==="number"?Fe.number:o==="date"?Fe.date:Fe.time,value:r,location:y,style:(a=c?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var p=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ce.EXPECT_SELECT_ARGUMENT_OPTIONS,Ie(p,te({},p)));this.bumpSpace();var O=this.parseIdentifierIfPossible(),S=0;if(o!=="select"&&O.value==="offset"){if(!this.bumpIf(":"))return this.error(Ce.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ie(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(Ce.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ce.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),O=this.parseIdentifierIfPossible(),S=f.val}var w=this.tryParsePluralOrSelectOptions(t,o,n,O);if(w.err)return w;var g=this.tryParseArgumentClose(i);if(g.err)return g;var B=Ie(i,this.clonePosition());return o==="select"?{val:{type:Fe.select,value:r,options:Rs(w.val),location:B},err:null}:{val:{type:Fe.plural,value:r,options:Rs(w.val),offset:S,pluralType:o==="plural"?"cardinal":"ordinal",location:B},err:null}}default:return this.error(Ce.INVALID_ARGUMENT_TYPE,Ie(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Ce.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ce.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ie(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=Xd(t)}catch{return this.error(Ce.INVALID_NUMBER_SKELETON,n)}return{val:{type:Sn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Zd(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],u=new Set,c=i.value,d=i.location;;){if(c.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(Ce.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ce.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;d=Ie(f,this.clonePosition()),c=this.message.slice(f.offset,this.offset())}else break}if(u.has(c))return this.error(n==="select"?Ce.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ce.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);c==="other"&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Ce.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ce.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ie(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,n,r);if(g.err)return g;var y=this.tryParseArgumentClose(h);if(y.err)return y;o.push([c,{value:g.val,location:Ie(h,this.clonePosition())}]),u.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,d=a.location}return o.length===0?this.error(n==="select"?Ce.EXPECT_SELECT_ARGUMENT_SELECTOR:Ce.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ie(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Ce.MISSING_OTHER_CLAUSE,Ie(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=Ie(i,this.clonePosition());return a?(s*=r,ff(s)?{val:s,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Bu(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Ns(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Uu(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function ra(e){return e>=97&&e<=122||e>=65&&e<=90}function bf(e){return ra(e)||e===47}function Ef(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Uu(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Tf(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function ia(e){e.forEach(function(t){if(delete t.location,ku(t)||Nu(t))for(var n in t.options)delete t.options[n].location,ia(t.options[n].value);else Au(t)&&Ou(t.style)||(wu(t)||vu(t))&&Zi(t.style)?delete t.style.location:Ru(t)&&ia(t.children)})}function yf(e,t){t===void 0&&(t={}),t=te({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new gf(e,t).parse();if(n.err){var r=SyntaxError(Ce[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||ia(n.val),n.val}function At(e,t){var n=t&&t.cache?t.cache:Af,r=t&&t.serializer?t.serializer:If,i=t&&t.strategy?t.strategy:Sf;return i(e,{cache:n,serializer:r})}function xf(e){return e==null||typeof e=="number"||typeof e=="boolean"}function _f(e,t,n,r){var i=xf(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function Hu(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function ju(e,t,n,r,i){return n.bind(t,e,r,i)}function Sf(e,t){var n=e.length===1?_f:Hu;return ju(e,this,n,t.cache.create(),t.serializer)}function Cf(e,t){return ju(e,this,Hu,t.cache.create(),t.serializer)}var If=function(){return JSON.stringify(arguments)};function La(){this.cache=Object.create(null)}La.prototype.get=function(e){return this.cache[e]};La.prototype.set=function(e,t){this.cache[e]=t};var Af={create:function(){return new La}},wt={variadic:Cf},Nt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Nt||(Nt={}));var Gt=(function(e){bt(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),Ls=(function(e){bt(t,e);function t(n,r,i,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Nt.INVALID_VALUE,a)||this}return t})(Gt),wf=(function(e){bt(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Nt.INVALID_VALUE,i)||this}return t})(Gt),vf=(function(e){bt(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Nt.MISSING_VALUE,r)||this}return t})(Gt),at;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(at||(at={}));function kf(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==at.literal||n.type!==at.literal?t.push(n):r.value+=n.value,t},[])}function zu(e){return typeof e=="function"}function Ar(e,t,n,r,i,a,s){if(e.length===1&&As(e[0]))return[{type:at.literal,value:e[0].value}];for(var o=[],u=0,c=e;u<c.length;u++){var d=c[u];if(As(d)){o.push({type:at.literal,value:d.value});continue}if(Wd(d)){typeof a=="number"&&o.push({type:at.literal,value:n.getNumberFormat(t).format(a)});continue}var f=d.value;if(!(i&&f in i))throw new vf(f,s);var m=i[f];if(Vd(d)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),o.push({type:typeof m=="string"?at.literal:at.object,value:m});continue}if(wu(d)){var h=typeof d.style=="string"?r.date[d.style]:Zi(d.style)?d.style.parsedOptions:void 0;o.push({type:at.literal,value:n.getDateTimeFormat(t,h).format(m)});continue}if(vu(d)){var h=typeof d.style=="string"?r.time[d.style]:Zi(d.style)?d.style.parsedOptions:r.time.medium;o.push({type:at.literal,value:n.getDateTimeFormat(t,h).format(m)});continue}if(Au(d)){var h=typeof d.style=="string"?r.number[d.style]:Ou(d.style)?d.style.parsedOptions:void 0;h&&h.scale&&(m=m*(h.scale||1)),o.push({type:at.literal,value:n.getNumberFormat(t,h).format(m)});continue}if(Ru(d)){var g=d.children,y=d.value,v=i[y];if(!zu(v))throw new wf(y,"function",s);var A=Ar(g,t,n,r,i,a),k=v(A.map(function(S){return S.value}));Array.isArray(k)||(k=[k]),o.push.apply(o,k.map(function(S){return{type:typeof S=="string"?at.literal:at.object,value:S}}))}if(ku(d)){var p=d.options[m]||d.options.other;if(!p)throw new Ls(d.value,m,Object.keys(d.options),s);o.push.apply(o,Ar(p.value,t,n,r,i));continue}if(Nu(d)){var p=d.options["=".concat(m)];if(!p){if(!Intl.PluralRules)throw new Gt(`Intl.PluralRules is not available in this environment.
|
|
16
16
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
17
|
-
`,
|
|
17
|
+
`,Nt.MISSING_INTL_API,s);var O=n.getPluralRules(t,{type:d.pluralType}).select(m-(d.offset||0));p=d.options[O]||d.options.other}if(!p)throw new Ls(d.value,m,Object.keys(d.options),s);o.push.apply(o,Ar(p.value,t,n,r,i,m-(d.offset||0)));continue}}return kf(o)}function Nf(e,t){return t?te(te(te({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=te(te({},e[r]),t[r]||{}),n},{})):e}function Rf(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Nf(e[r],t[r]),n},te({},e)):e}function pi(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Of(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:At(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,vt([void 0],n,!1)))},{cache:pi(e.number),strategy:wt.variadic}),getDateTimeFormat:At(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,vt([void 0],n,!1)))},{cache:pi(e.dateTime),strategy:wt.variadic}),getPluralRules:At(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,vt([void 0],n,!1)))},{cache:pi(e.pluralRules),strategy:wt.variadic})}}var $u=(function(){function e(t,n,r,i){var a=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=a.formatToParts(u);if(c.length===1)return c[0].value;var d=c.reduce(function(f,m){return!f.length||m.type!==at.literal||typeof f[f.length-1]!="string"?f.push(m.value):f[f.length-1]+=m.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(u){return Ar(a.ast,a.locales,a.formatters,a.formats,u,void 0,a.message)},this.resolvedOptions=function(){var u;return{locale:((u=a.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var o=Vr(s,["formatters"]);this.ast=e.__parse(t,te(te({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Rf(e.formats,r),this.formatters=i&&i.formatters||Of(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=yf,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})(),sn;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(sn||(sn={}));var nr=(function(e){bt(t,e);function t(n,r,i){var a=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
|
|
18
18
|
`).concat(s?`
|
|
19
19
|
`.concat(s.message,`
|
|
20
|
-
`).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),
|
|
20
|
+
`).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),Lf=(function(e){bt(t,e);function t(n,r){return e.call(this,sn.UNSUPPORTED_FORMATTER,n,r)||this}return t})(nr),Df=(function(e){bt(t,e);function t(n,r){return e.call(this,sn.INVALID_CONFIG,n,r)||this}return t})(nr),Ds=(function(e){bt(t,e);function t(n,r){return e.call(this,sn.MISSING_DATA,n,r)||this}return t})(nr),Et=(function(e){bt(t,e);function t(n,r,i){var a=e.call(this,sn.FORMAT_ERROR,"".concat(n,`
|
|
21
21
|
Locale: `).concat(r,`
|
|
22
|
-
`),i)||this;return a.locale=r,a}return t})(
|
|
22
|
+
`),i)||this;return a.locale=r,a}return t})(nr),gi=(function(e){bt(t,e);function t(n,r,i,a){var s=e.call(this,"".concat(n,`
|
|
23
23
|
MessageID: `).concat(i?.id,`
|
|
24
24
|
Default Message: `).concat(i?.defaultMessage,`
|
|
25
25
|
Description: `).concat(i?.description,`
|
|
26
|
-
`),r,a)||this;return s.descriptor=i,s.locale=r,s}return t})(
|
|
26
|
+
`),r,a)||this;return s.descriptor=i,s.locale=r,s}return t})(Et),Pf=(function(e){bt(t,e);function t(n,r){var i=e.call(this,sn.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=n,i}return t})(nr);function ln(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,i){return i in e?r[i]=e[i]:i in n&&(r[i]=n[i]),r},{})}var Mf=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},Bf=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},Vu={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Mf,onWarn:Bf};function Wu(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Qt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Ff(e){e===void 0&&(e=Wu());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=At(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.DateTimeFormat).bind.apply(o,vt([void 0],u,!1)))},{cache:Qt(e.dateTime),strategy:wt.variadic}),a=At(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.NumberFormat).bind.apply(o,vt([void 0],u,!1)))},{cache:Qt(e.number),strategy:wt.variadic}),s=At(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.PluralRules).bind.apply(o,vt([void 0],u,!1)))},{cache:Qt(e.pluralRules),strategy:wt.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:At(function(o,u,c,d){return new $u(o,u,c,te({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},d||{}))},{cache:Qt(e.message),strategy:wt.variadic}),getRelativeTimeFormat:At(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(t.bind.apply(t,vt([void 0],o,!1)))},{cache:Qt(e.relativeTime),strategy:wt.variadic}),getPluralRules:s,getListFormat:At(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(n.bind.apply(n,vt([void 0],o,!1)))},{cache:Qt(e.list),strategy:wt.variadic}),getDisplayNames:At(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(r.bind.apply(r,vt([void 0],o,!1)))},{cache:Qt(e.displayNames),strategy:wt.variadic})}}function Da(e,t,n,r){var i=e&&e[t],a;if(i&&(a=i[n]),a)return a;r(new Lf("No ".concat(t," format named: ").concat(n)))}function pr(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=te({timeZone:t},e[r]),n},{})}function Ps(e,t){var n=Object.keys(te(te({},e),t));return n.reduce(function(r,i){return r[i]=te(te({},e[i]||{}),t[i]||{}),r},{})}function Ms(e,t){if(!t)return e;var n=$u.formats;return te(te(te({},n),e),{date:Ps(pr(n.date,t),pr(e.date||{},t)),time:Ps(pr(n.time,t),pr(e.time||{},t))})}var aa=function(e,t,n,r,i){var a=e.locale,s=e.formats,o=e.messages,u=e.defaultLocale,c=e.defaultFormats,d=e.fallbackOnEmptyString,f=e.onError,m=e.timeZone,h=e.defaultRichTextElements;n===void 0&&(n={id:""});var g=n.id,y=n.defaultMessage;Iu(!!g,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var v=String(g),A=o&&Object.prototype.hasOwnProperty.call(o,v)&&o[v];if(Array.isArray(A)&&A.length===1&&A[0].type===Fe.literal)return A[0].value;if(!r&&A&&typeof A=="string"&&!h)return A.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=te(te({},h),r||{}),s=Ms(s,m),c=Ms(c,m),!A){if(d===!1&&A==="")return A;if((!y||a&&a.toLowerCase()!==u.toLowerCase())&&f(new Pf(n,a)),y)try{var k=t.getMessageFormat(y,u,c,i);return k.format(r)}catch(p){return f(new gi('Error formatting default message for: "'.concat(v,'", rendering default message verbatim'),a,n,p)),typeof y=="string"?y:v}return v}try{var k=t.getMessageFormat(A,a,s,te({formatters:t},i||{}));return k.format(r)}catch(p){f(new gi('Error formatting message: "'.concat(v,'", using ').concat(y?"default message":"id"," as fallback."),a,n,p))}if(y)try{var k=t.getMessageFormat(y,u,c,i);return k.format(r)}catch(p){f(new gi('Error formatting the default message for: "'.concat(v,'", rendering message verbatim'),a,n,p))}return typeof A=="string"?A:typeof y=="string"?y:v},Gu=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Wr(e,t,n,r){var i=e.locale,a=e.formats,s=e.onError,o=e.timeZone;r===void 0&&(r={});var u=r.format,c=te(te({},o&&{timeZone:o}),u&&Da(a,t,u,s)),d=ln(r,Gu,c);return t==="time"&&!d.hour&&!d.minute&&!d.second&&!d.timeStyle&&!d.dateStyle&&(d=te(te({},d),{hour:"numeric",minute:"numeric"})),n(i,d)}function Uf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Wr(e,"date",t,s).format(o)}catch(u){e.onError(new Et("Error formatting date.",e.locale,u))}return String(o)}function Hf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Wr(e,"time",t,s).format(o)}catch(u){e.onError(new Et("Error formatting time.",e.locale,u))}return String(o)}function jf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=n[2],o=s===void 0?{}:s,u=e.timeZone,c=e.locale,d=e.onError,f=ln(o,Gu,u?{timeZone:u}:{});try{return t(c,f).formatRange(i,a)}catch(m){d(new Et("Error formatting date time range.",e.locale,m))}return String(i)}function zf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Wr(e,"date",t,s).formatToParts(o)}catch(u){e.onError(new Et("Error formatting date.",e.locale,u))}return[]}function $f(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Wr(e,"time",t,s).formatToParts(o)}catch(u){e.onError(new Et("Error formatting time.",e.locale,u))}return[]}var Vf=["style","type","fallback","languageDisplay"];function Wf(e,t,n,r){var i=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new Gt(`Intl.DisplayNames is not available in this environment.
|
|
27
27
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
28
|
-
`,
|
|
28
|
+
`,Nt.MISSING_INTL_API));var o=ln(r,Vf);try{return t(i,o).of(n)}catch(u){a(new Et("Error formatting display name.",i,u))}}var Gf=["type","style"],Bs=Date.now();function Yf(e){return"".concat(Bs,"_").concat(e,"_").concat(Bs)}function qf(e,t,n,r){r===void 0&&(r={});var i=Yu(e,t,n,r).reduce(function(a,s){var o=s.value;return typeof o!="string"?a.push(o):typeof a[a.length-1]=="string"?a[a.length-1]+=o:a.push(o),a},[]);return i.length===1?i[0]:i.length===0?"":i}function Yu(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||a(new Gt(`Intl.ListFormat is not available in this environment.
|
|
29
29
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
30
|
-
`,
|
|
30
|
+
`,Nt.MISSING_INTL_API));var o=ln(r,Gf);try{var u={},c=n.map(function(d,f){if(typeof d=="object"){var m=Yf(f);return u[m]=d,m}return String(d)});return t(i,o).formatToParts(c).map(function(d){return d.type==="literal"?d:te(te({},d),{value:u[d.value]||d.value})})}catch(d){a(new Et("Error formatting list.",i,d))}return n}var Xf=["type"];function Qf(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={}),Intl.PluralRules||a(new Gt(`Intl.PluralRules is not available in this environment.
|
|
31
31
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
32
|
-
`,
|
|
32
|
+
`,Nt.MISSING_INTL_API));var s=ln(r,Xf);try{return t(i,s).select(n)}catch(o){a(new Et("Error formatting plural.",i,o))}return"other"}var Kf=["numeric","style"];function Jf(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=!!s&&Da(i,"relative",s,a)||{},u=ln(n,Kf,o);return t(r,u)}function Zf(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var a=Intl.RelativeTimeFormat;a||e.onError(new Gt(`Intl.RelativeTimeFormat is not available in this environment.
|
|
33
33
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
34
|
-
`,
|
|
34
|
+
`,Nt.MISSING_INTL_API));try{return Jf(e,t,i).format(n,r)}catch(s){e.onError(new Et("Error formatting relative time.",e.locale,s))}return String(n)}var eh=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function qu(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=s&&Da(i,"number",s,a)||{},u=ln(n,eh,o);return t(r,u)}function th(e,t,n,r){r===void 0&&(r={});try{return qu(e,t,r).format(n)}catch(i){e.onError(new Et("Error formatting number.",e.locale,i))}return String(n)}function nh(e,t,n,r){r===void 0&&(r={});try{return qu(e,t,r).formatToParts(n)}catch(i){e.onError(new Et("Error formatting number.",e.locale,i))}return[]}function rh(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function ih(e){e.onWarn&&e.defaultRichTextElements&&rh(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
35
35
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
36
|
-
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function Of(e,t){var n=df(t),r=te(te({},Su),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new gs('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new gs('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new of('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),Rf(r),te(te({},r),{formatters:n,formatNumber:vf.bind(null,r,n.getNumberFormat),formatNumberToParts:kf.bind(null,r,n.getNumberFormat),formatRelativeTime:wf.bind(null,r,n.getRelativeTimeFormat),formatDate:ff.bind(null,r,n.getDateTimeFormat),formatDateToParts:mf.bind(null,r,n.getDateTimeFormat),formatTime:hf.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:pf.bind(null,r,n.getDateTimeFormat),formatTimeToParts:gf.bind(null,r,n.getDateTimeFormat),formatPlural:_f.bind(null,r,n.getPluralRules),formatMessage:$i.bind(null,r,n),$t:$i.bind(null,r,n),formatList:xf.bind(null,r,n.getListFormat),formatListToParts:Au.bind(null,r,n.getListFormat),formatDisplayName:Ef.bind(null,r,n.getDisplayNames)})}function Iu(e){ru(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var vu=te(te({},Su),{textComponent:We.Fragment});function Lf(e){return function(t){return e(We.Children.toArray(t))}}function Df(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var a=0;a<i;a++){var s=n[a];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var Ta=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=We.createContext(null)):We.createContext(null);Ta.Consumer;var Pf=Ta.Provider,Mf=Pf,Bf=Ta;function on(){var e=We.useContext(Bf);return Iu(e),e}var Yi;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Yi||(Yi={}));var Gi;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Gi||(Gi={}));function ku(e){var t=function(n){var r=on(),i=n.value,a=n.children,s=Lr(n,["value","children"]),o=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?r.formatDateToParts(o,s):r.formatTimeToParts(o,s);return a(u)};return t.displayName=Gi[e],t}function Wn(e){var t=function(n){var r=on(),i=n.value,a=n.children,s=Lr(n,["value","children"]),o=r[e](i,s);if(typeof a=="function")return a(o);var u=r.textComponent||We.Fragment;return We.createElement(u,null,o)};return t.displayName=Yi[e],t}function Nu(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=yu(r)?Lf(r):r,t},{})}var ys=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=Nu(r),o=$i.apply(void 0,It([e,t,n,s],i,!1));return Array.isArray(o)?We.Children.toArray(o):o},xs=function(e,t){var n=e.defaultRichTextElements,r=Lr(e,["defaultRichTextElements"]),i=Nu(n),a=Of(te(te(te({},vu),r),{defaultRichTextElements:i}),t),s={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i};return te(te({},a),{formatMessage:ys.bind(null,s,a.formatters),$t:ys.bind(null,s,a.formatters)})};function ri(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}var Ff=(function(e){mt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=_u(),n.state={cache:n.cache,intl:xs(ri(n.props),n.cache),prevConfig:ri(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,a=r.cache,s=ri(n);return Df(i,s)?null:{intl:xs(s,a),prevConfig:s}},t.prototype.render=function(){return Iu(this.state.intl),We.createElement(Mf,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=vu,t})(We.PureComponent);Wn("formatDate");Wn("formatTime");Wn("formatNumber");Wn("formatList");Wn("formatDisplayName");ku("formatDate");ku("formatTime");const Hf={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Discussion limit reached","chatbot.DiscussionLimitReached.explaination":"The discussion has reached its maximum number of messages. Please start a new one.","chatbot.DiscussionLimitReached.cta":"Restart","chatbot.error.api.409":"Oups ! The discussion if full. Please start a new one.","chatbot.error.api.429":"⏳ The chatbot is a little busy at the time. Please try again later.","chatbot.error.api.500":"Oops ! There has been an error. Please try again later.","chatbot.chatline.label.user":"You","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Customer support","chatbot.chatline.loading.function.genericSearchMessage":"Thinking ...","chatbot.chatline.loading.function.search":"Search","chatbot.chatline.loading.function.extractProductName":"Looking into the cavern","chatbot.chatline.loading.function.suggestProductName":"Consulting the shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Looking for ziboublis","chatbot.chatline.loading.function.searchStock":"Searching Stock","chatbot.chatline.loading.function.step":"Step","chatbot.chatline.loading.stepName.search":"Searching ...","chatbot.chatline.loading.stepName.building":"Building Query ...","chatbot.chatline.loading.stepName.analyzing":"Analyzing ...","chatbot.chatline.loading.stepName.redacting":"Writing answer","chatbot.chatline.loading.cancel":"Cancel","chatbot.chatline.seeRecentMessages":"see recent messages","chatbot.widget.menu.open":"Open chat menu","chatbot.widget.menu.startNewDiscussion":"Start a new discussion","chatbot.widget.close":"Close chat","recordingOverlay.recording":"Recording...","recordingOverlay.cancel":"Cancel","recordingOverlay.explaination":"Tap the mic to stop","chatbot.infobanner.title":"You have an archived discussion.","chatbot.infobanner.cta":"See","chatbot.customerSupport.connecting":"Transferring your request to customer support...","chatbot.customerSupport.connected":"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.","chatbot.customerSupport.connectionError":"Customer support is not available right now. Please try again later.","chatbot.customerSupport.providerUnavailable":"Customer support received your request, but live replies are temporarily unavailable. Please try again shortly.","chatbot.customerSupport.closed":"Your customer support conversation is now complete. Start a new conversation if you need more help!","chatbot.customerSupport.restart":"Restart","chatbot.customerSupport.fallback.title":"Leave your contact details","chatbot.customerSupport.fallback.description":"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Phone","chatbot.customerSupport.fallback.submit":"Send","chatbot.customerSupport.fallback.submitting":"Sending...","chatbot.customerSupport.fallback.success":"Your contact details have been saved. Customer support will contact you soon.","chatbot.customerSupport.closedHours.title":"Customer support is currently closed","chatbot.customerSupport.closedHours.description":"Leave your email, phone number and request. Customer support will contact you during opening hours.","chatbot.customerSupport.closedHours.schedulePrefix":"Today:","chatbot.customerSupport.closedHours.reason":"Reason for your request","chatbot.customerSupport.closedHours.success":"Your request has been saved. Customer support will contact you during opening hours.","chatbot.customerSupport.fallback.error":"We could not save your contact details. Please try again."},Uf={"generic.language.english":"Anglais","generic.language.french":"Français","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Maximum de messages envoyés atteint.","chatbot.DiscussionLimitReached.explaination":"Le robot est à son maximum et ne peut plus envoyer de message. Merci de relancer une conversation.","chatbot.DiscussionLimitReached.cta":"Relancer une nouvelle conversation","chatbot.error.api.409":"Oups ! La discussion est à son maximum. Merci d'en commencer une nouvelle.","chatbot.error.api.429":"⏳ Le robot est un peu occupé actuellement. Merci de réessayer plus tard.","chatbot.error.api.500":"Oups ! Une erreur est survenue. Merci de réessayer plus tard !","chatbot.chatline.label.user":"Vous","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Support client","chatbot.chatline.loading.function.search":"Recherche","chatbot.chatline.loading.function.genericSearchMessage":"Je réfléchis ...","chatbot.chatline.loading.function.extractProductName":"Recherche dans la caverne","chatbot.chatline.loading.function.suggestProductName":"Consultation des shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Recherche des ziboublis","chatbot.chatline.loading.function.searchStock":"Recherche en stock","chatbot.chatline.loading.function.step":"Etape","chatbot.chatline.loading.stepName.search":"Recherche ...","chatbot.chatline.loading.stepName.building":"Construction ...","chatbot.chatline.loading.stepName.analyzing":"Analyse ...","chatbot.chatline.loading.stepName.redacting":"Rédaction","chatbot.chatline.loading.cancel":"Annuler","chatbot.chatline.seeRecentMessages":"voir les messages plus récents","chatbot.widget.menu.open":"Ouvrir le menu de discussion","chatbot.widget.menu.startNewDiscussion":"Démarrer une nouvelle discussion","chatbot.widget.close":"Fermer la discussion","recordingOverlay.recording":"Micro activé...","recordingOverlay.cancel":"Annuler","recordingOverlay.explaination":"Appuyez sur le micro pour arrêter","chatbot.infobanner.title":"Vous avez une conversation archivée.","chatbot.infobanner.cta":"Voir","chatbot.customerSupport.connecting":"Transfert de votre demande au support client...","chatbot.customerSupport.connected":"Votre demande a été transmise au support client. Il faut généralement quelques minutes pour obtenir une réponse. Merci de patienter.","chatbot.customerSupport.connectionError":"Le support client n'est pas disponible pour le moment. Merci de réessayer plus tard.","chatbot.customerSupport.providerUnavailable":"Le support client a reçu votre demande, mais les réponses en direct sont temporairement indisponibles. Merci de réessayer dans quelques instants.","chatbot.customerSupport.closed":"Votre échange avec le support client est terminé. Relancez une nouvelle conversation quand vous le souhaitez !","chatbot.customerSupport.restart":"Relancer","chatbot.customerSupport.fallback.title":"Laissez vos coordonnées","chatbot.customerSupport.fallback.description":"Le support client n'a pas encore répondu. Laissez votre email et votre téléphone, nous vous recontacterons prochainement.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Téléphone","chatbot.customerSupport.fallback.submit":"Envoyer","chatbot.customerSupport.fallback.submitting":"Envoi...","chatbot.customerSupport.fallback.success":"Vos coordonnées ont bien été notées. Le support client vous recontactera prochainement.","chatbot.customerSupport.closedHours.title":"Le support client est actuellement fermé","chatbot.customerSupport.closedHours.description":"Laissez votre email, votre téléphone et le motif de votre demande. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.closedHours.schedulePrefix":"Aujourd’hui :","chatbot.customerSupport.closedHours.reason":"Motif de votre demande","chatbot.customerSupport.closedHours.success":"Votre demande a bien été enregistrée. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.fallback.error":"Impossible d'enregistrer vos coordonnées. Merci de réessayer."};var dt=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(dt||{});const Pr={[dt.ENGLISH]:{translatedText:Hf,pictureName:dt.ENGLISH,langID:0,locale:dt.ENGLISH},[dt.FRENCH]:{translatedText:Uf,pictureName:dt.FRENCH,langID:1,locale:dt.FRENCH}},jf=Object.keys(Pr);jf.reduce((e,t)=>{const n=Pr[t];return[...e,n]},[]);const zf="languageSettings",$f=(e,t)=>{let n,r;return typeof window<"u"&&(r=window.localStorage.getItem(zf)),r&&e?.[r]!==void 0?n=e[r]:(n=e[t],n.isDefault=!0),n},Yf=(e,t)=>{const[n,r]=S.useState(e[t]),i=a=>{Object.keys(e).includes(a?.locale)?r(a):r(e[dt.ENGLISH])};return S.useEffect(()=>{const a=$f(e,t);a.locale!==t&&r(e[a.locale])},[]),{appCurrentLang:n,handleSetContextCurrentLang:i}},Ru=S.createContext({appCurrentLang:Pr[dt.ENGLISH],setAppCurrentLang:()=>{}}),yt={ai:"ai",customerSupport:"customer_support"},Ou=S.createContext({currentConversation:{items:[],discussionId:null},setCurrentConversation:()=>{},archivedConversation:{items:[],discussionId:null},setArchivedConversation:()=>{},chatboxBootState:{mode:yt.ai,customerSupportState:null,reason:"context_default"},setChatboxBootState:()=>{},resetConversationRequestId:0,resetConversation:()=>{}});var ii={},Ss;function Gf(){return Ss||(Ss=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatCustomerSupportProviderText=e.IDENTITY_GATE_VERSION_HEADER=e.IDENTITY_GATE_REQUIRED_EVENT=e.IDENTITY_GATE_PROTOCOL_VERSION=e.IDENTITY_GATE_PROTOCOL_V2=e.IDENTITY_GATE_PROTOCOL_V1=e.OutputStreamTypesEnum=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE=e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=e.readOptionalNullableString=e.readOptionalString=e.readOptionalNullableNumber=e.readOptionalNumber=e.isUnknownRecord=e.INTERACTIVE_WIDGET_TYPES=e.INTERACTIVE_WIDGET_EVENTS=e.AgentDisplayFacetRoleType=e.AgentDisplayFacetModeType=void 0;var t;(function(h){h.SPRITESHEET="spritesheet",h.LOTTIE="lottie",h.IMAGE="image",h.SVG="svg",h.VIDEO="video"})(t||(e.AgentDisplayFacetModeType=t={}));var n;(function(h){h.LAUNCHER="launcher",h.ASSISTANT="assistant",h.SEARCH="search"})(n||(e.AgentDisplayFacetRoleType=n={})),e.INTERACTIVE_WIDGET_EVENTS={requested:"interactiveWidget.requested"},e.INTERACTIVE_WIDGET_TYPES={directChatCustomerSupport:"direct_chat_customer_support"};const r=h=>typeof h=="object"&&h!==null&&!Array.isArray(h);e.isUnknownRecord=r;const i=h=>typeof h=="number"&&Number.isFinite(h)?h:void 0;e.readOptionalNumber=i;const a=h=>h===null?null:(0,e.readOptionalNumber)(h);e.readOptionalNullableNumber=a;const s=h=>typeof h=="string"?h:void 0;e.readOptionalString=s;const o=h=>h===null?null:(0,e.readOptionalString)(h);e.readOptionalNullableString=o,e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=5,e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE="Europe/Paris",e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=[{dayOfWeek:1,key:"monday",defaultLabel:"Monday"},{dayOfWeek:2,key:"tuesday",defaultLabel:"Tuesday"},{dayOfWeek:3,key:"wednesday",defaultLabel:"Wednesday"},{dayOfWeek:4,key:"thursday",defaultLabel:"Thursday"},{dayOfWeek:5,key:"friday",defaultLabel:"Friday"},{dayOfWeek:6,key:"saturday",defaultLabel:"Saturday"},{dayOfWeek:7,key:"sunday",defaultLabel:"Sunday"}],e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=[1,2,3,4,5];var u;(function(h){h.OUTPUT_STREAM_MESSAGE_START="message_start",h.OUTPUT_STREAM_MESSAGE_DELTA="message_delta",h.OUTPUT_STREAM_MESSAGE_END="message_end",h.OUTPUT_STREAM_CLIENT_EVENT="client_event",h.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE="number_of_steps",h.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE="current_step_number",h.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE="current_step_name",h.OUTPUT_STREAM_ERROR="error"})(u||(e.OutputStreamTypesEnum=u={})),e.IDENTITY_GATE_PROTOCOL_V1=1,e.IDENTITY_GATE_PROTOCOL_V2=2,e.IDENTITY_GATE_PROTOCOL_VERSION=e.IDENTITY_GATE_PROTOCOL_V1,e.IDENTITY_GATE_REQUIRED_EVENT="identity.required",e.IDENTITY_GATE_VERSION_HEADER="X-ChatSystem-Identity-Gate-Version";const c={"+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",clap:"👏",wave:"👋",raised_hands:"🙌",pray:"🙏",muscle:"💪",ok_hand:"👌",point_up:"☝️",point_down:"👇",point_left:"👈",point_right:"👉",eyes:"👀",brain:"🧠",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",broken_heart:"💔",fire:"🔥",tada:"🎉",sparkles:"✨",star:"⭐",white_check_mark:"✅",heavy_check_mark:"✔️",x:"❌",warning:"⚠️",information_source:"ℹ️",question:"❓",exclamation:"❗",bulb:"💡",memo:"📝",pushpin:"📌",paperclip:"📎",link:"🔗",lock:"🔒",unlock:"🔓",bell:"🔔",phone:"☎️",email:"✉️",incoming_envelope:"📨",package:"📦",truck:"🚚",moneybag:"💰",credit_card:"💳",gift:"🎁",shopping_bags:"🛍️",clock3:"🕒",hourglass_flowing_sand:"⏳",rocket:"🚀",smile:"😄",smiley:"😃",grinning:"😀",slightly_smiling_face:"🙂",wink:"😉",blush:"😊",relaxed:"☺️",heart_eyes:"😍",thinking_face:"🤔",neutral_face:"😐",confused:"😕",worried:"😟",cry:"😢",sob:"😭",sweat_smile:"😅",joy:"😂",rofl:"🤣",upside_down_face:"🙃",sunglasses:"😎",tada_face:"🥳",angry:"😠",rage:"😡",face_with_symbols_on_mouth:"🤬",scream:"😱",zipper_mouth_face:"🤐",skin_tone_2:"🏻",skin_tone_3:"🏼",skin_tone_4:"🏽",skin_tone_5:"🏾",skin_tone_6:"🏿"},d=h=>h.replace(/-/g,"_"),f=h=>h.replace(/:([a-zA-Z0-9_+\-]+):/g,(b,E)=>c[d(E)]??b),p=({text:h,provider:b})=>b==="slack"?f(h):h;e.formatCustomerSupportProviderText=p})(ii)),ii}var ee=Gf();const ai=e=>({mode:ee.AgentDisplayFacetModeType.SVG,role:e}),Vf=()=>({branding:{poweredByChatSystemVisible:!0},interactiveWidgets:{available:[{widgetType:ee.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport,enabled:!0}]},agent:{display:{name:"",CSSRules:"",[ee.AgentDisplayFacetRoleType.LAUNCHER]:ai(ee.AgentDisplayFacetRoleType.LAUNCHER),[ee.AgentDisplayFacetRoleType.ASSISTANT]:ai(ee.AgentDisplayFacetRoleType.ASSISTANT),[ee.AgentDisplayFacetRoleType.SEARCH]:ai(ee.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:"",conversationStarters:[]},customNameToDisplay:"",isAudioAllowed:!0},api:{settings:{maxUserMessagesPerDiscussion:20},tracking:{queryParamToAppend:""}}}),Nt=S.createContext({companySettings:Vf(),setCompanySettings:()=>{}}),ya=()=>{const e=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:3080"),t=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:5173");return e||t};class Lu{enabled;constructor({isLocalDev:t,shouldDisplayLogs:n}){this.enabled=t||n}log(...t){this.enabled&&console.log(...t)}warn(...t){this.enabled&&console.warn(...t)}error(...t){this.enabled&&console.error(...t)}}let qf=new Lu({isLocalDev:ya(),shouldDisplayLogs:!1});const Wf=e=>new Lu({isLocalDev:ya(),shouldDisplayLogs:!!e}),Mt=()=>qf,Xf=e=>Object.values(dt).includes(e),Qf=(e,t)=>{const n=t??Mt();return Xf(e)?e:(n.warn(`Language ${e} not handled for now. Using ${dt.ENGLISH}.`),dt.ENGLISH)},Kf=e=>{const t=new URL(e);if(t.username||t.password)throw new Error("CHAT_SYSTEM_API_URL_MUST_NOT_CONTAIN_CREDENTIALS");const n=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol!=="https:"&&!(t.protocol==="http:"&&n))throw new Error("CHAT_SYSTEM_API_URL_MUST_USE_HTTPS");if(t.search||t.hash)throw new Error("CHAT_SYSTEM_API_URL_MUST_NOT_CONTAIN_QUERY_OR_HASH");const r=t.pathname.replace(/\/+$/,"");return`${t.origin}${r}`};class nn{constructor(){}static getApiUrl=t=>t!==void 0?Kf(t):ya()?"http://localhost:3001":"https://www.api.chatsystem.ai";static getHeaders=({contentType:t="text/plain"})=>({"Content-Type":t});static getFetchConfig=({contentType:t="text/plain",httpVerb:n="GET",body:r,options:i={}})=>{const a={method:n,headers:this.getHeaders({contentType:t}),...i};return r&&(a.body=JSON.stringify(r)),a}}const Du=S.createContext(null);function Jf({apiUrl:e,children:t}){const n=S.useMemo(()=>nn.getApiUrl(e),[e]);return x.jsx(Du.Provider,{value:n,children:t})}function Mr(){return S.useContext(Du)??nn.getApiUrl()}const xa="chatsystem-widget",Zf=1440*60*1e3;function sr(e){return typeof e=="string"&&!Number.isNaN(Date.parse(e))}function eh(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.timeoutMinutes!="number"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean")}function th(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean"||typeof e.requireReason!="boolean")}function nh(e){if(typeof e!="object"||e===null||typeof e.discussionId!="number"||typeof e.reconnectToken!="string"||!sr(e.startedAt)||!sr(e.updatedAt)||e.reconnectTokenExpiresAt!==void 0&&!sr(e.reconnectTokenExpiresAt)||e.closedAt!==void 0&&!sr(e.closedAt)||e.closedReason!==void 0&&typeof e.closedReason!="string")return!1;const t=e.mode??"live_chat";return t==="closed_hours_contact_capture"?!(!["active","closed"].includes(e.status)||typeof e.customerSupportSessionId!="number"||!th(e.closedHoursContactCapture)||typeof e.businessHours!="object"||e.businessHours===null||typeof e.businessHours.timezone!="string"||e.businessHours.todayScheduleLabel!==void 0&&typeof e.businessHours.todayScheduleLabel!="string"):!(t!=="live_chat"||!["connecting","active","closed"].includes(e.status)||typeof e.socketUrl!="string"||e.customerSupportSessionId!==void 0&&typeof e.customerSupportSessionId!="number"||e.isWaitingForFirstProviderReply!==void 0&&typeof e.isWaitingForFirstProviderReply!="boolean"||e.fallbackContactCapture!==void 0&&!eh(e.fallbackContactCapture))}function rh(e){return!(typeof e!="object"||e===null||e.userType!=="user"&&e.userType!=="assistant"||"content"in e&&e.content!==void 0&&typeof e.content!="string"||"metaData"in e&&e.metaData!==void 0&&(typeof e.metaData!="object"||e.metaData===null||"isErrorMessage"in e.metaData&&e.metaData.isErrorMessage!==void 0&&typeof e.metaData.isErrorMessage!="boolean"||"messageKind"in e.metaData&&e.metaData.messageKind!==void 0&&!["conversation","system"].includes(e.metaData.messageKind)||"systemEvent"in e.metaData&&e.metaData.systemEvent!==void 0&&!["customer_support_connecting","customer_support_connected","customer_support_closed","customer_support_connection_error"].includes(e.metaData.systemEvent)||"customerSupportAuthorName"in e.metaData&&e.metaData.customerSupportAuthorName!==void 0&&typeof e.metaData.customerSupportAuthorName!="string"))}function ih(e){return!(typeof e!="object"||e===null||!Array.isArray(e.items)||!e.items.every(rh)||e.discussionId!==null&&typeof e.discussionId!="number"||typeof e.updatedAt!="string"||Number.isNaN(Date.parse(e.updatedAt))||e.customerSupport!==void 0&&e.customerSupport!==null&&!nh(e.customerSupport))}function ah(e){const t=Mt();if(typeof window>"u")return;const n=e.key??xa,r={items:e.conversation.items,discussionId:e.conversation.discussionId,updatedAt:new Date().toISOString(),customerSupport:e.customerSupport??null};try{const i=JSON.stringify(r);window.localStorage.setItem(n,i)}catch(i){t.error("Failed to save chat state to localStorage",i)}}function Pu(e){const t=Mt();if(typeof window>"u")return null;const n=e?.key??xa,r=window.localStorage.getItem(n);if(!r)return null;try{const i=JSON.parse(r);return ih(i)?i:(t.warn("Chat state in localStorage has unexpected shape, ignoring."),null)}catch(i){return t.error("Failed to parse chat state from localStorage",i),null}}function sh(e){if(typeof window>"u")return null;const t=e??xa;window.localStorage.removeItem(t)}function oh(e,t=Date.now()){return t-e}function uh(e,t=Date.now()){return oh(new Date(e).getTime(),t)<=Zf}function lh({settings:e,setCurrentConversation:t,setArchivedConversation:n,restoreStoredConversation:r=!0,storageKey:i}){const a=r?Pu({key:i}):null;if(!a){t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]});return}uh(a.updatedAt)?t({discussionId:a.discussionId,items:a.items,updatedAt:a.updatedAt}):(t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]}),n({discussionId:a.discussionId,items:a.items,updatedAt:a.updatedAt}))}const Mu=S.createContext(Mt()),Xn=()=>S.useContext(Mu),Bu=(e,t)=>{if(t===null)return"discussion_not_loaded";if(t!==e.discussionId)return"discussion_mismatch";if(e.status==="closed")return"session_closed";if(!e.reconnectToken)return"missing_reconnect_token";if(e.mode==="closed_hours_contact_capture")return null;if(!e.socketUrl)return"missing_socket_url";if(e.reconnectTokenExpiresAt){const n=Date.parse(e.reconnectTokenExpiresAt);if(Number.isNaN(n))return"invalid_reconnect_expiration";if(n<=Date.now())return"expired_reconnect_token"}return null},ch=e=>{const t=Pu({key:e}),n=t?.customerSupport??null;if(!n)return{mode:yt.ai,customerSupportState:null,reason:"no_customer_support_state"};const r=Bu(n,t?.discussionId??null);return r==="session_closed"?{mode:yt.customerSupport,customerSupportState:n,reason:r}:r?{mode:yt.ai,customerSupportState:null,reason:r}:{mode:yt.customerSupport,customerSupportState:n,reason:"valid_reconnect_state"}},dh=async e=>{const t={apiUrl:e.apiUrl,appToken:e.appToken,agentId:e.agentId};return e.runtimeAdapter?e.runtimeAdapter.loadCompanySettings(t):e.loadStandardSettings(t)},fh=async e=>{const t=nn.getFetchConfig({httpVerb:"GET",contentType:"application/json"}),n=`${e.apiUrl}/company/settings/${e.appToken}/${e.agentId}`;return await(await fetch(n,{...t,credentials:"omit"})).json()},hh="chatsystem-widget",Sa=e=>{const t=e.agentId??"default";return`${encodeURIComponent(e.appToken)}:${t}`},Fu=e=>`${hh}:${Sa(e)}`,ph=({agentId:e,appToken:t,onFetched:n,runtimeAdapter:r})=>{const i=Xn(),a=Mr(),s=S.useMemo(()=>Fu({appToken:t,agentId:e}),[t,e]),[o,u]=S.useState({}),c={companySettings:o,setCompanySettings:u},[d,f]=S.useState({discussionId:null,items:[],updatedAt:null}),[p,h]=S.useState({discussionId:null,items:[],updatedAt:null}),[b,E]=S.useState(()=>r?{mode:yt.ai,customerSupportState:null,reason:"runtime_adapter_uses_fresh_conversation"}:ch(s)),[v,C]=S.useState(0),N={currentConversation:d,setCurrentConversation:f,archivedConversation:p,setArchivedConversation:h,chatboxBootState:b,setChatboxBootState:E,resetConversationRequestId:v,resetConversation:()=>{r||sh(s),E({mode:yt.ai,customerSupportState:null,reason:"manual_start_new_conversation"}),f({discussionId:null,items:[{userType:"assistant",content:o?.agent?.text?.initialText,temporaryId:crypto.randomUUID()}],updatedAt:null}),C(L=>L+1)}};return S.useEffect(()=>{dh({apiUrl:a,appToken:t,agentId:e,runtimeAdapter:r,loadStandardSettings:fh}).then(L=>{u(L),lh({settings:L,setCurrentConversation:f,setArchivedConversation:h,restoreStoredConversation:!r,storageKey:s}),n?.()}).catch(L=>{i.warn("error in settings fetch",L)})},[t,e,a,s,i,n,r]),{contextCompanySettings:c,contextInitialConversationState:N}};async function mh(e,t=URL.createObjectURL){if(!e.ok)throw new Error(`IMAGE_PRELOAD_FAILED_HTTP_${e.status}`);const n=await e.blob();return t(n)}const yn=globalThis;yn.__WIDGET_ASSET_CACHE__||(yn.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});yn.__WIDGET_PRELOAD_KEYS__||(yn.__WIDGET_PRELOAD_KEYS__=new Set);const si=yn.__WIDGET_PRELOAD_KEYS__,zt=yn.__WIDGET_ASSET_CACHE__,gh="widget-assets-v1";async function Br(e,t){const n=Mt();try{const r=await caches.open(gh),i=await r.match(e,{ignoreSearch:!1});if(i)return i.clone();const a=await fetch(e,{cache:"force-cache",mode:"cors",keepalive:!0,...t});if(!a.ok)throw new Error(`HTTP ${a.status} for ${e}`);return r.put(e,a.clone()),a}catch(r){return n.warn("error while fetching",r),new Response(null,{status:520,statusText:"Error in client - Fetch failed"})}}async function Hu(e){const t=zt.svg.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(i,"image/svg+xml"),o=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(o,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:i}})();return zt.svg.set(e,{promise:n,ts:Date.now()}),n}function Uu(e){const t=zt.img.get(e);if(t)return t.promise;const n=(async()=>{const r=await Br(e);return{blobUrl:await mh(r)}})();return zt.img.set(e,{promise:n,ts:Date.now()}),n}function ju(e){const t=zt.lot.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).arrayBuffer(),a=new Uint8Array(i);if(a.length>=4&&a[0]===80&&a[1]===75&&a[2]===3&&a[3]===4||e.endsWith(".lottie"))return{kind:"zip",blobUrl:URL.createObjectURL(new Blob([i],{type:"application/zip"}))};const o=new TextDecoder().decode(a);return{kind:"json",data:JSON.parse(o)}})();return zt.lot.set(e,{promise:n,ts:Date.now()}),n}function zu(e){const t=zt.spr.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).blob();let a=null;try{a=await createImageBitmap(i)}catch{a=null}const{imgEl:s,width:o,height:u}=await new Promise((c,d)=>{const f=URL.createObjectURL(i),p=new Image;p.crossOrigin="anonymous",p.onload=()=>{const h=p.naturalWidth,b=p.naturalHeight;c({imgEl:p,width:h,height:b})},p.onerror=()=>{URL.revokeObjectURL(f),d(new Error("Spritesheet image decode failed"))},p.src=f,p.decode?.().catch(()=>{})});return{imgEl:s,bitmap:a,width:o,height:u}})();return zt.spr.set(e,{promise:n,ts:Date.now()}),n}function bh(e){e.images?.forEach(t=>void Uu(t)),e.svgs?.forEach(t=>void Hu(t)),e.lotties?.forEach(t=>void ju(t)),e.sprites?.forEach(t=>void zu(t))}function Eh(e){const t=Mt();try{const n=document.createElement("link");n.rel="preconnect",n.href=e,n.crossOrigin="anonymous",document.head.appendChild(n);const r=document.createElement("link");r.rel="dns-prefetch",r.href=e,document.head.appendChild(r)}catch(n){t.warn("error in injectPreconnect",n)}}function $u(e){return new URL(e,document.baseURI).toString()}function Th(e,t){const n=document.head.querySelectorAll('link[rel="preload"]');for(const r of n)if((e?r.as===e||r.getAttribute("as")===e:!0)&&r.href===t)return!0;return!1}function or(e,t,n,r){const i=$u(n),a=`${e}|${t??""}|${i}`;if(si.has(a))return;if(Th(t,i)){si.add(a);return}const s=document.createElement("link");s.rel=e,t&&(s.as=t),s.href=i,s.crossOrigin="anonymous",r&&(s.type=r),s.setAttribute("data-chatsystem-preload","1"),document.head.appendChild(s),si.add(a)}function yh(e){const t=s=>Array.from(new Set((s??[]).map($u))),n=t(e.images),r=t(e.svgs),i=t(e.lotties),a=t(e.sprites);n.forEach(s=>or("preload","image",s)),r.forEach(s=>or("preload","fetch",s,"image/svg+xml")),i.forEach(s=>or("preload","fetch",s,"application/zip")),a.forEach(s=>or("preload","fetch",s))}function xh(e,t){const{manifest:n,origins:r}=Sh(e,t);r.forEach(Eh),yh(n),bh(n)}function Sh(e,t){const n=t??Mt(),r=_h(e),i=new Set,a=new Set,s=new Set,o=new Set;for(const{url:d,mode:f}of r)switch(Ch(f,d,n)){case"svg":a.add(d);break;case"lottie":s.add(d);break;case"spritesheet":o.add(d);break;case"image":i.add(d);break}const u={images:Array.from(i),svgs:Array.from(a),lotties:Array.from(s),sprites:Array.from(o)},c=Ah(u,n);return{manifest:u,origins:c}}function _h(e){if(!e?.agent?.display)return[];const t=e.agent.display,n=[t.launcher,t.assistant,t.search].filter(Boolean),r=[];for(const i of n)i?.assetUrl&&r.push({url:i.assetUrl,mode:i.mode});return r}function Ch(e,t,n){if(e)switch(e){case"svg":return"svg";case"lottie":return"lottie";case"spritesheet":return"spritesheet";case"image":return"image";case"video":return"video"}try{const i=new URL(t,document.baseURI).pathname.toLowerCase();if(i.endsWith(".svg"))return"svg";if(i.endsWith(".lottie")||i.endsWith(".zip")||i.endsWith(".json"))return i.endsWith(".json"),"lottie";if(/\.(png|webp|jpg|jpeg|gif|avi,ef)$/.test(i))return"image";if(/\.(mp4|webm|mov|m4v|ogg)$/.test(i))return"video"}catch(r){n.warn("error in normalizeKind:",r)}return"unknown"}function Ah(e,t){const n=new Set,r=i=>{if(i)try{const a=new URL(i,document.baseURI);n.add(`${a.protocol}//${a.host}`)}catch(a){t.warn("error in uniqueOriginsFromManifest",a)}};return(e.images??[]).forEach(r),(e.svgs??[]).forEach(r),(e.lotties??[]).forEach(r),(e.sprites??[]).forEach(r),Array.from(n)}const Yu=S.createContext(void 0),Gu=S.createContext(void 0),wh=()=>S.useContext(Gu),Fr=()=>{const e=S.useContext(Ou);if(!e)throw new Error("useChatbotConversation must be used within ChatbotInitialtextContext.Provider");const{currentConversation:t,setCurrentConversation:n,archivedConversation:r,setArchivedConversation:i,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,resetConversation:u}=e,c=L=>{n(w=>({...w,discussionId:L}))},d=L=>{n(w=>({...w,items:L}))},f=L=>{n(w=>({...w,items:[...w.items,L]}))},p=({messageStreamId:L,role:w})=>{n(k=>({...k,items:[...k.items,{userType:w,content:"",metaData:{messageStreamId:L},temporaryId:crypto.randomUUID()}]}))},h=()=>{n(L=>({...L,items:L.items.filter(w=>!(w.content?.length===0&&w.userType==="assistant"))}))},b=()=>{n(L=>{const w=[...L.items];return w.pop(),{...L,items:w}})},E=L=>{n(w=>({...w,updatedAt:L.updatedAt}))},v=()=>{i({discussionId:null,items:[],updatedAt:null})};return{currentConversation:t,setCurrentConversation:n,setCurrentConversationId:c,setCurrentConversationMetadata:E,resetConversation:u,setCurrentConversationItems:d,addMessageToCurrentConversation:f,removeEmptyAssistantMessageFromCurrentConversation:h,removeLastMessageFromCurrentConversation:b,updateCurrentConversationLastMessage:({newContent:L})=>{n(w=>{const k=[...w.items],Y=k.length-1,J=k[Y];return k[Y]={...J,content:J.content=L},{...w,items:k}})},archivedConversation:r,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,setArchivedConversationAsMain:()=>{n(r),v()},addEmptyMessageToCurrentConversation:p,updateCurrentConversationMessageById:({newContent:L,id:w})=>{n(k=>{const Y=[...k.items],J=Y.findIndex(I=>I.metaData?.messageStreamId===w),X=Y[J];return Y[J]={...X,content:X.content=L},{...k,items:Y}})}}},Ih=30,vh=e=>{try{const t=e.split(".")[1];if(!t)return null;const n=t.replace(/-/g,"+").replace(/_/g,"/"),r=n.padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return typeof i.exp=="number"?i.exp:null}catch{return null}};class kh{token=null;expiresAt=null;pendingRequest=null;pendingRequestIsInteractive=!1;generation=0;provider;constructor(t){this.provider=t}clear(){this.generation+=1,this.token=null,this.expiresAt=null,this.pendingRequest=null,this.pendingRequestIsInteractive=!1}handleIdentityChanged(){this.token=null,this.expiresAt=null,!(this.pendingRequest&&this.pendingRequestIsInteractive)&&(this.generation+=1,this.pendingRequest=null,this.pendingRequestIsInteractive=!1)}async getToken(t){if(!this.provider)return null;const n=Math.floor(Date.now()/1e3);if(this.token&&this.expiresAt!=null&&this.expiresAt-Ih>n)return this.token;if(this.pendingRequest){const a=this.pendingRequestIsInteractive,s=await this.pendingRequest;if(s||!t.interactive||a)return s}const r=this.generation;this.pendingRequestIsInteractive=t.interactive;let i;return i=this.provider.getToken(t).then(a=>{if(r!==this.generation)return null;if(!a)return this.clear(),null;const s=vh(a);return s==null||s<=Math.floor(Date.now()/1e3)?(this.clear(),null):(this.token=a,this.expiresAt=s,a)}).finally(()=>{this.pendingRequest===i&&(this.pendingRequest=null,this.pendingRequestIsInteractive=!1)}),this.pendingRequest=i,i}}const Nh=async({apiUrl:e,appToken:t,payload:n,identitySession:r,fetchImplementation:i=fetch})=>{let a=null,s;try{a=await r.getToken({interactive:!0,reason:n.reason,requiredCapabilities:n.requiredCapabilities}),a||(a=await r.getToken({interactive:!1,reason:n.reason,requiredCapabilities:n.requiredCapabilities})),s=a?{status:"success"}:{status:"cancelled"}}catch{r.clear(),s={status:"failed",code:"HOST_IDENTITY_FAILED"}}const o=await i(`${e}/ai/identity-gates/${encodeURIComponent(t)}/${encodeURIComponent(n.gateId)}/result`,{method:"POST",headers:{"Content-Type":"application/json","X-ChatSystem-Identity-Gate-Token":n.resultToken,...a?{Authorization:`Bearer ${a}`}:{}},body:JSON.stringify(s)});if(!o.ok)throw o.status===401&&a&&r.clear(),new Error(`IDENTITY_GATE_RESOLUTION_FAILED:${o.status}`)},Rh="chatsystem:pending-turn:",Oh=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,_a=e=>`${Rh}${encodeURIComponent(e)}`,Vu=(e,t=Date.now())=>{if(!e||typeof e!="object"||Array.isArray(e))return null;const n=e;if(typeof n.continuationId!="string"||!Oh.test(n.continuationId)||typeof n.expiresAt!="string"||typeof n.discussionId!="number"||!Number.isSafeInteger(n.discussionId)||n.discussionId<=0)return null;const r=Date.parse(n.expiresAt);return!Number.isFinite(r)||r<=t?null:{continuationId:n.continuationId,expiresAt:n.expiresAt,discussionId:n.discussionId}},Lh=(e,t,n,r=sessionStorage)=>{const i=Vu({...t,discussionId:n});i&&r.setItem(_a(e),JSON.stringify(i))},Dh=(e,t=sessionStorage,n=Date.now())=>{const r=_a(e),i=t.getItem(r);if(!i)return null;try{const a=Vu(JSON.parse(i),n);if(a)return a}catch{}return t.removeItem(r),null},_s=(e,t=sessionStorage)=>{t.removeItem(_a(e))},Ph=async({apiUrl:e,appToken:t,discussionId:n,continuation:r,identitySession:i,fetchImplementation:a=fetch})=>{if(!Number.isSafeInteger(n)||n<=0)return null;const s=await i.getToken({interactive:!1});if(!s)return null;const o={discussionId:n};return a(`${e}/ai/pending-turns/${encodeURIComponent(t)}/${encodeURIComponent(r.continuationId)}/resume`,{method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},body:JSON.stringify(o)})},Mh=e=>e>=200&&e<300||e>=400&&e<500&&e!==429||e===503,Bh=e=>{if(!ee.isUnknownRecord(e))return;const t=ee.readOptionalNumber(e.timeoutMinutes)??ee.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES;return{enabled:e.enabled===!0,timeoutMinutes:Math.max(1,Math.min(120,Math.round(t))),requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1}},Fh=e=>{if(ee.isUnknownRecord(e))return{enabled:e.enabled!==!1,requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1,requireReason:e.requireReason!==!1}},Hh=e=>{if(!ee.isUnknownRecord(e))return null;const t=e;if(t.type!=="interactive_widget_request"||t.event!=="interactiveWidget.requested"||t.widgetType!==ee.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport||!ee.isUnknownRecord(t.payload))return null;const n=t.payload;if((ee.readOptionalString(n.mode)??"live_chat")==="closed_hours_contact_capture"){const s=ee.readOptionalString(n.reconnectToken),o=ee.readOptionalNumber(n.customerSupportSessionId),u=Fh(n.closedHoursContactCapture);if(n.transport!=="none"||!s||!o||!u||!u.enabled)return null;const c=ee.isUnknownRecord(n.businessHours)?n.businessHours:{};return{mode:"closed_hours_contact_capture",transport:"none",reconnectToken:s,reconnectTokenExpiresAt:ee.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:o,companyId:ee.readOptionalNumber(t.companyId),agentId:ee.readOptionalNullableNumber(t.agentId),discussionId:ee.readOptionalNullableNumber(t.discussionId)??null,toolcallId:ee.readOptionalNullableString(t.toolcallId),closedHoursContactCapture:u,businessHours:{timezone:ee.readOptionalString(c.timezone)??ee.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE,todayScheduleLabel:ee.readOptionalString(c.todayScheduleLabel)}}}if(n.transport!=="socket"||typeof n.socketUrl!="string")return null;const i=ee.readOptionalString(n.handoffToken),a=ee.readOptionalString(n.reconnectToken);return!i&&!a?null:{mode:"live_chat",transport:"socket",socketUrl:n.socketUrl,handoffToken:i,reconnectToken:a,reconnectTokenExpiresAt:ee.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:ee.readOptionalNumber(n.customerSupportSessionId),companyId:ee.readOptionalNumber(t.companyId),agentId:ee.readOptionalNullableNumber(t.agentId),discussionId:ee.readOptionalNullableNumber(t.discussionId)??null,toolcallId:ee.readOptionalNullableString(t.toolcallId),fallbackContactCapture:Bh(n.fallbackContactCapture)}},Uh=e=>Hh(e),jh=/^[a-zA-Z0-9][a-zA-Z0-9:._-]*$/,zh=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,$h=e=>{if(!ee.isUnknownRecord(e)||e.protocolVersion!==ee.IDENTITY_GATE_PROTOCOL_V1&&e.protocolVersion!==ee.IDENTITY_GATE_PROTOCOL_V2||typeof e.gateId!="string"||e.gateId.length<1||e.gateId.length>100||typeof e.toolCallId!="string"||e.toolCallId.length<1||e.toolCallId.length>255||typeof e.resultToken!="string"||e.resultToken.length<32||e.resultToken.length>512||typeof e.expiresAt!="string"||!Number.isFinite(Date.parse(e.expiresAt))||e.reason!=="identity_required"&&e.reason!=="identity_expired"||!Array.isArray(e.requiredCapabilities)||e.requiredCapabilities.length<1||e.requiredCapabilities.length>50||!e.requiredCapabilities.every(n=>typeof n=="string"&&n.length<=100&&jh.test(n)))return null;const t={gateId:e.gateId,toolCallId:e.toolCallId,requiredCapabilities:[...new Set(e.requiredCapabilities)].sort(),reason:e.reason,expiresAt:e.expiresAt,resultToken:e.resultToken};return e.protocolVersion===ee.IDENTITY_GATE_PROTOCOL_V1?{protocolVersion:ee.IDENTITY_GATE_PROTOCOL_V1,...t}:!ee.isUnknownRecord(e.continuation)||typeof e.continuation.continuationId!="string"||!zh.test(e.continuation.continuationId)||typeof e.continuation.expiresAt!="string"||!Number.isFinite(Date.parse(e.continuation.expiresAt))?null:{protocolVersion:ee.IDENTITY_GATE_PROTOCOL_V2,...t,continuation:{continuationId:e.continuation.continuationId,expiresAt:e.continuation.expiresAt}}},Yh=e=>{if(e.event===ee.IDENTITY_GATE_REQUIRED_EVENT){const n=$h(e.payload);if(n)return{type:"identity_gate_required",payload:n}}const t=Uh(e.payload);return t?{type:"customer_support_handoff_requested",payload:t}:{type:"unhandled_client_event",event:e}};class Dt{pending="";logger;constructor(t=console){this.logger=t}transformNDJSONChunkIntoObjects(t){this.pending+=t;const n=this.pending.split(/\r?\n/);this.pending=n.pop()??"";const r=[];for(const i of n){const a=i.trim();if(a)try{r.push(JSON.parse(a))}catch{this.logger.warn("[NDJSON] Could not parse line:",a)}}return r}flushPending(){const t=this.pending.trim();if(this.pending="",!t)return[];try{return[JSON.parse(t)]}catch{return[]}}static isObjectOutputstreamMessageDeltaDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_DELTA;static isObjectOutputstreamMessageStartDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_START;static isObjectOutputstreamMessageEndDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_END;static isObjectOutputstreamErrorDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_ERROR;static isObjectOutputstreamClientEventDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CLIENT_EVENT;static isObjectOutputstreamLoadingNumberOfStepsDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;static isObjectOutputstreamLoadingCurrentStepNumberDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;static isObjectOutputstreamLoadingCurrentStepNameDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE;static containsObjectWithLastAnswerToTrue=t=>{for(const n of t)if(this.isObjectOutputstreamMessageEndDTO(n)&&n.isLastAnswer)return!0;return!1}}const Gh=e=>e.filter(t=>t.userType==="user").length;var Vi=(e=>(e.GET_DISCUSSION_ID="/id",e.RESET_DISCUSSION="/delete",e))(Vi||{});const Vh=e=>!!e.startsWith("/"),qh=(e,t,n)=>e===Vi.GET_DISCUSSION_ID?t?`Votre ID de discussion est ${t}`:"Votre ID de discussion n'est pas encore défini. Envoyez un premier message pour que ce soit le cas.":e===Vi.RESET_DISCUSSION?(n(),null):`La commande ${e} n'est pas prise en compte.`,Ca=()=>{const e=on(),t=e.formatMessage({defaultMessage:"Message the assistant...",id:"chatbot.placeholder.content"}),n=e.formatMessage({defaultMessage:"You",id:"chatbot.chatline.label.user"}),r=e.formatMessage({defaultMessage:"Assistant",id:"chatbot.chatline.label.assistant"}),i=e.formatMessage({defaultMessage:"Customer support",id:"chatbot.chatline.label.customerSupport"}),a=e.formatMessage({defaultMessage:"⏳ The chatbot is a little busy at the time. Please try again later.",id:"chatbot.error.api.429"}),s=e.formatMessage({defaultMessage:"Oops ! There has been an error. Please try again later.",id:"chatbot.error.api.500"}),o=e.formatMessage({defaultMessage:"Oups ! The discussion is full. Please start a new one.",id:"chatbot.error.api.409"}),u=e.formatMessage({defaultMessage:"See",id:"chatbot.infobanner.title"}),c=e.formatMessage({defaultMessage:"You have an archived discussion.",id:"chatbot.infobanner.cta"}),d=e.formatMessage({defaultMessage:"Transferring your request to customer support...",id:"chatbot.customerSupport.connecting"}),f=e.formatMessage({defaultMessage:"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.",id:"chatbot.customerSupport.connected"}),p=e.formatMessage({defaultMessage:"Customer support is not available right now. Please try again later.",id:"chatbot.customerSupport.connectionError"}),h=e.formatMessage({defaultMessage:"Customer support received your request, but live replies are temporarily unavailable. Please try again shortly.",id:"chatbot.customerSupport.providerUnavailable"}),b=e.formatMessage({defaultMessage:"Your customer support conversation is now complete. Start a new conversation whenever you need more help.",id:"chatbot.customerSupport.closed"}),E=e.formatMessage({defaultMessage:"Restart",id:"chatbot.customerSupport.restart"}),v=e.formatMessage({defaultMessage:"Leave your contact details",id:"chatbot.customerSupport.fallback.title"}),C=e.formatMessage({defaultMessage:"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.",id:"chatbot.customerSupport.fallback.description"}),A=e.formatMessage({defaultMessage:"Email",id:"chatbot.customerSupport.fallback.email"}),N=e.formatMessage({defaultMessage:"Phone",id:"chatbot.customerSupport.fallback.phone"}),L=e.formatMessage({defaultMessage:"Send",id:"chatbot.customerSupport.fallback.submit"}),w=e.formatMessage({defaultMessage:"Sending...",id:"chatbot.customerSupport.fallback.submitting"}),k=e.formatMessage({defaultMessage:"Your contact details have been saved. Customer support will contact you soon.",id:"chatbot.customerSupport.fallback.success"}),Y=e.formatMessage({defaultMessage:"We could not save your contact details. Please try again.",id:"chatbot.customerSupport.fallback.error"}),J=e.formatMessage({defaultMessage:"Customer support is currently closed",id:"chatbot.customerSupport.closedHours.title"}),X=e.formatMessage({defaultMessage:"Leave your email, phone number and request. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.description"}),I=e.formatMessage({defaultMessage:"Today:",id:"chatbot.customerSupport.closedHours.schedulePrefix"}),j=e.formatMessage({defaultMessage:"Reason for your request",id:"chatbot.customerSupport.closedHours.reason"}),z=e.formatMessage({defaultMessage:"Your request has been saved. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.success"});return{placeholderTranslation:t,chatlineLabelUserTranslation:n,chatlineLabelAssistantTranslation:r,chatlineLabelCustomerSupportTranslation:i,tooManyRequestsTranslation:a,genericErrorTranslation:s,discussionFullErrorTranslation:o,infoBannerTitleTranslation:u,infoBannerExplainationTranslation:c,customerSupportConnectingTranslation:d,customerSupportConnectedTranslation:f,customerSupportConnectionErrorTranslation:p,customerSupportProviderUnavailableTranslation:h,customerSupportClosedTranslation:b,customerSupportRestartTranslation:E,customerSupportFallbackTitleTranslation:v,customerSupportFallbackDescriptionTranslation:C,customerSupportFallbackEmailTranslation:A,customerSupportFallbackPhoneTranslation:N,customerSupportFallbackSubmitTranslation:L,customerSupportFallbackSubmittingTranslation:w,customerSupportFallbackSuccessTranslation:k,customerSupportFallbackErrorTranslation:Y,customerSupportClosedHoursTitleTranslation:J,customerSupportClosedHoursDescriptionTranslation:X,customerSupportClosedHoursSchedulePrefixTranslation:I,customerSupportClosedHoursReasonTranslation:j,customerSupportClosedHoursSuccessTranslation:z}},Aa=()=>{const e=on(),t=e.formatMessage({defaultMessage:"Search",id:"chatbot.chatline.loading.function.search"}),n=e.formatMessage({defaultMessage:"Looking into the cavern",id:"chatbot.chatline.loading.function.extractProductName"}),r=e.formatMessage({defaultMessage:"Consulting the shadocks",id:"chatbot.chatline.loading.function.suggestProductName"}),i=e.formatMessage({defaultMessage:"Looking for ziboublis",id:"chatbot.chatline.loading.function.criteriaDefinition"}),a=e.formatMessage({defaultMessage:"Searching Stock",id:"chatbot.chatline.loading.function.searchStock"}),s=e.formatMessage({defaultMessage:"Step",id:"chatbot.chatline.loading.function.step"}),o=e.formatMessage({defaultMessage:"I'm looking for products",id:"chatbot.chatline.loading.function.genericSearchMessage"}),u=e.formatMessage({defaultMessage:"Searching ...",id:"chatbot.chatline.loading.stepName.search"}),c=e.formatMessage({defaultMessage:"Building Query ...",id:"chatbot.chatline.loading.stepName.building"}),d=e.formatMessage({defaultMessage:"Analyzing ...",id:"chatbot.chatline.loading.stepName.analyzing"}),f=e.formatMessage({defaultMessage:"Writing answer",id:"chatbot.chatline.loading.stepName.redacting"}),p=e.formatMessage({defaultMessage:"Cancel",id:"chatbot.chatline.loading.cancel"}),h=e.formatMessage({defaultMessage:"see recent messages",id:"chatbot.chatline.seeRecentMessages"}),b=v=>v?v.includes("ExtractProductNames")?n:v.includes("SuggestProductNames")?r:v==="Recherche ..."?u:v==="Construction ..."?c:v==="Analyse ..."?d:v==="Rédaction"?f:v.includes("CreateCriteriasFromProductNames")||v.includes("CreateCriteriasOrProductNamesFromDiscussion")?i:v.includes("SearchStock")?a:"":t,E=b();return{searchTranslation:t,extractProductNameTranslation:n,criteriaDefinitionTranslation:i,searchStockTranslation:a,stepTranslation:s,getCurrentStepTranslated:b,defaultStartingStep:E,lookingForProductTranslation:o,cancelTranslation:p,recentMessagesTranslation:h}},Wh=e=>/(\[.*|!\[.*)$/.test(e),Xh=e=>/\)/.test(e),Cs=()=>({rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null});class Qh{buffers=new Map;callbacks;constructor(t){this.callbacks=t}handleStart(t){this.buffers.set(t.messageId,Cs()),t.role==="assistant"&&this.callbacks.onAssistantMessageStart?.(),this.callbacks.addEmptyMessage({messageStreamId:t.messageId,role:t.role})}handleDelta(t){this.ensureBufferExists(t.messageId);const n=this.buffers.get(t.messageId);this.appendSourceSeparatorIfNeeded(n,t.streamSourceUuid),this.appendDelta(n,t.delta),this.callbacks.updateMessage({id:t.messageId,newContent:n.rendered})}handleEnd(t){this.buffers.delete(t.messageId)}hasBuffer(t){return this.buffers.has(t)}ensureBufferExists(t){this.buffers.has(t)||(this.buffers.set(t,Cs()),this.callbacks.addEmptyMessage({messageStreamId:t,role:"assistant"}))}appendSourceSeparatorIfNeeded(t,n){t.lastStreamSourceUuid&&t.lastStreamSourceUuid!==n&&(t.rendered+='<span style="display:block;height:1rem;"></span>'),t.lastStreamSourceUuid=n??null}appendDelta(t,n){if(Xh(n)){t.markdownTag+=n,t.rendered+=t.markdownTag,t.markdownTag="",t.isWritingTag=!1;return}if(t.isWritingTag||Wh(n)){t.markdownTag+=n,t.isWritingTag=!0;return}t.rendered+=n}}const Kh=1e4,Jh=3e3,Zh=e=>{const t=new URL(e);return t.protocol=t.protocol==="https:"?"wss:":"ws:",t},e0=({apiUrl:e,handoff:t})=>(t.socketUrl.startsWith("ws://")||t.socketUrl.startsWith("wss://")?new URL(t.socketUrl):new URL(t.socketUrl,Zh(e))).toString(),t0=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return["connected","customer_message_ack","provider_message","closed","error"].includes(t.type)};class n0{socket;callbacks;url;appToken;handoffToken;isIntentionalClose=!1;handshakeTimeout;closeAcknowledgementTimeout=null;constructor(t){this.callbacks=t.callbacks,this.url=e0(t),this.appToken=t.appToken;const n=t.handoff.reconnectToken??t.handoff.handoffToken;if(!n)throw new Error("Customer support socket requires a reconnect token");this.handoffToken=n,this.socket=new WebSocket(this.url),this.handshakeTimeout=setTimeout(()=>{this.socket.readyState!==WebSocket.CONNECTING&&this.socket.readyState!==WebSocket.OPEN||(this.callbacks.onTransportError?.({readyState:this.socket.readyState,url:this.safeUrlForLogs()}),this.socket.close())},Kh),this.socket.addEventListener("open",this.sendAuthMessage),this.socket.addEventListener("message",this.handleMessage),this.socket.addEventListener("close",this.handleClose),this.socket.addEventListener("error",this.handleTransportError)}sendAuthMessage=()=>{this.socket.send(JSON.stringify({type:"auth",appToken:this.appToken,handoffToken:this.handoffToken}))};sendCustomerMessage(t){if(this.socket.readyState!==WebSocket.OPEN){this.callbacks.onError?.({type:"error",message:"Customer support connection is not ready.",code:"CUSTOMER_SUPPORT_SOCKET_NOT_READY"});return}const n={type:"customer_message",text:t,clientMessageId:crypto.randomUUID()};this.socket.send(JSON.stringify(n))}close(t,n){if(this.isIntentionalClose=!0,clearTimeout(this.handshakeTimeout),this.socket.readyState===WebSocket.OPEN&&n?.notifyServer){const r={type:"close",reason:t};this.socket.send(JSON.stringify(r)),this.closeAcknowledgementTimeout=setTimeout(()=>{this.closeTransport(t)},Jh);return}this.closeTransport(t)}handleMessage=t=>{clearTimeout(this.handshakeTimeout);let n;try{n=JSON.parse(t.data)}catch{this.callbacks.onError?.({type:"error",message:"Customer support sent an invalid message.",code:"CUSTOMER_SUPPORT_SOCKET_INVALID_MESSAGE"});return}if(t0(n)){if(n.type==="connected"){this.callbacks.onConnected?.(n);return}if(n.type==="provider_message"){this.callbacks.onProviderMessage?.(n);return}if(n.type==="closed"){if(this.closeAcknowledgementTimeout!==null){clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null,this.closeTransport("Customer support session closed");return}this.callbacks.onClosed?.(n);return}n.type==="error"&&this.callbacks.onError?.(n)}};handleClose=t=>{clearTimeout(this.handshakeTimeout),this.closeAcknowledgementTimeout!==null&&(clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null),!this.isIntentionalClose&&this.callbacks.onClose?.(t)};handleTransportError=()=>{this.isIntentionalClose||this.callbacks.onTransportError?.({readyState:this.socket.readyState,url:this.safeUrlForLogs()})};closeTransport(t){this.closeAcknowledgementTimeout!==null&&(clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null),this.socket.close(1e3,t??"Customer support socket detached")}safeUrlForLogs(){const t=new URL(this.url);return t.searchParams.has("handoffToken")&&t.searchParams.set("handoffToken","<redacted>"),t.toString()}}const r0=new Set(["SLACK_INBOUND_EVENT_NOT_OBSERVED"]),i0=e=>e&&r0.has(e)?"provider_unavailable":"connection_error",a0=e=>e.isClosed?e.labels.closed:!e.isCustomerSupportMode||!e.hasTransportFailed?null:e.failureKind==="provider_unavailable"?e.labels.providerUnavailable:e.labels.connectionError,s0=[500,1500,3e3],o0=e=>{const t=s0[e];return t===void 0?{shouldRetry:!1}:{shouldRetry:!0,delayMs:t}},qu=e=>e.mode!==yt.customerSupport?!1:e.customerSupportState.status!=="closed",wa=e=>e.mode!==yt.customerSupport?!1:e.customerSupportState.status==="closed",Ia=e=>e.mode!==yt.customerSupport||e.customerSupportState.status==="closed"?!1:e.customerSupportState.mode==="closed_hours_contact_capture",u0=e=>Ia(e)?"customer_support":qu(e)?"customer_support_connecting":wa(e)?"customer_support":"ai",l0=e=>Ia(e)?"idle":qu(e)?"connecting":wa(e)?"closed":"idle",c0=e=>Ia(e)?"visible":"idle",d0=e=>e?.trim()||void 0,f0=e=>e.mode!==yt.customerSupport||e.customerSupportState.status==="closed"||e.customerSupportState.mode==="closed_hours_contact_capture"?null:e.customerSupportState,Wu=e=>!!(e&&e.mode!=="closed_hours_contact_capture"),va=e=>e?.mode==="closed_hours_contact_capture",h0=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&Wu(e.state))return e.state.fallbackContactCapture},p0=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&va(e.state))return e.state.closedHoursContactCapture},m0=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&va(e.state))return e.state.businessHours},g0=e=>e.isCustomerSupportMode?e.chatTransportMode==="customer_support_connecting"?"customer_support_connecting":e.isCurrentDiscussion?va(e.state)?"customer_support_closed_hours_form":e.socketStatus!=="connected"?`socket_${e.socketStatus}`:e.isWaitingForFirstProviderReply?"waiting_first_provider_reply":e.isCustomerSupportClosed?"customer_support_closed":null:e.currentDiscussionId===null?"discussion_not_loaded":"discussion_mismatch":null;function b0({appToken:e,conversationStorageKey:t,currentConversation:n,loadingStatus:r,labels:i,logger:a,setCurrentConversationId:s,setLoadingStatus:o,addMessageToCurrentConversation:u,chatboxBootState:c,resetConversationRequestId:d}){const f=Mr(),p=c,[h,b]=S.useState(()=>u0(p)),[E,v]=S.useState(p.customerSupportState),[C,A]=S.useState(()=>l0(p)),[N,L]=S.useState(null),[w,k]=S.useState("idle"),[Y,J]=S.useState(()=>c0(p)),X=S.useRef(null),I=S.useRef(d),j=S.useRef(!1),z=S.useRef(null),U=S.useRef(f0(p)),F=S.useRef(wa(p)),q=S.useRef(!1),he=S.useRef(0),le=S.useRef(null),Ie=h!=="ai",we=E?.discussionId===n.discussionId,m=Ie&&E?.status==="closed",G=a0({isCustomerSupportMode:Ie,isClosed:m,hasTransportFailed:C==="failed",failureKind:N,labels:i}),ne=!!(Ie&&we&&E?.mode!=="closed_hours_contact_capture"&&E?.isWaitingForFirstProviderReply),y={isCustomerSupportMode:Ie,isCurrentDiscussion:we,state:E},K=h0(y),Z=p0(y),W=m0(y),oe=!!K?.enabled&&["visible","submitting","submitted","failed"].includes(w),ae=!!Z?.enabled&&["visible","submitting","submitted","failed"].includes(Y),re=g0({chatTransportMode:h,currentDiscussionId:n.discussionId,isCustomerSupportClosed:m,isCustomerSupportMode:Ie,isCurrentDiscussion:we,isWaitingForFirstProviderReply:ne,socketStatus:C,state:E}),se=re!==null;S.useEffect(()=>{if(r!=="notLoading"||n.items.length===0)return;const B=we?E:null;!n.discussionId&&!B||ah({conversation:n,customerSupport:B,key:t})},[r,n,E,t,we]),S.useEffect(()=>(q.current=!1,()=>{q.current=!0,le.current!==null&&(window.clearTimeout(le.current),le.current=null),X.current?.close("Widget unmounted"),X.current=null}),[]);const Se=(B,R,P)=>{u({userType:"assistant",content:B,metaData:{messageKind:"system",systemEvent:R,...P},temporaryId:crypto.randomUUID()})},V=(B,R)=>{u({userType:"assistant",content:B,metaData:{messageKind:"conversation",authorType:"customer_support_operator",...R},temporaryId:crypto.randomUUID()})},ve=(B,R)=>{X.current?.close(B,R),X.current=null},ze=()=>{le.current!==null&&(window.clearTimeout(le.current),le.current=null),he.current=0,z.current=null,U.current=null,F.current=!1,L(null),v(null),A("idle"),b("ai")},Ge=(B,R)=>{ve(B,R),ze()};S.useEffect(()=>{I.current!==d&&(I.current=d,j.current=!0,Ge("Starting new conversation",{notifyServer:!0}))},[d]),S.useEffect(()=>{n.discussionId===null&&j.current&&E===null&&h==="ai"&&(j.current=!1)},[h,n.discussionId,E]);const Ze=B=>{F.current||(F.current=!0,z.current=null,X.current=null,B?.discussionId&&s(B.discussionId),o("notLoading"),L(null),A("closed"),b("customer_support"),v(R=>{if(!R)return R;const P=new Date().toISOString();return{...R,status:"closed",discussionId:B?.discussionId??R.discussionId,updatedAt:P,closedAt:B?.closedAt??P,closedReason:B?.reason,isWaitingForFirstProviderReply:!1}}))},it=(B,R)=>{X.current&&ve("Replacing customer support socket"),A("connecting");let P=!1,Q=!1;const ie=ce=>{L(ce),A("failed"),o("notLoading")},Ee=ce=>{X.current=null;const ke=o0(he.current);if(!ke.shouldRetry){a.error("Customer support socket reconnect exhausted code="+ce.code+" reason="+(ce.reason||"none")),ie("connection_error");return}he.current+=1,A("connecting"),b("customer_support_connecting"),a.log("Customer support socket reconnect scheduled attempt="+he.current+" delayMs="+ke.delayMs+" code="+ce.code),le.current=window.setTimeout(()=>{le.current=null,!(q.current||F.current)&&it(B,{...R,addConnectedMessage:P?!1:R?.addConnectedMessage})},ke.delayMs)};X.current=new n0({apiUrl:f,appToken:e,handoff:B,callbacks:{onConnected:ce=>{const ke=B.reconnectToken??B.handoffToken;if(!ke){Ze({reason:"Missing reconnect token"});return}P=!0,he.current=0,R?.isStoredReconnect&&(U.current=null);const He=new Date().toISOString();s(ce.discussionId),L(null),A("connected"),b("customer_support"),o("notLoading"),v(ut=>{const et=Wu(ut)?ut:null;return{mode:"live_chat",status:"active",discussionId:ce.discussionId,socketUrl:B.socketUrl,reconnectToken:ke,reconnectTokenExpiresAt:ce.reconnectTokenExpiresAt??B.reconnectTokenExpiresAt,customerSupportSessionId:ce.customerSupportSessionId??B.customerSupportSessionId,provider:et?.provider,isWaitingForFirstProviderReply:et?.isWaitingForFirstProviderReply??!0,fallbackContactCapture:et?.fallbackContactCapture,startedAt:et?.startedAt??He,updatedAt:He}}),R?.addConnectedMessage!==!1&&Se(i.connected,"customer_support_connected")},onProviderMessage:ce=>{L(null),A("connected"),k(ke=>ke==="submitted"?ke:"idle"),v(ke=>!ke||ke.mode==="closed_hours_contact_capture"?ke:{...ke,status:"active",provider:ce.provider??ke.provider,reconnectTokenExpiresAt:ce.reconnectTokenExpiresAt??ke.reconnectTokenExpiresAt,isWaitingForFirstProviderReply:!1,updatedAt:new Date().toISOString()}),V(ce.text,{customerSupportAuthorName:d0(ce.authorName),customerSupportProvider:ce.provider})},onClosed:ce=>{Q=!0,Ze({reason:ce.reason,closedAt:ce.closedAt,discussionId:ce.discussionId})},onError:ce=>{Q=!0,a.error("Customer support socket server error code="+ce.code+" message="+ce.message),ie(i0(ce.code))},onClose:ce=>{q.current||F.current||Q||Ee(ce)},onTransportError:ce=>{a.error(`Customer support socket transport error readyState=${ce.readyState} url=${ce.url}`)}}})};S.useEffect(()=>{const B=U.current;if(!B)return;const R=Bu(B,n.discussionId);if(R!=="discussion_not_loaded"){if(R==="session_closed"){U.current=null,A("closed"),b("customer_support");return}if(R){U.current=null,v(P=>P?.discussionId===n.discussionId?P:null),A("idle"),b("ai");return}X.current||(A("connecting"),b("customer_support_connecting"),it({mode:"live_chat",transport:"socket",socketUrl:B.socketUrl,reconnectToken:B.reconnectToken,reconnectTokenExpiresAt:B.reconnectTokenExpiresAt,customerSupportSessionId:B.customerSupportSessionId,discussionId:B.discussionId,fallbackContactCapture:B.fallbackContactCapture},{addConnectedMessage:!1,isStoredReconnect:!0}))}},[n.discussionId]);const $e=B=>{if(B.mode==="closed_hours_contact_capture"){Oe(B);return}const R=B.reconnectToken??B.handoffToken;if(!B.discussionId||!R){Se(i.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const P=new Date().toISOString();z.current=B,F.current=!1,k("idle"),v({mode:"live_chat",status:"connecting",discussionId:B.discussionId,socketUrl:B.socketUrl,reconnectToken:R,reconnectTokenExpiresAt:B.reconnectTokenExpiresAt,customerSupportSessionId:B.customerSupportSessionId,isWaitingForFirstProviderReply:!0,fallbackContactCapture:B.fallbackContactCapture,startedAt:P,updatedAt:P}),A("connecting"),b("customer_support_connecting"),Se(i.connecting,"customer_support_connecting")},_t=()=>{const B=z.current;!B||B.mode!=="live_chat"||(z.current=null,it(B))},Et=B=>h!=="customer_support"||C!=="connected"||!we||!X.current?(Se(i.connectionError,"customer_support_connection_error",{isErrorMessage:!0}),!1):(X.current.sendCustomerMessage(B),!0);S.useEffect(()=>{if(!K?.enabled||!ne||!we||C!=="connected"||w!=="idle")return;const B=Math.max(1,K.timeoutMinutes)*60*1e3,R=window.setTimeout(()=>{k("visible")},B);return()=>window.clearTimeout(R)},[K,w,we,ne,C]);const me=async({email:B,phone:R})=>{if(!E?.customerSupportSessionId||!E.reconnectToken)return!1;k("submitting");const P=`${f}/customer-support/sessions/${E.customerSupportSessionId}/fallback-contact`;return(await fetch(P,nn.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:E.reconnectToken,reasonType:"fallback_no_reply",email:B,phone:R}}))).ok?(k("submitted"),ve("Fallback contact submitted"),Ze({reason:"fallback_contact_submitted",discussionId:E.discussionId}),!0):(k("failed"),!1)},Oe=B=>{if(!B.discussionId){Se(i.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const R=new Date().toISOString();z.current=null,F.current=!1,ve("Closed-hours contact capture"),v({mode:"closed_hours_contact_capture",status:"active",discussionId:B.discussionId,reconnectToken:B.reconnectToken,reconnectTokenExpiresAt:B.reconnectTokenExpiresAt,customerSupportSessionId:B.customerSupportSessionId,closedHoursContactCapture:B.closedHoursContactCapture,businessHours:B.businessHours,startedAt:R,updatedAt:R}),A("idle"),b("customer_support"),o("notLoading"),J("visible")},Ae=async({email:B,phone:R,reason:P})=>{if(E?.mode!=="closed_hours_contact_capture")return!1;J("submitting");const Q=f+"/customer-support/sessions/"+E.customerSupportSessionId+"/fallback-contact";return(await fetch(Q,nn.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:E.reconnectToken,reasonType:"closed_hours",email:B,phone:R,reason:P}}))).ok?(J("submitted"),Ze({reason:"closed_hours_contact_submitted",discussionId:E.discussionId}),!0):(J("failed"),!1)};return S.useEffect(()=>{if(Ie&&E&&E.status!=="closed"&&n.discussionId!==E.discussionId&&n.discussionId===null){if(j.current)return;s(E.discussionId);return}},[n.discussionId,E,Ie,C,s]),{chatTransportMode:h,socketStatus:C,isCustomerSupportMode:Ie,isCustomerSupportClosed:m,customerSupportStatusMessage:G,isCustomerSupportInputDisabled:se,customerSupportInputDisabledReason:re,enterCustomerSupportMode:$e,flushPendingCustomerSupportHandoff:_t,sendToCustomerSupport:Et,fallbackContactCaptureConfig:K,fallbackContactCaptureStatus:w,shouldDisplayFallbackContactCapture:oe,submitFallbackContactCapture:me,closedHoursContactCaptureConfig:Z,closedHoursBusinessHours:W,closedHoursContactCaptureStatus:Y,shouldDisplayClosedHoursContactCapture:ae,submitClosedHoursContactCapture:Ae}}const E0=e=>e.runtimeAdapter?e.prompt.mode!=="text"?Promise.reject(new Error("WIDGET_RUNTIME_ADAPTER_TEXT_PROMPTS_ONLY")):e.runtimeAdapter.sendTextPrompt(e.prompt.request):e.sendStandardPrompt();class T0{active=null;logger;constructor(t=console){this.logger=t}start(){return this.active?null:(this.active={id:crypto.randomUUID(),controller:new AbortController,decoder:new Dt(this.logger)},this.active)}hasActiveStream(){return this.active!==null}isCurrent(t){return this.active?.id===t.id}finish(t){return this.isCurrent(t)?(this.active=null,!0):!1}cancel(t){const n=this.active;return n?(this.active=null,n.controller.abort(t),n):null}}const y0=e=>{const{appToken:t,agentId:n}=e,r=Xn(),i=Mr(),a=wh(),s=S.useContext(Yu),{appCurrentLang:o}=S.useContext(Ru),{companySettings:u}=S.useContext(Nt),c=Sa({appToken:t,agentId:n}),d=Fu({appToken:t,agentId:n}),f=S.useRef(null),p=S.useRef(s),h=S.useRef(new Set),b=S.useRef(null),E=S.useRef(null),v=S.useRef(null),C=S.useRef(null),A=S.useRef(null);A.current||(A.current=new T0(r));const N=A.current,[L,w]=S.useState(0);(!f.current||p.current!==s)&&(p.current=s,f.current=new kh(s)),S.useEffect(()=>{const de=f.current;if(!(!de||!s))return de.getToken({interactive:!1}).catch(()=>de.clear()),s.subscribe?.(()=>{de.handleIdentityChanged(),w(Te=>Te+1),de.getToken({interactive:!1}).catch(()=>de.clear())})},[s]);const{genericErrorTranslation:k,tooManyRequestsTranslation:Y,discussionFullErrorTranslation:J,customerSupportConnectingTranslation:X,customerSupportConnectedTranslation:I,customerSupportConnectionErrorTranslation:j,customerSupportProviderUnavailableTranslation:z,customerSupportClosedTranslation:U}=Ca(),{defaultStartingStep:F}=Aa(),{currentConversation:q,addEmptyMessageToCurrentConversation:he,addMessageToCurrentConversation:le,removeEmptyAssistantMessageFromCurrentConversation:Ie,resetConversation:we,setCurrentConversationId:m,updateCurrentConversationMessageById:G,chatboxBootState:ne,resetConversationRequestId:y}=Fr(),[K,Z]=S.useState("notLoading"),[W,oe]=S.useState(null),[ae,re]=S.useState(F),[se,Se]=S.useState(null),[V,ve]=S.useState(!1),{chatTransportMode:ze,isCustomerSupportMode:Ge,customerSupportStatusMessage:Ze,isCustomerSupportInputDisabled:it,enterCustomerSupportMode:$e,flushPendingCustomerSupportHandoff:_t,sendToCustomerSupport:Et,fallbackContactCaptureConfig:me,fallbackContactCaptureStatus:Oe,shouldDisplayFallbackContactCapture:Ae,submitFallbackContactCapture:B,closedHoursContactCaptureConfig:R,closedHoursBusinessHours:P,closedHoursContactCaptureStatus:Q,shouldDisplayClosedHoursContactCapture:ie,submitClosedHoursContactCapture:Ee}=b0({appToken:t,conversationStorageKey:d,currentConversation:q,loadingStatus:K,labels:{connecting:X,connected:I,connectionError:j,providerUnavailable:z,closed:U},logger:r,setCurrentConversationId:m,setLoadingStatus:Z,addMessageToCurrentConversation:le,chatboxBootState:ne,resetConversationRequestId:y}),ce=S.useRef(null);ce.current||(ce.current=new Qh({addEmptyMessage:he,updateMessage:G,onAssistantMessageStart:()=>Z("loadingDisplayedAnswer")}));const ke=ce.current,He=de=>{N.finish(de)&&(Z("notLoading"),re(F),Se(null))},ut=()=>{const de=N.start();return de?(Z("loadingIntermediaryStates"),de):null},et=()=>{N.cancel("Cancelling stream on purpose.")&&(r.log("Stream request aborted"),Z("notLoading"),re(F),Se(null),Ie())};S.useEffect(()=>{if(Ge){ve(!1);return}const de=u?.api?.settings?.maxUserMessagesPerDiscussion;typeof de=="number"&&ve(Gh(q.items)>=de)},[u?.api?.settings?.maxUserMessagesPerDiscussion,q.items,Ge]);const Ve=S.useRef(y);S.useEffect(()=>{Ve.current!==y&&(Ve.current=y,N.cancel("Conversation reset."),Z("notLoading"),re(F),Se(null),ve(!1))},[F,y]),S.useEffect(()=>(C.current&&(clearTimeout(C.current),C.current=null),()=>{C.current=setTimeout(()=>{N.cancel("Widget runtime unmounted."),C.current=null},0)}),[N]);const Le=(de,Te)=>{for(const ye of de)if(Dt.isObjectOutputstreamMessageStartDTO(ye))ke.handleStart(ye);else if(Dt.isObjectOutputstreamMessageDeltaDTO(ye))ke.handleDelta(ye);else if(Dt.isObjectOutputstreamMessageEndDTO(ye))ke.handleEnd(ye);else if(Dt.isObjectOutputstreamLoadingCurrentStepNumberDTO(ye))Se(ye.content);else if(Dt.isObjectOutputstreamLoadingCurrentStepNameDTO(ye))re(ye.content);else if(Dt.isObjectOutputstreamLoadingNumberOfStepsDTO(ye))oe(ye.content);else if(Dt.isObjectOutputstreamClientEventDTO(ye)){const De=Yh(ye);if(De.type==="customer_support_handoff_requested")$e(De.payload);else if(De.type==="identity_gate_required"){if(h.current.has(De.payload.gateId))continue;h.current.add(De.payload.gateId);const tt=f.current;if(!tt)continue;De.payload.protocolVersion===2&&(Number.isSafeInteger(Te)&&Te>0?Lh(c,De.payload.continuation,Te):r.warn("Identity continuation ignored without a valid discussion id"),b.current=De.payload.continuation.continuationId),Nh({apiUrl:i,appToken:t,payload:De.payload,identitySession:tt}).then(()=>{De.payload.protocolVersion===2&&_s(c)}).catch(at=>r.error(at)).finally(()=>{De.payload.protocolVersion===2&&b.current===De.payload.continuation.continuationId&&(b.current=null)})}else r.warn(`Client event not handled - ${ye.event}`)}else Dt.isObjectOutputstreamErrorDTO(ye)?le({userType:"assistant",metaData:{isErrorMessage:!0},content:ye.message,temporaryId:crypto.randomUUID()}):r.warn(`Packet shape not handled - ${ye}`)},Ue=async(de,Te)=>{const ye=Number.parseInt(de.headers.get("discussionId")??"",10);if(Number.isNaN(ye)||m(ye),!de.ok){if(!N.isCurrent(Te))return;let at=k;de.status===409?(at=J,ve(!0)):de.status===429&&(at=Y),le({userType:"assistant",content:at,metaData:{isErrorMessage:!0},temporaryId:crypto.randomUUID()}),He(Te);return}const De=de.body?.getReader();if(!De){He(Te);return}const tt=new TextDecoder;for(;N.isCurrent(Te);){const{done:at,value:qt}=await De.read();if(!N.isCurrent(Te))break;if(qt&&Le(Te.decoder.transformNDJSONChunkIntoObjects(tt.decode(qt,{stream:!0})),ye),at){Le(Te.decoder.transformNDJSONChunkIntoObjects(tt.decode()),ye),Le(Te.decoder.flushPending(),ye),_t(),He(Te);return}}await De.cancel().catch(()=>{})};v.current=Ue,S.useEffect(()=>{if(!s||N.hasActiveStream())return;const de=Dh(c);if(!de){E.current=null;return}if(E.current===de.continuationId||b.current===de.continuationId)return;const Te=f.current;if(!Te)return;const ye=ut();ye&&(E.current=de.continuationId,Ph({apiUrl:i,appToken:t,discussionId:de.discussionId,continuation:de,identitySession:Te}).then(async De=>{if(!De){E.current=null,He(ye);return}De.status===401&&Te.clear(),Mh(De.status)&&_s(c),await v.current?.(De,ye)}).catch(De=>{r.error(De),He(ye)}))},[i,t,s,L,r,c]);const Tt=(de,Te,ye)=>{const De=n?`?agentId=${encodeURIComponent(String(n))}`:"",tt=`${i}/ai/prompt/${t}${De}`;if(de.mode==="text"){const qt={query:de.text,language:o.locale};return q.discussionId&&(qt.discussionId=q.discussionId),{url:tt,fetchConfig:nn.getFetchConfig({httpVerb:"POST",body:qt,contentType:"application/json",options:{signal:ye,headers:{...nn.getHeaders({contentType:"application/json"}),...s?{[ee.IDENTITY_GATE_VERSION_HEADER]:"2"}:{},...Te?{Authorization:`Bearer ${Te}`}:{}}}})}}const at=new FormData;return at.append("language",o.locale),q.discussionId&&at.append("discussionId",String(q.discussionId)),at.append("audioInput",de.audioFile,de.audioFile.name),{url:tt,fetchConfig:{method:"POST",body:at,signal:ye,headers:s||Te?{...s?{[ee.IDENTITY_GATE_VERSION_HEADER]:"2"}:{},...Te?{Authorization:`Bearer ${Te}`}:{}}:void 0}}},rs=de=>{const Te=ut();return Te?((async()=>{let ye=null;if(!a)try{ye=await f.current?.getToken({interactive:!1})??null}catch{f.current?.clear()}const De=de.mode==="audio"?{mode:"audio"}:{mode:"text",request:{apiUrl:i,appToken:t,agentId:n,query:de.text,language:o.locale,discussionId:q.discussionId,signal:Te.controller.signal}};try{const tt=await E0({runtimeAdapter:a,prompt:De,sendStandardPrompt:()=>{const{url:at,fetchConfig:qt}=Tt(de,ye,Te.controller.signal);return fetch(at,qt)}});tt.status===401&&ye&&f.current?.clear(),await Ue(tt,Te),tt.ok&&!Te.controller.signal.aborted&&await a?.onAssistantResponseCompleted?.(tt)}catch(tt){Te.controller.signal.aborted||r.error(tt),He(Te)}})(),!0):!1},Jr=!Ge&&(K!=="notLoading"||V)||Ge&&(K!=="notLoading"||it);return{appToken:t,agentId:n,loadingStatus:K,numberOfSteps:W,currentStepName:ae,currentStepNumber:se,isAtMaxMessages:V,isCustomerSupportMode:Ge,customerSupportStatusMessage:Ze,fallbackContactCaptureConfig:me,fallbackContactCaptureStatus:Oe,shouldDisplayFallbackContactCapture:Ae,submitFallbackContactCapture:B,closedHoursContactCaptureConfig:R,closedHoursBusinessHours:P,closedHoursContactCaptureStatus:Q,shouldDisplayClosedHoursContactCapture:ie,submitClosedHoursContactCapture:Ee,isTextareaDisabled:Jr,cancelRequest:et,submitTextMessage:de=>{if(!de.trim()||Jr)return!1;if(Vh(de)){const Te=qh(de,q.discussionId,we);return Te?(le({userType:"user",content:Te,temporaryId:crypto.randomUUID()}),!0):!1}return ze!=="customer_support"&&N.hasActiveStream()?!1:(le({userType:"user",content:de,temporaryId:crypto.randomUUID()}),ze==="customer_support"?(Et(de),!0):rs({mode:"text",text:de}))},submitAudio:de=>Jr||N.hasActiveStream()?!1:rs({mode:"audio",audioFile:de})}},Xu=S.createContext(null),x0=({appToken:e,agentId:t,children:n})=>{const r=y0({appToken:e,agentId:t});return x.jsx(Xu.Provider,{value:r,children:n})},S0=()=>{const e=S.useContext(Xu);if(!e)throw new Error("useChatRuntime must be used within ChatRuntimeProvider");return e},Qu=S.createContext(null),_0=Qu.Provider,C0=()=>{const e=S.useContext(Qu);if(!e)throw new Error("useWidgetRuntimeStatus must be used within WidgetRuntime");return e},A0=({children:e,appToken:t,agentId:n,logger:r,identityProvider:i,runtimeAdapter:a})=>{const s=navigator.language;r.log("Brower language",s);const o=Qf(s,r),{appCurrentLang:u,handleSetContextCurrentLang:c}=Yf(Pr,o),d={appCurrentLang:u,setAppCurrentLang:c},[f,p]=S.useState(!1),h=S.useCallback(()=>p(!0),[]),{contextCompanySettings:b,contextInitialConversationState:E}=ph({agentId:n,appToken:t,onFetched:h,runtimeAdapter:a});return S.useEffect(()=>{xh(b.companySettings,r)},[b.companySettings,r]),x.jsx(Gu.Provider,{value:a,children:x.jsx(Yu.Provider,{value:i,children:x.jsx(Ff,{locale:u?.locale,messages:u?.translatedText,children:x.jsx(Ru.Provider,{value:d,children:x.jsx(Nt.Provider,{value:b,children:x.jsx(Ou.Provider,{value:E,children:x.jsx(_0,{value:{hasFetchedSettings:f},children:x.jsx(x0,{appToken:t,agentId:n,children:e})})})})})})})})};function Ku({appToken:e,agentId:t,shouldDisplayLogs:n,apiUrl:r,identityProvider:i,runtimeAdapter:a,children:s}){const o=S.useMemo(()=>Wf(n),[n]),u=Sa({appToken:e,agentId:t});return S.useEffect(()=>{e.trim()||o.error("App Token missing")},[e,o]),x.jsx(Jf,{apiUrl:r,children:x.jsx(Mu.Provider,{value:o,children:x.jsx(A0,{appToken:e,agentId:t,logger:o,identityProvider:i,runtimeAdapter:a,children:s},u)})})}const Ju=e=>We.createElement("svg",{fill:"#000000",height:"800px",width:"800px",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 330 330",xmlSpace:"preserve",...e},We.createElement("path",{id:"XMLID_102_",d:"M325.607,79.393c-5.857-5.857-15.355-5.858-21.213,0.001l-139.39,139.393L25.607,79.393 c-5.857-5.857-15.355-5.858-21.213,0.001c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393 s7.794-1.581,10.606-4.394l149.996-150C331.465,94.749,331.465,85.251,325.607,79.393z"})),w0=({src:e})=>{const[t,n]=S.useState(null);return S.useEffect(()=>{let r=!1;return Uu(e).then(({blobUrl:i})=>{n(i)}).catch(()=>n(null)),()=>{t&&!r&&(URL.revokeObjectURL(t),r=!0)}},[e]),x.jsx("img",{src:t??e,decoding:"async",loading:"eager"})};function I0(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function v0({src:e,autoplay:t=!0,loop:n=!0,className:r,style:i,placeholder:a,fallback:s,onLoaded:o,onError:u}){const[c,d]=S.useState({kind:"loading"});return S.useEffect(()=>{let f=null,p=!1;return d({kind:"loading"}),ju(e).then(async h=>{if(!p)if(h.kind==="zip"){const b=I0(h)?h.blob:await(await fetch(h.blobUrl)).blob();f=URL.createObjectURL(b),d({kind:"lottieZip",blobUrl:f}),o?.(f)}else d({kind:"json",data:h.data}),o?.(h.data)}).catch(h=>!p&&(d({kind:"error",err:h}),u?.(h))),()=>{p=!0,f&&URL.revokeObjectURL(f)}},[e]),c.kind==="loading"?x.jsx("div",{className:"flex items-center justify-center rounded-xl border border-dashed p-6 text-sm opacity-70 "+(r??""),style:{minHeight:96,...i},children:a??"Loading animation…"}):c.kind==="error"?x.jsx("div",{className:"flex items-center justify-center rounded-xl border p-6 text-sm text-red-600 "+(r??""),style:{minHeight:96,...i},children:s??"Failed to load animation"}):c.kind==="json"?x.jsx(dd,{animationData:c.data,loop:n,autoplay:t,className:r,style:i,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}}):x.jsx(fd.DotLottieReact,{src:c.blobUrl,loop:n,autoplay:t,className:r,style:i})}async function k0(e,t={}){const{minPeriod:n=8,maxPeriod:r=Math.floor(Math.min(e.width,e.height)/2),gutterSearchRadius:i=3,debug:a=!1}=t,s=Mt();if(e.width<n*2||e.height<n*2)return a&&s.warn("detectGrid: image too small"),null;const o=document.createElement("canvas");o.width=e.naturalWidth,o.height=e.naturalHeight;const u=o.getContext("2d");if(!u)return null;u.drawImage(e,0,0);const{data:c}=u.getImageData(0,0,o.width,o.height),d=o.width,f=o.height,p=new Uint8ClampedArray(d*f);for(let j=0;j<f;j++){const z=j*d;for(let U=0;U<d;U++){const F=(z+U)*4;p[z+U]=.299*c[F]+.587*c[F+1]+.114*c[F+2]|0}}const h=new Float32Array(d),b=new Float32Array(f);for(let j=1;j<d-1;j++){let z=0;for(let U=0;U<f;U++){const F=U*d+j,q=p[F+1]-p[F-1];z+=Math.abs(q)}h[j]=z}for(let j=1;j<f-1;j++){let z=0;for(let U=0;U<d;U++){const F=j*d+U,q=p[F+d]-p[F-d];z+=Math.abs(q)}b[j]=z}const E=As(h,n,Math.min(r,d/2)),v=As(b,n,Math.min(r,f/2));if(!E||!v)return a&&s.warn("detectGrid: could not find periods"),null;const C=Math.max(1,Math.round(d/E)),A=Math.max(1,Math.round(f/v)),N=ws(h,E,C,i),L=ws(b,v,A,i),w=Math.max(1,E-N),k=Math.max(1,v-L);if(w*C>d+2||k*A>f+2)return a&&s.warn("detectGrid: sanity check failed"),null;const Y=qi(h,60),J=qi(b,60),X=Math.max(0,Is(h,Y)),I=Math.max(0,Is(b,J));return a&&s.log({periodX:E,periodY:v,columns:C,rows:A,gutterX:N,gutterY:L,frameWidth:w,frameHeight:k,originX:X,originY:I}),{columns:C,rows:A,frameWidth:w,frameHeight:k,gutterX:N,gutterY:L,originX:X,originY:I}}function As(e,t,n){const r=Zu(e);let i=0;for(let h=0;h<e.length;h++){const b=e[h]-r;i+=b*b}if(i===0)return null;const a=new Float32Array(n+1);let s=0,o=-1/0;for(let h=t;h<=n;h++){let b=0;for(let v=0;v+h<e.length;v++)b+=(e[v]-r)*(e[v+h]-r);const E=b/i;a[h]=E,E>o&&(o=E,s=h)}if(s<=t||s>=n)return s||null;const u=a[s-1],c=a[s],d=a[s+1],f=u-2*c+d,p=f===0?0:.5*(u-d)/f;return s+p}function ws(e,t,n,r){const i=[];for(let o=1;o<n;o++){const u=o*t;let c=1/0,d=u;for(let f=-r;f<=r;f++){const p=u+f;if(p<=0||p>=e.length)continue;const h=e[p];h<c&&(c=h,d=p)}i.push(d)}if(i.length<1)return 0;const a=[];for(const o of i){const u=e[o]*1.5+qi(e,10)*.5;let c=o,d=o;for(;c>1&&e[c-1]<=u;)c--;for(;d<e.length-2&&e[d+1]<=u;)d++;a.push(Math.max(0,d-c+1))}const s=Math.round(Zu(a));return Math.max(0,Math.min(s,Math.floor(t/4)))}function Zu(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function qi(e,t){const n=Array.from(e);n.sort((i,a)=>i-a);const r=Math.max(0,Math.min(n.length-1,Math.floor(t/100*n.length)));return n[r]}function Is(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function N0(e,t,n,r,i){const{data:a}=e.getImageData(t,n,r,i);let s=0;for(let o=3;o<a.length;o+=4)s+=a[o];return s/(255*(a.length/4))<.03}const R0=S.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:i,rows:a,gutterX:s=0,gutterY:o=0,frameCount:u,atlasFrames:c,fps:d=12,autoplay:f=!0,loop:p=!0,startFrame:h=0,direction:b="forward",scale:E=1,backgroundColor:v,className:C,style:A,pauseWhenHidden:N=!1,originX:L,originY:w,onLoad:k,onEnd:Y,onFrame:J},X){const I=Xn(),j=S.useRef(null),z=S.useRef(null),[U,F]=S.useState(null),[q,he]=S.useState(null),[le,Ie]=S.useState(null),[we,m]=S.useState(!1),[G,ne]=S.useState(!!f),[y,K]=S.useState(h),Z=S.useRef(1),[W,oe]=S.useState(null),ae=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));S.useEffect(()=>{let me=!1;return m(!1),zu(t).then(({imgEl:Oe,bitmap:Ae})=>{me||(F(Oe),he(Ae),Ie({w:Oe.naturalWidth,h:Oe.naturalHeight}),m(!0),k?.())}).catch(()=>{}),()=>{me=!0}},[t,k]),S.useEffect(()=>{let me=!1;return(async()=>{if(!U)return;if(c&&c.length){oe(null);return}if(!(!n||!r||!i||!a)){oe(null);return}const Ae=await k0(U,{debug:!0});me||(Ae?oe({frameWidth:Ae.frameWidth,frameHeight:Ae.frameHeight,columns:Ae.columns,rows:Ae.rows,gutterX:Ae.gutterX,gutterY:Ae.gutterY}):(oe(null),I.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{me=!0}},[U,c,n,r,i,a,I]);const re=W?.frameWidth??n,se=W?.frameHeight??r,Se=W?.columns??i,V=W?.rows??a,ve=W?.gutterX??s,ze=W?.gutterY??o,Ge=W?.originX??L??0,Ze=W?.originY??w??0,it=S.useMemo(()=>{if(c&&c.length>0)return{cols:0,rows:0};if(!le||!re||!se)return{cols:0,rows:0};const me=Se??Math.floor((le.w+ve)/(re+ve)),Oe=V??Math.floor((le.h+ze)/(se+ze));return{cols:Math.max(0,me),rows:Math.max(0,Oe)}},[c,le,re,se,Se,V,ve,ze]),$e=S.useMemo(()=>{if(c?.length)return c;if(!re||!se)return[];const{cols:me,rows:Oe}=it;if(!me||!Oe)return[];const Ae=Math.min(u??me*Oe,me*Oe),B=[];for(let R=0;R<Ae;R++){const P=R%me,Q=Math.floor(R/me),ie=Ge+P*(re+ve),Ee=Ze+Q*(se+ze);B.push({x:ie,y:Ee,w:re,h:se})}if(U&&B.length){const R=document.createElement("canvas");R.width=U.naturalWidth,R.height=U.naturalHeight;const P=R.getContext("2d");if(P){P.drawImage(U,0,0);let Q=B.length;for(;Q>0&&N0(P,B[Q-1].x,B[Q-1].y,B[Q-1].w,B[Q-1].h);)Q--;return B.slice(0,Q)}}return B},[c,it,u,re,se,ve,ze,U,Ge,Ze]),_t=()=>{const me=j.current;if(!me||$e.length===0)return;const Oe=$e[Math.max(0,Math.min(y,$e.length-1))],Ae=Math.max(1,Math.round(Oe.w*E)),B=Math.max(1,Math.round(Oe.h*E));me.style.width=Ae+"px",me.style.height=B+"px",me.width=Ae*ae,me.height=B*ae};S.useEffect(()=>{_t()},[we,E,$e.length,ae,y]);const Et=me=>{const Oe=q??U??null,Ae=j.current;if(!Ae||!Oe||$e.length===0)return;const B=Ae.getContext("2d");if(!B)return;B.save(),B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,Ae.width,Ae.height),v&&(B.fillStyle=v,B.fillRect(0,0,Ae.width,Ae.height));const R=$e[me];B.scale(ae,ae),B.drawImage(Oe,R.x,R.y,R.w,R.h,0,0,Math.round(R.w*E),Math.round(R.h*E)),B.restore()};return S.useEffect(()=>{if(!we||$e.length===0)return;let me=performance.now();const Oe=1e3/Math.max(1,Math.min(120,d)),Ae=B=>{if(z.current=requestAnimationFrame(Ae),!G){Et(y);return}const R=B-me;if(R<Oe){Et(y);return}me=B-R%Oe,K(P=>{const Q=$e.length-1;let ie=P;return b==="forward"?ie=P+1:b==="backward"?ie=P-1:((P>=Q&&Z.current===1||P<=0&&Z.current===-1)&&(Z.current*=-1),ie=P+Z.current),(ie>Q||ie<0)&&(p?ie=b==="backward"?Q:0:(ie=Math.max(0,Math.min(ie,Q)),ne(!1),Y?.())),ie})};return z.current=requestAnimationFrame(Ae),()=>{z.current&&cancelAnimationFrame(z.current)}},[we,d,G,p,b,$e.length,y]),S.useEffect(()=>{Et(y),J?.(y)},[y,we,E,ae]),S.useEffect(()=>{if(!N)return;const me=()=>{document.hidden&&ne(!1)};return document.addEventListener("visibilitychange",me),()=>document.removeEventListener("visibilitychange",me)},[N]),S.useImperativeHandle(X,()=>({play:()=>ne(!0),pause:()=>ne(!1),toggle:()=>ne(me=>!me),gotoFrame:me=>K(()=>Math.max(0,Math.min(me,Math.max(0,$e.length-1)))),isPlaying:()=>G,currentFrame:()=>y}),[G,y,$e.length]),x.jsx("div",{className:C,style:A,children:x.jsx("canvas",{ref:j,"aria-label":"spritesheet animation"})})});function O0({url:e,className:t}){const[n,r]=S.useState(""),[i,a]=S.useState(null);return S.useEffect(()=>{let s=!1;return Hu(e).then(({sanitized:o})=>{s||(r(o),a(null))}).catch(o=>!s&&a(o.message??"Failed to load")),()=>{s=!0}},[e]),i?x.jsxs("div",{className:t,role:"alert",children:["Couldn’t load SVG: ",i]}):n?x.jsx("div",{className:t,dangerouslySetInnerHTML:{__html:n}}):x.jsx("div",{className:t})}function L0({mobile:e=.6,tablet:t=.8,desktop:n=1}){const[r,i]=S.useState(n);return S.useEffect(()=>{if(typeof window>"u")return;const a=[{mq:window.matchMedia("(max-width: 639px)"),value:e},{mq:window.matchMedia("(min-width: 640px) and (max-width: 1023px)"),value:t},{mq:window.matchMedia("(min-width: 1024px)"),value:n}],s=()=>{for(const{mq:o,value:u}of a)if(o.matches){i(u);break}};return a.forEach(({mq:o})=>o.addEventListener("change",s)),s(),()=>{a.forEach(({mq:o})=>o.removeEventListener("change",s))}},[e,t,n]),r}const ka=({facet:e})=>{const t=Xn(),{mode:n,assetUrl:r,spr_columns:i,spr_fps:a,spr_frameCount:s,spr_frameHeight:o,spr_frameWidth:u,spr_gutterX:c,spr_gutterY:d,spr_rows:f,spr_originX:p,spr_originY:h,spr_scaleDesktop:b,spr_scaleMobile:E,spr_scaleTablet:v}=e,C=L0({mobile:E??.6,tablet:v??.8,desktop:b??1});return x.jsxs("div",{className:"assetContainer",children:[n===ee.AgentDisplayFacetModeType.LOTTIE&&x.jsx(v0,{src:r,autoplay:!0,onError:A=>t.error(A)}),n===ee.AgentDisplayFacetModeType.SVG&&x.jsx("div",{children:x.jsx(O0,{url:r})}),n===ee.AgentDisplayFacetModeType.IMAGE&&x.jsx(w0,{src:r}),n===ee.AgentDisplayFacetModeType.SPRITESHEET&&x.jsx(R0,{src:r,frameCount:s,columns:i,rows:f,fps:a,frameHeight:o,frameWidth:u,gutterX:c,gutterY:d,originX:p,originY:h,scale:C,autoplay:!0})]})},D0=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=S.useContext(Nt);return x.jsxs("div",{className:`launcher
|
|
36
|
+
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function ah(e,t){var n=Ff(t),r=te(te({},Vu),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Ds('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Ds('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Df('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),ih(r),te(te({},r),{formatters:n,formatNumber:th.bind(null,r,n.getNumberFormat),formatNumberToParts:nh.bind(null,r,n.getNumberFormat),formatRelativeTime:Zf.bind(null,r,n.getRelativeTimeFormat),formatDate:Uf.bind(null,r,n.getDateTimeFormat),formatDateToParts:zf.bind(null,r,n.getDateTimeFormat),formatTime:Hf.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:jf.bind(null,r,n.getDateTimeFormat),formatTimeToParts:$f.bind(null,r,n.getDateTimeFormat),formatPlural:Qf.bind(null,r,n.getPluralRules),formatMessage:aa.bind(null,r,n),$t:aa.bind(null,r,n),formatList:qf.bind(null,r,n.getListFormat),formatListToParts:Yu.bind(null,r,n.getListFormat),formatDisplayName:Wf.bind(null,r,n.getDisplayNames)})}function Xu(e){Iu(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Qu=te(te({},Vu),{textComponent:Qe.Fragment});function sh(e){return function(t){return e(Qe.Children.toArray(t))}}function oh(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var a=0;a<i;a++){var s=n[a];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var Pa=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Qe.createContext(null)):Qe.createContext(null);Pa.Consumer;var uh=Pa.Provider,ch=uh,lh=Pa;function Yt(){var e=Qe.useContext(lh);return Xu(e),e}var sa;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(sa||(sa={}));var oa;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(oa||(oa={}));function Ku(e){var t=function(n){var r=Yt(),i=n.value,a=n.children,s=Vr(n,["value","children"]),o=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?r.formatDateToParts(o,s):r.formatTimeToParts(o,s);return a(u)};return t.displayName=oa[e],t}function rr(e){var t=function(n){var r=Yt(),i=n.value,a=n.children,s=Vr(n,["value","children"]),o=r[e](i,s);if(typeof a=="function")return a(o);var u=r.textComponent||Qe.Fragment;return Qe.createElement(u,null,o)};return t.displayName=sa[e],t}function Ju(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=zu(r)?sh(r):r,t},{})}var Fs=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=Ju(r),o=aa.apply(void 0,vt([e,t,n,s],i,!1));return Array.isArray(o)?Qe.Children.toArray(o):o},Us=function(e,t){var n=e.defaultRichTextElements,r=Vr(e,["defaultRichTextElements"]),i=Ju(n),a=ah(te(te(te({},Qu),r),{defaultRichTextElements:i}),t),s={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i};return te(te({},a),{formatMessage:Fs.bind(null,s,a.formatters),$t:Fs.bind(null,s,a.formatters)})};function bi(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}var dh=(function(e){bt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=Wu(),n.state={cache:n.cache,intl:Us(bi(n.props),n.cache),prevConfig:bi(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,a=r.cache,s=bi(n);return oh(i,s)?null:{intl:Us(s,a),prevConfig:s}},t.prototype.render=function(){return Xu(this.state.intl),Qe.createElement(ch,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=Qu,t})(Qe.PureComponent);rr("formatDate");rr("formatTime");rr("formatNumber");rr("formatList");rr("formatDisplayName");Ku("formatDate");Ku("formatTime");const fh={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Discussion limit reached","chatbot.DiscussionLimitReached.explaination":"The discussion has reached its maximum number of messages. Please start a new one.","chatbot.DiscussionLimitReached.cta":"Restart","chatbot.error.api.409":"Oups ! The discussion if full. Please start a new one.","chatbot.error.api.429":"⏳ The chatbot is a little busy at the time. Please try again later.","chatbot.error.api.500":"Oops ! There has been an error. Please try again later.","chatbot.chatline.label.user":"You","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Customer support","chatbot.chatline.loading.function.genericSearchMessage":"Thinking ...","chatbot.chatline.loading.function.search":"Search","chatbot.chatline.loading.function.extractProductName":"Looking into the cavern","chatbot.chatline.loading.function.suggestProductName":"Consulting the shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Looking for ziboublis","chatbot.chatline.loading.function.searchStock":"Searching Stock","chatbot.chatline.loading.function.step":"Step","chatbot.chatline.loading.stepName.search":"Searching ...","chatbot.chatline.loading.stepName.building":"Building Query ...","chatbot.chatline.loading.stepName.analyzing":"Analyzing ...","chatbot.chatline.loading.stepName.redacting":"Writing answer","chatbot.chatline.loading.cancel":"Cancel","chatbot.chatline.seeRecentMessages":"see recent messages","chatbot.widget.menu.open":"Open chat menu","chatbot.widget.menu.startNewDiscussion":"Start a new discussion","chatbot.widget.close":"Close chat","recordingOverlay.recording":"Recording...","recordingOverlay.cancel":"Cancel","recordingOverlay.explaination":"Tap the mic to stop","chatbot.infobanner.title":"You have an archived discussion.","chatbot.infobanner.cta":"See","chatbot.customerSupport.connecting":"Transferring your request to customer support...","chatbot.customerSupport.connected":"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.","chatbot.customerSupport.connectionError":"Customer support is not available right now. Please try again later.","chatbot.customerSupport.providerUnavailable":"Customer support received your request, but live replies are temporarily unavailable. Please try again shortly.","chatbot.customerSupport.closed":"Your customer support conversation is now complete. Start a new conversation if you need more help!","chatbot.customerSupport.restart":"Restart","chatbot.customerSupport.fallback.title":"Leave your contact details","chatbot.customerSupport.fallback.description":"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Phone","chatbot.customerSupport.fallback.submit":"Send","chatbot.customerSupport.fallback.submitting":"Sending...","chatbot.customerSupport.fallback.success":"Your contact details have been saved. Customer support will contact you soon.","chatbot.customerSupport.closedHours.title":"Customer support is currently closed","chatbot.customerSupport.closedHours.description":"Leave your email, phone number and request. Customer support will contact you during opening hours.","chatbot.customerSupport.closedHours.schedulePrefix":"Today:","chatbot.customerSupport.closedHours.reason":"Reason for your request","chatbot.customerSupport.closedHours.success":"Your request has been saved. Customer support will contact you during opening hours.","chatbot.customerSupport.fallback.error":"We could not save your contact details. Please try again.","chatbot.interactiveWidget.submitting":"Sending…","chatbot.interactiveWidget.submitted":"Sent","chatbot.interactiveWidget.cancelled":"Cancelled","chatbot.interactiveWidget.unavailable":"This interaction is no longer available."},hh={"generic.language.english":"Anglais","generic.language.french":"Français","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Maximum de messages envoyés atteint.","chatbot.DiscussionLimitReached.explaination":"Le robot est à son maximum et ne peut plus envoyer de message. Merci de relancer une conversation.","chatbot.DiscussionLimitReached.cta":"Relancer une nouvelle conversation","chatbot.error.api.409":"Oups ! La discussion est à son maximum. Merci d'en commencer une nouvelle.","chatbot.error.api.429":"⏳ Le robot est un peu occupé actuellement. Merci de réessayer plus tard.","chatbot.error.api.500":"Oups ! Une erreur est survenue. Merci de réessayer plus tard !","chatbot.chatline.label.user":"Vous","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Support client","chatbot.chatline.loading.function.search":"Recherche","chatbot.chatline.loading.function.genericSearchMessage":"Je réfléchis ...","chatbot.chatline.loading.function.extractProductName":"Recherche dans la caverne","chatbot.chatline.loading.function.suggestProductName":"Consultation des shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Recherche des ziboublis","chatbot.chatline.loading.function.searchStock":"Recherche en stock","chatbot.chatline.loading.function.step":"Etape","chatbot.chatline.loading.stepName.search":"Recherche ...","chatbot.chatline.loading.stepName.building":"Construction ...","chatbot.chatline.loading.stepName.analyzing":"Analyse ...","chatbot.chatline.loading.stepName.redacting":"Rédaction","chatbot.chatline.loading.cancel":"Annuler","chatbot.chatline.seeRecentMessages":"voir les messages plus récents","chatbot.widget.menu.open":"Ouvrir le menu de discussion","chatbot.widget.menu.startNewDiscussion":"Démarrer une nouvelle discussion","chatbot.widget.close":"Fermer la discussion","recordingOverlay.recording":"Micro activé...","recordingOverlay.cancel":"Annuler","recordingOverlay.explaination":"Appuyez sur le micro pour arrêter","chatbot.infobanner.title":"Vous avez une conversation archivée.","chatbot.infobanner.cta":"Voir","chatbot.customerSupport.connecting":"Transfert de votre demande au support client...","chatbot.customerSupport.connected":"Votre demande a été transmise au support client. Il faut généralement quelques minutes pour obtenir une réponse. Merci de patienter.","chatbot.customerSupport.connectionError":"Le support client n'est pas disponible pour le moment. Merci de réessayer plus tard.","chatbot.customerSupport.providerUnavailable":"Le support client a reçu votre demande, mais les réponses en direct sont temporairement indisponibles. Merci de réessayer dans quelques instants.","chatbot.customerSupport.closed":"Votre échange avec le support client est terminé. Relancez une nouvelle conversation quand vous le souhaitez !","chatbot.customerSupport.restart":"Relancer","chatbot.customerSupport.fallback.title":"Laissez vos coordonnées","chatbot.customerSupport.fallback.description":"Le support client n'a pas encore répondu. Laissez votre email et votre téléphone, nous vous recontacterons prochainement.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Téléphone","chatbot.customerSupport.fallback.submit":"Envoyer","chatbot.customerSupport.fallback.submitting":"Envoi...","chatbot.customerSupport.fallback.success":"Vos coordonnées ont bien été notées. Le support client vous recontactera prochainement.","chatbot.customerSupport.closedHours.title":"Le support client est actuellement fermé","chatbot.customerSupport.closedHours.description":"Laissez votre email, votre téléphone et le motif de votre demande. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.closedHours.schedulePrefix":"Aujourd’hui :","chatbot.customerSupport.closedHours.reason":"Motif de votre demande","chatbot.customerSupport.closedHours.success":"Votre demande a bien été enregistrée. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.fallback.error":"Impossible d'enregistrer vos coordonnées. Merci de réessayer.","chatbot.interactiveWidget.submitting":"Envoi…","chatbot.interactiveWidget.submitted":"Envoyé","chatbot.interactiveWidget.cancelled":"Annulé","chatbot.interactiveWidget.unavailable":"Cette interaction n’est plus disponible."};var ht=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(ht||{});const Gr={[ht.ENGLISH]:{translatedText:fh,pictureName:ht.ENGLISH,langID:0,locale:ht.ENGLISH},[ht.FRENCH]:{translatedText:hh,pictureName:ht.FRENCH,langID:1,locale:ht.FRENCH}},mh=Object.keys(Gr);mh.reduce((e,t)=>{const n=Gr[t];return[...e,n]},[]);const ph="languageSettings",gh=(e,t)=>{let n,r;return typeof window<"u"&&(r=window.localStorage.getItem(ph)),r&&e?.[r]!==void 0?n=e[r]:(n=e[t],n.isDefault=!0),n},bh=(e,t)=>{const[n,r]=C.useState(e[t]),i=a=>{Object.keys(e).includes(a?.locale)?r(a):r(e[ht.ENGLISH])};return C.useEffect(()=>{const a=gh(e,t);a.locale!==t&&r(e[a.locale])},[]),{appCurrentLang:n,handleSetContextCurrentLang:i}},Zu=C.createContext({appCurrentLang:Gr[ht.ENGLISH],setAppCurrentLang:()=>{}}),xt={ai:"ai",customerSupport:"customer_support"},ec=C.createContext({currentConversation:{items:[],discussionId:null},setCurrentConversation:()=>{},archivedConversation:{items:[],discussionId:null},setArchivedConversation:()=>{},chatboxBootState:{mode:xt.ai,customerSupportState:null,reason:"context_default"},setChatboxBootState:()=>{},resetConversationRequestId:0,resetConversation:()=>{}});var Kt={},Ei={},Pn={},Hs;function tc(){if(Hs)return Pn;Hs=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.isUnknownRecord=void 0;const e=t=>typeof t=="object"&&t!==null&&!Array.isArray(t);return Pn.isUnknownRecord=e,Pn}var js;function Eh(){return js||(js=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isInteractiveWidgetResultWithinSizeLimit=e.isInteractiveWidgetResult=e.isInteractiveWidgetV2Request=e.isInteractiveWidgetPresentationWithinSizeLimit=e.isInteractiveWidgetPresentation=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS=e.INTERACTIVE_WIDGET_TYPES=e.INTERACTIVE_WIDGET_RESULT_TOKEN_HEADER=e.INTERACTIVE_WIDGET_VERSION_HEADER=e.INTERACTIVE_WIDGET_PROTOCOL_V2=e.INTERACTIVE_WIDGET_PROTOCOL_V1=e.INTERACTIVE_WIDGET_EVENTS=void 0;const t=tc();e.INTERACTIVE_WIDGET_EVENTS={requested:"interactiveWidget.requested"},e.INTERACTIVE_WIDGET_PROTOCOL_V1=1,e.INTERACTIVE_WIDGET_PROTOCOL_V2=2,e.INTERACTIVE_WIDGET_VERSION_HEADER="X-ChatSystem-Interactive-Widget-Version",e.INTERACTIVE_WIDGET_RESULT_TOKEN_HEADER="X-ChatSystem-Interactive-Widget-Result-Token",e.INTERACTIVE_WIDGET_TYPES={directChatCustomerSupport:"direct_chat_customer_support",callToAction:"call_to_action",structuredForm:"structured_form",cardList:"card_list",statusSummary:"status_summary",explicitConfirmation:"explicit_confirmation"},e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS={maximumPresentationUtf8Bytes:32*1024,maximumResultUtf8Bytes:16*1024,maximumTextCodeUnits:4096,maximumUrlCodeUnits:2048,maximumIdentifierCodeUnits:128,maximumLabelCodeUnits:256,maximumToolCallIdCodeUnits:255,maximumResultTokenCodeUnits:8192,maximumResultStringCodeUnits:16*1024,maximumActionsPerContainer:4,maximumFieldsPerForm:20,maximumCardsPerList:20,maximumItemsPerCollection:50,maximumResultDataEntries:50,maximumResultArrayItems:50};const n=(p,O)=>Object.keys(p).every(S=>O.includes(S)),r=(p,O=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumTextCodeUnits)=>typeof p=="string"&&p.trim().length>0&&p.length<=O,i=(p,O=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumTextCodeUnits)=>p===void 0||r(p,O),a=p=>{if(!r(p,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumUrlCodeUnits))return!1;try{const O=new URL(p);return O.protocol==="http:"||O.protocol==="https:"}catch{return!1}},s=p=>!(0,t.isUnknownRecord)(p)||!r(p.id,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumIdentifierCodeUnits)||!r(p.label,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)||p.style!==void 0&&!["primary","secondary","danger"].includes(String(p.style))?!1:p.kind==="open_url"?n(p,["id","label","style","kind","url"])&&a(p.url):(p.kind==="submit"||p.kind==="cancel")&&n(p,["id","label","style","kind"]),o=(p,O=!1)=>O&&p===void 0?!0:Array.isArray(p)&&p.length>0&&p.length<=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumActionsPerContainer&&p.every(s)&&new Set(p.map(S=>S.id)).size===p.length,u=p=>p===void 0||Array.isArray(p)&&p.length<=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumItemsPerCollection&&p.every(O=>(0,t.isUnknownRecord)(O)&&n(O,["label","value"])&&r(O.label,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&r(O.value)),c=p=>{const O=p.minLength,S=p.maxLength;return O!==void 0&&(!Number.isSafeInteger(O)||Number(O)<0)||S!==void 0&&(!Number.isSafeInteger(S)||Number(S)<1||Number(S)>e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumTextCodeUnits)?!1:O===void 0||S===void 0||Number(O)<=Number(S)},d=p=>!(0,t.isUnknownRecord)(p)||!r(p.id,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumIdentifierCodeUnits)||!r(p.label,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)||p.required!==void 0&&typeof p.required!="boolean"||!i(p.description)?!1:p.type==="checkbox"?n(p,["id","label","required","description","type"]):p.type==="select"?n(p,["id","label","required","description","type","placeholder","options"])&&i(p.placeholder,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&Array.isArray(p.options)&&p.options.length>0&&p.options.length<=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumItemsPerCollection&&p.options.every(O=>(0,t.isUnknownRecord)(O)&&n(O,["value","label"])&&r(O.value,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&r(O.label,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits))&&new Set(p.options.map(O=>O.value)).size===p.options.length:["text","email","tel","textarea"].includes(String(p.type))&&n(p,["id","label","required","description","type","placeholder","minLength","maxLength"])&&i(p.placeholder,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&c(p),f=p=>i(p.title,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&i(p.description),m=p=>{if(!(0,t.isUnknownRecord)(p))return!1;if(p.type===e.INTERACTIVE_WIDGET_TYPES.callToAction)return n(p,["type","title","description","actions"])&&f(p)&&o(p.actions);if(p.type===e.INTERACTIVE_WIDGET_TYPES.structuredForm)return n(p,["type","title","description","fields","submitLabel","cancelLabel"])&&f(p)&&r(p.submitLabel,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&i(p.cancelLabel,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&Array.isArray(p.fields)&&p.fields.length>0&&p.fields.length<=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumFieldsPerForm&&p.fields.every(d)&&new Set(p.fields.map(O=>O.id)).size===p.fields.length;if(p.type===e.INTERACTIVE_WIDGET_TYPES.cardList){const O=Array.isArray(p.cards)?p.cards.flatMap(S=>(0,t.isUnknownRecord)(S)&&Array.isArray(S.actions)?S.actions.filter(t.isUnknownRecord).map(w=>w.id).filter(w=>typeof w=="string"):[]):[];return n(p,["type","title","description","cards"])&&f(p)&&Array.isArray(p.cards)&&p.cards.length>0&&p.cards.length<=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumCardsPerList&&p.cards.every(S=>(0,t.isUnknownRecord)(S)&&n(S,["id","title","description","imageUrl","eyebrow","metadata","actions"])&&r(S.id,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumIdentifierCodeUnits)&&r(S.title,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&i(S.description)&&i(S.eyebrow,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&(S.imageUrl===void 0||a(S.imageUrl))&&u(S.metadata)&&o(S.actions,!0))&&new Set(p.cards.map(S=>S.id)).size===p.cards.length&&new Set(O).size===O.length}return p.type===e.INTERACTIVE_WIDGET_TYPES.statusSummary?n(p,["type","title","description","tone","items","actions"])&&r(p.title,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&i(p.description)&&(p.tone===void 0||["neutral","info","success","warning","danger"].includes(String(p.tone)))&&u(p.items)&&o(p.actions,!0):p.type===e.INTERACTIVE_WIDGET_TYPES.explicitConfirmation?n(p,["type","title","description","confirmLabel","cancelLabel","tone","details"])&&r(p.title,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&i(p.description)&&r(p.confirmLabel,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&r(p.cancelLabel,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumLabelCodeUnits)&&(p.tone===void 0||["neutral","danger"].includes(String(p.tone)))&&u(p.details):!1};e.isInteractiveWidgetPresentation=m;const h=p=>{try{const O=JSON.stringify(p);return typeof O=="string"?new TextEncoder().encode(O).byteLength:null}catch{return null}},g=p=>{const O=h(p);return O!==null&&O<=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumPresentationUtf8Bytes};e.isInteractiveWidgetPresentationWithinSizeLimit=g;const y=p=>(0,t.isUnknownRecord)(p)?p.mode==="none"?n(p,["mode"]):p.mode==="resume_turn"&&n(p,["mode","continuation","resultToken"])&&(0,t.isUnknownRecord)(p.continuation)&&n(p.continuation,["continuationId","expiresAt"])&&r(p.continuation.continuationId,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumIdentifierCodeUnits)&&r(p.continuation.expiresAt,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumIdentifierCodeUnits)&&!Number.isNaN(Date.parse(p.continuation.expiresAt))&&r(p.resultToken,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumResultTokenCodeUnits):!1,v=p=>!(!(0,t.isUnknownRecord)(p)||!n(p,["type","event","protocolVersion","instanceId","widgetType","source","companyId","agentId","discussionId","toolcallId","payload","responsePolicy"])||p.type!=="interactive_widget_request"||p.event!==e.INTERACTIVE_WIDGET_EVENTS.requested||p.protocolVersion!==e.INTERACTIVE_WIDGET_PROTOCOL_V2||!r(p.instanceId,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumIdentifierCodeUnits)||!["llm_tool","client_trigger","system"].includes(String(p.source))||!Number.isSafeInteger(p.companyId)||p.agentId!==null&&!Number.isSafeInteger(p.agentId)||p.discussionId!==null&&!Number.isSafeInteger(p.discussionId)||p.toolcallId!==null&&!r(p.toolcallId,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumToolCallIdCodeUnits)||!(0,e.isInteractiveWidgetPresentation)(p.payload)||!(0,e.isInteractiveWidgetPresentationWithinSizeLimit)(p.payload)||p.widgetType!==p.payload.type||!y(p.responsePolicy));e.isInteractiveWidgetV2Request=v;const A=p=>(0,t.isUnknownRecord)(p)?p.status==="cancelled"?Object.keys(p).length===1:!n(p,["status","actionId","data"])||p.status!=="submitted"||!r(p.actionId,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumIdentifierCodeUnits)||!(0,t.isUnknownRecord)(p.data)||Object.keys(p.data).length>e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumResultDataEntries?!1:Object.entries(p.data).every(([O,S])=>{if(!r(O,e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumIdentifierCodeUnits))return!1;const w=Array.isArray(S)?S:[S];return w.length>e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumResultArrayItems?!1:w.every(B=>B===null||typeof B=="string"&&B.length<=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumResultStringCodeUnits||typeof B=="boolean"||typeof B=="number"&&Number.isFinite(B))}):!1;e.isInteractiveWidgetResult=A;const k=p=>{const O=h(p);return O!==null&&O<=e.INTERACTIVE_WIDGET_PROTOCOL_V2_LIMITS.maximumResultUtf8Bytes};e.isInteractiveWidgetResultWithinSizeLimit=k})(Ei)),Ei}var Ti={},zs;function Th(){return zs||(zs=1,Object.defineProperty(Ti,"__esModule",{value:!0})),Ti}var $s;function yh(){return $s||($s=1,(function(e){var t=Kt&&Kt.__createBinding||(Object.create?(function(g,y,v,A){A===void 0&&(A=v);var k=Object.getOwnPropertyDescriptor(y,v);(!k||("get"in k?!y.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return y[v]}}),Object.defineProperty(g,A,k)}):(function(g,y,v,A){A===void 0&&(A=v),g[A]=y[v]})),n=Kt&&Kt.__exportStar||function(g,y){for(var v in g)v!=="default"&&!Object.prototype.hasOwnProperty.call(y,v)&&t(y,g,v)};Object.defineProperty(e,"__esModule",{value:!0}),e.formatCustomerSupportProviderText=e.IDENTITY_GATE_VERSION_HEADER=e.IDENTITY_GATE_REQUIRED_EVENT=e.IDENTITY_GATE_PROTOCOL_VERSION=e.IDENTITY_GATE_PROTOCOL_V2=e.IDENTITY_GATE_PROTOCOL_V1=e.OutputStreamTypesEnum=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE=e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=e.readOptionalNullableString=e.readOptionalString=e.readOptionalNullableNumber=e.readOptionalNumber=e.AgentDisplayFacetRoleType=e.AgentDisplayFacetModeType=void 0,n(Eh(),e),n(Th(),e),n(tc(),e);var r;(function(g){g.SPRITESHEET="spritesheet",g.LOTTIE="lottie",g.IMAGE="image",g.SVG="svg",g.VIDEO="video"})(r||(e.AgentDisplayFacetModeType=r={}));var i;(function(g){g.LAUNCHER="launcher",g.ASSISTANT="assistant",g.SEARCH="search"})(i||(e.AgentDisplayFacetRoleType=i={}));const a=g=>typeof g=="number"&&Number.isFinite(g)?g:void 0;e.readOptionalNumber=a;const s=g=>g===null?null:(0,e.readOptionalNumber)(g);e.readOptionalNullableNumber=s;const o=g=>typeof g=="string"?g:void 0;e.readOptionalString=o;const u=g=>g===null?null:(0,e.readOptionalString)(g);e.readOptionalNullableString=u,e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=5,e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE="Europe/Paris",e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=[{dayOfWeek:1,key:"monday",defaultLabel:"Monday"},{dayOfWeek:2,key:"tuesday",defaultLabel:"Tuesday"},{dayOfWeek:3,key:"wednesday",defaultLabel:"Wednesday"},{dayOfWeek:4,key:"thursday",defaultLabel:"Thursday"},{dayOfWeek:5,key:"friday",defaultLabel:"Friday"},{dayOfWeek:6,key:"saturday",defaultLabel:"Saturday"},{dayOfWeek:7,key:"sunday",defaultLabel:"Sunday"}],e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=[1,2,3,4,5];var c;(function(g){g.OUTPUT_STREAM_MESSAGE_START="message_start",g.OUTPUT_STREAM_MESSAGE_DELTA="message_delta",g.OUTPUT_STREAM_MESSAGE_END="message_end",g.OUTPUT_STREAM_CLIENT_EVENT="client_event",g.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE="number_of_steps",g.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE="current_step_number",g.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE="current_step_name",g.OUTPUT_STREAM_ERROR="error"})(c||(e.OutputStreamTypesEnum=c={})),e.IDENTITY_GATE_PROTOCOL_V1=1,e.IDENTITY_GATE_PROTOCOL_V2=2,e.IDENTITY_GATE_PROTOCOL_VERSION=e.IDENTITY_GATE_PROTOCOL_V1,e.IDENTITY_GATE_REQUIRED_EVENT="identity.required",e.IDENTITY_GATE_VERSION_HEADER="X-ChatSystem-Identity-Gate-Version";const d={"+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",clap:"👏",wave:"👋",raised_hands:"🙌",pray:"🙏",muscle:"💪",ok_hand:"👌",point_up:"☝️",point_down:"👇",point_left:"👈",point_right:"👉",eyes:"👀",brain:"🧠",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",broken_heart:"💔",fire:"🔥",tada:"🎉",sparkles:"✨",star:"⭐",white_check_mark:"✅",heavy_check_mark:"✔️",x:"❌",warning:"⚠️",information_source:"ℹ️",question:"❓",exclamation:"❗",bulb:"💡",memo:"📝",pushpin:"📌",paperclip:"📎",link:"🔗",lock:"🔒",unlock:"🔓",bell:"🔔",phone:"☎️",email:"✉️",incoming_envelope:"📨",package:"📦",truck:"🚚",moneybag:"💰",credit_card:"💳",gift:"🎁",shopping_bags:"🛍️",clock3:"🕒",hourglass_flowing_sand:"⏳",rocket:"🚀",smile:"😄",smiley:"😃",grinning:"😀",slightly_smiling_face:"🙂",wink:"😉",blush:"😊",relaxed:"☺️",heart_eyes:"😍",thinking_face:"🤔",neutral_face:"😐",confused:"😕",worried:"😟",cry:"😢",sob:"😭",sweat_smile:"😅",joy:"😂",rofl:"🤣",upside_down_face:"🙃",sunglasses:"😎",tada_face:"🥳",angry:"😠",rage:"😡",face_with_symbols_on_mouth:"🤬",scream:"😱",zipper_mouth_face:"🤐",skin_tone_2:"🏻",skin_tone_3:"🏼",skin_tone_4:"🏽",skin_tone_5:"🏾",skin_tone_6:"🏿"},f=g=>g.replace(/-/g,"_"),m=g=>g.replace(/:([a-zA-Z0-9_+\-]+):/g,(y,v)=>d[f(v)]??y),h=({text:g,provider:y})=>y==="slack"?m(g):g;e.formatCustomerSupportProviderText=h})(Kt)),Kt}var ee=yh();const yi=e=>({mode:ee.AgentDisplayFacetModeType.SVG,role:e}),xh=()=>({branding:{poweredByChatSystemVisible:!0},interactiveWidgets:{available:[{widgetType:ee.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport,enabled:!0}]},agent:{display:{name:"",CSSRules:"",[ee.AgentDisplayFacetRoleType.LAUNCHER]:yi(ee.AgentDisplayFacetRoleType.LAUNCHER),[ee.AgentDisplayFacetRoleType.ASSISTANT]:yi(ee.AgentDisplayFacetRoleType.ASSISTANT),[ee.AgentDisplayFacetRoleType.SEARCH]:yi(ee.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:"",conversationStarters:[]},customNameToDisplay:"",isAudioAllowed:!0},api:{settings:{maxUserMessagesPerDiscussion:20},tracking:{queryParamToAppend:""}}}),Rt=C.createContext({companySettings:xh(),setCompanySettings:()=>{}}),Ma=()=>{const e=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:3080"),t=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:5173");return e||t};class nc{enabled;constructor({isLocalDev:t,shouldDisplayLogs:n}){this.enabled=t||n}log(...t){this.enabled&&console.log(...t)}warn(...t){this.enabled&&console.warn(...t)}error(...t){this.enabled&&console.error(...t)}}let _h=new nc({isLocalDev:Ma(),shouldDisplayLogs:!1});const Sh=e=>new nc({isLocalDev:Ma(),shouldDisplayLogs:!!e}),Ft=()=>_h,Ch=e=>Object.values(ht).includes(e),Ih=(e,t)=>{const n=t??Ft();return Ch(e)?e:(n.warn(`Language ${e} not handled for now. Using ${ht.ENGLISH}.`),ht.ENGLISH)},Ah=e=>{const t=new URL(e);if(t.username||t.password)throw new Error("CHAT_SYSTEM_API_URL_MUST_NOT_CONTAIN_CREDENTIALS");const n=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol!=="https:"&&!(t.protocol==="http:"&&n))throw new Error("CHAT_SYSTEM_API_URL_MUST_USE_HTTPS");if(t.search||t.hash)throw new Error("CHAT_SYSTEM_API_URL_MUST_NOT_CONTAIN_QUERY_OR_HASH");const r=t.pathname.replace(/\/+$/,"");return`${t.origin}${r}`};class on{constructor(){}static getApiUrl=t=>t!==void 0?Ah(t):Ma()?"http://localhost:3001":"https://www.api.chatsystem.ai";static getHeaders=({contentType:t="text/plain"})=>({"Content-Type":t});static getFetchConfig=({contentType:t="text/plain",httpVerb:n="GET",body:r,options:i={}})=>{const a={method:n,headers:this.getHeaders({contentType:t}),...i};return r&&(a.body=JSON.stringify(r)),a}}const rc=C.createContext(null);function wh({apiUrl:e,children:t}){const n=C.useMemo(()=>on.getApiUrl(e),[e]);return b.jsx(rc.Provider,{value:n,children:t})}function Yr(){return C.useContext(rc)??on.getApiUrl()}const Ba="chatsystem-widget",vh=1440*60*1e3,ic=e=>ee.isInteractiveWidgetV2Request(e)?e:null;function gr(e){return typeof e=="string"&&!Number.isNaN(Date.parse(e))}function kh(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.timeoutMinutes!="number"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean")}function Nh(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean"||typeof e.requireReason!="boolean")}function Rh(e){if(typeof e!="object"||e===null||typeof e.discussionId!="number"||typeof e.reconnectToken!="string"||!gr(e.startedAt)||!gr(e.updatedAt)||e.reconnectTokenExpiresAt!==void 0&&!gr(e.reconnectTokenExpiresAt)||e.closedAt!==void 0&&!gr(e.closedAt)||e.closedReason!==void 0&&typeof e.closedReason!="string")return!1;const t=e.mode??"live_chat";return t==="closed_hours_contact_capture"?!(!["active","closed"].includes(e.status)||typeof e.customerSupportSessionId!="number"||!Nh(e.closedHoursContactCapture)||typeof e.businessHours!="object"||e.businessHours===null||typeof e.businessHours.timezone!="string"||e.businessHours.todayScheduleLabel!==void 0&&typeof e.businessHours.todayScheduleLabel!="string"):!(t!=="live_chat"||!["connecting","active","closed"].includes(e.status)||typeof e.socketUrl!="string"||e.customerSupportSessionId!==void 0&&typeof e.customerSupportSessionId!="number"||e.isWaitingForFirstProviderReply!==void 0&&typeof e.isWaitingForFirstProviderReply!="boolean"||e.fallbackContactCapture!==void 0&&!kh(e.fallbackContactCapture))}function Oh(e){if(typeof e!="object"||e===null||e.userType!=="user"&&e.userType!=="assistant"||"content"in e&&e.content!==void 0&&typeof e.content!="string")return!1;if("metaData"in e&&e.metaData!==void 0){if(typeof e.metaData!="object"||e.metaData===null||"isErrorMessage"in e.metaData&&e.metaData.isErrorMessage!==void 0&&typeof e.metaData.isErrorMessage!="boolean"||"messageKind"in e.metaData&&e.metaData.messageKind!==void 0&&!["conversation","system"].includes(e.metaData.messageKind)||"systemEvent"in e.metaData&&e.metaData.systemEvent!==void 0&&!["customer_support_connecting","customer_support_connected","customer_support_closed","customer_support_connection_error"].includes(e.metaData.systemEvent)||"customerSupportAuthorName"in e.metaData&&e.metaData.customerSupportAuthorName!==void 0&&typeof e.metaData.customerSupportAuthorName!="string")return!1;if("interactiveWidget"in e.metaData){const t=e.metaData.interactiveWidget;if(typeof t!="object"||t===null||t.protocolVersion!==2||typeof t.instanceId!="string"||!["none","resume_turn"].includes(t.responseMode)||!["active","submitting","submitted","cancelled","unavailable"].includes(t.state)||!ic({type:"interactive_widget_request",event:"interactiveWidget.requested",protocolVersion:2,instanceId:t.instanceId,widgetType:t.widgetType,source:"system",companyId:1,agentId:null,discussionId:null,toolcallId:null,payload:t.presentation,responsePolicy:{mode:"none"}}))return!1}}return!0}function Lh(e){return!(typeof e!="object"||e===null||!Array.isArray(e.items)||!e.items.every(Oh)||e.discussionId!==null&&typeof e.discussionId!="number"||typeof e.updatedAt!="string"||Number.isNaN(Date.parse(e.updatedAt))||e.customerSupport!==void 0&&e.customerSupport!==null&&!Rh(e.customerSupport))}function Dh(e){const t=Ft();if(typeof window>"u")return;const n=e.key??Ba,r={items:e.conversation.items,discussionId:e.conversation.discussionId,updatedAt:new Date().toISOString(),customerSupport:e.customerSupport??null};try{const i=JSON.stringify(r);window.localStorage.setItem(n,i)}catch(i){t.error("Failed to save chat state to localStorage",i)}}function ac(e){const t=Ft();if(typeof window>"u")return null;const n=e?.key??Ba,r=window.localStorage.getItem(n);if(!r)return null;try{const i=JSON.parse(r);return Lh(i)?i:(t.warn("Chat state in localStorage has unexpected shape, ignoring."),null)}catch(i){return t.error("Failed to parse chat state from localStorage",i),null}}function Ph(e){if(typeof window>"u")return null;const t=e??Ba;window.localStorage.removeItem(t)}function Mh(e,t=Date.now()){return t-e}function Bh(e,t=Date.now()){return Mh(new Date(e).getTime(),t)<=vh}function Fh({settings:e,setCurrentConversation:t,setArchivedConversation:n,restoreStoredConversation:r=!0,storageKey:i}){const a=r?ac({key:i}):null;if(!a){t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]});return}Bh(a.updatedAt)?t({discussionId:a.discussionId,items:a.items,updatedAt:a.updatedAt}):(t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]}),n({discussionId:a.discussionId,items:a.items,updatedAt:a.updatedAt}))}const sc=C.createContext(Ft()),ir=()=>C.useContext(sc),oc=(e,t)=>{if(t===null)return"discussion_not_loaded";if(t!==e.discussionId)return"discussion_mismatch";if(e.status==="closed")return"session_closed";if(!e.reconnectToken)return"missing_reconnect_token";if(e.mode==="closed_hours_contact_capture")return null;if(!e.socketUrl)return"missing_socket_url";if(e.reconnectTokenExpiresAt){const n=Date.parse(e.reconnectTokenExpiresAt);if(Number.isNaN(n))return"invalid_reconnect_expiration";if(n<=Date.now())return"expired_reconnect_token"}return null},Uh=e=>{const t=ac({key:e}),n=t?.customerSupport??null;if(!n)return{mode:xt.ai,customerSupportState:null,reason:"no_customer_support_state"};const r=oc(n,t?.discussionId??null);return r==="session_closed"?{mode:xt.customerSupport,customerSupportState:n,reason:r}:r?{mode:xt.ai,customerSupportState:null,reason:r}:{mode:xt.customerSupport,customerSupportState:n,reason:"valid_reconnect_state"}},Hh=async e=>{const t={apiUrl:e.apiUrl,appToken:e.appToken,agentId:e.agentId};return e.runtimeAdapter?e.runtimeAdapter.loadCompanySettings(t):e.loadStandardSettings(t)},jh=async e=>{const t=on.getFetchConfig({httpVerb:"GET",contentType:"application/json"}),n=`${e.apiUrl}/company/settings/${e.appToken}/${e.agentId}`;return await(await fetch(n,{...t,credentials:"omit"})).json()},zh="chatsystem-widget",Fa=e=>{const t=e.agentId??"default";return`${encodeURIComponent(e.appToken)}:${t}`},uc=e=>`${zh}:${Fa(e)}`,$h=({agentId:e,appToken:t,onFetched:n,runtimeAdapter:r})=>{const i=ir(),a=Yr(),s=C.useMemo(()=>uc({appToken:t,agentId:e}),[t,e]),[o,u]=C.useState({}),c={companySettings:o,setCompanySettings:u},[d,f]=C.useState({discussionId:null,items:[],updatedAt:null}),[m,h]=C.useState({discussionId:null,items:[],updatedAt:null}),[g,y]=C.useState(()=>r?{mode:xt.ai,customerSupportState:null,reason:"runtime_adapter_uses_fresh_conversation"}:Uh(s)),[v,A]=C.useState(0),p={currentConversation:d,setCurrentConversation:f,archivedConversation:m,setArchivedConversation:h,chatboxBootState:g,setChatboxBootState:y,resetConversationRequestId:v,resetConversation:()=>{r||Ph(s),y({mode:xt.ai,customerSupportState:null,reason:"manual_start_new_conversation"}),f({discussionId:null,items:[{userType:"assistant",content:o?.agent?.text?.initialText,temporaryId:crypto.randomUUID()}],updatedAt:null}),A(O=>O+1)}};return C.useEffect(()=>{Hh({apiUrl:a,appToken:t,agentId:e,runtimeAdapter:r,loadStandardSettings:jh}).then(O=>{u(O),Fh({settings:O,setCurrentConversation:f,setArchivedConversation:h,restoreStoredConversation:!r,storageKey:s}),n?.()}).catch(O=>{i.warn("error in settings fetch",O)})},[t,e,a,s,i,n,r]),{contextCompanySettings:c,contextInitialConversationState:p}};async function Vh(e,t=URL.createObjectURL){if(!e.ok)throw new Error(`IMAGE_PRELOAD_FAILED_HTTP_${e.status}`);const n=await e.blob();return t(n)}const Cn=globalThis;Cn.__WIDGET_ASSET_CACHE__||(Cn.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});Cn.__WIDGET_PRELOAD_KEYS__||(Cn.__WIDGET_PRELOAD_KEYS__=new Set);const xi=Cn.__WIDGET_PRELOAD_KEYS__,Vt=Cn.__WIDGET_ASSET_CACHE__,Wh="widget-assets-v1";async function qr(e,t){const n=Ft();try{const r=await caches.open(Wh),i=await r.match(e,{ignoreSearch:!1});if(i)return i.clone();const a=await fetch(e,{cache:"force-cache",mode:"cors",keepalive:!0,...t});if(!a.ok)throw new Error(`HTTP ${a.status} for ${e}`);return r.put(e,a.clone()),a}catch(r){return n.warn("error while fetching",r),new Response(null,{status:520,statusText:"Error in client - Fetch failed"})}}async function cc(e){const t=Vt.svg.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await qr(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(i,"image/svg+xml"),o=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(o,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:i}})();return Vt.svg.set(e,{promise:n,ts:Date.now()}),n}function lc(e){const t=Vt.img.get(e);if(t)return t.promise;const n=(async()=>{const r=await qr(e);return{blobUrl:await Vh(r)}})();return Vt.img.set(e,{promise:n,ts:Date.now()}),n}function dc(e){const t=Vt.lot.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await qr(e)).arrayBuffer(),a=new Uint8Array(i);if(a.length>=4&&a[0]===80&&a[1]===75&&a[2]===3&&a[3]===4||e.endsWith(".lottie"))return{kind:"zip",blobUrl:URL.createObjectURL(new Blob([i],{type:"application/zip"}))};const o=new TextDecoder().decode(a);return{kind:"json",data:JSON.parse(o)}})();return Vt.lot.set(e,{promise:n,ts:Date.now()}),n}function fc(e){const t=Vt.spr.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await qr(e)).blob();let a=null;try{a=await createImageBitmap(i)}catch{a=null}const{imgEl:s,width:o,height:u}=await new Promise((c,d)=>{const f=URL.createObjectURL(i),m=new Image;m.crossOrigin="anonymous",m.onload=()=>{const h=m.naturalWidth,g=m.naturalHeight;c({imgEl:m,width:h,height:g})},m.onerror=()=>{URL.revokeObjectURL(f),d(new Error("Spritesheet image decode failed"))},m.src=f,m.decode?.().catch(()=>{})});return{imgEl:s,bitmap:a,width:o,height:u}})();return Vt.spr.set(e,{promise:n,ts:Date.now()}),n}function Gh(e){e.images?.forEach(t=>void lc(t)),e.svgs?.forEach(t=>void cc(t)),e.lotties?.forEach(t=>void dc(t)),e.sprites?.forEach(t=>void fc(t))}function Yh(e){const t=Ft();try{const n=document.createElement("link");n.rel="preconnect",n.href=e,n.crossOrigin="anonymous",document.head.appendChild(n);const r=document.createElement("link");r.rel="dns-prefetch",r.href=e,document.head.appendChild(r)}catch(n){t.warn("error in injectPreconnect",n)}}function hc(e){return new URL(e,document.baseURI).toString()}function qh(e,t){const n=document.head.querySelectorAll('link[rel="preload"]');for(const r of n)if((e?r.as===e||r.getAttribute("as")===e:!0)&&r.href===t)return!0;return!1}function br(e,t,n,r){const i=hc(n),a=`${e}|${t??""}|${i}`;if(xi.has(a))return;if(qh(t,i)){xi.add(a);return}const s=document.createElement("link");s.rel=e,t&&(s.as=t),s.href=i,s.crossOrigin="anonymous",r&&(s.type=r),s.setAttribute("data-chatsystem-preload","1"),document.head.appendChild(s),xi.add(a)}function Xh(e){const t=s=>Array.from(new Set((s??[]).map(hc))),n=t(e.images),r=t(e.svgs),i=t(e.lotties),a=t(e.sprites);n.forEach(s=>br("preload","image",s)),r.forEach(s=>br("preload","fetch",s,"image/svg+xml")),i.forEach(s=>br("preload","fetch",s,"application/zip")),a.forEach(s=>br("preload","fetch",s))}function Qh(e,t){const{manifest:n,origins:r}=Kh(e,t);r.forEach(Yh),Xh(n),Gh(n)}function Kh(e,t){const n=t??Ft(),r=Jh(e),i=new Set,a=new Set,s=new Set,o=new Set;for(const{url:d,mode:f}of r)switch(Zh(f,d,n)){case"svg":a.add(d);break;case"lottie":s.add(d);break;case"spritesheet":o.add(d);break;case"image":i.add(d);break}const u={images:Array.from(i),svgs:Array.from(a),lotties:Array.from(s),sprites:Array.from(o)},c=e0(u,n);return{manifest:u,origins:c}}function Jh(e){if(!e?.agent?.display)return[];const t=e.agent.display,n=[t.launcher,t.assistant,t.search].filter(Boolean),r=[];for(const i of n)i?.assetUrl&&r.push({url:i.assetUrl,mode:i.mode});return r}function Zh(e,t,n){if(e)switch(e){case"svg":return"svg";case"lottie":return"lottie";case"spritesheet":return"spritesheet";case"image":return"image";case"video":return"video"}try{const i=new URL(t,document.baseURI).pathname.toLowerCase();if(i.endsWith(".svg"))return"svg";if(i.endsWith(".lottie")||i.endsWith(".zip")||i.endsWith(".json"))return i.endsWith(".json"),"lottie";if(/\.(png|webp|jpg|jpeg|gif|avi,ef)$/.test(i))return"image";if(/\.(mp4|webm|mov|m4v|ogg)$/.test(i))return"video"}catch(r){n.warn("error in normalizeKind:",r)}return"unknown"}function e0(e,t){const n=new Set,r=i=>{if(i)try{const a=new URL(i,document.baseURI);n.add(`${a.protocol}//${a.host}`)}catch(a){t.warn("error in uniqueOriginsFromManifest",a)}};return(e.images??[]).forEach(r),(e.svgs??[]).forEach(r),(e.lotties??[]).forEach(r),(e.sprites??[]).forEach(r),Array.from(n)}const mc=C.createContext(void 0),pc=C.createContext(void 0),t0=()=>C.useContext(pc),Xr=()=>{const e=C.useContext(ec);if(!e)throw new Error("useChatbotConversation must be used within ChatbotInitialtextContext.Provider");const{currentConversation:t,setCurrentConversation:n,archivedConversation:r,setArchivedConversation:i,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,resetConversation:u}=e,c=S=>{n(w=>({...w,discussionId:S}))},d=S=>{n(w=>({...w,items:S}))},f=S=>{n(w=>({...w,items:[...w.items,S]}))},m=({messageStreamId:S,role:w})=>{n(B=>B.items.some(K=>K.metaData?.messageStreamId===S)?B:{...B,items:[...B.items,{userType:w,content:"",metaData:{messageStreamId:S},temporaryId:crypto.randomUUID()}]})},h=(S,w)=>{n(B=>({...B,items:B.items.map(K=>{const Y=K.metaData?.interactiveWidget;return!Y||Y.instanceId!==S?K:{...K,metaData:{...K.metaData,interactiveWidget:w(Y)}}})}))},g=()=>{n(S=>({...S,items:S.items.filter(w=>!(w.content?.length===0&&w.userType==="assistant"))}))},y=()=>{n(S=>{const w=[...S.items];return w.pop(),{...S,items:w}})},v=S=>{n(w=>({...w,updatedAt:S.updatedAt}))},A=()=>{i({discussionId:null,items:[],updatedAt:null})};return{currentConversation:t,setCurrentConversation:n,setCurrentConversationId:c,setCurrentConversationMetadata:v,resetConversation:u,setCurrentConversationItems:d,addMessageToCurrentConversation:f,removeEmptyAssistantMessageFromCurrentConversation:g,removeLastMessageFromCurrentConversation:y,updateCurrentConversationLastMessage:({newContent:S})=>{n(w=>{const B=[...w.items],K=B.length-1,Y=B[K];return B[K]={...Y,content:Y.content=S},{...w,items:B}})},archivedConversation:r,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,setArchivedConversationAsMain:()=>{n(r),A()},addEmptyMessageToCurrentConversation:m,updateCurrentConversationMessageById:({newContent:S,id:w})=>{n(B=>{const K=[...B.items],Y=K.findIndex(H=>H.metaData?.messageStreamId===w),N=K[Y];return K[Y]={...N,content:N.content=S},{...B,items:K}})},updateInteractiveWidget:h}},n0=30,r0=e=>{try{const t=e.split(".")[1];if(!t)return null;const n=t.replace(/-/g,"+").replace(/_/g,"/"),r=n.padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return typeof i.exp=="number"?i.exp:null}catch{return null}};class i0{token=null;expiresAt=null;pendingRequest=null;pendingRequestIsInteractive=!1;generation=0;provider;constructor(t){this.provider=t}clear(){this.generation+=1,this.token=null,this.expiresAt=null,this.pendingRequest=null,this.pendingRequestIsInteractive=!1}handleIdentityChanged(){this.token=null,this.expiresAt=null,!(this.pendingRequest&&this.pendingRequestIsInteractive)&&(this.generation+=1,this.pendingRequest=null,this.pendingRequestIsInteractive=!1)}async getToken(t){if(!this.provider)return null;const n=Math.floor(Date.now()/1e3);if(this.token&&this.expiresAt!=null&&this.expiresAt-n0>n)return this.token;if(this.pendingRequest){const a=this.pendingRequestIsInteractive,s=await this.pendingRequest;if(s||!t.interactive||a)return s}const r=this.generation;this.pendingRequestIsInteractive=t.interactive;let i;return i=this.provider.getToken(t).then(a=>{if(r!==this.generation)return null;if(!a)return this.clear(),null;const s=r0(a);return s==null||s<=Math.floor(Date.now()/1e3)?(this.clear(),null):(this.token=a,this.expiresAt=s,a)}).finally(()=>{this.pendingRequest===i&&(this.pendingRequest=null,this.pendingRequestIsInteractive=!1)}),this.pendingRequest=i,i}}const a0=async({apiUrl:e,appToken:t,payload:n,identitySession:r,fetchImplementation:i=fetch})=>{let a=null,s;try{a=await r.getToken({interactive:!0,reason:n.reason,requiredCapabilities:n.requiredCapabilities}),a||(a=await r.getToken({interactive:!1,reason:n.reason,requiredCapabilities:n.requiredCapabilities})),s=a?{status:"success"}:{status:"cancelled"}}catch{r.clear(),s={status:"failed",code:"HOST_IDENTITY_FAILED"}}const o=await i(`${e}/ai/identity-gates/${encodeURIComponent(t)}/${encodeURIComponent(n.gateId)}/result`,{method:"POST",headers:{"Content-Type":"application/json","X-ChatSystem-Identity-Gate-Token":n.resultToken,...a?{Authorization:`Bearer ${a}`}:{}},body:JSON.stringify(s)});if(!o.ok)throw o.status===401&&a&&r.clear(),new Error(`IDENTITY_GATE_RESOLUTION_FAILED:${o.status}`)},s0="chatsystem:pending-turn:",o0=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Ua=e=>`${s0}${encodeURIComponent(e)}`,gc=(e,t=Date.now())=>{if(!e||typeof e!="object"||Array.isArray(e))return null;const n=e;if(typeof n.continuationId!="string"||!o0.test(n.continuationId)||typeof n.expiresAt!="string"||typeof n.discussionId!="number"||!Number.isSafeInteger(n.discussionId)||n.discussionId<=0)return null;const r=Date.parse(n.expiresAt);return!Number.isFinite(r)||r<=t?null:{continuationId:n.continuationId,expiresAt:n.expiresAt,discussionId:n.discussionId}},u0=(e,t,n,r=sessionStorage)=>{const i=gc({...t,discussionId:n});i&&r.setItem(Ua(e),JSON.stringify(i))},c0=(e,t=sessionStorage,n=Date.now())=>{const r=Ua(e),i=t.getItem(r);if(!i)return null;try{const a=gc(JSON.parse(i),n);if(a)return a}catch{}return t.removeItem(r),null},Vs=(e,t=sessionStorage)=>{t.removeItem(Ua(e))},l0=async({apiUrl:e,appToken:t,discussionId:n,continuation:r,identitySession:i,fetchImplementation:a=fetch})=>{if(!Number.isSafeInteger(n)||n<=0)return null;const s=await i.getToken({interactive:!1});if(!s)return null;const o={discussionId:n};return a(`${e}/ai/pending-turns/${encodeURIComponent(t)}/${encodeURIComponent(r.continuationId)}/resume`,{method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},body:JSON.stringify(o)})},d0=e=>e>=200&&e<300||e>=400&&e<500&&e!==429||e===503,f0=e=>{if(!ee.isUnknownRecord(e))return;const t=ee.readOptionalNumber(e.timeoutMinutes)??ee.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES;return{enabled:e.enabled===!0,timeoutMinutes:Math.max(1,Math.min(120,Math.round(t))),requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1}},h0=e=>{if(ee.isUnknownRecord(e))return{enabled:e.enabled!==!1,requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1,requireReason:e.requireReason!==!1}},m0=e=>{if(!ee.isUnknownRecord(e))return null;const t=e;if(t.type!=="interactive_widget_request"||t.event!=="interactiveWidget.requested"||t.widgetType!==ee.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport||!ee.isUnknownRecord(t.payload))return null;const n=t.payload;if((ee.readOptionalString(n.mode)??"live_chat")==="closed_hours_contact_capture"){const s=ee.readOptionalString(n.reconnectToken),o=ee.readOptionalNumber(n.customerSupportSessionId),u=h0(n.closedHoursContactCapture);if(n.transport!=="none"||!s||!o||!u||!u.enabled)return null;const c=ee.isUnknownRecord(n.businessHours)?n.businessHours:{};return{mode:"closed_hours_contact_capture",transport:"none",reconnectToken:s,reconnectTokenExpiresAt:ee.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:o,companyId:ee.readOptionalNumber(t.companyId),agentId:ee.readOptionalNullableNumber(t.agentId),discussionId:ee.readOptionalNullableNumber(t.discussionId)??null,toolcallId:ee.readOptionalNullableString(t.toolcallId),closedHoursContactCapture:u,businessHours:{timezone:ee.readOptionalString(c.timezone)??ee.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE,todayScheduleLabel:ee.readOptionalString(c.todayScheduleLabel)}}}if(n.transport!=="socket"||typeof n.socketUrl!="string")return null;const i=ee.readOptionalString(n.handoffToken),a=ee.readOptionalString(n.reconnectToken);return!i&&!a?null:{mode:"live_chat",transport:"socket",socketUrl:n.socketUrl,handoffToken:i,reconnectToken:a,reconnectTokenExpiresAt:ee.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:ee.readOptionalNumber(n.customerSupportSessionId),companyId:ee.readOptionalNumber(t.companyId),agentId:ee.readOptionalNullableNumber(t.agentId),discussionId:ee.readOptionalNullableNumber(t.discussionId)??null,toolcallId:ee.readOptionalNullableString(t.toolcallId),fallbackContactCapture:f0(n.fallbackContactCapture)}},p0=e=>m0(e),g0=/^[a-zA-Z0-9][a-zA-Z0-9:._-]*$/,b0=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,E0=e=>{if(!ee.isUnknownRecord(e)||e.protocolVersion!==ee.IDENTITY_GATE_PROTOCOL_V1&&e.protocolVersion!==ee.IDENTITY_GATE_PROTOCOL_V2||typeof e.gateId!="string"||e.gateId.length<1||e.gateId.length>100||typeof e.toolCallId!="string"||e.toolCallId.length<1||e.toolCallId.length>255||typeof e.resultToken!="string"||e.resultToken.length<32||e.resultToken.length>512||typeof e.expiresAt!="string"||!Number.isFinite(Date.parse(e.expiresAt))||e.reason!=="identity_required"&&e.reason!=="identity_expired"||!Array.isArray(e.requiredCapabilities)||e.requiredCapabilities.length<1||e.requiredCapabilities.length>50||!e.requiredCapabilities.every(n=>typeof n=="string"&&n.length<=100&&g0.test(n)))return null;const t={gateId:e.gateId,toolCallId:e.toolCallId,requiredCapabilities:[...new Set(e.requiredCapabilities)].sort(),reason:e.reason,expiresAt:e.expiresAt,resultToken:e.resultToken};return e.protocolVersion===ee.IDENTITY_GATE_PROTOCOL_V1?{protocolVersion:ee.IDENTITY_GATE_PROTOCOL_V1,...t}:!ee.isUnknownRecord(e.continuation)||typeof e.continuation.continuationId!="string"||!b0.test(e.continuation.continuationId)||typeof e.continuation.expiresAt!="string"||!Number.isFinite(Date.parse(e.continuation.expiresAt))?null:{protocolVersion:ee.IDENTITY_GATE_PROTOCOL_V2,...t,continuation:{continuationId:e.continuation.continuationId,expiresAt:e.continuation.expiresAt}}},T0=e=>{if(e.event===ee.IDENTITY_GATE_REQUIRED_EVENT){const r=E0(e.payload);if(r)return{type:"identity_gate_required",payload:r}}const t=ic(e.payload);if(t)return{type:"interactive_widget_requested",payload:t};const n=p0(e.payload);return n?{type:"customer_support_handoff_requested",payload:n}:{type:"unhandled_client_event",event:e}};class Mt{pending="";logger;constructor(t=console){this.logger=t}transformNDJSONChunkIntoObjects(t){this.pending+=t;const n=this.pending.split(/\r?\n/);this.pending=n.pop()??"";const r=[];for(const i of n){const a=i.trim();if(a)try{r.push(JSON.parse(a))}catch{this.logger.warn("[NDJSON] Could not parse line:",a)}}return r}flushPending(){const t=this.pending.trim();if(this.pending="",!t)return[];try{return[JSON.parse(t)]}catch{return[]}}static isObjectOutputstreamMessageDeltaDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_DELTA;static isObjectOutputstreamMessageStartDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_START;static isObjectOutputstreamMessageEndDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_END;static isObjectOutputstreamErrorDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_ERROR;static isObjectOutputstreamClientEventDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CLIENT_EVENT;static isObjectOutputstreamLoadingNumberOfStepsDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;static isObjectOutputstreamLoadingCurrentStepNumberDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;static isObjectOutputstreamLoadingCurrentStepNameDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE;static containsObjectWithLastAnswerToTrue=t=>{for(const n of t)if(this.isObjectOutputstreamMessageEndDTO(n)&&n.isLastAnswer)return!0;return!1}}const y0=e=>e.filter(t=>t.userType==="user").length;var ua=(e=>(e.GET_DISCUSSION_ID="/id",e.RESET_DISCUSSION="/delete",e))(ua||{});const x0=e=>!!e.startsWith("/"),_0=(e,t,n)=>e===ua.GET_DISCUSSION_ID?t?`Votre ID de discussion est ${t}`:"Votre ID de discussion n'est pas encore défini. Envoyez un premier message pour que ce soit le cas.":e===ua.RESET_DISCUSSION?(n(),null):`La commande ${e} n'est pas prise en compte.`,Ha=()=>{const e=Yt(),t=e.formatMessage({defaultMessage:"Message the assistant...",id:"chatbot.placeholder.content"}),n=e.formatMessage({defaultMessage:"You",id:"chatbot.chatline.label.user"}),r=e.formatMessage({defaultMessage:"Assistant",id:"chatbot.chatline.label.assistant"}),i=e.formatMessage({defaultMessage:"Customer support",id:"chatbot.chatline.label.customerSupport"}),a=e.formatMessage({defaultMessage:"⏳ The chatbot is a little busy at the time. Please try again later.",id:"chatbot.error.api.429"}),s=e.formatMessage({defaultMessage:"Oops ! There has been an error. Please try again later.",id:"chatbot.error.api.500"}),o=e.formatMessage({defaultMessage:"Oups ! The discussion is full. Please start a new one.",id:"chatbot.error.api.409"}),u=e.formatMessage({defaultMessage:"See",id:"chatbot.infobanner.title"}),c=e.formatMessage({defaultMessage:"You have an archived discussion.",id:"chatbot.infobanner.cta"}),d=e.formatMessage({defaultMessage:"Transferring your request to customer support...",id:"chatbot.customerSupport.connecting"}),f=e.formatMessage({defaultMessage:"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.",id:"chatbot.customerSupport.connected"}),m=e.formatMessage({defaultMessage:"Customer support is not available right now. Please try again later.",id:"chatbot.customerSupport.connectionError"}),h=e.formatMessage({defaultMessage:"Customer support received your request, but live replies are temporarily unavailable. Please try again shortly.",id:"chatbot.customerSupport.providerUnavailable"}),g=e.formatMessage({defaultMessage:"Your customer support conversation is now complete. Start a new conversation whenever you need more help.",id:"chatbot.customerSupport.closed"}),y=e.formatMessage({defaultMessage:"Restart",id:"chatbot.customerSupport.restart"}),v=e.formatMessage({defaultMessage:"Leave your contact details",id:"chatbot.customerSupport.fallback.title"}),A=e.formatMessage({defaultMessage:"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.",id:"chatbot.customerSupport.fallback.description"}),k=e.formatMessage({defaultMessage:"Email",id:"chatbot.customerSupport.fallback.email"}),p=e.formatMessage({defaultMessage:"Phone",id:"chatbot.customerSupport.fallback.phone"}),O=e.formatMessage({defaultMessage:"Send",id:"chatbot.customerSupport.fallback.submit"}),S=e.formatMessage({defaultMessage:"Sending...",id:"chatbot.customerSupport.fallback.submitting"}),w=e.formatMessage({defaultMessage:"Your contact details have been saved. Customer support will contact you soon.",id:"chatbot.customerSupport.fallback.success"}),B=e.formatMessage({defaultMessage:"We could not save your contact details. Please try again.",id:"chatbot.customerSupport.fallback.error"}),K=e.formatMessage({defaultMessage:"Customer support is currently closed",id:"chatbot.customerSupport.closedHours.title"}),Y=e.formatMessage({defaultMessage:"Leave your email, phone number and request. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.description"}),N=e.formatMessage({defaultMessage:"Today:",id:"chatbot.customerSupport.closedHours.schedulePrefix"}),H=e.formatMessage({defaultMessage:"Reason for your request",id:"chatbot.customerSupport.closedHours.reason"}),$=e.formatMessage({defaultMessage:"Your request has been saved. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.success"});return{placeholderTranslation:t,chatlineLabelUserTranslation:n,chatlineLabelAssistantTranslation:r,chatlineLabelCustomerSupportTranslation:i,tooManyRequestsTranslation:a,genericErrorTranslation:s,discussionFullErrorTranslation:o,infoBannerTitleTranslation:u,infoBannerExplainationTranslation:c,customerSupportConnectingTranslation:d,customerSupportConnectedTranslation:f,customerSupportConnectionErrorTranslation:m,customerSupportProviderUnavailableTranslation:h,customerSupportClosedTranslation:g,customerSupportRestartTranslation:y,customerSupportFallbackTitleTranslation:v,customerSupportFallbackDescriptionTranslation:A,customerSupportFallbackEmailTranslation:k,customerSupportFallbackPhoneTranslation:p,customerSupportFallbackSubmitTranslation:O,customerSupportFallbackSubmittingTranslation:S,customerSupportFallbackSuccessTranslation:w,customerSupportFallbackErrorTranslation:B,customerSupportClosedHoursTitleTranslation:K,customerSupportClosedHoursDescriptionTranslation:Y,customerSupportClosedHoursSchedulePrefixTranslation:N,customerSupportClosedHoursReasonTranslation:H,customerSupportClosedHoursSuccessTranslation:$}},ja=()=>{const e=Yt(),t=e.formatMessage({defaultMessage:"Search",id:"chatbot.chatline.loading.function.search"}),n=e.formatMessage({defaultMessage:"Looking into the cavern",id:"chatbot.chatline.loading.function.extractProductName"}),r=e.formatMessage({defaultMessage:"Consulting the shadocks",id:"chatbot.chatline.loading.function.suggestProductName"}),i=e.formatMessage({defaultMessage:"Looking for ziboublis",id:"chatbot.chatline.loading.function.criteriaDefinition"}),a=e.formatMessage({defaultMessage:"Searching Stock",id:"chatbot.chatline.loading.function.searchStock"}),s=e.formatMessage({defaultMessage:"Step",id:"chatbot.chatline.loading.function.step"}),o=e.formatMessage({defaultMessage:"I'm looking for products",id:"chatbot.chatline.loading.function.genericSearchMessage"}),u=e.formatMessage({defaultMessage:"Searching ...",id:"chatbot.chatline.loading.stepName.search"}),c=e.formatMessage({defaultMessage:"Building Query ...",id:"chatbot.chatline.loading.stepName.building"}),d=e.formatMessage({defaultMessage:"Analyzing ...",id:"chatbot.chatline.loading.stepName.analyzing"}),f=e.formatMessage({defaultMessage:"Writing answer",id:"chatbot.chatline.loading.stepName.redacting"}),m=e.formatMessage({defaultMessage:"Cancel",id:"chatbot.chatline.loading.cancel"}),h=e.formatMessage({defaultMessage:"see recent messages",id:"chatbot.chatline.seeRecentMessages"}),g=v=>v?v.includes("ExtractProductNames")?n:v.includes("SuggestProductNames")?r:v==="Recherche ..."?u:v==="Construction ..."?c:v==="Analyse ..."?d:v==="Rédaction"?f:v.includes("CreateCriteriasFromProductNames")||v.includes("CreateCriteriasOrProductNamesFromDiscussion")?i:v.includes("SearchStock")?a:"":t,y=g();return{searchTranslation:t,extractProductNameTranslation:n,criteriaDefinitionTranslation:i,searchStockTranslation:a,stepTranslation:s,getCurrentStepTranslated:g,defaultStartingStep:y,lookingForProductTranslation:o,cancelTranslation:m,recentMessagesTranslation:h}},S0=e=>/(\[.*|!\[.*)$/.test(e),C0=e=>/\)/.test(e),Ws=()=>({rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null});class I0{buffers=new Map;callbacks;constructor(t){this.callbacks=t}handleStart(t){this.buffers.set(t.messageId,Ws()),t.role==="assistant"&&this.callbacks.onAssistantMessageStart?.(),this.callbacks.addEmptyMessage({messageStreamId:t.messageId,role:t.role})}handleDelta(t){this.ensureBufferExists(t.messageId);const n=this.buffers.get(t.messageId);this.appendSourceSeparatorIfNeeded(n,t.streamSourceUuid),this.appendDelta(n,t.delta),this.callbacks.updateMessage({id:t.messageId,newContent:n.rendered})}handleEnd(t){this.buffers.delete(t.messageId)}hasBuffer(t){return this.buffers.has(t)}ensureBufferExists(t){this.buffers.has(t)||(this.buffers.set(t,Ws()),this.callbacks.addEmptyMessage({messageStreamId:t,role:"assistant"}))}appendSourceSeparatorIfNeeded(t,n){t.lastStreamSourceUuid&&t.lastStreamSourceUuid!==n&&(t.rendered+='<span style="display:block;height:1rem;"></span>'),t.lastStreamSourceUuid=n??null}appendDelta(t,n){if(C0(n)){t.markdownTag+=n,t.rendered+=t.markdownTag,t.markdownTag="",t.isWritingTag=!1;return}if(t.isWritingTag||S0(n)){t.markdownTag+=n,t.isWritingTag=!0;return}t.rendered+=n}}const A0=1e4,w0=3e3,v0=e=>{const t=new URL(e);return t.protocol=t.protocol==="https:"?"wss:":"ws:",t},k0=({apiUrl:e,handoff:t})=>(t.socketUrl.startsWith("ws://")||t.socketUrl.startsWith("wss://")?new URL(t.socketUrl):new URL(t.socketUrl,v0(e))).toString(),N0=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return["connected","customer_message_ack","provider_message","closed","error"].includes(t.type)};class R0{socket;callbacks;url;appToken;handoffToken;isIntentionalClose=!1;handshakeTimeout;closeAcknowledgementTimeout=null;constructor(t){this.callbacks=t.callbacks,this.url=k0(t),this.appToken=t.appToken;const n=t.handoff.reconnectToken??t.handoff.handoffToken;if(!n)throw new Error("Customer support socket requires a reconnect token");this.handoffToken=n,this.socket=new WebSocket(this.url),this.handshakeTimeout=setTimeout(()=>{this.socket.readyState!==WebSocket.CONNECTING&&this.socket.readyState!==WebSocket.OPEN||(this.callbacks.onTransportError?.({readyState:this.socket.readyState,url:this.safeUrlForLogs()}),this.socket.close())},A0),this.socket.addEventListener("open",this.sendAuthMessage),this.socket.addEventListener("message",this.handleMessage),this.socket.addEventListener("close",this.handleClose),this.socket.addEventListener("error",this.handleTransportError)}sendAuthMessage=()=>{this.socket.send(JSON.stringify({type:"auth",appToken:this.appToken,handoffToken:this.handoffToken}))};sendCustomerMessage(t){if(this.socket.readyState!==WebSocket.OPEN){this.callbacks.onError?.({type:"error",message:"Customer support connection is not ready.",code:"CUSTOMER_SUPPORT_SOCKET_NOT_READY"});return}const n={type:"customer_message",text:t,clientMessageId:crypto.randomUUID()};this.socket.send(JSON.stringify(n))}close(t,n){if(this.isIntentionalClose=!0,clearTimeout(this.handshakeTimeout),this.socket.readyState===WebSocket.OPEN&&n?.notifyServer){const r={type:"close",reason:t};this.socket.send(JSON.stringify(r)),this.closeAcknowledgementTimeout=setTimeout(()=>{this.closeTransport(t)},w0);return}this.closeTransport(t)}handleMessage=t=>{clearTimeout(this.handshakeTimeout);let n;try{n=JSON.parse(t.data)}catch{this.callbacks.onError?.({type:"error",message:"Customer support sent an invalid message.",code:"CUSTOMER_SUPPORT_SOCKET_INVALID_MESSAGE"});return}if(N0(n)){if(n.type==="connected"){this.callbacks.onConnected?.(n);return}if(n.type==="provider_message"){this.callbacks.onProviderMessage?.(n);return}if(n.type==="closed"){if(this.closeAcknowledgementTimeout!==null){clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null,this.closeTransport("Customer support session closed");return}this.callbacks.onClosed?.(n);return}n.type==="error"&&this.callbacks.onError?.(n)}};handleClose=t=>{clearTimeout(this.handshakeTimeout),this.closeAcknowledgementTimeout!==null&&(clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null),!this.isIntentionalClose&&this.callbacks.onClose?.(t)};handleTransportError=()=>{this.isIntentionalClose||this.callbacks.onTransportError?.({readyState:this.socket.readyState,url:this.safeUrlForLogs()})};closeTransport(t){this.closeAcknowledgementTimeout!==null&&(clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null),this.socket.close(1e3,t??"Customer support socket detached")}safeUrlForLogs(){const t=new URL(this.url);return t.searchParams.has("handoffToken")&&t.searchParams.set("handoffToken","<redacted>"),t.toString()}}const O0=new Set(["SLACK_INBOUND_EVENT_NOT_OBSERVED"]),L0=e=>e&&O0.has(e)?"provider_unavailable":"connection_error",D0=e=>e.isClosed?e.labels.closed:!e.isCustomerSupportMode||!e.hasTransportFailed?null:e.failureKind==="provider_unavailable"?e.labels.providerUnavailable:e.labels.connectionError,P0=[500,1500,3e3],M0=e=>{const t=P0[e];return t===void 0?{shouldRetry:!1}:{shouldRetry:!0,delayMs:t}},bc=e=>e.mode!==xt.customerSupport?!1:e.customerSupportState.status!=="closed",za=e=>e.mode!==xt.customerSupport?!1:e.customerSupportState.status==="closed",$a=e=>e.mode!==xt.customerSupport||e.customerSupportState.status==="closed"?!1:e.customerSupportState.mode==="closed_hours_contact_capture",B0=e=>$a(e)?"customer_support":bc(e)?"customer_support_connecting":za(e)?"customer_support":"ai",F0=e=>$a(e)?"idle":bc(e)?"connecting":za(e)?"closed":"idle",U0=e=>$a(e)?"visible":"idle",H0=e=>e?.trim()||void 0,j0=e=>e.mode!==xt.customerSupport||e.customerSupportState.status==="closed"||e.customerSupportState.mode==="closed_hours_contact_capture"?null:e.customerSupportState,Ec=e=>!!(e&&e.mode!=="closed_hours_contact_capture"),Va=e=>e?.mode==="closed_hours_contact_capture",z0=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&Ec(e.state))return e.state.fallbackContactCapture},$0=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&Va(e.state))return e.state.closedHoursContactCapture},V0=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&Va(e.state))return e.state.businessHours},W0=e=>e.isCustomerSupportMode?e.chatTransportMode==="customer_support_connecting"?"customer_support_connecting":e.isCurrentDiscussion?Va(e.state)?"customer_support_closed_hours_form":e.socketStatus!=="connected"?`socket_${e.socketStatus}`:e.isWaitingForFirstProviderReply?"waiting_first_provider_reply":e.isCustomerSupportClosed?"customer_support_closed":null:e.currentDiscussionId===null?"discussion_not_loaded":"discussion_mismatch":null;function G0({appToken:e,conversationStorageKey:t,currentConversation:n,loadingStatus:r,labels:i,logger:a,setCurrentConversationId:s,setLoadingStatus:o,addMessageToCurrentConversation:u,chatboxBootState:c,resetConversationRequestId:d}){const f=Yr(),m=c,[h,g]=C.useState(()=>B0(m)),[y,v]=C.useState(m.customerSupportState),[A,k]=C.useState(()=>F0(m)),[p,O]=C.useState(null),[S,w]=C.useState("idle"),[B,K]=C.useState(()=>U0(m)),Y=C.useRef(null),N=C.useRef(d),H=C.useRef(!1),$=C.useRef(null),j=C.useRef(j0(m)),z=C.useRef(za(m)),Z=C.useRef(!1),fe=C.useRef(0),ie=C.useRef(null),ve=h!=="ai",xe=y?.discussionId===n.discussionId,E=ve&&y?.status==="closed",W=D0({isCustomerSupportMode:ve,isClosed:E,hasTransportFailed:A==="failed",failureKind:p,labels:i}),ne=!!(ve&&xe&&y?.mode!=="closed_hours_contact_capture"&&y?.isWaitingForFirstProviderReply),_={isCustomerSupportMode:ve,isCurrentDiscussion:xe,state:y},Q=z0(_),ae=$0(_),X=V0(_),se=!!Q?.enabled&&["visible","submitting","submitted","failed"].includes(S),re=!!ae?.enabled&&["visible","submitting","submitted","failed"].includes(B),ce=W0({chatTransportMode:h,currentDiscussionId:n.discussionId,isCustomerSupportClosed:E,isCustomerSupportMode:ve,isCurrentDiscussion:xe,isWaitingForFirstProviderReply:ne,socketStatus:A,state:y}),ue=ce!==null;C.useEffect(()=>{if(r!=="notLoading"||n.items.length===0)return;const F=xe?y:null;!n.discussionId&&!F||Dh({conversation:n,customerSupport:F,key:t})},[r,n,y,t,xe]),C.useEffect(()=>(Z.current=!1,()=>{Z.current=!0,ie.current!==null&&(window.clearTimeout(ie.current),ie.current=null),Y.current?.close("Widget unmounted"),Y.current=null}),[]);const ke=(F,R,P)=>{u({userType:"assistant",content:F,metaData:{messageKind:"system",systemEvent:R,...P},temporaryId:crypto.randomUUID()})},G=(F,R)=>{u({userType:"assistant",content:F,metaData:{messageKind:"conversation",authorType:"customer_support_operator",...R},temporaryId:crypto.randomUUID()})},Le=(F,R)=>{Y.current?.close(F,R),Y.current=null},ze=()=>{ie.current!==null&&(window.clearTimeout(ie.current),ie.current=null),fe.current=0,$.current=null,j.current=null,z.current=!1,O(null),v(null),k("idle"),g("ai")},rt=(F,R)=>{Le(F,R),ze()};C.useEffect(()=>{N.current!==d&&(N.current=d,H.current=!0,rt("Starting new conversation",{notifyServer:!0}))},[d]),C.useEffect(()=>{n.discussionId===null&&H.current&&y===null&&h==="ai"&&(H.current=!1)},[h,n.discussionId,y]);const Ye=F=>{z.current||(z.current=!0,$.current=null,Y.current=null,F?.discussionId&&s(F.discussionId),o("notLoading"),O(null),k("closed"),g("customer_support"),v(R=>{if(!R)return R;const P=new Date().toISOString();return{...R,status:"closed",discussionId:F?.discussionId??R.discussionId,updatedAt:P,closedAt:F?.closedAt??P,closedReason:F?.reason,isWaitingForFirstProviderReply:!1}}))},it=(F,R)=>{Y.current&&Le("Replacing customer support socket"),k("connecting");let P=!1,J=!1;const oe=he=>{O(he),k("failed"),o("notLoading")},Se=he=>{Y.current=null;const Pe=M0(fe.current);if(!Pe.shouldRetry){a.error("Customer support socket reconnect exhausted code="+he.code+" reason="+(he.reason||"none")),oe("connection_error");return}fe.current+=1,k("connecting"),g("customer_support_connecting"),a.log("Customer support socket reconnect scheduled attempt="+fe.current+" delayMs="+Pe.delayMs+" code="+he.code),ie.current=window.setTimeout(()=>{ie.current=null,!(Z.current||z.current)&&it(F,{...R,addConnectedMessage:P?!1:R?.addConnectedMessage})},Pe.delayMs)};Y.current=new R0({apiUrl:f,appToken:e,handoff:F,callbacks:{onConnected:he=>{const Pe=F.reconnectToken??F.handoffToken;if(!Pe){Ye({reason:"Missing reconnect token"});return}P=!0,fe.current=0,R?.isStoredReconnect&&(j.current=null);const Ze=new Date().toISOString();s(he.discussionId),O(null),k("connected"),g("customer_support"),o("notLoading"),v(ot=>{const Je=Ec(ot)?ot:null;return{mode:"live_chat",status:"active",discussionId:he.discussionId,socketUrl:F.socketUrl,reconnectToken:Pe,reconnectTokenExpiresAt:he.reconnectTokenExpiresAt??F.reconnectTokenExpiresAt,customerSupportSessionId:he.customerSupportSessionId??F.customerSupportSessionId,provider:Je?.provider,isWaitingForFirstProviderReply:Je?.isWaitingForFirstProviderReply??!0,fallbackContactCapture:Je?.fallbackContactCapture,startedAt:Je?.startedAt??Ze,updatedAt:Ze}}),R?.addConnectedMessage!==!1&&ke(i.connected,"customer_support_connected")},onProviderMessage:he=>{O(null),k("connected"),w(Pe=>Pe==="submitted"?Pe:"idle"),v(Pe=>!Pe||Pe.mode==="closed_hours_contact_capture"?Pe:{...Pe,status:"active",provider:he.provider??Pe.provider,reconnectTokenExpiresAt:he.reconnectTokenExpiresAt??Pe.reconnectTokenExpiresAt,isWaitingForFirstProviderReply:!1,updatedAt:new Date().toISOString()}),G(he.text,{customerSupportAuthorName:H0(he.authorName),customerSupportProvider:he.provider})},onClosed:he=>{J=!0,Ye({reason:he.reason,closedAt:he.closedAt,discussionId:he.discussionId})},onError:he=>{J=!0,a.error("Customer support socket server error code="+he.code+" message="+he.message),oe(L0(he.code))},onClose:he=>{Z.current||z.current||J||Se(he)},onTransportError:he=>{a.error(`Customer support socket transport error readyState=${he.readyState} url=${he.url}`)}}})};C.useEffect(()=>{const F=j.current;if(!F)return;const R=oc(F,n.discussionId);if(R!=="discussion_not_loaded"){if(R==="session_closed"){j.current=null,k("closed"),g("customer_support");return}if(R){j.current=null,v(P=>P?.discussionId===n.discussionId?P:null),k("idle"),g("ai");return}Y.current||(k("connecting"),g("customer_support_connecting"),it({mode:"live_chat",transport:"socket",socketUrl:F.socketUrl,reconnectToken:F.reconnectToken,reconnectTokenExpiresAt:F.reconnectTokenExpiresAt,customerSupportSessionId:F.customerSupportSessionId,discussionId:F.discussionId,fallbackContactCapture:F.fallbackContactCapture},{addConnectedMessage:!1,isStoredReconnect:!0}))}},[n.discussionId]);const Ue=F=>{if(F.mode==="closed_hours_contact_capture"){De(F);return}const R=F.reconnectToken??F.handoffToken;if(!F.discussionId||!R){ke(i.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const P=new Date().toISOString();$.current=F,z.current=!1,w("idle"),v({mode:"live_chat",status:"connecting",discussionId:F.discussionId,socketUrl:F.socketUrl,reconnectToken:R,reconnectTokenExpiresAt:F.reconnectTokenExpiresAt,customerSupportSessionId:F.customerSupportSessionId,isWaitingForFirstProviderReply:!0,fallbackContactCapture:F.fallbackContactCapture,startedAt:P,updatedAt:P}),k("connecting"),g("customer_support_connecting"),ke(i.connecting,"customer_support_connecting")},Ct=()=>{const F=$.current;!F||F.mode!=="live_chat"||($.current=null,it(F))},yt=F=>h!=="customer_support"||A!=="connected"||!xe||!Y.current?(ke(i.connectionError,"customer_support_connection_error",{isErrorMessage:!0}),!1):(Y.current.sendCustomerMessage(F),!0);C.useEffect(()=>{if(!Q?.enabled||!ne||!xe||A!=="connected"||S!=="idle")return;const F=Math.max(1,Q.timeoutMinutes)*60*1e3,R=window.setTimeout(()=>{w("visible")},F);return()=>window.clearTimeout(R)},[Q,S,xe,ne,A]);const Te=async({email:F,phone:R})=>{if(!y?.customerSupportSessionId||!y.reconnectToken)return!1;w("submitting");const P=`${f}/customer-support/sessions/${y.customerSupportSessionId}/fallback-contact`;return(await fetch(P,on.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:y.reconnectToken,reasonType:"fallback_no_reply",email:F,phone:R}}))).ok?(w("submitted"),Le("Fallback contact submitted"),Ye({reason:"fallback_contact_submitted",discussionId:y.discussionId}),!0):(w("failed"),!1)},De=F=>{if(!F.discussionId){ke(i.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const R=new Date().toISOString();$.current=null,z.current=!1,Le("Closed-hours contact capture"),v({mode:"closed_hours_contact_capture",status:"active",discussionId:F.discussionId,reconnectToken:F.reconnectToken,reconnectTokenExpiresAt:F.reconnectTokenExpiresAt,customerSupportSessionId:F.customerSupportSessionId,closedHoursContactCapture:F.closedHoursContactCapture,businessHours:F.businessHours,startedAt:R,updatedAt:R}),k("idle"),g("customer_support"),o("notLoading"),K("visible")},we=async({email:F,phone:R,reason:P})=>{if(y?.mode!=="closed_hours_contact_capture")return!1;K("submitting");const J=f+"/customer-support/sessions/"+y.customerSupportSessionId+"/fallback-contact";return(await fetch(J,on.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:y.reconnectToken,reasonType:"closed_hours",email:F,phone:R,reason:P}}))).ok?(K("submitted"),Ye({reason:"closed_hours_contact_submitted",discussionId:y.discussionId}),!0):(K("failed"),!1)};return C.useEffect(()=>{if(ve&&y&&y.status!=="closed"&&n.discussionId!==y.discussionId&&n.discussionId===null){if(H.current)return;s(y.discussionId);return}},[n.discussionId,y,ve,A,s]),{chatTransportMode:h,socketStatus:A,isCustomerSupportMode:ve,isCustomerSupportClosed:E,customerSupportStatusMessage:W,isCustomerSupportInputDisabled:ue,customerSupportInputDisabledReason:ce,enterCustomerSupportMode:Ue,flushPendingCustomerSupportHandoff:Ct,sendToCustomerSupport:yt,fallbackContactCaptureConfig:Q,fallbackContactCaptureStatus:S,shouldDisplayFallbackContactCapture:se,submitFallbackContactCapture:Te,closedHoursContactCaptureConfig:ae,closedHoursBusinessHours:X,closedHoursContactCaptureStatus:B,shouldDisplayClosedHoursContactCapture:re,submitClosedHoursContactCapture:we}}const Y0=e=>e.runtimeAdapter?e.prompt.mode!=="text"?Promise.reject(new Error("WIDGET_RUNTIME_ADAPTER_TEXT_PROMPTS_ONLY")):e.runtimeAdapter.sendTextPrompt(e.prompt.request):e.sendStandardPrompt();class q0{active=null;logger;constructor(t=console){this.logger=t}start(){return this.active?null:(this.active={id:crypto.randomUUID(),controller:new AbortController,decoder:new Mt(this.logger)},this.active)}hasActiveStream(){return this.active!==null}isCurrent(t){return this.active?.id===t.id}finish(t){return this.isCurrent(t)?(this.active=null,!0):!1}cancel(t){const n=this.active;return n?(this.active=null,n.controller.abort(t),n):null}}const ar=(e,t)=>`chatsystem:interaction:v2:${e}:${t}`,X0=(e,t,n)=>{t.responsePolicy.mode==="resume_turn"&&sessionStorage.setItem(ar(e,t.instanceId),JSON.stringify({continuationId:t.responsePolicy.continuation.continuationId,expiresAt:t.responsePolicy.continuation.expiresAt,resultToken:t.responsePolicy.resultToken,discussionId:n}))},$n=(e,t)=>{const n=ar(e,t),r=sessionStorage.getItem(n);if(!r)return null;try{const i=JSON.parse(r);return typeof i.continuationId!="string"||typeof i.expiresAt!="string"||typeof i.resultToken!="string"||typeof i.discussionId!="number"||Date.parse(i.expiresAt)<=Date.now()?(sessionStorage.removeItem(n),null):i}catch{return sessionStorage.removeItem(n),null}},Q0=(e,t,n)=>{const r=$n(e,t);r&&sessionStorage.setItem(ar(e,t),JSON.stringify({...r,submissionId:n,resultAccepted:!0}))},K0=(e,t,n)=>{const r=$n(e,t);r&&sessionStorage.setItem(ar(e,t),JSON.stringify({...r,submissionId:n,resultAccepted:!1}))},Gs=(e,t)=>sessionStorage.removeItem(ar(e,t)),Tc=(e,t)=>({"Content-Type":"application/json",[ee.INTERACTIVE_WIDGET_RESULT_TOKEN_HEADER]:e,...t?{Authorization:`Bearer ${t}`}:{}}),J0=(e,t)=>e?.submitInteractionResult?e.submitInteractionResult(t):fetch(`${t.apiUrl}/ai/client-interactions/${encodeURIComponent(t.appToken)}/${encodeURIComponent(t.continuationId)}/result`,{method:"POST",headers:Tc(t.resultToken,t.authorizationToken),body:JSON.stringify({discussionId:t.discussionId,submissionId:t.submissionId,result:t.result}),signal:t.signal}),Z0=(e,t)=>e?.resumeInteraction?e.resumeInteraction(t):fetch(`${t.apiUrl}/ai/client-interactions/${encodeURIComponent(t.appToken)}/${encodeURIComponent(t.continuationId)}/resume`,{method:"POST",headers:Tc(t.resultToken,t.authorizationToken),body:JSON.stringify({discussionId:t.discussionId}),signal:t.signal}),em=e=>({status:"submitted",actionId:e.actionId,data:e.data??{}}),tm=e=>{const{appToken:t,agentId:n}=e,r=ir(),i=Yr(),a=t0(),s=C.useContext(mc),{appCurrentLang:o}=C.useContext(Zu),{companySettings:u}=C.useContext(Rt),c=Fa({appToken:t,agentId:n}),d=uc({appToken:t,agentId:n}),f=C.useRef(null),m=C.useRef(s),h=C.useRef(new Set),g=C.useRef(null),y=C.useRef(null),v=C.useRef(new Set),A=C.useRef(new Set),k=C.useRef(null),p=C.useRef(null),O=C.useRef(null);O.current||(O.current=new q0(r));const S=O.current,[w,B]=C.useState(0);(!f.current||m.current!==s)&&(m.current=s,f.current=new i0(s)),C.useEffect(()=>{const q=f.current;if(!(!q||!s))return q.getToken({interactive:!1}).catch(()=>q.clear()),s.subscribe?.(()=>{q.handleIdentityChanged(),B(me=>me+1),q.getToken({interactive:!1}).catch(()=>q.clear())})},[s]);const{genericErrorTranslation:K,tooManyRequestsTranslation:Y,discussionFullErrorTranslation:N,customerSupportConnectingTranslation:H,customerSupportConnectedTranslation:$,customerSupportConnectionErrorTranslation:j,customerSupportProviderUnavailableTranslation:z,customerSupportClosedTranslation:Z}=Ha(),{defaultStartingStep:fe}=ja(),{currentConversation:ie,addEmptyMessageToCurrentConversation:ve,addMessageToCurrentConversation:xe,removeEmptyAssistantMessageFromCurrentConversation:E,resetConversation:W,setCurrentConversationId:ne,updateCurrentConversationMessageById:_,updateInteractiveWidget:Q,chatboxBootState:ae,resetConversationRequestId:X}=Xr(),[se,re]=C.useState("notLoading"),[ce,ue]=C.useState(null),[ke,G]=C.useState(fe),[Le,ze]=C.useState(null),[rt,Ye]=C.useState(!1),{chatTransportMode:it,isCustomerSupportMode:Ue,customerSupportStatusMessage:Ct,isCustomerSupportInputDisabled:yt,enterCustomerSupportMode:Te,flushPendingCustomerSupportHandoff:De,sendToCustomerSupport:we,fallbackContactCaptureConfig:F,fallbackContactCaptureStatus:R,shouldDisplayFallbackContactCapture:P,submitFallbackContactCapture:J,closedHoursContactCaptureConfig:oe,closedHoursBusinessHours:Se,closedHoursContactCaptureStatus:he,shouldDisplayClosedHoursContactCapture:Pe,submitClosedHoursContactCapture:Ze}=G0({appToken:t,conversationStorageKey:d,currentConversation:ie,loadingStatus:se,labels:{connecting:H,connected:$,connectionError:j,providerUnavailable:z,closed:Z},logger:r,setCurrentConversationId:ne,setLoadingStatus:re,addMessageToCurrentConversation:xe,chatboxBootState:ae,resetConversationRequestId:X}),ot=C.useRef(null);ot.current||(ot.current=new I0({addEmptyMessage:ve,updateMessage:_,onAssistantMessageStart:()=>re("loadingDisplayedAnswer")}));const Je=ot.current,He=q=>{S.finish(q)&&(re("notLoading"),G(fe),ze(null))},Oe=()=>{const q=S.start();return q?(re("loadingIntermediaryStates"),q):null},We=()=>{S.cancel("Cancelling stream on purpose.")&&(r.log("Stream request aborted"),re("notLoading"),G(fe),ze(null),E())};C.useEffect(()=>{if(Ue){Ye(!1);return}const q=u?.api?.settings?.maxUserMessagesPerDiscussion;typeof q=="number"&&Ye(y0(ie.items)>=q)},[u?.api?.settings?.maxUserMessagesPerDiscussion,ie.items,Ue]);const ft=C.useRef(X);C.useEffect(()=>{ft.current!==X&&(ft.current=X,S.cancel("Conversation reset."),re("notLoading"),G(fe),ze(null),Ye(!1))},[fe,X]),C.useEffect(()=>(p.current&&(clearTimeout(p.current),p.current=null),()=>{p.current=setTimeout(()=>{S.cancel("Widget runtime unmounted."),p.current=null},0)}),[S]);const li=(q,me)=>{for(const pe of q)if(Mt.isObjectOutputstreamMessageStartDTO(pe))Je.handleStart(pe);else if(Mt.isObjectOutputstreamMessageDeltaDTO(pe))Je.handleDelta(pe);else if(Mt.isObjectOutputstreamMessageEndDTO(pe))Je.handleEnd(pe);else if(Mt.isObjectOutputstreamLoadingCurrentStepNumberDTO(pe))ze(pe.content);else if(Mt.isObjectOutputstreamLoadingCurrentStepNameDTO(pe))G(pe.content);else if(Mt.isObjectOutputstreamLoadingNumberOfStepsDTO(pe))ue(pe.content);else if(Mt.isObjectOutputstreamClientEventDTO(pe)){const be=T0(pe);if(be.type==="customer_support_handoff_requested")Te(be.payload);else if(be.type==="identity_gate_required"){if(h.current.has(be.payload.gateId))continue;h.current.add(be.payload.gateId);const de=f.current;if(!de)continue;be.payload.protocolVersion===2&&(Number.isSafeInteger(me)&&me>0?u0(c,be.payload.continuation,me):r.warn("Identity continuation ignored without a valid discussion id"),g.current=be.payload.continuation.continuationId),a0({apiUrl:i,appToken:t,payload:be.payload,identitySession:de}).then(()=>{be.payload.protocolVersion===2&&Vs(c)}).catch($e=>r.error($e)).finally(()=>{be.payload.protocolVersion===2&&g.current===be.payload.continuation.continuationId&&(g.current=null)})}else if(be.type==="interactive_widget_requested"){if(ie.items.some(de=>de.metaData?.interactiveWidget?.instanceId===be.payload.instanceId))continue;be.payload.responsePolicy.mode==="resume_turn"&&Number.isSafeInteger(me)&&me>0&&X0(c,be.payload,me),xe({userType:"assistant",temporaryId:`interactive-widget:${be.payload.instanceId}`,metaData:{interactiveWidget:{protocolVersion:2,instanceId:be.payload.instanceId,widgetType:be.payload.widgetType,presentation:be.payload.payload,responseMode:be.payload.responsePolicy.mode,state:"active"}}})}else r.warn(`Client event not handled - ${pe.event}`)}else Mt.isObjectOutputstreamErrorDTO(pe)?xe({userType:"assistant",metaData:{isErrorMessage:!0},content:pe.message,temporaryId:crypto.randomUUID()}):r.warn(`Packet shape not handled - ${pe}`)},di=async(q,me)=>{const pe=Number.parseInt(q.headers.get("discussionId")??"",10);if(Number.isNaN(pe)||ne(pe),!q.ok){if(!S.isCurrent(me))return;let $e=K;q.status===409?($e=N,Ye(!0)):q.status===429&&($e=Y),xe({userType:"assistant",content:$e,metaData:{isErrorMessage:!0},temporaryId:crypto.randomUUID()}),He(me);return}const be=q.body?.getReader();if(!be){He(me);return}const de=new TextDecoder;for(;S.isCurrent(me);){const{done:$e,value:Pt}=await be.read();if(!S.isCurrent(me))break;if(Pt&&li(me.decoder.transformNDJSONChunkIntoObjects(de.decode(Pt,{stream:!0})),pe),$e){li(me.decoder.transformNDJSONChunkIntoObjects(de.decode()),pe),li(me.decoder.flushPending(),pe),De(),He(me);return}}await be.cancel().catch(()=>{})};k.current=di,C.useEffect(()=>{if(!s||S.hasActiveStream())return;const q=c0(c);if(!q){y.current=null;return}if(y.current===q.continuationId||g.current===q.continuationId)return;const me=f.current;if(!me)return;const pe=Oe();pe&&(y.current=q.continuationId,l0({apiUrl:i,appToken:t,discussionId:q.discussionId,continuation:q,identitySession:me}).then(async be=>{if(!be){y.current=null,He(pe);return}be.status===401&&me.clear(),d0(be.status)&&Vs(c),await k.current?.(be,pe)}).catch(be=>{r.error(be),He(pe)}))},[i,t,s,w,r,c]),C.useEffect(()=>{if(S.hasActiveStream())return;ie.items.map(de=>de.metaData?.interactiveWidget).filter(de=>de?.responseMode==="resume_turn"&&de.state==="active").forEach(de=>{!de||A.current.has(de.instanceId)||(A.current.add(de.instanceId),$n(c,de.instanceId)||Q(de.instanceId,$e=>({...$e,state:"unavailable"})))});const q=ie.items.map(de=>de.metaData?.interactiveWidget).find(de=>de?.responseMode==="resume_turn"&&(de.state==="submitting"||de.state==="submitted")&&!v.current.has(de.instanceId));if(!q)return;const me=$n(c,q.instanceId);if(!me?.submissionId)return;const pe=Oe();if(!pe)return;v.current.add(q.instanceId),(async()=>{const de=a?void 0:await f.current?.getToken({interactive:!1}).catch(()=>null);return Z0(a,{apiUrl:i,appToken:t,continuationId:me.continuationId,discussionId:me.discussionId,resultToken:me.resultToken,authorizationToken:de??void 0,signal:pe.controller.signal})})().then(async de=>{de.ok||Q(q.instanceId,$e=>({...$e,state:"unavailable"})),await k.current?.(de,pe),de.ok&&Gs(c,q.instanceId)}).catch(de=>{r.error(de),v.current.delete(q.instanceId),He(pe)})},[i,t,ie.items,r,a,S,Q,c]);const Bd=(q,me,pe)=>{const be=n?`?agentId=${encodeURIComponent(String(n))}`:"",de=`${i}/ai/prompt/${t}${be}`;if(q.mode==="text"){const Pt={query:q.text,language:o.locale};return ie.discussionId&&(Pt.discussionId=ie.discussionId),{url:de,fetchConfig:on.getFetchConfig({httpVerb:"POST",body:Pt,contentType:"application/json",options:{signal:pe,headers:{...on.getHeaders({contentType:"application/json"}),...s?{[ee.IDENTITY_GATE_VERSION_HEADER]:"2"}:{},...!a||a.submitInteractionResult&&a.resumeInteraction?{[ee.INTERACTIVE_WIDGET_VERSION_HEADER]:"2"}:{},...me?{Authorization:`Bearer ${me}`}:{}}}})}}const $e=new FormData;return $e.append("language",o.locale),ie.discussionId&&$e.append("discussionId",String(ie.discussionId)),$e.append("audioInput",q.audioFile,q.audioFile.name),{url:de,fetchConfig:{method:"POST",body:$e,signal:pe,headers:s||me?{...s?{[ee.IDENTITY_GATE_VERSION_HEADER]:"2"}:{},...!a||a.submitInteractionResult&&a.resumeInteraction?{[ee.INTERACTIVE_WIDGET_VERSION_HEADER]:"2"}:{},...me?{Authorization:`Bearer ${me}`}:{}}:void 0}}},ys=q=>{const me=Oe();return me?((async()=>{let pe=null;if(!a)try{pe=await f.current?.getToken({interactive:!1})??null}catch{f.current?.clear()}const be=q.mode==="audio"?{mode:"audio"}:{mode:"text",request:{apiUrl:i,appToken:t,agentId:n,query:q.text,language:o.locale,discussionId:ie.discussionId,signal:me.controller.signal}};try{const de=await Y0({runtimeAdapter:a,prompt:be,sendStandardPrompt:()=>{const{url:$e,fetchConfig:Pt}=Bd(q,pe,me.controller.signal);return fetch($e,Pt)}});de.status===401&&pe&&f.current?.clear(),await di(de,me),de.ok&&!me.controller.signal.aborted&&await a?.onAssistantResponseCompleted?.(de)}catch(de){me.controller.signal.aborted||r.error(de),He(me)}})(),!0):!1},fi=!Ue&&(se!=="notLoading"||rt||ie.items.some(q=>q.metaData?.interactiveWidget?.state==="active"||q.metaData?.interactiveWidget?.state==="submitting"))||Ue&&(se!=="notLoading"||yt);return{appToken:t,agentId:n,loadingStatus:se,numberOfSteps:ce,currentStepName:ke,currentStepNumber:Le,isAtMaxMessages:rt,isCustomerSupportMode:Ue,customerSupportStatusMessage:Ct,fallbackContactCaptureConfig:F,fallbackContactCaptureStatus:R,shouldDisplayFallbackContactCapture:P,submitFallbackContactCapture:J,closedHoursContactCaptureConfig:oe,closedHoursBusinessHours:Se,closedHoursContactCaptureStatus:he,shouldDisplayClosedHoursContactCapture:Pe,submitClosedHoursContactCapture:Ze,isTextareaDisabled:fi,cancelRequest:We,submitTextMessage:q=>{if(!q.trim()||fi)return!1;if(x0(q)){const me=_0(q,ie.discussionId,W);return me?(xe({userType:"user",content:me,temporaryId:crypto.randomUUID()}),!0):!1}return it!=="customer_support"&&S.hasActiveStream()?!1:(xe({userType:"user",content:q,temporaryId:crypto.randomUUID()}),it==="customer_support"?(we(q),!0):ys({mode:"text",text:q}))},submitAudio:q=>fi||S.hasActiveStream()?!1:ys({mode:"audio",audioFile:q}),submitInteractiveWidget:q=>{const pe=ie.items.find(qe=>qe.metaData?.interactiveWidget?.instanceId===q.instanceId)?.metaData?.interactiveWidget;if(!pe||pe.state!=="active"||S.hasActiveStream())return!1;if(pe.responseMode==="none")return Q(q.instanceId,qe=>({...qe,state:q.cancel?"cancelled":"submitted",selectedActionId:q.actionId})),!0;const be=$n(c,q.instanceId);if(!be)return Q(q.instanceId,qe=>({...qe,state:"unavailable"})),!1;const de=Oe();if(!de)return!1;const $e=crypto.randomUUID();K0(c,q.instanceId,$e),Q(q.instanceId,qe=>({...qe,state:"submitting",selectedActionId:q.actionId}));const Pt=q.cancel?{status:"cancelled"}:em(q),xs=async()=>{const qe=a?void 0:await f.current?.getToken({interactive:!1}).catch(()=>null);return J0(a,{apiUrl:i,appToken:t,continuationId:be.continuationId,discussionId:be.discussionId,submissionId:$e,result:Pt,resultToken:be.resultToken,authorizationToken:qe??void 0,signal:de.controller.signal})};return(async()=>{try{return await xs()}catch(qe){if(de.controller.signal.aborted)throw qe;return xs()}})().then(async qe=>{qe.ok?(Q0(c,q.instanceId,$e),Q(q.instanceId,Dn=>({...Dn,state:q.cancel?"cancelled":"submitted"}))):Q(q.instanceId,Dn=>({...Dn,state:qe.status===409?"active":"unavailable"})),await di(qe,de),qe.ok&&Gs(c,q.instanceId)}).catch(qe=>{r.error(qe),Q(q.instanceId,Dn=>({...Dn,state:"submitting"})),He(de)}),!0}}},yc=C.createContext(null),nm=({appToken:e,agentId:t,children:n})=>{const r=tm({appToken:e,agentId:t});return b.jsx(yc.Provider,{value:r,children:n})},xc=()=>{const e=C.useContext(yc);if(!e)throw new Error("useChatRuntime must be used within ChatRuntimeProvider");return e},_c=C.createContext(null),rm=_c.Provider,im=()=>{const e=C.useContext(_c);if(!e)throw new Error("useWidgetRuntimeStatus must be used within WidgetRuntime");return e},am=({children:e,appToken:t,agentId:n,logger:r,identityProvider:i,runtimeAdapter:a})=>{const s=navigator.language;r.log("Brower language",s);const o=Ih(s,r),{appCurrentLang:u,handleSetContextCurrentLang:c}=bh(Gr,o),d={appCurrentLang:u,setAppCurrentLang:c},[f,m]=C.useState(!1),h=C.useCallback(()=>m(!0),[]),{contextCompanySettings:g,contextInitialConversationState:y}=$h({agentId:n,appToken:t,onFetched:h,runtimeAdapter:a});return C.useEffect(()=>{Qh(g.companySettings,r)},[g.companySettings,r]),b.jsx(pc.Provider,{value:a,children:b.jsx(mc.Provider,{value:i,children:b.jsx(dh,{locale:u?.locale,messages:u?.translatedText,children:b.jsx(Zu.Provider,{value:d,children:b.jsx(Rt.Provider,{value:g,children:b.jsx(ec.Provider,{value:y,children:b.jsx(rm,{value:{hasFetchedSettings:f},children:b.jsx(nm,{appToken:t,agentId:n,children:e})})})})})})})})};function Sc({appToken:e,agentId:t,shouldDisplayLogs:n,apiUrl:r,identityProvider:i,runtimeAdapter:a,children:s}){const o=C.useMemo(()=>Sh(n),[n]),u=Fa({appToken:e,agentId:t});return C.useEffect(()=>{e.trim()||o.error("App Token missing")},[e,o]),b.jsx(wh,{apiUrl:r,children:b.jsx(sc.Provider,{value:o,children:b.jsx(am,{appToken:e,agentId:t,logger:o,identityProvider:i,runtimeAdapter:a,children:s},u)})})}const Cc=e=>Qe.createElement("svg",{fill:"#000000",height:"800px",width:"800px",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 330 330",xmlSpace:"preserve",...e},Qe.createElement("path",{id:"XMLID_102_",d:"M325.607,79.393c-5.857-5.857-15.355-5.858-21.213,0.001l-139.39,139.393L25.607,79.393 c-5.857-5.857-15.355-5.858-21.213,0.001c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393 s7.794-1.581,10.606-4.394l149.996-150C331.465,94.749,331.465,85.251,325.607,79.393z"})),sm=({src:e})=>{const[t,n]=C.useState(null);return C.useEffect(()=>{let r=!1;return lc(e).then(({blobUrl:i})=>{n(i)}).catch(()=>n(null)),()=>{t&&!r&&(URL.revokeObjectURL(t),r=!0)}},[e]),b.jsx("img",{src:t??e,decoding:"async",loading:"eager"})};function om(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function um({src:e,autoplay:t=!0,loop:n=!0,className:r,style:i,placeholder:a,fallback:s,onLoaded:o,onError:u}){const[c,d]=C.useState({kind:"loading"});return C.useEffect(()=>{let f=null,m=!1;return d({kind:"loading"}),dc(e).then(async h=>{if(!m)if(h.kind==="zip"){const g=om(h)?h.blob:await(await fetch(h.blobUrl)).blob();f=URL.createObjectURL(g),d({kind:"lottieZip",blobUrl:f}),o?.(f)}else d({kind:"json",data:h.data}),o?.(h.data)}).catch(h=>!m&&(d({kind:"error",err:h}),u?.(h))),()=>{m=!0,f&&URL.revokeObjectURL(f)}},[e]),c.kind==="loading"?b.jsx("div",{className:"flex items-center justify-center rounded-xl border border-dashed p-6 text-sm opacity-70 "+(r??""),style:{minHeight:96,...i},children:a??"Loading animation…"}):c.kind==="error"?b.jsx("div",{className:"flex items-center justify-center rounded-xl border p-6 text-sm text-red-600 "+(r??""),style:{minHeight:96,...i},children:s??"Failed to load animation"}):c.kind==="json"?b.jsx(Fd,{animationData:c.data,loop:n,autoplay:t,className:r,style:i,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}}):b.jsx(Ud.DotLottieReact,{src:c.blobUrl,loop:n,autoplay:t,className:r,style:i})}async function cm(e,t={}){const{minPeriod:n=8,maxPeriod:r=Math.floor(Math.min(e.width,e.height)/2),gutterSearchRadius:i=3,debug:a=!1}=t,s=Ft();if(e.width<n*2||e.height<n*2)return a&&s.warn("detectGrid: image too small"),null;const o=document.createElement("canvas");o.width=e.naturalWidth,o.height=e.naturalHeight;const u=o.getContext("2d");if(!u)return null;u.drawImage(e,0,0);const{data:c}=u.getImageData(0,0,o.width,o.height),d=o.width,f=o.height,m=new Uint8ClampedArray(d*f);for(let H=0;H<f;H++){const $=H*d;for(let j=0;j<d;j++){const z=($+j)*4;m[$+j]=.299*c[z]+.587*c[z+1]+.114*c[z+2]|0}}const h=new Float32Array(d),g=new Float32Array(f);for(let H=1;H<d-1;H++){let $=0;for(let j=0;j<f;j++){const z=j*d+H,Z=m[z+1]-m[z-1];$+=Math.abs(Z)}h[H]=$}for(let H=1;H<f-1;H++){let $=0;for(let j=0;j<d;j++){const z=H*d+j,Z=m[z+d]-m[z-d];$+=Math.abs(Z)}g[H]=$}const y=Ys(h,n,Math.min(r,d/2)),v=Ys(g,n,Math.min(r,f/2));if(!y||!v)return a&&s.warn("detectGrid: could not find periods"),null;const A=Math.max(1,Math.round(d/y)),k=Math.max(1,Math.round(f/v)),p=qs(h,y,A,i),O=qs(g,v,k,i),S=Math.max(1,y-p),w=Math.max(1,v-O);if(S*A>d+2||w*k>f+2)return a&&s.warn("detectGrid: sanity check failed"),null;const B=ca(h,60),K=ca(g,60),Y=Math.max(0,Xs(h,B)),N=Math.max(0,Xs(g,K));return a&&s.log({periodX:y,periodY:v,columns:A,rows:k,gutterX:p,gutterY:O,frameWidth:S,frameHeight:w,originX:Y,originY:N}),{columns:A,rows:k,frameWidth:S,frameHeight:w,gutterX:p,gutterY:O,originX:Y,originY:N}}function Ys(e,t,n){const r=Ic(e);let i=0;for(let h=0;h<e.length;h++){const g=e[h]-r;i+=g*g}if(i===0)return null;const a=new Float32Array(n+1);let s=0,o=-1/0;for(let h=t;h<=n;h++){let g=0;for(let v=0;v+h<e.length;v++)g+=(e[v]-r)*(e[v+h]-r);const y=g/i;a[h]=y,y>o&&(o=y,s=h)}if(s<=t||s>=n)return s||null;const u=a[s-1],c=a[s],d=a[s+1],f=u-2*c+d,m=f===0?0:.5*(u-d)/f;return s+m}function qs(e,t,n,r){const i=[];for(let o=1;o<n;o++){const u=o*t;let c=1/0,d=u;for(let f=-r;f<=r;f++){const m=u+f;if(m<=0||m>=e.length)continue;const h=e[m];h<c&&(c=h,d=m)}i.push(d)}if(i.length<1)return 0;const a=[];for(const o of i){const u=e[o]*1.5+ca(e,10)*.5;let c=o,d=o;for(;c>1&&e[c-1]<=u;)c--;for(;d<e.length-2&&e[d+1]<=u;)d++;a.push(Math.max(0,d-c+1))}const s=Math.round(Ic(a));return Math.max(0,Math.min(s,Math.floor(t/4)))}function Ic(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function ca(e,t){const n=Array.from(e);n.sort((i,a)=>i-a);const r=Math.max(0,Math.min(n.length-1,Math.floor(t/100*n.length)));return n[r]}function Xs(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function lm(e,t,n,r,i){const{data:a}=e.getImageData(t,n,r,i);let s=0;for(let o=3;o<a.length;o+=4)s+=a[o];return s/(255*(a.length/4))<.03}const dm=C.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:i,rows:a,gutterX:s=0,gutterY:o=0,frameCount:u,atlasFrames:c,fps:d=12,autoplay:f=!0,loop:m=!0,startFrame:h=0,direction:g="forward",scale:y=1,backgroundColor:v,className:A,style:k,pauseWhenHidden:p=!1,originX:O,originY:S,onLoad:w,onEnd:B,onFrame:K},Y){const N=ir(),H=C.useRef(null),$=C.useRef(null),[j,z]=C.useState(null),[Z,fe]=C.useState(null),[ie,ve]=C.useState(null),[xe,E]=C.useState(!1),[W,ne]=C.useState(!!f),[_,Q]=C.useState(h),ae=C.useRef(1),[X,se]=C.useState(null),re=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));C.useEffect(()=>{let Te=!1;return E(!1),fc(t).then(({imgEl:De,bitmap:we})=>{Te||(z(De),fe(we),ve({w:De.naturalWidth,h:De.naturalHeight}),E(!0),w?.())}).catch(()=>{}),()=>{Te=!0}},[t,w]),C.useEffect(()=>{let Te=!1;return(async()=>{if(!j)return;if(c&&c.length){se(null);return}if(!(!n||!r||!i||!a)){se(null);return}const we=await cm(j,{debug:!0});Te||(we?se({frameWidth:we.frameWidth,frameHeight:we.frameHeight,columns:we.columns,rows:we.rows,gutterX:we.gutterX,gutterY:we.gutterY}):(se(null),N.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{Te=!0}},[j,c,n,r,i,a,N]);const ce=X?.frameWidth??n,ue=X?.frameHeight??r,ke=X?.columns??i,G=X?.rows??a,Le=X?.gutterX??s,ze=X?.gutterY??o,rt=X?.originX??O??0,Ye=X?.originY??S??0,it=C.useMemo(()=>{if(c&&c.length>0)return{cols:0,rows:0};if(!ie||!ce||!ue)return{cols:0,rows:0};const Te=ke??Math.floor((ie.w+Le)/(ce+Le)),De=G??Math.floor((ie.h+ze)/(ue+ze));return{cols:Math.max(0,Te),rows:Math.max(0,De)}},[c,ie,ce,ue,ke,G,Le,ze]),Ue=C.useMemo(()=>{if(c?.length)return c;if(!ce||!ue)return[];const{cols:Te,rows:De}=it;if(!Te||!De)return[];const we=Math.min(u??Te*De,Te*De),F=[];for(let R=0;R<we;R++){const P=R%Te,J=Math.floor(R/Te),oe=rt+P*(ce+Le),Se=Ye+J*(ue+ze);F.push({x:oe,y:Se,w:ce,h:ue})}if(j&&F.length){const R=document.createElement("canvas");R.width=j.naturalWidth,R.height=j.naturalHeight;const P=R.getContext("2d");if(P){P.drawImage(j,0,0);let J=F.length;for(;J>0&&lm(P,F[J-1].x,F[J-1].y,F[J-1].w,F[J-1].h);)J--;return F.slice(0,J)}}return F},[c,it,u,ce,ue,Le,ze,j,rt,Ye]),Ct=()=>{const Te=H.current;if(!Te||Ue.length===0)return;const De=Ue[Math.max(0,Math.min(_,Ue.length-1))],we=Math.max(1,Math.round(De.w*y)),F=Math.max(1,Math.round(De.h*y));Te.style.width=we+"px",Te.style.height=F+"px",Te.width=we*re,Te.height=F*re};C.useEffect(()=>{Ct()},[xe,y,Ue.length,re,_]);const yt=Te=>{const De=Z??j??null,we=H.current;if(!we||!De||Ue.length===0)return;const F=we.getContext("2d");if(!F)return;F.save(),F.setTransform(1,0,0,1,0,0),F.clearRect(0,0,we.width,we.height),v&&(F.fillStyle=v,F.fillRect(0,0,we.width,we.height));const R=Ue[Te];F.scale(re,re),F.drawImage(De,R.x,R.y,R.w,R.h,0,0,Math.round(R.w*y),Math.round(R.h*y)),F.restore()};return C.useEffect(()=>{if(!xe||Ue.length===0)return;let Te=performance.now();const De=1e3/Math.max(1,Math.min(120,d)),we=F=>{if($.current=requestAnimationFrame(we),!W){yt(_);return}const R=F-Te;if(R<De){yt(_);return}Te=F-R%De,Q(P=>{const J=Ue.length-1;let oe=P;return g==="forward"?oe=P+1:g==="backward"?oe=P-1:((P>=J&&ae.current===1||P<=0&&ae.current===-1)&&(ae.current*=-1),oe=P+ae.current),(oe>J||oe<0)&&(m?oe=g==="backward"?J:0:(oe=Math.max(0,Math.min(oe,J)),ne(!1),B?.())),oe})};return $.current=requestAnimationFrame(we),()=>{$.current&&cancelAnimationFrame($.current)}},[xe,d,W,m,g,Ue.length,_]),C.useEffect(()=>{yt(_),K?.(_)},[_,xe,y,re]),C.useEffect(()=>{if(!p)return;const Te=()=>{document.hidden&&ne(!1)};return document.addEventListener("visibilitychange",Te),()=>document.removeEventListener("visibilitychange",Te)},[p]),C.useImperativeHandle(Y,()=>({play:()=>ne(!0),pause:()=>ne(!1),toggle:()=>ne(Te=>!Te),gotoFrame:Te=>Q(()=>Math.max(0,Math.min(Te,Math.max(0,Ue.length-1)))),isPlaying:()=>W,currentFrame:()=>_}),[W,_,Ue.length]),b.jsx("div",{className:A,style:k,children:b.jsx("canvas",{ref:H,"aria-label":"spritesheet animation"})})});function fm({url:e,className:t}){const[n,r]=C.useState(""),[i,a]=C.useState(null);return C.useEffect(()=>{let s=!1;return cc(e).then(({sanitized:o})=>{s||(r(o),a(null))}).catch(o=>!s&&a(o.message??"Failed to load")),()=>{s=!0}},[e]),i?b.jsxs("div",{className:t,role:"alert",children:["Couldn’t load SVG: ",i]}):n?b.jsx("div",{className:t,dangerouslySetInnerHTML:{__html:n}}):b.jsx("div",{className:t})}function hm({mobile:e=.6,tablet:t=.8,desktop:n=1}){const[r,i]=C.useState(n);return C.useEffect(()=>{if(typeof window>"u")return;const a=[{mq:window.matchMedia("(max-width: 639px)"),value:e},{mq:window.matchMedia("(min-width: 640px) and (max-width: 1023px)"),value:t},{mq:window.matchMedia("(min-width: 1024px)"),value:n}],s=()=>{for(const{mq:o,value:u}of a)if(o.matches){i(u);break}};return a.forEach(({mq:o})=>o.addEventListener("change",s)),s(),()=>{a.forEach(({mq:o})=>o.removeEventListener("change",s))}},[e,t,n]),r}const Wa=({facet:e})=>{const t=ir(),{mode:n,assetUrl:r,spr_columns:i,spr_fps:a,spr_frameCount:s,spr_frameHeight:o,spr_frameWidth:u,spr_gutterX:c,spr_gutterY:d,spr_rows:f,spr_originX:m,spr_originY:h,spr_scaleDesktop:g,spr_scaleMobile:y,spr_scaleTablet:v}=e,A=hm({mobile:y??.6,tablet:v??.8,desktop:g??1});return b.jsxs("div",{className:"assetContainer",children:[n===ee.AgentDisplayFacetModeType.LOTTIE&&b.jsx(um,{src:r,autoplay:!0,onError:k=>t.error(k)}),n===ee.AgentDisplayFacetModeType.SVG&&b.jsx("div",{children:b.jsx(fm,{url:r})}),n===ee.AgentDisplayFacetModeType.IMAGE&&b.jsx(sm,{src:r}),n===ee.AgentDisplayFacetModeType.SPRITESHEET&&b.jsx(dm,{src:r,frameCount:s,columns:i,rows:f,fps:a,frameHeight:o,frameWidth:u,gutterX:c,gutterY:d,originX:m,originY:h,scale:A,autoplay:!0})]})},mm=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=C.useContext(Rt);return b.jsxs("div",{className:`launcher
|
|
37
37
|
fixed
|
|
38
38
|
z-[999999999]
|
|
39
39
|
transition
|
|
@@ -44,36 +44,36 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
44
44
|
flex
|
|
45
45
|
justify-center
|
|
46
46
|
items-center
|
|
47
|
-
`,onClick:()=>t(!e),children:[!e&&x.jsx(ka,{facet:n.agent.display[ee.AgentDisplayFacetRoleType.LAUNCHER]}),e&&x.jsx(Ju,{className:"w-6 h-6",fill:"white"})]})};function vs(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function el(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const P0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,B0={};function ks(e,t){return(B0.jsx?M0:P0).test(e)}const F0=/[ \t\n\f\r]/g;function H0(e){return typeof e=="object"?e.type==="text"?Ns(e.value):!1:Ns(e)}function Ns(e){return e.replace(F0,"")===""}class Qn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Qn.prototype.property={};Qn.prototype.normal={};Qn.prototype.space=null;function tl(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Qn(n,r,t)}function Yn(e){return e.toLowerCase()}class bt{constructor(t,n){this.property=t,this.attribute=n}}bt.prototype.space=null;bt.prototype.boolean=!1;bt.prototype.booleanish=!1;bt.prototype.overloadedBoolean=!1;bt.prototype.number=!1;bt.prototype.commaSeparated=!1;bt.prototype.spaceSeparated=!1;bt.prototype.commaOrSpaceSeparated=!1;bt.prototype.mustUseProperty=!1;bt.prototype.defined=!1;let U0=0;const pe=un(),Ye=un(),nl=un(),$=un(),Me=un(),En=un(),lt=un();function un(){return 2**++U0}const Wi=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Ye,commaOrSpaceSeparated:lt,commaSeparated:En,number:$,overloadedBoolean:nl,spaceSeparated:Me},Symbol.toStringTag,{value:"Module"})),oi=Object.keys(Wi);class Na extends bt{constructor(t,n,r,i){let a=-1;if(super(t,n),Rs(this,"space",i),typeof r=="number")for(;++a<oi.length;){const s=oi[a];Rs(this,oi[a],(r&Wi[s])===Wi[s])}}}Na.prototype.defined=!0;function Rs(e,t,n){n&&(e[t]=n)}const j0={}.hasOwnProperty;function _n(e){const t={},n={};let r;for(r in e.properties)if(j0.call(e.properties,r)){const i=e.properties[r],a=new Na(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Yn(r)]=r,n[Yn(a.attribute)]=r}return new Qn(t,n,e.space)}const rl=_n({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),il=_n({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function al(e,t){return t in e?e[t]:t}function sl(e,t){return al(e,t.toLowerCase())}const ol=_n({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:sl,properties:{xmlns:null,xmlnsXLink:null}}),ul=_n({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ye,ariaAutoComplete:null,ariaBusy:Ye,ariaChecked:Ye,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:Ye,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:Ye,ariaFlowTo:Me,ariaGrabbed:Ye,ariaHasPopup:null,ariaHidden:Ye,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:$,ariaLive:null,ariaModal:Ye,ariaMultiLine:Ye,ariaMultiSelectable:Ye,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Ye,ariaReadOnly:Ye,ariaRelevant:null,ariaRequired:Ye,ariaRoleDescription:Me,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Ye,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null}}),z0=_n({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:sl,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:En,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Me,autoFocus:pe,autoPlay:pe,blocking:Me,capture:null,charSet:null,checked:pe,cite:null,className:Me,cols:$,colSpan:null,content:null,contentEditable:Ye,controls:pe,controlsList:Me,coords:$|En,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:nl,draggable:Ye,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Me,height:$,hidden:pe,high:$,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Me,itemRef:Me,itemScope:pe,itemType:Me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pe,optimum:$,pattern:null,ping:Me,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Me,required:pe,reversed:pe,rows:$,rowSpan:$,sandbox:Me,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Ye,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:Ye,width:$,wrap:null,align:null,aLink:null,archive:Me,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Ye,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:$,security:null,unselectable:null}}),$0=_n({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:al,properties:{about:lt,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:En,g2:En,glyphName:En,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:lt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lt,rev:lt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lt,requiredFeatures:lt,requiredFonts:lt,requiredFormats:lt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:lt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lt,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Y0=/^data[-\w.:]+$/i,Os=/-[a-z]/g,G0=/[A-Z]/g;function Hr(e,t){const n=Yn(t);let r=t,i=bt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Y0.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Os,q0);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Os.test(a)){let s=a.replace(G0,V0);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Na}return new i(r,t)}function V0(e){return"-"+e.toLowerCase()}function q0(e){return e.charAt(1).toUpperCase()}const W0={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Kn=tl([il,rl,ol,ul,z0],"html"),Gt=tl([il,rl,ol,ul,$0],"svg");function Ls(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ll(e){return e.join(" ").trim()}var dn={},ui,Ds;function X0(){if(Ds)return ui;Ds=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
|
|
48
|
-
`,c="/",d="*",f="",p="comment",h="declaration";ui=function(E,v){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];v=v||{};var C=1,A=1;function N(U){var F=U.match(t);F&&(C+=F.length);var q=U.lastIndexOf(u);A=~q?U.length-q:A+U.length}function L(){var U={line:C,column:A};return function(F){return F.position=new w(U),J(),F}}function w(U){this.start=U,this.end={line:C,column:A},this.source=v.source}w.prototype.content=E;function k(U){var F=new Error(v.source+":"+C+":"+A+": "+U);if(F.reason=U,F.filename=v.source,F.line=C,F.column=A,F.source=E,!v.silent)throw F}function Y(U){var F=U.exec(E);if(F){var q=F[0];return N(q),E=E.slice(q.length),F}}function J(){Y(n)}function X(U){var F;for(U=U||[];F=I();)F!==!1&&U.push(F);return U}function I(){var U=L();if(!(c!=E.charAt(0)||d!=E.charAt(1))){for(var F=2;f!=E.charAt(F)&&(d!=E.charAt(F)||c!=E.charAt(F+1));)++F;if(F+=2,f===E.charAt(F-1))return k("End of comment missing");var q=E.slice(2,F-2);return A+=2,N(q),E=E.slice(F),A+=2,U({type:p,comment:q})}}function j(){var U=L(),F=Y(r);if(F){if(I(),!Y(i))return k("property missing ':'");var q=Y(a),he=U({type:h,property:b(F[0].replace(e,f)),value:q?b(q[0].replace(e,f)):f});return Y(s),he}}function z(){var U=[];X(U);for(var F;F=j();)F!==!1&&(U.push(F),X(U));return U}return J(),z()};function b(E){return E?E.replace(o,f):f}return ui}var Ps;function Q0(){if(Ps)return dn;Ps=1;var e=dn&&dn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(dn,"__esModule",{value:!0});var t=e(X0());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var c=u.property,d=u.value;o?i(c,d,u):d&&(a=a||{},a[c]=d)}}),a}return dn.default=n,dn}var K0=Q0();const Ms=ma(K0),J0=Ms.default||Ms,Ur=cl("end"),Rt=cl("start");function cl(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Z0(e){const t=Rt(e),n=Ur(e);if(t&&n)return{start:t,end:n}}function Mn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Bs(e.position):"start"in e||"end"in e?Bs(e):"line"in e||"column"in e?Xi(e):""}function Xi(e){return Fs(e&&e.line)+":"+Fs(e&&e.column)}function Bs(e){return Xi(e&&e.start)+"-"+Xi(e&&e.end)}function Fs(e){return e&&typeof e=="number"?e:1}class Ke extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=Mn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ke.prototype.file="";Ke.prototype.name="";Ke.prototype.reason="";Ke.prototype.message="";Ke.prototype.stack="";Ke.prototype.column=void 0;Ke.prototype.line=void 0;Ke.prototype.ancestors=void 0;Ke.prototype.cause=void 0;Ke.prototype.fatal=void 0;Ke.prototype.place=void 0;Ke.prototype.ruleId=void 0;Ke.prototype.source=void 0;const Ra={}.hasOwnProperty,ep=new Map,tp=/[A-Z]/g,np=/-([a-z])/g,rp=new Set(["table","tbody","thead","tfoot","tr"]),ip=new Set(["td","th"]),dl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ap(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=hp(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=fp(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Gt:Kn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=fl(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function fl(e,t,n){if(t.type==="element")return sp(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return op(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return lp(e,t,n);if(t.type==="mdxjsEsm")return up(e,t);if(t.type==="root")return cp(e,t,n);if(t.type==="text")return dp(e,t)}function sp(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Gt,e.schema=i),e.ancestors.push(t);const a=pl(e,t.tagName,!1),s=pp(e,t);let o=La(e,t);return rp.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!H0(u):!0})),hl(e,s,a,t),Oa(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function op(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Gn(e,t.position)}function up(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Gn(e,t.position)}function lp(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Gt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:pl(e,t.name,!0),s=mp(e,t),o=La(e,t);return hl(e,s,a,t),Oa(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function cp(e,t,n){const r={};return Oa(r,La(e,t)),e.create(t,e.Fragment,r,n)}function dp(e,t){return t.value}function hl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Oa(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fp(e,t,n){return r;function r(i,a,s,o){const c=Array.isArray(s.children)?n:t;return o?c(a,s,o):c(a,s)}}function hp(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=Rt(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function pp(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ra.call(t.properties,i)){const a=gp(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&ip.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function mp(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Gn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Gn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function La(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ep;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const o=fl(e,a,s);o!==void 0&&n.push(o)}return n}function gp(e,t,n){const r=Hr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?el(n):ll(n)),r.property==="style"){let i=typeof n=="object"?n:bp(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Ep(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?W0[r.property]||r.property:r.attribute,n]}}function bp(e,t){const n={};try{J0(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,s=new Ke("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=dl+"#cannot-parse-style-attribute",s}}return n;function r(i,a){let s=i;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(np,yp)),n[s]=a}}function pl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=ks(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=ks(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ra.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Gn(e)}function Gn(e,t){const n=new Ke("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=dl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ep(e){const t={};let n;for(n in e)Ra.call(e,n)&&(t[Tp(n)]=e[n]);return t}function Tp(e){let t=e.replace(tp,xp);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function yp(e,t){return t.toUpperCase()}function xp(e){return"-"+e.toLowerCase()}const li={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Sp={};function Da(e,t){const n=Sp,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ml(e,r,i)}function ml(e,t,n){if(_p(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Hs(e.children,t,n)}return Array.isArray(e)?Hs(e,t,n):""}function Hs(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ml(e[i],t,n);return r.join("")}function _p(e){return!!(e&&typeof e=="object")}const Us=document.createElement("i");function Pa(e){const t="&"+e+";";Us.innerHTML=t;const n=Us.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ct(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function ft(e,t){return e.length>0?(ct(e,e.length,0,t),e):t}const js={}.hasOwnProperty;function gl(e){const t={};let n=-1;for(;++n<e.length;)Cp(t,e[n]);return t}function Cp(e,t){let n;for(n in t){const i=(js.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){js.call(i,s)||(i[s]=[]);const o=a[s];Ap(i[s],Array.isArray(o)?o:o?[o]:[])}}}function Ap(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ct(e,0,0,r)}function bl(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function xt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const rt=Vt(/[A-Za-z]/),Qe=Vt(/[\dA-Za-z]/),wp=Vt(/[#-'*+\--9=?A-Z^-~]/);function Tr(e){return e!==null&&(e<32||e===127)}const Qi=Vt(/\d/),Ip=Vt(/[\dA-Fa-f]/),vp=Vt(/[!-/:-@[-`{-~]/);function ue(e){return e!==null&&e<-2}function Pe(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const jr=Vt(new RegExp("\\p{P}|\\p{S}","u")),rn=Vt(/\s/);function Vt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Cn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&Qe(e.charCodeAt(n+1))&&Qe(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ce(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return be(u)?(e.enter(n),o(u)):t(u)}function o(u){return be(u)&&a++<i?(e.consume(u),o):(e.exit(n),t(u))}}const kp={tokenize:Np};function Np(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ce(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ue(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const Rp={tokenize:Op},zs={tokenize:Lp};function Op(e){const t=this,n=[];let r=0,i,a,s;return o;function o(N){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,u,c)(N)}return c(N)}function u(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const L=t.events.length;let w=L,k;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){k=t.events[w][1].end;break}C(r);let Y=L;for(;Y<t.events.length;)t.events[Y][1].end=Object.assign({},k),Y++;return ct(t.events,w+1,0,t.events.slice(L)),t.events.length=Y,c(N)}return o(N)}function c(N){if(r===n.length){if(!i)return p(N);if(i.currentConstruct&&i.currentConstruct.concrete)return b(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(zs,d,f)(N)}function d(N){return i&&A(),C(r),p(N)}function f(N){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(N)}function p(N){return t.containerState={},e.attempt(zs,h,b)(N)}function h(N){return r++,n.push([t.currentConstruct,t.containerState]),p(N)}function b(N){if(N===null){i&&A(),C(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),E(N)}function E(N){if(N===null){v(e.exit("chunkFlow"),!0),C(0),e.consume(N);return}return ue(N)?(e.consume(N),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(N),E)}function v(N,L){const w=t.sliceStream(N);if(L&&w.push(null),N.previous=a,a&&(a.next=N),a=N,i.defineSkip(N.start),i.write(w),t.parser.lazy[N.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<s&&(!i.events[k][1].end||i.events[k][1].end.offset>s))return;const Y=t.events.length;let J=Y,X,I;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){if(X){I=t.events[J][1].end;break}X=!0}for(C(r),k=Y;k<t.events.length;)t.events[k][1].end=Object.assign({},I),k++;ct(t.events,J+1,0,t.events.slice(Y)),t.events.length=k}}function C(N){let L=n.length;for(;L-- >N;){const w=n[L];t.containerState=w[1],w[0].exit.call(t,e)}n.length=N}function A(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Lp(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function yr(e){if(e===null||Pe(e)||rn(e))return 1;if(jr(e))return 2}function zr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Ki={name:"attention",tokenize:Pp,resolveAll:Dp};function Dp(e,t){let n=-1,r,i,a,s,o,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);$s(f,-u),$s(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},o={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ft(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ft(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=ft(c,zr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ft(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=ft(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ct(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Pp(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=yr(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const c=e.exit("attentionSequence"),d=yr(u),f=!d||d===2&&i||n.includes(u),p=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?f:f&&(i||!p)),c._close=!!(a===42?p:p&&(d||!f)),t(u)}}function $s(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Mp={name:"autolink",tokenize:Bp};function Bp(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return rt(h)?(e.consume(h),s):c(h)}function s(h){return h===43||h===45||h===46||Qe(h)?(r=1,o(h)):c(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||Qe(h))&&r++<32?(e.consume(h),o):(r=0,c(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Tr(h)?n(h):(e.consume(h),u)}function c(h){return h===64?(e.consume(h),d):wp(h)?(e.consume(h),c):n(h)}function d(h){return Qe(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||Qe(h))&&r++<63){const b=h===45?p:f;return e.consume(h),b}return n(h)}}const Jn={tokenize:Fp,partial:!0};function Fp(e,t,n){return r;function r(a){return be(a)?Ce(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ue(a)?t(a):n(a)}}const El={name:"blockQuote",tokenize:Hp,continuation:{tokenize:Up},exit:jp};function Hp(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return be(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Up(e,t,n){const r=this;return i;function i(s){return be(s)?Ce(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(El,t,n)(s)}}function jp(e){e.exit("blockQuote")}const Tl={name:"characterEscape",tokenize:zp};function zp(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return vp(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const yl={name:"characterReference",tokenize:$p};function $p(e,t,n){const r=this;let i=0,a,s;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=Qe,d(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Ip,d):(e.enter("characterReferenceValue"),a=7,s=Qi,d(f))}function d(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return s===Qe&&!Pa(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),d):n(f)}}const Ys={tokenize:Gp,partial:!0},Gs={name:"codeFenced",tokenize:Yp,concrete:!0};function Yp(e,t,n){const r=this,i={tokenize:w,partial:!0};let a=0,s=0,o;return u;function u(k){return c(k)}function c(k){const Y=r.events[r.events.length-1];return a=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,o=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(k)}function d(k){return k===o?(s++,e.consume(k),d):s<3?n(k):(e.exit("codeFencedFenceSequence"),be(k)?Ce(e,f,"whitespace")(k):f(k))}function f(k){return k===null||ue(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Ys,E,L)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||ue(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(k)):be(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ce(e,h,"whitespace")(k)):k===96&&k===o?n(k):(e.consume(k),p)}function h(k){return k===null||ue(k)?f(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===null||ue(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(k)):k===96&&k===o?n(k):(e.consume(k),b)}function E(k){return e.attempt(i,L,v)(k)}function v(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),C}function C(k){return a>0&&be(k)?Ce(e,A,"linePrefix",a+1)(k):A(k)}function A(k){return k===null||ue(k)?e.check(Ys,E,L)(k):(e.enter("codeFlowValue"),N(k))}function N(k){return k===null||ue(k)?(e.exit("codeFlowValue"),A(k)):(e.consume(k),N)}function L(k){return e.exit("codeFenced"),t(k)}function w(k,Y,J){let X=0;return I;function I(q){return k.enter("lineEnding"),k.consume(q),k.exit("lineEnding"),j}function j(q){return k.enter("codeFencedFence"),be(q)?Ce(k,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):z(q)}function z(q){return q===o?(k.enter("codeFencedFenceSequence"),U(q)):J(q)}function U(q){return q===o?(X++,k.consume(q),U):X>=s?(k.exit("codeFencedFenceSequence"),be(q)?Ce(k,F,"whitespace")(q):F(q)):J(q)}function F(q){return q===null||ue(q)?(k.exit("codeFencedFence"),Y(q)):J(q)}}}function Gp(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const ci={name:"codeIndented",tokenize:qp},Vp={tokenize:Wp,partial:!0};function qp(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ce(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):ue(c)?e.attempt(Vp,s,u)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||ue(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function u(c){return e.exit("codeIndented"),t(c)}}function Wp(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ue(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ce(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):ue(s)?i(s):n(s)}}const Xp={name:"codeText",tokenize:Jp,resolve:Qp,previous:Kp};function Qp(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Kp(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jp(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,d(f)):ue(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||ue(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}function xl(e){const t={};let n=-1,r,i,a,s,o,u,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Zp(e,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(s=e[a],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},e[i][1].start),o=e.slice(i,n),o.unshift(r),ct(e,i,n-i+1,o))}}return!c}function Zp(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const a=[],s=n._tokenizer||r.parser[n.contentType](n.start),o=s.events,u=[],c={};let d,f,p=-1,h=n,b=0,E=0;const v=[E];for(;h;){for(;e[++i][1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(E=p+1,v.push(E),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),p=v.length;p--;){const C=o.slice(v[p],v[p+1]),A=a.pop();u.unshift([A,A+C.length-1]),ct(e,A,2,C)}for(p=-1;++p<u.length;)c[b+u[p][0]]=b+u[p][1],b+=u[p][1]-u[p][0]-1;return c}const em={tokenize:rm,resolve:nm},tm={tokenize:im,partial:!0};function nm(e){return xl(e),e}function rm(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):ue(o)?e.check(tm,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function im(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ce(e,a,"linePrefix")}function a(s){if(s===null||ue(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Sl(e,t,n,r,i,a,s,o,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(C){return C===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(C),e.exit(a),p):C===null||C===32||C===41||Tr(C)?n(C):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),E(C))}function p(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===62?(e.exit("chunkString"),e.exit(o),p(C)):C===null||C===60||ue(C)?n(C):(e.consume(C),C===92?b:h)}function b(C){return C===60||C===62||C===92?(e.consume(C),h):h(C)}function E(C){return!d&&(C===null||C===41||Pe(C))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(C)):d<c&&C===40?(e.consume(C),d++,E):C===41?(e.consume(C),d--,E):C===null||C===32||C===40||Tr(C)?n(C):(e.consume(C),C===92?v:E)}function v(C){return C===40||C===41||C===92?(e.consume(C),E):E(C)}}function _l(e,t,n,r,i,a){const s=this;let o=0,u;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ue(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||ue(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),u||(u=!be(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function Cl(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===s?(e.exit(a),u(s)):p===null?n(p):ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ce(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||ue(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:d)}function f(p){return p===s||p===92?(e.consume(p),d):d(p)}}function Bn(e,t){let n;return r;function r(i){return ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):be(i)?Ce(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const am={name:"definition",tokenize:om},sm={tokenize:um,partial:!0};function om(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return _l.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=xt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return Pe(h)?Bn(e,c)(h):c(h)}function c(h){return Sl(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(sm,f,f)(h)}function f(h){return be(h)?Ce(e,p,"whitespace")(h):p(h)}function p(h){return h===null||ue(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function um(e,t,n){return r;function r(o){return Pe(o)?Bn(e,i)(o):n(o)}function i(o){return Cl(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return be(o)?Ce(e,s,"whitespace")(o):s(o)}function s(o){return o===null||ue(o)?t(o):n(o)}}const lm={name:"hardBreakEscape",tokenize:cm};function cm(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ue(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const dm={name:"headingAtx",tokenize:hm,resolve:fm};function fm(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ct(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function hm(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||Pe(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||ue(d)?(e.exit("atxHeading"),t(d)):be(d)?Ce(e,o,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function c(d){return d===null||d===35||Pe(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),c)}}const pm=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Vs=["pre","script","style","textarea"],mm={name:"htmlFlow",tokenize:Tm,resolveTo:Em,concrete:!0},gm={tokenize:xm,partial:!0},bm={tokenize:ym,partial:!0};function Em(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Tm(e,t,n){const r=this;let i,a,s,o,u;return c;function c(y){return d(y)}function d(y){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(y),f}function f(y){return y===33?(e.consume(y),p):y===47?(e.consume(y),a=!0,E):y===63?(e.consume(y),i=3,r.interrupt?t:m):rt(y)?(e.consume(y),s=String.fromCharCode(y),v):n(y)}function p(y){return y===45?(e.consume(y),i=2,h):y===91?(e.consume(y),i=5,o=0,b):rt(y)?(e.consume(y),i=4,r.interrupt?t:m):n(y)}function h(y){return y===45?(e.consume(y),r.interrupt?t:m):n(y)}function b(y){const K="CDATA[";return y===K.charCodeAt(o++)?(e.consume(y),o===K.length?r.interrupt?t:z:b):n(y)}function E(y){return rt(y)?(e.consume(y),s=String.fromCharCode(y),v):n(y)}function v(y){if(y===null||y===47||y===62||Pe(y)){const K=y===47,Z=s.toLowerCase();return!K&&!a&&Vs.includes(Z)?(i=1,r.interrupt?t(y):z(y)):pm.includes(s.toLowerCase())?(i=6,K?(e.consume(y),C):r.interrupt?t(y):z(y)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(y):a?A(y):N(y))}return y===45||Qe(y)?(e.consume(y),s+=String.fromCharCode(y),v):n(y)}function C(y){return y===62?(e.consume(y),r.interrupt?t:z):n(y)}function A(y){return be(y)?(e.consume(y),A):I(y)}function N(y){return y===47?(e.consume(y),I):y===58||y===95||rt(y)?(e.consume(y),L):be(y)?(e.consume(y),N):I(y)}function L(y){return y===45||y===46||y===58||y===95||Qe(y)?(e.consume(y),L):w(y)}function w(y){return y===61?(e.consume(y),k):be(y)?(e.consume(y),w):N(y)}function k(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),u=y,Y):be(y)?(e.consume(y),k):J(y)}function Y(y){return y===u?(e.consume(y),u=null,X):y===null||ue(y)?n(y):(e.consume(y),Y)}function J(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||Pe(y)?w(y):(e.consume(y),J)}function X(y){return y===47||y===62||be(y)?N(y):n(y)}function I(y){return y===62?(e.consume(y),j):n(y)}function j(y){return y===null||ue(y)?z(y):be(y)?(e.consume(y),j):n(y)}function z(y){return y===45&&i===2?(e.consume(y),he):y===60&&i===1?(e.consume(y),le):y===62&&i===4?(e.consume(y),G):y===63&&i===3?(e.consume(y),m):y===93&&i===5?(e.consume(y),we):ue(y)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(gm,ne,U)(y)):y===null||ue(y)?(e.exit("htmlFlowData"),U(y)):(e.consume(y),z)}function U(y){return e.check(bm,F,ne)(y)}function F(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),q}function q(y){return y===null||ue(y)?U(y):(e.enter("htmlFlowData"),z(y))}function he(y){return y===45?(e.consume(y),m):z(y)}function le(y){return y===47?(e.consume(y),s="",Ie):z(y)}function Ie(y){if(y===62){const K=s.toLowerCase();return Vs.includes(K)?(e.consume(y),G):z(y)}return rt(y)&&s.length<8?(e.consume(y),s+=String.fromCharCode(y),Ie):z(y)}function we(y){return y===93?(e.consume(y),m):z(y)}function m(y){return y===62?(e.consume(y),G):y===45&&i===2?(e.consume(y),m):z(y)}function G(y){return y===null||ue(y)?(e.exit("htmlFlowData"),ne(y)):(e.consume(y),G)}function ne(y){return e.exit("htmlFlow"),t(y)}}function ym(e,t,n){const r=this;return i;function i(s){return ue(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function xm(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Jn,t,n)}}const Sm={name:"htmlText",tokenize:_m};function _m(e,t,n){const r=this;let i,a,s;return o;function o(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),c):m===47?(e.consume(m),w):m===63?(e.consume(m),N):rt(m)?(e.consume(m),J):n(m)}function c(m){return m===45?(e.consume(m),d):m===91?(e.consume(m),a=0,b):rt(m)?(e.consume(m),A):n(m)}function d(m){return m===45?(e.consume(m),h):n(m)}function f(m){return m===null?n(m):m===45?(e.consume(m),p):ue(m)?(s=f,le(m)):(e.consume(m),f)}function p(m){return m===45?(e.consume(m),h):f(m)}function h(m){return m===62?he(m):m===45?p(m):f(m)}function b(m){const G="CDATA[";return m===G.charCodeAt(a++)?(e.consume(m),a===G.length?E:b):n(m)}function E(m){return m===null?n(m):m===93?(e.consume(m),v):ue(m)?(s=E,le(m)):(e.consume(m),E)}function v(m){return m===93?(e.consume(m),C):E(m)}function C(m){return m===62?he(m):m===93?(e.consume(m),C):E(m)}function A(m){return m===null||m===62?he(m):ue(m)?(s=A,le(m)):(e.consume(m),A)}function N(m){return m===null?n(m):m===63?(e.consume(m),L):ue(m)?(s=N,le(m)):(e.consume(m),N)}function L(m){return m===62?he(m):N(m)}function w(m){return rt(m)?(e.consume(m),k):n(m)}function k(m){return m===45||Qe(m)?(e.consume(m),k):Y(m)}function Y(m){return ue(m)?(s=Y,le(m)):be(m)?(e.consume(m),Y):he(m)}function J(m){return m===45||Qe(m)?(e.consume(m),J):m===47||m===62||Pe(m)?X(m):n(m)}function X(m){return m===47?(e.consume(m),he):m===58||m===95||rt(m)?(e.consume(m),I):ue(m)?(s=X,le(m)):be(m)?(e.consume(m),X):he(m)}function I(m){return m===45||m===46||m===58||m===95||Qe(m)?(e.consume(m),I):j(m)}function j(m){return m===61?(e.consume(m),z):ue(m)?(s=j,le(m)):be(m)?(e.consume(m),j):X(m)}function z(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,U):ue(m)?(s=z,le(m)):be(m)?(e.consume(m),z):(e.consume(m),F)}function U(m){return m===i?(e.consume(m),i=void 0,q):m===null?n(m):ue(m)?(s=U,le(m)):(e.consume(m),U)}function F(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||Pe(m)?X(m):(e.consume(m),F)}function q(m){return m===47||m===62||Pe(m)?X(m):n(m)}function he(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function le(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ie}function Ie(m){return be(m)?Ce(e,we,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):we(m)}function we(m){return e.enter("htmlTextData"),s(m)}}const Ma={name:"labelEnd",tokenize:km,resolveTo:vm,resolveAll:Im},Cm={tokenize:Nm},Am={tokenize:Rm},wm={tokenize:Om};function Im(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function vm(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return o=[["enter",u,t],["enter",c,t]],o=ft(o,e.slice(a+1,a+r+3)),o=ft(o,[["enter",d,t]]),o=ft(o,zr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=ft(o,[["exit",d,t],e[s-2],e[s-1],["exit",c,t]]),o=ft(o,e.slice(s+1)),o=ft(o,[["exit",u,t]]),ct(e,a,e.length,o),e}function km(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(p){return a?a._inactive?f(p):(s=r.parser.defined.includes(xt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(Cm,d,s?d:f)(p):p===91?e.attempt(Am,d,s?c:f)(p):s?d(p):f(p)}function c(p){return e.attempt(wm,d,f)(p)}function d(p){return t(p)}function f(p){return a._balanced=!0,n(p)}}function Nm(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Pe(f)?Bn(e,a)(f):a(f)}function a(f){return f===41?d(f):Sl(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Pe(f)?Bn(e,u)(f):d(f)}function o(f){return n(f)}function u(f){return f===34||f===39||f===40?Cl(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return Pe(f)?Bn(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Rm(e,t,n){const r=this;return i;function i(o){return _l.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(xt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function Om(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Lm={name:"labelStartImage",tokenize:Dm,resolveAll:Ma.resolveAll};function Dm(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Pm={name:"labelStartLink",tokenize:Mm,resolveAll:Ma.resolveAll};function Mm(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const di={name:"lineEnding",tokenize:Bm};function Bm(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ce(e,t,"linePrefix")}}const gr={name:"thematicBreak",tokenize:Fm};function Fm(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||ue(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),be(c)?Ce(e,o,"whitespace")(c):o(c))}}const ot={name:"list",tokenize:jm,continuation:{tokenize:zm},exit:Ym},Hm={tokenize:Gm,partial:!0},Um={tokenize:$m,partial:!0};function jm(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const b=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Qi(h)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(gr,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Qi(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Jn,r.interrupt?n:d,e.attempt(Hm,p,f))}function d(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function f(h){return be(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function zm(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Jn,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!be(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Um,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(e,e.attempt(ot,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function $m(e,t,n){const r=this;return Ce(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function Ym(e){e.exit(this.containerState.type)}function Gm(e,t,n){const r=this;return Ce(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!be(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const qs={name:"setextUnderline",tokenize:qm,resolveTo:Vm};function Vm(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function qm(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),be(c)?Ce(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||ue(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Wm={tokenize:Xm};function Xm(e){const t=this,n=e.attempt(Jn,r,e.attempt(this.parser.constructs.flowInitial,i,Ce(e,e.attempt(this.parser.constructs.flow,i,e.attempt(em,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Qm={resolveAll:wl()},Km=Al("string"),Jm=Al("text");function Al(e){return{tokenize:t,resolveAll:wl(e==="text"?Zm:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(d){return c(d)?a(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const f=i[d];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function wl(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function Zm(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,o=0,u;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)u=!0,o++;else if(c!==-1){a++;break}}if(o){const c={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-o,offset:r.end.offset-o,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function eg(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let s=[],o=[];const u={consume:A,enter:N,exit:L,attempt:Y(w),check:Y(k),interrupt:Y(k,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:p,now:b,defineSkip:E,write:f};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function f(j){return s=ft(s,j),v(),s[s.length-1]!==null?[]:(J(t,0),c.events=zr(a,c.events,c),c.events)}function p(j,z){return ng(h(j),z)}function h(j){return tg(s,j)}function b(){const{line:j,column:z,offset:U,_index:F,_bufferIndex:q}=r;return{line:j,column:z,offset:U,_index:F,_bufferIndex:q}}function E(j){i[j.line]=j.column,I()}function v(){let j;for(;r._index<s.length;){const z=s[r._index];if(typeof z=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<z.length;)C(z.charCodeAt(r._bufferIndex));else C(z)}}function C(j){d=d(j)}function A(j){ue(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,I()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=j}function N(j,z){const U=z||{};return U.type=j,U.start=b(),c.events.push(["enter",U,c]),o.push(U),U}function L(j){const z=o.pop();return z.end=b(),c.events.push(["exit",z,c]),z}function w(j,z){J(j,z.from)}function k(j,z){z.restore()}function Y(j,z){return U;function U(F,q,he){let le,Ie,we,m;return Array.isArray(F)?ne(F):"tokenize"in F?ne([F]):G(F);function G(W){return oe;function oe(ae){const re=ae!==null&&W[ae],se=ae!==null&&W.null,Se=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(se)?se:se?[se]:[]];return ne(Se)(ae)}}function ne(W){return le=W,Ie=0,W.length===0?he:y(W[Ie])}function y(W){return oe;function oe(ae){return m=X(),we=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?Z():W.tokenize.call(z?Object.assign(Object.create(c),z):c,u,K,Z)(ae)}}function K(W){return j(we,m),q}function Z(W){return m.restore(),++Ie<le.length?y(le[Ie]):he}}}function J(j,z){j.resolveAll&&!a.includes(j)&&a.push(j),j.resolve&&ct(c.events,z,c.events.length-z,j.resolve(c.events.slice(z),c)),j.resolveTo&&(c.events=j.resolveTo(c.events,c))}function X(){const j=b(),z=c.previous,U=c.currentConstruct,F=c.events.length,q=Array.from(o);return{restore:he,from:F};function he(){r=j,c.previous=z,c.currentConstruct=U,c.events.length=F,o=q,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function tg(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function ng(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
47
|
+
`,onClick:()=>t(!e),children:[!e&&b.jsx(Wa,{facet:n.agent.display[ee.AgentDisplayFacetRoleType.LAUNCHER]}),e&&b.jsx(Cc,{className:"w-6 h-6",fill:"white"})]})};function Qs(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function Ac(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const pm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bm={};function Ks(e,t){return(bm.jsx?gm:pm).test(e)}const Em=/[ \t\n\f\r]/g;function Tm(e){return typeof e=="object"?e.type==="text"?Js(e.value):!1:Js(e)}function Js(e){return e.replace(Em,"")===""}class sr{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}sr.prototype.property={};sr.prototype.normal={};sr.prototype.space=null;function wc(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new sr(n,r,t)}function Jn(e){return e.toLowerCase()}class Tt{constructor(t,n){this.property=t,this.attribute=n}}Tt.prototype.space=null;Tt.prototype.boolean=!1;Tt.prototype.booleanish=!1;Tt.prototype.overloadedBoolean=!1;Tt.prototype.number=!1;Tt.prototype.commaSeparated=!1;Tt.prototype.spaceSeparated=!1;Tt.prototype.commaOrSpaceSeparated=!1;Tt.prototype.mustUseProperty=!1;Tt.prototype.defined=!1;let ym=0;const Ee=dn(),Ge=dn(),vc=dn(),V=dn(),Be=dn(),xn=dn(),lt=dn();function dn(){return 2**++ym}const la=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:Ge,commaOrSpaceSeparated:lt,commaSeparated:xn,number:V,overloadedBoolean:vc,spaceSeparated:Be},Symbol.toStringTag,{value:"Module"})),_i=Object.keys(la);class Ga extends Tt{constructor(t,n,r,i){let a=-1;if(super(t,n),Zs(this,"space",i),typeof r=="number")for(;++a<_i.length;){const s=_i[a];Zs(this,_i[a],(r&la[s])===la[s])}}}Ga.prototype.defined=!0;function Zs(e,t,n){n&&(e[t]=n)}const xm={}.hasOwnProperty;function vn(e){const t={},n={};let r;for(r in e.properties)if(xm.call(e.properties,r)){const i=e.properties[r],a=new Ga(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Jn(r)]=r,n[Jn(a.attribute)]=r}return new sr(t,n,e.space)}const kc=vn({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Nc=vn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Rc(e,t){return t in e?e[t]:t}function Oc(e,t){return Rc(e,t.toLowerCase())}const Lc=vn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Oc,properties:{xmlns:null,xmlnsXLink:null}}),Dc=vn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ge,ariaAutoComplete:null,ariaBusy:Ge,ariaChecked:Ge,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Be,ariaCurrent:null,ariaDescribedBy:Be,ariaDetails:null,ariaDisabled:Ge,ariaDropEffect:Be,ariaErrorMessage:null,ariaExpanded:Ge,ariaFlowTo:Be,ariaGrabbed:Ge,ariaHasPopup:null,ariaHidden:Ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Be,ariaLevel:V,ariaLive:null,ariaModal:Ge,ariaMultiLine:Ge,ariaMultiSelectable:Ge,ariaOrientation:null,ariaOwns:Be,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Ge,ariaReadOnly:Ge,ariaRelevant:null,ariaRequired:Ge,ariaRoleDescription:Be,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Ge,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null}}),_m=vn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Oc,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xn,acceptCharset:Be,accessKey:Be,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Be,autoFocus:Ee,autoPlay:Ee,blocking:Be,capture:null,charSet:null,checked:Ee,cite:null,className:Be,cols:V,colSpan:null,content:null,contentEditable:Ge,controls:Ee,controlsList:Be,coords:V|xn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:vc,draggable:Ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Be,height:V,hidden:Ee,high:V,href:null,hrefLang:null,htmlFor:Be,httpEquiv:Be,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Be,itemRef:Be,itemScope:Ee,itemType:Be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:V,pattern:null,ping:Be,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Be,required:Ee,reversed:Ee,rows:V,rowSpan:V,sandbox:Be,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Ge,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:Ge,width:V,wrap:null,align:null,aLink:null,archive:Be,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Ge,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:V,security:null,unselectable:null}}),Sm=vn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Rc,properties:{about:lt,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Be,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:xn,g2:xn,glyphName:xn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:lt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lt,rev:lt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lt,requiredFeatures:lt,requiredFonts:lt,requiredFormats:lt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:lt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lt,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Cm=/^data[-\w.:]+$/i,eo=/-[a-z]/g,Im=/[A-Z]/g;function Qr(e,t){const n=Jn(t);let r=t,i=Tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Cm.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(eo,wm);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!eo.test(a)){let s=a.replace(Im,Am);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ga}return new i(r,t)}function Am(e){return"-"+e.toLowerCase()}function wm(e){return e.charAt(1).toUpperCase()}const vm={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},or=wc([Nc,kc,Lc,Dc,_m],"html"),qt=wc([Nc,kc,Lc,Dc,Sm],"svg");function to(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Pc(e){return e.join(" ").trim()}var mn={},Si,no;function km(){if(no)return Si;no=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
|
|
48
|
+
`,c="/",d="*",f="",m="comment",h="declaration";Si=function(y,v){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];v=v||{};var A=1,k=1;function p(j){var z=j.match(t);z&&(A+=z.length);var Z=j.lastIndexOf(u);k=~Z?j.length-Z:k+j.length}function O(){var j={line:A,column:k};return function(z){return z.position=new S(j),K(),z}}function S(j){this.start=j,this.end={line:A,column:k},this.source=v.source}S.prototype.content=y;function w(j){var z=new Error(v.source+":"+A+":"+k+": "+j);if(z.reason=j,z.filename=v.source,z.line=A,z.column=k,z.source=y,!v.silent)throw z}function B(j){var z=j.exec(y);if(z){var Z=z[0];return p(Z),y=y.slice(Z.length),z}}function K(){B(n)}function Y(j){var z;for(j=j||[];z=N();)z!==!1&&j.push(z);return j}function N(){var j=O();if(!(c!=y.charAt(0)||d!=y.charAt(1))){for(var z=2;f!=y.charAt(z)&&(d!=y.charAt(z)||c!=y.charAt(z+1));)++z;if(z+=2,f===y.charAt(z-1))return w("End of comment missing");var Z=y.slice(2,z-2);return k+=2,p(Z),y=y.slice(z),k+=2,j({type:m,comment:Z})}}function H(){var j=O(),z=B(r);if(z){if(N(),!B(i))return w("property missing ':'");var Z=B(a),fe=j({type:h,property:g(z[0].replace(e,f)),value:Z?g(Z[0].replace(e,f)):f});return B(s),fe}}function $(){var j=[];Y(j);for(var z;z=H();)z!==!1&&(j.push(z),Y(j));return j}return K(),$()};function g(y){return y?y.replace(o,f):f}return Si}var ro;function Nm(){if(ro)return mn;ro=1;var e=mn&&mn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mn,"__esModule",{value:!0});var t=e(km());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var c=u.property,d=u.value;o?i(c,d,u):d&&(a=a||{},a[c]=d)}}),a}return mn.default=n,mn}var Rm=Nm();const io=Ra(Rm),Om=io.default||io,Kr=Mc("end"),Ot=Mc("start");function Mc(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Lm(e){const t=Ot(e),n=Kr(e);if(t&&n)return{start:t,end:n}}function Vn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ao(e.position):"start"in e||"end"in e?ao(e):"line"in e||"column"in e?da(e):""}function da(e){return so(e&&e.line)+":"+so(e&&e.column)}function ao(e){return da(e&&e.start)+"-"+da(e&&e.end)}function so(e){return e&&typeof e=="number"?e:1}class tt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=Vn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}tt.prototype.file="";tt.prototype.name="";tt.prototype.reason="";tt.prototype.message="";tt.prototype.stack="";tt.prototype.column=void 0;tt.prototype.line=void 0;tt.prototype.ancestors=void 0;tt.prototype.cause=void 0;tt.prototype.fatal=void 0;tt.prototype.place=void 0;tt.prototype.ruleId=void 0;tt.prototype.source=void 0;const Ya={}.hasOwnProperty,Dm=new Map,Pm=/[A-Z]/g,Mm=/-([a-z])/g,Bm=new Set(["table","tbody","thead","tfoot","tr"]),Fm=new Set(["td","th"]),Bc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Um(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ym(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Gm(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?qt:or,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Fc(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Fc(e,t,n){if(t.type==="element")return Hm(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return jm(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return $m(e,t,n);if(t.type==="mdxjsEsm")return zm(e,t);if(t.type==="root")return Vm(e,t,n);if(t.type==="text")return Wm(e,t)}function Hm(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=qt,e.schema=i),e.ancestors.push(t);const a=Hc(e,t.tagName,!1),s=qm(e,t);let o=Xa(e,t);return Bm.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Tm(u):!0})),Uc(e,s,a,t),qa(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function jm(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Zn(e,t.position)}function zm(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zn(e,t.position)}function $m(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=qt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Hc(e,t.name,!0),s=Xm(e,t),o=Xa(e,t);return Uc(e,s,a,t),qa(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Vm(e,t,n){const r={};return qa(r,Xa(e,t)),e.create(t,e.Fragment,r,n)}function Wm(e,t){return t.value}function Uc(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function qa(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Gm(e,t,n){return r;function r(i,a,s,o){const c=Array.isArray(s.children)?n:t;return o?c(a,s,o):c(a,s)}}function Ym(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=Ot(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function qm(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ya.call(t.properties,i)){const a=Qm(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&Fm.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Xm(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Zn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Zn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Xa(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Dm;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const o=Fc(e,a,s);o!==void 0&&n.push(o)}return n}function Qm(e,t,n){const r=Qr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ac(n):Pc(n)),r.property==="style"){let i=typeof n=="object"?n:Km(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Jm(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?vm[r.property]||r.property:r.attribute,n]}}function Km(e,t){const n={};try{Om(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,s=new tt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Bc+"#cannot-parse-style-attribute",s}}return n;function r(i,a){let s=i;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(Mm,ep)),n[s]=a}}function Hc(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=Ks(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=Ks(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ya.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Zn(e)}function Zn(e,t){const n=new tt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Bc+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Jm(e){const t={};let n;for(n in e)Ya.call(e,n)&&(t[Zm(n)]=e[n]);return t}function Zm(e){let t=e.replace(Pm,tp);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ep(e,t){return t.toUpperCase()}function tp(e){return"-"+e.toLowerCase()}const Ci={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},np={};function Qa(e,t){const n=np,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return jc(e,r,i)}function jc(e,t,n){if(rp(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return oo(e.children,t,n)}return Array.isArray(e)?oo(e,t,n):""}function oo(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=jc(e[i],t,n);return r.join("")}function rp(e){return!!(e&&typeof e=="object")}const uo=document.createElement("i");function Ka(e){const t="&"+e+";";uo.innerHTML=t;const n=uo.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function dt(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function mt(e,t){return e.length>0?(dt(e,e.length,0,t),e):t}const co={}.hasOwnProperty;function zc(e){const t={};let n=-1;for(;++n<e.length;)ip(t,e[n]);return t}function ip(e,t){let n;for(n in t){const i=(co.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){co.call(i,s)||(i[s]=[]);const o=a[s];ap(i[s],Array.isArray(o)?o:o?[o]:[])}}}function ap(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);dt(e,0,0,r)}function $c(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function _t(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const st=Xt(/[A-Za-z]/),et=Xt(/[\dA-Za-z]/),sp=Xt(/[#-'*+\--9=?A-Z^-~]/);function Nr(e){return e!==null&&(e<32||e===127)}const fa=Xt(/\d/),op=Xt(/[\dA-Fa-f]/),up=Xt(/[!-/:-@[-`{-~]/);function le(e){return e!==null&&e<-2}function Me(e){return e!==null&&(e<0||e===32)}function _e(e){return e===-2||e===-1||e===32}const Jr=Xt(new RegExp("\\p{P}|\\p{S}","u")),un=Xt(/\s/);function Xt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function kn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&et(e.charCodeAt(n+1))&&et(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ae(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return _e(u)?(e.enter(n),o(u)):t(u)}function o(u){return _e(u)&&a++<i?(e.consume(u),o):(e.exit(n),t(u))}}const cp={tokenize:lp};function lp(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ae(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return le(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const dp={tokenize:fp},lo={tokenize:hp};function fp(e){const t=this,n=[];let r=0,i,a,s;return o;function o(p){if(r<n.length){const O=n[r];return t.containerState=O[1],e.attempt(O[0].continuation,u,c)(p)}return c(p)}function u(p){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const O=t.events.length;let S=O,w;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){w=t.events[S][1].end;break}A(r);let B=O;for(;B<t.events.length;)t.events[B][1].end=Object.assign({},w),B++;return dt(t.events,S+1,0,t.events.slice(O)),t.events.length=B,c(p)}return o(p)}function c(p){if(r===n.length){if(!i)return m(p);if(i.currentConstruct&&i.currentConstruct.concrete)return g(p);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lo,d,f)(p)}function d(p){return i&&k(),A(r),m(p)}function f(p){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(p)}function m(p){return t.containerState={},e.attempt(lo,h,g)(p)}function h(p){return r++,n.push([t.currentConstruct,t.containerState]),m(p)}function g(p){if(p===null){i&&k(),A(0),e.consume(p);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),y(p)}function y(p){if(p===null){v(e.exit("chunkFlow"),!0),A(0),e.consume(p);return}return le(p)?(e.consume(p),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(p),y)}function v(p,O){const S=t.sliceStream(p);if(O&&S.push(null),p.previous=a,a&&(a.next=p),a=p,i.defineSkip(p.start),i.write(S),t.parser.lazy[p.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const B=t.events.length;let K=B,Y,N;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(Y){N=t.events[K][1].end;break}Y=!0}for(A(r),w=B;w<t.events.length;)t.events[w][1].end=Object.assign({},N),w++;dt(t.events,K+1,0,t.events.slice(B)),t.events.length=w}}function A(p){let O=n.length;for(;O-- >p;){const S=n[O];t.containerState=S[1],S[0].exit.call(t,e)}n.length=p}function k(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function hp(e,t,n){return Ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rr(e){if(e===null||Me(e)||un(e))return 1;if(Jr(e))return 2}function Zr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ha={name:"attention",tokenize:pp,resolveAll:mp};function mp(e,t){let n=-1,r,i,a,s,o,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),m=Object.assign({},e[n][1].start);fo(f,-u),fo(m,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},o={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:m},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=mt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=mt(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=mt(c,Zr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=mt(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=mt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,dt(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function pp(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rr(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const c=e.exit("attentionSequence"),d=Rr(u),f=!d||d===2&&i||n.includes(u),m=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?f:f&&(i||!m)),c._close=!!(a===42?m:m&&(d||!f)),t(u)}}function fo(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const gp={name:"autolink",tokenize:bp};function bp(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return st(h)?(e.consume(h),s):c(h)}function s(h){return h===43||h===45||h===46||et(h)?(r=1,o(h)):c(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||et(h))&&r++<32?(e.consume(h),o):(r=0,c(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Nr(h)?n(h):(e.consume(h),u)}function c(h){return h===64?(e.consume(h),d):sp(h)?(e.consume(h),c):n(h)}function d(h){return et(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):m(h)}function m(h){if((h===45||et(h))&&r++<63){const g=h===45?m:f;return e.consume(h),g}return n(h)}}const ur={tokenize:Ep,partial:!0};function Ep(e,t,n){return r;function r(a){return _e(a)?Ae(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||le(a)?t(a):n(a)}}const Vc={name:"blockQuote",tokenize:Tp,continuation:{tokenize:yp},exit:xp};function Tp(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return _e(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function yp(e,t,n){const r=this;return i;function i(s){return _e(s)?Ae(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Vc,t,n)(s)}}function xp(e){e.exit("blockQuote")}const Wc={name:"characterEscape",tokenize:_p};function _p(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return up(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Gc={name:"characterReference",tokenize:Sp};function Sp(e,t,n){const r=this;let i=0,a,s;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=et,d(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=op,d):(e.enter("characterReferenceValue"),a=7,s=fa,d(f))}function d(f){if(f===59&&i){const m=e.exit("characterReferenceValue");return s===et&&!Ka(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),d):n(f)}}const ho={tokenize:Ip,partial:!0},mo={name:"codeFenced",tokenize:Cp,concrete:!0};function Cp(e,t,n){const r=this,i={tokenize:S,partial:!0};let a=0,s=0,o;return u;function u(w){return c(w)}function c(w){const B=r.events[r.events.length-1];return a=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,o=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(w)}function d(w){return w===o?(s++,e.consume(w),d):s<3?n(w):(e.exit("codeFencedFenceSequence"),_e(w)?Ae(e,f,"whitespace")(w):f(w))}function f(w){return w===null||le(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(ho,y,O)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||le(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(w)):_e(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,h,"whitespace")(w)):w===96&&w===o?n(w):(e.consume(w),m)}function h(w){return w===null||le(w)?f(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||le(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(w)):w===96&&w===o?n(w):(e.consume(w),g)}function y(w){return e.attempt(i,O,v)(w)}function v(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),A}function A(w){return a>0&&_e(w)?Ae(e,k,"linePrefix",a+1)(w):k(w)}function k(w){return w===null||le(w)?e.check(ho,y,O)(w):(e.enter("codeFlowValue"),p(w))}function p(w){return w===null||le(w)?(e.exit("codeFlowValue"),k(w)):(e.consume(w),p)}function O(w){return e.exit("codeFenced"),t(w)}function S(w,B,K){let Y=0;return N;function N(Z){return w.enter("lineEnding"),w.consume(Z),w.exit("lineEnding"),H}function H(Z){return w.enter("codeFencedFence"),_e(Z)?Ae(w,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):$(Z)}function $(Z){return Z===o?(w.enter("codeFencedFenceSequence"),j(Z)):K(Z)}function j(Z){return Z===o?(Y++,w.consume(Z),j):Y>=s?(w.exit("codeFencedFenceSequence"),_e(Z)?Ae(w,z,"whitespace")(Z):z(Z)):K(Z)}function z(Z){return Z===null||le(Z)?(w.exit("codeFencedFence"),B(Z)):K(Z)}}}function Ip(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ii={name:"codeIndented",tokenize:wp},Ap={tokenize:vp,partial:!0};function wp(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ae(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):le(c)?e.attempt(Ap,s,u)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||le(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function u(c){return e.exit("codeIndented"),t(c)}}function vp(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):le(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ae(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):le(s)?i(s):n(s)}}const kp={name:"codeText",tokenize:Op,resolve:Np,previous:Rp};function Np(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Rp(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Op(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,d(f)):le(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||le(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}function Yc(e){const t={};let n=-1,r,i,a,s,o,u,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Lp(e,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(s=e[a],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},e[i][1].start),o=e.slice(i,n),o.unshift(r),dt(e,i,n-i+1,o))}}return!c}function Lp(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const a=[],s=n._tokenizer||r.parser[n.contentType](n.start),o=s.events,u=[],c={};let d,f,m=-1,h=n,g=0,y=0;const v=[y];for(;h;){for(;e[++i][1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(y=m+1,v.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),m=v.length;m--;){const A=o.slice(v[m],v[m+1]),k=a.pop();u.unshift([k,k+A.length-1]),dt(e,k,2,A)}for(m=-1;++m<u.length;)c[g+u[m][0]]=g+u[m][1],g+=u[m][1]-u[m][0]-1;return c}const Dp={tokenize:Bp,resolve:Mp},Pp={tokenize:Fp,partial:!0};function Mp(e){return Yc(e),e}function Bp(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):le(o)?e.check(Pp,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Fp(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ae(e,a,"linePrefix")}function a(s){if(s===null||le(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function qc(e,t,n,r,i,a,s,o,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(A){return A===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(A),e.exit(a),m):A===null||A===32||A===41||Nr(A)?n(A):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(A))}function m(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===62?(e.exit("chunkString"),e.exit(o),m(A)):A===null||A===60||le(A)?n(A):(e.consume(A),A===92?g:h)}function g(A){return A===60||A===62||A===92?(e.consume(A),h):h(A)}function y(A){return!d&&(A===null||A===41||Me(A))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(A)):d<c&&A===40?(e.consume(A),d++,y):A===41?(e.consume(A),d--,y):A===null||A===32||A===40||Nr(A)?n(A):(e.consume(A),A===92?v:y)}function v(A){return A===40||A===41||A===92?(e.consume(A),y):y(A)}}function Xc(e,t,n,r,i,a){const s=this;let o=0,u;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):le(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||le(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),u||(u=!_e(h)),h===92?m:f)}function m(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function Qc(e,t,n,r,i,a){let s;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),s=m===40?41:m,u):n(m)}function u(m){return m===s?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(a),c(m))}function c(m){return m===s?(e.exit(a),u(s)):m===null?n(m):le(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ae(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===s||m===null||le(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?f:d)}function f(m){return m===s||m===92?(e.consume(m),d):d(m)}}function Wn(e,t){let n;return r;function r(i){return le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_e(i)?Ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Up={name:"definition",tokenize:jp},Hp={tokenize:zp,partial:!0};function jp(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return Xc.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=_t(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return Me(h)?Wn(e,c)(h):c(h)}function c(h){return qc(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(Hp,f,f)(h)}function f(h){return _e(h)?Ae(e,m,"whitespace")(h):m(h)}function m(h){return h===null||le(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function zp(e,t,n){return r;function r(o){return Me(o)?Wn(e,i)(o):n(o)}function i(o){return Qc(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return _e(o)?Ae(e,s,"whitespace")(o):s(o)}function s(o){return o===null||le(o)?t(o):n(o)}}const $p={name:"hardBreakEscape",tokenize:Vp};function Vp(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Wp={name:"headingAtx",tokenize:Yp,resolve:Gp};function Gp(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},dt(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Yp(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||Me(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||le(d)?(e.exit("atxHeading"),t(d)):_e(d)?Ae(e,o,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function c(d){return d===null||d===35||Me(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),c)}}const qp=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],po=["pre","script","style","textarea"],Xp={name:"htmlFlow",tokenize:Zp,resolveTo:Jp,concrete:!0},Qp={tokenize:tg,partial:!0},Kp={tokenize:eg,partial:!0};function Jp(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Zp(e,t,n){const r=this;let i,a,s,o,u;return c;function c(_){return d(_)}function d(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),f}function f(_){return _===33?(e.consume(_),m):_===47?(e.consume(_),a=!0,y):_===63?(e.consume(_),i=3,r.interrupt?t:E):st(_)?(e.consume(_),s=String.fromCharCode(_),v):n(_)}function m(_){return _===45?(e.consume(_),i=2,h):_===91?(e.consume(_),i=5,o=0,g):st(_)?(e.consume(_),i=4,r.interrupt?t:E):n(_)}function h(_){return _===45?(e.consume(_),r.interrupt?t:E):n(_)}function g(_){const Q="CDATA[";return _===Q.charCodeAt(o++)?(e.consume(_),o===Q.length?r.interrupt?t:$:g):n(_)}function y(_){return st(_)?(e.consume(_),s=String.fromCharCode(_),v):n(_)}function v(_){if(_===null||_===47||_===62||Me(_)){const Q=_===47,ae=s.toLowerCase();return!Q&&!a&&po.includes(ae)?(i=1,r.interrupt?t(_):$(_)):qp.includes(s.toLowerCase())?(i=6,Q?(e.consume(_),A):r.interrupt?t(_):$(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?k(_):p(_))}return _===45||et(_)?(e.consume(_),s+=String.fromCharCode(_),v):n(_)}function A(_){return _===62?(e.consume(_),r.interrupt?t:$):n(_)}function k(_){return _e(_)?(e.consume(_),k):N(_)}function p(_){return _===47?(e.consume(_),N):_===58||_===95||st(_)?(e.consume(_),O):_e(_)?(e.consume(_),p):N(_)}function O(_){return _===45||_===46||_===58||_===95||et(_)?(e.consume(_),O):S(_)}function S(_){return _===61?(e.consume(_),w):_e(_)?(e.consume(_),S):p(_)}function w(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),u=_,B):_e(_)?(e.consume(_),w):K(_)}function B(_){return _===u?(e.consume(_),u=null,Y):_===null||le(_)?n(_):(e.consume(_),B)}function K(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Me(_)?S(_):(e.consume(_),K)}function Y(_){return _===47||_===62||_e(_)?p(_):n(_)}function N(_){return _===62?(e.consume(_),H):n(_)}function H(_){return _===null||le(_)?$(_):_e(_)?(e.consume(_),H):n(_)}function $(_){return _===45&&i===2?(e.consume(_),fe):_===60&&i===1?(e.consume(_),ie):_===62&&i===4?(e.consume(_),W):_===63&&i===3?(e.consume(_),E):_===93&&i===5?(e.consume(_),xe):le(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Qp,ne,j)(_)):_===null||le(_)?(e.exit("htmlFlowData"),j(_)):(e.consume(_),$)}function j(_){return e.check(Kp,z,ne)(_)}function z(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),Z}function Z(_){return _===null||le(_)?j(_):(e.enter("htmlFlowData"),$(_))}function fe(_){return _===45?(e.consume(_),E):$(_)}function ie(_){return _===47?(e.consume(_),s="",ve):$(_)}function ve(_){if(_===62){const Q=s.toLowerCase();return po.includes(Q)?(e.consume(_),W):$(_)}return st(_)&&s.length<8?(e.consume(_),s+=String.fromCharCode(_),ve):$(_)}function xe(_){return _===93?(e.consume(_),E):$(_)}function E(_){return _===62?(e.consume(_),W):_===45&&i===2?(e.consume(_),E):$(_)}function W(_){return _===null||le(_)?(e.exit("htmlFlowData"),ne(_)):(e.consume(_),W)}function ne(_){return e.exit("htmlFlow"),t(_)}}function eg(e,t,n){const r=this;return i;function i(s){return le(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function tg(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ur,t,n)}}const ng={name:"htmlText",tokenize:rg};function rg(e,t,n){const r=this;let i,a,s;return o;function o(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),u}function u(E){return E===33?(e.consume(E),c):E===47?(e.consume(E),S):E===63?(e.consume(E),p):st(E)?(e.consume(E),K):n(E)}function c(E){return E===45?(e.consume(E),d):E===91?(e.consume(E),a=0,g):st(E)?(e.consume(E),k):n(E)}function d(E){return E===45?(e.consume(E),h):n(E)}function f(E){return E===null?n(E):E===45?(e.consume(E),m):le(E)?(s=f,ie(E)):(e.consume(E),f)}function m(E){return E===45?(e.consume(E),h):f(E)}function h(E){return E===62?fe(E):E===45?m(E):f(E)}function g(E){const W="CDATA[";return E===W.charCodeAt(a++)?(e.consume(E),a===W.length?y:g):n(E)}function y(E){return E===null?n(E):E===93?(e.consume(E),v):le(E)?(s=y,ie(E)):(e.consume(E),y)}function v(E){return E===93?(e.consume(E),A):y(E)}function A(E){return E===62?fe(E):E===93?(e.consume(E),A):y(E)}function k(E){return E===null||E===62?fe(E):le(E)?(s=k,ie(E)):(e.consume(E),k)}function p(E){return E===null?n(E):E===63?(e.consume(E),O):le(E)?(s=p,ie(E)):(e.consume(E),p)}function O(E){return E===62?fe(E):p(E)}function S(E){return st(E)?(e.consume(E),w):n(E)}function w(E){return E===45||et(E)?(e.consume(E),w):B(E)}function B(E){return le(E)?(s=B,ie(E)):_e(E)?(e.consume(E),B):fe(E)}function K(E){return E===45||et(E)?(e.consume(E),K):E===47||E===62||Me(E)?Y(E):n(E)}function Y(E){return E===47?(e.consume(E),fe):E===58||E===95||st(E)?(e.consume(E),N):le(E)?(s=Y,ie(E)):_e(E)?(e.consume(E),Y):fe(E)}function N(E){return E===45||E===46||E===58||E===95||et(E)?(e.consume(E),N):H(E)}function H(E){return E===61?(e.consume(E),$):le(E)?(s=H,ie(E)):_e(E)?(e.consume(E),H):Y(E)}function $(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,j):le(E)?(s=$,ie(E)):_e(E)?(e.consume(E),$):(e.consume(E),z)}function j(E){return E===i?(e.consume(E),i=void 0,Z):E===null?n(E):le(E)?(s=j,ie(E)):(e.consume(E),j)}function z(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Me(E)?Y(E):(e.consume(E),z)}function Z(E){return E===47||E===62||Me(E)?Y(E):n(E)}function fe(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function ie(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),ve}function ve(E){return _e(E)?Ae(e,xe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):xe(E)}function xe(E){return e.enter("htmlTextData"),s(E)}}const Ja={name:"labelEnd",tokenize:cg,resolveTo:ug,resolveAll:og},ig={tokenize:lg},ag={tokenize:dg},sg={tokenize:fg};function og(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function ug(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return o=[["enter",u,t],["enter",c,t]],o=mt(o,e.slice(a+1,a+r+3)),o=mt(o,[["enter",d,t]]),o=mt(o,Zr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=mt(o,[["exit",d,t],e[s-2],e[s-1],["exit",c,t]]),o=mt(o,e.slice(s+1)),o=mt(o,[["exit",u,t]]),dt(e,a,e.length,o),e}function cg(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(m){return a?a._inactive?f(m):(s=r.parser.defined.includes(_t(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(ig,d,s?d:f)(m):m===91?e.attempt(ag,d,s?c:f)(m):s?d(m):f(m)}function c(m){return e.attempt(sg,d,f)(m)}function d(m){return t(m)}function f(m){return a._balanced=!0,n(m)}}function lg(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Me(f)?Wn(e,a)(f):a(f)}function a(f){return f===41?d(f):qc(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Me(f)?Wn(e,u)(f):d(f)}function o(f){return n(f)}function u(f){return f===34||f===39||f===40?Qc(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return Me(f)?Wn(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function dg(e,t,n){const r=this;return i;function i(o){return Xc.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(_t(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function fg(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const hg={name:"labelStartImage",tokenize:mg,resolveAll:Ja.resolveAll};function mg(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const pg={name:"labelStartLink",tokenize:gg,resolveAll:Ja.resolveAll};function gg(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ai={name:"lineEnding",tokenize:bg};function bg(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}const wr={name:"thematicBreak",tokenize:Eg};function Eg(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||le(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),_e(c)?Ae(e,o,"whitespace")(c):o(c))}}const ct={name:"list",tokenize:xg,continuation:{tokenize:_g},exit:Cg},Tg={tokenize:Ig,partial:!0},yg={tokenize:Sg,partial:!0};function xg(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:fa(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(wr,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return fa(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(ur,r.interrupt?n:d,e.attempt(Tg,m,f))}function d(h){return r.containerState.initialBlankLine=!0,a++,m(h)}function f(h){return _e(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function _g(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ur,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ae(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!_e(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(yg,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ae(e,e.attempt(ct,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Sg(e,t,n){const r=this;return Ae(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function Cg(e){e.exit(this.containerState.type)}function Ig(e,t,n){const r=this;return Ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!_e(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const go={name:"setextUnderline",tokenize:wg,resolveTo:Ag};function Ag(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function wg(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),_e(c)?Ae(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||le(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const vg={tokenize:kg};function kg(e){const t=this,n=e.attempt(ur,r,e.attempt(this.parser.constructs.flowInitial,i,Ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Dp,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ng={resolveAll:Jc()},Rg=Kc("string"),Og=Kc("text");function Kc(e){return{tokenize:t,resolveAll:Jc(e==="text"?Lg:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(d){return c(d)?a(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const f=i[d];let m=-1;if(f)for(;++m<f.length;){const h=f[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Jc(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function Lg(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,o=0,u;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)u=!0,o++;else if(c!==-1){a++;break}}if(o){const c={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-o,offset:r.end.offset-o,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function Dg(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let s=[],o=[];const u={consume:k,enter:p,exit:O,attempt:B(S),check:B(w),interrupt:B(w,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:m,now:g,defineSkip:y,write:f};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function f(H){return s=mt(s,H),v(),s[s.length-1]!==null?[]:(K(t,0),c.events=Zr(a,c.events,c),c.events)}function m(H,$){return Mg(h(H),$)}function h(H){return Pg(s,H)}function g(){const{line:H,column:$,offset:j,_index:z,_bufferIndex:Z}=r;return{line:H,column:$,offset:j,_index:z,_bufferIndex:Z}}function y(H){i[H.line]=H.column,N()}function v(){let H;for(;r._index<s.length;){const $=s[r._index];if(typeof $=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<$.length;)A($.charCodeAt(r._bufferIndex));else A($)}}function A(H){d=d(H)}function k(H){le(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,N()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=H}function p(H,$){const j=$||{};return j.type=H,j.start=g(),c.events.push(["enter",j,c]),o.push(j),j}function O(H){const $=o.pop();return $.end=g(),c.events.push(["exit",$,c]),$}function S(H,$){K(H,$.from)}function w(H,$){$.restore()}function B(H,$){return j;function j(z,Z,fe){let ie,ve,xe,E;return Array.isArray(z)?ne(z):"tokenize"in z?ne([z]):W(z);function W(X){return se;function se(re){const ce=re!==null&&X[re],ue=re!==null&&X.null,ke=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return ne(ke)(re)}}function ne(X){return ie=X,ve=0,X.length===0?fe:_(X[ve])}function _(X){return se;function se(re){return E=Y(),xe=X,X.partial||(c.currentConstruct=X),X.name&&c.parser.constructs.disable.null.includes(X.name)?ae():X.tokenize.call($?Object.assign(Object.create(c),$):c,u,Q,ae)(re)}}function Q(X){return H(xe,E),Z}function ae(X){return E.restore(),++ve<ie.length?_(ie[ve]):fe}}}function K(H,$){H.resolveAll&&!a.includes(H)&&a.push(H),H.resolve&&dt(c.events,$,c.events.length-$,H.resolve(c.events.slice($),c)),H.resolveTo&&(c.events=H.resolveTo(c.events,c))}function Y(){const H=g(),$=c.previous,j=c.currentConstruct,z=c.events.length,Z=Array.from(o);return{restore:fe,from:z};function fe(){r=H,c.previous=$,c.currentConstruct=j,c.events.length=z,o=Z,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pg(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function Mg(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
49
49
|
`;break}case-3:{s=`\r
|
|
50
|
-
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}const rg={42:ot,43:ot,45:ot,48:ot,49:ot,50:ot,51:ot,52:ot,53:ot,54:ot,55:ot,56:ot,57:ot,62:El},ig={91:am},ag={[-2]:ci,[-1]:ci,32:ci},sg={35:dm,42:gr,45:[qs,gr],60:mm,61:qs,95:gr,96:Gs,126:Gs},og={38:yl,92:Tl},ug={[-5]:di,[-4]:di,[-3]:di,33:Lm,38:yl,42:Ki,60:[Mp,Sm],91:Pm,92:[lm,Tl],93:Ma,95:Ki,96:Xp},lg={null:[Ki,Qm]},cg={null:[42,95]},dg={null:[]},fg=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:cg,contentInitial:ig,disable:dg,document:rg,flow:sg,flowInitial:ag,insideSpan:lg,string:og,text:ug},Symbol.toStringTag,{value:"Module"}));function hg(e){const n=gl([fg,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(kp),document:i(Rp),flow:i(Wm),string:i(Km),text:i(Jm)};return r;function i(a){return s;function s(o){return eg(r,a,o)}}}function pg(e){for(;!xl(e););return e}const Ws=/[\0\t\n\r]/g;function mg(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const u=[];let c,d,f,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Ws.lastIndex=f,c=Ws.exec(a),p=c&&c.index!==void 0?c.index:a.length,h=a.charCodeAt(p),!c){t=a.slice(f);break}if(h===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(a.slice(f,p)),e+=p-f),h){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const gg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function bg(e){return e.replace(gg,Eg)}function Eg(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return bl(n.slice(a?2:1),a?16:10)}return Pa(n)||e}const Il={}.hasOwnProperty;function Tg(e,t,n){return typeof t!="string"&&(n=t,t=void 0),yg(n)(pg(hg(n).document().write(mg()(e,t,!0))))}function yg(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a($e),autolinkProtocol:X,autolinkEmail:X,atxHeading:a(ze),blockQuote:a(re),characterEscape:X,characterReference:X,codeFenced:a(se),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(se,s),codeText:a(Se,s),codeTextData:X,data:X,codeFlowValue:X,definition:a(V),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(ve),hardBreakEscape:a(Ge),hardBreakTrailing:a(Ge),htmlFlow:a(Ze,s),htmlFlowData:X,htmlText:a(Ze,s),htmlTextData:X,image:a(it),label:s,link:a($e),listItem:a(Et),listItemValue:p,listOrdered:a(_t,f),listUnordered:a(_t),paragraph:a(me),reference:y,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(ze),strong:a(Oe),thematicBreak:a(B)},exit:{atxHeading:u(),atxHeadingSequence:w,autolink:u(),autolinkEmail:ae,autolinkProtocol:oe,blockQuote:u(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:W,codeFenced:u(v),codeFencedFence:E,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:u(C),codeText:u(q),codeTextData:I,data:I,definition:u(),definitionDestinationString:L,definitionLabelString:A,definitionTitleString:N,emphasis:u(),hardBreakEscape:u(z),hardBreakTrailing:u(z),htmlFlow:u(U),htmlFlowData:I,htmlText:u(F),htmlTextData:I,image:u(le),label:we,labelText:Ie,lineEnding:j,link:u(he),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:K,resourceDestinationString:m,resourceTitleString:G,resource:ne,setextHeading:u(J),setextHeadingLineSequence:Y,setextHeadingText:k,strong:u(),thematicBreak:u()}};vl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let P={type:"root",children:[]};const Q={stack:[P],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:d,data:n},ie=[];let Ee=-1;for(;++Ee<R.length;)if(R[Ee][1].type==="listOrdered"||R[Ee][1].type==="listUnordered")if(R[Ee][0]==="enter")ie.push(Ee);else{const ce=ie.pop();Ee=i(R,ce,Ee)}for(Ee=-1;++Ee<R.length;){const ce=t[R[Ee][0]];Il.call(ce,R[Ee][1].type)&&ce[R[Ee][1].type].call(Object.assign({sliceSerialize:R[Ee][2].sliceSerialize},Q),R[Ee][1])}if(Q.tokenStack.length>0){const ce=Q.tokenStack[Q.tokenStack.length-1];(ce[1]||Xs).call(Q,void 0,ce[0])}for(P.position={start:Ft(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:Ft(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<t.transforms.length;)P=t.transforms[Ee](P)||P;return P}function i(R,P,Q){let ie=P-1,Ee=-1,ce=!1,ke,He,ut,et;for(;++ie<=Q;){const Ve=R[ie];switch(Ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ve[0]==="enter"?Ee++:Ee--,et=void 0;break}case"lineEndingBlank":{Ve[0]==="enter"&&(ke&&!et&&!Ee&&!ut&&(ut=ie),et=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:et=void 0}if(!Ee&&Ve[0]==="enter"&&Ve[1].type==="listItemPrefix"||Ee===-1&&Ve[0]==="exit"&&(Ve[1].type==="listUnordered"||Ve[1].type==="listOrdered")){if(ke){let Le=ie;for(He=void 0;Le--;){const Ue=R[Le];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]==="exit")continue;He&&(R[He][1].type="lineEndingBlank",ce=!0),Ue[1].type="lineEnding",He=Le}else if(!(Ue[1].type==="linePrefix"||Ue[1].type==="blockQuotePrefix"||Ue[1].type==="blockQuotePrefixWhitespace"||Ue[1].type==="blockQuoteMarker"||Ue[1].type==="listItemIndent"))break}ut&&(!He||ut<He)&&(ke._spread=!0),ke.end=Object.assign({},He?R[He][1].start:Ve[1].end),R.splice(He||ie,0,["exit",ke,Ve[2]]),ie++,Q++}if(Ve[1].type==="listItemPrefix"){const Le={type:"listItem",_spread:!1,start:Object.assign({},Ve[1].start),end:void 0};ke=Le,R.splice(ie,0,["enter",Le,Ve[2]]),ie++,Q++,ut=void 0,et=!0}}}return R[P][1]._spread=ce,Q}function a(R,P){return Q;function Q(ie){o.call(this,R(ie),ie),P&&P.call(this,ie)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(R,P,Q){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([P,Q]),R.position={start:Ft(P.start),end:void 0}}function u(R){return P;function P(Q){R&&R.call(this,Q),c.call(this,Q)}}function c(R,P){const Q=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==R.type&&(P?P.call(this,R,ie[0]):(ie[1]||Xs).call(this,R,ie[0]));else throw new Error("Cannot close `"+R.type+"` ("+Mn({start:R.start,end:R.end})+"): it’s not open");Q.position.end=Ft(R.end)}function d(){return Da(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(R){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function h(){const R=this.resume(),P=this.stack[this.stack.length-1];P.lang=R}function b(){const R=this.resume(),P=this.stack[this.stack.length-1];P.meta=R}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R.replace(/(\r?\n|\r)$/g,"")}function A(R){const P=this.resume(),Q=this.stack[this.stack.length-1];Q.label=P,Q.identifier=xt(this.sliceSerialize(R)).toLowerCase()}function N(){const R=this.resume(),P=this.stack[this.stack.length-1];P.title=R}function L(){const R=this.resume(),P=this.stack[this.stack.length-1];P.url=R}function w(R){const P=this.stack[this.stack.length-1];if(!P.depth){const Q=this.sliceSerialize(R).length;P.depth=Q}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function Y(R){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function X(R){const Q=this.stack[this.stack.length-1].children;let ie=Q[Q.length-1];(!ie||ie.type!=="text")&&(ie=Ae(),ie.position={start:Ft(R.start),end:void 0},Q.push(ie)),this.stack.push(ie)}function I(R){const P=this.stack.pop();P.value+=this.sliceSerialize(R),P.position.end=Ft(R.end)}function j(R){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=P.children[P.children.length-1];Q.position.end=Ft(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(P.type)&&(X.call(this,R),I.call(this,R))}function z(){this.data.atHardBreak=!0}function U(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R}function F(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R}function q(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R}function he(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=P,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function le(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=P,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function Ie(R){const P=this.sliceSerialize(R),Q=this.stack[this.stack.length-2];Q.label=bg(P),Q.identifier=xt(P).toLowerCase()}function we(){const R=this.stack[this.stack.length-1],P=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const ie=R.children;Q.children=ie}else Q.alt=P}function m(){const R=this.resume(),P=this.stack[this.stack.length-1];P.url=R}function G(){const R=this.resume(),P=this.stack[this.stack.length-1];P.title=R}function ne(){this.data.inReference=void 0}function y(){this.data.referenceType="collapsed"}function K(R){const P=this.resume(),Q=this.stack[this.stack.length-1];Q.label=P,Q.identifier=xt(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function Z(R){this.data.characterReferenceType=R.type}function W(R){const P=this.sliceSerialize(R),Q=this.data.characterReferenceType;let ie;Q?(ie=bl(P,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=Pa(P);const Ee=this.stack.pop();Ee.value+=ie,Ee.position.end=Ft(R.end)}function oe(R){I.call(this,R);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(R)}function ae(R){I.call(this,R);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(R)}function re(){return{type:"blockquote",children:[]}}function se(){return{type:"code",lang:null,meta:null,value:""}}function Se(){return{type:"inlineCode",value:""}}function V(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function ze(){return{type:"heading",depth:0,children:[]}}function Ge(){return{type:"break"}}function Ze(){return{type:"html",value:""}}function it(){return{type:"image",title:null,url:"",alt:null}}function $e(){return{type:"link",title:null,url:"",children:[]}}function _t(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function Et(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function me(){return{type:"paragraph",children:[]}}function Oe(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function B(){return{type:"thematicBreak"}}}function Ft(e){return{line:e.line,column:e.column,offset:e.offset}}function vl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?vl(e,r):xg(e,r)}}function xg(e,t){let n;for(n in t)if(Il.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Xs(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is still open")}function Sg(e){const t=this;t.parser=n;function n(r){return Tg(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function _g(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Cg(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
51
|
-
`}]}function
|
|
52
|
-
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function
|
|
50
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}const Bg={42:ct,43:ct,45:ct,48:ct,49:ct,50:ct,51:ct,52:ct,53:ct,54:ct,55:ct,56:ct,57:ct,62:Vc},Fg={91:Up},Ug={[-2]:Ii,[-1]:Ii,32:Ii},Hg={35:Wp,42:wr,45:[go,wr],60:Xp,61:go,95:wr,96:mo,126:mo},jg={38:Gc,92:Wc},zg={[-5]:Ai,[-4]:Ai,[-3]:Ai,33:hg,38:Gc,42:ha,60:[gp,ng],91:pg,92:[$p,Wc],93:Ja,95:ha,96:kp},$g={null:[ha,Ng]},Vg={null:[42,95]},Wg={null:[]},Gg=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Vg,contentInitial:Fg,disable:Wg,document:Bg,flow:Hg,flowInitial:Ug,insideSpan:$g,string:jg,text:zg},Symbol.toStringTag,{value:"Module"}));function Yg(e){const n=zc([Gg,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(cp),document:i(dp),flow:i(vg),string:i(Rg),text:i(Og)};return r;function i(a){return s;function s(o){return Dg(r,a,o)}}}function qg(e){for(;!Yc(e););return e}const bo=/[\0\t\n\r]/g;function Xg(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const u=[];let c,d,f,m,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(bo.lastIndex=f,c=bo.exec(a),m=c&&c.index!==void 0?c.index:a.length,h=a.charCodeAt(m),!c){t=a.slice(f);break}if(h===10&&f===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<m&&(u.push(a.slice(f,m)),e+=m-f),h){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Qg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kg(e){return e.replace(Qg,Jg)}function Jg(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return $c(n.slice(a?2:1),a?16:10)}return Ka(n)||e}const Zc={}.hasOwnProperty;function Zg(e,t,n){return typeof t!="string"&&(n=t,t=void 0),eb(n)(qg(Yg(n).document().write(Xg()(e,t,!0))))}function eb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ue),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:a(ze),blockQuote:a(ce),characterEscape:Y,characterReference:Y,codeFenced:a(ue),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ue,s),codeText:a(ke,s),codeTextData:Y,data:Y,codeFlowValue:Y,definition:a(G),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Le),hardBreakEscape:a(rt),hardBreakTrailing:a(rt),htmlFlow:a(Ye,s),htmlFlowData:Y,htmlText:a(Ye,s),htmlTextData:Y,image:a(it),label:s,link:a(Ue),listItem:a(yt),listItemValue:m,listOrdered:a(Ct,f),listUnordered:a(Ct),paragraph:a(Te),reference:_,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(ze),strong:a(De),thematicBreak:a(F)},exit:{atxHeading:u(),atxHeadingSequence:S,autolink:u(),autolinkEmail:re,autolinkProtocol:se,blockQuote:u(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:X,codeFenced:u(v),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:N,codeIndented:u(A),codeText:u(Z),codeTextData:N,data:N,definition:u(),definitionDestinationString:O,definitionLabelString:k,definitionTitleString:p,emphasis:u(),hardBreakEscape:u($),hardBreakTrailing:u($),htmlFlow:u(j),htmlFlowData:N,htmlText:u(z),htmlTextData:N,image:u(ie),label:xe,labelText:ve,lineEnding:H,link:u(fe),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Q,resourceDestinationString:E,resourceTitleString:W,resource:ne,setextHeading:u(K),setextHeadingLineSequence:B,setextHeadingText:w,strong:u(),thematicBreak:u()}};el(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let P={type:"root",children:[]};const J={stack:[P],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:d,data:n},oe=[];let Se=-1;for(;++Se<R.length;)if(R[Se][1].type==="listOrdered"||R[Se][1].type==="listUnordered")if(R[Se][0]==="enter")oe.push(Se);else{const he=oe.pop();Se=i(R,he,Se)}for(Se=-1;++Se<R.length;){const he=t[R[Se][0]];Zc.call(he,R[Se][1].type)&&he[R[Se][1].type].call(Object.assign({sliceSerialize:R[Se][2].sliceSerialize},J),R[Se][1])}if(J.tokenStack.length>0){const he=J.tokenStack[J.tokenStack.length-1];(he[1]||Eo).call(J,void 0,he[0])}for(P.position={start:Ht(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:Ht(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se<t.transforms.length;)P=t.transforms[Se](P)||P;return P}function i(R,P,J){let oe=P-1,Se=-1,he=!1,Pe,Ze,ot,Je;for(;++oe<=J;){const He=R[oe];switch(He[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{He[0]==="enter"?Se++:Se--,Je=void 0;break}case"lineEndingBlank":{He[0]==="enter"&&(Pe&&!Je&&!Se&&!ot&&(ot=oe),Je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Je=void 0}if(!Se&&He[0]==="enter"&&He[1].type==="listItemPrefix"||Se===-1&&He[0]==="exit"&&(He[1].type==="listUnordered"||He[1].type==="listOrdered")){if(Pe){let Oe=oe;for(Ze=void 0;Oe--;){const We=R[Oe];if(We[1].type==="lineEnding"||We[1].type==="lineEndingBlank"){if(We[0]==="exit")continue;Ze&&(R[Ze][1].type="lineEndingBlank",he=!0),We[1].type="lineEnding",Ze=Oe}else if(!(We[1].type==="linePrefix"||We[1].type==="blockQuotePrefix"||We[1].type==="blockQuotePrefixWhitespace"||We[1].type==="blockQuoteMarker"||We[1].type==="listItemIndent"))break}ot&&(!Ze||ot<Ze)&&(Pe._spread=!0),Pe.end=Object.assign({},Ze?R[Ze][1].start:He[1].end),R.splice(Ze||oe,0,["exit",Pe,He[2]]),oe++,J++}if(He[1].type==="listItemPrefix"){const Oe={type:"listItem",_spread:!1,start:Object.assign({},He[1].start),end:void 0};Pe=Oe,R.splice(oe,0,["enter",Oe,He[2]]),oe++,J++,ot=void 0,Je=!0}}}return R[P][1]._spread=he,J}function a(R,P){return J;function J(oe){o.call(this,R(oe),oe),P&&P.call(this,oe)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(R,P,J){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([P,J]),R.position={start:Ht(P.start),end:void 0}}function u(R){return P;function P(J){R&&R.call(this,J),c.call(this,J)}}function c(R,P){const J=this.stack.pop(),oe=this.tokenStack.pop();if(oe)oe[0].type!==R.type&&(P?P.call(this,R,oe[0]):(oe[1]||Eo).call(this,R,oe[0]));else throw new Error("Cannot close `"+R.type+"` ("+Vn({start:R.start,end:R.end})+"): it’s not open");J.position.end=Ht(R.end)}function d(){return Qa(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(R){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function h(){const R=this.resume(),P=this.stack[this.stack.length-1];P.lang=R}function g(){const R=this.resume(),P=this.stack[this.stack.length-1];P.meta=R}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R.replace(/(\r?\n|\r)$/g,"")}function k(R){const P=this.resume(),J=this.stack[this.stack.length-1];J.label=P,J.identifier=_t(this.sliceSerialize(R)).toLowerCase()}function p(){const R=this.resume(),P=this.stack[this.stack.length-1];P.title=R}function O(){const R=this.resume(),P=this.stack[this.stack.length-1];P.url=R}function S(R){const P=this.stack[this.stack.length-1];if(!P.depth){const J=this.sliceSerialize(R).length;P.depth=J}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function B(R){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(R){const J=this.stack[this.stack.length-1].children;let oe=J[J.length-1];(!oe||oe.type!=="text")&&(oe=we(),oe.position={start:Ht(R.start),end:void 0},J.push(oe)),this.stack.push(oe)}function N(R){const P=this.stack.pop();P.value+=this.sliceSerialize(R),P.position.end=Ht(R.end)}function H(R){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const J=P.children[P.children.length-1];J.position.end=Ht(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(P.type)&&(Y.call(this,R),N.call(this,R))}function $(){this.data.atHardBreak=!0}function j(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R}function z(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R}function Z(){const R=this.resume(),P=this.stack[this.stack.length-1];P.value=R}function fe(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=P,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function ie(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=P,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function ve(R){const P=this.sliceSerialize(R),J=this.stack[this.stack.length-2];J.label=Kg(P),J.identifier=_t(P).toLowerCase()}function xe(){const R=this.stack[this.stack.length-1],P=this.resume(),J=this.stack[this.stack.length-1];if(this.data.inReference=!0,J.type==="link"){const oe=R.children;J.children=oe}else J.alt=P}function E(){const R=this.resume(),P=this.stack[this.stack.length-1];P.url=R}function W(){const R=this.resume(),P=this.stack[this.stack.length-1];P.title=R}function ne(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function Q(R){const P=this.resume(),J=this.stack[this.stack.length-1];J.label=P,J.identifier=_t(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function ae(R){this.data.characterReferenceType=R.type}function X(R){const P=this.sliceSerialize(R),J=this.data.characterReferenceType;let oe;J?(oe=$c(P,J==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):oe=Ka(P);const Se=this.stack.pop();Se.value+=oe,Se.position.end=Ht(R.end)}function se(R){N.call(this,R);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(R)}function re(R){N.call(this,R);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(R)}function ce(){return{type:"blockquote",children:[]}}function ue(){return{type:"code",lang:null,meta:null,value:""}}function ke(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Le(){return{type:"emphasis",children:[]}}function ze(){return{type:"heading",depth:0,children:[]}}function rt(){return{type:"break"}}function Ye(){return{type:"html",value:""}}function it(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function Ct(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function yt(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function Te(){return{type:"paragraph",children:[]}}function De(){return{type:"strong",children:[]}}function we(){return{type:"text",value:""}}function F(){return{type:"thematicBreak"}}}function Ht(e){return{line:e.line,column:e.column,offset:e.offset}}function el(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?el(e,r):tb(e,r)}}function tb(e,t){let n;for(n in t)if(Zc.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Eo(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vn({start:t.start,end:t.end})+") is still open")}function nb(e){const t=this;t.parser=n;function n(r){return Zg(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ib(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
51
|
+
`}]}function ab(e,t){const n=t.value?t.value+`
|
|
52
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function sb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ob(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ub(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=kn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function cb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function tl(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function db(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tl(e,t);const i={src:kn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function fb(e,t){const n={src:kn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function hb(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tl(e,t);const i={href:kn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function pb(e,t){const n={href:kn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gb(e,t,n){const r=e.all(t),i=n?bb(n):nl(t),a={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
|
|
53
53
|
`}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
54
|
-
`});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function
|
|
54
|
+
`});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function bb(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=nl(n[r])}return t}function nl(e){const t=e.spread;return t??e.children.length>1}function Eb(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Tb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function xb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _b(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Ot(t.children[1]),u=Kr(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Sb(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<o;){const f=t.children[u],m={},h=s?s[u]:void 0;h&&(m.align=h);let g={type:"element",tagName:a,properties:m,children:[]};f&&(g.children=e.all(f),e.patch(f,g),g=e.applyData(f,g)),c.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function Cb(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const To=9,yo=32;function Ib(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(xo(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(xo(t.slice(i),i>0,!1)),a.join("")}function xo(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===To||a===yo;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===To||a===yo;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ab(e,t){const n={type:"text",value:Ib(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const vb={blockquote:rb,break:ib,code:ab,delete:sb,emphasis:ob,footnoteReference:ub,heading:cb,html:lb,imageReference:db,image:fb,inlineCode:hb,linkReference:mb,link:pb,listItem:gb,list:Eb,paragraph:Tb,root:yb,strong:xb,table:_b,tableCell:Cb,tableRow:Sb,text:Ab,thematicBreak:wb,toml:Er,yaml:Er,definition:Er,footnoteDefinition:Er};function Er(){}const rl=-1,ei=0,Or=1,Lr=2,Za=3,es=4,ts=5,ns=6,il=7,al=8,_o=typeof self=="object"?self:globalThis,kb=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case ei:case rl:return n(s,i);case Or:{const o=n([],i);for(const u of s)o.push(r(u));return o}case Lr:{const o=n({},i);for(const[u,c]of s)o[r(u)]=r(c);return o}case Za:return n(new Date(s),i);case es:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case ts:{const o=n(new Map,i);for(const[u,c]of s)o.set(r(u),r(c));return o}case ns:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case il:{const{name:o,message:u}=s;return n(new _o[o](u),i)}case al:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new _o[a](s),i)};return r},So=e=>kb(new Map,e)(0),pn="",{toString:Nb}={},{keys:Rb}=Object,Mn=e=>{const t=typeof e;if(t!=="object"||!e)return[ei,t];const n=Nb.call(e).slice(8,-1);switch(n){case"Array":return[Or,pn];case"Object":return[Lr,pn];case"Date":return[Za,pn];case"RegExp":return[es,pn];case"Map":return[ts,pn];case"Set":return[ns,pn]}return n.includes("Array")?[Or,n]:n.includes("Error")?[il,n]:[Lr,n]},Tr=([e,t])=>e===ei&&(t==="function"||t==="symbol"),Ob=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=Mn(s);switch(o){case ei:{let d=s;switch(u){case"bigint":o=al,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([rl],s)}return i([o,d],s)}case Or:{if(u)return i([u,[...s]],s);const d=[],f=i([o,d],s);for(const m of s)d.push(a(m));return f}case Lr:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],f=i([o,d],s);for(const m of Rb(s))(e||!Tr(Mn(s[m])))&&d.push([a(m),a(s[m])]);return f}case Za:return i([o,s.toISOString()],s);case es:{const{source:d,flags:f}=s;return i([o,{source:d,flags:f}],s)}case ts:{const d=[],f=i([o,d],s);for(const[m,h]of s)(e||!(Tr(Mn(m))||Tr(Mn(h))))&&d.push([a(m),a(h)]);return f}case ns:{const d=[],f=i([o,d],s);for(const m of s)(e||!Tr(Mn(m)))&&d.push(a(m));return f}}const{message:c}=s;return i([o,{name:u,message:c}],s)};return a},Co=(e,{json:t,lossy:n}={})=>{const r=[];return Ob(!(t||n),!!t,new Map,r)(e),r},In=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?So(Co(e,t)):structuredClone(e):(e,t)=>So(Co(e,t));function Lb(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Db(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Pb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Lb,r=e.options.footnoteBackLabel||Db,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),f=String(c.identifier).toUpperCase(),m=kn(f.toLowerCase());let h=0;const g=[],y=e.footnoteCounts.get(f);for(;y!==void 0&&++h<=y;){g.length>0&&g.push({type:"text",value:" "});let k=typeof n=="string"?n:n(u,h);typeof k=="string"&&(k={type:"text",value:k}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const k=v.children[v.children.length-1];k&&k.type==="text"?k.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else d.push(...g);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(c,A),o.push(A)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...In(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
55
55
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
56
|
-
`}]}}const
|
|
56
|
+
`}]}}const ti=(function(e){if(e==null)return Ub;if(typeof e=="function")return ni(e);if(typeof e=="object")return Array.isArray(e)?Mb(e):Bb(e);if(typeof e=="string")return Fb(e);throw new Error("Expected function, string, or object as test")});function Mb(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ti(e[n]);return ni(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Bb(e){const t=e;return ni(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Fb(e){return ni(t);function t(n){return n&&n.type===e}}function ni(e){return t;function t(n,r,i){return!!(Hb(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ub(){return!0}function Hb(e){return e!==null&&typeof e=="object"&&"type"in e}const sl=[],jb=!0,ma=!1,zb="skip";function ol(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=ti(i),s=r?-1:1;o(e,void 0,[])();function o(u,c,d){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return m;function m(){let h=sl,g,y,v;if((!t||a(u,c,d[d.length-1]||void 0))&&(h=$b(n(u,d)),h[0]===ma))return h;if("children"in u&&u.children){const A=u;if(A.children&&h[0]!==zb)for(y=(r?A.children.length:-1)+s,v=d.concat(A);y>-1&&y<A.children.length;){const k=A.children[y];if(g=o(k,y,v)(),g[0]===ma)return g;y=typeof g[1]=="number"?g[1]:y+s}}return h}}}function $b(e){return Array.isArray(e)?e:typeof e=="number"?[jb,e]:e==null?sl:[e]}function ri(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),ol(e,a,o,i);function o(u,c){const d=c[c.length-1],f=d?d.children.indexOf(u):void 0;return s(u,f,d)}}const pa={}.hasOwnProperty,Vb={};function Wb(e,t){const n=t||Vb,r=new Map,i=new Map,a=new Map,s={...vb,...n.handlers},o={all:c,applyData:Yb,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:Gb,wrap:Xb};return ri(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:i,m=String(d.identifier).toUpperCase();f.has(m)||f.set(m,d)}}),o;function u(d,f){const m=d.type,h=o.handlers[m];if(pa.call(o.handlers,m)&&h)return h(o,d,f);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in d){const{children:y,...v}=d,A=In(v);return A.children=o.all(d),A}return In(d)}return(o.options.unknownHandler||qb)(o,d,f)}function c(d){const f=[];if("children"in d){const m=d.children;let h=-1;for(;++h<m.length;){const g=o.one(m[h],d);if(g){if(h&&m[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Io(g.value)),!Array.isArray(g)&&g.type==="element")){const y=g.children[0];y&&y.type==="text"&&(y.value=Io(y.value))}Array.isArray(g)?f.push(...g):f.push(g)}}}return f}}function Gb(e,t){e.position&&(t.position=Lm(e))}function Yb(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,In(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function qb(e,t){const n=t.data||{},r="value"in t&&!(pa.call(n,"hProperties")||pa.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Xb(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
57
57
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
58
58
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
59
|
-
`}),n}function
|
|
60
|
-
`},i),a}function gb(e,t){return e&&"run"in e?async function(n,r){const i=ro(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ro(n,{file:r,...t||e})}}function io(e){if(e)throw e}var fi,ao;function bb(){if(ao)return fi;ao=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!f)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},s=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},o=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return fi=function u(){var c,d,f,p,h,b,E=arguments[0],v=1,C=arguments.length,A=!1;for(typeof E=="boolean"&&(A=E,E=arguments[1]||{},v=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});v<C;++v)if(c=arguments[v],c!=null)for(d in c)f=o(E,d),p=o(c,d),E!==p&&(A&&p&&(a(p)||(h=i(p)))?(h?(h=!1,b=f&&i(f)?f:[]):b=f&&a(f)?f:{},s(E,{name:d,newValue:u(A,b,p)})):typeof p<"u"&&s(E,{name:d,newValue:p}));return E},fi}var Eb=bb();const hi=ma(Eb);function ea(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Tb(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...c){const d=e[++a];let f=-1;if(u){s(u);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,d?yb(d,o)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function yb(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(c){const d=c;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const Ct={basename:xb,dirname:Sb,extname:_b,join:Cb,sep:"/"};function xb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Zn(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Sb(e){if(Zn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function _b(e){Zn(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Cb(...e){let t=-1,n;for(;++t<e.length;)Zn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ab(n)}function Ab(e){Zn(e);const t=e.codePointAt(0)===47;let n=wb(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function wb(e,t){let n="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function Zn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ib={cwd:vb};function vb(){return"/"}function ta(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kb(e){if(typeof e=="string")e=new URL(e);else if(!ta(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Nb(e)}function Nb(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const pi=["history","path","basename","stem","extname","dirname"];class Ml{constructor(t){let n;t?ta(t)?n={path:t}:typeof t=="string"||Rb(t)?n={value:t}:n=t:n={},this.cwd=Ib.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<pi.length;){const a=pi[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)pi.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ct.basename(this.path):void 0}set basename(t){gi(t,"basename"),mi(t,"basename"),this.path=Ct.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ct.dirname(this.path):void 0}set dirname(t){so(this.basename,"dirname"),this.path=Ct.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ct.extname(this.path):void 0}set extname(t){if(mi(t,"extname"),so(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ct.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ta(t)&&(t=kb(t)),gi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ct.basename(this.path,this.extname):void 0}set stem(t){gi(t,"stem"),mi(t,"stem"),this.path=Ct.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ke(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function mi(e,t){if(e&&e.includes(Ct.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ct.sep+"`")}function gi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function so(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Rb(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ob=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};Object.setPrototypeOf(a,r);const s=Object.getOwnPropertyNames(i);for(const o of s){const u=Object.getOwnPropertyDescriptor(i,o);u&&Object.defineProperty(a,o,u)}return a}),Lb={}.hasOwnProperty;class ja extends Ob{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Tb()}copy(){const t=new ja;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(hi(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ti("data",this.frozen),this.namespace[t]=n,this):Lb.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ti("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=cr(t),r=this.parser||this.Parser;return bi("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),bi("process",this.parser||this.Parser),Ei("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=cr(t),u=r.parse(o);r.run(u,o,function(d,f,p){if(d||!f||!p)return c(d);const h=f,b=r.stringify(h,p);Mb(b)?p.value=b:p.result=b,c(d,p)});function c(d,f){d||!f?s(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),bi("processSync",this.parser||this.Parser),Ei("processSync",this.compiler||this.Compiler),this.process(t,i),uo("processSync","process",n),r;function i(a,s){n=!0,io(a),r=s}}run(t,n,r){oo(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=cr(n);i.run(t,u,c);function c(d,f,p){const h=f||t;d?o(d):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),uo("runSync","run",r),i;function a(s,o){io(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=cr(n),i=this.compiler||this.Compiler;return Ei("stringify",i),oo(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ti("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...f]=c;u(d,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(i.settings=hi(!0,i.settings,c.settings))}function o(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const f=c[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===c){p=f;break}if(p===-1)r.push([c,...d]);else if(d.length>0){let[h,...b]=d;const E=r[p][1];ea(E)&&ea(h)&&(h=hi(!0,E,h)),r[p]=[c,h,...b]}}}}const Db=new ja().freeze();function bi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ei(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ti(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function oo(e){if(!ea(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function uo(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function cr(e){return Pb(e)?e:new Ml(e)}function Pb(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Mb(e){return typeof e=="string"||Bb(e)}function Bb(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Fb="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",lo=[],co={allowDangerousHtml:!0},Hb=/^(https?|ircs?|mailto|xmpp)$/i,Ub=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function za(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,o=e.rehypePlugins||lo,u=e.remarkPlugins||lo,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...co}:co,d=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||jb,h=Db().use(Sg).use(u).use(gb,c).use(o),b=new Ml;typeof r=="string"&&(b.value=r);for(const A of Ub)Object.hasOwn(e,A.from)&&(""+A.from+(A.to?"use `"+A.to+"` instead":"remove it")+Fb+A.id,void 0);const E=h.parse(b);let v=h.runSync(E,b);return i&&(v={type:"element",tagName:"div",properties:{className:i},children:v.type==="root"?v.children:[v]}),Vr(v,C),ap(v,{Fragment:x.Fragment,components:a,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function C(A,N,L){if(A.type==="raw"&&L&&typeof N=="number")return d?L.children.splice(N,1):L.children[N]={type:"text",value:A.value},N;if(A.type==="element"){let w;for(w in li)if(Object.hasOwn(li,w)&&Object.hasOwn(A.properties,w)){const k=A.properties[w],Y=li[w];(Y===null||Y.includes(A.tagName))&&(A.properties[w]=p(String(k||""),w,A))}}if(A.type==="element"){let w=t?!t.includes(A.tagName):s?s.includes(A.tagName):!1;if(!w&&n&&typeof N=="number"&&(w=!n(A,N,L)),w&&L&&typeof N=="number")return f&&A.children?L.children.splice(N,1,...A.children):L.children.splice(N,1),N}}}function jb(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Hb.test(e.slice(0,t))?e:""}const fo=/[#.]/g;function zb(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){fo.lastIndex=i;const o=fo.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const $b=new Set(["button","menu","reset","submit"]),na={}.hasOwnProperty;function Bl(e,t,n){const r=n&&qb(n);function i(a,s,...o){let u=-1,c;if(a==null){c={type:"root",children:[]};const d=s;o.unshift(d)}else if(c=zb(a,t),c.tagName=c.tagName.toLowerCase(),r&&na.call(r,c.tagName)&&(c.tagName=r[c.tagName]),Yb(s,c.tagName)){let d;for(d in s)na.call(s,d)&&Gb(e,c.properties,d,s[d])}else o.unshift(s);for(;++u<o.length;)ra(c.children,o[u]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function Yb(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?$b.has(e.type.toLowerCase()):!("value"in e)}function Gb(e,t,n,r){const i=Hr(e,n);let a=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Ls(r):i.commaSeparated?s=vs(r):i.commaOrSpaceSeparated?s=Ls(vs(r).join(" ")):s=ho(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?Vb(r):String(r);if(Array.isArray(s)){const o=[];for(;++a<s.length;){const u=ho(i,i.property,s[a]);o[a]=u}s=o}if(i.property==="className"&&Array.isArray(t.className)){const o=s;s=t.className.concat(o)}t[i.property]=s}}function ra(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)ra(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?ra(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ho(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Yn(n)===Yn(t)))return!0}return n}function Vb(e){const t=[];let n;for(n in e)na.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function qb(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const Wb=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Xb=Bl(Kn,"div"),Qb=Bl(Gt,"g",Wb);function Kb(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=po(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=po(t,o),c=u===-1?t.length+1:u+1;if(o===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function po(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
61
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Jt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Fl={}.hasOwnProperty,Jb=Object.prototype;function Zb(e,t){const n=t||{};return $a({file:n.file||void 0,location:!1,schema:n.space==="svg"?Gt:Kn,verbose:n.verbose||!1},e)}function $a(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},br(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Hl(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Kb(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},br(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},br(e,r,n),n}default:return n=e1(e,t),n}}function Hl(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=$a(e,t[n]);r.push(i)}return r}function e1(e,t){const n=e.schema;e.schema=t.namespaceURI===Jt.svg?Gt:Kn;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;Fl.call(Jb,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?Qb:Xb)(t.tagName,i,Hl(e,t.childNodes));if(br(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,c=u&&u.startTag&&bn(u.startTag),d=u&&u.endTag&&bn(u.endTag),f=$a(e,o.content);c&&d&&e.file&&(f.position={start:c.end,end:d.start}),s.content=f}return e.schema=n,s}function br(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=t1(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function t1(e,t,n){const r=bn(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)Fl.call(n.attrs,s)&&(a[Hr(e.schema,s).property]=bn(n.attrs[s]));n.startTag;const o=bn(n.startTag),u=n.endTag?bn(n.endTag):void 0,c={opening:o};u&&(c.closing=u),c.properties=a,t.data={position:c}}}return r}function bn(e){const t=mo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=mo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function mo(e){return e.line&&e.column?e:void 0}const go={}.hasOwnProperty;function Ul(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&go.call(i,e)){const u=String(i[e]);s=go.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const n1={},r1={}.hasOwnProperty,jl=Ul("type",{handlers:{root:a1,element:c1,text:u1,comment:l1,doctype:o1}});function i1(e,t){const r=(t||n1).space;return jl(e,r==="svg"?Gt:Kn)}function a1(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ya(e.children,n,t),An(e,n),n}function s1(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ya(e.children,n,t),An(e,n),n}function o1(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return An(e,t),t}function u1(e){const t={nodeName:"#text",value:e.value,parentNode:null};return An(e,t),t}function l1(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return An(e,t),t}function c1(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Gt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&r1.call(e.properties,a)){const u=d1(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Jt[s],childNodes:[],parentNode:null};return o.childNodes=Ya(e.children,o,r),An(e,o),e.tagName==="template"&&e.content&&(o.content=s1(e.content,r)),o}function d1(e,t,n){const r=Hr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?el(n):ll(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Jt[r.space]}return i}function Ya(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=jl(e[r],n);a.parentNode=t,i.push(a)}return i}function An(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const f1=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],h1=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Fe="�";var g;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(g||(g={}));const st={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function zl(e){return e>=55296&&e<=57343}function p1(e){return e>=56320&&e<=57343}function m1(e,t){return(e-55296)*1024+9216+t}function $l(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Yl(e){return e>=64976&&e<=65007||h1.has(e)}var D;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(D||(D={}));const g1=65536;class b1{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=g1,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(p1(n))return this.pos++,this._addGap(),m1(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(D.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;const r=this.html.charCodeAt(n);return r===g.CARRIAGE_RETURN?g.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;let t=this.html.charCodeAt(this.pos);return t===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):t===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,zl(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===g.LINE_FEED||t===g.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){$l(t)?this._err(D.controlCharacterInInputStream):Yl(t)&&this._err(D.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ge;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ge||(ge={}));function Gl(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Vl=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),E1=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var yi;const T1=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),y1=(yi=String.fromCodePoint)!==null&&yi!==void 0?yi:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function x1(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=T1.get(e))!==null&&t!==void 0?t:e}var Xe;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Xe||(Xe={}));const S1=32;var jt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(jt||(jt={}));function ia(e){return e>=Xe.ZERO&&e<=Xe.NINE}function _1(e){return e>=Xe.UPPER_A&&e<=Xe.UPPER_F||e>=Xe.LOWER_A&&e<=Xe.LOWER_F}function C1(e){return e>=Xe.UPPER_A&&e<=Xe.UPPER_Z||e>=Xe.LOWER_A&&e<=Xe.LOWER_Z||ia(e)}function A1(e){return e===Xe.EQUALS||C1(e)}var qe;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(qe||(qe={}));var Pt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Pt||(Pt={}));class ql{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=qe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Pt.Strict}startEntity(t){this.decodeMode=t,this.state=qe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case qe.EntityStart:return t.charCodeAt(n)===Xe.NUM?(this.state=qe.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=qe.NamedEntity,this.stateNamedEntity(t,n));case qe.NumericStart:return this.stateNumericStart(t,n);case qe.NumericDecimal:return this.stateNumericDecimal(t,n);case qe.NumericHex:return this.stateNumericHex(t,n);case qe.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|S1)===Xe.LOWER_X?(this.state=qe.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=qe.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ia(i)||_1(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ia(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Xe.SEMI)this.consumed+=1;else if(this.decodeMode===Pt.Strict)return 0;return this.emitCodePoint(x1(this.result),this.consumed),this.errors&&(t!==Xe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&jt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=w1(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Pt.Attribute&&(a===0||A1(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&jt.VALUE_LENGTH)>>14,a!==0){if(s===Xe.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Pt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&jt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~jt.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case qe.NamedEntity:return this.result!==0&&(this.decodeMode!==Pt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case qe.NumericDecimal:return this.emitNumericEntity(0,2);case qe.NumericHex:return this.emitNumericEntity(0,3);case qe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case qe.EntityStart:return 0}}}function Wl(e){let t="";const n=new ql(e,r=>t+=y1(r));return function(i,a){let s=0,o=0;for(;(o=i.indexOf("&",o))>=0;){t+=i.slice(s,o),n.startEntity(a);const c=n.write(i,o+1);if(c<0){s=o+n.end();break}s=o+c,o=c===0?s+1:s}const u=t+i.slice(s);return t="",u}}function w1(e,t,n,r){const i=(t&jt.BRANCH_LENGTH)>>7,a=t&jt.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)o=u-1;else return e[u+i]}return-1}Wl(Vl);Wl(E1);var M;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(M||(M={}));var Zt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Zt||(Zt={}));var ht;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ht||(ht={}));var O;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(O||(O={}));var l;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(l||(l={}));const I1=new Map([[O.A,l.A],[O.ADDRESS,l.ADDRESS],[O.ANNOTATION_XML,l.ANNOTATION_XML],[O.APPLET,l.APPLET],[O.AREA,l.AREA],[O.ARTICLE,l.ARTICLE],[O.ASIDE,l.ASIDE],[O.B,l.B],[O.BASE,l.BASE],[O.BASEFONT,l.BASEFONT],[O.BGSOUND,l.BGSOUND],[O.BIG,l.BIG],[O.BLOCKQUOTE,l.BLOCKQUOTE],[O.BODY,l.BODY],[O.BR,l.BR],[O.BUTTON,l.BUTTON],[O.CAPTION,l.CAPTION],[O.CENTER,l.CENTER],[O.CODE,l.CODE],[O.COL,l.COL],[O.COLGROUP,l.COLGROUP],[O.DD,l.DD],[O.DESC,l.DESC],[O.DETAILS,l.DETAILS],[O.DIALOG,l.DIALOG],[O.DIR,l.DIR],[O.DIV,l.DIV],[O.DL,l.DL],[O.DT,l.DT],[O.EM,l.EM],[O.EMBED,l.EMBED],[O.FIELDSET,l.FIELDSET],[O.FIGCAPTION,l.FIGCAPTION],[O.FIGURE,l.FIGURE],[O.FONT,l.FONT],[O.FOOTER,l.FOOTER],[O.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[O.FORM,l.FORM],[O.FRAME,l.FRAME],[O.FRAMESET,l.FRAMESET],[O.H1,l.H1],[O.H2,l.H2],[O.H3,l.H3],[O.H4,l.H4],[O.H5,l.H5],[O.H6,l.H6],[O.HEAD,l.HEAD],[O.HEADER,l.HEADER],[O.HGROUP,l.HGROUP],[O.HR,l.HR],[O.HTML,l.HTML],[O.I,l.I],[O.IMG,l.IMG],[O.IMAGE,l.IMAGE],[O.INPUT,l.INPUT],[O.IFRAME,l.IFRAME],[O.KEYGEN,l.KEYGEN],[O.LABEL,l.LABEL],[O.LI,l.LI],[O.LINK,l.LINK],[O.LISTING,l.LISTING],[O.MAIN,l.MAIN],[O.MALIGNMARK,l.MALIGNMARK],[O.MARQUEE,l.MARQUEE],[O.MATH,l.MATH],[O.MENU,l.MENU],[O.META,l.META],[O.MGLYPH,l.MGLYPH],[O.MI,l.MI],[O.MO,l.MO],[O.MN,l.MN],[O.MS,l.MS],[O.MTEXT,l.MTEXT],[O.NAV,l.NAV],[O.NOBR,l.NOBR],[O.NOFRAMES,l.NOFRAMES],[O.NOEMBED,l.NOEMBED],[O.NOSCRIPT,l.NOSCRIPT],[O.OBJECT,l.OBJECT],[O.OL,l.OL],[O.OPTGROUP,l.OPTGROUP],[O.OPTION,l.OPTION],[O.P,l.P],[O.PARAM,l.PARAM],[O.PLAINTEXT,l.PLAINTEXT],[O.PRE,l.PRE],[O.RB,l.RB],[O.RP,l.RP],[O.RT,l.RT],[O.RTC,l.RTC],[O.RUBY,l.RUBY],[O.S,l.S],[O.SCRIPT,l.SCRIPT],[O.SEARCH,l.SEARCH],[O.SECTION,l.SECTION],[O.SELECT,l.SELECT],[O.SOURCE,l.SOURCE],[O.SMALL,l.SMALL],[O.SPAN,l.SPAN],[O.STRIKE,l.STRIKE],[O.STRONG,l.STRONG],[O.STYLE,l.STYLE],[O.SUB,l.SUB],[O.SUMMARY,l.SUMMARY],[O.SUP,l.SUP],[O.TABLE,l.TABLE],[O.TBODY,l.TBODY],[O.TEMPLATE,l.TEMPLATE],[O.TEXTAREA,l.TEXTAREA],[O.TFOOT,l.TFOOT],[O.TD,l.TD],[O.TH,l.TH],[O.THEAD,l.THEAD],[O.TITLE,l.TITLE],[O.TR,l.TR],[O.TRACK,l.TRACK],[O.TT,l.TT],[O.U,l.U],[O.UL,l.UL],[O.SVG,l.SVG],[O.VAR,l.VAR],[O.WBR,l.WBR],[O.XMP,l.XMP]]);function wn(e){var t;return(t=I1.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const H=l,v1={[M.HTML]:new Set([H.ADDRESS,H.APPLET,H.AREA,H.ARTICLE,H.ASIDE,H.BASE,H.BASEFONT,H.BGSOUND,H.BLOCKQUOTE,H.BODY,H.BR,H.BUTTON,H.CAPTION,H.CENTER,H.COL,H.COLGROUP,H.DD,H.DETAILS,H.DIR,H.DIV,H.DL,H.DT,H.EMBED,H.FIELDSET,H.FIGCAPTION,H.FIGURE,H.FOOTER,H.FORM,H.FRAME,H.FRAMESET,H.H1,H.H2,H.H3,H.H4,H.H5,H.H6,H.HEAD,H.HEADER,H.HGROUP,H.HR,H.HTML,H.IFRAME,H.IMG,H.INPUT,H.LI,H.LINK,H.LISTING,H.MAIN,H.MARQUEE,H.MENU,H.META,H.NAV,H.NOEMBED,H.NOFRAMES,H.NOSCRIPT,H.OBJECT,H.OL,H.P,H.PARAM,H.PLAINTEXT,H.PRE,H.SCRIPT,H.SECTION,H.SELECT,H.SOURCE,H.STYLE,H.SUMMARY,H.TABLE,H.TBODY,H.TD,H.TEMPLATE,H.TEXTAREA,H.TFOOT,H.TH,H.THEAD,H.TITLE,H.TR,H.TRACK,H.UL,H.WBR,H.XMP]),[M.MATHML]:new Set([H.MI,H.MO,H.MN,H.MS,H.MTEXT,H.ANNOTATION_XML]),[M.SVG]:new Set([H.TITLE,H.FOREIGN_OBJECT,H.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},aa=new Set([H.H1,H.H2,H.H3,H.H4,H.H5,H.H6]);O.STYLE,O.SCRIPT,O.XMP,O.IFRAME,O.NOEMBED,O.NOFRAMES,O.PLAINTEXT;var T;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(T||(T={}));const je={DATA:T.DATA,RCDATA:T.RCDATA,RAWTEXT:T.RAWTEXT,SCRIPT_DATA:T.SCRIPT_DATA,PLAINTEXT:T.PLAINTEXT,CDATA_SECTION:T.CDATA_SECTION};function k1(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function Dn(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function N1(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function Ht(e){return N1(e)||Dn(e)}function bo(e){return Ht(e)||k1(e)}function dr(e){return e+32}function Xl(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function Eo(e){return Xl(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function R1(e){return e===g.NULL?D.nullCharacterReference:e>1114111?D.characterReferenceOutsideUnicodeRange:zl(e)?D.surrogateCharacterReference:Yl(e)?D.noncharacterCharacterReference:$l(e)||e===g.CARRIAGE_RETURN?D.controlCharacterReference:null}class O1{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=T.DATA,this.returnState=T.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new b1(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ql(Vl,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(D.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(D.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=R1(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ge.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ge.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ge.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ge.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Gl(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(D.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=wn(t.tagName),t.type===ge.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(D.endTagWithAttributes),t.selfClosing&&this._err(D.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ge.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ge.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ge.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ge.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Xl(t)?ge.WHITESPACE_CHARACTER:t===g.NULL?ge.NULL_CHARACTER:ge.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ge.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=T.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Pt.Attribute:Pt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===T.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case T.DATA:{this._stateData(t);break}case T.RCDATA:{this._stateRcdata(t);break}case T.RAWTEXT:{this._stateRawtext(t);break}case T.SCRIPT_DATA:{this._stateScriptData(t);break}case T.PLAINTEXT:{this._statePlaintext(t);break}case T.TAG_OPEN:{this._stateTagOpen(t);break}case T.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case T.TAG_NAME:{this._stateTagName(t);break}case T.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case T.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case T.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case T.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case T.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case T.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case T.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case T.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case T.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case T.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case T.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case T.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case T.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case T.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case T.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case T.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case T.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case T.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case T.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case T.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case T.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case T.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case T.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case T.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case T.BOGUS_COMMENT:{this._stateBogusComment(t);break}case T.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case T.COMMENT_START:{this._stateCommentStart(t);break}case T.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case T.COMMENT:{this._stateComment(t);break}case T.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case T.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case T.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case T.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case T.COMMENT_END:{this._stateCommentEnd(t);break}case T.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case T.DOCTYPE:{this._stateDoctype(t);break}case T.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case T.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case T.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case T.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case T.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case T.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case T.CDATA_SECTION:{this._stateCdataSection(t);break}case T.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case T.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case T.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case T.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=T.TAG_OPEN;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitCodePoint(t);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case g.AMPERSAND:{this._startCharacterReference();break}case g.LESS_THAN_SIGN:{this.state=T.RCDATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Fe);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case g.LESS_THAN_SIGN:{this.state=T.RAWTEXT_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Fe);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Fe);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Fe);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ht(t))this._createStartTagToken(),this.state=T.TAG_NAME,this._stateTagName(t);else switch(t){case g.EXCLAMATION_MARK:{this.state=T.MARKUP_DECLARATION_OPEN;break}case g.SOLIDUS:{this.state=T.END_TAG_OPEN;break}case g.QUESTION_MARK:{this._err(D.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=T.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=T.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ht(t))this._createEndTagToken(),this.state=T.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(D.missingEndTagName),this.state=T.DATA;break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=T.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this.state=T.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.tagName+=Fe;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Dn(t)?dr(t):t)}}_stateRcdataLessThanSign(t){t===g.SOLIDUS?this.state=T.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ht(t)?(this.state=T.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=T.BEFORE_ATTRIBUTE_NAME,!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=T.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=T.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===g.SOLIDUS?this.state=T.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ht(t)?(this.state=T.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case g.SOLIDUS:{this.state=T.SCRIPT_DATA_END_TAG_OPEN;break}case g.EXCLAMATION_MARK:{this.state=T.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=T.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ht(t)?(this.state=T.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===g.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===g.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Fe);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars(Fe);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.GREATER_THAN_SIGN:{this.state=T.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars(Fe);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===g.SOLIDUS?this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ht(t)?(this._emitChars("<"),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ht(t)?(this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(st.SCRIPT,!1)&&Eo(this.preprocessor.peek(st.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<st.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Fe);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Fe);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.GREATER_THAN_SIGN:{this.state=T.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Fe);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===g.SOLIDUS?(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(st.SCRIPT,!1)&&Eo(this.preprocessor.peek(st.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<st.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._err(D.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=T.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this._leaveAttrName(),this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._leaveAttrName(),this.state=T.BEFORE_ATTRIBUTE_VALUE;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:{this._err(D.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.name+=Fe;break}default:this.currentAttr.name+=String.fromCodePoint(Dn(t)?dr(t):t)}}_stateAfterAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:{this.state=T.SELF_CLOSING_START_TAG;break}case g.EQUALS_SIGN:{this.state=T.BEFORE_ATTRIBUTE_VALUE;break}case g.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{this.state=T.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this.state=T.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingAttributeValue),this.state=T.DATA,this.emitCurrentTagToken();break}default:this.state=T.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case g.QUOTATION_MARK:{this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=Fe;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case g.APOSTROPHE:{this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=Fe;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=Fe;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(D.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this._leaveAttrValue(),this.state=T.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBetweenAttributes),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case g.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=T.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.unexpectedSolidusInTag),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentComment(n);break}case g.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.data+=Fe;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(st.DASH_DASH,!0)?(this._createCommentToken(st.DASH_DASH.length+1),this.state=T.COMMENT_START):this._consumeSequenceIfMatch(st.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(st.DOCTYPE.length+1),this.state=T.DOCTYPE):this._consumeSequenceIfMatch(st.CDATA_START,!0)?this.inForeignNode?this.state=T.CDATA_SECTION:(this._err(D.cdataInHtmlContent),this._createCommentToken(st.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=T.BOGUS_COMMENT):this._ensureHibernation()||(this._err(D.incorrectlyOpenedComment),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case g.HYPHEN_MINUS:{this.state=T.COMMENT_START_DASH;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=T.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=T.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=T.COMMENT_END;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=T.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=T.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=T.COMMENT_END_DASH;break}case g.LESS_THAN_SIGN:{n.data+="<",this.state=T.COMMENT_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.data+=Fe;break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case g.EXCLAMATION_MARK:{n.data+="!",this.state=T.COMMENT_LESS_THAN_SIGN_BANG;break}case g.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=T.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===g.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=T.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===g.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=T.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==g.GREATER_THAN_SIGN&&t!==g.EOF&&this._err(D.nestedComment),this.state=T.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=T.COMMENT_END;break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=T.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentComment(n);break}case g.EXCLAMATION_MARK:{this.state=T.COMMENT_END_BANG;break}case g.HYPHEN_MINUS:{n.data+="-";break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=T.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{n.data+="--!",this.state=T.COMMENT_END_DASH;break}case g.GREATER_THAN_SIGN:{this._err(D.incorrectlyClosedComment),this.state=T.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=T.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case g.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBeforeDoctypeName),this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Dn(t))this._createDoctypeToken(String.fromCharCode(dr(t))),this.state=T.DOCTYPE_NAME;else switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.NULL:{this._err(D.unexpectedNullCharacter),this._createDoctypeToken(Fe),this.state=T.DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case g.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=T.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=T.AFTER_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(n);break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.name+=Fe;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Dn(t)?dr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(st.PUBLIC,!1)?this.state=T.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(st.SYSTEM,!1)?this.state=T.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(D.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=Fe;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case g.APOSTROPHE:{this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=Fe;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case g.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(n);break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=T.DATA;break}case g.QUOTATION_MARK:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=Fe;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case g.APOSTROPHE:{this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=Fe;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=T.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=T.DATA;break}case g.NULL:{this._err(D.unexpectedNullCharacter);break}case g.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case g.RIGHT_SQUARE_BRACKET:{this.state=T.CDATA_SECTION_BRACKET;break}case g.EOF:{this._err(D.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===g.RIGHT_SQUARE_BRACKET?this.state=T.CDATA_SECTION_END:(this._emitChars("]"),this.state=T.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case g.GREATER_THAN_SIGN:{this.state=T.DATA;break}case g.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=T.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(g.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&bo(this.preprocessor.peek(1))?T.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){bo(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(D.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ql=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),To=new Set([...Ql,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),_r=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),L1=new Set([..._r,l.OL,l.UL]),D1=new Set([..._r,l.BUTTON]),yo=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),xo=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),P1=new Set([l.TR,l.TEMPLATE,l.HTML]),M1=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),B1=new Set([l.TABLE,l.TEMPLATE,l.HTML]),F1=new Set([l.TD,l.TH]);class H1{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==M.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(aa,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(F1,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(B1,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(M1,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(P1,M.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===l.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case M.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case M.SVG:{if(xo.has(i))return!1;break}case M.MATHML:{if(yo.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,_r)}hasInListItemScope(t){return this.hasInDynamicScope(t,L1)}hasInButtonScope(t){return this.hasInDynamicScope(t,D1)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case M.HTML:{if(aa.has(n))return!0;if(_r.has(n))return!1;break}case M.SVG:{if(xo.has(n))return!1;break}case M.MATHML:{if(yo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Ql.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;To.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&To.has(this.currentTagId);)this.pop()}}const xi=3;var vt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vt||(vt={}));const So={type:vt.Marker};class U1{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===vt.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const d=this.treeAdapter.getAttrList(c);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xi)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xi)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=xi&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(So)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:vt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(So);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===vt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===vt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vt.Element&&n.element===t)}}const Ut={createDocument(){return{nodeName:"#document",mode:ht.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ut.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ut.isTextNode(n)){n.value+=t;return}}Ut.appendChild(e,Ut.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ut.isTextNode(r)?r.value+=t:Ut.insertBefore(e,Ut.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Kl="html",j1="about:legacy-compat",z1="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Jl=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],$1=[...Jl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Y1=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Zl=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],G1=[...Zl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function _o(e,t){return t.some(n=>e.startsWith(n))}function V1(e){return e.name===Kl&&e.publicId===null&&(e.systemId===null||e.systemId===j1)}function q1(e){if(e.name!==Kl)return ht.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===z1)return ht.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Y1.has(n))return ht.QUIRKS;let r=t===null?$1:Jl;if(_o(n,r))return ht.QUIRKS;if(r=t===null?Zl:G1,_o(n,r))return ht.LIMITED_QUIRKS}return ht.NO_QUIRKS}const Co={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},W1="definitionurl",X1="definitionURL",Q1=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),K1=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),J1=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Z1=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function eE(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===Zt.COLOR||r===Zt.SIZE||r===Zt.FACE)||Z1.has(t)}function ec(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===W1){e.attrs[t].name=X1;break}}function tc(e){for(let t=0;t<e.attrs.length;t++){const n=Q1.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ga(e){for(let t=0;t<e.attrs.length;t++){const n=K1.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function tE(e){const t=J1.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=wn(e.tagName))}function nE(e,t){return t===M.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function rE(e,t,n){if(t===M.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Zt.ENCODING){const i=n[r].value.toLowerCase();return i===Co.TEXT_HTML||i===Co.APPLICATION_XML}}return t===M.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function iE(e,t,n,r){return(!r||r===M.HTML)&&rE(e,t,n)||(!r||r===M.MATHML)&&nE(e,t)}const aE="hidden",sE=8,oE=3;var _;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(_||(_={}));const uE={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},nc=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Ao={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ut,onParseError:null};class wo{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=_.INITIAL,this.originalInsertionMode=_.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Ao,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new O1(this.options,this),this.activeFormattingElements=new U1(this.treeAdapter),this.fragmentContextID=r?wn(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new H1(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Ao,...n};t??(t=r.treeAdapter.createElement(O.TEMPLATE,M.HTML,[]));const i=r.treeAdapter.createElement("documentmock",M.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(_.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:uE,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===M.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,M.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=_.TEXT}switchToPlaintextParsing(){this.insertionMode=_.TEXT,this.originalInsertionMode=_.IN_BODY,this.tokenizer.state=je.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===O.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=je.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=je.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=je.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=je.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,M.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,M.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(O.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===ge.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===O.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===M.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&!this._isIntegrationPoint(r,n,M.HTML)}_processToken(t){switch(t.type){case ge.CHARACTER:{this.onCharacter(t);break}case ge.NULL_CHARACTER:{this.onNullCharacter(t);break}case ge.COMMENT:{this.onComment(t);break}case ge.DOCTYPE:{this.onDoctype(t);break}case ge.START_TAG:{this._processStartTag(t);break}case ge.END_TAG:{this.onEndTag(t);break}case ge.EOF:{this.onEof(t);break}case ge.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return iE(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===vt.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=_.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=_.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=_.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=_.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=_.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=_.IN_TABLE;return}case l.BODY:{this.insertionMode=_.IN_BODY;return}case l.FRAMESET:{this.insertionMode=_.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?_.AFTER_HEAD:_.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=_.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=_.IN_HEAD;return}break}}this.insertionMode=_.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=_.IN_SELECT_IN_TABLE;return}}this.insertionMode=_.IN_SELECT}_isElementCausesFosterParenting(t){return nc.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return v1[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){FT(this,t);return}switch(this.insertionMode){case _.INITIAL:{Nn(this,t);break}case _.BEFORE_HTML:{Fn(this,t);break}case _.BEFORE_HEAD:{Hn(this,t);break}case _.IN_HEAD:{Un(this,t);break}case _.IN_HEAD_NO_SCRIPT:{jn(this,t);break}case _.AFTER_HEAD:{zn(this,t);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:{ic(this,t);break}case _.TEXT:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Si(this,t);break}case _.IN_TABLE_TEXT:{cc(this,t);break}case _.IN_COLUMN_GROUP:{Cr(this,t);break}case _.AFTER_BODY:{Ar(this,t);break}case _.AFTER_AFTER_BODY:{Er(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){BT(this,t);return}switch(this.insertionMode){case _.INITIAL:{Nn(this,t);break}case _.BEFORE_HTML:{Fn(this,t);break}case _.BEFORE_HEAD:{Hn(this,t);break}case _.IN_HEAD:{Un(this,t);break}case _.IN_HEAD_NO_SCRIPT:{jn(this,t);break}case _.AFTER_HEAD:{zn(this,t);break}case _.TEXT:{this._insertCharacters(t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Si(this,t);break}case _.IN_COLUMN_GROUP:{Cr(this,t);break}case _.AFTER_BODY:{Ar(this,t);break}case _.AFTER_AFTER_BODY:{Er(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){sa(this,t);return}switch(this.insertionMode){case _.INITIAL:case _.BEFORE_HTML:case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_TEMPLATE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{sa(this,t);break}case _.IN_TABLE_TEXT:{Rn(this,t);break}case _.AFTER_BODY:{mE(this,t);break}case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{gE(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case _.INITIAL:{bE(this,t);break}case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:{this._err(t,D.misplacedDoctype);break}case _.IN_TABLE_TEXT:{Rn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,D.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?HT(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case _.INITIAL:{Nn(this,t);break}case _.BEFORE_HTML:{EE(this,t);break}case _.BEFORE_HEAD:{yE(this,t);break}case _.IN_HEAD:{St(this,t);break}case _.IN_HEAD_NO_SCRIPT:{_E(this,t);break}case _.AFTER_HEAD:{AE(this,t);break}case _.IN_BODY:{Je(this,t);break}case _.IN_TABLE:{Sn(this,t);break}case _.IN_TABLE_TEXT:{Rn(this,t);break}case _.IN_CAPTION:{xT(this,t);break}case _.IN_COLUMN_GROUP:{Wa(this,t);break}case _.IN_TABLE_BODY:{Xr(this,t);break}case _.IN_ROW:{Qr(this,t);break}case _.IN_CELL:{CT(this,t);break}case _.IN_SELECT:{hc(this,t);break}case _.IN_SELECT_IN_TABLE:{wT(this,t);break}case _.IN_TEMPLATE:{vT(this,t);break}case _.AFTER_BODY:{NT(this,t);break}case _.IN_FRAMESET:{RT(this,t);break}case _.AFTER_FRAMESET:{LT(this,t);break}case _.AFTER_AFTER_BODY:{PT(this,t);break}case _.AFTER_AFTER_FRAMESET:{MT(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?UT(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case _.INITIAL:{Nn(this,t);break}case _.BEFORE_HTML:{TE(this,t);break}case _.BEFORE_HEAD:{xE(this,t);break}case _.IN_HEAD:{SE(this,t);break}case _.IN_HEAD_NO_SCRIPT:{CE(this,t);break}case _.AFTER_HEAD:{wE(this,t);break}case _.IN_BODY:{Wr(this,t);break}case _.TEXT:{dT(this,t);break}case _.IN_TABLE:{Vn(this,t);break}case _.IN_TABLE_TEXT:{Rn(this,t);break}case _.IN_CAPTION:{ST(this,t);break}case _.IN_COLUMN_GROUP:{_T(this,t);break}case _.IN_TABLE_BODY:{oa(this,t);break}case _.IN_ROW:{fc(this,t);break}case _.IN_CELL:{AT(this,t);break}case _.IN_SELECT:{pc(this,t);break}case _.IN_SELECT_IN_TABLE:{IT(this,t);break}case _.IN_TEMPLATE:{kT(this,t);break}case _.AFTER_BODY:{gc(this,t);break}case _.IN_FRAMESET:{OT(this,t);break}case _.AFTER_FRAMESET:{DT(this,t);break}case _.AFTER_AFTER_BODY:{Er(this,t);break}}}onEof(t){switch(this.insertionMode){case _.INITIAL:{Nn(this,t);break}case _.BEFORE_HTML:{Fn(this,t);break}case _.BEFORE_HEAD:{Hn(this,t);break}case _.IN_HEAD:{Un(this,t);break}case _.IN_HEAD_NO_SCRIPT:{jn(this,t);break}case _.AFTER_HEAD:{zn(this,t);break}case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{uc(this,t);break}case _.TEXT:{fT(this,t);break}case _.IN_TABLE_TEXT:{Rn(this,t);break}case _.IN_TEMPLATE:{mc(this,t);break}case _.AFTER_BODY:case _.IN_FRAMESET:case _.AFTER_FRAMESET:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{qa(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===g.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.TEXT:case _.IN_COLUMN_GROUP:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{this._insertCharacters(t);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:case _.AFTER_BODY:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{rc(this,t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Si(this,t);break}case _.IN_TABLE_TEXT:{lc(this,t);break}}}}function lE(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):oc(e,t),n}function cE(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function dE(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=oE;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=fE(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function fE(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function hE(e,t,n){const r=e.treeAdapter.getTagName(t),i=wn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function pE(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Va(e,t){for(let n=0;n<sE;n++){const r=lE(e,t);if(!r)break;const i=cE(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=dE(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&hE(e,s,a),pE(e,i,r)}}function sa(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function mE(e,t){e._appendCommentNode(t,e.openElements.items[0])}function gE(e,t){e._appendCommentNode(t,e.document)}function qa(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function bE(e,t){e._setDocumentType(t);const n=t.forceQuirks?ht.QUIRKS:q1(t);V1(t)||e._err(t,D.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=_.BEFORE_HTML}function Nn(e,t){e._err(t,D.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ht.QUIRKS),e.insertionMode=_.BEFORE_HTML,e._processToken(t)}function EE(e,t){t.tagID===l.HTML?(e._insertElement(t,M.HTML),e.insertionMode=_.BEFORE_HEAD):Fn(e,t)}function TE(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&Fn(e,t)}function Fn(e,t){e._insertFakeRootElement(),e.insertionMode=_.BEFORE_HEAD,e._processToken(t)}function yE(e,t){switch(t.tagID){case l.HTML:{Je(e,t);break}case l.HEAD:{e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD;break}default:Hn(e,t)}}function xE(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?Hn(e,t):e._err(t,D.endTagWithoutMatchingOpenElement)}function Hn(e,t){e._insertFakeElement(O.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD,e._processToken(t)}function St(e,t){switch(t.tagID){case l.HTML:{Je(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,je.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,je.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=_.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,je.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,je.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=_.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(_.IN_TEMPLATE);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:Un(e,t)}}function SE(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=_.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{Un(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function ln(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,D.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,D.endTagWithoutMatchingOpenElement)}function Un(e,t){e.openElements.pop(),e.insertionMode=_.AFTER_HEAD,e._processToken(t)}function _E(e,t){switch(t.tagID){case l.HTML:{Je(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{St(e,t);break}case l.NOSCRIPT:{e._err(t,D.nestedNoscriptInHead);break}default:jn(e,t)}}function CE(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=_.IN_HEAD;break}case l.BR:{jn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function jn(e,t){const n=t.type===ge.EOF?D.openElementsLeftAfterEof:D.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=_.IN_HEAD,e._processToken(t)}function AE(e,t){switch(t.tagID){case l.HTML:{Je(e,t);break}case l.BODY:{e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=_.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,M.HTML),e.insertionMode=_.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,D.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),St(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:zn(e,t)}}function wE(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{zn(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function zn(e,t){e._insertFakeElement(O.BODY,l.BODY),e.insertionMode=_.IN_BODY,qr(e,t)}function qr(e,t){switch(t.type){case ge.CHARACTER:{ic(e,t);break}case ge.WHITESPACE_CHARACTER:{rc(e,t);break}case ge.COMMENT:{sa(e,t);break}case ge.START_TAG:{Je(e,t);break}case ge.END_TAG:{Wr(e,t);break}case ge.EOF:{uc(e,t);break}}}function rc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ic(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function IE(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function vE(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function kE(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_FRAMESET)}function NE(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function RE(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),aa.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function OE(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function LE(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function DE(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function PE(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=je.PLAINTEXT}function ME(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function BE(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(O.A);n&&(Va(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function HE(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Va(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function UE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function jE(e,t){e.treeAdapter.getDocumentMode(e.document)!==ht.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=_.IN_TABLE}function ac(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function sc(e){const t=Gl(e,Zt.TYPE);return t!=null&&t.toLowerCase()===aE}function zE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),sc(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function $E(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function YE(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function GE(e,t){t.tagName=O.IMG,t.tagID=l.IMG,ac(e,t)}function VE(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=je.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=_.TEXT}function qE(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,je.RAWTEXT)}function WE(e,t){e.framesetOk=!1,e._switchToTextParsing(t,je.RAWTEXT)}function Io(e,t){e._switchToTextParsing(t,je.RAWTEXT)}function XE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===_.IN_TABLE||e.insertionMode===_.IN_CAPTION||e.insertionMode===_.IN_TABLE_BODY||e.insertionMode===_.IN_ROW||e.insertionMode===_.IN_CELL?_.IN_SELECT_IN_TABLE:_.IN_SELECT}function QE(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function KE(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function JE(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,M.HTML)}function ZE(e,t){e._reconstructActiveFormattingElements(),ec(t),Ga(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function eT(e,t){e._reconstructActiveFormattingElements(),tc(t),Ga(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function vo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function Je(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{FE(e,t);break}case l.A:{BE(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{RE(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{NE(e,t);break}case l.LI:case l.DD:case l.DT:{DE(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{ac(e,t);break}case l.HR:{YE(e,t);break}case l.RB:case l.RTC:{KE(e,t);break}case l.RT:case l.RP:{JE(e,t);break}case l.PRE:case l.LISTING:{OE(e,t);break}case l.XMP:{qE(e,t);break}case l.SVG:{eT(e,t);break}case l.HTML:{IE(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{St(e,t);break}case l.BODY:{vE(e,t);break}case l.FORM:{LE(e,t);break}case l.NOBR:{HE(e,t);break}case l.MATH:{ZE(e,t);break}case l.TABLE:{jE(e,t);break}case l.INPUT:{zE(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{$E(e,t);break}case l.IMAGE:{GE(e,t);break}case l.BUTTON:{ME(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{UE(e,t);break}case l.IFRAME:{WE(e,t);break}case l.SELECT:{XE(e,t);break}case l.OPTION:case l.OPTGROUP:{QE(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Io(e,t);break}case l.FRAMESET:{kE(e,t);break}case l.TEXTAREA:{VE(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Io(e,t):vo(e,t);break}case l.PLAINTEXT:{PE(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:vo(e,t)}}function tT(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=_.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function nT(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=_.AFTER_BODY,gc(e,t))}function rT(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function iT(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function aT(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(O.P,l.P),e._closePElement()}function sT(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function oT(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function uT(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function lT(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function cT(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(O.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function oc(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function Wr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Va(e,t);break}case l.P:{aT(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{rT(e,t);break}case l.LI:{sT(e);break}case l.DD:case l.DT:{oT(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{uT(e);break}case l.BR:{cT(e);break}case l.BODY:{tT(e,t);break}case l.HTML:{nT(e,t);break}case l.FORM:{iT(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{lT(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:oc(e,t)}}function uc(e,t){e.tmplInsertionModeStack.length>0?mc(e,t):qa(e,t)}function dT(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function fT(e,t){e._err(t,D.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Si(e,t){if(nc.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=_.IN_TABLE_TEXT,t.type){case ge.CHARACTER:{cc(e,t);break}case ge.WHITESPACE_CHARACTER:{lc(e,t);break}}else er(e,t)}function hT(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_CAPTION}function pT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_COLUMN_GROUP}function mT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(O.COLGROUP,l.COLGROUP),e.insertionMode=_.IN_COLUMN_GROUP,Wa(e,t)}function gT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_TABLE_BODY}function bT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(O.TBODY,l.TBODY),e.insertionMode=_.IN_TABLE_BODY,Xr(e,t)}function ET(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function TT(e,t){sc(t)?e._appendElement(t,M.HTML):er(e,t),t.ackSelfClosing=!0}function yT(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Sn(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{bT(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{St(e,t);break}case l.COL:{mT(e,t);break}case l.FORM:{yT(e,t);break}case l.TABLE:{ET(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{gT(e,t);break}case l.INPUT:{TT(e,t);break}case l.CAPTION:{hT(e,t);break}case l.COLGROUP:{pT(e,t);break}default:er(e,t)}}function Vn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{ln(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:er(e,t)}}function er(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,qr(e,t),e.fosterParentingEnabled=n}function lc(e,t){e.pendingCharacterTokens.push(t)}function cc(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Rn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)er(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const dc=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function xT(e,t){const n=t.tagID;dc.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,Sn(e,t)):Je(e,t)}function ST(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,n===l.TABLE&&Vn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:Wr(e,t)}}function Wa(e,t){switch(t.tagID){case l.HTML:{Je(e,t);break}case l.COL:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{St(e,t);break}default:Cr(e,t)}}function _T(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE);break}case l.TEMPLATE:{ln(e,t);break}case l.COL:break;default:Cr(e,t)}}function Cr(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE,e._processToken(t))}function Xr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(O.TR,l.TR),e.insertionMode=_.IN_ROW,Qr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,Sn(e,t));break}default:Sn(e,t)}}function oa(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,Vn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:Vn(e,t)}}function Qr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,Xr(e,t));break}default:Sn(e,t)}}function fc(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,oa(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,oa(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:Vn(e,t)}}function CT(e,t){const n=t.tagID;dc.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),Qr(e,t)):Je(e,t)}function AT(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),fc(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:Wr(e,t)}}function hc(e,t){switch(t.tagID){case l.HTML:{Je(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{St(e,t);break}}}function pc(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{ln(e,t);break}}}function wT(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):hc(e,t)}function IT(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):pc(e,t)}function vT(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{St(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=_.IN_TABLE,e.insertionMode=_.IN_TABLE,Sn(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=_.IN_COLUMN_GROUP,e.insertionMode=_.IN_COLUMN_GROUP,Wa(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=_.IN_TABLE_BODY,e.insertionMode=_.IN_TABLE_BODY,Xr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=_.IN_ROW,e.insertionMode=_.IN_ROW,Qr(e,t);break}default:e.tmplInsertionModeStack[0]=_.IN_BODY,e.insertionMode=_.IN_BODY,Je(e,t)}}function kT(e,t){t.tagID===l.TEMPLATE&&ln(e,t)}function mc(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):qa(e,t)}function NT(e,t){t.tagID===l.HTML?Je(e,t):Ar(e,t)}function gc(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=_.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Ar(e,t)}function Ar(e,t){e.insertionMode=_.IN_BODY,qr(e,t)}function RT(e,t){switch(t.tagID){case l.HTML:{Je(e,t);break}case l.FRAMESET:{e._insertElement(t,M.HTML);break}case l.FRAME:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{St(e,t);break}}}function OT(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=_.AFTER_FRAMESET))}function LT(e,t){switch(t.tagID){case l.HTML:{Je(e,t);break}case l.NOFRAMES:{St(e,t);break}}}function DT(e,t){t.tagID===l.HTML&&(e.insertionMode=_.AFTER_AFTER_FRAMESET)}function PT(e,t){t.tagID===l.HTML?Je(e,t):Er(e,t)}function Er(e,t){e.insertionMode=_.IN_BODY,qr(e,t)}function MT(e,t){switch(t.tagID){case l.HTML:{Je(e,t);break}case l.NOFRAMES:{St(e,t);break}}}function BT(e,t){t.chars=Fe,e._insertCharacters(t)}function FT(e,t){e._insertCharacters(t),e.framesetOk=!1}function bc(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function HT(e,t){if(eE(t))bc(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?ec(t):r===M.SVG&&(tE(t),tc(t)),Ga(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function UT(e,t){if(t.tagID===l.P||t.tagID===l.BR){bc(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}O.AREA,O.BASE,O.BASEFONT,O.BGSOUND,O.BR,O.COL,O.EMBED,O.FRAME,O.HR,O.IMG,O.INPUT,O.KEYGEN,O.LINK,O.META,O.PARAM,O.SOURCE,O.TRACK,O.WBR;const jT=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ko={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ec(e,t){const n=KT(e),r=Ul("type",{handlers:{root:zT,element:$T,text:YT,comment:yc,doctype:GT,raw:qT},unknown:WT}),i={parser:n?new wo(ko):wo.getFragmentParser(void 0,ko),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),In(i,Rt());const a=n?i.parser.document:i.parser.getFragment(),s=Zb(a,{file:i.options.file});return i.stitches&&Vr(s,"comment",function(o,u,c){const d=o;if(d.value.stitch&&c&&u!==void 0){const f=c.children;return f[u]=d.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Tc(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function zT(e,t){Tc(e.children,t)}function $T(e,t){XT(e,t),Tc(e.children,t),QT(e,t)}function YT(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ge.CHARACTER,chars:e.value,location:tr(e)};In(t,Rt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function GT(e,t){const n={type:ge.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:tr(e)};In(t,Rt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function VT(e,t){t.stitches=!0;const n=JT(e);if("children"in e&&"children"in n){const r=Ec({type:"root",children:e.children},t.options);n.children=r.children}yc({type:"comment",value:{stitch:n}},t)}function yc(e,t){const n=e.value,r={type:ge.COMMENT,data:n,location:tr(e)};In(t,Rt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function qT(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,xc(t,Rt(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function WT(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))VT(n,t);else{let r="";throw jT.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function In(e,t){xc(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=je.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function xc(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function XT(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===je.PLAINTEXT)return;In(t,Rt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Jt.html;i===Jt.html&&n==="svg"&&(i=Jt.svg);const a=i1({...e,children:[]},{space:i===Jt.svg?"svg":"html"}),s={type:ge.START_TAG,tagName:n,tagID:wn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:tr(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function QT(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&f1.includes(n)||t.parser.tokenizer.state===je.PLAINTEXT)return;In(t,Ur(e));const r={type:ge.END_TAG,tagName:n,tagID:wn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:tr(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===je.RCDATA||t.parser.tokenizer.state===je.RAWTEXT||t.parser.tokenizer.state===je.SCRIPT_DATA)&&(t.parser.tokenizer.state=je.DATA)}function KT(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function tr(e){const t=Rt(e)||{line:void 0,column:void 0,offset:void 0},n=Ur(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function JT(e){return"children"in e?xn({...e,children:[]}):xn(e)}function Xa(e){return function(t,n){return Ec(t,{...e,file:n})}}const Qa=({children:e})=>x.jsx("div",{className:"p-3",children:e}),ZT=({content:e,metaData:t})=>x.jsx(Qa,{children:x.jsx("div",{className:"flex justify-end",children:x.jsx("div",{className:`ml-auto w-fit max-w-full px-4 py-3 rounded-2xl rounded-br-md transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"chatsystem-user-message chatsystem-primary-background text-white shadow-sm"}`,children:x.jsx("div",{children:x.jsx(za,{rehypePlugins:[Xa],children:e&&e})})})})});function No(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function e2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function t2(e,t,n){const i=Yr((n||{}).ignore||[]),a=n2(t);let s=-1;for(;++s<a.length;)Pl(e,"text",o);function o(c,d){let f=-1,p;for(;++f<d.length;){const h=d[f],b=p?p.children:void 0;if(i(h,b?b.indexOf(h):void 0,p))return;p=h}if(p)return u(c,d)}function u(c,d){const f=d[d.length-1],p=a[s][0],h=a[s][1];let b=0;const v=f.children.indexOf(c);let C=!1,A=[];p.lastIndex=0;let N=p.exec(c.value);for(;N;){const L=N.index,w={index:N.index,input:N.input,stack:[...d,c]};let k=h(...N,w);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?p.lastIndex=L+1:(b!==L&&A.push({type:"text",value:c.value.slice(b,L)}),Array.isArray(k)?A.push(...k):k&&A.push(k),b=L+N[0].length,C=!0),!p.global)break;N=p.exec(c.value)}return C?(b<c.value.length&&A.push({type:"text",value:c.value.slice(b)}),f.children.splice(v,1,...A)):A=[c],v+A.length}}function n2(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([r2(i[0]),i2(i[1])])}return t}function r2(e){return typeof e=="string"?new RegExp(e2(e),"g"):e}function i2(e){return typeof e=="function"?e:function(){return e}}const _i="phrasing",Ci=["autolink","link","image","label"];function a2(){return{transforms:[f2],enter:{literalAutolink:o2,literalAutolinkEmail:Ai,literalAutolinkHttp:Ai,literalAutolinkWww:Ai},exit:{literalAutolink:d2,literalAutolinkEmail:c2,literalAutolinkHttp:u2,literalAutolinkWww:l2}}}function s2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_i,notInConstruct:Ci},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_i,notInConstruct:Ci},{character:":",before:"[ps]",after:"\\/",inConstruct:_i,notInConstruct:Ci}]}}function o2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ai(e){this.config.enter.autolinkProtocol.call(this,e)}function u2(e){this.config.exit.autolinkProtocol.call(this,e)}function l2(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function c2(e){this.config.exit.autolinkEmail.call(this,e)}function d2(e){this.exit(e)}function f2(e){t2(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,h2],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),p2]],{ignore:["link","linkReference"]})}function h2(e,t,n,r,i){let a="";if(!Sc(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!m2(n)))return!1;const s=g2(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function p2(e,t,n,r){return!Sc(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function m2(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function g2(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=No(e,"(");let a=No(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Sc(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||rn(n)||jr(n))&&(!t||n!==47)}_c.peek=A2;function b2(){this.buffer()}function E2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function T2(){this.buffer()}function y2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function x2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function S2(e){this.exit(e)}function _2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function C2(e){this.exit(e)}function A2(){return"["}function _c(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function w2(){return{enter:{gfmFootnoteCallString:b2,gfmFootnoteCall:E2,gfmFootnoteDefinitionLabelString:T2,gfmFootnoteDefinition:y2},exit:{gfmFootnoteCallString:x2,gfmFootnoteCall:S2,gfmFootnoteDefinitionLabelString:_2,gfmFootnoteDefinition:C2}}}function I2(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:_c},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
|
|
62
|
-
`:" ")+a.indentLines(a.containerFlow(r,o.current()),t?
|
|
63
|
-
`)}function
|
|
64
|
-
`&&
|
|
65
|
-
`}function
|
|
59
|
+
`}),n}function Io(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ao(e,t){const n=Wb(e,t),r=n.one(e,void 0),i=Pb(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
60
|
+
`},i),a}function Qb(e,t){return e&&"run"in e?async function(n,r){const i=Ao(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ao(n,{file:r,...t||e})}}function wo(e){if(e)throw e}var wi,vo;function Kb(){if(vo)return wi;vo=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!f)return!1;var m;for(m in c);return typeof m>"u"||e.call(c,m)},s=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},o=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return wi=function u(){var c,d,f,m,h,g,y=arguments[0],v=1,A=arguments.length,k=!1;for(typeof y=="boolean"&&(k=y,y=arguments[1]||{},v=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});v<A;++v)if(c=arguments[v],c!=null)for(d in c)f=o(y,d),m=o(c,d),y!==m&&(k&&m&&(a(m)||(h=i(m)))?(h?(h=!1,g=f&&i(f)?f:[]):g=f&&a(f)?f:{},s(y,{name:d,newValue:u(k,g,m)})):typeof m<"u"&&s(y,{name:d,newValue:m}));return y},wi}var Jb=Kb();const vi=Ra(Jb);function ga(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Zb(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...c){const d=e[++a];let f=-1;if(u){s(u);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,d?e1(d,o)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function e1(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(c){const d=c;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const It={basename:t1,dirname:n1,extname:r1,join:i1,sep:"/"};function t1(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');cr(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function n1(e){if(cr(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function r1(e){cr(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function i1(...e){let t=-1,n;for(;++t<e.length;)cr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":a1(n)}function a1(e){cr(e);const t=e.codePointAt(0)===47;let n=s1(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function s1(e,t){let n="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function cr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const o1={cwd:u1};function u1(){return"/"}function ba(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function c1(e){if(typeof e=="string")e=new URL(e);else if(!ba(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return l1(e)}function l1(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ki=["history","path","basename","stem","extname","dirname"];class ul{constructor(t){let n;t?ba(t)?n={path:t}:typeof t=="string"||d1(t)?n={value:t}:n=t:n={},this.cwd=o1.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ki.length;){const a=ki[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)ki.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?It.basename(this.path):void 0}set basename(t){Ri(t,"basename"),Ni(t,"basename"),this.path=It.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?It.dirname(this.path):void 0}set dirname(t){ko(this.basename,"dirname"),this.path=It.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?It.extname(this.path):void 0}set extname(t){if(Ni(t,"extname"),ko(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=It.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ba(t)&&(t=c1(t)),Ri(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?It.basename(this.path,this.extname):void 0}set stem(t){Ri(t,"stem"),Ni(t,"stem"),this.path=It.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new tt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ni(e,t){if(e&&e.includes(It.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+It.sep+"`")}function Ri(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ko(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function d1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const f1=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};Object.setPrototypeOf(a,r);const s=Object.getOwnPropertyNames(i);for(const o of s){const u=Object.getOwnPropertyDescriptor(i,o);u&&Object.defineProperty(a,o,u)}return a}),h1={}.hasOwnProperty;class rs extends f1{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Zb()}copy(){const t=new rs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(vi(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Di("data",this.frozen),this.namespace[t]=n,this):h1.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Di("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=yr(t),r=this.parser||this.Parser;return Oi("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Oi("process",this.parser||this.Parser),Li("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=yr(t),u=r.parse(o);r.run(u,o,function(d,f,m){if(d||!f||!m)return c(d);const h=f,g=r.stringify(h,m);g1(g)?m.value=g:m.result=g,c(d,m)});function c(d,f){d||!f?s(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Oi("processSync",this.parser||this.Parser),Li("processSync",this.compiler||this.Compiler),this.process(t,i),Ro("processSync","process",n),r;function i(a,s){n=!0,wo(a),r=s}}run(t,n,r){No(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=yr(n);i.run(t,u,c);function c(d,f,m){const h=f||t;d?o(d):s?s(h):r(void 0,h,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ro("runSync","run",r),i;function a(s,o){wo(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=yr(n),i=this.compiler||this.Compiler;return Li("stringify",i),No(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Di("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...f]=c;u(d,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(i.settings=vi(!0,i.settings,c.settings))}function o(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const f=c[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===c){m=f;break}if(m===-1)r.push([c,...d]);else if(d.length>0){let[h,...g]=d;const y=r[m][1];ga(y)&&ga(h)&&(h=vi(!0,y,h)),r[m]=[c,h,...g]}}}}const m1=new rs().freeze();function Oi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Li(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Di(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function No(e){if(!ga(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ro(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function yr(e){return p1(e)?e:new ul(e)}function p1(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function g1(e){return typeof e=="string"||b1(e)}function b1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const E1="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Oo=[],Lo={allowDangerousHtml:!0},T1=/^(https?|ircs?|mailto|xmpp)$/i,y1=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function is(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,o=e.rehypePlugins||Oo,u=e.remarkPlugins||Oo,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Lo}:Lo,d=e.skipHtml,f=e.unwrapDisallowed,m=e.urlTransform||x1,h=m1().use(nb).use(u).use(Qb,c).use(o),g=new ul;typeof r=="string"&&(g.value=r);for(const k of y1)Object.hasOwn(e,k.from)&&(""+k.from+(k.to?"use `"+k.to+"` instead":"remove it")+E1+k.id,void 0);const y=h.parse(g);let v=h.runSync(y,g);return i&&(v={type:"element",tagName:"div",properties:{className:i},children:v.type==="root"?v.children:[v]}),ri(v,A),Um(v,{Fragment:b.Fragment,components:a,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function A(k,p,O){if(k.type==="raw"&&O&&typeof p=="number")return d?O.children.splice(p,1):O.children[p]={type:"text",value:k.value},p;if(k.type==="element"){let S;for(S in Ci)if(Object.hasOwn(Ci,S)&&Object.hasOwn(k.properties,S)){const w=k.properties[S],B=Ci[S];(B===null||B.includes(k.tagName))&&(k.properties[S]=m(String(w||""),S,k))}}if(k.type==="element"){let S=t?!t.includes(k.tagName):s?s.includes(k.tagName):!1;if(!S&&n&&typeof p=="number"&&(S=!n(k,p,O)),S&&O&&typeof p=="number")return f&&k.children?O.children.splice(p,1,...k.children):O.children.splice(p,1),p}}}function x1(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||T1.test(e.slice(0,t))?e:""}const Do=/[#.]/g;function _1(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Do.lastIndex=i;const o=Do.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const S1=new Set(["button","menu","reset","submit"]),Ea={}.hasOwnProperty;function cl(e,t,n){const r=n&&w1(n);function i(a,s,...o){let u=-1,c;if(a==null){c={type:"root",children:[]};const d=s;o.unshift(d)}else if(c=_1(a,t),c.tagName=c.tagName.toLowerCase(),r&&Ea.call(r,c.tagName)&&(c.tagName=r[c.tagName]),C1(s,c.tagName)){let d;for(d in s)Ea.call(s,d)&&I1(e,c.properties,d,s[d])}else o.unshift(s);for(;++u<o.length;)Ta(c.children,o[u]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function C1(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?S1.has(e.type.toLowerCase()):!("value"in e)}function I1(e,t,n,r){const i=Qr(e,n);let a=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=to(r):i.commaSeparated?s=Qs(r):i.commaOrSpaceSeparated?s=to(Qs(r).join(" ")):s=Po(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?A1(r):String(r);if(Array.isArray(s)){const o=[];for(;++a<s.length;){const u=Po(i,i.property,s[a]);o[a]=u}s=o}if(i.property==="className"&&Array.isArray(t.className)){const o=s;s=t.className.concat(o)}t[i.property]=s}}function Ta(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Ta(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ta(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Po(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Jn(n)===Jn(t)))return!0}return n}function A1(e){const t=[];let n;for(n in e)Ea.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function w1(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const v1=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],k1=cl(or,"div"),N1=cl(qt,"g",v1);function R1(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=Mo(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=Mo(t,o),c=u===-1?t.length+1:u+1;if(o===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Mo(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
61
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const tn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},ll={}.hasOwnProperty,O1=Object.prototype;function L1(e,t){const n=t||{};return as({file:n.file||void 0,location:!1,schema:n.space==="svg"?qt:or,verbose:n.verbose||!1},e)}function as(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},vr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:dl(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=R1(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},vr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},vr(e,r,n),n}default:return n=D1(e,t),n}}function dl(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=as(e,t[n]);r.push(i)}return r}function D1(e,t){const n=e.schema;e.schema=t.namespaceURI===tn.svg?qt:or;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;ll.call(O1,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?N1:k1)(t.tagName,i,dl(e,t.childNodes));if(vr(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,c=u&&u.startTag&&yn(u.startTag),d=u&&u.endTag&&yn(u.endTag),f=as(e,o.content);c&&d&&e.file&&(f.position={start:c.end,end:d.start}),s.content=f}return e.schema=n,s}function vr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=P1(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function P1(e,t,n){const r=yn(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)ll.call(n.attrs,s)&&(a[Qr(e.schema,s).property]=yn(n.attrs[s]));n.startTag;const o=yn(n.startTag),u=n.endTag?yn(n.endTag):void 0,c={opening:o};u&&(c.closing=u),c.properties=a,t.data={position:c}}}return r}function yn(e){const t=Bo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Bo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Bo(e){return e.line&&e.column?e:void 0}const Fo={}.hasOwnProperty;function fl(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&Fo.call(i,e)){const u=String(i[e]);s=Fo.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const M1={},B1={}.hasOwnProperty,hl=fl("type",{handlers:{root:U1,element:V1,text:z1,comment:$1,doctype:j1}});function F1(e,t){const r=(t||M1).space;return hl(e,r==="svg"?qt:or)}function U1(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ss(e.children,n,t),Nn(e,n),n}function H1(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ss(e.children,n,t),Nn(e,n),n}function j1(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Nn(e,t),t}function z1(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Nn(e,t),t}function $1(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Nn(e,t),t}function V1(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=qt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&B1.call(e.properties,a)){const u=W1(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:tn[s],childNodes:[],parentNode:null};return o.childNodes=ss(e.children,o,r),Nn(e,o),e.tagName==="template"&&e.content&&(o.content=H1(e.content,r)),o}function W1(e,t,n){const r=Qr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Ac(n):Pc(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=tn[r.space]}return i}function ss(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=hl(e[r],n);a.parentNode=t,i.push(a)}return i}function Nn(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const G1=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Y1=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),je="�";var T;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(T||(T={}));const ut={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ml(e){return e>=55296&&e<=57343}function q1(e){return e>=56320&&e<=57343}function X1(e,t){return(e-55296)*1024+9216+t}function pl(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function gl(e){return e>=64976&&e<=65007||Y1.has(e)}var D;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(D||(D={}));const Q1=65536;class K1{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Q1,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(q1(n))return this.pos++,this._addGap(),X1(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,T.EOF;return this._err(D.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;const r=this.html.charCodeAt(n);return r===T.CARRIAGE_RETURN?T.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;let t=this.html.charCodeAt(this.pos);return t===T.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,T.LINE_FEED):t===T.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ml(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===T.LINE_FEED||t===T.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){pl(t)?this._err(D.controlCharacterInInputStream):gl(t)&&this._err(D.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ye;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ye||(ye={}));function bl(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const El=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),J1=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Pi;const Z1=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),eE=(Pi=String.fromCodePoint)!==null&&Pi!==void 0?Pi:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function tE(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Z1.get(e))!==null&&t!==void 0?t:e}var Ke;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ke||(Ke={}));const nE=32;var $t;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})($t||($t={}));function ya(e){return e>=Ke.ZERO&&e<=Ke.NINE}function rE(e){return e>=Ke.UPPER_A&&e<=Ke.UPPER_F||e>=Ke.LOWER_A&&e<=Ke.LOWER_F}function iE(e){return e>=Ke.UPPER_A&&e<=Ke.UPPER_Z||e>=Ke.LOWER_A&&e<=Ke.LOWER_Z||ya(e)}function aE(e){return e===Ke.EQUALS||iE(e)}var Xe;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Xe||(Xe={}));var Bt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Bt||(Bt={}));class Tl{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Xe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bt.Strict}startEntity(t){this.decodeMode=t,this.state=Xe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Xe.EntityStart:return t.charCodeAt(n)===Ke.NUM?(this.state=Xe.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Xe.NamedEntity,this.stateNamedEntity(t,n));case Xe.NumericStart:return this.stateNumericStart(t,n);case Xe.NumericDecimal:return this.stateNumericDecimal(t,n);case Xe.NumericHex:return this.stateNumericHex(t,n);case Xe.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|nE)===Ke.LOWER_X?(this.state=Xe.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Xe.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ya(i)||rE(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ya(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ke.SEMI)this.consumed+=1;else if(this.decodeMode===Bt.Strict)return 0;return this.emitCodePoint(tE(this.result),this.consumed),this.errors&&(t!==Ke.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&$t.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=sE(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Bt.Attribute&&(a===0||aE(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&$t.VALUE_LENGTH)>>14,a!==0){if(s===Ke.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Bt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&$t.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~$t.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Xe.NamedEntity:return this.result!==0&&(this.decodeMode!==Bt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Xe.NumericDecimal:return this.emitNumericEntity(0,2);case Xe.NumericHex:return this.emitNumericEntity(0,3);case Xe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Xe.EntityStart:return 0}}}function yl(e){let t="";const n=new Tl(e,r=>t+=eE(r));return function(i,a){let s=0,o=0;for(;(o=i.indexOf("&",o))>=0;){t+=i.slice(s,o),n.startEntity(a);const c=n.write(i,o+1);if(c<0){s=o+n.end();break}s=o+c,o=c===0?s+1:s}const u=t+i.slice(s);return t="",u}}function sE(e,t,n,r){const i=(t&$t.BRANCH_LENGTH)>>7,a=t&$t.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)o=u-1;else return e[u+i]}return-1}yl(El);yl(J1);var M;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(M||(M={}));var rn;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(rn||(rn={}));var pt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(pt||(pt={}));var L;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(L||(L={}));var l;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(l||(l={}));const oE=new Map([[L.A,l.A],[L.ADDRESS,l.ADDRESS],[L.ANNOTATION_XML,l.ANNOTATION_XML],[L.APPLET,l.APPLET],[L.AREA,l.AREA],[L.ARTICLE,l.ARTICLE],[L.ASIDE,l.ASIDE],[L.B,l.B],[L.BASE,l.BASE],[L.BASEFONT,l.BASEFONT],[L.BGSOUND,l.BGSOUND],[L.BIG,l.BIG],[L.BLOCKQUOTE,l.BLOCKQUOTE],[L.BODY,l.BODY],[L.BR,l.BR],[L.BUTTON,l.BUTTON],[L.CAPTION,l.CAPTION],[L.CENTER,l.CENTER],[L.CODE,l.CODE],[L.COL,l.COL],[L.COLGROUP,l.COLGROUP],[L.DD,l.DD],[L.DESC,l.DESC],[L.DETAILS,l.DETAILS],[L.DIALOG,l.DIALOG],[L.DIR,l.DIR],[L.DIV,l.DIV],[L.DL,l.DL],[L.DT,l.DT],[L.EM,l.EM],[L.EMBED,l.EMBED],[L.FIELDSET,l.FIELDSET],[L.FIGCAPTION,l.FIGCAPTION],[L.FIGURE,l.FIGURE],[L.FONT,l.FONT],[L.FOOTER,l.FOOTER],[L.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[L.FORM,l.FORM],[L.FRAME,l.FRAME],[L.FRAMESET,l.FRAMESET],[L.H1,l.H1],[L.H2,l.H2],[L.H3,l.H3],[L.H4,l.H4],[L.H5,l.H5],[L.H6,l.H6],[L.HEAD,l.HEAD],[L.HEADER,l.HEADER],[L.HGROUP,l.HGROUP],[L.HR,l.HR],[L.HTML,l.HTML],[L.I,l.I],[L.IMG,l.IMG],[L.IMAGE,l.IMAGE],[L.INPUT,l.INPUT],[L.IFRAME,l.IFRAME],[L.KEYGEN,l.KEYGEN],[L.LABEL,l.LABEL],[L.LI,l.LI],[L.LINK,l.LINK],[L.LISTING,l.LISTING],[L.MAIN,l.MAIN],[L.MALIGNMARK,l.MALIGNMARK],[L.MARQUEE,l.MARQUEE],[L.MATH,l.MATH],[L.MENU,l.MENU],[L.META,l.META],[L.MGLYPH,l.MGLYPH],[L.MI,l.MI],[L.MO,l.MO],[L.MN,l.MN],[L.MS,l.MS],[L.MTEXT,l.MTEXT],[L.NAV,l.NAV],[L.NOBR,l.NOBR],[L.NOFRAMES,l.NOFRAMES],[L.NOEMBED,l.NOEMBED],[L.NOSCRIPT,l.NOSCRIPT],[L.OBJECT,l.OBJECT],[L.OL,l.OL],[L.OPTGROUP,l.OPTGROUP],[L.OPTION,l.OPTION],[L.P,l.P],[L.PARAM,l.PARAM],[L.PLAINTEXT,l.PLAINTEXT],[L.PRE,l.PRE],[L.RB,l.RB],[L.RP,l.RP],[L.RT,l.RT],[L.RTC,l.RTC],[L.RUBY,l.RUBY],[L.S,l.S],[L.SCRIPT,l.SCRIPT],[L.SEARCH,l.SEARCH],[L.SECTION,l.SECTION],[L.SELECT,l.SELECT],[L.SOURCE,l.SOURCE],[L.SMALL,l.SMALL],[L.SPAN,l.SPAN],[L.STRIKE,l.STRIKE],[L.STRONG,l.STRONG],[L.STYLE,l.STYLE],[L.SUB,l.SUB],[L.SUMMARY,l.SUMMARY],[L.SUP,l.SUP],[L.TABLE,l.TABLE],[L.TBODY,l.TBODY],[L.TEMPLATE,l.TEMPLATE],[L.TEXTAREA,l.TEXTAREA],[L.TFOOT,l.TFOOT],[L.TD,l.TD],[L.TH,l.TH],[L.THEAD,l.THEAD],[L.TITLE,l.TITLE],[L.TR,l.TR],[L.TRACK,l.TRACK],[L.TT,l.TT],[L.U,l.U],[L.UL,l.UL],[L.SVG,l.SVG],[L.VAR,l.VAR],[L.WBR,l.WBR],[L.XMP,l.XMP]]);function Rn(e){var t;return(t=oE.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const U=l,uE={[M.HTML]:new Set([U.ADDRESS,U.APPLET,U.AREA,U.ARTICLE,U.ASIDE,U.BASE,U.BASEFONT,U.BGSOUND,U.BLOCKQUOTE,U.BODY,U.BR,U.BUTTON,U.CAPTION,U.CENTER,U.COL,U.COLGROUP,U.DD,U.DETAILS,U.DIR,U.DIV,U.DL,U.DT,U.EMBED,U.FIELDSET,U.FIGCAPTION,U.FIGURE,U.FOOTER,U.FORM,U.FRAME,U.FRAMESET,U.H1,U.H2,U.H3,U.H4,U.H5,U.H6,U.HEAD,U.HEADER,U.HGROUP,U.HR,U.HTML,U.IFRAME,U.IMG,U.INPUT,U.LI,U.LINK,U.LISTING,U.MAIN,U.MARQUEE,U.MENU,U.META,U.NAV,U.NOEMBED,U.NOFRAMES,U.NOSCRIPT,U.OBJECT,U.OL,U.P,U.PARAM,U.PLAINTEXT,U.PRE,U.SCRIPT,U.SECTION,U.SELECT,U.SOURCE,U.STYLE,U.SUMMARY,U.TABLE,U.TBODY,U.TD,U.TEMPLATE,U.TEXTAREA,U.TFOOT,U.TH,U.THEAD,U.TITLE,U.TR,U.TRACK,U.UL,U.WBR,U.XMP]),[M.MATHML]:new Set([U.MI,U.MO,U.MN,U.MS,U.MTEXT,U.ANNOTATION_XML]),[M.SVG]:new Set([U.TITLE,U.FOREIGN_OBJECT,U.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},xa=new Set([U.H1,U.H2,U.H3,U.H4,U.H5,U.H6]);L.STYLE,L.SCRIPT,L.XMP,L.IFRAME,L.NOEMBED,L.NOFRAMES,L.PLAINTEXT;var x;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(x||(x={}));const Ve={DATA:x.DATA,RCDATA:x.RCDATA,RAWTEXT:x.RAWTEXT,SCRIPT_DATA:x.SCRIPT_DATA,PLAINTEXT:x.PLAINTEXT,CDATA_SECTION:x.CDATA_SECTION};function cE(e){return e>=T.DIGIT_0&&e<=T.DIGIT_9}function jn(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_Z}function lE(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_Z}function jt(e){return lE(e)||jn(e)}function Uo(e){return jt(e)||cE(e)}function xr(e){return e+32}function xl(e){return e===T.SPACE||e===T.LINE_FEED||e===T.TABULATION||e===T.FORM_FEED}function Ho(e){return xl(e)||e===T.SOLIDUS||e===T.GREATER_THAN_SIGN}function dE(e){return e===T.NULL?D.nullCharacterReference:e>1114111?D.characterReferenceOutsideUnicodeRange:ml(e)?D.surrogateCharacterReference:gl(e)?D.noncharacterCharacterReference:pl(e)||e===T.CARRIAGE_RETURN?D.controlCharacterReference:null}class fE{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=x.DATA,this.returnState=x.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new K1(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Tl(El,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(D.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(D.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=dE(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ye.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ye.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ye.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ye.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(bl(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(D.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Rn(t.tagName),t.type===ye.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(D.endTagWithAttributes),t.selfClosing&&this._err(D.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ye.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ye.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ye.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ye.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=xl(t)?ye.WHITESPACE_CHARACTER:t===T.NULL?ye.NULL_CHARACTER:ye.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ye.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=x.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Bt.Attribute:Bt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===x.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case x.DATA:{this._stateData(t);break}case x.RCDATA:{this._stateRcdata(t);break}case x.RAWTEXT:{this._stateRawtext(t);break}case x.SCRIPT_DATA:{this._stateScriptData(t);break}case x.PLAINTEXT:{this._statePlaintext(t);break}case x.TAG_OPEN:{this._stateTagOpen(t);break}case x.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case x.TAG_NAME:{this._stateTagName(t);break}case x.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case x.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case x.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case x.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case x.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case x.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case x.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case x.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case x.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case x.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case x.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case x.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case x.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case x.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case x.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case x.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case x.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case x.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case x.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case x.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case x.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case x.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case x.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case x.BOGUS_COMMENT:{this._stateBogusComment(t);break}case x.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case x.COMMENT_START:{this._stateCommentStart(t);break}case x.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case x.COMMENT:{this._stateComment(t);break}case x.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case x.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case x.COMMENT_END:{this._stateCommentEnd(t);break}case x.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case x.DOCTYPE:{this._stateDoctype(t);break}case x.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case x.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case x.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case x.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case x.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case x.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case x.CDATA_SECTION:{this._stateCdataSection(t);break}case x.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case x.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case x.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case x.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=x.TAG_OPEN;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitCodePoint(t);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case T.AMPERSAND:{this._startCharacterReference();break}case T.LESS_THAN_SIGN:{this.state=x.RCDATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(je);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case T.LESS_THAN_SIGN:{this.state=x.RAWTEXT_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(je);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(je);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(je);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(jt(t))this._createStartTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case T.EXCLAMATION_MARK:{this.state=x.MARKUP_DECLARATION_OPEN;break}case T.SOLIDUS:{this.state=x.END_TAG_OPEN;break}case T.QUESTION_MARK:{this._err(D.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t);break}case T.EOF:{this._err(D.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=x.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(jt(t))this._createEndTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case T.GREATER_THAN_SIGN:{this._err(D.missingEndTagName),this.state=x.DATA;break}case T.EOF:{this._err(D.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.tagName+=je;break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(jn(t)?xr(t):t)}}_stateRcdataLessThanSign(t){t===T.SOLIDUS?this.state=x.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){jt(t)?(this.state=x.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=x.BEFORE_ATTRIBUTE_NAME,!1;case T.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=x.SELF_CLOSING_START_TAG,!1;case T.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=x.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===T.SOLIDUS?this.state=x.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){jt(t)?(this.state=x.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case T.SOLIDUS:{this.state=x.SCRIPT_DATA_END_TAG_OPEN;break}case T.EXCLAMATION_MARK:{this.state=x.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=x.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){jt(t)?(this.state=x.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(je);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(je);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(je);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===T.SOLIDUS?this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:jt(t)?(this._emitChars("<"),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){jt(t)?(this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ut.SCRIPT,!1)&&Ho(this.preprocessor.peek(ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(je);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(je);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(je);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===T.SOLIDUS?(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ut.SCRIPT,!1)&&Ho(this.preprocessor.peek(ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._err(D.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=x.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this._leaveAttrName(),this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._leaveAttrName(),this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:{this._err(D.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.name+=je;break}default:this.currentAttr.name+=String.fromCodePoint(jn(t)?xr(t):t)}}_stateAfterAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case T.EQUALS_SIGN:{this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{this.state=x.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this.state=x.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingAttributeValue),this.state=x.DATA,this.emitCurrentTagToken();break}default:this.state=x.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case T.QUOTATION_MARK:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=je;break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case T.APOSTROPHE:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=je;break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=je;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:case T.EQUALS_SIGN:case T.GRAVE_ACCENT:{this._err(D.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this._leaveAttrValue(),this.state=x.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBetweenAttributes),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case T.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.unexpectedSolidusInTag),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case T.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.data+=je;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ut.DASH_DASH,!0)?(this._createCommentToken(ut.DASH_DASH.length+1),this.state=x.COMMENT_START):this._consumeSequenceIfMatch(ut.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ut.DOCTYPE.length+1),this.state=x.DOCTYPE):this._consumeSequenceIfMatch(ut.CDATA_START,!0)?this.inForeignNode?this.state=x.CDATA_SECTION:(this._err(D.cdataInHtmlContent),this._createCommentToken(ut.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=x.BOGUS_COMMENT):this._ensureHibernation()||(this._err(D.incorrectlyOpenedComment),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_START_DASH;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=x.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=x.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_END_DASH;break}case T.LESS_THAN_SIGN:{n.data+="<",this.state=x.COMMENT_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.data+=je;break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case T.EXCLAMATION_MARK:{n.data+="!",this.state=x.COMMENT_LESS_THAN_SIGN_BANG;break}case T.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=x.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=x.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==T.GREATER_THAN_SIGN&&t!==T.EOF&&this._err(D.nestedComment),this.state=x.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case T.EXCLAMATION_MARK:{this.state=x.COMMENT_END_BANG;break}case T.HYPHEN_MINUS:{n.data+="-";break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{n.data+="--!",this.state=x.COMMENT_END_DASH;break}case T.GREATER_THAN_SIGN:{this._err(D.incorrectlyClosedComment),this.state=x.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=x.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case T.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBeforeDoctypeName),this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(jn(t))this._createDoctypeToken(String.fromCharCode(xr(t))),this.state=x.DOCTYPE_NAME;else switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.NULL:{this._err(D.unexpectedNullCharacter),this._createDoctypeToken(je),this.state=x.DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=x.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.AFTER_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.name+=je;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(jn(t)?xr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ut.PUBLIC,!1)?this.state=x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ut.SYSTEM,!1)?this.state=x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(D.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=je;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case T.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=je;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.QUOTATION_MARK:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=je;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case T.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=je;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.NULL:{this._err(D.unexpectedNullCharacter);break}case T.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case T.RIGHT_SQUARE_BRACKET:{this.state=x.CDATA_SECTION_BRACKET;break}case T.EOF:{this._err(D.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===T.RIGHT_SQUARE_BRACKET?this.state=x.CDATA_SECTION_END:(this._emitChars("]"),this.state=x.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case T.GREATER_THAN_SIGN:{this.state=x.DATA;break}case T.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=x.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(T.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Uo(this.preprocessor.peek(1))?x.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Uo(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===T.SEMICOLON&&this._err(D.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const _l=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),jo=new Set([..._l,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Dr=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),hE=new Set([...Dr,l.OL,l.UL]),mE=new Set([...Dr,l.BUTTON]),zo=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),$o=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),pE=new Set([l.TR,l.TEMPLATE,l.HTML]),gE=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),bE=new Set([l.TABLE,l.TEMPLATE,l.HTML]),EE=new Set([l.TD,l.TH]);class TE{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==M.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(xa,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(EE,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(bE,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(gE,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(pE,M.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===l.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case M.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case M.SVG:{if($o.has(i))return!1;break}case M.MATHML:{if(zo.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Dr)}hasInListItemScope(t){return this.hasInDynamicScope(t,hE)}hasInButtonScope(t){return this.hasInDynamicScope(t,mE)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case M.HTML:{if(xa.has(n))return!0;if(Dr.has(n))return!1;break}case M.SVG:{if($o.has(n))return!1;break}case M.MATHML:{if(zo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;_l.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;jo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&jo.has(this.currentTagId);)this.pop()}}const Mi=3;var kt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(kt||(kt={}));const Vo={type:kt.Marker};class yE{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===kt.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const d=this.treeAdapter.getAttrList(c);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Mi)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Mi)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=Mi&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Vo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:kt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:kt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Vo);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===kt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===kt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===kt.Element&&n.element===t)}}const zt={createDocument(){return{nodeName:"#document",mode:pt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};zt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(zt.isTextNode(n)){n.value+=t;return}}zt.appendChild(e,zt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&zt.isTextNode(r)?r.value+=t:zt.insertBefore(e,zt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Sl="html",xE="about:legacy-compat",_E="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Cl=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],SE=[...Cl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],CE=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Il=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],IE=[...Il,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Wo(e,t){return t.some(n=>e.startsWith(n))}function AE(e){return e.name===Sl&&e.publicId===null&&(e.systemId===null||e.systemId===xE)}function wE(e){if(e.name!==Sl)return pt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===_E)return pt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),CE.has(n))return pt.QUIRKS;let r=t===null?SE:Cl;if(Wo(n,r))return pt.QUIRKS;if(r=t===null?Il:IE,Wo(n,r))return pt.LIMITED_QUIRKS}return pt.NO_QUIRKS}const Go={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},vE="definitionurl",kE="definitionURL",NE=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),RE=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),OE=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),LE=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function DE(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===rn.COLOR||r===rn.SIZE||r===rn.FACE)||LE.has(t)}function Al(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===vE){e.attrs[t].name=kE;break}}function wl(e){for(let t=0;t<e.attrs.length;t++){const n=NE.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function os(e){for(let t=0;t<e.attrs.length;t++){const n=RE.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function PE(e){const t=OE.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Rn(e.tagName))}function ME(e,t){return t===M.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function BE(e,t,n){if(t===M.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===rn.ENCODING){const i=n[r].value.toLowerCase();return i===Go.TEXT_HTML||i===Go.APPLICATION_XML}}return t===M.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function FE(e,t,n,r){return(!r||r===M.HTML)&&BE(e,t,n)||(!r||r===M.MATHML)&&ME(e,t)}const UE="hidden",HE=8,jE=3;var I;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(I||(I={}));const zE={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vl=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Yo={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:zt,onParseError:null};class qo{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=I.INITIAL,this.originalInsertionMode=I.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Yo,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new fE(this.options,this),this.activeFormattingElements=new yE(this.treeAdapter),this.fragmentContextID=r?Rn(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new TE(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Yo,...n};t??(t=r.treeAdapter.createElement(L.TEMPLATE,M.HTML,[]));const i=r.treeAdapter.createElement("documentmock",M.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(I.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:zE,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===M.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,M.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=I.TEXT}switchToPlaintextParsing(){this.insertionMode=I.TEXT,this.originalInsertionMode=I.IN_BODY,this.tokenizer.state=Ve.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===L.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=Ve.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=Ve.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=Ve.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=Ve.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,M.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,M.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(L.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===ye.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===L.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===M.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&!this._isIntegrationPoint(r,n,M.HTML)}_processToken(t){switch(t.type){case ye.CHARACTER:{this.onCharacter(t);break}case ye.NULL_CHARACTER:{this.onNullCharacter(t);break}case ye.COMMENT:{this.onComment(t);break}case ye.DOCTYPE:{this.onDoctype(t);break}case ye.START_TAG:{this._processStartTag(t);break}case ye.END_TAG:{this.onEndTag(t);break}case ye.EOF:{this.onEof(t);break}case ye.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return FE(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===kt.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=I.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=I.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=I.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=I.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=I.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=I.IN_TABLE;return}case l.BODY:{this.insertionMode=I.IN_BODY;return}case l.FRAMESET:{this.insertionMode=I.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?I.AFTER_HEAD:I.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=I.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=I.IN_HEAD;return}break}}this.insertionMode=I.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=I.IN_SELECT_IN_TABLE;return}}this.insertionMode=I.IN_SELECT}_isElementCausesFosterParenting(t){return vl.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return uE[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Ey(this,t);return}switch(this.insertionMode){case I.INITIAL:{Bn(this,t);break}case I.BEFORE_HTML:{Gn(this,t);break}case I.BEFORE_HEAD:{Yn(this,t);break}case I.IN_HEAD:{qn(this,t);break}case I.IN_HEAD_NO_SCRIPT:{Xn(this,t);break}case I.AFTER_HEAD:{Qn(this,t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:{Nl(this,t);break}case I.TEXT:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Bi(this,t);break}case I.IN_TABLE_TEXT:{Ml(this,t);break}case I.IN_COLUMN_GROUP:{Pr(this,t);break}case I.AFTER_BODY:{Mr(this,t);break}case I.AFTER_AFTER_BODY:{kr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){by(this,t);return}switch(this.insertionMode){case I.INITIAL:{Bn(this,t);break}case I.BEFORE_HTML:{Gn(this,t);break}case I.BEFORE_HEAD:{Yn(this,t);break}case I.IN_HEAD:{qn(this,t);break}case I.IN_HEAD_NO_SCRIPT:{Xn(this,t);break}case I.AFTER_HEAD:{Qn(this,t);break}case I.TEXT:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Bi(this,t);break}case I.IN_COLUMN_GROUP:{Pr(this,t);break}case I.AFTER_BODY:{Mr(this,t);break}case I.AFTER_AFTER_BODY:{kr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){_a(this,t);return}switch(this.insertionMode){case I.INITIAL:case I.BEFORE_HTML:case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_TEMPLATE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{_a(this,t);break}case I.IN_TABLE_TEXT:{Fn(this,t);break}case I.AFTER_BODY:{XE(this,t);break}case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{QE(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case I.INITIAL:{KE(this,t);break}case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:{this._err(t,D.misplacedDoctype);break}case I.IN_TABLE_TEXT:{Fn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,D.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Ty(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Bn(this,t);break}case I.BEFORE_HTML:{JE(this,t);break}case I.BEFORE_HEAD:{eT(this,t);break}case I.IN_HEAD:{St(this,t);break}case I.IN_HEAD_NO_SCRIPT:{rT(this,t);break}case I.AFTER_HEAD:{aT(this,t);break}case I.IN_BODY:{nt(this,t);break}case I.IN_TABLE:{An(this,t);break}case I.IN_TABLE_TEXT:{Fn(this,t);break}case I.IN_CAPTION:{ty(this,t);break}case I.IN_COLUMN_GROUP:{ls(this,t);break}case I.IN_TABLE_BODY:{si(this,t);break}case I.IN_ROW:{oi(this,t);break}case I.IN_CELL:{iy(this,t);break}case I.IN_SELECT:{Ul(this,t);break}case I.IN_SELECT_IN_TABLE:{sy(this,t);break}case I.IN_TEMPLATE:{uy(this,t);break}case I.AFTER_BODY:{ly(this,t);break}case I.IN_FRAMESET:{dy(this,t);break}case I.AFTER_FRAMESET:{hy(this,t);break}case I.AFTER_AFTER_BODY:{py(this,t);break}case I.AFTER_AFTER_FRAMESET:{gy(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?yy(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Bn(this,t);break}case I.BEFORE_HTML:{ZE(this,t);break}case I.BEFORE_HEAD:{tT(this,t);break}case I.IN_HEAD:{nT(this,t);break}case I.IN_HEAD_NO_SCRIPT:{iT(this,t);break}case I.AFTER_HEAD:{sT(this,t);break}case I.IN_BODY:{ai(this,t);break}case I.TEXT:{WT(this,t);break}case I.IN_TABLE:{er(this,t);break}case I.IN_TABLE_TEXT:{Fn(this,t);break}case I.IN_CAPTION:{ny(this,t);break}case I.IN_COLUMN_GROUP:{ry(this,t);break}case I.IN_TABLE_BODY:{Sa(this,t);break}case I.IN_ROW:{Fl(this,t);break}case I.IN_CELL:{ay(this,t);break}case I.IN_SELECT:{Hl(this,t);break}case I.IN_SELECT_IN_TABLE:{oy(this,t);break}case I.IN_TEMPLATE:{cy(this,t);break}case I.AFTER_BODY:{zl(this,t);break}case I.IN_FRAMESET:{fy(this,t);break}case I.AFTER_FRAMESET:{my(this,t);break}case I.AFTER_AFTER_BODY:{kr(this,t);break}}}onEof(t){switch(this.insertionMode){case I.INITIAL:{Bn(this,t);break}case I.BEFORE_HTML:{Gn(this,t);break}case I.BEFORE_HEAD:{Yn(this,t);break}case I.IN_HEAD:{qn(this,t);break}case I.IN_HEAD_NO_SCRIPT:{Xn(this,t);break}case I.AFTER_HEAD:{Qn(this,t);break}case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{Dl(this,t);break}case I.TEXT:{GT(this,t);break}case I.IN_TABLE_TEXT:{Fn(this,t);break}case I.IN_TEMPLATE:{jl(this,t);break}case I.AFTER_BODY:case I.IN_FRAMESET:case I.AFTER_FRAMESET:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{cs(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===T.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.TEXT:case I.IN_COLUMN_GROUP:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{this._insertCharacters(t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:case I.AFTER_BODY:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{kl(this,t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Bi(this,t);break}case I.IN_TABLE_TEXT:{Pl(this,t);break}}}}function $E(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ll(e,t),n}function VE(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function WE(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=jE;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=GE(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function GE(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function YE(e,t,n){const r=e.treeAdapter.getTagName(t),i=Rn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function qE(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function us(e,t){for(let n=0;n<HE;n++){const r=$E(e,t);if(!r)break;const i=VE(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=WE(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&YE(e,s,a),qE(e,i,r)}}function _a(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function XE(e,t){e._appendCommentNode(t,e.openElements.items[0])}function QE(e,t){e._appendCommentNode(t,e.document)}function cs(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function KE(e,t){e._setDocumentType(t);const n=t.forceQuirks?pt.QUIRKS:wE(t);AE(t)||e._err(t,D.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=I.BEFORE_HTML}function Bn(e,t){e._err(t,D.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,pt.QUIRKS),e.insertionMode=I.BEFORE_HTML,e._processToken(t)}function JE(e,t){t.tagID===l.HTML?(e._insertElement(t,M.HTML),e.insertionMode=I.BEFORE_HEAD):Gn(e,t)}function ZE(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&Gn(e,t)}function Gn(e,t){e._insertFakeRootElement(),e.insertionMode=I.BEFORE_HEAD,e._processToken(t)}function eT(e,t){switch(t.tagID){case l.HTML:{nt(e,t);break}case l.HEAD:{e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD;break}default:Yn(e,t)}}function tT(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?Yn(e,t):e._err(t,D.endTagWithoutMatchingOpenElement)}function Yn(e,t){e._insertFakeElement(L.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD,e._processToken(t)}function St(e,t){switch(t.tagID){case l.HTML:{nt(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,Ve.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ve.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=I.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,Ve.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,Ve.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=I.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(I.IN_TEMPLATE);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:qn(e,t)}}function nT(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=I.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{qn(e,t);break}case l.TEMPLATE:{fn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function fn(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,D.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,D.endTagWithoutMatchingOpenElement)}function qn(e,t){e.openElements.pop(),e.insertionMode=I.AFTER_HEAD,e._processToken(t)}function rT(e,t){switch(t.tagID){case l.HTML:{nt(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{St(e,t);break}case l.NOSCRIPT:{e._err(t,D.nestedNoscriptInHead);break}default:Xn(e,t)}}function iT(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=I.IN_HEAD;break}case l.BR:{Xn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Xn(e,t){const n=t.type===ye.EOF?D.openElementsLeftAfterEof:D.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=I.IN_HEAD,e._processToken(t)}function aT(e,t){switch(t.tagID){case l.HTML:{nt(e,t);break}case l.BODY:{e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=I.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,M.HTML),e.insertionMode=I.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,D.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),St(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:Qn(e,t)}}function sT(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{Qn(e,t);break}case l.TEMPLATE:{fn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Qn(e,t){e._insertFakeElement(L.BODY,l.BODY),e.insertionMode=I.IN_BODY,ii(e,t)}function ii(e,t){switch(t.type){case ye.CHARACTER:{Nl(e,t);break}case ye.WHITESPACE_CHARACTER:{kl(e,t);break}case ye.COMMENT:{_a(e,t);break}case ye.START_TAG:{nt(e,t);break}case ye.END_TAG:{ai(e,t);break}case ye.EOF:{Dl(e,t);break}}}function kl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Nl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function oT(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function uT(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function cT(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=I.IN_FRAMESET)}function lT(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function dT(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),xa.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function fT(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function hT(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function mT(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function pT(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=Ve.PLAINTEXT}function gT(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function bT(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(L.A);n&&(us(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ET(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TT(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(us(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function xT(e,t){e.treeAdapter.getDocumentMode(e.document)!==pt.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=I.IN_TABLE}function Rl(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ol(e){const t=bl(e,rn.TYPE);return t!=null&&t.toLowerCase()===UE}function _T(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),Ol(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ST(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function CT(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function IT(e,t){t.tagName=L.IMG,t.tagID=l.IMG,Rl(e,t)}function AT(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ve.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=I.TEXT}function wT(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ve.RAWTEXT)}function vT(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ve.RAWTEXT)}function Xo(e,t){e._switchToTextParsing(t,Ve.RAWTEXT)}function kT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===I.IN_TABLE||e.insertionMode===I.IN_CAPTION||e.insertionMode===I.IN_TABLE_BODY||e.insertionMode===I.IN_ROW||e.insertionMode===I.IN_CELL?I.IN_SELECT_IN_TABLE:I.IN_SELECT}function NT(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function RT(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function OT(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,M.HTML)}function LT(e,t){e._reconstructActiveFormattingElements(),Al(t),os(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function DT(e,t){e._reconstructActiveFormattingElements(),wl(t),os(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function Qo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function nt(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{ET(e,t);break}case l.A:{bT(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{dT(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{lT(e,t);break}case l.LI:case l.DD:case l.DT:{mT(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Rl(e,t);break}case l.HR:{CT(e,t);break}case l.RB:case l.RTC:{RT(e,t);break}case l.RT:case l.RP:{OT(e,t);break}case l.PRE:case l.LISTING:{fT(e,t);break}case l.XMP:{wT(e,t);break}case l.SVG:{DT(e,t);break}case l.HTML:{oT(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{St(e,t);break}case l.BODY:{uT(e,t);break}case l.FORM:{hT(e,t);break}case l.NOBR:{TT(e,t);break}case l.MATH:{LT(e,t);break}case l.TABLE:{xT(e,t);break}case l.INPUT:{_T(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{ST(e,t);break}case l.IMAGE:{IT(e,t);break}case l.BUTTON:{gT(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{yT(e,t);break}case l.IFRAME:{vT(e,t);break}case l.SELECT:{kT(e,t);break}case l.OPTION:case l.OPTGROUP:{NT(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Xo(e,t);break}case l.FRAMESET:{cT(e,t);break}case l.TEXTAREA:{AT(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Xo(e,t):Qo(e,t);break}case l.PLAINTEXT:{pT(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:Qo(e,t)}}function PT(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=I.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function MT(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=I.AFTER_BODY,zl(e,t))}function BT(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function FT(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function UT(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(L.P,l.P),e._closePElement()}function HT(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function jT(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function zT(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function $T(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function VT(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(L.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function Ll(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function ai(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{us(e,t);break}case l.P:{UT(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{BT(e,t);break}case l.LI:{HT(e);break}case l.DD:case l.DT:{jT(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{zT(e);break}case l.BR:{VT(e);break}case l.BODY:{PT(e,t);break}case l.HTML:{MT(e,t);break}case l.FORM:{FT(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{$T(e,t);break}case l.TEMPLATE:{fn(e,t);break}default:Ll(e,t)}}function Dl(e,t){e.tmplInsertionModeStack.length>0?jl(e,t):cs(e,t)}function WT(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function GT(e,t){e._err(t,D.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Bi(e,t){if(vl.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=I.IN_TABLE_TEXT,t.type){case ye.CHARACTER:{Ml(e,t);break}case ye.WHITESPACE_CHARACTER:{Pl(e,t);break}}else lr(e,t)}function YT(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=I.IN_CAPTION}function qT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=I.IN_COLUMN_GROUP}function XT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.COLGROUP,l.COLGROUP),e.insertionMode=I.IN_COLUMN_GROUP,ls(e,t)}function QT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=I.IN_TABLE_BODY}function KT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.TBODY,l.TBODY),e.insertionMode=I.IN_TABLE_BODY,si(e,t)}function JT(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ZT(e,t){Ol(t)?e._appendElement(t,M.HTML):lr(e,t),t.ackSelfClosing=!0}function ey(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function An(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{KT(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{St(e,t);break}case l.COL:{XT(e,t);break}case l.FORM:{ey(e,t);break}case l.TABLE:{JT(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{QT(e,t);break}case l.INPUT:{ZT(e,t);break}case l.CAPTION:{YT(e,t);break}case l.COLGROUP:{qT(e,t);break}default:lr(e,t)}}function er(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{fn(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:lr(e,t)}}function lr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ii(e,t),e.fosterParentingEnabled=n}function Pl(e,t){e.pendingCharacterTokens.push(t)}function Ml(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Fn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)lr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Bl=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function ty(e,t){const n=t.tagID;Bl.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,An(e,t)):nt(e,t)}function ny(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,n===l.TABLE&&er(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:ai(e,t)}}function ls(e,t){switch(t.tagID){case l.HTML:{nt(e,t);break}case l.COL:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{St(e,t);break}default:Pr(e,t)}}function ry(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case l.TEMPLATE:{fn(e,t);break}case l.COL:break;default:Pr(e,t)}}function Pr(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE,e._processToken(t))}function si(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=I.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(L.TR,l.TR),e.insertionMode=I.IN_ROW,oi(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,An(e,t));break}default:An(e,t)}}function Sa(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,er(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:er(e,t)}}function oi(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=I.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,si(e,t));break}default:An(e,t)}}function Fl(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,Sa(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,Sa(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:er(e,t)}}function iy(e,t){const n=t.tagID;Bl.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),oi(e,t)):nt(e,t)}function ay(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Fl(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:ai(e,t)}}function Ul(e,t){switch(t.tagID){case l.HTML:{nt(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{St(e,t);break}}}function Hl(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{fn(e,t);break}}}function sy(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ul(e,t)}function oy(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Hl(e,t)}function uy(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{St(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=I.IN_TABLE,e.insertionMode=I.IN_TABLE,An(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=I.IN_COLUMN_GROUP,e.insertionMode=I.IN_COLUMN_GROUP,ls(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=I.IN_TABLE_BODY,e.insertionMode=I.IN_TABLE_BODY,si(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=I.IN_ROW,e.insertionMode=I.IN_ROW,oi(e,t);break}default:e.tmplInsertionModeStack[0]=I.IN_BODY,e.insertionMode=I.IN_BODY,nt(e,t)}}function cy(e,t){t.tagID===l.TEMPLATE&&fn(e,t)}function jl(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):cs(e,t)}function ly(e,t){t.tagID===l.HTML?nt(e,t):Mr(e,t)}function zl(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=I.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Mr(e,t)}function Mr(e,t){e.insertionMode=I.IN_BODY,ii(e,t)}function dy(e,t){switch(t.tagID){case l.HTML:{nt(e,t);break}case l.FRAMESET:{e._insertElement(t,M.HTML);break}case l.FRAME:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{St(e,t);break}}}function fy(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=I.AFTER_FRAMESET))}function hy(e,t){switch(t.tagID){case l.HTML:{nt(e,t);break}case l.NOFRAMES:{St(e,t);break}}}function my(e,t){t.tagID===l.HTML&&(e.insertionMode=I.AFTER_AFTER_FRAMESET)}function py(e,t){t.tagID===l.HTML?nt(e,t):kr(e,t)}function kr(e,t){e.insertionMode=I.IN_BODY,ii(e,t)}function gy(e,t){switch(t.tagID){case l.HTML:{nt(e,t);break}case l.NOFRAMES:{St(e,t);break}}}function by(e,t){t.chars=je,e._insertCharacters(t)}function Ey(e,t){e._insertCharacters(t),e.framesetOk=!1}function $l(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Ty(e,t){if(DE(t))$l(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?Al(t):r===M.SVG&&(PE(t),wl(t)),os(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function yy(e,t){if(t.tagID===l.P||t.tagID===l.BR){$l(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}L.AREA,L.BASE,L.BASEFONT,L.BGSOUND,L.BR,L.COL,L.EMBED,L.FRAME,L.HR,L.IMG,L.INPUT,L.KEYGEN,L.LINK,L.META,L.PARAM,L.SOURCE,L.TRACK,L.WBR;const xy=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ko={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Vl(e,t){const n=Ry(e),r=fl("type",{handlers:{root:_y,element:Sy,text:Cy,comment:Gl,doctype:Iy,raw:wy},unknown:vy}),i={parser:n?new qo(Ko):qo.getFragmentParser(void 0,Ko),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),On(i,Ot());const a=n?i.parser.document:i.parser.getFragment(),s=L1(a,{file:i.options.file});return i.stitches&&ri(s,"comment",function(o,u,c){const d=o;if(d.value.stitch&&c&&u!==void 0){const f=c.children;return f[u]=d.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Wl(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function _y(e,t){Wl(e.children,t)}function Sy(e,t){ky(e,t),Wl(e.children,t),Ny(e,t)}function Cy(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ye.CHARACTER,chars:e.value,location:dr(e)};On(t,Ot(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Iy(e,t){const n={type:ye.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:dr(e)};On(t,Ot(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ay(e,t){t.stitches=!0;const n=Oy(e);if("children"in e&&"children"in n){const r=Vl({type:"root",children:e.children},t.options);n.children=r.children}Gl({type:"comment",value:{stitch:n}},t)}function Gl(e,t){const n=e.value,r={type:ye.COMMENT,data:n,location:dr(e)};On(t,Ot(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function wy(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Yl(t,Ot(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function vy(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Ay(n,t);else{let r="";throw xy.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function On(e,t){Yl(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ve.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Yl(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function ky(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ve.PLAINTEXT)return;On(t,Ot(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:tn.html;i===tn.html&&n==="svg"&&(i=tn.svg);const a=F1({...e,children:[]},{space:i===tn.svg?"svg":"html"}),s={type:ye.START_TAG,tagName:n,tagID:Rn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:dr(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Ny(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&G1.includes(n)||t.parser.tokenizer.state===Ve.PLAINTEXT)return;On(t,Kr(e));const r={type:ye.END_TAG,tagName:n,tagID:Rn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:dr(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ve.RCDATA||t.parser.tokenizer.state===Ve.RAWTEXT||t.parser.tokenizer.state===Ve.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ve.DATA)}function Ry(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function dr(e){const t=Ot(e)||{line:void 0,column:void 0,offset:void 0},n=Kr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Oy(e){return"children"in e?In({...e,children:[]}):In(e)}function ds(e){return function(t,n){return Vl(t,{...e,file:n})}}const fs=({children:e})=>b.jsx("div",{className:"p-3",children:e}),Ly=({content:e,metaData:t})=>b.jsx(fs,{children:b.jsx("div",{className:"flex justify-end",children:b.jsx("div",{className:`ml-auto w-fit max-w-full px-4 py-3 rounded-2xl rounded-br-md transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"chatsystem-user-message chatsystem-primary-background text-white shadow-sm"}`,children:b.jsx("div",{children:b.jsx(is,{rehypePlugins:[ds],children:e&&e})})})})});function Jo(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Dy(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Py(e,t,n){const i=ti((n||{}).ignore||[]),a=My(t);let s=-1;for(;++s<a.length;)ol(e,"text",o);function o(c,d){let f=-1,m;for(;++f<d.length;){const h=d[f],g=m?m.children:void 0;if(i(h,g?g.indexOf(h):void 0,m))return;m=h}if(m)return u(c,d)}function u(c,d){const f=d[d.length-1],m=a[s][0],h=a[s][1];let g=0;const v=f.children.indexOf(c);let A=!1,k=[];m.lastIndex=0;let p=m.exec(c.value);for(;p;){const O=p.index,S={index:p.index,input:p.input,stack:[...d,c]};let w=h(...p,S);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?m.lastIndex=O+1:(g!==O&&k.push({type:"text",value:c.value.slice(g,O)}),Array.isArray(w)?k.push(...w):w&&k.push(w),g=O+p[0].length,A=!0),!m.global)break;p=m.exec(c.value)}return A?(g<c.value.length&&k.push({type:"text",value:c.value.slice(g)}),f.children.splice(v,1,...k)):k=[c],v+k.length}}function My(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([By(i[0]),Fy(i[1])])}return t}function By(e){return typeof e=="string"?new RegExp(Dy(e),"g"):e}function Fy(e){return typeof e=="function"?e:function(){return e}}const Fi="phrasing",Ui=["autolink","link","image","label"];function Uy(){return{transforms:[Gy],enter:{literalAutolink:jy,literalAutolinkEmail:Hi,literalAutolinkHttp:Hi,literalAutolinkWww:Hi},exit:{literalAutolink:Wy,literalAutolinkEmail:Vy,literalAutolinkHttp:zy,literalAutolinkWww:$y}}}function Hy(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fi,notInConstruct:Ui},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fi,notInConstruct:Ui},{character:":",before:"[ps]",after:"\\/",inConstruct:Fi,notInConstruct:Ui}]}}function jy(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Hi(e){this.config.enter.autolinkProtocol.call(this,e)}function zy(e){this.config.exit.autolinkProtocol.call(this,e)}function $y(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Vy(e){this.config.exit.autolinkEmail.call(this,e)}function Wy(e){this.exit(e)}function Gy(e){Py(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Yy],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qy]],{ignore:["link","linkReference"]})}function Yy(e,t,n,r,i){let a="";if(!ql(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Xy(n)))return!1;const s=Qy(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function qy(e,t,n,r){return!ql(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Xy(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Qy(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Jo(e,"(");let a=Jo(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function ql(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||un(n)||Jr(n))&&(!t||n!==47)}Xl.peek=a2;function Ky(){this.buffer()}function Jy(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Zy(){this.buffer()}function e2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function t2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_t(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n2(e){this.exit(e)}function r2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_t(this.sliceSerialize(e)).toLowerCase(),n.label=t}function i2(e){this.exit(e)}function a2(){return"["}function Xl(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function s2(){return{enter:{gfmFootnoteCallString:Ky,gfmFootnoteCall:Jy,gfmFootnoteDefinitionLabelString:Zy,gfmFootnoteDefinition:e2},exit:{gfmFootnoteCallString:t2,gfmFootnoteCall:n2,gfmFootnoteDefinitionLabelString:r2,gfmFootnoteDefinition:i2}}}function o2(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Xl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
|
|
62
|
+
`:" ")+a.indentLines(a.containerFlow(r,o.current()),t?Ql:u2))),c(),u}}function u2(e,t,n){return t===0?e:Ql(e,t,n)}function Ql(e,t,n){return(n?"":" ")+e}const c2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Kl.peek=m2;function l2(){return{canContainEols:["delete"],enter:{strikethrough:f2},exit:{strikethrough:h2}}}function d2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:c2}],handlers:{delete:Kl}}}function f2(e){this.enter({type:"delete",children:[]},e)}function h2(e){this.exit(e)}function Kl(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function m2(){return"~"}function p2(e){return e.length}function g2(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||p2,a=[],s=[],o=[],u=[];let c=0,d=-1;for(;++d<e.length;){const y=[],v=[];let A=-1;for(e[d].length>c&&(c=e[d].length);++A<e[d].length;){const k=b2(e[d][A]);if(n.alignDelimiters!==!1){const p=i(k);v[A]=p,(u[A]===void 0||p>u[A])&&(u[A]=p)}y.push(k)}s[d]=y,o[d]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)a[f]=Zo(r[f]);else{const y=Zo(r);for(;++f<c;)a[f]=y}f=-1;const m=[],h=[];for(;++f<c;){const y=a[f];let v="",A="";y===99?(v=":",A=":"):y===108?v=":":y===114&&(A=":");let k=n.alignDelimiters===!1?1:Math.max(1,u[f]-v.length-A.length);const p=v+"-".repeat(k)+A;n.alignDelimiters!==!1&&(k=v.length+k+A.length,k>u[f]&&(u[f]=k),h[f]=k),m[f]=p}s.splice(1,0,m),o.splice(1,0,h),d=-1;const g=[];for(;++d<s.length;){const y=s[d],v=o[d];f=-1;const A=[];for(;++f<c;){const k=y[f]||"";let p="",O="";if(n.alignDelimiters!==!1){const S=u[f]-(v[f]||0),w=a[f];w===114?p=" ".repeat(S):w===99?S%2?(p=" ".repeat(S/2+.5),O=" ".repeat(S/2-.5)):(p=" ".repeat(S/2),O=p):O=" ".repeat(S)}n.delimiterStart!==!1&&!f&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||f)&&A.push(" "),n.alignDelimiters!==!1&&A.push(p),A.push(k),n.alignDelimiters!==!1&&A.push(O),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&A.push("|")}g.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return g.join(`
|
|
63
|
+
`)}function b2(e){return e==null?"":String(e)}function Zo(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function E2(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),T2);return i(),s}function T2(e,t,n){return">"+(n?"":" ")+e}function y2(e,t){return eu(e,t.inConstruct,!0)&&!eu(e,t.notInConstruct,!1)}function eu(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function tu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
64
|
+
`&&y2(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
65
|
+
`}function x2(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function _2(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function S2(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function C2(e,t,n,r){const i=S2(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(_2(e,n)){const f=n.enter("codeIndented"),m=n.indentLines(a,I2);return f(),m}const o=n.createTracker(r),u=i.repeat(Math.max(x2(a,i)+1,3)),c=n.enter("codeFenced");let d=o.move(u);if(e.lang){const f=n.enter(`codeFencedLang${s}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
|
|
66
66
|
`,encode:["`"],...o.current()})),f()}return d+=o.move(`
|
|
67
67
|
`),a&&(d+=o.move(a+`
|
|
68
|
-
`)),d+=o.move(u),c(),d}function
|
|
69
|
-
`,...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),s(),c}function
|
|
68
|
+
`)),d+=o.move(u),c(),d}function I2(e,t,n){return(n?"":" ")+e}function hs(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function A2(e,t,n,r){const i=hs(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
69
|
+
`,...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),s(),c}function w2(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Jl.peek=v2;function Jl(e,t,n,r){const i=w2(n),a=n.enter("emphasis"),s=n.createTracker(r);let o=s.move(i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i),a(),o}function v2(e,t,n){return n.options.emphasis||"*"}function k2(e,t){let n=!1;return ri(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ma}),!!((!e.depth||e.depth<3)&&Qa(e)&&(t.options.setext||n))}function N2(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(k2(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),m=n.containerPhrasing(e,{...a.current(),before:`
|
|
70
70
|
`,after:`
|
|
71
|
-
`});return f(),d(),
|
|
72
|
-
`+(i===1?"=":"-").repeat(
|
|
71
|
+
`});return f(),d(),m+`
|
|
72
|
+
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
|
|
73
73
|
`))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
74
|
-
`,...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),o(),c}
|
|
75
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:
|
|
76
|
-
`))}function u(h,b,E,v){const C=E.enter("tableCell"),A=E.enter("phrasing"),N=E.containerPhrasing(h,{...v,before:a,after:a});return A(),C(),N}function c(h,b){return M2(h,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function d(h,b,E){const v=h.children;let C=-1;const A=[],N=b.enter("table");for(;++C<v.length;)A[C]=f(v[C],b,E);return N(),A}function f(h,b,E){const v=h.children;let C=-1;const A=[],N=b.enter("tableRow");for(;++C<v.length;)A[C]=u(v[C],h,b,E);return N(),A}function p(h,b,E){let v=Mc.inlineCode(h,b,E);return E.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function _y(){return{exit:{taskListCheckValueChecked:Po,taskListCheckValueUnchecked:Po,paragraph:Ay}}}function Cy(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:wy}}}function Po(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Ay(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function wy(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let u=Mc.listItem(e,t,n,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+s}}function Iy(){return[a2(),w2(),N2(),gy(),_y()]}function vy(e){return{extensions:[s2(),I2(e),R2(),Sy(e),Cy()]}}const ky={tokenize:Py,partial:!0},Bc={tokenize:My,partial:!0},Fc={tokenize:By,partial:!0},Hc={tokenize:Fy,partial:!0},Ny={tokenize:Hy,partial:!0},Uc={name:"wwwAutolink",tokenize:Ly,previous:zc},jc={name:"protocolAutolink",tokenize:Dy,previous:$c},Bt={name:"emailAutolink",tokenize:Oy,previous:Yc},Ot={};function Ry(){return{text:Ot}}let Xt=48;for(;Xt<123;)Ot[Xt]=Bt,Xt++,Xt===58?Xt=65:Xt===91&&(Xt=97);Ot[43]=Bt;Ot[45]=Bt;Ot[46]=Bt;Ot[95]=Bt;Ot[72]=[Bt,jc];Ot[104]=[Bt,jc];Ot[87]=[Bt,Uc];Ot[119]=[Bt,Uc];function Oy(e,t,n){const r=this;let i,a;return s;function s(f){return!ua(f)||!Yc.call(r,r.previous)||Za(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return ua(f)?(e.consume(f),o):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(Ny,d,c)(f):f===45||f===95||Qe(f)?(a=!0,e.consume(f),u):d(f)}function c(f){return e.consume(f),i=!0,u}function d(f){return a&&i&&rt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function Ly(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!zc.call(r,r.previous)||Za(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ky,e.attempt(Bc,e.attempt(Fc,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function Dy(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&$c.call(r,r.previous)&&!Za(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(rt(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?c:(a=!0,u)):n(f)}function c(f){return f===null||Tr(f)||Pe(f)||rn(f)||jr(f)?n(f):e.attempt(Bc,e.attempt(Fc,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function Py(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function My(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(Hc,u,o)(c):c===null||Pe(c)||rn(c)||c!==45&&jr(c)?u(c):(a=!0,e.consume(c),s)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!a?n(c):t(c)}}function By(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Hc,t,a)(s):s===null||Pe(s)||rn(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function Fy(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Pe(o)||rn(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Pe(o)||rn(o)?t(o):r(o)}function a(o){return rt(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):rt(o)?(e.consume(o),s):n(o)}}function Hy(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Qe(a)?n(a):t(a)}}function zc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Pe(e)}function $c(e){return!rt(e)}function Yc(e){return!(e===47||ua(e))}function ua(e){return e===43||e===45||e===46||e===95||Qe(e)}function Za(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Uy={tokenize:Wy,partial:!0};function jy(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gy,continuation:{tokenize:Vy},exit:qy}},text:{91:{name:"gfmFootnoteCall",tokenize:Yy},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zy,resolveTo:$y}}}}function zy(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const c=xt(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function $y(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Yy(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!s||f===null||f===91||Pe(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(xt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Pe(f)||(s=!0),a++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function Gy(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(b)}function d(b){if(s>999||b===93&&!o||b===null||b===91||Pe(b))return n(b);if(b===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return a=xt(r.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Pe(b)||(o=!0),s++,e.consume(b),b===92?f:d}function f(b){return b===91||b===92||b===93?(e.consume(b),s++,d):d(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),Ce(e,h,"gfmFootnoteDefinitionWhitespace")):n(b)}function h(b){return t(b)}}function Vy(e,t,n){return e.check(Jn,t,e.attempt(Uy,t,n))}function qy(e){e.exit("gfmFootnoteDefinition")}function Wy(e,t,n){const r=this;return Ce(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function Xy(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",d,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&ct(p,p.length,0,zr(h,s.slice(c+1,u),o)),ct(p,p.length,0,[["exit",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",d,o]]),ct(s,c-1,u-c+3,p),u=c+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const c=this.previous,d=this.events;let f=0;return p;function p(b){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(b):(s.enter("strikethroughSequenceTemporary"),h(b))}function h(b){const E=yr(c);if(b===126)return f>1?u(b):(s.consume(b),f++,h);if(f<2&&!n)return u(b);const v=s.exit("strikethroughSequenceTemporary"),C=yr(b);return v._open=!C||C===2&&!!E,v._close=!E||E===2&&!!C,o(b)}}}class Qy{constructor(){this.map=[]}add(t,n,r){Ky(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function Ky(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Jy(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Zy(){return{flow:{null:{name:"table",tokenize:ex,resolveAll:tx}}}}function ex(e,t,n){const r=this;let i=0,a=0,s;return o;function o(I){let j=r.events.length-1;for(;j>-1;){const F=r.events[j][1].type;if(F==="lineEnding"||F==="linePrefix")j--;else break}const z=j>-1?r.events[j][1].type:null,U=z==="tableHead"||z==="tableRow"?k:u;return U===k&&r.parser.lazy[r.now().line]?n(I):U(I)}function u(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(s=!0,a+=1),d(I)}function d(I){return I===null?n(I):ue(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),h):n(I):be(I)?Ce(e,d,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(I)))}function f(I){return I===null||I===124||Pe(I)?(e.exit("data"),d(I)):(e.consume(I),I===92?p:f)}function p(I){return I===92||I===124?(e.consume(I),f):f(I)}function h(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,be(I)?Ce(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):b(I))}function b(I){return I===45||I===58?v(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),E):w(I)}function E(I){return be(I)?Ce(e,v,"whitespace")(I):v(I)}function v(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),C):I===45?(a+=1,C(I)):I===null||ue(I)?L(I):w(I)}function C(I){return I===45?(e.enter("tableDelimiterFiller"),A(I)):w(I)}function A(I){return I===45?(e.consume(I),A):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(I))}function N(I){return be(I)?Ce(e,L,"whitespace")(I):L(I)}function L(I){return I===124?b(I):I===null||ue(I)?!s||i!==a?w(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):w(I)}function w(I){return n(I)}function k(I){return e.enter("tableRow"),Y(I)}function Y(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),Y):I===null||ue(I)?(e.exit("tableRow"),t(I)):be(I)?Ce(e,Y,"whitespace")(I):(e.enter("data"),J(I))}function J(I){return I===null||I===124||Pe(I)?(e.exit("data"),Y(I)):(e.consume(I),I===92?X:J)}function X(I){return I===92||I===124?(e.consume(I),J):J(I)}}function tx(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,c,d,f;const p=new Qy;for(;++n<e.length;){const h=e[n],b=h[1];h[0]==="enter"?b.type==="tableHead"?(o=!1,u!==0&&(Mo(p,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",d,t]])),i=b.type==="tableDelimiterRow"?2:d?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=fr(p,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=fr(p,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(o=!0,u=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],f=fr(p,t,a,i,n,f)):s[1]!==0&&(f=fr(p,t,s,i,n,f)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Mo(p,t,u,c,d),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Jy(t.events,n))}return e}function fr(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},pn(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=pn(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=pn(t.events,n[2]),d=pn(t.events,n[3]),f={type:o,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,E=n[3]-n[2]-1;e.add(b,E,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},pn(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Mo(e,t,n,r,i){const a=[],s=pn(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function pn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const nx={name:"tasklistCheck",tokenize:ix};function rx(){return{text:{91:nx}}}function ix(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return Pe(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return ue(u)?t(u):be(u)?e.check({tokenize:ax},t,n)(u):n(u)}}function ax(e,t,n){return Ce(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function sx(e){return gl([Ry(),jy(),Xy(e),Zy(),rx()])}const ox={};function ux(e){const t=this,n=e||ox,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(sx(n)),a.push(Iy()),s.push(vy(n))}const Bo=new Set;function lx(e){return Bo.has(e)?!1:(Bo.add(e),!0)}function cx(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:i=0,dedupeKey:a}={}){const s=S.useRef(!1),o=S.useRef();return S.useCallback(c=>{if(o.current?.(),o.current=void 0,!c||s.current)return;const d=t??(n?document.querySelector(n):null),f=()=>{a&&!lx(a)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){f();return}const p=new IntersectionObserver((h,b)=>{h[0]?.isIntersecting&&(b.disconnect(),f())},{root:d,rootMargin:r,threshold:i});p.observe(c),o.current=()=>p.disconnect()},[t,n,r,i,a,e])}function dx(e,t){if(!t||!e)return e;const n=t.replace(/^[?&]+/,""),[r,i]=e.split("#"),a=r.includes("?")?"&":"?",s=`${r}${a}${n}`;return i?`${s}#${i}`:s}function fx({href:e="",queryParamToAppend:t="",children:n,context:r,onClick:i,seenRootEl:a,...s}){const{companySettings:o}=S.useContext(Nt),u=Mr(),c=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),d=u,f=dx(e,t||o.api.tracking?.queryParamToAppend||""),p=()=>{const A=`${d}/tracking/clicked/${r.appToken}`,N={discussionId:r.discussionId,urlClicked:e};try{fetch(A,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(N),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},h=()=>{const A=`${d}/tracking/displayed/${r.appToken}`,N={discussionId:r.discussionId,urlSeen:e};try{fetch(A,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(N),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},b=S.useMemo(()=>`${r.appToken}::${r.discussionId}::${e}`,[r.appToken,r.discussionId,e]),E=cx(h,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:b}),v=A=>{p(),i?.(A)},C=c?{}:{target:"_blank",rel:"noopener noreferrer"};return c?x.jsx("a",{ref:E,href:f,...s,onClick:v,className:"customLinkInternal",children:n}):x.jsx("a",{ref:E,href:f,...C,...s,onClick:v,className:"customLinkExternal",children:n})}const Gc=({logo:e,label:t,className:n})=>x.jsxs("div",{className:`flex items-center gap-2 logoWrapper${n?` ${n}`:""}`,children:[e,x.jsx("p",{className:"font-bold",children:t})]}),Vc=()=>{const{companySettings:e}=S.useContext(Nt);return x.jsx("div",{className:`assistant
|
|
74
|
+
`,...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),o(),c}Zl.peek=R2;function Zl(e){return e.value||""}function R2(){return"<"}ed.peek=O2;function ed(e,t,n,r){const i=hs(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),c+=u.move(")"),s(),c}function O2(){return"!"}td.peek=L2;function td(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const c=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function L2(){return"!"}nd.peek=D2;function nd(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function D2(){return"`"}function rd(e,t){const n=Qa(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}id.peek=P2;function id(e,t,n,r){const i=hs(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(rd(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),o(),n.stack=d,f}o=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),o(),c}function P2(e,t,n){return rd(e,n)?"<":"["}ad.peek=M2;function ad(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function M2(){return"["}function ms(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function B2(e){const t=ms(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function F2(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function sd(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function U2(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?F2(n):ms(n);const o=e.ordered?s==="."?")":".":B2(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),sd(n)===s&&d){let f=-1;for(;++f<e.children.length;){const m=e.children[f];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function H2(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function j2(e,t,n,r){const i=H2(n);let a=n.bulletCurrent||ms(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),d);return u(),c;function d(f,m,h){return m?(h?"":" ".repeat(s))+f:(h?a:a+" ".repeat(s-a.length))+f}}function z2(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const $2=ti(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function V2(e,t,n,r){return(e.children.some(function(s){return $2(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function W2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}od.peek=G2;function od(e,t,n,r){const i=W2(n),a=n.enter("strong"),s=n.createTracker(r);let o=s.move(i+i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i+i),a(),o}function G2(e,t,n){return n.options.strong||"*"}function Y2(e,t,n,r){return n.safe(e.value,r)}function q2(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function X2(e,t,n){const r=(sd(n)+(n.options.ruleSpaces?" ":"")).repeat(q2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ud={blockquote:E2,break:tu,code:C2,definition:A2,emphasis:Jl,hardBreak:tu,heading:N2,html:Zl,image:ed,imageReference:td,inlineCode:nd,link:id,linkReference:ad,list:U2,listItem:j2,paragraph:z2,root:V2,strong:od,text:Y2,thematicBreak:X2};function Q2(){return{enter:{table:K2,tableData:nu,tableHeader:nu,tableRow:Z2},exit:{codeText:ex,table:J2,tableData:ji,tableHeader:ji,tableRow:ji}}}function K2(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function J2(e){this.exit(e),this.data.inTable=void 0}function Z2(e){this.enter({type:"tableRow",children:[]},e)}function ji(e){this.exit(e)}function nu(e){this.enter({type:"tableCell",children:[]},e)}function ex(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tx));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tx(e,t){return t==="|"?t:e}function nx(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
75
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:s,tableCell:u,tableRow:o}};function s(h,g,y,v){return c(d(h,y,v),h.align)}function o(h,g,y,v){const A=f(h,y,v),k=c([A]);return k.slice(0,k.indexOf(`
|
|
76
|
+
`))}function u(h,g,y,v){const A=y.enter("tableCell"),k=y.enter("phrasing"),p=y.containerPhrasing(h,{...v,before:a,after:a});return k(),A(),p}function c(h,g){return g2(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(h,g,y){const v=h.children;let A=-1;const k=[],p=g.enter("table");for(;++A<v.length;)k[A]=f(v[A],g,y);return p(),k}function f(h,g,y){const v=h.children;let A=-1;const k=[],p=g.enter("tableRow");for(;++A<v.length;)k[A]=u(v[A],h,g,y);return p(),k}function m(h,g,y){let v=ud.inlineCode(h,g,y);return y.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function rx(){return{exit:{taskListCheckValueChecked:ru,taskListCheckValueUnchecked:ru,paragraph:ax}}}function ix(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sx}}}function ru(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ax(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function sx(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let u=ud.listItem(e,t,n,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+s}}function ox(){return[Uy(),s2(),l2(),Q2(),rx()]}function ux(e){return{extensions:[Hy(),o2(e),d2(),nx(e),ix()]}}const cx={tokenize:px,partial:!0},cd={tokenize:gx,partial:!0},ld={tokenize:bx,partial:!0},dd={tokenize:Ex,partial:!0},lx={tokenize:Tx,partial:!0},fd={name:"wwwAutolink",tokenize:hx,previous:md},hd={name:"protocolAutolink",tokenize:mx,previous:pd},Ut={name:"emailAutolink",tokenize:fx,previous:gd},Lt={};function dx(){return{text:Lt}}let Jt=48;for(;Jt<123;)Lt[Jt]=Ut,Jt++,Jt===58?Jt=65:Jt===91&&(Jt=97);Lt[43]=Ut;Lt[45]=Ut;Lt[46]=Ut;Lt[95]=Ut;Lt[72]=[Ut,hd];Lt[104]=[Ut,hd];Lt[87]=[Ut,fd];Lt[119]=[Ut,fd];function fx(e,t,n){const r=this;let i,a;return s;function s(f){return!Ca(f)||!gd.call(r,r.previous)||ps(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return Ca(f)?(e.consume(f),o):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(lx,d,c)(f):f===45||f===95||et(f)?(a=!0,e.consume(f),u):d(f)}function c(f){return e.consume(f),i=!0,u}function d(f){return a&&i&&st(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function hx(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!md.call(r,r.previous)||ps(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cx,e.attempt(cd,e.attempt(ld,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function mx(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&pd.call(r,r.previous)&&!ps(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(st(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?c:(a=!0,u)):n(f)}function c(f){return f===null||Nr(f)||Me(f)||un(f)||Jr(f)?n(f):e.attempt(cd,e.attempt(ld,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function px(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function gx(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(dd,u,o)(c):c===null||Me(c)||un(c)||c!==45&&Jr(c)?u(c):(a=!0,e.consume(c),s)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!a?n(c):t(c)}}function bx(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(dd,t,a)(s):s===null||Me(s)||un(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function Ex(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Me(o)||un(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Me(o)||un(o)?t(o):r(o)}function a(o){return st(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):st(o)?(e.consume(o),s):n(o)}}function Tx(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return et(a)?n(a):t(a)}}function md(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Me(e)}function pd(e){return!st(e)}function gd(e){return!(e===47||Ca(e))}function Ca(e){return e===43||e===45||e===46||e===95||et(e)}function ps(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const yx={tokenize:vx,partial:!0};function xx(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ix,continuation:{tokenize:Ax},exit:wx}},text:{91:{name:"gfmFootnoteCall",tokenize:Cx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_x,resolveTo:Sx}}}}function _x(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const c=_t(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Sx(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Cx(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!s||f===null||f===91||Me(f))return n(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(_t(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Me(f)||(s=!0),a++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function Ix(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(s>999||g===93&&!o||g===null||g===91||Me(g))return n(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return a=_t(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Me(g)||(o=!0),s++,e.consume(g),g===92?f:d}function f(g){return g===91||g===92||g===93?(e.consume(g),s++,d):d(g)}function m(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),Ae(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function Ax(e,t,n){return e.check(ur,t,e.attempt(yx,t,n))}function wx(e){e.exit("gfmFootnoteDefinition")}function vx(e,t,n){const r=this;return Ae(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function kx(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},m=[["enter",d,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&dt(m,m.length,0,Zr(h,s.slice(c+1,u),o)),dt(m,m.length,0,[["exit",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",d,o]]),dt(s,c-1,u-c+3,m),u=c+m.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const c=this.previous,d=this.events;let f=0;return m;function m(g){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(g):(s.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const y=Rr(c);if(g===126)return f>1?u(g):(s.consume(g),f++,h);if(f<2&&!n)return u(g);const v=s.exit("strikethroughSequenceTemporary"),A=Rr(g);return v._open=!A||A===2&&!!y,v._close=!y||y===2&&!!A,o(g)}}}class Nx{constructor(){this.map=[]}add(t,n,r){Rx(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function Rx(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Ox(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Lx(){return{flow:{null:{name:"table",tokenize:Dx,resolveAll:Px}}}}function Dx(e,t,n){const r=this;let i=0,a=0,s;return o;function o(N){let H=r.events.length-1;for(;H>-1;){const z=r.events[H][1].type;if(z==="lineEnding"||z==="linePrefix")H--;else break}const $=H>-1?r.events[H][1].type:null,j=$==="tableHead"||$==="tableRow"?w:u;return j===w&&r.parser.lazy[r.now().line]?n(N):j(N)}function u(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(s=!0,a+=1),d(N)}function d(N){return N===null?n(N):le(N)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),h):n(N):_e(N)?Ae(e,d,"whitespace")(N):(a+=1,s&&(s=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(N)))}function f(N){return N===null||N===124||Me(N)?(e.exit("data"),d(N)):(e.consume(N),N===92?m:f)}function m(N){return N===92||N===124?(e.consume(N),f):f(N)}function h(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),s=!1,_e(N)?Ae(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):g(N))}function g(N){return N===45||N===58?v(N):N===124?(s=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),y):S(N)}function y(N){return _e(N)?Ae(e,v,"whitespace")(N):v(N)}function v(N){return N===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),A):N===45?(a+=1,A(N)):N===null||le(N)?O(N):S(N)}function A(N){return N===45?(e.enter("tableDelimiterFiller"),k(N)):S(N)}function k(N){return N===45?(e.consume(N),k):N===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),p):(e.exit("tableDelimiterFiller"),p(N))}function p(N){return _e(N)?Ae(e,O,"whitespace")(N):O(N)}function O(N){return N===124?g(N):N===null||le(N)?!s||i!==a?S(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):S(N)}function S(N){return n(N)}function w(N){return e.enter("tableRow"),B(N)}function B(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),B):N===null||le(N)?(e.exit("tableRow"),t(N)):_e(N)?Ae(e,B,"whitespace")(N):(e.enter("data"),K(N))}function K(N){return N===null||N===124||Me(N)?(e.exit("data"),B(N)):(e.consume(N),N===92?Y:K)}function Y(N){return N===92||N===124?(e.consume(N),K):K(N)}}function Px(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,c,d,f;const m=new Nx;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(o=!1,u!==0&&(iu(m,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=_r(m,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=_r(m,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):g.type==="tableHead"?(o=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],f=_r(m,t,a,i,n,f)):s[1]!==0&&(f=_r(m,t,s,i,n,f)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&iu(m,t,u,c,d),m.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Ox(t.events,n))}return e}function _r(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},bn(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=bn(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=bn(t.events,n[2]),d=bn(t.events,n[3]),f={type:o,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const m=t.events[n[2]],h=t.events[n[3]];if(m[1].end=Object.assign({},h[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,y=n[3]-n[2]-1;e.add(g,y,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},bn(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function iu(e,t,n,r,i){const a=[],s=bn(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function bn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Mx={name:"tasklistCheck",tokenize:Fx};function Bx(){return{text:{91:Mx}}}function Fx(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return Me(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return le(u)?t(u):_e(u)?e.check({tokenize:Ux},t,n)(u):n(u)}}function Ux(e,t,n){return Ae(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Hx(e){return zc([dx(),xx(),kx(e),Lx(),Bx()])}const jx={};function zx(e){const t=this,n=e||jx,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Hx(n)),a.push(ox()),s.push(ux(n))}const au=new Set;function $x(e){return au.has(e)?!1:(au.add(e),!0)}function Vx(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:i=0,dedupeKey:a}={}){const s=C.useRef(!1),o=C.useRef();return C.useCallback(c=>{if(o.current?.(),o.current=void 0,!c||s.current)return;const d=t??(n?document.querySelector(n):null),f=()=>{a&&!$x(a)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){f();return}const m=new IntersectionObserver((h,g)=>{h[0]?.isIntersecting&&(g.disconnect(),f())},{root:d,rootMargin:r,threshold:i});m.observe(c),o.current=()=>m.disconnect()},[t,n,r,i,a,e])}function Wx(e,t){if(!t||!e)return e;const n=t.replace(/^[?&]+/,""),[r,i]=e.split("#"),a=r.includes("?")?"&":"?",s=`${r}${a}${n}`;return i?`${s}#${i}`:s}function Gx({href:e="",queryParamToAppend:t="",children:n,context:r,onClick:i,seenRootEl:a,...s}){const{companySettings:o}=C.useContext(Rt),u=Yr(),c=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),d=u,f=Wx(e,t||o.api.tracking?.queryParamToAppend||""),m=()=>{const k=`${d}/tracking/clicked/${r.appToken}`,p={discussionId:r.discussionId,urlClicked:e};try{fetch(k,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(p),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},h=()=>{const k=`${d}/tracking/displayed/${r.appToken}`,p={discussionId:r.discussionId,urlSeen:e};try{fetch(k,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(p),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},g=C.useMemo(()=>`${r.appToken}::${r.discussionId}::${e}`,[r.appToken,r.discussionId,e]),y=Vx(h,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:g}),v=k=>{m(),i?.(k)},A=c?{}:{target:"_blank",rel:"noopener noreferrer"};return c?b.jsx("a",{ref:y,href:f,...s,onClick:v,className:"customLinkInternal",children:n}):b.jsx("a",{ref:y,href:f,...A,...s,onClick:v,className:"customLinkExternal",children:n})}const bd=({logo:e,label:t,className:n})=>b.jsxs("div",{className:`flex items-center gap-2 logoWrapper${n?` ${n}`:""}`,children:[e,b.jsx("p",{className:"font-bold",children:t})]}),Ed=()=>{const{companySettings:e}=C.useContext(Rt);return b.jsx("div",{className:`assistant
|
|
77
77
|
transition
|
|
78
78
|
ease-in-out
|
|
79
79
|
delay-50
|
|
@@ -81,8 +81,8 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
81
81
|
flex
|
|
82
82
|
justify-center
|
|
83
83
|
items-center
|
|
84
|
-
`,children:x.jsx(ka,{facet:e.agent.display[ee.AgentDisplayFacetRoleType.ASSISTANT]})})},hx=({content:e,metaData:t,context:n,seenRootEl:r})=>{const{chatlineLabelAssistantTranslation:i,chatlineLabelCustomerSupportTranslation:a}=Ca(),s=t?.authorType==="customer_support_operator"?t.customerSupportAuthorName??a:i,o=ee.formatCustomerSupportProviderText({text:e??"",provider:t?.customerSupportProvider});return x.jsx(Qa,{children:x.jsx("div",{className:"chatLineAssistant flex justify-start",children:x.jsxs("div",{className:`mr-auto w-full rounded-2xl rounded-bl-md px-4 py-3 transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 text-red-800 shadow-md animate-fade-in":"bg-slate-100 text-gray-800 shadow-sm"}`,children:[x.jsx(Gc,{className:"logoWrapper--assistant w-full justify-start text-left mb-2 text-xs",logo:x.jsx(Vc,{}),label:s}),x.jsx("div",{className:"chatsystem-markdown",children:x.jsx(za,{remarkPlugins:[ux],remarkRehypeOptions:{passThrough:["link"]},rehypePlugins:[Xa],components:{a:({node:u,href:c,children:d,...f})=>x.jsx(fx,{href:c??"",...f,context:n,seenRootEl:r,children:d})},children:o})})]})})})},px=({content:e,metaData:t})=>{const n=t?.isErrorMessage;return x.jsx(Qa,{children:x.jsx("div",{className:"chatLineSystemMessage flex justify-center px-2","data-system-event":t?.systemEvent,children:x.jsx("div",{className:`max-w-[90%] rounded-lg border px-3 py-2 text-center text-xs leading-relaxed shadow-sm ${n?"border-red-200 bg-red-50 text-red-800":"border-slate-200 bg-slate-50 text-slate-600"}`,children:x.jsx(za,{rehypePlugins:[Xa],children:e??""})})})})},mx=({userType:e,content:t,metaData:n,context:r,seenRootEl:i})=>{if(n?.messageKind==="system")return x.jsx(px,{content:t,metaData:n});const a=e==="user",s=e==="assistant";return x.jsxs(x.Fragment,{children:[a&&x.jsx(ZT,{content:t,metaData:n}),s&&x.jsx(hx,{content:t,metaData:n,context:r,seenRootEl:i})]})};function gx(e,t,n){let[r,i]=S.useState(e||t),a=S.useRef(e!==void 0),s=e!==void 0;S.useEffect(()=>{let c=a.current;c!==s&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s},[s]);let o=s?e:r,u=S.useCallback((c,...d)=>{let f=(p,...h)=>{n&&(Object.is(o,p)||n(p,...h)),s||(o=p)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...b)=>{let E=c(s?o:h,...b);return f(E,...d),s?h:E})):(s||i(c),f(c,...d))},[s,o,n]);return[o,u]}const wr={prefix:String(Math.round(Math.random()*1e10)),current:0},qc=S.createContext(wr),bx=S.createContext(!1);let Ex=!!(typeof window<"u"&&window.document&&window.document.createElement),Ii=new WeakMap;function Tx(e=!1){let t=S.useContext(qc),n=S.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let s=Ii.get(a);s==null?Ii.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,Ii.delete(a))}n.current=++t.current}return n.current}function yx(e){let t=S.useContext(qc);t===wr&&!Ex&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Tx(!!e),r=t===wr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function xx(e){let t=S.useId(),[n]=S.useState(wx()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${wr.prefix}`;return e||`${r}-${t}`}const Sx=typeof S.useId=="function"?xx:yx;function _x(){return!1}function Cx(){return!0}function Ax(e){return()=>{}}function wx(){return typeof S.useSyncExternalStore=="function"?S.useSyncExternalStore(Ax,_x,Cx):S.useContext(bx)}function Wc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Wc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ix(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Wc(e))&&(r&&(r+=" "),r+=t);return r}const cn=typeof document<"u"?S.useLayoutEffect:()=>{};function en(e){const t=S.useRef(null);return cn(()=>{t.current=e},[e]),S.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function vx(e){let[t,n]=S.useState(e),r=S.useRef(null),i=en(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});cn(()=>{r.current&&i()});let a=en(s=>{r.current=s(t),i()});return[t,a]}let kx=!!(typeof window<"u"&&window.document&&window.document.createElement),Ir=new Map;function vr(e){let[t,n]=S.useState(e),r=S.useRef(null),i=Sx(t),a=S.useCallback(s=>{r.current=s},[]);return kx&&Ir.set(i,a),cn(()=>{let s=i;return()=>{Ir.delete(s)}},[i]),S.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function Nx(e,t){if(e===t)return e;let n=Ir.get(e);if(n)return n(t),t;let r=Ir.get(t);return r?(r(e),e):t}function Fo(e=[]){let t=vr(),[n,r]=vx(t),i=S.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return cn(i,[t,i,...e]),n}function Rx(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const nr=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},kr=e=>e&&"window"in e&&e.window===e?e:nr(e).defaultView||window;function Nr(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],s=r[i];typeof a=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=Rx(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=Ix(a,s):i==="id"&&a&&s?t.id=Nx(a,s):t[i]=s!==void 0?s:a}}return t}const Ox=new Set(["id"]),Lx=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Dx=new Set(["href","target","rel","download","ping","referrerPolicy"]),Px=/^(data-.*)$/;function Mx(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(Ox.has(s)||n&&Lx.has(s)||r&&Dx.has(s)||i?.has(s)||Px.test(s))&&(a[s]=e[s]);return a}function Ho(e){if(Bx())e.focus({preventScroll:!0});else{let t=Fx(e);e.focus(),Hx(t)}}let hr=null;function Bx(){if(hr==null){hr=!1;try{document.createElement("div").focus({get preventScroll(){return hr=!0,!0}})}catch{}}return hr}function Fx(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Hx(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Ux(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function jx(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function zx(){return jx(/^Mac/i)}function $x(){return Ux(/Android/i)}let mn=new Map,la=new Set;function Uo(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=mn.get(r.target);i||(i=new Set,mn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=mn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),mn.delete(r.target)),mn.size===0)){for(let a of la)a();la.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Uo():document.addEventListener("DOMContentLoaded",Uo));function Yx(e){requestAnimationFrame(()=>{mn.size===0?e():la.add(e)})}function Gx(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=vr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function Vx(e,t){cn(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function qx(e){return e.mozInputSource===0&&e.isTrusted?!0:$x()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Wx(e,t,n){let r=S.useRef(t),i=en(()=>{n&&n(r.current)});S.useEffect(()=>{var a;let s=e==null||(a=e.current)===null||a===void 0?void 0:a.form;return s?.addEventListener("reset",i),()=>{s?.removeEventListener("reset",i)}},[e,i])}const Xx=S.createContext({register:()=>{}});Xx.displayName="PressResponderContext";class Qx{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Kx(e){let t=S.useRef({isFocused:!1,observer:null});cn(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=en(r=>{e?.(r)});return S.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=s=>{t.current.isFocused=!1,i.disabled&&n(new Qx("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Jx(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=S.useCallback(u=>{if(u.target===u.currentTarget)return r&&r(u),i&&i(!1),!0},[r,i]),s=Kx(a),o=S.useCallback(u=>{u.target===u.currentTarget&&document.activeElement===u.target&&(n&&n(u),i&&i(!0),s(u))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?o:void 0,onBlur:!t&&(r||i)?a:void 0}}}let vn=null,Zx=new Set,$n=new Map,an=!1,ca=!1;function Kr(e,t){for(let n of Zx)n(e,t)}function eS(e){return!(e.metaKey||!zx()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Rr(e){an=!0,eS(e)&&(vn="keyboard",Kr("keyboard",e))}function pt(e){vn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(an=!0,Kr("pointer",e))}function Xc(e){qx(e)&&(an=!0,vn="virtual")}function Qc(e){e.target===window||e.target===document||(!an&&!ca&&(vn="virtual",Kr("virtual",e)),an=!1,ca=!1)}function Kc(){an=!1,ca=!0}function jo(e){if(typeof window>"u"||$n.get(kr(e)))return;const t=kr(e),n=nr(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){an=!0,r.apply(this,arguments)},n.addEventListener("keydown",Rr,!0),n.addEventListener("keyup",Rr,!0),n.addEventListener("click",Xc,!0),t.addEventListener("focus",Qc,!0),t.addEventListener("blur",Kc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",pt,!0),n.addEventListener("pointermove",pt,!0),n.addEventListener("pointerup",pt,!0)):(n.addEventListener("mousedown",pt,!0),n.addEventListener("mousemove",pt,!0),n.addEventListener("mouseup",pt,!0)),t.addEventListener("beforeunload",()=>{Jc(e)},{once:!0}),$n.set(t,{focus:r})}const Jc=(e,t)=>{const n=kr(e),r=nr(e);t&&r.removeEventListener("DOMContentLoaded",t),$n.has(n)&&(n.HTMLElement.prototype.focus=$n.get(n).focus,r.removeEventListener("keydown",Rr,!0),r.removeEventListener("keyup",Rr,!0),r.removeEventListener("click",Xc,!0),n.removeEventListener("focus",Qc,!0),n.removeEventListener("blur",Kc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",pt,!0),r.removeEventListener("pointermove",pt,!0),r.removeEventListener("pointerup",pt,!0)):(r.removeEventListener("mousedown",pt,!0),r.removeEventListener("mousemove",pt,!0),r.removeEventListener("mouseup",pt,!0)),$n.delete(n))};function tS(e){const t=nr(e);let n;return t.readyState!=="loading"?jo(e):(n=()=>{jo(e)},t.addEventListener("DOMContentLoaded",n)),()=>Jc(e,n)}typeof document<"u"&&tS();function nS(){return vn}function rS(e){vn=e,Kr(e,null)}function zo(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function iS(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:zo(e.onKeyDown),onKeyUp:zo(e.onKeyUp)}}}function aS(e){const t=nr(e);if(nS()==="virtual"){let n=t.activeElement;Yx(()=>{t.activeElement===n&&e.isConnected&&Ho(e)})}else Ho(e)}function sS(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class es{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new $o({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&sS(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new es;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new $o({scopeRef:null}),this.fastMap.set(null,this.root)}}class $o{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new es;let oS=S.createContext(null);function uS(e){let t=S.useContext(oS)||{};Vx(t,e);let{ref:n,...r}=t;return r}function lS(e,t){let{focusProps:n}=Jx(e),{keyboardProps:r}=iS(e),i=Nr(n,r),a=uS(t),s=e.isDisabled?{}:a,o=S.useRef(e.autoFocus);return S.useEffect(()=>{o.current&&t.current&&aS(t.current),o.current=!1},[t]),{focusableProps:Nr({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function cS(e,t,n){let{validationBehavior:r,focus:i}=e;cn(()=>{if(r==="native"&&n?.current){let u=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(fS(n.current))}});let a=en(()=>{t.resetValidation()}),s=en(u=>{var c;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&n&&d&&hS(d)===n.current){var f;i?i():(f=n.current)===null||f===void 0||f.focus(),rS("keyboard")}u.preventDefault()}),o=en(()=>{t.commitValidation()});S.useEffect(()=>{let u=n?.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",s),u.addEventListener("change",o),c?.addEventListener("reset",a),()=>{u.removeEventListener("invalid",s),u.removeEventListener("change",o),c?.removeEventListener("reset",a)}},[n,s,o,a,r])}function dS(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function fS(e){return{isInvalid:!e.validity.valid,validationDetails:dS(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function hS(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const Zc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},ed={...Zc,customError:!0,valid:!1},On={isInvalid:!1,validationDetails:Zc,validationErrors:[]},pS=S.createContext({}),Yo="__formValidationState"+Date.now();function mS(e){if(e[Yo]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[Yo];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return gS(e)}function gS(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:o="aria"}=e;n&&(t||(t=n==="invalid"));let u=t?{isInvalid:!0,validationErrors:[],validationDetails:ed}:null,c=S.useMemo(()=>Go(bS(s,i)),[s,i]);a?.validationDetails.valid&&(a=null);let d=S.useContext(pS),f=S.useMemo(()=>r?Array.isArray(r)?r.flatMap(I=>da(d[I])):da(d[r]):[],[d,r]),[p,h]=S.useState(d),[b,E]=S.useState(!1);d!==p&&(h(d),E(!1));let v=S.useMemo(()=>Go(b?[]:f),[b,f]),C=S.useRef(On),[A,N]=S.useState(On),L=S.useRef(On),w=()=>{if(!k)return;Y(!1);let I=c||a||C.current;vi(I,L.current)||(L.current=I,N(I))},[k,Y]=S.useState(!1);return S.useEffect(w),{realtimeValidation:u||v||c||a||On,displayValidation:o==="native"?u||v||A:u||v||c||a||A,updateValidation(I){o==="aria"&&!vi(A,I)?N(I):C.current=I},resetValidation(){let I=On;vi(I,L.current)||(L.current=I,N(I)),o==="native"&&Y(!1),E(!0)},commitValidation(){o==="native"&&Y(!0),E(!0)}}}function da(e){return e?Array.isArray(e)?e:[e]:[]}function bS(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return da(n)}return[]}function Go(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:ed}:null}function vi(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function ES(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=vr(t);let s=vr(),o={};n?(r=r?`${s} ${r}`:s,o={id:s,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let u=Gx({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:o,fieldProps:u}}function TS(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=ES(e),o=Fo([!!t,!!n,r,i]),u=Fo([!!t,!!n,r,i]);return s=Nr(s,{"aria-describedby":[o,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:o},errorMessageProps:{id:u}}}function yS(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:s="text",validationBehavior:o="aria"}=e,[u,c]=gx(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=lS(e,t),f=mS({...e,value:u}),{isInvalid:p,validationErrors:h,validationDetails:b}=f.displayValidation,{labelProps:E,fieldProps:v,descriptionProps:C,errorMessageProps:A}=TS({...e,isInvalid:p,errorMessage:e.errorMessage||h}),N=Mx(e,{labelable:!0});const L={type:s,pattern:e.pattern};return Wx(t,u,c),cS(e,f,t),S.useEffect(()=>{if(t.current instanceof kr(t.current).HTMLTextAreaElement){let w=t.current;Object.defineProperty(w,"defaultValue",{get:()=>w.value,set:()=>{},configurable:!0})}},[t]),{labelProps:E,inputProps:Nr(N,n==="input"&&L,{disabled:r,readOnly:a,required:i&&o==="native","aria-required":i&&o==="aria"||void 0,"aria-invalid":p||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:u,onChange:w=>c(w.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...v}),descriptionProps:C,errorMessageProps:A,isInvalid:p,validationErrors:h,validationDetails:b}}const xS=e=>e.charCodeAt(e.length-1)===10,SS=e=>{const[t,n]=S.useState(""),r=()=>{E.current&&(E.current.style.height=E.current.scrollHeight+"px")},i=()=>{E.current&&(E.current.style.height="48px")},a=I=>{n(I)};S.useEffect(r,[t]);const{label:s,SubmitComponent:o,onSubmit:u,isLoadingStream:c,audioEnabled:d=!1,MicComponent:f,onPressMicButton:p,LoadingComponent:h,onPressLoadingButton:b}=e,E=S.useRef(null),{labelProps:v,inputProps:C}=yS({...e,inputElementType:"textarea"},E),A=I=>{xS(I.target.value)||a(I.target.value)},N=I=>{if(I.key==="Enter"||I.code==="Enter"||I.keyCode===13||I.code==="NumpadEnter"){if(I.shiftKey)a(t+`
|
|
85
|
-
`);else if(!
|
|
84
|
+
`,children:b.jsx(Wa,{facet:e.agent.display[ee.AgentDisplayFacetRoleType.ASSISTANT]})})},Yx=({content:e,metaData:t,context:n,seenRootEl:r})=>{const{chatlineLabelAssistantTranslation:i,chatlineLabelCustomerSupportTranslation:a}=Ha(),s=t?.authorType==="customer_support_operator"?t.customerSupportAuthorName??a:i,o=ee.formatCustomerSupportProviderText({text:e??"",provider:t?.customerSupportProvider});return b.jsx(fs,{children:b.jsx("div",{className:"chatLineAssistant flex justify-start",children:b.jsxs("div",{className:`mr-auto w-full rounded-2xl rounded-bl-md px-4 py-3 transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 text-red-800 shadow-md animate-fade-in":"bg-slate-100 text-gray-800 shadow-sm"}`,children:[b.jsx(bd,{className:"logoWrapper--assistant w-full justify-start text-left mb-2 text-xs",logo:b.jsx(Ed,{}),label:s}),b.jsx("div",{className:"chatsystem-markdown",children:b.jsx(is,{remarkPlugins:[zx],remarkRehypeOptions:{passThrough:["link"]},rehypePlugins:[ds],components:{a:({node:u,href:c,children:d,...f})=>b.jsx(Gx,{href:c??"",...f,context:n,seenRootEl:r,children:d})},children:o})})]})})})},qx=({content:e,metaData:t})=>{const n=t?.isErrorMessage;return b.jsx(fs,{children:b.jsx("div",{className:"chatLineSystemMessage flex justify-center px-2","data-system-event":t?.systemEvent,children:b.jsx("div",{className:`max-w-[90%] rounded-lg border px-3 py-2 text-center text-xs leading-relaxed shadow-sm ${n?"border-red-200 bg-red-50 text-red-800":"border-slate-200 bg-slate-50 text-slate-600"}`,children:b.jsx(is,{rehypePlugins:[ds],children:e??""})})})})},gs=({children:e,modifier:t,state:n})=>b.jsx("section",{className:`chatsystem-interactive-widget chatsystem-interactive-widget--${t} chatsystem-interactive-widget--state-${n??"active"} my-2 rounded-xl border border-slate-200 bg-white p-4 text-slate-800 shadow-sm`,children:e}),nn=({title:e,description:t})=>e||t?b.jsxs("header",{className:"chatsystem-interactive-widget__copy mb-3 space-y-1",children:[e?b.jsx("h3",{className:"chatsystem-interactive-widget__title text-sm font-semibold text-slate-900",children:e}):null,t?b.jsx("p",{className:"chatsystem-interactive-widget__description text-sm leading-5 text-slate-600",children:t}):null]}):null,ui=({children:e})=>b.jsx("div",{className:"chatsystem-interactive-widget__actions mt-3 flex flex-wrap gap-2",children:e}),tr=({children:e,style:t="primary",disabled:n,type:r="button",onClick:i})=>b.jsx("button",{type:r,disabled:n,onClick:i,className:`chatsystem-interactive-widget__button chatsystem-interactive-widget__button--${t} inline-flex min-h-9 items-center justify-center rounded-lg border px-3 py-2 text-sm font-semibold transition disabled:cursor-not-allowed disabled:opacity-60`,children:e}),_n=({id:e,label:t,description:n,required:r,children:i})=>b.jsxs("div",{className:"chatsystem-interactive-widget__field grid gap-1.5",children:[b.jsxs("label",{className:"chatsystem-interactive-widget__label text-sm font-medium text-slate-800",htmlFor:e,children:[t,r?b.jsx("span",{"aria-hidden":"true",children:" *"}):null]}),n?b.jsx("p",{className:"chatsystem-interactive-widget__field-description text-xs text-slate-500",children:n}):null,i]}),wn=({children:e,tone:t="neutral"})=>b.jsx("div",{className:`chatsystem-interactive-widget__status chatsystem-interactive-widget__status--${t} rounded-lg px-3 py-2 text-sm`,role:t==="danger"?"alert":"status",children:e}),zi="chatsystem-interactive-widget__control w-full rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm text-slate-900 outline-none transition focus:border-[var(--chatsystem-primary-color)] focus:ring-2 focus:ring-[color-mix(in_srgb,var(--chatsystem-primary-color)_20%,transparent)] disabled:bg-slate-50 disabled:text-slate-500",Xx=({widget:e})=>{const t=xc(),n=Yt(),r=e.state!=="active",i=n.formatMessage({id:"chatbot.interactiveWidget.submitted",defaultMessage:"Sent"}),a=n.formatMessage({id:"chatbot.interactiveWidget.cancelled",defaultMessage:"Cancelled"}),s=n.formatMessage({id:"chatbot.interactiveWidget.submitting",defaultMessage:"Sending…"}),o=n.formatMessage({id:"chatbot.interactiveWidget.unavailable",defaultMessage:"This interaction is no longer available."}),u=(d,f)=>{d.kind==="open_url"&&window.open(d.url,"_blank","noopener,noreferrer"),t.submitInteractiveWidget({instanceId:e.instanceId,actionId:d.id,data:f,cancel:d.kind==="cancel"})};let c=null;return e.state==="submitting"&&(c=s),e.state==="submitted"&&(c=i),e.state==="cancelled"&&(c=a),e.state==="unavailable"&&(c=o),b.jsxs(gs,{modifier:e.widgetType.replace(/_/g,"-"),state:e.state,children:[b.jsx(Qx,{widget:e,disabled:r,onAction:u}),c?b.jsx("div",{className:"mt-3",children:b.jsx(wn,{tone:e.state==="unavailable"?"warning":"success",children:c})}):null]})},Qx=({widget:e,disabled:t,onAction:n})=>{const r=e.presentation;return r.type==="structured_form"?b.jsx(Kx,{instanceId:e.instanceId,presentation:r,disabled:t,onSubmit:i=>n({id:"submit",label:r.submitLabel,kind:"submit"},i),onCancel:r.cancelLabel?()=>n({id:"cancel",label:r.cancelLabel,kind:"cancel"}):void 0}):r.type==="card_list"?b.jsxs(b.Fragment,{children:[b.jsx(nn,{title:r.title,description:r.description}),b.jsx("div",{className:"chatsystem-interactive-widget__cards grid gap-3",children:r.cards.map(i=>b.jsxs("article",{className:"chatsystem-interactive-widget__card overflow-hidden rounded-lg border border-slate-200",children:[i.imageUrl?b.jsx("img",{className:"chatsystem-interactive-widget__card-image h-32 w-full object-cover",src:i.imageUrl,alt:"",loading:"lazy"}):null,b.jsxs("div",{className:"chatsystem-interactive-widget__card-body p-3",children:[i.eyebrow?b.jsx("p",{className:"text-xs font-semibold uppercase text-slate-500",children:i.eyebrow}):null,b.jsx("h4",{className:"text-sm font-semibold text-slate-900",children:i.title}),i.description?b.jsx("p",{className:"mt-1 text-sm text-slate-600",children:i.description}):null,i.metadata?.map(a=>b.jsxs("div",{className:"chatsystem-interactive-widget__detail mt-2 flex justify-between gap-3 text-xs",children:[b.jsx("span",{className:"text-slate-500",children:a.label}),b.jsx("span",{className:"font-medium text-slate-800",children:a.value})]},a.label)),i.actions?.length?b.jsx(Sr,{actions:i.actions,disabled:t,onAction:n}):null]})]},i.id))})]}):r.type==="status_summary"?b.jsxs(b.Fragment,{children:[b.jsx(nn,{title:r.title,description:r.description}),b.jsx(wn,{tone:r.tone,children:r.items?.map(i=>b.jsxs("div",{className:"chatsystem-interactive-widget__detail flex justify-between gap-3 py-1",children:[b.jsx("span",{children:i.label}),b.jsx("strong",{children:i.value})]},i.label))}),r.actions?.length?b.jsx(Sr,{actions:r.actions,disabled:t,onAction:n}):null]}):r.type==="explicit_confirmation"?b.jsxs(b.Fragment,{children:[b.jsx(nn,{title:r.title,description:r.description}),r.details?.map(i=>b.jsxs("div",{className:"chatsystem-interactive-widget__detail flex justify-between gap-3 border-b border-slate-100 py-2 text-sm",children:[b.jsx("span",{className:"text-slate-500",children:i.label}),b.jsx("strong",{children:i.value})]},i.label)),b.jsx(Sr,{disabled:t,onAction:n,actions:[{id:"confirm",label:r.confirmLabel,kind:"submit",style:r.tone==="danger"?"danger":"primary"},{id:"cancel",label:r.cancelLabel,kind:"cancel",style:"secondary"}]})]}):b.jsxs(b.Fragment,{children:[b.jsx(nn,{title:r.title,description:r.description}),b.jsx(Sr,{actions:r.actions,disabled:t,onAction:n})]})},Sr=({actions:e,disabled:t,onAction:n})=>b.jsx(ui,{children:e.map(r=>b.jsx(tr,{style:r.style,disabled:t,onClick:()=>n(r),children:r.label},r.id))}),Kx=({instanceId:e,presentation:t,disabled:n,onSubmit:r,onCancel:i})=>{const[a,s]=C.useState({}),o=c=>{c.preventDefault(),r(a)},u=(c,d)=>s(f=>({...f,[c.id]:d}));return b.jsxs("form",{className:"chatsystem-interactive-widget__form grid gap-3",onSubmit:o,children:[b.jsx(nn,{title:t.title,description:t.description}),t.fields.map(c=>b.jsx(_n,{id:`${e}-${c.id}`,label:c.label,description:c.description,required:c.required,children:b.jsx(Jx,{id:`${e}-${c.id}`,field:c,value:a[c.id],disabled:n,onChange:d=>u(c,d)})},c.id)),b.jsxs(ui,{children:[b.jsx(tr,{type:"submit",disabled:n,children:t.submitLabel}),t.cancelLabel?b.jsx(tr,{style:"secondary",disabled:n,onClick:i,children:t.cancelLabel}):null]})]})},Jx=({id:e,field:t,value:n,disabled:r,onChange:i})=>t.type==="checkbox"?b.jsx("input",{id:e,className:"chatsystem-interactive-widget__checkbox h-4 w-4",type:"checkbox",checked:n===!0,required:t.required,disabled:r,onChange:a=>i(a.currentTarget.checked)}):t.type==="select"?b.jsxs("select",{id:e,className:zi,value:typeof n=="string"?n:"",required:t.required,disabled:r,onChange:a=>i(a.currentTarget.value),children:[b.jsx("option",{value:"",children:t.placeholder??""}),t.options.map(a=>b.jsx("option",{value:a.value,children:a.label},a.value))]}):t.type==="textarea"?b.jsx("textarea",{id:e,className:`${zi} min-h-24 resize-y`,value:typeof n=="string"?n:"",required:t.required,disabled:r,placeholder:t.placeholder,minLength:t.minLength,maxLength:t.maxLength,onChange:a=>i(a.currentTarget.value)}):b.jsx("input",{id:e,className:zi,type:t.type,value:typeof n=="string"?n:"",required:t.required,disabled:r,placeholder:t.placeholder,minLength:t.minLength,maxLength:t.maxLength,onChange:a=>i(a.currentTarget.value)}),Zx=({userType:e,content:t,metaData:n,context:r,seenRootEl:i})=>{if(n?.interactiveWidget)return b.jsx(Xx,{widget:n.interactiveWidget});if(n?.messageKind==="system")return b.jsx(qx,{content:t,metaData:n});const a=e==="user",s=e==="assistant";return b.jsxs(b.Fragment,{children:[a&&b.jsx(Ly,{content:t,metaData:n}),s&&b.jsx(Yx,{content:t,metaData:n,context:r,seenRootEl:i})]})};function e_(e,t,n){let[r,i]=C.useState(e||t),a=C.useRef(e!==void 0),s=e!==void 0;C.useEffect(()=>{let c=a.current;c!==s&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s},[s]);let o=s?e:r,u=C.useCallback((c,...d)=>{let f=(m,...h)=>{n&&(Object.is(o,m)||n(m,...h)),s||(o=m)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...g)=>{let y=c(s?o:h,...g);return f(y,...d),s?h:y})):(s||i(c),f(c,...d))},[s,o,n]);return[o,u]}const Br={prefix:String(Math.round(Math.random()*1e10)),current:0},Td=C.createContext(Br),t_=C.createContext(!1);let n_=!!(typeof window<"u"&&window.document&&window.document.createElement),$i=new WeakMap;function r_(e=!1){let t=C.useContext(Td),n=C.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let s=$i.get(a);s==null?$i.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,$i.delete(a))}n.current=++t.current}return n.current}function i_(e){let t=C.useContext(Td);t===Br&&!n_&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=r_(!!e),r=t===Br&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function a_(e){let t=C.useId(),[n]=C.useState(l_()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Br.prefix}`;return e||`${r}-${t}`}const s_=typeof C.useId=="function"?a_:i_;function o_(){return!1}function u_(){return!0}function c_(e){return()=>{}}function l_(){return typeof C.useSyncExternalStore=="function"?C.useSyncExternalStore(c_,o_,u_):C.useContext(t_)}function yd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function d_(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yd(e))&&(r&&(r+=" "),r+=t);return r}const hn=typeof document<"u"?C.useLayoutEffect:()=>{};function an(e){const t=C.useRef(null);return hn(()=>{t.current=e},[e]),C.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function f_(e){let[t,n]=C.useState(e),r=C.useRef(null),i=an(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});hn(()=>{r.current&&i()});let a=an(s=>{r.current=s(t),i()});return[t,a]}let h_=!!(typeof window<"u"&&window.document&&window.document.createElement),Fr=new Map;function Ur(e){let[t,n]=C.useState(e),r=C.useRef(null),i=s_(t),a=C.useCallback(s=>{r.current=s},[]);return h_&&Fr.set(i,a),hn(()=>{let s=i;return()=>{Fr.delete(s)}},[i]),C.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function m_(e,t){if(e===t)return e;let n=Fr.get(e);if(n)return n(t),t;let r=Fr.get(t);return r?(r(e),e):t}function su(e=[]){let t=Ur(),[n,r]=f_(t),i=C.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return hn(i,[t,i,...e]),n}function p_(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const fr=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Hr=e=>e&&"window"in e&&e.window===e?e:fr(e).defaultView||window;function jr(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],s=r[i];typeof a=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=p_(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=d_(a,s):i==="id"&&a&&s?t.id=m_(a,s):t[i]=s!==void 0?s:a}}return t}const g_=new Set(["id"]),b_=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),E_=new Set(["href","target","rel","download","ping","referrerPolicy"]),T_=/^(data-.*)$/;function y_(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(g_.has(s)||n&&b_.has(s)||r&&E_.has(s)||i?.has(s)||T_.test(s))&&(a[s]=e[s]);return a}function ou(e){if(x_())e.focus({preventScroll:!0});else{let t=__(e);e.focus(),S_(t)}}let Cr=null;function x_(){if(Cr==null){Cr=!1;try{document.createElement("div").focus({get preventScroll(){return Cr=!0,!0}})}catch{}}return Cr}function __(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function S_(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function C_(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function I_(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function A_(){return I_(/^Mac/i)}function w_(){return C_(/Android/i)}let En=new Map,Ia=new Set;function uu(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=En.get(r.target);i||(i=new Set,En.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=En.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),En.delete(r.target)),En.size===0)){for(let a of Ia)a();Ia.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?uu():document.addEventListener("DOMContentLoaded",uu));function v_(e){requestAnimationFrame(()=>{En.size===0?e():Ia.add(e)})}function k_(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Ur(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function N_(e,t){hn(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function R_(e){return e.mozInputSource===0&&e.isTrusted?!0:w_()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function O_(e,t,n){let r=C.useRef(t),i=an(()=>{n&&n(r.current)});C.useEffect(()=>{var a;let s=e==null||(a=e.current)===null||a===void 0?void 0:a.form;return s?.addEventListener("reset",i),()=>{s?.removeEventListener("reset",i)}},[e,i])}const L_=C.createContext({register:()=>{}});L_.displayName="PressResponderContext";class D_{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function P_(e){let t=C.useRef({isFocused:!1,observer:null});hn(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=an(r=>{e?.(r)});return C.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=s=>{t.current.isFocused=!1,i.disabled&&n(new D_("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function M_(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=C.useCallback(u=>{if(u.target===u.currentTarget)return r&&r(u),i&&i(!1),!0},[r,i]),s=P_(a),o=C.useCallback(u=>{u.target===u.currentTarget&&document.activeElement===u.target&&(n&&n(u),i&&i(!0),s(u))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?o:void 0,onBlur:!t&&(r||i)?a:void 0}}}let Ln=null,B_=new Set,Kn=new Map,cn=!1,Aa=!1;function ci(e,t){for(let n of B_)n(e,t)}function F_(e){return!(e.metaKey||!A_()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function zr(e){cn=!0,F_(e)&&(Ln="keyboard",ci("keyboard",e))}function gt(e){Ln="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(cn=!0,ci("pointer",e))}function xd(e){R_(e)&&(cn=!0,Ln="virtual")}function _d(e){e.target===window||e.target===document||(!cn&&!Aa&&(Ln="virtual",ci("virtual",e)),cn=!1,Aa=!1)}function Sd(){cn=!1,Aa=!0}function cu(e){if(typeof window>"u"||Kn.get(Hr(e)))return;const t=Hr(e),n=fr(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){cn=!0,r.apply(this,arguments)},n.addEventListener("keydown",zr,!0),n.addEventListener("keyup",zr,!0),n.addEventListener("click",xd,!0),t.addEventListener("focus",_d,!0),t.addEventListener("blur",Sd,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",gt,!0),n.addEventListener("pointermove",gt,!0),n.addEventListener("pointerup",gt,!0)):(n.addEventListener("mousedown",gt,!0),n.addEventListener("mousemove",gt,!0),n.addEventListener("mouseup",gt,!0)),t.addEventListener("beforeunload",()=>{Cd(e)},{once:!0}),Kn.set(t,{focus:r})}const Cd=(e,t)=>{const n=Hr(e),r=fr(e);t&&r.removeEventListener("DOMContentLoaded",t),Kn.has(n)&&(n.HTMLElement.prototype.focus=Kn.get(n).focus,r.removeEventListener("keydown",zr,!0),r.removeEventListener("keyup",zr,!0),r.removeEventListener("click",xd,!0),n.removeEventListener("focus",_d,!0),n.removeEventListener("blur",Sd,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",gt,!0),r.removeEventListener("pointermove",gt,!0),r.removeEventListener("pointerup",gt,!0)):(r.removeEventListener("mousedown",gt,!0),r.removeEventListener("mousemove",gt,!0),r.removeEventListener("mouseup",gt,!0)),Kn.delete(n))};function U_(e){const t=fr(e);let n;return t.readyState!=="loading"?cu(e):(n=()=>{cu(e)},t.addEventListener("DOMContentLoaded",n)),()=>Cd(e,n)}typeof document<"u"&&U_();function H_(){return Ln}function j_(e){Ln=e,ci(e,null)}function lu(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function z_(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:lu(e.onKeyDown),onKeyUp:lu(e.onKeyUp)}}}function $_(e){const t=fr(e);if(H_()==="virtual"){let n=t.activeElement;v_(()=>{t.activeElement===n&&e.isConnected&&ou(e)})}else ou(e)}function V_(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class bs{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new du({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&V_(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new bs;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new du({scopeRef:null}),this.fastMap.set(null,this.root)}}class du{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new bs;let W_=C.createContext(null);function G_(e){let t=C.useContext(W_)||{};N_(t,e);let{ref:n,...r}=t;return r}function Y_(e,t){let{focusProps:n}=M_(e),{keyboardProps:r}=z_(e),i=jr(n,r),a=G_(t),s=e.isDisabled?{}:a,o=C.useRef(e.autoFocus);return C.useEffect(()=>{o.current&&t.current&&$_(t.current),o.current=!1},[t]),{focusableProps:jr({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function q_(e,t,n){let{validationBehavior:r,focus:i}=e;hn(()=>{if(r==="native"&&n?.current){let u=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(Q_(n.current))}});let a=an(()=>{t.resetValidation()}),s=an(u=>{var c;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&n&&d&&K_(d)===n.current){var f;i?i():(f=n.current)===null||f===void 0||f.focus(),j_("keyboard")}u.preventDefault()}),o=an(()=>{t.commitValidation()});C.useEffect(()=>{let u=n?.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",s),u.addEventListener("change",o),c?.addEventListener("reset",a),()=>{u.removeEventListener("invalid",s),u.removeEventListener("change",o),c?.removeEventListener("reset",a)}},[n,s,o,a,r])}function X_(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function Q_(e){return{isInvalid:!e.validity.valid,validationDetails:X_(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function K_(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const Id={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Ad={...Id,customError:!0,valid:!1},Un={isInvalid:!1,validationDetails:Id,validationErrors:[]},J_=C.createContext({}),fu="__formValidationState"+Date.now();function Z_(e){if(e[fu]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[fu];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return eS(e)}function eS(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:o="aria"}=e;n&&(t||(t=n==="invalid"));let u=t?{isInvalid:!0,validationErrors:[],validationDetails:Ad}:null,c=C.useMemo(()=>hu(tS(s,i)),[s,i]);a?.validationDetails.valid&&(a=null);let d=C.useContext(J_),f=C.useMemo(()=>r?Array.isArray(r)?r.flatMap(N=>wa(d[N])):wa(d[r]):[],[d,r]),[m,h]=C.useState(d),[g,y]=C.useState(!1);d!==m&&(h(d),y(!1));let v=C.useMemo(()=>hu(g?[]:f),[g,f]),A=C.useRef(Un),[k,p]=C.useState(Un),O=C.useRef(Un),S=()=>{if(!w)return;B(!1);let N=c||a||A.current;Vi(N,O.current)||(O.current=N,p(N))},[w,B]=C.useState(!1);return C.useEffect(S),{realtimeValidation:u||v||c||a||Un,displayValidation:o==="native"?u||v||k:u||v||c||a||k,updateValidation(N){o==="aria"&&!Vi(k,N)?p(N):A.current=N},resetValidation(){let N=Un;Vi(N,O.current)||(O.current=N,p(N)),o==="native"&&B(!1),y(!0)},commitValidation(){o==="native"&&B(!0),y(!0)}}}function wa(e){return e?Array.isArray(e)?e:[e]:[]}function tS(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return wa(n)}return[]}function hu(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:Ad}:null}function Vi(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function nS(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=Ur(t);let s=Ur(),o={};n?(r=r?`${s} ${r}`:s,o={id:s,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let u=k_({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:o,fieldProps:u}}function rS(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=nS(e),o=su([!!t,!!n,r,i]),u=su([!!t,!!n,r,i]);return s=jr(s,{"aria-describedby":[o,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:o},errorMessageProps:{id:u}}}function iS(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:s="text",validationBehavior:o="aria"}=e,[u,c]=e_(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=Y_(e,t),f=Z_({...e,value:u}),{isInvalid:m,validationErrors:h,validationDetails:g}=f.displayValidation,{labelProps:y,fieldProps:v,descriptionProps:A,errorMessageProps:k}=rS({...e,isInvalid:m,errorMessage:e.errorMessage||h}),p=y_(e,{labelable:!0});const O={type:s,pattern:e.pattern};return O_(t,u,c),q_(e,f,t),C.useEffect(()=>{if(t.current instanceof Hr(t.current).HTMLTextAreaElement){let S=t.current;Object.defineProperty(S,"defaultValue",{get:()=>S.value,set:()=>{},configurable:!0})}},[t]),{labelProps:y,inputProps:jr(p,n==="input"&&O,{disabled:r,readOnly:a,required:i&&o==="native","aria-required":i&&o==="aria"||void 0,"aria-invalid":m||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:u,onChange:S=>c(S.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...v}),descriptionProps:A,errorMessageProps:k,isInvalid:m,validationErrors:h,validationDetails:g}}const aS=e=>e.charCodeAt(e.length-1)===10,sS=e=>{const[t,n]=C.useState(""),r=()=>{y.current&&(y.current.style.height=y.current.scrollHeight+"px")},i=()=>{y.current&&(y.current.style.height="48px")},a=N=>{n(N)};C.useEffect(r,[t]);const{label:s,SubmitComponent:o,onSubmit:u,isLoadingStream:c,audioEnabled:d=!1,MicComponent:f,onPressMicButton:m,LoadingComponent:h,onPressLoadingButton:g}=e,y=C.useRef(null),{labelProps:v,inputProps:A}=iS({...e,inputElementType:"textarea"},y),k=N=>{aS(N.target.value)||a(N.target.value)},p=N=>{if(N.key==="Enter"||N.code==="Enter"||N.keyCode===13||N.code==="NumpadEnter"){if(N.shiftKey)a(t+`
|
|
85
|
+
`);else if(!N.shiftKey){N.preventDefault(),N.stopPropagation(),c||B();return}}},O=N=>{(N.key==="Enter"||N.code==="Enter"||N.keyCode===13||N.code==="NumpadEnter")&&(N.preventDefault(),N.stopPropagation())},S=t.trim().length>0,w=!!(e.isDisabled||e.shouldDisableIfInputIsEmpty&&!S),B=()=>{w||(i(),u?.(t),a(""))},K=d&&!!f&&!!o&&!S&&!c,Y=()=>c&&h?b.jsx("div",{className:"relative",children:b.jsx(h,{onPressLoadingButton:g})}):o?!d||!f?b.jsx("div",{className:"relative",children:b.jsx(o,{onSubmitButton:B,isDisabled:w})}):S?b.jsx("div",{className:"relative",children:b.jsx(o,{onSubmitButton:B,isDisabled:w})}):b.jsxs("div",{className:"relative",children:[b.jsx("div",{className:"block md:hidden",children:b.jsx(f,{onPressMicButton:m})}),b.jsxs("div",{className:"hidden md:block",children:[b.jsx(f,{onPressMicButton:m,className:"md:!right-12"}),b.jsx(o,{onSubmitButton:B,isDisabled:w,className:"md:!right-3"})]})]}):null;return b.jsxs("div",{style:{display:"flex",flexDirection:"column"},className:`${e.classNameContainer} w-full`,children:[b.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[b.jsx("label",{...v,className:e.classNameLabel,children:s}),b.jsx("textarea",{...A,ref:y,className:`${e.classNameTextarea} p-3 ${K?"pr-12 md:pr-24":"pr-12"}`,onChange:k,value:t,rows:1,style:{overflow:"hidden",outlineColor:"#a8a8a8",border:"none",outline:"none",width:K?"calc(100% - 72px)":"calc(100% - 30px)",resize:"none"},onKeyDown:p,onKeyUp:O})]}),Y()]})},oS=({onSubmitButton:e,isDisabled:t,className:n})=>b.jsx("div",{children:b.jsx("button",{className:`absolute
|
|
86
86
|
bg-violet-600
|
|
87
87
|
md:bottom-2
|
|
88
88
|
md:right-3
|
|
@@ -102,14 +102,14 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
102
102
|
transition-colors
|
|
103
103
|
chatsystem-paperplane-button
|
|
104
104
|
chatsystem-primary-background
|
|
105
|
-
${n??""}`,"data-testid":"send-button",onClick:e,disabled:t,type:"button","aria-label":"Send message",children:
|
|
105
|
+
${n??""}`,"data-testid":"send-button",onClick:e,disabled:t,type:"button","aria-label":"Send message",children:b.jsx("span",{className:"","data-state":"closed",children:b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[b.jsx("path",{d:"M3 20L21 12L3 4L7.5 12L3 20Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),b.jsx("path",{d:"M7.5 12H14.75",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})}),uS=()=>{const{companySettings:e}=C.useContext(Rt);return b.jsx("div",{className:`search
|
|
106
106
|
transition
|
|
107
107
|
ease-in-out
|
|
108
108
|
delay-50
|
|
109
109
|
flex
|
|
110
110
|
justify-center
|
|
111
111
|
items-center
|
|
112
|
-
`,children:
|
|
112
|
+
`,children:b.jsx(Wa,{facet:e.agent.display[ee.AgentDisplayFacetRoleType.SEARCH]})})},cS=({loadingStatus:e,currentStepName:t,currentStepNumber:n,numberOfSteps:r})=>{const{getCurrentStepTranslated:i,stepTranslation:a,lookingForProductTranslation:s}=ja();return b.jsx(b.Fragment,{children:e==="loadingIntermediaryStates"&&b.jsxs("div",{children:[b.jsxs("div",{children:[b.jsx("p",{className:"text-center my-2 text-lg",children:s}),b.jsx("p",{className:"text-center my-1 text-md",children:t&&`${i(t)}`}),n&&b.jsxs("p",{className:"text-center my-2",children:[a,b.jsx("span",{children:" "}),n,"/",r]})]}),b.jsx("div",{className:"flex justify-center",children:b.jsx(uS,{})})]})})},lS=({onPressLoadingButton:e})=>b.jsx("div",{children:b.jsx("button",{className:`
|
|
113
113
|
absolute
|
|
114
114
|
bg-white
|
|
115
115
|
md:bottom-2
|
|
@@ -120,13 +120,13 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
120
120
|
disabled:opacity-10
|
|
121
121
|
disabled:text-gray-400
|
|
122
122
|
enabled:bg-white
|
|
123
|
-
text-white p-0.5 border border-white rounded-lg dark:border-white dark:bg-white transition-colors chatsystem-stop-button`,"data-testid":"stop-button","aria-label":"Stop response",onClick:e,type:"button",style:{outline:"none"},tabIndex:-1,onMouseDown:t=>t.preventDefault(),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},onKeyUp:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},children:
|
|
123
|
+
text-white p-0.5 border border-white rounded-lg dark:border-white dark:bg-white transition-colors chatsystem-stop-button`,"data-testid":"stop-button","aria-label":"Stop response",onClick:e,type:"button",style:{outline:"none"},tabIndex:-1,onMouseDown:t=>t.preventDefault(),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},onKeyUp:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},children:b.jsx("span",{className:"","data-state":"closed",children:b.jsxs("svg",{fill:"#000000",height:"24",width:"24",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 297 297",children:[b.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),b.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),b.jsxs("g",{id:"SVGRepo_iconCarrier",children:[" ",b.jsx("path",{d:"M148.5,0C66.486,0,0,66.486,0,148.5S66.486,297,148.5,297S297,230.514,297,148.5S230.514,0,148.5,0z M213.292,190.121 c0,12.912-10.467,23.379-23.378,23.379H106.67c-12.911,0-23.378-10.467-23.378-23.379v-83.242c0-12.912,10.467-23.379,23.378-23.379 h83.244c12.911,0,23.378,10.467,23.378,23.379V190.121z"})," "]})]})})})}),dS=4,fS=1;class hS{previousScrollTop=0;hasMeasuredViewport=!1;shouldFollow=!1;observeViewport(t){const n=t.scrollHeight>t.clientHeight,r=t.scrollHeight-t.scrollTop<=t.clientHeight+dS;return this.hasMeasuredViewport&&t.scrollTop<this.previousScrollTop-fS?this.shouldFollow=!1:r&&(this.shouldFollow=!0),this.previousScrollTop=t.scrollTop,this.hasMeasuredViewport=!0,{isAtBottom:r,isScrollable:n}}startFollowing(){this.shouldFollow=!0}shouldFollowContentChange(){return this.shouldFollow}}const mS=e=>{const t=C.useRef(null),n=C.useRef(null),r=C.useRef(new hS),i=C.useRef(null),[a,s]=C.useState(!1),o=()=>{const d=t.current;if(!d)return;const f=r.current.observeViewport({scrollTop:d.scrollTop,scrollHeight:d.scrollHeight,clientHeight:d.clientHeight});s(f.isScrollable&&!f.isAtBottom)},u=({smooth:d=!1,sticky:f=!1})=>{f&&r.current.startFollowing();const m=t.current;m&&m.scrollTo({top:m.scrollHeight,behavior:d?"smooth":"auto"})},c=({smooth:d=!1}={})=>{i.current={smooth:d},r.current.startFollowing()};return C.useEffect(()=>{const d=t.current;if(d)return d.addEventListener("scroll",o),o(),()=>{d.removeEventListener("scroll",o)}},[]),C.useLayoutEffect(()=>{const d=i.current;if(d){i.current=null,u({smooth:d.smooth,sticky:!0});return}r.current.shouldFollowContentChange()?u({smooth:!1}):o()},[e.length]),C.useEffect(()=>{const d=n.current;if(!d||typeof ResizeObserver>"u")return;const f=new ResizeObserver(()=>{r.current.shouldFollowContentChange()?u({smooth:!1}):o()});return f.observe(d),()=>f.disconnect()},[]),{scrollToBottom:u,requestScrollToBottomAfterNextRender:c,messagesContainerRef:t,messagesContentRef:n,showScrollButton:a}},pS=()=>{const e=Yt(),t=e.formatMessage({defaultMessage:"Discussion limit reached",id:"chatbot.DiscussionLimitReached.title"}),n=e.formatMessage({defaultMessage:"The discussion has reached its maximum number of messages. Please start a new one.",id:"chatbot.DiscussionLimitReached.explaination"}),r=e.formatMessage({defaultMessage:"Restart",id:"chatbot.DiscussionLimitReached.cta"});return{DiscussionLimitReachedTitleTranslation:t,DiscussionLimitReachedExplainationTranslation:n,DiscussionLimitReachedCtaTranslation:r}},gS=e=>Qe.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Qe.createElement("g",{clipPath:"url(#clip0_1276_7761)"},Qe.createElement("path",{d:"M19.7285 10.9288C20.4413 13.5978 19.7507 16.5635 17.6569 18.6573C15.1798 21.1344 11.4826 21.6475 8.5 20.1966M18.364 8.05071L17.6569 7.3436C14.5327 4.21941 9.46736 4.21941 6.34316 7.3436C3.42964 10.2571 3.23318 14.8588 5.75376 18M18.364 8.05071H14.1213M18.364 8.05071V3.80807",stroke:"#1C274C",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Qe.createElement("defs",null,Qe.createElement("clipPath",{id:"clip0_1276_7761"},Qe.createElement("rect",{width:24,height:24,fill:"white"})))),bS=({onReset:e})=>{const{DiscussionLimitReachedCtaTranslation:t,DiscussionLimitReachedExplainationTranslation:n,DiscussionLimitReachedTitleTranslation:r}=pS();return b.jsx(b.Fragment,{children:b.jsx("div",{className:"px-3 mt-4",children:b.jsxs("div",{role:"status","aria-live":"polite",className:"info-banner not-prose flex items-start gap-3 rounded-lg bg-blue-50 border-l-4 border-blue-500 p-4 shadow-sm",children:[b.jsx("div",{className:"flex flex-col justify-center items-center mx-3",children:b.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"!w-5 !h-5 mt-0.5 flex-shrink-0 pointer-events-none",children:b.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16Zm.75-11.5a.75.75 0 10-1.5 0 .75.75 0 001.5 0ZM9 8.75A.75.75 0 019.75 8h.5a.75.75 0 01.75.75v5a.75.75 0 01-.75.75h-.5A.75.75 0 019 13.75v-5Z",clipRule:"evenodd"})})}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("p",{className:"font-semibold",children:r}),b.jsx("p",{className:"text-sm break-words",children:n}),b.jsx("div",{className:"my-2",children:b.jsxs("button",{type:"button",onClick:e,title:t,"aria-label":t,className:`group inline-flex items-center gap-2 rounded-full px-3 py-1.5
|
|
124
124
|
font-medium text-blue-700 dark:text-blue-300
|
|
125
125
|
bg-blue-50/70 hover:bg-blue-100 dark:bg-blue-900/20 dark:hover:bg-blue-900/30
|
|
126
126
|
ring-1 ring-inset ring-blue-600/20 hover:ring-blue-600/30
|
|
127
127
|
shadow-sm transition-all duration-200
|
|
128
128
|
focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/50
|
|
129
|
-
active:scale-[0.98]`,children:[
|
|
129
|
+
active:scale-[0.98]`,children:[b.jsx(gS,{"aria-hidden":"true",className:"w-5 h-5 transition-transform duration-200 group-hover:rotate-180"}),b.jsx("span",{children:t})]})})]})]})})})},ES=({onClick:e,label:t="voir les messages plus récents",className:n})=>{const[r,i]=C.useState(!1);return C.useEffect(()=>{const a=requestAnimationFrame(()=>i(!0));return()=>cancelAnimationFrame(a)},[]),b.jsx("button",{onClick:e,className:["absolute z-10 select-none outline-none","bottom-20 right-8 left-auto translate-x-0 top-auto","transition-all duration-300 ease-out",r?"opacity-100 translate-y-0":"opacity-0 -translate-y-1",n??""].join(" "),"aria-label":t,title:t,children:b.jsx("span",{className:["inline-flex items-center justify-center","w-9 h-9","rounded-full bg-white shadow-md","hover:shadow-lg transition-shadow","p-2"].join(" "),children:b.jsx(Cc,{className:"w-4 h-4",fill:"#64748b"})})})},mu=({message:e,actionLabel:t,onClick:n})=>b.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-md border border-sky-100 bg-sky-50 px-3 py-2 text-xs text-sky-900 shadow-sm",children:[b.jsx("div",{className:"mt-0.5 inline-flex h-4 w-4 items-center justify-center rounded-full bg-sky-500 text-[10px] font-semibold text-white",children:"i"}),b.jsxs("div",{className:"flex-1",children:[b.jsx("p",{className:"leading-snug",children:e}),b.jsx("button",{type:"button",onClick:n,className:"mt-1 inline-flex items-center text-[11px] font-medium text-sky-700 hover:text-sky-900 hover:underline",children:t})]})]}),TS=({config:e,status:t,labels:n,onSubmit:r})=>{const[i,a]=C.useState(""),[s,o]=C.useState(""),u=t==="submitting",c=t==="submitted";return b.jsx(gs,{modifier:"contact-capture",state:t,children:c?b.jsx(wn,{tone:"success",children:n.success}):b.jsxs("form",{className:"chatsystem-interactive-widget__form grid gap-3",onSubmit:async d=>{d.preventDefault(),await r({email:i,phone:s})},children:[b.jsx(nn,{title:n.title,description:n.description}),b.jsxs("div",{className:"chatsystem-interactive-widget__fields grid gap-3 sm:grid-cols-2",children:[b.jsx(_n,{id:"support-fallback-email",label:n.email,required:e.requireEmail,children:b.jsx("input",{id:"support-fallback-email",className:"chatsystem-interactive-widget__control w-full rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm outline-none",type:"email",value:i,required:e.requireEmail,disabled:u,placeholder:n.email,"aria-label":n.email,onChange:d=>a(d.currentTarget.value)})}),b.jsx(_n,{id:"support-fallback-phone",label:n.phone,required:e.requirePhone,children:b.jsx("input",{id:"support-fallback-phone",className:"chatsystem-interactive-widget__control w-full rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm outline-none",type:"tel",value:s,required:e.requirePhone,disabled:u,placeholder:n.phone,"aria-label":n.phone,onChange:d=>o(d.currentTarget.value)})})]}),t==="failed"&&b.jsx(wn,{tone:"danger",children:n.error}),b.jsx(ui,{children:b.jsx(tr,{type:"submit",disabled:u,children:u?n.submitting:n.submit})})]})})},yS=({config:e,status:t,scheduleLabel:n,labels:r,onSubmit:i})=>{const[a,s]=C.useState(""),[o,u]=C.useState(""),[c,d]=C.useState(""),f=t==="submitting",m=t==="submitted";return b.jsx(gs,{modifier:"closed-hours-contact-capture",state:t,children:m?b.jsx(wn,{tone:"success",children:r.success}):b.jsxs("form",{className:"chatsystem-interactive-widget__form grid gap-3",onSubmit:async h=>{h.preventDefault(),await i({email:a,phone:o,reason:c})},children:[b.jsxs("div",{children:[b.jsx(nn,{title:r.title,description:r.description}),n?b.jsxs("p",{className:"chatsystem-interactive-widget__schedule text-xs font-medium text-slate-600",children:[r.schedulePrefix," ",n]}):null]}),b.jsxs("div",{className:"chatsystem-interactive-widget__fields grid gap-3 sm:grid-cols-2",children:[b.jsx(_n,{id:"support-closed-email",label:r.email,required:e.requireEmail,children:b.jsx("input",{id:"support-closed-email",className:"chatsystem-interactive-widget__control w-full rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm outline-none",type:"email",value:a,required:e.requireEmail,disabled:f,placeholder:r.email,"aria-label":r.email,onChange:h=>s(h.currentTarget.value)})}),b.jsx(_n,{id:"support-closed-phone",label:r.phone,required:e.requirePhone,children:b.jsx("input",{id:"support-closed-phone",className:"chatsystem-interactive-widget__control w-full rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm outline-none",type:"tel",value:o,required:e.requirePhone,disabled:f,placeholder:r.phone,"aria-label":r.phone,onChange:h=>u(h.currentTarget.value)})}),b.jsx(_n,{id:"support-closed-reason",label:r.reason,required:e.requireReason,children:b.jsx("textarea",{id:"support-closed-reason",className:"chatsystem-interactive-widget__control min-h-24 w-full resize-y rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm outline-none",value:c,required:e.requireReason,disabled:f,placeholder:r.reason,"aria-label":r.reason,onChange:h=>d(h.currentTarget.value)})})]}),t==="failed"&&b.jsx(wn,{tone:"danger",children:r.error}),b.jsx(ui,{children:b.jsx(tr,{type:"submit",disabled:f,children:f?r.submitting:r.submit})})]})})},xS=({onPressMicButton:e,isDisabled:t,className:n})=>b.jsx("div",{children:b.jsx("button",{className:`absolute
|
|
130
130
|
bg-violet-600
|
|
131
131
|
md:bottom-2
|
|
132
132
|
md:right-3
|
|
@@ -146,12 +146,12 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
146
146
|
enabled:hover:scale-[1.02] active:scale-[0.98]
|
|
147
147
|
chatsystem-mic-button
|
|
148
148
|
chatsystem-primary-background
|
|
149
|
-
${n??""}`,"data-testid":"mic-button",onClick:e,disabled:t,type:"button","aria-label":"Start voice input",children:x.jsx("span",{"data-state":"closed",children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[x.jsx("path",{d:"M12 14.5c1.66 0 3-1.34 3-3V6.5c0-1.66-1.34-3-3-3s-3 1.34-3 3v5c0 1.66 1.34 3 3 3Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),x.jsx("path",{d:"M12 14.5V18",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),x.jsx("path",{d:"M8.5 18h7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),x.jsx("path",{d:"M7 11.5c0 2.76 2.24 5 5 5s5-2.24 5-5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});function FS(){const[e,t]=S.useState("idle"),[n,r]=S.useState(null),[i,a]=S.useState(0),s=S.useRef(null),o=S.useRef(null),u=S.useRef([]),c=S.useRef(null),d=S.useRef(null),f=S.useRef(null),p=S.useRef(null),h=S.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{f.current?.disconnect()}catch{}f.current=null;try{d.current?.disconnect()}catch{}d.current=null;const A=c.current;c.current=null,A&&A.close().catch(()=>{}),a(0)},[]),b=S.useCallback(A=>{try{const N=new AudioContext,L=N.createAnalyser(),w=N.createMediaStreamSource(A);L.fftSize=256,L.smoothingTimeConstant=.85,w.connect(L),c.current=N,d.current=L,f.current=w;const k=new Uint8Array(L.fftSize),Y=()=>{const J=d.current;if(!J)return;J.getByteTimeDomainData(k);let X=0;for(let z=0;z<k.length;z++){const U=(k[z]-128)/128;X+=U*U}const I=Math.sqrt(X/k.length),j=Math.min(1,I*6);a(j),p.current=requestAnimationFrame(Y)};p.current=requestAnimationFrame(Y)}catch{a(0)}},[]),E=S.useCallback(async()=>{r(null),h();try{const A=await navigator.mediaDevices.getUserMedia({audio:!0});o.current=A,b(A);const L=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg"].find(k=>MediaRecorder.isTypeSupported(k))||"",w=new MediaRecorder(A,L?{mimeType:L}:void 0);s.current=w,u.current=[],w.ondataavailable=k=>{k.data&&k.data.size>0&&u.current.push(k.data)},w.onerror=()=>{t("error"),r("Recorder error.")},w.onstart=()=>t("recording"),w.onstop=()=>t("stopped"),w.start()}catch(A){h(),t("error"),r(A?.message??"Microphone permission denied.")}},[b,h]),v=S.useCallback(async()=>{const A=s.current,N=o.current;return!A||e!=="recording"?null:new Promise(L=>{A.onstop=()=>{h();const w=A.mimeType||"audio/webm",k=new Blob(u.current,{type:w}),Y=w.includes("ogg")?"ogg":"webm",J=new File([k],`voice-message.${Y}`,{type:w});N?.getTracks().forEach(X=>X.stop()),o.current=null,s.current=null,L({blob:k,file:J})},A.stop()})},[e,h]),C=S.useCallback(()=>{const A=s.current,N=o.current;try{A&&e==="recording"&&A.stop()}catch{}h(),N?.getTracks().forEach(L=>L.stop()),o.current=null,s.current=null,u.current=[],t("idle")},[e,h]);return S.useEffect(()=>()=>{h(),o.current?.getTracks().forEach(A=>A.stop())},[h]),{state:e,error:n,audioLevel:i,start:E,stop:v,cancel:C}}const HS=()=>{const e=on(),t=e.formatMessage({defaultMessage:"Recording...",id:"recordingOverlay.recording"}),n=e.formatMessage({defaultMessage:"Cancel",id:"recordingOverlay.cancel"}),r=e.formatMessage({defaultMessage:"Tap the mic to stop",id:"recordingOverlay.explaination"});return{recordingTranslation:t,cancelTranslation:n,recordingExplainationTranslation:r}},US=({isOpen:e,onStop:t,onCancel:n,audioLevel:r=0})=>{const{recordingTranslation:i}=HS(),a=S.useMemo(()=>{const s=Math.max(0,Math.min(1,r));return Array.from({length:20},(o,u)=>{const c=Math.sin(u/19*Math.PI*2)*.5+.5,d=u%2===0?.9:.65,f=6+s*(14+c*18)*d;return Math.round(f)})},[r]);return e?x.jsx("div",{className:"relative mt-3 w-full rounded-lg border border-slate-400 bg-white p-1",role:"group","aria-label":"Recording voice message",children:x.jsxs("div",{className:"flex min-h-[48px] items-center gap-3 px-2",children:[x.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[x.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-100 motion-safe:animate-ping","aria-hidden":!0}),x.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-50","aria-hidden":!0}),x.jsx("span",{className:"absolute h-3.5 w-3.5 rounded-full bg-red-200","aria-hidden":!0}),x.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-red-500","aria-hidden":!0})]}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"mb-0.5 text-[11px] font-medium leading-3 text-slate-600",children:i}),x.jsx("div",{className:"flex h-5 items-center gap-[3px] overflow-hidden","aria-hidden":"true",children:a.map((s,o)=>x.jsx("span",{className:"block w-1 rounded-full bg-slate-400 transition-[height,background-color] duration-75",style:{height:`${s}px`,backgroundColor:r>.08?"rgb(59 130 246)":"rgb(148 163 184)"}},o))})]}),x.jsx("button",{type:"button",onClick:n,className:"flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-slate-700","aria-label":"Cancel recording",children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:x.jsx("path",{d:"M6 6l12 12M18 6L6 18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),x.jsx("button",{type:"button",onClick:t,className:"flex h-9 w-9 items-center justify-center rounded-full bg-violet-600 text-white hover:bg-violet-700","aria-label":"Validate recording",children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:x.jsx("path",{d:"M5 13l4 4L19 7",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}):null};function jS({conversationStarters:e,onSelect:t}){return x.jsx("div",{className:"conversation-starters",children:e.map(n=>x.jsx("button",{type:"button",className:"conversation-starter-button",onClick:()=>t(n),children:n},n))})}const zS=({conversationStarters:e,conversationItems:t,isLoading:n,isCustomerSupportMode:r,isAtMaxMessages:i})=>e.length===0||n||r||i?!1:!t.some(s=>s.userType==="user"),td=({containerClassName:e})=>{const t=S.useRef(null),n=S0(),{appToken:r,loadingStatus:i,numberOfSteps:a,currentStepName:s,currentStepNumber:o,isAtMaxMessages:u,isCustomerSupportMode:c,customerSupportStatusMessage:d,fallbackContactCaptureConfig:f,fallbackContactCaptureStatus:p,shouldDisplayFallbackContactCapture:h,submitFallbackContactCapture:b,closedHoursContactCaptureConfig:E,closedHoursBusinessHours:v,closedHoursContactCaptureStatus:C,shouldDisplayClosedHoursContactCapture:A,submitClosedHoursContactCapture:N,isTextareaDisabled:L,cancelRequest:w,submitTextMessage:k,submitAudio:Y}=n,{placeholderTranslation:J,infoBannerExplainationTranslation:X,infoBannerTitleTranslation:I,customerSupportRestartTranslation:j,customerSupportFallbackTitleTranslation:z,customerSupportFallbackDescriptionTranslation:U,customerSupportFallbackEmailTranslation:F,customerSupportFallbackPhoneTranslation:q,customerSupportFallbackSubmitTranslation:he,customerSupportFallbackSubmittingTranslation:le,customerSupportFallbackSuccessTranslation:Ie,customerSupportFallbackErrorTranslation:we,customerSupportClosedHoursTitleTranslation:m,customerSupportClosedHoursDescriptionTranslation:G,customerSupportClosedHoursSchedulePrefixTranslation:ne,customerSupportClosedHoursReasonTranslation:y,customerSupportClosedHoursSuccessTranslation:K}=Ca(),{currentConversation:Z,resetConversation:W,archivedConversation:oe,setArchivedConversationAsMain:ae}=Fr(),{companySettings:re}=S.useContext(Nt),{recentMessagesTranslation:se}=Aa(),{scrollToBottom:Se,showScrollButton:V,messagesContainerRef:ve,requestScrollToBottomAfterNextRender:ze,messagesContentRef:Ge}=NS(Z.items),[Ze,it]=S.useState(!1),{start:$e,stop:_t,cancel:Et,audioLevel:me}=FS(),[Oe,Ae]=S.useState(!0),[B,R]=S.useState(()=>typeof window>"u"?!0:!(window.matchMedia("(pointer: coarse)").matches||window.matchMedia("(hover: none)").matches));S.useEffect(()=>{if(typeof window>"u")return;const Le=window.matchMedia("(pointer: coarse)"),Ue=window.matchMedia("(hover: none)"),Tt=()=>R(!(Le.matches||Ue.matches));return Tt(),Le.addEventListener?(Le.addEventListener("change",Tt),Ue.addEventListener("change",Tt)):(Le.addListener(Tt),Ue.addListener(Tt)),()=>{Le.removeEventListener?(Le.removeEventListener("change",Tt),Ue.removeEventListener("change",Tt)):(Le.removeListener(Tt),Ue.removeListener(Tt))}},[]);const Q=i!=="notLoading"||Z.items.length>0?{maxHeight:"100vh"}:{height:"250px"},ie=oe.items.length>0,Ee=()=>{ae(),Ae(!1)},ce=Le=>{k(Le)&&(Ae(!1),ze({smooth:!0}))},ke=async()=>{it(!0),await $e()},He=async()=>{const Le=await _t();it(!1),Le&&Y(Le.file)},ut=()=>{Et(),it(!1)},et=re?.agent?.text?.conversationStarters??[],Ve=zS({conversationStarters:et,conversationItems:Z.items,isLoading:i!=="notLoading",isCustomerSupportMode:c,isAtMaxMessages:u});return x.jsxs("div",{className:["chatbox-root relative p-2","flex flex-col min-h-0 overflow-visible","h-auto",e??"mx-auto"].join(" "),ref:t,style:Q,children:[x.jsx("div",{className:"flex-1 overflow-y-auto min-h-0 messagesContainer",ref:ve,children:x.jsxs("div",{ref:Ge,children:[Z.items.map((Le,Ue)=>x.jsx(mx,{content:Le.content,userType:Le.userType,metaData:Le.metaData,context:{discussionId:Z.discussionId,messageIndex:Ue,appToken:r},seenRootEl:ve.current},Le.temporaryId)),x.jsx(AS,{currentStepName:s,currentStepNumber:o,loadingStatus:i,numberOfSteps:a})]})}),V&&x.jsx(DS,{label:se,onClick:()=>Se({smooth:!0,sticky:!0})}),!c&&u&&x.jsx(LS,{onReset:W}),A&&E&&x.jsx(MS,{config:E,status:C,scheduleLabel:v?.todayScheduleLabel,labels:{title:m,description:G,schedulePrefix:ne,email:F,phone:q,reason:y,submit:he,submitting:le,success:K,error:we},onSubmit:N}),h&&f&&x.jsx(PS,{config:f,status:p,labels:{title:z,description:U,email:F,phone:q,submit:he,submitting:le,success:Ie,error:we},onSubmit:b}),d&&x.jsx(Vo,{actionLabel:j,message:d,onClick:W}),ie&&Oe&&x.jsx(Vo,{actionLabel:I,message:X,onClick:Ee}),Ve&&x.jsx(jS,{conversationStarters:et,onSelect:ce}),x.jsx("div",{className:"chatbox-input-wrapper flex-shrink-0",children:Ze?x.jsx(US,{isOpen:Ze,onStop:He,onCancel:ut,audioLevel:me}):x.jsx(SS,{classNameTextarea:"",classNameContainer:"relative mt-2 border-slate-400 border-[1px] rounded-lg p-1",SubmitComponent:_S,isDisabled:L,shouldDisableIfInputIsEmpty:!0,"aria-label":"TextArea For Bot Conversation",onSubmit:ce,placeholder:J,autoFocus:B,isLoadingStream:i!=="notLoading",LoadingComponent:wS,onPressLoadingButton:w,onPressMicButton:ke,MicComponent:BS,audioEnabled:re?.agent?.isAudioAllowed&&!c})})]})};function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Or.apply(this,arguments)}function nd(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function fa(e,t){return fa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},fa(e,t)}function rd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fa(e,t)}var pr={exports:{}};/*
|
|
149
|
+
${n??""}`,"data-testid":"mic-button",onClick:e,disabled:t,type:"button","aria-label":"Start voice input",children:b.jsx("span",{"data-state":"closed",children:b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[b.jsx("path",{d:"M12 14.5c1.66 0 3-1.34 3-3V6.5c0-1.66-1.34-3-3-3s-3 1.34-3 3v5c0 1.66 1.34 3 3 3Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),b.jsx("path",{d:"M12 14.5V18",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),b.jsx("path",{d:"M8.5 18h7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),b.jsx("path",{d:"M7 11.5c0 2.76 2.24 5 5 5s5-2.24 5-5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});function _S(){const[e,t]=C.useState("idle"),[n,r]=C.useState(null),[i,a]=C.useState(0),s=C.useRef(null),o=C.useRef(null),u=C.useRef([]),c=C.useRef(null),d=C.useRef(null),f=C.useRef(null),m=C.useRef(null),h=C.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null);try{f.current?.disconnect()}catch{}f.current=null;try{d.current?.disconnect()}catch{}d.current=null;const k=c.current;c.current=null,k&&k.close().catch(()=>{}),a(0)},[]),g=C.useCallback(k=>{try{const p=new AudioContext,O=p.createAnalyser(),S=p.createMediaStreamSource(k);O.fftSize=256,O.smoothingTimeConstant=.85,S.connect(O),c.current=p,d.current=O,f.current=S;const w=new Uint8Array(O.fftSize),B=()=>{const K=d.current;if(!K)return;K.getByteTimeDomainData(w);let Y=0;for(let $=0;$<w.length;$++){const j=(w[$]-128)/128;Y+=j*j}const N=Math.sqrt(Y/w.length),H=Math.min(1,N*6);a(H),m.current=requestAnimationFrame(B)};m.current=requestAnimationFrame(B)}catch{a(0)}},[]),y=C.useCallback(async()=>{r(null),h();try{const k=await navigator.mediaDevices.getUserMedia({audio:!0});o.current=k,g(k);const O=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg"].find(w=>MediaRecorder.isTypeSupported(w))||"",S=new MediaRecorder(k,O?{mimeType:O}:void 0);s.current=S,u.current=[],S.ondataavailable=w=>{w.data&&w.data.size>0&&u.current.push(w.data)},S.onerror=()=>{t("error"),r("Recorder error.")},S.onstart=()=>t("recording"),S.onstop=()=>t("stopped"),S.start()}catch(k){h(),t("error"),r(k?.message??"Microphone permission denied.")}},[g,h]),v=C.useCallback(async()=>{const k=s.current,p=o.current;return!k||e!=="recording"?null:new Promise(O=>{k.onstop=()=>{h();const S=k.mimeType||"audio/webm",w=new Blob(u.current,{type:S}),B=S.includes("ogg")?"ogg":"webm",K=new File([w],`voice-message.${B}`,{type:S});p?.getTracks().forEach(Y=>Y.stop()),o.current=null,s.current=null,O({blob:w,file:K})},k.stop()})},[e,h]),A=C.useCallback(()=>{const k=s.current,p=o.current;try{k&&e==="recording"&&k.stop()}catch{}h(),p?.getTracks().forEach(O=>O.stop()),o.current=null,s.current=null,u.current=[],t("idle")},[e,h]);return C.useEffect(()=>()=>{h(),o.current?.getTracks().forEach(k=>k.stop())},[h]),{state:e,error:n,audioLevel:i,start:y,stop:v,cancel:A}}const SS=()=>{const e=Yt(),t=e.formatMessage({defaultMessage:"Recording...",id:"recordingOverlay.recording"}),n=e.formatMessage({defaultMessage:"Cancel",id:"recordingOverlay.cancel"}),r=e.formatMessage({defaultMessage:"Tap the mic to stop",id:"recordingOverlay.explaination"});return{recordingTranslation:t,cancelTranslation:n,recordingExplainationTranslation:r}},CS=({isOpen:e,onStop:t,onCancel:n,audioLevel:r=0})=>{const{recordingTranslation:i}=SS(),a=C.useMemo(()=>{const s=Math.max(0,Math.min(1,r));return Array.from({length:20},(o,u)=>{const c=Math.sin(u/19*Math.PI*2)*.5+.5,d=u%2===0?.9:.65,f=6+s*(14+c*18)*d;return Math.round(f)})},[r]);return e?b.jsx("div",{className:"relative mt-3 w-full rounded-lg border border-slate-400 bg-white p-1",role:"group","aria-label":"Recording voice message",children:b.jsxs("div",{className:"flex min-h-[48px] items-center gap-3 px-2",children:[b.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[b.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-100 motion-safe:animate-ping","aria-hidden":!0}),b.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-50","aria-hidden":!0}),b.jsx("span",{className:"absolute h-3.5 w-3.5 rounded-full bg-red-200","aria-hidden":!0}),b.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-red-500","aria-hidden":!0})]}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"mb-0.5 text-[11px] font-medium leading-3 text-slate-600",children:i}),b.jsx("div",{className:"flex h-5 items-center gap-[3px] overflow-hidden","aria-hidden":"true",children:a.map((s,o)=>b.jsx("span",{className:"block w-1 rounded-full bg-slate-400 transition-[height,background-color] duration-75",style:{height:`${s}px`,backgroundColor:r>.08?"rgb(59 130 246)":"rgb(148 163 184)"}},o))})]}),b.jsx("button",{type:"button",onClick:n,className:"flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-slate-700","aria-label":"Cancel recording",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:b.jsx("path",{d:"M6 6l12 12M18 6L6 18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),b.jsx("button",{type:"button",onClick:t,className:"flex h-9 w-9 items-center justify-center rounded-full bg-violet-600 text-white hover:bg-violet-700","aria-label":"Validate recording",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:b.jsx("path",{d:"M5 13l4 4L19 7",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}):null};function IS({conversationStarters:e,onSelect:t}){return b.jsx("div",{className:"conversation-starters",children:e.map(n=>b.jsx("button",{type:"button",className:"conversation-starter-button",onClick:()=>t(n),children:n},n))})}const AS=({conversationStarters:e,conversationItems:t,isLoading:n,isCustomerSupportMode:r,isAtMaxMessages:i})=>e.length===0||n||r||i?!1:!t.some(s=>s.userType==="user"),wd=({containerClassName:e})=>{const t=C.useRef(null),n=xc(),{appToken:r,loadingStatus:i,numberOfSteps:a,currentStepName:s,currentStepNumber:o,isAtMaxMessages:u,isCustomerSupportMode:c,customerSupportStatusMessage:d,fallbackContactCaptureConfig:f,fallbackContactCaptureStatus:m,shouldDisplayFallbackContactCapture:h,submitFallbackContactCapture:g,closedHoursContactCaptureConfig:y,closedHoursBusinessHours:v,closedHoursContactCaptureStatus:A,shouldDisplayClosedHoursContactCapture:k,submitClosedHoursContactCapture:p,isTextareaDisabled:O,cancelRequest:S,submitTextMessage:w,submitAudio:B}=n,{placeholderTranslation:K,infoBannerExplainationTranslation:Y,infoBannerTitleTranslation:N,customerSupportRestartTranslation:H,customerSupportFallbackTitleTranslation:$,customerSupportFallbackDescriptionTranslation:j,customerSupportFallbackEmailTranslation:z,customerSupportFallbackPhoneTranslation:Z,customerSupportFallbackSubmitTranslation:fe,customerSupportFallbackSubmittingTranslation:ie,customerSupportFallbackSuccessTranslation:ve,customerSupportFallbackErrorTranslation:xe,customerSupportClosedHoursTitleTranslation:E,customerSupportClosedHoursDescriptionTranslation:W,customerSupportClosedHoursSchedulePrefixTranslation:ne,customerSupportClosedHoursReasonTranslation:_,customerSupportClosedHoursSuccessTranslation:Q}=Ha(),{currentConversation:ae,resetConversation:X,archivedConversation:se,setArchivedConversationAsMain:re}=Xr(),{companySettings:ce}=C.useContext(Rt),{recentMessagesTranslation:ue}=ja(),{scrollToBottom:ke,showScrollButton:G,messagesContainerRef:Le,requestScrollToBottomAfterNextRender:ze,messagesContentRef:rt}=mS(ae.items),[Ye,it]=C.useState(!1),{start:Ue,stop:Ct,cancel:yt,audioLevel:Te}=_S(),[De,we]=C.useState(!0),[F,R]=C.useState(()=>typeof window>"u"?!0:!(window.matchMedia("(pointer: coarse)").matches||window.matchMedia("(hover: none)").matches));C.useEffect(()=>{if(typeof window>"u")return;const Oe=window.matchMedia("(pointer: coarse)"),We=window.matchMedia("(hover: none)"),ft=()=>R(!(Oe.matches||We.matches));return ft(),Oe.addEventListener?(Oe.addEventListener("change",ft),We.addEventListener("change",ft)):(Oe.addListener(ft),We.addListener(ft)),()=>{Oe.removeEventListener?(Oe.removeEventListener("change",ft),We.removeEventListener("change",ft)):(Oe.removeListener(ft),We.removeListener(ft))}},[]);const J=i!=="notLoading"||ae.items.length>0?{maxHeight:"100vh"}:{height:"250px"},oe=se.items.length>0,Se=()=>{re(),we(!1)},he=Oe=>{w(Oe)&&(we(!1),ze({smooth:!0}))},Pe=async()=>{it(!0),await Ue()},Ze=async()=>{const Oe=await Ct();it(!1),Oe&&B(Oe.file)},ot=()=>{yt(),it(!1)},Je=ce?.agent?.text?.conversationStarters??[],He=AS({conversationStarters:Je,conversationItems:ae.items,isLoading:i!=="notLoading",isCustomerSupportMode:c,isAtMaxMessages:u});return b.jsxs("div",{className:["chatbox-root relative p-2","flex flex-col min-h-0 overflow-visible","h-auto",e??"mx-auto"].join(" "),ref:t,style:J,children:[b.jsx("div",{className:"flex-1 overflow-y-auto min-h-0 messagesContainer",ref:Le,children:b.jsxs("div",{ref:rt,children:[ae.items.map((Oe,We)=>b.jsx(Zx,{content:Oe.content,userType:Oe.userType,metaData:Oe.metaData,context:{discussionId:ae.discussionId,messageIndex:We,appToken:r},seenRootEl:Le.current},Oe.temporaryId)),b.jsx(cS,{currentStepName:s,currentStepNumber:o,loadingStatus:i,numberOfSteps:a})]})}),G&&b.jsx(ES,{label:ue,onClick:()=>ke({smooth:!0,sticky:!0})}),!c&&u&&b.jsx(bS,{onReset:X}),k&&y&&b.jsx(yS,{config:y,status:A,scheduleLabel:v?.todayScheduleLabel,labels:{title:E,description:W,schedulePrefix:ne,email:z,phone:Z,reason:_,submit:fe,submitting:ie,success:Q,error:xe},onSubmit:p}),h&&f&&b.jsx(TS,{config:f,status:m,labels:{title:$,description:j,email:z,phone:Z,submit:fe,submitting:ie,success:ve,error:xe},onSubmit:g}),d&&b.jsx(mu,{actionLabel:H,message:d,onClick:X}),oe&&De&&b.jsx(mu,{actionLabel:N,message:Y,onClick:Se}),He&&b.jsx(IS,{conversationStarters:Je,onSelect:he}),b.jsx("div",{className:"chatbox-input-wrapper flex-shrink-0",children:Ye?b.jsx(CS,{isOpen:Ye,onStop:Ze,onCancel:ot,audioLevel:Te}):b.jsx(sS,{classNameTextarea:"",classNameContainer:"relative mt-2 border-slate-400 border-[1px] rounded-lg p-1",SubmitComponent:oS,isDisabled:O,shouldDisableIfInputIsEmpty:!0,"aria-label":"TextArea For Bot Conversation",onSubmit:he,placeholder:K,autoFocus:F,isLoadingStream:i!=="notLoading",LoadingComponent:lS,onPressLoadingButton:S,onPressMicButton:Pe,MicComponent:xS,audioEnabled:ce?.agent?.isAudioAllowed&&!c})})]})};function $r(){return $r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$r.apply(this,arguments)}function vd(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function va(e,t){return va=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},va(e,t)}function kd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,va(e,t)}var Ir={exports:{}};/*
|
|
150
150
|
object-assign
|
|
151
151
|
(c) Sindre Sorhus
|
|
152
152
|
@license MIT
|
|
153
|
-
*/var
|
|
154
|
-
Valid keys: `+JSON.stringify(Object.keys(m),null," "));var V=Se(oe,se,K,Z,W+"."+se,n);if(V)return V}return null}return v(G)}function F(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(F);if(m===null||o(m))return!0;var G=f(m);if(G){var ne=G.call(m),y;if(G!==m.entries){for(;!(y=ne.next()).done;)if(!F(y.value))return!1}else for(;!(y=ne.next()).done;){var K=y.value;if(K&&!F(K[1]))return!1}}else return!1;return!0;default:return!1}}function q(m,G){return m==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function he(m){var G=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":q(G,m)?"symbol":G}function le(m){if(typeof m>"u"||m===null)return""+m;var G=he(m);if(G==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return G}function Ie(m){var G=le(m);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function we(m){return!m.constructor||!m.constructor.name?p:m.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Li}var Di,Jo;function VS(){if(Jo)return Di;Jo=1;var e=ts();function t(){}function n(){}return n.resetWarningCache=t,Di=function(){function r(s,o,u,c,d,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Di}var Zo;function qS(){if(Zo)return pr.exports;if(Zo=1,process.env.NODE_ENV!=="production"){var e=ga(),t=!0;pr.exports=GS()(e.isElement,t)}else pr.exports=VS()();return pr.exports}var WS=qS();const fe=ma(WS);function XS(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function QS(e,t){e.classList?e.classList.add(t):XS(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function eu(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function KS(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=eu(e.className,t):e.setAttribute("class",eu(e.className&&e.className.baseVal||"",t))}const tu={disabled:!1};var JS=process.env.NODE_ENV!=="production"?fe.oneOfType([fe.number,fe.shape({enter:fe.number,exit:fe.number,appear:fe.number}).isRequired]):null,ZS=process.env.NODE_ENV!=="production"?fe.oneOfType([fe.string,fe.shape({enter:fe.string,exit:fe.string,active:fe.string}),fe.shape({enter:fe.string,enterDone:fe.string,enterActive:fe.string,exit:fe.string,exitDone:fe.string,exitActive:fe.string})]):null;const ad=S.createContext(null);var sd=function(t){return t.scrollTop},Pn="unmounted",Qt="exited",Kt="entering",gn="entered",ha="exiting",Lt=(function(e){rd(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,u;return a.appearStatus=null,r.in?o?(u=Qt,a.appearStatus=Kt):u=gn:r.unmountOnExit||r.mountOnEnter?u=Pn:u=Qt,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===Pn?{status:Qt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Kt&&s!==gn&&(a=Kt):(s===Kt||s===gn)&&(a=ha)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Kt){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Ln.findDOMNode(this);s&&sd(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qt&&this.setState({status:Pn})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[Ln.findDOMNode(this),o],c=u[0],d=u[1],f=this.getTimeouts(),p=o?f.appear:f.enter;if(!i&&!s||tu.disabled){this.safeSetState({status:gn},function(){a.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Kt},function(){a.props.onEntering(c,d),a.onTransitionEnd(p,function(){a.safeSetState({status:gn},function(){a.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:Ln.findDOMNode(this);if(!a||tu.disabled){this.safeSetState({status:Qt},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:ha},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Qt},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:Ln.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Pn)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=nd(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return S.createElement(ad.Provider,{value:null},typeof s=="function"?s(i,o):S.cloneElement(S.Children.only(s),o))},t})(S.Component);Lt.contextType=ad;Lt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:fe.shape({current:typeof Element>"u"?fe.any:function(e,t,n,r,i,a){var s=e[t];return fe.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:fe.oneOfType([fe.func.isRequired,fe.element.isRequired]).isRequired,in:fe.bool,mountOnEnter:fe.bool,unmountOnExit:fe.bool,appear:fe.bool,enter:fe.bool,exit:fe.bool,timeout:function(t){var n=JS;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return n.apply(void 0,[t].concat(i))},addEndListener:fe.func,onEnter:fe.func,onEntering:fe.func,onEntered:fe.func,onExit:fe.func,onExiting:fe.func,onExited:fe.func}:{};function hn(){}Lt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hn,onEntering:hn,onEntered:hn,onExit:hn,onExiting:hn,onExited:hn};Lt.UNMOUNTED=Pn;Lt.EXITED=Qt;Lt.ENTERING=Kt;Lt.ENTERED=gn;Lt.EXITING=ha;var e_=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return QS(t,r)})},Pi=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return KS(t,r)})},ns=(function(e){rd(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(o,u)},r.onEntering=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],p=f?"appear":"enter";r.addClass(d,p,"active"),r.props.onEntering&&r.props.onEntering(o,u)},r.onEntered=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],p=f?"appear":"enter";r.removeClasses(d,p),r.addClass(d,p,"done"),r.props.onEntered&&r.props.onEntered(o,u)},r.onExit=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(o)},r.onExiting=function(o){var u=r.resolveArguments(o),c=u[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(o)},r.onExited=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(o)},r.resolveArguments=function(o,u){return r.props.nodeRef?[r.props.nodeRef.current,o]:[o,u]},r.getClassNames=function(o){var u=r.props.classNames,c=typeof u=="string",d=c&&u?u+"-":"",f=c?""+d+o:u[o],p=c?f+"-active":u[o+"Active"],h=c?f+"-done":u[o+"Done"];return{baseClassName:f,activeClassName:p,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(i,a,s){var o=this.getClassNames(a)[s+"ClassName"],u=this.getClassNames("enter"),c=u.doneClassName;a==="appear"&&s==="done"&&c&&(o+=" "+c),s==="active"&&i&&sd(i),o&&(this.appliedClasses[a][s]=o,e_(i,o))},n.removeClasses=function(i,a){var s=this.appliedClasses[a],o=s.base,u=s.active,c=s.done;this.appliedClasses[a]={},o&&Pi(i,o),u&&Pi(i,u),c&&Pi(i,c)},n.render=function(){var i=this.props;i.classNames;var a=nd(i,["classNames"]);return S.createElement(Lt,Or({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(S.Component);ns.defaultProps={classNames:""};ns.propTypes=process.env.NODE_ENV!=="production"?Or({},Lt.propTypes,{classNames:ZS,onEnter:fe.func,onEntering:fe.func,onEntered:fe.func,onExit:fe.func,onExiting:fe.func,onExited:fe.func}):{};const od=()=>{const e=on(),t=e.formatMessage({defaultMessage:"Open chat menu",id:"chatbot.widget.menu.open"}),n=e.formatMessage({defaultMessage:"Start a new discussion",id:"chatbot.widget.menu.startNewDiscussion"}),r=e.formatMessage({defaultMessage:"Close chat",id:"chatbot.widget.close"});return{openMenuTranslation:t,startNewDiscussionTranslation:n,closeChatTranslation:r}},t_=({setIsWidgetOpen:e})=>{const{closeChatTranslation:t}=od();return x.jsx(x.Fragment,{children:x.jsx("button",{type:"button","aria-label":t,onClick:()=>e(!1),className:`absolute right-2 top-1/2 -translate-y-1/2
|
|
153
|
+
*/var Wi,pu;function wS(){if(pu)return Wi;pu=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Wi=i()?Object.assign:function(a,s){for(var o,u=r(a),c,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var f in o)t.call(o,f)&&(u[f]=o[f]);if(e){c=e(o);for(var m=0;m<c.length;m++)n.call(o,c[m])&&(u[c[m]]=o[c[m]])}}return u},Wi}var Gi,gu;function Es(){if(gu)return Gi;gu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gi=e,Gi}var Yi,bu;function Nd(){return bu||(bu=1,Yi=Function.call.bind(Object.prototype.hasOwnProperty)),Yi}var qi,Eu;function vS(){if(Eu)return qi;Eu=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Es(),n={},r=Nd();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,u,c){if(process.env.NODE_ENV!=="production"){for(var d in a)if(r(a,d)){var f;try{if(typeof a[d]!="function"){var m=Error((u||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}f=a[d](s,d,u,o,null,t)}catch(g){f=g}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";e("Failed "+o+" type: "+f.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},qi=i,qi}var Xi,Tu;function kS(){if(Tu)return Xi;Tu=1;var e=Oa(),t=wS(),n=Es(),r=Nd(),i=vS(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return Xi=function(o,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(E){var W=E&&(c&&E[c]||E[d]);if(typeof W=="function")return W}var m="<<anonymous>>",h={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:k(),arrayOf:p,element:O(),elementType:S(),instanceOf:w,node:N(),objectOf:K,oneOf:B,oneOfType:Y,shape:$,exact:j};function g(E,W){return E===W?E!==0||1/E===1/W:E!==E&&W!==W}function y(E,W){this.message=E,this.data=W&&typeof W=="object"?W:{},this.stack=""}y.prototype=Error.prototype;function v(E){if(process.env.NODE_ENV!=="production")var W={},ne=0;function _(ae,X,se,re,ce,ue,ke){if(re=re||m,ue=ue||se,ke!==n){if(u){var G=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Le=re+":"+se;!W[Le]&&ne<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ue+"` prop on `"+re+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[Le]=!0,ne++)}}return X[se]==null?ae?X[se]===null?new y("The "+ce+" `"+ue+"` is marked as required "+("in `"+re+"`, but its value is `null`.")):new y("The "+ce+" `"+ue+"` is marked as required in "+("`"+re+"`, but its value is `undefined`.")):null:E(X,se,re,ce,ue)}var Q=_.bind(null,!1);return Q.isRequired=_.bind(null,!0),Q}function A(E){function W(ne,_,Q,ae,X,se){var re=ne[_],ce=fe(re);if(ce!==E){var ue=ie(re);return new y("Invalid "+ae+" `"+X+"` of type "+("`"+ue+"` supplied to `"+Q+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return v(W)}function k(){return v(s)}function p(E){function W(ne,_,Q,ae,X){if(typeof E!="function")return new y("Property `"+X+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var se=ne[_];if(!Array.isArray(se)){var re=fe(se);return new y("Invalid "+ae+" `"+X+"` of type "+("`"+re+"` supplied to `"+Q+"`, expected an array."))}for(var ce=0;ce<se.length;ce++){var ue=E(se,ce,Q,ae,X+"["+ce+"]",n);if(ue instanceof Error)return ue}return null}return v(W)}function O(){function E(W,ne,_,Q,ae){var X=W[ne];if(!o(X)){var se=fe(X);return new y("Invalid "+Q+" `"+ae+"` of type "+("`"+se+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return v(E)}function S(){function E(W,ne,_,Q,ae){var X=W[ne];if(!e.isValidElementType(X)){var se=fe(X);return new y("Invalid "+Q+" `"+ae+"` of type "+("`"+se+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return v(E)}function w(E){function W(ne,_,Q,ae,X){if(!(ne[_]instanceof E)){var se=E.name||m,re=xe(ne[_]);return new y("Invalid "+ae+" `"+X+"` of type "+("`"+re+"` supplied to `"+Q+"`, expected ")+("instance of `"+se+"`."))}return null}return v(W)}function B(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function W(ne,_,Q,ae,X){for(var se=ne[_],re=0;re<E.length;re++)if(g(se,E[re]))return null;var ce=JSON.stringify(E,function(ke,G){var Le=ie(G);return Le==="symbol"?String(G):G});return new y("Invalid "+ae+" `"+X+"` of value `"+String(se)+"` "+("supplied to `"+Q+"`, expected one of "+ce+"."))}return v(W)}function K(E){function W(ne,_,Q,ae,X){if(typeof E!="function")return new y("Property `"+X+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var se=ne[_],re=fe(se);if(re!=="object")return new y("Invalid "+ae+" `"+X+"` of type "+("`"+re+"` supplied to `"+Q+"`, expected an object."));for(var ce in se)if(r(se,ce)){var ue=E(se,ce,Q,ae,X+"."+ce,n);if(ue instanceof Error)return ue}return null}return v(W)}function Y(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var W=0;W<E.length;W++){var ne=E[W];if(typeof ne!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ve(ne)+" at index "+W+"."),s}function _(Q,ae,X,se,re){for(var ce=[],ue=0;ue<E.length;ue++){var ke=E[ue],G=ke(Q,ae,X,se,re,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&ce.push(G.data.expectedType)}var Le=ce.length>0?", expected one of type ["+ce.join(", ")+"]":"";return new y("Invalid "+se+" `"+re+"` supplied to "+("`"+X+"`"+Le+"."))}return v(_)}function N(){function E(W,ne,_,Q,ae){return z(W[ne])?null:new y("Invalid "+Q+" `"+ae+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return v(E)}function H(E,W,ne,_,Q){return new y((E||"React class")+": "+W+" type `"+ne+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function $(E){function W(ne,_,Q,ae,X){var se=ne[_],re=fe(se);if(re!=="object")return new y("Invalid "+ae+" `"+X+"` of type `"+re+"` "+("supplied to `"+Q+"`, expected `object`."));for(var ce in E){var ue=E[ce];if(typeof ue!="function")return H(Q,ae,X,ce,ie(ue));var ke=ue(se,ce,Q,ae,X+"."+ce,n);if(ke)return ke}return null}return v(W)}function j(E){function W(ne,_,Q,ae,X){var se=ne[_],re=fe(se);if(re!=="object")return new y("Invalid "+ae+" `"+X+"` of type `"+re+"` "+("supplied to `"+Q+"`, expected `object`."));var ce=t({},ne[_],E);for(var ue in ce){var ke=E[ue];if(r(E,ue)&&typeof ke!="function")return H(Q,ae,X,ue,ie(ke));if(!ke)return new y("Invalid "+ae+" `"+X+"` key `"+ue+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(ne[_],null," ")+`
|
|
154
|
+
Valid keys: `+JSON.stringify(Object.keys(E),null," "));var G=ke(se,ue,Q,ae,X+"."+ue,n);if(G)return G}return null}return v(W)}function z(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(z);if(E===null||o(E))return!0;var W=f(E);if(W){var ne=W.call(E),_;if(W!==E.entries){for(;!(_=ne.next()).done;)if(!z(_.value))return!1}else for(;!(_=ne.next()).done;){var Q=_.value;if(Q&&!z(Q[1]))return!1}}else return!1;return!0;default:return!1}}function Z(E,W){return E==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function fe(E){var W=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":Z(W,E)?"symbol":W}function ie(E){if(typeof E>"u"||E===null)return""+E;var W=fe(E);if(W==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return W}function ve(E){var W=ie(E);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function xe(E){return!E.constructor||!E.constructor.name?m:E.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Xi}var Qi,yu;function NS(){if(yu)return Qi;yu=1;var e=Es();function t(){}function n(){}return n.resetWarningCache=t,Qi=function(){function r(s,o,u,c,d,f){if(f!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Qi}var xu;function RS(){if(xu)return Ir.exports;if(xu=1,process.env.NODE_ENV!=="production"){var e=Oa(),t=!0;Ir.exports=kS()(e.isElement,t)}else Ir.exports=NS()();return Ir.exports}var OS=RS();const ge=Ra(OS);function LS(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function DS(e,t){e.classList?e.classList.add(t):LS(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function _u(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function PS(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=_u(e.className,t):e.setAttribute("class",_u(e.className&&e.className.baseVal||"",t))}const Su={disabled:!1};var MS=process.env.NODE_ENV!=="production"?ge.oneOfType([ge.number,ge.shape({enter:ge.number,exit:ge.number,appear:ge.number}).isRequired]):null,BS=process.env.NODE_ENV!=="production"?ge.oneOfType([ge.string,ge.shape({enter:ge.string,exit:ge.string,active:ge.string}),ge.shape({enter:ge.string,enterDone:ge.string,enterActive:ge.string,exit:ge.string,exitDone:ge.string,exitActive:ge.string})]):null;const Rd=C.createContext(null);var Od=function(t){return t.scrollTop},zn="unmounted",Zt="exited",en="entering",Tn="entered",ka="exiting",Dt=(function(e){kd(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,u;return a.appearStatus=null,r.in?o?(u=Zt,a.appearStatus=en):u=Tn:r.unmountOnExit||r.mountOnEnter?u=zn:u=Zt,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===zn?{status:Zt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==en&&s!==Tn&&(a=en):(s===en||s===Tn)&&(a=ka)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===en){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Hn.findDOMNode(this);s&&Od(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Zt&&this.setState({status:zn})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[Hn.findDOMNode(this),o],c=u[0],d=u[1],f=this.getTimeouts(),m=o?f.appear:f.enter;if(!i&&!s||Su.disabled){this.safeSetState({status:Tn},function(){a.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:en},function(){a.props.onEntering(c,d),a.onTransitionEnd(m,function(){a.safeSetState({status:Tn},function(){a.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:Hn.findDOMNode(this);if(!a||Su.disabled){this.safeSetState({status:Zt},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:ka},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Zt},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:Hn.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===zn)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=vd(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return C.createElement(Rd.Provider,{value:null},typeof s=="function"?s(i,o):C.cloneElement(C.Children.only(s),o))},t})(C.Component);Dt.contextType=Rd;Dt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ge.shape({current:typeof Element>"u"?ge.any:function(e,t,n,r,i,a){var s=e[t];return ge.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:ge.oneOfType([ge.func.isRequired,ge.element.isRequired]).isRequired,in:ge.bool,mountOnEnter:ge.bool,unmountOnExit:ge.bool,appear:ge.bool,enter:ge.bool,exit:ge.bool,timeout:function(t){var n=MS;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return n.apply(void 0,[t].concat(i))},addEndListener:ge.func,onEnter:ge.func,onEntering:ge.func,onEntered:ge.func,onExit:ge.func,onExiting:ge.func,onExited:ge.func}:{};function gn(){}Dt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:gn,onEntering:gn,onEntered:gn,onExit:gn,onExiting:gn,onExited:gn};Dt.UNMOUNTED=zn;Dt.EXITED=Zt;Dt.ENTERING=en;Dt.ENTERED=Tn;Dt.EXITING=ka;var FS=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return DS(t,r)})},Ki=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return PS(t,r)})},Ts=(function(e){kd(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(o,u)},r.onEntering=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(o,u)},r.onEntered=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(o,u)},r.onExit=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(o)},r.onExiting=function(o){var u=r.resolveArguments(o),c=u[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(o)},r.onExited=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(o)},r.resolveArguments=function(o,u){return r.props.nodeRef?[r.props.nodeRef.current,o]:[o,u]},r.getClassNames=function(o){var u=r.props.classNames,c=typeof u=="string",d=c&&u?u+"-":"",f=c?""+d+o:u[o],m=c?f+"-active":u[o+"Active"],h=c?f+"-done":u[o+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(i,a,s){var o=this.getClassNames(a)[s+"ClassName"],u=this.getClassNames("enter"),c=u.doneClassName;a==="appear"&&s==="done"&&c&&(o+=" "+c),s==="active"&&i&&Od(i),o&&(this.appliedClasses[a][s]=o,FS(i,o))},n.removeClasses=function(i,a){var s=this.appliedClasses[a],o=s.base,u=s.active,c=s.done;this.appliedClasses[a]={},o&&Ki(i,o),u&&Ki(i,u),c&&Ki(i,c)},n.render=function(){var i=this.props;i.classNames;var a=vd(i,["classNames"]);return C.createElement(Dt,$r({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(C.Component);Ts.defaultProps={classNames:""};Ts.propTypes=process.env.NODE_ENV!=="production"?$r({},Dt.propTypes,{classNames:BS,onEnter:ge.func,onEntering:ge.func,onEntered:ge.func,onExit:ge.func,onExiting:ge.func,onExited:ge.func}):{};const Ld=()=>{const e=Yt(),t=e.formatMessage({defaultMessage:"Open chat menu",id:"chatbot.widget.menu.open"}),n=e.formatMessage({defaultMessage:"Start a new discussion",id:"chatbot.widget.menu.startNewDiscussion"}),r=e.formatMessage({defaultMessage:"Close chat",id:"chatbot.widget.close"});return{openMenuTranslation:t,startNewDiscussionTranslation:n,closeChatTranslation:r}},US=({setIsWidgetOpen:e})=>{const{closeChatTranslation:t}=Ld();return b.jsx(b.Fragment,{children:b.jsx("button",{type:"button","aria-label":t,onClick:()=>e(!1),className:`absolute right-2 top-1/2 -translate-y-1/2
|
|
155
155
|
inline-flex items-center justify-center
|
|
156
156
|
rounded-full p-1.5
|
|
157
157
|
text-white
|
|
@@ -162,14 +162,14 @@ Valid keys: `+JSON.stringify(Object.keys(m),null," "));var V=Se(oe,se,K,Z,W+"."
|
|
|
162
162
|
focus-visible:ring-white/80
|
|
163
163
|
focus-visible:ring-offset-2
|
|
164
164
|
focus-visible:ring-offset-violet-700
|
|
165
|
-
`,"data-testid":"close-button",children:
|
|
165
|
+
`,"data-testid":"close-button",children:b.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:b.jsx("path",{d:"M6 6L18 18M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})})},Dd=({onStartNewDiscussion:e,className:t="",tone:n="light"})=>{const[r,i]=C.useState(!1),a=C.useRef(null),{openMenuTranslation:s,startNewDiscussionTranslation:o}=Ld();C.useEffect(()=>{if(!r)return;const c=f=>{a.current?.contains(f.target)||i(!1)},d=f=>{f.key==="Escape"&&i(!1)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[r]);const u=n==="dark"?"text-white bg-white/10 hover:bg-white/20 focus-visible:ring-white/80 focus-visible:ring-offset-violet-700":"text-slate-700 bg-slate-100 hover:bg-slate-200 focus-visible:ring-slate-400 focus-visible:ring-offset-white";return b.jsxs("div",{ref:a,className:`relative inline-flex ${t}`,onMouseDown:c=>c.stopPropagation(),children:[b.jsx("button",{type:"button","aria-label":s,"aria-haspopup":"menu","aria-expanded":r,onClick:()=>i(c=>!c),className:`inline-flex items-center justify-center rounded-full p-1.5 transition-transform duration-150 ease-out hover:scale-110 active:scale-95 focus:outline-none focus-visible:ring-offset-2 ${u}`,"data-testid":"discussion-menu-button",children:b.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:[b.jsx("circle",{cx:"5",cy:"12",r:"1.5",fill:"currentColor"}),b.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"}),b.jsx("circle",{cx:"19",cy:"12",r:"1.5",fill:"currentColor"})]})}),r&&b.jsx("div",{role:"menu",className:"absolute right-0 top-full z-30 mt-2 min-w-[210px] rounded-md border border-slate-200 bg-white p-1 shadow-lg",onMouseDown:c=>c.stopPropagation(),children:b.jsx("button",{type:"button",role:"menuitem",className:"block w-full rounded px-3 py-2 text-left text-sm text-slate-800 hover:bg-slate-100",onClick:()=>{e(),i(!1)},children:o})})]})},Na=({placement:e="inline",className:t=""})=>{const{companySettings:n}=C.useContext(Rt);if(n.branding?.poweredByChatSystemVisible===!1)return null;const r=e==="widget-badge";return b.jsxs("div",{className:t,style:{alignItems:"center",background:"rgba(255, 255, 255, 0.96)",border:r?"1px solid #e5e7eb":"0",borderRadius:r?"9999px":"0",boxShadow:r?"0 4px 14px rgba(15, 23, 42, 0.10)":"none",color:"#94a3b8",flexShrink:0,fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:"10px",fontWeight:400,gap:"3px",justifyContent:"center",lineHeight:1,padding:r?"6px 10px":"5px 12px",whiteSpace:"nowrap"},children:[b.jsx("span",{children:"Powered by"}),b.jsx("a",{href:"https://www.chatsystem.ai",target:"_blank",rel:"noopener noreferrer",style:{color:"#64748b",display:"inline",fontFamily:"inherit",fontSize:"inherit",fontWeight:600,lineHeight:"inherit",margin:0,textDecoration:"none",whiteSpace:"nowrap"},children:"ChatSystem"})]})},HS=C.forwardRef(({setIsWidgetOpen:e},t)=>{const{companySettings:n}=C.useContext(Rt),{resetConversation:r}=Xr(),i=n.agent?.customNameToDisplay||"Assistant";return b.jsxs("div",{ref:t,className:`
|
|
166
166
|
fixed z-[2147483647]
|
|
167
167
|
inset-0 w-screen h-[100svh] rounded-none
|
|
168
168
|
md:inset-auto md:bottom-[calc(80px+1rem)] md:right-6
|
|
169
169
|
md:w-[min(100vw-1rem,400px)]
|
|
170
170
|
md:h-[clamp(420px,70dvh,640px)]
|
|
171
171
|
flex flex-col
|
|
172
|
-
`,children:[
|
|
172
|
+
`,children:[b.jsxs("div",{className:"chatBox h-full w-full rounded-none bg-white shadow-xl flex flex-col overflow-hidden md:rounded-xl",children:[b.jsxs("div",{className:"chatsystem-header chatsystem-primary-background relative z-20 flex items-center justify-start py-2 pl-3 text-left text-white",children:[b.jsx(bd,{className:"chatSystem-widgetLogo",logo:b.jsx(Ed,{}),label:i}),b.jsx("div",{className:"absolute right-12 top-1/2 -translate-y-1/2",children:b.jsx(Dd,{tone:"dark",onStartNewDiscussion:r})}),b.jsx(US,{setIsWidgetOpen:e})]}),b.jsx(wd,{}),b.jsx(Na,{className:"chatsystem-powered-by-mobile"})]}),b.jsx(Na,{placement:"widget-badge",className:"chatsystem-powered-by-widget-badge"})]})}),jS=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const n=C.useRef(null);return C.useEffect(()=>{if(!e)return;const r=i=>{const a=n.current;if(!a)return;const s=typeof i.composedPath=="function"?i.composedPath():[];if(s.length>0){if(s.includes(a))return}else{const o=i.target;if(o&&a.contains(o))return}t(!1)};return document.addEventListener("pointerdown",r,!0),()=>{document.removeEventListener("pointerdown",r,!0)}},[e,t]),b.jsx("div",{children:b.jsx(Ts,{nodeRef:n,in:e,timeout:200,classNames:"menuTransition",unmountOnExit:!0,children:b.jsx(HS,{ref:n,setIsWidgetOpen:t})})})},zS=()=>{const{resetConversation:e}=Xr();return b.jsx("div",{className:"relative z-20 flex justify-end px-2 pt-2",children:b.jsx(Dd,{tone:"light",onStartNewDiscussion:e})})};var Wt=(e=>(e.LAUNCHER="launcher",e.CHATBOX="chatbox",e))(Wt||{});const $S=({displayMode:e})=>{const[t,n]=C.useState(!1);return b.jsxs(b.Fragment,{children:[e===Wt.LAUNCHER&&b.jsxs(b.Fragment,{children:[b.jsx(mm,{isWidgetOpen:t,setIsWidgetOpen:n}),b.jsx(jS,{isWidgetOpen:t,setIsWidgetOpen:n})]}),e===Wt.CHATBOX&&b.jsxs("div",{className:"chatBox w-full max-w-[1200px] mx-auto",children:[b.jsx(zS,{}),b.jsx(wd,{}),b.jsx(Na,{className:"chatsystem-powered-by-inline"})]})]})},VS=e=>Object.values(Wt).includes(e),WS=e=>{const t=Ft();return VS(e)?e:(t.warn(`Display mode not valid. Using ${Wt.LAUNCHER} as default.`),Wt.LAUNCHER)},Pd=()=>({hasFetchedSettings:!1,hasDisplayedCSS:!1}),GS=()=>{const[e,t]=C.useState(Pd()),n=C.useCallback(()=>{t(i=>({...i,hasFetchedSettings:!0}))},[]),r=C.useCallback(()=>{t(i=>({...i,hasDisplayedCSS:!0}))},[]);return{appInternalContext:e,setAppInternalContext:t,setHasFetchedSettings:n,setHasDisplayedCss:r}},YS=C.createContext({appInternalContext:Pd(),setAppInternalContext:()=>{},setHasFetchedSettings:()=>{}});function qS(e,t={},n,r){const i=ir(),{id:a,nonce:s,target:o,disableConstructable:u}=t,c=o,d=C.useRef(null),f=C.useRef(null);C.useEffect(()=>{if(!o)return;if(!e){n&&(i.log("No custom css found."),r?.());return}if(!u&&"adoptedStyleSheets"in c&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)return d.current||(d.current=new CSSStyleSheet,c.adoptedStyleSheets=[...c.adoptedStyleSheets,d.current]),d.current.replaceSync(e),i.log("Loading custom css via stylesheet."),r?.(),()=>{const h=c.adoptedStyleSheets||[],g=h.indexOf(d.current);if(g>=0){const y=h.slice();y.splice(g,1),c.adoptedStyleSheets=y}d.current=null};if(!f.current){const h=document.createElement("style");h.type="text/css",a&&(h.id=a),s&&(h.nonce=s),(c instanceof Document&&c.head||c).appendChild(h),f.current=h}return f.current.textContent=e,i.log("Loading custom css via style tag."),r?.(),()=>{f.current?.parentNode?.removeChild(f.current),f.current=null}},[e,a,s,o,u,n,i,r])}const XS=`*, ::before, ::after {
|
|
173
173
|
--tw-border-spacing-x: 0;
|
|
174
174
|
--tw-border-spacing-y: 0;
|
|
175
175
|
--tw-translate-x: 0;
|
|
@@ -725,35 +725,59 @@ video {
|
|
|
725
725
|
display: none;
|
|
726
726
|
}
|
|
727
727
|
|
|
728
|
+
.\\!container {
|
|
729
|
+
width: 100% !important;
|
|
730
|
+
}
|
|
731
|
+
|
|
728
732
|
.container {
|
|
729
733
|
width: 100%;
|
|
730
734
|
}
|
|
731
735
|
|
|
732
736
|
@media (min-width: 640px) {
|
|
737
|
+
.\\!container {
|
|
738
|
+
max-width: 640px !important;
|
|
739
|
+
}
|
|
740
|
+
|
|
733
741
|
.container {
|
|
734
742
|
max-width: 640px;
|
|
735
743
|
}
|
|
736
744
|
}
|
|
737
745
|
|
|
738
746
|
@media (min-width: 768px) {
|
|
747
|
+
.\\!container {
|
|
748
|
+
max-width: 768px !important;
|
|
749
|
+
}
|
|
750
|
+
|
|
739
751
|
.container {
|
|
740
752
|
max-width: 768px;
|
|
741
753
|
}
|
|
742
754
|
}
|
|
743
755
|
|
|
744
756
|
@media (min-width: 1024px) {
|
|
757
|
+
.\\!container {
|
|
758
|
+
max-width: 1024px !important;
|
|
759
|
+
}
|
|
760
|
+
|
|
745
761
|
.container {
|
|
746
762
|
max-width: 1024px;
|
|
747
763
|
}
|
|
748
764
|
}
|
|
749
765
|
|
|
750
766
|
@media (min-width: 1280px) {
|
|
767
|
+
.\\!container {
|
|
768
|
+
max-width: 1280px !important;
|
|
769
|
+
}
|
|
770
|
+
|
|
751
771
|
.container {
|
|
752
772
|
max-width: 1280px;
|
|
753
773
|
}
|
|
754
774
|
}
|
|
755
775
|
|
|
756
776
|
@media (min-width: 1536px) {
|
|
777
|
+
.\\!container {
|
|
778
|
+
max-width: 1536px !important;
|
|
779
|
+
}
|
|
780
|
+
|
|
757
781
|
.container {
|
|
758
782
|
max-width: 1536px;
|
|
759
783
|
}
|
|
@@ -795,48 +819,36 @@ video {
|
|
|
795
819
|
bottom: 0.375rem;
|
|
796
820
|
}
|
|
797
821
|
|
|
798
|
-
.bottom-
|
|
799
|
-
bottom:
|
|
822
|
+
.bottom-20 {
|
|
823
|
+
bottom: 5rem;
|
|
800
824
|
}
|
|
801
825
|
|
|
802
826
|
.left-auto {
|
|
803
827
|
left: auto;
|
|
804
828
|
}
|
|
805
829
|
|
|
806
|
-
.right-
|
|
807
|
-
right:
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
.right-4 {
|
|
811
|
-
right: 1rem;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
.top-1\\/2 {
|
|
815
|
-
top: 50%;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
.top-auto {
|
|
819
|
-
top: auto;
|
|
830
|
+
.right-0 {
|
|
831
|
+
right: 0px;
|
|
820
832
|
}
|
|
821
833
|
|
|
822
|
-
.
|
|
823
|
-
|
|
834
|
+
.right-12 {
|
|
835
|
+
right: 3rem;
|
|
824
836
|
}
|
|
825
837
|
|
|
826
|
-
.
|
|
827
|
-
|
|
838
|
+
.right-2 {
|
|
839
|
+
right: 0.5rem;
|
|
828
840
|
}
|
|
829
841
|
|
|
830
842
|
.right-8 {
|
|
831
843
|
right: 2rem;
|
|
832
844
|
}
|
|
833
845
|
|
|
834
|
-
.
|
|
835
|
-
|
|
846
|
+
.top-1\\/2 {
|
|
847
|
+
top: 50%;
|
|
836
848
|
}
|
|
837
849
|
|
|
838
|
-
.
|
|
839
|
-
|
|
850
|
+
.top-auto {
|
|
851
|
+
top: auto;
|
|
840
852
|
}
|
|
841
853
|
|
|
842
854
|
.top-full {
|
|
@@ -847,8 +859,12 @@ video {
|
|
|
847
859
|
z-index: 10;
|
|
848
860
|
}
|
|
849
861
|
|
|
850
|
-
.z-
|
|
851
|
-
z-index:
|
|
862
|
+
.z-20 {
|
|
863
|
+
z-index: 20;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
.z-30 {
|
|
867
|
+
z-index: 30;
|
|
852
868
|
}
|
|
853
869
|
|
|
854
870
|
.z-\\[2147483647\\] {
|
|
@@ -859,14 +875,6 @@ video {
|
|
|
859
875
|
z-index: 999999999;
|
|
860
876
|
}
|
|
861
877
|
|
|
862
|
-
.z-20 {
|
|
863
|
-
z-index: 20;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
.z-30 {
|
|
867
|
-
z-index: 30;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
878
|
.mx-3 {
|
|
871
879
|
margin-left: 0.75rem;
|
|
872
880
|
margin-right: 0.75rem;
|
|
@@ -887,10 +895,18 @@ video {
|
|
|
887
895
|
margin-bottom: 0.5rem;
|
|
888
896
|
}
|
|
889
897
|
|
|
898
|
+
.mb-0\\.5 {
|
|
899
|
+
margin-bottom: 0.125rem;
|
|
900
|
+
}
|
|
901
|
+
|
|
890
902
|
.mb-2 {
|
|
891
903
|
margin-bottom: 0.5rem;
|
|
892
904
|
}
|
|
893
905
|
|
|
906
|
+
.mb-3 {
|
|
907
|
+
margin-bottom: 0.75rem;
|
|
908
|
+
}
|
|
909
|
+
|
|
894
910
|
.ml-auto {
|
|
895
911
|
margin-left: auto;
|
|
896
912
|
}
|
|
@@ -907,6 +923,10 @@ video {
|
|
|
907
923
|
margin-top: 0.25rem;
|
|
908
924
|
}
|
|
909
925
|
|
|
926
|
+
.mt-2 {
|
|
927
|
+
margin-top: 0.5rem;
|
|
928
|
+
}
|
|
929
|
+
|
|
910
930
|
.mt-3 {
|
|
911
931
|
margin-top: 0.75rem;
|
|
912
932
|
}
|
|
@@ -915,22 +935,6 @@ video {
|
|
|
915
935
|
margin-top: 1rem;
|
|
916
936
|
}
|
|
917
937
|
|
|
918
|
-
.mt-6 {
|
|
919
|
-
margin-top: 1.5rem;
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
.mb-1 {
|
|
923
|
-
margin-bottom: 0.25rem;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
.mb-0\\.5 {
|
|
927
|
-
margin-bottom: 0.125rem;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
.mt-2 {
|
|
931
|
-
margin-top: 0.5rem;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
938
|
.block {
|
|
935
939
|
display: block;
|
|
936
940
|
}
|
|
@@ -959,12 +963,20 @@ video {
|
|
|
959
963
|
height: 1.25rem !important;
|
|
960
964
|
}
|
|
961
965
|
|
|
962
|
-
.h-
|
|
963
|
-
height:
|
|
966
|
+
.h-2\\.5 {
|
|
967
|
+
height: 0.625rem;
|
|
964
968
|
}
|
|
965
969
|
|
|
966
|
-
.h-
|
|
967
|
-
height:
|
|
970
|
+
.h-3\\.5 {
|
|
971
|
+
height: 0.875rem;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
.h-32 {
|
|
975
|
+
height: 8rem;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.h-4 {
|
|
979
|
+
height: 1rem;
|
|
968
980
|
}
|
|
969
981
|
|
|
970
982
|
.h-5 {
|
|
@@ -975,6 +987,10 @@ video {
|
|
|
975
987
|
height: 1.5rem;
|
|
976
988
|
}
|
|
977
989
|
|
|
990
|
+
.h-8 {
|
|
991
|
+
height: 2rem;
|
|
992
|
+
}
|
|
993
|
+
|
|
978
994
|
.h-9 {
|
|
979
995
|
height: 2.25rem;
|
|
980
996
|
}
|
|
@@ -991,20 +1007,16 @@ video {
|
|
|
991
1007
|
height: 100%;
|
|
992
1008
|
}
|
|
993
1009
|
|
|
994
|
-
.h-
|
|
995
|
-
height:
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
.h-8 {
|
|
999
|
-
height: 2rem;
|
|
1010
|
+
.min-h-0 {
|
|
1011
|
+
min-height: 0px;
|
|
1000
1012
|
}
|
|
1001
1013
|
|
|
1002
|
-
.h-
|
|
1003
|
-
height:
|
|
1014
|
+
.min-h-24 {
|
|
1015
|
+
min-height: 6rem;
|
|
1004
1016
|
}
|
|
1005
1017
|
|
|
1006
|
-
.min-h-
|
|
1007
|
-
min-height:
|
|
1018
|
+
.min-h-9 {
|
|
1019
|
+
min-height: 2.25rem;
|
|
1008
1020
|
}
|
|
1009
1021
|
|
|
1010
1022
|
.min-h-\\[48px\\] {
|
|
@@ -1015,12 +1027,20 @@ video {
|
|
|
1015
1027
|
width: 1.25rem !important;
|
|
1016
1028
|
}
|
|
1017
1029
|
|
|
1018
|
-
.w-
|
|
1019
|
-
width:
|
|
1030
|
+
.w-1 {
|
|
1031
|
+
width: 0.25rem;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.w-2\\.5 {
|
|
1035
|
+
width: 0.625rem;
|
|
1020
1036
|
}
|
|
1021
1037
|
|
|
1022
|
-
.w-
|
|
1023
|
-
width:
|
|
1038
|
+
.w-3\\.5 {
|
|
1039
|
+
width: 0.875rem;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
.w-4 {
|
|
1043
|
+
width: 1rem;
|
|
1024
1044
|
}
|
|
1025
1045
|
|
|
1026
1046
|
.w-5 {
|
|
@@ -1031,12 +1051,12 @@ video {
|
|
|
1031
1051
|
width: 1.5rem;
|
|
1032
1052
|
}
|
|
1033
1053
|
|
|
1034
|
-
.w-
|
|
1035
|
-
width:
|
|
1054
|
+
.w-8 {
|
|
1055
|
+
width: 2rem;
|
|
1036
1056
|
}
|
|
1037
1057
|
|
|
1038
|
-
.w
|
|
1039
|
-
width:
|
|
1058
|
+
.w-9 {
|
|
1059
|
+
width: 2.25rem;
|
|
1040
1060
|
}
|
|
1041
1061
|
|
|
1042
1062
|
.w-fit {
|
|
@@ -1052,22 +1072,6 @@ video {
|
|
|
1052
1072
|
width: 100vw;
|
|
1053
1073
|
}
|
|
1054
1074
|
|
|
1055
|
-
.w-1 {
|
|
1056
|
-
width: 0.25rem;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
.w-2\\.5 {
|
|
1060
|
-
width: 0.625rem;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
.w-8 {
|
|
1064
|
-
width: 2rem;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
.w-3\\.5 {
|
|
1068
|
-
width: 0.875rem;
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
1075
|
.min-w-0 {
|
|
1072
1076
|
min-width: 0px;
|
|
1073
1077
|
}
|
|
@@ -1076,14 +1080,18 @@ video {
|
|
|
1076
1080
|
min-width: 210px;
|
|
1077
1081
|
}
|
|
1078
1082
|
|
|
1079
|
-
.max-w-full {
|
|
1080
|
-
max-width: 100%;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
1083
|
.max-w-\\[1200px\\] {
|
|
1084
1084
|
max-width: 1200px;
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
|
+
.max-w-\\[90\\%\\] {
|
|
1088
|
+
max-width: 90%;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
.max-w-full {
|
|
1092
|
+
max-width: 100%;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1087
1095
|
.flex-1 {
|
|
1088
1096
|
flex: 1 1 0%;
|
|
1089
1097
|
}
|
|
@@ -1092,6 +1100,10 @@ video {
|
|
|
1092
1100
|
flex-shrink: 0;
|
|
1093
1101
|
}
|
|
1094
1102
|
|
|
1103
|
+
.grow {
|
|
1104
|
+
flex-grow: 1;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1095
1107
|
.-translate-y-1 {
|
|
1096
1108
|
--tw-translate-y: -0.25rem;
|
|
1097
1109
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
@@ -1142,6 +1154,10 @@ video {
|
|
|
1142
1154
|
user-select: none;
|
|
1143
1155
|
}
|
|
1144
1156
|
|
|
1157
|
+
.resize-y {
|
|
1158
|
+
resize: vertical;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1145
1161
|
.resize {
|
|
1146
1162
|
resize: both;
|
|
1147
1163
|
}
|
|
@@ -1150,6 +1166,10 @@ video {
|
|
|
1150
1166
|
flex-direction: column;
|
|
1151
1167
|
}
|
|
1152
1168
|
|
|
1169
|
+
.flex-wrap {
|
|
1170
|
+
flex-wrap: wrap;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1153
1173
|
.items-start {
|
|
1154
1174
|
align-items: flex-start;
|
|
1155
1175
|
}
|
|
@@ -1170,6 +1190,14 @@ video {
|
|
|
1170
1190
|
justify-content: center;
|
|
1171
1191
|
}
|
|
1172
1192
|
|
|
1193
|
+
.justify-between {
|
|
1194
|
+
justify-content: space-between;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
.gap-1\\.5 {
|
|
1198
|
+
gap: 0.375rem;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1173
1201
|
.gap-2 {
|
|
1174
1202
|
gap: 0.5rem;
|
|
1175
1203
|
}
|
|
@@ -1178,18 +1206,24 @@ video {
|
|
|
1178
1206
|
gap: 0.75rem;
|
|
1179
1207
|
}
|
|
1180
1208
|
|
|
1181
|
-
.gap-6 {
|
|
1182
|
-
gap: 1.5rem;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
1209
|
.gap-\\[3px\\] {
|
|
1186
1210
|
gap: 3px;
|
|
1187
1211
|
}
|
|
1188
1212
|
|
|
1213
|
+
.space-y-1 > :not([hidden]) ~ :not([hidden]) {
|
|
1214
|
+
--tw-space-y-reverse: 0;
|
|
1215
|
+
margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
|
|
1216
|
+
margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1189
1219
|
.overflow-hidden {
|
|
1190
1220
|
overflow: hidden;
|
|
1191
1221
|
}
|
|
1192
1222
|
|
|
1223
|
+
.overflow-visible {
|
|
1224
|
+
overflow: visible;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1193
1227
|
.overflow-y-auto {
|
|
1194
1228
|
overflow-y: auto;
|
|
1195
1229
|
}
|
|
@@ -1198,6 +1232,10 @@ video {
|
|
|
1198
1232
|
overflow-wrap: break-word;
|
|
1199
1233
|
}
|
|
1200
1234
|
|
|
1235
|
+
.rounded {
|
|
1236
|
+
border-radius: 0.25rem;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1201
1239
|
.rounded-2xl {
|
|
1202
1240
|
border-radius: 1rem;
|
|
1203
1241
|
}
|
|
@@ -1222,10 +1260,6 @@ video {
|
|
|
1222
1260
|
border-radius: 0.75rem;
|
|
1223
1261
|
}
|
|
1224
1262
|
|
|
1225
|
-
.rounded {
|
|
1226
|
-
border-radius: 0.25rem;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
1263
|
.rounded-bl-md {
|
|
1230
1264
|
border-bottom-left-radius: 0.375rem;
|
|
1231
1265
|
}
|
|
@@ -1242,6 +1276,10 @@ video {
|
|
|
1242
1276
|
border-width: 1px;
|
|
1243
1277
|
}
|
|
1244
1278
|
|
|
1279
|
+
.border-b {
|
|
1280
|
+
border-bottom-width: 1px;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1245
1283
|
.border-l-4 {
|
|
1246
1284
|
border-left-width: 4px;
|
|
1247
1285
|
}
|
|
@@ -1260,6 +1298,11 @@ video {
|
|
|
1260
1298
|
border-color: rgb(59 130 246 / var(--tw-border-opacity, 1));
|
|
1261
1299
|
}
|
|
1262
1300
|
|
|
1301
|
+
.border-red-200 {
|
|
1302
|
+
--tw-border-opacity: 1;
|
|
1303
|
+
border-color: rgb(254 202 202 / var(--tw-border-opacity, 1));
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1263
1306
|
.border-red-400 {
|
|
1264
1307
|
--tw-border-opacity: 1;
|
|
1265
1308
|
border-color: rgb(248 113 113 / var(--tw-border-opacity, 1));
|
|
@@ -1270,18 +1313,14 @@ video {
|
|
|
1270
1313
|
border-color: rgb(224 242 254 / var(--tw-border-opacity, 1));
|
|
1271
1314
|
}
|
|
1272
1315
|
|
|
1273
|
-
.border-slate-
|
|
1316
|
+
.border-slate-100 {
|
|
1274
1317
|
--tw-border-opacity: 1;
|
|
1275
|
-
border-color: rgb(
|
|
1318
|
+
border-color: rgb(241 245 249 / var(--tw-border-opacity, 1));
|
|
1276
1319
|
}
|
|
1277
1320
|
|
|
1278
|
-
.border-
|
|
1321
|
+
.border-slate-200 {
|
|
1279
1322
|
--tw-border-opacity: 1;
|
|
1280
|
-
border-color: rgb(
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
.border-white\\/30 {
|
|
1284
|
-
border-color: rgb(255 255 255 / 0.3);
|
|
1323
|
+
border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));
|
|
1285
1324
|
}
|
|
1286
1325
|
|
|
1287
1326
|
.border-slate-300 {
|
|
@@ -1289,9 +1328,14 @@ video {
|
|
|
1289
1328
|
border-color: rgb(203 213 225 / var(--tw-border-opacity, 1));
|
|
1290
1329
|
}
|
|
1291
1330
|
|
|
1292
|
-
.border-slate-
|
|
1331
|
+
.border-slate-400 {
|
|
1293
1332
|
--tw-border-opacity: 1;
|
|
1294
|
-
border-color: rgb(
|
|
1333
|
+
border-color: rgb(148 163 184 / var(--tw-border-opacity, 1));
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
.border-white {
|
|
1337
|
+
--tw-border-opacity: 1;
|
|
1338
|
+
border-color: rgb(255 255 255 / var(--tw-border-opacity, 1));
|
|
1295
1339
|
}
|
|
1296
1340
|
|
|
1297
1341
|
.\\!bg-blue-700 {
|
|
@@ -1319,10 +1363,6 @@ video {
|
|
|
1319
1363
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important;
|
|
1320
1364
|
}
|
|
1321
1365
|
|
|
1322
|
-
.bg-black\\/70 {
|
|
1323
|
-
background-color: rgb(0 0 0 / 0.7);
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
1366
|
.bg-blue-50 {
|
|
1327
1367
|
--tw-bg-opacity: 1;
|
|
1328
1368
|
background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1));
|
|
@@ -1342,6 +1382,21 @@ video {
|
|
|
1342
1382
|
background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1));
|
|
1343
1383
|
}
|
|
1344
1384
|
|
|
1385
|
+
.bg-red-200 {
|
|
1386
|
+
--tw-bg-opacity: 1;
|
|
1387
|
+
background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1));
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
.bg-red-50 {
|
|
1391
|
+
--tw-bg-opacity: 1;
|
|
1392
|
+
background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1));
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
.bg-red-500 {
|
|
1396
|
+
--tw-bg-opacity: 1;
|
|
1397
|
+
background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1345
1400
|
.bg-sky-50 {
|
|
1346
1401
|
--tw-bg-opacity: 1;
|
|
1347
1402
|
background-color: rgb(240 249 255 / var(--tw-bg-opacity, 1));
|
|
@@ -1362,14 +1417,19 @@ video {
|
|
|
1362
1417
|
background-color: rgb(203 213 225 / var(--tw-bg-opacity, 1));
|
|
1363
1418
|
}
|
|
1364
1419
|
|
|
1365
|
-
.bg-
|
|
1420
|
+
.bg-slate-400 {
|
|
1366
1421
|
--tw-bg-opacity: 1;
|
|
1367
|
-
background-color: rgb(
|
|
1422
|
+
background-color: rgb(148 163 184 / var(--tw-bg-opacity, 1));
|
|
1368
1423
|
}
|
|
1369
1424
|
|
|
1370
|
-
.bg-
|
|
1425
|
+
.bg-slate-50 {
|
|
1371
1426
|
--tw-bg-opacity: 1;
|
|
1372
|
-
background-color: rgb(
|
|
1427
|
+
background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
.bg-violet-600 {
|
|
1431
|
+
--tw-bg-opacity: 1;
|
|
1432
|
+
background-color: rgb(124 58 237 / var(--tw-bg-opacity, 1));
|
|
1373
1433
|
}
|
|
1374
1434
|
|
|
1375
1435
|
.bg-white {
|
|
@@ -1381,29 +1441,9 @@ video {
|
|
|
1381
1441
|
background-color: rgb(255 255 255 / 0.1);
|
|
1382
1442
|
}
|
|
1383
1443
|
|
|
1384
|
-
.
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
.bg-red-50 {
|
|
1390
|
-
--tw-bg-opacity: 1;
|
|
1391
|
-
background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1));
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
.bg-red-500 {
|
|
1395
|
-
--tw-bg-opacity: 1;
|
|
1396
|
-
background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
.bg-slate-400 {
|
|
1400
|
-
--tw-bg-opacity: 1;
|
|
1401
|
-
background-color: rgb(148 163 184 / var(--tw-bg-opacity, 1));
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
.bg-red-200 {
|
|
1405
|
-
--tw-bg-opacity: 1;
|
|
1406
|
-
background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1));
|
|
1444
|
+
.object-cover {
|
|
1445
|
+
-o-object-fit: cover;
|
|
1446
|
+
object-fit: cover;
|
|
1407
1447
|
}
|
|
1408
1448
|
|
|
1409
1449
|
.p-0\\.5 {
|
|
@@ -1434,6 +1474,11 @@ video {
|
|
|
1434
1474
|
padding: 1.5rem;
|
|
1435
1475
|
}
|
|
1436
1476
|
|
|
1477
|
+
.px-2 {
|
|
1478
|
+
padding-left: 0.5rem;
|
|
1479
|
+
padding-right: 0.5rem;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1437
1482
|
.px-3 {
|
|
1438
1483
|
padding-left: 0.75rem;
|
|
1439
1484
|
padding-right: 0.75rem;
|
|
@@ -1449,9 +1494,9 @@ video {
|
|
|
1449
1494
|
padding-right: 1.25rem;
|
|
1450
1495
|
}
|
|
1451
1496
|
|
|
1452
|
-
.
|
|
1453
|
-
padding-
|
|
1454
|
-
padding-
|
|
1497
|
+
.py-1 {
|
|
1498
|
+
padding-top: 0.25rem;
|
|
1499
|
+
padding-bottom: 0.25rem;
|
|
1455
1500
|
}
|
|
1456
1501
|
|
|
1457
1502
|
.py-1\\.5 {
|
|
@@ -1474,11 +1519,6 @@ video {
|
|
|
1474
1519
|
padding-bottom: 0.875rem;
|
|
1475
1520
|
}
|
|
1476
1521
|
|
|
1477
|
-
.px-2 {
|
|
1478
|
-
padding-left: 0.5rem;
|
|
1479
|
-
padding-right: 0.5rem;
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
1522
|
.pl-3 {
|
|
1483
1523
|
padding-left: 0.75rem;
|
|
1484
1524
|
}
|
|
@@ -1539,14 +1579,26 @@ video {
|
|
|
1539
1579
|
font-weight: 600;
|
|
1540
1580
|
}
|
|
1541
1581
|
|
|
1542
|
-
.
|
|
1543
|
-
|
|
1582
|
+
.uppercase {
|
|
1583
|
+
text-transform: uppercase;
|
|
1544
1584
|
}
|
|
1545
1585
|
|
|
1546
1586
|
.leading-3 {
|
|
1547
1587
|
line-height: .75rem;
|
|
1548
1588
|
}
|
|
1549
1589
|
|
|
1590
|
+
.leading-5 {
|
|
1591
|
+
line-height: 1.25rem;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
.leading-relaxed {
|
|
1595
|
+
line-height: 1.625;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.leading-snug {
|
|
1599
|
+
line-height: 1.375;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1550
1602
|
.text-blue-700 {
|
|
1551
1603
|
--tw-text-opacity: 1;
|
|
1552
1604
|
color: rgb(29 78 216 / var(--tw-text-opacity, 1));
|
|
@@ -1582,15 +1634,6 @@ video {
|
|
|
1582
1634
|
color: rgb(12 74 110 / var(--tw-text-opacity, 1));
|
|
1583
1635
|
}
|
|
1584
1636
|
|
|
1585
|
-
.text-white {
|
|
1586
|
-
--tw-text-opacity: 1;
|
|
1587
|
-
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
.text-white\\/90 {
|
|
1591
|
-
color: rgb(255 255 255 / 0.9);
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
1637
|
.text-slate-500 {
|
|
1595
1638
|
--tw-text-opacity: 1;
|
|
1596
1639
|
color: rgb(100 116 139 / var(--tw-text-opacity, 1));
|
|
@@ -1601,14 +1644,24 @@ video {
|
|
|
1601
1644
|
color: rgb(71 85 105 / var(--tw-text-opacity, 1));
|
|
1602
1645
|
}
|
|
1603
1646
|
|
|
1647
|
+
.text-slate-700 {
|
|
1648
|
+
--tw-text-opacity: 1;
|
|
1649
|
+
color: rgb(51 65 85 / var(--tw-text-opacity, 1));
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1604
1652
|
.text-slate-800 {
|
|
1605
1653
|
--tw-text-opacity: 1;
|
|
1606
1654
|
color: rgb(30 41 59 / var(--tw-text-opacity, 1));
|
|
1607
1655
|
}
|
|
1608
1656
|
|
|
1609
|
-
.text-slate-
|
|
1657
|
+
.text-slate-900 {
|
|
1610
1658
|
--tw-text-opacity: 1;
|
|
1611
|
-
color: rgb(
|
|
1659
|
+
color: rgb(15 23 42 / var(--tw-text-opacity, 1));
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
.text-white {
|
|
1663
|
+
--tw-text-opacity: 1;
|
|
1664
|
+
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
1612
1665
|
}
|
|
1613
1666
|
|
|
1614
1667
|
.opacity-0 {
|
|
@@ -1623,16 +1676,18 @@ video {
|
|
|
1623
1676
|
opacity: 0.7;
|
|
1624
1677
|
}
|
|
1625
1678
|
|
|
1626
|
-
.opacity-80 {
|
|
1627
|
-
opacity: 0.8;
|
|
1628
|
-
}
|
|
1629
|
-
|
|
1630
1679
|
.shadow {
|
|
1631
1680
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
1632
1681
|
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
1633
1682
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1634
1683
|
}
|
|
1635
1684
|
|
|
1685
|
+
.shadow-lg {
|
|
1686
|
+
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
1687
|
+
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
1688
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1636
1691
|
.shadow-md {
|
|
1637
1692
|
--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
1638
1693
|
--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
|
|
@@ -1651,12 +1706,6 @@ video {
|
|
|
1651
1706
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1652
1707
|
}
|
|
1653
1708
|
|
|
1654
|
-
.shadow-lg {
|
|
1655
|
-
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
1656
|
-
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
1657
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
1709
|
.outline-none {
|
|
1661
1710
|
outline: 2px solid transparent;
|
|
1662
1711
|
outline-offset: 2px;
|
|
@@ -1697,6 +1746,12 @@ video {
|
|
|
1697
1746
|
transition-duration: 150ms;
|
|
1698
1747
|
}
|
|
1699
1748
|
|
|
1749
|
+
.transition-\\[height\\2c background-color\\] {
|
|
1750
|
+
transition-property: height,background-color;
|
|
1751
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1752
|
+
transition-duration: 150ms;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1700
1755
|
.transition-all {
|
|
1701
1756
|
transition-property: all;
|
|
1702
1757
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -1721,12 +1776,6 @@ video {
|
|
|
1721
1776
|
transition-duration: 150ms;
|
|
1722
1777
|
}
|
|
1723
1778
|
|
|
1724
|
-
.transition-\\[height\\2c background-color\\] {
|
|
1725
|
-
transition-property: height,background-color;
|
|
1726
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1727
|
-
transition-duration: 150ms;
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
1779
|
.duration-150 {
|
|
1731
1780
|
transition-duration: 150ms;
|
|
1732
1781
|
}
|
|
@@ -1787,22 +1836,14 @@ video {
|
|
|
1787
1836
|
background-color: rgb(219 234 254 / var(--tw-bg-opacity, 1));
|
|
1788
1837
|
}
|
|
1789
1838
|
|
|
1790
|
-
.hover\\:bg-
|
|
1791
|
-
background-color: rgb(255 255 255 / 0.1);
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
.hover\\:bg-white\\/20:hover {
|
|
1795
|
-
background-color: rgb(255 255 255 / 0.2);
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
.hover\\:bg-blue-700:hover {
|
|
1839
|
+
.hover\\:bg-slate-100:hover {
|
|
1799
1840
|
--tw-bg-opacity: 1;
|
|
1800
|
-
background-color: rgb(
|
|
1841
|
+
background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1));
|
|
1801
1842
|
}
|
|
1802
1843
|
|
|
1803
|
-
.hover\\:bg-slate-
|
|
1844
|
+
.hover\\:bg-slate-200:hover {
|
|
1804
1845
|
--tw-bg-opacity: 1;
|
|
1805
|
-
background-color: rgb(
|
|
1846
|
+
background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1));
|
|
1806
1847
|
}
|
|
1807
1848
|
|
|
1808
1849
|
.hover\\:bg-violet-700:hover {
|
|
@@ -1810,9 +1851,8 @@ video {
|
|
|
1810
1851
|
background-color: rgb(109 40 217 / var(--tw-bg-opacity, 1));
|
|
1811
1852
|
}
|
|
1812
1853
|
|
|
1813
|
-
.hover\\:bg-
|
|
1814
|
-
|
|
1815
|
-
background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1));
|
|
1854
|
+
.hover\\:bg-white\\/20:hover {
|
|
1855
|
+
background-color: rgb(255 255 255 / 0.2);
|
|
1816
1856
|
}
|
|
1817
1857
|
|
|
1818
1858
|
.hover\\:text-sky-900:hover {
|
|
@@ -1820,14 +1860,14 @@ video {
|
|
|
1820
1860
|
color: rgb(12 74 110 / var(--tw-text-opacity, 1));
|
|
1821
1861
|
}
|
|
1822
1862
|
|
|
1823
|
-
.hover\\:text-
|
|
1863
|
+
.hover\\:text-slate-700:hover {
|
|
1824
1864
|
--tw-text-opacity: 1;
|
|
1825
|
-
color: rgb(
|
|
1865
|
+
color: rgb(51 65 85 / var(--tw-text-opacity, 1));
|
|
1826
1866
|
}
|
|
1827
1867
|
|
|
1828
|
-
.hover\\:text-
|
|
1868
|
+
.hover\\:text-white:hover {
|
|
1829
1869
|
--tw-text-opacity: 1;
|
|
1830
|
-
color: rgb(
|
|
1870
|
+
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
1831
1871
|
}
|
|
1832
1872
|
|
|
1833
1873
|
.hover\\:underline:hover {
|
|
@@ -1844,17 +1884,31 @@ video {
|
|
|
1844
1884
|
--tw-ring-color: rgb(37 99 235 / 0.3);
|
|
1845
1885
|
}
|
|
1846
1886
|
|
|
1887
|
+
.focus\\:border-\\[var\\(--chatsystem-primary-color\\)\\]:focus {
|
|
1888
|
+
border-color: var(--chatsystem-primary-color);
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1847
1891
|
.focus\\:outline-none:focus {
|
|
1848
1892
|
outline: 2px solid transparent;
|
|
1849
1893
|
outline-offset: 2px;
|
|
1850
1894
|
}
|
|
1851
1895
|
|
|
1896
|
+
.focus\\:ring-2:focus {
|
|
1897
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
1898
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
1899
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1852
1902
|
.focus\\:ring-4:focus {
|
|
1853
1903
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
1854
1904
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
1855
1905
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
1856
1906
|
}
|
|
1857
1907
|
|
|
1908
|
+
.focus\\:ring-\\[color-mix\\(in_srgb\\2c var\\(--chatsystem-primary-color\\)_20\\%\\2c transparent\\)\\]:focus {
|
|
1909
|
+
--tw-ring-color: color-mix(in srgb,var(--chatsystem-primary-color) 20%,transparent);
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1858
1912
|
.focus\\:ring-blue-300:focus {
|
|
1859
1913
|
--tw-ring-opacity: 1;
|
|
1860
1914
|
--tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity, 1));
|
|
@@ -1885,15 +1939,15 @@ video {
|
|
|
1885
1939
|
--tw-ring-color: rgb(37 99 235 / 0.5);
|
|
1886
1940
|
}
|
|
1887
1941
|
|
|
1888
|
-
.focus-visible\\:ring-white\\/80:focus-visible {
|
|
1889
|
-
--tw-ring-color: rgb(255 255 255 / 0.8);
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
1942
|
.focus-visible\\:ring-slate-400:focus-visible {
|
|
1893
1943
|
--tw-ring-opacity: 1;
|
|
1894
1944
|
--tw-ring-color: rgb(148 163 184 / var(--tw-ring-opacity, 1));
|
|
1895
1945
|
}
|
|
1896
1946
|
|
|
1947
|
+
.focus-visible\\:ring-white\\/80:focus-visible {
|
|
1948
|
+
--tw-ring-color: rgb(255 255 255 / 0.8);
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1897
1951
|
.focus-visible\\:ring-offset-2:focus-visible {
|
|
1898
1952
|
--tw-ring-offset-width: 2px;
|
|
1899
1953
|
}
|
|
@@ -1934,15 +1988,37 @@ video {
|
|
|
1934
1988
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1935
1989
|
}
|
|
1936
1990
|
|
|
1991
|
+
.disabled\\:cursor-not-allowed:disabled {
|
|
1992
|
+
cursor: not-allowed;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
.disabled\\:bg-slate-50:disabled {
|
|
1996
|
+
--tw-bg-opacity: 1;
|
|
1997
|
+
background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));
|
|
1998
|
+
}
|
|
1999
|
+
|
|
1937
2000
|
.disabled\\:text-gray-400:disabled {
|
|
1938
2001
|
--tw-text-opacity: 1;
|
|
1939
2002
|
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|
|
1940
2003
|
}
|
|
1941
2004
|
|
|
2005
|
+
.disabled\\:text-slate-500:disabled {
|
|
2006
|
+
--tw-text-opacity: 1;
|
|
2007
|
+
color: rgb(100 116 139 / var(--tw-text-opacity, 1));
|
|
2008
|
+
}
|
|
2009
|
+
|
|
1942
2010
|
.disabled\\:opacity-10:disabled {
|
|
1943
2011
|
opacity: 0.1;
|
|
1944
2012
|
}
|
|
1945
2013
|
|
|
2014
|
+
.disabled\\:opacity-40:disabled {
|
|
2015
|
+
opacity: 0.4;
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
.disabled\\:opacity-60:disabled {
|
|
2019
|
+
opacity: 0.6;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
1946
2022
|
.group:hover .group-hover\\:rotate-180 {
|
|
1947
2023
|
--tw-rotate: 180deg;
|
|
1948
2024
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
@@ -2014,11 +2090,25 @@ video {
|
|
|
2014
2090
|
--tw-ring-color: rgb(15 23 42 / var(--tw-ring-opacity, 1));
|
|
2015
2091
|
}
|
|
2016
2092
|
|
|
2093
|
+
@media (min-width: 640px) {
|
|
2094
|
+
.sm\\:grid-cols-2 {
|
|
2095
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2017
2099
|
@media (min-width: 768px) {
|
|
2018
2100
|
.md\\:inset-auto {
|
|
2019
2101
|
inset: auto;
|
|
2020
2102
|
}
|
|
2021
2103
|
|
|
2104
|
+
.md\\:\\!right-12 {
|
|
2105
|
+
right: 3rem !important;
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
.md\\:\\!right-3 {
|
|
2109
|
+
right: 0.75rem !important;
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2022
2112
|
.md\\:bottom-2 {
|
|
2023
2113
|
bottom: 0.5rem;
|
|
2024
2114
|
}
|
|
@@ -2027,10 +2117,6 @@ video {
|
|
|
2027
2117
|
bottom: calc(80px + 1rem);
|
|
2028
2118
|
}
|
|
2029
2119
|
|
|
2030
|
-
.md\\:right-12 {
|
|
2031
|
-
right: 3rem;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
2120
|
.md\\:right-3 {
|
|
2035
2121
|
right: 0.75rem;
|
|
2036
2122
|
}
|
|
@@ -2039,14 +2125,6 @@ video {
|
|
|
2039
2125
|
right: 1.5rem;
|
|
2040
2126
|
}
|
|
2041
2127
|
|
|
2042
|
-
.md\\:\\!right-12 {
|
|
2043
|
-
right: 3rem !important;
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
.md\\:\\!right-3 {
|
|
2047
|
-
right: 0.75rem !important;
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
2128
|
.md\\:block {
|
|
2051
2129
|
display: block;
|
|
2052
2130
|
}
|
|
@@ -2071,13 +2149,85 @@ video {
|
|
|
2071
2149
|
padding-right: 6rem;
|
|
2072
2150
|
}
|
|
2073
2151
|
}
|
|
2074
|
-
`,
|
|
2152
|
+
`,QS=`.chatSystemWidget {
|
|
2075
2153
|
--chatsystem-primary-color: #7c3aed;
|
|
2076
2154
|
--chatsystem-primary-color-hover: color-mix(
|
|
2077
2155
|
in srgb,
|
|
2078
2156
|
var(--chatsystem-primary-color) 84%,
|
|
2079
2157
|
black
|
|
2080
2158
|
);
|
|
2159
|
+
--chatsystem-interactive-surface: #ffffff;
|
|
2160
|
+
--chatsystem-interactive-border: #e2e8f0;
|
|
2161
|
+
--chatsystem-interactive-text: #0f172a;
|
|
2162
|
+
--chatsystem-interactive-muted: #475569;
|
|
2163
|
+
--chatsystem-interactive-radius: 0.75rem;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
/*
|
|
2167
|
+
* Stable customization contract for every built-in interactive presentation.
|
|
2168
|
+
* Literal Tailwind classes provide the shipped defaults; these names and
|
|
2169
|
+
* variables let company CSS override them without depending on generated CSS.
|
|
2170
|
+
*/
|
|
2171
|
+
.chatsystem-interactive-widget {
|
|
2172
|
+
background: var(--chatsystem-interactive-surface);
|
|
2173
|
+
border-color: var(--chatsystem-interactive-border);
|
|
2174
|
+
border-radius: var(--chatsystem-interactive-radius);
|
|
2175
|
+
color: var(--chatsystem-interactive-text);
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
.chatsystem-interactive-widget__description,
|
|
2179
|
+
.chatsystem-interactive-widget__field-description {
|
|
2180
|
+
color: var(--chatsystem-interactive-muted);
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
.chatsystem-interactive-widget__control:focus-visible,
|
|
2184
|
+
.chatsystem-interactive-widget__button:focus-visible {
|
|
2185
|
+
outline: 2px solid var(--chatsystem-primary-color);
|
|
2186
|
+
outline-offset: 2px;
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
.chatsystem-interactive-widget__button--primary {
|
|
2190
|
+
background: var(--chatsystem-primary-color);
|
|
2191
|
+
border-color: var(--chatsystem-primary-color);
|
|
2192
|
+
color: #ffffff;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
.chatsystem-interactive-widget__button--primary:hover:enabled {
|
|
2196
|
+
background: var(--chatsystem-primary-color-hover);
|
|
2197
|
+
border-color: var(--chatsystem-primary-color-hover);
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
.chatsystem-interactive-widget__button--secondary {
|
|
2201
|
+
background: #ffffff;
|
|
2202
|
+
border-color: var(--chatsystem-interactive-border);
|
|
2203
|
+
color: var(--chatsystem-interactive-text);
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
.chatsystem-interactive-widget__button--danger {
|
|
2207
|
+
background: #b91c1c;
|
|
2208
|
+
border-color: #b91c1c;
|
|
2209
|
+
color: #ffffff;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
.chatsystem-interactive-widget__status--neutral,
|
|
2213
|
+
.chatsystem-interactive-widget__status--info {
|
|
2214
|
+
background: #f1f5f9;
|
|
2215
|
+
color: #334155;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
.chatsystem-interactive-widget__status--success {
|
|
2219
|
+
background: #f0fdf4;
|
|
2220
|
+
color: #166534;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
.chatsystem-interactive-widget__status--warning {
|
|
2224
|
+
background: #fffbeb;
|
|
2225
|
+
color: #92400e;
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
.chatsystem-interactive-widget__status--danger {
|
|
2229
|
+
background: #fef2f2;
|
|
2230
|
+
color: #991b1b;
|
|
2081
2231
|
}
|
|
2082
2232
|
|
|
2083
2233
|
.chatsystem-primary-background,
|
|
@@ -2416,7 +2566,7 @@ video {
|
|
|
2416
2566
|
outline: 2px solid var(--chatsystem-primary-color);
|
|
2417
2567
|
outline-offset: 2px;
|
|
2418
2568
|
}
|
|
2419
|
-
`,
|
|
2569
|
+
`,KS=`/* React-Css Transitions */
|
|
2420
2570
|
.menuTransition-enter {
|
|
2421
2571
|
opacity: 0;
|
|
2422
2572
|
transform: scale(0.9) translateX(200px);
|
|
@@ -2485,7 +2635,7 @@ textarea::placeholder {
|
|
|
2485
2635
|
.messagesContainer {
|
|
2486
2636
|
outline:none
|
|
2487
2637
|
}
|
|
2488
|
-
`,
|
|
2638
|
+
`,JS=`/* Core mic button */
|
|
2489
2639
|
.mic-core {
|
|
2490
2640
|
position: absolute;
|
|
2491
2641
|
inset: 0;
|
|
@@ -2533,7 +2683,7 @@ textarea::placeholder {
|
|
|
2533
2683
|
70% { opacity: 0.12; }
|
|
2534
2684
|
100% { transform: scale(2.1); opacity: 0; }
|
|
2535
2685
|
}
|
|
2536
|
-
`,
|
|
2686
|
+
`,ZS=`/* 1) Remove UA outline on the shadow host */
|
|
2537
2687
|
:host(:focus),
|
|
2538
2688
|
:host(:focus-visible) { outline: none; }
|
|
2539
2689
|
|
|
@@ -2545,9 +2695,9 @@ textarea::placeholder {
|
|
|
2545
2695
|
|
|
2546
2696
|
/* Ensure the wrapper itself doesn't get a default outline either */
|
|
2547
2697
|
.app-root:focus { outline: none; }
|
|
2548
|
-
`,
|
|
2549
|
-
${
|
|
2550
|
-
${
|
|
2551
|
-
${
|
|
2552
|
-
${
|
|
2698
|
+
`,Cu=`${XS}
|
|
2699
|
+
${QS}
|
|
2700
|
+
${KS}
|
|
2701
|
+
${ZS}
|
|
2702
|
+
${JS}`;function eC({displayMode:e,appRoot:t,styleId:n}){const r=GS(),{hasFetchedSettings:i}=im(),{companySettings:a}=C.useContext(Rt);return C.useEffect(()=>{i&&r.setHasFetchedSettings()},[i,r.setHasFetchedSettings]),qS(a?.agent?.display?.CSSRules,{id:n,target:t},i,r.setHasDisplayedCss),b.jsx(YS.Provider,{value:r,children:r.appInternalContext.hasDisplayedCSS&&b.jsx("div",{className:"chatSystemWidget app-root",children:b.jsx($S,{displayMode:e})})})}function Md({cssHref:e,displayMode:t=Wt.LAUNCHER}){const n=WS(t),r=n===Wt.LAUNCHER?"body":"inline",i=C.useId().replace(/[^a-zA-Z0-9_-]/g,""),a=C.useRef(null),[s,o]=C.useState(null),[u,c]=C.useState(null);return C.useEffect(()=>{if(typeof document>"u")return;const d=r==="inline"?a.current:document.body;if(!d)return;const f=document.createElement("div");f.dataset.chatsystemView=n,d.appendChild(f);const m=f.attachShadow({mode:"open",delegatesFocus:!0});c(m);let h=!1;try{if("adoptedStyleSheets"in m&&!e){const y=new CSSStyleSheet;y.replaceSync(Cu),m.adoptedStyleSheets=[...m.adoptedStyleSheets,y],h=!0}}catch{}if(!h)if(e){const y=document.createElement("link");y.rel="stylesheet",y.href=e,m.appendChild(y)}else{const y=document.createElement("style");y.textContent=Cu,m.appendChild(y)}const g=document.createElement("div");return m.appendChild(g),o(g),()=>{o(null),c(null),f.remove()}},[n,e,r]),b.jsxs(b.Fragment,{children:[r==="inline"&&b.jsx("div",{ref:a}),s&&u&&Hn.createPortal(b.jsx(eC,{displayMode:n,appRoot:u,styleId:`chatsystem-custom-${i}`}),s)]})}function tC({cssHref:e,displayMode:t,appToken:n,agentId:r,shouldDisplayLogs:i,apiUrl:a,identityProvider:s,runtimeAdapter:o}){return b.jsx(Sc,{appToken:n,agentId:r,shouldDisplayLogs:i,apiUrl:a,identityProvider:s,runtimeAdapter:o,children:b.jsx(Md,{cssHref:e,displayMode:t})})}exports.App=tC;exports.WidgetRuntime=Sc;exports.WidgetView=Md;
|
|
2553
2703
|
//# sourceMappingURL=index.cjs.map
|