is-html-tag-opening 4.0.8 → 4.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-2022 Roy Revelt and other contributors
3
+ Copyright (c) 2010-2023 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -60,6 +60,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
60
60
 
61
61
  MIT License.
62
62
 
63
- Copyright © 2010-2022 Roy Revelt and other contributors.
63
+ Copyright © 2010-2023 Roy Revelt and other contributors.
64
64
 
65
65
  <p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 4.0.8
4
+ * @version 4.0.10
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/is-html-tag-opening/}
8
8
  */
9
9
 
10
- import{matchRight as N,matchRightIncl as x}from"string-match-left-right";import{left as c}from"string-left-right";var d={allowCustomTagNames:!1,skipOpeningBracket:!1},m="\\",g=["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 b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}import{left as T}from"string-left-right";function p(e,t){return e[t]==="<"||e[T(e,t)]==="<"}var f="4.0.8";var K=f;function U(e,t=0,h){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(t)||t<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 t}", value being ${JSON.stringify(t,null,4)}`);let n={...d,...h},i="[\\\\ \\t\\r\\n/]*",r="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),k=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*${i}>`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${r}]+[-${r}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${r}]+[-${r}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${r}]+)+${i}[\\\\/=>]`,""),V=new RegExp("^\\/\\s*\\w+s*>"),s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,B={cb:b,i:!0,trimCharsBeforeMatching:["/",m,"!"," "," ",`
10
+ import{matchRight as N,matchRightIncl as x}from"string-match-left-right";import{left as c}from"string-left-right";var d={allowCustomTagNames:!1,skipOpeningBracket:!1},m="\\",g=["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 b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}import{left as T}from"string-left-right";function p(e,t){return e[t]==="<"||e[T(e,t)]==="<"}var f="4.0.10";var K=f;function U(e,t=0,h){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(t)||t<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 t}", value being ${JSON.stringify(t,null,4)}`);let n={...d,...h},i="[\\\\ \\t\\r\\n/]*",r="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),k=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*${i}>`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${r}]+[-${r}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${r}]+[-${r}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${r}]+)+${i}[\\\\/=>]`,""),V=new RegExp("^\\/\\s*\\w+s*>"),s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,B={cb:b,i:!0,trimCharsBeforeMatching:["/",m,"!"," "," ",`
11
11
  `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||s[0]==="<"&&s[1]&&s[1].trim())&&($.test(s)||/^<\w+$/.test(s))||k.test(s)&&p(e,t)||D.test(s)||O.test(s)&&p(e,t)||v.test(s)||e[t]==="/"&&e[a]!=="<"&&V.test(s))&&(o=!0):(((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||(s[0]==="<"||s[0]==="/"&&(!e[a]||e[a]!=="<"))&&s[1]&&s[1].trim())&&$.test(s)||w.test(s)&&p(e,t)||E.test(s)||y.test(s)&&p(e,t)||R.test(s))&&(l=!0),l&&x(e,t,g,{cb:u=>u===void 0?((e[t]==="<"&&e[t+1]&&e[t+1].trim()||e[t-1]==="<")&&(o=!0),!0):u.toUpperCase()===u.toLowerCase()&&!/\d/.test(u)&&u!=="=",i:!0,trimCharsBeforeMatching:["<","/",m,"!"," "," ",`
12
12
  `,"\r"]})&&(o=!0)),!o&&e[t]==="<"&&e[t+1]&&e[t+1].trim()&&N(e,t,g,B)&&(o=!0),typeof e=="string"&&t<e.length&&o}export{d as defaults,U as isOpening,K as version};
@@ -1,49 +1,49 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 4.0.8
4
+ * @version 4.0.10
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/is-html-tag-opening/}
8
8
  */
9
9
 
10
- "use strict";var isHtmlTagOpening=(()=>{var me=Object.create;var k=Object.defineProperty;var de=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames,mt=Object.getOwnPropertySymbols,ye=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable;var dt=(t,e,r)=>e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,v=(t,e)=>{for(var r in e||(e={}))bt.call(e,r)&&dt(t,r,e[r]);if(mt)for(var r of mt(e))we.call(e,r)&&dt(t,r,e[r]);return t};var $e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_e=(t,e)=>{for(var r in e)k(t,r,{get:e[r],enumerable:!0})},yt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of be(e))!bt.call(t,i)&&i!==r&&k(t,i,{get:()=>e[i],enumerable:!(n=de(e,i))||n.enumerable});return t};var ve=(t,e,r)=>(r=t!=null?me(ye(t)):{},yt(e||!t||!t.__esModule?k(r,"default",{value:t,enumerable:!0}):r,t)),Ce=t=>yt(k({},"__esModule",{value:!0}),t);var he=$e((N,R)=>{var Ee=200,kt="__lodash_hash_undefined__",Nt=9007199254740991,it="[object Arguments]",Te="[object Array]",It="[object Boolean]",Ft="[object Date]",Me="[object Error]",ot="[object Function]",Vt="[object GeneratorFunction]",P="[object Map]",Ht="[object Number]",st="[object Object]",Ot="[object Promise]",Pt="[object RegExp]",q="[object Set]",qt="[object String]",Wt="[object Symbol]",z="[object WeakMap]",Ut="[object ArrayBuffer]",W="[object DataView]",Gt="[object Float32Array]",Jt="[object Float64Array]",Kt="[object Int8Array]",Qt="[object Int16Array]",Zt="[object Int32Array]",Yt="[object Uint8Array]",zt="[object Uint8ClampedArray]",Xt="[object Uint16Array]",te="[object Uint32Array]",Se=/[\\^$.*+?()[\]{}|]/g,xe=/\w*$/,Re=/^\[object .+?Constructor\]$/,Be=/^(?:0|[1-9]\d*)$/,h={};h[it]=h[Te]=h[Ut]=h[W]=h[It]=h[Ft]=h[Gt]=h[Jt]=h[Kt]=h[Qt]=h[Zt]=h[P]=h[Ht]=h[st]=h[Pt]=h[q]=h[qt]=h[Wt]=h[Yt]=h[zt]=h[Xt]=h[te]=!0;h[Me]=h[ot]=h[z]=!1;var De=typeof global=="object"&&global&&global.Object===Object&&global,Le=typeof self=="object"&&self&&self.Object===Object&&self,C=De||Le||Function("return this")(),ee=typeof N=="object"&&N&&!N.nodeType&&N,Et=ee&&typeof R=="object"&&R&&!R.nodeType&&R,je=Et&&Et.exports===ee;function ke(t,e){return t.set(e[0],e[1]),t}function Ne(t,e){return t.add(e),t}function Ie(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function Fe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function re(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Ve(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function He(t,e){return t==null?void 0:t[e]}function ne(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function Tt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function at(t,e){return function(r){return t(e(r))}}function Mt(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Pe=Array.prototype,qe=Function.prototype,U=Object.prototype,Y=C["__core-js_shared__"],St=function(){var t=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ie=qe.toString,O=U.hasOwnProperty,G=U.toString,We=RegExp("^"+ie.call(O).replace(Se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xt=je?C.Buffer:void 0,Rt=C.Symbol,Bt=C.Uint8Array,Ue=at(Object.getPrototypeOf,Object),Ge=Object.create,Je=U.propertyIsEnumerable,Ke=Pe.splice,Dt=Object.getOwnPropertySymbols,Qe=xt?xt.isBuffer:void 0,Ze=at(Object.keys,Object),X=L(C,"DataView"),I=L(C,"Map"),tt=L(C,"Promise"),et=L(C,"Set"),rt=L(C,"WeakMap"),F=L(Object,"create"),Ye=x(X),ze=x(I),Xe=x(tt),tr=x(et),er=x(rt),Lt=Rt?Rt.prototype:void 0,jt=Lt?Lt.valueOf:void 0;function S(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function rr(){this.__data__=F?F(null):{}}function nr(t){return this.has(t)&&delete this.__data__[t]}function ir(t){var e=this.__data__;if(F){var r=e[t];return r===kt?void 0:r}return O.call(e,t)?e[t]:void 0}function or(t){var e=this.__data__;return F?e[t]!==void 0:O.call(e,t)}function sr(t,e){var r=this.__data__;return r[t]=F&&e===void 0?kt:e,this}S.prototype.clear=rr;S.prototype.delete=nr;S.prototype.get=ir;S.prototype.has=or;S.prototype.set=sr;function A(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ar(){this.__data__=[]}function ur(t){var e=this.__data__,r=J(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ke.call(e,r,1),!0}function lr(t){var e=this.__data__,r=J(e,t);return r<0?void 0:e[r][1]}function cr(t){return J(this.__data__,t)>-1}function fr(t,e){var r=this.__data__,n=J(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}A.prototype.clear=ar;A.prototype.delete=ur;A.prototype.get=lr;A.prototype.has=cr;A.prototype.set=fr;function B(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function hr(){this.__data__={hash:new S,map:new(I||A),string:new S}}function gr(t){return K(this,t).delete(t)}function pr(t){return K(this,t).get(t)}function mr(t){return K(this,t).has(t)}function dr(t,e){return K(this,t).set(t,e),this}B.prototype.clear=hr;B.prototype.delete=gr;B.prototype.get=pr;B.prototype.has=mr;B.prototype.set=dr;function D(t){this.__data__=new A(t)}function br(){this.__data__=new A}function yr(t){return this.__data__.delete(t)}function wr(t){return this.__data__.get(t)}function $r(t){return this.__data__.has(t)}function _r(t,e){var r=this.__data__;if(r instanceof A){var n=r.__data__;if(!I||n.length<Ee-1)return n.push([t,e]),this;r=this.__data__=new B(n)}return r.set(t,e),this}D.prototype.clear=br;D.prototype.delete=yr;D.prototype.get=wr;D.prototype.has=$r;D.prototype.set=_r;function vr(t,e){var r=lt(t)||Gr(t)?Ve(t.length,String):[],n=r.length,i=!!n;for(var o in t)(e||O.call(t,o))&&!(i&&(o=="length"||Pr(o,n)))&&r.push(o);return r}function oe(t,e,r){var n=t[e];(!(O.call(t,e)&&le(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}function J(t,e){for(var r=t.length;r--;)if(le(t[r][0],e))return r;return-1}function Cr(t,e){return t&&se(e,ct(e),t)}function nt(t,e,r,n,i,o,u){var s;if(n&&(s=o?n(t,i,o,u):n(t)),s!==void 0)return s;if(!Q(t))return t;var g=lt(t);if(g){if(s=Fr(t),!e)return kr(t,s)}else{var d=M(t),_=d==ot||d==Vt;if(Kr(t))return Sr(t,e);if(d==st||d==it||_&&!o){if(ne(t))return o?t:{};if(s=Vr(_?{}:t),!e)return Nr(t,Cr(s,t))}else{if(!h[d])return o?t:{};s=Hr(t,d,nt,e)}}u||(u=new D);var w=u.get(t);if(w)return w;if(u.set(t,s),!g)var p=r?Ir(t):ct(t);return Ie(p||t,function(f,a){p&&(a=f,f=t[a]),oe(s,a,nt(f,e,r,n,a,t,u))}),s}function Ar(t){return Q(t)?Ge(t):{}}function Or(t,e,r){var n=e(t);return lt(t)?n:Fe(n,r(t))}function Er(t){return G.call(t)}function Tr(t){if(!Q(t)||Wr(t))return!1;var e=fe(t)||ne(t)?We:Re;return e.test(x(t))}function Mr(t){if(!ue(t))return Ze(t);var e=[];for(var r in Object(t))O.call(t,r)&&r!="constructor"&&e.push(r);return e}function Sr(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ut(t){var e=new t.constructor(t.byteLength);return new Bt(e).set(new Bt(t)),e}function xr(t,e){var r=e?ut(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function Rr(t,e,r){var n=e?r(Tt(t),!0):Tt(t);return re(n,ke,new t.constructor)}function Br(t){var e=new t.constructor(t.source,xe.exec(t));return e.lastIndex=t.lastIndex,e}function Dr(t,e,r){var n=e?r(Mt(t),!0):Mt(t);return re(n,Ne,new t.constructor)}function Lr(t){return jt?Object(jt.call(t)):{}}function jr(t,e){var r=e?ut(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function kr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function se(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var u=e[i],s=n?n(r[u],t[u],u,r,t):void 0;oe(r,u,s===void 0?t[u]:s)}return r}function Nr(t,e){return se(t,ae(t),e)}function Ir(t){return Or(t,ct,ae)}function K(t,e){var r=t.__data__;return qr(e)?r[typeof e=="string"?"string":"hash"]:r.map}function L(t,e){var r=He(t,e);return Tr(r)?r:void 0}var ae=Dt?at(Dt,Object):Yr,M=Er;(X&&M(new X(new ArrayBuffer(1)))!=W||I&&M(new I)!=P||tt&&M(tt.resolve())!=Ot||et&&M(new et)!=q||rt&&M(new rt)!=z)&&(M=function(t){var e=G.call(t),r=e==st?t.constructor:void 0,n=r?x(r):void 0;if(n)switch(n){case Ye:return W;case ze:return P;case Xe:return Ot;case tr:return q;case er:return z}return e});function Fr(t){var e=t.length,r=t.constructor(e);return e&&typeof t[0]=="string"&&O.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Vr(t){return typeof t.constructor=="function"&&!ue(t)?Ar(Ue(t)):{}}function Hr(t,e,r,n){var i=t.constructor;switch(e){case Ut:return ut(t);case It:case Ft:return new i(+t);case W:return xr(t,n);case Gt:case Jt:case Kt:case Qt:case Zt:case Yt:case zt:case Xt:case te:return jr(t,n);case P:return Rr(t,n,r);case Ht:case qt:return new i(t);case Pt:return Br(t);case q:return Dr(t,n,r);case Wt:return Lr(t)}}function Pr(t,e){return e=e==null?Nt:e,!!e&&(typeof t=="number"||Be.test(t))&&t>-1&&t%1==0&&t<e}function qr(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Wr(t){return!!St&&St in t}function ue(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||U;return t===r}function x(t){if(t!=null){try{return ie.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ur(t){return nt(t,!0,!0)}function le(t,e){return t===e||t!==t&&e!==e}function Gr(t){return Jr(t)&&O.call(t,"callee")&&(!Je.call(t,"callee")||G.call(t)==it)}var lt=Array.isArray;function ce(t){return t!=null&&Qr(t.length)&&!fe(t)}function Jr(t){return Zr(t)&&ce(t)}var Kr=Qe||zr;function fe(t){var e=Q(t)?G.call(t):"";return e==ot||e==Vt}function Qr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Nt}function Q(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Zr(t){return!!t&&typeof t=="object"}function ct(t){return ce(t)?vr(t):Mr(t)}function Yr(){return[]}function zr(){return!1}R.exports=Ur});var on={};_e(on,{defaults:()=>ht,isOpening:()=>nn,version:()=>rn});function wt(t){return typeof t!="string"?t:t.length?[t]:[]}function $t(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function H(t){return typeof t=="string"}var _t={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},Ae=t=>t+1;function Oe(t,e,r,n,i=!1,o=Ae){let u=typeof r=="function"?r():r;if(+e<0&&i&&u==="EOL")return u;let s=v(v({},_t),n);if(e>=t.length&&!i)return!1;let g=i?1:r.length,d=0,_=!1,w=!1,p=!1,f=s.maxMismatches,a=e,y=!1,l=!1,b=!1;function m(){return d===1&&f<s.maxMismatches-1}for(;t[a];){let c=o(a);if(s.trimBeforeMatching&&t[a].trim()===""){if(!t[c]&&i&&r==="EOL")return!0;a=o(a);continue}if(s&&!s.i&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.includes(t[a])||s!=null&&s.i&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.map(T=>T.toLowerCase()).includes(t[a].toLowerCase())){if(i&&r==="EOL"&&!t[c])return!0;a=o(a);continue}let E=c>a?r[r.length-g]:r[g-1];if(!s.i&&t[a]===E||s.i&&t[a].toLowerCase()===E.toLowerCase()){if(y||(y=!0),p||(p=!0),g===r.length){if(l=!0,f!==s.maxMismatches)return!1}else g===1&&(b=!0);if(g-=1,d++,m())return!1;if(!g)return d!==r.length||f===s.maxMismatches||!_?a:!1}else if(!_&&!d&&(_=!0),s.maxMismatches&&f&&a){f-=1;for(let T=0;T<=f;T++){let $=c>a?r[r.length-g+1+T]:r[g-2-T],Z=t[o(a)];if($&&(!s.i&&t[a]===$||s.i&&t[a].toLowerCase()===$.toLowerCase())&&(!s.firstMustMatch||g!==r.length)){if(d++,m())return!1;g-=2,y=!0;break}else if(Z&&$&&(!s.i&&Z===$||s.i&&Z.toLowerCase()===$.toLowerCase())&&(!s.firstMustMatch||g!==r.length)){if(!d&&!s.hungry)return!1;g-=1,y=!0;break}else if($===void 0&&f>=0&&y&&(!s.firstMustMatch||l)&&(!s.lastMustMatch||b))return a}y||(w=a)}else return a===0&&g===1&&!s.lastMustMatch&&p?0:!1;if(w!==!1&&w!==a&&(w=!1),g<1)return a;a=o(a)}if(g>0)return i&&u==="EOL"?!0:s&&s.maxMismatches>=g&&p?w||0:!1}function vt(t,e,r,n,i){var _,w;if($t(i)&&Object.prototype.hasOwnProperty.call(i,"trimBeforeMatching")&&i&&typeof i.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${t}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(i.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let o=v(v({},_t),i);if(typeof o.trimCharsBeforeMatching=="string"&&(o.trimCharsBeforeMatching=wt(o.trimCharsBeforeMatching)),o.trimCharsBeforeMatching=o.trimCharsBeforeMatching.map(p=>H(p)?p:String(p)),!H(e)||!e.length)return!1;if(!Number.isInteger(r)||r<0)throw new Error(`string-match-left-right/${t}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof r}, equal to:
11
- ${JSON.stringify(r,null,4)}`);let u,s;if(H(n))u=[n];else if(Array.isArray(n))u=n;else if(!n)u=n;else if(typeof n=="function")u=[],u.push(n);else throw new Error(`string-match-left-right/${t}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof n}, equal to:
12
- ${JSON.stringify(n,null,4)}`);if(i&&!$t(i))throw new Error(`string-match-left-right/${t}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof i}", and equal to:
13
- ${JSON.stringify(i,null,4)}`);let g=0,d="";if(o!=null&&o.trimCharsBeforeMatching&&o.trimCharsBeforeMatching.some((p,f)=>p.length>1?(g=f,d=p,!0):!1))throw new Error(`string-match-left-right/${t}(): [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 ${g} is longer than 1 character, ${d.length} (equals to ${d}). Please split it into separate characters and put into array as separate elements.`);if(!u||!Array.isArray(u)||Array.isArray(u)&&!u.length||Array.isArray(u)&&u.length===1&&H(u[0])&&!u[0].trim()){if(typeof o.cb=="function"){let f,a=r;if((t==="matchLeftIncl"||t==="matchRight")&&(a+=1),t[5]==="L")for(let m=a;m--;){let c=e[m];if((!o.trimBeforeMatching||o.trimBeforeMatching&&c!==void 0&&c.trim())&&(!((_=o.trimCharsBeforeMatching)!=null&&_.length)||c!==void 0&&!o.trimCharsBeforeMatching.includes(c))){f=m;break}}else if(t.startsWith("matchRight"))for(let m=a;m<e.length;m++){let c=e[m];if((!o.trimBeforeMatching||o.trimBeforeMatching&&c.trim())&&(!((w=o.trimCharsBeforeMatching)!=null&&w.length)||!o.trimCharsBeforeMatching.includes(c))){f=m;break}}if(f===void 0)return!1;let y=e[f],l=f+1,b="";return l&&l>0&&(b=e.slice(0,l)),t[5]==="L"||f&&f>0&&(b=e.slice(f)),o.cb(y,b,f)}let p="";throw i||(p=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${t}(): [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!${p}`)}for(let p=0,f=u.length;p<f;p++){s=typeof u[p]=="function";let a=u[p],y,l,b="",m=r;t==="matchRight"?m+=1:t==="matchLeft"&&(m-=1);let c=Oe(e,m,a,o,s,E=>t[5]==="L"?E-1:E+1);if(c&&s&&typeof a=="function"&&a()==="EOL")return a()&&(!o.cb||o.cb(y,b,l))?a():!1;if(Number.isInteger(c)&&(l=t.startsWith("matchLeft")?c-1:c+1,t[5]==="L"?b=e.slice(0,c):b=e.slice(l)),l<0&&(l=void 0),e[l]&&(y=e[l]),Number.isInteger(c)&&(!o.cb||o.cb(y,b,l)))return a}return!1}function Ct(t,e,r,n){return vt("matchRightIncl",t,e,r,n)}function At(t,e,r,n){return vt("matchRight",t,e,r,n)}var Xr=ve(he(),1);var ft="\xA0";function tn({str:t,idx:e,stopAtNewlines:r,stopAtRawNbsp:n}){if(typeof t!="string"||!t.length||((!e||typeof e!="number")&&(e=0),e<1))return null;if(t[~-e]&&(t[~-e].trim()||r&&`
14
- \r`.includes(t[~-e])||n&&t[~-e]===ft))return~-e;if(t[e-2]&&(t[e-2].trim()||r&&`
15
- \r`.includes(t[e-2])||n&&t[e-2]===ft))return e-2;for(let i=e;i--;)if(t[i]&&(t[i].trim()||r&&`
16
- \r`.includes(t[i])||n&&t[i]===ft))return i;return null}function j(t,e=0){return tn({str:t,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!1})}var ht={allowCustomTagNames:!1,skipOpeningBracket:!1},gt="\\",pt=["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 ge(t){return t===void 0||t.toUpperCase()===t.toLowerCase()&&!/\d/.test(t)&&t!=="="}function V(t,e){return t[e]==="<"||t[j(t,e)]==="<"}var pe="4.0.8";var rn=pe;function nn(t,e=0,r){if(typeof t!="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 t}", value being ${JSON.stringify(t,null,4)}`);if(!Number.isInteger(e)||e<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 e}", value being ${JSON.stringify(e,null,4)}`);let n=v(v({},ht),r),i="[\\\\ \\t\\r\\n/]*",o="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",u=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),s=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${o}]+[-${o}]*${i}>`,"g"),g=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),d=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${o}]+[-${o}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),_=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),w=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${o}]+[-${o}]*\\s*\\/?\\s*>`,"g"),p=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),f=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${o}]+[-${o}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),a=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${o}]+)+${i}[\\\\/=>]`,""),y=new RegExp("^\\/\\s*\\w+s*>"),l=e?t.slice(e):t,b=j(t,e),m=!1,c=!1,E={cb:ge,i:!0,trimCharsBeforeMatching:["/",gt,"!"," "," ",`
17
- `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(t[e-1]==="<"||t[e-1]==="/"&&t[j(t,b)]==="<")||l[0]==="<"&&l[1]&&l[1].trim())&&(a.test(l)||/^<\w+$/.test(l))||s.test(l)&&V(t,e)||d.test(l)||w.test(l)&&V(t,e)||f.test(l)||t[e]==="/"&&t[b]!=="<"&&y.test(l))&&(c=!0):(((n.skipOpeningBracket&&(t[e-1]==="<"||t[e-1]==="/"&&t[j(t,b)]==="<")||(l[0]==="<"||l[0]==="/"&&(!t[b]||t[b]!=="<"))&&l[1]&&l[1].trim())&&a.test(l)||u.test(l)&&V(t,e)||g.test(l)||_.test(l)&&V(t,e)||p.test(l))&&(m=!0),m&&Ct(t,e,pt,{cb:$=>$===void 0?((t[e]==="<"&&t[e+1]&&t[e+1].trim()||t[e-1]==="<")&&(c=!0),!0):$.toUpperCase()===$.toLowerCase()&&!/\d/.test($)&&$!=="=",i:!0,trimCharsBeforeMatching:["<","/",gt,"!"," "," ",`
18
- `,"\r"]})&&(c=!0)),!c&&t[e]==="<"&&t[e+1]&&t[e+1].trim()&&At(t,e,pt,E)&&(c=!0),typeof t=="string"&&e<t.length&&c}return Ce(on);})();
10
+ "use strict";var isHtmlTagOpening=(()=>{var de=Object.create;var k=Object.defineProperty;var be=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames,dt=Object.getOwnPropertySymbols,we=Object.getPrototypeOf,yt=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var bt=(t,e,r)=>e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,v=(t,e)=>{for(var r in e||(e={}))yt.call(e,r)&&bt(t,r,e[r]);if(dt)for(var r of dt(e))$e.call(e,r)&&bt(t,r,e[r]);return t};var _e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ve=(t,e)=>{for(var r in e)k(t,r,{get:e[r],enumerable:!0})},wt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ye(e))!yt.call(t,i)&&i!==r&&k(t,i,{get:()=>e[i],enumerable:!(n=be(e,i))||n.enumerable});return t};var Ce=(t,e,r)=>(r=t!=null?de(we(t)):{},wt(e||!t||!t.__esModule?k(r,"default",{value:t,enumerable:!0}):r,t)),Ae=t=>wt(k({},"__esModule",{value:!0}),t);var ge=_e((F,B)=>{var Se=200,kt="__lodash_hash_undefined__",It=9007199254740991,ot="[object Arguments]",Te="[object Array]",Ft="[object Boolean]",Pt="[object Date]",Me="[object Error]",st="[object Function]",Vt="[object GeneratorFunction]",q="[object Map]",Ht="[object Number]",at="[object Object]",Et="[object Promise]",qt="[object RegExp]",W="[object Set]",Wt="[object String]",Ut="[object Symbol]",X="[object WeakMap]",Gt="[object ArrayBuffer]",U="[object DataView]",Jt="[object Float32Array]",Kt="[object Float64Array]",Qt="[object Int8Array]",Zt="[object Int16Array]",zt="[object Int32Array]",Yt="[object Uint8Array]",Xt="[object Uint8ClampedArray]",te="[object Uint16Array]",ee="[object Uint32Array]",xe=/[\\^$.*+?()[\]{}|]/g,Re=/\w*$/,Be=/^\[object .+?Constructor\]$/,De=/^(?:0|[1-9]\d*)$/,h={};h[ot]=h[Te]=h[Gt]=h[U]=h[Ft]=h[Pt]=h[Jt]=h[Kt]=h[Qt]=h[Zt]=h[zt]=h[q]=h[Ht]=h[at]=h[qt]=h[W]=h[Wt]=h[Ut]=h[Yt]=h[Xt]=h[te]=h[ee]=!0;h[Me]=h[st]=h[X]=!1;var Le=typeof global=="object"&&global&&global.Object===Object&&global,Ne=typeof self=="object"&&self&&self.Object===Object&&self,C=Le||Ne||Function("return this")(),re=typeof F=="object"&&F&&!F.nodeType&&F,St=re&&typeof B=="object"&&B&&!B.nodeType&&B,je=St&&St.exports===re;function ke(t,e){return t.set(e[0],e[1]),t}function Ie(t,e){return t.add(e),t}function Fe(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function Pe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function ne(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Ve(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function He(t,e){return t==null?void 0:t[e]}function ie(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function Tt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function ut(t,e){return function(r){return t(e(r))}}function Mt(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var qe=Array.prototype,We=Function.prototype,G=Object.prototype,Y=C["__core-js_shared__"],xt=function(){var t=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),oe=We.toString,O=G.hasOwnProperty,J=G.toString,Ue=RegExp("^"+oe.call(O).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=je?C.Buffer:void 0,Bt=C.Symbol,Dt=C.Uint8Array,Ge=ut(Object.getPrototypeOf,Object),Je=Object.create,Ke=G.propertyIsEnumerable,Qe=qe.splice,Lt=Object.getOwnPropertySymbols,Ze=Rt?Rt.isBuffer:void 0,ze=ut(Object.keys,Object),tt=N(C,"DataView"),P=N(C,"Map"),et=N(C,"Promise"),rt=N(C,"Set"),nt=N(C,"WeakMap"),V=N(Object,"create"),Ye=R(tt),Xe=R(P),tr=R(et),er=R(rt),rr=R(nt),Nt=Bt?Bt.prototype:void 0,jt=Nt?Nt.valueOf:void 0;function x(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function nr(){this.__data__=V?V(null):{}}function ir(t){return this.has(t)&&delete this.__data__[t]}function or(t){var e=this.__data__;if(V){var r=e[t];return r===kt?void 0:r}return O.call(e,t)?e[t]:void 0}function sr(t){var e=this.__data__;return V?e[t]!==void 0:O.call(e,t)}function ar(t,e){var r=this.__data__;return r[t]=V&&e===void 0?kt:e,this}x.prototype.clear=nr;x.prototype.delete=ir;x.prototype.get=or;x.prototype.has=sr;x.prototype.set=ar;function A(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ur(){this.__data__=[]}function lr(t){var e=this.__data__,r=K(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Qe.call(e,r,1),!0}function cr(t){var e=this.__data__,r=K(e,t);return r<0?void 0:e[r][1]}function fr(t){return K(this.__data__,t)>-1}function hr(t,e){var r=this.__data__,n=K(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}A.prototype.clear=ur;A.prototype.delete=lr;A.prototype.get=cr;A.prototype.has=fr;A.prototype.set=hr;function D(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function gr(){this.__data__={hash:new x,map:new(P||A),string:new x}}function pr(t){return Q(this,t).delete(t)}function mr(t){return Q(this,t).get(t)}function dr(t){return Q(this,t).has(t)}function br(t,e){return Q(this,t).set(t,e),this}D.prototype.clear=gr;D.prototype.delete=pr;D.prototype.get=mr;D.prototype.has=dr;D.prototype.set=br;function L(t){this.__data__=new A(t)}function yr(){this.__data__=new A}function wr(t){return this.__data__.delete(t)}function $r(t){return this.__data__.get(t)}function _r(t){return this.__data__.has(t)}function vr(t,e){var r=this.__data__;if(r instanceof A){var n=r.__data__;if(!P||n.length<Se-1)return n.push([t,e]),this;r=this.__data__=new D(n)}return r.set(t,e),this}L.prototype.clear=yr;L.prototype.delete=wr;L.prototype.get=$r;L.prototype.has=_r;L.prototype.set=vr;function Cr(t,e){var r=ct(t)||Jr(t)?Ve(t.length,String):[],n=r.length,i=!!n;for(var o in t)(e||O.call(t,o))&&!(i&&(o=="length"||qr(o,n)))&&r.push(o);return r}function se(t,e,r){var n=t[e];(!(O.call(t,e)&&ce(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}function K(t,e){for(var r=t.length;r--;)if(ce(t[r][0],e))return r;return-1}function Ar(t,e){return t&&ae(e,ft(e),t)}function it(t,e,r,n,i,o,u){var s;if(n&&(s=o?n(t,i,o,u):n(t)),s!==void 0)return s;if(!Z(t))return t;var g=ct(t);if(g){if(s=Pr(t),!e)return kr(t,s)}else{var d=M(t),_=d==st||d==Vt;if(Qr(t))return xr(t,e);if(d==at||d==ot||_&&!o){if(ie(t))return o?t:{};if(s=Vr(_?{}:t),!e)return Ir(t,Ar(s,t))}else{if(!h[d])return o?t:{};s=Hr(t,d,it,e)}}u||(u=new L);var w=u.get(t);if(w)return w;if(u.set(t,s),!g)var p=r?Fr(t):ft(t);return Fe(p||t,function(f,a){p&&(a=f,f=t[a]),se(s,a,it(f,e,r,n,a,t,u))}),s}function Or(t){return Z(t)?Je(t):{}}function Er(t,e,r){var n=e(t);return ct(t)?n:Pe(n,r(t))}function Sr(t){return J.call(t)}function Tr(t){if(!Z(t)||Ur(t))return!1;var e=he(t)||ie(t)?Ue:Be;return e.test(R(t))}function Mr(t){if(!le(t))return ze(t);var e=[];for(var r in Object(t))O.call(t,r)&&r!="constructor"&&e.push(r);return e}function xr(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function lt(t){var e=new t.constructor(t.byteLength);return new Dt(e).set(new Dt(t)),e}function Rr(t,e){var r=e?lt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function Br(t,e,r){var n=e?r(Tt(t),!0):Tt(t);return ne(n,ke,new t.constructor)}function Dr(t){var e=new t.constructor(t.source,Re.exec(t));return e.lastIndex=t.lastIndex,e}function Lr(t,e,r){var n=e?r(Mt(t),!0):Mt(t);return ne(n,Ie,new t.constructor)}function Nr(t){return jt?Object(jt.call(t)):{}}function jr(t,e){var r=e?lt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function kr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function ae(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var u=e[i],s=n?n(r[u],t[u],u,r,t):void 0;se(r,u,s===void 0?t[u]:s)}return r}function Ir(t,e){return ae(t,ue(t),e)}function Fr(t){return Er(t,ft,ue)}function Q(t,e){var r=t.__data__;return Wr(e)?r[typeof e=="string"?"string":"hash"]:r.map}function N(t,e){var r=He(t,e);return Tr(r)?r:void 0}var ue=Lt?ut(Lt,Object):Yr,M=Sr;(tt&&M(new tt(new ArrayBuffer(1)))!=U||P&&M(new P)!=q||et&&M(et.resolve())!=Et||rt&&M(new rt)!=W||nt&&M(new nt)!=X)&&(M=function(t){var e=J.call(t),r=e==at?t.constructor:void 0,n=r?R(r):void 0;if(n)switch(n){case Ye:return U;case Xe:return q;case tr:return Et;case er:return W;case rr:return X}return e});function Pr(t){var e=t.length,r=t.constructor(e);return e&&typeof t[0]=="string"&&O.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Vr(t){return typeof t.constructor=="function"&&!le(t)?Or(Ge(t)):{}}function Hr(t,e,r,n){var i=t.constructor;switch(e){case Gt:return lt(t);case Ft:case Pt:return new i(+t);case U:return Rr(t,n);case Jt:case Kt:case Qt:case Zt:case zt:case Yt:case Xt:case te:case ee:return jr(t,n);case q:return Br(t,n,r);case Ht:case Wt:return new i(t);case qt:return Dr(t);case W:return Lr(t,n,r);case Ut:return Nr(t)}}function qr(t,e){return e=e==null?It:e,!!e&&(typeof t=="number"||De.test(t))&&t>-1&&t%1==0&&t<e}function Wr(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Ur(t){return!!xt&&xt in t}function le(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||G;return t===r}function R(t){if(t!=null){try{return oe.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Gr(t){return it(t,!0,!0)}function ce(t,e){return t===e||t!==t&&e!==e}function Jr(t){return Kr(t)&&O.call(t,"callee")&&(!Ke.call(t,"callee")||J.call(t)==ot)}var ct=Array.isArray;function fe(t){return t!=null&&Zr(t.length)&&!he(t)}function Kr(t){return zr(t)&&fe(t)}var Qr=Ze||Xr;function he(t){var e=Z(t)?J.call(t):"";return e==st||e==Vt}function Zr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=It}function Z(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function zr(t){return!!t&&typeof t=="object"}function ft(t){return fe(t)?Cr(t):Mr(t)}function Yr(){return[]}function Xr(){return!1}B.exports=Gr});var sn={};ve(sn,{defaults:()=>gt,isOpening:()=>on,version:()=>nn});function $t(t){return typeof t!="string"?t:t.length?[t]:[]}function I(t){if(t==null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}function T(t){return typeof t=="string"}function _t(t,e){return I(t)&&T(e)&&Object.prototype.hasOwnProperty.call(t,e)}var vt={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},Oe=t=>t+1;function Ee(t,e,r,n,i=!1,o=Oe){let u=typeof r=="function"?r():r;if(+e<0&&i&&u==="EOL")return u;let s=v(v({},vt),n);if(e>=t.length&&!i)return!1;let g=i?1:r.length,d=0,_=!1,w=!1,p=!1,f=s.maxMismatches,a=e,y=!1,l=!1,b=!1;function m(){return d===1&&f<s.maxMismatches-1}for(;t[a];){let c=o(a);if(s.trimBeforeMatching&&t[a].trim()===""){if(!t[c]&&i&&r==="EOL")return!0;a=o(a);continue}if(s&&!s.i&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.includes(t[a])||s!=null&&s.i&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.map(S=>S.toLowerCase()).includes(t[a].toLowerCase())){if(i&&r==="EOL"&&!t[c])return!0;a=o(a);continue}let E=c>a?r[r.length-g]:r[g-1];if(!s.i&&t[a]===E||s.i&&t[a].toLowerCase()===E.toLowerCase()){if(y||(y=!0),p||(p=!0),g===r.length){if(l=!0,f!==s.maxMismatches)return!1}else g===1&&(b=!0);if(g-=1,d++,m())return!1;if(!g)return d!==r.length||f===s.maxMismatches||!_?a:!1}else if(!_&&!d&&(_=!0),s.maxMismatches&&f&&a){f-=1;for(let S=0;S<=f;S++){let $=c>a?r[r.length-g+1+S]:r[g-2-S],z=t[o(a)];if($&&(!s.i&&t[a]===$||s.i&&t[a].toLowerCase()===$.toLowerCase())&&(!s.firstMustMatch||g!==r.length)){if(d++,m())return!1;g-=2,y=!0;break}else if(z&&$&&(!s.i&&z===$||s.i&&z.toLowerCase()===$.toLowerCase())&&(!s.firstMustMatch||g!==r.length)){if(!d&&!s.hungry)return!1;g-=1,y=!0;break}else if($===void 0&&f>=0&&y&&(!s.firstMustMatch||l)&&(!s.lastMustMatch||b))return a}y||(w=a)}else return a===0&&g===1&&!s.lastMustMatch&&p?0:!1;if(w!==!1&&w!==a&&(w=!1),g<1)return a;a=o(a)}if(g>0)return i&&u==="EOL"?!0:s&&s.maxMismatches>=g&&p?w||0:!1}function Ct(t,e,r,n,i){var _,w;if(I(i)&&_t(i,"trimBeforeMatching")&&i&&typeof i.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${t}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(i.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let o=v(v({},vt),i);if(typeof o.trimCharsBeforeMatching=="string"&&(o.trimCharsBeforeMatching=$t(o.trimCharsBeforeMatching)),o.trimCharsBeforeMatching=o.trimCharsBeforeMatching.map(p=>T(p)?p:String(p)),!T(e)||!e.length)return!1;if(!Number.isInteger(r)||r<0)throw new Error(`string-match-left-right/${t}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof r}, equal to:
11
+ ${JSON.stringify(r,null,4)}`);let u,s;if(T(n))u=[n];else if(Array.isArray(n))u=n;else if(!n)u=n;else if(typeof n=="function")u=[],u.push(n);else throw new Error(`string-match-left-right/${t}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof n}, equal to:
12
+ ${JSON.stringify(n,null,4)}`);if(i&&!I(i))throw new Error(`string-match-left-right/${t}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof i}", and equal to:
13
+ ${JSON.stringify(i,null,4)}`);let g=0,d="";if(o!=null&&o.trimCharsBeforeMatching&&o.trimCharsBeforeMatching.some((p,f)=>p.length>1?(g=f,d=p,!0):!1))throw new Error(`string-match-left-right/${t}(): [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 ${g} is longer than 1 character, ${d.length} (equals to ${d}). Please split it into separate characters and put into array as separate elements.`);if(!u||!Array.isArray(u)||Array.isArray(u)&&!u.length||Array.isArray(u)&&u.length===1&&T(u[0])&&!u[0].trim()){if(typeof o.cb=="function"){let f,a=r;if((t==="matchLeftIncl"||t==="matchRight")&&(a+=1),t[5]==="L")for(let m=a;m--;){let c=e[m];if((!o.trimBeforeMatching||o.trimBeforeMatching&&c!==void 0&&c.trim())&&(!((_=o.trimCharsBeforeMatching)!=null&&_.length)||c!==void 0&&!o.trimCharsBeforeMatching.includes(c))){f=m;break}}else if(t.startsWith("matchRight"))for(let m=a;m<e.length;m++){let c=e[m];if((!o.trimBeforeMatching||o.trimBeforeMatching&&c.trim())&&(!((w=o.trimCharsBeforeMatching)!=null&&w.length)||!o.trimCharsBeforeMatching.includes(c))){f=m;break}}if(f===void 0)return!1;let y=e[f],l=f+1,b="";return l&&l>0&&(b=e.slice(0,l)),t[5]==="L"||f&&f>0&&(b=e.slice(f)),o.cb(y,b,f)}let p="";throw i||(p=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${t}(): [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!${p}`)}for(let p=0,f=u.length;p<f;p++){s=typeof u[p]=="function";let a=u[p],y,l,b="",m=r;t==="matchRight"?m+=1:t==="matchLeft"&&(m-=1);let c=Ee(e,m,a,o,s,E=>t[5]==="L"?E-1:E+1);if(c&&s&&typeof a=="function"&&a()==="EOL")return a()&&(!o.cb||o.cb(y,b,l))?a():!1;if(Number.isInteger(c)&&(l=t.startsWith("matchLeft")?c-1:c+1,t[5]==="L"?b=e.slice(0,c):b=e.slice(l)),l<0&&(l=void 0),e[l]&&(y=e[l]),Number.isInteger(c)&&(!o.cb||o.cb(y,b,l)))return a}return!1}function At(t,e,r,n){return Ct("matchRightIncl",t,e,r,n)}function Ot(t,e,r,n){return Ct("matchRight",t,e,r,n)}var tn=Ce(ge(),1);var ht="\xA0";function en({str:t,idx:e,stopAtNewlines:r,stopAtRawNbsp:n}){if(typeof t!="string"||!t.length||((!e||typeof e!="number")&&(e=0),e<1))return null;if(t[~-e]&&(t[~-e].trim()||r&&`
14
+ \r`.includes(t[~-e])||n&&t[~-e]===ht))return~-e;if(t[e-2]&&(t[e-2].trim()||r&&`
15
+ \r`.includes(t[e-2])||n&&t[e-2]===ht))return e-2;for(let i=e;i--;)if(t[i]&&(t[i].trim()||r&&`
16
+ \r`.includes(t[i])||n&&t[i]===ht))return i;return null}function j(t,e=0){return en({str:t,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!1})}var gt={allowCustomTagNames:!1,skipOpeningBracket:!1},pt="\\",mt=["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 pe(t){return t===void 0||t.toUpperCase()===t.toLowerCase()&&!/\d/.test(t)&&t!=="="}function H(t,e){return t[e]==="<"||t[j(t,e)]==="<"}var me="4.0.10";var nn=me;function on(t,e=0,r){if(typeof t!="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 t}", value being ${JSON.stringify(t,null,4)}`);if(!Number.isInteger(e)||e<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 e}", value being ${JSON.stringify(e,null,4)}`);let n=v(v({},gt),r),i="[\\\\ \\t\\r\\n/]*",o="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",u=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),s=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${o}]+[-${o}]*${i}>`,"g"),g=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),d=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${o}]+[-${o}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),_=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),w=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${o}]+[-${o}]*\\s*\\/?\\s*>`,"g"),p=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),f=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${o}]+[-${o}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),a=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${o}]+)+${i}[\\\\/=>]`,""),y=new RegExp("^\\/\\s*\\w+s*>"),l=e?t.slice(e):t,b=j(t,e),m=!1,c=!1,E={cb:pe,i:!0,trimCharsBeforeMatching:["/",pt,"!"," "," ",`
17
+ `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(t[e-1]==="<"||t[e-1]==="/"&&t[j(t,b)]==="<")||l[0]==="<"&&l[1]&&l[1].trim())&&(a.test(l)||/^<\w+$/.test(l))||s.test(l)&&H(t,e)||d.test(l)||w.test(l)&&H(t,e)||f.test(l)||t[e]==="/"&&t[b]!=="<"&&y.test(l))&&(c=!0):(((n.skipOpeningBracket&&(t[e-1]==="<"||t[e-1]==="/"&&t[j(t,b)]==="<")||(l[0]==="<"||l[0]==="/"&&(!t[b]||t[b]!=="<"))&&l[1]&&l[1].trim())&&a.test(l)||u.test(l)&&H(t,e)||g.test(l)||_.test(l)&&H(t,e)||p.test(l))&&(m=!0),m&&At(t,e,mt,{cb:$=>$===void 0?((t[e]==="<"&&t[e+1]&&t[e+1].trim()||t[e-1]==="<")&&(c=!0),!0):$.toUpperCase()===$.toLowerCase()&&!/\d/.test($)&&$!=="=",i:!0,trimCharsBeforeMatching:["<","/",pt,"!"," "," ",`
18
+ `,"\r"]})&&(c=!0)),!c&&t[e]==="<"&&t[e+1]&&t[e+1].trim()&&Ot(t,e,mt,E)&&(c=!0),typeof t=="string"&&e<t.length&&c}return Ae(sn);})();
19
19
  /**
20
20
  * @name arrayiffy-if-string
21
21
  * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
22
- * @version 5.0.3
22
+ * @version 5.0.5
23
23
  * @author Roy Revelt, Codsen Ltd
24
24
  * @license MIT
25
25
  * {@link https://codsen.com/os/arrayiffy-if-string/}
26
26
  */
27
27
  /**
28
- * @name string-match-left-right
29
- * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
30
- * @version 9.0.8
28
+ * @name codsen-utils
29
+ * @fileoverview Various utility functions
30
+ * @version 1.3.1
31
31
  * @author Roy Revelt, Codsen Ltd
32
32
  * @license MIT
33
- * {@link https://codsen.com/os/string-match-left-right/}
33
+ * {@link https://codsen.com/os/codsen-utils/}
34
34
  */
35
35
  /**
36
- * @name codsen-utils
37
- * @fileoverview Various utility functions
38
- * @version 1.2.0
36
+ * @name string-match-left-right
37
+ * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
38
+ * @version 9.0.10
39
39
  * @author Roy Revelt, Codsen Ltd
40
40
  * @license MIT
41
- * {@link https://codsen.com/os/codsen-utils/}
41
+ * {@link https://codsen.com/os/string-match-left-right/}
42
42
  */
43
43
  /**
44
44
  * @name string-left-right
45
45
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
46
- * @version 6.0.8
46
+ * @version 6.0.10
47
47
  * @author Roy Revelt, Codsen Ltd
48
48
  * @license MIT
49
49
  * {@link https://codsen.com/os/string-left-right/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-html-tag-opening",
3
- "version": "4.0.8",
3
+ "version": "4.0.10",
4
4
  "description": "Does an HTML tag start at given position?",
5
5
  "keywords": [
6
6
  "bracket",
@@ -73,10 +73,10 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "string-left-right": "^6.0.8",
77
- "string-match-left-right": "^9.0.8"
76
+ "string-left-right": "^6.0.10",
77
+ "string-match-left-right": "^9.0.10"
78
78
  },
79
79
  "devDependencies": {
80
- "test-mixer": "^4.1.5"
80
+ "test-mixer": "^4.1.7"
81
81
  }
82
82
  }