react-instantsearch 7.47.0 → 7.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /*! React InstantSearch 7.47.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
1
+ /*! React InstantSearch 7.48.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
@@ -24,7 +24,7 @@
24
24
 
25
25
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
26
26
 
27
- var version$2 = '7.47.0';
27
+ var version$2 = '7.48.0';
28
28
 
29
29
  function _define_property(obj, key, value) {
30
30
  if (key in obj) {
@@ -9392,7 +9392,7 @@
9392
9392
  });
9393
9393
  }
9394
9394
 
9395
- var version = '4.114.0';
9395
+ var version = '4.115.0';
9396
9396
 
9397
9397
  var ANONYMOUS_TOKEN_COOKIE_KEY = '_ALGOLIA';
9398
9398
  function getCookie(name) {
@@ -14381,7 +14381,7 @@
14381
14381
  };
14382
14382
  };
14383
14383
 
14384
- function n(){return n=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);}return e},n.apply(this,arguments)}const o=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,n)=>(e[n.toLowerCase()]=n,e),{class:"className",for:"htmlFor"}),a={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},c=["style","script","pre"],i=["src","href","data","formAction","srcDoc","action"],u=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,l=/\n{2,}$/,s=/^(\s*>[\s\S]*?)(?=\n\n|$)/,f=/^ *> ?/gm,_=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,d=/^ {2,}\n/,p=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,y=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,h=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,g=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,m=/^(?:\n *)*\n/,k=/\r\n?/g,x=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,q=/^\[\^([^\]]+)]/,v=/\f/g,b=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,$=/^\s*?\[(x|\s)\]/,S=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,z=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,E=/^([^\n]+)\n *(=|-)\2{2,} *\n/,A=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,R=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,B=/^<!--[\s\S]*?(?:-->)/,L=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,O=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,j=/^\{.*\}$/,C=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,I=/^<([^ >]+[:@\/][^ >]+)>/,T=/-([a-z])?/gi,M=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,w=/^[^\n]+(?: \n|\n{2,})/,D=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,F=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,P=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Z=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,N=/\t/g,G=/(^ *\||\| *$)/g,U=/^ *:-+: *$/,V=/^ *:-+ *$/,H=/^ *-+: *$/,Q=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,W="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",J=RegExp(`^([*_])\\1${Q(1)}${W}\\1\\1(?!\\1)`),K=RegExp(`^([*_])${Q(0)}${W}\\1(?!\\1)`),X=RegExp(`^(==)${Q(0)}${W}\\1`),Y=RegExp(`^(~~)${Q(0)}${W}\\1`),ee=/^(:[a-zA-Z0-9-_]+:)/,ne=/^\\([^0-9A-Za-z\s])/,re=/\\([^0-9A-Za-z\s])/g,te=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,oe=/^\n+/,ae=/^([ \t]*)/,ce=/(?:^|\n)( *)$/,ie="(?:\\d+\\.)",ue="(?:[*+-])";function le(e){return "( *)("+(1===e?ie:ue)+") +"}const se=le(1),fe=le(2);function _e(e){return RegExp("^"+(1===e?se:fe))}const de=_e(1),pe=_e(2);function ye(e){return RegExp("^"+(1===e?se:fe)+"[^\\n]*(?:\\n(?!\\1"+(1===e?ie:ue)+" )[^\\n]*)*(\\n|$)","gm")}const he=ye(1),ge=ye(2);function me(e){const n=1===e?ie:ue;return RegExp("^( *)("+n+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+n+" (?!"+n+" ))\\n*|\\s*\\n*$)")}const ke=me(1),xe=me(2);function qe(e,n){const r=1===n,t=r?ke:xe,o=r?he:ge,a=r?de:pe;return {t:e=>a.test(e),o:je(function(e,n){const r=ce.exec(n.prevCapture);return r&&(n.list||!n.inline&&!n.simple)?t.exec(e=r[1]+e):null}),i:1,u(e,n,t){const c=r?+e[2]:void 0,i=e[0].replace(l,"\n").match(o);let u=!1;return {items:i.map(function(e,r){const o=a.exec(e)[0].length,c=RegExp("^ {1,"+o+"}","gm"),l=e.replace(c,"").replace(a,""),s=r===i.length-1,f=-1!==l.indexOf("\n\n")||s&&u;u=f;const _=t.inline,d=t.list;let p;t.list=!0,f?(t.inline=!1,p=Se(l)+"\n\n"):(t.inline=!0,p=Se(l));const y=n(p,t);return t.inline=_,t.list=d,y}),ordered:r,start:c}},l:(n,r,t)=>e(n.ordered?"ol":"ul",{key:t.key,start:"20"===n.type?n.start:void 0},n.items.map(function(n,o){return e("li",{key:o},r(n,t))}))}}const ve=RegExp("^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),be=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function $e(e){return "string"==typeof e}function Se(e){let n=e.length;for(;n>0&&e[n-1]<=" ";)n--;return e.slice(0,n)}function ze(e,n){return e.startsWith(n)}function Ee(e,n,r){if(Array.isArray(r)){for(let n=0;n<r.length;n++)if(ze(e,r[n]))return !0;return !1}return r(e,n)}function Ae(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Re(e){return H.test(e)?"right":U.test(e)?"center":V.test(e)?"left":null}function Be(e,n,r,t){const o=r.inTable;r.inTable=!0;let a=[[]],c="";function i(){if(!c)return;const e=a[a.length-1];e.push.apply(e,n(c,r)),c="";}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,n,r)=>{"|"===e.trim()&&(i(),t)?0!==n&&n!==r.length-1&&a.push([]):c+=e;}),i(),r.inTable=o,a}function Le(e,n,r){r.inline=!0;const t=e[2]?e[2].replace(G,"").split("|").map(Re):[],o=e[3]?function(e,n,r){return e.trim().split("\n").map(function(e){return Be(e,n,r,!0)})}(e[3],n,r):[],a=Be(e[1],n,r,!!o.length);return r.inline=!1,o.length?{align:t,cells:o,header:a,type:"25"}:{children:a,type:"21"}}function Oe(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function je(e){return e.inline=1,e}function Ce(e){return je(function(n,r){return r.inline?e.exec(n):null})}function Ie(e){return je(function(n,r){return r.inline||r.simple?e.exec(n):null})}function Te(e){return function(n,r){return r.inline||r.simple?null:e.exec(n)}}function Me(e){return je(function(n){return e.exec(n)})}const we=/(javascript|vbscript|data(?!:image)):/i;function De(e){try{const n=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(we.test(n))return null}catch(e){return null}return e}function Fe(e){return e?e.replace(re,"$1"):e}function Pe(e,n,r){const t=r.inline||!1,o=r.simple||!1;r.inline=!0,r.simple=!0;const a=e(n,r);return r.inline=t,r.simple=o,a}function Ze(e,n,r){const t=r.inline||!1,o=r.simple||!1;r.inline=!1,r.simple=!0;const a=e(n,r);return r.inline=t,r.simple=o,a}function Ne(e,n,r){const t=r.inline||!1;r.inline=!1;const o=e(n,r);return r.inline=t,o}const Ge=(e,n,r)=>({children:Pe(n,e[2],r)});function Ue(){return {}}function Ve(){return null}function He(...e){return e.filter(Boolean).join(" ")}function Qe(e,n,r){let t=e;const o=n.split(".");for(;o.length&&(t=t[o[0]],void 0!==t);)o.shift();return t||r}function We(r="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?n({},a,t.namedCodesToUnicode):a;const l=t.slugify||Ae,G=t.sanitizer||De,U=t.createElement||React__namespace.createElement,V=[s,y,h,t.enforceAtxHeadings?z:S,E,M,ke,xe],H=[...V,w,A,B,O];function Q(e,n){for(let r=0;r<e.length;r++)if(e[r].test(n))return !0;return !1}function W(e,r,...o){const a=Qe(t.overrides,e+".props",{});return U(function(e,n){const r=Qe(n,e);return r?"function"==typeof r||"object"==typeof r&&"render"in r?r:Qe(n,e+".component",e):e}(e,t.overrides),n({},r,a,{className:He(null==r?void 0:r.className,a.className)||void 0}),...o)}function re(e){e=e.replace(b,"");let n=!1;t.forceInline?n=!0:t.forceBlock||(n=!1===Z.test(e));const r=fe(se(n?e:Se(e).replace(oe,"")+"\n\n",{inline:n}));for(;$e(r[r.length-1])&&!r[r.length-1].trim();)r.pop();if(null===t.wrapper)return r;const o=t.wrapper||(n?"span":"div");let a;if(r.length>1||t.forceWrapper)a=r;else {if(1===r.length)return a=r[0],"string"==typeof a?W("span",{key:"outer"},a):a;a=null;}return U(o,{key:"outer"},a)}function ce(e,n){if(!n||!n.trim())return null;const r=n.match(u);return r?r.reduce(function(n,r){const t=r.indexOf("=");if(-1!==t){const a=function(e){return -1!==e.indexOf("-")&&null===e.match(L)&&(e=e.replace(T,function(e,n){return n.toUpperCase()})),e}(r.slice(0,t)).trim(),c=function(e){const n=e[0];return ('"'===n||"'"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(r.slice(t+1).trim()),u=o[a]||a;if("ref"===u)return n;const l=n[u]=function(e,n,r,t){return "style"===n?function(e){const n=[];let r="",t=!1,o=!1,a="";if(!e)return n;for(let c=0;c<e.length;c++){const i=e[c];if('"'!==i&&"'"!==i||t||(o?i===a&&(o=!1,a=""):(o=!0,a=i)),"("===i&&r.endsWith("url")?t=!0:")"===i&&t&&(t=!1),";"!==i||o||t)r+=i;else {const e=r.trim();if(e){const r=e.indexOf(":");if(r>0){const t=e.slice(0,r).trim(),o=e.slice(r+1).trim();n.push([t,o]);}}r="";}}const c=r.trim();if(c){const e=c.indexOf(":");if(e>0){const r=c.slice(0,e).trim(),t=c.slice(e+1).trim();n.push([r,t]);}}return n}(r).reduce(function(n,[r,o]){return n[r.replace(/(-[a-z])/g,e=>e[1].toUpperCase())]=t(o,e,r),n},{}):-1!==i.indexOf(n)?t(Fe(r),e,n):(r.match(j)&&(r=Fe(r.slice(1,r.length-1))),"true"===r||"false"!==r&&r)}(e,a,c,G);"string"==typeof l&&(A.test(l)||O.test(l))&&(n[u]=re(l.trim()));}else "style"!==r&&(n[o[r]||r]=!0);return n},{}):null}const ie=[],ue={},le={0:{t:[">"],o:Te(s),i:1,u(e,n,r){const[,t,o]=e[0].replace(f,"").match(_);return {alert:t,children:n(o,r)}},l(e,n,r){const t={key:r.key};return e.alert&&(t.className="markdown-alert-"+l(e.alert.toLowerCase(),Ae),e.children.unshift({attrs:{},children:[{type:"27",text:e.alert}],noInnerParse:!0,type:"11",tag:"header"})),W("blockquote",t,n(e.children,r))}},1:{t:[" "],o:Me(d),i:1,u:Ue,l:(e,n,r)=>W("br",{key:r.key})},2:{t:["--","__","**","- ","* ","_ "],o:Te(p),i:1,u:Ue,l:(e,n,r)=>W("hr",{key:r.key})},3:{t:[" "],o:Te(h),i:0,u:e=>({lang:void 0,text:Fe(Se(e[0].replace(/^ {4}/gm,"")))}),l:(e,r,t)=>W("pre",{key:t.key},W("code",n({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))},4:{t:["```","~~~"],o:Te(y),i:0,u:e=>({attrs:ce("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"})},5:{t:["`"],o:Ie(g),i:3,u:e=>({text:Fe(e[2])}),l:(e,n,r)=>W("code",{key:r.key},e.text)},6:{t:["[^"],o:Te(x),i:0,u:e=>(ie.push({footnote:e[2],identifier:e[1]}),{}),l:Ve},7:{t:["[^"],o:Ce(q),i:1,u:e=>({target:"#"+l(e[1],Ae),text:e[1]}),l:(e,n,r)=>W("a",{key:r.key,href:G(e.target,"a","href")},W("sup",{key:r.key},e.text))},8:{t:["[ ]","[x]"],o:Ce($),i:1,u:e=>({completed:"x"===e[1].toLowerCase()}),l:(e,n,r)=>W("input",{checked:e.completed,key:r.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:Te(t.enforceAtxHeadings?z:S),i:1,u:(e,n,r)=>({children:Pe(n,e[2],r),id:l(e[2],Ae),level:e[1].length}),l:(e,n,r)=>W("h"+e.level,{id:e.id,key:r.key},n(e.children,r))},10:{t:e=>{const n=e.indexOf("\n");return n>0&&n<e.length-1&&("="===e[n+1]||"-"===e[n+1])},o:Te(E),i:0,u:(e,n,r)=>({children:Pe(n,e[1],r),level:"="===e[2]?1:2,type:"9"})},11:{t:["<"],o:Me(A),i:1,u(e,n,r){const[,t]=e[3].match(ae),o=RegExp("^"+t,"gm"),a=e[3].replace(o,""),i=Q(H,a)?Ne:Pe,u=e[1].toLowerCase(),l=-1!==c.indexOf(u),s=(l?u:e[1]).trim(),f={attrs:ce(s,e[2]),noInnerParse:l,tag:s};if(r.inAnchor=r.inAnchor||"a"===u,l)f.text=e[3];else {const e=r.inHTML;r.inHTML=!0,f.children=i(n,a,r),r.inHTML=e;}return r.inAnchor=!1,f},l:(e,r,t)=>W(e.tag,n({key:t.key},e.attrs),e.text||(e.children?r(e.children,t):""))},13:{t:["<"],o:Me(O),i:1,u(e){const n=e[1].trim();return {attrs:ce(n,e[2]||""),tag:n}},l:(e,r,t)=>W(e.tag,n({},e.attrs,{key:t.key}))},12:{t:["\x3c!--"],o:Me(B),i:1,u:()=>({}),l:Ve},14:{t:["!["],o:Ie(be),i:1,u:e=>({alt:Fe(e[1]),target:Fe(e[2]),title:Fe(e[3])}),l:(e,n,r)=>W("img",{key:r.key,alt:e.alt||void 0,title:e.title||void 0,src:G(e.target,"img","src")})},15:{t:["["],o:Ce(ve),i:3,u:(e,n,r)=>({children:Ze(n,e[1],r),target:Fe(e[2]),title:Fe(e[3])}),l:(e,n,r)=>W("a",{key:r.key,href:G(e.target,"a","href"),title:e.title},n(e.children,r))},16:{t:["<"],o:Ce(I),i:0,u(e){let n=e[1],r=!1;return -1!==n.indexOf("@")&&-1===n.indexOf("//")&&(r=!0,n=n.replace("mailto:","")),{children:[{text:n,type:"27"}],target:r?"mailto:"+n:n,type:"15"}}},17:{t:(e,n)=>!n.inAnchor&&!t.disableAutoLink&&(ze(e,"http://")||ze(e,"https://")),o:Ce(C),i:0,u:e=>({children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"})},20:qe(W,1),33:qe(W,2),19:{t:["\n"],o:Te(m),i:3,u:Ue,l:()=>"\n"},21:{o:je(function(e,n){if(n.inline||n.simple||n.inHTML&&-1===e.indexOf("\n\n")&&-1===n.prevCapture.indexOf("\n\n"))return null;let r="",t=0;for(;;){const n=e.indexOf("\n",t),o=e.slice(t,-1===n?void 0:n+1);if(Q(V,o))break;if(r+=o,-1===n||!o.trim())break;t=n+1;}const o=Se(r);return ""===o?null:[r,,o]}),i:3,u:Ge,l:(e,n,r)=>W("p",{key:r.key},n(e.children,r))},22:{t:["["],o:Ce(D),i:0,u:e=>(ue[e[1]]={target:e[2],title:e[4]},{}),l:Ve},23:{t:["!["],o:Ie(F),i:0,u:e=>({alt:e[1]?Fe(e[1]):void 0,ref:e[2]}),l:(e,n,r)=>ue[e.ref]?W("img",{key:r.key,alt:e.alt,src:G(ue[e.ref].target,"img","src"),title:ue[e.ref].title}):null},24:{t:e=>"["===e[0]&&-1===e.indexOf("]("),o:Ce(P),i:0,u:(e,n,r)=>({children:n(e[1],r),fallbackChildren:e[0],ref:e[2]}),l:(e,n,r)=>ue[e.ref]?W("a",{key:r.key,href:G(ue[e.ref].target,"a","href"),title:ue[e.ref].title},n(e.children,r)):W("span",{key:r.key},e.fallbackChildren)},25:{t:["|"],o:Te(M),i:1,u:Le,l(e,n,r){const t=e;return W("table",{key:r.key},W("thead",null,W("tr",null,t.header.map(function(e,o){return W("th",{key:o,style:Oe(t,o)},n(e,r))}))),W("tbody",null,t.cells.map(function(e,o){return W("tr",{key:o},e.map(function(e,o){return W("td",{key:o,style:Oe(t,o)},n(e,r))}))})))}},27:{o:je(function(e,n){let r;return ze(e,":")&&(r=ee.exec(e)),r||te.exec(e)}),i:4,u(e){const n=e[0];return {text:-1===n.indexOf("&")?n:n.replace(R,(e,n)=>t.namedCodesToUnicode[n]||e)}},l:e=>e.text},28:{t:["**","__"],o:Ie(J),i:2,u:(e,n,r)=>({children:n(e[2],r)}),l:(e,n,r)=>W("strong",{key:r.key},n(e.children,r))},29:{t:e=>{const n=e[0];return ("*"===n||"_"===n)&&e[1]!==n},o:Ie(K),i:3,u:(e,n,r)=>({children:n(e[2],r)}),l:(e,n,r)=>W("em",{key:r.key},n(e.children,r))},30:{t:["\\"],o:Ie(ne),i:1,u:e=>({text:e[1],type:"27"})},31:{t:["=="],o:Ie(X),i:3,u:Ge,l:(e,n,r)=>W("mark",{key:r.key},n(e.children,r))},32:{t:["~~"],o:Ie(Y),i:3,u:Ge,l:(e,n,r)=>W("del",{key:r.key},n(e.children,r))}};!0===t.disableParsingRawHTML&&(delete le[11],delete le[13]);const se=function(e){var n=Object.keys(e);function r(t,o){var a=[];if(o.prevCapture=o.prevCapture||"",t.trim())for(;t;)for(var c=0;c<n.length;){var i=n[c],u=e[i];if(!u.t||Ee(t,o,u.t)){var l=u.o(t,o);if(l&&l[0]){t=t.substring(l[0].length);var s=u.u(l,r,o);o.prevCapture+=l[0],s.type||(s.type=i),a.push(s);break}c++;}else c++;}return o.prevCapture="",a}return n.sort(function(n,r){return e[n].i-e[r].i||(n<r?-1:1)}),function(e,n){return r(function(e){return e.replace(k,"\n").replace(v,"").replace(N," ")}(e),n)}}(le),fe=function(e,n){return function r(t,o={}){if(Array.isArray(t)){const e=o.key,n=[];let a=!1;for(let e=0;e<t.length;e++){o.key=e;const c=r(t[e],o),i=$e(c);i&&a?n[n.length-1]+=c:null!==c&&n.push(c),a=i;}return o.key=e,n}return function(r,t,o){const a=e[r.type].l;return n?n(()=>a(r,t,o),r,t,o):a(r,t,o)}(t,r,o)}}(le,t.renderRule),_e=re(r);return ie.length?W("div",null,_e,W("footer",{key:"footer"},ie.map(function(e){return W("div",{id:l(e.identifier,Ae),key:e.identifier},e.identifier,fe(se(e.footnote,{inline:!0})))}))):_e}
14384
+ function n(){return n=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);}return e},n.apply(this,arguments)}const t={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",tableSeparator:"26",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"},o=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,n)=>(e[n.toLowerCase()]=n,e),{class:"className",for:"htmlFor"}),a={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},c=["style","script","pre"],i=["src","href","data","formAction","srcDoc","action"],u=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,l=/\n{2,}$/,s=/^(\s*>[\s\S]*?)(?=\n\n|$)/,f=/^ *> ?/gm,_=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,d=/^ {2,}\n/,p=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,y=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,h=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,g=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,m=/^(?:\n *)*\n/,k=/\r\n?/g,x=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,q=/^\[\^([^\]]+)]/,v=/\f/g,b=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,$=/^\s*?\[(x|\s)\]/,S=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,z=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,E=/^([^\n]+)\n *(=|-)\2{2,} *\n/,A=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,R=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,B=/^<!--[\s\S]*?(?:-->)/,L=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,O=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,j=/^\{.*\}$/,C=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,I=/^<([^ >]+[:@\/][^ >]+)>/,T=/-([a-z])?/gi,M=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,w=/^[^\n]+(?: \n|\n{2,})/,D=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,F=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,P=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Z=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,N=/\t/g,G=/(^ *\||\| *$)/g,U=/^ *:-+: *$/,V=/^ *:-+ *$/,H=/^ *-+: *$/,Q=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,W="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",J=RegExp(`^([*_])\\1${Q(1)}${W}\\1\\1(?!\\1)`),K=RegExp(`^([*_])${Q(0)}${W}\\1(?!\\1)`),X=RegExp(`^(==)${Q(0)}${W}\\1`),Y=RegExp(`^(~~)${Q(0)}${W}\\1`),ee=/^(:[a-zA-Z0-9-_]+:)/,ne=/^\\([^0-9A-Za-z\s])/,re=/\\([^0-9A-Za-z\s])/g,te=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,oe=/^\n+/,ae=/^([ \t]*)/,ce=/(?:^|\n)( *)$/,ie="(?:\\d+\\.)",ue="(?:[*+-])";function le(e){return "( *)("+(1===e?ie:ue)+") +"}const se=le(1),fe=le(2);function _e(e){return RegExp("^"+(1===e?se:fe))}const de=_e(1),pe=_e(2);function ye(e){return RegExp("^"+(1===e?se:fe)+"[^\\n]*(?:\\n(?!\\1"+(1===e?ie:ue)+" )[^\\n]*)*(\\n|$)","gm")}const he=ye(1),ge=ye(2);function me(e){const n=1===e?ie:ue;return RegExp("^( *)("+n+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+n+" (?!"+n+" ))\\n*|\\s*\\n*$)")}const ke=me(1),xe=me(2);function qe(e,n){const r=1===n,t=r?ke:xe,o=r?he:ge,a=r?de:pe;return {t:e=>a.test(e),o:je(function(e,n){const r=ce.exec(n.prevCapture);return r&&(n.list||!n.inline&&!n.simple)?t.exec(e=r[1]+e):null}),i:1,u(e,n,t){const c=r?+e[2]:void 0,i=e[0].replace(l,"\n").match(o);let u=!1;return {items:i.map(function(e,r){const o=a.exec(e)[0].length,c=RegExp("^ {1,"+o+"}","gm"),l=e.replace(c,"").replace(a,""),s=r===i.length-1,f=-1!==l.indexOf("\n\n")||s&&u;u=f;const _=t.inline,d=t.list;let p;t.list=!0,f?(t.inline=!1,p=Se(l)+"\n\n"):(t.inline=!0,p=Se(l));const y=n(p,t);return t.inline=_,t.list=d,y}),ordered:r,start:c}},l:(n,r,t)=>e(n.ordered?"ol":"ul",{key:t.key,start:"20"===n.type?n.start:void 0},n.items.map(function(n,o){return e("li",{key:o},r(n,t))}))}}const ve=RegExp("^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),be=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function $e(e){return "string"==typeof e}function Se(e){let n=e.length;for(;n>0&&e[n-1]<=" ";)n--;return e.slice(0,n)}function ze(e,n){return e.startsWith(n)}function Ee(e,n,r){if(Array.isArray(r)){for(let n=0;n<r.length;n++)if(ze(e,r[n]))return !0;return !1}return r(e,n)}function Ae(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Re(e){return H.test(e)?"right":U.test(e)?"center":V.test(e)?"left":null}function Be(e,n,r,t){const o=r.inTable;r.inTable=!0;let a=[[]],c="";function i(){if(!c)return;const e=a[a.length-1];e.push.apply(e,n(c,r)),c="";}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,n,r)=>{"|"===e.trim()&&(i(),t)?0!==n&&n!==r.length-1&&a.push([]):c+=e;}),i(),r.inTable=o,a}function Le(e,n,r){r.inline=!0;const t=e[2]?e[2].replace(G,"").split("|").map(Re):[],o=e[3]?function(e,n,r){return e.trim().split("\n").map(function(e){return Be(e,n,r,!0)})}(e[3],n,r):[],a=Be(e[1],n,r,!!o.length);return r.inline=!1,o.length?{align:t,cells:o,header:a,type:"25"}:{children:a,type:"21"}}function Oe(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function je(e){return e.inline=1,e}function Ce(e){return je(function(n,r){return r.inline?e.exec(n):null})}function Ie(e){return je(function(n,r){return r.inline||r.simple?e.exec(n):null})}function Te(e){return function(n,r){return r.inline||r.simple?null:e.exec(n)}}function Me(e){return je(function(n){return e.exec(n)})}const we=/(javascript|vbscript|data(?!:image)):/i;function De(e){try{const n=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(we.test(n))return null}catch(e){return null}return e}function Fe(e){return e?e.replace(re,"$1"):e}function Pe(e,n,r){const t=r.inline||!1,o=r.simple||!1;r.inline=!0,r.simple=!0;const a=e(n,r);return r.inline=t,r.simple=o,a}function Ze(e,n,r){const t=r.inline||!1,o=r.simple||!1;r.inline=!1,r.simple=!0;const a=e(n,r);return r.inline=t,r.simple=o,a}function Ne(e,n,r){const t=r.inline||!1;r.inline=!1;const o=e(n,r);return r.inline=t,o}const Ge=(e,n,r)=>({children:Pe(n,e[2],r)});function Ue(){return {}}function Ve(){return null}function He(...e){return e.filter(Boolean).join(" ")}function Qe(e,n,r){let t=e;const o=n.split(".");for(;o.length&&(t=t[o[0]],void 0!==t);)o.shift();return t||r}function We(r="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?n({},a,t.namedCodesToUnicode):a;const l=t.slugify||Ae,G=t.sanitizer||De,U=t.createElement||React__namespace.createElement,V=[s,y,h,t.enforceAtxHeadings?z:S,E,M,ke,xe],H=[...V,w,A,B,O];function Q(e,n){for(let r=0;r<e.length;r++)if(e[r].test(n))return !0;return !1}function W(e,r,...o){const a=Qe(t.overrides,e+".props",{});return U(function(e,n){const r=Qe(n,e);return r?"function"==typeof r||"object"==typeof r&&"render"in r?r:Qe(n,e+".component",e):e}(e,t.overrides),n({},r,a,{className:He(null==r?void 0:r.className,a.className)||void 0}),...o)}function re(e){e=e.replace(b,"");let n=!1;t.forceInline?n=!0:t.forceBlock||(n=!1===Z.test(e));const r=fe(se(n?e:Se(e).replace(oe,"")+"\n\n",{inline:n}));for(;$e(r[r.length-1])&&!r[r.length-1].trim();)r.pop();if(null===t.wrapper)return r;const o=t.wrapper||(n?"span":"div");let a;if(r.length>1||t.forceWrapper)a=r;else {if(1===r.length)return a=r[0],"string"==typeof a?W("span",{key:"outer"},a):a;a=null;}return U(o,{key:"outer"},a)}function ce(e,n){if(!n||!n.trim())return null;const r=n.match(u);return r?r.reduce(function(n,r){const t=r.indexOf("=");if(-1!==t){const a=function(e){return -1!==e.indexOf("-")&&null===e.match(L)&&(e=e.replace(T,function(e,n){return n.toUpperCase()})),e}(r.slice(0,t)).trim(),c=function(e){const n=e[0];return ('"'===n||"'"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(r.slice(t+1).trim()),u=o[a]||a;if("ref"===u)return n;const l=n[u]=function(e,n,r,t){return "style"===n?function(e){const n=[];let r="",t=!1,o=!1,a="";if(!e)return n;for(let c=0;c<e.length;c++){const i=e[c];if('"'!==i&&"'"!==i||t||(o?i===a&&(o=!1,a=""):(o=!0,a=i)),"("===i&&r.endsWith("url")?t=!0:")"===i&&t&&(t=!1),";"!==i||o||t)r+=i;else {const e=r.trim();if(e){const r=e.indexOf(":");if(r>0){const t=e.slice(0,r).trim(),o=e.slice(r+1).trim();n.push([t,o]);}}r="";}}const c=r.trim();if(c){const e=c.indexOf(":");if(e>0){const r=c.slice(0,e).trim(),t=c.slice(e+1).trim();n.push([r,t]);}}return n}(r).reduce(function(n,[r,o]){return n[r.replace(/(-[a-z])/g,e=>e[1].toUpperCase())]=t(o,e,r),n},{}):-1!==i.indexOf(n)?t(Fe(r),e,n):(r.match(j)&&(r=Fe(r.slice(1,r.length-1))),"true"===r||"false"!==r&&r)}(e,a,c,G);"string"==typeof l&&(A.test(l)||O.test(l))&&(n[u]=re(l.trim()));}else "style"!==r&&(n[o[r]||r]=!0);return n},{}):null}const ie=[],ue={},le={0:{t:[">"],o:Te(s),i:1,u(e,n,r){const[,t,o]=e[0].replace(f,"").match(_);return {alert:t,children:n(o,r)}},l(e,n,r){const t={key:r.key};return e.alert&&(t.className="markdown-alert-"+l(e.alert.toLowerCase(),Ae),e.children.unshift({attrs:{},children:[{type:"27",text:e.alert}],noInnerParse:!0,type:"11",tag:"header"})),W("blockquote",t,n(e.children,r))}},1:{t:[" "],o:Me(d),i:1,u:Ue,l:(e,n,r)=>W("br",{key:r.key})},2:{t:["--","__","**","- ","* ","_ "],o:Te(p),i:1,u:Ue,l:(e,n,r)=>W("hr",{key:r.key})},3:{t:[" "],o:Te(h),i:0,u:e=>({lang:void 0,text:Fe(Se(e[0].replace(/^ {4}/gm,"")))}),l:(e,r,t)=>W("pre",{key:t.key},W("code",n({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))},4:{t:["```","~~~"],o:Te(y),i:0,u:e=>({attrs:ce("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"})},5:{t:["`"],o:Ie(g),i:3,u:e=>({text:Fe(e[2])}),l:(e,n,r)=>W("code",{key:r.key},e.text)},6:{t:["[^"],o:Te(x),i:0,u:e=>(ie.push({footnote:e[2],identifier:e[1]}),{}),l:Ve},7:{t:["[^"],o:Ce(q),i:1,u:e=>({target:"#"+l(e[1],Ae),text:e[1]}),l:(e,n,r)=>W("a",{key:r.key,href:G(e.target,"a","href")},W("sup",{key:r.key},e.text))},8:{t:["[ ]","[x]"],o:Ce($),i:1,u:e=>({completed:"x"===e[1].toLowerCase()}),l:(e,n,r)=>W("input",{checked:e.completed,key:r.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:Te(t.enforceAtxHeadings?z:S),i:1,u:(e,n,r)=>({children:Pe(n,e[2],r),id:l(e[2],Ae),level:e[1].length}),l:(e,n,r)=>W("h"+e.level,{id:e.id,key:r.key},n(e.children,r))},10:{t:e=>{const n=e.indexOf("\n");return n>0&&n<e.length-1&&("="===e[n+1]||"-"===e[n+1])},o:Te(E),i:0,u:(e,n,r)=>({children:Pe(n,e[1],r),level:"="===e[2]?1:2,type:"9"})},11:{t:["<"],o:Me(A),i:1,u(e,n,r){const[,t]=e[3].match(ae),o=RegExp("^"+t,"gm"),a=e[3].replace(o,""),i=Q(H,a)?Ne:Pe,u=e[1].toLowerCase(),l=-1!==c.indexOf(u),s=(l?u:e[1]).trim(),f={attrs:ce(s,e[2]),noInnerParse:l,tag:s};if(r.inAnchor=r.inAnchor||"a"===u,l)f.text=e[3];else {const e=r.inHTML;r.inHTML=!0,f.children=i(n,a,r),r.inHTML=e;}return r.inAnchor=!1,f},l:(e,r,t)=>W(e.tag,n({key:t.key},e.attrs),e.text||(e.children?r(e.children,t):""))},13:{t:["<"],o:Me(O),i:1,u(e){const n=e[1].trim();return {attrs:ce(n,e[2]||""),tag:n}},l:(e,r,t)=>W(e.tag,n({},e.attrs,{key:t.key}))},12:{t:["\x3c!--"],o:Me(B),i:1,u:()=>({}),l:Ve},14:{t:["!["],o:Ie(be),i:1,u:e=>({alt:Fe(e[1]),target:Fe(e[2]),title:Fe(e[3])}),l:(e,n,r)=>W("img",{key:r.key,alt:e.alt||void 0,title:e.title||void 0,src:G(e.target,"img","src")})},15:{t:["["],o:Ce(ve),i:3,u:(e,n,r)=>({children:Ze(n,e[1],r),target:Fe(e[2]),title:Fe(e[3])}),l:(e,n,r)=>W("a",{key:r.key,href:G(e.target,"a","href"),title:e.title},n(e.children,r))},16:{t:["<"],o:Ce(I),i:0,u(e){let n=e[1],r=!1;return -1!==n.indexOf("@")&&-1===n.indexOf("//")&&(r=!0,n=n.replace("mailto:","")),{children:[{text:n,type:"27"}],target:r?"mailto:"+n:n,type:"15"}}},17:{t:(e,n)=>!n.inAnchor&&!t.disableAutoLink&&(ze(e,"http://")||ze(e,"https://")),o:Ce(C),i:0,u:e=>({children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"})},20:qe(W,1),33:qe(W,2),19:{t:["\n"],o:Te(m),i:3,u:Ue,l:()=>"\n"},21:{o:je(function(e,n){if(n.inline||n.simple||n.inHTML&&-1===e.indexOf("\n\n")&&-1===n.prevCapture.indexOf("\n\n"))return null;let r="",t=0;for(;;){const n=e.indexOf("\n",t),o=e.slice(t,-1===n?void 0:n+1);if(Q(V,o))break;if(r+=o,-1===n||!o.trim())break;t=n+1;}const o=Se(r);return ""===o?null:[r,,o]}),i:3,u:Ge,l:(e,n,r)=>W("p",{key:r.key},n(e.children,r))},22:{t:["["],o:Ce(D),i:0,u:e=>(ue[e[1]]={target:e[2],title:e[4]},{}),l:Ve},23:{t:["!["],o:Ie(F),i:0,u:e=>({alt:e[1]?Fe(e[1]):void 0,ref:e[2]}),l:(e,n,r)=>ue[e.ref]?W("img",{key:r.key,alt:e.alt,src:G(ue[e.ref].target,"img","src"),title:ue[e.ref].title}):null},24:{t:e=>"["===e[0]&&-1===e.indexOf("]("),o:Ce(P),i:0,u:(e,n,r)=>({children:n(e[1],r),fallbackChildren:e[0],ref:e[2]}),l:(e,n,r)=>ue[e.ref]?W("a",{key:r.key,href:G(ue[e.ref].target,"a","href"),title:ue[e.ref].title},n(e.children,r)):W("span",{key:r.key},e.fallbackChildren)},25:{t:["|"],o:Te(M),i:1,u:Le,l(e,n,r){const t=e;return W("table",{key:r.key},W("thead",null,W("tr",null,t.header.map(function(e,o){return W("th",{key:o,style:Oe(t,o)},n(e,r))}))),W("tbody",null,t.cells.map(function(e,o){return W("tr",{key:o},e.map(function(e,o){return W("td",{key:o,style:Oe(t,o)},n(e,r))}))})))}},27:{o:je(function(e,n){let r;return ze(e,":")&&(r=ee.exec(e)),r||te.exec(e)}),i:4,u(e){const n=e[0];return {text:-1===n.indexOf("&")?n:n.replace(R,(e,n)=>t.namedCodesToUnicode[n]||e)}},l:e=>e.text},28:{t:["**","__"],o:Ie(J),i:2,u:(e,n,r)=>({children:n(e[2],r)}),l:(e,n,r)=>W("strong",{key:r.key},n(e.children,r))},29:{t:e=>{const n=e[0];return ("*"===n||"_"===n)&&e[1]!==n},o:Ie(K),i:3,u:(e,n,r)=>({children:n(e[2],r)}),l:(e,n,r)=>W("em",{key:r.key},n(e.children,r))},30:{t:["\\"],o:Ie(ne),i:1,u:e=>({text:e[1],type:"27"})},31:{t:["=="],o:Ie(X),i:3,u:Ge,l:(e,n,r)=>W("mark",{key:r.key},n(e.children,r))},32:{t:["~~"],o:Ie(Y),i:3,u:Ge,l:(e,n,r)=>W("del",{key:r.key},n(e.children,r))}};!0===t.disableParsingRawHTML&&(delete le[11],delete le[13]);const se=function(e){var n=Object.keys(e);function r(t,o){var a=[];if(o.prevCapture=o.prevCapture||"",t.trim())for(;t;)for(var c=0;c<n.length;){var i=n[c],u=e[i];if(!u.t||Ee(t,o,u.t)){var l=u.o(t,o);if(l&&l[0]){t=t.substring(l[0].length);var s=u.u(l,r,o);o.prevCapture+=l[0],s.type||(s.type=i),a.push(s);break}c++;}else c++;}return o.prevCapture="",a}return n.sort(function(n,r){return e[n].i-e[r].i||(n<r?-1:1)}),function(e,n){return r(function(e){return e.replace(k,"\n").replace(v,"").replace(N," ")}(e),n)}}(le),fe=function(e,n){return function r(t,o={}){if(Array.isArray(t)){const e=o.key,n=[];let a=!1;for(let e=0;e<t.length;e++){o.key=e;const c=r(t[e],o),i=$e(c);i&&a?n[n.length-1]+=c:null!==c&&n.push(c),a=i;}return o.key=e,n}return function(r,t,o){const a=e[r.type].l;return n?n(()=>a(r,t,o),r,t,o):a(r,t,o)}(t,r,o)}}(le,t.renderRule),_e=re(r);return ie.length?W("div",null,_e,W("footer",{key:"footer"},ie.map(function(e){return W("div",{id:l(e.identifier,Ae),key:e.identifier},e.identifier,fe(se(e.footnote,{inline:!0})))}))):_e}
14385
14385
 
14386
14386
  var createRecords = function createRecords() {
14387
14387
  return Object.create(null);
@@ -14440,18 +14440,39 @@
14440
14440
  function createChatMessageReasoningComponent(param) {
14441
14441
  var createElement = param.createElement;
14442
14442
  return function ChatMessageReasoning(userProps) {
14443
- var part = userProps.part, isStreaming = userProps.isStreaming, _userProps_parseMarkdown = userProps.parseMarkdown, parseMarkdown = _userProps_parseMarkdown === void 0 ? true : _userProps_parseMarkdown, translations = userProps.translations, classNames = userProps.classNames;
14444
- var body = parseMarkdown ? We(part.text, {
14445
- createElement: createElement,
14446
- disableParsingRawHTML: true
14447
- }) : // newlines markdown would collapse.
14448
- /*#__PURE__*/ createElement("p", {
14449
- className: "ais-ChatMessage-text"
14450
- }, part.text);
14443
+ var parts = userProps.parts, hidden = userProps.hidden, _userProps_parseMarkdown = userProps.parseMarkdown, parseMarkdown = _userProps_parseMarkdown === void 0 ? true : _userProps_parseMarkdown, translations = userProps.translations, classNames = userProps.classNames;
14444
+ var activePart = parts.find(function(param) {
14445
+ var isStreaming = param.isStreaming;
14446
+ return isStreaming;
14447
+ });
14448
+ var isStreaming = Boolean(activePart);
14449
+ var hasActiveHint = Boolean(activePart === null || activePart === void 0 ? void 0 : activePart.part.text.trim());
14450
+ var renderPart = function renderPart(param) {
14451
+ var part = param.part;
14452
+ return parseMarkdown ? We(part.text, {
14453
+ createElement: createElement,
14454
+ disableParsingRawHTML: true
14455
+ }) : /*#__PURE__*/ createElement("p", {
14456
+ className: "ais-ChatMessage-text"
14457
+ }, part.text);
14458
+ };
14459
+ var renderHint = function renderHint(part) {
14460
+ return parseMarkdown ? We(part.text, {
14461
+ createElement: createElement,
14462
+ forceInline: true,
14463
+ renderRule: function renderRule(next, node) {
14464
+ if (node.type === t.htmlBlock || node.type === t.htmlComment || node.type === t.htmlSelfClosing) {
14465
+ return null;
14466
+ }
14467
+ return next();
14468
+ }
14469
+ }) : part.text;
14470
+ };
14451
14471
  return /*#__PURE__*/ createElement("details", {
14452
14472
  className: cx(classNames.reasoning),
14453
14473
  "aria-label": translations.reasoningLabel,
14454
- "aria-busy": isStreaming
14474
+ "aria-busy": isStreaming,
14475
+ hidden: hidden
14455
14476
  }, /*#__PURE__*/ createElement("summary", {
14456
14477
  className: cx(classNames.reasoningHeader)
14457
14478
  }, /*#__PURE__*/ createElement("span", {
@@ -14461,17 +14482,29 @@
14461
14482
  createElement: createElement
14462
14483
  })), /*#__PURE__*/ createElement("span", {
14463
14484
  className: cx(classNames.reasoningLabel)
14464
- }, translations.reasoningLabel), /*#__PURE__*/ createElement("span", {
14485
+ }, translations.reasoningLabel), activePart && hasActiveHint && /*#__PURE__*/ createElement("span", {
14486
+ className: "ais-ChatMessageReasoning-status",
14487
+ "aria-hidden": "true"
14488
+ }, /*#__PURE__*/ createElement("span", {
14489
+ className: "ais-ChatMessageReasoning-separator"
14490
+ }, "\xb7"), /*#__PURE__*/ createElement("span", {
14491
+ className: "ais-ChatMessageReasoning-hint"
14492
+ }, renderHint(activePart.part))), /*#__PURE__*/ createElement("span", {
14465
14493
  className: cx(classNames.reasoningChevron),
14466
14494
  "aria-hidden": "true"
14467
14495
  }, /*#__PURE__*/ createElement(ChevronDownIcon, {
14468
14496
  createElement: createElement
14469
14497
  }))), /*#__PURE__*/ createElement("div", {
14470
- className: cx(classNames.reasoningBody),
14471
- tabIndex: 0
14472
- }, /*#__PURE__*/ createElement("div", {
14498
+ className: cx(classNames.reasoningBody)
14499
+ }, /*#__PURE__*/ createElement("ol", {
14473
14500
  className: cx(classNames.reasoningText)
14474
- }, body)));
14501
+ }, parts.map(function(reasoningPart) {
14502
+ return /*#__PURE__*/ createElement("li", {
14503
+ key: reasoningPart.partIndex,
14504
+ className: "ais-ChatMessageReasoning-item",
14505
+ "aria-current": reasoningPart.isStreaming ? 'step' : undefined
14506
+ }, renderPart(reasoningPart));
14507
+ }))));
14475
14508
  };
14476
14509
  }
14477
14510
 
@@ -14504,8 +14537,8 @@
14504
14537
  createElement: createElement
14505
14538
  });
14506
14539
  return function ChatMessage(userProps) {
14507
- var _messages_;
14508
- var _userProps_classNames = userProps.classNames, classNames = _userProps_classNames === void 0 ? {} : _userProps_classNames, message = userProps.message, _userProps_side = userProps.side, side = _userProps_side === void 0 ? 'left' : _userProps_side, _userProps_variant = userProps.variant, variant = _userProps_variant === void 0 ? 'subtle' : _userProps_variant, _userProps_actions = userProps.actions, actions = _userProps_actions === void 0 ? [] : _userProps_actions, _userProps_autoHideActions = userProps.autoHideActions, autoHideActions = _userProps_autoHideActions === void 0 ? false : _userProps_autoHideActions, LeadingComponent = userProps.leadingComponent, ActionsComponent = userProps.actionsComponent, FooterComponent = userProps.footerComponent, TextComponent = userProps.textComponent, indexUiState = userProps.indexUiState, setIndexUiState = userProps.setIndexUiState, userTranslations = userProps.translations, suggestionsElement = userProps.suggestionsElement, loaderElement = userProps.loaderElement, _userProps_showReasoning = userProps.showReasoning, showReasoning = _userProps_showReasoning === void 0 ? false : _userProps_showReasoning, _userProps_parseMarkdown = userProps.parseMarkdown, parseMarkdown = _userProps_parseMarkdown === void 0 ? true : _userProps_parseMarkdown, ownMessages = userProps.messages, /* eslint-disable typescript/no-deprecated -- reading the
14540
+ var _messages_, _reasoningParts_;
14541
+ var _userProps_classNames = userProps.classNames, classNames = _userProps_classNames === void 0 ? {} : _userProps_classNames, message = userProps.message, _userProps_side = userProps.side, side = _userProps_side === void 0 ? 'left' : _userProps_side, _userProps_variant = userProps.variant, variant = _userProps_variant === void 0 ? 'subtle' : _userProps_variant, _userProps_actions = userProps.actions, actions = _userProps_actions === void 0 ? [] : _userProps_actions, _userProps_autoHideActions = userProps.autoHideActions, autoHideActions = _userProps_autoHideActions === void 0 ? false : _userProps_autoHideActions, LeadingComponent = userProps.leadingComponent, ActionsComponent = userProps.actionsComponent, FooterComponent = userProps.footerComponent, TextComponent = userProps.textComponent, ReasoningComponent = userProps.reasoningComponent, indexUiState = userProps.indexUiState, setIndexUiState = userProps.setIndexUiState, userTranslations = userProps.translations, suggestionsElement = userProps.suggestionsElement, loaderElement = userProps.loaderElement, _userProps_showReasoning = userProps.showReasoning, showReasoning = _userProps_showReasoning === void 0 ? true : _userProps_showReasoning, _userProps_parseMarkdown = userProps.parseMarkdown, parseMarkdown = _userProps_parseMarkdown === void 0 ? true : _userProps_parseMarkdown, ownMessages = userProps.messages, /* eslint-disable typescript/no-deprecated -- reading the
14509
14542
  deprecated aliases is the point: they are resolved into `context`
14510
14543
  below so callers on the previous API keep working. */ ownStatus = userProps.status, ownTools = userProps.tools, ownOnClose = userProps.onClose, /* eslint-enable typescript/no-deprecated */ sharedContext = userProps.context, props = _object_without_properties(userProps, [
14511
14544
  "classNames",
@@ -14518,6 +14551,7 @@
14518
14551
  "actionsComponent",
14519
14552
  "footerComponent",
14520
14553
  "textComponent",
14554
+ "reasoningComponent",
14521
14555
  "indexUiState",
14522
14556
  "setIndexUiState",
14523
14557
  "translations",
@@ -14557,6 +14591,30 @@
14557
14591
  };
14558
14592
  var hasLeading = Boolean(LeadingComponent);
14559
14593
  var isCurrentMessage = messages === undefined || ((_messages_ = messages[messages.length - 1]) === null || _messages_ === void 0 ? void 0 : _messages_.id) === message.id;
14594
+ var reasoningParts = showReasoning ? message.parts.reduce(function(receivedParts, part, partIndex) {
14595
+ if (part.type !== 'reasoning') {
14596
+ return receivedParts;
14597
+ }
14598
+ var isStreaming = status === 'streaming' && isCurrentMessage && isReasoningPartActive(message.parts, partIndex);
14599
+ if (!isStreaming && part.text.trim().length === 0) {
14600
+ return receivedParts;
14601
+ }
14602
+ receivedParts.push({
14603
+ part: part,
14604
+ partIndex: partIndex,
14605
+ isStreaming: isStreaming
14606
+ });
14607
+ return receivedParts;
14608
+ }, []) : [];
14609
+ var firstReasoningPartIndex = (_reasoningParts_ = reasoningParts[0]) === null || _reasoningParts_ === void 0 ? void 0 : _reasoningParts_.partIndex;
14610
+ // Keep the built-in native disclosure mounted through a temporary
14611
+ // eligibility gap so its reader-owned state survives resumed reasoning.
14612
+ var reasoningPartIndex = firstReasoningPartIndex !== null && firstReasoningPartIndex !== void 0 ? firstReasoningPartIndex : showReasoning && !ReasoningComponent && status === 'streaming' && isCurrentMessage ? message.parts.findIndex(function(part) {
14613
+ return part.type === 'reasoning';
14614
+ }) : -1;
14615
+ var isReasoningStreaming = reasoningParts.some(function(part) {
14616
+ return part.isStreaming;
14617
+ });
14560
14618
  var showActions = Boolean(actions.length > 0 || ActionsComponent) && status === 'ready';
14561
14619
  var cssClasses = {
14562
14620
  root: cx('ais-ChatMessage', "ais-ChatMessage--".concat(side), "ais-ChatMessage--".concat(variant), autoHideActions && 'ais-ChatMessage--auto-hide-actions', classNames.root),
@@ -14579,21 +14637,39 @@
14579
14637
  return null;
14580
14638
  }
14581
14639
  if (part.type === 'reasoning') {
14582
- if (!showReasoning) {
14583
- return null;
14640
+ // A custom component renders each step where it arrived, so the rendered
14641
+ // order matches the stream. The built-in disclosure below aggregates the
14642
+ // whole message into a single row, which is why only it is placed by
14643
+ // index.
14644
+ if (ReasoningComponent) {
14645
+ var receivedPart = reasoningParts.find(function(candidate) {
14646
+ return candidate.partIndex === index;
14647
+ });
14648
+ if (!receivedPart) {
14649
+ return null;
14650
+ }
14651
+ return /*#__PURE__*/ createElement(Fragment, {
14652
+ key: "".concat(message.id, "-reasoning-").concat(index)
14653
+ }, /*#__PURE__*/ createElement(ReasoningComponent, {
14654
+ part: receivedPart.part,
14655
+ partIndex: index,
14656
+ isStreaming: receivedPart.isStreaming,
14657
+ message: message,
14658
+ context: context
14659
+ }));
14584
14660
  }
14585
- var isReasoningStreaming = status === 'streaming' && isCurrentMessage && isReasoningPartActive(message.parts, index);
14586
- if (!isReasoningStreaming && part.text.trim().length === 0) {
14661
+ if (index !== reasoningPartIndex) {
14587
14662
  return null;
14588
14663
  }
14589
14664
  return /*#__PURE__*/ createElement(ChatMessageReasoning, {
14590
- key: "".concat(message.id, "-").concat(index),
14591
- part: part,
14592
- isStreaming: isReasoningStreaming,
14665
+ key: "".concat(message.id, "-reasoning"),
14666
+ parts: reasoningParts,
14667
+ hidden: reasoningParts.length === 0,
14593
14668
  parseMarkdown: parseMarkdown,
14594
14669
  translations: translations,
14595
14670
  classNames: _object_spread_props(_object_spread({}, cssClasses), {
14596
- reasoningLabel: cx('ais-ChatMessageReasoning-label', isReasoningStreaming && 'ais-ChatMessageReasoning-label--streaming', classNames.reasoningLabel)
14671
+ reasoningIcon: cx(cssClasses.reasoningIcon, isReasoningStreaming && 'ais-ChatMessageReasoning-icon--streaming'),
14672
+ reasoningLabel: cx(cssClasses.reasoningLabel, isReasoningStreaming && 'ais-ChatMessageReasoning-label--streaming')
14597
14673
  })
14598
14674
  });
14599
14675
  }
@@ -15121,9 +15197,10 @@
15121
15197
  // Read the row's own side, mirroring `DefaultMessage`, so one role's change
15122
15198
  // neither invalidates the other's completed rows nor goes unnoticed here.
15123
15199
  var messageProps = props.message.role === 'user' ? props.userMessageProps : props.assistantMessageProps;
15124
- var showReasoning = messageProps === null || messageProps === void 0 ? void 0 : messageProps.showReasoning;
15200
+ var showReasoning = (messageProps === null || messageProps === void 0 ? void 0 : messageProps.showReasoning) !== false;
15125
15201
  var parseMarkdown = messageProps === null || messageProps === void 0 ? void 0 : messageProps.parseMarkdown;
15126
15202
  var textComponent = messageProps === null || messageProps === void 0 ? void 0 : messageProps.textComponent;
15203
+ var reasoningComponent = messageProps === null || messageProps === void 0 ? void 0 : messageProps.reasoningComponent;
15127
15204
  // A completed row is memoized against its own message, but `shouldRender`
15128
15205
  // reads the whole `context`: a predicate can hide an older tool result once a
15129
15206
  // newer message arrives. Track the verdicts themselves rather than
@@ -15133,6 +15210,17 @@
15133
15210
  // Custom text components receive the conversation, so their completed rows
15134
15211
  // must update with it. Keep the default renderer's streaming optimization.
15135
15212
  var textComponentMessages = textComponent ? props.context.messages : undefined;
15213
+ // A custom reasoning component receives the full context, but completed
15214
+ // rows only need to update for its semantic state, so the memo tracks those
15215
+ // fields rather than `props.context`. The context's callback identities and
15216
+ // its scroll-only changes stay out. `reasoningComponent` is tracked, so
15217
+ // replacing the component still takes effect.
15218
+ var reasoningComponentMessages = reasoningComponent ? props.context.messages : undefined;
15219
+ var reasoningComponentStatus = reasoningComponent ? props.context.status : undefined;
15220
+ var reasoningComponentError = reasoningComponent ? props.context.error : undefined;
15221
+ var reasoningComponentIsClearing = reasoningComponent ? props.context.isClearing : undefined;
15222
+ var reasoningComponentActivePart = reasoningComponent ? props.context.activePart : undefined;
15223
+ var reasoningComponentTools = reasoningComponent ? props.context.tools : undefined;
15136
15224
  // Object-level fallback, matching the render: the spread replaces
15137
15225
  // `translations` wholesale, and it copies a key holding `undefined` too. Both
15138
15226
  // are why this resolves by own-key presence rather than key by key.
@@ -15168,6 +15256,13 @@
15168
15256
  parseMarkdown,
15169
15257
  textComponent,
15170
15258
  textComponentMessages,
15259
+ reasoningComponent,
15260
+ reasoningComponentMessages,
15261
+ reasoningComponentStatus,
15262
+ reasoningComponentError,
15263
+ reasoningComponentIsClearing,
15264
+ reasoningComponentActivePart,
15265
+ reasoningComponentTools,
15171
15266
  reasoningLabel,
15172
15267
  reasoningClassName,
15173
15268
  reasoningHeaderClassName,
@@ -15251,7 +15346,7 @@
15251
15346
  scrollToBottomHidden: cx('ais-ChatMessages-scrollToBottom--hidden', classNames.scrollToBottomHidden)
15252
15347
  };
15253
15348
  var lastMessage = messages[messages.length - 1];
15254
- var showReasoning = assistantMessageProps === null || assistantMessageProps === void 0 ? void 0 : assistantMessageProps.showReasoning;
15349
+ var showReasoning = (assistantMessageProps === null || assistantMessageProps === void 0 ? void 0 : assistantMessageProps.showReasoning) !== false;
15255
15350
  var lastPart = lastMessage === null || lastMessage === void 0 ? void 0 : (_lastMessage_parts = lastMessage.parts) === null || _lastMessage_parts === void 0 ? void 0 : _lastMessage_parts[lastMessage.parts.length - 1];
15256
15351
  // `activePart` means "the part currently being processed". It must clear
15257
15352
  // when nothing is in progress: once the response settles (`ready`/`error`),
@@ -15261,7 +15356,7 @@
15261
15356
  var isProcessing = status === 'submitted' || status === 'streaming';
15262
15357
  var activePart = isProcessing && (lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.role) === 'assistant' ? lastPart : undefined;
15263
15358
  // The scan slices the remaining parts per candidate, and only the loader reads
15264
- // it, so skip it entirely while the opt-in is off.
15359
+ // it, so skip it entirely once `showReasoning` is off.
15265
15360
  // The loader reports on the assistant's turn, so it only ever belongs to an
15266
15361
  // assistant message. While `submitted` the last message is still the user's
15267
15362
  // own, and the loader belongs to no message at all.
@@ -17246,6 +17341,7 @@
17246
17341
  }
17247
17342
  var scrollTop1 = state.scrollTop, ignoreScrollToTop = state.ignoreScrollToTop;
17248
17343
  var _state_lastScrollTop = state.lastScrollTop, lastScrollTop = _state_lastScrollTop === void 0 ? scrollTop1 : _state_lastScrollTop;
17344
+ var isNearBottom = state.isNearBottom;
17249
17345
  state.lastScrollTop = scrollTop1;
17250
17346
  state.ignoreScrollToTop = undefined;
17251
17347
  if (ignoreScrollToTop && ignoreScrollToTop > scrollTop1) {
@@ -17255,7 +17351,7 @@
17255
17351
  * is correct, set the lastScrollTop to the ignored event.
17256
17352
  */ lastScrollTop = ignoreScrollToTop;
17257
17353
  }
17258
- setIsNearBottom(state.isNearBottom);
17354
+ setIsNearBottom(isNearBottom);
17259
17355
  /**
17260
17356
  * Scroll events may come before a ResizeObserver event,
17261
17357
  * so in order to ignore resize events correctly we use a
@@ -17287,7 +17383,7 @@
17287
17383
  if (isScrollingDown) {
17288
17384
  setEscapedFromLock(false);
17289
17385
  }
17290
- if (!state.escapedFromLock && state.isNearBottom) {
17386
+ if (!state.escapedFromLock && isNearBottom) {
17291
17387
  setIsAtBottom(true);
17292
17388
  }
17293
17389
  }, 1);
@@ -20777,6 +20873,36 @@
20777
20873
  return typeof s === 'string';
20778
20874
  });
20779
20875
  }
20876
+ // Key order is not significant to the request, so a plain `JSON.stringify` would
20877
+ // report two identical payloads as different.
20878
+ function stableKey(value) {
20879
+ if (value === null || (typeof value === "undefined" ? "undefined" : _type_of(value)) !== 'object') {
20880
+ var _JSON_stringify;
20881
+ return (_JSON_stringify = JSON.stringify(value)) !== null && _JSON_stringify !== void 0 ? _JSON_stringify : 'null';
20882
+ }
20883
+ if (Array.isArray(value)) {
20884
+ return "[".concat(value.map(stableKey).join(','), "]");
20885
+ }
20886
+ var record = value;
20887
+ return "{".concat(Object.keys(record).sort().map(function(key) {
20888
+ return "".concat(JSON.stringify(key), ":").concat(stableKey(record[key]));
20889
+ }).join(','), "}");
20890
+ }
20891
+ /**
20892
+ * Comparable identity of a task payload, or `null` when it cannot be compared.
20893
+ */ function taskPayloadKey(payload) {
20894
+ try {
20895
+ // Round-trip first so the comparison sees what the request will actually
20896
+ // carry: `JSON.stringify` applies `toJSON` (a `Date` becomes its ISO string)
20897
+ // and drops the values the wire drops. Walking the raw object instead would
20898
+ // read a `Date` as a key-less object and call two different instants equal.
20899
+ return stableKey(JSON.parse(JSON.stringify(payload)));
20900
+ } catch (unused) {
20901
+ // Circular or otherwise unserializable. Never claim a match on a payload we
20902
+ // could not read; let the request go out and fail where it does today.
20903
+ return null;
20904
+ }
20905
+ }
20780
20906
  function buildSuggestionMessage(suggestion) {
20781
20907
  return "The user clicked this on-page suggestion. Use the current page context first, then search only if needed.\n\nSuggestion: ".concat(suggestion);
20782
20908
  }
@@ -20844,6 +20970,10 @@
20844
20970
  var error;
20845
20971
  var debounceTimer;
20846
20972
  var lastStateSignature = null;
20973
+ // The payload of the last request that was actually sent. The automatic
20974
+ // trigger keys on the search state, which is only a proxy for the payload,
20975
+ // so this is what decides whether a request would ask anything new.
20976
+ var lastSubmittedPayload = null;
20847
20977
  var latestRenderOptions = null;
20848
20978
  // Set in `dispose()`. A debounced or in-flight `fetch()` can resolve after
20849
20979
  // the widget is unmounted; this guard stops those late callbacks from
@@ -20854,6 +20984,10 @@
20854
20984
  // still-in-flight request from the previous state must not paint its
20855
20985
  // suggestions, its inner render is ignored until the new `submit` starts.
20856
20986
  var refetchPending = false;
20987
+ // True when `refetchPending` made an inner render be dropped. The fetch
20988
+ // that dropped it was expected to render in its place; if that fetch turns
20989
+ // out to send nothing, it has to reconcile the dropped state instead.
20990
+ var droppedInnerRender = false;
20857
20991
  var getStateSignature = function getStateSignature(results) {
20858
20992
  var _buildFilters;
20859
20993
  if (results.queryID) {
@@ -20940,19 +21074,62 @@
20940
21074
  instantSearchInstance: renderOptions.instantSearchInstance
20941
21075
  }), false);
20942
21076
  };
21077
+ // Copies an inner render's state into this widget's and re-renders on the
21078
+ // client.
21079
+ var adoptInnerState = function adoptInnerState(renderState) {
21080
+ error = renderState.error;
21081
+ if (renderState.error) {
21082
+ // A failed task (including a mid-stream `error` event) must not leave
21083
+ // any streamed partial visible.
21084
+ suggestions = [];
21085
+ } else if (renderState.isLoading || renderState.output !== undefined) {
21086
+ // Only adopt the inner output once a request is loading or has
21087
+ // produced one, so the initial no-op render doesn't clobber pills.
21088
+ suggestions = parseSuggestions(renderState.output);
21089
+ }
21090
+ isLoading = renderState.isLoading;
21091
+ if (!latestRenderOptions) return;
21092
+ renderOutward(latestRenderOptions);
21093
+ };
20943
21094
  var fetchAndRender = function fetchAndRender(results, renderOptions) {
21095
+ var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, _ref_force = _ref.force, force = _ref_force === void 0 ? false : _ref_force;
20944
21096
  var _results_hits;
20945
21097
  if (disposed || !tasksState) return;
21098
+ var hadDroppedInnerRender = droppedInnerRender;
20946
21099
  refetchPending = false;
21100
+ droppedInnerRender = false;
20947
21101
  var hasContext = context !== undefined;
20948
21102
  if (!hasContext && !(results === null || results === void 0 ? void 0 : (_results_hits = results.hits) === null || _results_hits === void 0 ? void 0 : _results_hits.length)) {
20949
21103
  tasksState.invalidate();
20950
21104
  suggestions = [];
20951
21105
  isLoading = false;
21106
+ // The output is gone, so the same payload must be allowed to rebuild it.
21107
+ lastSubmittedPayload = null;
20952
21108
  renderOutward(renderOptions);
20953
21109
  return;
20954
21110
  }
20955
- tasksState.submit(buildInput(results));
21111
+ var input = buildInput(results);
21112
+ var payload = taskPayloadKey(input);
21113
+ // A moved search state does not always mean a different question: with an
21114
+ // explicit `context` the payload ignores the results entirely, so a new
21115
+ // `queryID` or a new hit order produces a byte-identical request. Sending
21116
+ // it again spends a model call on an answer already on screen. Leave the
21117
+ // current suggestions alone and send nothing. `force` is the explicit
21118
+ // path (`refresh()`), which must always reach the network.
21119
+ if (!force && payload !== null && payload === lastSubmittedPayload) {
21120
+ // Nothing goes out, so nothing will render — but the state change that
21121
+ // scheduled this fetch also made `handleInnerRender` drop the render
21122
+ // that was carrying the previous request's result. Reconcile it here or
21123
+ // the widget keeps that request's `isLoading: true` with no
21124
+ // suggestions, and nothing later clears it: `refresh()` is blocked by
21125
+ // its own `isLoading` guard and an unchanged payload keeps skipping.
21126
+ if (hadDroppedInnerRender) {
21127
+ adoptInnerState(tasksState);
21128
+ }
21129
+ return;
21130
+ }
21131
+ lastSubmittedPayload = payload;
21132
+ tasksState.submit(input);
20956
21133
  };
20957
21134
  var refresh = function refresh() {
20958
21135
  if (isLoading) return;
@@ -20960,7 +21137,9 @@
20960
21137
  if (!results || !latestRenderOptions) return;
20961
21138
  clearTimeout(debounceTimer);
20962
21139
  lastStateSignature = getStateSignature(results);
20963
- fetchAndRender(results, latestRenderOptions);
21140
+ fetchAndRender(results, latestRenderOptions, {
21141
+ force: true
21142
+ });
20964
21143
  };
20965
21144
  var getWidgetRenderState = function getWidgetRenderState(renderOptions) {
20966
21145
  var results = 'results' in renderOptions ? renderOptions.results : undefined;
@@ -20986,20 +21165,18 @@
20986
21165
  // resolve/error) into this widget's state and re-renders on the client.
20987
21166
  var handleInnerRender = function handleInnerRender(renderState) {
20988
21167
  tasksState = renderState;
20989
- if (refetchPending) return;
20990
- error = renderState.error;
20991
21168
  if (renderState.error) {
20992
- // A failed task (including a mid-stream `error` event) must not leave
20993
- // any streamed partial visible.
20994
- suggestions = [];
20995
- } else if (renderState.isLoading || renderState.output !== undefined) {
20996
- // Only adopt the inner output once a request is loading or has
20997
- // produced one, so the initial no-op render doesn't clobber pills.
20998
- suggestions = parseSuggestions(renderState.output);
21169
+ // Keep a failed payload retryable: without this the next automatic
21170
+ // attempt with the same payload would be skipped as a duplicate and
21171
+ // the error would have no way to clear. Set before the `refetchPending`
21172
+ // return so a failure that lands mid-refetch is not swallowed.
21173
+ lastSubmittedPayload = null;
21174
+ }
21175
+ if (refetchPending) {
21176
+ droppedInnerRender = true;
21177
+ return;
20999
21178
  }
21000
- isLoading = renderState.isLoading;
21001
- if (!latestRenderOptions) return;
21002
- renderOutward(latestRenderOptions);
21179
+ adoptInnerState(renderState);
21003
21180
  };
21004
21181
  var tasksParams;
21005
21182
  if (agentId) {
@@ -26743,7 +26920,7 @@
26743
26920
  var _ref = [
26744
26921
  _0,
26745
26922
  _1
26746
- ], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), userTools = _ref2.tools, headerProps = _ref2.headerProps, messagesProps = _ref2.messagesProps, promptProps = _ref2.promptProps, itemComponent = _ref2.itemComponent, layoutComponent = _ref2.layoutComponent, headerComponent = _ref2.headerComponent, headerTitleIconComponent = _ref2.headerTitleIconComponent, headerCloseIconComponent = _ref2.headerCloseIconComponent, headerMinimizeIconComponent = _ref2.headerMinimizeIconComponent, headerMaximizeIconComponent = _ref2.headerMaximizeIconComponent, loaderComponent = _ref2.loaderComponent, loaderPosition = _ref2.loaderPosition, shouldShowLoader = _ref2.shouldShowLoader, loaderShowDelay = _ref2.loaderShowDelay, loaderMinDuration = _ref2.loaderMinDuration, messagesErrorComponent = _ref2.messagesErrorComponent, promptComponent = _ref2.promptComponent, promptHeaderComponent = _ref2.promptHeaderComponent, promptFooterComponent = _ref2.promptFooterComponent, assistantMessageLeadingComponent = _ref2.assistantMessageLeadingComponent, assistantMessageFooterComponent = _ref2.assistantMessageFooterComponent, userMessageLeadingComponent = _ref2.userMessageLeadingComponent, userMessageFooterComponent = _ref2.userMessageFooterComponent, emptyComponent = _ref2.emptyComponent, actionsComponent = _ref2.actionsComponent, suggestionsComponent = _ref2.suggestionsComponent, classNames = _ref2.classNames, _ref_translations = _ref2.translations, translations = _ref_translations === void 0 ? {} : _ref_translations, title = _ref2.title, getSearchPageURL = _ref2.getSearchPageURL, _ref_disableTriggerValidation = _ref2.disableTriggerValidation, disableTriggerValidation = _ref_disableTriggerValidation === void 0 ? false : _ref_disableTriggerValidation, showReasoning = _ref2.showReasoning, props = _object_without_properties(_ref2, [
26923
+ ], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), userTools = _ref2.tools, headerProps = _ref2.headerProps, messagesProps = _ref2.messagesProps, promptProps = _ref2.promptProps, itemComponent = _ref2.itemComponent, layoutComponent = _ref2.layoutComponent, headerComponent = _ref2.headerComponent, headerTitleIconComponent = _ref2.headerTitleIconComponent, headerCloseIconComponent = _ref2.headerCloseIconComponent, headerMinimizeIconComponent = _ref2.headerMinimizeIconComponent, headerMaximizeIconComponent = _ref2.headerMaximizeIconComponent, loaderComponent = _ref2.loaderComponent, loaderPosition = _ref2.loaderPosition, shouldShowLoader = _ref2.shouldShowLoader, loaderShowDelay = _ref2.loaderShowDelay, loaderMinDuration = _ref2.loaderMinDuration, messagesErrorComponent = _ref2.messagesErrorComponent, promptComponent = _ref2.promptComponent, promptHeaderComponent = _ref2.promptHeaderComponent, promptFooterComponent = _ref2.promptFooterComponent, assistantMessageLeadingComponent = _ref2.assistantMessageLeadingComponent, assistantMessageFooterComponent = _ref2.assistantMessageFooterComponent, userMessageLeadingComponent = _ref2.userMessageLeadingComponent, userMessageFooterComponent = _ref2.userMessageFooterComponent, emptyComponent = _ref2.emptyComponent, actionsComponent = _ref2.actionsComponent, suggestionsComponent = _ref2.suggestionsComponent, classNames = _ref2.classNames, _ref_translations = _ref2.translations, translations = _ref_translations === void 0 ? {} : _ref_translations, title = _ref2.title, getSearchPageURL = _ref2.getSearchPageURL, _ref_disableTriggerValidation = _ref2.disableTriggerValidation, disableTriggerValidation = _ref_disableTriggerValidation === void 0 ? false : _ref_disableTriggerValidation, showReasoning = _ref2.showReasoning, reasoningComponent = _ref2.reasoningComponent, props = _object_without_properties(_ref2, [
26747
26924
  "tools",
26748
26925
  "headerProps",
26749
26926
  "messagesProps",
@@ -26776,7 +26953,8 @@
26776
26953
  "title",
26777
26954
  "getSearchPageURL",
26778
26955
  "disableTriggerValidation",
26779
- "showReasoning"
26956
+ "showReasoning",
26957
+ "reasoningComponent"
26780
26958
  ]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
26781
26959
  var _ref3;
26782
26960
  var promptTranslations = translations.prompt, headerTranslations = translations.header, messageTranslations = translations.message, messagesTranslations = translations.messages;
@@ -26807,11 +26985,21 @@
26807
26985
  disableTriggerValidation: effectiveDisableTriggerValidation
26808
26986
  }));
26809
26987
  var messages = chatState.messages, sendMessage = chatState.sendMessage, status = chatState.status, regenerate = chatState.regenerate, stop = chatState.stop, error = chatState.error, input = chatState.input, setInput = chatState.setInput, open = chatState.open, setOpen = chatState.setOpen, clearMessages = chatState.clearMessages, toolsFromConnector = chatState.tools, suggestions = chatState.suggestions, suggestionsStatus = chatState.suggestionsStatus, onFeedback = chatState.sendChatMessageFeedback, feedbackState = chatState.feedbackState, consumeInputFocus = chatState['~consumeInputFocus'], isOpenStatePersistenceEnabled = chatState['~isOpenStatePersistenceEnabled'];
26988
+ var sendMessageAndScrollToBottom = React.useCallback(function() {
26989
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
26990
+ args[_key] = arguments[_key];
26991
+ }
26992
+ scrollToBottom();
26993
+ return sendMessage.apply(void 0, _to_consumable_array(args));
26994
+ }, [
26995
+ scrollToBottom,
26996
+ sendMessage
26997
+ ]);
26810
26998
  React.useImperativeHandle(ref, function() {
26811
26999
  return {
26812
27000
  setOpen: setOpen,
26813
- sendMessage: function sendMessage1(params) {
26814
- return sendMessage(params);
27001
+ sendMessage: function sendMessage(params) {
27002
+ return sendMessageAndScrollToBottom(params);
26815
27003
  },
26816
27004
  setInput: setInput
26817
27005
  };
@@ -26863,7 +27051,7 @@
26863
27051
  title: title,
26864
27052
  open: open,
26865
27053
  maximized: maximized,
26866
- sendMessage: sendMessage,
27054
+ sendMessage: sendMessageAndScrollToBottom,
26867
27055
  regenerate: regenerate,
26868
27056
  stop: stop,
26869
27057
  error: error,
@@ -26898,7 +27086,7 @@
26898
27086
  onClose: function onClose() {
26899
27087
  return setOpen(false);
26900
27088
  },
26901
- sendMessage: sendMessage,
27089
+ sendMessage: sendMessageAndScrollToBottom,
26902
27090
  setInput: setInput,
26903
27091
  onFeedback: onFeedback,
26904
27092
  feedbackState: feedbackState,
@@ -26924,7 +27112,8 @@
26924
27112
  assistantMessageProps: _object_spread({
26925
27113
  leadingComponent: assistantMessageLeadingComponent,
26926
27114
  footerComponent: assistantMessageFooterComponent,
26927
- showReasoning: showReasoning
27115
+ showReasoning: showReasoning,
27116
+ reasoningComponent: reasoningComponent
26928
27117
  }, callerAssistantMessageProps),
26929
27118
  userMessageProps: _object_spread({
26930
27119
  leadingComponent: userMessageLeadingComponent,
@@ -26941,7 +27130,7 @@
26941
27130
  setInput(event.currentTarget.value);
26942
27131
  },
26943
27132
  onSubmit: function onSubmit() {
26944
- sendMessage({
27133
+ sendMessageAndScrollToBottom({
26945
27134
  text: input
26946
27135
  });
26947
27136
  setInput('');
@@ -26958,7 +27147,7 @@
26958
27147
  suggestions: suggestions,
26959
27148
  isLoading: suggestionsStatus === 'loading',
26960
27149
  onSuggestionClick: function onSuggestionClick(suggestion) {
26961
- sendMessage({
27150
+ sendMessageAndScrollToBottom({
26962
27151
  text: suggestion
26963
27152
  });
26964
27153
  }