is-html-tag-opening 4.0.22 → 4.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,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.22
4
+ * @version 4.0.32
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.22";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
- `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||s[0]==="<"&&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]?.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]?.trim()||e[t-1]==="<")&&(o=!0),!0):u.toUpperCase()===u.toLowerCase()&&!/\d/.test(u)&&u!=="=",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 C}from"string-left-right";function p(e,t){return e[t]==="<"||e[C(e,t)]==="<"}var f="4.0.32";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"),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${r}]+[-${r}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),D=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
+ `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||s[0]==="<"&&s[1]?.trim())&&($.test(s)||/^<\w+$/.test(s))||k.test(s)&&p(e,t)||y.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]?.trim())&&$.test(s)||w.test(s)&&p(e,t)||E.test(s)||D.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]?.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]?.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,25 +1,17 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 4.0.22
4
+ * @version 4.0.32
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 te=Object.create;var D=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames,H=Object.getOwnPropertySymbols,ie=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var F=(e,t,n)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>{for(var n in t||(t={}))_.call(t,n)&&F(e,n,t[n]);if(H)for(var n of H(t))se.call(t,n)&&F(e,n,t[n]);return e};var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ue=(e,t)=>{for(var n in t)D(e,n,{get:t[n],enumerable:!0})},q=(e,t,n,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of ne(t))!_.call(e,u)&&u!==n&&D(e,u,{get:()=>t[u],enumerable:!(l=re(t,u))||l.enumerable});return e};var W=(e,t,n)=>(n=e!=null?te(ie(e)):{},q(t||!e||!e.__esModule?D(n,"default",{value:e,enumerable:!0}):n,e)),ae=e=>q(D({},"__esModule",{value:!0}),e);var S=oe(($e,J)=>{"use strict";J.exports=le;function B(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function le(e){if(e=e||{},e.circles)return ce(e);let t=new Map;if(t.set(Date,i=>new Date(i)),t.set(Map,(i,s)=>new Map(l(Array.from(i),s))),t.set(Set,(i,s)=>new Set(l(Array.from(i),s))),e.constructorHandlers)for(let i of e.constructorHandlers)t.set(i[0],i[1]);let n=null;return e.proto?c:u;function l(i,s){let r=Object.keys(i),o=new Array(r.length);for(let m=0;m<r.length;m++){let f=r[m],p=i[f];typeof p!="object"||p===null?o[f]=p:p.constructor!==Object&&(n=t.get(p.constructor))?o[f]=n(p,s):ArrayBuffer.isView(p)?o[f]=B(p):o[f]=s(p)}return o}function u(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return l(i,u);if(i.constructor!==Object&&(n=t.get(i.constructor)))return n(i,u);let s={};for(let r in i){if(Object.hasOwnProperty.call(i,r)===!1)continue;let o=i[r];typeof o!="object"||o===null?s[r]=o:o.constructor!==Object&&(n=t.get(o.constructor))?s[r]=n(o,u):ArrayBuffer.isView(o)?s[r]=B(o):s[r]=u(o)}return s}function c(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return l(i,c);if(i.constructor!==Object&&(n=t.get(i.constructor)))return n(i,c);let s={};for(let r in i){let o=i[r];typeof o!="object"||o===null?s[r]=o:o.constructor!==Object&&(n=t.get(o.constructor))?s[r]=n(o,c):ArrayBuffer.isView(o)?s[r]=B(o):s[r]=c(o)}return s}}function ce(e){let t=[],n=[],l=new Map;if(l.set(Date,r=>new Date(r)),l.set(Map,(r,o)=>new Map(c(Array.from(r),o))),l.set(Set,(r,o)=>new Set(c(Array.from(r),o))),e.constructorHandlers)for(let r of e.constructorHandlers)l.set(r[0],r[1]);let u=null;return e.proto?s:i;function c(r,o){let m=Object.keys(r),f=new Array(m.length);for(let p=0;p<m.length;p++){let g=m[p],a=r[g];if(typeof a!="object"||a===null)f[g]=a;else if(a.constructor!==Object&&(u=l.get(a.constructor)))f[g]=u(a,o);else if(ArrayBuffer.isView(a))f[g]=B(a);else{let b=t.indexOf(a);b!==-1?f[g]=n[b]:f[g]=o(a)}}return f}function i(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return c(r,i);if(r.constructor!==Object&&(u=l.get(r.constructor)))return u(r,i);let o={};t.push(r),n.push(o);for(let m in r){if(Object.hasOwnProperty.call(r,m)===!1)continue;let f=r[m];if(typeof f!="object"||f===null)o[m]=f;else if(f.constructor!==Object&&(u=l.get(f.constructor)))o[m]=u(f,i);else if(ArrayBuffer.isView(f))o[m]=B(f);else{let p=t.indexOf(f);p!==-1?o[m]=n[p]:o[m]=i(f)}}return t.pop(),n.pop(),o}function s(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return c(r,s);if(r.constructor!==Object&&(u=l.get(r.constructor)))return u(r,s);let o={};t.push(r),n.push(o);for(let m in r){let f=r[m];if(typeof f!="object"||f===null)o[m]=f;else if(f.constructor!==Object&&(u=l.get(f.constructor)))o[m]=u(f,s);else if(ArrayBuffer.isView(f))o[m]=B(f);else{let p=t.indexOf(f);p!==-1?o[m]=n[p]:o[m]=s(f)}}return t.pop(),n.pop(),o}}});var be={};ue(be,{defaults:()=>j,isOpening:()=>de,version:()=>he});function P(e){return typeof e!="string"?e:e.length?[e]:[]}var U=W(S(),1);var Ae=(0,U.default)();function L(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function C(e){return typeof e=="string"}function Q(e,t){return L(e)&&C(t)&&t in e}var K={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},fe=e=>e+1;function me(e,t,n,l,u=!1,c=fe){var h;let i=typeof n=="function"?n():n;if(+t<0&&u&&i==="EOL")return i;let s=v(v({},K),l);if(t>=e.length&&!u)return!1;let r=u?1:n.length,o=0,m=!1,f=!1,p=!1,g=s.maxMismatches,a=t,b=!1,d=!1,w=!1;function $(){return o===1&&g<s.maxMismatches-1}for(;e[a];){let y=c(a);if(s.trimBeforeMatching&&e[a].trim()===""){if(!e[y]&&u&&n==="EOL")return!0;a=c(a);continue}if(s&&!s.i&&((h=s==null?void 0:s.trimCharsBeforeMatching)!=null&&h.includes(e[a]))||s!=null&&s.i&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.map(O=>O.toLowerCase()).includes(e[a].toLowerCase())){if(u&&n==="EOL"&&!e[y])return!0;a=c(a);continue}let k=y>a?n[n.length-r]:n[r-1];if(!s.i&&e[a]===k||s.i&&e[a].toLowerCase()===k.toLowerCase()){if(b||(b=!0),p||(p=!0),r===n.length){if(d=!0,g!==s.maxMismatches)return!1}else r===1&&(w=!0);if(r-=1,o++,$())return!1;if(!r)return o!==n.length||g===s.maxMismatches||!m?a:!1}else if(!m&&!o&&(m=!0),s.maxMismatches&&g&&a){g-=1;for(let O=0;O<=g;O++){let A=y>a?n[n.length-r+1+O]:n[r-2-O],E=e[c(a)];if(A&&(!s.i&&e[a]===A||s.i&&e[a].toLowerCase()===A.toLowerCase())&&(!s.firstMustMatch||r!==n.length)){if(o++,$())return!1;r-=2,b=!0;break}else if(E&&A&&(!s.i&&E===A||s.i&&E.toLowerCase()===A.toLowerCase())&&(!s.firstMustMatch||r!==n.length)){if(!o&&!s.hungry)return!1;r-=1,b=!0;break}else if(A===void 0&&g>=0&&b&&(!s.firstMustMatch||d)&&(!s.lastMustMatch||w))return a}b||(f=a)}else return a===0&&r===1&&!s.lastMustMatch&&p?0:!1;if(f!==!1&&f!==a&&(f=!1),r<1)return a;a=c(a)}if(r>0)return u&&i==="EOL"?!0:s&&s.maxMismatches>=r&&p?f||0:!1}function z(e,t,n,l,u){var m,f,p;if(L(u)&&Q(u,"trimBeforeMatching")&&u&&typeof u.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(u.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let c=v(v({},K),u);if(typeof c.trimCharsBeforeMatching=="string"&&(c.trimCharsBeforeMatching=P(c.trimCharsBeforeMatching)),c.trimCharsBeforeMatching=c.trimCharsBeforeMatching.map(g=>C(g)?g:String(g)),!C(t)||!t.length)return!1;if(!Number.isInteger(n)||n<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 n}, equal to:
11
- ${JSON.stringify(n,null,4)}`);let i,s;if(C(l))i=[l];else if(Array.isArray(l))i=l;else if(!l)i=l;else if(typeof l=="function")i=[],i.push(l);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 l}, equal to:
12
- ${JSON.stringify(l,null,4)}`);if(u&&!L(u))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 u}", and equal to:
13
- ${JSON.stringify(u,null,4)}`);let r=0,o="";if((m=c==null?void 0:c.trimCharsBeforeMatching)!=null&&m.some((g,a)=>g.length>1?(r=a,o=g,!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 ${r} is longer than 1 character, ${o.length} (equals to ${o}). Please split it into separate characters and put into array as separate elements.`);if(!i||!Array.isArray(i)||Array.isArray(i)&&!i.length||Array.isArray(i)&&i.length===1&&C(i[0])&&!i[0].trim()){if(typeof c.cb=="function"){let a,b=n;if((e==="matchLeftIncl"||e==="matchRight")&&(b+=1),e[5]==="L")for(let h=b;h--;){let y=t[h];if((!c.trimBeforeMatching||c.trimBeforeMatching&&(y!=null&&y.trim()))&&(!((f=c.trimCharsBeforeMatching)!=null&&f.length)||y!==void 0&&!c.trimCharsBeforeMatching.includes(y))){a=h;break}}else if(e.startsWith("matchRight"))for(let h=b;h<t.length;h++){let y=t[h];if((!c.trimBeforeMatching||c.trimBeforeMatching&&y.trim())&&(!((p=c.trimCharsBeforeMatching)!=null&&p.length)||!c.trimCharsBeforeMatching.includes(y))){a=h;break}}if(a===void 0)return!1;let d=t[a],w=a+1,$="";return w&&w>0&&($=t.slice(0,w)),e[5]==="L"||a&&a>0&&($=t.slice(a)),c.cb(d,$,a)}let g="";throw u||(g=" 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!${g}`)}for(let g=0,a=i.length;g<a;g++){s=typeof i[g]=="function";let b=i[g],d,w,$="",h=n;e==="matchRight"?h+=1:e==="matchLeft"&&(h-=1);let y=me(t,h,b,c,s,k=>e[5]==="L"?k-1:k+1);if(y&&s&&typeof b=="function"&&b()==="EOL")return b()&&(!c.cb||c.cb(d,$,w))?b():!1;if(Number.isInteger(y)&&(w=e.startsWith("matchLeft")?y-1:y+1,e[5]==="L"?$=t.slice(0,y):$=t.slice(w)),w<0&&(w=void 0),t[w]&&(d=t[w]),Number.isInteger(y)&&(!c.cb||c.cb(d,$,w)))return b}return!1}function G(e,t,n,l){return z("matchRightIncl",e,t,n,l)}function Z(e,t,n,l){return z("matchRight",e,t,n,l)}var Y=W(S(),1);var Re=(0,Y.default)();var x="\xA0";function ge({str:e,idx:t,stopAtNewlines:n,stopAtRawNbsp:l}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||n&&`
14
- \r`.includes(e[~-t])||l&&e[~-t]===x))return~-t;if(e[t-2]&&(e[t-2].trim()||n&&`
15
- \r`.includes(e[t-2])||l&&e[t-2]===x))return t-2;for(let u=t;u--;)if(e[u]&&(e[u].trim()||n&&`
16
- \r`.includes(e[u])||l&&e[u]===x))return u;return null}function M(e,t=0){return ge({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var j={allowCustomTagNames:!1,skipOpeningBracket:!1},T="\\",I=["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 X(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}function N(e,t){return e[t]==="<"||e[M(e,t)]==="<"}var ee="4.0.22";var he=ee;function de(e,t=0,n){var O,A,E;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 l=v(v({},j),n),u="[\\\\ \\t\\r\\n/]*",c="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",i=new RegExp(`^<${l.skipOpeningBracket?"?":""}${u}\\w+${u}\\/?${u}>`,"g"),s=new RegExp(`^<${l.skipOpeningBracket?"?":""}${u}[${c}]+[-${c}]*${u}>`,"g"),r=new RegExp(`^<${l.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),o=new RegExp(`^<${l.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${c}]+[-${c}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),m=new RegExp(`^<${l.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),f=new RegExp(`^<${l.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${c}]+[-${c}]*\\s*\\/?\\s*>`,"g"),p=new RegExp(`^<${l.skipOpeningBracket?"?":""}${u}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),g=new RegExp(`^<${l.skipOpeningBracket?"?":""}${u}[${c}]+[-${c}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),a=new RegExp(`^<${l.skipOpeningBracket?"?\\/?":""}(${u}[${c}]+)+${u}[\\\\/=>]`,""),b=new RegExp("^\\/\\s*\\w+s*>"),d=t?e.slice(t):e,w=M(e,t),$=!1,h=!1,y={cb:X,i:!0,trimCharsBeforeMatching:["/",T,"!"," "," ",`
17
- `,"\r"]};return l.allowCustomTagNames?((l.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[M(e,w)]==="<")||d[0]==="<"&&((O=d[1])!=null&&O.trim()))&&(a.test(d)||/^<\w+$/.test(d))||s.test(d)&&N(e,t)||o.test(d)||f.test(d)&&N(e,t)||g.test(d)||e[t]==="/"&&e[w]!=="<"&&b.test(d))&&(h=!0):(((l.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[M(e,w)]==="<")||(d[0]==="<"||d[0]==="/"&&(!e[w]||e[w]!=="<"))&&((A=d[1])!=null&&A.trim()))&&a.test(d)||i.test(d)&&N(e,t)||r.test(d)||m.test(d)&&N(e,t)||p.test(d))&&($=!0),$&&G(e,t,I,{cb:R=>{var V;return R===void 0?((e[t]==="<"&&((V=e[t+1])!=null&&V.trim())||e[t-1]==="<")&&(h=!0),!0):R.toUpperCase()===R.toLowerCase()&&!/\d/.test(R)&&R!=="="},i:!0,trimCharsBeforeMatching:["<","/",T,"!"," "," ",`
18
- `,"\r"]})&&(h=!0)),!h&&e[t]==="<"&&((E=e[t+1])!=null&&E.trim())&&Z(e,t,I,y)&&(h=!0),typeof e=="string"&&t<e.length&&h}return ae(be);})();
10
+ "use strict";var isHtmlTagOpening=(()=>{var te=Object.create;var D=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames,H=Object.getOwnPropertySymbols,ie=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var F=(e,t,n)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t)=>{for(var n in t||(t={}))_.call(t,n)&&F(e,n,t[n]);if(H)for(var n of H(t))se.call(t,n)&&F(e,n,t[n]);return e};var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ue=(e,t)=>{for(var n in t)D(e,n,{get:t[n],enumerable:!0})},q=(e,t,n,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of ne(t))!_.call(e,u)&&u!==n&&D(e,u,{get:()=>t[u],enumerable:!(l=re(t,u))||l.enumerable});return e};var W=(e,t,n)=>(n=e!=null?te(ie(e)):{},q(t||!e||!e.__esModule?D(n,"default",{value:e,enumerable:!0}):n,e)),ae=e=>q(D({},"__esModule",{value:!0}),e);var S=oe(($e,J)=>{"use strict";J.exports=le;function B(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function le(e){if(e=e||{},e.circles)return ce(e);let t=new Map;if(t.set(Date,i=>new Date(i)),t.set(Map,(i,s)=>new Map(l(Array.from(i),s))),t.set(Set,(i,s)=>new Set(l(Array.from(i),s))),e.constructorHandlers)for(let i of e.constructorHandlers)t.set(i[0],i[1]);let n=null;return e.proto?c:u;function l(i,s){let r=Object.keys(i),o=new Array(r.length);for(let g=0;g<r.length;g++){let f=r[g],p=i[f];typeof p!="object"||p===null?o[f]=p:p.constructor!==Object&&(n=t.get(p.constructor))?o[f]=n(p,s):ArrayBuffer.isView(p)?o[f]=B(p):o[f]=s(p)}return o}function u(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return l(i,u);if(i.constructor!==Object&&(n=t.get(i.constructor)))return n(i,u);let s={};for(let r in i){if(Object.hasOwnProperty.call(i,r)===!1)continue;let o=i[r];typeof o!="object"||o===null?s[r]=o:o.constructor!==Object&&(n=t.get(o.constructor))?s[r]=n(o,u):ArrayBuffer.isView(o)?s[r]=B(o):s[r]=u(o)}return s}function c(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return l(i,c);if(i.constructor!==Object&&(n=t.get(i.constructor)))return n(i,c);let s={};for(let r in i){let o=i[r];typeof o!="object"||o===null?s[r]=o:o.constructor!==Object&&(n=t.get(o.constructor))?s[r]=n(o,c):ArrayBuffer.isView(o)?s[r]=B(o):s[r]=c(o)}return s}}function ce(e){let t=[],n=[],l=new Map;if(l.set(Date,r=>new Date(r)),l.set(Map,(r,o)=>new Map(c(Array.from(r),o))),l.set(Set,(r,o)=>new Set(c(Array.from(r),o))),e.constructorHandlers)for(let r of e.constructorHandlers)l.set(r[0],r[1]);let u=null;return e.proto?s:i;function c(r,o){let g=Object.keys(r),f=new Array(g.length);for(let p=0;p<g.length;p++){let m=g[p],a=r[m];if(typeof a!="object"||a===null)f[m]=a;else if(a.constructor!==Object&&(u=l.get(a.constructor)))f[m]=u(a,o);else if(ArrayBuffer.isView(a))f[m]=B(a);else{let b=t.indexOf(a);b!==-1?f[m]=n[b]:f[m]=o(a)}}return f}function i(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return c(r,i);if(r.constructor!==Object&&(u=l.get(r.constructor)))return u(r,i);let o={};t.push(r),n.push(o);for(let g in r){if(Object.hasOwnProperty.call(r,g)===!1)continue;let f=r[g];if(typeof f!="object"||f===null)o[g]=f;else if(f.constructor!==Object&&(u=l.get(f.constructor)))o[g]=u(f,i);else if(ArrayBuffer.isView(f))o[g]=B(f);else{let p=t.indexOf(f);p!==-1?o[g]=n[p]:o[g]=i(f)}}return t.pop(),n.pop(),o}function s(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return c(r,s);if(r.constructor!==Object&&(u=l.get(r.constructor)))return u(r,s);let o={};t.push(r),n.push(o);for(let g in r){let f=r[g];if(typeof f!="object"||f===null)o[g]=f;else if(f.constructor!==Object&&(u=l.get(f.constructor)))o[g]=u(f,s);else if(ArrayBuffer.isView(f))o[g]=B(f);else{let p=t.indexOf(f);p!==-1?o[g]=n[p]:o[g]=s(f)}}return t.pop(),n.pop(),o}}});var be={};ue(be,{defaults:()=>j,isOpening:()=>de,version:()=>he});function P(e){return typeof e!="string"?e:e.length?[e]:[]}var U=W(S(),1);var Ae=(0,U.default)();function L(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function C(e){return typeof e=="string"}function Q(e,t){return L(e)&&C(t)&&t in e}var K={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},fe=e=>e+1;function ge(e,t,n,l,u=!1,c=fe){var h;let i=typeof n=="function"?n():n;if(+t<0&&u&&i==="EOL")return i;let s=O(O({},K),l);if(t>=e.length&&!u)return!1;let r=u?1:n.length,o=0,g=!1,f=!1,p=!1,m=s.maxMismatches,a=t,b=!1,d=!1,w=!1;function $(){return o===1&&m<s.maxMismatches-1}for(;e[a];){let y=c(a);if(s.trimBeforeMatching&&e[a].trim()===""){if(!e[y]&&u&&n==="EOL")return!0;a=c(a);continue}if(s&&!s.i&&((h=s==null?void 0:s.trimCharsBeforeMatching)!=null&&h.includes(e[a]))||s!=null&&s.i&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.map(v=>v.toLowerCase()).includes(e[a].toLowerCase())){if(u&&n==="EOL"&&!e[y])return!0;a=c(a);continue}let k=y>a?n[n.length-r]:n[r-1];if(!s.i&&e[a]===k||s.i&&e[a].toLowerCase()===k.toLowerCase()){if(b||(b=!0),p||(p=!0),r===n.length){if(d=!0,m!==s.maxMismatches)return!1}else r===1&&(w=!0);if(r-=1,o++,$())return!1;if(!r)return o!==n.length||m===s.maxMismatches||!g?a:!1}else if(!g&&!o&&(g=!0),s.maxMismatches&&m&&a){m-=1;for(let v=0;v<=m;v++){let A=y>a?n[n.length-r+1+v]:n[r-2-v],E=e[c(a)];if(A&&(!s.i&&e[a]===A||s.i&&e[a].toLowerCase()===A.toLowerCase())&&(!s.firstMustMatch||r!==n.length)){if(o++,$())return!1;r-=2,b=!0;break}else if(E&&A&&(!s.i&&E===A||s.i&&E.toLowerCase()===A.toLowerCase())&&(!s.firstMustMatch||r!==n.length)){if(!o&&!s.hungry)return!1;r-=1,b=!0;break}else if(A===void 0&&m>=0&&b&&(!s.firstMustMatch||d)&&(!s.lastMustMatch||w))return a}b||(f=a)}else return a===0&&r===1&&!s.lastMustMatch&&p?0:!1;if(f!==!1&&f!==a&&(f=!1),r<1)return a;a=c(a)}if(r>0)return u&&i==="EOL"?!0:s&&s.maxMismatches>=r&&p?f||0:!1}function z(e,t,n,l,u){var g,f,p;if(L(u)&&Q(u,"trimBeforeMatching")&&u&&typeof u.trimBeforeMatching!="boolean")throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!").concat(Array.isArray(u.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""));let c=O(O({},K),u);if(typeof c.trimCharsBeforeMatching=="string"&&(c.trimCharsBeforeMatching=P(c.trimCharsBeforeMatching)),c.trimCharsBeforeMatching=c.trimCharsBeforeMatching.map(m=>C(m)?m:String(m)),!C(t)||!t.length)return!1;if(!Number.isInteger(n)||n<0)throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ").concat(typeof n,", equal to:\n").concat(JSON.stringify(n,null,4)));let i,s;if(C(l))i=[l];else if(Array.isArray(l))i=l;else if(!l)i=l;else if(typeof l=="function")i=[],i.push(l);else throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ").concat(typeof l,", equal to:\n").concat(JSON.stringify(l,null,4)));if(u&&!L(u))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type \"").concat(typeof u,'", and equal to:\n').concat(JSON.stringify(u,null,4)));let r=0,o="";if((g=c==null?void 0:c.trimCharsBeforeMatching)!=null&&g.some((m,a)=>m.length>1?(r=a,o=m,!0):!1))throw new Error("string-match-left-right/".concat(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 ").concat(r," is longer than 1 character, ").concat(o.length," (equals to ").concat(o,"). Please split it into separate characters and put into array as separate elements."));if(!i||!Array.isArray(i)||Array.isArray(i)&&!i.length||Array.isArray(i)&&i.length===1&&C(i[0])&&!i[0].trim()){if(typeof c.cb=="function"){let a,b=n;if((e==="matchLeftIncl"||e==="matchRight")&&(b+=1),e[5]==="L")for(let h=b;h--;){let y=t[h];if((!c.trimBeforeMatching||c.trimBeforeMatching&&(y!=null&&y.trim()))&&(!((f=c.trimCharsBeforeMatching)!=null&&f.length)||y!==void 0&&!c.trimCharsBeforeMatching.includes(y))){a=h;break}}else if(e.startsWith("matchRight"))for(let h=b;h<t.length;h++){let y=t[h];if((!c.trimBeforeMatching||c.trimBeforeMatching&&y.trim())&&(!((p=c.trimCharsBeforeMatching)!=null&&p.length)||!c.trimCharsBeforeMatching.includes(y))){a=h;break}}if(a===void 0)return!1;let d=t[a],w=a+1,$="";return w&&w>0&&($=t.slice(0,w)),e[5]==="L"||a&&a>0&&($=t.slice(a)),c.cb(d,$,a)}let m="";throw u||(m=" More so, the whole options object, the fourth input argument, is missing!"),new Error("string-match-left-right/".concat(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!').concat(m))}for(let m=0,a=i.length;m<a;m++){s=typeof i[m]=="function";let b=i[m],d,w,$="",h=n;e==="matchRight"?h+=1:e==="matchLeft"&&(h-=1);let y=ge(t,h,b,c,s,k=>e[5]==="L"?k-1:k+1);if(y&&s&&typeof b=="function"&&b()==="EOL")return b()&&(!c.cb||c.cb(d,$,w))?b():!1;if(Number.isInteger(y)&&(w=e.startsWith("matchLeft")?y-1:y+1,e[5]==="L"?$=t.slice(0,y):$=t.slice(w)),w<0&&(w=void 0),t[w]&&(d=t[w]),Number.isInteger(y)&&(!c.cb||c.cb(d,$,w)))return b}return!1}function G(e,t,n,l){return z("matchRightIncl",e,t,n,l)}function Z(e,t,n,l){return z("matchRight",e,t,n,l)}var Y=W(S(),1);var Re=(0,Y.default)();var x="\xA0";function me({str:e,idx:t,stopAtNewlines:n,stopAtRawNbsp:l}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||n&&"\n\r".includes(e[~-t])||l&&e[~-t]===x))return~-t;if(e[t-2]&&(e[t-2].trim()||n&&"\n\r".includes(e[t-2])||l&&e[t-2]===x))return t-2;for(let u=t;u--;)if(e[u]&&(e[u].trim()||n&&"\n\r".includes(e[u])||l&&e[u]===x))return u;return null}function M(e,t=0){return me({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var j={allowCustomTagNames:!1,skipOpeningBracket:!1},T="\\",I=["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 X(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}function N(e,t){return e[t]==="<"||e[M(e,t)]==="<"}var ee="4.0.32";var he=ee;function de(e,t=0,n){var v,A,E;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 "'.concat(typeof e,'", value being ').concat(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 "'.concat(typeof t,'", value being ').concat(JSON.stringify(t,null,4)));let l=O(O({},j),n),u="[\\\\ \\t\\r\\n/]*",c="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",i=new RegExp("^<".concat(l.skipOpeningBracket?"?":"").concat(u,"\\w+").concat(u,"\\/?").concat(u,">"),"g"),s=new RegExp("^<".concat(l.skipOpeningBracket?"?":"").concat(u,"[").concat(c,"]+[-").concat(c,"]*").concat(u,">"),"g"),r=new RegExp("^<".concat(l.skipOpeningBracket?"?":"","\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['\"\\w]"),"g"),o=new RegExp("^<".concat(l.skipOpeningBracket?"?":"","\\s*\\w+\\s+[").concat(c,"]+[-").concat(c,"]*(?:-\\w+)?\\s*=\\s*['\"\\w]")),g=new RegExp("^<".concat(l.skipOpeningBracket?"?":"","\\s*\\/?\\s*\\w+\\s*\\/?\\s*>"),"g"),f=new RegExp("^<".concat(l.skipOpeningBracket?"?":"","\\s*\\/?\\s*[").concat(c,"]+[-").concat(c,"]*\\s*\\/?\\s*>"),"g"),p=new RegExp("^<".concat(l.skipOpeningBracket?"?":"").concat(u,"\\w+(?:\\s*\\w+)?\\s*\\w+=['\"]"),"g"),m=new RegExp("^<".concat(l.skipOpeningBracket?"?":"").concat(u,"[").concat(c,"]+[-").concat(c,"]*\\s+(?:\\s*\\w+)?\\s*\\w+=['\"]"),"g"),a=new RegExp("^<".concat(l.skipOpeningBracket?"?\\/?":"","(").concat(u,"[").concat(c,"]+)+").concat(u,"[\\\\/=>]"),""),b=new RegExp("^\\/\\s*\\w+s*>"),d=t?e.slice(t):e,w=M(e,t),$=!1,h=!1,y={cb:X,i:!0,trimCharsBeforeMatching:["/",T,"!"," "," ","\n","\r"]};return l.allowCustomTagNames?((l.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[M(e,w)]==="<")||d[0]==="<"&&((v=d[1])!=null&&v.trim()))&&(a.test(d)||/^<\w+$/.test(d))||s.test(d)&&N(e,t)||o.test(d)||f.test(d)&&N(e,t)||m.test(d)||e[t]==="/"&&e[w]!=="<"&&b.test(d))&&(h=!0):(((l.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[M(e,w)]==="<")||(d[0]==="<"||d[0]==="/"&&(!e[w]||e[w]!=="<"))&&((A=d[1])!=null&&A.trim()))&&a.test(d)||i.test(d)&&N(e,t)||r.test(d)||g.test(d)&&N(e,t)||p.test(d))&&($=!0),$&&G(e,t,I,{cb:R=>{var V;return R===void 0?((e[t]==="<"&&((V=e[t+1])!=null&&V.trim())||e[t-1]==="<")&&(h=!0),!0):R.toUpperCase()===R.toLowerCase()&&!/\d/.test(R)&&R!=="="},i:!0,trimCharsBeforeMatching:["<","/",T,"!"," "," ","\n","\r"]})&&(h=!0)),!h&&e[t]==="<"&&((E=e[t+1])!=null&&E.trim())&&Z(e,t,I,y)&&(h=!0),typeof e=="string"&&t<e.length&&h}return ae(be);})();
19
11
  /**
20
12
  * @name arrayiffy-if-string
21
13
  * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
22
- * @version 5.0.10
14
+ * @version 5.0.19
23
15
  * @author Roy Revelt, Codsen Ltd
24
16
  * @license MIT
25
17
  * {@link https://codsen.com/os/arrayiffy-if-string/}
@@ -27,7 +19,7 @@ ${JSON.stringify(u,null,4)}`);let r=0,o="";if((m=c==null?void 0:c.trimCharsBefor
27
19
  /**
28
20
  * @name codsen-utils
29
21
  * @fileoverview Various utility functions
30
- * @version 1.6.7
22
+ * @version 1.6.17
31
23
  * @author Roy Revelt, Codsen Ltd
32
24
  * @license MIT
33
25
  * {@link https://codsen.com/os/codsen-utils/}
@@ -35,7 +27,7 @@ ${JSON.stringify(u,null,4)}`);let r=0,o="";if((m=c==null?void 0:c.trimCharsBefor
35
27
  /**
36
28
  * @name string-match-left-right
37
29
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
38
- * @version 9.0.22
30
+ * @version 9.0.32
39
31
  * @author Roy Revelt, Codsen Ltd
40
32
  * @license MIT
41
33
  * {@link https://codsen.com/os/string-match-left-right/}
@@ -43,7 +35,7 @@ ${JSON.stringify(u,null,4)}`);let r=0,o="";if((m=c==null?void 0:c.trimCharsBefor
43
35
  /**
44
36
  * @name string-left-right
45
37
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
46
- * @version 6.0.20
38
+ * @version 6.0.30
47
39
  * @author Roy Revelt, Codsen Ltd
48
40
  * @license MIT
49
41
  * {@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.22",
3
+ "version": "4.0.32",
4
4
  "description": "Does an HTML tag start at given position?",
5
5
  "keywords": [
6
6
  "bracket",
@@ -45,7 +45,7 @@
45
45
  "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --log-level 'silent'",
46
46
  "examples": "node '../../ops/scripts/run-examples.js'",
47
47
  "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
48
- "letspublish": "npm publish || :",
48
+ "letspublish": "npm publish --provenance || :",
49
49
  "lint": "eslint . --fix",
50
50
  "perf": "node perf/check.js",
51
51
  "prep": "echo 'ready'",
@@ -73,10 +73,13 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "string-left-right": "^6.0.20",
77
- "string-match-left-right": "^9.0.22"
76
+ "string-left-right": "^6.0.30",
77
+ "string-match-left-right": "^9.0.32"
78
78
  },
79
79
  "devDependencies": {
80
- "test-mixer": "^4.1.17"
80
+ "test-mixer": "^4.1.27"
81
+ },
82
+ "publishConfig": {
83
+ "registry": "https://registry.npmjs.org/"
81
84
  }
82
85
  }
package/types/index.d.ts CHANGED
@@ -14,4 +14,5 @@ declare function isOpening(
14
14
  opts?: Partial<Opts>,
15
15
  ): boolean;
16
16
 
17
- export { type Opts, defaultOpts as defaults, isOpening, version };
17
+ export { defaultOpts as defaults, isOpening, version };
18
+ export type { Opts };