/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/effectx@0.2.0/tools/cdata.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
const fs=require("fs"),packageJson=require("../package.json");function hexdump(e){let n=[];for(let t=0;t<e.length;t+=16){let i=e.slice(t,t+16),l=[];for(let e of i)l.push("0x"+e.toString(16).padStart(2,"0"));let s=`  ${l.join(", ")}`;n.push(s)}return n.join(",\n")}const inliner=require("inliner"),zlib=require("zlib");function strReplace(e,n,t){return e.split(n).join(t)}function adoptVersionAndRepo(e){let n=packageJson.repository?packageJson.repository.url:void 0;n&&(n=n.replace(/^git\+/,""),n=n.replace(/\.git$/,""),e=strReplace(e,"https://github.com/atuline/WLED",n),e=strReplace(e,"https://github.com/Aircoookie/WLED",n));let t=packageJson.version;return t&&(e=strReplace(e,"##VERSION##",t)),e}function writeHtmlGzipped(e,n){console.info("Reading "+e),new inliner(e,(function(t,i){if(console.info("Inlined "+i.length+" characters"),i=filter(i,"html-minify-ui"),console.info("Minified to "+i.length+" characters"),t)throw console.warn(t),t;i=adoptVersionAndRepo(i),zlib.gzip(i,{level:zlib.constants.Z_BEST_COMPRESSION},(function(t,i){if(t)throw console.warn(t),t;console.info("Compressed "+i.length+" bytes");const l=hexdump(i),s=`/*\n * Binary array for the Web UI.\n * gzip is used for smaller size and improved speeds.\n * \n * Please see https://github.com/Aircoookie/WLED/wiki/Add-own-functionality#web-ui\n * to find out how to easily modify the web UI source!\n */\n \n// Autogenerated from ${e}, do not edit!!\nconst uint16_t PAGE_index_L = ${i.length};\nconst uint8_t PAGE_index[] PROGMEM = {\n${l}\n};\n`;console.info("Writing "+n),fs.writeFileSync(n,s)}))}))}const CleanCSS=require("clean-css"),MinifyHTML=require("html-minifier-terser").minify;function filter(e,n){return e=adoptVersionAndRepo(e),void 0===n?e:"css-minify"==n?new CleanCSS({}).minify(e).styles:"html-minify"==n?MinifyHTML(e,{collapseWhitespace:!0,maxLineLength:80,minifyCSS:!0,minifyJS:!0,continueOnParseError:!1,removeComments:!0}):"html-minify-ui"==n?MinifyHTML(e,{collapseWhitespace:!0,conservativeCollapse:!0,maxLineLength:80,minifyCSS:!0,minifyJS:!0,continueOnParseError:!1,removeComments:!0}):(console.warn("Unknown filter: "+n),e)}function specToChunk(e,n){if("plaintext"==n.method){const t=fs.readFileSync(e+"/"+n.file).toString("utf-8"),i=`\n// Autogenerated from ${e}/${n.file}, do not edit!!\nconst char ${n.name}[] PROGMEM = R"${n.prepend||""}${filter(t,n.filter)}${n.append||""}";\n\n`;return n.mangle?n.mangle(i):i}if("binary"==n.method){const t=hexdump(fs.readFileSync(e+"/"+n.file)),i=`\n// Autogenerated from ${e}/${n.file}, do not edit!!\nconst uint16_t ${n.name}_length = ${t.length};\nconst uint8_t ${n.name}[] PROGMEM = {\n${t}\n};\n\n`;return n.mangle?n.mangle(i):i}console.warn("Unknown method: "+n.method)}function writeChunks(e,n,t){let i="/*\n * More web UI HTML source arrays.\n * This file is auto generated, please don't make any changes manually.\n * Instead, see https://github.com/Aircoookie/WLED/wiki/Add-own-functionality#web-ui\n * to find out how to easily modify the web UI source!\n */ \n";n.forEach((n=>{try{console.info("Reading "+e+"/"+n.file+" as "+n.name),i+=specToChunk(e,n)}catch(t){console.warn("Failed "+n.name+" from "+e+"/"+n.file,t.message.length>60?t.message.substring(0,60):t.message)}})),console.info("Writing "+i.length+" characters into "+t),fs.writeFileSync(t,i)}writeHtmlGzipped("wled00/data/index.htm","wled00/html_ui.h"),writeChunks("wled00/data",[{file:"style.css",name:"PAGE_settingsCss",prepend:"=====(<style>",append:"</style>)=====",method:"plaintext",filter:"css-minify"},{file:"settings.htm",name:"PAGE_settings",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>e.replace("%","%%").replace(/User Interface\<\/button\>\<\/form\>/gms,"User Interface</button></form>%DMXMENU%")},{file:"settings_wifi.htm",name:"PAGE_settings_wifi",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>e.replace(/\<link rel="stylesheet".*\>/gms,"").replace(/\<style\>.*\<\/style\>/gms,"%CSS%%SCSS%").replace(/function GetV().*\<\/script\>/gms,"function GetV() {var d=document;\n")},{file:"settings_leds.htm",name:"PAGE_settings_leds",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>e.replace(/\<link rel="stylesheet".*\>/gms,"").replace(/\<style\>.*\<\/style\>/gms,"%CSS%%SCSS%").replace(/function GetV().*\<\/script\>/gms,"function GetV() {var d=document;\n")},{file:"settings_dmx.htm",name:"PAGE_settings_dmx",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>`\n#ifdef WLED_ENABLE_DMX\n${e.replace(/\<link rel="stylesheet".*\>/gms,"").replace(/\<style\>.*\<\/style\>/gms,"%CSS%%SCSS%").replace(/function GetV().*\<\/script\>/gms,"function GetV() {var d=document;\n")}\n#else\nconst char PAGE_settings_dmx[] PROGMEM = R"=====()=====";\n#endif\n`},{file:"settings_ui.htm",name:"PAGE_settings_ui",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>e.replace(/\<link rel="stylesheet".*\>/gms,"").replace(/\<style\>.*\<\/style\>/gms,"%CSS%%SCSS%").replace(/function GetV().*\<\/script\>/gms,"function GetV() {var d=document;\n")},{file:"settings_sync.htm",name:"PAGE_settings_sync",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>e.replace(/\<link rel="stylesheet".*\>/gms,"").replace(/\<style\>.*\<\/style\>/gms,"%CSS%%SCSS%").replace(/function GetV().*\<\/script\>/gms,"function GetV() {\n")},{file:"settings_time.htm",name:"PAGE_settings_time",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>e.replace(/\<link rel="stylesheet".*\>/gms,"").replace(/\<style\>.*\<\/style\>/gms,"%CSS%%SCSS%").replace(/function GetV().*\<\/script\>/gms,"function GetV() {\n")},{file:"settings_sec.htm",name:"PAGE_settings_sec",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>e.replace(/\<link rel="stylesheet".*\>/gms,"").replace(/\<style\>.*\<\/style\>/gms,"%CSS%%SCSS%").replace(/function GetV().*\<\/script\>/gms,"function GetV() {var d=document;\n")}],"wled00/html_settings.h"),writeChunks("wled00/data",[{file:"usermod.htm",name:"PAGE_usermod",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>e.replace(/fetch\("http\:\/\/.*\/win/gms,'fetch("/win')},{file:"msg.htm",name:"PAGE_msg",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>e.replace(/\<h2\>.*\<\/body\>/gms,"<h2>%MSG%</body>")},{file:"dmxmap.htm",name:"PAGE_dmxmap",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify",mangle:e=>`\n#ifdef WLED_ENABLE_DMX\n${e.replace(/function FM\(\)[ ]?\{/gms,"function FM() {%DMXVARS%\n")}\n#else\nconst char PAGE_dmxmap[] PROGMEM = R"=====()=====";\n#endif\n`},{file:"update.htm",name:"PAGE_update",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify"},{file:"welcome.htm",name:"PAGE_welcome",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify"},{file:"liveview.htm",name:"PAGE_liveview",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify"},{file:"liveviewws.htm",name:"PAGE_liveviewws",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify"},{file:"404.htm",name:"PAGE_404",prepend:"=====(",append:")=====",method:"plaintext",filter:"html-minify"},{file:"favicon.ico",name:"favicon",method:"binary"}],"wled00/html_other.h");
//# sourceMappingURL=/sm/f1e43f36df7423d8a86ea4cac3e2cfae1dab421852c8d78aa8133a07cee8d1d8.map