string-remove-widows 4.2.0 → 4.2.2

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/CHANGELOG.md CHANGED
@@ -3,13 +3,19 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 4.2.2 (2026-08-22)
7
+
8
+ ### Performance Improvements
9
+
10
+ - optimise package hot paths and JSON editing ([f3112bd](https://github.com/codsen/codsen/commit/f3112bd7fc0d7c9bc09312d3744c950691d72ca5))
11
+
6
12
  ## 4.2.0 (2026-08-19)
7
13
 
8
14
  ### Bug Fixes
9
15
 
10
16
  - make validation diagnostics safe ([7b01074](https://github.com/codsen/codsen/commit/7b0107476f12734aeb8e82852ba980b187280110))
11
17
  - require a plain options object ([99991b2](https://github.com/codsen/codsen/commit/99991b2833d83c55a787aabd3365c25c63f6fb40))
12
- - resolve review findings REV-004 through REV-007 ([b60e9ee](https://github.com/codsen/codsen/commit/b60e9eeb499af94685cfb87b4970fe025be1fc10))
18
+ - resolve various review findings ([b60e9ee](https://github.com/codsen/codsen/commit/b60e9eeb499af94685cfb87b4970fe025be1fc10))
13
19
  - retire direct publish aliases ([f98e31e](https://github.com/codsen/codsen/commit/f98e31eb89bc185471225664e610b55f34fbf648))
14
20
 
15
21
  ### Features
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name string-remove-widows
3
3
  * @fileoverview Helps to prevent widow words in a text
4
- * @version 4.2.0
4
+ * @version 4.2.2
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-remove-widows/}
8
8
  */
9
9
 
10
- import{formatDiagnosticValue as q,isPlainObject as X,rawMDash as ee,rawNbsp as w,rawNDash as te}from"codsen-utils";import{rApply as G}from"ranges-apply";import{Ranges as oe}from"ranges-push";import{left as N,right as D}from"string-left-right";import{matchRightIncl as ne}from"string-match-left-right";var F="4.2.0";var f="&nbsp;",E="\\00A0",S="\\u00A0",R="&ndash;",M="\\2013",k="\\u2013",U="&mdash;",J="\\2014",I="\\u2014",C=[{heads:"{{",tails:"}}"},{heads:["{% if","{%- if"],tails:["{% endif","{%- endif"]},{heads:["{% for","{%- for"],tails:["{% endfor","{%- endfor"]},{heads:["{%","{%-"],tails:["%}","-%}"]},{heads:"{#",tails:"#}"}],B=[{heads:"{{",tails:"}}"}],P=[{heads:["<%","<%=","<%-"],tails:["%>","=%>","-%>"]}],_=["abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"];var ge=F,se={removeWidowPreventionMeasures:!1,convertEntities:!0,targetLanguage:"html",UKPostcodes:!1,hyphens:!0,minWordCount:4,minCharCount:5,ignore:[],reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,tagRanges:[]};function be(t,h){let K=Date.now();if(typeof t!="string")throw t===void 0?new Error("string-remove-widows/removeWidows(): [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`string-remove-widows/removeWidows(): [THROW_ID_02] the first input argument must be string! It was given as "${typeof t}", equal to:
10
+ import{formatDiagnosticValue as q,isPlainObject as X,rawMDash as ee,rawNbsp as w,rawNDash as te}from"codsen-utils";import{rApply as G}from"ranges-apply";import{Ranges as oe}from"ranges-push";import{left as N,right as D}from"string-left-right";import{matchRightIncl as ne}from"string-match-left-right";var F="4.2.2";var f="&nbsp;",E="\\00A0",S="\\u00A0",R="&ndash;",M="\\2013",k="\\u2013",U="&mdash;",J="\\2014",I="\\u2014",C=[{heads:"{{",tails:"}}"},{heads:["{% if","{%- if"],tails:["{% endif","{%- endif"]},{heads:["{% for","{%- for"],tails:["{% endfor","{%- endfor"]},{heads:["{%","{%-"],tails:["%}","-%}"]},{heads:"{#",tails:"#}"}],B=[{heads:"{{",tails:"}}"}],P=[{heads:["<%","<%=","<%-"],tails:["%>","=%>","-%>"]}],_=["abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"];var ge=F,se={removeWidowPreventionMeasures:!1,convertEntities:!0,targetLanguage:"html",UKPostcodes:!1,hyphens:!0,minWordCount:4,minCharCount:5,ignore:[],reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,tagRanges:[]};function be(t,h){let K=Date.now();if(typeof t!="string")throw t===void 0?new Error("string-remove-widows/removeWidows(): [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`string-remove-widows/removeWidows(): [THROW_ID_02] the first input argument must be string! It was given as "${typeof t}", equal to:
11
11
  ${q(t,4)}`);if(h&&!X(h))throw new Error(`string-remove-widows/removeWidows(): [THROW_ID_03] the second input argument, options object, should be a plain object but it was given as type ${typeof h}, equal to ${q(h,4)}`);let b=Array.isArray,L=t.length,a=new oe({mergeType:2}),Z=["."],Y=/[A-Z]{1,2}[0-9][0-9A-Z]?$/,z=/^[0-9][A-Z]{2}/,v=.06,$,W=0,g=0,A=0,y,T,l,c,r,d,s,p,o={...se,...h},m={removeWidows:!1,convertEntities:!1};if(!o.ignore||!b(o.ignore)&&typeof o.ignore!="string")o.ignore=[];else if(typeof o.ignore=="string"&&(o.ignore=[o.ignore]),o.ignore.includes("all"))o.ignore=o.ignore.concat(C.concat(P));else if(o.ignore.some(e=>typeof e=="string")){let e=[];o.ignore=o.ignore.filter(i=>typeof i=="string"&&i.length?(["nunjucks","jinja","liquid"].includes(i.trim().toLowerCase())?e=e.concat(C):["hugo"].includes(i.trim().toLowerCase())?e=e.concat(B):["hexo"].includes(i.trim().toLowerCase())&&(e=e.concat(P)),!1):typeof i=="object"),e.length&&(o.ignore=o.ignore.concat(e))}let x;o.reportProgressFunc&&(x=Math.floor(o.reportProgressFuncTo-(o.reportProgressFuncTo-o.reportProgressFuncFrom)*v-o.reportProgressFuncFrom));function V(e,i){let n=w;o.removeWidowPreventionMeasures?n=" ":o.convertEntities&&(n=f,typeof o.targetLanguage=="string"&&(o.targetLanguage.trim().toLowerCase()==="css"?n=E:o.targetLanguage.trim().toLowerCase()==="js"&&(n=S))),t.slice(e,i)!==n&&a.push(e,i,n)}function O(){g=0,A=0,y=void 0,T=void 0,l=void 0,c=void 0,r=void 0,d=void 0}O();for(let e=0;e<=L;e++){if(!s&&b(o.ignore)&&o.ignore.length&&o.ignore.some((n,u)=>b(n.heads)&&n.heads.some(j=>t.startsWith(j,e))||typeof n.heads=="string"&&t.startsWith(n.heads,e)?(g+=1,s=o.ignore[u].tails,!0):!1),!s&&p&&p===e&&(g+=1,p=void 0),typeof o.reportProgressFunc=="function"&&($=o.reportProgressFuncFrom+Math.floor(e/L*(x||1)),$!==W&&(W=$,o.reportProgressFunc($))),!s&&e&&t[e]?.trim()&&(!t[e-1]||t[e-1]&&!t[e-1].trim())&&(c=e),!s&&t[e]?.trim()&&(A+=1),!s&&o.hyphens&&(`-${ee}${te}`.includes(t[e])||t.startsWith(R,e)||t.startsWith(M,e)||t.startsWith(k,e)||t.startsWith(U,e)||t.startsWith(J,e)||t.startsWith(I,e))&&t[e+1]&&(!t[e+1].trim()||t[e]==="&")&&t[e-1]&&!t[e-1].trim()&&t[N(t,e)]&&(V(N(t,e)+1,e),m.removeWidows=!0),!s&&(t.startsWith("&nbsp;",e)||t.startsWith("&#160;",e))&&(r=e,d=e+6,t[e+6]?.trim()&&(p=e+6),o.convertEntities?(o.targetLanguage==="css"||o.targetLanguage==="js")&&(a.push(e,e+6,o.targetLanguage==="css"?E:S),m.convertEntities=!0):(a.push(e,e+6,w),m.convertEntities=!0)),!s&&t[e+4]&&t[e]==="\\"&&t[e+1]==="0"&&t[e+2]==="0"&&t[e+3].toUpperCase()==="A"&&t[e+4]==="0"&&(r=e,d=e+5,t[e+5]?.trim()&&(p=e+5),o.convertEntities?(o.targetLanguage==="html"||o.targetLanguage==="js")&&(a.push(e,e+5,o.targetLanguage==="html"?f:S),m.convertEntities=!0):(a.push(e,e+5,w),m.convertEntities=!0)),!s&&t[e]==="\\"&&t[e+1]?.toLowerCase()==="u"&&t[e+2]==="0"&&t[e+3]==="0"&&t[e+4]?.toUpperCase()==="A"&&t[e+5]==="0"&&(r=e,d=e+6,t[e+6]?.trim()&&(p=e+6),o.convertEntities?(o.targetLanguage==="html"||o.targetLanguage==="css")&&a.push(e,e+6,o.targetLanguage==="html"?f:E):a.push(e,e+6,w)),!s&&t[e]===w&&(r=e,d=e+1,o.convertEntities&&a.push(e,e+1,o.targetLanguage==="css"?E:o.targetLanguage==="js"?S:f)),!s&&t[e]?.trim()&&!t[e-1]?.trim()&&(g+=1),!s&&(!t[e]||`\r
12
12
  `.includes(t[e])||(t[e]===`
13
13
  `||t[e]==="\r"||t[e]==="\r"&&t[e+1]===`
@@ -1,17 +1,17 @@
1
1
  /**
2
2
  * @name string-remove-widows
3
3
  * @fileoverview Helps to prevent widow words in a text
4
- * @version 4.2.0
4
+ * @version 4.2.2
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-remove-widows/}
8
8
  */
9
9
 
10
- "use strict";var stringRemoveWidows=(()=>{var U=Object.defineProperty;var Fe=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames,me=Object.getOwnPropertySymbols;var $e=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var K=(e,t,n)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W=(e,t)=>{for(var n in t||(t={}))$e.call(t,n)&&K(e,n,t[n]);if(me)for(var n of me(t))He.call(t,n)&&K(e,n,t[n]);return e};var Pe=(e,t)=>{for(var n in t)U(e,n,{get:t[n],enumerable:!0})},Be=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of ke(t))!$e.call(e,u)&&u!==n&&U(e,u,{get:()=>t[u],enumerable:!(s=Fe(t,u))||s.enumerable});return e};var Ue=e=>Be(U({},"__esModule",{value:!0}),e);var F=(e,t,n)=>K(e,typeof t!="symbol"?t+"":t,n);var ut={};Pe(ut,{defaults:()=>_e,removeWidows:()=>lt,version:()=>at});function qe(){let e=[],t=0,n=!1;return{append(s){return n?!1:t+s.length>1999?(e.push("\u2026"),t+=1,n=!0,!1):(e.push(s),t+=s.length,!0)},result(){return e.join("")},stopped(){return n}}}function Je(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function q(e,t){if(e.append('"')){for(let n=0;n<t.length&&!e.stopped();n+=1){let s=t.charCodeAt(n);s===34?e.append('\\"'):s===92?e.append("\\\\"):s===8?e.append("\\b"):s===9?e.append("\\t"):s===10?e.append("\\n"):s===12?e.append("\\f"):s===13?e.append("\\r"):s<32||s===8232||s===8233||s>=55296&&s<=57343?e.append(Je(s)):e.append(t[n])}e.append('"')}}function Ge(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function ye(e,t){e.append("Symbol(");let n=String(t);n.length>8&&q(e,n.slice(7,-1)),e.append(")")}function be(e,t){typeof t=="symbol"?ye(e,t):q(e,String(t))}function $(e,t=0){let n=qe(),s=t===4?4:0,u=new WeakSet,r=0;function g(a){s&&n.append(" ".repeat(a*s))}function l(a,p){a&&n.append(","),s&&(n.append("\n"),g(p+1))}function c(a,p,w){s&&p&&(n.append("\n"),g(w)),n.append(a)}function i(a,p){Object.prototype.hasOwnProperty.call(a,"value")?h(a.value,p):n.append(Ge(a))}function m(a,p){let w;try{w=Reflect.getOwnPropertyDescriptor(a,"length")}catch(b){n.append("[Uninspectable]");return}let y=w==null?void 0:w.value;if(!Number.isSafeInteger(y)||y<0){n.append("[Uninspectable]");return}n.append("[");let A=!1;for(let b=0;b<y&&!n.stopped();b+=1){if(l(A,p),A=!0,r>=50){n.append("[MaxEntries]");break}r+=1;let d;try{d=Reflect.getOwnPropertyDescriptor(a,String(b))}catch(S){n.append("[Uninspectable]");continue}d!=null&&d.enumerable?i(d,p+1):n.append("[Empty]")}c("]",A,p)}function v(a,p){let w;try{w=Reflect.ownKeys(a)}catch(A){n.append("[Uninspectable]");return}n.append("{");let y=!1;for(let A of w){if(n.stopped())break;if(r>=50){l(y,p),y=!0,q(n,"\u2026"),n.append(s?": ":":"),n.append("[MaxEntries]");break}r+=1;let b;try{b=Reflect.getOwnPropertyDescriptor(a,A)}catch(d){l(y,p),y=!0,be(n,A),n.append(s?": ":":"),n.append("[Uninspectable]");continue}b!=null&&b.enumerable&&(l(y,p),y=!0,be(n,A),n.append(s?": ":":"),i(b,p+1))}c("}",y,p)}function T(a,p){if(u.has(a)){n.append("[Circular]");return}if(p>=5){n.append("[MaxDepth]");return}let w;try{w=Array.isArray(a)}catch(y){n.append("[Uninspectable]");return}u.add(a);try{w?m(a,p):v(a,p)}finally{u.delete(a)}}function h(a,p){a===null?n.append("null"):typeof a=="string"?q(n,a):typeof a=="number"?n.append(Object.is(a,-0)?"-0":String(a)):typeof a=="boolean"?n.append(a?"true":"false"):typeof a>"u"?n.append("undefined"):typeof a=="bigint"?n.append("".concat(a,"n")):typeof a=="symbol"?ye(n,a):typeof a=="function"?n.append("[Function]"):T(a,p)}try{return h(e,0),n.result()}catch(a){return"[Uninspectable]"}}var we="\u2013",Ae="\u2014",L="\xA0";var gt=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]),ze=Object.prototype.hasOwnProperty;function N(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 R(e){return typeof e=="string"}function Ee(e){return Number.isFinite(e)}function M(e){return Number.isSafeInteger(e)&&e>=0}function I(e){return e!=null}function ve(e,t){return N(e)&&R(t)&&ze.call(e,t)}var Ke={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function V(e,t){if(!Array.isArray(e)||!e.length)return e;let n=W(W({},Ke),t),s,u;if(n.strictlyTwoElementsInRangeArrays&&!e.every((l,c)=>!Array.isArray(l)||l.length!==2?(s=c,u=l.length,!1):!0))throw new TypeError("ranges-sort/rSort(): [THROW_ID_01] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ".concat(s,"th range (").concat($(e[s],4),") has not two but ").concat(u," elements!"));if(!e.every((l,c)=>!Array.isArray(l)||!Number.isInteger(l[0])||l[0]<0||!Number.isInteger(l[1])||l[1]<0?(s=c,!1):!0))throw new TypeError("ranges-sort/rSort(): [THROW_ID_02] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ".concat(s,"th range (").concat($(e[s],4),") does not consist of only natural numbers!"));let r=e.length**2,g=0;return Array.from(e).sort((l,c)=>(n.progressFn&&(g+=1,n.progressFn(Math.floor(g*100/r))),l[0]===c[0]?l[1]<c[1]?-1:l[1]>c[1]?1:0:l[0]<c[0]?-1:1))}var Qe={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function Q(e,t){function n(i){return!!i&&typeof i=="object"&&!Array.isArray(i)}if(!Array.isArray(e)||!e.length)return null;if(t&&!n(t))throw new TypeError("ranges-merge/rMerge(): [THROW_ID_01] the second input argument must be a plain object. It was given as:\n".concat($(t,4)," (type ").concat(typeof t,")"));let s=W(W({},Qe),t);if(s.progressFn&&n(s.progressFn)&&!Object.keys(s.progressFn).length)s.progressFn=null;else if(s.progressFn&&typeof s.progressFn!="function")throw new TypeError('ranges-merge/rMerge(): [THROW_ID_02] opts.progressFn must be a function! It was given of a type: "'.concat(typeof s.progressFn,'", equal to ').concat($(s.progressFn,4)));if(![1,2,"1","2"].includes(s.mergeType))throw new TypeError('ranges-merge/rMerge(): [THROW_ID_03] opts.mergeType was customised to a wrong thing! It was given of a type: "'.concat(typeof s.mergeType,'", equal to ').concat($(s.mergeType,4)));if(typeof s.joinRangesThatTouchEdges!="boolean")throw new TypeError('ranges-merge/rMerge(): [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "'.concat(typeof s.joinRangesThatTouchEdges,'", equal to ').concat($(s.joinRangesThatTouchEdges,4)));let u=e.filter(i=>Array.isArray(i)).map(i=>[...i]).filter(i=>i[2]!==void 0||i[0]!==i[1]),r,g,l;s.progressFn?r=V(u,{progressFn:i=>{l=Math.floor(i/5),l!==g&&(g=l,s.progressFn(l))}}):r=V(u);let c=r.length-1;for(let i=c;i>0;i--)s.progressFn&&(l=Math.floor((1-i/c)*78)+21,l!==g&&l>g&&(g=l,s.progressFn(l))),(r[i][0]<=r[i-1][0]||!s.joinRangesThatTouchEdges&&r[i][0]<r[i-1][1]||s.joinRangesThatTouchEdges&&r[i][0]<=r[i-1][1])&&(r[i-1][0]=Math.min(r[i][0],r[i-1][0]),r[i-1][1]=Math.max(r[i][1],r[i-1][1]),r[i][2]!==void 0&&(r[i-1][0]>=r[i][0]||r[i-1][1]<=r[i][1])&&r[i-1][2]!==null&&(r[i][2]===null&&r[i-1][2]!==null?r[i-1][2]=null:r[i-1][2]!=null?+s.mergeType==2&&r[i-1][0]===r[i][0]?r[i-1][2]=r[i][2]:r[i-1][2]+=r[i][2]:r[i-1][2]=r[i][2]),r.splice(i,1),i=r.length);return r.length?r:null}function J(e){if(typeof e=="number")return Number.isInteger(e)&&e>=0;if(typeof e!="string"||!e.trim())return!1;let t=Number(e);return Number.isInteger(t)&&t>=0}function Z(e,t,n){let s=0,u=0;if(e===void 0&&t===void 0&&n===void 0)throw new Error("ranges-apply/rApply(): [THROW_ID_01] inputs missing!");if(typeof e!="string")throw new TypeError("ranges-apply/rApply(): [THROW_ID_02] first input argument must be a string! Currently it's: ".concat(typeof e,", equal to: ").concat($(e,4)));if(t!=null&&!Array.isArray(t))throw new TypeError("ranges-apply/rApply(): [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ".concat(typeof t,", equal to: ").concat($(t,4)));if(n&&typeof n!="function")throw new TypeError("ranges-apply/rApply(): [THROW_ID_04] the third input argument must be a function (or falsy)! Currently it's: ".concat(typeof n,", equal to: ").concat($(n,4)));if(!(t!=null&&t.some(Boolean)))return e;let r;Array.isArray(t)&&!Array.isArray(t[0])&&J(t[0])&&J(t[1])?r=[Array.from(t)]:r=Array.from(t);let g=r.length,l=0;r.forEach((m,v)=>{if(m){if(n&&(s=Math.floor(l/g*10),s!==u&&(u=s,n(s))),!Array.isArray(m))throw new TypeError("ranges-apply/rApply(): [THROW_ID_05] ranges array, second input arg., has ".concat(v,"th element not an array: ").concat($(m,4),", which is ").concat(typeof m));if(!J(m[0]))throw new TypeError("ranges-apply/rApply(): [THROW_ID_06] ranges array, second input arg. has ".concat(v,"th element, array ").concat($(m),". Its first element is not a non-negative integer or string index, but ").concat(typeof m[0],", equal to: ").concat($(m[0],4),"."));if(typeof m[0]=="string"&&(r[v]=[...m],r[v][0]=Number(m[0])),!J(m[1]))throw new TypeError("ranges-apply/rApply(): [THROW_ID_07] ranges array, second input arg. has ".concat(v,"th element, array ").concat($(m),". Its second element is not a non-negative integer or string index, but ").concat(typeof m[1],", equal to: ").concat($(m[1],4),"."));typeof m[1]=="string"&&(r[v]===m&&(r[v]=[...m]),r[v][1]=Number(m[1])),l+=1}});let c=n?Q(r,{progressFn:m=>{s=10+Math.floor(m/10),s!==u&&(u=s,n(s))}}):Q(r),i=(c==null?void 0:c.length)||0;if(c&&i>0){let m=e.slice(c[i-1][1]);e=c.reduce((v,T,h,a)=>{n&&(s=20+Math.floor(h/i*80),s!==u&&(u=s,n(s)));let p=h===0?0:a[h-1][1],w=a[h][0];return"".concat(v).concat(e.slice(p,w)).concat(a[h][2]||"")},""),e+=m}return e}function G(e,t=1){let n="\xA0";function s(r){return Array.from(r).reverse().join("")}function u(r,g,l){let c=l?"\n":"\r",i=l?"\r":"\n";if(!r)return r;let m=0,v=0,T="";for(let h=0,a=r.length;h<a;h++)(r[h]===c||r[h]===i&&r[h-1]!==c)&&v++,"\r\n".includes(r[h])||r[h]===n?(m=0,r[h]===n?T+=r[h]:r[h]===c?v<=g&&(T+=r[h],r[h+1]===i&&(T+=r[h+1],h++)):r[h]===i&&(r==null?void 0:r[h-1])!==c&&v<=g&&(T+=r[h])):(m++,!r[h+1]&&!v&&(T+=" "));return T}if(typeof e=="string"&&e.length){let r=1;typeof+t=="number"&&Number.isInteger(+t)&&+t>=0&&(r=+t);let g="",l="";if(!e.trim())g=e;else if(!e[0].trim()){for(let c=0,i=e.length;c<i;c++)if(e[c].trim()){g=e.slice(0,c);break}}if(e.trim()&&(e.slice(-1).trim()===""||e.slice(-1)===n)){for(let c=e.length;c--;)if(e[c].trim()){l=e.slice(c+1);break}}return"".concat(u(g,r,!1)).concat(e.trim()).concat(s(u(s(l),r,!0)))}return e}var Ze={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function Ye(e,t){function n(i){return!!i&&typeof i=="object"&&!Array.isArray(i)}if(!Array.isArray(e)||!e.length)return null;if(t&&!n(t))throw new TypeError("ranges-push/rMerge(): [THROW_ID_10] the second input argument must be a plain object. It was given as:\n".concat($(t,4)," (type ").concat(typeof t,")"));let s=W(W({},Ze),t);if(s.progressFn&&n(s.progressFn)&&!Object.keys(s.progressFn).length)s.progressFn=null;else if(s.progressFn&&typeof s.progressFn!="function")throw new TypeError('ranges-push/rMerge(): [THROW_ID_11] resolvedOpts.progressFn must be a function! It was given of a type: "'.concat(typeof s.progressFn,'", equal to ').concat($(s.progressFn,4)));if(![1,2,"1","2"].includes(s.mergeType))throw new TypeError('ranges-push/rMerge(): [THROW_ID_12] resolvedOpts.mergeType was customised to a wrong thing! It was given of a type: "'.concat(typeof s.mergeType,'", equal to ').concat($(s.mergeType,4)));if(typeof s.joinRangesThatTouchEdges!="boolean")throw new TypeError('ranges-push/rMerge(): [THROW_ID_13] resolvedOpts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "'.concat(typeof s.joinRangesThatTouchEdges,'", equal to ').concat($(s.joinRangesThatTouchEdges,4)));let u=e.filter(i=>Array.isArray(i)).map(i=>[...i]).filter(i=>i[2]!==void 0||i[0]!==i[1]),r,g,l;s.progressFn?r=V(u,{progressFn:i=>{l=Math.floor(i/5),l!==g&&(g=l,s.progressFn!=null&&s.progressFn(l))}}):r=V(u);let c=r.length-1;for(let i=c;i>0;i--)s.progressFn&&(l=Math.floor((1-i/c)*78)+21,l!==g&&l>g&&(g=l,s.progressFn(l))),(r[i][0]<=r[i-1][0]||!s.joinRangesThatTouchEdges&&r[i][0]<r[i-1][1]||s.joinRangesThatTouchEdges&&r[i][0]<=r[i-1][1])&&(r[i-1][0]=Math.min(r[i][0],r[i-1][0]),r[i-1][1]=Math.max(r[i][1],r[i-1][1]),r[i][2]!==void 0&&(r[i-1][0]>=r[i][0]||r[i-1][1]<=r[i][1])&&r[i-1][2]!==null&&(r[i][2]===null&&r[i-1][2]!==null?r[i-1][2]=null:r[i-1][2]!=null?+s.mergeType==2&&r[i-1][0]===r[i][0]?r[i-1][2]=r[i][2]:r[i-1][2]+=r[i][2]:r[i-1][2]=r[i][2]),r.splice(i,1),i=r.length);return r.length?r:null}var Xe={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1};function Te(e){return e[2]===void 0&&e[0]===e[1]}function et(e){let t=-1;for(let n=0,s=e.length;n<s;n++){let u=e[n];if(Array.isArray(u)){if(u[0]<t)return!1;t=u[0]}}return!0}var We=class{constructor(e){F(this,"ranges");F(this,"opts");F(this,"sorted");if(e!=null&&!N(e))throw new TypeError("ranges-push/Ranges/constructor(): [THROW_ID_01] The options argument must be a plain object. It was given as ".concat($(e,4)," (type ").concat(typeof e,")."));let t=W(W({},Xe),e);if(t.mergeType&&t.mergeType!==1&&t.mergeType!==2)if(R(t.mergeType)&&t.mergeType.trim()==="1")t.mergeType=1;else if(R(t.mergeType)&&t.mergeType.trim()==="2")t.mergeType=2;else throw new Error('ranges-push/Ranges/constructor(): [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "'.concat(typeof t.mergeType,'", equal to ').concat($(t.mergeType,4)));this.opts=t,this.ranges=[],this.sorted=!0}add(e,t,n){var r;if(e==null&&t==null)return;if(I(e)&&!I(t)){if(Array.isArray(e)){if(e.length){if(e.some(g=>Array.isArray(g))){e.forEach(g=>{Array.isArray(g)&&this.add(...g)});return}e.length&&M(+e[0])&&M(+e[1])&&this.add(...e)}return}throw new TypeError('ranges-push/Ranges/add(): [THROW_ID_03] the first input argument, "from" is set ('.concat($(e),') but second-one, "to" is not (').concat($(t),")"))}else if(!I(e)&&I(t))throw new TypeError('ranges-push/Ranges/add(): [THROW_ID_04] the second input argument, "to" is set ('.concat($(t),') but first-one, "from" is not (').concat($(e),")"));let s=+e,u=+t;if(M(s)&&M(u)){if(I(n)&&!R(n)&&!Ee(n))throw new TypeError("ranges-push/Ranges/add(): [THROW_ID_05] The third argument, the value to add, was given not as string but ".concat(typeof n,", equal to:\n").concat($(n,4)));if(I(this.ranges)&&Array.isArray(this.last())&&s===this.last()[1]){if(this.last()[1]=u,this.last()[2],this.last()[2]!==null&&I(n)){let g=this.last()[2]&&this.last()[2].length&&(!((r=this.opts)!=null&&r.mergeType)||this.opts.mergeType===1)?"".concat(this.last()[2]).concat(n):n;this.opts.limitToBeAddedWhitespace&&(g=G(g,this.opts.limitLinebreaksCount)),R(g)&&!g.length||(this.last()[2]=g)}}else{this.ranges||(this.ranges=[]);let g=this.last();g&&s<g[0]&&(this.sorted=!1);let l=n!==void 0&&!(R(n)&&!n.length)?[s,u,n&&this.opts.limitToBeAddedWhitespace?G(n,this.opts.limitLinebreaksCount):n]:[s,u];this.ranges.push(l)}}else throw M(s)?new TypeError('ranges-push/Ranges/add(): [THROW_ID_07] "to" value, the second input argument, must be a natural number or zero! Currently it\'s of a type "'.concat(typeof t,'" equal to: ').concat($(t,4))):new TypeError('ranges-push/Ranges/add(): [THROW_ID_06] "from" value, the first input argument, must be a natural number or zero! Currently it\'s of a type "'.concat(typeof e,'" equal to: ').concat($(e,4)))}push(e,t,n){this.add(e,t,n)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=Ye(this.ranges,{mergeType:this.opts.mergeType}),this.sorted=!0,this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(e=>I(e[2])?[e[0],e[1],G(e[2],this.opts.limitLinebreaksCount)]:e):this.ranges):null}firstCovers(e){if(!M(e))throw new TypeError("ranges-push/Ranges/firstCovers(): [THROW_ID_08] the input argument must be a natural number or zero! It was given as ".concat($(e,4)," (type ").concat(typeof e,")"));if(!Array.isArray(this.ranges)||!this.ranges.length)return!1;let t=null;if(this.sorted){for(let s=0,u=this.ranges.length;s<u;s++){let r=this.ranges[s];if(!(!Array.isArray(r)||Te(r))){if(t===null){if(r[0]!==0)return!1;t=r[1]}else{if(r[0]>t)break;r[1]>t&&(t=r[1])}if(t>=e)return!0}}return t!==null&&t>=e}let n=!0;for(;n;){n=!1;for(let s=0,u=this.ranges.length;s<u;s++){let r=this.ranges[s];if(!(!Array.isArray(r)||Te(r))){if(r[0]<0)return!1;(t===null?r[0]===0:r[0]<=t&&r[1]>t)&&(t=r[1],n=!0)}}}return t!==null&&t>=e}wipe(){this.ranges=[],this.sorted=!0}replace(e){if(Array.isArray(e)&&e.length)if(Array.isArray(e[0])&&M(e[0][0]))this.ranges=Array.from(e),this.sorted=et(this.ranges);else throw new Error("ranges-push/Ranges/replace(): [THROW_ID_09] Single range was given but we expected array of arrays! The first element, ".concat($(e[0],4)," should be an array and its first element should be an integer, a string index."));else this.ranges=[],this.sorted=!0}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}};var j="\xA0";function tt({str:e,idx:t=0,stopAtNewlines:n=!1,stopAtRawNbsp:s=!1}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),!e[t+1]))return null;if(e[t+1]&&(e[t+1].trim()||n&&"\n\r".includes(e[t+1])||s&&e[t+1]===j))return t+1;if(e[t+2]&&(e[t+2].trim()||n&&"\n\r".includes(e[t+2])||s&&e[t+2]===j))return t+2;for(let u=t+1,r=e.length;u<r;u++)if(e[u].trim()||n&&"\n\r".includes(e[u])||s&&e[u]===j)return u;return null}function _(e,t=0){return tt({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}function rt({str:e,idx:t,stopAtNewlines:n,stopAtRawNbsp:s}){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])||s&&e[~-t]===j))return~-t;if(e[t-2]&&(e[t-2].trim()||n&&"\n\r".includes(e[t-2])||s&&e[t-2]===j))return t-2;for(let u=t;u--;)if(e[u]&&(e[u].trim()||n&&"\n\r".includes(e[u])||s&&e[u]===j))return u;return null}function k(e,t=0){return rt({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}function De(e){return typeof e!="string"?e:e.length?[e]:[]}var Se={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},nt=e=>e+1;function st(e,t,n,s,u=!1,r=nt){var b;let g=typeof n=="function"?n():n;if(+t<0&&u&&g==="EOL")return g;let l=W(W({},Se),s);if(t>=e.length&&!u)return!1;let c=u?1:n.length,i=0,m=!1,v=!1,T=!1,h=l.maxMismatches,a=t,p=!1,w=!1,y=!1;function A(){return i===1&&h<l.maxMismatches-1}for(;e[a];){let d=r(a);if(l.trimBeforeMatching&&e[a].trim()===""){if(!e[d]&&u&&n==="EOL")return!0;a=r(a);continue}if(l&&!l.i&&((b=l==null?void 0:l.trimCharsBeforeMatching)!=null&&b.includes(e[a]))||l!=null&&l.i&&l.trimCharsBeforeMatching&&l.trimCharsBeforeMatching.map(f=>f.toLowerCase()).includes(e[a].toLowerCase())){if(u&&n==="EOL"&&!e[d])return!0;a=r(a);continue}let S=d>a?n[n.length-c]:n[c-1];if(!l.i&&e[a]===S||l.i&&S!==void 0&&e[a].toLowerCase()===S.toLowerCase()){if(p||(p=!0),T||(T=!0),c===n.length){if(w=!0,h!==l.maxMismatches)return!1}else c===1&&(y=!0);if(c-=1,i++,A())return!1;if(!c)return i!==n.length||h===l.maxMismatches||!m?a:!1}else if(!m&&!i&&(m=!0),l.maxMismatches&&h&&a){h-=1;for(let f=0;f<=h;f++){let D=d>a?n[n.length-c+1+f]:n[c-2-f],x=e[r(a)];if(D&&(!l.i&&e[a]===D||l.i&&e[a].toLowerCase()===D.toLowerCase())&&(!l.firstMustMatch||c!==n.length)){if(i++,A())return!1;c-=2,p=!0;break}else if(x&&D&&(!l.i&&x===D||l.i&&x.toLowerCase()===D.toLowerCase())&&(!l.firstMustMatch||c!==n.length)){if(!i&&!l.hungry)return!1;c-=1,p=!0;break}else if(D===void 0&&h>=0&&p&&(!l.firstMustMatch||w)&&(!l.lastMustMatch||y))return a}p||(v=a)}else return a===0&&c===1&&!l.lastMustMatch&&T?0:!1;if(v!==!1&&v!==a&&(v=!1),c<1)return a;a=r(a)}if(c>0)return u&&g==="EOL"?!0:l&&l.maxMismatches>=c&&T?v||0:!1}function ot(e,t,n,s,u){var m,v,T;if(N(u)&&ve(u,"trimBeforeMatching")&&u&&typeof u.trimBeforeMatching!="boolean")throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_01] opts.trimBeforeMatching should be boolean!").concat(Array.isArray(u.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""));let r=W(W({},Se),u);if(typeof r.trimCharsBeforeMatching=="string"&&(r.trimCharsBeforeMatching=De(r.trimCharsBeforeMatching)),r.trimCharsBeforeMatching=r.trimCharsBeforeMatching.map(h=>R(h)?h:String(h)),!R(t)||!t.length)return!1;if(!Number.isInteger(n)||n<0)throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_02] the second argument should be a natural number. Currently it's of a type: ").concat(typeof n,", equal to:\n").concat($(n,4)));let g,l;if(R(s))g=[s];else if(Array.isArray(s))g=s;else if(!s)g=s;else if(typeof s=="function")g=[],g.push(s);else throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_03] the third argument, whatToMatch, is neither string nor array of strings! It's ").concat(typeof s,", equal to:\n").concat($(s,4)));if(u&&!N(u))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_04] the fourth argument, options object, should be a plain object. Currently it's of a type \"").concat(typeof u,'", and equal to:\n').concat($(u,4)));let c=0,i="";if((m=r==null?void 0:r.trimCharsBeforeMatching)!=null&&m.some((h,a)=>h.length>1?(c=a,i=h,!0):!1))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_05] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ").concat(c," is longer than 1 character, ").concat(i.length," (equals to ").concat(i,"). Please split it into separate characters and put into array as separate elements."));if(!g||!Array.isArray(g)||Array.isArray(g)&&!g.length||Array.isArray(g)&&g.length===1&&R(g[0])&&!g[0].trim()){if(typeof r.cb=="function"){let a,p=n;if((e==="matchLeftIncl"||e==="matchRight")&&(p+=1),e[5]==="L")for(let b=p;b--;){let d=t[b];if((!r.trimBeforeMatching||r.trimBeforeMatching&&(d!=null&&d.trim()))&&(!((v=r.trimCharsBeforeMatching)!=null&&v.length)||d!==void 0&&!r.trimCharsBeforeMatching.includes(d))){a=b;break}}else if(e.startsWith("matchRight"))for(let b=p;b<t.length;b++){let d=t[b];if((!r.trimBeforeMatching||r.trimBeforeMatching&&d.trim())&&(!((T=r.trimCharsBeforeMatching)!=null&&T.length)||!r.trimCharsBeforeMatching.includes(d))){a=b;break}}if(a===void 0)return!1;let w=t[a],y=a+1,A="";return y&&y>0&&(A=t.slice(0,y)),e[5]==="L"||a&&a>0&&(A=t.slice(a)),r.cb(w,A,a)}let h="";throw u||(h=" More so, the whole options object, the fourth input argument, is missing!"),new Error("string-match-left-right/".concat(e,'(): [THROW_ID_06] 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(h))}for(let h=0,a=g.length;h<a;h++){l=typeof g[h]=="function";let p=g[h],w,y,A="",b=n;e==="matchRight"?b+=1:e==="matchLeft"&&(b-=1);let d=st(t,b,p,r,l,S=>e[5]==="L"?S-1:S+1);if(d&&l&&typeof p=="function"&&p()==="EOL")return p()&&(!r.cb||r.cb(w,A,y))?p():!1;if(Number.isInteger(d)&&(y=e.startsWith("matchLeft")?d-1:d+1,e[5]==="L"?A=t.slice(0,d):A=t.slice(y)),y<0&&(y=void 0),t[y]&&(w=t[y]),Number.isInteger(d)&&(!r.cb||r.cb(w,A,y)))return p}return!1}function Ce(e,t,n,s){return ot("matchRightIncl",e,t,n,s)}var Re="4.2.0";var H="&nbsp;",P="\\00A0",B="\\u00A0",Oe="&ndash;",Ne="\\2013",Me="\\u2013",Ie="&mdash;",xe="\\2014",Le="\\u2014",Y=[{heads:"{{",tails:"}}"},{heads:["{% if","{%- if"],tails:["{% endif","{%- endif"]},{heads:["{% for","{%- for"],tails:["{% endfor","{%- endfor"]},{heads:["{%","{%-"],tails:["%}","-%}"]},{heads:"{#",tails:"#}"}],Ve=[{heads:"{{",tails:"}}"}],X=[{heads:["<%","<%=","<%-"],tails:["%>","=%>","-%>"]}],je=["abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"];var at=Re,_e={removeWidowPreventionMeasures:!1,convertEntities:!0,targetLanguage:"html",UKPostcodes:!1,hyphens:!0,minWordCount:4,minCharCount:5,ignore:[],reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,tagRanges:[]};function lt(e,t){var te,re,ne,se,oe,ie,ae,le,ue,fe,ge,ce;let n=Date.now();if(typeof e!="string")throw e===void 0?new Error("string-remove-widows/removeWidows(): [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error('string-remove-widows/removeWidows(): [THROW_ID_02] the first input argument must be string! It was given as "'.concat(typeof e,'", equal to:\n').concat($(e,4)));if(t&&!N(t))throw new Error("string-remove-widows/removeWidows(): [THROW_ID_03] the second input argument, options object, should be a plain object but it was given as type ".concat(typeof t,", equal to ").concat($(t,4)));let s=Array.isArray,u=e.length,r=new We({mergeType:2}),g=["."],l=/[A-Z]{1,2}[0-9][0-9A-Z]?$/,c=/^[0-9][A-Z]{2}/,i=.06,m,v=0,T=0,h=0,a,p,w,y,A,b,d,S,f=W(W({},_e),t),D={removeWidows:!1,convertEntities:!1};if(!f.ignore||!s(f.ignore)&&typeof f.ignore!="string")f.ignore=[];else if(typeof f.ignore=="string"&&(f.ignore=[f.ignore]),f.ignore.includes("all"))f.ignore=f.ignore.concat(Y.concat(X));else if(f.ignore.some(o=>typeof o=="string")){let o=[];f.ignore=f.ignore.filter(C=>typeof C=="string"&&C.length?(["nunjucks","jinja","liquid"].includes(C.trim().toLowerCase())?o=o.concat(Y):["hugo"].includes(C.trim().toLowerCase())?o=o.concat(Ve):["hexo"].includes(C.trim().toLowerCase())&&(o=o.concat(X)),!1):typeof C=="object"),o.length&&(f.ignore=f.ignore.concat(o))}let x;f.reportProgressFunc&&(x=Math.floor(f.reportProgressFuncTo-(f.reportProgressFuncTo-f.reportProgressFuncFrom)*i-f.reportProgressFuncFrom));function z(o,C){let E=L;f.removeWidowPreventionMeasures?E=" ":f.convertEntities&&(E=H,typeof f.targetLanguage=="string"&&(f.targetLanguage.trim().toLowerCase()==="css"?E=P:f.targetLanguage.trim().toLowerCase()==="js"&&(E=B))),e.slice(o,C)!==E&&r.push(o,C,E)}function ee(){T=0,h=0,a=void 0,p=void 0,w=void 0,y=void 0,A=void 0,b=void 0}ee();for(let o=0;o<=u;o++){if(!d&&s(f.ignore)&&f.ignore.length&&f.ignore.some((E,O)=>s(E.heads)&&E.heads.some(he=>e.startsWith(he,o))||typeof E.heads=="string"&&e.startsWith(E.heads,o)?(T+=1,d=f.ignore[O].tails,!0):!1),!d&&S&&S===o&&(T+=1,S=void 0),typeof f.reportProgressFunc=="function"&&(m=f.reportProgressFuncFrom+Math.floor(o/u*(x||1)),m!==v&&(v=m,f.reportProgressFunc(m))),!d&&o&&((te=e[o])!=null&&te.trim())&&(!e[o-1]||e[o-1]&&!e[o-1].trim())&&(y=o),!d&&((re=e[o])!=null&&re.trim())&&(h+=1),!d&&f.hyphens&&("-".concat(Ae).concat(we).includes(e[o])||e.startsWith(Oe,o)||e.startsWith(Ne,o)||e.startsWith(Me,o)||e.startsWith(Ie,o)||e.startsWith(xe,o)||e.startsWith(Le,o))&&e[o+1]&&(!e[o+1].trim()||e[o]==="&")&&e[o-1]&&!e[o-1].trim()&&e[k(e,o)]&&(z(k(e,o)+1,o),D.removeWidows=!0),!d&&(e.startsWith("&nbsp;",o)||e.startsWith("&#160;",o))&&(A=o,b=o+6,(ne=e[o+6])!=null&&ne.trim()&&(S=o+6),f.convertEntities?(f.targetLanguage==="css"||f.targetLanguage==="js")&&(r.push(o,o+6,f.targetLanguage==="css"?P:B),D.convertEntities=!0):(r.push(o,o+6,L),D.convertEntities=!0)),!d&&e[o+4]&&e[o]==="\\"&&e[o+1]==="0"&&e[o+2]==="0"&&e[o+3].toUpperCase()==="A"&&e[o+4]==="0"&&(A=o,b=o+5,(se=e[o+5])!=null&&se.trim()&&(S=o+5),f.convertEntities?(f.targetLanguage==="html"||f.targetLanguage==="js")&&(r.push(o,o+5,f.targetLanguage==="html"?H:B),D.convertEntities=!0):(r.push(o,o+5,L),D.convertEntities=!0)),!d&&e[o]==="\\"&&((oe=e[o+1])==null?void 0:oe.toLowerCase())==="u"&&e[o+2]==="0"&&e[o+3]==="0"&&((ie=e[o+4])==null?void 0:ie.toUpperCase())==="A"&&e[o+5]==="0"&&(A=o,b=o+6,(ae=e[o+6])!=null&&ae.trim()&&(S=o+6),f.convertEntities?(f.targetLanguage==="html"||f.targetLanguage==="css")&&r.push(o,o+6,f.targetLanguage==="html"?H:P):r.push(o,o+6,L)),!d&&e[o]===L&&(A=o,b=o+1,f.convertEntities&&r.push(o,o+1,f.targetLanguage==="css"?P:f.targetLanguage==="js"?B:H)),!d&&((le=e[o])!=null&&le.trim())&&!((ue=e[o-1])!=null&&ue.trim())&&(T+=1),!d&&(!e[o]||"\r\n".includes(e[o])||(e[o]==="\n"||e[o]==="\r"||e[o]==="\r"&&e[o+1]==="\n")&&k(e,o)&&g.includes(e[k(e,o)]))){if((!f.minWordCount||T>=f.minWordCount)&&(!f.minCharCount||h>=f.minCharCount)){let E,O;w!==void 0&&y!==void 0&&A!==void 0&&b!==void 0?w>A?(E=w,O=y):(E=A,O=b):w!==void 0&&y!==void 0?(E=w,O=y):A!==void 0&&b!==void 0&&(E=A,O=b),!(E&&O)&&a&&p&&(E=a,O=p),E&&O&&(z(E,O),D.removeWidows=!0)}ee()}f.UKPostcodes&&e[o]&&!e[o].trim()&&((fe=e[o-1])!=null&&fe.trim())&&l.test(e.slice(0,o))&&e[_(e,o)]&&c.test(e.slice(_(e,o)))&&(z(o,_(e,o)),D.removeWidows=!0),!d&&e[o]&&!e[o].trim()&&((ge=e[o-1])!=null&&ge.trim())&&(w===void 0||(ce=e[w-1])!=null&&ce.trim())&&!"/>".includes(e[_(e,o)])&&!e.slice(0,o).trim().endsWith("br")&&!e.slice(0,o).trim().endsWith("hr")&&!(e.slice(0,o).endsWith("<")&&je.some(E=>e.startsWith(E,_(e,o))))&&(a=w,p=y,w=o,y=void 0,(A!==void 0||b!==void 0)&&(A=void 0,b=void 0));let C;d&&(typeof d=="string"&&(!d.length||e.startsWith(d,o))?d=void 0:s(d)&&(!d.length||d.some(E=>e.startsWith(E,o)?(C=E,!0):!1))&&(d=void 0,o+=C.length,s(f.ignore)&&f.ignore.length&&e[o+1]&&f.ignore.some(E=>Ce(e,o,E.tails,{trimBeforeMatching:!0,cb:(O,he,de)=>{var pe;return de&&(o=de-1,(pe=e[o+1])!=null&&pe.trim()&&(T+=1)),!0}})))),e[o]&&"\r\n".includes(e[o])&&(T=0,h=0),s(f.tagRanges)&&f.tagRanges.length&&f.tagRanges.some(E=>o>=E[0]&&o<=E[1]&&E[1]-1>o?(o=E[1]-1,!0):!1)}return Z(e,r.current()).split("").forEach((o,C)=>{}),{res:Z(e,r.current(),f.reportProgressFunc?o=>{m=Math.floor((f.reportProgressFuncTo-f.reportProgressFuncFrom)*(1-i)+o/100*(f.reportProgressFuncTo-f.reportProgressFuncFrom)*i),m!==v&&(v=m,f.reportProgressFunc(m))}:void 0),ranges:r.current(),log:{timeTakenInMilliseconds:Date.now()-n},whatWasDone:D}}return Ue(ut);})();
10
+ "use strict";var stringRemoveWidows=(()=>{var B=Object.defineProperty;var He=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames,$e=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable;var z=(e,t,r)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t)=>{for(var r in t||(t={}))be.call(t,r)&&z(e,r,t[r]);if($e)for(var r of $e(t))Be.call(t,r)&&z(e,r,t[r]);return e};var Ue=(e,t)=>{for(var r in t)B(e,r,{get:t[r],enumerable:!0})},qe=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Pe(t))!be.call(e,u)&&u!==r&&B(e,u,{get:()=>t[u],enumerable:!(s=He(t,u))||s.enumerable});return e};var Je=e=>qe(B({},"__esModule",{value:!0}),e);var _=(e,t,r)=>z(e,typeof t!="symbol"?t+"":t,r);var ft={};Ue(ft,{defaults:()=>Fe,removeWidows:()=>ut,version:()=>lt});function Ge(){let e=[],t=0,r=!1;return{append(s){return r?!1:t+s.length>1999?(e.push("\u2026"),t+=1,r=!0,!1):(e.push(s),t+=s.length,!0)},result(){return e.join("")},stopped(){return r}}}function ze(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function U(e,t){if(e.append('"')){for(let r=0;r<t.length&&!e.stopped();r+=1){let s=t.charCodeAt(r);s===34?e.append('\\"'):s===92?e.append("\\\\"):s===8?e.append("\\b"):s===9?e.append("\\t"):s===10?e.append("\\n"):s===12?e.append("\\f"):s===13?e.append("\\r"):s<32||s===8232||s===8233||s>=55296&&s<=57343?e.append(ze(s)):e.append(t[r])}e.append('"')}}function Ke(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function Ae(e,t){e.append("Symbol(");let r=String(t);r.length>8&&U(e,r.slice(7,-1)),e.append(")")}function ye(e,t){typeof t=="symbol"?Ae(e,t):U(e,String(t))}function y(e,t=0){let r=Ge(),s=t===4?4:0,u=new WeakSet,n=0;function c(i){s&&r.append(" ".repeat(i*s))}function a(i,h){i&&r.append(","),s&&(r.append("\n"),c(h+1))}function g(i,h,$){s&&h&&(r.append("\n"),c($)),r.append(i)}function l(i,h){Object.prototype.hasOwnProperty.call(i,"value")?d(i.value,h):r.append(Ke(i))}function m(i,h){let $;try{$=Reflect.getOwnPropertyDescriptor(i,"length")}catch(w){r.append("[Uninspectable]");return}let b=$==null?void 0:$.value;if(!Number.isSafeInteger(b)||b<0){r.append("[Uninspectable]");return}r.append("[");let A=!1;for(let w=0;w<b&&!r.stopped();w+=1){if(a(A,h),A=!0,n>=50){r.append("[MaxEntries]");break}n+=1;let p;try{p=Reflect.getOwnPropertyDescriptor(i,String(w))}catch(C){r.append("[Uninspectable]");continue}p!=null&&p.enumerable?l(p,h+1):r.append("[Empty]")}g("]",A,h)}function E(i,h){let $;try{$=Reflect.ownKeys(i)}catch(A){r.append("[Uninspectable]");return}r.append("{");let b=!1;for(let A of $){if(r.stopped())break;if(n>=50){a(b,h),b=!0,U(r,"\u2026"),r.append(s?": ":":"),r.append("[MaxEntries]");break}n+=1;let w;try{w=Reflect.getOwnPropertyDescriptor(i,A)}catch(p){a(b,h),b=!0,ye(r,A),r.append(s?": ":":"),r.append("[Uninspectable]");continue}w!=null&&w.enumerable&&(a(b,h),b=!0,ye(r,A),r.append(s?": ":":"),l(w,h+1))}g("}",b,h)}function v(i,h){if(u.has(i)){r.append("[Circular]");return}if(h>=5){r.append("[MaxDepth]");return}let $;try{$=Array.isArray(i)}catch(b){r.append("[Uninspectable]");return}u.add(i);try{$?m(i,h):E(i,h)}finally{u.delete(i)}}function d(i,h){i===null?r.append("null"):typeof i=="string"?U(r,i):typeof i=="number"?r.append(Object.is(i,-0)?"-0":String(i)):typeof i=="boolean"?r.append(i?"true":"false"):typeof i>"u"?r.append("undefined"):typeof i=="bigint"?r.append("".concat(i,"n")):typeof i=="symbol"?Ae(r,i):typeof i=="function"?r.append("[Function]"):v(i,h)}try{return d(e,0),r.result()}catch(i){return"[Uninspectable]"}}var Ee="\u2013",ve="\u2014",L="\xA0";var ct=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]),Qe=Object.prototype.hasOwnProperty;function M(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 R(e){return typeof e=="string"}function Te(e){return Number.isFinite(e)}function N(e){return Number.isSafeInteger(e)&&e>=0}var we,ht=(we=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:we.get;var dt=Date.prototype.getTime;function I(e){return e!=null}function De(e,t){return M(e)&&R(t)&&Qe.call(e,t)}var Ze={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function j(e,t){if(!Array.isArray(e)||!e.length)return e;let r=D(D({},Ze),t),s,u;if(r.strictlyTwoElementsInRangeArrays&&!e.every((a,g)=>!Array.isArray(a)||a.length!==2?(s=g,u=a.length,!1):!0))throw new TypeError("ranges-sort/rSort(): [THROW_ID_01] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ".concat(s,"th range (").concat(y(e[s],4),") has not two but ").concat(u," elements!"));if(!e.every((a,g)=>!Array.isArray(a)||!Number.isInteger(a[0])||a[0]<0||!Number.isInteger(a[1])||a[1]<0?(s=g,!1):!0))throw new TypeError("ranges-sort/rSort(): [THROW_ID_02] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ".concat(s,"th range (").concat(y(e[s],4),") does not consist of only natural numbers!"));let n=e.length**2,c=0;return Array.from(e).sort((a,g)=>(r.progressFn&&(c+=1,r.progressFn(Math.floor(c*100/n))),a[0]===g[0]?a[1]<g[1]?-1:a[1]>g[1]?1:0:a[0]<g[0]?-1:1))}var Ye={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function K(e,t){function r(i){return!!i&&typeof i=="object"&&!Array.isArray(i)}if(!Array.isArray(e)||!e.length)return null;if(t&&!r(t))throw new TypeError("ranges-merge/rMerge(): [THROW_ID_01] the second input argument must be a plain object. It was given as:\n".concat(y(t,4)," (type ").concat(typeof t,")"));let s=D(D({},Ye),t);if(s.progressFn&&r(s.progressFn)&&!Object.keys(s.progressFn).length)s.progressFn=null;else if(s.progressFn&&typeof s.progressFn!="function")throw new TypeError('ranges-merge/rMerge(): [THROW_ID_02] opts.progressFn must be a function! It was given of a type: "'.concat(typeof s.progressFn,'", equal to ').concat(y(s.progressFn,4)));if(s.mergeType!==1&&s.mergeType!==2&&s.mergeType!=="1"&&s.mergeType!=="2")throw new TypeError('ranges-merge/rMerge(): [THROW_ID_03] opts.mergeType was customised to a wrong thing! It was given of a type: "'.concat(typeof s.mergeType,'", equal to ').concat(y(s.mergeType,4)));if(typeof s.joinRangesThatTouchEdges!="boolean")throw new TypeError('ranges-merge/rMerge(): [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "'.concat(typeof s.joinRangesThatTouchEdges,'", equal to ').concat(y(s.joinRangesThatTouchEdges,4)));let u=s.progressFn,n=s.joinRangesThatTouchEdges,c=[];for(let i of e)Array.isArray(i)&&(i[2]!==void 0||i[0]!==i[1])&&c.push([...i]);let a,g,l;u?a=j(c,{progressFn:i=>{l=Math.floor(i/5),l!==g&&(g=l,u(l))}}):a=j(c);let m=a.length-1,E=s.mergeType===2||s.mergeType==="2",v=a.length;for(let i=m;i>=0;i--){let h=a[i];for(u&&i<m&&(l=Math.floor((1-(i+1)/m)*78)+21,l!==g&&l>g&&(g=l,u(l)));v<a.length;){let $=a[v],b=$[0]===h[0];if(!b&&(n?$[0]>h[1]:$[0]>=h[1]))break;let A=$[1]>=h[1];A&&(h[1]=$[1]),$[2]!==void 0&&(b||A)&&h[2]!==null&&($[2]===null&&h[2]!==null?h[2]=null:h[2]!=null?E&&b?h[2]=$[2]:h[2]+=$[2]:h[2]=$[2]),v+=1}v-=1,a[v]=h}let d=a.length-v;for(let i=0;i<d;i++)a[i]=a[v+i];return a.length=d,a.length?a:null}function q(e){if(typeof e=="number")return Number.isInteger(e)&&e>=0;if(typeof e!="string"||!e.trim())return!1;let t=Number(e);return Number.isInteger(t)&&t>=0}function Q(e,t,r){let s=0,u=0;if(e===void 0&&t===void 0&&r===void 0)throw new Error("ranges-apply/rApply(): [THROW_ID_01] inputs missing!");if(typeof e!="string")throw new TypeError("ranges-apply/rApply(): [THROW_ID_02] first input argument must be a string! Currently it's: ".concat(typeof e,", equal to: ").concat(y(e,4)));if(t!=null&&!Array.isArray(t))throw new TypeError("ranges-apply/rApply(): [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ".concat(typeof t,", equal to: ").concat(y(t,4)));if(r&&typeof r!="function")throw new TypeError("ranges-apply/rApply(): [THROW_ID_04] the third input argument must be a function (or falsy)! Currently it's: ".concat(typeof r,", equal to: ").concat(y(r,4)));if(!(t!=null&&t.some(Boolean)))return e;let n;Array.isArray(t)&&!Array.isArray(t[0])&&q(t[0])&&q(t[1])?n=[Array.from(t)]:n=Array.from(t);let c=n.length,a=0;n.forEach((m,E)=>{if(m){if(r&&(s=Math.floor(a/c*10),s!==u&&(u=s,r(s))),!Array.isArray(m))throw new TypeError("ranges-apply/rApply(): [THROW_ID_05] ranges array, second input arg., has ".concat(E,"th element not an array: ").concat(y(m,4),", which is ").concat(typeof m));if(!q(m[0]))throw new TypeError("ranges-apply/rApply(): [THROW_ID_06] ranges array, second input arg. has ".concat(E,"th element, array ").concat(y(m),". Its first element is not a non-negative integer or string index, but ").concat(typeof m[0],", equal to: ").concat(y(m[0],4),"."));if(typeof m[0]=="string"&&(n[E]=[...m],n[E][0]=Number(m[0])),!q(m[1]))throw new TypeError("ranges-apply/rApply(): [THROW_ID_07] ranges array, second input arg. has ".concat(E,"th element, array ").concat(y(m),". Its second element is not a non-negative integer or string index, but ").concat(typeof m[1],", equal to: ").concat(y(m[1],4),"."));typeof m[1]=="string"&&(n[E]===m&&(n[E]=[...m]),n[E][1]=Number(m[1])),a+=1}});let g=r?K(n,{progressFn:m=>{s=10+Math.floor(m/10),s!==u&&(u=s,r(s))}}):K(n),l=(g==null?void 0:g.length)||0;if(g&&l>0){let m=e.slice(g[l-1][1]);e=g.reduce((E,v,d,i)=>{r&&(s=20+Math.floor(d/l*80),s!==u&&(u=s,r(s)));let h=d===0?0:i[d-1][1],$=i[d][0];return"".concat(E).concat(e.slice(h,$)).concat(i[d][2]||"")},""),e+=m}return e}function J(e,t=1){let r="\xA0";function s(n){return Array.from(n).reverse().join("")}function u(n,c,a){let g=a?"\n":"\r",l=a?"\r":"\n";if(!n)return n;let m=0,E=0,v="";for(let d=0,i=n.length;d<i;d++)(n[d]===g||n[d]===l&&n[d-1]!==g)&&E++,"\r\n".includes(n[d])||n[d]===r?(m=0,n[d]===r?v+=n[d]:n[d]===g?E<=c&&(v+=n[d],n[d+1]===l&&(v+=n[d+1],d++)):n[d]===l&&(n==null?void 0:n[d-1])!==g&&E<=c&&(v+=n[d])):(m++,!n[d+1]&&!E&&(v+=" "));return v}if(typeof e=="string"&&e.length){let n=1;typeof+t=="number"&&Number.isInteger(+t)&&+t>=0&&(n=+t);let c="",a="";if(!e.trim())c=e;else if(!e[0].trim()){for(let g=0,l=e.length;g<l;g++)if(e[g].trim()){c=e.slice(0,g);break}}if(e.trim()&&(e.slice(-1).trim()===""||e.slice(-1)===r)){for(let g=e.length;g--;)if(e[g].trim()){a=e.slice(g+1);break}}return"".concat(u(c,n,!1)).concat(e.trim()).concat(s(u(s(a),n,!0)))}return e}var Xe={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function et(e,t){function r(l){return!!l&&typeof l=="object"&&!Array.isArray(l)}if(!Array.isArray(e)||!e.length)return null;if(t&&!r(t))throw new TypeError("ranges-push/rMerge(): [THROW_ID_10] the second input argument must be a plain object. It was given as:\n".concat(y(t,4)," (type ").concat(typeof t,")"));let s=D(D({},Xe),t);if(s.progressFn&&r(s.progressFn)&&!Object.keys(s.progressFn).length)s.progressFn=null;else if(s.progressFn&&typeof s.progressFn!="function")throw new TypeError('ranges-push/rMerge(): [THROW_ID_11] resolvedOpts.progressFn must be a function! It was given of a type: "'.concat(typeof s.progressFn,'", equal to ').concat(y(s.progressFn,4)));if(![1,2,"1","2"].includes(s.mergeType))throw new TypeError('ranges-push/rMerge(): [THROW_ID_12] resolvedOpts.mergeType was customised to a wrong thing! It was given of a type: "'.concat(typeof s.mergeType,'", equal to ').concat(y(s.mergeType,4)));if(typeof s.joinRangesThatTouchEdges!="boolean")throw new TypeError('ranges-push/rMerge(): [THROW_ID_13] resolvedOpts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "'.concat(typeof s.joinRangesThatTouchEdges,'", equal to ').concat(y(s.joinRangesThatTouchEdges,4)));let u=e.filter(l=>Array.isArray(l)).map(l=>[...l]).filter(l=>l[2]!==void 0||l[0]!==l[1]),n,c,a;s.progressFn?n=j(u,{progressFn:l=>{a=Math.floor(l/5),a!==c&&(c=a,s.progressFn!=null&&s.progressFn(a))}}):n=j(u);let g=n.length-1;for(let l=g;l>0;l--)s.progressFn&&(a=Math.floor((1-l/g)*78)+21,a!==c&&a>c&&(c=a,s.progressFn(a))),(n[l][0]<=n[l-1][0]||!s.joinRangesThatTouchEdges&&n[l][0]<n[l-1][1]||s.joinRangesThatTouchEdges&&n[l][0]<=n[l-1][1])&&(n[l-1][0]=Math.min(n[l][0],n[l-1][0]),n[l-1][1]=Math.max(n[l][1],n[l-1][1]),n[l][2]!==void 0&&(n[l-1][0]>=n[l][0]||n[l-1][1]<=n[l][1])&&n[l-1][2]!==null&&(n[l][2]===null&&n[l-1][2]!==null?n[l-1][2]=null:n[l-1][2]!=null?+s.mergeType==2&&n[l-1][0]===n[l][0]?n[l-1][2]=n[l][2]:n[l-1][2]+=n[l][2]:n[l-1][2]=n[l][2]),n.splice(l,1),l=n.length);return n.length?n:null}var tt={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1};function We(e){return e[2]===void 0&&e[0]===e[1]}function rt(e){let t=-1;for(let r=0,s=e.length;r<s;r++){let u=e[r];if(Array.isArray(u)){if(u[0]<t)return!1;t=u[0]}}return!0}var Ce=class{constructor(e){_(this,"ranges");_(this,"opts");_(this,"sorted");if(e!=null&&!M(e))throw new TypeError("ranges-push/Ranges/constructor(): [THROW_ID_01] The options argument must be a plain object. It was given as ".concat(y(e,4)," (type ").concat(typeof e,")."));let t=D(D({},tt),e);if(t.mergeType&&t.mergeType!==1&&t.mergeType!==2)if(R(t.mergeType)&&t.mergeType.trim()==="1")t.mergeType=1;else if(R(t.mergeType)&&t.mergeType.trim()==="2")t.mergeType=2;else throw new Error('ranges-push/Ranges/constructor(): [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "'.concat(typeof t.mergeType,'", equal to ').concat(y(t.mergeType,4)));this.opts=t,this.ranges=[],this.sorted=!0}add(e,t,r){var n;if(e==null&&t==null)return;if(I(e)&&!I(t)){if(Array.isArray(e)){if(e.length){if(e.some(c=>Array.isArray(c))){e.forEach(c=>{Array.isArray(c)&&this.add(...c)});return}e.length&&N(+e[0])&&N(+e[1])&&this.add(...e)}return}throw new TypeError('ranges-push/Ranges/add(): [THROW_ID_03] the first input argument, "from" is set ('.concat(y(e),') but second-one, "to" is not (').concat(y(t),")"))}else if(!I(e)&&I(t))throw new TypeError('ranges-push/Ranges/add(): [THROW_ID_04] the second input argument, "to" is set ('.concat(y(t),') but first-one, "from" is not (').concat(y(e),")"));let s=+e,u=+t;if(N(s)&&N(u)){if(I(r)&&!R(r)&&!Te(r))throw new TypeError("ranges-push/Ranges/add(): [THROW_ID_05] The third argument, the value to add, was given not as string but ".concat(typeof r,", equal to:\n").concat(y(r,4)));if(I(this.ranges)&&Array.isArray(this.last())&&s===this.last()[1]){if(this.last()[1]=u,this.last()[2],this.last()[2]!==null&&I(r)){let c=this.last()[2]&&this.last()[2].length&&(!((n=this.opts)!=null&&n.mergeType)||this.opts.mergeType===1)?"".concat(this.last()[2]).concat(r):r;this.opts.limitToBeAddedWhitespace&&(c=J(c,this.opts.limitLinebreaksCount)),R(c)&&!c.length||(this.last()[2]=c)}}else{this.ranges||(this.ranges=[]);let c=this.last();c&&s<c[0]&&(this.sorted=!1);let a=r!==void 0&&!(R(r)&&!r.length)?[s,u,r&&this.opts.limitToBeAddedWhitespace?J(r,this.opts.limitLinebreaksCount):r]:[s,u];this.ranges.push(a)}}else throw N(s)?new TypeError('ranges-push/Ranges/add(): [THROW_ID_07] "to" value, the second input argument, must be a natural number or zero! Currently it\'s of a type "'.concat(typeof t,'" equal to: ').concat(y(t,4))):new TypeError('ranges-push/Ranges/add(): [THROW_ID_06] "from" value, the first input argument, must be a natural number or zero! Currently it\'s of a type "'.concat(typeof e,'" equal to: ').concat(y(e,4)))}push(e,t,r){this.add(e,t,r)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=et(this.ranges,{mergeType:this.opts.mergeType}),this.sorted=!0,this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(e=>I(e[2])?[e[0],e[1],J(e[2],this.opts.limitLinebreaksCount)]:e):this.ranges):null}firstCovers(e){if(!N(e))throw new TypeError("ranges-push/Ranges/firstCovers(): [THROW_ID_08] the input argument must be a natural number or zero! It was given as ".concat(y(e,4)," (type ").concat(typeof e,")"));if(!Array.isArray(this.ranges)||!this.ranges.length)return!1;let t=null;if(this.sorted){for(let s=0,u=this.ranges.length;s<u;s++){let n=this.ranges[s];if(!(!Array.isArray(n)||We(n))){if(t===null){if(n[0]!==0)return!1;t=n[1]}else{if(n[0]>t)break;n[1]>t&&(t=n[1])}if(t>=e)return!0}}return t!==null&&t>=e}let r=!0;for(;r;){r=!1;for(let s=0,u=this.ranges.length;s<u;s++){let n=this.ranges[s];if(!(!Array.isArray(n)||We(n))){if(n[0]<0)return!1;(t===null?n[0]===0:n[0]<=t&&n[1]>t)&&(t=n[1],r=!0)}}}return t!==null&&t>=e}wipe(){this.ranges=[],this.sorted=!0}replace(e){if(Array.isArray(e)&&e.length)if(Array.isArray(e[0])&&N(e[0][0]))this.ranges=Array.from(e),this.sorted=rt(this.ranges);else throw new Error("ranges-push/Ranges/replace(): [THROW_ID_09] Single range was given but we expected array of arrays! The first element, ".concat(y(e[0],4)," should be an array and its first element should be an integer, a string index."));else this.ranges=[],this.sorted=!0}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}};var Z="\xA0";function Y(e){return e===32||e>=9&&e<=13||e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function V(e,t=0){if(typeof e!="string"||!e.length)return null;(!t||typeof t!="number")&&(t=0);let r=e[t+1];if(!r)return null;if(!Y(r.charCodeAt(0)))return t+1;if(r=e[t+2],r&&!Y(r.charCodeAt(0)))return t+2;for(let s=t+3,u=e.length;s<u;s++)if(!Y(e.charCodeAt(s)))return s;return null}function nt({str:e,idx:t,stopAtNewlines:r,stopAtRawNbsp:s}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||r&&"\n\r".includes(e[~-t])||s&&e[~-t]===Z))return~-t;if(e[t-2]&&(e[t-2].trim()||r&&"\n\r".includes(e[t-2])||s&&e[t-2]===Z))return t-2;for(let u=t;u--;)if(e[u]&&(e[u].trim()||r&&"\n\r".includes(e[u])||s&&e[u]===Z))return u;return null}function k(e,t=0){return nt({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}function Se(e){return typeof e!="string"?e:e.length?[e]:[]}var Re={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},st=e=>e+1;function ot(e,t,r,s,u=!1,n=st){var w;let c=typeof r=="function"?r():r;if(+t<0&&u&&c==="EOL")return c;let a=D(D({},Re),s);if(t>=e.length&&!u)return!1;let g=u?1:r.length,l=0,m=!1,E=!1,v=!1,d=a.maxMismatches,i=t,h=!1,$=!1,b=!1;function A(){return l===1&&d<a.maxMismatches-1}for(;e[i];){let p=n(i);if(a.trimBeforeMatching&&e[i].trim()===""){if(!e[p]&&u&&r==="EOL")return!0;i=n(i);continue}if(a&&!a.i&&((w=a==null?void 0:a.trimCharsBeforeMatching)!=null&&w.includes(e[i]))||a!=null&&a.i&&a.trimCharsBeforeMatching&&a.trimCharsBeforeMatching.map(f=>f.toLowerCase()).includes(e[i].toLowerCase())){if(u&&r==="EOL"&&!e[p])return!0;i=n(i);continue}let C=p>i?r[r.length-g]:r[g-1];if(!a.i&&e[i]===C||a.i&&C!==void 0&&e[i].toLowerCase()===C.toLowerCase()){if(h||(h=!0),v||(v=!0),g===r.length){if($=!0,d!==a.maxMismatches)return!1}else g===1&&(b=!0);if(g-=1,l++,A())return!1;if(!g)return l!==r.length||d===a.maxMismatches||!m?i:!1}else if(!m&&!l&&(m=!0),a.maxMismatches&&d&&i){d-=1;for(let f=0;f<=d;f++){let W=p>i?r[r.length-g+1+f]:r[g-2-f],x=e[n(i)];if(W&&(!a.i&&e[i]===W||a.i&&e[i].toLowerCase()===W.toLowerCase())&&(!a.firstMustMatch||g!==r.length)){if(l++,A())return!1;g-=2,h=!0;break}else if(x&&W&&(!a.i&&x===W||a.i&&x.toLowerCase()===W.toLowerCase())&&(!a.firstMustMatch||g!==r.length)){if(!l&&!a.hungry)return!1;g-=1,h=!0;break}else if(W===void 0&&d>=0&&h&&(!a.firstMustMatch||$)&&(!a.lastMustMatch||b))return i}h||(E=i)}else return i===0&&g===1&&!a.lastMustMatch&&v?0:!1;if(E!==!1&&E!==i&&(E=!1),g<1)return i;i=n(i)}if(g>0)return u&&c==="EOL"?!0:a&&a.maxMismatches>=g&&v?E||0:!1}function it(e,t,r,s,u){var m,E,v;if(M(u)&&De(u,"trimBeforeMatching")&&u&&typeof u.trimBeforeMatching!="boolean")throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_01] opts.trimBeforeMatching should be boolean!").concat(Array.isArray(u.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""));let n=D(D({},Re),u);if(typeof n.trimCharsBeforeMatching=="string"&&(n.trimCharsBeforeMatching=Se(n.trimCharsBeforeMatching)),n.trimCharsBeforeMatching=n.trimCharsBeforeMatching.map(d=>R(d)?d:String(d)),!R(t)||!t.length)return!1;if(!Number.isInteger(r)||r<0)throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_02] the second argument should be a natural number. Currently it's of a type: ").concat(typeof r,", equal to:\n").concat(y(r,4)));let c,a;if(R(s))c=[s];else if(Array.isArray(s))c=s;else if(!s)c=s;else if(typeof s=="function")c=[],c.push(s);else throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_03] the third argument, whatToMatch, is neither string nor array of strings! It's ").concat(typeof s,", equal to:\n").concat(y(s,4)));if(u&&!M(u))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_04] the fourth argument, options object, should be a plain object. Currently it's of a type \"").concat(typeof u,'", and equal to:\n').concat(y(u,4)));let g=0,l="";if((m=n==null?void 0:n.trimCharsBeforeMatching)!=null&&m.some((d,i)=>d.length>1?(g=i,l=d,!0):!1))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_05] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ").concat(g," is longer than 1 character, ").concat(l.length," (equals to ").concat(l,"). Please split it into separate characters and put into array as separate elements."));if(!c||!Array.isArray(c)||Array.isArray(c)&&!c.length||Array.isArray(c)&&c.length===1&&R(c[0])&&!c[0].trim()){if(typeof n.cb=="function"){let i,h=r;if((e==="matchLeftIncl"||e==="matchRight")&&(h+=1),e[5]==="L")for(let w=h;w--;){let p=t[w];if((!n.trimBeforeMatching||n.trimBeforeMatching&&(p!=null&&p.trim()))&&(!((E=n.trimCharsBeforeMatching)!=null&&E.length)||p!==void 0&&!n.trimCharsBeforeMatching.includes(p))){i=w;break}}else if(e.startsWith("matchRight"))for(let w=h;w<t.length;w++){let p=t[w];if((!n.trimBeforeMatching||n.trimBeforeMatching&&p.trim())&&(!((v=n.trimCharsBeforeMatching)!=null&&v.length)||!n.trimCharsBeforeMatching.includes(p))){i=w;break}}if(i===void 0)return!1;let $=t[i],b=i+1,A="";return b&&b>0&&(A=t.slice(0,b)),e[5]==="L"||i&&i>0&&(A=t.slice(i)),n.cb($,A,i)}let d="";throw u||(d=" More so, the whole options object, the fourth input argument, is missing!"),new Error("string-match-left-right/".concat(e,'(): [THROW_ID_06] 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(d))}for(let d=0,i=c.length;d<i;d++){a=typeof c[d]=="function";let h=c[d],$,b,A="",w=r;e==="matchRight"?w+=1:e==="matchLeft"&&(w-=1);let p=ot(t,w,h,n,a,C=>e[5]==="L"?C-1:C+1);if(p&&a&&typeof h=="function"&&h()==="EOL")return h()&&(!n.cb||n.cb($,A,b))?h():!1;if(Number.isInteger(p)&&(b=e.startsWith("matchLeft")?p-1:p+1,e[5]==="L"?A=t.slice(0,p):A=t.slice(b)),b<0&&(b=void 0),t[b]&&($=t[b]),Number.isInteger(p)&&(!n.cb||n.cb($,A,b)))return h}return!1}function Oe(e,t,r,s){return it("matchRightIncl",e,t,r,s)}var Me="4.2.2";var F="&nbsp;",H="\\00A0",P="\\u00A0",Ne="&ndash;",Ie="\\2013",xe="\\u2013",Le="&mdash;",je="\\2014",Ve="\\u2014",X=[{heads:"{{",tails:"}}"},{heads:["{% if","{%- if"],tails:["{% endif","{%- endif"]},{heads:["{% for","{%- for"],tails:["{% endfor","{%- endfor"]},{heads:["{%","{%-"],tails:["%}","-%}"]},{heads:"{#",tails:"#}"}],_e=[{heads:"{{",tails:"}}"}],ee=[{heads:["<%","<%=","<%-"],tails:["%>","=%>","-%>"]}],ke=["abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"];var lt=Me,Fe={removeWidowPreventionMeasures:!1,convertEntities:!0,targetLanguage:"html",UKPostcodes:!1,hyphens:!0,minWordCount:4,minCharCount:5,ignore:[],reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,tagRanges:[]};function ut(e,t){var re,ne,se,oe,ie,ae,le,ue,fe,ge,ce,he;let r=Date.now();if(typeof e!="string")throw e===void 0?new Error("string-remove-widows/removeWidows(): [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error('string-remove-widows/removeWidows(): [THROW_ID_02] the first input argument must be string! It was given as "'.concat(typeof e,'", equal to:\n').concat(y(e,4)));if(t&&!M(t))throw new Error("string-remove-widows/removeWidows(): [THROW_ID_03] the second input argument, options object, should be a plain object but it was given as type ".concat(typeof t,", equal to ").concat(y(t,4)));let s=Array.isArray,u=e.length,n=new Ce({mergeType:2}),c=["."],a=/[A-Z]{1,2}[0-9][0-9A-Z]?$/,g=/^[0-9][A-Z]{2}/,l=.06,m,E=0,v=0,d=0,i,h,$,b,A,w,p,C,f=D(D({},Fe),t),W={removeWidows:!1,convertEntities:!1};if(!f.ignore||!s(f.ignore)&&typeof f.ignore!="string")f.ignore=[];else if(typeof f.ignore=="string"&&(f.ignore=[f.ignore]),f.ignore.includes("all"))f.ignore=f.ignore.concat(X.concat(ee));else if(f.ignore.some(o=>typeof o=="string")){let o=[];f.ignore=f.ignore.filter(S=>typeof S=="string"&&S.length?(["nunjucks","jinja","liquid"].includes(S.trim().toLowerCase())?o=o.concat(X):["hugo"].includes(S.trim().toLowerCase())?o=o.concat(_e):["hexo"].includes(S.trim().toLowerCase())&&(o=o.concat(ee)),!1):typeof S=="object"),o.length&&(f.ignore=f.ignore.concat(o))}let x;f.reportProgressFunc&&(x=Math.floor(f.reportProgressFuncTo-(f.reportProgressFuncTo-f.reportProgressFuncFrom)*l-f.reportProgressFuncFrom));function G(o,S){let T=L;f.removeWidowPreventionMeasures?T=" ":f.convertEntities&&(T=F,typeof f.targetLanguage=="string"&&(f.targetLanguage.trim().toLowerCase()==="css"?T=H:f.targetLanguage.trim().toLowerCase()==="js"&&(T=P))),e.slice(o,S)!==T&&n.push(o,S,T)}function te(){v=0,d=0,i=void 0,h=void 0,$=void 0,b=void 0,A=void 0,w=void 0}te();for(let o=0;o<=u;o++){if(!p&&s(f.ignore)&&f.ignore.length&&f.ignore.some((T,O)=>s(T.heads)&&T.heads.some(de=>e.startsWith(de,o))||typeof T.heads=="string"&&e.startsWith(T.heads,o)?(v+=1,p=f.ignore[O].tails,!0):!1),!p&&C&&C===o&&(v+=1,C=void 0),typeof f.reportProgressFunc=="function"&&(m=f.reportProgressFuncFrom+Math.floor(o/u*(x||1)),m!==E&&(E=m,f.reportProgressFunc(m))),!p&&o&&((re=e[o])!=null&&re.trim())&&(!e[o-1]||e[o-1]&&!e[o-1].trim())&&(b=o),!p&&((ne=e[o])!=null&&ne.trim())&&(d+=1),!p&&f.hyphens&&("-".concat(ve).concat(Ee).includes(e[o])||e.startsWith(Ne,o)||e.startsWith(Ie,o)||e.startsWith(xe,o)||e.startsWith(Le,o)||e.startsWith(je,o)||e.startsWith(Ve,o))&&e[o+1]&&(!e[o+1].trim()||e[o]==="&")&&e[o-1]&&!e[o-1].trim()&&e[k(e,o)]&&(G(k(e,o)+1,o),W.removeWidows=!0),!p&&(e.startsWith("&nbsp;",o)||e.startsWith("&#160;",o))&&(A=o,w=o+6,(se=e[o+6])!=null&&se.trim()&&(C=o+6),f.convertEntities?(f.targetLanguage==="css"||f.targetLanguage==="js")&&(n.push(o,o+6,f.targetLanguage==="css"?H:P),W.convertEntities=!0):(n.push(o,o+6,L),W.convertEntities=!0)),!p&&e[o+4]&&e[o]==="\\"&&e[o+1]==="0"&&e[o+2]==="0"&&e[o+3].toUpperCase()==="A"&&e[o+4]==="0"&&(A=o,w=o+5,(oe=e[o+5])!=null&&oe.trim()&&(C=o+5),f.convertEntities?(f.targetLanguage==="html"||f.targetLanguage==="js")&&(n.push(o,o+5,f.targetLanguage==="html"?F:P),W.convertEntities=!0):(n.push(o,o+5,L),W.convertEntities=!0)),!p&&e[o]==="\\"&&((ie=e[o+1])==null?void 0:ie.toLowerCase())==="u"&&e[o+2]==="0"&&e[o+3]==="0"&&((ae=e[o+4])==null?void 0:ae.toUpperCase())==="A"&&e[o+5]==="0"&&(A=o,w=o+6,(le=e[o+6])!=null&&le.trim()&&(C=o+6),f.convertEntities?(f.targetLanguage==="html"||f.targetLanguage==="css")&&n.push(o,o+6,f.targetLanguage==="html"?F:H):n.push(o,o+6,L)),!p&&e[o]===L&&(A=o,w=o+1,f.convertEntities&&n.push(o,o+1,f.targetLanguage==="css"?H:f.targetLanguage==="js"?P:F)),!p&&((ue=e[o])!=null&&ue.trim())&&!((fe=e[o-1])!=null&&fe.trim())&&(v+=1),!p&&(!e[o]||"\r\n".includes(e[o])||(e[o]==="\n"||e[o]==="\r"||e[o]==="\r"&&e[o+1]==="\n")&&k(e,o)&&c.includes(e[k(e,o)]))){if((!f.minWordCount||v>=f.minWordCount)&&(!f.minCharCount||d>=f.minCharCount)){let T,O;$!==void 0&&b!==void 0&&A!==void 0&&w!==void 0?$>A?(T=$,O=b):(T=A,O=w):$!==void 0&&b!==void 0?(T=$,O=b):A!==void 0&&w!==void 0&&(T=A,O=w),!(T&&O)&&i&&h&&(T=i,O=h),T&&O&&(G(T,O),W.removeWidows=!0)}te()}f.UKPostcodes&&e[o]&&!e[o].trim()&&((ge=e[o-1])!=null&&ge.trim())&&a.test(e.slice(0,o))&&e[V(e,o)]&&g.test(e.slice(V(e,o)))&&(G(o,V(e,o)),W.removeWidows=!0),!p&&e[o]&&!e[o].trim()&&((ce=e[o-1])!=null&&ce.trim())&&($===void 0||(he=e[$-1])!=null&&he.trim())&&!"/>".includes(e[V(e,o)])&&!e.slice(0,o).trim().endsWith("br")&&!e.slice(0,o).trim().endsWith("hr")&&!(e.slice(0,o).endsWith("<")&&ke.some(T=>e.startsWith(T,V(e,o))))&&(i=$,h=b,$=o,b=void 0,(A!==void 0||w!==void 0)&&(A=void 0,w=void 0));let S;p&&(typeof p=="string"&&(!p.length||e.startsWith(p,o))?p=void 0:s(p)&&(!p.length||p.some(T=>e.startsWith(T,o)?(S=T,!0):!1))&&(p=void 0,o+=S.length,s(f.ignore)&&f.ignore.length&&e[o+1]&&f.ignore.some(T=>Oe(e,o,T.tails,{trimBeforeMatching:!0,cb:(O,de,pe)=>{var me;return pe&&(o=pe-1,(me=e[o+1])!=null&&me.trim()&&(v+=1)),!0}})))),e[o]&&"\r\n".includes(e[o])&&(v=0,d=0),s(f.tagRanges)&&f.tagRanges.length&&f.tagRanges.some(T=>o>=T[0]&&o<=T[1]&&T[1]-1>o?(o=T[1]-1,!0):!1)}return Q(e,n.current()).split("").forEach((o,S)=>{}),{res:Q(e,n.current(),f.reportProgressFunc?o=>{m=Math.floor((f.reportProgressFuncTo-f.reportProgressFuncFrom)*(1-l)+o/100*(f.reportProgressFuncTo-f.reportProgressFuncFrom)*l),m!==E&&(E=m,f.reportProgressFunc(m))}:void 0),ranges:n.current(),log:{timeTakenInMilliseconds:Date.now()-r},whatWasDone:W}}return Je(ft);})();
11
11
  /**
12
12
  * @name codsen-utils
13
13
  * @fileoverview Various utility functions
14
- * @version 1.8.0
14
+ * @version 1.9.0
15
15
  * @author Roy Revelt
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/codsen-utils/}
@@ -19,7 +19,7 @@
19
19
  /**
20
20
  * @name ranges-sort
21
21
  * @fileoverview Sort string index ranges
22
- * @version 6.2.0
22
+ * @version 6.2.1
23
23
  * @author Roy Revelt
24
24
  * @license MIT
25
25
  * {@link https://codsen.com/os/ranges-sort/}
@@ -27,7 +27,7 @@
27
27
  /**
28
28
  * @name ranges-merge
29
29
  * @fileoverview Merge and sort string index ranges
30
- * @version 9.2.0
30
+ * @version 9.2.2
31
31
  * @author Roy Revelt
32
32
  * @license MIT
33
33
  * {@link https://codsen.com/os/ranges-merge/}
@@ -35,7 +35,7 @@
35
35
  /**
36
36
  * @name ranges-apply
37
37
  * @fileoverview Take an array of string index ranges, delete/replace the string according to them
38
- * @version 7.2.0
38
+ * @version 7.2.2
39
39
  * @author Roy Revelt
40
40
  * @license MIT
41
41
  * {@link https://codsen.com/os/ranges-apply/}
@@ -51,7 +51,7 @@
51
51
  /**
52
52
  * @name ranges-push
53
53
  * @fileoverview Gather string index ranges
54
- * @version 7.2.0
54
+ * @version 7.2.1
55
55
  * @author Roy Revelt
56
56
  * @license MIT
57
57
  * {@link https://codsen.com/os/ranges-push/}
@@ -59,7 +59,7 @@
59
59
  /**
60
60
  * @name string-left-right
61
61
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
62
- * @version 6.2.0
62
+ * @version 6.2.1
63
63
  * @author Roy Revelt
64
64
  * @license MIT
65
65
  * {@link https://codsen.com/os/string-left-right/}
@@ -67,7 +67,7 @@
67
67
  /**
68
68
  * @name arrayiffy-if-string
69
69
  * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
70
- * @version 5.2.0
70
+ * @version 5.2.1
71
71
  * @author Roy Revelt
72
72
  * @license MIT
73
73
  * {@link https://codsen.com/os/arrayiffy-if-string/}
@@ -75,7 +75,7 @@
75
75
  /**
76
76
  * @name string-match-left-right
77
77
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
78
- * @version 9.2.0
78
+ * @version 9.2.2
79
79
  * @author Roy Revelt
80
80
  * @license MIT
81
81
  * {@link https://codsen.com/os/string-match-left-right/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-remove-widows",
3
- "version": "4.2.0",
3
+ "version": "4.2.2",
4
4
  "description": "Helps to prevent widow words in a text",
5
5
  "keywords": [
6
6
  "against",
@@ -71,14 +71,14 @@
71
71
  }
72
72
  },
73
73
  "dependencies": {
74
- "codsen-utils": "^1.8.0",
75
- "ranges-apply": "^7.2.0",
76
- "ranges-push": "^7.2.0",
77
- "string-left-right": "^6.2.0",
78
- "string-match-left-right": "^9.2.0"
74
+ "codsen-utils": "^1.9.0",
75
+ "ranges-apply": "^7.2.2",
76
+ "ranges-push": "^7.2.1",
77
+ "string-left-right": "^6.2.1",
78
+ "string-match-left-right": "^9.2.2"
79
79
  },
80
80
  "devDependencies": {
81
- "string-strip-html": "^13.6.0"
81
+ "string-strip-html": "^13.6.2"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=18.20.8"