scripts/tiny/rm-cmts-lkg.js
/*! For license information please see index.js.LICENSE.txt */
(()=>{"use strict";var e={341:(e,t,s)=>{const n=s(63),{apply:r,walk:o}=n,l=(e,t)=>{e&&console.warn("\n[Exception occurred] source will be returned without processing",e.showErrorMessage?t instanceof Error&&`\nmessage: ${t.message}`:""),i++};let f=0,i=0;const u=e=>(t,s)=>{if("string"!=typeof t&&(()=>{throw new TypeError("invalid text content!")})(),!t.length)return l(),e===r?t:void 0;let n;s=s||{};try{n=e(t,s),f++}catch(o){l(s,o),e===r&&(n=t)}return n};let c;const g=({event:e,fragment:t})=>1===e&&/^\/\*(\*|!)\s|^\/\*(?!-).+\*\/$/.test(t),a=u(r);Object.defineProperties(a,{version:{value:"v3.3.11",enumerable:!0},walk:{value:u(o)},noops:{get:()=>i,enumerable:!0},processed:{get:()=>f,enumerable:!0},reset:{value:()=>{f=i=0,n.reset()}},getDetectedReContext:{value:n.getDetectedReContext},
setListener:{value:n.setListener},keepJsDoc:{get:()=>c,set:e=>{n.setListener(e?g:void 0),c=e}}}),e.exports=a},63:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setListener=t.reset=t.getDetectedReContext=t.walk=t.apply=void 0;const n=s(218),{detectNewLine:r,detectRegex:o,lookupRegexes:l}=n,f=(e,t,s=!1)=>{const n={offset:0,collectRegex:t,newline:r(e)};return s?n.proceed=n.isWalk=!0:n.result="",n},i=(e,t)=>{const s=t.offset,n=e[s],r=e.length;let o,l=s+1,f=!1;for(;l<r;)if("\\"===(o=e[l++]))f=!f;else if(f)f=!1;else if(o===n)return t.offset=l,t.isWalk||(t.result+=e.substring(s,l)),!0;throw new SyntaxError(`incomplete quote, offset=${s}, remaining=<[${e.substring(s,s+200)}]>`)},u=[];let c=0;const g=/^(?:\/\/\/?\s*@ts-[-\w]+|\/\/\/\s*<reference)/,a=[];a[96]=(e,t)=>{
let s,n=t.offset,r=n+1,o=!1;const l=e.length;e:for(;r<l;)if("\\"===(s=e[r++]))o=!o;else if(o)o=!1;else if("$"===s){if("{"===e[r]){r++;const s=a;let o=r;for(t.isWalk||(t.result+=e.substring(n,r));r<l;){const l=e[r].charCodeAt(0);if(125===l){n=++r,t.isWalk||(t.result+=e.substring(o,r));continue e}const f=s[l];f?(t.isWalk||(t.result+=e.substring(o,r)),t.offset=r,o=f(e,t)?t.offset:t.offset++,r=t.offset):r++}}}else if("`"===s)return t.offset=r,t.isWalk||(t.result+=e.substring(n,r)),!0;throw new SyntaxError(`incomplete backquote, offset=${n}, remaining=<[${e.substring(n,n+200)}]>`)},a[34]=i,a[39]=i,a[47]=(e,t)=>{const s=t.offset,n=e[s+1];let r;if("*"===n){const n=e.indexOf("*/",s+2);if(-1!==n){if(r=e.substring(s,n+2),t.eventDone)t.result+=r;else{const e={event:1,fragment:r,offset:s}
;t.isWalk?t.proceed=x(e):x(e)&&(t.result+=r)}return t.offset=n+2,!0}throw new SyntaxError("incomplete multi line comment")}if("<"===e[s-1])return!1;let l=t.newline&&e.indexOf(t.newline,s+1)||-1;if(-1===l&&(l=e.length),r=e.substring(s,l),"/"===n){if(t.offset=l,t.eventDone)t.result+=r;else{const e={event:0,fragment:r,offset:s};t.isWalk?t.proceed=x(e):(g.test(r)||x(e))&&(t.result+=r)}return!0}const f=o(r);return!!f&&(t.collectRegex&&(u[c++]=f.body),t.offset=s+f.lastIndex,t.isWalk||(t.result+=e.substring(s,t.offset)),!0)};const d=()=>!1;let x=d;t.apply=(e,t)=>{const s=e.length,n=f(e,t.collectRegex);let r=0,o=0;for(;r<s;){const t=a[e.charCodeAt(r)];t?(n.result+=e.substring(o,r),n.offset=r,o=t(e,n)?n.offset:n.offset++,r=n.offset):r++}if(s-o>0&&(n.result+=e.substring(o,r)),
t.preserveBlanks)return n.result;e=n.result,n.result="",n.eventDone=!0,n.collectRegex=!1;const i=l(n.newline),u=i.wsqs;let c;for(o=0;c=u.exec(e);){const t=c[0][0];if("/"===t||"`"===t){n.offset=c.index,o!==n.offset&&(n.result+=e.substring(o,n.offset)),o=a["/"===t?47:96](e,n)?n.offset:n.offset++,u.lastIndex=n.offset;continue}const s='"'===t||"'"===t?u.lastIndex:c.index;n.result+=e.substring(o,s),o=u.lastIndex}e.length-o>0&&(n.result+=e.substring(o,e.length)),e=n.result.replace(i.first,"");const g=n.newline.length,d=e.length-g;return 1===g&&e[d]===n.newline||2===g&&"\r"===e[d]&&"\n"===e[d+1]?e.substring(0,d):e};t.walk=(e,t)=>{const s=e.length,n=a,r=f(e,t.collectRegex,!0);let o=0;for(;r.proceed&&o<s;){const t=n[e.charCodeAt(o)];t?(r.offset=o,t(e,r)||r.offset++,o=r.offset):o++}};const p=e=>{
const t=new Map,s=[];for(const n of e)t.has(n)||(s.push(n),t.set(n,!0));return s};t.getDetectedReContext=()=>({detectedReLiterals:u,uniqReLiterals:p(u).sort()});t.reset=()=>{u.length=0,c=0};t.setListener=e=>{x="function"==typeof e?e:d}},218:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.detectRegex=t.lookupRegexes=t.detectNewLine=void 0;t.detectNewLine=e=>{let t,s=0;for(;t=e[s++];){if("\n"===t)return"\n";if("\r"===t)return"\n"===e[s]?"\r\n":"\r"}return""};const s=/^\s+/;t.lookupRegexes=e=>({wsqs:"\n"===e?/\n\s+(?=\n)|\s+(?=\n)|`|"(?:[^\\"]|\\[^])*"|'(?:[^\\']|\\[^])*'|\//g:"\r\n"===e?/\r\n\s+(?=\r\n)|\s+(?=\r\n)|`|"(?:[^\\"]|\\[^])*"|'(?:[^\\']|\\[^])*'|\//g:"\r"===e?/\r\s+(?=\r)|\s+(?=\r)|`|"(?:[^\\"]|\\[^])*"|'(?:[^\\']|\\[^])*'|\//g:/^\s+|\s+$/g,first:e?s:""})
;const n=/^\/(?![?+])/,r=/[^gimsuyd\d?*+\/\\]/,o=/[\n\r]/;t.detectRegex=e=>{if(!n.test(e)||o.test(e))return null;let t=0,s=!1,l=0;const f=e.length;let i,u=1;for(;u<f;){const n=e[u++];if("\\"===n)s=!s;else if(s)s=!1;else{if("/"===n&&!l){if(t)return null;i=e.substring(0,u);break}if("("===n)!l&&t++;else if(")"===n)!l&&t--;else if("["===n)l=1;else if("]"===n)l=0;else if(t<0||("+"===n||"*"===n)&&e[u]===n)return null}}if(i){const t=/^([gimsuyd]{1,7})?(?:\s*(?:;|,|\.|]|\)|\s))?/g,s=e.substring(u),n=t.exec(s);if(0===t.lastIndex&&r.test(s))return null;const o=n[1]||"";return{body:i+o,lastIndex:u+o.length}}return null}}},t={};var s=function s(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,s),o.exports}(341);module.exports=s})();