// source --> https://agilestorelocator.com/wp-content/plugins/betterdocs-ai-chatbot/assets/js/betterdocs.chatbot-preview.min.js?ver=e42f5e2f811ebf061ae1 
(()=>{"use strict";var e={5:(e,t,n)=>{n.d(t,{$H:()=>s,GI:()=>r,Tt:()=>i,Z6:()=>a}),n(781);const r=async(e,t,n)=>{try{const r=await fetch(`${window.betterdocsAIChatbot?.rest_url||betterdocsAIChatbot?.rest_url||"/wp-json/"}betterdocs-pro/v1/get-current-user-conversation`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":window.betterdocsAIChatbot?.nonce||betterdocsAIChatbot?.nonce||""},credentials:"include",body:JSON.stringify({session_id:t,user_email:e,filter_term:n})});if(!r.ok){const e=await r.json();throw new Error(e.message||"Failed to fetch conversation")}return r.json()}catch(e){throw console.error("Error fetching conversation:",e),e}},s=async(e,t)=>{try{const n=await fetch(`${betterdocsAIChatbot.rest_url}betterdocs-pro/v1/update-online-status`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_id:t,user_email:e})});if(!n.ok){const e=await n.json();throw new Error(e.message||"Online status update failed")}return n.json()}catch(e){throw console.error("Error updating online status:",e),e}},i=async(e,t,n)=>{try{const r=await fetch(`${window.betterdocsAIChatbot?.rest_url||betterdocsAIChatbot?.rest_url||"/wp-json/"}betterdocs-pro/v1/save-conversation`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,conversation:t,session_id:n})});if(!r.ok){const e=await r.json();throw new Error(e.message||"Failed to save conversation")}return r.json()}catch(e){throw console.error("Error saving conversation:",e),e}},a=async(e,t,n,r="en")=>{try{const s=await fetch(`${window.betterdocsAIChatbot?.rest_url||betterdocsAIChatbot?.rest_url||"/wp-json/"}betterdocs-pro/v1/query-post`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,email:t,session_id:n,lang:r})});if(!s.ok){const e=await s.json();throw new Error(e.message||"API request failed")}const i=await s.json();if(!i?.success)throw new Error(i.message||"Request failed");return i}catch(e){throw console.error("Error in queryPost:",e),e}}},133:(e,t,n)=>{n.d(t,{xI:()=>le});let r={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function s(e){r=e}const i=/[&<>"']/,a=new RegExp(i.source,"g"),o=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,l=new RegExp(o.source,"g"),c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=e=>c[e];function u(e,t){if(t){if(i.test(e))return e.replace(a,h)}else if(o.test(e))return e.replace(l,h);return e}const p=/(^|[^\[])\^/g;function m(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(p,"$1"),n=n.replace(e,s),r},getRegex:()=>new RegExp(n,t)};return r}function d(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const f={exec:()=>null};function g(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function k(e,t,n){const r=e.length;if(0===r)return"";let s=0;for(;s<r;){const i=e.charAt(r-s-1);if(i!==t||n){if(i===t||!n)break;s++}else s++}return e.slice(0,r-s)}function b(e,t,n,r){const s=t.href,i=t.title?u(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:s,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:s,title:i,text:u(a)}}class w{options;rules;lexer;constructor(e){this.options=e||r}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:k(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=k(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:k(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=k(t[0],"\n").split("\n"),n="",r="";const s=[];for(;e.length>0;){let t=!1;const i=[];let a;for(a=0;a<e.length;a++)if(/^ {0,3}>/.test(e[a]))i.push(e[a]),t=!0;else{if(t)break;i.push(e[a])}e=e.slice(a);const o=i.join("\n"),l=o.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${o}`:o,r=r?`${r}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=c,0===e.length)break;const h=s[s.length-1];if("code"===h?.type)break;if("blockquote"===h?.type){const t=h,i=t.raw+"\n"+e.join("\n"),a=this.blockquote(i);s[s.length-1]=a,n=n.substring(0,n.length-t.raw.length)+a.raw,r=r.substring(0,r.length-t.text.length)+a.text;break}if("list"===h?.type){const t=h,i=t.raw+"\n"+e.join("\n"),a=this.list(i);s[s.length-1]=a,n=n.substring(0,n.length-h.raw.length)+a.raw,r=r.substring(0,r.length-t.raw.length)+a.raw,e=i.substring(s[s.length-1].raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:s,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let a=!1;for(;e;){let n=!1,r="",o="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split("\n",1)[0].replace(/^\t+/,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,o=l.trimStart()):h?u=t[1].length+1:(u=t[2].search(/[^ ]/),u=u>4?1:u,o=l.slice(u),u+=t[1].length),h&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}#`),a=new RegExp(`^ {0,${Math.min(3,u-1)}}<(?:[a-z].*>|!--)`,"i");for(;e;){const p=e.split("\n",1)[0];let m;if(c=p,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  "),m=c):m=c.replace(/\t/g,"    "),s.test(c))break;if(i.test(c))break;if(a.test(c))break;if(t.test(c))break;if(n.test(c))break;if(m.search(/[^ ]/)>=u||!c.trim())o+="\n"+m.slice(u);else{if(h)break;if(l.replace(/\t/g,"    ").search(/[^ ]/)>=4)break;if(s.test(l))break;if(i.test(l))break;if(n.test(l))break;o+="\n"+c}h||c.trim()||(h=!0),r+=p+"\n",e=e.substring(p.length+1),l=m.slice(u)}}s.loose||(a?s.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(a=!0));let p,m=null;this.options.gfm&&(m=/^\[[ xX]\] /.exec(o),m&&(p="[ ] "!==m[0],o=o.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:r,task:!!m,checked:p,loose:!1,text:o,tokens:[]}),s.raw+=r}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){const t=s.items[e].tokens.filter(e=>"space"===e.type),n=t.length>0&&t.some(e=>/\n.*\n/.test(e.raw));s.loose=n}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=g(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?i.align.push("right"):/^ *:-+: *$/.test(e)?i.align.push("center"):/^ *:-+ *$/.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(const e of s)i.rows.push(g(e,i.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:u(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=k(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),b(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return b(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!n.match(/[\p{L}\p{N}]/u))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...r[0]].length-1;let s,i,a=n,o=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(i=[...s].length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){o+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+o);const t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=u(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=u(t[1]),n="mailto:"+e):(e=u(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=u(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=u(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:u(t[0]),{type:"text",raw:t[0],text:e}}}}const x=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,v=/(?:[*+-]|\d{1,9}[.)])/,y=m(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,v).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),E=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,T=/(?!\s*\])(?:\\.|[^\[\]\\])+/,_=m(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",T).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),S=m(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,v).getRegex(),z="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",A=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,N=m("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",A).replace("tag",z).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),R=m(E).replace("hr",x).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",z).getRegex(),I={blockquote:m(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",R).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:_,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:x,html:N,lheading:y,list:S,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:R,table:f,text:/^[^\n]+/},C=m("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",x).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",z).getRegex(),M={...I,table:C,paragraph:m(E).replace("hr",x).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",C).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",z).getRegex()},D={...I,html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",A).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:f,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m(E).replace("hr",x).replace("heading"," *#{1,6} *[^\n]").replace("lheading",y).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,L=/^( {2,}|\\)\n(?!\s*$)/,O="\\p{P}\\p{S}",P=m(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,O).getRegex(),H=m(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,O).getRegex(),U=m("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,O).getRegex(),q=m("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,O).getRegex(),F=m(/\\([punct])/,"gu").replace(/punct/g,O).getRegex(),B=m(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),j=m(A).replace("(?:--\x3e|$)","--\x3e").getRegex(),W=m("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",j).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V=m(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),G=m(/^!?\[(label)\]\[(ref)\]/).replace("label",Z).replace("ref",T).getRegex(),Y=m(/^!?\[(ref)\](?:\[\])?/).replace("ref",T).getRegex(),Q={_backpedal:f,anyPunctuation:F,autolink:B,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:L,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:f,emStrongLDelim:H,emStrongRDelimAst:U,emStrongRDelimUnd:q,escape:$,link:V,nolink:Y,punctuation:P,reflink:G,reflinkSearch:m("reflink|nolink(?!\\()","g").replace("reflink",G).replace("nolink",Y).getRegex(),tag:W,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:f},X={...Q,link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",Z).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z).getRegex()},K={...Q,escape:m($).replace("])","~|])").getRegex(),url:m(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},J={...K,br:m(L).replace("{2,}","*").getRegex(),text:m(K.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ee={normal:I,gfm:M,pedantic:D},te={normal:Q,gfm:K,breaks:J,pedantic:X};class ne{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.options.tokenizer=this.options.tokenizer||new w,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:ee.normal,inline:te.normal};this.options.pedantic?(t.block=ee.pedantic,t.inline=te.pedantic):this.options.gfm&&(t.block=ee.gfm,this.options.breaks?t.inline=te.breaks:t.inline=te.gfm),this.tokenizer.rules=t}static get rules(){return{block:ee,inline:te}}static lex(e,t){return new ne(t).lex(e)}static lexInline(e,t){return new ne(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){let r,s,i;for(this.options.pedantic&&(e=e.replace(/\t/g,"    ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?t.push(r):(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(s.raw+="\n"+r.raw,s.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i)))s=t[t.length-1],n&&"paragraph"===s?.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),s=t[t.length-1],s&&"text"===s.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,s,i,a,o,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,i.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(o=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,o))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(s))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),a=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class re{options;parser;constructor(e){this.options=e||r}space(e){return""}code({text:e,lang:t,escaped:n}){const r=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+"\n";return r?'<pre><code class="language-'+u(r)+'">'+(n?s:u(s,!0))+"</code></pre>\n":"<pre><code>"+(n?s:u(s,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let t=0;t<e.items.length;t++){const n=e.items[t];r+=this.listitem(n)}const s=t?"ol":"ul";return"<"+s+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+s+">\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r="";for(let t=0;t<e.rows.length;t++){const s=e.rows[t];n="";for(let e=0;e<s.length;e++)n+=this.tablecell(s[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),s=d(e);if(null===s)return r;let i='<a href="'+(e=s)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n}){const r=d(e);if(null===r)return n;let s=`<img src="${e=r}" alt="${n}"`;return t&&(s+=` title="${t}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}class se{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class ie{options;renderer;textRenderer;constructor(e){this.options=e||r,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new se}static parse(e,t){return new ie(t).parse(e)}static parseInline(e,t){return new ie(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const e=s,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}const i=s;switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let s=i,a=this.renderer.text(s);for(;r+1<e.length&&"text"===e[r+1].type;)s=e[++r],a+="\n"+this.renderer.text(s);n+=t?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a}]}):a;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=e||"";continue}}const i=s;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class ae{options;block;constructor(e){this.options=e||r}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ne.lex:ne.lexInline}provideParser(){return this.block?ie.parse:ie.parseInline}}const oe=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ie;Renderer=re;TextRenderer=se;Lexer=ne;Tokenizer=w;Hooks=ae;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{const s=e[r].flat(1/0);n=n.concat(this.walkTokens(s,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){const t=this.defaults.renderer||new re(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,s=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new w(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,s=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new ae;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const r=n,s=e.hooks[r],i=t[r];ae.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(s.call(t,e)).then(e=>i.call(t,e));const n=s.call(t,e);return i.call(t,n)}:t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ne.lex(e,t??this.defaults)}parser(e,t){return ie.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const r={...n},s={...this.defaults,...r},i=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);const a=s.hooks?s.hooks.provideLexer():e?ne.lex:ne.lexInline,o=s.hooks?s.hooks.provideParser():e?ie.parse:ie.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(t):t).then(e=>a(e,s)).then(e=>s.hooks?s.hooks.processAllTokens(e):e).then(e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then(()=>e):e).then(e=>o(e,s)).then(e=>s.hooks?s.hooks.postprocess(e):e).catch(i);try{s.hooks&&(t=s.hooks.preprocess(t));let e=a(t,s);s.hooks&&(e=s.hooks.processAllTokens(e)),s.walkTokens&&this.walkTokens(e,s.walkTokens);let n=o(e,s);return s.hooks&&(n=s.hooks.postprocess(n)),n}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+u(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function le(e,t){return oe.parse(e,t)}le.options=le.setOptions=function(e){return oe.setOptions(e),le.defaults=oe.defaults,s(le.defaults),le},le.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},le.defaults=r,le.use=function(...e){return oe.use(...e),le.defaults=oe.defaults,s(le.defaults),le},le.walkTokens=function(e,t){return oe.walkTokens(e,t)},le.parseInline=oe.parseInline,le.Parser=ie,le.parser=ie.parse,le.Renderer=re,le.TextRenderer=se,le.Lexer=ne,le.lexer=ne.lex,le.Tokenizer=w,le.Hooks=ae,le.parse=le,le.options,le.setOptions,le.use,le.walkTokens,le.parseInline,ie.parse,ne.lex},538:()=>{},609:e=>{e.exports=window.React},619:e=>{e.exports=window.wp.hooks},723:e=>{e.exports=window.wp.i18n},781:(e,t,n)=>{n.d(t,{Bk:()=>c,Kk:()=>s,Ri:()=>o,TV:()=>a,VK:()=>i,eh:()=>u,fl:()=>m,o2:()=>l,tb:()=>p});var r=n(133);n(723);const s=e=>e?(r.xI.setOptions({gfm:!0,breaks:!0,headerIds:!1}),{__html:(0,r.xI)(e)}):"",i=()=>{const e=navigator.userAgent;let t="Unknown Browser",n="",r="";return e.includes("Edg/")?(t="Edge",n=e.match(/Edg\/(\d+)/)?.[1]||""):e.includes("Chrome/")&&e.includes("Safari/")?(t="Chrome",n=e.match(/Chrome\/(\d+)/)?.[1]||""):e.includes("Safari/")&&!e.includes("Chrome/")?(t="Safari",n=e.match(/Version\/(\d+)/)?.[1]||""):e.includes("Firefox/")?(t="Mozila Firefox",n=e.match(/Firefox\/(\d+)/)?.[1]||""):(e.includes("MSIE")||e.includes("Trident/"))&&(t="Internet Explorer",n=e.match(/(?:MSIE |rv:)(\d+)/)?.[1]||""),e.includes("Macintosh")?r="Mac OS":e.includes("Windows")?r="Windows":e.includes("Linux")?r="Linux":e.includes("Android")?r="Android":(e.includes("iPhone")||e.includes("iPad"))&&(r="iOS"),`${t} ${n} on ${r}`},a=(e,t,n={})=>{"number"==typeof n&&(n={expiresDays:n});const r={expiresDays:7,path:"/",secure:"https:"===window.location.protocol,sameSite:"Lax",...n};let s=`${e}=${encodeURIComponent(t)}`;if(r.expiresDays){const e=new Date;e.setTime(e.getTime()+24*r.expiresDays*60*60*1e3),s+=`; expires=${e.toUTCString()}`}s+=`; path=${r.path}`,r.secure&&(s+="; Secure"),r.sameSite&&(s+=`; SameSite=${r.sameSite}`),document.cookie=s},o=e=>{const t=document.cookie.split("; ");for(let n of t){const[t,r]=n.split("=");if(t===e)return decodeURIComponent(r)}return null},l=(()=>{const e={text:(e,t=1e3)=>"string"!=typeof e?"":e.replace(/[<>"'`;\\/]/g,"").slice(0,t),email:e=>{const t=e.toLowerCase().trim();return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:""},sessionId:e=>e.replace(/[^a-zA-Z0-9_-]/g,"").slice(0,64)};return{sanitize:(t,n)=>e[t]?e[t](n):""}})(),c=()=>{let e=o("chatbot_session_id");return e&&(/^session_[a-f0-9]{14}\.[a-f0-9]{8}$/.test(e)||/^session_[a-z0-9]{9,}\d+$/.test(e))||(e=h(),a("chatbot_session_id",e,{expiresDays:30,path:"/",secure:"https:"===window.location.protocol,sameSite:"Lax"})),e},h=()=>{try{const e=Date.now()/1e3,t=Math.floor(e).toString(16).padStart(8,"0").slice(-8);return`session_${t}${Math.floor(e%1*1e6).toString(16).padStart(6,"0").slice(-6)}.${crypto.getRandomValues(new Uint8Array(4)).reduce((e,t)=>e+t.toString(16).padStart(2,"0"),"")}`}catch(e){const t=()=>Math.floor(16*Math.random()).toString(16);return`session_${Array.from({length:14},t).join("")}.${Array.from({length:8},t).join("")}`}},u=e=>{const t=e.replace(/session_|\./,"");let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n&=n;return`guest_${Math.abs(n).toString(16).substring(0,8)}`},p=e=>e&&e.startsWith("guest_")&&14===e.length,m=()=>(new Date).toISOString().slice(0,19).replace("T"," ")},874:(e,t,n)=>{n.d(t,{A:()=>ne});const{entries:r,setPrototypeOf:s,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescriptor:o}=Object;let{freeze:l,seal:c,create:h}=Object,{apply:u,construct:p}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),u||(u=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];return e.apply(t,r)}),p||(p=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const m=A(Array.prototype.forEach),d=A(Array.prototype.lastIndexOf),f=A(Array.prototype.pop),g=A(Array.prototype.push),k=A(Array.prototype.splice),b=A(String.prototype.toLowerCase),w=A(String.prototype.toString),x=A(String.prototype.match),v=A(String.prototype.replace),y=A(String.prototype.indexOf),E=A(String.prototype.trim),T=A(Object.prototype.hasOwnProperty),_=A(RegExp.prototype.test),S=(z=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p(z,t)});var z;function A(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return u(e,t,r)}}function N(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;s&&s(e,null);let r=t.length;for(;r--;){let s=t[r];if("string"==typeof s){const e=n(s);e!==s&&(i(t)||(t[r]=e),s=e)}e[s]=!0}return e}function R(e){for(let t=0;t<e.length;t++)T(e,t)||(e[t]=null);return e}function I(e){const t=h(null);for(const[n,s]of r(e))T(e,n)&&(Array.isArray(s)?t[n]=R(s):s&&"object"==typeof s&&s.constructor===Object?t[n]=I(s):t[n]=s);return t}function C(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=a(e)}return function(){return null}}const M=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),$=l(["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"]),L=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),O=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),P=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),H=l(["#text"]),U=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),q=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),F=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),B=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=c(/<%[\w\W]*|[\w\W]*%>/gm),Z=c(/\$\{[\w\W]*/gm),V=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=c(/^aria-[\-\w]+$/),Y=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Q=c(/^(?:\w+script|data):/i),X=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:X,CUSTOM_ELEMENT:J,DATA_ATTR:V,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:Q,MUSTACHE_EXPR:j,TMPLIT_EXPR:Z});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:s}=t;const i=s,a=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:c,Node:u,Element:p,NodeFilter:z,NamedNodeMap:A=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:R,DOMParser:j,trustedTypes:W}=t,Z=p.prototype,V=C(Z,"cloneNode"),G=C(Z,"remove"),Q=C(Z,"nextSibling"),X=C(Z,"childNodes"),J=C(Z,"parentNode");if("function"==typeof c){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let ne,re="";const{implementation:se,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:oe}=s,{importNode:le}=i;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof J&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ue,TMPLIT_EXPR:pe,DATA_ATTR:me,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:ke}=ee;let{IS_ALLOWED_URI:be}=ee,we=null;const xe=N({},[...M,...D,...$,...O,...H]);let ve=null;const ye=N({},[...U,...q,...F,...B]);let Ee=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,_e=null;const Se=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ze=!0,Ae=!0,Ne=!1,Re=!0,Ie=!1,Ce=!0,Me=!1,De=!1,$e=!1,Le=!1,Oe=!1,Pe=!1,He=!0,Ue=!1,qe=!0,Fe=!1,Be={},je=null;const We=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Ve=N({},["audio","video","img","source","image","track"]);let Ge=null;const Ye=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qe="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Je=Ke,et=!1,tt=null;const nt=N({},[Qe,Xe,Ke],w);let rt=N({},["mi","mo","mn","ms","mtext"]),st=N({},["annotation-xml"]);const it=N({},["title","style","font","a","script"]);let at=null;const ot=["application/xhtml+xml","text/html"];let lt=null,ct=null;const ht=s.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=I(e),at=-1===ot.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===at?w:b,we=T(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,lt):xe,ve=T(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,lt):ye,tt=T(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,w):nt,Ge=T(e,"ADD_URI_SAFE_ATTR")?N(I(Ye),e.ADD_URI_SAFE_ATTR,lt):Ye,Ze=T(e,"ADD_DATA_URI_TAGS")?N(I(Ve),e.ADD_DATA_URI_TAGS,lt):Ve,je=T(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,lt):We,Te=T(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,lt):I({}),_e=T(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,lt):I({}),Be=!!T(e,"USE_PROFILES")&&e.USE_PROFILES,ze=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,Me=e.WHOLE_DOCUMENT||!1,Le=e.RETURN_DOM||!1,Oe=e.RETURN_DOM_FRAGMENT||!1,Pe=e.RETURN_TRUSTED_TYPE||!1,$e=e.FORCE_BODY||!1,He=!1!==e.SANITIZE_DOM,Ue=e.SANITIZE_NAMED_PROPS||!1,qe=!1!==e.KEEP_CONTENT,Fe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||Y,Je=e.NAMESPACE||Ke,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,st=e.HTML_INTEGRATION_POINTS||st,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Ae=!1),Oe&&(Le=!0),Be&&(we=N({},H),ve=[],!0===Be.html&&(N(we,M),N(ve,U)),!0===Be.svg&&(N(we,D),N(ve,q),N(ve,B)),!0===Be.svgFilters&&(N(we,$),N(ve,q),N(ve,B)),!0===Be.mathMl&&(N(we,O),N(ve,F),N(ve,B))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Se.tagCheck=e.ADD_TAGS:(we===xe&&(we=I(we)),N(we,e.ADD_TAGS,lt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Se.attributeCheck=e.ADD_ATTR:(ve===ye&&(ve=I(ve)),N(ve,e.ADD_ATTR,lt))),e.ADD_URI_SAFE_ATTR&&N(Ge,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(je===We&&(je=I(je)),N(je,e.FORBID_CONTENTS,lt)),e.ADD_FORBID_CONTENTS&&(je===We&&(je=I(je)),N(je,e.ADD_FORBID_CONTENTS,lt)),qe&&(we["#text"]=!0),Me&&N(we,["html","head","body"]),we.table&&(N(we,["tbody"]),delete Te.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,re=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}(W,a)),null!==ne&&"string"==typeof re&&(re=ne.createHTML(""));l&&l(e),ct=e}},mt=N({},[...D,...$,...L]),dt=N({},[...O,...P]),ft=function(e){g(n.removed,{element:e});try{J(e).removeChild(e)}catch(t){G(e)}},gt=function(e,t){try{g(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Le||Oe)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},kt=function(e){let t=null,n=null;if($e)e="<remove></remove>"+e;else{const t=x(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Je===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=ne?ne.createHTML(e):e;if(Je===Ke)try{t=(new j).parseFromString(r,at)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Je,"template",null);try{t.documentElement.innerHTML=et?re:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(s.createTextNode(n),i.childNodes[0]||null),Je===Ke?oe.call(t,Me?"html":"body")[0]:Me?t.documentElement:i},bt=function(e){return ie.call(e.ownerDocument||e,e,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof R&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof A)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof u&&e instanceof u};function vt(e,t,r){m(e,e=>{e.call(n,t,r,ct)})}const yt=function(e){let t=null;if(vt(ce.beforeSanitizeElements,e,null),wt(e))return ft(e),!0;const r=lt(e.nodeName);if(vt(ce.uponSanitizeElement,e,{tagName:r,allowedTags:we}),Ce&&e.hasChildNodes()&&!xt(e.firstElementChild)&&_(/<[/\w!]/g,e.innerHTML)&&_(/<[/\w!]/g,e.textContent))return ft(e),!0;if(7===e.nodeType)return ft(e),!0;if(Ce&&8===e.nodeType&&_(/<[/\w]/g,e.data))return ft(e),!0;if(!(Se.tagCheck instanceof Function&&Se.tagCheck(r))&&(!we[r]||Te[r])){if(!Te[r]&&Tt(r)){if(Ee.tagNameCheck instanceof RegExp&&_(Ee.tagNameCheck,r))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(r))return!1}if(qe&&!je[r]){const t=J(e)||e.parentNode,n=X(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const s=V(n[r],!0);s.__removalCount=(e.__removalCount||0)+1,t.insertBefore(s,Q(e))}}return ft(e),!0}return e instanceof p&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=b(e.tagName),r=b(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Xe?t.namespaceURI===Ke?"svg"===n:t.namespaceURI===Qe?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(mt[n]):e.namespaceURI===Qe?t.namespaceURI===Ke?"math"===n:t.namespaceURI===Xe?"math"===n&&st[r]:Boolean(dt[n]):e.namespaceURI===Ke?!(t.namespaceURI===Xe&&!st[r])&&!(t.namespaceURI===Qe&&!rt[r])&&!dt[n]&&(it[n]||!mt[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(ft(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,m([he,ue,pe],e=>{t=v(t,e," ")}),e.textContent!==t&&(g(n.removed,{element:e.cloneNode()}),e.textContent=t)),vt(ce.afterSanitizeElements,e,null),!1):(ft(e),!0)},Et=function(e,t,n){if(He&&("id"===t||"name"===t)&&(n in s||n in ht))return!1;if(Ae&&!_e[t]&&_(me,t));else if(ze&&_(de,t));else if(Se.attributeCheck instanceof Function&&Se.attributeCheck(t,e));else if(!ve[t]||_e[t]){if(!(Tt(e)&&(Ee.tagNameCheck instanceof RegExp&&_(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&_(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t,e))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&_(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(Ge[t]);else if(_(be,v(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Ze[e])if(Ne&&!_(fe,v(n,ge,"")));else if(n)return!1;return!0},Tt=function(e){return"annotation-xml"!==e&&x(e,ke)},_t=function(e){vt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||wt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve,forceKeepAttr:void 0};let s=t.length;for(;s--;){const i=t[s],{name:a,namespaceURI:o,value:l}=i,c=lt(a),h=l;let u="value"===a?h:E(h);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,vt(ce.uponSanitizeAttribute,e,r),u=r.attrValue,!Ue||"id"!==c&&"name"!==c||(gt(a,e),u="user-content-"+u),Ce&&_(/((--!?|])>)|<\/(style|title|textarea)/i,u)){gt(a,e);continue}if("attributename"===c&&x(u,"href")){gt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){gt(a,e);continue}if(!Re&&_(/\/>/i,u)){gt(a,e);continue}Ie&&m([he,ue,pe],e=>{u=v(u,e," ")});const p=lt(e.nodeName);if(Et(p,c,u)){if(ne&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(o);else switch(W.getAttributeType(p,c)){case"TrustedHTML":u=ne.createHTML(u);break;case"TrustedScriptURL":u=ne.createScriptURL(u)}if(u!==h)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),wt(e)?ft(e):f(n.removed)}catch(t){gt(a,e)}}else gt(a,e)}vt(ce.afterSanitizeAttributes,e,null)},St=function e(t){let n=null;const r=bt(t);for(vt(ce.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)vt(ce.uponSanitizeShadowNode,n,null),yt(n),_t(n),n.content instanceof o&&e(n.content);vt(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,s=null,a=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!n.isSupported)return e;if(De||pt(t),n.removed=[],"string"==typeof e&&(Fe=!1),Fe){if(e.nodeName){const t=lt(e.nodeName);if(!we[t]||Te[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof u)r=kt("\x3c!----\x3e"),s=r.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?r=s:r.appendChild(s);else{if(!Le&&!Ie&&!Me&&-1===e.indexOf("<"))return ne&&Pe?ne.createHTML(e):e;if(r=kt(e),!r)return Le?null:Pe?re:""}r&&$e&&ft(r.firstChild);const c=bt(Fe?e:r);for(;a=c.nextNode();)yt(a),_t(a),a.content instanceof o&&St(a.content);if(Fe)return e;if(Le){if(Oe)for(l=ae.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(ve.shadowroot||ve.shadowrootmode)&&(l=le.call(i,l,!0)),l}let h=Me?r.outerHTML:r.innerHTML;return Me&&we["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&_(K,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h),Ie&&m([he,ue,pe],e=>{h=v(h,e," ")}),ne&&Pe?ne.createHTML(h):h},n.setConfig=function(){pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),De=!0},n.clearConfig=function(){ct=null,De=!1},n.isValidAttribute=function(e,t,n){ct||pt({});const r=lt(e),s=lt(t);return Et(r,s,n)},n.addHook=function(e,t){"function"==typeof t&&g(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=d(ce[e],t);return-1===n?void 0:k(ce[e],n,1)[0]}return f(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}()}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=n(609),s=n(619),i=n(723),a=n(874);const o=()=>(0,r.createElement)("svg",{width:38,height:46,viewBox:"0 0 38 46",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("mask",{id:"a",fill:"#fff"},(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.605 10.874h16.79c3.517 0 5.276 0 6.37 1.093 1.092 1.093 1.092 2.852 1.092 6.37v11.006c0 3.518 0 5.276-1.093 6.37-1.093 1.092-2.852 1.092-6.37 1.092h-2.73l-9.955 8.582v-8.582h-4.104c-3.518 0-5.277 0-6.37-1.093s-1.092-2.852-1.092-6.37V18.337c0-3.517 0-5.276 1.092-6.37 1.093-1.092 2.852-1.092 6.37-1.092m.14 16.984c4.875 4.239 11.278 4.187 16.463.04l-1.865-2.332c-4.143 3.315-8.932 3.263-12.64.04zm1.073-5.605v-2.798h2.798v2.798zm11.567-2.798v2.798h2.798v-2.798z"})),(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.605 10.874h16.79c3.517 0 5.276 0 6.37 1.093 1.092 1.093 1.092 2.852 1.092 6.37v11.006c0 3.518 0 5.276-1.093 6.37-1.093 1.092-2.852 1.092-6.37 1.092h-2.73l-9.955 8.582v-8.582h-4.104c-3.518 0-5.277 0-6.37-1.093s-1.092-2.852-1.092-6.37V18.337c0-3.517 0-5.276 1.092-6.37 1.093-1.092 2.852-1.092 6.37-1.092m.14 16.984c4.875 4.239 11.278 4.187 16.463.04l-1.865-2.332c-4.143 3.315-8.932 3.263-12.64.04zm1.073-5.605v-2.798h2.798v2.798zm11.567-2.798v2.798h2.798v-2.798z",fill:"#00B682",className:"chatbotpath"}),(0,r.createElement)("path",{d:"m33.764 11.967 1.979-1.979zm0 23.745 1.979 1.979zm-9.1 1.093v-2.798h-1.04l-.788.679zm-9.955 8.582h-2.798v6.107l4.625-3.988zm0-8.582h2.798v-2.798H14.71zM4.235 35.712l-1.978 1.979zm22.973-7.815 1.748 2.185 2.185-1.748-1.748-2.185zm-16.463-.039-2.111-1.836-1.837 2.112L8.91 29.97zm14.598-2.292 2.185-1.748-1.748-2.185-2.185 1.748zm-12.64.04 1.837-2.112-2.111-1.836-1.837 2.111zm-.885-6.151v-2.798H9.019v2.798zm0 2.798H9.019v2.798h2.799zm2.798-2.798h2.799v-2.798h-2.799zm0 2.798v2.798h2.799v-2.798zm8.769 0h-2.799v2.798h2.799zm0-2.798v-2.798h-2.799v2.798zm2.798 2.798v2.798h2.799v-2.798zm0-2.798h2.799v-2.798h-2.799zm1.212-11.38h-16.79v5.597h16.79zm8.348 1.913c-1.153-1.153-2.555-1.572-3.882-1.75-1.245-.168-2.787-.162-4.466-.162v5.596c1.838 0 2.935.006 3.72.112.361.048.542.106.623.139l.038.018.01.005h-.001q-.002-.003 0 0zm1.912 8.348c0-1.68.006-3.22-.161-4.467-.179-1.326-.598-2.728-1.751-3.88l-3.958 3.957q.003.001 0 0v-.002l.005.01.018.04c.033.08.09.26.139.621.106.786.112 1.883.112 3.721zm0 11.007V18.336H32.06v11.007zm-1.912 8.348c1.153-1.153 1.572-2.555 1.75-3.881.168-1.246.162-2.788.162-4.467H32.06c0 1.838-.006 2.935-.112 3.721-.049.36-.106.54-.14.622l-.021.047q0-.002 0 0zm-8.349 1.912c1.68 0 3.222.006 4.468-.161 1.326-.178 2.728-.598 3.88-1.751l-3.957-3.958q-.002.003 0 .001l.002-.001-.01.006-.04.017c-.08.034-.261.09-.621.14-.787.105-1.883.11-3.721.11zm-2.73 0h2.73v-5.596h-2.73zm-8.128 7.903 9.955-8.581-3.655-4.24-9.954 8.582zm-4.625-10.7v8.58h5.596v-8.58zm-1.306 2.797h4.104v-5.596h-4.104zm-8.348-1.912c1.153 1.153 2.555 1.573 3.881 1.75 1.246.168 2.787.162 4.467.162v-5.596c-1.838 0-2.935-.006-3.721-.112-.36-.048-.541-.105-.622-.139l-.039-.017-.01-.006.002.001q0 .002 0 0zM.344 29.343c0 1.68-.006 3.22.162 4.467.178 1.326.598 2.728 1.75 3.881l3.958-3.958q-.002-.002 0 0l.001.002-.006-.01-.017-.039c-.034-.081-.09-.262-.14-.622-.105-.786-.111-1.883-.111-3.721zm0-11.007v11.007h5.597V18.336zm1.913-8.348C1.104 11.141.684 12.543.506 13.87c-.168 1.246-.162 2.788-.162 4.467h5.597c0-1.838.006-2.935.112-3.72.048-.361.105-.542.139-.623l.017-.038.006-.01-.001.001q-.002.001 0 0zm8.348-1.912c-1.68 0-3.221-.006-4.467.161-1.326.179-2.728.598-3.881 1.751l3.957 3.958q.003-.003 0 0h-.001l.01-.005.039-.018c.081-.033.261-.09.622-.139.786-.106 1.883-.112 3.721-.112zm14.854 17.636c-4.21 3.368-9.1 3.32-12.877.034L8.909 29.97c5.97 5.192 13.887 5.04 20.047.112zm-2.301 1.603 1.864 2.33 4.37-3.496-1.864-2.33zm-12.29.402c2.313 2.012 5.075 3.117 7.99 3.119 2.905.002 5.74-1.09 8.233-3.084l-3.496-4.37c-1.65 1.32-3.28 1.858-4.733 1.857-1.442 0-2.928-.533-4.322-1.745zm1.989 1.977 1.959-2.252-4.224-3.673-1.958 2.253zm-3.838-10.24v2.799h5.597v-2.798zm5.597-2.797h-2.798v5.596h2.798zm2.799 5.596v-2.798h-5.597v2.798zm-5.597 2.798h2.798v-5.596h-2.798zm14.365-2.798v-2.798h-5.597v2.798zm0-2.799h-2.798v5.597h2.798zm-2.798 0v2.799h5.596v-2.798zm0 2.8h2.798v-5.597h-2.798z",fill:"#00B682",className:"chatbotpath",mask:"url(#a)"}),(0,r.createElement)("path",{d:"M19 13.673V2.48",stroke:"#00B682",className:"chatbotpathstroke",strokeWidth:"2.798"}),(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.142 25.239v-5.783H.157v5.783zm31.716-5.783v5.783h2.985v-5.783z",fill:"#00B682",className:"chatbotpath"}),(0,r.createElement)("circle",{cx:19,cy:"3.411",r:"2.798",fill:"#00B682",className:"chatbotpath"})),l=()=>betterdocsAIChatbot?.ai_chatbot_avatar?.url?(0,r.createElement)("img",{src:betterdocsAIChatbot.ai_chatbot_avatar.url,width:"24",height:"24",alt:"Chatbot Avatar"}):(0,r.createElement)("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("g",{clipPath:"url(#a)"},(0,r.createElement)("path",{d:"M9.666 11.66H8.11v-1.556h1.556zm6.225 0h-1.556v-1.556h1.556zm6.224-1.556v3.112H20.56v3.89q0 .488-.182.912-.183.426-.499.742a2.34 2.34 0 0 1-1.653.68h-3.21l-5.349 4.572V19.44h-3.89a2.34 2.34 0 0 1-1.653-.68 2.3 2.3 0 0 1-.499-.743 2.3 2.3 0 0 1-.182-.912v-3.89H1.886v-3.112h1.556V7.77q0-.486.182-.912.183-.425.499-.742a2.34 2.34 0 0 1 1.653-.68h5.446V2.895a1.5 1.5 0 0 1-.559-.572 1.66 1.66 0 0 1-.219-.778q0-.327.122-.607a1.6 1.6 0 0 1 .328-.487q.207-.207.499-.34.291-.134.607-.122.33 0 .608.122.28.12.487.328.205.207.34.499t.122.607a1.55 1.55 0 0 1-.779 1.35v2.54h5.447q.486 0 .912.183.424.183.741.498a2.34 2.34 0 0 1 .681 1.654v2.334zM19.003 7.77a.75.75 0 0 0-.231-.547.75.75 0 0 0-.547-.231H5.776a.75.75 0 0 0-.547.23.75.75 0 0 0-.231.548v9.337q0 .316.23.547.232.23.548.23h5.446v2.748l3.21-2.748h3.793q.316 0 .547-.23a.75.75 0 0 0 .23-.547zM8.657 13.386q.67.67 1.532 1.022.864.352 1.811.364.949 0 1.812-.352a4.5 4.5 0 0 0 1.532-1.034l1.094 1.107A6.22 6.22 0 0 1 12 16.328a6.2 6.2 0 0 1-2.395-.474 6.4 6.4 0 0 1-2.042-1.361z",fill:"#00B682",className:"chatbotpath"})),(0,r.createElement)("defs",null,(0,r.createElement)("clipPath",{id:"a"},(0,r.createElement)("path",{fill:"#fff",d:"M0 0h24v24H0z"}))));var c=n(781);const h=()=>(0,r.createElement)("svg",{width:8,height:12,viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M5.1 6 1.2 2.1a.95.95 0 0 1-.275-.7q0-.426.275-.7a.95.95 0 0 1 .7-.275q.424 0 .7.275l4.6 4.6q.15.15.212.325.063.174.063.375 0 .2-.063.375A.9.9 0 0 1 7.2 6.7l-4.6 4.6a.95.95 0 0 1-.7.275.95.95 0 0 1-.7-.275.95.95 0 0 1-.275-.7q0-.426.275-.7z",fill:"#1C1B1F"})),u=()=>(0,r.createElement)("svg",{width:18,height:16,viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"m16.865 8.925-15.4 6.5a.99.99 0 0 1-.95-.087q-.45-.288-.45-.838v-13q0-.55.45-.837a.99.99 0 0 1 .95-.088l15.4 6.5q.624.276.625.925 0 .65-.625.925M2.064 13l11.85-5-11.85-5v3.5l6 1.5-6 1.5z",fill:"#fff"}));var p=n(5);const m=e=>{const t=["০","১","২","৩","৪","৫","৬","৭","৮","৯"];return e.replace(/\d/g,e=>t[parseInt(e)])},d=({timestamp:e,timezone:t})=>{const[n,s]=(0,r.useState)(""),a=(0,r.useCallback)(e=>{if(!e)return(0,i.__)("Just now","betterdocs-ai-chatbot");let n;try{if(n="string"==typeof e&&e.includes(" ")?new Date(e.replace(" ","T")+"Z"):e instanceof Date?e:new Date(e),isNaN(n?.getTime()))return(0,i.__)("Just now","betterdocs-ai-chatbot");const r=(betterdocsAIChatbot?.locale||"en-US").replace("_","-"),s=new Intl.DateTimeFormat(r,{timeZone:t||"UTC",hour:"numeric",minute:"numeric",hour12:!0}),a=new Date,o=new Date(a.toLocaleString("en-US",{timeZone:t||"UTC"})),l=new Date(n.toLocaleString("en-US",{timeZone:t||"UTC"})),c=(o.getTime()-l.getTime())/1e3,h=s.format(n);if(c<60)return(0,i.__)("Just now","betterdocs-ai-chatbot");if(c<3600){const e=Math.floor(c/60),t=(0,i.sprintf)((0,i._n)("%d minute ago","%d minutes ago",e,"betterdocs-ai-chatbot"),e);return r.startsWith("bn")?m(t):t}if(c<86400){const e=Math.floor(c/3600),t=(0,i.sprintf)((0,i._n)("%d hour ago","%d hours ago",e,"betterdocs-ai-chatbot"),e);return r.startsWith("bn")?m(t):t}const u=new Date(o);if(u.setDate(u.getDate()-1),l.getDate()===u.getDate()&&l.getMonth()===u.getMonth()&&l.getFullYear()===u.getFullYear())return(0,i.sprintf)((0,i.__)("Yesterday (%s)","betterdocs-ai-chatbot"),h);const p=new Intl.DateTimeFormat(r,{timeZone:t||"UTC",day:"2-digit",month:"short",year:"numeric"}),d=(0,i.sprintf)("%s (%s)",p.format(n),h);return r.startsWith("bn")?m(d):d}catch(e){return console.error("Error calculating time ago:",e),(0,i.__)("Just now","betterdocs-ai-chatbot")}},[t]);return(0,r.useEffect)(()=>{s(a(e));const t=setInterval(()=>{s(a(e))},6e4);return()=>clearInterval(t)},[e,a]),(0,r.createElement)("span",{className:"text-gray-500"},n)},f=()=>(0,r.createElement)("div",{className:"generic-loader"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:40,height:40,preserveAspectRatio:"xMidYMid",style:{background:"0 0",shapeRendering:"auto"},viewBox:"0 0 100 100"},(0,r.createElement)("circle",{cx:50,cy:50,r:26,fill:"none",stroke:"#16ca9e",strokeDasharray:"122.52211349000194 42.840704496667314",strokeWidth:10},(0,r.createElement)("animateTransform",{attributeName:"transform",dur:"1s",keyTimes:"0;1",repeatCount:"indefinite",type:"rotate",values:"0 50 50;360 50 50"}))));var g=n(133);n(538);const k=()=>{const[e,t]=(0,r.useState)(null),[n,s]=(0,r.useState)(""),[m,k]=(0,r.useState)([]),[b,w]=(0,r.useState)(!1),[x,v]=(0,r.useState)(!1),[y,E]=(0,r.useState)(""),[T,_]=(0,r.useState)(!0),[S,z]=(0,r.useState)(""),[A,N]=(0,r.useState)((0,c.Ri)("userEmail")||""),[R,I]=(0,r.useState)(!1),[C,M]=(0,r.useState)(!1),[D]=(0,r.useState)(betterdocsAIChatbot?.welcome_message),[$,L]=(0,r.useState)(null),[O,P]=(0,r.useState)(!1),[H,U]=(0,r.useState)(!1),[q,F]=(0,r.useState)(null),[B,j]=(0,r.useState)(!1),[W,Z]=(0,r.useState)(!1),V=(0,r.useRef)(null),G=(0,r.useRef)(null),[Y,Q]=(0,r.useState)(null),[X,K]=(0,r.useState)({city:"",country:""}),[J,ee]=(0,r.useState)("offline"),te=(new Date).toISOString().slice(0,19).replace("T"," ");(0,r.useEffect)(()=>{const e=(0,c.Ri)("userEmail"),n=(0,c.Ri)("showEmailField"),r=(0,c.Ri)("chatbot_session_id");r&&e&&""!==e.trim()&&(t(r),N(e),(0,c.tb)(e)&&(I(!0),M(!0)),"false"!==n&&(0,c.tb)(e)||_(!1))},[]),(0,r.useEffect)(()=>{localStorage.setItem("userStatus","online");const e=()=>{localStorage.setItem("userStatus","online")};return window.addEventListener("mousemove",e),window.addEventListener("keydown",e),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("keydown",e),localStorage.removeItem("userStatus")}},[]),(0,r.useEffect)(()=>{(async()=>{try{const e=await fetch("https://ipinfo.io/json");if(!e.ok)throw new Error("Network response was not ok");const t=await(e?.json());K(t)}catch(e){Q(e.message)}})()},[]);const ne=async()=>{if(""===n.trim())return;const t=n?.trim(),r=(0,c.fl)();if(k(e=>[...e,{text:t,type:navigator?.onLine?"sent":"failed",timestamp:r}]),s(""),E(""),V.current&&setTimeout(()=>{V.current.scrollTop=V.current.scrollHeight},50),navigator.onLine){v(!0);try{const n=(betterdocsAIChatbot?.locale||"en_US").split("_")[0],r=await(0,p.Z6)(t,A||(0,c.eh)(e),e,n),s=r?.data?.conversation||[],i=s[s.length-1],a=i?.text||"No response content available";w(!0),re(a)}catch(e){v(!1),k(t=>[...t,{text:e.message,type:"received",timestamp:(0,c.fl)()}])}}},re=e=>{let t=0,n="";E("");const r=(0,c.fl)();v(!0),L(r);const s=()=>{if(t<e?.length)n+=e?.charAt(t),E(n),t++,setTimeout(s,10);else{const e=(0,c.Kk)(n).__html;E(e),v(!1),k(t=>[...t,{text:e,type:"received",timestamp:r}])}};s()},se=e=>{const t=new Set;let n=null;return e.map(e=>{if(!e.timestamp){const t=(0,c.fl)();return{...e,timestamp:t}}if(t.has(e.timestamp)||e.timestamp===n){let r;r=e.timestamp.includes("T")&&e.timestamp.includes("Z")?new Date(e.timestamp):new Date(e.timestamp.replace(" ","T")+"Z"),r.setMilliseconds(r.getMilliseconds()+1);const s=r.toISOString().slice(0,19).replace("T"," ");return n=s,t.add(s),{...e,timestamp:s}}return n=e.timestamp,t.add(e.timestamp),e})},ie=async()=>{if(""===S?.trim()||!le(S?.trim()))return U(!0),void setTimeout(()=>U(!1),3e3);let n=e;if(!n){const e=(0,c.Bk)();t(e),n=e}(0,c.TV)("userEmail",S,{expiresDays:30,path:"/",secure:"https:"===window.location.protocol,sameSite:"Lax"}),(0,c.TV)("showEmailField","false",{expiresDays:30,path:"/",secure:"https:"===window.location.protocol,sameSite:"Lax"}),N(S),P(!0),setTimeout(()=>P(!1),3e3),_(!1)};(0,r.useEffect)(()=>{e&&(async()=>{if(e){Z(!0);try{const t=A||(0,c.eh)(e),n=await(0,p.GI)(t,e);n?.conversation&&(k(n.conversation),(0,p.$H)(t,e))}catch(e){k([{text:D,type:"received",timestamp:(0,c.fl)()}])}finally{Z(!1)}}})()},[e,D]),(0,r.useEffect)(()=>{const e=(0,c.fl)(),t=A?(0,c.Ri)(A):null;if(A&&t){const e=JSON.parse(t);k(se(e?.conversation||[]))}else A||k([{text:D,type:"received",timestamp:e}])},[A]);const ae=(0,r.useRef)(0),oe=(0,r.useRef)(null);(0,r.useEffect)(()=>()=>{oe.current&&clearTimeout(oe.current)},[]),(0,r.useEffect)(()=>{m&&0!==m.length&&e&&(oe.current&&clearTimeout(oe.current),oe.current=setTimeout(()=>{const t=Date.now();if(t-ae.current<2e3)return;ae.current=t;const n=se(m),r=A||(0,c.eh)(e),s={email:r,main_information:{location:`${X?.city}, ${X?.country}`,country:X?.country,time:(0,c.fl)(),timezone:X?.timezone,language:navigator?.language},device_information:{IP_address:X?.ip,browser:(0,c.VK)()},isBlocked:!1,conversation:n.map(e=>({text:e?.text,type:e?.type,timestamp:e?.timestamp||(0,c.fl)()}))};(0,p.Tt)(r,s,e).then(t=>{t?.success&&(0,p.$H)(r,e)}).catch(e=>{console.error("Error saving conversation:",e)})},500))},[X,m,A,e]),(0,r.useEffect)(()=>{if(G?.current){const e=()=>j(!0),t=()=>j(!1),n=G?.current;return n.addEventListener("focus",e),n.addEventListener("blur",t),()=>{n.removeEventListener("focus",e),n.removeEventListener("blur",t)}}},[]),(0,r.useEffect)(()=>{V.current&&(V.current.scrollTop=V?.current?.scrollHeight)},[m,x,y,H,O]);const le=e=>{if(!e)return F("Email is required"),!1;if((e=e.trim()).length<6)return F("Email address is too short"),!1;if(-1===e.indexOf("@",1))return F("Please enter a valid email address"),!1;const t=e.split("@");if(2!==t.length)return F("Please enter a valid email address"),!1;const[n,r]=t;if(!n||0===n.length)return F("Please enter a valid email address"),!1;if(!/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~\.-]+$/.test(n))return F("Please enter a valid email address"),!1;if(!r||0===r.length)return F("Please enter a valid email address"),!1;if(/\.{2,}/.test(r))return F("Please enter a valid email address"),!1;if(r.trim().replace(/\./g,"")!==r.replace(/\./g,""))return F("Please enter a valid email address"),!1;const s=r.split(".");if(s.length<2)return F("Please enter a valid email address"),!1;for(const e of s){if(!e||0===e.length)return F("Please enter a valid email address"),!1;if(!/^[a-zA-Z0-9-]+$/.test(e))return F("Please enter a valid email address"),!1;if(e.startsWith("-")||e.endsWith("-"))return F("Please enter a valid email address"),!1}return!(s[s.length-1].length<2&&(F("Please enter a valid email address"),1))};return(0,r.createElement)("div",{className:"chat-container"},(0,r.createElement)("div",{className:"betterdocs-chatbot-header betterdocs-ia-common-header"},(0,r.createElement)("h2",null,(0,i.__)("Chatbot","betterdocs-ai-chatbot"))),(0,r.createElement)("div",{className:"chat-content-wrapper"},(0,r.createElement)("div",{className:"chat-body",ref:V},(0,r.createElement)("div",{className:"top-content"},(0,r.createElement)("div",{className:"chat-icon"},(0,r.createElement)(o,null)),betterdocsAIChatbot?.title&&(0,r.createElement)("h3",{className:"heading-title"},betterdocsAIChatbot.title),betterdocsAIChatbot?.subtitle&&(0,r.createElement)("p",{className:"chat-description"},betterdocsAIChatbot.subtitle)),W&&(0,r.createElement)(f,null),!W&&m&&m?.map((e,t)=>(0,r.createElement)("div",{key:t,className:`message ${e?.type}`},"sent"===e?.type||"failed"===e?.type?(0,r.createElement)("div",{className:"query"},e?.text,"failed"==e?.type&&(0,r.createElement)("span",{className:"status"},(0,i.__)("Sending Failed","betterdocs-ai-chatbot"))):"received"===e?.type?(0,r.createElement)("div",{className:"message-content"},(0,r.createElement)("div",{className:"avatar"},(0,r.createElement)(l,null)),(0,r.createElement)("div",{className:"message-text"},(0,r.createElement)("div",{className:"text",dangerouslySetInnerHTML:{__html:a.A.sanitize((0,g.xI)(e?.text))}}),(0,r.createElement)("span",{className:"message-received-time"},e.timestamp&&(0,r.createElement)(d,{timestamp:e?.timestamp,timezone:X?.timezone,isNewMesage:b,setNewMessage:w})))):(0,r.createElement)(r.Fragment,null))),x&&y&&(0,r.createElement)("div",{className:"message typing received message-active"},(0,r.createElement)("div",{className:"message-content"},(0,r.createElement)("div",{className:"avatar"},(0,r.createElement)(l,null)),(0,r.createElement)("div",{className:"message-text"},(0,r.createElement)("div",{className:"text",dangerouslySetInnerHTML:{__html:a.A?.sanitize(y)}}),(0,r.createElement)("span",{className:"message-received-time"},(0,r.createElement)(d,{timestamp:$||te,timezone:X?.timezone,isNewMesage:b,setNewMessage:w}))))),x&&!y&&(0,r.createElement)("div",{className:"message typing received message-active"},(0,r.createElement)("div",{className:"message-content"},(0,r.createElement)("div",{className:"avatar"},(0,r.createElement)(l,null)),(0,r.createElement)("div",{className:"text thinking-dots"},(0,i.__)("Thinking","betterdocs-ai-chatbot"),(0,r.createElement)("span",{className:"dots"})))),T&&"false"!==(0,c.Ri)("showEmailField")&&(0,r.createElement)("div",{className:"message received email-field-wrapper "+(B?"focused":"")},(0,r.createElement)("div",{className:"message-content"},(0,r.createElement)("div",{className:"avatar"},(0,r.createElement)(l,null)),(0,r.createElement)("div",{className:"text"},(0,i.__)("Enter email to keep conversation alive.","betterdocs-ai-chatbot"))),(0,r.createElement)("div",{className:"email-field-container"},(0,r.createElement)("div",{className:"email-field"},(0,r.createElement)("input",{ref:G,type:"email",id:"email",value:S,onChange:e=>{z(e?.target?.value)},onKeyDown:e=>{"Enter"===e?.key&&ie()},placeholder:(0,i.__)("Enter your email","betterdocs-ai-chatbot"),required:!0}),(0,r.createElement)("div",{className:"email-icon",onClick:ie},(0,r.createElement)(h,null))),(0,r.createElement)("a",{className:"continue-guest",onClick:()=>{if(!C){let n=e;if(!n){const e=(0,c.Bk)();t(e),n=e}const r=(0,c.eh)(n);(0,c.TV)("userEmail",r,{expiresDays:30,path:"/",secure:"https:"===window.location.protocol,sameSite:"Lax"}),(0,c.TV)("showEmailField","false",{expiresDays:30,path:"/",secure:"https:"===window.location.protocol,sameSite:"Lax"}),N(r),I(!0),M(!0),_(!1)}}},(0,i.__)("Continue as a","betterdocs-ai-chatbot")," ",(0,r.createElement)("strong",null,(0,i.__)("Guest","betterdocs-ai-chatbot"))),H&&(0,r.createElement)("div",{className:"error-message-container"},q)))),O&&(0,r.createElement)("div",{className:"thankyou-message-container"},(0,i.__)("Thanks! We should reply in a moment.","betterdocs-ai-chatbot")),(0,r.createElement)("div",{className:"chat-footer"},(0,r.createElement)("div",{className:"message-input"+(T&&"false"!==(0,c.Ri)("showEmailField")?" disabled":"")},(0,r.createElement)("input",{placeholder:(0,i.__)("Type a message...","betterdocs-ai-chatbot"),value:n,onChange:e=>{const t=e.target.value,n=c.o2.sanitize("text",t);s(n)},onKeyDown:e=>{x||"Enter"!==e?.key||e?.shiftKey||(e.preventDefault(),ne())},disabled:T&&"false"!==(0,c.Ri)("showEmailField"),rows:"2"}),(0,r.createElement)("button",{onClick:ne,style:x||T&&"false"!==(0,c.Ri)("showEmailField")?{pointerEvents:"none",opacity:".6"}:{},disabled:x||T&&"false"!==(0,c.Ri)("showEmailField")},(0,r.createElement)(u,null))))))},b=()=>(0,r.createElement)("svg",{width:22,height:24,viewBox:"0 0 22 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("mask",{id:"a",fill:"#fff"},(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 5.5h9c1.886 0 2.829 0 3.415.586S19.5 7.614 19.5 9.5v5.9c0 1.886 0 2.828-.585 3.414-.586.586-1.529.586-3.415.586h-1.464L8.7 24v-4.6H6.5c-1.885 0-2.828 0-3.414-.586S2.5 17.286 2.5 15.4V9.5c0-1.886 0-2.828.586-3.414S4.615 5.5 6.5 5.5m.075 9.104c2.613 2.272 6.046 2.244 8.825.02l-1-1.249c-2.22 1.777-4.788 1.75-6.775.021zM7.15 11.6v-1.5h1.5v1.5zm6.2-1.5v1.5h1.5v-1.5z"})),(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 5.5h9c1.886 0 2.829 0 3.415.586S19.5 7.614 19.5 9.5v5.9c0 1.886 0 2.828-.585 3.414-.586.586-1.529.586-3.415.586h-1.464L8.7 24v-4.6H6.5c-1.885 0-2.828 0-3.414-.586S2.5 17.286 2.5 15.4V9.5c0-1.886 0-2.828.586-3.414S4.615 5.5 6.5 5.5m.075 9.104c2.613 2.272 6.046 2.244 8.825.02l-1-1.249c-2.22 1.777-4.788 1.75-6.775.021zM7.15 11.6v-1.5h1.5v1.5zm6.2-1.5v1.5h1.5v-1.5z",fill:"#00B682",className:"chatbotpath"}),(0,r.createElement)("path",{d:"m18.915 6.086-1.061 1.06zm0 12.728-1.061-1.06zm-4.879.586v-1.5h-.557l-.422.364zM8.7 24H7.2v3.274l2.48-2.138zm0-4.6h1.5v-1.5H8.7zm-5.614-.586 1.06-1.06zm12.314-4.19.937 1.172 1.172-.937-.938-1.171zm-8.825-.02-1.131-.985-.985 1.132 1.132.985zm7.826-1.229 1.17-.937-.936-1.171-1.171.937zm-6.776.021.985-1.132-1.132-.984-.985 1.132zM7.15 10.1V8.6h-1.5v1.5zm0 1.5h-1.5v1.5h1.5zm1.5-1.5h1.5V8.6h-1.5zm0 1.5v1.5h1.5v-1.5zm4.7 0h-1.5v1.5h1.5zm0-1.5V8.6h-1.5v1.5zm1.5 1.5v1.5h1.5v-1.5zm0-1.5h1.5V8.6h-1.5zM15.5 4h-9v3h9zm4.475 1.025c-.618-.618-1.37-.843-2.08-.938C17.227 3.997 16.4 4 15.5 4v3c.986 0 1.574.003 1.995.06a1.4 1.4 0 0 1 .354.084l.006.003h-.001q-.002-.001 0 0zM21 9.5c0-.9.004-1.727-.086-2.394-.096-.711-.32-1.463-.939-2.08l-2.121 2.12q0 .002 0 0l.003.005.01.02c.017.044.048.141.073.334.057.422.06 1.01.06 1.995zm0 5.9V9.5h-3v5.9zm-1.025 4.475c.618-.618.843-1.37.939-2.08.09-.668.086-1.495.086-2.395h-3c0 .985-.003 1.573-.06 1.995a1.4 1.4 0 0 1-.083.354l-.003.005q0-.002 0 0zM15.5 20.9c.9 0 1.727.003 2.395-.087.71-.095 1.462-.32 2.08-.938l-2.121-2.121q-.002 0 0 0l-.005.002-.02.01c-.044.018-.14.048-.334.074-.421.057-1.01.06-1.995.06zm-1.464 0H15.5v-3h-1.464zM9.68 25.136l5.336-4.6-1.96-2.272-5.335 4.6zM7.2 19.4V24h3v-4.6zm-.7 1.5h2.2v-3H6.5zm-4.475-1.025c.619.618 1.37.843 2.081.938.668.09 1.494.087 2.394.087v-3c-.985 0-1.573-.003-1.994-.06a1.4 1.4 0 0 1-.354-.084l-.006-.003h.001q0 .002 0 0zM1 15.4c0 .9-.003 1.727.087 2.394.096.711.32 1.463.938 2.08l2.122-2.12q-.002-.002 0 0l-.003-.005-.01-.02a1.4 1.4 0 0 1-.074-.334C4.004 16.973 4 16.385 4 15.4zm0-5.9v5.9h3V9.5zm1.025-4.475c-.618.618-.842 1.37-.938 2.08C.997 7.774 1 8.6 1 9.5h3c0-.985.004-1.573.06-1.995a1.4 1.4 0 0 1 .084-.354l.003-.005q-.002.002 0 0zM6.5 4c-.9 0-1.726-.003-2.394.087-.711.095-1.462.32-2.08.938l2.12 2.121h.001-.001l.006-.002.02-.01c.044-.018.14-.048.334-.074C4.927 7.003 5.516 7 6.5 7zm7.963 9.453c-2.257 1.806-4.878 1.78-6.903.019l-1.97 2.264c3.2 2.783 7.444 2.701 10.746.06zm-1.234.86 1 1.249 2.342-1.874-1-1.25zm-6.588.215c1.24 1.079 2.72 1.67 4.283 1.672 1.558.001 3.077-.584 4.414-1.653l-1.874-2.343c-.885.708-1.759.997-2.537.996-.774 0-1.57-.286-2.317-.936zm1.066 1.06 1.05-1.207-2.264-1.969-1.05 1.207zM5.65 10.1v1.5h3v-1.5zm3-1.5h-1.5v3h1.5zm1.5 3v-1.5h-3v1.5zm-3 1.5h1.5v-3h-1.5zm7.7-1.5v-1.5h-3v1.5zm0-1.5h-1.5v3h1.5zm-1.5 0v1.5h3v-1.5zm0 1.5h1.5v-3h-1.5z",mask:"url(#a)"}),(0,r.createElement)("path",{d:"M11 7V1",stroke:"#00B682",className:"chatbotpathstroke",strokeWidth:"1.5"}),(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 13.2v-3.1H.9v3.1zm17-3.1v3.1h1.6v-3.1z",fill:"#00B682",className:"chatbotpath"}),(0,r.createElement)("circle",{cx:11,cy:"1.5",r:"1.5",fill:"#00B682",className:"chatbotpath"})),w=()=>(0,r.createElement)("svg",{width:21,height:24,viewBox:"0 0 21 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M8.55 19.4v-.75H5.6c-.964 0-1.612-.002-2.095-.066-.461-.063-.659-.17-.789-.3l-.53.53.53-.53c-.13-.13-.237-.328-.3-.79-.064-.482-.066-1.13-.066-2.094V9.5c0-.964.002-1.612.067-2.095.062-.461.169-.659.3-.789s.327-.237.788-.3c.483-.064 1.131-.066 2.095-.066h9c.964 0 1.612.002 2.095.067.461.062.659.169.789.3l.53-.531-.53.53c.13.13.237.328.3.79.064.482.066 1.13.066 2.094v5.9c0 .964-.002 1.612-.067 2.095-.062.461-.169.659-.3.789s-.327.237-.788.3c-.483.064-1.131.066-2.095.066h-1.743l-.21.182-4.097 3.531z",stroke:"#344054",strokeWidth:"1.5"}),(0,r.createElement)("path",{d:"M6.2 14c2.3 2 5.3 2 7.8 0",stroke:"#344054",strokeWidth:"1.6"}),(0,r.createElement)("path",{d:"M7 10.1v1.5m6.2-1.5v1.5M10.1 7V1",stroke:"#344054",strokeWidth:"1.5"}),(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.6 13.2v-3.1H0v3.1zm17-3.1v3.1h1.6v-3.1z",fill:"#344054"}),(0,r.createElement)("circle",{cx:"10.1",cy:"1.5",r:"1.5",fill:"#344054"}));(0,s.addFilter)("tab_chatbot_preview","betterdocs/chattab-preview",(e,t)=>(e.push({id:"chatbot",class:"betterdocs-ia-chatbot",type:"tab",title:(0,i.__)("Chatbot","betterdocs-ai-chatbot"),default:!1,icon:betterdocsAIChatbot?.ai_chatbot_icon?.url?(0,r.createElement)("img",{src:betterdocsAIChatbot.ai_chatbot_icon.url,width:"24",height:"24",style:{opacity:"chatbot"===t?1:.7,filter:"chatbot"===t?"brightness(1.1)":"none"}}):"chatbot"===t?(0,r.createElement)(b,null):(0,r.createElement)(w,null),component:k,showTab:!0,showTabInComponent:!0}),e))})();
// source --> https://agilestorelocator.com/wp-content/plugins/betterdocs-ai-chatbot/assets/js/betterdocs.search-modal-ai.min.js?ver=31e2c5cdb125327085b4 
(()=>{"use strict";const e=window.React,t=window.wp.hooks,n=window.wp.i18n,s=()=>(0,e.createElement)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("g",{clipPath:"url(#clip0)"},(0,e.createElement)("g",{filter:"url(#filter0)"},(0,e.createElement)("path",{d:"M4.5 15.9986C4.5 15.5068 4.89984 15.1128 5.38925 15.0642C9.59729 14.647 12.9438 11.3004 13.361 7.09237C13.4096 6.60296 13.8036 6.20312 14.2954 6.20312C14.7872 6.20312 15.1812 6.60296 15.2297 7.09237C15.6469 11.3004 18.9935 14.647 23.2015 15.0642C23.6909 15.1128 24.0907 15.5068 24.0907 15.9986C24.0907 16.4904 23.6909 16.8844 23.2015 16.9329C18.9935 17.3501 15.6469 20.6967 15.2297 24.9048C15.1812 25.3942 14.7872 25.794 14.2954 25.794C13.8036 25.794 13.4096 25.3942 13.361 24.9048C12.9438 20.6967 9.59729 17.3501 5.38925 16.9329C4.89984 16.8844 4.5 16.4904 4.5 15.9986Z",fill:"url(#paint0)"})),(0,e.createElement)("g",{filter:"url(#filter1)"},(0,e.createElement)("path",{d:"M22.1309 5.22379C22.1309 5.07625 22.2508 4.95805 22.3976 4.94349C23.66 4.81833 24.664 3.81435 24.7892 2.55193C24.8037 2.40511 24.9219 2.28516 25.0695 2.28516C25.217 2.28516 25.3352 2.40511 25.3498 2.55193C25.4749 3.81435 26.4789 4.81832 27.7413 4.94349C27.8881 4.95805 28.0081 5.07625 28.0081 5.22379C28.0081 5.37133 27.8881 5.48954 27.7413 5.50409C26.4789 5.62926 25.4749 6.63324 25.3498 7.89565C25.3352 8.04247 25.217 8.16242 25.0695 8.16242C24.9219 8.16242 24.8037 8.04247 24.7892 7.89565C24.664 6.63324 23.66 5.62926 22.3976 5.50409C22.2508 5.48954 22.1309 5.37133 22.1309 5.22379Z",fill:"url(#paint1)"})),(0,e.createElement)("path",{d:"M20.1748 25.7932C20.1748 25.5965 20.3347 25.4389 20.5305 25.4194C22.2137 25.2526 23.5523 23.9139 23.7192 22.2307C23.7386 22.0349 23.8962 21.875 24.093 21.875C24.2897 21.875 24.4473 22.0349 24.4667 22.2307C24.6336 23.9139 25.9722 25.2526 27.6554 25.4194C27.8512 25.4389 28.0111 25.5965 28.0111 25.7932C28.0111 25.9899 27.8512 26.1475 27.6554 26.1669C25.9722 26.3338 24.6336 27.6724 24.4667 29.3557C24.4473 29.5514 24.2897 29.7114 24.093 29.7114C23.8962 29.7114 23.7386 29.5514 23.7192 29.3557C23.5523 27.6724 22.2137 26.3338 20.5305 26.1669C20.3347 26.1475 20.1748 25.9899 20.1748 25.7932Z",fill:"url(#paint2)"})),(0,e.createElement)("defs",null,(0,e.createElement)("filter",{id:"filter0",x:"-3.5",y:"3.53646",width:"35.5908",height:"35.5898",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},(0,e.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,e.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,e.createElement)("feOffset",{dy:"5.33333"}),(0,e.createElement)("feGaussianBlur",{stdDeviation:"4"}),(0,e.createElement)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,e.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0936561 0 0 0 0 0.788676 0 0 0 0 1 0 0 0 0.26 0"}),(0,e.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),(0,e.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),(0,e.createElement)("filter",{id:"filter1",x:"14.2945",y:"0.326074",width:"21.5496",height:"21.5516",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},(0,e.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,e.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,e.createElement)("feOffset",{dy:"5.87725"}),(0,e.createElement)("feGaussianBlur",{stdDeviation:"3.91817"}),(0,e.createElement)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,e.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0.00392157 0 0 0 0 0.137255 0 0 0 0.13 0"}),(0,e.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),(0,e.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),(0,e.createElement)("linearGradient",{id:"paint0",x1:"14.2954",y1:"6.20313",x2:"14.2954",y2:"25.794",gradientUnits:"userSpaceOnUse"},(0,e.createElement)("stop",{stopColor:"#612CFF"}),(0,e.createElement)("stop",{offset:"1",stopColor:"#3ED2FF"})),(0,e.createElement)("linearGradient",{id:"paint1",x1:"25.0695",y1:"2.28516",x2:"25.0695",y2:"8.16242",gradientUnits:"userSpaceOnUse"},(0,e.createElement)("stop",{stopColor:"#612CFF"}),(0,e.createElement)("stop",{offset:"1",stopColor:"#3ED2FF"})),(0,e.createElement)("linearGradient",{id:"paint2",x1:"24.093",y1:"21.875",x2:"24.093",y2:"29.7114",gradientUnits:"userSpaceOnUse"},(0,e.createElement)("stop",{stopColor:"#612CFF"}),(0,e.createElement)("stop",{offset:"1",stopColor:"#3ED2FF"})),(0,e.createElement)("clipPath",{id:"clip0"},(0,e.createElement)("rect",{width:"32",height:"32",fill:"white",transform:"translate(0.5)"})))),r=({width:t=25,height:n=24,fill:s="#98A2B3",...r})=>(0,e.createElement)("svg",{width:t,height:n,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},(0,e.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 13.5C5.5 13.0704 5.84823 12.7222 6.27778 12.7222H15.6111C16.8998 12.7222 17.9444 11.6776 17.9444 10.3889V7.27778C17.9444 6.84822 18.2927 6.5 18.7222 6.5C19.1518 6.5 19.5 6.84822 19.5 7.27778V10.3889C19.5 12.5366 17.7589 14.2778 15.6111 14.2778H6.27778C5.84823 14.2778 5.5 13.9296 5.5 13.5Z",fill:s}),(0,e.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.7278 14.0521C5.42407 13.7484 5.42407 13.2559 5.7278 12.9522L8.83891 9.84108C9.14266 9.53735 9.63512 9.53735 9.93886 9.84108C10.2426 10.1448 10.2426 10.6373 9.93886 10.941L7.37772 13.5022L9.93886 16.0633C10.2426 16.367 10.2426 16.8595 9.93886 17.1632C9.63512 17.467 9.14266 17.467 8.83891 17.1632L5.7278 14.0521Z",fill:s})),i=({width:t=25,height:n=24,className:s="",...r})=>(0,e.createElement)("svg",{width:t,height:n,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,...r},(0,e.createElement)("mask",{id:"mask0_13083_4380",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24"},(0,e.createElement)("rect",{x:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),(0,e.createElement)("g",{mask:"url(#mask0_13083_4380)"},(0,e.createElement)("path",{d:"M12.5 8.6L18.5 14.6L17.1 16L12.5 11.4L7.9 16L6.5 14.6L12.5 8.6Z",fill:"#98A2B3"}))),l=t=>(0,e.createElement)("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.createElement)("path",{d:"M10.8574 5.06827H7.13863C6.77434 5.06827 6.47949 4.77342 6.47949 4.40914C6.47949 4.04485 6.77434 3.75 7.13863 3.75H10.8574C11.2216 3.75 11.5165 4.04485 11.5165 4.40914C11.5165 4.77342 11.2216 5.06827 10.8574 5.06827Z",fill:"#00B682"}),(0,e.createElement)("path",{d:"M9.35912 7.63468H5.64253C5.27825 7.63468 4.9834 7.33983 4.9834 6.97554C4.9834 6.61125 5.27825 6.31641 5.64253 6.31641H9.35912C9.72341 6.31641 10.0183 6.61125 10.0183 6.97554C10.0183 7.33983 9.72341 7.63468 9.35912 7.63468Z",fill:"#00B682"}),(0,e.createElement)("path",{d:"M7.84271 10.248H4.12398C3.75969 10.248 3.46484 9.95311 3.46484 9.58882C3.46484 9.22454 3.75969 8.92969 4.12398 8.92969H7.84271C8.20699 8.92969 8.50184 9.22454 8.50184 9.58882C8.50184 9.95311 8.20699 10.248 7.84271 10.248Z",fill:"#00B682"}),(0,e.createElement)("path",{d:"M13.6016 6.5604C13.5781 6.51126 13.5482 6.46639 13.5151 6.42472L14.5075 4.71546C15.0481 3.78604 15.0513 2.67395 14.515 1.74133C13.9777 0.807648 13.0151 0.25 11.9372 0.25H7.44719C6.39493 0.25 5.40996 0.817263 4.87688 1.73065L0.491547 9.28454C-0.049008 10.214 -0.0522128 11.326 0.484069 12.2587C1.02142 13.1924 1.98395 13.75 3.06186 13.75H10.7557C12.1263 13.75 13.3805 13.0577 14.1101 11.8965C14.8398 10.7363 14.921 9.30591 14.327 8.07096L13.6016 6.5604ZM4.19638 12.3559H3.06079C2.48925 12.3559 1.97754 12.06 1.69231 11.5643C1.40814 11.0697 1.40921 10.48 1.69658 9.98641L6.08405 2.43145C6.36715 1.94538 6.89061 1.64412 7.44933 1.64412H11.9394C12.5109 1.64412 13.0226 1.94004 13.3078 2.43572C13.592 2.93034 13.5909 3.52004 13.3036 4.01359L8.91396 11.5696C8.63407 12.0536 8.11274 12.3548 7.55295 12.3548H4.19638V12.3559Z",fill:"#00B682"}));let o={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function a(e){o=e}const c=/[&<>"']/,h=new RegExp(c.source,"g"),p=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,u=new RegExp(p.source,"g"),d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},g=e=>d[e];function m(e,t){if(t){if(c.test(e))return e.replace(h,g)}else if(p.test(e))return e.replace(u,g);return e}const f=/(^|[^\[])\^/g;function k(e,t){let n="string"==typeof e?e:e.source;t=t||"";const s={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(f,"$1"),n=n.replace(e,r),s},getRegex:()=>new RegExp(n,t)};return s}function x(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const w={exec:()=>null};function b(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let s=!1,r=t;for(;--r>=0&&"\\"===n[r];)s=!s;return s?"|":" |"}).split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(/\\\|/g,"|");return n}function y(e,t,n){const s=e.length;if(0===s)return"";let r=0;for(;r<s;){const i=e.charAt(s-r-1);if(i!==t||n){if(i===t||!n)break;r++}else r++}return e.slice(0,s-r)}function _(e,t,n,s){const r=t.href,i=t.title?m(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){s.state.inLink=!0;const e={type:"link",raw:n,href:r,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,e}return{type:"image",raw:n,href:r,title:i,text:m(l)}}class E{options;rules;lexer;constructor(e){this.options=e||o}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:y(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const s=n[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=s.length?e.slice(s.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=y(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:y(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=y(t[0],"\n").split("\n"),n="",s="";const r=[];for(;e.length>0;){let t=!1;const i=[];let l;for(l=0;l<e.length;l++)if(/^ {0,3}>/.test(e[l]))i.push(e[l]),t=!0;else{if(t)break;i.push(e[l])}e=e.slice(l);const o=i.join("\n"),a=o.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${o}`:o,s=s?`${s}\n${a}`:a;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(a,r,!0),this.lexer.state.top=c,0===e.length)break;const h=r[r.length-1];if("code"===h?.type)break;if("blockquote"===h?.type){const t=h,i=t.raw+"\n"+e.join("\n"),l=this.blockquote(i);r[r.length-1]=l,n=n.substring(0,n.length-t.raw.length)+l.raw,s=s.substring(0,s.length-t.text.length)+l.text;break}if("list"===h?.type){const t=h,i=t.raw+"\n"+e.join("\n"),l=this.list(i);r[r.length-1]=l,n=n.substring(0,n.length-h.raw.length)+l.raw,s=s.substring(0,s.length-t.raw.length)+l.raw,e=i.substring(r[r.length-1].raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const i=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let l=!1;for(;e;){let n=!1,s="",o="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let a=t[2].split("\n",1)[0].replace(/^\t+/,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],h=!a.trim(),p=0;if(this.options.pedantic?(p=2,o=a.trimStart()):h?p=t[1].length+1:(p=t[2].search(/[^ ]/),p=p>4?1:p,o=a.slice(p),p+=t[1].length),h&&/^[ \t]*$/.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),r=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),i=new RegExp(`^ {0,${Math.min(3,p-1)}}#`),l=new RegExp(`^ {0,${Math.min(3,p-1)}}<(?:[a-z].*>|!--)`,"i");for(;e;){const u=e.split("\n",1)[0];let d;if(c=u,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  "),d=c):d=c.replace(/\t/g,"    "),r.test(c))break;if(i.test(c))break;if(l.test(c))break;if(t.test(c))break;if(n.test(c))break;if(d.search(/[^ ]/)>=p||!c.trim())o+="\n"+d.slice(p);else{if(h)break;if(a.replace(/\t/g,"    ").search(/[^ ]/)>=4)break;if(r.test(a))break;if(i.test(a))break;if(n.test(a))break;o+="\n"+c}h||c.trim()||(h=!0),s+=u+"\n",e=e.substring(u.length+1),a=d.slice(p)}}r.loose||(l?r.loose=!0:/\n[ \t]*\n[ \t]*$/.test(s)&&(l=!0));let u,d=null;this.options.gfm&&(d=/^\[[ xX]\] /.exec(o),d&&(u="[ ] "!==d[0],o=o.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:s,task:!!d,checked:u,loose:!1,text:o,tokens:[]}),r.raw+=s}r.items[r.items.length-1].raw=r.items[r.items.length-1].raw.trimEnd(),r.items[r.items.length-1].text=r.items[r.items.length-1].text.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter(e=>"space"===e.type),n=t.length>0&&t.some(e=>/\n.*\n/.test(e.raw));r.loose=n}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=b(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),r=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const e of s)/^ *-+: *$/.test(e)?i.align.push("right"):/^ *:-+: *$/.test(e)?i.align.push("center"):/^ *:-+ *$/.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(const e of r)i.rows.push(b(e,i.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:m(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=y(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let s=0;s<e.length;s++)if("\\"===e[s])s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),_(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return _(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(s&&(!s[3]||!n.match(/[\p{L}\p{N}]/u))&&(!s[1]&&!s[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...s[0]].length-1;let r,i,l=n,o=0;const a="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=a.exec(t));){if(r=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!r)continue;if(i=[...r].length,s[3]||s[4]){l+=i;continue}if((s[5]||s[6])&&n%3&&!((n+i)%3)){o+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+o);const t=[...s[0]][0].length,a=e.slice(0,n+s.index+t+i);if(Math.min(n,i)%2){const e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}const c=a.slice(2,-2);return{type:"strong",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),s=/^ /.test(e)&&/ $/.test(e);return n&&s&&(e=e.substring(1,e.length-1)),e=m(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=m(t[1]),n="mailto:"+e):(e=m(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=m(t[0]),n="mailto:"+e;else{let s;do{s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(s!==t[0]);e=m(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:m(t[0]),{type:"text",raw:t[0],text:e}}}}const C=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$=/(?:[*+-]|\d{1,9}[.)])/,S=k(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,$).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),v=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,A=/(?!\s*\])(?:\\.|[^\[\]\\])+/,I=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",A).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),z=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$).getRegex(),T="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",R=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,M=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",R).replace("tag",T).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),L=k(v).replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T).getRegex(),B={blockquote:k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",L).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:I,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:C,html:M,lheading:S,list:z,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:L,table:w,text:/^[^\n]+/},N=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T).getRegex(),O={...B,table:N,paragraph:k(v).replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",N).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T).getRegex()},q={...B,html:k("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",R).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:w,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(v).replace("hr",C).replace("heading"," *#{1,6} *[^\n]").replace("lheading",S).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},F=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Z=/^( {2,}|\\)\n(?!\s*$)/,P="\\p{P}\\p{S}",D=k(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,P).getRegex(),j=k(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,P).getRegex(),H=k("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,P).getRegex(),U=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,P).getRegex(),Q=k(/\\([punct])/,"gu").replace(/punct/g,P).getRegex(),G=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),J=k(R).replace("(?:--\x3e|$)","--\x3e").getRegex(),V=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",J).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),W=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X=k(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",W).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),K=k(/^!?\[(label)\]\[(ref)\]/).replace("label",W).replace("ref",A).getRegex(),Y=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",A).getRegex(),ee={_backpedal:w,anyPunctuation:Q,autolink:G,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:Z,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:w,emStrongLDelim:j,emStrongRDelimAst:H,emStrongRDelimUnd:U,escape:F,link:X,nolink:Y,punctuation:D,reflink:K,reflinkSearch:k("reflink|nolink(?!\\()","g").replace("reflink",K).replace("nolink",Y).getRegex(),tag:V,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:w},te={...ee,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",W).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W).getRegex()},ne={...ee,escape:k(F).replace("])","~|])").getRegex(),url:k(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},se={...ne,br:k(Z).replace("{2,}","*").getRegex(),text:k(ne.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},re={normal:B,gfm:O,pedantic:q},ie={normal:ee,gfm:ne,breaks:se,pedantic:te};class le{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||o,this.options.tokenizer=this.options.tokenizer||new E,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:re.normal,inline:ie.normal};this.options.pedantic?(t.block=re.pedantic,t.inline=ie.pedantic):this.options.gfm&&(t.block=re.gfm,this.options.breaks?t.inline=ie.breaks:t.inline=ie.gfm),this.tokenizer.rules=t}static get rules(){return{block:re,inline:ie}}static lex(e,t){return new le(t).lex(e)}static lexInline(e,t){return new le(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){let s,r,i;for(this.options.pedantic&&(e=e.replace(/\t/g,"    ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))if(s=this.tokenizer.space(e))e=e.substring(s.raw.length),1===s.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(s);else if(s=this.tokenizer.code(e))e=e.substring(s.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(s):(r.raw+="\n"+s.raw,r.text+="\n"+s.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(s=this.tokenizer.fences(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.heading(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.hr(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.blockquote(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.list(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.html(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.def(e))e=e.substring(s.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title}):(r.raw+="\n"+s.raw,r.text+="\n"+s.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(s=this.tokenizer.table(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.lheading(e))e=e.substring(s.raw.length),t.push(s);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach(e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(s=this.tokenizer.paragraph(i)))r=t[t.length-1],n&&"paragraph"===r?.type?(r.raw+="\n"+s.raw,r.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(s),n=i.length!==e.length,e=e.substring(s.raw.length);else if(s=this.tokenizer.text(e))e=e.substring(s.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+s.raw,r.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(s);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,r,i,l,o,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(a));)a=a.slice(0,i.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(o=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(s=>!!(n=s.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===n.type&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===n.type&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,a,o))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach(e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))}),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(r))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),l=!0,s=t[t.length-1],s&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class oe{options;parser;constructor(e){this.options=e||o}space(e){return""}code({text:e,lang:t,escaped:n}){const s=(t||"").match(/^\S*/)?.[0],r=e.replace(/\n$/,"")+"\n";return s?'<pre><code class="language-'+m(s)+'">'+(n?r:m(r,!0))+"</code></pre>\n":"<pre><code>"+(n?r:m(r,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,n=e.start;let s="";for(let t=0;t<e.items.length;t++){const n=e.items[t];s+=this.listitem(n)}const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+s+"</"+r+">\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let s="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];n="";for(let e=0;e<r.length;e++)n+=this.tablecell(r[e]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+s+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),r=x(e);if(null===r)return s;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+s+"</a>",i}image({href:e,title:t,text:n}){const s=x(e);if(null===s)return n;let r=`<img src="${e=s}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}class ae{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class ce{options;renderer;textRenderer;constructor(e){this.options=e||o,this.options.renderer=this.options.renderer||new oe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ae}static parse(e,t){return new ce(t).parse(e)}static parseInline(e,t){return new ce(t).parseInline(e)}parse(e,t=!0){let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=r,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}const i=r;switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let r=i,l=this.renderer.text(r);for(;s+1<e.length&&"text"===e[s+1].type;)r=e[++s],l+="\n"+this.renderer.text(r);n+=t?this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l}]}):l;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=e||"";continue}}const i=r;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class he{options;block;constructor(e){this.options=e||o}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?le.lex:le.lexInline}provideParser(){return this.block?ce.parse:ce.parseInline}}const pe=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ce;Renderer=oe;TextRenderer=ae;Lexer=le;Tokenizer=E;Hooks=he;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{const e=s;for(const s of e.header)n=n.concat(this.walkTokens(s.tokens,t));for(const s of e.rows)for(const e of s)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=s;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=s;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(s=>{const r=e[s].flat(1/0);n=n.concat(this.walkTokens(r,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){const t=this.defaults.renderer||new oe(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const s=n,r=e.renderer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new E(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const s=n,r=e.tokenizer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new he;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const s=n,r=e.hooks[s],i=t[s];he.passThroughHooks.has(n)?t[s]=e=>{if(this.defaults.async)return Promise.resolve(r.call(t,e)).then(e=>i.call(t,e));const n=r.call(t,e);return i.call(t,n)}:t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(s.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return le.lex(e,t??this.defaults)}parser(e,t){return ce.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===s.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const l=r.hooks?r.hooks.provideLexer():e?le.lex:le.lexInline,o=r.hooks?r.hooks.provideParser():e?ce.parse:ce.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then(e=>l(e,r)).then(e=>r.hooks?r.hooks.processAllTokens(e):e).then(e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then(()=>e):e).then(e=>o(e,r)).then(e=>r.hooks?r.hooks.postprocess(e):e).catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let e=l(t,r);r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens);let n=o(e,r);return r.hooks&&(n=r.hooks.postprocess(n)),n}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+m(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ue(e,t){return pe.parse(e,t)}ue.options=ue.setOptions=function(e){return pe.setOptions(e),ue.defaults=pe.defaults,a(ue.defaults),ue},ue.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},ue.defaults=o,ue.use=function(...e){return pe.use(...e),ue.defaults=pe.defaults,a(ue.defaults),ue},ue.walkTokens=function(e,t){return pe.walkTokens(e,t)},ue.parseInline=pe.parseInline,ue.Parser=ce,ue.parser=ce.parse,ue.Renderer=oe,ue.TextRenderer=ae,ue.Lexer=le,ue.lexer=le.lex,ue.Tokenizer=E,ue.Hooks=he,ue.parse=ue,ue.options,ue.setOptions,ue.use,ue.walkTokens,ue.parseInline,ce.parse,le.lex;const de=e=>e?(ue.setOptions({gfm:!0,breaks:!0,headerIds:!1}),{__html:ue(e)}):"",ge=e=>{const t=document.cookie.split("; ");for(let n of t){const[t,s]=n.split("=");if(t===e)return decodeURIComponent(s)}return null},me=()=>{try{const e=Date.now()/1e3,t=Math.floor(e).toString(16).padStart(8,"0").slice(-8);return`session_${t}${Math.floor(e%1*1e6).toString(16).padStart(6,"0").slice(-6)}.${crypto.getRandomValues(new Uint8Array(4)).reduce((e,t)=>e+t.toString(16).padStart(2,"0"),"")}`}catch(e){const t=()=>Math.floor(16*Math.random()).toString(16);return`session_${Array.from({length:14},t).join("")}.${Array.from({length:8},t).join("")}`}},fe=t=>(0,e.createElement)("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.createElement)("g",{clipPath:"url(#clip0_13480_65508)"},(0,e.createElement)("path",{d:"M4.66699 10H16.3337",stroke:"#475467",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)("path",{d:"M13 13.3333L16.3333 10",stroke:"#475467",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)("path",{d:"M13 6.66797L16.3333 10.0013",stroke:"#475467",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),(0,e.createElement)("defs",null,(0,e.createElement)("clipPath",{id:"clip0_13480_65508"},(0,e.createElement)("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.5)"})))),ke=t=>(0,e.createElement)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.createElement)("g",{clipPath:"url(#clip0_13583_35477)"},(0,e.createElement)("g",{filter:"url(#filter0_d_13583_35477)"},(0,e.createElement)("path",{d:"M4 15.9986C4 15.5068 4.39984 15.1128 4.88925 15.0642C9.09729 14.647 12.4438 11.3004 12.861 7.09237C12.9096 6.60296 13.3036 6.20312 13.7954 6.20312C14.2872 6.20312 14.6812 6.60296 14.7297 7.09237C15.1469 11.3004 18.4935 14.647 22.7015 15.0642C23.1909 15.1128 23.5907 15.5068 23.5907 15.9986C23.5907 16.4904 23.1909 16.8844 22.7015 16.9329C18.4935 17.3501 15.1469 20.6967 14.7297 24.9048C14.6812 25.3942 14.2872 25.794 13.7954 25.794C13.3036 25.794 12.9096 25.3942 12.861 24.9048C12.4438 20.6967 9.09729 17.3501 4.88925 16.9329C4.39984 16.8844 4 16.4904 4 15.9986Z",fill:"url(#paint0_linear_13583_35477)"})),(0,e.createElement)("g",{filter:"url(#filter1_d_13583_35477)"},(0,e.createElement)("path",{d:"M21.6309 5.22379C21.6309 5.07625 21.7508 4.95805 21.8976 4.94349C23.16 4.81833 24.164 3.81435 24.2892 2.55193C24.3037 2.40511 24.4219 2.28516 24.5695 2.28516C24.717 2.28516 24.8352 2.40511 24.8498 2.55193C24.9749 3.81435 25.9789 4.81832 27.2413 4.94349C27.3881 4.95805 27.5081 5.07625 27.5081 5.22379C27.5081 5.37133 27.3881 5.48954 27.2413 5.50409C25.9789 5.62926 24.9749 6.63324 24.8498 7.89565C24.8352 8.04247 24.717 8.16242 24.5695 8.16242C24.4219 8.16242 24.3037 8.04247 24.2892 7.89565C24.164 6.63324 23.16 5.62926 21.8976 5.50409C21.7508 5.48954 21.6309 5.37133 21.6309 5.22379Z",fill:"url(#paint1_linear_13583_35477)"})),(0,e.createElement)("path",{d:"M19.6748 25.7932C19.6748 25.5965 19.8347 25.4389 20.0305 25.4194C21.7137 25.2526 23.0523 23.9139 23.2192 22.2307C23.2386 22.0349 23.3962 21.875 23.593 21.875C23.7897 21.875 23.9473 22.0349 23.9667 22.2307C24.1336 23.9139 25.4722 25.2526 27.1554 25.4194C27.3512 25.4389 27.5111 25.5965 27.5111 25.7932C27.5111 25.9899 27.3512 26.1475 27.1554 26.1669C25.4722 26.3338 24.1336 27.6724 23.9667 29.3557C23.9473 29.5514 23.7897 29.7114 23.593 29.7114C23.3962 29.7114 23.2386 29.5514 23.2192 29.3557C23.0523 27.6724 21.7137 26.3338 20.0305 26.1669C19.8347 26.1475 19.6748 25.9899 19.6748 25.7932Z",fill:"url(#paint2_linear_13583_35477)"})),(0,e.createElement)("defs",null,(0,e.createElement)("clipPath",{id:"clip0_13583_35477"},(0,e.createElement)("rect",{width:"32",height:"32",fill:"white"})),(0,e.createElement)("linearGradient",{id:"paint0_linear_13583_35477",x1:"13.7954",y1:"6.20313",x2:"13.7954",y2:"25.794",gradientUnits:"userSpaceOnUse"},(0,e.createElement)("stop",{stopColor:"#612CFF"}),(0,e.createElement)("stop",{offset:"1",stopColor:"#3ED2FF"})),(0,e.createElement)("linearGradient",{id:"paint1_linear_13583_35477",x1:"24.5695",y1:"2.28516",x2:"24.5695",y2:"8.16242",gradientUnits:"userSpaceOnUse"},(0,e.createElement)("stop",{stopColor:"#612CFF"}),(0,e.createElement)("stop",{offset:"1",stopColor:"#3ED2FF"})),(0,e.createElement)("linearGradient",{id:"paint2_linear_13583_35477",x1:"23.593",y1:"21.875",x2:"23.593",y2:"29.7114",gradientUnits:"userSpaceOnUse"},(0,e.createElement)("stop",{stopColor:"#612CFF"}),(0,e.createElement)("stop",{offset:"1",stopColor:"#3ED2FF"})))),xe=({searchQuery:t,setSearchQuery:o,setHasSearched:a,selectedCategory:c,activeTab:h,fetchSearchResults:p,closeModal:u})=>{const[d,g]=(0,e.useState)(!1),[m,f]=(0,e.useState)(!1),[k,x]=(0,e.useState)(""),[w,b]=(0,e.useState)(""),[y,_]=(0,e.useState)(""),[E,C]=(0,e.useState)(""),[$,S]=(0,e.useState)(!1),[v,A]=(0,e.useState)(null),[I,z]=(0,e.useState)(!1);(0,e.useEffect)(()=>{const e=ge("chatbot_session_id"),n=ge("userEmail");e&&n&&(_(e),C(n));const s=localStorage.getItem("betterdocs_search_modal_ai");if(s)try{const e=JSON.parse(s);if(e.query===t&&e.response){A(e);const t=de(e.response).__html;x(t),S(!0)}}catch(e){console.error("Error parsing localStorage data:",e)}},[t]),(0,e.useEffect)(()=>{if(t.trim()){const e=localStorage.getItem("betterdocs_search_modal_ai");if(e)try{JSON.parse(e).query!==t&&(x(""),b(""),S(!1),g(!1),f(!1),localStorage.removeItem("betterdocs_search_modal_ai"))}catch(e){console.error("Error parsing localStorage data:",e),localStorage.removeItem("betterdocs_search_modal_ai")}else x(""),b(""),S(!1),g(!1),f(!1)}else x(""),b(""),S(!1),g(!1),f(!1),localStorage.removeItem("betterdocs_search_modal_ai")},[t]),(0,e.useEffect)(()=>{const e=async e=>{"Enter"!==e.key||!t.trim()||d||m||(e.preventDefault(),await T())},n=document.querySelector(".betterdocs-search-field");if(n)return n.addEventListener("keydown",e),()=>{n.removeEventListener("keydown",e)}},[t,d,m]),(0,e.useEffect)(()=>()=>{localStorage.removeItem("betterdocs_search_modal_ai")},[]);const T=async()=>{if(t.trim()&&!d&&!m){g(!0),x(""),b(""),S(!1);try{let e=y;e||(e=me(),_(e));let n=E;n||(n=(e=>{const t=e.replace(/session_|\./,"");let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n&=n;return`guest_${Math.abs(n).toString(16).substring(0,8)}`})(e),C(n));const s=(window.betterdocsAIChatbot?.locale||"en_US").split("_")[0],r=await(async(e,t,n,s="en")=>{try{const r=await fetch(`${window.betterdocsAIChatbot?.rest_url||betterdocsAIChatbot?.rest_url||"/wp-json/"}betterdocs-pro/v1/query-post`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,email:t,session_id:n,lang:s,preview_mode:!0})});if(!r.ok){const e=await r.json();throw new Error(e.message||"API request failed")}const i=await r.json();if(!i?.success)throw new Error(i.message||"Request failed");return i}catch(e){throw console.error("Error in getAIResponseOnly:",e),e}})(t,n,e,s),i=r?.data?.conversation||[],l=i[i.length-1],o=l?.text||"No response available",a={query:t,response:o,email:n,session_id:e,timestamp:(new Date).toISOString()};localStorage.setItem("betterdocs_search_modal_ai",JSON.stringify(a)),A(a),g(!1),(e=>{b(""),f(!0),((e,t={})=>{const{speed:n=10,onCharacter:s=()=>{},onComplete:r=()=>{},onStart:i=()=>{}}=t;let l=0,o="";i();const a=()=>{l<e?.length?(o+=e?.charAt(l),s(o,l),l++,setTimeout(a,n)):r(o)};a()})(e,{speed:15,onCharacter:e=>{const t=de(e).__html;b(t)},onComplete:e=>{const t=de(e).__html;x(t),b(""),f(!1),S(!0)}})})(o)}catch(e){console.error("AI query error:",e),g(!1),f(!1),x("Sorry, I encountered an error while processing your request. Please try again."),S(!1)}}},R=()=>{z(!I)};return t.trim()?(0,e.createElement)("div",{className:"betterdocs-ai-suggestion"},!d&&!m&&!k&&(0,e.createElement)("div",{className:"ai-suggestion-prompt",onClick:T,style:{cursor:"pointer"}},(0,e.createElement)("div",{className:"ai-suggestion-content"},(0,e.createElement)("div",{className:"ai-sparkle-icon"},(0,e.createElement)(s,null)),(0,e.createElement)("div",{className:"ai-suggestion-text"},(0,e.createElement)("p",{className:"ai-suggestion-label"},window.betterdocsAISearchModal?.modal_title||(0,n.__)("Hit enter to Ask BetterDocs AI","betterdocs-ai-chatbot")),(0,e.createElement)("p",{className:"ai-suggestion-query"},'"',t,'"'))),(0,e.createElement)("div",{className:"ai-suggestion-enter-icon"},(0,e.createElement)(r,null))),d&&(0,e.createElement)("div",{className:"ai-suggestion-generating"},(0,e.createElement)("div",{className:"ai-generating-content"},(0,e.createElement)("div",{className:"ai-sparkle-icon animated"},(0,e.createElement)(s,null)),(0,e.createElement)("div",{className:"ai-generating-text"},(0,e.createElement)("span",{className:"ai-generating-label"},window.betterdocsAISearchModal?.processing_text||(0,n.__)("BetterDocs AI is working","betterdocs-ai-chatbot")),(0,e.createElement)("span",{className:"thinking-dots"},"...")))),m&&w&&(0,e.createElement)("div",{className:"ai-response"},(0,e.createElement)("div",{className:"ai-response-header"},(0,e.createElement)("div",{className:"ai-response-icon-title"},(0,e.createElement)("div",{className:"ai-sparkle-icon"},(0,e.createElement)(s,null)),(0,e.createElement)("span",{className:"ai-response-title"},t)),(0,e.createElement)("span",{className:"ai-response-toggle "+(I?"collapsed":""),onClick:R},(0,e.createElement)(i,null))),!I&&(0,e.createElement)("div",{className:"ai-response-content"},(0,e.createElement)("div",{dangerouslySetInnerHTML:{__html:w}}))),k&&!m&&(0,e.createElement)("div",{className:"ai-response"},(0,e.createElement)("div",{className:"ai-response-header"},(0,e.createElement)("div",{className:"ai-response-icon-title"},(0,e.createElement)("div",{className:"ai-sparkle-icon"},(0,e.createElement)(s,null)),(0,e.createElement)("span",{className:"ai-response-title"},t)),(0,e.createElement)("span",{className:"ai-response-toggle "+(I?"collapsed":""),onClick:R},(0,e.createElement)(i,null))),!I&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"ai-response-content"},(0,e.createElement)("div",{dangerouslySetInnerHTML:{__html:k}})),$&&(0,e.createElement)("div",{className:"ai-response-actions"},(!0===window.betterdocsAISearchModal?.enable_powered_by||"1"==window.betterdocsAISearchModal?.enable_powered_by)&&(0,e.createElement)("div",{className:"powered-by"},(0,e.createElement)(l,null),(0,e.createElement)("span",null,(0,n.__)("Powered by","betterdocs-ai-chatbot"))," ",(0,e.createElement)("strong",null,(0,n.__)("BetterDocs AI","betterdocs-ai-chatbot"))),(0,e.createElement)("div",{className:"continue-conversation-btn",onClick:async()=>{await(async()=>{if(v)try{let e=[];try{const t=await fetch(`${window.betterdocsAIChatbot?.rest_url||betterdocsAIChatbot?.rest_url||"/wp-json/"}betterdocs-pro/v1/get-current-user-conversation`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":window.betterdocsAIChatbot?.nonce||betterdocsAIChatbot?.nonce||""},credentials:"include",body:JSON.stringify({email:v.email,session_id:v.session_id})});if(t.ok){const n=await t.json();n?.conversation&&(e=n.conversation,console.log("Found existing conversation with",e.length,"messages"))}}catch(e){console.log("No existing conversation found, creating new one")}const t=[{text:v.query,type:"sent",timestamp:(new Date).toISOString().slice(0,19).replace("T"," ")},{text:v.response,type:"received",timestamp:(new Date).toISOString().slice(0,19).replace("T"," ")}],n=[...e,...t],s={email:v.email,main_information:{location:"",country:"",time:(new Date).toISOString().slice(0,19).replace("T"," "),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,language:navigator.language},device_information:{IP_address:"",browser:navigator.userAgent},isBlocked:!1,conversation:n},r=await fetch(`${window.betterdocsAIChatbot?.rest_url||betterdocsAIChatbot?.rest_url||"/wp-json/"}betterdocs-pro/v1/save-conversation`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation:s,session_id:v.session_id})});if(!r.ok)throw new Error("Failed to save conversation");await r.json()}catch(e){console.error("Error saving conversation:",e)}})(),localStorage.removeItem("betterdocs_search_modal_ai"),ge("chatbot_session_id")||(document.cookie=`chatbot_session_id=${y}; path=/; max-age=86400`),ge("userEmail")||(document.cookie=`userEmail=${E}; path=/; max-age=86400`),ge("showEmailField")||(document.cookie="showEmailField=false; path=/; max-age=86400"),u(),setTimeout(()=>{const e=document.querySelector(".betterdocs-ia-launcher");e&&(e.click(),setTimeout(()=>{const e=document.querySelector(".betterdocs-ia-chatbot");e&&e.click()},500))},100)}},(0,e.createElement)(ke,null),(0,e.createElement)("span",null,window.betterdocsAISearchModal?.continue_button_text||(0,n.__)("Continue Chat with AI","betterdocs-ai-chatbot")),(0,e.createElement)(fe,null)))))):null};(0,t.addFilter)("betterdocs_search_modal_after_srarch_header","betterdocs-ai-chatbot",(t,[n,s,r,i,l,o,a,c,h])=>window.betterdocsAIChatbot&&window.betterdocs?.TAB_AI_CHATBOT?"1"!==h&&"true"!==h&&!0!==h?null:(0,e.createElement)(xe,{searchQuery:n,setSearchQuery:s,setHasSearched:r,selectedCategory:i,activeTab:l,fetchSearchResults:o,closeModal:a}):null)})();
// source --> https://agilestorelocator.com/wp-content/plugins/contact-form-7/includes/swv/js/index.js?ver=6.1.5 
(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){if(this.formData={},this.tree={},!(t instanceof FormData))return this;this.formData=t;const e=()=>{const t=new Map;return t.largestIndex=0,t.set=function(e,i){""===e?e=t.largestIndex++:/^[0-9]+$/.test(e)&&(e=parseInt(e),t.largestIndex<=e&&(t.largestIndex=e+1)),Map.prototype.set.call(t,e,i)},t};this.tree=e();const i=/^(?<name>[a-z][-a-z0-9_:]*)(?<array>(?:\[(?:[a-z][-a-z0-9_:]*|[0-9]*)\])*)/i;for(const[t,s]of this.formData){const o=t.match(i);if(o)if(""===o.groups.array)this.tree.set(o.groups.name,s);else{const t=[...o.groups.array.matchAll(/\[([a-z][-a-z0-9_:]*|[0-9]*)\]/gi)].map((([t,e])=>e));t.unshift(o.groups.name);const i=t.pop();t.reduce(((t,i)=>{if(/^[0-9]+$/.test(i)&&(i=parseInt(i)),t.get(i)instanceof Map)return t.get(i);const s=e();return t.set(i,s),s}),this.tree).set(i,s)}}}t.r(e),t.d(e,{all:()=>D,any:()=>M,date:()=>m,dayofweek:()=>u,email:()=>r,enum:()=>h,file:()=>d,maxdate:()=>z,maxfilesize:()=>j,maxitems:()=>v,maxlength:()=>x,maxnumber:()=>y,mindate:()=>A,minfilesize:()=>$,minitems:()=>w,minlength:()=>g,minnumber:()=>b,number:()=>c,required:()=>n,requiredfile:()=>a,stepnumber:()=>I,tel:()=>l,time:()=>f,url:()=>p}),i.prototype.entries=function(){return this.tree.entries()},i.prototype.get=function(t){return this.tree.get(t)},i.prototype.getAll=function(t){if(!this.has(t))return[];const e=t=>{const i=[];if(t instanceof Map)for(const[s,o]of t)i.push(...e(o));else""!==t&&i.push(t);return i};return e(this.get(t))},i.prototype.has=function(t){return this.tree.has(t)},i.prototype.keys=function(){return this.tree.keys()},i.prototype.values=function(){return this.tree.values()};const s=i;function o({rule:t,field:e,error:i,...s}){this.rule=t,this.field=e,this.error=i,this.properties=s}const n=function(t){if(0===t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length)throw new o(this)},a=function(t){if(0===t.getAll(this.field).length)throw new o(this)},r=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(t.length<6)return!1;if(-1===t.indexOf("@",1))return!1;if(t.indexOf("@")!==t.lastIndexOf("@"))return!1;const[e,i]=t.split("@",2);if(!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/.test(e))return!1;if(/\.{2,}/.test(i))return!1;if(/(?:^[ \t\n\r\0\x0B.]|[ \t\n\r\0\x0B.]$)/.test(i))return!1;const s=i.split(".");if(s.length<2)return!1;for(const t of s){if(/(?:^[ \t\n\r\0\x0B-]|[ \t\n\r\0\x0B-]$)/.test(t))return!1;if(!/^[a-z0-9-]+$/i.test(t))return!1}return!0})))throw new o(this)},p=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(!e.every((t=>{try{return(t=>-1!==["http","https","ftp","ftps","mailto","news","irc","irc6","ircs","gopher","nntp","feed","telnet","mms","rtsp","sms","svn","tel","fax","xmpp","webcal","urn"].indexOf(t))(new URL(t).protocol.replace(/:$/,""))}catch{return!1}})))throw new o(this)},l=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>(((t=(t=t.replace(/[#*].*$/,"")).replaceAll(/[()/.*#\s-]+/g,"")).startsWith("+")||t.startsWith("00"))&&(t=`+${t.replace(/^[+0]+/,"")}`),!!/^[+]?[0-9]+$/.test(t)&&5<t.length&&t.length<16))))throw new o(this)},c=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!!/^[-]?[0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)||!!/^[-]?(?:[0-9]+)?[.][0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t))))throw new o(this)},m=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(!/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.valueOf())})))throw new o(this)},f=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=t.match(/^([0-9]{2})\:([0-9]{2})(?:\:([0-9]{2}))?$/);if(!e)return!1;const i=parseInt(e[1]),s=parseInt(e[2]),o=e[3]?parseInt(e[3]):0;return 0<=i&&i<=23&&0<=s&&s<=59&&0<=o&&o<=59})))throw new o(this)},d=function(t){if(!t.getAll(this.field).every((t=>t instanceof File&&this.accept?.some((e=>/^\.[a-z0-9]+$/i.test(e)?t.name.toLowerCase().endsWith(e.toLowerCase()):(t=>{const e=[],i=t.match(/^(?<toplevel>[a-z]+)\/(?<sub>[*]|[a-z0-9.+-]+)$/i);if(i){const t=i.groups.toplevel.toLowerCase(),s=i.groups.sub.toLowerCase();for(const[o,n]of(()=>{const t=new Map;return t.set("jpg|jpeg|jpe","image/jpeg"),t.set("gif","image/gif"),t.set("png","image/png"),t.set("bmp","image/bmp"),t.set("tiff|tif","image/tiff"),t.set("webp","image/webp"),t.set("ico","image/x-icon"),t.set("heic","image/heic"),t.set("asf|asx","video/x-ms-asf"),t.set("wmv","video/x-ms-wmv"),t.set("wmx","video/x-ms-wmx"),t.set("wm","video/x-ms-wm"),t.set("avi","video/avi"),t.set("divx","video/divx"),t.set("flv","video/x-flv"),t.set("mov|qt","video/quicktime"),t.set("mpeg|mpg|mpe","video/mpeg"),t.set("mp4|m4v","video/mp4"),t.set("ogv","video/ogg"),t.set("webm","video/webm"),t.set("mkv","video/x-matroska"),t.set("3gp|3gpp","video/3gpp"),t.set("3g2|3gp2","video/3gpp2"),t.set("txt|asc|c|cc|h|srt","text/plain"),t.set("csv","text/csv"),t.set("tsv","text/tab-separated-values"),t.set("ics","text/calendar"),t.set("rtx","text/richtext"),t.set("css","text/css"),t.set("htm|html","text/html"),t.set("vtt","text/vtt"),t.set("dfxp","application/ttaf+xml"),t.set("mp3|m4a|m4b","audio/mpeg"),t.set("aac","audio/aac"),t.set("ra|ram","audio/x-realaudio"),t.set("wav","audio/wav"),t.set("ogg|oga","audio/ogg"),t.set("flac","audio/flac"),t.set("mid|midi","audio/midi"),t.set("wma","audio/x-ms-wma"),t.set("wax","audio/x-ms-wax"),t.set("mka","audio/x-matroska"),t.set("rtf","application/rtf"),t.set("js","application/javascript"),t.set("pdf","application/pdf"),t.set("swf","application/x-shockwave-flash"),t.set("class","application/java"),t.set("tar","application/x-tar"),t.set("zip","application/zip"),t.set("gz|gzip","application/x-gzip"),t.set("rar","application/rar"),t.set("7z","application/x-7z-compressed"),t.set("exe","application/x-msdownload"),t.set("psd","application/octet-stream"),t.set("xcf","application/octet-stream"),t.set("doc","application/msword"),t.set("pot|pps|ppt","application/vnd.ms-powerpoint"),t.set("wri","application/vnd.ms-write"),t.set("xla|xls|xlt|xlw","application/vnd.ms-excel"),t.set("mdb","application/vnd.ms-access"),t.set("mpp","application/vnd.ms-project"),t.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t.set("docm","application/vnd.ms-word.document.macroEnabled.12"),t.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),t.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),t.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),t.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),t.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),t.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),t.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),t.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),t.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),t.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),t.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),t.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),t.set("potm","application/vnd.ms-powerpoint.template.macroEnabled.12"),t.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),t.set("sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"),t.set("sldm","application/vnd.ms-powerpoint.slide.macroEnabled.12"),t.set("onetoc|onetoc2|onetmp|onepkg","application/onenote"),t.set("oxps","application/oxps"),t.set("xps","application/vnd.ms-xpsdocument"),t.set("odt","application/vnd.oasis.opendocument.text"),t.set("odp","application/vnd.oasis.opendocument.presentation"),t.set("ods","application/vnd.oasis.opendocument.spreadsheet"),t.set("odg","application/vnd.oasis.opendocument.graphics"),t.set("odc","application/vnd.oasis.opendocument.chart"),t.set("odb","application/vnd.oasis.opendocument.database"),t.set("odf","application/vnd.oasis.opendocument.formula"),t.set("wp|wpd","application/wordperfect"),t.set("key","application/vnd.apple.keynote"),t.set("numbers","application/vnd.apple.numbers"),t.set("pages","application/vnd.apple.pages"),t})())("*"===s&&n.startsWith(t+"/")||n===i[0])&&e.push(...o.split("|"))}return e})(e).some((e=>(e="."+e.trim(),t.name.toLowerCase().endsWith(e.toLowerCase())))))))))throw new o(this)},h=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>this.accept?.some((e=>t===String(e))))))throw new o(this)},u=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=0===(i=new Date(t).getDay())?7:i;var i;return this.accept?.some((t=>e===parseInt(t)))})))throw new o(this)},w=function(t){if(t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length<parseInt(this.threshold))throw new o(this)},v=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(parseInt(this.threshold)<e.length)throw new o(this)},g=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),0!==i&&i<parseInt(this.threshold))throw new o(this)},x=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),parseInt(this.threshold)<i)throw new o(this)},b=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(t)<parseFloat(this.threshold)))))throw new o(this)},y=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(this.threshold)<parseFloat(t)))))throw new o(this)},A=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&t<this.threshold))))throw new o(this)},z=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&this.threshold<t))))throw new o(this)},$=function(t){const e=t.getAll(this.field);let i=0;if(e.forEach((t=>{t instanceof File&&(i+=t.size)})),i<parseInt(this.threshold))throw new o(this)},j=function(t){const e=t.getAll(this.field);let i=0;if(e.forEach((t=>{t instanceof File&&(i+=t.size)})),parseInt(this.threshold)<i)throw new o(this)},I=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)),i=parseFloat(this.base),s=parseFloat(this.interval);if(!(0<s))return!0;if(!e.every((t=>{const e=(parseFloat(t)-i)%s;return"0.000000"===Math.abs(e).toFixed(6)||"0.000000"===Math.abs(e-s).toFixed(6)})))throw new o(this)},O=({ruleObj:t,options:i})=>{const{rule:s,...o}=t;return"function"==typeof e[s]&&("function"!=typeof e[s].matches||e[s].matches(o,i))},E=({ruleObj:t,formDataTree:i,options:s})=>{const{rule:o}=t;e[o].call(t,i,s)},k=[],F=t=>[...k].reduce(((t,e)=>i=>e(i,t)),t),D=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.every((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;if(void 0!==t.error)throw t;return!1}return!0})))throw new o(this)},M=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.some((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;return!1}return!0})))throw new o(this)};var L;window.swv={validators:e,validate:(t,e,i={})=>{const n=(t.rules??[]).filter((t=>O({ruleObj:t,options:i})));if(!n.length)return new Map;const a=F(E),r=new s(e),p=n.reduce(((t,e)=>{try{a({ruleObj:e,formDataTree:r,options:i})}catch(e){if(!(e instanceof o))throw e;if(void 0!==e.field&&!t.has(e.field)&&void 0!==e.error)return t.set(e.field,e)}return t}),new Map);for(const t of r.keys())p.has(t)||p.set(t,{validInputs:r.getAll(t)});return p},use:t=>{k.push(t)},...null!==(L=window.swv)&&void 0!==L?L:{}}})();
// source --> https://agilestorelocator.com/wp-content/plugins/contact-form-7/includes/js/index.js?ver=6.1.5 
(()=>{"use strict";const e=window.wp.i18n,t=e=>Math.abs(parseInt(e,10)),a=(e,t,a)=>{const n=new CustomEvent(`wpcf7${t}`,{bubbles:!0,detail:a});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(n)},n=(e,t)=>{const n=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["validating","validating"],["payment_required","payment-required"]]);n.has(t)&&(t=n.get(t)),Array.from(n.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const r=e.getAttribute("data-status");if(e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),r&&r!==t){e.classList.remove(r);const t={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,prevStatus:r};a(e,"statuschanged",t)}return t},r=e=>{const{root:t,namespace:a="contact-form-7/v1"}=wpcf7.api;return c.reduceRight(((e,t)=>a=>t(a,e)),(e=>{let n,r,{url:c,path:o,endpoint:s,headers:i,body:l,data:p,...d}=e;"string"==typeof s&&(n=a.replace(/^\/|\/$/g,""),r=s.replace(/^\//,""),o=r?n+"/"+r:n),"string"==typeof o&&(-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),c=t+o),i={Accept:"application/json, */*;q=0.1",...i},delete i["X-WP-Nonce"],p&&(l=JSON.stringify(p),i["Content-Type"]="application/json");const f={code:"fetch_error",message:"You are probably offline."},u={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(c||o||window.location.href,{...d,headers:i,body:l}).then((e=>Promise.resolve(e).then((e=>{if(e.status>=200&&e.status<300)return e;throw e})).then((e=>{if(204===e.status)return null;if(e&&e.json)return e.json().catch((()=>{throw u}));throw u}))),(()=>{throw f}))}))(e)},c=[];function o(e,t={}){const{target:a,scope:r=e,...c}=t;if(void 0===e.wpcf7?.schema)return;const o={...e.wpcf7.schema};if(void 0!==a){if(!e.contains(a))return;if(!a.closest(".wpcf7-form-control-wrap[data-name]"))return;if(a.closest(".novalidate"))return}const p=r.querySelectorAll(".wpcf7-form-control-wrap"),d=Array.from(p).reduce(((e,t)=>(t.closest(".novalidate")||t.querySelectorAll(":where( input, textarea, select ):enabled").forEach((t=>{if(t.name)switch(t.type){case"button":case"image":case"reset":case"submit":break;case"checkbox":case"radio":t.checked&&e.append(t.name,t.value);break;case"select-multiple":for(const a of t.selectedOptions)e.append(t.name,a.value);break;case"file":for(const a of t.files)e.append(t.name,a);break;default:e.append(t.name,t.value)}})),e)),new FormData),f=e.getAttribute("data-status");Promise.resolve(n(e,"validating")).then((n=>{if(void 0!==swv){const n=swv.validate(o,d,t);for(const t of p){if(void 0===t.dataset.name)continue;const c=t.dataset.name;if(n.has(c)){const{error:t,validInputs:a}=n.get(c);i(e,c),void 0!==t&&s(e,c,t,{scope:r}),l(e,c,null!=a?a:[])}if(t.contains(a))break}}})).finally((()=>{n(e,f)}))}r.use=e=>{c.unshift(e)};const s=(e,t,a,n)=>{const{scope:r=e,...c}=null!=n?n:{},o=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,""),s=e.querySelector(`.wpcf7-form-control-wrap[data-name="${t}"] .wpcf7-form-control`);(()=>{const t=document.createElement("li");t.setAttribute("id",o),s&&s.id?t.insertAdjacentHTML("beforeend",`<a href="#${s.id}">${a}</a>`):t.insertAdjacentText("beforeend",a),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(t)})(),r.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{const t=document.createElement("span");t.classList.add("wpcf7-not-valid-tip"),t.setAttribute("aria-hidden","true"),t.insertAdjacentText("beforeend",a),e.appendChild(t),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.classList.add("wpcf7-not-valid"),e.setAttribute("aria-describedby",o),"function"==typeof e.setCustomValidity&&e.setCustomValidity(a),e.closest(".use-floating-validation-tip")&&(e.addEventListener("focus",(e=>{t.setAttribute("style","display: none")})),t.addEventListener("click",(e=>{t.setAttribute("style","display: none")})))}))}))},i=(e,t)=>{const a=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,"");e.wpcf7.parent.querySelector(`.screen-reader-response ul li#${a}`)?.remove(),e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{e.querySelector(".wpcf7-not-valid-tip")?.remove(),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","false")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid"),"function"==typeof e.setCustomValidity&&e.setCustomValidity("")}))}))},l=(e,t,a)=>{e.querySelectorAll(`[data-reflection-of="${t}"]`).forEach((e=>{if("output"===e.tagName.toLowerCase()){const t=e;0===a.length&&a.push(t.dataset.default),a.slice(0,1).forEach((e=>{e instanceof File&&(e=e.name),t.textContent=e}))}else e.querySelectorAll("output").forEach((e=>{e.hasAttribute("data-default")?0===a.length?e.removeAttribute("hidden"):e.setAttribute("hidden","hidden"):e.remove()})),a.forEach((a=>{a instanceof File&&(a=a.name);const n=document.createElement("output");n.setAttribute("name",t),n.textContent=a,e.appendChild(n)}))}))};function p(e,t={}){if(wpcf7.blocked)return d(e),void n(e,"submitting");const c=new FormData(e);t.submitter&&t.submitter.name&&c.append(t.submitter.name,t.submitter.value);const o={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(c,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:c};r({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:c,wpcf7:{endpoint:"feedback",form:e,detail:o}}).then((t=>{const r=n(e,t.status);return o.status=t.status,o.apiResponse=t,["invalid","unaccepted","spam","aborted"].includes(r)?a(e,r,o):["sent","failed"].includes(r)&&a(e,`mail${r}`,o),a(e,"submit",o),t})).then((t=>{t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&(e.reset(),e.wpcf7.resetOnMailSent=!0),t.invalid_fields&&t.invalid_fields.forEach((t=>{s(e,t.field,t.message)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=t.message}))})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:t,detail:r}=e.wpcf7;d(t),a(t,"beforesubmit",r),n(t,"submitting")}return t(e)}));const d=e=>{e.querySelectorAll(".wpcf7-form-control-wrap").forEach((t=>{t.dataset.name&&i(e,t.dataset.name)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function f(e){const t=new FormData(e),c={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(t,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:t};r({endpoint:`contact-forms/${e.wpcf7.id}/refill`,method:"GET",wpcf7:{endpoint:"refill",form:e,detail:c}}).then((t=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,n(e,"mail_sent")):n(e,"init"),c.apiResponse=t,a(e,"reset",c)})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"refill"===e.wpcf7.endpoint){const{form:t,detail:a}=e.wpcf7;d(t),n(t,"resetting")}return t(e)}));const u=(e,t)=>{for(const a in t){const n=t[a];e.querySelectorAll(`input[name="${a}"]`).forEach((e=>{e.value=""})),e.querySelectorAll(`img.wpcf7-captcha-${a.replaceAll(":","")}`).forEach((e=>{e.setAttribute("src",n)}));const r=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);r&&e.querySelectorAll(`input[name="_wpcf7_captcha_challenge_${a}"]`).forEach((e=>{e.value=r[1]}))}},m=(e,t)=>{for(const a in t){const n=t[a][0],r=t[a][1];e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${a}"]`).forEach((e=>{e.querySelector(`input[name="${a}"]`).value="",e.querySelector(".wpcf7-quiz-label").textContent=n,e.querySelector(`input[name="_wpcf7_quiz_answer_${a}"]`).value=r}))}};function w(e){const a=new FormData(e);e.wpcf7={id:t(a.get("_wpcf7")),status:e.getAttribute("data-status"),pluginVersion:a.get("_wpcf7_version"),locale:a.get("_wpcf7_locale"),unitTag:a.get("_wpcf7_unit_tag"),containerPost:t(a.get("_wpcf7_container_post")),parent:e.closest(".wpcf7"),get schema(){return wpcf7.schemas.get(this.id)}},wpcf7.schemas.set(e.wpcf7.id,void 0),e.querySelectorAll(".has-spinner").forEach((e=>{e.insertAdjacentHTML("afterend",'<span class="wpcf7-spinner"></span>')})),(e=>{e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((t=>{t.addEventListener("change",(t=>{const a=t.target.getAttribute("name");e.querySelectorAll(`input[type="checkbox"][name="${a}"]`).forEach((e=>{e!==t.target&&(e.checked=!1)}))}))}))})(e),(e=>{e.querySelectorAll(".has-free-text").forEach((t=>{const a=t.querySelector("input.wpcf7-free-text"),n=t.querySelector('input[type="checkbox"], input[type="radio"]');a.disabled=!n.checked,e.addEventListener("change",(e=>{a.disabled=!n.checked,e.target===n&&n.checked&&a.focus()}))}))})(e),(e=>{e.querySelectorAll(".wpcf7-validates-as-url").forEach((e=>{e.addEventListener("change",(t=>{let a=e.value.trim();a&&!a.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==a.indexOf(".")&&(a=a.replace(/^\/+/,""),a="http://"+a),e.value=a}))}))})(e),(e=>{if(!e.querySelector(".wpcf7-acceptance")||e.classList.contains("wpcf7-acceptance-as-validation"))return;const t=()=>{let t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((e=>{if(!t||e.classList.contains("optional"))return;const a=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&a.checked||!e.classList.contains("invert")&&!a.checked)&&(t=!1)})),e.querySelectorAll(".wpcf7-submit").forEach((e=>{e.disabled=!t}))};t(),e.addEventListener("change",(e=>{t()})),e.addEventListener("wpcf7reset",(e=>{t()}))})(e),(e=>{const a=(e,a)=>{const n=t(e.getAttribute("data-starting-value")),r=t(e.getAttribute("data-maximum-value")),c=t(e.getAttribute("data-minimum-value")),o=e.classList.contains("down")?n-a.value.trim().length:a.value.trim().length;e.setAttribute("data-current-value",o),e.innerText=o,r&&r<a.value.length?e.classList.add("too-long"):e.classList.remove("too-long"),c&&a.value.length<c?e.classList.add("too-short"):e.classList.remove("too-short")},n=t=>{t={init:!1,...t},e.querySelectorAll(".wpcf7-character-count").forEach((n=>{const r=n.getAttribute("data-target-name"),c=e.querySelector(`[name="${r}"]`);c&&(c.value=c.defaultValue,a(n,c),t.init&&c.addEventListener("keyup",(e=>{a(n,c)})))}))};n({init:!0}),e.addEventListener("wpcf7reset",(e=>{n()}))})(e),window.addEventListener("load",(t=>{wpcf7.cached&&e.reset()})),e.addEventListener("reset",(t=>{wpcf7.reset(e)})),e.addEventListener("submit",(t=>{wpcf7.submit(e,{submitter:t.submitter}),t.preventDefault()})),e.addEventListener("wpcf7submit",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("wpcf7reset",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("change",(t=>{t.target.closest(".wpcf7-form-control")&&wpcf7.validate(e,{target:t.target})})),e.addEventListener("wpcf7statuschanged",(t=>{const a=t.detail.status;e.querySelectorAll(".active-on-any").forEach((e=>{e.removeAttribute("inert"),e.classList.remove("active-on-any")})),e.querySelectorAll(`.inert-on-${a}`).forEach((e=>{e.setAttribute("inert","inert"),e.classList.add("active-on-any")}))}))}document.addEventListener("DOMContentLoaded",(t=>{var a;if("undefined"!=typeof wpcf7)if(void 0!==wpcf7.api)if("function"==typeof window.fetch)if("function"==typeof window.FormData)if("function"==typeof NodeList.prototype.forEach)if("function"==typeof String.prototype.replaceAll){wpcf7={init:w,submit:p,reset:f,validate:o,schemas:new Map,...null!==(a=wpcf7)&&void 0!==a?a:{}},document.querySelectorAll("form .wpcf7[data-wpcf7-id]").forEach((t=>{const a=document.createElement("p");a.setAttribute("class","wpcf7-form-in-wrong-place");const n=document.createElement("strong");n.append((0,e.__)("Error:","contact-form-7"));const r=(0,e.__)("This contact form is placed in the wrong place.","contact-form-7");a.append(n," ",r),t.replaceWith(a)})),document.querySelectorAll(".wpcf7 > form").forEach((e=>{wpcf7.init(e),e.closest(".wpcf7").classList.replace("no-js","js")}));for(const e of wpcf7.schemas.keys())r({endpoint:`contact-forms/${e}/feedback/schema`,method:"GET"}).then((t=>{wpcf7.schemas.set(e,t)}))}else console.error("Your browser does not support String.replaceAll().");else console.error("Your browser does not support NodeList.forEach().");else console.error("Your browser does not support window.FormData().");else console.error("Your browser does not support window.fetch().");else console.error("wpcf7.api is not defined.");else console.error("wpcf7 is not defined.")}))})();
// source --> https://agilestorelocator.com/wp-content/plugins/prismatic/lib/prism/js/prism-core.js?ver=3.7.4 
/* PrismJS 1.30.0
https://prismjs.com/download.html#themes=prism */
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(n,t){var r,i;switch(t=t||{},a.util.type(n)){case"Object":if(i=a.util.objId(n),t[i])return t[i];for(var l in r={},t[i]=r,n)n.hasOwnProperty(l)&&(r[l]=e(n[l],t));return r;case"Array":return i=a.util.objId(n),t[i]?t[i]:(r=[],t[i]=r,n.forEach((function(n,a){r[a]=e(n,t)})),r);default:return n}},getLanguage:function(e){for(;e;){var t=n.exec(e.className);if(t)return t[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,t){e.className=e.className.replace(RegExp(n,"gi"),""),e.classList.add("language-"+t)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var n=document.getElementsByTagName("script");for(var t in n)if(n[t].src==e)return n[t]}return null}},isActive:function(e,n,t){for(var r="no-"+n;e;){var a=e.classList;if(a.contains(n))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!t}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,n){var t=a.util.clone(a.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){var i=(r=r||a.languages)[e],l={};for(var o in i)if(i.hasOwnProperty(o)){if(o==n)for(var s in t)t.hasOwnProperty(s)&&(l[s]=t[s]);t.hasOwnProperty(o)||(l[o]=i[o])}var u=r[e];return r[e]=l,a.languages.DFS(a.languages,(function(n,t){t===u&&n!=e&&(this[n]=l)})),l},DFS:function e(n,t,r,i){i=i||{};var l=a.util.objId;for(var o in n)if(n.hasOwnProperty(o)){t.call(n,o,n[o],r||o);var s=n[o],u=a.util.type(s);"Object"!==u||i[l(s)]?"Array"!==u||i[l(s)]||(i[l(s)]=!0,e(s,t,o,i)):(i[l(s)]=!0,e(s,t,null,i))}}},plugins:{},highlightAll:function(e,n){a.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,t){var r={callback:t,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),a.hooks.run("before-all-elements-highlight",r);for(var i,l=0;i=r.elements[l++];)a.highlightElement(i,!0===n,r.callback)},highlightElement:function(n,t,r){var i=a.util.getLanguage(n),l=a.languages[i];a.util.setLanguage(n,i);var o=n.parentElement;o&&"pre"===o.nodeName.toLowerCase()&&a.util.setLanguage(o,i);var s={element:n,language:i,grammar:l,code:n.textContent};function u(e){s.highlightedCode=e,a.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,a.hooks.run("after-highlight",s),a.hooks.run("complete",s),r&&r.call(s.element)}if(a.hooks.run("before-sanity-check",s),(o=s.element.parentElement)&&"pre"===o.nodeName.toLowerCase()&&!o.hasAttribute("tabindex")&&o.setAttribute("tabindex","0"),!s.code)return a.hooks.run("complete",s),void(r&&r.call(s.element));if(a.hooks.run("before-highlight",s),s.grammar)if(t&&e.Worker){var c=new Worker(a.filename);c.onmessage=function(e){u(e.data)},c.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))}else u(a.highlight(s.code,s.grammar,s.language));else u(a.util.encode(s.code))},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(a.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=a.tokenize(r.code,r.grammar),a.hooks.run("after-tokenize",r),i.stringify(a.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var a=new s;return u(a,a.head,e),o(e,a,n,a.head,0),function(e){for(var n=[],t=e.head.next;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=a.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=a.hooks.all[e];if(t&&t.length)for(var r,i=0;r=t[i++];)r(n)}},Token:i};function i(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function l(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function o(e,n,t,r,s,g){for(var f in t)if(t.hasOwnProperty(f)&&t[f]){var h=t[f];h=Array.isArray(h)?h:[h];for(var d=0;d<h.length;++d){if(g&&g.cause==f+","+d)return;var v=h[d],p=v.inside,m=!!v.lookbehind,y=!!v.greedy,k=v.alias;if(y&&!v.pattern.global){var x=v.pattern.toString().match(/[imsuy]*$/)[0];v.pattern=RegExp(v.pattern.source,x+"g")}for(var b=v.pattern||v,w=r.next,A=s;w!==n.tail&&!(g&&A>=g.reach);A+=w.value.length,w=w.next){var P=w.value;if(n.length>e.length)return;if(!(P instanceof i)){var E,S=1;if(y){if(!(E=l(b,A,e,m))||E.index>=e.length)break;var L=E.index,O=E.index+E[0].length,C=A;for(C+=w.value.length;L>=C;)C+=(w=w.next).value.length;if(A=C-=w.value.length,w.value instanceof i)continue;for(var j=w;j!==n.tail&&(C<O||"string"==typeof j.value);j=j.next)S++,C+=j.value.length;S--,P=e.slice(A,C),E.index-=A}else if(!(E=l(b,0,P,m)))continue;L=E.index;var N=E[0],_=P.slice(0,L),M=P.slice(L+N.length),W=A+P.length;g&&W>g.reach&&(g.reach=W);var I=w.prev;if(_&&(I=u(n,I,_),A+=_.length),c(n,I,S),w=u(n,I,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),S>1){var T={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,T),g&&T.reach>g.reach&&(g.reach=T.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a<t&&r!==e.tail;a++)r=r.next;n.next=r,r.prev=n,e.length-=a}if(e.Prism=a,i.stringify=function e(n,t){if("string"==typeof n)return n;if(Array.isArray(n)){var r="";return n.forEach((function(n){r+=e(n,t)})),r}var i={type:n.type,content:e(n.content,t),tag:"span",classes:["token",n.type],attributes:{},language:t},l=n.alias;l&&(Array.isArray(l)?Array.prototype.push.apply(i.classes,l):i.classes.push(l)),a.hooks.run("wrap",i);var o="";for(var s in i.attributes)o+=" "+s+'="'+(i.attributes[s]||"").replace(/"/g,"&quot;")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+o+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
// source --> https://agilestorelocator.com/wp-content/plugins/prismatic/lib/prism/js/plugin-toolbar.js?ver=3.7.4 
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e=[],t={},n=function(){};Prism.plugins.toolbar={};var a=Prism.plugins.toolbar.registerButton=function(n,a){var r;r="function"==typeof a?a:function(e){var t;return"function"==typeof a.onClick?((t=document.createElement("button")).type="button",t.addEventListener("click",(function(){a.onClick.call(this,e)}))):"string"==typeof a.url?(t=document.createElement("a")).href=a.url:t=document.createElement("span"),a.className&&t.classList.add(a.className),t.textContent=a.text,t},n in t?console.warn('There is a button with the key "'+n+'" registered already.'):e.push(t[n]=r)},r=Prism.plugins.toolbar.hook=function(a){var r=a.element.parentNode;if(r&&/pre/i.test(r.nodeName)&&!r.parentNode.classList.contains("code-toolbar")){var o=document.createElement("div");o.classList.add("code-toolbar"),r.parentNode.insertBefore(o,r),o.appendChild(r);var i=document.createElement("div");i.classList.add("toolbar");var l=e,d=function(e){for(;e;){var t=e.getAttribute("data-toolbar-order");if(null!=t)return(t=t.trim()).length?t.split(/\s*,\s*/g):[];e=e.parentElement}}(a.element);d&&(l=d.map((function(e){return t[e]||n}))),l.forEach((function(e){var t=e(a);if(t){var n=document.createElement("div");n.classList.add("toolbar-item"),n.appendChild(t),i.appendChild(n)}})),o.appendChild(i)}};a("label",(function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute("data-label")){var n,a,r=t.getAttribute("data-label");try{a=document.querySelector("template#"+r)}catch(e){}return a?n=a.content:(t.hasAttribute("data-url")?(n=document.createElement("a")).href=t.getAttribute("data-url"):n=document.createElement("span"),n.textContent=r),n}})),Prism.hooks.add("complete",r)}}();
// source --> https://agilestorelocator.com/wp-content/plugins/prismatic/lib/prism/js/plugin-line-numbers.js?ver=3.7.4 
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e="line-numbers",n=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(n,t){if("PRE"===n.tagName&&n.classList.contains(e)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,s=r+(i.children.length-1);t<r&&(t=r),t>s&&(t=s);var l=t-r;return i.children[l]}}},resize:function(e){r([e])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){t.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(t){if(t.code){var i=t.element,s=i.parentNode;if(s&&/pre/i.test(s.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,e)){i.classList.remove(e),s.classList.add(e);var l,o=t.code.match(n),a=o?o.length+1:1,u=new Array(a+1).join("<span></span>");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,s.hasAttribute("data-start")&&(s.style.counterReset="linenumber "+(parseInt(s.getAttribute("data-start"),10)-1)),t.element.appendChild(l),r([s]),Prism.hooks.run("line-numbers",t)}}})),Prism.hooks.add("line-numbers",(function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}))}function r(e){if(0!=(e=e.filter((function(e){var n,t=(n=e,n?window.getComputedStyle?getComputedStyle(n):n.currentStyle||null:null)["white-space"];return"pre-wrap"===t||"pre-line"===t}))).length){var t=e.map((function(e){var t=e.querySelector("code"),i=e.querySelector(".line-numbers-rows");if(t&&i){var r=e.querySelector(".line-numbers-sizer"),s=t.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",t.appendChild(r)),r.innerHTML="0",r.style.display="block";var l=r.getBoundingClientRect().height;return r.innerHTML="",{element:e,lines:s,lineHeights:[],oneLinerHeight:l,sizer:r}}})).filter(Boolean);t.forEach((function(e){var n=e.sizer,t=e.lines,i=e.lineHeights,r=e.oneLinerHeight;i[t.length-1]=void 0,t.forEach((function(e,t){if(e&&e.length>1){var s=n.appendChild(document.createElement("span"));s.style.display="block",s.textContent=e}else i[t]=r}))})),t.forEach((function(e){for(var n=e.sizer,t=e.lineHeights,i=0,r=0;r<t.length;r++)void 0===t[r]&&(t[r]=n.children[i++].getBoundingClientRect().height)})),t.forEach((function(e){var n=e.sizer,t=e.element.querySelector(".line-numbers-rows");n.style.display="none",n.innerHTML="",e.lineHeights.forEach((function(e,n){t.children[n].style.height=e+"px"}))}))}}}();
// source --> https://agilestorelocator.com/wp-content/plugins/prismatic/lib/prism/js/plugin-copy-clipboard.js?ver=3.7.4 
!function(){function t(t){var e=document.createElement("textarea");e.value=t.getText(),e.style.top="0",e.style.left="0",e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{var o=document.execCommand("copy");setTimeout((function(){o?t.success():t.error()}),1)}catch(e){setTimeout((function(){t.error(e)}),1)}document.body.removeChild(e)}"undefined"!=typeof Prism&&"undefined"!=typeof document&&(Prism.plugins.toolbar?Prism.plugins.toolbar.registerButton("copy-to-clipboard",(function(e){var o=e.element,n=function(t){var e={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var o in e){for(var n="data-prismjs-"+o,c=t;c&&!c.hasAttribute(n);)c=c.parentElement;c&&(e[o]=c.getAttribute(n))}return e}(o),c=document.createElement("button");c.className="copy-to-clipboard-button",c.setAttribute("type","button");var r=document.createElement("span");return c.appendChild(r),u("copy"),function(e,o){e.addEventListener("click",(function(){!function(e){navigator.clipboard?navigator.clipboard.writeText(e.getText()).then(e.success,(function(){t(e)})):t(e)}(o)}))}(c,{getText:function(){return o.textContent},success:function(){u("copy-success"),i()},error:function(){u("copy-error"),setTimeout((function(){!function(t){window.getSelection().selectAllChildren(t)}(o)}),1),i()}}),c;function i(){setTimeout((function(){u("copy")}),n["copy-timeout"])}function u(t){r.textContent=n[t],c.setAttribute("data-copy-state",t)}})):console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."))}();
// source --> https://agilestorelocator.com/wp-content/plugins/prismatic/lib/prism/js/lang-git.js?ver=3.7.4 
Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m};