UNPKG

codsen-tokenizer

Version:

HTML and CSS lexer aimed at code with fatal errors, accepts mixed coding languages

23 lines (22 loc) 73.9 kB
/** * @name codsen-tokenizer * @fileoverview HTML and CSS lexer aimed at code with fatal errors, accepts mixed coding languages * @version 7.0.25 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/codsen-tokenizer/} */ "use strict";var codsenTokenizer=(()=>{var xt=Object.create;var me=Object.defineProperty;var Lt=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames,Ye=Object.getOwnPropertySymbols,Rt=Object.getPrototypeOf,Ze=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable;var Ge=(e,l,i)=>l in e?me(e,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[l]=i,R=(e,l)=>{for(var i in l||(l={}))Ze.call(l,i)&&Ge(e,i,l[i]);if(Ye)for(var i of Ye(l))Pt.call(l,i)&&Ge(e,i,l[i]);return e};var It=(e,l)=>()=>(l||e((l={exports:{}}).exports,l),l.exports),Mt=(e,l)=>{for(var i in l)me(e,i,{get:l[i],enumerable:!0})},Xe=(e,l,i,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let m of Jt(l))!Ze.call(e,m)&&m!==i&&me(e,m,{get:()=>l[m],enumerable:!(a=Lt(l,m))||a.enumerable});return e};var Ne=(e,l,i)=>(i=e!=null?xt(Rt(e)):{},Xe(l||!e||!e.__esModule?me(i,"default",{value:e,enumerable:!0}):i,e)),Bt=e=>Xe(me({},"__esModule",{value:!0}),e);var de=It((gn,tt)=>{"use strict";tt.exports=Wt;function ae(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function Wt(e){if(e=e||{},e.circles)return Ht(e);return e.proto?a:i;function l(m,p){for(var $=Object.keys(m),b=new Array($.length),u=0;u<$.length;u++){var d=$[u],V=m[d];typeof V!="object"||V===null?b[d]=V:V instanceof Date?b[d]=new Date(V):ArrayBuffer.isView(V)?b[d]=ae(V):b[d]=p(V)}return b}function i(m){if(typeof m!="object"||m===null)return m;if(m instanceof Date)return new Date(m);if(Array.isArray(m))return l(m,i);if(m instanceof Map)return new Map(l(Array.from(m),i));if(m instanceof Set)return new Set(l(Array.from(m),i));var p={};for(var $ in m)if(Object.hasOwnProperty.call(m,$)!==!1){var b=m[$];typeof b!="object"||b===null?p[$]=b:b instanceof Date?p[$]=new Date(b):b instanceof Map?p[$]=new Map(l(Array.from(b),i)):b instanceof Set?p[$]=new Set(l(Array.from(b),i)):ArrayBuffer.isView(b)?p[$]=ae(b):p[$]=i(b)}return p}function a(m){if(typeof m!="object"||m===null)return m;if(m instanceof Date)return new Date(m);if(Array.isArray(m))return l(m,a);if(m instanceof Map)return new Map(l(Array.from(m),a));if(m instanceof Set)return new Set(l(Array.from(m),a));var p={};for(var $ in m){var b=m[$];typeof b!="object"||b===null?p[$]=b:b instanceof Date?p[$]=new Date(b):b instanceof Map?p[$]=new Map(l(Array.from(b),a)):b instanceof Set?p[$]=new Set(l(Array.from(b),a)):ArrayBuffer.isView(b)?p[$]=ae(b):p[$]=a(b)}return p}}function Ht(e){var l=[],i=[];return e.proto?p:m;function a($,b){for(var u=Object.keys($),d=new Array(u.length),V=0;V<u.length;V++){var w=u[V],k=$[w];if(typeof k!="object"||k===null)d[w]=k;else if(k instanceof Date)d[w]=new Date(k);else if(ArrayBuffer.isView(k))d[w]=ae(k);else{var D=l.indexOf(k);D!==-1?d[w]=i[D]:d[w]=b(k)}}return d}function m($){if(typeof $!="object"||$===null)return $;if($ instanceof Date)return new Date($);if(Array.isArray($))return a($,m);if($ instanceof Map)return new Map(a(Array.from($),m));if($ instanceof Set)return new Set(a(Array.from($),m));var b={};l.push($),i.push(b);for(var u in $)if(Object.hasOwnProperty.call($,u)!==!1){var d=$[u];if(typeof d!="object"||d===null)b[u]=d;else if(d instanceof Date)b[u]=new Date(d);else if(d instanceof Map)b[u]=new Map(a(Array.from(d),m));else if(d instanceof Set)b[u]=new Set(a(Array.from(d),m));else if(ArrayBuffer.isView(d))b[u]=ae(d);else{var V=l.indexOf(d);V!==-1?b[u]=i[V]:b[u]=m(d)}}return l.pop(),i.pop(),b}function p($){if(typeof $!="object"||$===null)return $;if($ instanceof Date)return new Date($);if(Array.isArray($))return a($,p);if($ instanceof Map)return new Map(a(Array.from($),p));if($ instanceof Set)return new Set(a(Array.from($),p));var b={};l.push($),i.push(b);for(var u in $){var d=$[u];if(typeof d!="object"||d===null)b[u]=d;else if(d instanceof Date)b[u]=new Date(d);else if(d instanceof Map)b[u]=new Map(a(Array.from(d),p));else if(d instanceof Set)b[u]=new Set(a(Array.from(d),p));else if(ArrayBuffer.isView(d))b[u]=ae(d);else{var V=l.indexOf(d);V!==-1?b[u]=i[V]:b[u]=p(d)}}return l.pop(),i.pop(),b}}});var un={};Mt(un,{defaults:()=>Ot,tokenizer:()=>an,util:()=>sn,version:()=>ln});function et(e){return typeof e!="string"?e:e.length?[e]:[]}var nt=Ne(de(),1);var cn=(0,nt.default)();var fe="\u201C",he="\u201D";var ot="\\";var lt="`";function z(e){return!!(e&&le(e)&&(e.charCodeAt(0)>64&&e.charCodeAt(0)<91||e.charCodeAt(0)>96&&e.charCodeAt(0)<123))}function G(e){if(e==null||typeof e!="object")return!1;let l=Object.getPrototypeOf(e);return l!==null&&l!==Object.prototype&&Object.getPrototypeOf(l)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function le(e){return typeof e=="string"}function rt(e,l){return G(e)&&le(l)&&l in e}var it=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],at=new Set(["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]);var st={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},Ft=e=>e+1;function _t(e,l,i,a,m=!1,p=Ft){var C;let $=typeof i=="function"?i():i;if(+l<0&&m&&$==="EOL")return $;let b=R(R({},st),a);if(l>=e.length&&!m)return!1;let u=m?1:i.length,d=0,V=!1,w=!1,k=!1,D=b.maxMismatches,n=l,v=!1,O=!1,o=!1;function s(){return d===1&&D<b.maxMismatches-1}for(;e[n];){let A=p(n);if(b.trimBeforeMatching&&e[n].trim()===""){if(!e[A]&&m&&i==="EOL")return!0;n=p(n);continue}if(b&&!b.i&&((C=b==null?void 0:b.trimCharsBeforeMatching)!=null&&C.includes(e[n]))||b!=null&&b.i&&b.trimCharsBeforeMatching&&b.trimCharsBeforeMatching.map(T=>T.toLowerCase()).includes(e[n].toLowerCase())){if(m&&i==="EOL"&&!e[A])return!0;n=p(n);continue}let r=A>n?i[i.length-u]:i[u-1];if(!b.i&&e[n]===r||b.i&&e[n].toLowerCase()===r.toLowerCase()){if(v||(v=!0),k||(k=!0),u===i.length){if(O=!0,D!==b.maxMismatches)return!1}else u===1&&(o=!0);if(u-=1,d++,s())return!1;if(!u)return d!==i.length||D===b.maxMismatches||!V?n:!1}else if(!V&&!d&&(V=!0),b.maxMismatches&&D&&n){D-=1;for(let T=0;T<=D;T++){let S=A>n?i[i.length-u+1+T]:i[u-2-T],x=e[p(n)];if(S&&(!b.i&&e[n]===S||b.i&&e[n].toLowerCase()===S.toLowerCase())&&(!b.firstMustMatch||u!==i.length)){if(d++,s())return!1;u-=2,v=!0;break}else if(x&&S&&(!b.i&&x===S||b.i&&x.toLowerCase()===S.toLowerCase())&&(!b.firstMustMatch||u!==i.length)){if(!d&&!b.hungry)return!1;u-=1,v=!0;break}else if(S===void 0&&D>=0&&v&&(!b.firstMustMatch||O)&&(!b.lastMustMatch||o))return n}v||(w=n)}else return n===0&&u===1&&!b.lastMustMatch&&k?0:!1;if(w!==!1&&w!==n&&(w=!1),u<1)return n;n=p(n)}if(u>0)return m&&$==="EOL"?!0:b&&b.maxMismatches>=u&&k?w||0:!1}function ye(e,l,i,a,m){var V,w,k;if(G(m)&&rt(m,"trimBeforeMatching")&&m&&typeof m.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(m.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let p=R(R({},st),m);if(typeof p.trimCharsBeforeMatching=="string"&&(p.trimCharsBeforeMatching=et(p.trimCharsBeforeMatching)),p.trimCharsBeforeMatching=p.trimCharsBeforeMatching.map(D=>le(D)?D:String(D)),!le(l)||!l.length)return!1;if(!Number.isInteger(i)||i<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof i}, equal to: ${JSON.stringify(i,null,4)}`);let $,b;if(le(a))$=[a];else if(Array.isArray(a))$=a;else if(!a)$=a;else if(typeof a=="function")$=[],$.push(a);else throw new Error(`string-match-left-right/${e}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof a}, equal to: ${JSON.stringify(a,null,4)}`);if(m&&!G(m))throw new Error(`string-match-left-right/${e}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof m}", and equal to: ${JSON.stringify(m,null,4)}`);let u=0,d="";if((V=p==null?void 0:p.trimCharsBeforeMatching)!=null&&V.some((D,n)=>D.length>1?(u=n,d=D,!0):!1))throw new Error(`string-match-left-right/${e}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${u} is longer than 1 character, ${d.length} (equals to ${d}). Please split it into separate characters and put into array as separate elements.`);if(!$||!Array.isArray($)||Array.isArray($)&&!$.length||Array.isArray($)&&$.length===1&&le($[0])&&!$[0].trim()){if(typeof p.cb=="function"){let n,v=i;if((e==="matchLeftIncl"||e==="matchRight")&&(v+=1),e[5]==="L")for(let C=v;C--;){let A=l[C];if((!p.trimBeforeMatching||p.trimBeforeMatching&&(A!=null&&A.trim()))&&(!((w=p.trimCharsBeforeMatching)!=null&&w.length)||A!==void 0&&!p.trimCharsBeforeMatching.includes(A))){n=C;break}}else if(e.startsWith("matchRight"))for(let C=v;C<l.length;C++){let A=l[C];if((!p.trimBeforeMatching||p.trimBeforeMatching&&A.trim())&&(!((k=p.trimCharsBeforeMatching)!=null&&k.length)||!p.trimCharsBeforeMatching.includes(A))){n=C;break}}if(n===void 0)return!1;let O=l[n],o=n+1,s="";return o&&o>0&&(s=l.slice(0,o)),e[5]==="L"||n&&n>0&&(s=l.slice(n)),p.cb(O,s,n)}let D="";throw m||(D=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${e}(): [THROW_ID_08] the third argument, "whatToMatch", was given as an empty string. This means, you intend to match purely by a callback. The callback was not set though, the opts key "cb" is not set!${D}`)}for(let D=0,n=$.length;D<n;D++){b=typeof $[D]=="function";let v=$[D],O,o,s="",C=i;e==="matchRight"?C+=1:e==="matchLeft"&&(C-=1);let A=_t(l,C,v,p,b,r=>e[5]==="L"?r-1:r+1);if(A&&b&&typeof v=="function"&&v()==="EOL")return v()&&(!p.cb||p.cb(O,s,o))?v():!1;if(Number.isInteger(A)&&(o=e.startsWith("matchLeft")?A-1:A+1,e[5]==="L"?s=l.slice(0,A):s=l.slice(o)),o<0&&(o=void 0),l[o]&&(O=l[o]),Number.isInteger(A)&&(!p.cb||p.cb(O,s,o)))return v}return!1}function ut(e,l,i,a){return ye("matchLeftIncl",e,l,i,a)}function be(e,l,i,a){return ye("matchLeft",e,l,i,a)}function te(e,l,i,a){return ye("matchRightIncl",e,l,i,a)}function Q(e,l,i,a){return ye("matchRight",e,l,i,a)}var vt=Ne(de(),1);var $t=Ne(de(),1);var Sn=(0,$t.default)();var se="\xA0";function Ut({str:e,idx:l=0,stopAtNewlines:i=!1,stopAtRawNbsp:a=!1}){if(typeof e!="string"||!e.length||((!l||typeof l!="number")&&(l=0),!e[l+1]))return null;if(e[l+1]&&(e[l+1].trim()||i&&` \r`.includes(e[l+1])||a&&e[l+1]===se))return l+1;if(e[l+2]&&(e[l+2].trim()||i&&` \r`.includes(e[l+2])||a&&e[l+2]===se))return l+2;for(let m=l+1,p=e.length;m<p;m++)if(e[m].trim()||i&&` \r`.includes(e[m])||a&&e[m]===se)return m;return null}function _(e,l=0){return Ut({str:e,idx:l,stopAtNewlines:!1,stopAtRawNbsp:!1})}function Qt({str:e,idx:l,stopAtNewlines:i,stopAtRawNbsp:a}){if(typeof e!="string"||!e.length||((!l||typeof l!="number")&&(l=0),l<1))return null;if(e[~-l]&&(e[~-l].trim()||i&&` \r`.includes(e[~-l])||a&&e[~-l]===se))return~-l;if(e[l-2]&&(e[l-2].trim()||i&&` \r`.includes(e[l-2])||a&&e[l-2]===se))return l-2;for(let m=l;m--;)if(e[m]&&(e[m].trim()||i&&` \r`.includes(e[m])||a&&e[m]===se))return m;return null}function J(e,l=0){return Qt({str:e,idx:l,stopAtNewlines:!1,stopAtRawNbsp:!1})}var H=new Set(["abbr","accept","accept-charset","accesskey","action","align","alink","allow","alt","archive","async","autocapitalize","autocomplete","autofocus","autoplay","axis","background","background-attachment","background-color","background-image","background-position","background-position-x","background-position-y","background-repeat","bgcolor","border","border-bottom","border-bottom-color","border-bottom-style","border-bottom-width","border-collapse","border-color","border-left","border-left-color","border-left-style","border-left-width","border-right","border-right-color","border-right-style","border-right-width","border-style","border-top","border-top-color","border-top-style","border-top-width","border-width","buffered","capture","cellpadding","cellspacing","challenge","char","charoff","charset","checked","cite","class","classid","clear","clip","code","codebase","codetype","color","cols","colspan","column-span","compact","content","contenteditable","contextmenu","controls","coords","crossorigin","csp","cursor","data","data-*","datetime","declare","decoding","default","defer","dir","direction","dirname","disabled","display","download","draggable","dropzone","enctype","enterkeyhint","face","filter","float","font","font-color","font-emphasize","font-emphasize-position","font-emphasize-style","font-family","font-size","font-style","font-variant","font-weight","for","form","formaction","formenctype","formmethod","formnovalidate","formtarget","frame","frameborder","frontuid","headers","height","hidden","high","horiz-align","href","hreflang","hspace","http-equiv","icon","id","importance","inputmode","integrity","intrinsicsize","ismap","itemprop","keytype","kind","label","lang","language","layout-flow","layout-grid","layout-grid-char","layout-grid-line","layout-grid-mode","layout-grid-type","left","letter-spacing","line-break","line-height","link","list","list-image-1","list-image-2","list-image-3","list-style","list-style-image","list-style-position","list-style-type","loading","longdesc","loop","low","manifest","margin","margin-bottom","margin-left","margin-right","margin-top","marginheight","marginwidth","max","maxlength","media","method","min","minlength","mso-ansi-font-size","mso-ansi-font-style","mso-ansi-font-weight","mso-ansi-language","mso-ascii-font-family","mso-background","mso-background-source","mso-baseline-position","mso-bidi-flag","mso-bidi-font-family","mso-bidi-font-size","mso-bidi-font-style","mso-bidi-font-weight","mso-bidi-language","mso-bookmark","mso-border-alt","mso-border-between","mso-border-between-color","mso-border-between-style","mso-border-between-width","mso-border-bottom-alt","mso-border-bottom-color-alt","mso-border-bottom-source","mso-border-bottom-style-alt","mso-border-bottom-width-alt","mso-border-color-alt","mso-border-effect","mso-border-left-alt","mso-border-left-color-alt","mso-border-left-source","mso-border-left-style-alt","mso-border-left-width-alt","mso-border-right-alt","mso-border-right-color-alt","mso-border-right-source","mso-border-right-style-alt","mso-border-right-width-alt","mso-border-shadow","mso-border-source","mso-border-style-alt","mso-border-top-alt","mso-border-top-color-alt","mso-border-top-source","mso-border-top-style-alt","mso-border-top-width-alt","mso-border-width-alt","mso-break-type","mso-build","mso-build-after-action","mso-build-after-color","mso-build-auto-secs","mso-build-avi","mso-build-dual-id","mso-build-order","mso-build-sound-name","mso-bullet-image","mso-cell-special","mso-cellspacing","mso-char-indent","mso-char-indent-count","mso-char-indent-size","mso-char-type","mso-char-wrap","mso-color-alt","mso-color-index","mso-color-source","mso-column-break-before","mso-column-separator","mso-columns","mso-comment-author","mso-comment-continuation","mso-comment-id","mso-comment-reference","mso-data-placement","mso-default-height","mso-default-width","mso-diagonal-down","mso-diagonal-down-color","mso-diagonal-down-source","mso-diagonal-down-style","mso-diagonal-down-width","mso-diagonal-up","mso-diagonal-up-color","mso-diagonal-up-source","mso-diagonal-up-style","mso-diagonal-up-width","mso-displayed-decimal-separator","mso-displayed-thousand-separator","mso-element","mso-element-anchor-horizontal","mso-element-anchor-lock","mso-element-anchor-vertical","mso-element-frame-height","mso-element-frame-hspace","mso-element-frame-vspace","mso-element-frame-width","mso-element-left","mso-element-linespan","mso-element-top","mso-element-wrap","mso-endnote-continuation-notice","mso-endnote-continuation-notice-id","mso-endnote-continuation-notice-src","mso-endnote-continuation-separator","mso-endnote-continuation-separator-id","mso-endnote-continuation-separator-src","mso-endnote-display","mso-endnote-id","mso-endnote-numbering","mso-endnote-numbering-restart","mso-endnote-numbering-start","mso-endnote-numbering-style","mso-endnote-position","mso-endnote-separator","mso-endnote-separator-id","mso-endnote-separator-src","mso-even-footer","mso-even-footer-id","mso-even-footer-src","mso-even-header","mso-even-header-id","mso-even-header-src","mso-facing-pages","mso-fareast-font-family","mso-fareast-hint","mso-fareast-language","mso-field-change","mso-field-change-author","mso-field-change-time","mso-field-change-value","mso-field-code","mso-field-lock","mso-fills-color","mso-first-footer","mso-first-footer-id","mso-first-footer-src","mso-first-header","mso-first-header-id","mso-first-header-src","mso-font-alt","mso-font-charset","mso-font-format","mso-font-info","mso-font-info-charset","mso-font-info-type","mso-font-kerning","mso-font-pitch","mso-font-signature","mso-font-signature-csb-one","mso-font-signature-csb-two","mso-font-signature-usb-four","mso-font-signature-usb-one","mso-font-signature-usb-three","mso-font-signature-usb-two","mso-font-src","mso-font-width","mso-footer","mso-footer-data","mso-footer-id","mso-footer-margin","mso-footer-src","mso-footnote-continuation-notice","mso-footnote-continuation-notice-id","mso-footnote-continuation-notice-src","mso-footnote-continuation-separator","mso-footnote-continuation-separator-id","mso-footnote-continuation-separator-src","mso-footnote-id","mso-footnote-numbering","mso-footnote-numbering-restart","mso-footnote-numbering-start","mso-footnote-numbering-style","mso-footnote-position","mso-footnote-separator","mso-footnote-separator-id","mso-footnote-separator-src","mso-foreground","mso-forms-protection","mso-generic-font-family","mso-grid-bottom","mso-grid-bottom-count","mso-grid-left","mso-grid-left-count","mso-grid-right","mso-grid-right-count","mso-grid-top","mso-grid-top-count","mso-gutter-direction","mso-gutter-margin","mso-gutter-position","mso-hansi-font-family","mso-header","mso-header-data","mso-header-id","mso-header-margin","mso-header-src","mso-height-alt","mso-height-rule","mso-height-source","mso-hide","mso-highlight","mso-horizontal-page-align","mso-hyphenate","mso-ignore","mso-kinsoku-overflow","mso-layout-grid-align","mso-layout-grid-char-alt","mso-layout-grid-origin","mso-level-inherit","mso-level-legacy","mso-level-legacy-indent","mso-level-legacy-space","mso-level-legal-format","mso-level-number-format","mso-level-number-position","mso-level-numbering","mso-level-reset-level","mso-level-start-at","mso-level-style-link","mso-level-suffix","mso-level-tab-stop","mso-level-text","mso-line-break-override","mso-line-grid","mso-line-height-alt","mso-line-height-rule","mso-line-numbers-count-by","mso-line-numbers-distance","mso-line-numbers-restart","mso-line-numbers-start","mso-line-spacing","mso-linked-frame","mso-list","mso-list-change","mso-list-change-author","mso-list-change-time","mso-list-change-values","mso-list-id","mso-list-ins","mso-list-ins-author","mso-list-ins-time","mso-list-name","mso-list-template-ids","mso-list-type","mso-margin-bottom-alt","mso-margin-left-alt","mso-margin-top-alt","mso-mirror-margins","mso-negative-indent-tab","mso-number-format","mso-outline-level","mso-outline-parent","mso-outline-parent-col","mso-outline-parent-row","mso-outline-parent-visibility","mso-outline-style","mso-padding-alt","mso-padding-between","mso-padding-bottom-alt","mso-padding-left-alt","mso-padding-right-alt","mso-padding-top-alt","mso-page-border-aligned","mso-page-border-art","mso-page-border-bottom-art","mso-page-border-display","mso-page-border-left-art","mso-page-border-offset-from","mso-page-border-right-art","mso-page-border-surround-footer","mso-page-border-surround-header","mso-page-border-top-art","mso-page-border-z-order","mso-page-numbers","mso-page-numbers-chapter-separator","mso-page-numbers-chapter-style","mso-page-numbers-start","mso-page-numbers-style","mso-page-orientation","mso-page-scale","mso-pagination","mso-panose-arm-style","mso-panose-contrast","mso-panose-family-type","mso-panose-letterform","mso-panose-midline","mso-panose-proportion","mso-panose-serif-style","mso-panose-stroke-variation","mso-panose-weight","mso-panose-x-height","mso-paper-source","mso-paper-source-first-page","mso-paper-source-other-pages","mso-pattern","mso-pattern-color","mso-pattern-style","mso-print-area","mso-print-color","mso-print-gridlines","mso-print-headings","mso-print-resolution","mso-print-sheet-order","mso-print-title-column","mso-print-title-row","mso-prop-change","mso-prop-change-author","mso-prop-change-time","mso-protection","mso-rotate","mso-row-margin-left","mso-row-margin-right","mso-ruby-merge","mso-ruby-visibility","mso-scheme-fill-color","mso-scheme-shadow-color","mso-shading","mso-shadow-color","mso-space-above","mso-space-below","mso-spacerun","mso-special-character","mso-special-format","mso-style-id","mso-style-name","mso-style-next","mso-style-parent","mso-style-type","mso-style-update","mso-subdocument","mso-symbol-font-family","mso-tab-count","mso-table-anchor-horizontal","mso-table-anchor-vertical","mso-table-bspace","mso-table-del-author","mso-table-del-time","mso-table-deleted","mso-table-dir","mso-table-ins-author","mso-table-ins-time","mso-table-inserted","mso-table-layout-alt","mso-table-left","mso-table-lspace","mso-table-overlap","mso-table-prop-author","mso-table-prop-change","mso-table-prop-time","mso-table-rspace","mso-table-top","mso-table-tspace","mso-table-wrap","mso-text-animation","mso-text-combine-brackets","mso-text-combine-id","mso-text-control","mso-text-fit-id","mso-text-indent-alt","mso-text-orientation","mso-text-raise","mso-title-page","mso-tny-compress","mso-unsynced","mso-vertical-align-alt","mso-vertical-align-special","mso-vertical-page-align","mso-width-alt","mso-width-source","mso-word-wrap","mso-xlrowspan","mso-zero-height","multiple","muted","name","nav-banner-image","navbutton_background_color","navbutton_home_hovered","navbutton_home_normal","navbutton_home_pushed","navbutton_horiz_hovered","navbutton_horiz_normal","navbutton_horiz_pushed","navbutton_next_hovered","navbutton_next_normal","navbutton_next_pushed","navbutton_prev_hovered","navbutton_prev_normal","navbutton_prev_pushed","navbutton_up_hovered","navbutton_up_normal","navbutton_up_pushed","navbutton_vert_hovered","navbutton_vert_normal","navbutton_vert_pushed","nohref","noresize","noshade","novalidate","nowrap","object","onblur","onchange","onclick","ondblclick","onfocus","onkeydown","onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onreset","onselect","onsubmit","onunload","open","optimum","overflow","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","panose-1","pattern","ping","placeholder","position","poster","preload","profile","prompt","punctuation-trim","punctuation-wrap","radiogroup","readonly","referrerpolicy","rel","required","rev","reversed","right","row-span","rows","rowspan","ruby-align","ruby-overhang","ruby-position","rules","sandbox","scheme","scope","scoped","scrolling","selected","separator-image","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","standby","start","step","style","summary","tab-interval","tab-stops","tabindex","table-border-color-dark","table-border-color-light","table-layout","target","text","text-align","text-autospace","text-combine","text-decoration","text-effect","text-fit","text-indent","text-justify","text-justify-trim","text-kashida","text-line-through","text-shadow","text-transform","text-underline","text-underline-color","text-underline-style","title","top","top-bar-button","translate","type","unicode-bidi","urlId","usemap","valign","value","valuetype","version","vert-align","vertical-align","visibility","vlink","vnd.ms-excel.numberformat","vspace","white-space","width","word-break","word-spacing","wrap","xmlns","z-index"]);function F(e){return typeof e=="string"&&(e.charCodeAt(0)>96&&e.charCodeAt(0)<123||e.charCodeAt(0)>64&&e.charCodeAt(0)<91||e.charCodeAt(0)>47&&e.charCodeAt(0)<58||e===":"||e==="-")}function mt(e){return e==="'"?'"':"'"}function bt(e,l,i,a=[]){for(let m=l,p=e.length;m<p;m++){if(a.some($=>e.startsWith($,m)))return!0;if(e[m]===i)return!1}return!0}function qt(e,l,i,a){for(let m=l,p=e.length;m<p;m++){if(e.startsWith(i,m))return!0;if(e.startsWith(a,m))return!1}return!1}function gt(e,l){return!F(e[l])||!l?!1:/^[a-zA-Z0-9:-]*(\s*[=]?\s*((?:'[^']*')|(?:"[^"]*")))|( [^/>'"=]*['"])/.test(e.slice(l))}function ve(e,l){return!l||!F(e[l])?!1:/^[a-zA-Z0-9:-]*=(((?:'[^']*')|(?:"[^"]*"))|((?:['"][^'"]*['"]\s*\/?>)))/.test(e.slice(l))}function ct(e,l){if(F(e[J(e,l)])){for(let i=l;i--;)if(e[i].trim().length&&!F(e[i]))return e.slice(i+1,l)}}function ge(e,l,i){var o;if(typeof e!="string"||!e.trim()||!Number.isInteger(l)||!Number.isInteger(i)||!e[l]||!e[i]||l>=i)return!1;let a=`'"`.includes(e[l])?e[l]:null,m=null;a&&(m=mt(a));let p,$=new Map().set("'",0).set('"',0).set("matchedPairs",0),b=null,u=0,d=!1,V,w,k,D,n=!1,v=!1,O=!1;for(let s=l,C=e.length;s<C;s++){let A=_(e,s),r=J(e,s);if(`'"`.includes(e[s])&&d&&V===l&&w!==void 0&&w<s&&s>=i){let T=s!==i||ve(e,_(e,i))||"/>".includes(e[A]),S=!(s>i&&e[l]===e[i]&&e[l]===e[s]&&gt(e,s+1)),x=s===i&&gt(e,i+1),N=p&&p<s&&H.has(e.slice(p,s).trim()),h;p&&(h=e.slice(p,s).trim());let B=p&&p<s&&e[p-1]&&!e[p-1].trim()&&Array.from(e.slice(p,s).trim()).every(j=>F(j))&&e[l]===e[i]&&!"/>".includes(e[A])&&bt(e,s+1,"=",["'",'"']),g;s===i&&(g=ct(e,s));let W=s===i&&(!F(e[r])||g&&!H.has(g))&&e[r]!=="=",oe="/>".includes(e[A])&&s===i,Z=F(e[A]),ue=d&&s!==i,U=!(s>=i&&e[J(e,i)]===":");return!!(T&&S&&(x||N||B||W)&&(oe||Z||ue)&&U)}if(`'"`.includes(e[s])){if(e[s]==="'"&&e[s-1]==='"'&&e[s+1]==='"'||e[s]==='"'&&e[s-1]==="'"&&e[s+1]==="'")continue;b&&e[s]===e[b]?($.set("matchedPairs",+$.get("matchedPairs")+1),V=b,w=s,b=null,d=!0):d=!1,$.set(e[s],+$.get(e[s])+1),u=+$.get('"')+ +$.get("'")}if(e[s]===">"&&!v&&(v=!0,u&&$.get("matchedPairs")&&u===$.get("matchedPairs")*2&&s<i))return!1;if(e[s]==="<"&&e[A]!=="%"&&v&&!O)return O=!0,!1;if(e[s].trim()&&!p)F(e[s])&&(p=s);else if(p&&!F(e[s])){if(D=k,k=e.slice(p,s),n=p>=i,`'"`.includes(e[s])&&$.get("matchedPairs")===0&&u===3&&e[l]===e[s]&&H.has(k)&&!`'"`.includes(e[A])){let T=s>i,S=!b,x=b+1>=s,N=e.slice(b+1,s).trim().split(/\s+/).every(U=>H.has(U)),h=!k||!(D!=null&&D.endsWith(":")),B=s===i,g=u<3,W=!!d,oe=!b,Z=b+1>=s,ue=!e.slice(b+1,s).trim().split(/\s+/).every(U=>H.has(U));return T&&(S||x||N)&&h||B&&(g||W||oe||Z||ue)}if(k&&H.has(k)&&V===l&&w===i)return!0}if(`'"`.includes(e[s])&&(!($.get('"')%2)||!($.get("'")%2))&&(+$.get('"')+ +$.get("'"))%2&&(k&&H.has(k)||s>i+1&&H.has(e.slice(i+1,s).trim()))&&!(e[s+1]===e[s]&&e[s]===e[l])&&!(s>i+1&&e[J(e,i)]===":")&&!(k&&(D!=null&&D.trim().endsWith(":")))){let T=s>i,S=!!a,x=e[l]!==e[i],N=H.has(e.slice(l+1,i).trim()),h=!qt(e,s+1,e[i],mt(e[i]));return T&&!(S&&x&&N&&h)}if((e[s]==="="||!e[s].length&&e[A]==="=")&&k&&H.has(k)){let T=s>i,S=!(!(d&&V===l&&w===i||ve(e,p))&&d&&V!==void 0&&V<=i);return T&&S}if(s>i){if(a&&e[s]===a){let T=!!b,S=b===i,x=b+1<s&&e.slice(b+1,s).trim(),N=e.slice(b+1,s).trim().split(/\s+/).every(g=>H.has(g)),h=s>=i,B=!e[A]||!`'"`.includes(e[A]);return!!(T&&S&&x&&N&&h&&B)}if(a&&e[i]===m&&e[s]===m)return!1;if(e[s]==="/"||e[s]===">"||e[s]==="<"){let T=e[l]===e[i]&&b===i&&!e.slice(l+1,i).includes(e[l]),S=$.get("matchedPairs")<2,x=ct(e,s),N=(!x||!H.has(x))&&(!(s>i&&$.get("'")&&$.get('"')&&$.get("matchedPairs")>1)||"/>".includes(e[A])),h=u<3||+$.get('"')+ +$.get("'")-$.get("matchedPairs")*2!==2,B=!d||d&&!(V!==void 0&&Array.from(e.slice(l+1,V).trim()).every(Z=>F(Z))&&H.has(e.slice(l+1,V).trim())),g=!A&&u%2===0,W=e[l-2]&&e[l-1]==="="&&F(e[l-2]),oe=!bt(e,s+1,"<",["='",'="']);return T||(S||N)&&h&&(B||g||W||oe)}if(e[s]==="="&&Q(e,s,["'",'"'],{trimBeforeMatching:!0,trimCharsBeforeMatching:["="]}))return!0}else{let T;if((o=e[s-1])!=null&&o.trim()&&e[s-1]!=="=")T=s-1;else for(let S=s;S--;)if(e[S].trim()&&e[S]!=="="){T=S;break}if(e[s]==="="&&Q(e,s,["'",'"'],{cb:S=>!"/>".includes(S),trimBeforeMatching:!0,trimCharsBeforeMatching:["="]})&&F(e[T])&&!e.slice(l+1).startsWith("http")&&!e.slice(l+1,s).includes("/")&&!e.endsWith("src=",l)&&!e.endsWith("href=",l))return!1;if(s===i&&ve(e,s+1))return!0;if(s<i&&`'"`.includes(e[s])&&k&&e[J(e,l)]&&e[J(e,l)]!=="="&&V===l&&H.has(k))return!1;if(s===i&&`'"`.includes(e[s])&&(e[r]==="'"||e[r]==='"')&&k&&D&&u%2===0&&D.endsWith(":")||s===i&&`'"`.includes(e[s])&&e.slice(l,i).includes(":")&&(e[A]===">"||e[A]==="/"&&e[_(e,A)]===">"))return!0}if(`'"`.includes(e[s])&&s>i)return!(!n||!k||!H.has(k));`'"`.includes(e[s])&&(b=s),p&&!F(e[s])&&(p=null)}return!1}var jt=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]),K="{}%-$_()*|#",Ee="{}|#",Oe="%()$_*#",pt="({",dt="})",ft=[")|(","|(",")(","()","}{","{}","%)","*)","||","--"],ht=".,;!?";function yt(e){return/[.\-_a-z0-9\u00B7\u00C0-\uFFFD]/i.test(e)}function re(e){let l="";for(let i=0,a=e.length;i<a;i++)e[i]==="["?l=`]${l}`:e[i]==="]"?l=`[${l}`:e[i]==="{"?l=`}${l}`:e[i]==="}"?l=`{${l}`:e[i]==="("?l=`)${l}`:e[i]===")"?l=`(${l}`:e[i]==="<"?l=`>${l}`:e[i]===">"?l=`<${l}`:e[i]===fe?l=`${he}${l}`:e[i]===he?l=`${fe}${l}`:l=`${e[i]}${l}`;return l}function Ve(e){return jt.has(e.toLowerCase())||["doctype","cdata","xml"].includes(e.toLowerCase())}function Se(e,l,i,a){for(let m=l,p=e.length;m<p;m++){if(e.startsWith(i,m))return!0;if(e.startsWith(a,m))return!1}return!1}var we=["{","}",","],ne=`'"${fe}${he}`,ce=/[\w-]/;function zt(e){if(e!=null&&e.length){for(let l=e.length;l--;)if(e[l].type==="esp")return l}}var De=zt;function Kt(e,l,i){let a=e[l],m=e.length,p=i[De(i)];for(let $=l+1;$<m&&!(pt.includes(e[$])&&dt.includes(e[$-1])||a.length>1&&(a.includes("<")||a.includes("{")||a.includes("[")||a.includes("("))&&e[$]==="(");$++)if(K.includes(e[$])||p&&p.guessedClosingLump.includes(e[$])||e[l]==="<"&&e[$]==="/"||e[$]===">"&&a==="--"&&Array.isArray(i)&&i.length&&i[i.length-1].type==="esp"&&i[i.length-1].openingLump[0]==="<"&&i[i.length-1].openingLump[2]==="-"&&i[i.length-1].openingLump[3]==="-"||!p&&$>l&&"!=@".includes(e[$]))a+=e[$];else break;if(a&&Array.isArray(i)&&i.length&&i[i.length-1].type==="esp"&&i[i.length-1].guessedClosingLump&&a.length>i[i.length-1].guessedClosingLump.length){if(a.endsWith(i[i.length-1].openingLump))return a.slice(0,a.length-i[i.length-1].openingLump.length);let $=new Set(i[i.length-1].guessedClosingLump),b=0;for(let u=0,d=a.length;u<d;u++){if(!$.has(a[u])&&b>1)return a.slice(0,u);$.has(a[u])&&(b+=1,$=new Set([...$].filter(V=>V!==a[u])))}}return a}var Et=Kt;function Yt(e,l,i,a){return!!(e[l]==="<"&&(Q(e,l,["!--"],{maxMismatches:1,firstMustMatch:!0,trimBeforeMatching:!0})||te(e,l,["<![endif]"],{i:!0,maxMismatches:2,trimBeforeMatching:!0}))&&!Q(e,l,["![cdata","<"],{i:!0,maxMismatches:1,trimBeforeMatching:!0})&&(i.type!=="comment"||i.kind!=="not")||e[l]==="-"&&te(e,l,["-->"],{trimBeforeMatching:!0})&&(i.type!=="comment"||!i.closing&&i.kind!=="not")&&!be(e,l,"<",{trimBeforeMatching:!0,trimCharsBeforeMatching:["-","!"]})&&(!Array.isArray(a)||!a.length||a[a.length-1].type!=="esp"||!(a[a.length-1].openingLump[0]==="<"&&a[a.length-1].openingLump[2]==="-"&&a[a.length-1].openingLump[3]==="-")))}var Vt=Yt;function Gt(e,l,i,a,m){return m&&(e[l]==="/"&&e[l+1]==="*"||e[l]==="*"&&e[l+1]==="/")}var St=Gt;function Zt(e,l,i=!1){if(!l.length)return;let a=i?l[0]:l[l.length-1];if(a.type==="esp"&&(e.includes(a.guessedClosingLump)||Array.from(e).every(m=>a.guessedClosingLump.includes(m))||a.guessedClosingLump&&a.guessedClosingLump.length>2&&a.guessedClosingLump[a.guessedClosingLump.length-1]===e[e.length-1]&&a.guessedClosingLump[a.guessedClosingLump.length-2]===e[e.length-2]))return e.length}var ke=Zt;var Xt={allowCustomTagNames:!1,skipOpeningBracket:!1},Dt="\\",kt=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function en(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}function Te(e,l){return e[l]==="<"||e[J(e,l)]==="<"}function Ae(e,l=0,i){var r,T,S;if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(l)||l<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof l}", value being ${JSON.stringify(l,null,4)}`);let a=R(R({},Xt),i),m="[\\\\ \\t\\r\\n/]*",p="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",$=new RegExp(`^<${a.skipOpeningBracket?"?":""}${m}\\w+${m}\\/?${m}>`,"g"),b=new RegExp(`^<${a.skipOpeningBracket?"?":""}${m}[${p}]+[-${p}]*${m}>`,"g"),u=new RegExp(`^<${a.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),d=new RegExp(`^<${a.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${p}]+[-${p}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),V=new RegExp(`^<${a.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),w=new RegExp(`^<${a.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${p}]+[-${p}]*\\s*\\/?\\s*>`,"g"),k=new RegExp(`^<${a.skipOpeningBracket?"?":""}${m}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),D=new RegExp(`^<${a.skipOpeningBracket?"?":""}${m}[${p}]+[-${p}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),n=new RegExp(`^<${a.skipOpeningBracket?"?\\/?":""}(${m}[${p}]+)+${m}[\\\\/=>]`,""),v=new RegExp("^\\/\\s*\\w+s*>"),O=l?e.slice(l):e,o=J(e,l),s=!1,C=!1,A={cb:en,i:!0,trimCharsBeforeMatching:["/",Dt,"!"," "," ",` `,"\r"]};return a.allowCustomTagNames?((a.skipOpeningBracket&&(e[l-1]==="<"||e[l-1]==="/"&&e[J(e,o)]==="<")||O[0]==="<"&&((r=O[1])!=null&&r.trim()))&&(n.test(O)||/^<\w+$/.test(O))||b.test(O)&&Te(e,l)||d.test(O)||w.test(O)&&Te(e,l)||D.test(O)||e[l]==="/"&&e[o]!=="<"&&v.test(O))&&(C=!0):(((a.skipOpeningBracket&&(e[l-1]==="<"||e[l-1]==="/"&&e[J(e,o)]==="<")||(O[0]==="<"||O[0]==="/"&&(!e[o]||e[o]!=="<"))&&((T=O[1])!=null&&T.trim()))&&n.test(O)||$.test(O)&&Te(e,l)||u.test(O)||V.test(O)&&Te(e,l)||k.test(O))&&(s=!0),s&&te(e,l,kt,{cb:x=>{var N;return x===void 0?((e[l]==="<"&&((N=e[l+1])!=null&&N.trim())||e[l-1]==="<")&&(C=!0),!0):x.toUpperCase()===x.toLowerCase()&&!/\d/.test(x)&&x!=="="},i:!0,trimCharsBeforeMatching:["<","/",Dt,"!"," "," ",` `,"\r"]})&&(C=!0)),!C&&e[l]==="<"&&((S=e[l+1])!=null&&S.trim())&&Q(e,l,kt,A)&&(C=!0),typeof e=="string"&&l<e.length&&C}function tn(e,l,i,a,m,p,$){var b,u;return!!((b=e[l])!=null&&b.trim().length&&(!a.length||i.type==="text")&&(!i.kind||!["doctype","xml"].includes(i.kind))&&(!m||e[l]==="<")&&(e[l]==="<"&&(Ae(e,l,{allowCustomTagNames:!0})||e[$]===">"||Q(e,l,["doctype","xml","cdata"],{i:!0,trimBeforeMatching:!0,trimCharsBeforeMatching:["?","!","["," ","-"]}))||e[l]==="/"&&z(e[l+1])&&e[p]!=="<"&&Ae(e,l,{allowCustomTagNames:!0,skipOpeningBracket:!0})||z(e[l])&&(!e[l-1]||!z(e[l-1])&&!["<","/","!",ot].includes(e[p]))&&Ae(e,l,{allowCustomTagNames:!1,skipOpeningBracket:!0}))&&(i.type!=="esp"||(u=i==null?void 0:i.tail)!=null&&u.includes(e[l])))}var Tt=tn;function nn(e,l,i,a,m){return!!(K.includes(e[l])&&e[l+1]&&K.includes(e[l+1])&&!(Oe.includes(e[l])&&Oe.includes(e[l+1]))&&(e[l]!==e[l+1]||Ee.includes(e[l]))&&i.type!=="rule"&&i.type!=="at"&&!(e[l]==="-"&&"-{(".includes(e[l+1]))&&!("})".includes(e[l])&&"-".includes(e[l+1]))&&!(e[l]==="%"&&e[l+1]==="%"&&"0123456789".includes(e[l-1])&&(!e[l+2]||ht.includes(e[l+2])||!e[l+2].trim().length))&&!(m&&("{}".includes(e[l])||"{}".includes(e[_(e,l)])))||e[l]==="<"&&(e[l+1]==="/"&&K.includes(e[l+2])||K.includes(e[l+1])&&!["-"].includes(e[l+1]))||e[l]==="<"&&(e[l+1]==="%"||e.startsWith("jsp:",l+1)||e.startsWith("cms:",l+1)||e.startsWith("c:",l+1))||e.startsWith("${jspProp",l)||">})".includes(e[l])&&Array.isArray(a)&&a.length&&a[a.length-1].type==="esp"&&a[a.length-1].openingLump.includes(re(e[l]))&&(e[l]!==">"||!Se(e,l+1,">","<"))||e[l]==="-"&&e[l+1]==="-"&&e[l+2]===">"&&Array.isArray(a)&&a.length&&a[a.length-1].type==="esp"&&a[a.length-1].openingLump[0]==="<"&&a[a.length-1].openingLump[2]==="-"&&a[a.length-1].openingLump[3]==="-")}var At=nn;var Nt="7.0.25";var I=(0,vt.default)(),ln=Nt,rn=/^\s*!?\s*[a-zA-Z0-9]+(?:[\s;}<>'"]|$)/gm,Ot={tagCb:null,tagCbLookahead:0,charCb:null,charCbLookahead:0,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100};function an(e,l){var Ce,xe,Le,Je,Re,Pe,Ie,Me,Be,We,He,Fe,_e,Ue,Qe,qe,je,ze,Ke;let i=Date.now();if(typeof e!="string")throw e===void 0?new Error("codsen-tokenizer: [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`codsen-tokenizer: [THROW_ID_02] the first input argument must be string! It was given as "${typeof e}", equal to: ${JSON.stringify(e,null,4)}`);if(l&&!G(l))throw new Error(`codsen-tokenizer: [THROW_ID_03] the second input argument, an options object, should be a plain object but it was given as type ${typeof l}, equal to ${JSON.stringify(l,null,4)}`);if(l&&G(l)&&l.tagCb&&typeof l.tagCb!="function")throw new Error(`codsen-tokenizer: [THROW_ID_04] the opts.tagCb, callback function, should be a function but it was given as type ${typeof l.tagCb}, equal to ${JSON.stringify(l.tagCb,null,4)}`);if(l&&G(l)&&l.charCb&&typeof l.charCb!="function")throw new Error(`codsen-tokenizer: [THROW_ID_05] the opts.charCb, callback function, should be a function but it was given as type ${typeof l.charCb}, equal to ${JSON.stringify(l.charCb,null,4)}`);if(l&&G(l)&&l.reportProgressFunc&&typeof l.reportProgressFunc!="function")throw new Error(`codsen-tokenizer: [THROW_ID_06] the opts.reportProgressFunc, callback function, should be a function but it was given as type ${typeof l.reportProgressFunc}, equal to ${JSON.stringify(l.reportProgressFunc,null,4)}`);let a=R(R({},Ot),l),m=0,p=0,$=e.length,b=Math.floor($/2),u=0,d=!1,V=!1,w=!1,k=[],D=[],n={};function v(){n={type:null,start:null,end:null,value:null},s()}let O={attribName:"",attribNameRecognised:!1,attribNameStartsAt:null,attribNameEndsAt:null,attribOpeningQuoteAt:null,attribClosingQuoteAt:null,attribValueRaw:null,attribValue:[],attribValueStartsAt:null,attribValueEndsAt:null,attribStarts:null,attribEnds:null,attribLeft:null},o=R({},O);function s(){o=I(O)}function C(t){o.attribValue.length&&o.attribValue[~-o.attribValue.length].start&&!o.attribValue[~-o.attribValue.length].end&&(o.attribValue[~-o.attribValue.length].end=t.start,o.attribValue[~-o.attribValue.length].value=e.slice(o.attribValue[~-o.attribValue.length].start,t.start)),o.attribValue.push(t)}let A={start:null,end:null,property:null,propertyStarts:null,propertyEnds:null,value:null,valueStarts:null,valueEnds:null,important:null,importantStarts:null,importantEnds:null,colon:null,semi:null},r=R({},A);function T(){r=R({},A)}function S(t){(o==null?void 0:o.attribName)==="style"?o.attribValue.push(R({},t)):n&&Array.isArray(n.properties)&&n.properties.push(R({},t))}v();let x,N,h,B=null,g=[];function W(t){return!!(Array.isArray(g)&&g.length&&g[~-g.length].type===t)}function oe(t){let E=(_(e,t)||t)+1;C({type:"comment",start:t,end:E,value:e.slice(t,E),closing:!0,kind:"block",language:"css"}),u=E,W("block")&&g.pop()}function Z(t,E,f){let M=t.shift(),ee=[];for(let X=0;X<f&&t[X];X++)ee.push(I(t[X]));typeof E=="function"&&E(M,ee)}function ue(t){a.charCb&&(D.push(t),D.length>a.charCbLookahead&&Z(D,a.charCb,a.charCbLookahead))}function U(t){a.tagCb&&(k.push(t),k.length>a.tagCbLookahead&&Z(k,a.tagCb,a.tagCbLookahead))}function j(t,E){if(!["text","esp"].includes(t.type)&&t.start!==null&&t.start<E&&(e[~-E]&&!e[~-E].trim()||e[E]==="<"))if(J(e,E)!==null?t.end=J(e,E)+1:t.end=E,t.value=e.slice(t.start,t.end),t.type==="tag"&&!"/>".includes(e[~-t.end])){let f=t.tagNameEndsAt||E;if(Array.isArray(t.attribs)&&t.attribs.length)for(let M=0,ee=t.attribs.length;M<ee;M++)if(t.attribs[M].attribNameRecognised&&t.attribs[M].attribEnds)f=t.attribs[M].attribEnds,e[f+1]&&!e[f].trim()&&e[f+1].trim()&&(f+=1);else{M===0?t.attribs=[]:t.attribs=t.attribs.splice(0,M);break}t.end=f,t.value=e.slice(t.start,t.end),t.tagNameEndsAt||(t.tagNameEndsAt=f),t.tagNameStartsAt&&t.tagNameEndsAt&&!t.tagName&&(t.tagName=e.slice(t.tagNameStartsAt,f),t.recognised=Ve(t.tagName)),U(t),Y("text",f),s()}else U(t),v(),e[~-E]&&!e[~-E].trim()&&(Y("text",J(e,E)+1),s());n.start!==null&&(n.end===null&&n.start!==E&&(n.end=E,n.value=e.slice(n.start,n.end)),n.start!==null&&n.end&&(W("at")?g[~-g.length].token.rules.push(n):U(n)),v())}function wt(){return W("at")&&G(g[~-g.length].token)&&!!g[~-g.length].token.openingCurlyAt&&!g[~-g.length].token.closingCurlyAt}function pe(t,E=null){return t==="tag"?{type:t,start:E,end:null,value:null,tagNameStartsAt:null,tagNameEndsAt:null,tagName:null,recognised:null,closing:!1,void:!1,pureHTML:!0,kind:null,attribs:[]}:t==="comment"?{type:t,start:E,end:null,value:null,closing:!1,kind:"simple",language:"html"}:t==="rule"?{type:t,start:E,end:null,value:null,left:null,nested:!1,openingCurlyAt:null,closingCurlyAt:null,selectorsStart:null,selectorsEnd:null,selectors:[],properties:[]}:t==="at"?{type:t,start:E,end:null,value:null,left:null,nested:!1,openingCurlyAt:null,closingCurlyAt:null,identifier:null,identifierStartsAt:null,identifierEndsAt:null,query:null,queryStartsAt:null,queryEndsAt:null,rules:[]}:t==="esp"?{type:t,start:E,end:null,value:null,head:null,headStartsAt:null,headEndsAt:null,tail:null,tailStartsAt:null,tailEndsAt:null}:{type:"text",start:E,end:null,value:null}}function Y(t,E){n=pe(t,E)}function ie(t){T(),typeof t=="number"?(r.propertyStarts=t,r.start=t):r=R(R({},A),t)}function $e(t){return!`'"`.includes(e[t])||!(o.attribOpeningQuoteAt||o.attribValueStartsAt)||ge(e,o.attribOpeningQuoteAt||o.attribValueStartsAt,t)}function Ct(t,E){return";}/".includes(e[t])&&(!(o!=null&&o.attribName)||o.attribName!=="style")||`/;'"><`.includes(e[t])&&o&&o.attribName==="style"&&(E||$e(t))}for(let t=0;t<=$;t++){!u&&e[t]&&a.reportProgressFunc&&($>1e3&&$<2e3?t===b&&a.reportProgressFunc(Math.floor((a.reportProgressFuncTo-a.reportProgressFuncFrom)/2)):$>=2e3&&(m=a.reportProgressFuncFrom+Math.floor(t/$*(a.reportProgressFuncTo-a.reportProgressFuncFrom)),m!==p&&(p=m,a.reportProgressFunc(m))));let E=J(e,t),f=_(e,t);if(V&&n.type&&!["rule","at","text","comment"].includes(n.type)&&(V=!1),u&&t>=u&&(u=0),z(e[t])&&z(e[~-t])&&z(e[t+1])){r!=null&&r.valueStarts&&!r.valueEnds&&!r.importantStarts&&e.startsWith("important",t)&&(r.valueEnds=t,r.value=e.slice(r.valueStarts,t),r.importantStarts=t);continue}if(` \r `.includes(e[t])&&e[t]===e[~-t]&&e[t]===e[t+1])continue;if(!u&&wt())if(e[t]==="}"){if(!n.type||n.type==="text"||n.type==="rule"&&n.openingCurlyAt===null){n.type==="rule"&&(n.end=E+1,n.value=e.slice(n.start,n.end),U(n),W("at")&&g[~-g.length].token.rules.push(n),v(),E!==null&&E<~-t&&(Y("text",E+1),s())),j(n,t);let c=g.pop();n=I(c.token),n.closingCurlyAt=t,n.end=t+1,n.value=e.slice(n.start,n.end),U(n),W("at")&&g[~-g.length].token.rules.push(n),v(),u=t+1}}else n.type==="text"&&((Ce=e[t])!=null&&Ce.trim())&&(n.end=t,n.value=e.slice(n.start,n.end),W("at")?g[~-g.length].token.rules.push(n):U(n),v());if(n.end&&n.end===t&&(n.tagName==="style"&&!n.closing&&(V=!0),h?(o=h,o.attribValue.push(n),n=I(N),h=void 0,N=void 0):(j(n,t),g.length=0)),u||(["tag","at"].includes(n.type)&&n.kind!=="cdata"?e[t]&&(ne.includes(e[t])||"()".includes(e[t]))&&!(ne.includes(e[E])&&e[E]===e[f])&&$e(t)&&(W("simple")&&g[~-g.length].value===re(e[t])?g.pop():g.push({type:"simple",value:e[t],position:t})):n.type==="comment"&&["only","not"].includes(n.kind)?["[","]"].includes(e[t])&&(W("simple")&&g[~-g.length].value===re(e[t])?g.pop():g.push({type:"simple",value:e[t],position:t})):n.type==="esp"&&`'"${lt}()`.includes(e[t])&&!(['"',"'","`"].includes(e[E])&&e[E]===e[f])&&(W("simple")&&g[~-g.length].value===re(e[t])?(g.pop(),u=t+1):"]})>".includes(e[t])||g.push({type:"simple",value:e[t],position:t}))),!u&&n.type==="at"&&n.start!=null&&t>=n.start&&!n.identifierStartsAt&&((xe=e[t])!=null&&xe.trim())&&e[t]!=="@"&&(n.identifierStartsAt=t),!u&&n.type==="at"&&n.queryStartsAt&&!n.queryEndsAt&&"{;".includes(e[t])&&(e[t]==="{"?(Le=e[~-t])!=null&&Le.trim()?n.queryEndsAt=t:n.queryEndsAt=E!==null?E+1:t:n.queryEndsAt=J(e,t+1)||0,n.queryStartsAt&&n.queryEndsAt&&(n.query=e.slice(n.queryStartsAt,n.queryEndsAt)),n.end=e[t]===";"?t+1:t,n.value=e.slice(n.start,n.end),e[t]===";"?U(n):(n.openingCurlyAt=t,g.push({type:"at",token:n})),v(),u=t+1),!u&&n.type==="at"&&n.identifier&&((Je=e[t])!=null&&Je.trim())&&!n.queryStartsAt&&(n.queryStartsAt=t),!u&&n&&n.type==="at"&&n.identifierStartsAt&&t>=n.start&&e[t]&&(!e[t].trim()||"()".includes(e[t]))&&!n.identifierEndsAt&&(n.identifierEndsAt=t,n.identifier=e.slice(n.identifierStartsAt,t)),n.type==="rule"){if(x&&(we.includes(e[t])||e[t]&&f&&!e[t].trim()&&we.includes(e[f])))n.selectors.push({value:e.slice(x,t),selectorStarts:x,selectorEnds:t}),x=void 0,n.selectorsEnd=t;else if(e[t]==="{"&&e[t-1]!=="{"&&e[t+1]!=="{"&&n.openingCurlyAt&&!n.closingCurlyAt){for(let c=t;c--;)if(!e[c].trim()||`{}"';`.includes(e[c])){r!=null&&r.start&&!r.end&&(r.end=c+1,r.property=e.slice(r.start,r.end),S(r),T(),n.end=c+1,n.value=e.slice(n.start,n.end),U(n),Y(e[c+1]==="@"?"at":"rule",c+1),s(),n.left=J(e,c+1),n.selectorsStart=c+1,t=c+1);break}}}let M=De(g);if(!u&&e[t])if(Tt(e,t,n,g,V,E,f)){n.type&&n.start!==null&&(n.type==="rule"&&r!=null&&r.start&&(r.importantStarts&&!r.importantEnds&&(r.importantEnds=t,r.important=e.slice(r.importantStarts,t)),r.propertyStarts&&!r.propertyEnds&&(r.propertyEnds=t,r.property||(r.property=e.slice(r.propertyStarts,t))),r.end||(r.end=t),r.valueStarts&&!r.valueEnds&&(r.valueEnds=t,r.value||(r.value=e.slice(r.valueStarts,t))),S(r),T()),j(n,t),v()),Y("tag",t),s(),V&&(V=!1);let c="?![-/",y="",P=!1;if(f)for(let L=f;L<$&&(!P&&((Re=e[L])!=null&&Re.trim())&&e[L].toUpperCase()!==e[L].toLowerCase()&&(P=!0),!(P&&e[L]&&(!e[L].trim()||!/\w/.test(e[L])&&!c.includes(e[L])||e[L]==="[")));L++)c.includes(e[L])||(y+=e[L].trim().toLowerCase());y==="doctype"?n.kind="doctype":y==="cdata"?n.kind="cdata":y==="xml"?n.kind="xml":at.has(y)&&(n.kind="inline",y&&(u=t))}else if(!d&&Vt(e,t,n,g))n.start!=null&&j(n,t),Y("comment",t),s(),e[t]==="-"?n.closing=!0:te(e,t,["<![endif]-->"],{i:!0,trimBeforeMatching:!0,maxMismatches:2})&&(n.closing=!0,n.kind="only"),V&&(V=!1);else if(!d&&St(e,t,n,g,V))n.start!=null&&j(n,t),Y("comment",t),s(),n.language="css",n.kind=e[t]==="/"&&e[t+1]==="/"?"line":"block",n.value=e.slice(t,t+2),n.end=t+2,n.closing=e[t]==="*"&&e[t+1]==="/",w=!0,n.closing&&(w=!1),u=t+2;else if(!d&&(typeof M=="number"&&g[M]&&g[M].type==="esp"&&g[M].openingLump&&g[M].guessedClosingLump&&g[M].guessedClosingLump.length>1&&g[M].guessedClosingLump.includes(e[t])&&g[M].guessedClosingLump.includes(e[t+1])&&!(g[M+1]&&`'"`.includes(g[M+1].value)&&e.indexOf(g[M+1].value,t)>0&&g[M].guessedClosingLump.includes(e[_(e,e.indexOf(g[M+1].value,t))]))||At(e,t,n,g,V)&&(!W("simple")||!["'",'"'].includes(g[~-g.length].value)||o!=null&&o.attribStarts&&!o.attribEnds))){o!=null&&o.attribValue.length&&!o.attribValue[~-o.attribValue.length].end&&(o.attribValue[~-o.attribValue.length].end=t,o.attribValue[~-o.attribValue.length].value=e.slice(o.attribValue[~-o.attribValue.length].start,t));let c=Et(e,t,g);if(!ft.includes(c)){let y,P={char:"",idx:0};if(g.length&&(y=ke(c,g))){if(n.type==="esp"){if(n.end||(n.end=t+y,n.value=e.slice(n.start,n.end),n.tail=e.slice(t,t+y),n.tailStartsAt=t,n.tailEndsAt=n.end,e[t]===">"&&e[E]==="/"&&(n.tailStartsAt=E,n.tail=e.slice(n.tailStartsAt,t+1))),u=n.tailEndsAt,N){Array.isArray(N.attribs)||(N.attribs=[]),r!=null&&r.start?(Arr