@deneb-ui/cli 2.0.119 → 2.0.120
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deneb-ui/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.120",
|
|
4
4
|
"description": "Official DENEB CLI — scaffold, convert, validate, and package Fivora-ready storefront templates.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"deneb": "bin/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/parser": "^7.28.0",
|
|
52
|
-
"@deneb-ui/core": "^2.0.
|
|
52
|
+
"@deneb-ui/core": "^2.0.120",
|
|
53
53
|
"@octokit/rest": "^22.0.1",
|
|
54
54
|
"adm-zip": "^0.6.0",
|
|
55
55
|
"dotenv": "^17.4.2",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var Bi=Object.create;var qe=Object.defineProperty;var ji=Object.getOwnPropertyDescriptor;var Vi=Object.getOwnPropertyNames;var Ui=Object.getPrototypeOf,zi=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Hi=(e,t)=>{for(var n in t)qe(e,n,{get:t[n],enumerable:!0})},bn=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vi(t))!zi.call(e,i)&&i!==n&&qe(e,i,{get:()=>t[i],enumerable:!(r=ji(t,i))||r.enumerable});return e};var kt=(e,t,n)=>(n=e!=null?Bi(Ui(e)):{},bn(t||!e||!e.__esModule?qe(n,"default",{value:e,enumerable:!0}):n,e)),Wi=e=>bn(qe({},"__esModule",{value:!0}),e);var At=F((Ea,Sn)=>{Sn.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var Ge=F(wn=>{var Tn={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function qi(e){return function(...t){return t.length&&(e=e.replace(/\{(\d)\}/g,(n,r)=>t[r]||"")),new Error("ADM-ZIP: "+e)}}for(let e of Object.keys(Tn))wn[e]=qi(Tn[e])});var kn=F((Sa,Cn)=>{var Gi=require("fs"),j=require("path"),Pn=At(),Zi=Ge(),Ki=typeof process=="object"&&process.platform==="win32",In=e=>typeof e=="object"&&e!==null,xn=new Uint32Array(256).map((e,t)=>{for(let n=0;n<8;n++)(t&1)!==0?t=3988292384^t>>>1:t>>>=1;return t>>>0});function $(e){this.sep=j.sep,this.fs=Gi,In(e)&&In(e.fs)&&typeof e.fs.statSync=="function"&&(this.fs=e.fs)}Cn.exports=$;$.prototype.makeDir=function(e){let t=this;function n(r){let i=r.split(t.sep)[0];r.split(t.sep).forEach(function(s){if(!(!s||s.substr(-1,1)===":")){i+=t.sep+s;var o;try{o=t.fs.statSync(i)}catch(a){if(a.message&&a.message.startsWith("ENOENT"))t.fs.mkdirSync(i);else throw a}if(o&&o.isFile())throw Zi.FILE_IN_THE_WAY(`"${i}"`)}})}n(e)};$.prototype.writeFileTo=function(e,t,n,r){let i=this;if(i.fs.existsSync(e)){if(!n)return!1;var s=i.fs.statSync(e);if(s.isDirectory())return!1}var o=j.dirname(e);i.fs.existsSync(o)||i.makeDir(o);var a;try{a=i.fs.openSync(e,"w",438)}catch{i.fs.chmodSync(e,438),a=i.fs.openSync(e,"w",438)}if(a)try{i.fs.writeSync(a,t,0,t.length,0)}finally{i.fs.closeSync(a)}return i.fs.chmodSync(e,r||438),!0};$.prototype.writeFileToAsync=function(e,t,n,r,i){typeof r=="function"&&(i=r,r=void 0);let s=this;s.fs.exists(e,function(o){if(o&&!n)return i(!1);s.fs.stat(e,function(a,l){if(o&&l&&l.isDirectory())return i(!1);var u=j.dirname(e);s.fs.exists(u,function(f){if(!f)try{s.makeDir(u)}catch{return i(!1)}let g=function(b){s.fs.write(b,t,0,t.length,0,function(S){s.fs.close(b,function(){if(S)return i(!1);s.fs.chmod(e,r||438,function(){i(!0)})})})};s.fs.open(e,"w",438,function(b,S){b?s.fs.chmod(e,438,function(){s.fs.open(e,"w",438,function(m,d){if(m||!d)return i(!1);g(d)})}):S?g(S):i(!1)})})})})};$.prototype.findFiles=function(e){let t=this;function n(r,i,s,o){typeof i=="boolean"&&(s=i,i=void 0);let a=[];return t.fs.readdirSync(r).forEach(function(l){let u=j.join(r,l),f=t.fs.statSync(u);if((!i||i.test(u))&&a.push(j.normalize(u)+(f.isDirectory()?t.sep:"")),f.isDirectory()&&s){let g=t.fs.realpathSync(u);o.has(g)||(o.add(g),a=a.concat(n(u,i,s,o)))}}),a}return n(e,void 0,!0,new Set([t.fs.realpathSync(e)]))};$.prototype.findFilesAsync=function(e,t){let n=this,r=[],i=!1,s=function(a){i||(i=!0,t(a,a?void 0:r))},o=function(a,l,u){n.fs.readdir(a,function(f,g){if(f)return u(f);let b=g.length;if(!b)return u();g.forEach(function(S){let m=j.join(a,S);n.fs.stat(m,function(d,p){if(d)return u(d);if(!p){--b||u();return}if(r.push(j.normalize(m)+(p.isDirectory()?n.sep:"")),!p.isDirectory()){--b||u();return}n.fs.realpath(m,function(h,E){if(h)return u(h);if(l.has(E)){--b||u();return}l.add(E),o(m,l,function(c){if(c)return u(c);--b||u()})})})})})};n.fs.realpath(e,function(a,l){if(a)return s(a);o(e,new Set([l]),s)})};$.prototype.getAttributes=function(){};$.prototype.setAttributes=function(){};$.crc32update=function(e,t){return xn[(e^t)&255]^e>>>8};$.crc32=function(e){typeof e=="string"&&(e=Buffer.from(e,"utf8"));let t=e.length,n=-1;for(let r=0;r<t;)n=$.crc32update(n,e[r++]);return~n>>>0};$.methodToString=function(e){switch(e){case Pn.STORED:return"STORED ("+e+")";case Pn.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}};$.canonical=function(e){if(!e)return"";let t=j.posix.normalize("/"+e.split("\\").join("/"));return j.join(".",t)};$.zipnamefix=function(e){if(!e)return"";let t=j.posix.normalize("/"+e.split("\\").join("/"));return j.posix.join(".",t)};$.findLast=function(e,t){if(!Array.isArray(e))throw new TypeError("arr is not array");let n=e.length>>>0;for(let r=n-1;r>=0;r--)if(t(e[r],r,e))return e[r]};$.sanitize=function(e,t){e=j.resolve(j.normalize(e));for(var n=t.split("/"),r=0,i=n.length;r<i;r++){var s=j.normalize(j.join(e,n.slice(r,i).join(j.sep)));if(s===e||s.startsWith(e+j.sep))return s}return j.normalize(j.join(e,j.basename(t)))};$.toBuffer=function(t,n){return Buffer.isBuffer(t)?t:t instanceof Uint8Array?Buffer.from(t):typeof t=="string"?n(t):Buffer.alloc(0)};$.readBigUInt64LE=function(e,t){let n=e.readUInt32LE(t);return e.readUInt32LE(t+4)*4294967296+n};$.writeBigUInt64LE=function(e,t,n){let r=t>>>0,i=Math.floor(t/4294967296)>>>0;e.writeUInt32LE(r,n),e.writeUInt32LE(i,n+4)};$.fromDOS2Date=function(e){return new Date((e>>25&127)+1980,Math.max((e>>21&15)-1,0),Math.max(e>>16&31,1),e>>11&31,e>>5&63,(e&31)<<1)};$.fromDate2DOS=function(e){let t=0,n=0;return e.getFullYear()>1979&&(t=(e.getFullYear()-1980&127)<<9|e.getMonth()+1<<5|e.getDate(),n=e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1),t<<16|n};$.isWin=Ki;$.crcTable=xn});var _n=F((Ta,An)=>{var Yi=require("path");An.exports=function(e,{fs:t}){var n=e||"",r=s(),i=null;function s(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return n&&t.existsSync(n)?(i=t.statSync(n),r.directory=i.isDirectory(),r.mtime=i.mtime,r.atime=i.atime,r.executable=(73&i.mode)!==0,r.readonly=(128&i.mode)===0,r.hidden=Yi.basename(n)[0]==="."):console.warn("Invalid path: "+n),{get directory(){return r.directory},get readOnly(){return r.readonly},get hidden(){return r.hidden},get mtime(){return r.mtime},get atime(){return r.atime},get executable(){return r.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:n,isDirectory:r.directory,isReadOnly:r.readonly,isHidden:r.hidden,isExecutable:r.executable,mTime:r.mtime,aTime:r.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var Fn=F((wa,vn)=>{vn.exports={efs:!0,encode:e=>Buffer.from(e,"utf8"),decode:e=>e.toString("utf8")}});var Ie=F((Pa,Pe)=>{Pe.exports=kn();Pe.exports.Constants=At();Pe.exports.Errors=Ge();Pe.exports.FileAttr=_n();Pe.exports.decoder=Fn()});var Ln=F((Ia,Rn)=>{var ue=Ie(),I=ue.Constants;Rn.exports=function(){var e=20,t=10,n=0,r=0,i=0,s=0,o=0,a=0,l=0,u=0,f=0,g=0,b=0,S=0,m=0;e|=ue.isWin?2560:768,n|=I.FLG_EFS;let d={extraLen:0},p=c=>Math.max(0,c)>>>0,h=c=>Math.max(0,c)&65535,E=c=>Math.max(0,c)&255;return i=ue.fromDate2DOS(new Date),{get made(){return e},set made(c){e=c},get version(){return t},set version(c){t=c},get flags(){return n},set flags(c){n=c},get flags_efs(){return(n&I.FLG_EFS)>0},set flags_efs(c){c?n|=I.FLG_EFS:n&=~I.FLG_EFS},get flags_desc(){return(n&I.FLG_DESC)>0},set flags_desc(c){c?n|=I.FLG_DESC:n&=~I.FLG_DESC},get method(){return r},set method(c){switch(c){case I.STORED:this.version=10;break;case I.DEFLATED:default:this.version=20}r=c},get time(){return ue.fromDOS2Date(this.timeval)},set time(c){c=new Date(c),this.timeval=ue.fromDate2DOS(c)},get timeval(){return i},set timeval(c){i=p(c)},get timeHighByte(){return E(i>>>8)},get crc(){return s},set crc(c){s=p(c)},get compressedSize(){return o},set compressedSize(c){o=p(c)},get size(){return a},set size(c){a=p(c)},get fileNameLength(){return l},set fileNameLength(c){l=c},get extraLength(){return u},set extraLength(c){u=c},get extraLocalLength(){return d.extraLen},set extraLocalLength(c){d.extraLen=c},get commentLength(){return f},set commentLength(c){f=c},get diskNumStart(){return g},set diskNumStart(c){g=p(c)},get inAttr(){return b},set inAttr(c){b=p(c)},get attr(){return S},set attr(c){S=p(c)},get fileAttr(){return(S||0)>>16&4095},get offset(){return m},set offset(c){m=p(c)},get encrypted(){return(n&I.FLG_ENC)===I.FLG_ENC},get centralHeaderSize(){return I.CENHDR+l+u+f},get realDataOffset(){return m+I.LOCHDR+d.fnameLen+d.extraLen},get localHeader(){return d},loadLocalHeaderFromBinary:function(c){var y=c.slice(m,m+I.LOCHDR);if(y.readUInt32LE(0)!==I.LOCSIG)throw ue.Errors.INVALID_LOC();d.version=y.readUInt16LE(I.LOCVER),d.flags=y.readUInt16LE(I.LOCFLG),d.flags_desc=(d.flags&I.FLG_DESC)>0,d.method=y.readUInt16LE(I.LOCHOW),d.time=y.readUInt32LE(I.LOCTIM),d.crc=y.readUInt32LE(I.LOCCRC),d.compressedSize=y.readUInt32LE(I.LOCSIZ),d.size=y.readUInt32LE(I.LOCLEN),d.fnameLen=y.readUInt16LE(I.LOCNAM),d.extraLen=y.readUInt16LE(I.LOCEXT);let w=m+I.LOCHDR+d.fnameLen,T=w+d.extraLen;return c.slice(w,T)},loadFromBinary:function(c){if(c.length!==I.CENHDR||c.readUInt32LE(0)!==I.CENSIG)throw ue.Errors.INVALID_CEN();e=c.readUInt16LE(I.CENVEM),t=c.readUInt16LE(I.CENVER),n=c.readUInt16LE(I.CENFLG),r=c.readUInt16LE(I.CENHOW),i=c.readUInt32LE(I.CENTIM),s=c.readUInt32LE(I.CENCRC),o=c.readUInt32LE(I.CENSIZ),a=c.readUInt32LE(I.CENLEN),l=c.readUInt16LE(I.CENNAM),u=c.readUInt16LE(I.CENEXT),f=c.readUInt16LE(I.CENCOM),g=c.readUInt16LE(I.CENDSK),b=c.readUInt16LE(I.CENATT),S=c.readUInt32LE(I.CENATX),m=c.readUInt32LE(I.CENOFF)},localHeaderToBinary:function(){var c=Buffer.alloc(I.LOCHDR);return c.writeUInt32LE(I.LOCSIG,0),c.writeUInt16LE(t,I.LOCVER),c.writeUInt16LE(n&~I.FLG_DESC,I.LOCFLG),c.writeUInt16LE(r,I.LOCHOW),c.writeUInt32LE(i,I.LOCTIM),c.writeUInt32LE(s,I.LOCCRC),c.writeUInt32LE(o,I.LOCSIZ),c.writeUInt32LE(a,I.LOCLEN),c.writeUInt16LE(l,I.LOCNAM),c.writeUInt16LE(d.extraLen,I.LOCEXT),c},centralHeaderToBinary:function(){var c=Buffer.alloc(I.CENHDR+l+u+f);return c.writeUInt32LE(I.CENSIG,0),c.writeUInt16LE(e,I.CENVEM),c.writeUInt16LE(t,I.CENVER),c.writeUInt16LE(n&~I.FLG_DESC,I.CENFLG),c.writeUInt16LE(r,I.CENHOW),c.writeUInt32LE(i,I.CENTIM),c.writeUInt32LE(s,I.CENCRC),c.writeUInt32LE(o,I.CENSIZ),c.writeUInt32LE(a,I.CENLEN),c.writeUInt16LE(l,I.CENNAM),c.writeUInt16LE(u,I.CENEXT),c.writeUInt16LE(f,I.CENCOM),c.writeUInt16LE(g,I.CENDSK),c.writeUInt16LE(b,I.CENATT),c.writeUInt32LE(S,I.CENATX),c.writeUInt32LE(m,I.CENOFF),c},toJSON:function(){let c=function(y){return y+" bytes"};return{made:e,version:t,flags:n,method:ue.methodToString(r),time:this.time,crc:"0x"+s.toString(16).toUpperCase(),compressedSize:c(o),size:c(a),fileNameLength:c(l),extraLength:c(u),commentLength:c(f),diskNumStart:g,inAttr:b,attr:S,offset:m,centralHeaderSize:c(I.CENHDR+l+u+f)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var Dn=F((xa,Nn)=>{var Y=Ie(),C=Y.Constants;Nn.exports=function(){var e=0,t=0,n=0,r=0,i=0;let s=()=>e>C.EF_ZIP64_OR_16||t>C.EF_ZIP64_OR_16||n>C.EF_ZIP64_OR_32||r>C.EF_ZIP64_OR_32;return{get diskEntries(){return e},set diskEntries(o){e=t=o},get totalEntries(){return t},set totalEntries(o){t=e=o},get size(){return n},set size(o){n=o},get offset(){return r},set offset(o){r=o},get commentLength(){return i},set commentLength(o){i=o},get mainHeaderSize(){return(s()?C.ZIP64HDR+C.END64HDR:0)+C.ENDHDR+i},loadFromBinary:function(o){if((o.length!==C.ENDHDR||o.readUInt32LE(0)!==C.ENDSIG)&&(o.length<C.ZIP64HDR||o.readUInt32LE(0)!==C.ZIP64SIG))throw Y.Errors.INVALID_END();o.readUInt32LE(0)===C.ENDSIG?(e=o.readUInt16LE(C.ENDSUB),t=o.readUInt16LE(C.ENDTOT),n=o.readUInt32LE(C.ENDSIZ),r=o.readUInt32LE(C.ENDOFF),i=o.readUInt16LE(C.ENDCOM)):(e=Y.readBigUInt64LE(o,C.ZIP64SUB),t=Y.readBigUInt64LE(o,C.ZIP64TOT),n=Y.readBigUInt64LE(o,C.ZIP64SIZB),r=Y.readBigUInt64LE(o,C.ZIP64OFF),i=0)},toBinary:function(){if(!s()){var o=Buffer.alloc(C.ENDHDR+i);return o.writeUInt32LE(C.ENDSIG,0),o.writeUInt32LE(0,4),o.writeUInt16LE(e,C.ENDSUB),o.writeUInt16LE(t,C.ENDTOT),o.writeUInt32LE(n,C.ENDSIZ),o.writeUInt32LE(r,C.ENDOFF),o.writeUInt16LE(i,C.ENDCOM),o.fill(" ",C.ENDHDR),o}var o=Buffer.alloc(this.mainHeaderSize);let a=0;o.writeUInt32LE(C.ZIP64SIG,a),Y.writeBigUInt64LE(o,C.ZIP64HDR-C.ZIP64LEAD,a+C.ZIP64SIZE),o.writeUInt16LE(45,a+C.ZIP64VEM),o.writeUInt16LE(45,a+C.ZIP64VER),o.writeUInt32LE(0,a+C.ZIP64DSK),o.writeUInt32LE(0,a+C.ZIP64DSKDIR),Y.writeBigUInt64LE(o,e,a+C.ZIP64SUB),Y.writeBigUInt64LE(o,t,a+C.ZIP64TOT),Y.writeBigUInt64LE(o,n,a+C.ZIP64SIZB),Y.writeBigUInt64LE(o,r,a+C.ZIP64OFF);let l=r+n;return a+=C.ZIP64HDR,o.writeUInt32LE(C.END64SIG,a),o.writeUInt32LE(0,a+C.END64START),Y.writeBigUInt64LE(o,l,a+C.END64OFF),o.writeUInt32LE(1,a+C.END64NUMDISKS),a+=C.END64HDR,o.writeUInt32LE(C.ENDSIG,a),o.writeUInt32LE(0,a+4),o.writeUInt16LE(Math.min(e,C.EF_ZIP64_OR_16),a+C.ENDSUB),o.writeUInt16LE(Math.min(t,C.EF_ZIP64_OR_16),a+C.ENDTOT),o.writeUInt32LE(Math.min(n,C.EF_ZIP64_OR_32),a+C.ENDSIZ),o.writeUInt32LE(Math.min(r,C.EF_ZIP64_OR_32),a+C.ENDOFF),o.writeUInt16LE(i,a+C.ENDCOM),o.fill(" ",a+C.ENDHDR),o},toJSON:function(){let o=function(a,l){let u=a.toString(16).toUpperCase();for(;u.length<l;)u="0"+u;return"0x"+u};return{diskEntries:e,totalEntries:t,size:n+" bytes",offset:o(r,4),commentLength:i}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var vt=F(_t=>{_t.EntryHeader=Ln();_t.MainHeader=Dn()});var $n=F((ka,On)=>{On.exports=function(e){var t=require("zlib"),n={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,n)},deflateAsync:function(r){var i=t.createDeflateRaw(n),s=[],o=0;i.on("data",function(a){s.push(a),o+=a.length}),i.on("end",function(){var a=Buffer.alloc(o),l=0;a.fill(0);for(var u=0;u<s.length;u++){var f=s[u];f.copy(a,l),l+=f.length}r&&r(a)}),i.end(e)}}}});var Bn=F((Aa,Mn)=>{var Ji=+(process?.versions?.node??"").split(".")[0]||0;Mn.exports=function(e,t){var n=require("zlib");let r=Ji>=15&&t>0?{maxOutputLength:t}:{};return{inflate:function(){return n.inflateRawSync(e,r)},inflateAsync:function(i){var s=n.createInflateRaw(r),o=[],a=0;s.on("data",function(l){o.push(l),a+=l.length}),s.on("end",function(){var l=Buffer.alloc(a),u=0;l.fill(0);for(var f=0;f<o.length;f++){var g=o[f];g.copy(l,u),u+=g.length}i&&i(l)}),s.end(e)}}}});var Hn=F((_a,zn)=>{"use strict";var{randomFillSync:jn}=require("crypto"),Xi=Ge(),Qi=new Uint32Array(256).map((e,t)=>{for(let n=0;n<8;n++)(t&1)!==0?t=t>>>1^3988292384:t>>>=1;return t>>>0}),Un=(e,t)=>Math.imul(e,t)>>>0,Vn=(e,t)=>Qi[(e^t)&255]^e>>>8,De=()=>typeof jn=="function"?jn(Buffer.alloc(12)):De.node();De.node=()=>{let e=Buffer.alloc(12),t=e.length;for(let n=0;n<t;n++)e[n]=Math.random()*256&255;return e};var Ze={genSalt:De};function Ke(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let n=0;n<t.length;n++)this.updateKeys(t[n])}Ke.prototype.updateKeys=function(e){let t=this.keys;return t[0]=Vn(t[0],e),t[1]+=t[0]&255,t[1]=Un(t[1],134775813)+1,t[2]=Vn(t[2],t[1]>>>24),e};Ke.prototype.next=function(){let e=(this.keys[2]|2)>>>0;return Un(e,e^1)>>8&255};function eo(e){let t=new Ke(e);return function(n){let r=Buffer.alloc(n.length),i=0;for(let s of n)r[i++]=t.updateKeys(s^t.next());return r}}function to(e){let t=new Ke(e);return function(n,r,i=0){r||(r=Buffer.alloc(n.length));for(let s of n){let o=t.next();r[i++]=s^o,t.updateKeys(s)}return r}}function no(e,t,n){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);let r=eo(n),i=r(e.slice(0,12)),s=(t.flags&8)===8?t.timeHighByte:t.crc>>>24;if(i[11]!==s)throw Xi.WRONG_PASSWORD();return r(e.slice(12))}function ro(e){Buffer.isBuffer(e)&&e.length>=12?Ze.genSalt=function(){return e.slice(0,12)}:e==="node"?Ze.genSalt=De.node:Ze.genSalt=De}function io(e,t,n,r=!1){e==null&&(e=Buffer.alloc(0)),Buffer.isBuffer(e)||(e=Buffer.from(e.toString()));let i=to(n),s=Ze.genSalt();s[11]=t.crc>>>24&255,r&&(s[10]=t.crc>>>16&255);let o=Buffer.alloc(e.length+12);return i(s,o),i(e,o,12)}zn.exports={decrypt:no,encrypt:io,_salter:ro}});var Wn=F(Ye=>{Ye.Deflater=$n();Ye.Inflater=Bn();Ye.ZipCrypto=Hn()});var Rt=F((Fa,qn)=>{var N=Ie(),oo=vt(),K=N.Constants,Ft=Wn();qn.exports=function(e,t){var n=new oo.EntryHeader,r=Buffer.alloc(0),i=Buffer.alloc(0),s=!1,o=null,a=Buffer.alloc(0),l=Buffer.alloc(0),u=!0;let f=e,g=typeof f.decoder=="object"?f.decoder:N.decoder;u=g.hasOwnProperty("efs")?g.efs:!1;function b(){return!t||!(t instanceof Uint8Array)?Buffer.alloc(0):(l=n.loadLocalHeaderFromBinary(t),t.slice(n.realDataOffset,n.realDataOffset+n.compressedSize))}function S(c){let y=n.flags_desc||n.localHeader.flags_desc?n.crc:n.localHeader.crc;return N.crc32(c)===y}function m(c,y,w){if(typeof y>"u"&&typeof c=="string"&&(w=c,c=void 0),s)return c&&y&&y(Buffer.alloc(0),N.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var T=b();if(T.length===0)return c&&y&&y(T),T;if(n.encrypted){if(typeof w!="string"&&!Buffer.isBuffer(w))throw N.Errors.INVALID_PASS_PARAM();T=Ft.ZipCrypto.decrypt(T,n,w)}var P;switch(n.method){case N.Constants.STORED:if(P=Buffer.alloc(T.length),T.copy(P),S(P))return c&&y&&y(P),P;throw c&&y&&y(P,N.Errors.BAD_CRC()),N.Errors.BAD_CRC();case N.Constants.DEFLATED:var x=new Ft.Inflater(T,n.size);if(c)x.inflateAsync(function(v){y&&(S(v)?y(v):y(v,N.Errors.BAD_CRC()))});else{if(P=x.inflate(),!S(P))throw N.Errors.BAD_CRC(`"${g.decode(r)}"`);return P}break;default:throw c&&y&&y(Buffer.alloc(0),N.Errors.UNKNOWN_METHOD()),N.Errors.UNKNOWN_METHOD()}}function d(c,y){if((!o||!o.length)&&Buffer.isBuffer(t))return c&&y&&y(b()),b();if(o.length&&!s){var w;switch(n.method){case N.Constants.STORED:return n.compressedSize=n.size,w=Buffer.alloc(o.length),o.copy(w),c&&y&&y(w),w;default:case N.Constants.DEFLATED:var T=new Ft.Deflater(o);if(c)T.deflateAsync(function(x){w=Buffer.alloc(x.length),n.compressedSize=x.length,x.copy(w),y&&y(w)});else{var P=T.deflate();return n.compressedSize=P.length,P}T=null;break}}else if(c&&y)y(Buffer.alloc(0));else return Buffer.alloc(0)}function p(c,y){return N.readBigUInt64LE(c,y)}function h(c){try{for(var y=0,w,T,P;y+4<c.length;)w=c.readUInt16LE(y),y+=2,T=c.readUInt16LE(y),y+=2,P=c.slice(y,y+T),y+=T,K.ID_ZIP64===w&&E(P)}catch{throw N.Errors.EXTRA_FIELD_PARSE_ERROR()}}function E(c){var y,w,T,P;c.length>=K.EF_ZIP64_SCOMP&&(y=p(c,K.EF_ZIP64_SUNCOMP),n.size===K.EF_ZIP64_OR_32&&(n.size=y)),c.length>=K.EF_ZIP64_RHO&&(w=p(c,K.EF_ZIP64_SCOMP),n.compressedSize===K.EF_ZIP64_OR_32&&(n.compressedSize=w)),c.length>=K.EF_ZIP64_DSN&&(T=p(c,K.EF_ZIP64_RHO),n.offset===K.EF_ZIP64_OR_32&&(n.offset=T)),c.length>=K.EF_ZIP64_DSN+4&&(P=c.readUInt32LE(K.EF_ZIP64_DSN),n.diskNumStart===K.EF_ZIP64_OR_16&&(n.diskNumStart=P))}return{get entryName(){return g.decode(r)},get rawEntryName(){return r},set entryName(c){r=N.toBuffer(c,g.encode);var y=r[r.length-1];s=y===47||y===92,n.fileNameLength=r.length},get efs(){return typeof u=="function"?u(this.entryName):u},get extra(){return a},set extra(c){a=c,n.extraLength=c.length,h(c)},get comment(){return g.decode(i)},set comment(c){if(i=N.toBuffer(c,g.encode),n.commentLength=i.length,i.length>65535)throw N.Errors.COMMENT_TOO_LONG()},get name(){let c=g.decode(r);return s?c.replace(/[/\\]$/,"").split("/").pop():c.split("/").pop()},get isDirectory(){return s},getCompressedData:function(){return d(!1,null)},getCompressedDataAsync:function(c){d(!0,c)},setData:function(c){o=N.toBuffer(c,N.decoder.encode),!s&&o.length?(n.size=o.length,n.method=N.Constants.DEFLATED,n.crc=N.crc32(c),n.changed=!0):n.method=N.Constants.STORED},getData:function(c){return n.changed?o:m(!1,null,c)},getDataAsync:function(c,y){n.changed?c(o):m(!0,c,y)},set attr(c){n.attr=c},get attr(){return n.attr},set header(c){n.loadFromBinary(c)},get header(){return n},packCentralHeader:function(){n.flags_efs=this.efs,n.extraLength=a.length;var c=n.centralHeaderToBinary(),y=N.Constants.CENHDR;return r.copy(c,y),y+=r.length,a.copy(c,y),y+=n.extraLength,i.copy(c,y),c},packLocalHeader:function(){let c=0;n.flags_efs=this.efs,n.extraLocalLength=l.length;let y=n.localHeaderToBinary(),w=Buffer.alloc(y.length+r.length+n.extraLocalLength);return y.copy(w,c),c+=y.length,r.copy(w,c),c+=r.length,l.copy(w,c),c+=l.length,w},toJSON:function(){let c=function(y){return"<"+(y&&y.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:n.toJSON(),compressedData:c(t),data:c(o)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var Kn=F((Ra,Zn)=>{var Gn=Rt(),so=vt(),q=Ie();Zn.exports=function(e,t){var n=[],r=Object.create(null),i=Buffer.alloc(0),s=new so.MainHeader,o=!1,a=null;let l=new Set,u=t,{noSort:f,decoder:g}=u;e?m(u.readEntries):o=!0;function b(){let p=new Set;for(let h of Object.keys(r)){let E=h.split("/");if(E.pop(),!!E.length)for(let c=0;c<E.length;c++){let y=E.slice(0,c+1).join("/")+"/";p.add(y)}}for(let h of p)if(!(h in r)){let E=new Gn(u);E.entryName=h,E.attr=16,E.temporary=!0,n.push(E),r[E.entryName]=E,l.add(E)}}function S(){if(o=!0,r=Object.create(null),s.diskEntries>(e.length-s.offset)/q.Constants.CENHDR)throw q.Errors.DISK_ENTRY_TOO_LARGE();n=new Array(s.diskEntries);for(var p=s.offset,h=0;h<n.length;h++){var E=p,c=new Gn(u,e);c.header=e.slice(E,E+=q.Constants.CENHDR),c.entryName=e.slice(E,E+=c.header.fileNameLength),c.header.extraLength&&(c.extra=e.slice(E,E+=c.header.extraLength)),c.header.commentLength&&(c.comment=e.slice(E,E+c.header.commentLength)),p+=c.header.centralHeaderSize,n[h]=c,r[c.entryName]=c}l.clear(),b()}function m(p){var h=e.length-q.Constants.ENDHDR,E=Math.max(0,h-65535),c=E,y=e.length,w=-1,T=0;for(typeof u.trailingSpace=="boolean"&&u.trailingSpace&&(E=0),h;h>=c;h--)if(e[h]===80){if(e.readUInt32LE(h)===q.Constants.ENDSIG){w=h,T=h,y=h+q.Constants.ENDHDR,c=h-q.Constants.END64HDR;continue}if(e.readUInt32LE(h)===q.Constants.END64SIG){c=E;continue}if(e.readUInt32LE(h)===q.Constants.ZIP64SIG){w=h,y=h+q.readBigUInt64LE(e,h+q.Constants.ZIP64SIZE)+q.Constants.ZIP64LEAD;break}}if(w==-1)throw q.Errors.INVALID_FORMAT();s.loadFromBinary(e.slice(w,y)),s.commentLength&&(i=e.slice(T+q.Constants.ENDHDR)),p&&S()}function d(){n.length>1&&!f&&(n=n.map(p=>({entry:p,key:p.entryName.toLowerCase()})).sort((p,h)=>p.key.localeCompare(h.key)).map(p=>p.entry))}return{get entries(){return o||S(),n.filter(p=>!l.has(p))},get comment(){return g.decode(i)},set comment(p){i=q.toBuffer(p,g.encode),s.commentLength=i.length},getEntryCount:function(){return o?n.length:s.diskEntries},forEach:function(p){this.entries.forEach(p)},getEntry:function(p){return o||S(),r[p]||null},setEntry:function(p){o||S(),n.push(p),r[p.entryName]=p,s.totalEntries=n.length},deleteFile:function(p,h=!0){o||S();let E=r[p];this.getEntryChildren(E,h).map(y=>y.entryName).forEach(this.deleteEntry)},deleteEntry:function(p){o||S();let h=r[p],E=n.indexOf(h);E>=0&&(n.splice(E,1),delete r[p],s.totalEntries=n.length)},getEntryChildren:function(p,h=!0){if(o||S(),typeof p=="object")if(p.isDirectory&&h){let E=[],c=p.entryName;for(let y of n)y.entryName.startsWith(c)&&E.push(y);return E}else return[p];return[]},getChildCount:function(p){if(p&&p.isDirectory){let h=this.getEntryChildren(p);return h.includes(p)?h.length-1:h.length}return 0},compressToBuffer:function(){o||S(),d();let p=[],h=[],E=0,c=0;s.size=0,s.offset=0;let y=0;for(let P of this.entries){let x=P.getCompressedData();P.header.offset=c;let v=P.packLocalHeader(),R=v.length+x.length;c+=R,p.push(v),p.push(x);let L=P.packCentralHeader();h.push(L),s.size+=L.length,E+=R+L.length,y++}E+=s.mainHeaderSize,s.offset=c,s.totalEntries=y,c=0;let w=Buffer.alloc(E);for(let P of p)P.copy(w,c),c+=P.length;for(let P of h)P.copy(w,c),c+=P.length;let T=s.toBinary();return i&&i.copy(T,T.length-i.length),T.copy(w,c),e=w,o=!1,w},toAsyncBuffer:function(p,h,E,c){try{o||S(),d();let y=[],w=[],T=0,P=0,x=0;s.size=0,s.offset=0;let v=function(R){if(R.length>0){let L=R.shift(),V=L.entryName+L.extra.toString();E&&E(V),L.getCompressedDataAsync(function(W){c&&c(V),L.header.offset=P;let he=L.packLocalHeader(),We=he.length+W.length;P+=We,y.push(he),y.push(W);let Ne=L.packCentralHeader();w.push(Ne),s.size+=Ne.length,T+=We+Ne.length,x++,v(R)})}else{T+=s.mainHeaderSize,s.offset=P,s.totalEntries=x,P=0;let L=Buffer.alloc(T);y.forEach(function(W){W.copy(L,P),P+=W.length}),w.forEach(function(W){W.copy(L,P),P+=W.length});let V=s.toBinary();i&&i.copy(V,V.length-i.length),V.copy(L,P),e=L,o=!1,p(L)}};v(Array.from(this.entries))}catch(y){h(y)}}}}});var Lt=F((La,Jn)=>{var B=Ie(),M=require("path"),ao=Rt(),co=Kn(),ye=(...e)=>B.findLast(e,t=>typeof t=="boolean"),Yn=(...e)=>B.findLast(e,t=>typeof t=="string"),lo=(...e)=>B.findLast(e,t=>typeof t=="function"),uo={noSort:!1,readEntries:!1,method:B.Constants.NONE,fs:null};Jn.exports=function(e,t){let n=null,r=Object.assign(Object.create(null),uo);e&&typeof e=="object"&&(e instanceof Uint8Array||(Object.assign(r,e),e=r.input?r.input:void 0,r.input&&delete r.input),Buffer.isBuffer(e)&&(n=e,r.method=B.Constants.BUFFER,e=void 0)),Object.assign(r,t);let i=new B(r),s=m=>{m.filter(d=>d.attr).sort((d,p)=>p.path.length-d.path.length).forEach(d=>i.fs.chmodSync(d.path,d.attr))};if((typeof r.decoder!="object"||typeof r.decoder.encode!="function"||typeof r.decoder.decode!="function")&&(r.decoder=B.decoder),e&&typeof e=="string")if(i.fs.existsSync(e))r.method=B.Constants.FILE,r.filename=e,n=i.fs.readFileSync(e);else throw B.Errors.INVALID_FILENAME();let o=new co(n,r),{canonical:a,sanitize:l,zipnamefix:u}=B;function f(m){if(m&&o){var d;if(typeof m=="string"&&(d=o.getEntry(M.posix.normalize(m))),typeof m=="object"&&typeof m.entryName<"u"&&typeof m.header<"u"&&(d=o.getEntry(m.entryName)),d)return d}return null}function g(m){let{join:d,normalize:p,sep:h}=M.posix;return d(M.isAbsolute(m)?"/":".",p(h+m.split("\\").join(h)+h))}function b(m){return m instanceof RegExp?(function(d){return function(p){return d.test(p)}})(m):typeof m!="function"?()=>!0:m}let S=(m,d)=>{let p=d.slice(-1);return p=p===i.sep?i.sep:"",M.relative(m,d)+p};return{readFile:function(m,d){var p=f(m);return p&&p.getData(d)||null},childCount:function(m){let d=f(m);if(d)return o.getChildCount(d)},readFileAsync:function(m,d){var p=f(m);p?p.getDataAsync(d):d(null,"getEntry failed for:"+m)},readAsText:function(m,d){var p=f(m);if(p){var h=p.getData();if(h&&h.length)return h.toString(d||"utf8")}return""},readAsTextAsync:function(m,d,p){var h=f(m);h?h.getDataAsync(function(E,c){if(c){d(E,c);return}E&&E.length?d(E.toString(p||"utf8")):d("")}):d("")},deleteFile:function(m,d=!0){var p=f(m);p&&o.deleteFile(p.entryName,d)},deleteEntry:function(m){var d=f(m);d&&o.deleteEntry(d.entryName)},addZipComment:function(m){o.comment=m},getZipComment:function(){return o.comment||""},addZipEntryComment:function(m,d){var p=f(m);p&&(p.comment=d)},getZipEntryComment:function(m){var d=f(m);return d&&d.comment||""},updateFile:function(m,d){var p=f(m);p&&p.setData(d)},addLocalFile:function(m,d,p,h){if(i.fs.existsSync(m)){d=d?g(d):"";let E=M.win32.basename(M.win32.normalize(m));d+=p||E;let c=i.fs.statSync(m),y=c.isFile()?i.fs.readFileSync(m):Buffer.alloc(0);c.isDirectory()&&(d+=i.sep),this.addFile(d,y,h,c)}else throw B.Errors.FILE_NOT_FOUND(m)},addLocalFileAsync:function(m,d){m=typeof m=="object"?m:{localPath:m};let p=M.resolve(m.localPath),{comment:h}=m,{zipPath:E,zipName:c}=m,y=this;i.fs.stat(p,function(w,T){if(w)return d(w,!1);E=E?g(E):"";let P=M.win32.basename(M.win32.normalize(p));if(E+=c||P,T.isFile())i.fs.readFile(p,function(x,v){return x?d(x,!1):(y.addFile(E,v,h,T),setImmediate(d,void 0,!0))});else if(T.isDirectory())return E+=i.sep,y.addFile(E,Buffer.alloc(0),h,T),setImmediate(d,void 0,!0)})},addLocalFolder:function(m,d,p){if(p=b(p),d=d?g(d):"",m=M.normalize(m),i.fs.existsSync(m)){let h=i.findFiles(m),E=this;if(h.length)for(let c of h){let y=M.join(d,S(m,c));p(y)&&E.addLocalFile(c,M.dirname(y))}}else throw B.Errors.FILE_NOT_FOUND(m)},addLocalFolderAsync:function(m,d,p,h){h=b(h),p=p?g(p):"",m=M.normalize(m);var E=this;i.fs.open(m,"r",function(c){if(c&&c.code==="ENOENT")d(void 0,B.Errors.FILE_NOT_FOUND(m));else if(c)d(void 0,c);else{var y=i.findFiles(m),w=-1,T=function(){if(w+=1,w<y.length){var P=y[w],x=S(m,P).split("\\").join("/");x=x.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),h(x)?i.fs.stat(P,function(v,R){v&&d(void 0,v),R.isFile()?i.fs.readFile(P,function(L,V){L?d(void 0,L):(E.addFile(p+x,V,"",R),T())}):(E.addFile(p+x+"/",Buffer.alloc(0),"",R),T())}):process.nextTick(()=>{T()})}else d(!0,void 0)};T()}})},addLocalFolderAsync2:function(m,d){let p=this;m=typeof m=="object"?m:{localPath:m};let h=M.resolve(g(m.localPath)),{zipPath:E,filter:c,namefix:y}=m;c instanceof RegExp?c=(function(P){return function(x){return P.test(x)}})(c):typeof c!="function"&&(c=function(){return!0}),E=E?g(E):"",y==="latin1"&&(y=P=>P.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")),typeof y!="function"&&(y=P=>P);let w=P=>M.join(E,y(S(h,P))),T=P=>M.win32.basename(M.win32.normalize(y(P)));i.fs.open(h,"r",function(P){P&&P.code==="ENOENT"?d(void 0,B.Errors.FILE_NOT_FOUND(h)):P?d(void 0,P):i.findFilesAsync(h,function(x,v){if(x)return d(x);v=v.filter(R=>c(w(R))),v.length||d(void 0,!1),setImmediate(v.reverse().reduce(function(R,L){return function(V,W){if(V||W===!1)return setImmediate(R,V,!1);p.addLocalFileAsync({localPath:L,zipPath:M.dirname(w(L)),zipName:T(L)},R)}},d))})})},addLocalFolderPromise:function(m,d){return new Promise((p,h)=>{this.addLocalFolderAsync2(Object.assign({localPath:m},d),(E,c)=>{E&&h(E),c&&p(this)})})},addFile:function(m,d,p,h){m=u(m);let E=f(m),c=E!=null;c||(E=new ao(r),E.entryName=m),E.comment=p||"";let y=typeof h=="object"&&h instanceof i.fs.Stats;y&&(E.header.time=h.mtime);var w=E.isDirectory?16:0;let T=E.isDirectory?16384:32768;return y?T|=4095&h.mode:typeof h=="number"?T|=4095&h:T|=E.isDirectory?493:420,w=(w|T<<16)>>>0,E.attr=w,E.setData(d),c||o.setEntry(E),E},getEntries:function(m){return o.password=m,o?o.entries:[]},getEntry:function(m){return f(m)},getEntryCount:function(){return o.getEntryCount()},forEach:function(m){return o.forEach(m)},extractEntryTo:function(m,d,p,h,E,c){h=ye(!1,h),E=ye(!1,E),p=ye(!0,p),c=Yn(E,c);var y=f(m);if(!y)throw B.Errors.NO_ENTRY();var w=a(y.entryName),T=l(d,c&&!y.isDirectory?a(c):p?w:M.basename(w));if(y.isDirectory){var P=o.getEntryChildren(y);return P.forEach(function(R){if(R.isDirectory)return;var L=R.getData();if(!L)throw B.Errors.CANT_EXTRACT_FILE();var V=a(p?R.entryName:R.entryName.substring(y.entryName.length)),W=l(d,V);let he=E?R.header.fileAttr:void 0;i.writeFileTo(W,L,h,he)}),!0}var x=y.getData(o.password);if(!x)throw B.Errors.CANT_EXTRACT_FILE();if(i.fs.existsSync(T)&&!h)throw B.Errors.CANT_OVERRIDE();let v=E?m.header.fileAttr:void 0;return i.writeFileTo(T,x,h,v),!0},test:function(m){if(!o)return!1;for(var d of o.entries)try{if(d.isDirectory)continue;var p=d.getData(m);if(!p)return!1}catch{return!1}return!0},extractAllTo:function(m,d,p,h){if(p=ye(!1,p),h=Yn(p,h),d=ye(!1,d),!o)throw B.Errors.NO_ZIP();let E=[];o.entries.forEach(function(c){var y=l(m,a(c.entryName));if(c.isDirectory){i.makeDir(y),p&&E.push({path:y,attr:c.header.fileAttr});return}var w=c.getData(h);if(!w)throw B.Errors.CANT_EXTRACT_FILE();let T=p?c.header.fileAttr:void 0;i.writeFileTo(y,w,d,T);try{i.fs.utimesSync(y,c.header.time,c.header.time)}catch{}}),s(E)},extractAllToAsync:function(m,d,p,h){if(h=lo(d,p,h),p=ye(!1,p),d=ye(!1,d),!h)return new Promise((x,v)=>{this.extractAllToAsync(m,d,p,function(R){R?v(R):x(this)})});if(!o){h(B.Errors.NO_ZIP());return}m=M.resolve(m);let E=x=>l(m,M.normalize(a(x.entryName))),c=(x,v)=>new Error(x+': "'+v+'"'),y=[],w=[];o.entries.forEach(x=>{x.isDirectory?y.push(x):w.push(x)});let T=[];for(let x of y){let v=E(x),R=p?x.header.fileAttr:void 0;try{i.makeDir(v)}catch{h(c("Unable to create folder",v));continue}R&&T.push({path:v,attr:R});try{i.fs.utimesSync(v,x.header.time,x.header.time)}catch{}}let P=x=>{if(!x)try{s(T)}catch(v){return h(c("Unable to set folder permissions",v.path||""))}h(x)};w.reverse().reduce(function(x,v){return function(R){if(R)x(R);else{let L=M.normalize(a(v.entryName)),V=l(m,L);v.getDataAsync(function(W,he){if(he)x(he);else if(!W)x(B.Errors.CANT_EXTRACT_FILE());else{let We=p?v.header.fileAttr:void 0;i.writeFileToAsync(V,W,d,We,function(Ne){if(!Ne)return x(c("Unable to write file",V));i.fs.utimes(V,v.header.time,v.header.time,function(){x()})})}})}}},P)()},writeZip:function(m,d){if(arguments.length===1&&typeof m=="function"&&(d=m,m=""),!m&&r.filename&&(m=r.filename),!!m){var p=o.compressToBuffer();if(p){var h=i.writeFileTo(m,p,!0);typeof d=="function"&&d(h?null:new Error("failed"),"")}}},writeZipPromise:function(m,d){let{overwrite:p,perm:h}=Object.assign({overwrite:!0},d);return new Promise((E,c)=>{!m&&r.filename&&(m=r.filename),m||c("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(y=>{let w=T=>T?E(T):c("ADM-ZIP: Wasn't able to write zip file");i.writeFileToAsync(m,y,p,h,w)},c)})},toBufferPromise:function(){return new Promise((m,d)=>{o.toAsyncBuffer(m,d)})},toBuffer:function(m,d,p,h){return typeof m=="function"?(o.toAsyncBuffer(m,d,p,h),null):o.compressToBuffer()}}}});var Gr=F(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0})});var ht=F(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.DEFAULT_PROJECT_FONT_IDS=ee.DENEB_GOOGLE_FONT_COUNT=ee.DENEB_FONT_BY_ID=ee.DENEB_FONT_REGISTRY=void 0;var gt=[400,500,600,700],Ss=[400,700],nn=[400,500,600,700];function A(e,t,n,r,i,s){let o=t;return{id:e,label:t,category:n,family:o,cssStack:s?.cssStack??`'${o}', ${n==="serif"||n==="slab-serif"?"Georgia, serif":n==="monospace"?"ui-monospace, monospace":"system-ui, sans-serif"}`,fontsourcePackage:r,googleQuery:i,googleFonts:!0,weights:s?.weights??gt,italic:s?.italic,variable:s?.variable}}ee.DENEB_FONT_REGISTRY=[A("inter","Inter","sans-serif","inter","Inter",{variable:!0}),A("roboto","Roboto","sans-serif","roboto","Roboto"),A("open-sans","Open Sans","sans-serif","open-sans","Open+Sans",{variable:!0}),A("lato","Lato","sans-serif","lato","Lato",{italic:!0}),A("montserrat","Montserrat","sans-serif","montserrat","Montserrat",{variable:!0}),A("poppins","Poppins","sans-serif","poppins","Poppins"),A("nunito","Nunito","sans-serif","nunito","Nunito",{variable:!0}),A("raleway","Raleway","sans-serif","raleway","Raleway",{variable:!0}),A("dm-sans","DM Sans","sans-serif","dm-sans","DM+Sans",{variable:!0}),A("work-sans","Work Sans","sans-serif","work-sans","Work+Sans",{variable:!0}),A("fira-sans","Fira Sans","sans-serif","fira-sans","Fira+Sans"),A("manrope","Manrope","sans-serif","manrope","Manrope",{variable:!0}),A("oswald","Oswald","sans-serif","oswald","Oswald",{weights:[400,500,600,700]}),A("source-sans-3","Source Sans 3","sans-serif","source-sans-3","Source+Sans+3",{variable:!0}),A("quicksand","Quicksand","sans-serif","quicksand","Quicksand",{variable:!0}),A("plus-jakarta-sans","Plus Jakarta Sans","sans-serif","plus-jakarta-sans","Plus+Jakarta+Sans",{variable:!0}),{id:"satoshi",label:"Satoshi",category:"sans-serif",family:"Space Grotesk",cssStack:"'Space Grotesk', system-ui, sans-serif",fontsourcePackage:null,googleQuery:null,googleFonts:!1,weights:gt,substituteId:"space-grotesk"},A("space-grotesk","Space Grotesk","sans-serif","space-grotesk","Space+Grotesk",{variable:!0}),A("figtree","Figtree","sans-serif","figtree","Figtree",{variable:!0}),A("urbanist","Urbanist","sans-serif","urbanist","Urbanist",{variable:!0}),A("outfit","Outfit","sans-serif","outfit","Outfit",{variable:!0}),{id:"general-sans",label:"General Sans",category:"sans-serif",family:"Figtree",cssStack:"'Figtree', system-ui, sans-serif",fontsourcePackage:null,googleQuery:null,googleFonts:!1,weights:gt,substituteId:"figtree"},A("mulish","Mulish","sans-serif","mulish","Mulish",{variable:!0}),A("barlow","Barlow","sans-serif","barlow","Barlow"),A("rubik","Rubik","sans-serif","rubik","Rubik",{variable:!0}),A("geist","Geist","sans-serif","geist-sans","Geist",{variable:!0}),A("merriweather","Merriweather","serif","merriweather","Merriweather"),A("playfair-display","Playfair Display","serif","playfair-display","Playfair+Display"),A("lora","Lora","serif","lora","Lora",{variable:!0}),A("pt-serif","PT Serif","serif","pt-serif","PT+Serif"),A("eb-garamond","EB Garamond","serif","eb-garamond","EB+Garamond",{variable:!0}),A("libre-baskerville","Libre Baskerville","serif","libre-baskerville","Libre+Baskerville"),A("crimson-text","Crimson Text","serif","crimson-text","Crimson+Text"),A("cormorant-garamond","Cormorant Garamond","serif","cormorant-garamond","Cormorant+Garamond"),A("frank-ruhl-libre","Frank Ruhl Libre","serif","frank-ruhl-libre","Frank+Ruhl+Libre"),A("taviraj","Taviraj","serif","taviraj","Taviraj"),A("arapey","Arapey","serif","arapey","Arapey",{weights:[400],italic:!0}),A("caladea","Caladea","serif","caladea","Caladea"),A("roboto-slab","Roboto Slab","slab-serif","roboto-slab","Roboto+Slab",{variable:!0}),A("zilla-slab","Zilla Slab","slab-serif","zilla-slab","Zilla+Slab"),A("aleo","Aleo","slab-serif","aleo","Aleo",{variable:!0}),A("arvo","Arvo","slab-serif","arvo","Arvo"),A("bitter","Bitter","slab-serif","bitter","Bitter",{variable:!0}),A("enriqueta","Enriqueta","slab-serif","enriqueta","Enriqueta"),A("fira-code","Fira Code","monospace","fira-code","Fira+Code",{weights:nn,variable:!0}),A("roboto-mono","Roboto Mono","monospace","roboto-mono","Roboto+Mono",{weights:nn,variable:!0}),A("jetbrains-mono","JetBrains Mono","monospace","jetbrains-mono","JetBrains+Mono",{weights:nn,variable:!0}),A("space-mono","Space Mono","monospace","space-mono","Space+Mono",{weights:[400,700],italic:!0}),A("bebas-neue","Bebas Neue","display","bebas-neue","Bebas+Neue",{weights:[400]}),A("fraunces","Fraunces","display","fraunces","Fraunces",{variable:!0}),A("cinzel","Cinzel","display","cinzel","Cinzel",{weights:Ss}),A("paytone-one","Paytone One","display","paytone-one","Paytone+One",{weights:[400]}),A("righteous","Righteous","display","righteous","Righteous",{weights:[400]}),A("abril-fatface","Abril Fatface","display","abril-fatface","Abril+Fatface",{weights:[400]}),{id:"system-sans",label:"System Sans",category:"system",family:"system-ui",cssStack:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontsourcePackage:null,googleQuery:null,googleFonts:!1,weights:[]},{id:"editorial-serif",label:"Editorial Serif",category:"serif",family:"Playfair Display",cssStack:"'Playfair Display', Georgia, serif",fontsourcePackage:"playfair-display",googleQuery:"Playfair+Display",googleFonts:!0,weights:gt,substituteId:"playfair-display"}];ee.DENEB_FONT_BY_ID=new Map(ee.DENEB_FONT_REGISTRY.map(e=>[e.id,e]));ee.DENEB_GOOGLE_FONT_COUNT=ee.DENEB_FONT_REGISTRY.filter(e=>e.googleFonts&&e.fontsourcePackage).length;ee.DEFAULT_PROJECT_FONT_IDS=["inter","plus-jakarta-sans","playfair-display"]});var ke=F(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.normalizeFontId=Ce;me.lookupFontDefinition=Me;me.resolveInstallableFont=Ts;me.resolveFontFamily=ws;me.listFontsByCategory=Ps;me.collectFontIdsFromSiteData=Is;var yt=ht();function Ce(e){return e.trim().toLowerCase().replace(/['"]/g,"").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}function Me(e){if(!e||!e.trim())return null;let t=Ce(e),n=yt.DENEB_FONT_BY_ID.get(t);if(n)return n;for(let i of yt.DENEB_FONT_REGISTRY)if(Ce(i.label)===t||Ce(i.family)===t)return i;let r=e.split(",")[0]?.trim().replace(/^['"]|['"]$/g,"");if(r){let i=Ce(r);if(i&&i!==t)return Me(r)}return null}function Ts(e){let t=Me(e);return t?t.fontsourcePackage?t:t.substituteId?yt.DENEB_FONT_BY_ID.get(t.substituteId)??null:null:null}function ws(e){if(!e||!e.trim())return;let t=Me(e);return t?t.cssStack:e.includes(",")?e:`'${e.trim()}', system-ui, sans-serif`}function Ps(){var e;let t={};for(let n of yt.DENEB_FONT_REGISTRY)t[e=n.category]??(t[e]=[]),t[n.category].push(n);return t}function Is(e){let t=new Set,n=l=>{if(typeof l!="string"||!l.trim())return;let u=Me(l);if(u){t.add(u.id),u.substituteId&&t.add(u.substituteId);return}let f=Ce(l);f&&t.add(f)};if(!e||typeof e!="object")return[];let r=e,i=r.theme??r.template?.structure?.theme;n(i?.headingFont),n(i?.bodyFont);let s=r.styles;if(s&&typeof s=="object"&&!Array.isArray(s))for(let l of Object.values(s))l&&typeof l=="object"&&!Array.isArray(l)&&n(l.fontFamily);let o=new WeakSet,a=l=>{if(!(!l||typeof l!="object")&&!o.has(l)){if(o.add(l),Array.isArray(l)){l.forEach(a);return}for(let[u,f]of Object.entries(l))u.endsWith("Style")&&f&&typeof f=="object"&&n(f.fontFamily),a(f)}};return a(r.content),t.delete("system-sans"),Array.from(t)}});var rn=F(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.formatResponsiveFontSize=Zr;Et.formatFontSize=xs;function Zr(e){if(e==null||e==="")return;let t;if(typeof e=="number")t=e;else if(/^\d+(\.\d+)?px$/i.test(e.trim()))t=parseFloat(e);else if(/^\d+(\.\d+)?rem$/i.test(e.trim()))t=parseFloat(e)*16;else if(/^\d+$/.test(e.trim()))t=parseFloat(e);else return e;if(!Number.isFinite(t)||t<=0)return;let n=t/16,r=Math.max(n*.72,.75),i=n*1.15,s=Math.min(Math.max(n*.08,.5),3.5);return`clamp(${r.toFixed(3)}rem, ${(n*.55).toFixed(3)}rem + ${s.toFixed(2)}vw, ${i.toFixed(3)}rem)`}function xs(e,t){if(!(e==null||e==="")){if(t?.responsive){let n=Zr(e);if(n)return n}return typeof e=="number"?`${e}px`:/^\d+$/.test(e)?`${e}px`:e}}});var Yr=F(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.buildGoogleFontsStylesheetUrl=As;var Kr=ht(),Cs=ke();function ks(e){if(!e.googleQuery)return null;let t=e.weights.length>0?e.weights:[400],n=Array.from(new Set(t)).sort((r,i)=>r-i);if(e.italic){let r=n.flatMap(i=>[`0,${i}`,`1,${i}`]);return`family=${e.googleQuery}:ital,wght@${r.join(";")}`}if(e.variable||n.length>4){let r=n[0],i=n[n.length-1];return`family=${e.googleQuery}:wght@${r}..${i}`}return`family=${e.googleQuery}:wght@${n.join(";")}`}function As(e){let t=[],n=new Set;for(let r of e){let i=Kr.DENEB_FONT_BY_ID.get(r)??(0,Cs.lookupFontDefinition)(r);if(!i||!i.googleFonts||!i.googleQuery)continue;let s=i.substituteId&&!i.fontsourcePackage?i.substituteId:i.id,o=Kr.DENEB_FONT_BY_ID.get(s)??i;if(n.has(o.id))continue;n.add(o.id);let a=ks(o);a&&t.push(a)}return t.length===0?null:`https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`}});var Jr=F(re=>{"use strict";var _s=re&&re.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Be=re&&re.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_s(t,e,n)};Object.defineProperty(re,"__esModule",{value:!0});Be(Gr(),re);Be(ht(),re);Be(ke(),re);Be(rn(),re);Be(Yr(),re)});var Qr=F(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0})});var ei=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.DENEB_STYLE_PATCH_MESSAGE=se.STYLE_PATCH_MESSAGE=void 0;se.isStylePatchPayload=vs;se.STYLE_PATCH_MESSAGE="FIVORA_PREVIEW_STYLE_PATCH";se.DENEB_STYLE_PATCH_MESSAGE="DENEB_PREVIEW_STYLE_PATCH";function vs(e){if(!e||typeof e!="object")return!1;let t=e,n=t.type;return n!==se.STYLE_PATCH_MESSAGE&&n!==se.DENEB_STYLE_PATCH_MESSAGE?!1:typeof t.targetPath=="string"&&typeof t.styleType=="string"&&typeof t.properties=="object"&&t.properties!==null}});var sn=F(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.PREVIEW_LIST_ATTRIBUTE=O.PREVIEW_ITEM_ATTRIBUTE=O.PREVIEW_FIELD_ATTRIBUTE=O.STYLE_TYPE_ATTRIBUTE=O.STYLE_TARGET_ATTRIBUTE=void 0;O.buildStyleTargetSelector=ti;O.buildStyleFallbackSelectors=Fs;O.STYLE_TARGET_ATTRIBUTE="data-preview-style-target";O.STYLE_TYPE_ATTRIBUTE="data-preview-style-type";O.PREVIEW_FIELD_ATTRIBUTE="data-preview-field-path";O.PREVIEW_ITEM_ATTRIBUTE="data-preview-item-path";O.PREVIEW_LIST_ATTRIBUTE="data-preview-list-path";function ae(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function ti(e){return`[${O.STYLE_TARGET_ATTRIBUTE}="${ae(e)}"]`}function Fs(e,t){let n=[ti(e),`[${O.PREVIEW_FIELD_ATTRIBUTE}="${ae(e)}"]`,`[${O.PREVIEW_ITEM_ATTRIBUTE}="${ae(e)}"]`];if(t==="card"&&e.endsWith(".card")){let r=e.slice(0,-5);n.push(`[${O.PREVIEW_ITEM_ATTRIBUTE}="${ae(r)}"]`)}if(e.includes(":")){let[r,i]=e.split(":");i==="card"?n.push(`[${O.PREVIEW_LIST_ATTRIBUTE}="${ae(r)}"] [${O.PREVIEW_ITEM_ATTRIBUTE}]`,`[${O.PREVIEW_LIST_ATTRIBUTE}="${ae(r)}"] .card`,`[${O.PREVIEW_LIST_ATTRIBUTE}="${ae(r)}"] article`):i&&n.push(`[${O.PREVIEW_LIST_ATTRIBUTE}="${ae(r)}"] [${O.PREVIEW_FIELD_ATTRIBUTE}$=".${ae(i)}"]`)}return n}});var bt=F(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.resolveFontFamily=void 0;Ae.resolveShadowPreset=Ns;Ae.resolveThemeToken=Ds;var Rs=ke();Object.defineProperty(Ae,"resolveFontFamily",{enumerable:!0,get:function(){return Rs.resolveFontFamily}});var Ls={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)"};function Ns(e){if(e)return Ls[e]??e}function Ds(e){return e?e.startsWith("var(")?e:{primary:"var(--brand-color, #2563eb)",secondary:"var(--brand-secondary, #0f172a)",surface:"var(--surface-color, #ffffff)",background:"var(--page-bg, #f8fafc)",heading:"var(--heading-color, #0f172a)",muted:"var(--muted-color, #64748b)"}[e]??e:void 0}});var cn=F(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.formatUnit=D;ce.textStyleToCssVariables=ni;ce.cardStyleToCssVariables=ri;ce.buttonStyleToCssVariables=ii;ce.gridStyleToCssVariables=oi;ce.sectionStyleToCssVariables=si;ce.styleToCssVariables=Ms;var Os=rn(),$s=ke(),_e=bt();function D(e){if(!(e===void 0||e===""||e===null))return typeof e=="number"?`${e}px`:/^\d+$/.test(e)?`${e}px`:e}function an(e,t){let n={},r=e.marginTop??e.spacingTop,i=e.marginBottom??e.spacingBottom,s=e.marginLeft??e.spacingLeft,o=e.marginRight??e.spacingRight;return r!==void 0&&(n[`${t}-margin-top`]=D(r)),i!==void 0&&(n[`${t}-margin-bottom`]=D(i)),s!==void 0&&(n[`${t}-margin-left`]=D(s)),o!==void 0&&(n[`${t}-margin-right`]=D(o)),n}function ni(e){let t={...an(e,"--deneb")};return e.fontFamily&&(t["--deneb-font-family"]=(0,$s.resolveFontFamily)(e.fontFamily)),e.fontSize!==void 0&&(t["--deneb-font-size"]=(0,Os.formatFontSize)(e.fontSize,{responsive:e.responsiveFontSize===!0})),e.fontWeight!==void 0&&(t["--deneb-font-weight"]=String(e.fontWeight)),e.lineHeight!==void 0&&(t["--deneb-line-height"]=(typeof e.lineHeight=="number",String(e.lineHeight))),e.letterSpacing&&(t["--deneb-letter-spacing"]=e.letterSpacing),e.color&&(t["--deneb-color"]=(0,_e.resolveThemeToken)(e.color)),e.textAlign&&(t["--deneb-text-align"]=e.textAlign),e.textTransform&&(t["--deneb-text-transform"]=e.textTransform),t}function ri(e){let t={...an(e,"--deneb-card")};return e.width!==void 0&&(t["--deneb-card-width"]=D(e.width)),e.minWidth!==void 0&&(t["--deneb-card-min-width"]=D(e.minWidth)),e.maxWidth!==void 0&&(t["--deneb-card-max-width"]=D(e.maxWidth)),e.height!==void 0&&(t["--deneb-card-height"]=D(e.height)),e.aspectRatio&&(t["--deneb-card-aspect-ratio"]=e.aspectRatio),e.paddingTop!==void 0&&(t["--deneb-card-pt"]=D(e.paddingTop)),e.paddingBottom!==void 0&&(t["--deneb-card-pb"]=D(e.paddingBottom)),e.paddingLeft!==void 0&&(t["--deneb-card-pl"]=D(e.paddingLeft)),e.paddingRight!==void 0&&(t["--deneb-card-pr"]=D(e.paddingRight)),e.borderRadius!==void 0&&(t["--deneb-card-radius"]=D(e.borderRadius)),e.borderWidth!==void 0&&(t["--deneb-card-border-w"]=D(e.borderWidth)),e.borderStyle&&(t["--deneb-card-border-s"]=e.borderStyle),e.borderColor&&(t["--deneb-card-border-c"]=e.borderColor),e.backgroundColor&&(t["--deneb-card-bg"]=(0,_e.resolveThemeToken)(e.backgroundColor)),e.backgroundGradient&&(t["--deneb-card-bg-gradient"]=e.backgroundGradient),e.boxShadow&&(t["--deneb-card-shadow"]=(0,_e.resolveShadowPreset)(e.boxShadow)),e.backdropBlur!==void 0&&(t["--deneb-card-blur"]=D(e.backdropBlur)),e.gap!==void 0&&(t["--deneb-card-gap"]=D(e.gap)),t}function ii(e){let t={...an(e,"--deneb-btn")};return e.borderRadius!==void 0&&(t["--deneb-btn-radius"]=D(e.borderRadius)),e.paddingX!==void 0&&(t["--deneb-btn-px"]=D(e.paddingX)),e.paddingY!==void 0&&(t["--deneb-btn-py"]=D(e.paddingY)),e.backgroundColor&&(t["--deneb-btn-bg"]=(0,_e.resolveThemeToken)(e.backgroundColor)),e.textColor&&(t["--deneb-btn-color"]=(0,_e.resolveThemeToken)(e.textColor)),e.borderColor&&(t["--deneb-btn-border-c"]=e.borderColor),e.hoverBackgroundColor&&(t["--deneb-btn-hover-bg"]=e.hoverBackgroundColor),e.hoverTextColor&&(t["--deneb-btn-hover-color"]=e.hoverTextColor),t}function oi(e){let t={};return e.columns!==void 0&&(t["--deneb-grid-cols"]=String(e.columns)),e.minCardWidth&&(t["--deneb-grid-min-card"]=e.minCardWidth),e.gapX!==void 0&&(t["--deneb-grid-gap-x"]=D(e.gapX)),e.gapY!==void 0&&(t["--deneb-grid-gap-y"]=D(e.gapY)),e.equalHeight!==void 0&&(t["--deneb-grid-equal-height"]=e.equalHeight?"stretch":"start"),t}function si(e){let t={};return e.paddingTop!==void 0&&(t["--deneb-section-pt"]=D(e.paddingTop)),e.paddingBottom!==void 0&&(t["--deneb-section-pb"]=D(e.paddingBottom)),e.paddingX!==void 0&&(t["--deneb-section-px"]=D(e.paddingX)),e.maxWidth&&(t["--deneb-section-max-w"]=e.maxWidth),e.backgroundColor&&(t["--deneb-section-bg"]=(0,_e.resolveThemeToken)(e.backgroundColor)),e.backgroundImage&&(t["--deneb-section-bg-image"]=e.backgroundImage),e.backgroundOverlayColor&&(t["--deneb-section-overlay"]=e.backgroundOverlayColor),e.backgroundOverlayOpacity!==void 0&&(t["--deneb-section-overlay-opacity"]=String(e.backgroundOverlayOpacity)),e.textAlign&&(t["--deneb-section-align"]=e.textAlign),e.display&&(t["--deneb-section-display"]=e.display),e.order!==void 0&&e.order!==""&&(t["--deneb-section-order"]=String(e.order)),t}function Ms(e,t){switch(e){case"text":return ni(t);case"card":return ri(t);case"button":return ii(t);case"grid":return oi(t);case"section":return si(t);default:return{}}}});var dn=F(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.isPlainObject=ln;St.deepMerge=ai;function ln(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function ai(e,t,n=0,r=new WeakSet){if(n>50)return{...e,...t};if(r.has(t))return t;r.add(t);let i={...e};for(let[s,o]of Object.entries(t))ln(o)&&ln(i[s])?i[s]=ai(i[s],o,n+1,r):i[s]=o;return i}});var ui=F(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.getLiveStyleCache=Vs;we.applyCssVariablesToElement=li;we.findStyleTargetElement=Us;we.patchElementStyle=di;we.patchStyleByPath=zs;var je=sn(),Bs=dn(),le=cn(),js=ke(),ci=bt(),un=new Map;function Vs(){return un}function li(e,t){for(let[n,r]of Object.entries(t))r?e.style.setProperty(n,r):e.style.removeProperty(n)}function Us(e,t){if(typeof document>"u"||!e)return null;for(let n of(0,je.buildStyleFallbackSelectors)(e,t)){let r=document.querySelector(n);if(r)return r}return null}function di(e,t,n){let i=(e.getAttribute(je.STYLE_TARGET_ATTRIBUTE)??"")||e.getAttribute("data-preview-field-path")||"",s=i?un.get(i)??{}:{},o=(0,Bs.deepMerge)(s,n);i&&un.set(i,o);let a=(0,le.styleToCssVariables)(t,o);if(li(e,a),t==="text"){if(o.color){let l=(0,ci.resolveThemeToken)(String(o.color))||String(o.color);e.style.setProperty("color",l,"important")}if(o.textAlign&&e.style.setProperty("text-align",String(o.textAlign),"important"),o.fontSize!==void 0){let l=(0,le.formatUnit)(o.fontSize)||String(o.fontSize);e.style.setProperty("font-size",l,"important")}if(o.lineHeight!==void 0&&e.style.setProperty("line-height",String(o.lineHeight),"important"),o.fontFamily){let l=(0,js.resolveFontFamily)(String(o.fontFamily))||String(o.fontFamily);e.style.setProperty("font-family",l,"important")}if(o.fontWeight!==void 0&&e.style.setProperty("font-weight",String(o.fontWeight),"important"),o.marginTop!==void 0||o.spacingTop!==void 0){let l=(0,le.formatUnit)(o.marginTop??o.spacingTop);l&&e.style.setProperty("margin-top",l,"important")}if(o.marginBottom!==void 0||o.spacingBottom!==void 0){let l=(0,le.formatUnit)(o.marginBottom??o.spacingBottom);l&&e.style.setProperty("margin-bottom",l,"important")}if(o.marginLeft!==void 0||o.spacingLeft!==void 0){let l=(0,le.formatUnit)(o.marginLeft??o.spacingLeft);l&&e.style.setProperty("margin-left",l,"important")}if(o.marginRight!==void 0||o.spacingRight!==void 0){let l=(0,le.formatUnit)(o.marginRight??o.spacingRight);l&&e.style.setProperty("margin-right",l,"important")}}else if(t==="card"){if(o.backgroundColor){let l=(0,ci.resolveThemeToken)(String(o.backgroundColor))||String(o.backgroundColor);e.style.setProperty("background-color",l,"important"),e.style.setProperty("background",l,"important")}if(o.borderRadius!==void 0){let l=(0,le.formatUnit)(o.borderRadius)||String(o.borderRadius);e.style.setProperty("border-radius",l,"important")}if(o.padding!==void 0||o.paddingTop!==void 0){let l=(0,le.formatUnit)(o.padding??o.paddingTop);l&&e.style.setProperty("padding",l,"important")}if(o.boxShadow&&e.style.setProperty("box-shadow",String(o.boxShadow),"important"),o.borderColor&&e.style.setProperty("border-color",String(o.borderColor),"important"),o.borderWidth!==void 0){let l=(0,le.formatUnit)(o.borderWidth)||String(o.borderWidth);e.style.setProperty("border-width",l,"important"),e.style.setProperty("border-style","solid","important")}}e.getAttribute(je.STYLE_TYPE_ATTRIBUTE)||e.setAttribute(je.STYLE_TYPE_ATTRIBUTE,t)}function zs(e,t,n){if(typeof document>"u"||!e)return!1;let r=!1;for(let i of(0,je.buildStyleFallbackSelectors)(e,t)){let s=document.querySelectorAll(i);s.length>0&&(s.forEach(o=>di(o,t,n)),r=!0)}return r}});var fi=F(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.isValidStyleKind=Ws;Ve.validateStyleTree=qs;Ve.collectStyleTargetsFromHtml=Gs;var Hs=new Set(["text","card","button","grid","section"]);function Ws(e){return typeof e=="string"&&Hs.has(e)}function qs(e,t){let n=[];if(e==null)return n;if(typeof e!="object"||Array.isArray(e))return n.push({path:"styles",message:"styles must be an object"}),n;for(let[r,i]of Object.entries(e)){if(!r.trim()){n.push({path:"styles",message:"style path cannot be empty"});continue}if(typeof i!="object"||i===null||Array.isArray(i)){n.push({path:`styles.${r}`,message:"style entry must be an object"});continue}t&&!t.has(r)&&n.push({path:`styles.${r}`,message:"no matching data-preview-style-target marker in template"})}return n}function Gs(e){let t=new Set,n=/data-preview-style-target=["']([^"']+)["']/g,r;for(;(r=n.exec(e))!==null;)t.add(r[1]);return t}});var mi=F(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0})});var fn=F(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.isDarkColor=gi;ve.getAutoContrastTextColor=Zs;ve.toHexColor=Ks;ve.normalizeHexColor=Ys;function gi(e){if(typeof e!="string"||!e)return!1;let t=e.trim().toLowerCase();if(!/^#[0-9a-f]{3,6}$/i.test(t))return!1;let n=t.length===4?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t,r=Number.parseInt(n.slice(1,3),16),i=Number.parseInt(n.slice(3,5),16),s=Number.parseInt(n.slice(5,7),16);return(r*299+i*587+s*114)/1e3<130}function Zs(e,t="#ffffff",n="#0f172a"){return gi(e)?t:n}function Ks(e,t){if(!e)return t;let n=e.trim();return/^#[0-9a-f]{6}$/i.test(n)?n.toLowerCase():/^#[0-9a-f]{3}$/i.test(n)?`#${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`.toLowerCase():t}function Ys(e){if(!e)return null;let t=e.trim();return/^#[0-9a-f]{6}$/i.test(t)?t.toLowerCase():/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`.toLowerCase():null}});var hi=F(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.THEME_PALETTES=void 0;Tt.THEME_PALETTES=[{id:"classic-luxe",name:"Classic Luxe",badge:"Light \u2022 Warm Luxe",mode:"light",primary:"#1e293b",secondary:"#d97706",accent:"#f59e0b",background:"#fdfbf7",card:"#ffffff",text:"#1e293b",muted:"#64748b",buttonBg:"#1e293b",buttonText:"#ffffff"},{id:"ocean-modern",name:"Ocean Modern",badge:"Light \u2022 Crisp Ocean",mode:"light",primary:"#0284c7",secondary:"#0369a1",accent:"#38bdf8",background:"#f8fafc",card:"#ffffff",text:"#0f172a",muted:"#64748b",buttonBg:"#0284c7",buttonText:"#ffffff"},{id:"forest-emerald",name:"Forest Emerald",badge:"Light \u2022 Organic Green",mode:"light",primary:"#065f46",secondary:"#047857",accent:"#10b981",background:"#f0fdf4",card:"#ffffff",text:"#064e3b",muted:"#475569",buttonBg:"#065f46",buttonText:"#ffffff"},{id:"warm-terracotta",name:"Warm Terracotta",badge:"Light \u2022 Artisanal",mode:"light",primary:"#c2410c",secondary:"#ea580c",accent:"#f97316",background:"#fffaf5",card:"#ffffff",text:"#431407",muted:"#78350f",buttonBg:"#c2410c",buttonText:"#ffffff"},{id:"velvet-berry",name:"Velvet Berry",badge:"Light \u2022 Vibrant Chic",mode:"light",primary:"#9f1239",secondary:"#be123c",accent:"#f43f5e",background:"#fff5f7",card:"#ffffff",text:"#4c0519",muted:"#881337",buttonBg:"#9f1239",buttonText:"#ffffff"},{id:"sleek-obsidian",name:"Sleek Obsidian",badge:"Dark \u2022 Obsidian",mode:"dark",primary:"#60a5fa",secondary:"#38bdf8",accent:"#93c5fd",background:"#090d16",card:"#131b2e",text:"#f8fafc",muted:"#94a3b8",buttonBg:"#60a5fa",buttonText:"#090d16"},{id:"midnight-cyber",name:"Midnight Cyber",badge:"Dark \u2022 Neon Cyber",mode:"dark",primary:"#818cf8",secondary:"#6366f1",accent:"#22d3ee",background:"#09090b",card:"#18181b",text:"#f4f4f5",muted:"#a1a1aa",buttonBg:"#818cf8",buttonText:"#09090b"},{id:"royal-gold-dark",name:"Royal Gold & Dark",badge:"Dark \u2022 Imperial Gold",mode:"dark",primary:"#f59e0b",secondary:"#d97706",accent:"#fbbf24",background:"#0c0a09",card:"#1c1917",text:"#f5f5f4",muted:"#a8a29e",buttonBg:"#f59e0b",buttonText:"#0c0a09"},{id:"emerald-nocturne",name:"Emerald Nocturne",badge:"Dark \u2022 Deep Emerald",mode:"dark",primary:"#34d399",secondary:"#10b981",accent:"#6ee7b7",background:"#022c22",card:"#064e3b",text:"#ecfdf5",muted:"#a7f3d0",buttonBg:"#34d399",buttonText:"#022c22"}]});var yi=F(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.FONT_PAIRINGS=Fe.GLOBAL_FONT_OPTIONS=void 0;Fe.GLOBAL_FONT_OPTIONS=["Inter","Playfair Display","DM Sans","Poppins","Montserrat","Plus Jakarta Sans","Georgia","Editorial Serif"];Fe.FONT_PAIRINGS=[{id:"modern-clean",name:"Modern & Clean",headingFont:"Plus Jakarta Sans",bodyFont:"Inter",description:"Crisp, contemporary tech and SaaS feel with high readability"},{id:"editorial-luxury",name:"Editorial Luxury",headingFont:"Playfair Display",bodyFont:"Inter",description:"Elegant serif headline paired with neutral modern body text"},{id:"tech-forward",name:"Tech Forward",headingFont:"Inter",bodyFont:"Inter",description:"Minimalist, uniform sans-serif design system"},{id:"vibrant-lifestyle",name:"Vibrant Lifestyle",headingFont:"Poppins",bodyFont:"DM Sans",description:"Warm, geometric sans pairing suited for retail and wellness"},{id:"classic-prestige",name:"Classic Prestige",headingFont:"Montserrat",bodyFont:"Inter",description:"Authoritative, balanced typography for premium brands"}]});var Si=F(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parseVisualCustomization=Ei;Ue.customizationToTheme=bi;Ue.mergeVisualCustomizationIntoTheme=Js;function de(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Ei(e){return de(e)?{version:1,colors:de(e.colors)?e.colors:void 0,colorReplacements:de(e.colorReplacements)?e.colorReplacements:void 0,typography:de(e.typography)?e.typography:void 0,spacing:de(e.spacing)?e.spacing:void 0,layout:de(e.layout)?e.layout:void 0,components:de(e.components)?e.components:void 0,sections:de(e.sections)?e.sections:void 0,elementStyles:de(e.elementStyles)?e.elementStyles:void 0}:{version:1}}function bi(e){let t=e.colors??{};return{designCustomizationVersion:1,colorReplacements:e.colorReplacements,primaryColor:t.primary,secondaryColor:t.secondary,accentColor:t.accent,backgroundColor:t.background,textColor:t.text,surfaceColor:t.surface??t.cardBackground,surfaceAltColor:t.surfaceAlt,headingColor:t.heading??t.text,mutedTextColor:t.mutedText,borderColor:t.border,headerBackgroundColor:t.headerBackground,footerBackgroundColor:t.footerBackground,cardBackgroundColor:t.cardBackground??t.surface,buttonBackgroundColor:t.buttonBackground,buttonTextColor:t.buttonText,...e.typography,...e.spacing,...e.layout,...e.components,sections:e.sections,elementStyles:e.elementStyles}}function Js(e,t){let n=Ei(t);return[n.colors,n.colorReplacements,n.typography,n.spacing,n.layout,n.components,n.sections,n.elementStyles].some(i=>!!(i&&Object.values(i).some(s=>s!==void 0&&s!=="")))?Object.fromEntries(Object.entries({...e??{},...bi(n)}).filter(([,i])=>i!==void 0)):e??null}});var Ti=F(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.generateThemeVariables=Xs;var pn=fn();function Xs(e){let t={};if(e){for(let[h,E]of Object.entries(e))if(typeof E=="string"||typeof E=="number"){let c=`--${h.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;t[c]=String(E)}}let n=(0,pn.isDarkColor)(e?.backgroundColor),r=e?.backgroundColor||(n?"#0f172a":"#ffffff"),i=e?.textColor||(n?"#f8fafc":"#0f172a"),s=e?.mutedTextColor||(n?"rgba(248, 250, 252, 0.7)":"#64748b"),o=e?.borderColor||(n?"rgba(255, 255, 255, 0.1)":"#e2e8f0"),a=e?.cardBackgroundColor||e?.surfaceColor||(n?"#111a2e":"#ffffff"),l=n?"rgba(255, 255, 255, 0.09)":o,u=e?.primaryColor||"#2563eb",f=e?.secondaryColor||(n?"#1e293b":"#0f172a"),g=e?.accentColor||"#14b8a6",b=e?.buttonBackgroundColor||u,S=(0,pn.getAutoContrastTextColor)(b),m=e?.buttonTextColor||S,d=n?"rgba(255, 255, 255, 0.08)":f&&!(0,pn.isDarkColor)(f)?f:"#f1f5f9",p=n?"#f8fafc":"#0f172a";return{"--brand-color":u,"--brand-primary":u,"--primary-color":u,"--color-primary":u,"--brand-secondary":f,"--secondary-color":f,"--brand-accent":g,"--accent-color":g,"--page-background":r,"--page-bg":r,"--background":r,"--page-text":i,"--heading-color":e?.headingColor||(n?"#ffffff":f),"--color-heading":e?.headingColor||(n?"#ffffff":f),"--muted-text":s,"--text-muted":s,"--color-text":i,"--color-text-muted":s,"--link-color":e?.linkColor||u,"--border-primary":o,"--border":o,"--color-border":o,"--color-surface":n?"rgba(255,255,255,0.05)":"#ffffff","--card-bg":a,"--card-border":l,"--product-card-bg":a,"--product-card-border":l,"--tag-bg":n?"rgba(255, 255, 255, 0.08)":"rgba(241, 245, 249, 0.9)","--tag-color":s,"--card-shadow":n?"0 10px 25px -5px rgba(0, 0, 0, 0.4)":"0 10px 25px -5px rgba(0, 0, 0, 0.05)","--header-bg":e?.headerBackgroundColor||(n?"rgba(15, 23, 42, 0.85)":"rgba(255, 255, 255, 0.82)"),"--input-bg":n?"#1e293b":"#ffffff","--input-border":n?"rgba(255, 255, 255, 0.15)":"#cbd5e1","--input-color":i,"--button-bg":b,"--button-text":m,"--button-primary-bg":b,"--button-primary-text":m,"--button-secondary-bg":d,"--button-secondary-text":p,"--button-outline-border":n?"rgba(255, 255, 255, 0.22)":"currentColor","--button-outline-text":n?"#f8fafc":i,"--button-ghost-text":n?"#f8fafc":i,"--hero-min-height":e?.heroMinHeight||"72vh","--section-padding":e?.sectionPadding||"5rem","--base-size":e?.baseSize||"16px","--heading-font":e?.headingFont||"Inter, sans-serif","--body-font":e?.bodyFont||"Inter, sans-serif","--border-radius":e?.borderRadius||"8px","--content-align":e?.align||"left",...t}}});var wi=F(te=>{"use strict";var Qs=te&&te.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Re=te&&te.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Qs(t,e,n)};Object.defineProperty(te,"__esModule",{value:!0});Re(mi(),te);Re(fn(),te);Re(hi(),te);Re(yi(),te);Re(Si(),te);Re(Ti(),te)});var Pi=F(H=>{"use strict";var ea=H&&H.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),oe=H&&H.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ea(t,e,n)};Object.defineProperty(H,"__esModule",{value:!0});oe(Jr(),H);oe(Qr(),H);oe(ei(),H);oe(sn(),H);oe(cn(),H);oe(ui(),H);oe(bt(),H);oe(dn(),H);oe(fi(),H);oe(wi(),H)});var ha={};Hi(ha,{runTemplatePreflight:()=>Di});module.exports=Wi(ha);var Fi=require("node:child_process"),k=require("node:fs/promises"),Ri=require("node:os"),_=require("node:path"),En=kt(Lt());var Xn=[{key:"content_image",label:"Content images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:200},{key:"business_logo",label:"Business logo",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:1},{key:"website_banner",label:"Website banner images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:10},{key:"gallery",label:"Gallery images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:30},{key:"product",label:"Product images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:50},{key:"service",label:"Service images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:50},{key:"shop_front",label:"Shop front images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:10},{key:"company_document",label:"Company documents",accept:["application/pdf","image/jpeg","image/png","image/webp"],maxSizeBytes:10485760,maxFiles:10},{key:"brochure_pdf",label:"Brochure PDF",accept:["application/pdf"],maxSizeBytes:10485760,maxFiles:5},{key:"restaurant_menu_pdf",label:"Restaurant menu PDF",accept:["application/pdf"],maxSizeBytes:10485760,maxFiles:5}];var fo={business_logo:["logo"],website_banner:["hero","banners"],gallery:["gallery"],product:["products"],service:["services"],shop_front:["shopFront"],content_image:["contentImages"],company_document:["documents"],brochure_pdf:["brochures"],restaurant_menu_pdf:["menus"]};function Qn(e,t=[]){return{project:{id:"template-validation",slug:"template-validation",title:"Template Validation",status:"APPROVED"},siteInstance:{id:"template-validation-instance",slug:"template-validation",domain:"template-validation.fivora.site",subdomain:"template-validation",customDomain:null,liveUrl:"https://template-validation.fivora.site"},api:{baseUrl:"https://api.fivora.site",catalogUrl:"https://api.fivora.site/site-catalog/template-validation/live-data",contactUrl:"https://api.fivora.site/site-contact",analyticsUrl:"https://api.fivora.site/site-analytics/page-view"},shop:{businessName:"Template Validation Shop",description:"Validation build payload that mirrors fivora-generated site data.",contact:{phone:"",email:"",whatsapp:""},address:{line1:"",city:"",district:"",province:"",postalCode:""},social:{facebook:"",instagram:"",tiktok:"",youtube:"",linkedin:"",website:""},logoUrl:""},template:{id:"template-validation",name:"Template Validation",engine:"NEXT_STATIC_EXPORT",structure:null},requirements:{mainPurpose:"",targetCustomers:"",preferredLanguage:"",preferredColorTheme:"",preferredStyle:"",requiredPages:t,requiredFeatures:[],customerSpecialRequirements:""},content:e??{},media:po(),seo:null}}function po(){let e={};for(let t of Xn){e[t.key]=[];for(let n of fo[t.key]??[])e[n]||(e[n]=[])}return e}var er=kt(Lt()),xe={maxEntries:2e3,maxEntryUncompressedBytes:25*1024*1024,maxTotalUncompressedBytes:200*1024*1024,maxCompressionRatio:100},mo=new Set([".cache",".git",".next",".npm",".pnpm-store",".turbo","__macosx","node_modules"]),go=new Set(["build","coverage","dist","out"]);function tr(e){let t;try{t=new er.default(e).getEntries()}catch{throw new Error("Template package is not a valid ZIP archive.")}let n=new Set,r=[],i=0;if(t.length>xe.maxEntries)throw new Error(`Template ZIP contains too many entries (${t.length}; maximum ${xe.maxEntries}).`);for(let s of t){let o=rr(s.entryName);if(r.push(o),ho(o))throw new Error(`Template ZIP contains an unsafe entry: ${s.entryName||"(empty path)"}.`);if(!s.isDirectory){let a=Number(s.header.size??0),l=Number(s.header.compressedSize??0);if(!Number.isSafeInteger(a)||a<0||a>xe.maxEntryUncompressedBytes)throw new Error(`Template ZIP entry is too large after extraction: ${o}.`);if(i+=a,i>xe.maxTotalUncompressedBytes)throw new Error(`Template ZIP expands beyond the ${xe.maxTotalUncompressedBytes/(1024*1024)} MB limit.`);if(a>1024*1024&&a/Math.max(1,l)>xe.maxCompressionRatio)throw new Error(`Template ZIP entry has an unsafe compression ratio: ${o}.`)}(!s.isDirectory&&Je(o)||s.isDirectory&&Je(o))&&n.add(o)}return{entries:r,forbiddenEntries:[...n]}}function nr(e){let t=e.slice(0,8),n=e.length-t.length;return["Template ZIP contains generated, cached, secret, log, or nested archive files that must be removed.",`Remove: ${t.join(", ")}${n>0?`, and ${n} more`:""}.`,"Create a clean source-only ZIP and upload it again."].join(" ")}function rr(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function ho(e){let t=ir(e);return!e||e.includes("\0")||e.startsWith("/")||/^[a-z]:\//i.test(e)||t.includes("..")}function Je(e){let t=rr(e),n=ir(t),r=n.at(-1)??"",i=n.some(S=>mo.has(S)),s=n[0]===".yarn"&&n[1]==="cache",o=n.some(S=>go.has(S)),a=n.some(S=>S===".deneb"||S.startsWith(".deneb-backup")),l=r===".env"||r.startsWith(".env."),u=r.endsWith(".zip"),f=r.endsWith(".log"),g=r.endsWith(".tsbuildinfo");return i||s||o||a||l||u||f||g||(r===".ds_store"||r==="thumbs.db")}function ir(e){return e.split("/").map(t=>t.trim().toLowerCase()).filter(Boolean)}var yo={common:{label:"Common Content"},home:{label:"Home Page",pageKey:"home"},about:{label:"About Page",pageKey:"about_us"},services:{label:"Services",pageKey:"services"},products:{label:"Products",pageKey:"products"},gallery:{label:"Gallery",pageKey:"gallery"},contact:{label:"Contact Page",pageKey:"contact"},additionalPages:{label:"Additional Pages"}},Eo=new Set(["text","textarea","email","tel","url","image","number","boolean","select"]),bo={version:1,sections:[{id:"common",path:"common",label:"Common Content",type:"object",fields:[{key:"logoUrl",type:"image",label:"Website logo",description:"Used by templates that read content.common.logoUrl or merchant.logoUrl."}]}]};function sr(e){if(!e||typeof e!="object")return null;let t=e,r=(Array.isArray(t.sections)?t.sections:[]).map(i=>To(i)).filter(i=>!!i);return r.length===0?null:So({version:typeof t.version=="number"&&Number.isFinite(t.version)?t.version:1,sections:r})}function So(e){let t=r=>/(^|\.)(products?|items?|catalog|menu|dishes?|goods|featuredproducts?|store|foods?|drinks?)$/i.test(r.trim()),n=(r,i)=>{let s=fe(i,r.key);if(r.type==="object")return{...r,fields:r.fields.map(o=>n(o,s))};if(r.type==="list"){let o=r.fields?.map(a=>n(a,`${s}[*]`));if(t(s)){let{maxItems:a,...l}=r;return{...l,fields:o}}return{...r,fields:o}}return r};return{...e,sections:e.sections.map(r=>{let i=r.fields?.map(s=>n(s,r.path));if(r.type==="list"&&t(r.path)){let{maxItems:s,...o}=r;return{...o,fields:i}}return{...r,fields:i}})}}function ar(e,t=[]){let n=new Map(t.map(i=>[i.id,i.label]));return{version:1,sections:Object.entries(e).map(([i,s])=>Po(i,s,n)).filter(i=>!!i)}}function Oe(e){if(!e)return null;let t=new Map;for(let s of e.sections){let o=t.get(s.path);t.set(s.path,o?Dt(o,s):s)}let n=[...t.values()],r=n.map(s=>s.path),i=n.map(s=>{let a=n.filter(u=>nt(s.path,u.path)).sort((u,f)=>or(f.path)-or(u.path)).map(u=>pr({...e,sections:[u]},s.path)).filter(u=>!!u).reduce((u,f)=>Dt(u,f),s),l=new Set(r.filter(u=>u!==s.path&&nt(u,s.path)));return Nt(a,l)}).filter(s=>!!s);return{...e,sections:i}}function rt(e){if(!e)return[];let t=new Map,n=[],r=new Set,i=(o,a,l)=>{let u=ne(o),f=t.get(u);if(!f){t.set(u,{kind:a,sectionId:l});return}r.has(u)||(r.add(u),n.push({path:u,firstKind:f.kind,duplicateKind:a,firstSectionId:f.sectionId,duplicateSectionId:l}))},s=(o,a,l)=>{if(a.type==="object"){for(let u of a.fields??[])s(fe(o,u.key),u,l);return}if(a.type==="list"){let u=ne(o);i(u,"list",l);let f=`${u}[*]`;a.itemField&&i(f,"field",l);for(let g of a.fields??[])s(fe(f,g.key),g,l);return}i(o,"field",l)};for(let o of e.sections)s(o.path,o,o.id);return n}function Ot(e,t){if(!e)return Oe(t);if(!t)return Oe(e);let n=Oe(e)??e,r=Oe(t)??t,i=n.sections.map(l=>l.path),s=n.sections.map(l=>{let u=pr(r,l.path);if(!u)return l;let f=new Set(i.filter(b=>b!==l.path&&nt(b,l.path))),g=Nt(u,f);return g?Dt(l,g):l}),o=new Set(n.sections.map(({path:l})=>l)),a=r.sections.filter(l=>!o.has(l.path)).map(l=>Nt(l,new Set(i.filter(u=>nt(u,l.path))))).filter(l=>!!l);return Oe({...t,...e,sections:[...s,...a]})}function cr(e){return e?Ot(e,bo):null}function To(e){if(!e||typeof e!="object")return null;let t=e,n=z(t.id),r=z(t.path),i=z(t.label),s=dr(t.type);if(!n||!r||!i||!s)return null;let o={id:n,path:r,label:i,description:z(t.description)||void 0,required:typeof t.required=="boolean"?t.required:void 0,placeholder:z(t.placeholder)||void 0,maxLength:Bt(t.maxLength),recommendedWidth:pe(t.recommendedWidth),recommendedHeight:pe(t.recommendedHeight),pageKey:z(t.pageKey)||void 0,...$t(t.sharedFieldKey)};if(s==="object"){let a=Qe(t.fields);return{...o,type:s,fields:a}}if(s==="list"){let a=Qe(t.fields),l=lr(t.itemField);return a.length===0&&!l?null:{...o,type:s,fields:a.length>0?a:void 0,itemField:l??void 0,itemLabel:z(t.itemLabel)||void 0,minItems:et(t.minItems),maxItems:et(t.maxItems)}}return{...o,type:s,options:s==="select"?Mt(t.options):void 0}}function Nt(e,t){if(t.has(e.path))return null;if(e.type==="object"){let n=(e.fields??[]).map(r=>Xe(r,e.path,t)).filter(r=>!!r);return n.length===0?null:{...e,fields:n}}if(e.type==="list"){let n=(e.fields??[]).map(r=>Xe(r,e.path,t)).filter(r=>!!r);return(e.fields?.length??0)>0&&n.length===0&&!e.itemField?null:{...e,fields:n.length>0?n:void 0}}return e}function Xe(e,t,n){let r=fe(t,e.key);if(n.has(r))return null;if(e.type==="object"){let i=e.fields.map(s=>Xe(s,r,n)).filter(s=>!!s);return i.length===0?null:{...e,fields:i}}if(e.type==="list"){let i=(e.fields??[]).map(s=>Xe(s,r,n)).filter(s=>!!s);return(e.fields?.length??0)>0&&i.length===0&&!e.itemField?null:{...e,fields:i.length>0?i:void 0}}return e}function Qe(e){return Array.isArray(e)?e.map(t=>wo(t)).filter(t=>!!t):[]}function wo(e){if(!e||typeof e!="object")return null;let t=e,n=z(t.key),r=z(t.label),i=dr(t.type);if(!n||!r||!i)return null;let s={key:n,label:r,description:z(t.description)||void 0,required:typeof t.required=="boolean"?t.required:void 0,placeholder:z(t.placeholder)||void 0,maxLength:Bt(t.maxLength),recommendedWidth:pe(t.recommendedWidth),recommendedHeight:pe(t.recommendedHeight),...$t(t.sharedFieldKey)};if(i==="object")return{...s,type:i,fields:Qe(t.fields)};if(i==="list"){let o=Qe(t.fields),a=lr(t.itemField);return o.length===0&&!a?null:{...s,type:i,fields:o.length>0?o:void 0,itemField:a??void 0,itemLabel:z(t.itemLabel)||void 0,minItems:et(t.minItems),maxItems:et(t.maxItems)}}return{...s,type:i,options:i==="select"?Mt(t.options):void 0}}function lr(e){if(!e||typeof e!="object")return null;let t=e,n=z(t.label),r=ur(t.type);return!n||!r?null:{label:n,type:r,description:z(t.description)||void 0,required:typeof t.required=="boolean"?t.required:void 0,placeholder:z(t.placeholder)||void 0,maxLength:Bt(t.maxLength),recommendedWidth:pe(t.recommendedWidth),recommendedHeight:pe(t.recommendedHeight),...$t(t.sharedFieldKey),options:r==="select"?Mt(t.options):void 0}}function $t(e){return typeof e=="string"&&e.trim()?{sharedFieldKey:e.trim()}:{}}function Mt(e){if(!Array.isArray(e))return;let t=e.map(n=>z(n)).filter(n=>!!n);return t.length>0?t:void 0}function Bt(e){return typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=1e4?e:void 0}function pe(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>0?e:void 0}function et(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:void 0}function dr(e){return e==="object"?e:e==="list"||e==="array"?"list":ur(e)}function ur(e){return typeof e=="string"&&Eo.has(e)?e:null}function Po(e,t,n){let r=yo[e],i=n.has(e)?e:void 0,s=!i&&e==="about"&&n.has("about_us")?"about_us":void 0,o=i||s||r?.pageKey,a=(o?n.get(o):void 0)||r?.label||hr(e);return Array.isArray(t)?Io(e,a,o,t):Ee(t)?{id:e,path:e,label:a,pageKey:o,type:"object",fields:Object.entries(t).map(([l,u])=>it(l,u))}:{id:e,path:e,label:a,pageKey:o,...ot(e,t)}}function it(e,t){let n=hr(e);return Array.isArray(t)?xo(e,n,t):Ee(t)?{key:e,label:n,type:"object",fields:Object.entries(t).map(([r,i])=>it(r,i))}:{key:e,label:n,...ot(e,t)}}function Io(e,t,n,r){let i=mr(r),s=yr(t);return Ee(i)?{id:e,path:e,label:t,pageKey:n,type:"list",itemLabel:s,fields:Object.entries(i).map(([o,a])=>it(o,a))}:{id:e,path:e,label:t,pageKey:n,type:"list",itemLabel:s,itemField:{label:s,...ot(e,i)}}}function xo(e,t,n){let r=mr(n),i=yr(t);return Ee(r)?{key:e,label:t,type:"list",itemLabel:i,fields:Object.entries(r).map(([s,o])=>it(s,o))}:{key:e,label:t,type:"list",itemLabel:i,itemField:{label:i,...ot(e,r)}}}function Dt(e,t){let n={...t,...e,pageKey:e.pageKey??t.pageKey,description:e.description??t.description,placeholder:e.placeholder??t.placeholder};if(e.type==="object"&&t.type==="object")return{...n,type:"object",fields:tt(e.fields??[],t.fields??[])};if(e.type==="list"&&t.type==="list"){let r=tt(e.fields??[],t.fields??[]);return{...n,type:"list",fields:r.length>0?r:void 0,itemField:fr(e.itemField,t.itemField),itemLabel:e.itemLabel??t.itemLabel,minItems:e.minItems??t.minItems,maxItems:e.maxItems??t.maxItems}}return{...e,recommendedWidth:e.recommendedWidth??t.recommendedWidth,recommendedHeight:e.recommendedHeight??t.recommendedHeight}}function tt(e,t){let n=new Map(t.map(i=>[i.key,i]));return[...e.map(i=>{let s=n.get(i.key);return n.delete(i.key),s?Co(i,s):i}),...n.values()]}function Co(e,t){let n={...t,...e,description:e.description??t.description,placeholder:e.placeholder??t.placeholder};if(e.type==="object"&&t.type==="object")return{...n,type:"object",fields:tt(e.fields,t.fields)};if(e.type==="list"&&t.type==="list"){let r=tt(e.fields??[],t.fields??[]);return{...n,type:"list",fields:r.length>0?r:void 0,itemField:fr(e.itemField,t.itemField),itemLabel:e.itemLabel??t.itemLabel,minItems:e.minItems??t.minItems,maxItems:e.maxItems??t.maxItems}}return{...e,recommendedWidth:e.recommendedWidth??t.recommendedWidth,recommendedHeight:e.recommendedHeight??t.recommendedHeight}}function fr(e,t){return e?!t||e.type!==t.type?e:{...t,...e,recommendedWidth:e.recommendedWidth??t.recommendedWidth,recommendedHeight:e.recommendedHeight??t.recommendedHeight}:t}function pr(e,t){let n=(i,s,o)=>{let{key:a,...l}=i;return{...l,id:o.id,path:s,pageKey:o.pageKey}},r=(i,s,o)=>{if(ne(s)===ne(t))return n(i,s,o);if(i.type==="object")for(let a of i.fields){let l=r(a,fe(s,a.key),o);if(l)return l}if(i.type==="list"){let a=`${ne(s)}[*]`;for(let l of i.fields??[]){let u=r(l,fe(a,l.key),o);if(u)return u}}return null};for(let i of e.sections){if(ne(i.path)===ne(t))return i;if(i.type==="object")for(let s of i.fields??[]){let o=r(s,fe(i.path,s.key),i);if(o)return o}if(i.type==="list"){let s=`${ne(i.path)}[*]`;for(let o of i.fields??[]){let a=r(o,fe(s,o.key),i);if(a)return a}}}return null}function nt(e,t){let n=ne(e),r=ne(t);return n.startsWith(`${r}.`)||n.startsWith(`${r}[`)}function ne(e){return e.replace(/\[\d+\]/g,"[*]").trim()}function or(e){return ne(e).split(/\.|\[/).filter(Boolean).length}function mr(e){let t=e.filter(Ee);return t.length===0?e.find(n=>n!=null):t.reduce((n,r)=>gr(n,r),{})}function gr(e,t){let n={...e};for(let[r,i]of Object.entries(t)){let s=n[r];if(Ee(s)&&Ee(i)){n[r]=gr(s,i);continue}if(Array.isArray(s)&&Array.isArray(i)){n[r]=[...s,...i];continue}(s==null||Array.isArray(s)&&s.length===0)&&(n[r]=i)}return n}function ot(e,t){let n=ko(e,t);if(n!=="image"||typeof t!="string"||!t.trim())return{type:n};try{let r=new URL(t,"https://fivora-template.invalid"),i=pe(Number(r.searchParams.get("w")??r.searchParams.get("width"))),s=pe(Number(r.searchParams.get("h")??r.searchParams.get("height")));return{type:n,...i?{recommendedWidth:i}:{},...s?{recommendedHeight:s}:{}}}catch{return{type:n}}}function ko(e,t){if(typeof t=="boolean")return"boolean";if(typeof t=="number")return"number";let n=e.toLowerCase();return n.includes("email")?"email":n.includes("phone")||n.includes("mobile")||n.includes("whatsapp")||n.includes("contactnumber")?"tel":n.includes("image")||n.includes("logo")||n.includes("banner")||n.includes("thumbnail")||n.includes("photo")?"image":n.includes("url")||n.includes("link")||typeof t=="string"&&/^https?:\/\//i.test(t.trim())?"url":n.includes("description")||n.includes("about")||n.includes("mission")||n.includes("vision")||n.includes("history")||n.includes("hours")||n.includes("address")||n.includes("body")||typeof t=="string"&&t.length>120?"textarea":"text"}function fe(e,t){return e?`${e}.${t}`:t}function z(e){return typeof e=="string"?e.trim():""}function Ee(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function hr(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function yr(e){return/ies$/i.test(e)?e.replace(/ies$/i,"y"):/s$/i.test(e)&&!/ss$/i.test(e)?e.replace(/s$/i,""):e}var Ao=["primary","secondary","accent","background","text","surface","surfaceAlt","heading","mutedText","border","headerBackground","footerBackground","cardBackground","buttonBackground","buttonText"],_o=["headingFont","bodyFont","baseSize","headingScale","bodyLineHeight","headingLineHeight","headingWeight","bodyWeight","letterSpacing"],vo=["heroMinHeight","sectionPadding","contentMaxWidth","containerPadding","sectionGap","elementGap","gridGap"],Fo=["textAlign","contentAlign","heroTextAlign","cardTextAlign","gridColumns"],Ro=["cardWidth","cardMinHeight","cardPadding","cardRadius","cardBorderWidth","cardShadow","buttonPadding","buttonRadius","buttonShadow","imageRadius","headerHeight"],Lo=["backgroundColor","textColor","headingColor","minHeight","padding","contentMaxWidth","gap","textAlign","contentAlign","cardBackgroundColor","cardWidth","cardMinHeight","cardRadius","gridColumns"],No=["fontFamily","fontSize","lineHeight","fontWeight","letterSpacing","color","backgroundColor","textAlign","width","height","minWidth","minHeight","maxWidth","maxHeight","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","borderRadius"];function ie(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Do(e){let t=e.trim();if(!t)return"";if(!(t.length>160)&&!/[;{}<>\r\n]/.test(t)&&!/(?:url\s*\(|expression\s*\(|@import|javascript:)/i.test(t))return t}function Er(e){let t=e.trim().toLowerCase(),n=t.match(/^#([0-9a-f]{3})$/);return n?`#${[...n[1]].map(r=>r.repeat(2)).join("")}`:/^#[0-9a-f]{6}$/.test(t)?t:null}function Oo(e){if(!ie(e))return;let t={};for(let[n,r]of Object.entries(e).slice(0,64)){if(typeof r!="string")continue;let i=Er(n),s=Er(r);!i||!s||(t[i]=s)}return Object.keys(t).length>0?t:void 0}function be(e,t){if(!ie(e))return;let n={};for(let r of t){if(typeof e[r]!="string")continue;let i=Do(e[r]);i!==void 0&&(n[r]=i)}return Object.keys(n).length>0?n:void 0}function $o(e){return/^[a-zA-Z0-9_-]{1,64}$/.test(e)}function Mo(e){return/^[a-zA-Z0-9_.:\[\]-]{1,180}$/.test(e)}function Bo(){return{version:1}}function jo(e){if(!ie(e))return Bo();let t=be(e.colors,Ao),n=Oo(e.colorReplacements),r=be(e.typography,_o),i=be(e.spacing,vo),s=be(e.layout,Fo),o=be(e.components,Ro),a={};if(ie(e.sections))for(let[u,f]of Object.entries(e.sections)){if(!$o(u)||!ie(f))continue;let b={...be(f,Lo)??{}};typeof f.visible=="boolean"&&(b.visible=f.visible),Object.keys(b).length>0&&(a[u]=b)}let l={};if(ie(e.elementStyles))for(let[u,f]of Object.entries(e.elementStyles).slice(0,256)){if(!Mo(u)||!ie(f))continue;let g=be(f,No);g&&Object.keys(g).length>0&&(l[u]=g)}return{version:1,...t?{colors:t}:{},...n?{colorReplacements:n}:{},...r?{typography:r}:{},...i?{spacing:i}:{},...s?{layout:s}:{},...o?{components:o}:{},...Object.keys(a).length>0?{sections:a}:{},...Object.keys(l).length>0?{elementStyles:l}:{}}}function br(e){if(!ie(e))return null;let t=e.themeSchema;if(!ie(t))return null;let n=jo(ie(t.defaults)?{version:1,...t.defaults}:null),r={...n.colors?{colors:n.colors}:{},...n.typography?{typography:n.typography}:{},...n.spacing?{spacing:n.spacing}:{},...n.layout?{layout:n.layout}:{},...n.components?{components:n.components}:{},...n.sections?{sections:n.sections}:{}};return{version:typeof t.version=="number"?t.version:1,tokens:Array.isArray(t.tokens)?t.tokens.filter(i=>typeof i=="string"):void 0,...Object.keys(r).length>0?{defaults:r}:{}}}var Vo=e=>new Error(e),Uo=new Set(["npm install","npm ci","pnpm install","pnpm install --frozen-lockfile","yarn install","yarn install --frozen-lockfile"]),zo=new Set(["npm run build","pnpm run build","yarn build","yarn run build"]);function Tr(e,t=Vo){let n=b=>{throw t(b)};(!e||typeof e!="object")&&n("Template manifest is missing or invalid.");let r=e;r.framework!=="nextjs-static-export"&&n('Template manifest framework must be "nextjs-static-export".'),(typeof r.siteDataFile!="string"||!r.siteDataFile.trim())&&n("Template manifest siteDataFile is required.");let i=typeof r.version=="number"&&Number.isFinite(r.version)?r.version:1,s=Ho(r.visualEditing,i,t),o=sr(r.editorSchema),a=br(r),l=Array.isArray(r.colorPalette)?r.colorPalette.filter(b=>!!b&&typeof b=="object").flatMap(b=>{let S=typeof b.color=="string"?b.color.trim().toLowerCase():"";if(!/^#[0-9a-f]{6}$/.test(S))return[];let m=typeof b.usageCount=="number"&&Number.isFinite(b.usageCount)?Math.max(1,Math.floor(b.usageCount)):1;return[{color:S,usageCount:m}]}).slice(0,40):[],u=rt(o);if(u.length>0){let b=u.slice(0,5).map(S=>`"${S.path}"`).join(", ");n(`Template editorSchema declares the same editable path in more than one place: ${b}. Keep each primitive field and list in exactly one section; a dedicated nested section must not also be repeated inside its ancestor section.`)}let f=Sr(r.installCommand,Uo,"installCommand",n),g=Sr(r.buildCommand,zo,"buildCommand",n);return{framework:"nextjs-static-export",version:i,siteDataFile:r.siteDataFile.trim(),editorSchema:o,pages:Array.isArray(r.pages)?r.pages.filter(b=>!!b&&typeof b=="object").map(b=>{let S=typeof b.id=="string"&&b.id.trim()?b.id.trim():null,m=typeof b.label=="string"&&b.label.trim()?b.label.trim():null;return!S||!m?n("Each template manifest page must include id and label."):{id:S,label:m,route:typeof b.route=="string"&&b.route.trim()?b.route.trim():void 0,required:typeof b.required=="boolean"?b.required:!1,description:typeof b.description=="string"?b.description.trim():void 0}}):void 0,visualEditing:s,...a?{themeSchema:a}:{},...l.length>0?{colorPalette:l}:{},outputDirectory:typeof r.outputDirectory=="string"?r.outputDirectory.trim():void 0,installCommand:f,buildCommand:g,basePathEnvVar:typeof r.basePathEnvVar=="string"?r.basePathEnvVar.trim():"NEXT_PUBLIC_SITE_BASE_PATH",publicSiteUrlEnvVar:typeof r.publicSiteUrlEnvVar=="string"?r.publicSiteUrlEnvVar.trim():void 0}}function Sr(e,t,n,r){if(e==null||e==="")return;if(typeof e!="string")return r(`Template manifest ${n} must be a string.`);let i=e.trim().replace(/\s+/g," ");return t.has(i)?i:r(`Template manifest ${n} is not allowed. Use a standard npm, pnpm, or yarn install/build command.`)}function Ho(e,t,n){let r=a=>{throw n(a)};if(!e||typeof e!="object"||Array.isArray(e))return t>=2&&r('Template manifest version 2 requires visualEditing.contractVersion 1 and visualEditing.mode "strict".'),{contractVersion:1,mode:"legacy"};let i=e;i.contractVersion!==1&&r("Template visualEditing.contractVersion must be 1.");let s=i.mode==="strict"||i.mode==="legacy"?i.mode:null;if(!s)return r('Template visualEditing.mode must be "strict" or "legacy".');t>=2&&s!=="strict"&&r('Template manifest version 2 requires visualEditing.mode "strict".');let o=Array.isArray(i.controlOnlyPaths)?i.controlOnlyPaths.filter(a=>typeof a=="string").map(a=>a.trim()).filter(Boolean):[];return{contractVersion:1,mode:s,controlOnlyPaths:o.length>0?o:void 0}}var Wo={"data-preview-field-path":"field","data-preview-list-path":"list","data-preview-item-path":"item","data-preview-page-key":"page"},wr=/\b(data-preview-(?:field-path|list-path|item-path|page-key))\s*=\s*(?:"([^"]*)"|'([^']*)'|\{\s*`([\s\S]*?)`\s*\}|\{\s*"([^"]*)"\s*\}|\{\s*'([^']*)'\s*\})/g,Pr=/\b(data-preview-(?:field-path|list-path|item-path|page-key))\s*=/g,Ir=String.raw`[^.[\]\s]+`,qo=new RegExp(String.raw`^${Ir}(?:\[(?:\d+|\*)\])*(?:\.${Ir}(?:\[(?:\d+|\*)\])*)*$`),Go=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Zo=new Set(["head","script","style","noscript","svg","template"]),xr=new Set(["html","body","main","header","footer","nav","section","article","aside","form","div","ul","ol","table","thead","tbody","tfoot","tr"]),st="FIVORA_PREVIEW_SITE_DATA",_r=`${["MARKET","PLACE"].join("")}_PREVIEW_`,at=`${_r}SITE_DATA`;var ct="FIVORA_PREVIEW_READY",jt=`${_r}READY`,Ko=ct;function Wt(e,t){let n={fieldPatterns:new Set,concreteFields:new Set,listPatterns:new Set,concreteLists:new Set,itemPatterns:new Set,concreteItems:new Set};if(e)for(let[r,i]of Object.entries(e))Zt(i,r,n);for(let r of t?.sections??[])Kt(r.path,r,n);return{fieldPatterns:[...n.fieldPatterns].sort(),concreteFields:[...n.concreteFields].sort(),listPatterns:[...n.listPatterns].sort(),concreteLists:[...n.concreteLists].sort(),itemPatterns:[...n.itemPatterns].sort(),concreteItems:[...n.concreteItems].sort()}}function Jt(e,t){let n=Lr(e??{});for(let r of t?.sections??[])Xo(n,r.path,r);return n}function vr(e,t){let n=structuredClone(e??{});for(let r of t?.sections??[])Yo(n,r.path,r);return Gt(n,"")}function mt(e){let t=[],n=[];for(let r of e){let i=new Set;wr.lastIndex=0;for(let s of r.content.matchAll(wr)){let o=s[1],a=s[2]??s[3]??s[4]??s[5]??s[6]??"",l=s.index??0;i.add(l),t.push({kind:Wo[o],value:Te(a).trim(),filePath:r.filePath,artifactKind:r.kind,offset:l,line:U(r.content,l)})}Pr.lastIndex=0;for(let s of r.content.matchAll(Pr)){let o=s.index??0;i.has(o)||n.push(`${r.filePath}:${U(r.content,o)} ${s[1]} must use a literal string or a JSX template literal.`)}}return{markers:t,unparseableAttributes:n}}function Fr(e){let t=e.manifestVersion>=2||e.visualEditing?.mode==="strict"?"strict":"legacy",n=[],r=[],i=Wt(e.contentDefaults,e.editorSchema),s=mt(e.artifacts),o=s.markers;e.contentDefaults||n.push('site-data.json must contain a JSON object at "content".'),e.editorSchema||n.push("An editor schema could not be derived from site-data.json content."),hs(e.editorSchema,n),ys(e.editorSchema,n),ns(e.editorSchema,n,e.pages),rs(e.editorSchema,e.contentDefaults,n),os(e.artifacts,n),ss(e.artifacts,n),as(e.artifacts,e.contentDefaults,e.editorSchema,n),r.push(...s.unparseableAttributes.map(T=>`${T} Exported exact markers may still satisfy strict coverage.`));let a=J(o,"field",n),l=J(o,"list",n),u=J(o,"item",n),f=o.filter(T=>T.artifactKind==="html"),g=J(f,"field",n),b=J(f,"list",n),S=J(f,"item",n),m=o.filter(T=>T.artifactKind==="source"),d=J(m,"field",n),p=J(m,"list",n),h=J(m,"item",n),E=Nr(e.visualEditing?.controlOnlyPaths??[],i,n);Ut({label:"editable field",expectedPatterns:i.fieldPatterns,concretePaths:i.concreteFields,htmlMarkerPaths:g,sourceMarkerPaths:d,controlOnlyPaths:E,findings:n}),Ut({label:"editable list",expectedPatterns:i.listPatterns,concretePaths:i.concreteLists,htmlMarkerPaths:b,sourceMarkerPaths:p,controlOnlyPaths:[],findings:n}),Ut({label:"editable list item",expectedPatterns:i.itemPatterns,concretePaths:i.concreteItems,htmlMarkerPaths:S,sourceMarkerPaths:h,controlOnlyPaths:[],findings:n}),zt("field",a,i.fieldPatterns,i.concreteFields,n),zt("list",l,i.listPatterns,i.concreteLists,n),zt("item",u,i.itemPatterns,i.concreteItems,n),Dr(e.manifestVersion,e.pages??[],o,e.artifacts,n),Or({manifestVersion:e.manifestVersion,pages:e.pages??[],schema:e.editorSchema,markers:o,fieldPaths:G([...i.fieldPatterns.filter(T=>!T.includes("[*]")),...i.concreteFields]),listPaths:G([...i.listPatterns.filter(T=>!T.includes("[*]")),...i.concreteLists]),itemPaths:i.concreteItems,controlOnlyPaths:E,findings:n});let c=cs(e.artifacts,e.pages??[]);t==="strict"?n.push(...c):r.push(...c);let y=G(n),w=G(r);return t==="legacy"?{mode:t,errors:[],warnings:G([...y.map(T=>`[legacy] ${T}`),...w]),inventory:i,markers:o}:{mode:t,errors:y,warnings:w,inventory:i,markers:o}}function Rr(e){let t=[],n=[],r=Wt(e.contentDefaults,e.editorSchema),i=Jt(e.contentDefaults,e.editorSchema),s=Wt(i,e.editorSchema),o=G([...r.fieldPatterns.filter(d=>!d.includes("[*]")),...s.concreteFields]),a=G([...r.listPatterns.filter(d=>!d.includes("[*]")),...s.concreteLists]),l=s.concreteItems,u=e.artifacts.filter(d=>d.kind==="html"),f=mt(u),g=J(f.markers,"field",t),b=J(f.markers,"list",t),S=J(f.markers,"item",t),m=Nr(e.visualEditing?.controlOnlyPaths??[],r,t);Vt({markerPaths:g,expectedPaths:s.concreteFields,knownPatterns:r.fieldPatterns,attribute:"field",findings:t}),Vt({markerPaths:b,expectedPaths:s.concreteLists,knownPatterns:r.listPatterns,attribute:"list",findings:t}),Vt({markerPaths:S,expectedPaths:s.concreteItems,knownPatterns:r.itemPatterns,attribute:"item",findings:t});for(let d of o)ft(d,m)||g.includes(d)||t.push(`Empty-state export removed data-preview-field-path="${d}". Keep the editable target mounted when its value is empty, false, or zero.`);for(let d of a)b.includes(d)||t.push(`Empty-state export removed data-preview-list-path="${d}". Keep the list container mounted when the list has no items.`);for(let d of l)S.includes(d)||t.push(`Empty-state export removed data-preview-item-path="${d}" required by minItems/required list validation.`);return Dr(e.manifestVersion,e.pages??[],f.markers,u,t),Or({manifestVersion:e.manifestVersion,pages:e.pages??[],schema:e.editorSchema,markers:f.markers,fieldPaths:o,listPaths:a,itemPaths:l,controlOnlyPaths:m,findings:t}),n.push(...f.unparseableAttributes),{errors:G(t),warnings:G(n),requiredFieldPaths:o,requiredListPaths:a,requiredItemPaths:l}}function Vt(e){let t=new Set(e.expectedPaths),n=new Set(e.knownPatterns);for(let r of e.markerPaths)r.includes("[*]")||t.has(r)||!n.has(Z(r))||e.findings.push(`Empty-state export rendered out-of-range data-preview-${e.attribute}-path="${r}" for a list item that does not exist. Render list items from the actual site-data array instead of fixed indexes or placeholder cards.`)}function Yo(e,t,n){let r=t.split(".").map(o=>o.trim()).filter(Boolean);if(r.length===0||r.some(o=>o.includes("[")))return;let i=e;for(let o of r.slice(0,-1)){let a=i[o];Q(a)||(i[o]={}),i=i[o]}let s=r.at(-1);qt(i,s,n,t)}function qt(e,t,n,r){if(n.type==="list"){let i=Array.isArray(e[t])?[...e[t]]:[],s=Se(n.maxItems),o=Math.min(s??Number.MAX_SAFE_INTEGER,s===0?0:Math.max(1,Se(n.minItems)??(n.required?1:0)));for(;i.length<o;)i.push(void 0);e[t]=i.map((a,l)=>{let u=`${r}[${l}]`;if(n.itemField)return Cr(a,n.itemField.type,u,n.itemField.options);let f=Q(a)?a:{};for(let g of n.fields??[])qt(f,g.key,g,X(u,g.key));return f});return}if(n.type==="object"){let i=Q(e[t])?e[t]:{};e[t]=i;for(let s of n.fields??[])qt(i,s.key,s,X(r,s.key));return}e[t]=Cr(e[t],n.type,r,n.options)}function Cr(e,t,n,r){return t==="number"?typeof e=="number"&&Number.isFinite(e)&&e!==0?e:1:t==="boolean"?e===!0?e:!0:typeof e=="string"&&e.trim()&&(t!=="select"||!r?.length||r.includes(e))?e:t==="select"?r?.[0]??lt(n):t==="url"?`https://template-validation.example.invalid/${dt(n)}`:t==="image"?`/template-validation-${dt(n)}.svg`:t==="email"?"validation@example.invalid":t==="tel"?"+12025550142":lt(n)}function Gt(e,t){return Array.isArray(e)?e.map((n,r)=>Gt(n,`${t}[${r}]`)):Q(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>{let i=X(t,n);return[n,Gt(r,i)]})):typeof e=="string"?e.trim()?e:Jo(t):typeof e=="number"?Number.isFinite(e)&&e!==0?e:1:typeof e=="boolean"?!0:e??lt(t)}function Jo(e){let t=e.toLowerCase();return t.includes("email")?"validation@example.invalid":t.includes("phone")||t.includes("mobile")||t.includes("whatsapp")||t.includes("contactnumber")?"+12025550142":t.includes("image")||t.includes("logo")||t.includes("banner")||t.includes("thumbnail")||t.includes("photo")?`/template-validation-${dt(e)}.svg`:t.includes("url")||t.includes("link")?`https://template-validation.example.invalid/${dt(e)}`:lt(e)}function lt(e){return`Validation ${e||"content"}`}function dt(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"content"}function Lr(e){return Array.isArray(e)?[]:Q(e)?Object.fromEntries(Object.entries(e).map(([t,n])=>[t,Lr(n)])):typeof e=="string"?"":typeof e=="number"?0:typeof e=="boolean"?!1:e}function Xo(e,t,n){let r=t.split(".").map(o=>o.trim()).filter(Boolean);if(r.length===0||r.some(o=>o.includes("[")))return;let i=e;for(let o of r.slice(0,-1)){let a=i[o];Q(a)||(i[o]={}),i=i[o]}let s=r.at(-1);Xt(i,s,n)}function Xt(e,t,n){if(n.type==="list"){let r=Math.min(Se(n.maxItems)??Number.MAX_SAFE_INTEGER,Se(n.minItems)??(n.required?1:0));e[t]=Array.from({length:r},()=>Qo(n));return}if(n.type==="object"){let r=Q(e[t])?e[t]:{};e[t]=r;for(let i of n.fields??[])Xt(r,i.key,i);return}e[t]=n.type==="number"?0:n.type==="boolean"?!1:""}function Qo(e){if(e.itemField)return e.itemField.type==="number"?0:e.itemField.type==="boolean"?!1:"";let t={};for(let n of e.fields??[])Xt(t,n.key,n);return t}function Zt(e,t,n){if(Array.isArray(e)){let r=Z(t);n.listPatterns.add(r),n.concreteLists.add(t),n.itemPatterns.add(`${r}[*]`),e.forEach((i,s)=>{let o=`${t}[${s}]`;n.concreteItems.add(o),Array.isArray(i)||Q(i)?Zt(i,o,n):(n.fieldPatterns.add(Z(o)),n.concreteFields.add(o))});return}if(Q(e)){for(let[r,i]of Object.entries(e))Zt(i,X(t,r),n);return}n.fieldPatterns.add(Z(t)),n.concreteFields.add(t)}function Kt(e,t,n){if(t.type==="object"){for(let r of t.fields??[])Kt(X(e,r.key),r,n);return}if(t.type==="list"){let r=Z(e),i=`${r}[*]`;n.listPatterns.add(r),n.itemPatterns.add(i),t.itemField&&n.fieldPatterns.add(i);for(let s of t.fields??[])Kt(X(i,s.key),s,n);return}n.fieldPatterns.add(Z(e))}function J(e,t,n){let r=[];for(let i of e.filter(s=>s.kind===t)){let s=$e(i.value);if(!s){n.push(`${i.filePath}:${Br(i)} has invalid data-preview-${t}-path "${i.value}".`);continue}r.push(s)}return G(r)}function Nr(e,t,n){let r=[];for(let i of e){let s=$e(i);if(!s){n.push(`controlOnlyPaths contains invalid path "${i}".`);continue}if(![...t.fieldPatterns,...t.concreteFields].some(a=>Yt(s,a))){n.push(`controlOnlyPaths contains unknown editable field path "${s}".`);continue}r.push(s)}return G(r)}function Ut(e){for(let t of e.expectedPatterns){if(ft(t,e.controlOnlyPaths))continue;let n=e.concretePaths.filter(r=>Z(r)===t);if(!t.includes("[*]")){e.htmlMarkerPaths.includes(t)||e.findings.push(`Exported HTML is missing exact data-preview-${Ht(e.label)}="${t}" for ${e.label}.`);continue}e.sourceMarkerPaths.some(r=>Es(r,t))||e.findings.push(`Source is missing dynamic data-preview-${Ht(e.label)} mapping for ${e.label} "${t}". Use an exact JSX template path such as [\${index}] so newly added and reordered items remain editable.`),n.length>0}for(let t of e.concretePaths)e.expectedPatterns.includes(t)||ft(t,e.controlOnlyPaths)||e.htmlMarkerPaths.includes(t)||e.findings.push(`Exported HTML is missing exact data-preview-${Ht(e.label)}="${t}" for concrete ${e.label}.`)}function zt(e,t,n,r,i){for(let s of t)n.some(a=>Yt(s,a))||r.some(a=>Yt(s,a))||i.push(`data-preview-${e}-path references unknown path "${s}".`)}function Dr(e,t,n,r,i){let s=r.filter(f=>f.kind==="html"),o=n.filter(f=>f.kind==="page"&&f.artifactKind==="html"),a=new Set(t.map(f=>f.id)),l=new Set,u=new Map;t.length===0&&i.push("Strict visual editing requires at least one manifest pages[] entry.");for(let f of t){l.has(f.id)&&i.push(`Manifest pages[] contains duplicate id "${f.id}".`),l.add(f.id);let g=en(f.route)??(e<2?Mr(f.id):null);if(!g){i.push(`Manifest page "${f.id}" must declare a canonical route for strict visual editing.`);continue}let b=u.get(g);b?i.push(`Manifest pages "${b}" and "${f.id}" use duplicate route "${g}".`):u.set(g,f.id);let S=s.filter(p=>tn(p.filePath,g));if(S.length===0){i.push(`Manifest page "${f.id}" route "${g}" has no exported HTML file.`);continue}let m=new Set(S.map(p=>p.filePath));o.some(p=>p.value===f.id&&m.has(p.filePath))||i.push(`Exported route "${g}" is missing data-preview-page-key="${f.id}".`)}for(let f of n.filter(g=>g.kind==="page"))a.has(f.value)||i.push(`${f.filePath}:${Br(f)} data-preview-page-key references unknown manifest page "${f.value}".`)}function Or(e){let t=(e.schema?.sections??[]).map(i=>({section:i,canonicalPath:$e(i.path)})).filter(i=>!!i.canonicalPath),n=new Map(e.pages.map(i=>[i.id,i])),r=(i,s)=>{for(let o of s){if(i==="field"&&ft(o,e.controlOnlyPaths))continue;let a=t.filter(b=>es(o,b.canonicalPath)).sort((b,S)=>S.canonicalPath.length-b.canonicalPath.length)[0];if(!a?.section.pageKey)continue;let l=n.get(a.section.pageKey);if(!l){e.findings.push(`editorSchema section "${a.section.path}" assigns ${kr(i)} "${o}" to unknown manifest page "${a.section.pageKey}".`);continue}let u=en(l.route)??(e.manifestVersion<2?Mr(l.id):null);!u||!e.markers.some(b=>b.kind===i&&b.artifactKind==="html"&&$e(b.value)===o)||e.markers.some(b=>b.kind===i&&b.artifactKind==="html"&&$e(b.value)===o&&tn(b.filePath,u))||e.findings.push(`Page-owned ${kr(i)} "${o}" from editorSchema section "${a.section.path}" must render data-preview-${ts(i)}="${o}" on manifest page "${l.id}" route "${u}". Shared sections without pageKey may render globally.`)}};r("field",G(e.fieldPaths)),r("list",G(e.listPaths)),r("item",G(e.itemPaths))}function es(e,t){let n=Z(e),r=Z(t);return n===r||n.startsWith(`${r}.`)||n.startsWith(`${r}[`)}function kr(e){return e==="field"?"editable field":e==="list"?"editable list":"editable list item"}function ts(e){return e==="field"?"field-path":e==="list"?"list-path":"item-path"}function ns(e,t,n=[]){let r=new Set(n.map(o=>o.id?.trim()).filter(o=>!!o)),i=(o,a)=>{if(!a?.some(l=>typeof l=="string"&&l.trim().length>0)){t.push(`editorSchema select field "${o}" must declare at least one non-empty option for strict visual editing. Add options: ["First option", ...] or change the field type.`);return}if(r.size>0&&/(?:destination|action|targetpage|buttonaction|pagekey)/i.test(o))for(let u of a){let f=typeof u=="string"?u.trim():"";f&&f!=="none"&&f!=="external"&&!r.has(f)&&t.push(`editorSchema select field "${o}" declares destination option "${f}" which is not in fivora-template.json pages[]. Declared pages: ${[...r].join(", ")}.`)}},s=(o,a)=>{if(a.type==="select"){i(o,a.options);return}if(a.type==="object"){for(let u of a.fields??[])s(X(o,u.key),u);return}if(a.type!=="list")return;let l=`${Z(o)}[*]`;a.itemField?.type==="select"&&i(l,a.itemField.options);for(let u of a.fields??[])s(X(l,u.key),u)};for(let o of e?.sections??[])s(o.path,o)}function rs(e,t,n){let r=(s,o)=>{if(o.type==="object"){for(let g of o.fields??[])r(X(s,g.key),g);return}if(o.type!=="list")return;let a=Se(o.minItems),l=Se(o.maxItems);o.minItems!==void 0&&a===null&&n.push(`editorSchema list "${s}" minItems must be a non-negative safe integer.`),o.maxItems!==void 0&&l===null&&n.push(`editorSchema list "${s}" maxItems must be a non-negative safe integer.`);let u=a??(o.required?1:0);l!==null&&u>l&&n.push(`editorSchema list "${s}" requires at least ${u} item${u===1?"":"s"} but maxItems is ${l}. Increase maxItems or lower minItems/required.`);let f=`${Z(s)}[*]`;for(let g of o.fields??[])r(X(f,g.key),g)},i=(s,o,a)=>{if(o.type==="object"){let f=Q(a)?a:{};for(let g of o.fields??[])i(X(s,g.key),g,f[g.key]);return}if(o.type!=="list")return;let l=Array.isArray(a)?a:[],u=Se(o.maxItems);u!==null&&l.length>u&&n.push(`site-data.json content list "${s}" contains ${l.length} items, exceeding editorSchema maxItems ${u}.`);for(let[f,g]of l.entries()){let b=Q(g)?g:{};for(let S of o.fields??[])i(X(`${s}[${f}]`,S.key),S,b[S.key])}};for(let s of e?.sections??[])r(s.path,s),i(s.path,s,is(t??{},s.path))}function Se(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:null}function is(e,t){let n=e;for(let r of t.split(".").map(i=>i.trim())){if(!r||!Q(n))return;n=n[r]}return n}function os(e,t){let n=[/\b(?:setAttribute|setAttributeNS|toggleAttribute)\s*\(\s*['"`]data-preview-static['"`]/m,/\.(?:attr|prop)\s*\(\s*['"`]data-preview-static['"`]/m,/\bdataset\s*(?:\.\s*previewStatic|\[\s*['"`]previewStatic['"`]\s*\])\s*=/m,/\b(?:innerHTML|outerHTML)\s*\+?=[^;]{0,500}data-preview-static/m,/\.(?:replace|replaceAll)\s*\([\s\S]{0,500}?data-preview-static/m];for(let r of e.filter(i=>i.kind==="source")){let i=n.map(f=>f.exec(r.content)).find(f=>!!f),s=r.content.search(/data-preview-static/),o=/\b(?:writeFile|writeFileSync|appendFile|appendFileSync)\s*\(/m.exec(r.content),a=/\.[cm]?[jt]s$/i.test(r.filePath),l=s>=0&&a&&o;if(!i&&!l)continue;let u=i?.index??s;t.push(`${r.filePath}:${U(r.content,u)} programmatically injects data-preview-static. Author each intentional static annotation directly on the smallest source element; blanket or post-build annotation bypasses strict editable-content validation.`)}}function ss(e,t){let n=e.filter(S=>S.kind==="source"),r=n.map(S=>S.content).join(`
|
|
2
|
+
var Bi=Object.create;var qe=Object.defineProperty;var ji=Object.getOwnPropertyDescriptor;var Vi=Object.getOwnPropertyNames;var Ui=Object.getPrototypeOf,zi=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Hi=(e,t)=>{for(var n in t)qe(e,n,{get:t[n],enumerable:!0})},bn=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vi(t))!zi.call(e,i)&&i!==n&&qe(e,i,{get:()=>t[i],enumerable:!(r=ji(t,i))||r.enumerable});return e};var kt=(e,t,n)=>(n=e!=null?Bi(Ui(e)):{},bn(t||!e||!e.__esModule?qe(n,"default",{value:e,enumerable:!0}):n,e)),Wi=e=>bn(qe({},"__esModule",{value:!0}),e);var At=F((Ea,Sn)=>{Sn.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var Ge=F(wn=>{var Tn={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function qi(e){return function(...t){return t.length&&(e=e.replace(/\{(\d)\}/g,(n,r)=>t[r]||"")),new Error("ADM-ZIP: "+e)}}for(let e of Object.keys(Tn))wn[e]=qi(Tn[e])});var kn=F((Sa,Cn)=>{var Gi=require("fs"),j=require("path"),Pn=At(),Zi=Ge(),Ki=typeof process=="object"&&process.platform==="win32",In=e=>typeof e=="object"&&e!==null,xn=new Uint32Array(256).map((e,t)=>{for(let n=0;n<8;n++)(t&1)!==0?t=3988292384^t>>>1:t>>>=1;return t>>>0});function $(e){this.sep=j.sep,this.fs=Gi,In(e)&&In(e.fs)&&typeof e.fs.statSync=="function"&&(this.fs=e.fs)}Cn.exports=$;$.prototype.makeDir=function(e){let t=this;function n(r){let i=r.split(t.sep)[0];r.split(t.sep).forEach(function(s){if(!(!s||s.substr(-1,1)===":")){i+=t.sep+s;var o;try{o=t.fs.statSync(i)}catch(a){if(a.message&&a.message.startsWith("ENOENT"))t.fs.mkdirSync(i);else throw a}if(o&&o.isFile())throw Zi.FILE_IN_THE_WAY(`"${i}"`)}})}n(e)};$.prototype.writeFileTo=function(e,t,n,r){let i=this;if(i.fs.existsSync(e)){if(!n)return!1;var s=i.fs.statSync(e);if(s.isDirectory())return!1}var o=j.dirname(e);i.fs.existsSync(o)||i.makeDir(o);var a;try{a=i.fs.openSync(e,"w",438)}catch{i.fs.chmodSync(e,438),a=i.fs.openSync(e,"w",438)}if(a)try{i.fs.writeSync(a,t,0,t.length,0)}finally{i.fs.closeSync(a)}return i.fs.chmodSync(e,r||438),!0};$.prototype.writeFileToAsync=function(e,t,n,r,i){typeof r=="function"&&(i=r,r=void 0);let s=this;s.fs.exists(e,function(o){if(o&&!n)return i(!1);s.fs.stat(e,function(a,l){if(o&&l&&l.isDirectory())return i(!1);var u=j.dirname(e);s.fs.exists(u,function(f){if(!f)try{s.makeDir(u)}catch{return i(!1)}let g=function(b){s.fs.write(b,t,0,t.length,0,function(S){s.fs.close(b,function(){if(S)return i(!1);s.fs.chmod(e,r||438,function(){i(!0)})})})};s.fs.open(e,"w",438,function(b,S){b?s.fs.chmod(e,438,function(){s.fs.open(e,"w",438,function(m,d){if(m||!d)return i(!1);g(d)})}):S?g(S):i(!1)})})})})};$.prototype.findFiles=function(e){let t=this;function n(r,i,s,o){typeof i=="boolean"&&(s=i,i=void 0);let a=[];return t.fs.readdirSync(r).forEach(function(l){let u=j.join(r,l),f=t.fs.statSync(u);if((!i||i.test(u))&&a.push(j.normalize(u)+(f.isDirectory()?t.sep:"")),f.isDirectory()&&s){let g=t.fs.realpathSync(u);o.has(g)||(o.add(g),a=a.concat(n(u,i,s,o)))}}),a}return n(e,void 0,!0,new Set([t.fs.realpathSync(e)]))};$.prototype.findFilesAsync=function(e,t){let n=this,r=[],i=!1,s=function(a){i||(i=!0,t(a,a?void 0:r))},o=function(a,l,u){n.fs.readdir(a,function(f,g){if(f)return u(f);let b=g.length;if(!b)return u();g.forEach(function(S){let m=j.join(a,S);n.fs.stat(m,function(d,p){if(d)return u(d);if(!p){--b||u();return}if(r.push(j.normalize(m)+(p.isDirectory()?n.sep:"")),!p.isDirectory()){--b||u();return}n.fs.realpath(m,function(h,E){if(h)return u(h);if(l.has(E)){--b||u();return}l.add(E),o(m,l,function(c){if(c)return u(c);--b||u()})})})})})};n.fs.realpath(e,function(a,l){if(a)return s(a);o(e,new Set([l]),s)})};$.prototype.getAttributes=function(){};$.prototype.setAttributes=function(){};$.crc32update=function(e,t){return xn[(e^t)&255]^e>>>8};$.crc32=function(e){typeof e=="string"&&(e=Buffer.from(e,"utf8"));let t=e.length,n=-1;for(let r=0;r<t;)n=$.crc32update(n,e[r++]);return~n>>>0};$.methodToString=function(e){switch(e){case Pn.STORED:return"STORED ("+e+")";case Pn.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}};$.canonical=function(e){if(!e)return"";let t=j.posix.normalize("/"+e.split("\\").join("/"));return j.join(".",t)};$.zipnamefix=function(e){if(!e)return"";let t=j.posix.normalize("/"+e.split("\\").join("/"));return j.posix.join(".",t)};$.findLast=function(e,t){if(!Array.isArray(e))throw new TypeError("arr is not array");let n=e.length>>>0;for(let r=n-1;r>=0;r--)if(t(e[r],r,e))return e[r]};$.sanitize=function(e,t){e=j.resolve(j.normalize(e));for(var n=t.split("/"),r=0,i=n.length;r<i;r++){var s=j.normalize(j.join(e,n.slice(r,i).join(j.sep)));if(s===e||s.startsWith(e+j.sep))return s}return j.normalize(j.join(e,j.basename(t)))};$.toBuffer=function(t,n){return Buffer.isBuffer(t)?t:t instanceof Uint8Array?Buffer.from(t):typeof t=="string"?n(t):Buffer.alloc(0)};$.readBigUInt64LE=function(e,t){let n=e.readUInt32LE(t);return e.readUInt32LE(t+4)*4294967296+n};$.writeBigUInt64LE=function(e,t,n){let r=t>>>0,i=Math.floor(t/4294967296)>>>0;e.writeUInt32LE(r,n),e.writeUInt32LE(i,n+4)};$.fromDOS2Date=function(e){return new Date((e>>25&127)+1980,Math.max((e>>21&15)-1,0),Math.max(e>>16&31,1),e>>11&31,e>>5&63,(e&31)<<1)};$.fromDate2DOS=function(e){let t=0,n=0;return e.getFullYear()>1979&&(t=(e.getFullYear()-1980&127)<<9|e.getMonth()+1<<5|e.getDate(),n=e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1),t<<16|n};$.isWin=Ki;$.crcTable=xn});var _n=F((Ta,An)=>{var Yi=require("path");An.exports=function(e,{fs:t}){var n=e||"",r=s(),i=null;function s(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return n&&t.existsSync(n)?(i=t.statSync(n),r.directory=i.isDirectory(),r.mtime=i.mtime,r.atime=i.atime,r.executable=(73&i.mode)!==0,r.readonly=(128&i.mode)===0,r.hidden=Yi.basename(n)[0]==="."):console.warn("Invalid path: "+n),{get directory(){return r.directory},get readOnly(){return r.readonly},get hidden(){return r.hidden},get mtime(){return r.mtime},get atime(){return r.atime},get executable(){return r.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:n,isDirectory:r.directory,isReadOnly:r.readonly,isHidden:r.hidden,isExecutable:r.executable,mTime:r.mtime,aTime:r.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var Fn=F((wa,vn)=>{vn.exports={efs:!0,encode:e=>Buffer.from(e,"utf8"),decode:e=>e.toString("utf8")}});var Ie=F((Pa,Pe)=>{Pe.exports=kn();Pe.exports.Constants=At();Pe.exports.Errors=Ge();Pe.exports.FileAttr=_n();Pe.exports.decoder=Fn()});var Ln=F((Ia,Rn)=>{var ue=Ie(),I=ue.Constants;Rn.exports=function(){var e=20,t=10,n=0,r=0,i=0,s=0,o=0,a=0,l=0,u=0,f=0,g=0,b=0,S=0,m=0;e|=ue.isWin?2560:768,n|=I.FLG_EFS;let d={extraLen:0},p=c=>Math.max(0,c)>>>0,h=c=>Math.max(0,c)&65535,E=c=>Math.max(0,c)&255;return i=ue.fromDate2DOS(new Date),{get made(){return e},set made(c){e=c},get version(){return t},set version(c){t=c},get flags(){return n},set flags(c){n=c},get flags_efs(){return(n&I.FLG_EFS)>0},set flags_efs(c){c?n|=I.FLG_EFS:n&=~I.FLG_EFS},get flags_desc(){return(n&I.FLG_DESC)>0},set flags_desc(c){c?n|=I.FLG_DESC:n&=~I.FLG_DESC},get method(){return r},set method(c){switch(c){case I.STORED:this.version=10;break;case I.DEFLATED:default:this.version=20}r=c},get time(){return ue.fromDOS2Date(this.timeval)},set time(c){c=new Date(c),this.timeval=ue.fromDate2DOS(c)},get timeval(){return i},set timeval(c){i=p(c)},get timeHighByte(){return E(i>>>8)},get crc(){return s},set crc(c){s=p(c)},get compressedSize(){return o},set compressedSize(c){o=p(c)},get size(){return a},set size(c){a=p(c)},get fileNameLength(){return l},set fileNameLength(c){l=c},get extraLength(){return u},set extraLength(c){u=c},get extraLocalLength(){return d.extraLen},set extraLocalLength(c){d.extraLen=c},get commentLength(){return f},set commentLength(c){f=c},get diskNumStart(){return g},set diskNumStart(c){g=p(c)},get inAttr(){return b},set inAttr(c){b=p(c)},get attr(){return S},set attr(c){S=p(c)},get fileAttr(){return(S||0)>>16&4095},get offset(){return m},set offset(c){m=p(c)},get encrypted(){return(n&I.FLG_ENC)===I.FLG_ENC},get centralHeaderSize(){return I.CENHDR+l+u+f},get realDataOffset(){return m+I.LOCHDR+d.fnameLen+d.extraLen},get localHeader(){return d},loadLocalHeaderFromBinary:function(c){var y=c.slice(m,m+I.LOCHDR);if(y.readUInt32LE(0)!==I.LOCSIG)throw ue.Errors.INVALID_LOC();d.version=y.readUInt16LE(I.LOCVER),d.flags=y.readUInt16LE(I.LOCFLG),d.flags_desc=(d.flags&I.FLG_DESC)>0,d.method=y.readUInt16LE(I.LOCHOW),d.time=y.readUInt32LE(I.LOCTIM),d.crc=y.readUInt32LE(I.LOCCRC),d.compressedSize=y.readUInt32LE(I.LOCSIZ),d.size=y.readUInt32LE(I.LOCLEN),d.fnameLen=y.readUInt16LE(I.LOCNAM),d.extraLen=y.readUInt16LE(I.LOCEXT);let w=m+I.LOCHDR+d.fnameLen,T=w+d.extraLen;return c.slice(w,T)},loadFromBinary:function(c){if(c.length!==I.CENHDR||c.readUInt32LE(0)!==I.CENSIG)throw ue.Errors.INVALID_CEN();e=c.readUInt16LE(I.CENVEM),t=c.readUInt16LE(I.CENVER),n=c.readUInt16LE(I.CENFLG),r=c.readUInt16LE(I.CENHOW),i=c.readUInt32LE(I.CENTIM),s=c.readUInt32LE(I.CENCRC),o=c.readUInt32LE(I.CENSIZ),a=c.readUInt32LE(I.CENLEN),l=c.readUInt16LE(I.CENNAM),u=c.readUInt16LE(I.CENEXT),f=c.readUInt16LE(I.CENCOM),g=c.readUInt16LE(I.CENDSK),b=c.readUInt16LE(I.CENATT),S=c.readUInt32LE(I.CENATX),m=c.readUInt32LE(I.CENOFF)},localHeaderToBinary:function(){var c=Buffer.alloc(I.LOCHDR);return c.writeUInt32LE(I.LOCSIG,0),c.writeUInt16LE(t,I.LOCVER),c.writeUInt16LE(n&~I.FLG_DESC,I.LOCFLG),c.writeUInt16LE(r,I.LOCHOW),c.writeUInt32LE(i,I.LOCTIM),c.writeUInt32LE(s,I.LOCCRC),c.writeUInt32LE(o,I.LOCSIZ),c.writeUInt32LE(a,I.LOCLEN),c.writeUInt16LE(l,I.LOCNAM),c.writeUInt16LE(d.extraLen,I.LOCEXT),c},centralHeaderToBinary:function(){var c=Buffer.alloc(I.CENHDR+l+u+f);return c.writeUInt32LE(I.CENSIG,0),c.writeUInt16LE(e,I.CENVEM),c.writeUInt16LE(t,I.CENVER),c.writeUInt16LE(n&~I.FLG_DESC,I.CENFLG),c.writeUInt16LE(r,I.CENHOW),c.writeUInt32LE(i,I.CENTIM),c.writeUInt32LE(s,I.CENCRC),c.writeUInt32LE(o,I.CENSIZ),c.writeUInt32LE(a,I.CENLEN),c.writeUInt16LE(l,I.CENNAM),c.writeUInt16LE(u,I.CENEXT),c.writeUInt16LE(f,I.CENCOM),c.writeUInt16LE(g,I.CENDSK),c.writeUInt16LE(b,I.CENATT),c.writeUInt32LE(S,I.CENATX),c.writeUInt32LE(m,I.CENOFF),c},toJSON:function(){let c=function(y){return y+" bytes"};return{made:e,version:t,flags:n,method:ue.methodToString(r),time:this.time,crc:"0x"+s.toString(16).toUpperCase(),compressedSize:c(o),size:c(a),fileNameLength:c(l),extraLength:c(u),commentLength:c(f),diskNumStart:g,inAttr:b,attr:S,offset:m,centralHeaderSize:c(I.CENHDR+l+u+f)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var Dn=F((xa,Nn)=>{var Y=Ie(),C=Y.Constants;Nn.exports=function(){var e=0,t=0,n=0,r=0,i=0;let s=()=>e>C.EF_ZIP64_OR_16||t>C.EF_ZIP64_OR_16||n>C.EF_ZIP64_OR_32||r>C.EF_ZIP64_OR_32;return{get diskEntries(){return e},set diskEntries(o){e=t=o},get totalEntries(){return t},set totalEntries(o){t=e=o},get size(){return n},set size(o){n=o},get offset(){return r},set offset(o){r=o},get commentLength(){return i},set commentLength(o){i=o},get mainHeaderSize(){return(s()?C.ZIP64HDR+C.END64HDR:0)+C.ENDHDR+i},loadFromBinary:function(o){if((o.length!==C.ENDHDR||o.readUInt32LE(0)!==C.ENDSIG)&&(o.length<C.ZIP64HDR||o.readUInt32LE(0)!==C.ZIP64SIG))throw Y.Errors.INVALID_END();o.readUInt32LE(0)===C.ENDSIG?(e=o.readUInt16LE(C.ENDSUB),t=o.readUInt16LE(C.ENDTOT),n=o.readUInt32LE(C.ENDSIZ),r=o.readUInt32LE(C.ENDOFF),i=o.readUInt16LE(C.ENDCOM)):(e=Y.readBigUInt64LE(o,C.ZIP64SUB),t=Y.readBigUInt64LE(o,C.ZIP64TOT),n=Y.readBigUInt64LE(o,C.ZIP64SIZB),r=Y.readBigUInt64LE(o,C.ZIP64OFF),i=0)},toBinary:function(){if(!s()){var o=Buffer.alloc(C.ENDHDR+i);return o.writeUInt32LE(C.ENDSIG,0),o.writeUInt32LE(0,4),o.writeUInt16LE(e,C.ENDSUB),o.writeUInt16LE(t,C.ENDTOT),o.writeUInt32LE(n,C.ENDSIZ),o.writeUInt32LE(r,C.ENDOFF),o.writeUInt16LE(i,C.ENDCOM),o.fill(" ",C.ENDHDR),o}var o=Buffer.alloc(this.mainHeaderSize);let a=0;o.writeUInt32LE(C.ZIP64SIG,a),Y.writeBigUInt64LE(o,C.ZIP64HDR-C.ZIP64LEAD,a+C.ZIP64SIZE),o.writeUInt16LE(45,a+C.ZIP64VEM),o.writeUInt16LE(45,a+C.ZIP64VER),o.writeUInt32LE(0,a+C.ZIP64DSK),o.writeUInt32LE(0,a+C.ZIP64DSKDIR),Y.writeBigUInt64LE(o,e,a+C.ZIP64SUB),Y.writeBigUInt64LE(o,t,a+C.ZIP64TOT),Y.writeBigUInt64LE(o,n,a+C.ZIP64SIZB),Y.writeBigUInt64LE(o,r,a+C.ZIP64OFF);let l=r+n;return a+=C.ZIP64HDR,o.writeUInt32LE(C.END64SIG,a),o.writeUInt32LE(0,a+C.END64START),Y.writeBigUInt64LE(o,l,a+C.END64OFF),o.writeUInt32LE(1,a+C.END64NUMDISKS),a+=C.END64HDR,o.writeUInt32LE(C.ENDSIG,a),o.writeUInt32LE(0,a+4),o.writeUInt16LE(Math.min(e,C.EF_ZIP64_OR_16),a+C.ENDSUB),o.writeUInt16LE(Math.min(t,C.EF_ZIP64_OR_16),a+C.ENDTOT),o.writeUInt32LE(Math.min(n,C.EF_ZIP64_OR_32),a+C.ENDSIZ),o.writeUInt32LE(Math.min(r,C.EF_ZIP64_OR_32),a+C.ENDOFF),o.writeUInt16LE(i,a+C.ENDCOM),o.fill(" ",a+C.ENDHDR),o},toJSON:function(){let o=function(a,l){let u=a.toString(16).toUpperCase();for(;u.length<l;)u="0"+u;return"0x"+u};return{diskEntries:e,totalEntries:t,size:n+" bytes",offset:o(r,4),commentLength:i}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var vt=F(_t=>{_t.EntryHeader=Ln();_t.MainHeader=Dn()});var $n=F((ka,On)=>{On.exports=function(e){var t=require("zlib"),n={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,n)},deflateAsync:function(r){var i=t.createDeflateRaw(n),s=[],o=0;i.on("data",function(a){s.push(a),o+=a.length}),i.on("end",function(){var a=Buffer.alloc(o),l=0;a.fill(0);for(var u=0;u<s.length;u++){var f=s[u];f.copy(a,l),l+=f.length}r&&r(a)}),i.end(e)}}}});var Bn=F((Aa,Mn)=>{var Ji=+(process?.versions?.node??"").split(".")[0]||0;Mn.exports=function(e,t){var n=require("zlib");let r=Ji>=15&&t>0?{maxOutputLength:t}:{};return{inflate:function(){return n.inflateRawSync(e,r)},inflateAsync:function(i){var s=n.createInflateRaw(r),o=[],a=0;s.on("data",function(l){o.push(l),a+=l.length}),s.on("end",function(){var l=Buffer.alloc(a),u=0;l.fill(0);for(var f=0;f<o.length;f++){var g=o[f];g.copy(l,u),u+=g.length}i&&i(l)}),s.end(e)}}}});var Hn=F((_a,zn)=>{"use strict";var{randomFillSync:jn}=require("crypto"),Xi=Ge(),Qi=new Uint32Array(256).map((e,t)=>{for(let n=0;n<8;n++)(t&1)!==0?t=t>>>1^3988292384:t>>>=1;return t>>>0}),Un=(e,t)=>Math.imul(e,t)>>>0,Vn=(e,t)=>Qi[(e^t)&255]^e>>>8,De=()=>typeof jn=="function"?jn(Buffer.alloc(12)):De.node();De.node=()=>{let e=Buffer.alloc(12),t=e.length;for(let n=0;n<t;n++)e[n]=Math.random()*256&255;return e};var Ze={genSalt:De};function Ke(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let n=0;n<t.length;n++)this.updateKeys(t[n])}Ke.prototype.updateKeys=function(e){let t=this.keys;return t[0]=Vn(t[0],e),t[1]+=t[0]&255,t[1]=Un(t[1],134775813)+1,t[2]=Vn(t[2],t[1]>>>24),e};Ke.prototype.next=function(){let e=(this.keys[2]|2)>>>0;return Un(e,e^1)>>8&255};function eo(e){let t=new Ke(e);return function(n){let r=Buffer.alloc(n.length),i=0;for(let s of n)r[i++]=t.updateKeys(s^t.next());return r}}function to(e){let t=new Ke(e);return function(n,r,i=0){r||(r=Buffer.alloc(n.length));for(let s of n){let o=t.next();r[i++]=s^o,t.updateKeys(s)}return r}}function no(e,t,n){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);let r=eo(n),i=r(e.slice(0,12)),s=(t.flags&8)===8?t.timeHighByte:t.crc>>>24;if(i[11]!==s)throw Xi.WRONG_PASSWORD();return r(e.slice(12))}function ro(e){Buffer.isBuffer(e)&&e.length>=12?Ze.genSalt=function(){return e.slice(0,12)}:e==="node"?Ze.genSalt=De.node:Ze.genSalt=De}function io(e,t,n,r=!1){e==null&&(e=Buffer.alloc(0)),Buffer.isBuffer(e)||(e=Buffer.from(e.toString()));let i=to(n),s=Ze.genSalt();s[11]=t.crc>>>24&255,r&&(s[10]=t.crc>>>16&255);let o=Buffer.alloc(e.length+12);return i(s,o),i(e,o,12)}zn.exports={decrypt:no,encrypt:io,_salter:ro}});var Wn=F(Ye=>{Ye.Deflater=$n();Ye.Inflater=Bn();Ye.ZipCrypto=Hn()});var Rt=F((Fa,qn)=>{var N=Ie(),oo=vt(),K=N.Constants,Ft=Wn();qn.exports=function(e,t){var n=new oo.EntryHeader,r=Buffer.alloc(0),i=Buffer.alloc(0),s=!1,o=null,a=Buffer.alloc(0),l=Buffer.alloc(0),u=!0;let f=e,g=typeof f.decoder=="object"?f.decoder:N.decoder;u=g.hasOwnProperty("efs")?g.efs:!1;function b(){return!t||!(t instanceof Uint8Array)?Buffer.alloc(0):(l=n.loadLocalHeaderFromBinary(t),t.slice(n.realDataOffset,n.realDataOffset+n.compressedSize))}function S(c){let y=n.flags_desc||n.localHeader.flags_desc?n.crc:n.localHeader.crc;return N.crc32(c)===y}function m(c,y,w){if(typeof y>"u"&&typeof c=="string"&&(w=c,c=void 0),s)return c&&y&&y(Buffer.alloc(0),N.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var T=b();if(T.length===0)return c&&y&&y(T),T;if(n.encrypted){if(typeof w!="string"&&!Buffer.isBuffer(w))throw N.Errors.INVALID_PASS_PARAM();T=Ft.ZipCrypto.decrypt(T,n,w)}var P;switch(n.method){case N.Constants.STORED:if(P=Buffer.alloc(T.length),T.copy(P),S(P))return c&&y&&y(P),P;throw c&&y&&y(P,N.Errors.BAD_CRC()),N.Errors.BAD_CRC();case N.Constants.DEFLATED:var x=new Ft.Inflater(T,n.size);if(c)x.inflateAsync(function(v){y&&(S(v)?y(v):y(v,N.Errors.BAD_CRC()))});else{if(P=x.inflate(),!S(P))throw N.Errors.BAD_CRC(`"${g.decode(r)}"`);return P}break;default:throw c&&y&&y(Buffer.alloc(0),N.Errors.UNKNOWN_METHOD()),N.Errors.UNKNOWN_METHOD()}}function d(c,y){if((!o||!o.length)&&Buffer.isBuffer(t))return c&&y&&y(b()),b();if(o.length&&!s){var w;switch(n.method){case N.Constants.STORED:return n.compressedSize=n.size,w=Buffer.alloc(o.length),o.copy(w),c&&y&&y(w),w;default:case N.Constants.DEFLATED:var T=new Ft.Deflater(o);if(c)T.deflateAsync(function(x){w=Buffer.alloc(x.length),n.compressedSize=x.length,x.copy(w),y&&y(w)});else{var P=T.deflate();return n.compressedSize=P.length,P}T=null;break}}else if(c&&y)y(Buffer.alloc(0));else return Buffer.alloc(0)}function p(c,y){return N.readBigUInt64LE(c,y)}function h(c){try{for(var y=0,w,T,P;y+4<c.length;)w=c.readUInt16LE(y),y+=2,T=c.readUInt16LE(y),y+=2,P=c.slice(y,y+T),y+=T,K.ID_ZIP64===w&&E(P)}catch{throw N.Errors.EXTRA_FIELD_PARSE_ERROR()}}function E(c){var y,w,T,P;c.length>=K.EF_ZIP64_SCOMP&&(y=p(c,K.EF_ZIP64_SUNCOMP),n.size===K.EF_ZIP64_OR_32&&(n.size=y)),c.length>=K.EF_ZIP64_RHO&&(w=p(c,K.EF_ZIP64_SCOMP),n.compressedSize===K.EF_ZIP64_OR_32&&(n.compressedSize=w)),c.length>=K.EF_ZIP64_DSN&&(T=p(c,K.EF_ZIP64_RHO),n.offset===K.EF_ZIP64_OR_32&&(n.offset=T)),c.length>=K.EF_ZIP64_DSN+4&&(P=c.readUInt32LE(K.EF_ZIP64_DSN),n.diskNumStart===K.EF_ZIP64_OR_16&&(n.diskNumStart=P))}return{get entryName(){return g.decode(r)},get rawEntryName(){return r},set entryName(c){r=N.toBuffer(c,g.encode);var y=r[r.length-1];s=y===47||y===92,n.fileNameLength=r.length},get efs(){return typeof u=="function"?u(this.entryName):u},get extra(){return a},set extra(c){a=c,n.extraLength=c.length,h(c)},get comment(){return g.decode(i)},set comment(c){if(i=N.toBuffer(c,g.encode),n.commentLength=i.length,i.length>65535)throw N.Errors.COMMENT_TOO_LONG()},get name(){let c=g.decode(r);return s?c.replace(/[/\\]$/,"").split("/").pop():c.split("/").pop()},get isDirectory(){return s},getCompressedData:function(){return d(!1,null)},getCompressedDataAsync:function(c){d(!0,c)},setData:function(c){o=N.toBuffer(c,N.decoder.encode),!s&&o.length?(n.size=o.length,n.method=N.Constants.DEFLATED,n.crc=N.crc32(c),n.changed=!0):n.method=N.Constants.STORED},getData:function(c){return n.changed?o:m(!1,null,c)},getDataAsync:function(c,y){n.changed?c(o):m(!0,c,y)},set attr(c){n.attr=c},get attr(){return n.attr},set header(c){n.loadFromBinary(c)},get header(){return n},packCentralHeader:function(){n.flags_efs=this.efs,n.extraLength=a.length;var c=n.centralHeaderToBinary(),y=N.Constants.CENHDR;return r.copy(c,y),y+=r.length,a.copy(c,y),y+=n.extraLength,i.copy(c,y),c},packLocalHeader:function(){let c=0;n.flags_efs=this.efs,n.extraLocalLength=l.length;let y=n.localHeaderToBinary(),w=Buffer.alloc(y.length+r.length+n.extraLocalLength);return y.copy(w,c),c+=y.length,r.copy(w,c),c+=r.length,l.copy(w,c),c+=l.length,w},toJSON:function(){let c=function(y){return"<"+(y&&y.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:n.toJSON(),compressedData:c(t),data:c(o)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var Kn=F((Ra,Zn)=>{var Gn=Rt(),so=vt(),q=Ie();Zn.exports=function(e,t){var n=[],r=Object.create(null),i=Buffer.alloc(0),s=new so.MainHeader,o=!1,a=null;let l=new Set,u=t,{noSort:f,decoder:g}=u;e?m(u.readEntries):o=!0;function b(){let p=new Set;for(let h of Object.keys(r)){let E=h.split("/");if(E.pop(),!!E.length)for(let c=0;c<E.length;c++){let y=E.slice(0,c+1).join("/")+"/";p.add(y)}}for(let h of p)if(!(h in r)){let E=new Gn(u);E.entryName=h,E.attr=16,E.temporary=!0,n.push(E),r[E.entryName]=E,l.add(E)}}function S(){if(o=!0,r=Object.create(null),s.diskEntries>(e.length-s.offset)/q.Constants.CENHDR)throw q.Errors.DISK_ENTRY_TOO_LARGE();n=new Array(s.diskEntries);for(var p=s.offset,h=0;h<n.length;h++){var E=p,c=new Gn(u,e);c.header=e.slice(E,E+=q.Constants.CENHDR),c.entryName=e.slice(E,E+=c.header.fileNameLength),c.header.extraLength&&(c.extra=e.slice(E,E+=c.header.extraLength)),c.header.commentLength&&(c.comment=e.slice(E,E+c.header.commentLength)),p+=c.header.centralHeaderSize,n[h]=c,r[c.entryName]=c}l.clear(),b()}function m(p){var h=e.length-q.Constants.ENDHDR,E=Math.max(0,h-65535),c=E,y=e.length,w=-1,T=0;for(typeof u.trailingSpace=="boolean"&&u.trailingSpace&&(E=0),h;h>=c;h--)if(e[h]===80){if(e.readUInt32LE(h)===q.Constants.ENDSIG){w=h,T=h,y=h+q.Constants.ENDHDR,c=h-q.Constants.END64HDR;continue}if(e.readUInt32LE(h)===q.Constants.END64SIG){c=E;continue}if(e.readUInt32LE(h)===q.Constants.ZIP64SIG){w=h,y=h+q.readBigUInt64LE(e,h+q.Constants.ZIP64SIZE)+q.Constants.ZIP64LEAD;break}}if(w==-1)throw q.Errors.INVALID_FORMAT();s.loadFromBinary(e.slice(w,y)),s.commentLength&&(i=e.slice(T+q.Constants.ENDHDR)),p&&S()}function d(){n.length>1&&!f&&(n=n.map(p=>({entry:p,key:p.entryName.toLowerCase()})).sort((p,h)=>p.key.localeCompare(h.key)).map(p=>p.entry))}return{get entries(){return o||S(),n.filter(p=>!l.has(p))},get comment(){return g.decode(i)},set comment(p){i=q.toBuffer(p,g.encode),s.commentLength=i.length},getEntryCount:function(){return o?n.length:s.diskEntries},forEach:function(p){this.entries.forEach(p)},getEntry:function(p){return o||S(),r[p]||null},setEntry:function(p){o||S(),n.push(p),r[p.entryName]=p,s.totalEntries=n.length},deleteFile:function(p,h=!0){o||S();let E=r[p];this.getEntryChildren(E,h).map(y=>y.entryName).forEach(this.deleteEntry)},deleteEntry:function(p){o||S();let h=r[p],E=n.indexOf(h);E>=0&&(n.splice(E,1),delete r[p],s.totalEntries=n.length)},getEntryChildren:function(p,h=!0){if(o||S(),typeof p=="object")if(p.isDirectory&&h){let E=[],c=p.entryName;for(let y of n)y.entryName.startsWith(c)&&E.push(y);return E}else return[p];return[]},getChildCount:function(p){if(p&&p.isDirectory){let h=this.getEntryChildren(p);return h.includes(p)?h.length-1:h.length}return 0},compressToBuffer:function(){o||S(),d();let p=[],h=[],E=0,c=0;s.size=0,s.offset=0;let y=0;for(let P of this.entries){let x=P.getCompressedData();P.header.offset=c;let v=P.packLocalHeader(),R=v.length+x.length;c+=R,p.push(v),p.push(x);let L=P.packCentralHeader();h.push(L),s.size+=L.length,E+=R+L.length,y++}E+=s.mainHeaderSize,s.offset=c,s.totalEntries=y,c=0;let w=Buffer.alloc(E);for(let P of p)P.copy(w,c),c+=P.length;for(let P of h)P.copy(w,c),c+=P.length;let T=s.toBinary();return i&&i.copy(T,T.length-i.length),T.copy(w,c),e=w,o=!1,w},toAsyncBuffer:function(p,h,E,c){try{o||S(),d();let y=[],w=[],T=0,P=0,x=0;s.size=0,s.offset=0;let v=function(R){if(R.length>0){let L=R.shift(),V=L.entryName+L.extra.toString();E&&E(V),L.getCompressedDataAsync(function(W){c&&c(V),L.header.offset=P;let he=L.packLocalHeader(),We=he.length+W.length;P+=We,y.push(he),y.push(W);let Ne=L.packCentralHeader();w.push(Ne),s.size+=Ne.length,T+=We+Ne.length,x++,v(R)})}else{T+=s.mainHeaderSize,s.offset=P,s.totalEntries=x,P=0;let L=Buffer.alloc(T);y.forEach(function(W){W.copy(L,P),P+=W.length}),w.forEach(function(W){W.copy(L,P),P+=W.length});let V=s.toBinary();i&&i.copy(V,V.length-i.length),V.copy(L,P),e=L,o=!1,p(L)}};v(Array.from(this.entries))}catch(y){h(y)}}}}});var Lt=F((La,Jn)=>{var B=Ie(),M=require("path"),ao=Rt(),co=Kn(),ye=(...e)=>B.findLast(e,t=>typeof t=="boolean"),Yn=(...e)=>B.findLast(e,t=>typeof t=="string"),lo=(...e)=>B.findLast(e,t=>typeof t=="function"),uo={noSort:!1,readEntries:!1,method:B.Constants.NONE,fs:null};Jn.exports=function(e,t){let n=null,r=Object.assign(Object.create(null),uo);e&&typeof e=="object"&&(e instanceof Uint8Array||(Object.assign(r,e),e=r.input?r.input:void 0,r.input&&delete r.input),Buffer.isBuffer(e)&&(n=e,r.method=B.Constants.BUFFER,e=void 0)),Object.assign(r,t);let i=new B(r),s=m=>{m.filter(d=>d.attr).sort((d,p)=>p.path.length-d.path.length).forEach(d=>i.fs.chmodSync(d.path,d.attr))};if((typeof r.decoder!="object"||typeof r.decoder.encode!="function"||typeof r.decoder.decode!="function")&&(r.decoder=B.decoder),e&&typeof e=="string")if(i.fs.existsSync(e))r.method=B.Constants.FILE,r.filename=e,n=i.fs.readFileSync(e);else throw B.Errors.INVALID_FILENAME();let o=new co(n,r),{canonical:a,sanitize:l,zipnamefix:u}=B;function f(m){if(m&&o){var d;if(typeof m=="string"&&(d=o.getEntry(M.posix.normalize(m))),typeof m=="object"&&typeof m.entryName<"u"&&typeof m.header<"u"&&(d=o.getEntry(m.entryName)),d)return d}return null}function g(m){let{join:d,normalize:p,sep:h}=M.posix;return d(M.isAbsolute(m)?"/":".",p(h+m.split("\\").join(h)+h))}function b(m){return m instanceof RegExp?(function(d){return function(p){return d.test(p)}})(m):typeof m!="function"?()=>!0:m}let S=(m,d)=>{let p=d.slice(-1);return p=p===i.sep?i.sep:"",M.relative(m,d)+p};return{readFile:function(m,d){var p=f(m);return p&&p.getData(d)||null},childCount:function(m){let d=f(m);if(d)return o.getChildCount(d)},readFileAsync:function(m,d){var p=f(m);p?p.getDataAsync(d):d(null,"getEntry failed for:"+m)},readAsText:function(m,d){var p=f(m);if(p){var h=p.getData();if(h&&h.length)return h.toString(d||"utf8")}return""},readAsTextAsync:function(m,d,p){var h=f(m);h?h.getDataAsync(function(E,c){if(c){d(E,c);return}E&&E.length?d(E.toString(p||"utf8")):d("")}):d("")},deleteFile:function(m,d=!0){var p=f(m);p&&o.deleteFile(p.entryName,d)},deleteEntry:function(m){var d=f(m);d&&o.deleteEntry(d.entryName)},addZipComment:function(m){o.comment=m},getZipComment:function(){return o.comment||""},addZipEntryComment:function(m,d){var p=f(m);p&&(p.comment=d)},getZipEntryComment:function(m){var d=f(m);return d&&d.comment||""},updateFile:function(m,d){var p=f(m);p&&p.setData(d)},addLocalFile:function(m,d,p,h){if(i.fs.existsSync(m)){d=d?g(d):"";let E=M.win32.basename(M.win32.normalize(m));d+=p||E;let c=i.fs.statSync(m),y=c.isFile()?i.fs.readFileSync(m):Buffer.alloc(0);c.isDirectory()&&(d+=i.sep),this.addFile(d,y,h,c)}else throw B.Errors.FILE_NOT_FOUND(m)},addLocalFileAsync:function(m,d){m=typeof m=="object"?m:{localPath:m};let p=M.resolve(m.localPath),{comment:h}=m,{zipPath:E,zipName:c}=m,y=this;i.fs.stat(p,function(w,T){if(w)return d(w,!1);E=E?g(E):"";let P=M.win32.basename(M.win32.normalize(p));if(E+=c||P,T.isFile())i.fs.readFile(p,function(x,v){return x?d(x,!1):(y.addFile(E,v,h,T),setImmediate(d,void 0,!0))});else if(T.isDirectory())return E+=i.sep,y.addFile(E,Buffer.alloc(0),h,T),setImmediate(d,void 0,!0)})},addLocalFolder:function(m,d,p){if(p=b(p),d=d?g(d):"",m=M.normalize(m),i.fs.existsSync(m)){let h=i.findFiles(m),E=this;if(h.length)for(let c of h){let y=M.join(d,S(m,c));p(y)&&E.addLocalFile(c,M.dirname(y))}}else throw B.Errors.FILE_NOT_FOUND(m)},addLocalFolderAsync:function(m,d,p,h){h=b(h),p=p?g(p):"",m=M.normalize(m);var E=this;i.fs.open(m,"r",function(c){if(c&&c.code==="ENOENT")d(void 0,B.Errors.FILE_NOT_FOUND(m));else if(c)d(void 0,c);else{var y=i.findFiles(m),w=-1,T=function(){if(w+=1,w<y.length){var P=y[w],x=S(m,P).split("\\").join("/");x=x.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),h(x)?i.fs.stat(P,function(v,R){v&&d(void 0,v),R.isFile()?i.fs.readFile(P,function(L,V){L?d(void 0,L):(E.addFile(p+x,V,"",R),T())}):(E.addFile(p+x+"/",Buffer.alloc(0),"",R),T())}):process.nextTick(()=>{T()})}else d(!0,void 0)};T()}})},addLocalFolderAsync2:function(m,d){let p=this;m=typeof m=="object"?m:{localPath:m};let h=M.resolve(g(m.localPath)),{zipPath:E,filter:c,namefix:y}=m;c instanceof RegExp?c=(function(P){return function(x){return P.test(x)}})(c):typeof c!="function"&&(c=function(){return!0}),E=E?g(E):"",y==="latin1"&&(y=P=>P.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")),typeof y!="function"&&(y=P=>P);let w=P=>M.join(E,y(S(h,P))),T=P=>M.win32.basename(M.win32.normalize(y(P)));i.fs.open(h,"r",function(P){P&&P.code==="ENOENT"?d(void 0,B.Errors.FILE_NOT_FOUND(h)):P?d(void 0,P):i.findFilesAsync(h,function(x,v){if(x)return d(x);v=v.filter(R=>c(w(R))),v.length||d(void 0,!1),setImmediate(v.reverse().reduce(function(R,L){return function(V,W){if(V||W===!1)return setImmediate(R,V,!1);p.addLocalFileAsync({localPath:L,zipPath:M.dirname(w(L)),zipName:T(L)},R)}},d))})})},addLocalFolderPromise:function(m,d){return new Promise((p,h)=>{this.addLocalFolderAsync2(Object.assign({localPath:m},d),(E,c)=>{E&&h(E),c&&p(this)})})},addFile:function(m,d,p,h){m=u(m);let E=f(m),c=E!=null;c||(E=new ao(r),E.entryName=m),E.comment=p||"";let y=typeof h=="object"&&h instanceof i.fs.Stats;y&&(E.header.time=h.mtime);var w=E.isDirectory?16:0;let T=E.isDirectory?16384:32768;return y?T|=4095&h.mode:typeof h=="number"?T|=4095&h:T|=E.isDirectory?493:420,w=(w|T<<16)>>>0,E.attr=w,E.setData(d),c||o.setEntry(E),E},getEntries:function(m){return o.password=m,o?o.entries:[]},getEntry:function(m){return f(m)},getEntryCount:function(){return o.getEntryCount()},forEach:function(m){return o.forEach(m)},extractEntryTo:function(m,d,p,h,E,c){h=ye(!1,h),E=ye(!1,E),p=ye(!0,p),c=Yn(E,c);var y=f(m);if(!y)throw B.Errors.NO_ENTRY();var w=a(y.entryName),T=l(d,c&&!y.isDirectory?a(c):p?w:M.basename(w));if(y.isDirectory){var P=o.getEntryChildren(y);return P.forEach(function(R){if(R.isDirectory)return;var L=R.getData();if(!L)throw B.Errors.CANT_EXTRACT_FILE();var V=a(p?R.entryName:R.entryName.substring(y.entryName.length)),W=l(d,V);let he=E?R.header.fileAttr:void 0;i.writeFileTo(W,L,h,he)}),!0}var x=y.getData(o.password);if(!x)throw B.Errors.CANT_EXTRACT_FILE();if(i.fs.existsSync(T)&&!h)throw B.Errors.CANT_OVERRIDE();let v=E?m.header.fileAttr:void 0;return i.writeFileTo(T,x,h,v),!0},test:function(m){if(!o)return!1;for(var d of o.entries)try{if(d.isDirectory)continue;var p=d.getData(m);if(!p)return!1}catch{return!1}return!0},extractAllTo:function(m,d,p,h){if(p=ye(!1,p),h=Yn(p,h),d=ye(!1,d),!o)throw B.Errors.NO_ZIP();let E=[];o.entries.forEach(function(c){var y=l(m,a(c.entryName));if(c.isDirectory){i.makeDir(y),p&&E.push({path:y,attr:c.header.fileAttr});return}var w=c.getData(h);if(!w)throw B.Errors.CANT_EXTRACT_FILE();let T=p?c.header.fileAttr:void 0;i.writeFileTo(y,w,d,T);try{i.fs.utimesSync(y,c.header.time,c.header.time)}catch{}}),s(E)},extractAllToAsync:function(m,d,p,h){if(h=lo(d,p,h),p=ye(!1,p),d=ye(!1,d),!h)return new Promise((x,v)=>{this.extractAllToAsync(m,d,p,function(R){R?v(R):x(this)})});if(!o){h(B.Errors.NO_ZIP());return}m=M.resolve(m);let E=x=>l(m,M.normalize(a(x.entryName))),c=(x,v)=>new Error(x+': "'+v+'"'),y=[],w=[];o.entries.forEach(x=>{x.isDirectory?y.push(x):w.push(x)});let T=[];for(let x of y){let v=E(x),R=p?x.header.fileAttr:void 0;try{i.makeDir(v)}catch{h(c("Unable to create folder",v));continue}R&&T.push({path:v,attr:R});try{i.fs.utimesSync(v,x.header.time,x.header.time)}catch{}}let P=x=>{if(!x)try{s(T)}catch(v){return h(c("Unable to set folder permissions",v.path||""))}h(x)};w.reverse().reduce(function(x,v){return function(R){if(R)x(R);else{let L=M.normalize(a(v.entryName)),V=l(m,L);v.getDataAsync(function(W,he){if(he)x(he);else if(!W)x(B.Errors.CANT_EXTRACT_FILE());else{let We=p?v.header.fileAttr:void 0;i.writeFileToAsync(V,W,d,We,function(Ne){if(!Ne)return x(c("Unable to write file",V));i.fs.utimes(V,v.header.time,v.header.time,function(){x()})})}})}}},P)()},writeZip:function(m,d){if(arguments.length===1&&typeof m=="function"&&(d=m,m=""),!m&&r.filename&&(m=r.filename),!!m){var p=o.compressToBuffer();if(p){var h=i.writeFileTo(m,p,!0);typeof d=="function"&&d(h?null:new Error("failed"),"")}}},writeZipPromise:function(m,d){let{overwrite:p,perm:h}=Object.assign({overwrite:!0},d);return new Promise((E,c)=>{!m&&r.filename&&(m=r.filename),m||c("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(y=>{let w=T=>T?E(T):c("ADM-ZIP: Wasn't able to write zip file");i.writeFileToAsync(m,y,p,h,w)},c)})},toBufferPromise:function(){return new Promise((m,d)=>{o.toAsyncBuffer(m,d)})},toBuffer:function(m,d,p,h){return typeof m=="function"?(o.toAsyncBuffer(m,d,p,h),null):o.compressToBuffer()}}}});var Gr=F(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0})});var ht=F(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.DEFAULT_PROJECT_FONT_IDS=ee.DENEB_GOOGLE_FONT_COUNT=ee.DENEB_FONT_BY_ID=ee.DENEB_FONT_REGISTRY=void 0;var gt=[400,500,600,700],Ss=[400,700],nn=[400,500,600,700];function A(e,t,n,r,i,s){let o=t;return{id:e,label:t,category:n,family:o,cssStack:s?.cssStack??`'${o}', ${n==="serif"||n==="slab-serif"?"Georgia, serif":n==="monospace"?"ui-monospace, monospace":"system-ui, sans-serif"}`,fontsourcePackage:r,googleQuery:i,googleFonts:!0,weights:s?.weights??gt,italic:s?.italic,variable:s?.variable}}ee.DENEB_FONT_REGISTRY=[A("inter","Inter","sans-serif","inter","Inter",{variable:!0}),A("roboto","Roboto","sans-serif","roboto","Roboto"),A("open-sans","Open Sans","sans-serif","open-sans","Open+Sans",{variable:!0}),A("lato","Lato","sans-serif","lato","Lato",{italic:!0}),A("montserrat","Montserrat","sans-serif","montserrat","Montserrat",{variable:!0}),A("poppins","Poppins","sans-serif","poppins","Poppins"),A("nunito","Nunito","sans-serif","nunito","Nunito",{variable:!0}),A("raleway","Raleway","sans-serif","raleway","Raleway",{variable:!0}),A("dm-sans","DM Sans","sans-serif","dm-sans","DM+Sans",{variable:!0}),A("work-sans","Work Sans","sans-serif","work-sans","Work+Sans",{variable:!0}),A("fira-sans","Fira Sans","sans-serif","fira-sans","Fira+Sans"),A("manrope","Manrope","sans-serif","manrope","Manrope",{variable:!0}),A("oswald","Oswald","sans-serif","oswald","Oswald",{weights:[400,500,600,700]}),A("source-sans-3","Source Sans 3","sans-serif","source-sans-3","Source+Sans+3",{variable:!0}),A("quicksand","Quicksand","sans-serif","quicksand","Quicksand",{variable:!0}),A("plus-jakarta-sans","Plus Jakarta Sans","sans-serif","plus-jakarta-sans","Plus+Jakarta+Sans",{variable:!0}),{id:"satoshi",label:"Satoshi",category:"sans-serif",family:"Space Grotesk",cssStack:"'Space Grotesk', system-ui, sans-serif",fontsourcePackage:null,googleQuery:null,googleFonts:!1,weights:gt,substituteId:"space-grotesk"},A("space-grotesk","Space Grotesk","sans-serif","space-grotesk","Space+Grotesk",{variable:!0}),A("figtree","Figtree","sans-serif","figtree","Figtree",{variable:!0}),A("urbanist","Urbanist","sans-serif","urbanist","Urbanist",{variable:!0}),A("outfit","Outfit","sans-serif","outfit","Outfit",{variable:!0}),{id:"general-sans",label:"General Sans",category:"sans-serif",family:"Figtree",cssStack:"'Figtree', system-ui, sans-serif",fontsourcePackage:null,googleQuery:null,googleFonts:!1,weights:gt,substituteId:"figtree"},A("mulish","Mulish","sans-serif","mulish","Mulish",{variable:!0}),A("barlow","Barlow","sans-serif","barlow","Barlow"),A("rubik","Rubik","sans-serif","rubik","Rubik",{variable:!0}),A("geist","Geist","sans-serif","geist-sans","Geist",{variable:!0}),A("merriweather","Merriweather","serif","merriweather","Merriweather"),A("playfair-display","Playfair Display","serif","playfair-display","Playfair+Display"),A("lora","Lora","serif","lora","Lora",{variable:!0}),A("pt-serif","PT Serif","serif","pt-serif","PT+Serif"),A("eb-garamond","EB Garamond","serif","eb-garamond","EB+Garamond",{variable:!0}),A("libre-baskerville","Libre Baskerville","serif","libre-baskerville","Libre+Baskerville"),A("crimson-text","Crimson Text","serif","crimson-text","Crimson+Text"),A("cormorant-garamond","Cormorant Garamond","serif","cormorant-garamond","Cormorant+Garamond"),A("frank-ruhl-libre","Frank Ruhl Libre","serif","frank-ruhl-libre","Frank+Ruhl+Libre"),A("taviraj","Taviraj","serif","taviraj","Taviraj"),A("arapey","Arapey","serif","arapey","Arapey",{weights:[400],italic:!0}),A("caladea","Caladea","serif","caladea","Caladea"),A("roboto-slab","Roboto Slab","slab-serif","roboto-slab","Roboto+Slab",{variable:!0}),A("zilla-slab","Zilla Slab","slab-serif","zilla-slab","Zilla+Slab"),A("aleo","Aleo","slab-serif","aleo","Aleo",{variable:!0}),A("arvo","Arvo","slab-serif","arvo","Arvo"),A("bitter","Bitter","slab-serif","bitter","Bitter",{variable:!0}),A("enriqueta","Enriqueta","slab-serif","enriqueta","Enriqueta"),A("fira-code","Fira Code","monospace","fira-code","Fira+Code",{weights:nn,variable:!0}),A("roboto-mono","Roboto Mono","monospace","roboto-mono","Roboto+Mono",{weights:nn,variable:!0}),A("jetbrains-mono","JetBrains Mono","monospace","jetbrains-mono","JetBrains+Mono",{weights:nn,variable:!0}),A("space-mono","Space Mono","monospace","space-mono","Space+Mono",{weights:[400,700],italic:!0}),A("bebas-neue","Bebas Neue","display","bebas-neue","Bebas+Neue",{weights:[400]}),A("fraunces","Fraunces","display","fraunces","Fraunces",{variable:!0}),A("cinzel","Cinzel","display","cinzel","Cinzel",{weights:Ss}),A("paytone-one","Paytone One","display","paytone-one","Paytone+One",{weights:[400]}),A("righteous","Righteous","display","righteous","Righteous",{weights:[400]}),A("abril-fatface","Abril Fatface","display","abril-fatface","Abril+Fatface",{weights:[400]}),{id:"system-sans",label:"System Sans",category:"system",family:"system-ui",cssStack:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontsourcePackage:null,googleQuery:null,googleFonts:!1,weights:[]},{id:"editorial-serif",label:"Editorial Serif",category:"serif",family:"Playfair Display",cssStack:"'Playfair Display', Georgia, serif",fontsourcePackage:"playfair-display",googleQuery:"Playfair+Display",googleFonts:!0,weights:gt,substituteId:"playfair-display"}];ee.DENEB_FONT_BY_ID=new Map(ee.DENEB_FONT_REGISTRY.map(e=>[e.id,e]));ee.DENEB_GOOGLE_FONT_COUNT=ee.DENEB_FONT_REGISTRY.filter(e=>e.googleFonts&&e.fontsourcePackage).length;ee.DEFAULT_PROJECT_FONT_IDS=["inter","plus-jakarta-sans","playfair-display"]});var ke=F(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.normalizeFontId=Ce;me.lookupFontDefinition=Me;me.resolveInstallableFont=Ts;me.resolveFontFamily=ws;me.listFontsByCategory=Ps;me.collectFontIdsFromSiteData=Is;var yt=ht();function Ce(e){return e.trim().toLowerCase().replace(/['"]/g,"").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}function Me(e){if(!e||!e.trim())return null;let t=Ce(e),n=yt.DENEB_FONT_BY_ID.get(t);if(n)return n;for(let i of yt.DENEB_FONT_REGISTRY)if(Ce(i.label)===t||Ce(i.family)===t)return i;let r=e.split(",")[0]?.trim().replace(/^['"]|['"]$/g,"");if(r){let i=Ce(r);if(i&&i!==t)return Me(r)}return null}function Ts(e){let t=Me(e);return t?t.fontsourcePackage?t:t.substituteId?yt.DENEB_FONT_BY_ID.get(t.substituteId)??null:null:null}function ws(e){if(!e||!e.trim())return;let t=Me(e);return t?t.cssStack:e.includes(",")?e:`'${e.trim()}', system-ui, sans-serif`}function Ps(){var e;let t={};for(let n of yt.DENEB_FONT_REGISTRY)t[e=n.category]??(t[e]=[]),t[n.category].push(n);return t}function Is(e){let t=new Set,n=l=>{if(typeof l!="string"||!l.trim())return;let u=Me(l);if(u){t.add(u.id),u.substituteId&&t.add(u.substituteId);return}let f=Ce(l);f&&t.add(f)};if(!e||typeof e!="object")return[];let r=e,i=r.theme??r.template?.structure?.theme;n(i?.headingFont),n(i?.bodyFont);let s=r.styles;if(s&&typeof s=="object"&&!Array.isArray(s))for(let l of Object.values(s))l&&typeof l=="object"&&!Array.isArray(l)&&n(l.fontFamily);let o=new WeakSet,a=l=>{if(!(!l||typeof l!="object")&&!o.has(l)){if(o.add(l),Array.isArray(l)){l.forEach(a);return}for(let[u,f]of Object.entries(l))u.endsWith("Style")&&f&&typeof f=="object"&&n(f.fontFamily),a(f)}};return a(r.content),t.delete("system-sans"),Array.from(t)}});var rn=F(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.formatResponsiveFontSize=Zr;Et.formatFontSize=xs;function Zr(e){if(e==null||e==="")return;let t;if(typeof e=="number")t=e;else if(/^\d+(\.\d+)?px$/i.test(e.trim()))t=parseFloat(e);else if(/^\d+(\.\d+)?rem$/i.test(e.trim()))t=parseFloat(e)*16;else if(/^\d+$/.test(e.trim()))t=parseFloat(e);else return e;if(!Number.isFinite(t)||t<=0)return;let n=t/16,r=Math.max(n*.72,.75),i=n*1.15,s=Math.min(Math.max(n*.08,.5),3.5);return`clamp(${r.toFixed(3)}rem, ${(n*.55).toFixed(3)}rem + ${s.toFixed(2)}vw, ${i.toFixed(3)}rem)`}function xs(e,t){if(!(e==null||e==="")){if(t?.responsive){let n=Zr(e);if(n)return n}return typeof e=="number"?`${e}px`:/^\d+$/.test(e)?`${e}px`:e}}});var Yr=F(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.buildGoogleFontsStylesheetUrl=As;var Kr=ht(),Cs=ke();function ks(e){if(!e.googleQuery)return null;let t=e.weights.length>0?e.weights:[400],n=Array.from(new Set(t)).sort((r,i)=>r-i);if(e.italic){let r=n.flatMap(i=>[`0,${i}`,`1,${i}`]);return`family=${e.googleQuery}:ital,wght@${r.join(";")}`}if(e.variable||n.length>4){let r=n[0],i=n[n.length-1];return`family=${e.googleQuery}:wght@${r}..${i}`}return`family=${e.googleQuery}:wght@${n.join(";")}`}function As(e){let t=[],n=new Set;for(let r of e){let i=Kr.DENEB_FONT_BY_ID.get(r)??(0,Cs.lookupFontDefinition)(r);if(!i||!i.googleFonts||!i.googleQuery)continue;let s=i.substituteId&&!i.fontsourcePackage?i.substituteId:i.id,o=Kr.DENEB_FONT_BY_ID.get(s)??i;if(n.has(o.id))continue;n.add(o.id);let a=ks(o);a&&t.push(a)}return t.length===0?null:`https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`}});var Jr=F(re=>{"use strict";var _s=re&&re.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Be=re&&re.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_s(t,e,n)};Object.defineProperty(re,"__esModule",{value:!0});Be(Gr(),re);Be(ht(),re);Be(ke(),re);Be(rn(),re);Be(Yr(),re)});var Qr=F(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0})});var ei=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.DENEB_STYLE_PATCH_MESSAGE=se.STYLE_PATCH_MESSAGE=void 0;se.isStylePatchPayload=vs;se.STYLE_PATCH_MESSAGE="FIVORA_PREVIEW_STYLE_PATCH";se.DENEB_STYLE_PATCH_MESSAGE="DENEB_PREVIEW_STYLE_PATCH";function vs(e){if(!e||typeof e!="object")return!1;let t=e,n=t.type;return n!==se.STYLE_PATCH_MESSAGE&&n!==se.DENEB_STYLE_PATCH_MESSAGE?!1:typeof t.targetPath=="string"&&typeof t.styleType=="string"&&typeof t.properties=="object"&&t.properties!==null}});var sn=F(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.PREVIEW_LIST_ATTRIBUTE=O.PREVIEW_ITEM_ATTRIBUTE=O.PREVIEW_FIELD_ATTRIBUTE=O.STYLE_TYPE_ATTRIBUTE=O.STYLE_TARGET_ATTRIBUTE=void 0;O.buildStyleTargetSelector=ti;O.buildStyleFallbackSelectors=Fs;O.STYLE_TARGET_ATTRIBUTE="data-preview-style-target";O.STYLE_TYPE_ATTRIBUTE="data-preview-style-type";O.PREVIEW_FIELD_ATTRIBUTE="data-preview-field-path";O.PREVIEW_ITEM_ATTRIBUTE="data-preview-item-path";O.PREVIEW_LIST_ATTRIBUTE="data-preview-list-path";function ae(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function ti(e){return`[${O.STYLE_TARGET_ATTRIBUTE}="${ae(e)}"]`}function Fs(e,t){let n=[ti(e),`[${O.PREVIEW_FIELD_ATTRIBUTE}="${ae(e)}"]`,`[${O.PREVIEW_ITEM_ATTRIBUTE}="${ae(e)}"]`];if(t==="card"&&e.endsWith(".card")){let r=e.slice(0,-5);n.push(`[${O.PREVIEW_ITEM_ATTRIBUTE}="${ae(r)}"]`)}if(e.includes(":")){let[r,i]=e.split(":");i==="card"?n.push(`[${O.PREVIEW_LIST_ATTRIBUTE}="${ae(r)}"] [${O.PREVIEW_ITEM_ATTRIBUTE}]`,`[${O.PREVIEW_LIST_ATTRIBUTE}="${ae(r)}"] .card`,`[${O.PREVIEW_LIST_ATTRIBUTE}="${ae(r)}"] article`):i&&n.push(`[${O.PREVIEW_LIST_ATTRIBUTE}="${ae(r)}"] [${O.PREVIEW_FIELD_ATTRIBUTE}$=".${ae(i)}"]`)}return n}});var bt=F(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.resolveFontFamily=void 0;Ae.resolveShadowPreset=Ns;Ae.resolveThemeToken=Ds;var Rs=ke();Object.defineProperty(Ae,"resolveFontFamily",{enumerable:!0,get:function(){return Rs.resolveFontFamily}});var Ls={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)"};function Ns(e){if(e)return Ls[e]??e}function Ds(e){return e?e.startsWith("var(")?e:{primary:"var(--brand-color, #2563eb)",secondary:"var(--brand-secondary, #0f172a)",surface:"var(--surface-color, #ffffff)",background:"var(--page-bg, #f8fafc)",heading:"var(--heading-color, #0f172a)",muted:"var(--muted-color, #64748b)"}[e]??e:void 0}});var cn=F(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.formatUnit=D;ce.textStyleToCssVariables=ni;ce.cardStyleToCssVariables=ri;ce.buttonStyleToCssVariables=ii;ce.gridStyleToCssVariables=oi;ce.sectionStyleToCssVariables=si;ce.styleToCssVariables=Ms;var Os=rn(),$s=ke(),_e=bt();function D(e){if(!(e===void 0||e===""||e===null))return typeof e=="number"?`${e}px`:/^\d+$/.test(e)?`${e}px`:e}function an(e,t){let n={},r=e.marginTop??e.spacingTop,i=e.marginBottom??e.spacingBottom,s=e.marginLeft??e.spacingLeft,o=e.marginRight??e.spacingRight;return r!==void 0&&(n[`${t}-margin-top`]=D(r)),i!==void 0&&(n[`${t}-margin-bottom`]=D(i)),s!==void 0&&(n[`${t}-margin-left`]=D(s)),o!==void 0&&(n[`${t}-margin-right`]=D(o)),n}function ni(e){let t={...an(e,"--deneb")};return e.fontFamily&&(t["--deneb-font-family"]=(0,$s.resolveFontFamily)(e.fontFamily)),e.fontSize!==void 0&&(t["--deneb-font-size"]=(0,Os.formatFontSize)(e.fontSize,{responsive:e.responsiveFontSize===!0})),e.fontWeight!==void 0&&(t["--deneb-font-weight"]=String(e.fontWeight)),e.lineHeight!==void 0&&(t["--deneb-line-height"]=(typeof e.lineHeight=="number",String(e.lineHeight))),e.letterSpacing&&(t["--deneb-letter-spacing"]=e.letterSpacing),e.color&&(t["--deneb-color"]=(0,_e.resolveThemeToken)(e.color)),e.textAlign&&(t["--deneb-text-align"]=e.textAlign),e.textTransform&&(t["--deneb-text-transform"]=e.textTransform),t}function ri(e){let t={...an(e,"--deneb-card")};return e.width!==void 0&&(t["--deneb-card-width"]=D(e.width)),e.minWidth!==void 0&&(t["--deneb-card-min-width"]=D(e.minWidth)),e.maxWidth!==void 0&&(t["--deneb-card-max-width"]=D(e.maxWidth)),e.height!==void 0&&(t["--deneb-card-height"]=D(e.height)),e.aspectRatio&&(t["--deneb-card-aspect-ratio"]=e.aspectRatio),e.paddingTop!==void 0&&(t["--deneb-card-pt"]=D(e.paddingTop)),e.paddingBottom!==void 0&&(t["--deneb-card-pb"]=D(e.paddingBottom)),e.paddingLeft!==void 0&&(t["--deneb-card-pl"]=D(e.paddingLeft)),e.paddingRight!==void 0&&(t["--deneb-card-pr"]=D(e.paddingRight)),e.borderRadius!==void 0&&(t["--deneb-card-radius"]=D(e.borderRadius)),e.borderWidth!==void 0&&(t["--deneb-card-border-w"]=D(e.borderWidth)),e.borderStyle&&(t["--deneb-card-border-s"]=e.borderStyle),e.borderColor&&(t["--deneb-card-border-c"]=e.borderColor),e.backgroundColor&&(t["--deneb-card-bg"]=(0,_e.resolveThemeToken)(e.backgroundColor)),e.backgroundGradient&&(t["--deneb-card-bg-gradient"]=e.backgroundGradient),e.boxShadow&&(t["--deneb-card-shadow"]=(0,_e.resolveShadowPreset)(e.boxShadow)),e.backdropBlur!==void 0&&(t["--deneb-card-blur"]=D(e.backdropBlur)),e.gap!==void 0&&(t["--deneb-card-gap"]=D(e.gap)),t}function ii(e){let t={...an(e,"--deneb-btn")};return e.borderRadius!==void 0&&(t["--deneb-btn-radius"]=D(e.borderRadius)),e.paddingX!==void 0&&(t["--deneb-btn-px"]=D(e.paddingX)),e.paddingY!==void 0&&(t["--deneb-btn-py"]=D(e.paddingY)),e.backgroundColor&&(t["--deneb-btn-bg"]=(0,_e.resolveThemeToken)(e.backgroundColor)),e.textColor&&(t["--deneb-btn-color"]=(0,_e.resolveThemeToken)(e.textColor)),e.borderColor&&(t["--deneb-btn-border-c"]=e.borderColor),e.hoverBackgroundColor&&(t["--deneb-btn-hover-bg"]=e.hoverBackgroundColor),e.hoverTextColor&&(t["--deneb-btn-hover-color"]=e.hoverTextColor),t}function oi(e){let t={};return e.columns!==void 0&&(t["--deneb-grid-cols"]=String(e.columns)),e.minCardWidth&&(t["--deneb-grid-min-card"]=e.minCardWidth),e.gapX!==void 0&&(t["--deneb-grid-gap-x"]=D(e.gapX)),e.gapY!==void 0&&(t["--deneb-grid-gap-y"]=D(e.gapY)),e.equalHeight!==void 0&&(t["--deneb-grid-equal-height"]=e.equalHeight?"stretch":"start"),t}function si(e){let t={};return e.paddingTop!==void 0&&(t["--deneb-section-pt"]=D(e.paddingTop)),e.paddingBottom!==void 0&&(t["--deneb-section-pb"]=D(e.paddingBottom)),e.paddingX!==void 0&&(t["--deneb-section-px"]=D(e.paddingX)),e.maxWidth&&(t["--deneb-section-max-w"]=e.maxWidth),e.backgroundColor&&(t["--deneb-section-bg"]=(0,_e.resolveThemeToken)(e.backgroundColor)),e.backgroundImage&&(t["--deneb-section-bg-image"]=e.backgroundImage),e.backgroundOverlayColor&&(t["--deneb-section-overlay"]=e.backgroundOverlayColor),e.backgroundOverlayOpacity!==void 0&&(t["--deneb-section-overlay-opacity"]=String(e.backgroundOverlayOpacity)),e.textAlign&&(t["--deneb-section-align"]=e.textAlign),e.display&&(t["--deneb-section-display"]=e.display),e.order!==void 0&&e.order!==""&&(t["--deneb-section-order"]=String(e.order)),t}function Ms(e,t){switch(e){case"text":return ni(t);case"card":return ri(t);case"button":return ii(t);case"grid":return oi(t);case"section":return si(t);default:return{}}}});var dn=F(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.isPlainObject=ln;St.deepMerge=ai;function ln(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function ai(e,t,n=0,r=new WeakSet){if(n>50)return{...e,...t};if(r.has(t))return t;r.add(t);let i={...e};for(let[s,o]of Object.entries(t))ln(o)&&ln(i[s])?i[s]=ai(i[s],o,n+1,r):i[s]=o;return i}});var ui=F(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.getLiveStyleCache=Vs;we.applyCssVariablesToElement=li;we.findStyleTargetElement=Us;we.patchElementStyle=di;we.patchStyleByPath=zs;var je=sn(),Bs=dn(),le=cn(),js=ke(),ci=bt(),un=new Map;function Vs(){return un}function li(e,t){for(let[n,r]of Object.entries(t))r?e.style.setProperty(n,r):e.style.removeProperty(n)}function Us(e,t){if(typeof document>"u"||!e)return null;for(let n of(0,je.buildStyleFallbackSelectors)(e,t)){let r=document.querySelector(n);if(r)return r}return null}function di(e,t,n){let i=(e.getAttribute(je.STYLE_TARGET_ATTRIBUTE)??"")||e.getAttribute("data-preview-field-path")||"",s=i?un.get(i)??{}:{},o=(0,Bs.deepMerge)(s,n);i&&un.set(i,o);let a=(0,le.styleToCssVariables)(t,o);if(li(e,a),t==="text"){if(o.color){let l=(0,ci.resolveThemeToken)(String(o.color))||String(o.color);e.style.setProperty("color",l,"important")}if(o.textAlign&&e.style.setProperty("text-align",String(o.textAlign),"important"),o.fontSize!==void 0){let l=(0,le.formatUnit)(o.fontSize)||String(o.fontSize);e.style.setProperty("font-size",l,"important")}if(o.lineHeight!==void 0&&e.style.setProperty("line-height",String(o.lineHeight),"important"),o.fontFamily){let l=(0,js.resolveFontFamily)(String(o.fontFamily))||String(o.fontFamily);e.style.setProperty("font-family",l,"important")}if(o.fontWeight!==void 0&&e.style.setProperty("font-weight",String(o.fontWeight),"important"),o.marginTop!==void 0||o.spacingTop!==void 0){let l=(0,le.formatUnit)(o.marginTop??o.spacingTop);l&&e.style.setProperty("margin-top",l,"important")}if(o.marginBottom!==void 0||o.spacingBottom!==void 0){let l=(0,le.formatUnit)(o.marginBottom??o.spacingBottom);l&&e.style.setProperty("margin-bottom",l,"important")}if(o.marginLeft!==void 0||o.spacingLeft!==void 0){let l=(0,le.formatUnit)(o.marginLeft??o.spacingLeft);l&&e.style.setProperty("margin-left",l,"important")}if(o.marginRight!==void 0||o.spacingRight!==void 0){let l=(0,le.formatUnit)(o.marginRight??o.spacingRight);l&&e.style.setProperty("margin-right",l,"important")}}else if(t==="card"){if(o.backgroundColor){let l=(0,ci.resolveThemeToken)(String(o.backgroundColor))||String(o.backgroundColor);e.style.setProperty("background-color",l,"important"),e.style.setProperty("background",l,"important")}if(o.borderRadius!==void 0){let l=(0,le.formatUnit)(o.borderRadius)||String(o.borderRadius);e.style.setProperty("border-radius",l,"important")}if(o.padding!==void 0||o.paddingTop!==void 0){let l=(0,le.formatUnit)(o.padding??o.paddingTop);l&&e.style.setProperty("padding",l,"important")}if(o.boxShadow&&e.style.setProperty("box-shadow",String(o.boxShadow),"important"),o.borderColor&&e.style.setProperty("border-color",String(o.borderColor),"important"),o.borderWidth!==void 0){let l=(0,le.formatUnit)(o.borderWidth)||String(o.borderWidth);e.style.setProperty("border-width",l,"important"),e.style.setProperty("border-style","solid","important")}}e.getAttribute(je.STYLE_TYPE_ATTRIBUTE)||e.setAttribute(je.STYLE_TYPE_ATTRIBUTE,t)}function zs(e,t,n){if(typeof document>"u"||!e)return!1;let r=!1;for(let i of(0,je.buildStyleFallbackSelectors)(e,t)){let s=document.querySelectorAll(i);s.length>0&&(s.forEach(o=>di(o,t,n)),r=!0)}return r}});var fi=F(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.isValidStyleKind=Ws;Ve.validateStyleTree=qs;Ve.collectStyleTargetsFromHtml=Gs;var Hs=new Set(["text","card","button","grid","section"]);function Ws(e){return typeof e=="string"&&Hs.has(e)}function qs(e,t){let n=[];if(e==null)return n;if(typeof e!="object"||Array.isArray(e))return n.push({path:"styles",message:"styles must be an object"}),n;for(let[r,i]of Object.entries(e)){if(!r.trim()){n.push({path:"styles",message:"style path cannot be empty"});continue}if(typeof i!="object"||i===null||Array.isArray(i)){n.push({path:`styles.${r}`,message:"style entry must be an object"});continue}t&&!t.has(r)&&n.push({path:`styles.${r}`,message:"no matching data-preview-style-target marker in template"})}return n}function Gs(e){let t=new Set,n=/data-preview-style-target=["']([^"']+)["']/g,r;for(;(r=n.exec(e))!==null;)t.add(r[1]);return t}});var mi=F(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0})});var fn=F(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.isDarkColor=gi;ve.getAutoContrastTextColor=Zs;ve.toHexColor=Ks;ve.normalizeHexColor=Ys;function gi(e){if(typeof e!="string"||!e)return!1;let t=e.trim().toLowerCase();if(!/^#[0-9a-f]{3,6}$/i.test(t))return!1;let n=t.length===4?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t,r=Number.parseInt(n.slice(1,3),16),i=Number.parseInt(n.slice(3,5),16),s=Number.parseInt(n.slice(5,7),16);return(r*299+i*587+s*114)/1e3<130}function Zs(e,t="#ffffff",n="#0f172a"){return gi(e)?t:n}function Ks(e,t){if(!e)return t;let n=e.trim();return/^#[0-9a-f]{6}$/i.test(n)?n.toLowerCase():/^#[0-9a-f]{3}$/i.test(n)?`#${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`.toLowerCase():t}function Ys(e){if(!e)return null;let t=e.trim();return/^#[0-9a-f]{6}$/i.test(t)?t.toLowerCase():/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`.toLowerCase():null}});var hi=F(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.THEME_PALETTES=void 0;Tt.THEME_PALETTES=[{id:"classic-luxe",name:"Classic Luxe",badge:"Light \u2022 Warm Luxe",mode:"light",primary:"#1e293b",secondary:"#d97706",accent:"#f59e0b",background:"#fdfbf7",card:"#ffffff",text:"#1e293b",muted:"#64748b",buttonBg:"#1e293b",buttonText:"#ffffff"},{id:"ocean-modern",name:"Ocean Modern",badge:"Light \u2022 Crisp Ocean",mode:"light",primary:"#0284c7",secondary:"#0369a1",accent:"#38bdf8",background:"#f8fafc",card:"#ffffff",text:"#0f172a",muted:"#64748b",buttonBg:"#0284c7",buttonText:"#ffffff"},{id:"forest-emerald",name:"Forest Emerald",badge:"Light \u2022 Organic Green",mode:"light",primary:"#065f46",secondary:"#047857",accent:"#10b981",background:"#f0fdf4",card:"#ffffff",text:"#064e3b",muted:"#475569",buttonBg:"#065f46",buttonText:"#ffffff"},{id:"warm-terracotta",name:"Warm Terracotta",badge:"Light \u2022 Artisanal",mode:"light",primary:"#c2410c",secondary:"#ea580c",accent:"#f97316",background:"#fffaf5",card:"#ffffff",text:"#431407",muted:"#78350f",buttonBg:"#c2410c",buttonText:"#ffffff"},{id:"velvet-berry",name:"Velvet Berry",badge:"Light \u2022 Vibrant Chic",mode:"light",primary:"#9f1239",secondary:"#be123c",accent:"#f43f5e",background:"#fff5f7",card:"#ffffff",text:"#4c0519",muted:"#881337",buttonBg:"#9f1239",buttonText:"#ffffff"},{id:"sleek-obsidian",name:"Sleek Obsidian",badge:"Dark \u2022 Obsidian",mode:"dark",primary:"#60a5fa",secondary:"#38bdf8",accent:"#93c5fd",background:"#090d16",card:"#131b2e",text:"#f8fafc",muted:"#94a3b8",buttonBg:"#60a5fa",buttonText:"#090d16"},{id:"midnight-cyber",name:"Midnight Cyber",badge:"Dark \u2022 Neon Cyber",mode:"dark",primary:"#818cf8",secondary:"#6366f1",accent:"#22d3ee",background:"#09090b",card:"#18181b",text:"#f4f4f5",muted:"#a1a1aa",buttonBg:"#818cf8",buttonText:"#09090b"},{id:"royal-gold-dark",name:"Royal Gold & Dark",badge:"Dark \u2022 Imperial Gold",mode:"dark",primary:"#f59e0b",secondary:"#d97706",accent:"#fbbf24",background:"#0c0a09",card:"#1c1917",text:"#f5f5f4",muted:"#a8a29e",buttonBg:"#f59e0b",buttonText:"#0c0a09"},{id:"emerald-nocturne",name:"Emerald Nocturne",badge:"Dark \u2022 Deep Emerald",mode:"dark",primary:"#34d399",secondary:"#10b981",accent:"#6ee7b7",background:"#022c22",card:"#064e3b",text:"#ecfdf5",muted:"#a7f3d0",buttonBg:"#34d399",buttonText:"#022c22"}]});var yi=F(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.FONT_PAIRINGS=Fe.GLOBAL_FONT_OPTIONS=void 0;Fe.GLOBAL_FONT_OPTIONS=["Inter","Playfair Display","DM Sans","Poppins","Montserrat","Plus Jakarta Sans","Georgia","Editorial Serif"];Fe.FONT_PAIRINGS=[{id:"modern-clean",name:"Modern & Clean",headingFont:"Plus Jakarta Sans",bodyFont:"Inter",description:"Crisp, contemporary tech and SaaS feel with high readability"},{id:"editorial-luxury",name:"Editorial Luxury",headingFont:"Playfair Display",bodyFont:"Inter",description:"Elegant serif headline paired with neutral modern body text"},{id:"tech-forward",name:"Tech Forward",headingFont:"Inter",bodyFont:"Inter",description:"Minimalist, uniform sans-serif design system"},{id:"vibrant-lifestyle",name:"Vibrant Lifestyle",headingFont:"Poppins",bodyFont:"DM Sans",description:"Warm, geometric sans pairing suited for retail and wellness"},{id:"classic-prestige",name:"Classic Prestige",headingFont:"Montserrat",bodyFont:"Inter",description:"Authoritative, balanced typography for premium brands"}]});var Si=F(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parseVisualCustomization=Ei;Ue.customizationToTheme=bi;Ue.mergeVisualCustomizationIntoTheme=Js;function de(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Ei(e){return de(e)?{version:1,colors:de(e.colors)?e.colors:void 0,colorReplacements:de(e.colorReplacements)?e.colorReplacements:void 0,typography:de(e.typography)?e.typography:void 0,spacing:de(e.spacing)?e.spacing:void 0,layout:de(e.layout)?e.layout:void 0,components:de(e.components)?e.components:void 0,sections:de(e.sections)?e.sections:void 0,elementStyles:de(e.elementStyles)?e.elementStyles:void 0}:{version:1}}function bi(e){let t=e.colors??{};return{designCustomizationVersion:1,colorReplacements:e.colorReplacements,primaryColor:t.primary,secondaryColor:t.secondary,accentColor:t.accent,backgroundColor:t.background,textColor:t.text,surfaceColor:t.surface??t.cardBackground,surfaceAltColor:t.surfaceAlt,headingColor:t.heading??t.text,mutedTextColor:t.mutedText,borderColor:t.border,headerBackgroundColor:t.headerBackground,footerBackgroundColor:t.footerBackground,cardBackgroundColor:t.cardBackground??t.surface,buttonBackgroundColor:t.buttonBackground,buttonTextColor:t.buttonText,...e.typography,...e.spacing,...e.layout,...e.components,sections:e.sections,elementStyles:e.elementStyles}}function Js(e,t){let n=Ei(t);return[n.colors,n.colorReplacements,n.typography,n.spacing,n.layout,n.components,n.sections,n.elementStyles].some(i=>!!(i&&Object.values(i).some(s=>s!==void 0&&s!=="")))?Object.fromEntries(Object.entries({...e??{},...bi(n)}).filter(([,i])=>i!==void 0)):e??null}});var Ti=F(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.generateThemeVariables=Xs;var pn=fn();function Xs(e){let t={};if(e){for(let[h,E]of Object.entries(e))if(typeof E=="string"||typeof E=="number"){let c=`--${h.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;t[c]=String(E)}}let n=(0,pn.isDarkColor)(e?.backgroundColor),r=e?.backgroundColor||(n?"#0f172a":"#ffffff"),i=e?.textColor||(n?"#f8fafc":"#0f172a"),s=e?.mutedTextColor||(n?"rgba(248, 250, 252, 0.7)":"#64748b"),o=e?.borderColor||(n?"rgba(255, 255, 255, 0.1)":"#e2e8f0"),a=e?.cardBackgroundColor||e?.surfaceColor||(n?"#111a2e":"#ffffff"),l=n?"rgba(255, 255, 255, 0.09)":o,u=e?.primaryColor||"#2563eb",f=e?.secondaryColor||(n?"#1e293b":"#0f172a"),g=e?.accentColor||"#14b8a6",b=e?.buttonBackgroundColor||u,S=(0,pn.getAutoContrastTextColor)(b),m=e?.buttonTextColor||S,d=n?"rgba(255, 255, 255, 0.08)":f&&!(0,pn.isDarkColor)(f)?f:"#f1f5f9",p=n?"#f8fafc":"#0f172a";return{"--brand-color":u,"--brand-primary":u,"--primary-color":u,"--color-primary":u,"--primary":u,"--brand-secondary":f,"--secondary-color":f,"--color-secondary":d,"--secondary":d,"--brand-accent":g,"--accent-color":g,"--color-accent":g,"--accent":g,"--page-background":r,"--page-bg":r,"--background":r,"--page-text":i,"--color-text":i,"--text-color":i,"--text":i,"--foreground":i,"--color-foreground":i,"--heading-color":e?.headingColor||(n?"#ffffff":f),"--color-heading":e?.headingColor||(n?"#ffffff":f),"--muted-text":s,"--text-muted":s,"--color-text-muted":s,"--muted":s,"--link-color":e?.linkColor||u,"--border-primary":o,"--border":o,"--color-border":o,"--color-surface":n?"rgba(255,255,255,0.05)":"#ffffff","--surface":n?"rgba(255,255,255,0.05)":"#ffffff","--card-bg":a,"--card":a,"--card-background":a,"--card-border":l,"--product-card-bg":a,"--product-card-border":l,"--tag-bg":n?"rgba(255, 255, 255, 0.08)":"rgba(241, 245, 249, 0.9)","--tag-color":s,"--card-shadow":n?"0 10px 25px -5px rgba(0, 0, 0, 0.4)":"0 10px 25px -5px rgba(0, 0, 0, 0.05)","--header-bg":e?.headerBackgroundColor||(n?"rgba(15, 23, 42, 0.85)":"rgba(255, 255, 255, 0.82)"),"--footer-bg":e?.footerBackgroundColor||(n?"#0b0f19":"#f8fafc"),"--input-bg":n?"#1e293b":"#ffffff","--input-border":n?"rgba(255, 255, 255, 0.15)":"#cbd5e1","--input-color":i,"--button-bg":b,"--button-text":m,"--button-primary-bg":b,"--button-primary-text":m,"--button-secondary-bg":d,"--button-secondary-text":p,"--button-outline-border":n?"rgba(255, 255, 255, 0.22)":"currentColor","--button-outline-text":n?"#f8fafc":i,"--button-ghost-text":n?"#f8fafc":i,"--hero-min-height":e?.heroMinHeight||"72vh","--section-padding":e?.sectionPadding||"5rem","--base-size":e?.baseSize||"16px","--heading-font":e?.headingFont||"Inter, sans-serif","--body-font":e?.bodyFont||"Inter, sans-serif","--border-radius":e?.borderRadius||"8px","--content-align":e?.align||"left",...t}}});var wi=F(te=>{"use strict";var Qs=te&&te.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Re=te&&te.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Qs(t,e,n)};Object.defineProperty(te,"__esModule",{value:!0});Re(mi(),te);Re(fn(),te);Re(hi(),te);Re(yi(),te);Re(Si(),te);Re(Ti(),te)});var Pi=F(H=>{"use strict";var ea=H&&H.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),oe=H&&H.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ea(t,e,n)};Object.defineProperty(H,"__esModule",{value:!0});oe(Jr(),H);oe(Qr(),H);oe(ei(),H);oe(sn(),H);oe(cn(),H);oe(ui(),H);oe(bt(),H);oe(dn(),H);oe(fi(),H);oe(wi(),H)});var ha={};Hi(ha,{runTemplatePreflight:()=>Di});module.exports=Wi(ha);var Fi=require("node:child_process"),k=require("node:fs/promises"),Ri=require("node:os"),_=require("node:path"),En=kt(Lt());var Xn=[{key:"content_image",label:"Content images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:200},{key:"business_logo",label:"Business logo",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:1},{key:"website_banner",label:"Website banner images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:10},{key:"gallery",label:"Gallery images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:30},{key:"product",label:"Product images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:50},{key:"service",label:"Service images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:50},{key:"shop_front",label:"Shop front images",accept:["image/jpeg","image/png","image/webp"],maxSizeBytes:5242880,maxFiles:10},{key:"company_document",label:"Company documents",accept:["application/pdf","image/jpeg","image/png","image/webp"],maxSizeBytes:10485760,maxFiles:10},{key:"brochure_pdf",label:"Brochure PDF",accept:["application/pdf"],maxSizeBytes:10485760,maxFiles:5},{key:"restaurant_menu_pdf",label:"Restaurant menu PDF",accept:["application/pdf"],maxSizeBytes:10485760,maxFiles:5}];var fo={business_logo:["logo"],website_banner:["hero","banners"],gallery:["gallery"],product:["products"],service:["services"],shop_front:["shopFront"],content_image:["contentImages"],company_document:["documents"],brochure_pdf:["brochures"],restaurant_menu_pdf:["menus"]};function Qn(e,t=[]){return{project:{id:"template-validation",slug:"template-validation",title:"Template Validation",status:"APPROVED"},siteInstance:{id:"template-validation-instance",slug:"template-validation",domain:"template-validation.fivora.site",subdomain:"template-validation",customDomain:null,liveUrl:"https://template-validation.fivora.site"},api:{baseUrl:"https://api.fivora.site",catalogUrl:"https://api.fivora.site/site-catalog/template-validation/live-data",contactUrl:"https://api.fivora.site/site-contact",analyticsUrl:"https://api.fivora.site/site-analytics/page-view"},shop:{businessName:"Template Validation Shop",description:"Validation build payload that mirrors fivora-generated site data.",contact:{phone:"",email:"",whatsapp:""},address:{line1:"",city:"",district:"",province:"",postalCode:""},social:{facebook:"",instagram:"",tiktok:"",youtube:"",linkedin:"",website:""},logoUrl:""},template:{id:"template-validation",name:"Template Validation",engine:"NEXT_STATIC_EXPORT",structure:null},requirements:{mainPurpose:"",targetCustomers:"",preferredLanguage:"",preferredColorTheme:"",preferredStyle:"",requiredPages:t,requiredFeatures:[],customerSpecialRequirements:""},content:e??{},media:po(),seo:null}}function po(){let e={};for(let t of Xn){e[t.key]=[];for(let n of fo[t.key]??[])e[n]||(e[n]=[])}return e}var er=kt(Lt()),xe={maxEntries:2e3,maxEntryUncompressedBytes:25*1024*1024,maxTotalUncompressedBytes:200*1024*1024,maxCompressionRatio:100},mo=new Set([".cache",".git",".next",".npm",".pnpm-store",".turbo","__macosx","node_modules"]),go=new Set(["build","coverage","dist","out"]);function tr(e){let t;try{t=new er.default(e).getEntries()}catch{throw new Error("Template package is not a valid ZIP archive.")}let n=new Set,r=[],i=0;if(t.length>xe.maxEntries)throw new Error(`Template ZIP contains too many entries (${t.length}; maximum ${xe.maxEntries}).`);for(let s of t){let o=rr(s.entryName);if(r.push(o),ho(o))throw new Error(`Template ZIP contains an unsafe entry: ${s.entryName||"(empty path)"}.`);if(!s.isDirectory){let a=Number(s.header.size??0),l=Number(s.header.compressedSize??0);if(!Number.isSafeInteger(a)||a<0||a>xe.maxEntryUncompressedBytes)throw new Error(`Template ZIP entry is too large after extraction: ${o}.`);if(i+=a,i>xe.maxTotalUncompressedBytes)throw new Error(`Template ZIP expands beyond the ${xe.maxTotalUncompressedBytes/(1024*1024)} MB limit.`);if(a>1024*1024&&a/Math.max(1,l)>xe.maxCompressionRatio)throw new Error(`Template ZIP entry has an unsafe compression ratio: ${o}.`)}(!s.isDirectory&&Je(o)||s.isDirectory&&Je(o))&&n.add(o)}return{entries:r,forbiddenEntries:[...n]}}function nr(e){let t=e.slice(0,8),n=e.length-t.length;return["Template ZIP contains generated, cached, secret, log, or nested archive files that must be removed.",`Remove: ${t.join(", ")}${n>0?`, and ${n} more`:""}.`,"Create a clean source-only ZIP and upload it again."].join(" ")}function rr(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function ho(e){let t=ir(e);return!e||e.includes("\0")||e.startsWith("/")||/^[a-z]:\//i.test(e)||t.includes("..")}function Je(e){let t=rr(e),n=ir(t),r=n.at(-1)??"",i=n.some(S=>mo.has(S)),s=n[0]===".yarn"&&n[1]==="cache",o=n.some(S=>go.has(S)),a=n.some(S=>S===".deneb"||S.startsWith(".deneb-backup")),l=r===".env"||r.startsWith(".env."),u=r.endsWith(".zip"),f=r.endsWith(".log"),g=r.endsWith(".tsbuildinfo");return i||s||o||a||l||u||f||g||(r===".ds_store"||r==="thumbs.db")}function ir(e){return e.split("/").map(t=>t.trim().toLowerCase()).filter(Boolean)}var yo={common:{label:"Common Content"},home:{label:"Home Page",pageKey:"home"},about:{label:"About Page",pageKey:"about_us"},services:{label:"Services",pageKey:"services"},products:{label:"Products",pageKey:"products"},gallery:{label:"Gallery",pageKey:"gallery"},contact:{label:"Contact Page",pageKey:"contact"},additionalPages:{label:"Additional Pages"}},Eo=new Set(["text","textarea","email","tel","url","image","number","boolean","select"]),bo={version:1,sections:[{id:"common",path:"common",label:"Common Content",type:"object",fields:[{key:"logoUrl",type:"image",label:"Website logo",description:"Used by templates that read content.common.logoUrl or merchant.logoUrl."}]}]};function sr(e){if(!e||typeof e!="object")return null;let t=e,r=(Array.isArray(t.sections)?t.sections:[]).map(i=>To(i)).filter(i=>!!i);return r.length===0?null:So({version:typeof t.version=="number"&&Number.isFinite(t.version)?t.version:1,sections:r})}function So(e){let t=r=>/(^|\.)(products?|items?|catalog|menu|dishes?|goods|featuredproducts?|store|foods?|drinks?)$/i.test(r.trim()),n=(r,i)=>{let s=fe(i,r.key);if(r.type==="object")return{...r,fields:r.fields.map(o=>n(o,s))};if(r.type==="list"){let o=r.fields?.map(a=>n(a,`${s}[*]`));if(t(s)){let{maxItems:a,...l}=r;return{...l,fields:o}}return{...r,fields:o}}return r};return{...e,sections:e.sections.map(r=>{let i=r.fields?.map(s=>n(s,r.path));if(r.type==="list"&&t(r.path)){let{maxItems:s,...o}=r;return{...o,fields:i}}return{...r,fields:i}})}}function ar(e,t=[]){let n=new Map(t.map(i=>[i.id,i.label]));return{version:1,sections:Object.entries(e).map(([i,s])=>Po(i,s,n)).filter(i=>!!i)}}function Oe(e){if(!e)return null;let t=new Map;for(let s of e.sections){let o=t.get(s.path);t.set(s.path,o?Dt(o,s):s)}let n=[...t.values()],r=n.map(s=>s.path),i=n.map(s=>{let a=n.filter(u=>nt(s.path,u.path)).sort((u,f)=>or(f.path)-or(u.path)).map(u=>pr({...e,sections:[u]},s.path)).filter(u=>!!u).reduce((u,f)=>Dt(u,f),s),l=new Set(r.filter(u=>u!==s.path&&nt(u,s.path)));return Nt(a,l)}).filter(s=>!!s);return{...e,sections:i}}function rt(e){if(!e)return[];let t=new Map,n=[],r=new Set,i=(o,a,l)=>{let u=ne(o),f=t.get(u);if(!f){t.set(u,{kind:a,sectionId:l});return}r.has(u)||(r.add(u),n.push({path:u,firstKind:f.kind,duplicateKind:a,firstSectionId:f.sectionId,duplicateSectionId:l}))},s=(o,a,l)=>{if(a.type==="object"){for(let u of a.fields??[])s(fe(o,u.key),u,l);return}if(a.type==="list"){let u=ne(o);i(u,"list",l);let f=`${u}[*]`;a.itemField&&i(f,"field",l);for(let g of a.fields??[])s(fe(f,g.key),g,l);return}i(o,"field",l)};for(let o of e.sections)s(o.path,o,o.id);return n}function Ot(e,t){if(!e)return Oe(t);if(!t)return Oe(e);let n=Oe(e)??e,r=Oe(t)??t,i=n.sections.map(l=>l.path),s=n.sections.map(l=>{let u=pr(r,l.path);if(!u)return l;let f=new Set(i.filter(b=>b!==l.path&&nt(b,l.path))),g=Nt(u,f);return g?Dt(l,g):l}),o=new Set(n.sections.map(({path:l})=>l)),a=r.sections.filter(l=>!o.has(l.path)).map(l=>Nt(l,new Set(i.filter(u=>nt(u,l.path))))).filter(l=>!!l);return Oe({...t,...e,sections:[...s,...a]})}function cr(e){return e?Ot(e,bo):null}function To(e){if(!e||typeof e!="object")return null;let t=e,n=z(t.id),r=z(t.path),i=z(t.label),s=dr(t.type);if(!n||!r||!i||!s)return null;let o={id:n,path:r,label:i,description:z(t.description)||void 0,required:typeof t.required=="boolean"?t.required:void 0,placeholder:z(t.placeholder)||void 0,maxLength:Bt(t.maxLength),recommendedWidth:pe(t.recommendedWidth),recommendedHeight:pe(t.recommendedHeight),pageKey:z(t.pageKey)||void 0,...$t(t.sharedFieldKey)};if(s==="object"){let a=Qe(t.fields);return{...o,type:s,fields:a}}if(s==="list"){let a=Qe(t.fields),l=lr(t.itemField);return a.length===0&&!l?null:{...o,type:s,fields:a.length>0?a:void 0,itemField:l??void 0,itemLabel:z(t.itemLabel)||void 0,minItems:et(t.minItems),maxItems:et(t.maxItems)}}return{...o,type:s,options:s==="select"?Mt(t.options):void 0}}function Nt(e,t){if(t.has(e.path))return null;if(e.type==="object"){let n=(e.fields??[]).map(r=>Xe(r,e.path,t)).filter(r=>!!r);return n.length===0?null:{...e,fields:n}}if(e.type==="list"){let n=(e.fields??[]).map(r=>Xe(r,e.path,t)).filter(r=>!!r);return(e.fields?.length??0)>0&&n.length===0&&!e.itemField?null:{...e,fields:n.length>0?n:void 0}}return e}function Xe(e,t,n){let r=fe(t,e.key);if(n.has(r))return null;if(e.type==="object"){let i=e.fields.map(s=>Xe(s,r,n)).filter(s=>!!s);return i.length===0?null:{...e,fields:i}}if(e.type==="list"){let i=(e.fields??[]).map(s=>Xe(s,r,n)).filter(s=>!!s);return(e.fields?.length??0)>0&&i.length===0&&!e.itemField?null:{...e,fields:i.length>0?i:void 0}}return e}function Qe(e){return Array.isArray(e)?e.map(t=>wo(t)).filter(t=>!!t):[]}function wo(e){if(!e||typeof e!="object")return null;let t=e,n=z(t.key),r=z(t.label),i=dr(t.type);if(!n||!r||!i)return null;let s={key:n,label:r,description:z(t.description)||void 0,required:typeof t.required=="boolean"?t.required:void 0,placeholder:z(t.placeholder)||void 0,maxLength:Bt(t.maxLength),recommendedWidth:pe(t.recommendedWidth),recommendedHeight:pe(t.recommendedHeight),...$t(t.sharedFieldKey)};if(i==="object")return{...s,type:i,fields:Qe(t.fields)};if(i==="list"){let o=Qe(t.fields),a=lr(t.itemField);return o.length===0&&!a?null:{...s,type:i,fields:o.length>0?o:void 0,itemField:a??void 0,itemLabel:z(t.itemLabel)||void 0,minItems:et(t.minItems),maxItems:et(t.maxItems)}}return{...s,type:i,options:i==="select"?Mt(t.options):void 0}}function lr(e){if(!e||typeof e!="object")return null;let t=e,n=z(t.label),r=ur(t.type);return!n||!r?null:{label:n,type:r,description:z(t.description)||void 0,required:typeof t.required=="boolean"?t.required:void 0,placeholder:z(t.placeholder)||void 0,maxLength:Bt(t.maxLength),recommendedWidth:pe(t.recommendedWidth),recommendedHeight:pe(t.recommendedHeight),...$t(t.sharedFieldKey),options:r==="select"?Mt(t.options):void 0}}function $t(e){return typeof e=="string"&&e.trim()?{sharedFieldKey:e.trim()}:{}}function Mt(e){if(!Array.isArray(e))return;let t=e.map(n=>z(n)).filter(n=>!!n);return t.length>0?t:void 0}function Bt(e){return typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=1e4?e:void 0}function pe(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>0?e:void 0}function et(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:void 0}function dr(e){return e==="object"?e:e==="list"||e==="array"?"list":ur(e)}function ur(e){return typeof e=="string"&&Eo.has(e)?e:null}function Po(e,t,n){let r=yo[e],i=n.has(e)?e:void 0,s=!i&&e==="about"&&n.has("about_us")?"about_us":void 0,o=i||s||r?.pageKey,a=(o?n.get(o):void 0)||r?.label||hr(e);return Array.isArray(t)?Io(e,a,o,t):Ee(t)?{id:e,path:e,label:a,pageKey:o,type:"object",fields:Object.entries(t).map(([l,u])=>it(l,u))}:{id:e,path:e,label:a,pageKey:o,...ot(e,t)}}function it(e,t){let n=hr(e);return Array.isArray(t)?xo(e,n,t):Ee(t)?{key:e,label:n,type:"object",fields:Object.entries(t).map(([r,i])=>it(r,i))}:{key:e,label:n,...ot(e,t)}}function Io(e,t,n,r){let i=mr(r),s=yr(t);return Ee(i)?{id:e,path:e,label:t,pageKey:n,type:"list",itemLabel:s,fields:Object.entries(i).map(([o,a])=>it(o,a))}:{id:e,path:e,label:t,pageKey:n,type:"list",itemLabel:s,itemField:{label:s,...ot(e,i)}}}function xo(e,t,n){let r=mr(n),i=yr(t);return Ee(r)?{key:e,label:t,type:"list",itemLabel:i,fields:Object.entries(r).map(([s,o])=>it(s,o))}:{key:e,label:t,type:"list",itemLabel:i,itemField:{label:i,...ot(e,r)}}}function Dt(e,t){let n={...t,...e,pageKey:e.pageKey??t.pageKey,description:e.description??t.description,placeholder:e.placeholder??t.placeholder};if(e.type==="object"&&t.type==="object")return{...n,type:"object",fields:tt(e.fields??[],t.fields??[])};if(e.type==="list"&&t.type==="list"){let r=tt(e.fields??[],t.fields??[]);return{...n,type:"list",fields:r.length>0?r:void 0,itemField:fr(e.itemField,t.itemField),itemLabel:e.itemLabel??t.itemLabel,minItems:e.minItems??t.minItems,maxItems:e.maxItems??t.maxItems}}return{...e,recommendedWidth:e.recommendedWidth??t.recommendedWidth,recommendedHeight:e.recommendedHeight??t.recommendedHeight}}function tt(e,t){let n=new Map(t.map(i=>[i.key,i]));return[...e.map(i=>{let s=n.get(i.key);return n.delete(i.key),s?Co(i,s):i}),...n.values()]}function Co(e,t){let n={...t,...e,description:e.description??t.description,placeholder:e.placeholder??t.placeholder};if(e.type==="object"&&t.type==="object")return{...n,type:"object",fields:tt(e.fields,t.fields)};if(e.type==="list"&&t.type==="list"){let r=tt(e.fields??[],t.fields??[]);return{...n,type:"list",fields:r.length>0?r:void 0,itemField:fr(e.itemField,t.itemField),itemLabel:e.itemLabel??t.itemLabel,minItems:e.minItems??t.minItems,maxItems:e.maxItems??t.maxItems}}return{...e,recommendedWidth:e.recommendedWidth??t.recommendedWidth,recommendedHeight:e.recommendedHeight??t.recommendedHeight}}function fr(e,t){return e?!t||e.type!==t.type?e:{...t,...e,recommendedWidth:e.recommendedWidth??t.recommendedWidth,recommendedHeight:e.recommendedHeight??t.recommendedHeight}:t}function pr(e,t){let n=(i,s,o)=>{let{key:a,...l}=i;return{...l,id:o.id,path:s,pageKey:o.pageKey}},r=(i,s,o)=>{if(ne(s)===ne(t))return n(i,s,o);if(i.type==="object")for(let a of i.fields){let l=r(a,fe(s,a.key),o);if(l)return l}if(i.type==="list"){let a=`${ne(s)}[*]`;for(let l of i.fields??[]){let u=r(l,fe(a,l.key),o);if(u)return u}}return null};for(let i of e.sections){if(ne(i.path)===ne(t))return i;if(i.type==="object")for(let s of i.fields??[]){let o=r(s,fe(i.path,s.key),i);if(o)return o}if(i.type==="list"){let s=`${ne(i.path)}[*]`;for(let o of i.fields??[]){let a=r(o,fe(s,o.key),i);if(a)return a}}}return null}function nt(e,t){let n=ne(e),r=ne(t);return n.startsWith(`${r}.`)||n.startsWith(`${r}[`)}function ne(e){return e.replace(/\[\d+\]/g,"[*]").trim()}function or(e){return ne(e).split(/\.|\[/).filter(Boolean).length}function mr(e){let t=e.filter(Ee);return t.length===0?e.find(n=>n!=null):t.reduce((n,r)=>gr(n,r),{})}function gr(e,t){let n={...e};for(let[r,i]of Object.entries(t)){let s=n[r];if(Ee(s)&&Ee(i)){n[r]=gr(s,i);continue}if(Array.isArray(s)&&Array.isArray(i)){n[r]=[...s,...i];continue}(s==null||Array.isArray(s)&&s.length===0)&&(n[r]=i)}return n}function ot(e,t){let n=ko(e,t);if(n!=="image"||typeof t!="string"||!t.trim())return{type:n};try{let r=new URL(t,"https://fivora-template.invalid"),i=pe(Number(r.searchParams.get("w")??r.searchParams.get("width"))),s=pe(Number(r.searchParams.get("h")??r.searchParams.get("height")));return{type:n,...i?{recommendedWidth:i}:{},...s?{recommendedHeight:s}:{}}}catch{return{type:n}}}function ko(e,t){if(typeof t=="boolean")return"boolean";if(typeof t=="number")return"number";let n=e.toLowerCase();return n.includes("email")?"email":n.includes("phone")||n.includes("mobile")||n.includes("whatsapp")||n.includes("contactnumber")?"tel":n.includes("image")||n.includes("logo")||n.includes("banner")||n.includes("thumbnail")||n.includes("photo")?"image":n.includes("url")||n.includes("link")||typeof t=="string"&&/^https?:\/\//i.test(t.trim())?"url":n.includes("description")||n.includes("about")||n.includes("mission")||n.includes("vision")||n.includes("history")||n.includes("hours")||n.includes("address")||n.includes("body")||typeof t=="string"&&t.length>120?"textarea":"text"}function fe(e,t){return e?`${e}.${t}`:t}function z(e){return typeof e=="string"?e.trim():""}function Ee(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function hr(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function yr(e){return/ies$/i.test(e)?e.replace(/ies$/i,"y"):/s$/i.test(e)&&!/ss$/i.test(e)?e.replace(/s$/i,""):e}var Ao=["primary","secondary","accent","background","text","surface","surfaceAlt","heading","mutedText","border","headerBackground","footerBackground","cardBackground","buttonBackground","buttonText"],_o=["headingFont","bodyFont","baseSize","headingScale","bodyLineHeight","headingLineHeight","headingWeight","bodyWeight","letterSpacing"],vo=["heroMinHeight","sectionPadding","contentMaxWidth","containerPadding","sectionGap","elementGap","gridGap"],Fo=["textAlign","contentAlign","heroTextAlign","cardTextAlign","gridColumns"],Ro=["cardWidth","cardMinHeight","cardPadding","cardRadius","cardBorderWidth","cardShadow","buttonPadding","buttonRadius","buttonShadow","imageRadius","headerHeight"],Lo=["backgroundColor","textColor","headingColor","minHeight","padding","contentMaxWidth","gap","textAlign","contentAlign","cardBackgroundColor","cardWidth","cardMinHeight","cardRadius","gridColumns"],No=["fontFamily","fontSize","lineHeight","fontWeight","letterSpacing","color","backgroundColor","textAlign","width","height","minWidth","minHeight","maxWidth","maxHeight","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","borderRadius"];function ie(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Do(e){let t=e.trim();if(!t)return"";if(!(t.length>160)&&!/[;{}<>\r\n]/.test(t)&&!/(?:url\s*\(|expression\s*\(|@import|javascript:)/i.test(t))return t}function Er(e){let t=e.trim().toLowerCase(),n=t.match(/^#([0-9a-f]{3})$/);return n?`#${[...n[1]].map(r=>r.repeat(2)).join("")}`:/^#[0-9a-f]{6}$/.test(t)?t:null}function Oo(e){if(!ie(e))return;let t={};for(let[n,r]of Object.entries(e).slice(0,64)){if(typeof r!="string")continue;let i=Er(n),s=Er(r);!i||!s||(t[i]=s)}return Object.keys(t).length>0?t:void 0}function be(e,t){if(!ie(e))return;let n={};for(let r of t){if(typeof e[r]!="string")continue;let i=Do(e[r]);i!==void 0&&(n[r]=i)}return Object.keys(n).length>0?n:void 0}function $o(e){return/^[a-zA-Z0-9_-]{1,64}$/.test(e)}function Mo(e){return/^[a-zA-Z0-9_.:\[\]-]{1,180}$/.test(e)}function Bo(){return{version:1}}function jo(e){if(!ie(e))return Bo();let t=be(e.colors,Ao),n=Oo(e.colorReplacements),r=be(e.typography,_o),i=be(e.spacing,vo),s=be(e.layout,Fo),o=be(e.components,Ro),a={};if(ie(e.sections))for(let[u,f]of Object.entries(e.sections)){if(!$o(u)||!ie(f))continue;let b={...be(f,Lo)??{}};typeof f.visible=="boolean"&&(b.visible=f.visible),Object.keys(b).length>0&&(a[u]=b)}let l={};if(ie(e.elementStyles))for(let[u,f]of Object.entries(e.elementStyles).slice(0,256)){if(!Mo(u)||!ie(f))continue;let g=be(f,No);g&&Object.keys(g).length>0&&(l[u]=g)}return{version:1,...t?{colors:t}:{},...n?{colorReplacements:n}:{},...r?{typography:r}:{},...i?{spacing:i}:{},...s?{layout:s}:{},...o?{components:o}:{},...Object.keys(a).length>0?{sections:a}:{},...Object.keys(l).length>0?{elementStyles:l}:{}}}function br(e){if(!ie(e))return null;let t=e.themeSchema;if(!ie(t))return null;let n=jo(ie(t.defaults)?{version:1,...t.defaults}:null),r={...n.colors?{colors:n.colors}:{},...n.typography?{typography:n.typography}:{},...n.spacing?{spacing:n.spacing}:{},...n.layout?{layout:n.layout}:{},...n.components?{components:n.components}:{},...n.sections?{sections:n.sections}:{}};return{version:typeof t.version=="number"?t.version:1,tokens:Array.isArray(t.tokens)?t.tokens.filter(i=>typeof i=="string"):void 0,...Object.keys(r).length>0?{defaults:r}:{}}}var Vo=e=>new Error(e),Uo=new Set(["npm install","npm ci","pnpm install","pnpm install --frozen-lockfile","yarn install","yarn install --frozen-lockfile"]),zo=new Set(["npm run build","pnpm run build","yarn build","yarn run build"]);function Tr(e,t=Vo){let n=b=>{throw t(b)};(!e||typeof e!="object")&&n("Template manifest is missing or invalid.");let r=e;r.framework!=="nextjs-static-export"&&n('Template manifest framework must be "nextjs-static-export".'),(typeof r.siteDataFile!="string"||!r.siteDataFile.trim())&&n("Template manifest siteDataFile is required.");let i=typeof r.version=="number"&&Number.isFinite(r.version)?r.version:1,s=Ho(r.visualEditing,i,t),o=sr(r.editorSchema),a=br(r),l=Array.isArray(r.colorPalette)?r.colorPalette.filter(b=>!!b&&typeof b=="object").flatMap(b=>{let S=typeof b.color=="string"?b.color.trim().toLowerCase():"";if(!/^#[0-9a-f]{6}$/.test(S))return[];let m=typeof b.usageCount=="number"&&Number.isFinite(b.usageCount)?Math.max(1,Math.floor(b.usageCount)):1;return[{color:S,usageCount:m}]}).slice(0,40):[],u=rt(o);if(u.length>0){let b=u.slice(0,5).map(S=>`"${S.path}"`).join(", ");n(`Template editorSchema declares the same editable path in more than one place: ${b}. Keep each primitive field and list in exactly one section; a dedicated nested section must not also be repeated inside its ancestor section.`)}let f=Sr(r.installCommand,Uo,"installCommand",n),g=Sr(r.buildCommand,zo,"buildCommand",n);return{framework:"nextjs-static-export",version:i,siteDataFile:r.siteDataFile.trim(),editorSchema:o,pages:Array.isArray(r.pages)?r.pages.filter(b=>!!b&&typeof b=="object").map(b=>{let S=typeof b.id=="string"&&b.id.trim()?b.id.trim():null,m=typeof b.label=="string"&&b.label.trim()?b.label.trim():null;return!S||!m?n("Each template manifest page must include id and label."):{id:S,label:m,route:typeof b.route=="string"&&b.route.trim()?b.route.trim():void 0,required:typeof b.required=="boolean"?b.required:!1,description:typeof b.description=="string"?b.description.trim():void 0}}):void 0,visualEditing:s,...a?{themeSchema:a}:{},...l.length>0?{colorPalette:l}:{},outputDirectory:typeof r.outputDirectory=="string"?r.outputDirectory.trim():void 0,installCommand:f,buildCommand:g,basePathEnvVar:typeof r.basePathEnvVar=="string"?r.basePathEnvVar.trim():"NEXT_PUBLIC_SITE_BASE_PATH",publicSiteUrlEnvVar:typeof r.publicSiteUrlEnvVar=="string"?r.publicSiteUrlEnvVar.trim():void 0}}function Sr(e,t,n,r){if(e==null||e==="")return;if(typeof e!="string")return r(`Template manifest ${n} must be a string.`);let i=e.trim().replace(/\s+/g," ");return t.has(i)?i:r(`Template manifest ${n} is not allowed. Use a standard npm, pnpm, or yarn install/build command.`)}function Ho(e,t,n){let r=a=>{throw n(a)};if(!e||typeof e!="object"||Array.isArray(e))return t>=2&&r('Template manifest version 2 requires visualEditing.contractVersion 1 and visualEditing.mode "strict".'),{contractVersion:1,mode:"legacy"};let i=e;i.contractVersion!==1&&r("Template visualEditing.contractVersion must be 1.");let s=i.mode==="strict"||i.mode==="legacy"?i.mode:null;if(!s)return r('Template visualEditing.mode must be "strict" or "legacy".');t>=2&&s!=="strict"&&r('Template manifest version 2 requires visualEditing.mode "strict".');let o=Array.isArray(i.controlOnlyPaths)?i.controlOnlyPaths.filter(a=>typeof a=="string").map(a=>a.trim()).filter(Boolean):[];return{contractVersion:1,mode:s,controlOnlyPaths:o.length>0?o:void 0}}var Wo={"data-preview-field-path":"field","data-preview-list-path":"list","data-preview-item-path":"item","data-preview-page-key":"page"},wr=/\b(data-preview-(?:field-path|list-path|item-path|page-key))\s*=\s*(?:"([^"]*)"|'([^']*)'|\{\s*`([\s\S]*?)`\s*\}|\{\s*"([^"]*)"\s*\}|\{\s*'([^']*)'\s*\})/g,Pr=/\b(data-preview-(?:field-path|list-path|item-path|page-key))\s*=/g,Ir=String.raw`[^.[\]\s]+`,qo=new RegExp(String.raw`^${Ir}(?:\[(?:\d+|\*)\])*(?:\.${Ir}(?:\[(?:\d+|\*)\])*)*$`),Go=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Zo=new Set(["head","script","style","noscript","svg","template"]),xr=new Set(["html","body","main","header","footer","nav","section","article","aside","form","div","ul","ol","table","thead","tbody","tfoot","tr"]),st="FIVORA_PREVIEW_SITE_DATA",_r=`${["MARKET","PLACE"].join("")}_PREVIEW_`,at=`${_r}SITE_DATA`;var ct="FIVORA_PREVIEW_READY",jt=`${_r}READY`,Ko=ct;function Wt(e,t){let n={fieldPatterns:new Set,concreteFields:new Set,listPatterns:new Set,concreteLists:new Set,itemPatterns:new Set,concreteItems:new Set};if(e)for(let[r,i]of Object.entries(e))Zt(i,r,n);for(let r of t?.sections??[])Kt(r.path,r,n);return{fieldPatterns:[...n.fieldPatterns].sort(),concreteFields:[...n.concreteFields].sort(),listPatterns:[...n.listPatterns].sort(),concreteLists:[...n.concreteLists].sort(),itemPatterns:[...n.itemPatterns].sort(),concreteItems:[...n.concreteItems].sort()}}function Jt(e,t){let n=Lr(e??{});for(let r of t?.sections??[])Xo(n,r.path,r);return n}function vr(e,t){let n=structuredClone(e??{});for(let r of t?.sections??[])Yo(n,r.path,r);return Gt(n,"")}function mt(e){let t=[],n=[];for(let r of e){let i=new Set;wr.lastIndex=0;for(let s of r.content.matchAll(wr)){let o=s[1],a=s[2]??s[3]??s[4]??s[5]??s[6]??"",l=s.index??0;i.add(l),t.push({kind:Wo[o],value:Te(a).trim(),filePath:r.filePath,artifactKind:r.kind,offset:l,line:U(r.content,l)})}Pr.lastIndex=0;for(let s of r.content.matchAll(Pr)){let o=s.index??0;i.has(o)||n.push(`${r.filePath}:${U(r.content,o)} ${s[1]} must use a literal string or a JSX template literal.`)}}return{markers:t,unparseableAttributes:n}}function Fr(e){let t=e.manifestVersion>=2||e.visualEditing?.mode==="strict"?"strict":"legacy",n=[],r=[],i=Wt(e.contentDefaults,e.editorSchema),s=mt(e.artifacts),o=s.markers;e.contentDefaults||n.push('site-data.json must contain a JSON object at "content".'),e.editorSchema||n.push("An editor schema could not be derived from site-data.json content."),hs(e.editorSchema,n),ys(e.editorSchema,n),ns(e.editorSchema,n,e.pages),rs(e.editorSchema,e.contentDefaults,n),os(e.artifacts,n),ss(e.artifacts,n),as(e.artifacts,e.contentDefaults,e.editorSchema,n),r.push(...s.unparseableAttributes.map(T=>`${T} Exported exact markers may still satisfy strict coverage.`));let a=J(o,"field",n),l=J(o,"list",n),u=J(o,"item",n),f=o.filter(T=>T.artifactKind==="html"),g=J(f,"field",n),b=J(f,"list",n),S=J(f,"item",n),m=o.filter(T=>T.artifactKind==="source"),d=J(m,"field",n),p=J(m,"list",n),h=J(m,"item",n),E=Nr(e.visualEditing?.controlOnlyPaths??[],i,n);Ut({label:"editable field",expectedPatterns:i.fieldPatterns,concretePaths:i.concreteFields,htmlMarkerPaths:g,sourceMarkerPaths:d,controlOnlyPaths:E,findings:n}),Ut({label:"editable list",expectedPatterns:i.listPatterns,concretePaths:i.concreteLists,htmlMarkerPaths:b,sourceMarkerPaths:p,controlOnlyPaths:[],findings:n}),Ut({label:"editable list item",expectedPatterns:i.itemPatterns,concretePaths:i.concreteItems,htmlMarkerPaths:S,sourceMarkerPaths:h,controlOnlyPaths:[],findings:n}),zt("field",a,i.fieldPatterns,i.concreteFields,n),zt("list",l,i.listPatterns,i.concreteLists,n),zt("item",u,i.itemPatterns,i.concreteItems,n),Dr(e.manifestVersion,e.pages??[],o,e.artifacts,n),Or({manifestVersion:e.manifestVersion,pages:e.pages??[],schema:e.editorSchema,markers:o,fieldPaths:G([...i.fieldPatterns.filter(T=>!T.includes("[*]")),...i.concreteFields]),listPaths:G([...i.listPatterns.filter(T=>!T.includes("[*]")),...i.concreteLists]),itemPaths:i.concreteItems,controlOnlyPaths:E,findings:n});let c=cs(e.artifacts,e.pages??[]);t==="strict"?n.push(...c):r.push(...c);let y=G(n),w=G(r);return t==="legacy"?{mode:t,errors:[],warnings:G([...y.map(T=>`[legacy] ${T}`),...w]),inventory:i,markers:o}:{mode:t,errors:y,warnings:w,inventory:i,markers:o}}function Rr(e){let t=[],n=[],r=Wt(e.contentDefaults,e.editorSchema),i=Jt(e.contentDefaults,e.editorSchema),s=Wt(i,e.editorSchema),o=G([...r.fieldPatterns.filter(d=>!d.includes("[*]")),...s.concreteFields]),a=G([...r.listPatterns.filter(d=>!d.includes("[*]")),...s.concreteLists]),l=s.concreteItems,u=e.artifacts.filter(d=>d.kind==="html"),f=mt(u),g=J(f.markers,"field",t),b=J(f.markers,"list",t),S=J(f.markers,"item",t),m=Nr(e.visualEditing?.controlOnlyPaths??[],r,t);Vt({markerPaths:g,expectedPaths:s.concreteFields,knownPatterns:r.fieldPatterns,attribute:"field",findings:t}),Vt({markerPaths:b,expectedPaths:s.concreteLists,knownPatterns:r.listPatterns,attribute:"list",findings:t}),Vt({markerPaths:S,expectedPaths:s.concreteItems,knownPatterns:r.itemPatterns,attribute:"item",findings:t});for(let d of o)ft(d,m)||g.includes(d)||t.push(`Empty-state export removed data-preview-field-path="${d}". Keep the editable target mounted when its value is empty, false, or zero.`);for(let d of a)b.includes(d)||t.push(`Empty-state export removed data-preview-list-path="${d}". Keep the list container mounted when the list has no items.`);for(let d of l)S.includes(d)||t.push(`Empty-state export removed data-preview-item-path="${d}" required by minItems/required list validation.`);return Dr(e.manifestVersion,e.pages??[],f.markers,u,t),Or({manifestVersion:e.manifestVersion,pages:e.pages??[],schema:e.editorSchema,markers:f.markers,fieldPaths:o,listPaths:a,itemPaths:l,controlOnlyPaths:m,findings:t}),n.push(...f.unparseableAttributes),{errors:G(t),warnings:G(n),requiredFieldPaths:o,requiredListPaths:a,requiredItemPaths:l}}function Vt(e){let t=new Set(e.expectedPaths),n=new Set(e.knownPatterns);for(let r of e.markerPaths)r.includes("[*]")||t.has(r)||!n.has(Z(r))||e.findings.push(`Empty-state export rendered out-of-range data-preview-${e.attribute}-path="${r}" for a list item that does not exist. Render list items from the actual site-data array instead of fixed indexes or placeholder cards.`)}function Yo(e,t,n){let r=t.split(".").map(o=>o.trim()).filter(Boolean);if(r.length===0||r.some(o=>o.includes("[")))return;let i=e;for(let o of r.slice(0,-1)){let a=i[o];Q(a)||(i[o]={}),i=i[o]}let s=r.at(-1);qt(i,s,n,t)}function qt(e,t,n,r){if(n.type==="list"){let i=Array.isArray(e[t])?[...e[t]]:[],s=Se(n.maxItems),o=Math.min(s??Number.MAX_SAFE_INTEGER,s===0?0:Math.max(1,Se(n.minItems)??(n.required?1:0)));for(;i.length<o;)i.push(void 0);e[t]=i.map((a,l)=>{let u=`${r}[${l}]`;if(n.itemField)return Cr(a,n.itemField.type,u,n.itemField.options);let f=Q(a)?a:{};for(let g of n.fields??[])qt(f,g.key,g,X(u,g.key));return f});return}if(n.type==="object"){let i=Q(e[t])?e[t]:{};e[t]=i;for(let s of n.fields??[])qt(i,s.key,s,X(r,s.key));return}e[t]=Cr(e[t],n.type,r,n.options)}function Cr(e,t,n,r){return t==="number"?typeof e=="number"&&Number.isFinite(e)&&e!==0?e:1:t==="boolean"?e===!0?e:!0:typeof e=="string"&&e.trim()&&(t!=="select"||!r?.length||r.includes(e))?e:t==="select"?r?.[0]??lt(n):t==="url"?`https://template-validation.example.invalid/${dt(n)}`:t==="image"?`/template-validation-${dt(n)}.svg`:t==="email"?"validation@example.invalid":t==="tel"?"+12025550142":lt(n)}function Gt(e,t){return Array.isArray(e)?e.map((n,r)=>Gt(n,`${t}[${r}]`)):Q(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>{let i=X(t,n);return[n,Gt(r,i)]})):typeof e=="string"?e.trim()?e:Jo(t):typeof e=="number"?Number.isFinite(e)&&e!==0?e:1:typeof e=="boolean"?!0:e??lt(t)}function Jo(e){let t=e.toLowerCase();return t.includes("email")?"validation@example.invalid":t.includes("phone")||t.includes("mobile")||t.includes("whatsapp")||t.includes("contactnumber")?"+12025550142":t.includes("image")||t.includes("logo")||t.includes("banner")||t.includes("thumbnail")||t.includes("photo")?`/template-validation-${dt(e)}.svg`:t.includes("url")||t.includes("link")?`https://template-validation.example.invalid/${dt(e)}`:lt(e)}function lt(e){return`Validation ${e||"content"}`}function dt(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"content"}function Lr(e){return Array.isArray(e)?[]:Q(e)?Object.fromEntries(Object.entries(e).map(([t,n])=>[t,Lr(n)])):typeof e=="string"?"":typeof e=="number"?0:typeof e=="boolean"?!1:e}function Xo(e,t,n){let r=t.split(".").map(o=>o.trim()).filter(Boolean);if(r.length===0||r.some(o=>o.includes("[")))return;let i=e;for(let o of r.slice(0,-1)){let a=i[o];Q(a)||(i[o]={}),i=i[o]}let s=r.at(-1);Xt(i,s,n)}function Xt(e,t,n){if(n.type==="list"){let r=Math.min(Se(n.maxItems)??Number.MAX_SAFE_INTEGER,Se(n.minItems)??(n.required?1:0));e[t]=Array.from({length:r},()=>Qo(n));return}if(n.type==="object"){let r=Q(e[t])?e[t]:{};e[t]=r;for(let i of n.fields??[])Xt(r,i.key,i);return}e[t]=n.type==="number"?0:n.type==="boolean"?!1:""}function Qo(e){if(e.itemField)return e.itemField.type==="number"?0:e.itemField.type==="boolean"?!1:"";let t={};for(let n of e.fields??[])Xt(t,n.key,n);return t}function Zt(e,t,n){if(Array.isArray(e)){let r=Z(t);n.listPatterns.add(r),n.concreteLists.add(t),n.itemPatterns.add(`${r}[*]`),e.forEach((i,s)=>{let o=`${t}[${s}]`;n.concreteItems.add(o),Array.isArray(i)||Q(i)?Zt(i,o,n):(n.fieldPatterns.add(Z(o)),n.concreteFields.add(o))});return}if(Q(e)){for(let[r,i]of Object.entries(e))Zt(i,X(t,r),n);return}n.fieldPatterns.add(Z(t)),n.concreteFields.add(t)}function Kt(e,t,n){if(t.type==="object"){for(let r of t.fields??[])Kt(X(e,r.key),r,n);return}if(t.type==="list"){let r=Z(e),i=`${r}[*]`;n.listPatterns.add(r),n.itemPatterns.add(i),t.itemField&&n.fieldPatterns.add(i);for(let s of t.fields??[])Kt(X(i,s.key),s,n);return}n.fieldPatterns.add(Z(e))}function J(e,t,n){let r=[];for(let i of e.filter(s=>s.kind===t)){let s=$e(i.value);if(!s){n.push(`${i.filePath}:${Br(i)} has invalid data-preview-${t}-path "${i.value}".`);continue}r.push(s)}return G(r)}function Nr(e,t,n){let r=[];for(let i of e){let s=$e(i);if(!s){n.push(`controlOnlyPaths contains invalid path "${i}".`);continue}if(![...t.fieldPatterns,...t.concreteFields].some(a=>Yt(s,a))){n.push(`controlOnlyPaths contains unknown editable field path "${s}".`);continue}r.push(s)}return G(r)}function Ut(e){for(let t of e.expectedPatterns){if(ft(t,e.controlOnlyPaths))continue;let n=e.concretePaths.filter(r=>Z(r)===t);if(!t.includes("[*]")){e.htmlMarkerPaths.includes(t)||e.findings.push(`Exported HTML is missing exact data-preview-${Ht(e.label)}="${t}" for ${e.label}.`);continue}e.sourceMarkerPaths.some(r=>Es(r,t))||e.findings.push(`Source is missing dynamic data-preview-${Ht(e.label)} mapping for ${e.label} "${t}". Use an exact JSX template path such as [\${index}] so newly added and reordered items remain editable.`),n.length>0}for(let t of e.concretePaths)e.expectedPatterns.includes(t)||ft(t,e.controlOnlyPaths)||e.htmlMarkerPaths.includes(t)||e.findings.push(`Exported HTML is missing exact data-preview-${Ht(e.label)}="${t}" for concrete ${e.label}.`)}function zt(e,t,n,r,i){for(let s of t)n.some(a=>Yt(s,a))||r.some(a=>Yt(s,a))||i.push(`data-preview-${e}-path references unknown path "${s}".`)}function Dr(e,t,n,r,i){let s=r.filter(f=>f.kind==="html"),o=n.filter(f=>f.kind==="page"&&f.artifactKind==="html"),a=new Set(t.map(f=>f.id)),l=new Set,u=new Map;t.length===0&&i.push("Strict visual editing requires at least one manifest pages[] entry.");for(let f of t){l.has(f.id)&&i.push(`Manifest pages[] contains duplicate id "${f.id}".`),l.add(f.id);let g=en(f.route)??(e<2?Mr(f.id):null);if(!g){i.push(`Manifest page "${f.id}" must declare a canonical route for strict visual editing.`);continue}let b=u.get(g);b?i.push(`Manifest pages "${b}" and "${f.id}" use duplicate route "${g}".`):u.set(g,f.id);let S=s.filter(p=>tn(p.filePath,g));if(S.length===0){i.push(`Manifest page "${f.id}" route "${g}" has no exported HTML file.`);continue}let m=new Set(S.map(p=>p.filePath));o.some(p=>p.value===f.id&&m.has(p.filePath))||i.push(`Exported route "${g}" is missing data-preview-page-key="${f.id}".`)}for(let f of n.filter(g=>g.kind==="page"))a.has(f.value)||i.push(`${f.filePath}:${Br(f)} data-preview-page-key references unknown manifest page "${f.value}".`)}function Or(e){let t=(e.schema?.sections??[]).map(i=>({section:i,canonicalPath:$e(i.path)})).filter(i=>!!i.canonicalPath),n=new Map(e.pages.map(i=>[i.id,i])),r=(i,s)=>{for(let o of s){if(i==="field"&&ft(o,e.controlOnlyPaths))continue;let a=t.filter(b=>es(o,b.canonicalPath)).sort((b,S)=>S.canonicalPath.length-b.canonicalPath.length)[0];if(!a?.section.pageKey)continue;let l=n.get(a.section.pageKey);if(!l){e.findings.push(`editorSchema section "${a.section.path}" assigns ${kr(i)} "${o}" to unknown manifest page "${a.section.pageKey}".`);continue}let u=en(l.route)??(e.manifestVersion<2?Mr(l.id):null);!u||!e.markers.some(b=>b.kind===i&&b.artifactKind==="html"&&$e(b.value)===o)||e.markers.some(b=>b.kind===i&&b.artifactKind==="html"&&$e(b.value)===o&&tn(b.filePath,u))||e.findings.push(`Page-owned ${kr(i)} "${o}" from editorSchema section "${a.section.path}" must render data-preview-${ts(i)}="${o}" on manifest page "${l.id}" route "${u}". Shared sections without pageKey may render globally.`)}};r("field",G(e.fieldPaths)),r("list",G(e.listPaths)),r("item",G(e.itemPaths))}function es(e,t){let n=Z(e),r=Z(t);return n===r||n.startsWith(`${r}.`)||n.startsWith(`${r}[`)}function kr(e){return e==="field"?"editable field":e==="list"?"editable list":"editable list item"}function ts(e){return e==="field"?"field-path":e==="list"?"list-path":"item-path"}function ns(e,t,n=[]){let r=new Set(n.map(o=>o.id?.trim()).filter(o=>!!o)),i=(o,a)=>{if(!a?.some(l=>typeof l=="string"&&l.trim().length>0)){t.push(`editorSchema select field "${o}" must declare at least one non-empty option for strict visual editing. Add options: ["First option", ...] or change the field type.`);return}if(r.size>0&&/(?:destination|action|targetpage|buttonaction|pagekey)/i.test(o))for(let u of a){let f=typeof u=="string"?u.trim():"";f&&f!=="none"&&f!=="external"&&!r.has(f)&&t.push(`editorSchema select field "${o}" declares destination option "${f}" which is not in fivora-template.json pages[]. Declared pages: ${[...r].join(", ")}.`)}},s=(o,a)=>{if(a.type==="select"){i(o,a.options);return}if(a.type==="object"){for(let u of a.fields??[])s(X(o,u.key),u);return}if(a.type!=="list")return;let l=`${Z(o)}[*]`;a.itemField?.type==="select"&&i(l,a.itemField.options);for(let u of a.fields??[])s(X(l,u.key),u)};for(let o of e?.sections??[])s(o.path,o)}function rs(e,t,n){let r=(s,o)=>{if(o.type==="object"){for(let g of o.fields??[])r(X(s,g.key),g);return}if(o.type!=="list")return;let a=Se(o.minItems),l=Se(o.maxItems);o.minItems!==void 0&&a===null&&n.push(`editorSchema list "${s}" minItems must be a non-negative safe integer.`),o.maxItems!==void 0&&l===null&&n.push(`editorSchema list "${s}" maxItems must be a non-negative safe integer.`);let u=a??(o.required?1:0);l!==null&&u>l&&n.push(`editorSchema list "${s}" requires at least ${u} item${u===1?"":"s"} but maxItems is ${l}. Increase maxItems or lower minItems/required.`);let f=`${Z(s)}[*]`;for(let g of o.fields??[])r(X(f,g.key),g)},i=(s,o,a)=>{if(o.type==="object"){let f=Q(a)?a:{};for(let g of o.fields??[])i(X(s,g.key),g,f[g.key]);return}if(o.type!=="list")return;let l=Array.isArray(a)?a:[],u=Se(o.maxItems);u!==null&&l.length>u&&n.push(`site-data.json content list "${s}" contains ${l.length} items, exceeding editorSchema maxItems ${u}.`);for(let[f,g]of l.entries()){let b=Q(g)?g:{};for(let S of o.fields??[])i(X(`${s}[${f}]`,S.key),S,b[S.key])}};for(let s of e?.sections??[])r(s.path,s),i(s.path,s,is(t??{},s.path))}function Se(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:null}function is(e,t){let n=e;for(let r of t.split(".").map(i=>i.trim())){if(!r||!Q(n))return;n=n[r]}return n}function os(e,t){let n=[/\b(?:setAttribute|setAttributeNS|toggleAttribute)\s*\(\s*['"`]data-preview-static['"`]/m,/\.(?:attr|prop)\s*\(\s*['"`]data-preview-static['"`]/m,/\bdataset\s*(?:\.\s*previewStatic|\[\s*['"`]previewStatic['"`]\s*\])\s*=/m,/\b(?:innerHTML|outerHTML)\s*\+?=[^;]{0,500}data-preview-static/m,/\.(?:replace|replaceAll)\s*\([\s\S]{0,500}?data-preview-static/m];for(let r of e.filter(i=>i.kind==="source")){let i=n.map(f=>f.exec(r.content)).find(f=>!!f),s=r.content.search(/data-preview-static/),o=/\b(?:writeFile|writeFileSync|appendFile|appendFileSync)\s*\(/m.exec(r.content),a=/\.[cm]?[jt]s$/i.test(r.filePath),l=s>=0&&a&&o;if(!i&&!l)continue;let u=i?.index??s;t.push(`${r.filePath}:${U(r.content,u)} programmatically injects data-preview-static. Author each intentional static annotation directly on the smallest source element; blanket or post-build annotation bypasses strict editable-content validation.`)}}function ss(e,t){let n=e.filter(S=>S.kind==="source"),r=n.map(S=>S.content).join(`
|
|
3
3
|
`);if(/(?:import|export)\s+[\s\S]*?\b(?:SiteDataProvider|BaseSiteDataProvider|useSiteData|DenebProvider|DenebSiteDataProvider|DenebUiProvider)\b[\s\S]*?\bfrom\s+['"][^'"]*['"]/m.test(r)||/(?:import|export)\s+[\s\S]*?\bfrom\s+['"](?:@fivora\/|deneb-ui|@deneb-ui\/)/m.test(r)||/<(?:SiteDataProvider|BaseSiteDataProvider|DenebProvider|DenebSiteDataProvider|DenebUiProvider|[A-Za-z_$][\w$]*\.(?:SiteDataProvider|DenebProvider))\b/m.test(r))return;let s=r.includes(st)||r.includes(at),o=r.includes(ct)||r.includes(jt),a=/(?:window|globalThis|self)\s*\.\s*addEventListener\s*\(\s*['"]message['"]/m.test(r)||/(?:window|globalThis|self)\s*\.\s*onmessage\s*=/m.test(r),l=/\bset[A-Z_$][\w$]*\s*\(/m.test(r)||/\bdispatch\s*\(/m.test(r)||/\b(?:store|siteDataStore)\s*\.\s*(?:setState|set|update)\s*\(/m.test(r),u=n.some(S=>{let m=S.content,d=/(?:window|globalThis|self)\s*\.\s*addEventListener\s*\(\s*['"]message['"]/m.test(m)||/(?:window|globalThis|self)\s*\.\s*onmessage\s*=/m.test(m),p=/\bset[A-Z_$][\w$]*\s*\(/m.test(m)||/\bdispatch\s*\(/m.test(m)||/\b(?:store|siteDataStore)\s*\.\s*(?:setState|set|update)\s*\(/m.test(m);return(m.includes(st)||m.includes(at))&&d&&p}),g=/\bcreateContext\s*[<(]/m.test(r)&&/(?:\.Provider\b|<[A-Za-z_$][\w$]*Provider\b)/m.test(r)&&/\buseContext\s*[<(]/m.test(r)||/\buseSyncExternalStore\s*[<(]/m.test(r)||/\bcreate(?:Store|Signal)\s*[<(]/m.test(r)&&/\buse[A-Z_$][\w$]*(?:Store|Data)\s*[<(]/m.test(r),b=n.some(S=>(S.content.includes(ct)||S.content.includes(jt))&&/\bpostMessage\s*\(/m.test(S.content));s||t.push(`Preview runtime source must implement the "${st}" (or legacy "${at}") protocol so editor changes replace the rendered site data instead of remaining in a static JSON import.`),o||t.push(`Preview runtime source must implement the "${ct}" (or legacy "${jt}") protocol so the editor can wait for a live preview before sending data.`),(!a||!l||!u)&&t.push(`Preview runtime source must handle "${st}" (or legacy "${at}") and apply its payload through a reactive state setter, reducer, or store update in the same live-data module.`),g||t.push("Preview runtime source must expose live site data through a recognizable reactive provider/hook (for example createContext + Provider + useContext, useSyncExternalStore, or a reactive store hook). Static site-data.json imports alone cannot be certified."),b||t.push(`Preview runtime source must call postMessage with "${Ko}" after its live-data listener is ready.`)}function as(e,t,n,r){let i=e.filter(S=>S.kind==="source"),s=[/\/products\/\$\{/m,/['"`]\/products\/['"`]\s*\+\s*(?:encodeURIComponent\s*\()?/m];for(let S of i){let m=s.map(d=>d.exec(S.content)).find(d=>!!d);m&&r.push(`${S.filePath}:${U(S.content,m.index)} uses a build-time dynamic /products/:id URL. Live catalog items can be added after a static export, so product links must use the stable exported route /products/detail/?id=... and resolve the ID from the live catalog on the client.`)}let o=Array.isArray(t?.products)||!!n?.sections.some(S=>S.path==="products"||S.path.startsWith("products["))||i.some(S=>/data-preview-(?:list|item|field)-path\s*=\s*(?:["']products|\{\s*`products)/m.test(S.content)),a=i.some(S=>/\bplatformProductDetailHref\s*\(/m.test(S.content)||/\/products\/detail\/?\?[^'"`\s}]*\bid=/m.test(S.content)),l=i.some(S=>/(?:^|\/)src\/(?:app\/products\/detail\/page|pages\/products\/detail)\.[cm]?[jt]sx?$/i.test(S.filePath.replace(/\\/g,"/"))||/\b(?:PlatformProductDetail|usePlatformProductDetail)\b/m.test(S.content)),u=i.some(S=>/(?:^|\/)src\/(?:app\/products\/\[[^/]+\]\/page|pages\/products\/\[[^/]+\])\.[cm]?[jt]sx?$/i.test(S.filePath.replace(/\\/g,"/"))),f=i.some(S=>/\brenderProduct\s*=/m.test(S.content)||/\busePlatformProductDetail\s*\(/m.test(S.content)),g=a||l||o&&u;if(g&&!a&&r.push("Templates with product-detail navigation must link every product through platformProductDetailHref(product.id) or /products/detail/?id=... so products added after the static build use the native detail page."),g&&!l&&r.push("Templates with product-detail navigation must provide a stable client product page at src/app/products/detail/page.* using PlatformProductDetail or usePlatformProductDetail."),g&&u&&l&&!f&&r.push("The template has a native dynamic product-detail page, but its stable live-catalog page does not reuse that design. Pass the native renderer through PlatformProductDetail renderProduct or render it from usePlatformProductDetail so old and newly-added products have the same layout."),!g)return;e.some(S=>S.kind==="html"&&/(?:^|\/)products\/detail\/(?:index\.)?html$/i.test(S.filePath.replace(/\\/g,"/")))||r.push("The template product catalog requires products/detail/index.html, but the static export does not contain it. Add a stable client detail page that reads the query ID and hydrates the matching item from the live catalog.")}function cs(e,t){let n=[];for(let r of e.filter(i=>i.kind==="html"&&!ls(i.filePath,t)))n.push(...ds(r));return n}function ls(e,t){let n=e.replace(/\\/g,"/").replace(/^\/+/,"");return/^(?:404|500|_error|_not-found)(?:\/index)?\.html$/i.test(n)?!t.some(i=>{let s=en(i.route);return s?tn(n,s):!1}):!1}function ds(e){let t=[],n=[],r=e.content.matchAll(/<!--[\s\S]*?-->|<![^>]*>|<\/?[^>]+>|[^<]+/g);for(let i of r){let s=i[0],o=i.index??0,a=n.at(-1);if(s.startsWith("<!--")||s.startsWith("<!"))continue;if(s.startsWith("</")){let u=s.slice(2,-1).trim().split(/\s+/)[0]?.toLowerCase(),f=n.map(g=>g.tag).lastIndexOf(u);f>=0&&(t.push(...us(e,n[f])),n.splice(f));continue}if(s.startsWith("<")){let u=s.match(/^<\s*([a-zA-Z0-9:-]+)/);if(!u)continue;let f=u[1].toLowerCase(),g=/\bdata-preview-field-path\s*=/.test(s),b=/\bdata-preview-list-path\s*=/.test(s),S=/\bdata-preview-item-path\s*=/.test(s),m=g||b||S;if(g)for(let T of n)T.ownsFieldMarker&&(T.hasNestedFieldMarker=!0);let d=s.match(/\bdata-preview-static\s*=\s*(?:"([^"]*)"|'([^']*)')/),p=!!d;p&&!(d?.[1]??d?.[2]??"").trim()&&t.push(`${e.filePath}:${U(e.content,o)} data-preview-static requires a reason.`),m&&(p||a?.staticCovered)&&t.push(`${e.filePath}:${U(e.content,o)} data-preview field/list/item markers cannot be on or inside data-preview-static. The visual editor intentionally ignores targets beneath a static ancestor.`),g&&xr.has(f)&&t.push(`${e.filePath}:${U(e.content,o)} data-preview-field-path cannot be placed on broad <${f}> content containers. Put the marker on the exact visible text, media, link, or control that the field edits.`),p&&xr.has(f)&&t.push(`${e.filePath}:${U(e.content,o)} data-preview-static cannot cover a broad <${f}> content container. Mark only the smallest genuinely non-editable element.`);let h=!!a?.hidden||gs(s,f);m&&h&&t.push(`${e.filePath}:${U(e.content,o)} data-preview field/list/item marker is hidden. Strict visual-edit targets must remain visible and clickable in the exported page.`);let E=s.match(/\bdata-preview-field-path\s*=\s*(?:"([^"]*)"|'([^']*)')/)?.slice(1).find(Boolean)??null,c=s.match(/\bdata-preview-item-path\s*=\s*(?:"([^"]*)"|'([^']*)')/)?.slice(1).find(Boolean)??null;c&&a?.itemPath&&!Ar(c,a.itemPath)&&t.push(`${e.filePath}:${U(e.content,o)} repeated item "${c}" is nested inside unrelated item "${a.itemPath}". One visual card must be one object-list item; do not couple parallel arrays by index.`);let y=c??a?.itemPath??null;E&&y&&/\[\d+\]/.test(E)&&!Ar(E,y)&&t.push(`${e.filePath}:${U(e.content,o)} repeated field "${E}" is rendered inside item "${y}" but belongs to a different list. Model one visual card as one object-list item instead of coupling parallel arrays by index.`);let w={tag:f,ignored:!!a?.ignored||Zo.has(f),hidden:h,fieldCovered:!!a?.fieldCovered||g,staticCovered:!!a?.staticCovered||p,ownsFieldMarker:g,hasNestedFieldMarker:!1,fieldPath:E,itemPath:y,shopAttributeValues:fs(s,f),visibleTextParts:[],offset:o};if(!w.ignored&&!w.fieldCovered&&!w.staticCovered){let T=ms(e,s,f,o);t.push(...T),f==="img"&&!w.hidden&&T.length===0&&t.push(`${e.filePath}:${U(e.content,o)} rendered <img> is not covered by data-preview-field-path or data-preview-static. Bind business media to an exact image field, or mark an intentional fixed/decorative image static with a reason.`)}!Go.has(f)&&!/\/\s*>$/.test(s)&&n.push(w);continue}let l=Qt(s);if(ut(l))for(let u of n)u.ownsFieldMarker&&u.visibleTextParts.push(l);a?.ignored||a?.fieldCovered||a?.staticCovered||ut(l)&&t.push(`${e.filePath}:${U(e.content,o)} visible text "${pt(l,72)}" is not covered by data-preview-field-path or data-preview-static.`)}return t}function Ar(e,t){let n=Te(e).trim(),r=Te(t).trim();return n===r||n.startsWith(`${r}.`)||n.startsWith(`${r}[`)}function us(e,t){if(!t.ownsFieldMarker||t.hasNestedFieldMarker||t.shopAttributeValues.length===0)return[];let n=Qt(t.visibleTextParts.join(" "));return!ut(n)||t.shopAttributeValues.some(r=>ps(r,n))?[]:[`${e.filePath}:${U(e.content,t.offset)} data-preview-field-path="${t.fieldPath??""}" cannot cover both <${t.tag}> action/media attributes and different visible text "${pt(n,72)}". Put the action/media marker on the element and the label marker on an exact nested text element.`]}function fs(e,t){return[...e.matchAll(/\b(href|src|poster)\s*=\s*(?:"([^"]*)"|'([^']*)')/gi)].map(n=>({name:n[1].toLowerCase(),value:Te(n[2]??n[3]??"").trim()})).filter(({name:n,value:r})=>$r(t,n,r)).map(({value:n})=>n)}function ps(e,t){let n=r=>Te(r).replace(/^(?:mailto:|tel:|sms:|https?:\/\/)/i,"").replace(/^www\./i,"").replace(/\/+$/g,"").replace(/\s+/g,"").toLowerCase();return n(e)===n(t)}function ms(e,t,n,r){let i=[],s=[...t.matchAll(/\b(href|src|poster)\s*=\s*(?:"([^"]*)"|'([^']*)')/gi)];for(let f of s){let g=f[1].toLowerCase(),b=Te(f[2]??f[3]??"").trim();$r(n,g,b)&&i.push(`${e.filePath}:${U(e.content,r)} ${n}[${g}="${pt(b,72)}"] is not covered by data-preview-field-path or data-preview-static.`)}let o=[...t.matchAll(/\b(placeholder|alt|title|aria-label|value)\s*=\s*(?:"([^"]*)"|'([^']*)')/gi)],a=t.match(/\btype\s*=\s*(?:"([^"]*)"|'([^']*)')/i),l=(a?.[1]??a?.[2]??"").toLowerCase();for(let f of o){let g=f[1].toLowerCase(),b=Qt(f[2]??f[3]??"");!(g==="aria-label"||g==="title"||g==="alt"&&n==="img"||g==="placeholder"&&["input","textarea"].includes(n)||g==="value"&&["input","button"].includes(n)&&!["hidden","checkbox","radio"].includes(l))||!ut(b)||i.push(`${e.filePath}:${U(e.content,r)} ${n}[${g}="${pt(b,72)}"] is not covered by data-preview-field-path or data-preview-static.`)}let u=t.match(/\bstyle\s*=\s*(?:"([^"]*)"|'([^']*)')/i);return u&&/(?:background|background-image)\s*:[^;]*url\(/i.test(u[1]??u[2]??"")&&i.push(`${e.filePath}:${U(e.content,r)} background image is not covered by data-preview-field-path or data-preview-static.`),i}function gs(e,t){let n=e.replace(/="[^"]*"|='[^']*'/g,'=""');if(/(?<![\w-])hidden(?:[\s=]|\/?>)/i.test(n)||/\baria-hidden\s*=\s*(?:"true"|'true')/i.test(e))return!0;if(t==="input"){let s=e.match(/\btype\s*=\s*(?:"([^"]*)"|'([^']*)')/i);if((s?.[1]??s?.[2]??"").trim().toLowerCase()==="hidden")return!0}let r=e.match(/\bstyle\s*=\s*(?:"([^"]*)"|'([^']*)')/i),i=r?.[1]??r?.[2]??"";return/\bdisplay\s*:\s*none\b/i.test(i)||/\bvisibility\s*:\s*hidden\b/i.test(i)}function hs(e,t){let n=new Set,r=new Set;for(let i of e?.sections??[])n.has(i.id)&&t.push(`editorSchema.sections contains duplicate id "${i.id}".`),r.has(i.path)&&t.push(`editorSchema.sections contains duplicate path "${i.path}".`),n.add(i.id),r.add(i.path)}function ys(e,t){for(let n of rt(e)){let r=n.firstKind===n.duplicateKind?n.firstKind:"field/list";t.push(`editorSchema declares duplicate editable ${r} path "${n.path}" in sections "${n.firstSectionId}" and "${n.duplicateSectionId}". Each editable path must be owned by exactly one section.`)}}function $r(e,t,n){return!n||n.startsWith("data:")||n.startsWith("blob:")||n.includes("/_next/")||n.includes("${")?!1:t==="href"?e==="a"&&!/^(?:javascript:|data:|blob:)/i.test(n):t==="src"&&["img","video","source"].includes(e)||t==="poster"&&e==="video"}function Qt(e){return Te(e).replace(/\s+/g," ").trim()}function ut(e){return e.length<=2||!new RegExp("\\p{L}","u").test(e)?!1:!/^(?:true|false|null|undefined)$/i.test(e)}function Ht(e){return e==="editable field"?"field-path":e==="editable list"?"list-path":"item-path"}function Es(e,t){return t.includes("[*]")?e.includes("[*]")&&e===t:e===t}function Yt(e,t){return Z(e)===Z(t)}function ft(e,t){return t.some(n=>n.includes("[*]")?Z(e)===n:e===n)}function $e(e){let t=e.trim().replace(/\[\s*\$\{[^}]+\}\s*\]/g,"[*]").replace(/\[\s+/g,"[").replace(/\s+\]/g,"]");return qo.test(t)?t:null}function Z(e){return e.replace(/\[\d+\]/g,"[*]")}function X(e,t){return e?`${e}.${t}`:t}function en(e){if(!e)return null;let t=e.trim();return!t.startsWith("/")||t.includes("?")||t.includes("#")||t.includes("\\")||t.includes("..")?null:t==="/"?t:t.replace(/\/+$/,"")}function Mr(e){return e==="home"?"/":`/${e}`}function tn(e,t){let n=e.replace(/\\/g,"/").replace(/^\/+/,"");if(t==="/")return n==="index.html";let r=t.replace(/^\/+/,"");return n===`${r}.html`||n===`${r}/index.html`}function Q(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Te(e){return e.replace(/"/gi,'"').replace(/'|'/gi,"'").replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&").replace(/ /gi," ")}function Br(e){return e.line}function U(e,t){let n=1;for(let r=0;r<t;r+=1)e.charCodeAt(r)===10&&(n+=1);return n}function G(e){return[...new Set(e)].sort()}function pt(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}\u2026`}function Vr(e){let t=e.filter((n,r)=>n.required===!0||r===0).map(n=>n.id);return t.length>0?t:e.slice(0,1).map(n=>n.id)}function jr(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function bs(e,t,n){let r=e.trim().split(/[?#]/,1)[0];return r==="/"||r===""?n?"/":`/${t}`:/^[a-z][a-z0-9+.-]*:/i.test(r)||r.startsWith("//")?n?"/":`/${t}`:`/${r.replace(/^\/+|\/+$/g,"")}`}function Ur(e,t=[]){let r=(jr(e)&&Array.isArray(e.pages)?e.pages:[]).flatMap((s,o)=>{if(!jr(s)||typeof s.id!="string"||!s.id.trim())return[];let a=s.id.trim(),l=typeof s.label=="string"&&s.label.trim()?s.label.trim():a.replace(/_/g," ");return[{id:a,label:l,route:bs(typeof s.route=="string"?s.route:"",a,o===0)}]});return r.length>0?r:t.map(s=>s.trim()).filter(Boolean).map((s,o)=>({id:s,label:s.replace(/_/g," "),route:o===0?"/":`/${s}`}))}function zr(e){let t=new Set(e.selectedPages),n=e.pageDefinitions.filter(i=>!t.has(i.id)),r=[];for(let i of e.html.matchAll(/<[a-z][^>]*\b(?:href|formaction|data-href|data-route|data-url)\s*=\s*(?:"([^"]*)"|'([^']*)')[^>]*>/gi)){let s=i[1]??i[2]??"";if(!s.trim()||s.trim().startsWith("#")||/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(s.trim()))continue;let o=s.split(/[?#]/,1)[0],a=e.basePath?.replace(/\/+$/g,"")||"",u=`/${(a&&(o===a||o.startsWith(`${a}/`))?o.slice(a.length)||"/":o).replace(/\/index\.html$/i,"/").replace(/\.html$/i,"").replace(/^\.\//,"").replace(/^\/+|\/+$/g,"")}`,f=u==="/"?"/":u,g=n.find(b=>{let S=b.route==="/"?"/":`/${b.route.replace(/^\/+|\/+$/g,"")}`;return S==="/"?f==="/":f===S||f.startsWith(`${S}/`)});g&&r.push({pageId:g.id,route:g.route,href:o})}return r}function Hr(e){let t=e.basePath.replace(/^\/+|\/+$/g,"");if(!t)return[];let n=new Set;for(let r of e.html.matchAll(/<[a-z][^>]*\b(?:href|formaction|data-href|data-route|data-url)\s*=\s*(?:"([^"]*)"|'([^']*)')[^>]*>/gi)){let i=(r[1]??r[2]??"").trim(),s=i.split(/[?#]/,1)[0].replace(/^\.\//,"");(s===t||s.startsWith(`${t}/`))&&n.add(i)}return[...n]}function Wr(e){let t=[],n=new Set(["router","navigation"]),r=new Set(["useRouter"]),i=new Set(["Link"]),s=d=>d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=d=>{let p=d.replace(/\s+/g," ").trim();return p.length>180?`${p.slice(0,177)}...`:p},a=(d,p,h)=>{let E=1,c=null,y=!1,w=!1,T=!1;for(let P=d;P<e.length;P+=1){let x=e[P],v=e[P+1];if(w){x===`
|
|
4
4
|
`&&(w=!1);continue}if(T){x==="*"&&v==="/"&&(T=!1,P+=1);continue}if(c){y?y=!1:x==="\\"?y=!0:x===c&&(c=null);continue}if(x==="/"&&v==="/"){w=!0,P+=1;continue}if(x==="/"&&v==="*"){T=!0,P+=1;continue}if(x==="'"||x==='"'||x==="`"){c=x;continue}if(x===p)E+=1;else if(x===h&&(E-=1,E===0))return e.slice(d,P)}return e.slice(d,Math.min(e.length,d+4e3))},l=d=>{let p=c=>c.replace(/'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/g," ").replace(/`(?:\\.|[^`\\])*`/g," ").replace(/\/\*[\s\S]*?\*\//g," ").replace(/\/\/[^\r\n]*/g," "),h=[...d.matchAll(/\$\{([\s\S]*?)\}/g)].map(c=>p(c[1])).join(" "),E=p(d);return/\b(?:[A-Za-z_$][\w$]*\s*\.\s*)*(?:[A-Za-z_$][\w$]*(?:base_?path|path_?base)[\w$]*|platformProductDetailHref)\b/i.test(`${E} ${h}`)},u=(d,p)=>{t.push({line:e.slice(0,d).split(/\r?\n/).length,expression:o(p),offset:d})};for(let d of e.matchAll(/\bimport\s*\{([^}]*)\}\s*from\s*['"]next\/(?:navigation|router)['"]/g))for(let p of d[1].split(",")){let h=p.trim().match(/^useRouter(?:\s+as\s+([A-Za-z_$][\w$]*))?$/)?.[1];h&&r.add(h)}let f=[...r].map(s).join("|"),g=new RegExp(`\\b(?:const|let|var)\\s+([A-Za-z_$][\\w$]*)\\s*(?::[^=;]+)?=\\s*(?:${f})\\s*\\(`,"g");for(let d of e.matchAll(g))n.add(d[1]);for(let d of e.matchAll(/\bimport\s+([^;]{0,300}?)\s+from\s*['"]next\/link['"]/g)){let p=d[1].trim(),h=p.match(/^([A-Za-z_$][\w$]*)/i)?.[1];h&&h!=="type"&&i.add(h);for(let E of p.matchAll(/\bdefault\s+as\s+([A-Za-z_$][\w$]*)/g))i.add(E[1])}for(let d of e.matchAll(/\b([A-Za-z_$][\w$]*)\s*\.\s*(push|replace|prefetch)\s*\(/g)){let p=d[1];if(!n.has(p)&&!/(?:router|navigation)/i.test(p))continue;let h=a((d.index??0)+d[0].length,"(",")");l(h)&&u(d.index??0,`${p}.${d[2]}(${h})`)}let b=new RegExp(`\\b(?:${f})\\s*\\(\\s*\\)\\s*\\.\\s*(push|replace|prefetch)\\s*\\(`,"g");for(let d of e.matchAll(b)){let p=a((d.index??0)+d[0].length,"(",")");l(p)&&u(d.index??0,`${d[0]}${p})`)}let S=[...i].map(s).join("|"),m=new RegExp(`<(${S})\\b[^>]{0,2000}?\\bhref\\s*=\\s*\\{`,"g");for(let d of e.matchAll(m)){let p=a((d.index??0)+d[0].length,"{","}");l(p)&&u(d.index??0,`<${d[1]} href={${p}}>`)}return t.sort((d,p)=>d.offset-p.offset).filter((d,p,h)=>p===0||d.offset!==h[p-1].offset).map(({line:d,expression:p})=>({line:d,expression:p}))}var wt=kt(Pi());function Ii(e){let t=[],n=new Set;for(let s of e.artifacts)if(s.kind==="html")for(let o of(0,wt.collectStyleTargetsFromHtml)(s.content))n.add(o);let i=(e.siteData&&typeof e.siteData=="object"&&!Array.isArray(e.siteData)?e.siteData:null)?.styles;return t.push(...(0,wt.validateStyleTree)(i,n.size>0?n:void 0)),t}var Le="deneb-template-validator",Ct="1.0.0",Pt="fivora-template.json",Li=2500,Ni=12*1024*1024,It="/uploads/generated-sites/template-preview/simulation",ta=`https://fivora.example.invalid${It}/`,na={NODE_ENV:"development",NPM_CONFIG_PRODUCTION:"false",npm_config_production:"false",NPM_CONFIG_INCLUDE:"dev",npm_config_include:"dev",NPM_CONFIG_OMIT:"",NPM_CONFIG_omit:"",NPM_CONFIG_IGNORE_SCRIPTS:"true",npm_config_ignore_scripts:"true",NPM_CONFIG_PREFER_OFFLINE:"true",npm_config_prefer_offline:"true",NPM_CONFIG_AUDIT:"false",npm_config_audit:"false",NPM_CONFIG_FUND:"false",npm_config_fund:"false",NPM_CONFIG_UPDATE_NOTIFIER:"false",npm_config_update_notifier:"false",NPM_CONFIG_PROGRESS:"false",npm_config_progress:"false",PNPM_CONFIG_IGNORE_SCRIPTS:"true",YARN_IGNORE_SCRIPTS:"true",YARN_PRODUCTION:"false"},hn=class{constructor(t,n){this.options=t;this.report={validator:Le,version:Ct,command:t.command,input:(0,_.resolve)(t.inputPath),status:"passed",startedAt:n.toISOString(),durationMs:0,steps:[],warnings:[]}}options;report;async step(t,n,r){let i=Date.now();this.options.json||process.stdout.write(`\u2192 ${t}
|
|
5
5
|
`);try{let s=await n();return this.report.steps.push({name:t,status:"passed",durationMs:Date.now()-i,...r?{detail:r}:{}}),this.options.json||process.stdout.write(` \u2713 ${t} (${vi(Date.now()-i)})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// Generated from visual editor bridge (v51).
|
|
4
|
-
module.exports = "var on=Object.defineProperty;var an=(j,C,T)=>C in j?on(j,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):j[C]=T;var te=(j,C,T)=>an(j,typeof C!=\"symbol\"?C+\"\":C,T);var __name=typeof __name==\"function\"?__name:((j,C)=>typeof Object.defineProperty==\"function\"?Object.defineProperty(j,\"name\",{value:C,configurable:!0}):j);(function(C,T,I,P,q,a,d){try{if(typeof Node<\"u\"&&Node.prototype){const t=Node.prototype.removeChild;Node.prototype.removeChild=function(r){return r&&r.parentNode!==this?(typeof console<\"u\"&&typeof console.warn==\"function\"&&console.warn(\"PreviewBridge: removeChild on non-child node prevented from crashing React\",r),r):t.apply(this,arguments)};const e=Node.prototype.insertBefore;Node.prototype.insertBefore=function(r,o){return o&&o.parentNode!==this?(typeof console<\"u\"&&typeof console.warn==\"function\"&&console.warn(\"PreviewBridge: insertBefore on non-child reference node prevented from crashing React\",o),r):e.apply(this,arguments)}}typeof document<\"u\"&&document.documentElement&&(document.documentElement.setAttribute(\"data-gramm\",\"false\"),document.documentElement.setAttribute(\"data-gramm_editor\",\"false\"),document.documentElement.setAttribute(\"data-enable-grammarly\",\"false\"),document.documentElement.setAttribute(\"translate\",\"no\"))}catch{}const c=`${[\"MARKET\",\"PLACE\"].join(\"\")}_PREVIEW_`,y=__name(t=>`${c}${t}`,\"previousPreviewMessage\"),E=__name(t=>`__${c}${t}__`,\"previousPreviewStorageKey\"),x=\"FIVORA_PREVIEW_FOCUS_PAGE\",v=y(\"FOCUS_PAGE\"),N=\"FIVORA_PREVIEW_FOCUS_RESULT\",G=y(\"FOCUS_RESULT\"),R=\"FIVORA_PREVIEW_READY\",et=y(\"READY\"),O=\"data-fivora-preview-active-field\",_=\"data-fivora-resolved-field-path\",M=\"data-fivora-empty-editable\",V=\"data-fivora-empty-collection\",U=\"data-preview-list-path\",X=\"data-preview-item-path\",K=\"data-preview-static\",Z=\"__FIVORA_UNIVERSAL_PREVIEW_FOCUS__\",Q=\"__FIVORA_VISUAL_EDITOR_TARGETS__\",gt=\"__FIVORA_PREVIEW_PARENT_ORIGIN__\",Et=E(\"PARENT_ORIGIN\"),g=\"__FIVORA_PREVIEW_SITE_DATA_CACHE__\",l=E(\"SITE_DATA_CACHE\"),f=\"__FIVORA_PREVIEW_SITE_DATA__\",h=E(\"SITE_DATA\"),D=\"FIVORA_PREVIEW_SITE_DATA\",L=y(\"SITE_DATA\"),H=\"FIVORA_PREVIEW_SITE_DATA_APPLIED\",W=y(\"SITE_DATA_APPLIED\"),mt=\"FIVORA_PREVIEW_CONTENT_PATCH\",_r=y(\"CONTENT_PATCH\"),kr=\"FIVORA_PREVIEW_STYLE_PATCH\",Me=\"fivora-template-color-replacements\",Or=[200],Lr=2500,Mr=1600,Fr=12e3,Le=class Le{constructor(){te(this,\"elementToPath\",new WeakMap);te(this,\"pathToElements\",new Map);te(this,\"dynamicTargets\",new Set)}getPath(e){return this.elementToPath.get(e)}findTargets(e){return Array.from(this.pathToElements.get(e)??[])}getDynamicTargets(){return Array.from(this.dynamicTargets)}register(e,r){this.elementToPath.set(e,r),this.pathToElements.has(r)||this.pathToElements.set(r,new Set),this.pathToElements.get(r).add(e),this.dynamicTargets.add(e)}clear(){this.pathToElements.clear(),this.dynamicTargets.clear()}};__name(Le,\"TargetRegistry\");let ee=Le;const Fe=new ee,Nr=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small\";let re=[];const Ne=new Map;let De=0,ne=!1,kt=null,oe,ie=[],at=null,k=null,Be=\"\",He=\"\",Ve=\"\";function ht(){try{window.sessionStorage.removeItem(Z)}catch{}}__name(ht,\"clearPendingFocus\");function ae(){try{return window.sessionStorage.getItem(gt)||window.sessionStorage.getItem(Et)}catch{return null}}__name(ae,\"readRememberedParentOrigin\");function se(t){if(t)try{window.sessionStorage.setItem(gt,t)}catch{}}__name(se,\"rememberParentOrigin\");function qe(){for(const t of ie)window.clearTimeout(t);ie=[]}__name(qe,\"clearSiteDataRelayTimers\");function Ge(){const t=new Set;ct&&t.add(ct),t.add(window.location.origin);const e=ae();e&&t.add(e);try{if(document.referrer){const r=new URL(document.referrer).origin;r&&r!==\"null\"&&t.add(r)}}catch{}try{const r=window.location.ancestorOrigins?.item(0);r&&t.add(r)}catch{}return Array.from(t)}__name(Ge,\"collectSiteDataRelayOrigins\");function Ot(t,e){const r=Ge(),o=e?.fanOut?r:r.slice(0,1);for(const i of o)for(const n of[D,L])try{window.dispatchEvent(new MessageEvent(\"message\",{data:{type:n,siteData:t,__fivoraBridgeRelay:!0},origin:i,source:window.parent}))}catch{}}__name(Ot,\"relaySiteDataToTemplateRuntime\");function Lt(t,e){k=t;try{window[f]=t,window[h]=t}catch{}const r=__name(()=>{at=null;try{const o=JSON.stringify(k);window.sessionStorage.setItem(g,o),window.sessionStorage.setItem(l,o)}catch{}},\"writeSessionCache\");if(e?.immediate){at!==null&&(window.clearTimeout(at),at=null),r();return}at!==null&&window.clearTimeout(at),at=window.setTimeout(r,Lr)}__name(Lt,\"persistSiteData\");function We(t){const e=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,r=e?.requirements&&typeof e.requirements==\"object\"&&!Array.isArray(e.requirements)?e.requirements:null,o=e?.template&&typeof e.template==\"object\"&&!Array.isArray(e.template)?e.template:null,i=o?.structure&&typeof o.structure==\"object\"&&!Array.isArray(o.structure)?o.structure:null;try{return JSON.stringify({requiredPages:r?.requiredPages??null,pages:i?.pages??null,pageDefinitions:o?.pageDefinitions??i?.pageDefinitions??null})}catch{return String(Date.now())}}__name(We,\"pagesSignature\");let st=null,lt=null;function je(t){const e=[];for(const r of t.matchAll(/([^.[\\]]+)|\\[(\\d+)\\]/g))r[2]!==void 0?e.push(Number(r[2])):r[1]&&e.push(r[1]);return e}__name(je,\"parseFieldPath\");function Ue(t,e,r){if(e.length===0)return t;const o=__name((i,n)=>{const s=e[n],u=n===e.length-1,p=u?void 0:e[n+1];if(typeof s==\"number\"){const w=(Array.isArray(i)?i:[]).slice();if(u)return w[s]=r,w;const F=w[s];return w[s]=F==null||typeof F!=\"object\"?o(typeof p==\"number\"?[]:{},n+1):o(F,n+1),w}const m={...i&&typeof i==\"object\"&&!Array.isArray(i)?i:{}};if(u)return m[s]=r,m;const S=m[s];return m[s]=S==null||typeof S!=\"object\"?o(typeof p==\"number\"?[]:{},n+1):o(S,n+1),m},\"setAt\");return o(t,0)}__name(Ue,\"setValueAtPath\");function ze(){return(k&&typeof k==\"object\"&&!Array.isArray(k)?k:{}).content??{}}__name(ze,\"readPublishedContent\");function le(t){const r={...k&&typeof k==\"object\"&&!Array.isArray(k)?k:{},content:t};k=r;try{window[f]=r,window[h]=r}catch{}return r}__name(le,\"writePublishedContent\");function ce(){st!==null&&window.clearTimeout(st),st=window.setTimeout(()=>{st=null,k!=null&&Ot(k,{fanOut:!1})},Mr)}__name(ce,\"scheduleContentOnlyRelay\");function Mt(){lt!==null&&window.clearTimeout(lt),lt=window.setTimeout(()=>{if(lt=null,k==null)return;const t=window;if(typeof t.requestIdleCallback==\"function\"){t.requestIdleCallback(()=>{k!=null&&Lt(k,{immediate:!0})},{timeout:4e3});return}Lt(k,{immediate:!0})},Fr)}__name(Mt,\"scheduleContentOnlyPersist\");function de(t,e){const r=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [${_}=\"${CSS.escape(t)}\"]`));for(const o of r){if(tt?.target===o)continue;if(o.tagName===\"IMG\"){typeof e==\"string\"&&e.trim()&&o.setAttribute(\"src\",e);continue}if(typeof e!=\"string\"&&typeof e!=\"number\"&&typeof e!=\"boolean\")continue;const i=(o.getAttribute(\"data-fivora-value-prefix\")??\"\")+String(e)+(o.getAttribute(\"data-fivora-value-suffix\")??\"\");if(o.childElementCount===0)o.textContent=i;else{const n=Array.from(o.childNodes).find(s=>s.nodeType===Node.TEXT_NODE&&s.textContent?.trim());n?n.textContent=i:o.textContent=i}J&&(i.trim().length===0?o.setAttribute(M,\"true\"):o.removeAttribute(M))}}__name(de,\"applyDomFieldValue\");function Ke(t){if(!Array.isArray(t)||t.length===0)return;let e=ze();for(const r of t){if(!r||typeof r.path!=\"string\"||!r.path.trim())continue;const o=je(r.path);o.length!==0&&(e=Ue(e,o,r.value),de(r.path,r.value))}le(e),ce(),Mt()}__name(Ke,\"publishContentPatches\");function Ye(t){le(t),ce(),Mt()}__name(Ye,\"publishContentOnly\");function Je(t,e){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(t)||!e||typeof e!=\"object\"||Array.isArray(e))return;const r=k&&typeof k==\"object\"&&!Array.isArray(k)?k:{},o=r.template&&typeof r.template==\"object\"&&!Array.isArray(r.template)?r.template:{},i=o.structure&&typeof o.structure==\"object\"&&!Array.isArray(o.structure)?o.structure:{},n=(i.theme&&typeof i.theme==\"object\"&&!Array.isArray(i.theme)?i.theme:o.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:{})||{},s=n.elementStyles&&typeof n.elementStyles==\"object\"&&!Array.isArray(n.elementStyles)?n.elementStyles:{},u=e&&typeof e==\"object\"&&Object.values(e).some(A=>A!=null&&A!==\"\"),p={...s};u?p[t]=e:delete p[t];const b={...n,designCustomizationVersion:1,elementStyles:p},m={...o,theme:b,structure:{...i,theme:b}},S={...r,template:m};k=S,xt(S),Xe(t,e),Mt()}__name(Je,\"publishElementStylePatch\");function Xe(t,e){if(!t||!e||typeof e!=\"object\"||Array.isArray(e))return;const r=e;let o=[];if(t.includes(\":\")){const[n,s]=t.split(\":\");s===\"card\"?o=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(n)}\"] [data-preview-item-path], [data-preview-list-path=\"${CSS.escape(n)}\"] .card, [data-preview-list-path=\"${CSS.escape(n)}\"] article`)):s&&(o=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(n)}\"] [data-preview-field-path$=\".${CSS.escape(s)}\"], [data-preview-list-path=\"${CSS.escape(n)}\"] [data-field-path$=\".${CSS.escape(s)}\"]`)))}else o=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [data-preview-item-path=\"${CSS.escape(t)}\"], [data-preview-style-target=\"${CSS.escape(t)}\"], [data-field-path=\"${CSS.escape(t)}\"], [data-content-path=\"${CSS.escape(t)}\"]`));const i=__name(n=>n==null||n===\"\"?\"\":typeof n==\"number\"?`${n}px`:String(n),\"toCssVal\");for(const n of o){if(r.color?(n.style.setProperty(\"color\",String(r.color),\"important\"),n.style.setProperty(\"--deneb-color\",String(r.color))):(n.style.removeProperty(\"color\"),n.style.removeProperty(\"--deneb-color\")),r.textAlign?(n.style.setProperty(\"text-align\",String(r.textAlign),\"important\"),n.style.setProperty(\"--deneb-text-align\",String(r.textAlign))):(n.style.removeProperty(\"text-align\"),n.style.removeProperty(\"--deneb-text-align\")),r.fontSize){const s=i(r.fontSize);n.style.setProperty(\"font-size\",s,\"important\"),n.style.setProperty(\"--deneb-font-size\",s)}else n.style.removeProperty(\"font-size\"),n.style.removeProperty(\"--deneb-font-size\");if(r.fontFamily?(n.style.setProperty(\"font-family\",String(r.fontFamily),\"important\"),n.style.setProperty(\"--deneb-font-family\",String(r.fontFamily))):(n.style.removeProperty(\"font-family\"),n.style.removeProperty(\"--deneb-font-family\")),r.lineHeight?(n.style.setProperty(\"line-height\",String(r.lineHeight),\"important\"),n.style.setProperty(\"--deneb-line-height\",String(r.lineHeight))):(n.style.removeProperty(\"line-height\"),n.style.removeProperty(\"--deneb-line-height\")),r.fontWeight?(n.style.setProperty(\"font-weight\",String(r.fontWeight),\"important\"),n.style.setProperty(\"--deneb-font-weight\",String(r.fontWeight))):(n.style.removeProperty(\"font-weight\"),n.style.removeProperty(\"--deneb-font-weight\")),r.letterSpacing?(n.style.setProperty(\"letter-spacing\",i(r.letterSpacing),\"important\"),n.style.setProperty(\"--deneb-letter-spacing\",i(r.letterSpacing))):(n.style.removeProperty(\"letter-spacing\"),n.style.removeProperty(\"--deneb-letter-spacing\")),r.textTransform?(n.style.setProperty(\"text-transform\",String(r.textTransform),\"important\"),n.style.setProperty(\"--deneb-text-transform\",String(r.textTransform))):(n.style.removeProperty(\"text-transform\"),n.style.removeProperty(\"--deneb-text-transform\")),r.backgroundColor?(n.style.setProperty(\"background-color\",String(r.backgroundColor),\"important\"),n.style.setProperty(\"background\",String(r.backgroundColor),\"important\"),n.style.setProperty(\"--deneb-card-bg\",String(r.backgroundColor))):(n.style.removeProperty(\"background-color\"),n.style.removeProperty(\"background\"),n.style.removeProperty(\"--deneb-card-bg\")),r.borderRadius){const s=i(r.borderRadius);n.style.setProperty(\"border-radius\",s,\"important\"),n.style.setProperty(\"--deneb-card-radius\",s)}else n.style.removeProperty(\"border-radius\"),n.style.removeProperty(\"--deneb-card-radius\");if(r.padding){const s=i(r.padding);n.style.setProperty(\"padding\",s,\"important\"),n.style.setProperty(\"--deneb-card-pt\",s)}else n.style.removeProperty(\"padding\"),n.style.removeProperty(\"--deneb-card-pt\");if(r.paddingTop?n.style.setProperty(\"padding-top\",i(r.paddingTop),\"important\"):n.style.removeProperty(\"padding-top\"),r.paddingBottom?n.style.setProperty(\"padding-bottom\",i(r.paddingBottom),\"important\"):n.style.removeProperty(\"padding-bottom\"),r.paddingLeft?n.style.setProperty(\"padding-left\",i(r.paddingLeft),\"important\"):n.style.removeProperty(\"padding-left\"),r.paddingRight?n.style.setProperty(\"padding-right\",i(r.paddingRight),\"important\"):n.style.removeProperty(\"padding-right\"),r.boxShadow?(n.style.setProperty(\"box-shadow\",String(r.boxShadow),\"important\"),n.style.setProperty(\"--deneb-card-shadow\",String(r.boxShadow))):(n.style.removeProperty(\"box-shadow\"),n.style.removeProperty(\"--deneb-card-shadow\")),r.borderColor?(n.style.setProperty(\"border-color\",String(r.borderColor),\"important\"),n.style.setProperty(\"--deneb-card-border-c\",String(r.borderColor))):(n.style.removeProperty(\"border-color\"),n.style.removeProperty(\"--deneb-card-border-c\")),r.borderWidth){const s=i(r.borderWidth);n.style.setProperty(\"border-width\",s,\"important\"),n.style.setProperty(\"border-style\",\"solid\",\"important\"),n.style.setProperty(\"--deneb-card-border-w\",s)}else n.style.removeProperty(\"border-width\"),n.style.removeProperty(\"border-style\"),n.style.removeProperty(\"--deneb-card-border-w\");r.marginTop?n.style.setProperty(\"margin-top\",i(r.marginTop),\"important\"):n.style.removeProperty(\"margin-top\"),r.marginBottom?n.style.setProperty(\"margin-bottom\",i(r.marginBottom),\"important\"):n.style.removeProperty(\"margin-bottom\"),r.marginLeft?n.style.setProperty(\"margin-left\",i(r.marginLeft),\"important\"):n.style.removeProperty(\"margin-left\"),r.marginRight?n.style.setProperty(\"margin-right\",i(r.marginRight),\"important\"):n.style.removeProperty(\"margin-right\"),r.display?n.style.setProperty(\"display\",String(r.display),\"important\"):n.style.removeProperty(\"display\"),r.order!==void 0&&r.order!==null&&r.order!==\"\"?n.style.setProperty(\"order\",String(r.order),\"important\"):n.style.removeProperty(\"order\")}}__name(Xe,\"applyElementStyleDirectly\");function Ft(t,e){if(e?.contentOnly){const r=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null;Ye(r?.content??t);return}if(st!==null&&(window.clearTimeout(st),st=null),lt!==null&&(window.clearTimeout(lt),lt=null),ne){kt=t,oe=e;return}ne=!0;try{if(Lt(t,{immediate:e?.persistImmediate}),ue(t),xt(t,{colorReplacements:e?.colorReplacements===!0}),Ot(t,{fanOut:e?.fanOut===!0}),e?.scheduleRelays!==!1){qe();for(const r of Or)ie.push(window.setTimeout(()=>{k!=null&&Ot(k,{fanOut:!0})},r))}}finally{if(ne=!1,kt!=null){const r=kt,o=oe;kt=null,oe=void 0,window.setTimeout(()=>{Ft(r,o)},0)}}}__name(Ft,\"publishSiteData\");function Ze(t){const e=t?.full!==!1,r=\"ontouchstart\"in window||navigator.maxTouchPoints>0||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4;window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{try{Y({type:H,full:e}),Y({type:W,full:e})}catch{}const o=k;if(o==null)return;const i=__name(()=>xt(o,{colorReplacements:!0}),\"run\");if(!r){window.setTimeout(i,0);return}const n=window.requestIdleCallback;typeof n==\"function\"?n(i,{timeout:4e3}):window.setTimeout(i,1200)})})}__name(Ze,\"acknowledgeSiteDataApplied\");const Dr=(()=>{try{return window.location.ancestorOrigins?.item(0)??null}catch{return null}})(),Br=(()=>{try{return window.parent!==window?window.parent.location.origin:null}catch{return null}})();let ct=C({currentOrigin:window.location.origin,referrer:document.referrer,rememberedOrigin:ae(),ancestorOrigin:Dr,accessibleParentOrigin:Br});se(ct);function Qe(t){if(t.source!==window.parent)return!1;if(ct)return t.origin===ct;try{const e=new URL(t.origin).origin;return e===\"null\"?!1:(ct=e,se(e),!0)}catch{return!1}}__name(Qe,\"isTrustedParentMessage\");function Y(t){window.parent.postMessage(t,ct??\"*\")}__name(Y,\"postToParent\");function yt(t,e,r=0){t.requestId&&(Y({type:N,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:r}),Y({type:G,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:r}))}__name(yt,\"postFocusResult\");function Ct(){try{Y({type:R,pathname:window.location.pathname}),Y({type:et,pathname:window.location.pathname})}catch{}}__name(Ct,\"announceReady\");async function tr(t){const e=++De,o=(t&&typeof t==\"object\"&&!Array.isArray(t)?t:null)?.colorReplacements,i=document.getElementById(Me);if(!o||typeof o!=\"object\"||Array.isArray(o)||Object.keys(o).length===0){i?.remove();return}const n=Array.from(document.querySelectorAll('link[rel=\"stylesheet\"][href]')),s=await Promise.all(n.map(async b=>{const m=b.href;let S=Ne.get(m);if(S===void 0){const w=await fetch(m,{credentials:\"same-origin\"});if(!w.ok)return\"\";S=await w.text(),Ne.set(m,S)}const A=I(S,o);return A===S?\"\":A}));if(e!==De)return;const u=s.filter(Boolean).join(`\n`);if(!u){i?.remove();return}const p=i instanceof HTMLStyleElement?i:document.createElement(\"style\");p.id=Me,p.textContent=u,p.isConnected||document.head.appendChild(p)}__name(tr,\"applyTemplateColorReplacements\");function xt(t,e){const r=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,o=r?.template&&typeof r.template==\"object\"&&!Array.isArray(r.template)?r.template:null,i=o?.structure&&typeof o.structure==\"object\"&&!Array.isArray(o.structure)?o.structure:null,n=i?.theme&&typeof i.theme==\"object\"&&!Array.isArray(i.theme)?i.theme:o?.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:null,s=(()=>{try{return JSON.stringify(n??null)}catch{return String(Date.now())}})();if(s!==Be){Be=s;const p=n&&typeof n==\"object\"&&!Array.isArray(n)?n:null,b=typeof p?.backgroundColor==\"string\"?p.backgroundColor:typeof p?.background==\"string\"?p.background:\"\";(b&&/^#[0-9a-f]{3,6}$/i.test(b.trim())?(()=>{const w=b.trim().toLowerCase(),F=w.length===4?`#${w[1]}${w[1]}${w[2]}${w[2]}${w[3]}${w[3]}`:w,B=Number.parseInt(F.slice(1,3),16),At=Number.parseInt(F.slice(3,5),16),St=Number.parseInt(F.slice(5,7),16);return(B*299+At*587+St*114)/1e3<130})():!1)?(document.documentElement.classList.add(\"dark\"),document.documentElement.setAttribute(\"data-theme\",\"dark\"),document.body&&(document.body.classList.add(\"dark\"),document.body.setAttribute(\"data-theme\",\"dark\"))):b&&(document.documentElement.classList.remove(\"dark\"),document.documentElement.setAttribute(\"data-theme\",\"light\"),document.body&&(document.body.classList.remove(\"dark\"),document.body.setAttribute(\"data-theme\",\"light\")));const S=T(n),A=document.getElementById(P);if(!S)A?.remove();else{const w=A instanceof HTMLStyleElement?A:document.createElement(\"style\");w.id=P,w.textContent=S,w.isConnected||document.head.appendChild(w)}}if(e?.colorReplacements){if(s===He)return;He=s,tr(n).catch(()=>{})}}__name(xt,\"applyUniversalTheme\");function ue(t){const e=We(t);e!==Ve&&(Ve=e,q(t,document),window.setTimeout(()=>q(t,document),300))}__name(ue,\"applySelectedPages\");function $(t){return String(t??\"\").trim().replace(/\\s+/g,\" \").toLowerCase()}__name($,\"normalizeText\");function Nt(t){const e=String(t??\"\").trim();if(!e)return[];const r=e.split(/[,;|\\n\\r]+/).map(o=>$(o)).filter(o=>o.length>=3);return Array.from(new Set([$(e),...r])).filter(o=>o.length>=2)}__name(Nt,\"valueFragments\");function Dt(t,e){const r=$(e),o=$(t);return/image|photo|logo|banner|thumbnail|cover/.test(r)||/^(https?:|data:|blob:|\\/)/.test(o)}__name(Dt,\"isImageValue\");function er(t){const e=new Set,r=t.getAttribute(\"src\")||\"\";r&&e.add(r),\"src\"in t&&t.src&&e.add(t.src),\"currentSrc\"in t&&t.currentSrc&&e.add(t.currentSrc);const o=t.getAttribute(\"srcset\");o&&o.split(\",\").forEach(i=>{const n=i.trim().split(/\\s+/)[0];n&&e.add(n)});for(const i of[\"data-src\",\"data-original\",\"data-fallback\",\"data-nimg\",\"data-image\",\"data-url\"]){const n=t.getAttribute(i);n&&n!==\"1\"&&e.add(n)}if(t.style.backgroundImage){const i=t.style.backgroundImage.match(/url\\([\"']?([^\"']+)[\"']?\\)/i);i?.[1]&&e.add(i[1])}for(const i of Array.from(e))try{const s=new URL(i,window.location.href).searchParams.get(\"url\");if(s){e.add(s);try{e.add(decodeURIComponent(s))}catch{}}}catch{}return Array.from(e).filter(Boolean)}__name(er,\"extractImageCandidates\");function fe(t,e){const r=String(e??\"\").trim();if(!r)return!1;const o=er(t);if(o.length===0)return!1;const n=r.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();for(const s of o){if(s===r)return!0;try{if(new URL(s,window.location.href).href===new URL(r,window.location.href).href)return!0}catch{}if(s.includes(r)||r.includes(s))return!0;try{const b=decodeURIComponent(s);if(b.includes(r)||r.includes(b))return!0}catch{}const p=s.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();if(p&&n&&p.length>=3&&p===n)return!0}return!1}__name(fe,\"imageMatchesValue\");function pe(t,e){return Array.from(t.querySelectorAll(\"img\")).filter(r=>fe(r,e))}__name(pe,\"findImageMatches\");function Bt(t,e){const r=String(e??\"\").trim();return r?[t.getAttribute(\"href\"),t.getAttribute(\"src\"),t.getAttribute(\"poster\"),t.getAttribute(\"srcset\"),t.style.backgroundImage].filter(i=>!!i).some(i=>{if(i===r||i.includes(r))return!0;try{return new URL(i,window.location.href).href===new URL(r,window.location.href).href}catch{return!1}}):!1}__name(Bt,\"attributeMatchesValue\");function Ht(t,e){return Array.from(t.querySelectorAll('a[href], img[src], source[src], video[poster], [style*=\"background-image\"]')).filter(r=>Bt(r,e))}__name(Ht,\"findAttributeMatches\");function rr(t,e){const r=Nt(e);if(r.length===0)return[];const o=Array.from(t.querySelectorAll(Nr)),i=o.filter(n=>{const s=$(n.textContent);return r.some(u=>s===u)});return i.length>0?i:o.filter(n=>{const s=$(n.textContent);return r.some(u=>s.includes(u)||u.includes(s))})}__name(rr,\"findTextMatches\");function Vt(t,e,r){if(Dt(e,r)){const o=pe(t,e);if(o.length>0)return o}return rr(t,e)}__name(Vt,\"findValueMatches\");function nr(t,e,r){if(Dt(e,r)&&pe(t,e).length>0)return!0;const o=$(t.textContent);return Nt(e).some(i=>o.includes(i))}__name(nr,\"subtreeContainsValue\");function or(t,e){const r=t[0];if(!r)return null;let o=r;for(;o;){if(t.every(i=>o?.contains(i)))return o;if(o===e)break;o=o.parentElement}return e??r}__name(or,\"lowestCommonAncestor\");function dt(t){const e=String(t??\"\").trim();if(!e)return[];const r=e.replace(/\\[(\\d+)\\]/g,\".$1\"),o=r.replace(/\\.(\\d+)(?=\\.|$)/g,\"[$1]\");return Array.from(new Set([e,r,o]))}__name(dt,\"pathVariants\");function ge(t){return Array.from(new Set([t.fieldPath,...t.fieldPaths??[]].filter(e=>!!(e&&e.trim())).flatMap(e=>dt(e))))}__name(ge,\"focusPathCandidates\");function vt(t){if(t.closest(\"[hidden]\"))return!1;let e=t;for(;e&&e!==document.documentElement;){const o=window.getComputedStyle(e);if(o.display===\"none\"||o.visibility===\"hidden\"||Number(o.opacity)===0||o.maxHeight===\"0px\"||o.maxHeight===\"0\")return!1;const i=e.getBoundingClientRect();if((o.overflow===\"hidden\"||o.overflow===\"clip\")&&(i.width<2||i.height<2))return!1;e=e.parentElement}const r=t.getBoundingClientRect();return r.width>=2&&r.height>=2}__name(vt,\"isVisuallyHighlightable\");function me(t){let e=0;vt(t)&&(e+=100);const r=$(t.textContent);r.length>=2&&(e+=40),t.tagName===\"IMG\"&&(e+=35),t.closest(\"main, footer, header, [data-preview-page-key]\")&&(e+=20),t.closest('.fixed, [class*=\"fixed\"]')&&r.length<2&&t.tagName!==\"IMG\"&&(e-=25);const o=t.getBoundingClientRect();return e+=Math.min(15,Math.floor(o.width*o.height/400)),e}__name(me,\"highlightTargetScore\");function he(t){return[...t].sort((e,r)=>me(r)-me(e))}__name(he,\"rankHighlightTargets\");function ir(t,e){const r=[],o=Array.from(new Set([t,...e??[]].filter(s=>!!s).flatMap(s=>dt(s))));for(const s of o){const u=CSS.escape(s);document.querySelectorAll('[data-preview-field-path=\"'+u+'\"], [data-preview-list-path=\"'+u+'\"], [data-content-path=\"'+u+'\"]').forEach(p=>{r.includes(p)||r.push(p)})}const i=he(r.filter(s=>vt(s))),n=i.filter(s=>!i.some(u=>u!==s&&s.contains(u)));return n.length>0?n:i}__name(ir,\"findExplicitTargets\");function ye(t){const e=(t?.itemValues??[]).filter(n=>$(n.value).length>=2&&n.key!==\"id\");if(e.length===0)return null;const r=[];for(const n of e)for(const s of Vt(document,n.value,n.key).slice(0,8))r.includes(s)||r.push(s);let o=null;for(const n of r){let s=n,u=0;for(;s&&s!==document.body&&u<12;){const p=e.reduce((S,A)=>S+(nr(s,A.value,A.key)?1:0),0),b=s.getBoundingClientRect(),m=Math.max(1,b.width*b.height);(!o||p>o.score||p===o.score&&m<o.area)&&(o={target:s,score:p,area:m}),s=s.parentElement,u+=1}}const i=Math.min(2,e.length);return o&&o.score>=i?o.target:null}__name(ye,\"findItemContainer\");function qt(t,e,r){const o=Vt(t,e,r);if(o.length===0)return null;const i=Nt(e);if(i.length>1&&!Dt(e,r)){const n=o.filter(s=>{const u=$(s.textContent);return i.slice(1).some(p=>u===p)});if(n.length>1)return or(n,t instanceof HTMLElement?t:null)}return o.sort((n,s)=>$(n.textContent).length-$(s.textContent).length)[0]}__name(qt,\"findFieldTarget\");function Gt(t,e){const r=String(t??e??\"\").trim().toLowerCase().replace(/\\s+/g,\"_\");return!r||r===\"common\"?\"home\":r===\"about\"?\"about_us\":r}__name(Gt,\"normalizePageKey\");function ar(t){const e=t.replace(/_us$/,\"\"),r=['[data-preview-page-key=\"'+CSS.escape(t)+'\"]','[data-preview-page-key=\"'+CSS.escape(e)+'\"]',\"#\"+CSS.escape(t)+\"_view\",\"#\"+CSS.escape(e)+\"_view\",\"#\"+CSS.escape(t),\"#\"+CSS.escape(e),\"main\",\"body\"];for(const o of r){const i=document.querySelector(o);if(i instanceof HTMLElement)return i}return null}__name(ar,\"findPageTarget\");function be(t,e){const r=window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/),o=String(e??\"\").trim(),i=o?\"/\"+o.replace(/^\\/+|\\/+$/g,\"\"):null,n=i!==null?i===\"/\"?\"\":i:t===\"home\"?\"\":\"/\"+t.replace(/^\\/+/,\"\");return r?r[1]+n:n||\"/\"}__name(be,\"resolvePath\");function we(){for(const t of re)t.target.style.outline=t.outline,t.target.style.outlineOffset=t.outlineOffset,t.target.style.boxShadow=t.boxShadow,t.target.style.transition=t.transition,t.target.style.scrollMarginTop=t.scrollMarginTop,t.target.style.borderRadius=t.borderRadius,t.target.removeAttribute(O);re=[]}__name(we,\"clearHighlight\");function Wt(t,e){we(),re=t.map(r=>({target:r,outline:r.style.outline,outlineOffset:r.style.outlineOffset,boxShadow:r.style.boxShadow,transition:r.style.transition,scrollMarginTop:r.style.scrollMarginTop,borderRadius:r.style.borderRadius}));for(const r of t)r.setAttribute(O,\"true\"),r.style.scrollMarginTop=\"72px\",r.style.transition=\"outline-color 0.2s ease, box-shadow 0.2s ease\",r.style.outline=\"2px solid rgba(34, 197, 94, 0.98)\",r.style.outlineOffset=\"4px\",r.style.boxShadow=\"0 0 0 7px rgba(34, 197, 94, 0.2)\",r.style.borderRadius||(r.style.borderRadius=\"4px\");t[0]?.scrollIntoView({behavior:\"smooth\",block:e?\"start\":\"center\",inline:\"nearest\"})}__name(Wt,\"highlightTargets\");function sr(t,e){Wt([t],e)}__name(sr,\"highlight\");function jt(t){return Array.from(new Set([t.fieldValue,...t.fieldMatchValues??[]].filter(e=>typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"&&e.trim().length>0).map(e=>String(e))))}__name(jt,\"focusMatchValues\");function lr(t){const e=ge(t);if(e.length===0)return null;try{const r=JSON.parse(window.sessionStorage.getItem(Q)??\"{}\");for(const o of e){const i=r[`${window.location.pathname}|${o}`];if(!i)continue;const n=document.querySelector(i);if(!n)continue;const s=jt(t).map($),u=$(n.textContent);if(!(s.length>0&&u&&!s.some(p=>u===p||u.includes(p)||Bt(n,p))))return n}return null}catch{return null}}__name(lr,\"findRememberedFocusTarget\");function Tt(t){if(!t)return null;if(vt(t))return t;let e=t.parentElement;for(;e&&e!==document.body;){if(vt(e))return e;e=e.parentElement}return null}__name(Tt,\"pickVisibleHeuristicTarget\");function Ae(t){const e=ge(t),r=ir(t.fieldPath,e.filter(s=>s!==t.fieldPath));if(r.length>0)return{targets:r,result:\"exact\"};const o=Tt(lr(t));if(o)return{targets:[o],result:\"heuristic\"};const i=ye(t.fieldContext),n=t.fieldContext?.fieldKey;if(i){for(const u of jt(t)){const p=Tt(Ht(i,u)[0]??qt(i,u,n));if(p)return{targets:[p],result:\"heuristic\"}}const s=Tt(i);if(s)return{targets:[s],result:\"heuristic\"}}for(const s of jt(t)){const u=Ht(document,s),p=qt(document,s,n),b=p?[...u,p]:u,m=he(b.map(S=>Tt(S)).filter(S=>!!S));if(m.length>0)return{targets:[m[0]],result:\"heuristic\"}}return null}__name(Ae,\"resolveFieldTarget\");function Se(){document.documentElement.dataset.fivoraPreview=\"true\",document.querySelectorAll(\".reveal-on-scroll:not(.reveal-active)\").forEach(t=>t.classList.add(\"reveal-active\"))}__name(Se,\"activateRevealNodes\");function ut(t,e=0){Se();const r=!!t.fieldPath;if(t.focusOnly&&r){const s=Ae(t);if(s){Wt(s.targets,!1),yt(t,s.result,s.targets.length);return}if(e<12){window.setTimeout(()=>ut(t,e+1),120);return}yt(t,\"missing\");return}const o=Gt(t.pageKey,t.pageLabel),i=ar(o);if(!i){e<12?window.setTimeout(()=>ut(t,e+1),120):yt(t,\"missing\");return}const n=r?Ae(t):null;if(r&&!n&&e<12){window.setTimeout(()=>ut(t,e+1),120);return}n?(Wt(n.targets,!1),yt(t,n.result,n.targets.length)):(sr(i,!0),yt(t,\"page\",1))}__name(ut,\"applyFocus\");function cr(t){if(t.focusOnly){ht(),window.setTimeout(()=>ut(t),80);return}const e=Gt(t.pageKey,t.pageLabel),r=be(e,t.pageRoute);if((window.location.pathname.replace(/\\/+$/,\"\")||\"/\")!==r){try{window.sessionStorage.setItem(Z,JSON.stringify({...t,awaitingNavigation:!0}))}catch{}window.location.assign(r);return}ht(),window.setTimeout(()=>ut(t),80)}__name(cr,\"handleFocus\");function Ee(t){return $(t).replace(/\\.html$/i,\"\").replace(/[^a-z0-9]+/g,\"-\")}__name(Ee,\"normalizeRouteToken\");function dr(){const t=window.location.pathname.split(\"/\").map(n=>decodeURIComponent(n).trim()).filter(Boolean);if(t.length<2||z.length===0)return;const e=z.filter(n=>{const s=n.context;if(!s?.collectionPath||!s.fieldKey)return!1;const u=s.collectionPath.split(\".\").at(-1)??\"\",p=t.lastIndexOf(u);if(p<0||p>=t.length-1)return!1;const b=Ee(t.at(-1)??\"\");return s.itemValues.some(({key:m,value:S})=>{const A=$(m).replace(/[^a-z0-9]/g,\"\");return A!==\"id\"&&!A.endsWith(\"id\")&&A!==\"slug\"&&A!==\"name\"&&A!==\"title\"?!1:Ee(S)===b})});if(e.length===0)return;const r=Array.from(document.querySelectorAll(`[${K}]`)),o=[];for(const n of e){const s=n.context,u=s.fieldKey,p=$(u).replace(/[^a-z0-9]/g,\"\");if(p===\"slug\"||p===\"identifier\"||p.endsWith(\"id\"))continue;const b=s.collectionPath.split(\".\").at(-1)??\"\",m=$(b).replace(/s$/,\"\"),S=u.replace(/([a-z0-9])([A-Z])/g,\"$1 $2\").split(/[^a-z0-9]+/i).map($).filter(w=>w&&![\"url\",\"text\",\"value\"].includes(w)),A=$(n.value);for(const w of r){const F=$(w.getAttribute(K));if(!F||!F.includes(m))continue;let B=0;const At=S.filter(Rt=>F.includes(Rt));At.length>0&&(B+=40+At.length*5);const St=w.tagName===\"IMG\"?$(w.getAttribute(\"src\")??w.getAttribute(\"alt\")):$(w.textContent);A&&St===A?B+=120:A.length>=3&&St.includes(A)&&(B+=80),/image|photo|logo|banner|thumbnail|cover/i.test(u)&&w.tagName===\"IMG\"&&F.includes(\"image\")&&(B+=120),B>=40&&o.push({element:w,field:n,score:B})}}o.sort((n,s)=>s.score-n.score);const i=new Set;for(const{element:n,field:s}of o)if(!i.has(n)){if(i.add(n),n.tagName!==\"IMG\"){const u=n.textContent??\"\",p=String(s.value??\"\"),b=u.toLowerCase().indexOf(p.toLowerCase());p&&b>=0&&u!==p&&(n.setAttribute(\"data-fivora-value-prefix\",u.slice(0,b)),n.setAttribute(\"data-fivora-value-suffix\",u.slice(b+p.length)))}n.removeAttribute(K),n.setAttribute(\"data-preview-field-path\",s.path),de(s.path,s.value)}}__name(dr,\"promoteActiveRouteDetailFields\");const Hr=\"FIVORA_PREVIEW_ELEMENT_CLICKED\",Vr=y(\"ELEMENT_CLICKED\"),qr=\"FIVORA_PREVIEW_FIELD_CHANGED\",Gr=y(\"FIELD_CHANGED\"),Wr=\"FIVORA_PREVIEW_EDIT_MODE\",jr=y(\"EDIT_MODE\"),Ur=\"FIVORA_PREVIEW_FLUSH_EDIT\",zr=y(\"FLUSH_EDIT\"),Kr=\"FIVORA_PREVIEW_EDIT_FLUSHED\",Yr=y(\"EDIT_FLUSHED\"),Jr=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small, img\",Ut=\"ontouchstart\"in window||navigator.maxTouchPoints>0||window.matchMedia&&window.matchMedia(\"(pointer: coarse)\").matches,sn=(()=>{const t=navigator.userAgent||\"\",e=navigator.vendor||\"\";if(/iP(ad|hone|od)/i.test(t)||/Safari/i.test(t)&&/Apple Computer/i.test(e)&&!/Chrom(e|ium)/i.test(t))return!0;try{return!!window.safari}catch{return!1}})(),Xr=(()=>{try{const t=document.createElement(\"div\");return t.setAttribute(\"contenteditable\",\"plaintext-only\"),t.contentEditable===\"plaintext-only\"}catch{return!1}})(),Zr=Ut||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4||typeof navigator.deviceMemory==\"number\"&&(navigator.deviceMemory??8)<=4,Qr=!0;let z=[];window.addEventListener(\"message\",t=>{if(!Qe(t)||t.data&&typeof t.data==\"object\"&&t.data.__fivoraBridgeRelay===!0)return;if(t.data?.type===x||t.data?.type===v){t.stopImmediatePropagation(),cr(t.data);return}if((t.data?.type===D||t.data?.type===L)&&t.data.siteData){const s=t.data.full!==!1;if(t.data.contentOnly===!0){Ft(t.data.siteData,{contentOnly:!0});return}Ft(t.data.siteData,{fanOut:!1,colorReplacements:!1}),Ze({full:s});return}if(t.data?.type===mt||t.data?.type===_r){const s=t.data.patches;Array.isArray(s)&&Ke(s);return}if(t.data?.type===kr||t.data?.type===\"DENEB_PREVIEW_STYLE_PATCH\"){const s=t.data,u=typeof s.fieldPath==\"string\"?s.fieldPath:typeof s.targetPath==\"string\"?s.targetPath:\"\",p=s.styles??s.properties;u&&p&&Je(u,p);return}if(t.data?.type===Wr||t.data?.type===jr){z=Array.isArray(t.data.fields)?t.data.fields:[],dr(),t.data.editMode?(vr(),window.setTimeout(()=>ve(),50)):Tr();return}(t.data?.type===Ur||t.data?.type===zr)&&(ft(!0),Y({type:Kr,requestId:t.data.requestId}),Y({type:Yr,requestId:t.data.requestId}))},!0);try{const t=JSON.parse(window.sessionStorage.getItem(Z)??\"null\");if(t?.awaitingNavigation){const e=Gt(t.pageKey,t.pageLabel),r=be(e,t.pageRoute),o=window.location.pathname.replace(/\\/+$/,\"\")||\"/\";ht(),o===r&&window.setTimeout(()=>ut(t),220)}else t&&ht()}catch{ht()}try{const t=JSON.parse(window.sessionStorage.getItem(g)??window.sessionStorage.getItem(l)??\"null\");if(t){k=t;try{window[f]=t,window[h]=t}catch{}Zr||(ue(t),xt(t,{colorReplacements:!1}))}}catch{}let J=!1,rt=null,ot=null,zt=null,tt=null,Pt=[],it=null;function Ce(){if(document.querySelector(\"[data-fivora-empty-editable-styles]\"))return;const t=document.createElement(\"style\");t.setAttribute(\"data-fivora-empty-editable-styles\",\"true\"),t.textContent=`\n [${M}=\"true\"] {\n min-width: 7rem !important;\n min-height: 1.25em !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n span[${M}=\"true\"],\n a[${M}=\"true\"],\n strong[${M}=\"true\"],\n em[${M}=\"true\"],\n small[${M}=\"true\"],\n label[${M}=\"true\"] {\n display: inline-block !important;\n }\n [${M}=\"true\"]:empty::before {\n content: \"\";\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${M}=\"true\"]:empty:hover::before {\n content: \"Click to add text\";\n }\n [${V}=\"true\"] {\n min-width: 10rem !important;\n min-height: 3.5rem !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n [${V}=\"true\"]:empty::before {\n content: \"\";\n display: inline-flex;\n align-items: center;\n min-height: 3.5rem;\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${V}=\"true\"]:empty:hover::before {\n content: \"Click to add the first item\";\n }\n `,document.head.appendChild(t)}__name(Ce,\"ensureEmptyEditableStyles\");function ur(t){if(t.id)return\"#\"+CSS.escape(t.id);const e=[];let r=t;for(;r&&r!==document.body;){const o=r.tagName.toLowerCase(),i=r.parentElement?Array.from(r.parentElement.children).filter(s=>s.tagName===r?.tagName):[],n=i.indexOf(r)+1;e.unshift(i.length>1?`${o}:nth-of-type(${n})`:o),r=r.parentElement}return e.length>0?`body > ${e.join(\" > \")}`:\"\"}__name(ur,\"buildStructuralSelector\");function Kt(){try{const t=JSON.parse(window.sessionStorage.getItem(Q)??\"{}\");return t&&typeof t==\"object\"?t:{}}catch{return{}}}__name(Kt,\"readResolvedTargetSelectors\");function fr(t,e){const r=ur(t);if(!r)return;const o=Kt();o[`${window.location.pathname}|${e}`]=r;try{window.sessionStorage.setItem(Q,JSON.stringify(o))}catch{}}__name(fr,\"rememberResolvedTarget\");function tn(){const t=Kt(),e=`${window.location.pathname}|`;let r=!1;for(const o of Object.keys(t))o.startsWith(e)&&(delete t[o],r=!0);if(r)try{window.sessionStorage.setItem(Q,JSON.stringify(t))}catch{}}__name(tn,\"forgetResolvedTargetsForCurrentPage\");function xe(){document.querySelectorAll(`[${_}]`).forEach(t=>{tt?.target!==t&&(t.removeAttribute(_),t.removeAttribute(M),t.removeAttribute(V))})}__name(xe,\"clearResolvedEditableTargets\");function bt(t,e,r=!0){const o=t.getAttribute(_),i=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(U)??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\");if(o&&o!==e.path&&i!==e.path)return!1;t.setAttribute(_,e.path),Fe.register(t,e.path);const n=String(e.value??\"\").trim().length===0&&$(t.textContent).length===0;J&&n&&t.tagName!==\"IMG\"?t.setAttribute(M,\"true\"):t.removeAttribute(M);const s=e.kind===\"collection\"||e.type===\"list\",u=e.collection?.length;return J&&s&&(u===0||t.childElementCount===0)?(t.setAttribute(V,\"true\"),t.removeAttribute(M)):t.removeAttribute(V),r&&!s&&fr(t,e.path),!0}__name(bt,\"annotateEditableTarget\");function nt(t){const e=[t.value,...t.matchValues??[]].filter(r=>typeof r==\"number\"||typeof r==\"string\"&&r.trim().length>0);return Array.from(new Set(e.map(r=>String(r))))}__name(nt,\"editableFieldMatchValues\");function pr(t){for(const e of dt(t)){const r=CSS.escape(e),o=document.querySelector(`[data-preview-field-path=\"${r}\"], [${U}=\"${r}\"], [data-content-path=\"${r}\"], [data-field-path=\"${r}\"], [${_}=\"${r}\"]`);if(o)return o}return null}__name(pr,\"findExplicitEditableTarget\");function gr(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const r=Kt()[`${window.location.pathname}|${t.path}`];if(!r)return null;try{const o=document.querySelector(r);if(!o)return null;const i=nt(t).map($),n=$(o.textContent);return i.length>0&&n&&!i.includes(n)?null:(bt(o,t,!1),o)}catch{return null}}__name(gr,\"restoreRememberedTarget\");function mr(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const r=(t.context?ye({collectionPath:t.context.collectionPath,itemIndex:t.context.itemIndex,fieldKey:t.context.fieldKey,itemValues:t.context.itemValues}):null)??document;for(const o of nt(t)){const i=qt(r,o,t.context?.fieldKey),n=[...Ht(r,o),...i?[i]:[],...Vt(r,o,t.context?.fieldKey)];for(const s of n){if(s.closest(`[${K}]`))continue;const u=s.getAttribute(_);if(!u||u===t.path)return s}}return null}__name(mr,\"inferEditableTarget\");function hr(t){if(J){Ce(),Se();for(const e of z){const r=pr(e.path)??gr(e)??(t?.explicitOnly?null:mr(e));r&&bt(r,e)}}}__name(hr,\"indexEditableTargets\");let Yt=!1;function ve(){for(const e of Pt)window.clearTimeout(e);if(Pt=[],it!==null){const e=window.cancelIdleCallback;typeof e==\"function\"?e(it):window.clearTimeout(it),it=null}if(Yt)return;Yt=!0;const t=__name((e,r)=>{r&&(Yt=!1),e&&xe(),hr({explicitOnly:e})},\"runPass\");Pt=[window.setTimeout(()=>{t(!0,!0)},0)]}__name(ve,\"scheduleEditableTargetIndex\");function yr(){const t=document.createElement(\"div\");return t.setAttribute(\"data-fivora-edit-badge\",\"true\"),t.innerHTML=\"\\u270F\\uFE0F\",Object.assign(t.style,{position:\"fixed\",zIndex:\"2147483647\",width:\"28px\",height:\"28px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"14px\",borderRadius:\"8px\",background:\"rgba(37, 99, 235, 0.92)\",color:\"#fff\",cursor:\"pointer\",pointerEvents:\"auto\",boxShadow:\"0 2px 8px rgba(0,0,0,0.18)\",opacity:\"0\",transition:\"opacity 0.15s ease\",userSelect:\"none\"}),t.setAttribute(\"title\",\"Edit this content\"),t.setAttribute(\"aria-label\",\"Edit this content\"),document.body.appendChild(t),t}__name(yr,\"createHoverBadge\");function br(t){if(!rt)return;const e=t.getBoundingClientRect();rt.style.top=`${Math.max(4,e.top-4)}px`,rt.style.left=`${Math.min(window.innerWidth-36,e.right-32)}px`,rt.style.opacity=\"1\"}__name(br,\"positionBadge\");function It(){zt&&(zt(),zt=null),rt&&(rt.style.opacity=\"0\"),ot=null}__name(It,\"clearHoverOverlay\");function wr(t){if(t===ot)return;It(),ot=t;const e=t,r=e.style?.outline??\"\",o=e.style?.outlineOffset??\"\",i=e.style?.cursor??\"\";e.style&&(e.style.outline=\"2px dashed rgba(37, 99, 235, 0.6)\",e.style.outlineOffset=\"2px\",e.style.cursor=\"pointer\"),zt=__name(()=>{e.style&&(e.style.outline=r,e.style.outlineOffset=o,e.style.cursor=i)},\"hoverOutlineCleanup\"),br(t)}__name(wr,\"applyHoverOverlay\");function Te(t){let e=t instanceof Element?t:null;for(;e&&!(e instanceof HTMLElement);)e=e.parentElement;let r=e;for(;r&&r!==document.body;){if(r.hasAttribute(K)){r=r.parentElement;continue}if(r.hasAttribute(\"data-preview-field-path\")||r.hasAttribute(U)||r.hasAttribute(X)||r.hasAttribute(\"data-content-path\")||r.hasAttribute(\"data-field-path\")||r.hasAttribute(_)||!!Fe.getPath(r)||r.matches(Jr)){const i=Jt(r);if(i)return{element:r,field:i}}r=r.parentElement instanceof HTMLElement?r.parentElement:null}return null}__name(Te,\"findEditableTarget\");function Jt(t){if(t.closest(`[${K}]`))return null;const e=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\")??t.getAttribute(_);if(e)return z.find(m=>dt(m.path).includes(e))??{path:e,label:e.split(\".\").pop()??\"Content\",type:t.tagName===\"IMG\"?\"image\":\"text\",value:t.tagName===\"IMG\"?t.src:t.textContent?.trim()??\"\"};const r=t.getAttribute(X);if(r){const b=r.match(/^(.+)\\[(\\d+)\\]$/);if(b){const m=b[1],S=Number(b[2]),A=z.find(w=>(w.kind===\"collection\"||w.type===\"list\")&&dt(w.path).includes(m));if(A)return{...A,collection:{listPath:m,itemIndex:S,length:A.collection?.length??0,minItems:A.collection?.minItems,maxItems:A.collection?.maxItems,itemLabel:A.collection?.itemLabel}}}}const o=t.getAttribute(U);if(o)return z.find(m=>(m.kind===\"collection\"||m.type===\"list\")&&dt(m.path).includes(o))??{kind:\"collection\",path:o,label:o.split(\".\").pop()??\"Collection\",type:\"list\",value:0,collection:{listPath:o,length:t.children.length}};const i=t.tagName===\"IMG\"?t:t.querySelector(\"img\");if(i){const b=z.find(A=>A.type===\"image\"&&nt(A).some(w=>fe(i,w)));if(b)return b;const m=Pe(i);if(m.collectionPath&&typeof m.itemIndex==\"number\"){const A=z.find(w=>w.type===\"image\"&&w.context?.collectionPath===m.collectionPath&&w.context?.itemIndex===m.itemIndex);if(A)return A}const S=i.closest('section, article, [data-preview-page-key], main, header, footer, .card, [class*=\"section\"]');if(S){const A=S.getAttribute(\"data-preview-field-path\")||S.getAttribute(\"data-content-path\")||S.getAttribute(\"data-field-path\")||S.getAttribute(_);if(A){const w=A.split(\".\")[0],F=z.find(B=>B.type===\"image\"&&(B.path.startsWith(`${w}.`)||B.path.startsWith(`${A}.`)));if(F)return F}}if(t.tagName===\"IMG\"){const A=z.filter(F=>F.type===\"image\");if(A.length===1)return A[0];const w=i.getAttribute(\"src\")||i.src||\"\";return{path:e||\"image\",label:(e||\"\").split(\".\").pop()||\"Image\",type:\"image\",value:w}}}const n=z.filter(b=>nt(b).some(m=>Bt(t,m)));if(n.length===1)return n[0];const s=$(t.textContent);if(!s)return null;const u=z.filter(b=>typeof b.value!=\"boolean\"&&nt(b).some(m=>$(m)===s));if(u.length===1)return u[0];const p=z.filter(b=>typeof b.value==\"boolean\"?!1:nt(b).some(m=>{const S=$(m);return S.length>=3&&s.includes(S)})).sort((b,m)=>Math.max(...nt(m).map(S=>$(S).length),0)-Math.max(...nt(b).map(S=>$(S).length),0));return p.length===1?p[0]:null}__name(Jt,\"resolveEditableField\");function Ar(t,e){return t.tagName!==\"IMG\"&&t.childElementCount===0&&![\"INPUT\",\"TEXTAREA\",\"SELECT\",\"OPTION\",\"VIDEO\",\"AUDIO\",\"IFRAME\"].includes(t.tagName)&&!e.context&&![\"image\",\"color\",\"boolean\",\"select\",\"list\"].includes(e.type??\"text\")}__name(Ar,\"canEditInline\");function Sr(t){let e=t;for(;e&&e!==document.body;){const r=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(U)??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(_);if(r)return r;e=e.parentElement}return null}__name(Sr,\"extractFieldPath\");function Pe(t){let e=t;for(;e&&e!==document.body;){const r=e.getAttribute(X);if(r){const n=r.match(/^(.+)\\[(\\d+)\\]$/);if(n)return{collectionPath:n[1],itemIndex:Number(n[2])}}const o=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(_);if(o){const n=o.match(/^(.+)\\[(\\d+)\\]/);if(n)return{collectionPath:n[1],itemIndex:Number(n[2])}}const i=e.getAttribute(U);if(i)return{collectionPath:i,itemIndex:null};e=e.parentElement}return{collectionPath:null,itemIndex:null}}__name(Pe,\"extractCollectionContext\");function Ie(t,e){const r=[],o=new Set(e?.path?[e.path]:[]);let i=t,n=0;for(;i&&i!==document.body&&n<3&&!(i.hasAttribute(K)||n>0&&(i.hasAttribute(X)||i.hasAttribute(U)||i.tagName===\"SECTION\"));){if(i.hasAttribute(\"data-preview-field-path\")||i.hasAttribute(\"data-content-path\")||i.hasAttribute(\"data-field-path\")||i.hasAttribute(_)){const s=Jt(i);s?.path&&s.kind!==\"collection\"&&s.type!==\"list\"&&!o.has(s.path)&&(o.add(s.path),r.push({path:s.path,label:s.label??s.path.split(\".\").pop()??\"Content\",type:s.type??\"text\"}))}i=i.parentElement,n+=1}return r}__name(Ie,\"findRelatedAncestorFields\");function Er(t,e,r=Ie(t,e)){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),n=t.tagName===\"IMG\",s=t.tagName===\"INPUT\"||t.tagName===\"TEXTAREA\",u=e?.path??Sr(t),p=n?t.src:s?t.placeholder||t.value||\"\":t.textContent?.trim()??\"\",b=Pe(t);let m=e?.collection?.listPath??e?.collection?.path??e?.context?.collectionPath??b.collectionPath,S=e?.collection?.itemIndex??e?.context?.itemIndex??b.itemIndex;m&&u&&e?.kind!==\"collection\"&&!u.startsWith(`${m}[`)&&!u.startsWith(`${m}.`)&&u!==m&&(m=null,S=null);const A=e?.context?.itemPath??(m&&typeof S==\"number\"?`${m}[${S}]`:null),w=__name(_t=>String(_t??\"\").trim().replace(/[^a-zA-Z0-9_.-]+/g,\"-\").replace(/^-+|-+$/g,\"\").slice(0,64),\"safeScopePart\"),F=[],B=__name((_t,Xt,Zt)=>{!Xt||F.some(Qt=>Qt.key===Xt)||F.push({kind:_t,key:Xt,label:Zt})},\"pushStyleScope\");B(\"element\",u,\"This element\");const At=t.closest(`[${X}]`);B(\"card\",At?.getAttribute(X)??A,\"This card\");const St=t.closest(`[${U}]`);B(\"grid\",St?.getAttribute(U)??m,\"Entire grid\");const $r=t.closest(\"[data-preview-page-key]\"),Rt=w($r?.getAttribute(\"data-preview-page-key\")),pt=t.closest(\"section,[data-design-section],[data-section-id]\");if(pt){const _t=w(pt.getAttribute(\"data-design-section\")??pt.getAttribute(\"data-section-id\")??pt.id),Zt=(pt.parentElement?Array.from(pt.parentElement.children).filter(nn=>nn.tagName===\"SECTION\"):[]).indexOf(pt)+1,Qt=_t||(Zt>0?`nth-${Zt}`:\"\");B(\"section\",Qt?`section:${Rt||\"all\"}:${Qt}`:null,\"This section\")}B(\"page\",Rt?`page:${Rt}`:null,\"Current page\"),B(\"site\",\"site:all\",\"Whole website\");const Rr={type:Hr,fieldPath:u,descriptorKind:e?.kind??\"field\",fieldValue:p,elementTag:t.tagName.toLowerCase(),isImage:n,boundingRect:{top:o.top,left:o.left,width:o.width,height:o.height},computedStyle:{fontFamily:i.fontFamily,fontSize:i.fontSize,lineHeight:i.lineHeight,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,color:i.color,backgroundColor:i.backgroundColor,textAlign:i.textAlign,width:i.width,height:i.height,minWidth:i.minWidth,minHeight:i.minHeight,maxWidth:i.maxWidth,maxHeight:i.maxHeight,marginTop:i.marginTop,marginRight:i.marginRight,marginBottom:i.marginBottom,marginLeft:i.marginLeft,paddingTop:i.paddingTop,paddingRight:i.paddingRight,paddingBottom:i.paddingBottom,paddingLeft:i.paddingLeft,borderRadius:i.borderRadius},listPath:m,itemPath:A,collectionPath:m,itemIndex:S,relatedFields:r,styleScopes:F};Y(Rr),Y({...Rr,type:Vr})}__name(Er,\"emitClickEvent\");function Cr(t,e){Y({type:qr,fieldPath:t,value:e}),Y({type:Gr,fieldPath:t,value:e})}__name(Cr,\"emitFieldChange\");function ft(t){const e=tt;if(!e)return;tt=null,e.target.removeEventListener(\"keydown\",e.keydown),e.target.removeEventListener(\"blur\",e.blur);const r=t?(e.target.innerText??e.target.textContent??\"\").replace(/\\u00a0/g,\" \").trim():\"\";e.contentEditable===null?e.target.removeAttribute(\"contenteditable\"):e.target.setAttribute(\"contenteditable\",e.contentEditable),e.spellcheck===null?e.target.removeAttribute(\"spellcheck\"):e.target.setAttribute(\"spellcheck\",e.spellcheck),e.target.style.outline=e.outline,e.target.style.outlineOffset=e.outlineOffset,e.target.style.cursor=e.cursor,e.target.style.userSelect=e.userSelect,e.target.style.textTransform=e.textTransform,e.target.innerHTML=e.originalHtml,t&&(r!==e.originalText.trim()?(e.field.value=r,bt(e.target,e.field),Cr(e.field.path,r)):r||bt(e.target,e.field))}__name(ft,\"finishInlineEdit\");function xr(t,e,r){if(tt?.target===t)return;ft(!0),It(),bt(t,e),t.removeAttribute(M);const o=typeof e.value==\"string\"||typeof e.value==\"number\"?String(e.value):t.textContent??\"\",i=t.innerHTML,n=__name(u=>{if(u.key===\"Escape\"){u.preventDefault(),ft(!1);return}u.key===\"Enter\"&&e.type!==\"textarea\"&&!u.shiftKey&&(u.preventDefault(),ft(!0))},\"keydown\"),s=__name(()=>ft(!0),\"blur\");if(tt={target:t,field:e,originalText:o,originalHtml:i,contentEditable:t.getAttribute(\"contenteditable\"),spellcheck:t.getAttribute(\"spellcheck\"),outline:t.style.outline,outlineOffset:t.style.outlineOffset,cursor:t.style.cursor,userSelect:t.style.userSelect,textTransform:t.style.textTransform,keydown:n,blur:s},t.setAttribute(\"contenteditable\",Xr?\"plaintext-only\":\"true\"),t.setAttribute(\"spellcheck\",\"true\"),t.textContent=o,t.style.outline=\"2px solid rgba(37, 99, 235, 0.95)\",t.style.outlineOffset=\"3px\",t.style.cursor=\"text\",t.style.userSelect=\"text\",t.style.textTransform=\"none\",t.addEventListener(\"keydown\",n),t.addEventListener(\"blur\",s),t.focus(),r){const u=document,p=u.caretPositionFromPoint?.(r.x,r.y),b=p?(()=>{const m=document.createRange();return m.setStart(p.offsetNode,p.offset),m.collapse(!0),m})():u.caretRangeFromPoint?.(r.x,r.y);if(b){const m=window.getSelection();m?.removeAllRanges(),m?.addRange(b)}}else{const u=document.createRange();u.selectNodeContents(t);const p=window.getSelection();p?.removeAllRanges(),p?.addRange(u)}}__name(xr,\"beginInlineEdit\");let wt=null;function $e(t){if(!J||tt||Ut||wt!==null)return;const e=t.target;wt=requestAnimationFrame(()=>{if(wt=null,!J||tt)return;const r=Te(e);r&&!r.element.hasAttribute(\"data-fivora-edit-badge\")&&wr(r.element)})}__name($e,\"onEditMouseOver\");function Re(t){if(!J)return;const e=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null;e&&(e===rt||e===ot||ot?.contains(e))||It()}__name(Re,\"onEditMouseOut\");function _e(t){if(!J||tt&&t.target instanceof Node&&tt.target.contains(t.target))return;const e=t.target instanceof HTMLElement&&t.target.hasAttribute(\"data-fivora-edit-badge\")?t.target:null,r=e?ot?{element:ot,field:Jt(ot)}:null:Te(t.target),o=r?.element,i=r?.field;if(!o||!i)return;t.preventDefault(),t.stopPropagation();const n=Ie(o,i);!Qr&&Ar(o,i)&&n.length===0?xr(o,i,e?void 0:{x:t.clientX,y:t.clientY}):Er(o,i,n)}__name(_e,\"onEditClick\");function vr(){J||(J=!0,we(),Ce(),!Ut&&!rt&&(rt=yr()),Ut||(document.addEventListener(\"mouseover\",$e,!0),document.addEventListener(\"mouseout\",Re,!0)),document.addEventListener(\"click\",_e,!0),document.addEventListener(\"submit\",ke,!0),ve())}__name(vr,\"enterEditMode\");function ke(t){J&&(t.preventDefault(),t.stopPropagation())}__name(ke,\"preventEditModeSubmit\");function Tr(){if(J){J=!1,Yt=!1,ft(!0),It(),wt!==null&&(cancelAnimationFrame(wt),wt=null);for(const t of Pt)window.clearTimeout(t);if(Pt=[],it!==null){const t=window.cancelIdleCallback;typeof t==\"function\"?t(it):window.clearTimeout(it),it=null}xe(),document.querySelectorAll(`[${M}], [${V}]`).forEach(t=>{t.removeAttribute(M),t.removeAttribute(V)}),document.removeEventListener(\"mouseover\",$e,!0),document.removeEventListener(\"mouseout\",Re,!0),document.removeEventListener(\"click\",_e,!0),document.removeEventListener(\"submit\",ke,!0)}}__name(Tr,\"exitEditMode\");function Oe(t){if(t==null)return t;try{const e=new URL(String(t),window.location.href);if(e.origin!==window.location.origin)return t;const r=a(e.pathname);return r===e.pathname?t:`${r}${e.search}${e.hash}`}catch{return t}}__name(Oe,\"normalizePreviewHistoryUrl\");const en=window.history.pushState.bind(window.history),rn=window.history.replaceState.bind(window.history);window.history.pushState=(t,e,r)=>{en(t,e,Oe(r)),window.setTimeout(Ct,0)},window.history.replaceState=(t,e,r)=>{rn(t,e,Oe(r)),window.setTimeout(Ct,0)},window.addEventListener(\"popstate\",Ct);const $t=window.fetch.bind(window);window.fetch=(t,e)=>{const r=typeof t==\"string\"?t:t instanceof URL?t.href:null;if(!r)return $t(t,e);try{const o=new URL(r,window.location.href);if(o.origin!==window.location.origin)return $t(t,e);const i=a(o.pathname);return i===o.pathname?$t(t,e):(o.pathname=i,$t(o.href,e))}catch{return $t(t,e)}},/^\\/uploads\\/generated-sites\\/(?:template-preview|preview)\\//.test(window.location.pathname)&&window.addEventListener(\"submit\",t=>{t.preventDefault(),t.stopImmediatePropagation();const e=t.target;if(!(e instanceof HTMLFormElement))return;let r=e.parentElement?.querySelector(\"[data-fivora-preview-action-status]\");r||(r=document.createElement(\"p\"),r.setAttribute(\"data-fivora-preview-action-status\",\"true\"),r.setAttribute(\"role\",\"status\"),r.style.marginTop=\"0.75rem\",e.insertAdjacentElement(\"afterend\",r)),r.textContent=\"Preview only \\u2014 this form was not submitted. It becomes active on the published website.\"},!0),d();function Pr(){return window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|[^/]+)\\/[^/]+)/)?.[1]??\"\"}__name(Pr,\"resolvePreviewRootPrefix\");function Ir(t){if(t.target&&t.target!==\"_self\"||t.hasAttribute(\"download\"))return!1;const e=t.getAttribute(\"href\");if(!e||e.startsWith(\"#\")||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(e))return!1;const r=Pr(),o=e.startsWith(\"uploads/generated-sites/\")?`/${e}`:r&&e.startsWith(r.slice(1))?`/${e}`:e;let i;try{i=new URL(o,window.location.href)}catch{return!1}if(i.origin!==window.location.origin||r&&!i.pathname.startsWith(r))return!1;const n=window.location.pathname.replace(/\\/+$/,\"\")||\"/\",s=i.pathname.replace(/\\/+$/,\"\")||\"/\";return n!==s||i.search!==window.location.search?i:!1}__name(Ir,\"resolveInternalPreviewNavigation\"),document.addEventListener(\"click\",t=>{if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const e=t.target?.closest?.(\"a[href]\");if(!e)return;const r=Ir(e);r&&(t.preventDefault(),t.stopPropagation(),window.location.assign(r.href))},!0),Ct()})(function(C){const T=__name((c,y)=>{if(!c||c.trim()===\"null\")return null;try{const E=new URL(c,y??void 0).origin;return E===\"null\"?null:E}catch{return null}},\"normalizeOrigin\"),I=T(C.currentOrigin),P=T(C.ancestorOrigin,I),q=T(C.accessibleParentOrigin,I),a=T(C.referrer,I),d=T(C.rememberedOrigin);return P??q??(a&&a!==I?a:null)??d??a},function(C){const T=__name(l=>!!l&&typeof l==\"object\"&&!Array.isArray(l),\"isRecord\"),I=T(C)&&(C.designCustomizationVersion===1||!!C.elementStyles||!!C.sections);if(!T(C)||!I)return\"\";const P=C,q=__name(l=>{if(typeof l==\"number\")return`${l}px`;if(typeof l!=\"string\")return\"\";const f=l.trim();return!f||f.length>160||/[;{}<>\\r\\n]/.test(f)||/(?:url\\s*\\(|expression\\s*\\(|@import|javascript:)/i.test(f)?\"\":f},\"safeValue\"),a=__name(l=>q(P[l]),\"read\"),d=__name((l,f)=>f?`${l}:${f} !important;`:\"\",\"declaration\"),c=__name((l,f)=>{const h=f.filter(Boolean).join(\"\");return h?`${l}{${h}}`:\"\"},\"rule\"),y=__name(l=>l?[d(\"background\",l),d(\"background-color\",l),\"background-image:none !important;\"]:[],\"backgroundDeclarations\"),E=__name(l=>l===\"start\"?\"flex-start\":l===\"end\"?\"flex-end\":l===\"center\"||l===\"stretch\"?l:\"\",\"alignItems\"),x=__name(l=>{const f=Number(l);return Number.isInteger(f)&&f>=1&&f<=6?`repeat(${f},minmax(0,1fr))`:\"\"},\"gridColumns\"),v=(()=>{const l=Number(a(\"headingScale\"));return Number.isFinite(l)&&l>=.75&&l<=2?String(l):\"\"})(),N=__name(l=>({none:\"none\",subtle:\"0 4px 14px rgba(15,23,42,.08)\",medium:\"0 12px 30px rgba(15,23,42,.14)\",strong:\"0 22px 55px rgba(15,23,42,.22)\"})[l]??\"\",\"shadow\"),G=__name(l=>{if(!l)return!1;const f=l.trim().toLowerCase();if(!/^#[0-9a-f]{3,6}$/.test(f))return!1;const h=f.length===4?`#${f[1]}${f[1]}${f[2]}${f[2]}${f[3]}${f[3]}`:f,D=Number.parseInt(h.slice(1,3),16),L=Number.parseInt(h.slice(3,5),16),H=Number.parseInt(h.slice(5,7),16);return(D*299+L*587+H*114)/1e3<130},\"isDarkColor\"),R=G(a(\"backgroundColor\")),et=a(\"headingColor\")||a(\"textColor\"),O=a(\"textColor\"),_=a(\"mutedTextColor\")||(O?`color-mix(in srgb, ${O} 72%, transparent)`:\"\"),M=[[\"--brand-color\",a(\"primaryColor\")],[\"--brand-primary\",a(\"primaryColor\")],[\"--primary-color\",a(\"primaryColor\")],[\"--color-primary\",a(\"primaryColor\")],[\"--brand-secondary\",a(\"secondaryColor\")],[\"--secondary-color\",a(\"secondaryColor\")],[\"--brand-accent\",a(\"accentColor\")],[\"--accent-color\",a(\"accentColor\")],[\"--page-background\",a(\"backgroundColor\")],[\"--page-bg\",a(\"backgroundColor\")||a(\"canvasColor\")],[\"--page-text\",a(\"textColor\")],[\"--heading-color\",et],[\"--color-heading\",et],[\"--text-color\",a(\"textColor\")],[\"--text\",a(\"textColor\")],[\"--foreground\",a(\"textColor\")],[\"--color-foreground\",a(\"textColor\")],[\"--bg-primary\",a(\"backgroundColor\")||a(\"canvasColor\")],[\"--bg-secondary\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--surface\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--surface-color\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--card-bg\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--card-background\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--background\",a(\"backgroundColor\")||a(\"canvasColor\")],[\"--brand-primary\",a(\"primaryColor\")||a(\"brandPrimary\")],[\"--brand-secondary\",a(\"secondaryColor\")||a(\"brandSecondary\")],[\"--brand-accent\",a(\"accentColor\")||a(\"brandAccent\")],[\"--primary\",a(\"primaryColor\")||a(\"brandPrimary\")],[\"--secondary\",a(\"secondaryColor\")||a(\"brandSecondary\")],[\"--accent\",a(\"accentColor\")||a(\"brandAccent\")],[\"--text-primary\",a(\"textColor\")||a(\"textPrimary\")],[\"--text-secondary\",a(\"mutedTextColor\")||a(\"textSecondary\")||a(\"textColor\")],[\"--text-muted\",_],[\"--muted\",_],[\"--muted-color\",_],[\"--muted-text\",_],[\"--border-primary\",a(\"borderColor\")],[\"--border-secondary\",a(\"borderColor\")],[\"--border\",a(\"borderColor\")],[\"--color-border\",R?\"rgba(255, 255, 255, 0.1)\":a(\"borderColor\")||\"#e2e8f0\"],[\"--card-border\",R?\"rgba(255, 255, 255, 0.09)\":a(\"borderColor\")||\"#e2e8f0\"],[\"--color-text\",O],[\"--color-text-muted\",_],[\"--header-bg\",a(\"headerBackgroundColor\")||(R?`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 85%, transparent)`:\"rgba(255, 255, 255, 0.85)\")],[\"--input-bg\",R?`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 60%, ${a(\"cardBackgroundColor\")||\"#131b2e\"})`:\"#ffffff\"],[\"--input-color\",O],[\"--input-border\",R?\"rgba(255, 255, 255, 0.15)\":\"#cbd5e1\"],[\"--button-bg\",a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\"],[\"--button-text\",a(\"buttonTextColor\")||(G(a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\")?\"#ffffff\":\"#0f172a\")],[\"--button-primary-bg\",a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\"],[\"--button-primary-text\",a(\"buttonTextColor\")||(G(a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\")?\"#ffffff\":\"#0f172a\")],[\"--button-secondary-bg\",R?\"rgba(255, 255, 255, 0.08)\":a(\"secondaryColor\")&&!G(a(\"secondaryColor\"))?a(\"secondaryColor\"):\"#f1f5f9\"],[\"--button-secondary-text\",R?\"#f8fafc\":\"#0f172a\"],[\"--button-outline-border\",R?\"rgba(255, 255, 255, 0.22)\":\"currentColor\"],[\"--button-outline-text\",O||(R?\"#f8fafc\":\"#0f172a\")],[\"--button-ghost-text\",O||(R?\"#f8fafc\":\"#0f172a\")],[\"--product-card-bg\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||(R?\"#111a2e\":\"#ffffff\")],[\"--product-card-border\",R?\"rgba(255, 255, 255, 0.09)\":a(\"borderColor\")||\"#e2e8f0\"],[\"--tag-bg\",R?\"rgba(255, 255, 255, 0.08)\":\"rgba(241, 245, 249, 0.9)\"],[\"--tag-color\",_||(R?\"#94a3b8\":\"#64748b\")],[\"--card-shadow\",R?\"0 10px 25px -5px rgba(0, 0, 0, 0.4)\":\"0 10px 25px -5px rgba(0, 0, 0, 0.05)\"],[\"--card-radius\",a(\"cardRadius\")],[\"--button-radius\",a(\"buttonRadius\")],[\"--image-radius\",a(\"imageRadius\")]],V=new Set([\"sans-serif\",\"serif\",\"monospace\",\"inherit\",\"initial\",\"system-ui\",\"system sans\",\"editorial serif\"]),U=new Set,X=__name(l=>{if(typeof l==\"string\"&&l.trim()){const f=l.split(\",\")[0].replace(/['\"]/g,\"\").trim();f&&!V.has(f.toLowerCase())&&!f.toLowerCase().includes(\"system\")&&U.add(f)}},\"addFont\");X(P.headingFont),X(P.bodyFont);const K=T(P.elementStyles)?P.elementStyles:{};for(const l of Object.values(K))T(l)&&X(l.fontFamily);const Q=[...Array.from(U).map(l=>`@import url('https://fonts.googleapis.com/css2?family=${encodeURIComponent(l).replace(/%20/g,\"+\")}:wght@300;400;500;600;700;800&display=swap');`),c(\":root,html,body\",[d(\"color-scheme\",R?\"dark\":\"light\"),...M.map(([l,f])=>d(l,f))]),c(\"html\",[d(\"font-size\",a(\"baseSize\"))]),c(\"body\",[d(\"font-family\",a(\"bodyFont\")?`${a(\"bodyFont\")},sans-serif`:\"\"),d(\"font-weight\",a(\"bodyWeight\")),d(\"line-height\",a(\"bodyLineHeight\")),d(\"letter-spacing\",a(\"letterSpacing\")),...y(a(\"backgroundColor\")),d(\"color\",O)]),c('body :where(h1,h2,h3,h4,h5,h6),[data-preview-field-path*=\"title\"],[data-preview-field-path*=\"heading\"],[data-field-path*=\"title\"],[data-field-path*=\"heading\"]',[d(\"font-family\",a(\"headingFont\")?`${a(\"headingFont\")},sans-serif`:\"\"),d(\"font-weight\",a(\"headingWeight\")),d(\"line-height\",a(\"headingLineHeight\")),d(\"color\",et)]),c('body :where(p,li,label,address,[data-preview-field-path*=\"description\"],[data-preview-field-path*=\"subtitle\"])',[d(\"color\",O)]),c('body :where(small,.muted,[class*=\"muted\"])',[d(\"color\",_)]),v?`body h1{font-size:calc(2.5rem * ${v}) !important}body h2{font-size:calc(2rem * ${v}) !important}body h3{font-size:calc(1.5rem * ${v}) !important}body h4{font-size:calc(1.25rem * ${v}) !important}`:\"\",c(\"body header\",[...y(a(\"headerBackgroundColor\")),d(\"min-height\",a(\"headerHeight\"))]),c(\"body footer\",[...y(a(\"footerBackgroundColor\"))]),c(\"body main,body [data-preview-page-key]\",[...y(a(\"backgroundColor\")),d(\"color\",O),d(\"display\",\"flex\"),d(\"flex-direction\",\"column\")]),c(\"body main > section,body main [data-preview-page-key] > section\",[d(\"padding-block\",a(\"sectionPadding\")),d(\"text-align\",a(\"textAlign\"))]),c(\"body main :where(section,[data-design-section]) :where(h1,h2,h3,h4,h5,h6,p,[data-design-text])\",[d(\"text-align\",a(\"textAlign\"))]),c(\"body main > section + section,body main [data-preview-page-key] > section + section\",[d(\"margin-top\",a(\"sectionGap\"))]),c('body main :where([class*=\"flex\"],[class*=\"grid\"],[data-design-stack])',[d(\"gap\",a(\"elementGap\"))]),c(\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",[d(\"min-height\",a(\"heroMinHeight\")),d(\"text-align\",a(\"heroTextAlign\"))]),c('body main > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text]),body main [data-preview-page-key] > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text])',[d(\"text-align\",a(\"heroTextAlign\"))]),c('body main :where([class*=\"container\"],[class~=\"container\"],[data-design-container])',[d(\"max-width\",a(\"contentMaxWidth\")),d(\"padding-inline\",a(\"containerPadding\")),a(\"contentMaxWidth\")?\"margin-inline:auto !important;\":\"\"]),c('body main :where(section,[data-design-section]) > :where([class*=\"flex\"],[data-design-content])',[d(\"align-items\",E(a(\"contentAlign\"))),d(\"justify-items\",a(\"contentAlign\"))]),c(\"body main :where([data-preview-list-path],[data-design-grid])\",[x(a(\"gridColumns\"))?\"display:grid !important;\":\"\",d(\"grid-template-columns\",x(a(\"gridColumns\"))),d(\"gap\",a(\"gridGap\"))]),c('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])',[d(\"width\",a(\"cardWidth\")),a(\"cardWidth\")?\"max-width:100% !important;\":\"\",d(\"min-height\",a(\"cardMinHeight\")),d(\"padding\",a(\"cardPadding\")),d(\"border-radius\",a(\"cardRadius\")),d(\"border-width\",a(\"cardBorderWidth\")),a(\"cardBorderWidth\")?\"border-style:solid !important;\":\"\",d(\"border-color\",a(\"borderColor\")),...y(a(\"cardBackgroundColor\")||a(\"surfaceColor\")),d(\"box-shadow\",N(a(\"cardShadow\"))),d(\"text-align\",a(\"cardTextAlign\"))]),c('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"]) :where(h1,h2,h3,h4,h5,h6,p,span,[data-design-text])',[d(\"text-align\",a(\"cardTextAlign\"))]),c('body main :where(button,a[class*=\"btn\"],a[class*=\"button\"],[data-design-button])',[d(\"padding\",a(\"buttonPadding\")),d(\"border-radius\",a(\"buttonRadius\")),...y(a(\"buttonBackgroundColor\")),d(\"color\",a(\"buttonTextColor\")),d(\"box-shadow\",N(a(\"buttonShadow\")))]),c(\"body main img\",[d(\"border-radius\",a(\"imageRadius\"))]),...R?[c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card,.editable-service-card)',[d(\"background\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||\"#111a2e\"),d(\"background-color\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||\"#111a2e\"),\"border:1px solid rgba(255, 255, 255, 0.09) !important;\",\"box-shadow:0 10px 30px -10px rgba(0,0,0,0.5), 0 1px 3px 0 rgba(255,255,255,0.02) !important;\",d(\"color\",O)]),c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card) :where(h1,h2,h3,h4,h5,h6,strong,b)',[d(\"color\",et)]),c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card) :where(p,li,span:not([class*=\"badge\"]):not([class*=\"tag\"]):not([class*=\"pill\"]))',[d(\"color\",_||`color-mix(in srgb, ${O} 75%, transparent)`)]),c('body header, body .deneb-navbar, body [class*=\"navbar\"]',[d(\"background-color\",a(\"headerBackgroundColor\")||`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 85%, transparent)`),\"backdrop-filter:blur(16px) !important;\",\"-webkit-backdrop-filter:blur(16px) !important;\",\"border-bottom:1px solid rgba(255, 255, 255, 0.08) !important;\"]),c(\"body .deneb-nav-item, body nav a, body nav button\",[`color:color-mix(in srgb, ${O} 75%, transparent) !important;`]),c(\"body .deneb-nav-item:hover, body nav a:hover, body nav button:hover\",[\"color:#ffffff !important;\",\"background-color:rgba(255, 255, 255, 0.08) !important;\"]),c(\"body .deneb-nav-item.active, body nav a.active\",[\"color:#ffffff !important;\",\"background-color:rgba(255, 255, 255, 0.12) !important;\"]),c('body input:not([type=\"button\"]):not([type=\"submit\"]):not([type=\"color\"]):not([type=\"checkbox\"]):not([type=\"radio\"]), body textarea, body select',[d(\"background-color\",`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 60%, ${a(\"cardBackgroundColor\")||\"#131b2e\"})`),\"border:1px solid rgba(255, 255, 255, 0.14) !important;\",d(\"color\",O)]),c(\"body footer, body .site-footer\",[d(\"background-color\",a(\"footerBackgroundColor\")||`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 80%, #000000)`),\"border-top:1px solid rgba(255, 255, 255, 0.08) !important;\",d(\"color\",O)]),c('body .hero, body [class*=\"hero\"]:not(button):not(a):not(span)',[`background:radial-gradient(ellipse at 50% 0%, color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 14%, transparent), transparent 70%), ${a(\"backgroundColor\")||\"#090d16\"} !important;`]),c(\"body .deneb-mobile-drawer, body .deneb-dialog-content\",[d(\"background-color\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||\"#111a2e\"),\"border-color:rgba(255, 255, 255, 0.1) !important;\",d(\"color\",O)]),c('body :where(.eyebrow,[class*=\"badge\"],[class*=\"pill\"]:not(button))',[`background-color:color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 15%, transparent) !important;`,`color:${a(\"accentColor\")||a(\"primaryColor\")||\"#38bdf8\"} !important;`,`border-color:color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 28%, transparent) !important;`]),c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card):hover',[\"border-color:rgba(255, 255, 255, 0.18) !important;\",\"box-shadow:0 16px 40px -10px rgba(0,0,0,0.65), 0 1px 3px 0 rgba(255,255,255,0.04) !important;\"]),c('body :where(hr,[class*=\"divider\"],[class*=\"separator\"])',[\"border-color:rgba(255, 255, 255, 0.08) !important;\"]),c(\"body :where(.page-section.alt,section.alt)\",[`background:color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 3%, ${a(\"backgroundColor\")||\"#090d16\"}) !important;`]),c('body :where(.btn-secondary,[class*=\"btn-secondary\"],[class*=\"button-secondary\"],[data-variant=\"secondary\"],.editable-btn-secondary)',[\"background-color:rgba(255, 255, 255, 0.08) !important;\",\"color:#f8fafc !important;\",\"border:1px solid rgba(255, 255, 255, 0.14) !important;\"]),c('body :where(.btn-outline,[class*=\"btn-outline\"],[class*=\"button-outline\"],[data-variant=\"outline\"])',[\"background-color:transparent !important;\",\"color:#f8fafc !important;\",\"border-color:rgba(255, 255, 255, 0.22) !important;\"]),c('body :where(.btn-ghost,[class*=\"btn-ghost\"],[class*=\"button-ghost\"],[data-variant=\"ghost\"])',[\"background-color:transparent !important;\",\"color:#f8fafc !important;\"]),c('body :where(.btn-primary,[class*=\"btn-primary\"],[class*=\"button-primary\"],[data-variant=\"primary\"],.editable-btn-primary)',[`background-color:${a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\"} !important;`,`color:${a(\"buttonTextColor\")||(G(a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\")?\"#ffffff\":\"#0f172a\")} !important;`])]:[]],gt=T(P.sections)?P.sections:{};for(const[l,f]of Object.entries(gt)){if(!/^[a-zA-Z0-9_-]{1,64}$/.test(l)||!T(f))continue;const h=__name(mt=>q(f[mt]),\"sectionRead\"),D=h(\"backgroundColor\"),L=['[class*=\"absolute\"][class*=\"inset-0\"]','[class*=\"fixed\"][class*=\"inset-0\"]','[class*=\"absolute\"][class*=\"inset-x-0\"][class*=\"inset-y-0\"]','[class*=\"absolute\"][class*=\"top-0\"][class*=\"right-0\"][class*=\"bottom-0\"][class*=\"left-0\"]'].join(\",\"),W={all:\"body main section\",hero:\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",header:\"body header\",footer:\"body footer\",cards:'body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])'}[l]??`body :where([data-preview-page-key=\"${l}\"] > section,[data-design-section=\"${l}\"],[data-section-id=\"${l}\"],section#${l},section.${l})`;Q.push(c(W,[f.visible===!1?\"display:none !important;\":\"\",...y(D),d(\"color\",h(\"textColor\")),d(\"min-height\",h(\"minHeight\")),d(\"padding-block\",h(\"padding\")),d(\"max-width\",h(\"contentMaxWidth\")),d(\"gap\",h(\"gap\")),d(\"text-align\",h(\"textAlign\")),d(\"align-items\",E(h(\"contentAlign\")))]),c(`${W} :where(h1,h2,h3,h4,h5,h6)`,[d(\"color\",h(\"headingColor\")),d(\"text-align\",h(\"textAlign\"))]),c(`${W} :where(p,span,[data-design-text])`,[d(\"text-align\",h(\"textAlign\"))]),c(`${W} :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`,[...y(h(\"cardBackgroundColor\")),d(\"width\",h(\"cardWidth\")),h(\"cardWidth\")?\"max-width:100% !important;\":\"\",d(\"min-height\",h(\"cardMinHeight\")),d(\"border-radius\",h(\"cardRadius\"))]),c(`${W} :where([data-preview-list-path],[data-design-grid])`,[x(h(\"gridColumns\"))?\"display:grid !important;\":\"\",d(\"grid-template-columns\",x(h(\"gridColumns\")))]),c(`${W}::before,${W}::after`,D?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),c(`${W} > :where(${L})`,D?[\"background:none !important;\",\"background-image:none !important;\",\"box-shadow:none !important;\",\"mask-image:none !important;\",\"-webkit-mask-image:none !important;\"]:[]),c(`${W} > :where(${L})::before,${W} > :where(${L})::after`,D?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),c(`${W} > :where(${L}) :where(img,video,canvas,picture)`,D?[\"opacity:0.2 !important;\"]:[]))}const Et=T(P.elementStyles)?P.elementStyles:{},g=[[\"display\",\"display\"],[\"order\",\"order\"],[\"fontFamily\",\"font-family\"],[\"fontSize\",\"font-size\"],[\"lineHeight\",\"line-height\"],[\"fontWeight\",\"font-weight\"],[\"letterSpacing\",\"letter-spacing\"],[\"color\",\"color\"],[\"backgroundColor\",\"background-color\"],[\"textAlign\",\"text-align\"],[\"justifyContent\",\"justify-content\"],[\"alignItems\",\"align-items\"],[\"width\",\"width\"],[\"height\",\"height\"],[\"minWidth\",\"min-width\"],[\"minHeight\",\"min-height\"],[\"maxWidth\",\"max-width\"],[\"maxHeight\",\"max-height\"],[\"marginTop\",\"margin-top\"],[\"marginRight\",\"margin-right\"],[\"marginBottom\",\"margin-bottom\"],[\"marginLeft\",\"margin-left\"],[\"paddingTop\",\"padding-top\"],[\"paddingRight\",\"padding-right\"],[\"paddingBottom\",\"padding-bottom\"],[\"paddingLeft\",\"padding-left\"],[\"padding\",\"padding\"],[\"borderRadius\",\"border-radius\"],[\"borderWidth\",\"border-width\"],[\"borderColor\",\"border-color\"],[\"borderStyle\",\"border-style\"],[\"boxShadow\",\"box-shadow\"]];for(const[l,f]of Object.entries(Et).slice(0,256)){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(l)||!T(f))continue;const h=l.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"'),D=(()=>{if(l===\"site:all\")return\"body\";if(l.startsWith(\"page:\"))return`body :where([data-preview-page-key=\"${h.slice(5)}\"])`;if(l.startsWith(\"section:\")){const[,L=\"all\",H=\"\"]=h.split(\":\"),W=L===\"all\"?\"body\":`body :where([data-preview-page-key=\"${L}\"])`,mt=H.match(/^nth-(\\d+)$/)?.[1];return mt?`${W} > section:nth-of-type(${mt})`:`${W} :where([data-design-section=\"${H}\"],[data-section-id=\"${H}\"],section#${H},section.${H})`}if(l.includes(\":\")){const[L,H]=h.split(\":\");if(H===\"card\")return`body [data-preview-list-path=\"${L}\"] :is([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`;if(H)return`body [data-preview-list-path=\"${L}\"] :is([data-preview-field-path$=\".${H}\"],[data-field-path$=\".${H}\"],[data-content-path$=\".${H}\"])`}return`body :is([data-preview-field-path=\"${h}\"],[data-content-path=\"${h}\"],[data-field-path=\"${h}\"],[data-fivora-resolved-field-path=\"${h}\"],[data-preview-list-path=\"${h}\"],[data-preview-item-path=\"${h}\"])`})();Q.push(c(D,g.map(([L,H])=>d(H,q(f[L])))))}return Q.filter(Boolean).join(`\n`)},function(C,T){if(!T||typeof T!=\"object\"||Array.isArray(T))return C;const I=__name(E=>{const x=E.trim().toLowerCase(),v=x.match(/^#([0-9a-f]{3})$/);return v?`#${[...v[1]].map(N=>N.repeat(2)).join(\"\")}`:/^#[0-9a-f]{6}$/.test(x)?x:null},\"normalize\"),P=new Map,q=new Map;for(const[E,x]of Object.entries(T).slice(0,64)){if(typeof x!=\"string\")continue;const v=I(E),N=I(x);if(!v||!N||v===N)continue;P.set(v,N);const G=__name(R=>[Number.parseInt(R.slice(1,3),16),Number.parseInt(R.slice(3,5),16),Number.parseInt(R.slice(5,7),16)],\"channels\");q.set(G(v).join(\",\"),G(N)),v[1]===v[2]&&v[3]===v[4]&&v[5]===v[6]&&P.set(`#${v[1]}${v[3]}${v[5]}`,N)}if(P.size===0)return C;const a=[...P.keys()].sort((E,x)=>x.length-E.length).map(E=>E.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")),d=new RegExp(`(?<!\\\\\\\\)(?:${a.join(\"|\")})(?![0-9a-f])`,\"gi\"),c=C.replace(d,E=>{const x=I(E);return x?P.get(x)??E:E}),y=/(rgba?\\(\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})/gi;return c.replace(y,(E,x,v,N,G,R,et)=>{const O=q.get(`${v},${G},${et}`);return O?`${x}${O[0]}${N}${O[1]}${R}${O[2]}`:E})},\"fivora-universal-design-overrides\",function(C,T){const I=T??document,P=C&&typeof C==\"object\"&&!Array.isArray(C)?C:null,q=P?.requirements&&typeof P.requirements==\"object\"&&!Array.isArray(P.requirements)?P.requirements:null,a=P?.template&&typeof P.template==\"object\"&&!Array.isArray(P.template)?P.template:null,d=a?.structure&&typeof a.structure==\"object\"&&!Array.isArray(a.structure)?a.structure:null,c=Array.isArray(q?.requiredPages),y=Array.isArray(d?.pages);if(!c&&!y)return;const E=c?q?.requiredPages:d?.pages,x=new Set(E.filter(g=>typeof g==\"string\").map(g=>g.trim()).filter(Boolean)),v=Array.isArray(a?.pageDefinitions)?a.pageDefinitions:[],N=Array.isArray(d?.pageDefinitions)?d.pageDefinitions:[],R=(v.length>0?v:N).flatMap(g=>{if(!g||typeof g!=\"object\"||Array.isArray(g))return[];const l=g;if(typeof l.id!=\"string\"||!l.id.trim())return[];const f=l.id.trim(),h=typeof l.label==\"string\"&&l.label.trim()?l.label.trim():f.replace(/_/g,\" \"),D=typeof l.route==\"string\"?l.route.trim():\"\",L=D===\"/\"?\"/\":`/${(D||f).replace(/^\\/+|\\/+$/g,\"\")}`;return[{id:f,label:h,route:L}]}),O=(y?d?.pages:E).filter(g=>typeof g==\"string\").map(g=>g.trim()).filter(Boolean).map((g,l)=>({id:g,label:g.replace(/_/g,\" \"),route:l===0?\"/\":`/${g}`})),_=R.length>0?R:O;if(_.length===0)return;const M=_.filter(g=>!x.has(g.id));if(M.length===0){I.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(g=>g.removeAttribute(\"data-fivora-page-disabled\"));return}let V=I.getElementById(\"fivora-page-selection-style\");(!V||V.tagName!==\"STYLE\")&&(V=I.createElement(\"style\"),V.id=\"fivora-page-selection-style\",V.textContent='[data-fivora-page-disabled=\"true\"]{display:none!important}',I.head.appendChild(V)),I.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(g=>g.removeAttribute(\"data-fivora-page-disabled\"));const U=__name(g=>{let l=g;try{const D=new URL(g,I.baseURI);if(D.origin!==I.location?.origin)return\"\";l=D.pathname}catch{return\"\"}const f=l.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];f&&l.startsWith(f)&&(l=l.slice(f.length)||\"/\"),l=l.replace(/\\/index\\.html$/i,\"/\").replace(/\\.html$/i,\"\");const h=l.replace(/\\/+$/g,\"\")||\"/\";return h.startsWith(\"/\")?h:`/${h}`},\"normalizePath\"),X=__name(g=>_.find(l=>{const f=U(l.route);return f?f===\"/\"?g===\"/\":g===f||g.startsWith(`${f}/`):!1}),\"pageForPath\"),K=__name(g=>{for(const l of[\"href\",\"formaction\",\"data-href\",\"data-route\",\"data-url\"]){const f=g.getAttribute(l);if(!f)continue;const h=X(U(f));if(h)return h}},\"pageForControl\"),Z=__name(g=>{g&&g.setAttribute(\"data-fivora-page-disabled\",\"true\")},\"disable\");for(const g of M)for(const l of[\"data-page-key\",\"data-required-page\",\"data-target-page\"])I.querySelectorAll(`[${l}]`).forEach(f=>{f.getAttribute(l)===g.id&&Z(f)});const Q=Array.from(I.querySelectorAll(\"a[href]\"));for(const g of Q){const l=K(g);if(!l||x.has(l.id))continue;if(g.classList.contains(\"absolute\")&&(g.classList.contains(\"inset-0\")||g.classList.contains(\"inset-x-0\")&&g.classList.contains(\"inset-y-0\")))Z(g.closest(\"[data-preview-item-path],[data-design-card],article,li\"));else{const h=g.closest(\"li\");Z(h&&h.querySelectorAll(\"a[href]\").length===1?h:g)}}const gt=Array.from(I.querySelectorAll('button,[role=\"button\"],[data-href],[data-route],[data-url]')).filter(g=>g.tagName!==\"A\");for(const g of gt){const l=K(g);if(!l||x.has(l.id))continue;const f=g.closest(\"li\");Z(f&&f.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]').length===1?f:g)}const Et=I.querySelector(\"main section\");for(const g of I.querySelectorAll(\"main section\")){const l=Array.from(g.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]')),f=l.map(K).filter(L=>!!L),h=g.hasAttribute(\"data-preview-page-key\"),D=g===Et||g.hasAttribute(\"data-design-hero\")||/(?:^|\\s)(?:hero|banner|masthead)(?:\\s|$)/i.test(g.className)||!!g.querySelector(\"h1\");!h&&!D&&f.length>0&&f.length===l.length&&f.every(L=>!x.has(L.id))&&Z(g)}},function(C){const T=C.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];if(!T)return C;let I=C;const P=`${T}${T}`;for(;I.startsWith(P);)I=`${T}${I.slice(P.length)}`;return I},function(){if(window.__fivoraSectionNavigationInstalled)return;window.__fivoraSectionNavigationInstalled=!0;const C=__name(c=>typeof CSS<\"u\"&&typeof CSS.escape==\"function\"?CSS.escape(c):c.replace(/[^a-zA-Z0-9_-]/g,y=>`\\\\${y.codePointAt(0)?.toString(16)??\"\"} `),\"escapeSelector\"),T=__name(()=>window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live|candidate)\\/[^/]+)/)?.[1]??\"\",\"previewRoot\"),I=__name(c=>{const y=T(),x=(y&&c.pathname.startsWith(y)?c.pathname.slice(y.length):c.pathname).replace(/\\/(?:index\\.html?)?$/i,\"\").split(\"/\").filter(Boolean);return(x[x.length-1]??\"home\").replace(/\\.html?$/i,\"\")},\"routeSectionKey\"),P=__name(c=>{const y=c.getAttribute(\"href\")?.trim();if(!y||c.hasAttribute(\"download\")||c.target&&c.target!==\"_self\"||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(y))return null;let E;try{E=new URL(y,window.location.href)}catch{return null}if(E.origin!==window.location.origin)return null;const x=E.hash?decodeURIComponent(E.hash.slice(1)).trim():\"\",v=x||I(E);if(!v)return null;if(x){const R=document.getElementById(x);if(R)return{target:R,key:v}}const N=C(v),G=document.querySelector(`section#${N},section[data-fivora-section=\"${N}\"],section[data-section-id=\"${N}\"],[data-preview-page-key=\"${N}\"]`);return G?{target:G,key:v}:null},\"findTarget\"),q=__name(()=>{let c=0;for(const y of document.querySelectorAll(\"header,nav,[data-fivora-sticky-header]\")){const E=window.getComputedStyle(y);if(E.position!==\"fixed\"&&E.position!==\"sticky\")continue;const x=y.getBoundingClientRect();x.height<=0||x.top>4||x.bottom<=0||(c=Math.max(c,x.bottom))}return c},\"fixedHeaderOffset\"),a=__name((c,y,E)=>{const x=Math.max(0,window.scrollY+c.getBoundingClientRect().top-q()-8),v=window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;window.scrollTo({top:x,behavior:v?\"auto\":\"smooth\"}),E&&window.location.hash!==`#${y}`&&window.history.pushState(null,\"\",`${window.location.pathname}${window.location.search}#${encodeURIComponent(y)}`),window.dispatchEvent(new CustomEvent(\"fivora:section-navigation\",{detail:{key:y,target:c}}))},\"scrollToTarget\");document.addEventListener(\"click\",c=>{if(c.defaultPrevented||c.button!==0||c.metaKey||c.ctrlKey||c.shiftKey||c.altKey)return;const y=c.target?.closest?.(\"a[href]\");if(!y)return;const E=P(y);!E||E.target===y||(c.preventDefault(),c.stopImmediatePropagation(),a(E.target,E.key,!0))},!0);const d=__name(()=>{if(!window.location.hash)return;const c=document.createElement(\"a\");c.href=window.location.hash;const y=P(c);y&&a(y.target,y.key,!1)},\"revealInitialHash\");window.requestAnimationFrame(()=>window.requestAnimationFrame(d))});";
|
|
4
|
+
module.exports = "var on=Object.defineProperty;var an=(j,C,T)=>C in j?on(j,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):j[C]=T;var te=(j,C,T)=>an(j,typeof C!=\"symbol\"?C+\"\":C,T);var __name=typeof __name==\"function\"?__name:((j,C)=>typeof Object.defineProperty==\"function\"?Object.defineProperty(j,\"name\",{value:C,configurable:!0}):j);(function(C,T,I,P,q,a,d){try{if(typeof Node<\"u\"&&Node.prototype){const t=Node.prototype.removeChild;Node.prototype.removeChild=function(r){return r&&r.parentNode!==this?(typeof console<\"u\"&&typeof console.warn==\"function\"&&console.warn(\"PreviewBridge: removeChild on non-child node prevented from crashing React\",r),r):t.apply(this,arguments)};const e=Node.prototype.insertBefore;Node.prototype.insertBefore=function(r,o){return o&&o.parentNode!==this?(typeof console<\"u\"&&typeof console.warn==\"function\"&&console.warn(\"PreviewBridge: insertBefore on non-child reference node prevented from crashing React\",o),r):e.apply(this,arguments)}}typeof document<\"u\"&&document.documentElement&&(document.documentElement.setAttribute(\"data-gramm\",\"false\"),document.documentElement.setAttribute(\"data-gramm_editor\",\"false\"),document.documentElement.setAttribute(\"data-enable-grammarly\",\"false\"),document.documentElement.setAttribute(\"translate\",\"no\"))}catch{}const c=`${[\"MARKET\",\"PLACE\"].join(\"\")}_PREVIEW_`,y=__name(t=>`${c}${t}`,\"previousPreviewMessage\"),E=__name(t=>`__${c}${t}__`,\"previousPreviewStorageKey\"),x=\"FIVORA_PREVIEW_FOCUS_PAGE\",v=y(\"FOCUS_PAGE\"),N=\"FIVORA_PREVIEW_FOCUS_RESULT\",G=y(\"FOCUS_RESULT\"),R=\"FIVORA_PREVIEW_READY\",et=y(\"READY\"),O=\"data-fivora-preview-active-field\",_=\"data-fivora-resolved-field-path\",M=\"data-fivora-empty-editable\",V=\"data-fivora-empty-collection\",U=\"data-preview-list-path\",X=\"data-preview-item-path\",K=\"data-preview-static\",Z=\"__FIVORA_UNIVERSAL_PREVIEW_FOCUS__\",Q=\"__FIVORA_VISUAL_EDITOR_TARGETS__\",gt=\"__FIVORA_PREVIEW_PARENT_ORIGIN__\",Et=E(\"PARENT_ORIGIN\"),g=\"__FIVORA_PREVIEW_SITE_DATA_CACHE__\",l=E(\"SITE_DATA_CACHE\"),f=\"__FIVORA_PREVIEW_SITE_DATA__\",h=E(\"SITE_DATA\"),D=\"FIVORA_PREVIEW_SITE_DATA\",L=y(\"SITE_DATA\"),H=\"FIVORA_PREVIEW_SITE_DATA_APPLIED\",W=y(\"SITE_DATA_APPLIED\"),mt=\"FIVORA_PREVIEW_CONTENT_PATCH\",_r=y(\"CONTENT_PATCH\"),kr=\"FIVORA_PREVIEW_STYLE_PATCH\",Me=\"fivora-template-color-replacements\",Or=[200],Lr=2500,Mr=1600,Fr=12e3,Le=class Le{constructor(){te(this,\"elementToPath\",new WeakMap);te(this,\"pathToElements\",new Map);te(this,\"dynamicTargets\",new Set)}getPath(e){return this.elementToPath.get(e)}findTargets(e){return Array.from(this.pathToElements.get(e)??[])}getDynamicTargets(){return Array.from(this.dynamicTargets)}register(e,r){this.elementToPath.set(e,r),this.pathToElements.has(r)||this.pathToElements.set(r,new Set),this.pathToElements.get(r).add(e),this.dynamicTargets.add(e)}clear(){this.pathToElements.clear(),this.dynamicTargets.clear()}};__name(Le,\"TargetRegistry\");let ee=Le;const Fe=new ee,Nr=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small\";let re=[];const Ne=new Map;let De=0,ne=!1,kt=null,oe,ie=[],at=null,k=null,Be=\"\",He=\"\",Ve=\"\";function ht(){try{window.sessionStorage.removeItem(Z)}catch{}}__name(ht,\"clearPendingFocus\");function ae(){try{return window.sessionStorage.getItem(gt)||window.sessionStorage.getItem(Et)}catch{return null}}__name(ae,\"readRememberedParentOrigin\");function se(t){if(t)try{window.sessionStorage.setItem(gt,t)}catch{}}__name(se,\"rememberParentOrigin\");function qe(){for(const t of ie)window.clearTimeout(t);ie=[]}__name(qe,\"clearSiteDataRelayTimers\");function Ge(){const t=new Set;ct&&t.add(ct),t.add(window.location.origin);const e=ae();e&&t.add(e);try{if(document.referrer){const r=new URL(document.referrer).origin;r&&r!==\"null\"&&t.add(r)}}catch{}try{const r=window.location.ancestorOrigins?.item(0);r&&t.add(r)}catch{}return Array.from(t)}__name(Ge,\"collectSiteDataRelayOrigins\");function Ot(t,e){const r=Ge(),o=e?.fanOut?r:r.slice(0,1);for(const i of o)for(const n of[D,L])try{window.dispatchEvent(new MessageEvent(\"message\",{data:{type:n,siteData:t,__fivoraBridgeRelay:!0},origin:i,source:window.parent}))}catch{}}__name(Ot,\"relaySiteDataToTemplateRuntime\");function Lt(t,e){k=t;try{window[f]=t,window[h]=t}catch{}const r=__name(()=>{at=null;try{const o=JSON.stringify(k);window.sessionStorage.setItem(g,o),window.sessionStorage.setItem(l,o)}catch{}},\"writeSessionCache\");if(e?.immediate){at!==null&&(window.clearTimeout(at),at=null),r();return}at!==null&&window.clearTimeout(at),at=window.setTimeout(r,Lr)}__name(Lt,\"persistSiteData\");function We(t){const e=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,r=e?.requirements&&typeof e.requirements==\"object\"&&!Array.isArray(e.requirements)?e.requirements:null,o=e?.template&&typeof e.template==\"object\"&&!Array.isArray(e.template)?e.template:null,i=o?.structure&&typeof o.structure==\"object\"&&!Array.isArray(o.structure)?o.structure:null;try{return JSON.stringify({requiredPages:r?.requiredPages??null,pages:i?.pages??null,pageDefinitions:o?.pageDefinitions??i?.pageDefinitions??null})}catch{return String(Date.now())}}__name(We,\"pagesSignature\");let st=null,lt=null;function je(t){const e=[];for(const r of t.matchAll(/([^.[\\]]+)|\\[(\\d+)\\]/g))r[2]!==void 0?e.push(Number(r[2])):r[1]&&e.push(r[1]);return e}__name(je,\"parseFieldPath\");function Ue(t,e,r){if(e.length===0)return t;const o=__name((i,n)=>{const s=e[n],u=n===e.length-1,p=u?void 0:e[n+1];if(typeof s==\"number\"){const w=(Array.isArray(i)?i:[]).slice();if(u)return w[s]=r,w;const F=w[s];return w[s]=F==null||typeof F!=\"object\"?o(typeof p==\"number\"?[]:{},n+1):o(F,n+1),w}const m={...i&&typeof i==\"object\"&&!Array.isArray(i)?i:{}};if(u)return m[s]=r,m;const S=m[s];return m[s]=S==null||typeof S!=\"object\"?o(typeof p==\"number\"?[]:{},n+1):o(S,n+1),m},\"setAt\");return o(t,0)}__name(Ue,\"setValueAtPath\");function ze(){return(k&&typeof k==\"object\"&&!Array.isArray(k)?k:{}).content??{}}__name(ze,\"readPublishedContent\");function le(t){const r={...k&&typeof k==\"object\"&&!Array.isArray(k)?k:{},content:t};k=r;try{window[f]=r,window[h]=r}catch{}return r}__name(le,\"writePublishedContent\");function ce(){st!==null&&window.clearTimeout(st),st=window.setTimeout(()=>{st=null,k!=null&&Ot(k,{fanOut:!1})},Mr)}__name(ce,\"scheduleContentOnlyRelay\");function Mt(){lt!==null&&window.clearTimeout(lt),lt=window.setTimeout(()=>{if(lt=null,k==null)return;const t=window;if(typeof t.requestIdleCallback==\"function\"){t.requestIdleCallback(()=>{k!=null&&Lt(k,{immediate:!0})},{timeout:4e3});return}Lt(k,{immediate:!0})},Fr)}__name(Mt,\"scheduleContentOnlyPersist\");function de(t,e){const r=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [${_}=\"${CSS.escape(t)}\"]`));for(const o of r){if(tt?.target===o)continue;if(o.tagName===\"IMG\"){typeof e==\"string\"&&e.trim()&&o.setAttribute(\"src\",e);continue}if(typeof e!=\"string\"&&typeof e!=\"number\"&&typeof e!=\"boolean\")continue;const i=(o.getAttribute(\"data-fivora-value-prefix\")??\"\")+String(e)+(o.getAttribute(\"data-fivora-value-suffix\")??\"\");if(o.childElementCount===0)o.textContent=i;else{const n=Array.from(o.childNodes).find(s=>s.nodeType===Node.TEXT_NODE&&s.textContent?.trim());n?n.textContent=i:o.textContent=i}J&&(i.trim().length===0?o.setAttribute(M,\"true\"):o.removeAttribute(M))}}__name(de,\"applyDomFieldValue\");function Ke(t){if(!Array.isArray(t)||t.length===0)return;let e=ze();for(const r of t){if(!r||typeof r.path!=\"string\"||!r.path.trim())continue;const o=je(r.path);o.length!==0&&(e=Ue(e,o,r.value),de(r.path,r.value))}le(e),ce(),Mt()}__name(Ke,\"publishContentPatches\");function Ye(t){le(t),ce(),Mt()}__name(Ye,\"publishContentOnly\");function Je(t,e){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(t)||!e||typeof e!=\"object\"||Array.isArray(e))return;const r=k&&typeof k==\"object\"&&!Array.isArray(k)?k:{},o=r.template&&typeof r.template==\"object\"&&!Array.isArray(r.template)?r.template:{},i=o.structure&&typeof o.structure==\"object\"&&!Array.isArray(o.structure)?o.structure:{},n=(i.theme&&typeof i.theme==\"object\"&&!Array.isArray(i.theme)?i.theme:o.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:{})||{},s=n.elementStyles&&typeof n.elementStyles==\"object\"&&!Array.isArray(n.elementStyles)?n.elementStyles:{},u=e&&typeof e==\"object\"&&Object.values(e).some(A=>A!=null&&A!==\"\"),p={...s};u?p[t]=e:delete p[t];const b={...n,designCustomizationVersion:1,elementStyles:p},m={...o,theme:b,structure:{...i,theme:b}},S={...r,template:m};k=S,xt(S),Xe(t,e),Mt()}__name(Je,\"publishElementStylePatch\");function Xe(t,e){if(!t||!e||typeof e!=\"object\"||Array.isArray(e))return;const r=e;let o=[];if(t.includes(\":\")){const[n,s]=t.split(\":\");s===\"card\"?o=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(n)}\"] [data-preview-item-path], [data-preview-list-path=\"${CSS.escape(n)}\"] .card, [data-preview-list-path=\"${CSS.escape(n)}\"] article`)):s&&(o=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(n)}\"] [data-preview-field-path$=\".${CSS.escape(s)}\"], [data-preview-list-path=\"${CSS.escape(n)}\"] [data-field-path$=\".${CSS.escape(s)}\"]`)))}else o=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [data-preview-item-path=\"${CSS.escape(t)}\"], [data-preview-style-target=\"${CSS.escape(t)}\"], [data-field-path=\"${CSS.escape(t)}\"], [data-content-path=\"${CSS.escape(t)}\"]`));const i=__name(n=>n==null||n===\"\"?\"\":typeof n==\"number\"?`${n}px`:String(n),\"toCssVal\");for(const n of o){if(r.color?(n.style.setProperty(\"color\",String(r.color),\"important\"),n.style.setProperty(\"--deneb-color\",String(r.color))):(n.style.removeProperty(\"color\"),n.style.removeProperty(\"--deneb-color\")),r.textAlign?(n.style.setProperty(\"text-align\",String(r.textAlign),\"important\"),n.style.setProperty(\"--deneb-text-align\",String(r.textAlign))):(n.style.removeProperty(\"text-align\"),n.style.removeProperty(\"--deneb-text-align\")),r.fontSize){const s=i(r.fontSize);n.style.setProperty(\"font-size\",s,\"important\"),n.style.setProperty(\"--deneb-font-size\",s)}else n.style.removeProperty(\"font-size\"),n.style.removeProperty(\"--deneb-font-size\");if(r.fontFamily?(n.style.setProperty(\"font-family\",String(r.fontFamily),\"important\"),n.style.setProperty(\"--deneb-font-family\",String(r.fontFamily))):(n.style.removeProperty(\"font-family\"),n.style.removeProperty(\"--deneb-font-family\")),r.lineHeight?(n.style.setProperty(\"line-height\",String(r.lineHeight),\"important\"),n.style.setProperty(\"--deneb-line-height\",String(r.lineHeight))):(n.style.removeProperty(\"line-height\"),n.style.removeProperty(\"--deneb-line-height\")),r.fontWeight?(n.style.setProperty(\"font-weight\",String(r.fontWeight),\"important\"),n.style.setProperty(\"--deneb-font-weight\",String(r.fontWeight))):(n.style.removeProperty(\"font-weight\"),n.style.removeProperty(\"--deneb-font-weight\")),r.letterSpacing?(n.style.setProperty(\"letter-spacing\",i(r.letterSpacing),\"important\"),n.style.setProperty(\"--deneb-letter-spacing\",i(r.letterSpacing))):(n.style.removeProperty(\"letter-spacing\"),n.style.removeProperty(\"--deneb-letter-spacing\")),r.textTransform?(n.style.setProperty(\"text-transform\",String(r.textTransform),\"important\"),n.style.setProperty(\"--deneb-text-transform\",String(r.textTransform))):(n.style.removeProperty(\"text-transform\"),n.style.removeProperty(\"--deneb-text-transform\")),r.backgroundColor?(n.style.setProperty(\"background-color\",String(r.backgroundColor),\"important\"),n.style.setProperty(\"background\",String(r.backgroundColor),\"important\"),n.style.setProperty(\"--deneb-card-bg\",String(r.backgroundColor))):(n.style.removeProperty(\"background-color\"),n.style.removeProperty(\"background\"),n.style.removeProperty(\"--deneb-card-bg\")),r.borderRadius){const s=i(r.borderRadius);n.style.setProperty(\"border-radius\",s,\"important\"),n.style.setProperty(\"--deneb-card-radius\",s)}else n.style.removeProperty(\"border-radius\"),n.style.removeProperty(\"--deneb-card-radius\");if(r.padding){const s=i(r.padding);n.style.setProperty(\"padding\",s,\"important\"),n.style.setProperty(\"--deneb-card-pt\",s)}else n.style.removeProperty(\"padding\"),n.style.removeProperty(\"--deneb-card-pt\");if(r.paddingTop?n.style.setProperty(\"padding-top\",i(r.paddingTop),\"important\"):n.style.removeProperty(\"padding-top\"),r.paddingBottom?n.style.setProperty(\"padding-bottom\",i(r.paddingBottom),\"important\"):n.style.removeProperty(\"padding-bottom\"),r.paddingLeft?n.style.setProperty(\"padding-left\",i(r.paddingLeft),\"important\"):n.style.removeProperty(\"padding-left\"),r.paddingRight?n.style.setProperty(\"padding-right\",i(r.paddingRight),\"important\"):n.style.removeProperty(\"padding-right\"),r.boxShadow?(n.style.setProperty(\"box-shadow\",String(r.boxShadow),\"important\"),n.style.setProperty(\"--deneb-card-shadow\",String(r.boxShadow))):(n.style.removeProperty(\"box-shadow\"),n.style.removeProperty(\"--deneb-card-shadow\")),r.borderColor?(n.style.setProperty(\"border-color\",String(r.borderColor),\"important\"),n.style.setProperty(\"--deneb-card-border-c\",String(r.borderColor))):(n.style.removeProperty(\"border-color\"),n.style.removeProperty(\"--deneb-card-border-c\")),r.borderWidth){const s=i(r.borderWidth);n.style.setProperty(\"border-width\",s,\"important\"),n.style.setProperty(\"border-style\",\"solid\",\"important\"),n.style.setProperty(\"--deneb-card-border-w\",s)}else n.style.removeProperty(\"border-width\"),n.style.removeProperty(\"border-style\"),n.style.removeProperty(\"--deneb-card-border-w\");r.marginTop?n.style.setProperty(\"margin-top\",i(r.marginTop),\"important\"):n.style.removeProperty(\"margin-top\"),r.marginBottom?n.style.setProperty(\"margin-bottom\",i(r.marginBottom),\"important\"):n.style.removeProperty(\"margin-bottom\"),r.marginLeft?n.style.setProperty(\"margin-left\",i(r.marginLeft),\"important\"):n.style.removeProperty(\"margin-left\"),r.marginRight?n.style.setProperty(\"margin-right\",i(r.marginRight),\"important\"):n.style.removeProperty(\"margin-right\"),r.display?n.style.setProperty(\"display\",String(r.display),\"important\"):n.style.removeProperty(\"display\"),r.order!==void 0&&r.order!==null&&r.order!==\"\"?n.style.setProperty(\"order\",String(r.order),\"important\"):n.style.removeProperty(\"order\")}}__name(Xe,\"applyElementStyleDirectly\");function Ft(t,e){if(e?.contentOnly){const r=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null;Ye(r?.content??t);return}if(st!==null&&(window.clearTimeout(st),st=null),lt!==null&&(window.clearTimeout(lt),lt=null),ne){kt=t,oe=e;return}ne=!0;try{if(Lt(t,{immediate:e?.persistImmediate}),ue(t),xt(t,{colorReplacements:e?.colorReplacements===!0}),Ot(t,{fanOut:e?.fanOut===!0}),e?.scheduleRelays!==!1){qe();for(const r of Or)ie.push(window.setTimeout(()=>{k!=null&&Ot(k,{fanOut:!0})},r))}}finally{if(ne=!1,kt!=null){const r=kt,o=oe;kt=null,oe=void 0,window.setTimeout(()=>{Ft(r,o)},0)}}}__name(Ft,\"publishSiteData\");function Ze(t){const e=t?.full!==!1,r=\"ontouchstart\"in window||navigator.maxTouchPoints>0||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4;window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{try{Y({type:H,full:e}),Y({type:W,full:e})}catch{}const o=k;if(o==null)return;const i=__name(()=>xt(o,{colorReplacements:!0}),\"run\");if(!r){window.setTimeout(i,0);return}const n=window.requestIdleCallback;typeof n==\"function\"?n(i,{timeout:4e3}):window.setTimeout(i,1200)})})}__name(Ze,\"acknowledgeSiteDataApplied\");const Dr=(()=>{try{return window.location.ancestorOrigins?.item(0)??null}catch{return null}})(),Br=(()=>{try{return window.parent!==window?window.parent.location.origin:null}catch{return null}})();let ct=C({currentOrigin:window.location.origin,referrer:document.referrer,rememberedOrigin:ae(),ancestorOrigin:Dr,accessibleParentOrigin:Br});se(ct);function Qe(t){if(t.source!==window.parent)return!1;if(ct)return t.origin===ct;try{const e=new URL(t.origin).origin;return e===\"null\"?!1:(ct=e,se(e),!0)}catch{return!1}}__name(Qe,\"isTrustedParentMessage\");function Y(t){window.parent.postMessage(t,ct??\"*\")}__name(Y,\"postToParent\");function yt(t,e,r=0){t.requestId&&(Y({type:N,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:r}),Y({type:G,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:r}))}__name(yt,\"postFocusResult\");function Ct(){try{Y({type:R,pathname:window.location.pathname}),Y({type:et,pathname:window.location.pathname})}catch{}}__name(Ct,\"announceReady\");async function tr(t){const e=++De,o=(t&&typeof t==\"object\"&&!Array.isArray(t)?t:null)?.colorReplacements,i=document.getElementById(Me);if(!o||typeof o!=\"object\"||Array.isArray(o)||Object.keys(o).length===0){i?.remove();return}const n=Array.from(document.querySelectorAll('link[rel=\"stylesheet\"][href]')),s=await Promise.all(n.map(async b=>{const m=b.href;let S=Ne.get(m);if(S===void 0){const w=await fetch(m,{credentials:\"same-origin\"});if(!w.ok)return\"\";S=await w.text(),Ne.set(m,S)}const A=I(S,o);return A===S?\"\":A}));if(e!==De)return;const u=s.filter(Boolean).join(`\n`);if(!u){i?.remove();return}const p=i instanceof HTMLStyleElement?i:document.createElement(\"style\");p.id=Me,p.textContent=u,p.isConnected||document.head.appendChild(p)}__name(tr,\"applyTemplateColorReplacements\");function xt(t,e){const r=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,o=r?.template&&typeof r.template==\"object\"&&!Array.isArray(r.template)?r.template:null,i=o?.structure&&typeof o.structure==\"object\"&&!Array.isArray(o.structure)?o.structure:null,n=i?.theme&&typeof i.theme==\"object\"&&!Array.isArray(i.theme)?i.theme:o?.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:null,s=(()=>{try{return JSON.stringify(n??null)}catch{return String(Date.now())}})();if(s!==Be){Be=s;const p=n&&typeof n==\"object\"&&!Array.isArray(n)?n:null,b=typeof p?.backgroundColor==\"string\"?p.backgroundColor:typeof p?.background==\"string\"?p.background:\"\";(b&&/^#[0-9a-f]{3,6}$/i.test(b.trim())?(()=>{const w=b.trim().toLowerCase(),F=w.length===4?`#${w[1]}${w[1]}${w[2]}${w[2]}${w[3]}${w[3]}`:w,B=Number.parseInt(F.slice(1,3),16),At=Number.parseInt(F.slice(3,5),16),St=Number.parseInt(F.slice(5,7),16);return(B*299+At*587+St*114)/1e3<130})():!1)?(document.documentElement.classList.add(\"dark\"),document.documentElement.setAttribute(\"data-theme\",\"dark\"),document.body&&(document.body.classList.add(\"dark\"),document.body.setAttribute(\"data-theme\",\"dark\"))):b&&(document.documentElement.classList.remove(\"dark\"),document.documentElement.setAttribute(\"data-theme\",\"light\"),document.body&&(document.body.classList.remove(\"dark\"),document.body.setAttribute(\"data-theme\",\"light\")));const S=T(n),A=document.getElementById(P);if(!S)A?.remove();else{const w=A instanceof HTMLStyleElement?A:document.createElement(\"style\");w.id=P,w.textContent=S,w.isConnected||document.head.appendChild(w)}}if(e?.colorReplacements){if(s===He)return;He=s,tr(n).catch(()=>{})}}__name(xt,\"applyUniversalTheme\");function ue(t){const e=We(t);e!==Ve&&(Ve=e,q(t,document),window.setTimeout(()=>q(t,document),300))}__name(ue,\"applySelectedPages\");function $(t){return String(t??\"\").trim().replace(/\\s+/g,\" \").toLowerCase()}__name($,\"normalizeText\");function Nt(t){const e=String(t??\"\").trim();if(!e)return[];const r=e.split(/[,;|\\n\\r]+/).map(o=>$(o)).filter(o=>o.length>=3);return Array.from(new Set([$(e),...r])).filter(o=>o.length>=2)}__name(Nt,\"valueFragments\");function Dt(t,e){const r=$(e),o=$(t);return/image|photo|logo|banner|thumbnail|cover/.test(r)||/^(https?:|data:|blob:|\\/)/.test(o)}__name(Dt,\"isImageValue\");function er(t){const e=new Set,r=t.getAttribute(\"src\")||\"\";r&&e.add(r),\"src\"in t&&t.src&&e.add(t.src),\"currentSrc\"in t&&t.currentSrc&&e.add(t.currentSrc);const o=t.getAttribute(\"srcset\");o&&o.split(\",\").forEach(i=>{const n=i.trim().split(/\\s+/)[0];n&&e.add(n)});for(const i of[\"data-src\",\"data-original\",\"data-fallback\",\"data-nimg\",\"data-image\",\"data-url\"]){const n=t.getAttribute(i);n&&n!==\"1\"&&e.add(n)}if(t.style.backgroundImage){const i=t.style.backgroundImage.match(/url\\([\"']?([^\"']+)[\"']?\\)/i);i?.[1]&&e.add(i[1])}for(const i of Array.from(e))try{const s=new URL(i,window.location.href).searchParams.get(\"url\");if(s){e.add(s);try{e.add(decodeURIComponent(s))}catch{}}}catch{}return Array.from(e).filter(Boolean)}__name(er,\"extractImageCandidates\");function fe(t,e){const r=String(e??\"\").trim();if(!r)return!1;const o=er(t);if(o.length===0)return!1;const n=r.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();for(const s of o){if(s===r)return!0;try{if(new URL(s,window.location.href).href===new URL(r,window.location.href).href)return!0}catch{}if(s.includes(r)||r.includes(s))return!0;try{const b=decodeURIComponent(s);if(b.includes(r)||r.includes(b))return!0}catch{}const p=s.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();if(p&&n&&p.length>=3&&p===n)return!0}return!1}__name(fe,\"imageMatchesValue\");function pe(t,e){return Array.from(t.querySelectorAll(\"img\")).filter(r=>fe(r,e))}__name(pe,\"findImageMatches\");function Bt(t,e){const r=String(e??\"\").trim();return r?[t.getAttribute(\"href\"),t.getAttribute(\"src\"),t.getAttribute(\"poster\"),t.getAttribute(\"srcset\"),t.style.backgroundImage].filter(i=>!!i).some(i=>{if(i===r||i.includes(r))return!0;try{return new URL(i,window.location.href).href===new URL(r,window.location.href).href}catch{return!1}}):!1}__name(Bt,\"attributeMatchesValue\");function Ht(t,e){return Array.from(t.querySelectorAll('a[href], img[src], source[src], video[poster], [style*=\"background-image\"]')).filter(r=>Bt(r,e))}__name(Ht,\"findAttributeMatches\");function rr(t,e){const r=Nt(e);if(r.length===0)return[];const o=Array.from(t.querySelectorAll(Nr)),i=o.filter(n=>{const s=$(n.textContent);return r.some(u=>s===u)});return i.length>0?i:o.filter(n=>{const s=$(n.textContent);return r.some(u=>s.includes(u)||u.includes(s))})}__name(rr,\"findTextMatches\");function Vt(t,e,r){if(Dt(e,r)){const o=pe(t,e);if(o.length>0)return o}return rr(t,e)}__name(Vt,\"findValueMatches\");function nr(t,e,r){if(Dt(e,r)&&pe(t,e).length>0)return!0;const o=$(t.textContent);return Nt(e).some(i=>o.includes(i))}__name(nr,\"subtreeContainsValue\");function or(t,e){const r=t[0];if(!r)return null;let o=r;for(;o;){if(t.every(i=>o?.contains(i)))return o;if(o===e)break;o=o.parentElement}return e??r}__name(or,\"lowestCommonAncestor\");function dt(t){const e=String(t??\"\").trim();if(!e)return[];const r=e.replace(/\\[(\\d+)\\]/g,\".$1\"),o=r.replace(/\\.(\\d+)(?=\\.|$)/g,\"[$1]\");return Array.from(new Set([e,r,o]))}__name(dt,\"pathVariants\");function ge(t){return Array.from(new Set([t.fieldPath,...t.fieldPaths??[]].filter(e=>!!(e&&e.trim())).flatMap(e=>dt(e))))}__name(ge,\"focusPathCandidates\");function vt(t){if(t.closest(\"[hidden]\"))return!1;let e=t;for(;e&&e!==document.documentElement;){const o=window.getComputedStyle(e);if(o.display===\"none\"||o.visibility===\"hidden\"||Number(o.opacity)===0||o.maxHeight===\"0px\"||o.maxHeight===\"0\")return!1;const i=e.getBoundingClientRect();if((o.overflow===\"hidden\"||o.overflow===\"clip\")&&(i.width<2||i.height<2))return!1;e=e.parentElement}const r=t.getBoundingClientRect();return r.width>=2&&r.height>=2}__name(vt,\"isVisuallyHighlightable\");function me(t){let e=0;vt(t)&&(e+=100);const r=$(t.textContent);r.length>=2&&(e+=40),t.tagName===\"IMG\"&&(e+=35),t.closest(\"main, footer, header, [data-preview-page-key]\")&&(e+=20),t.closest('.fixed, [class*=\"fixed\"]')&&r.length<2&&t.tagName!==\"IMG\"&&(e-=25);const o=t.getBoundingClientRect();return e+=Math.min(15,Math.floor(o.width*o.height/400)),e}__name(me,\"highlightTargetScore\");function he(t){return[...t].sort((e,r)=>me(r)-me(e))}__name(he,\"rankHighlightTargets\");function ir(t,e){const r=[],o=Array.from(new Set([t,...e??[]].filter(s=>!!s).flatMap(s=>dt(s))));for(const s of o){const u=CSS.escape(s);document.querySelectorAll('[data-preview-field-path=\"'+u+'\"], [data-preview-list-path=\"'+u+'\"], [data-content-path=\"'+u+'\"]').forEach(p=>{r.includes(p)||r.push(p)})}const i=he(r.filter(s=>vt(s))),n=i.filter(s=>!i.some(u=>u!==s&&s.contains(u)));return n.length>0?n:i}__name(ir,\"findExplicitTargets\");function ye(t){const e=(t?.itemValues??[]).filter(n=>$(n.value).length>=2&&n.key!==\"id\");if(e.length===0)return null;const r=[];for(const n of e)for(const s of Vt(document,n.value,n.key).slice(0,8))r.includes(s)||r.push(s);let o=null;for(const n of r){let s=n,u=0;for(;s&&s!==document.body&&u<12;){const p=e.reduce((S,A)=>S+(nr(s,A.value,A.key)?1:0),0),b=s.getBoundingClientRect(),m=Math.max(1,b.width*b.height);(!o||p>o.score||p===o.score&&m<o.area)&&(o={target:s,score:p,area:m}),s=s.parentElement,u+=1}}const i=Math.min(2,e.length);return o&&o.score>=i?o.target:null}__name(ye,\"findItemContainer\");function qt(t,e,r){const o=Vt(t,e,r);if(o.length===0)return null;const i=Nt(e);if(i.length>1&&!Dt(e,r)){const n=o.filter(s=>{const u=$(s.textContent);return i.slice(1).some(p=>u===p)});if(n.length>1)return or(n,t instanceof HTMLElement?t:null)}return o.sort((n,s)=>$(n.textContent).length-$(s.textContent).length)[0]}__name(qt,\"findFieldTarget\");function Gt(t,e){const r=String(t??e??\"\").trim().toLowerCase().replace(/\\s+/g,\"_\");return!r||r===\"common\"?\"home\":r===\"about\"?\"about_us\":r}__name(Gt,\"normalizePageKey\");function ar(t){const e=t.replace(/_us$/,\"\"),r=['[data-preview-page-key=\"'+CSS.escape(t)+'\"]','[data-preview-page-key=\"'+CSS.escape(e)+'\"]',\"#\"+CSS.escape(t)+\"_view\",\"#\"+CSS.escape(e)+\"_view\",\"#\"+CSS.escape(t),\"#\"+CSS.escape(e),\"main\",\"body\"];for(const o of r){const i=document.querySelector(o);if(i instanceof HTMLElement)return i}return null}__name(ar,\"findPageTarget\");function be(t,e){const r=window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/),o=String(e??\"\").trim(),i=o?\"/\"+o.replace(/^\\/+|\\/+$/g,\"\"):null,n=i!==null?i===\"/\"?\"\":i:t===\"home\"?\"\":\"/\"+t.replace(/^\\/+/,\"\");return r?r[1]+n:n||\"/\"}__name(be,\"resolvePath\");function we(){for(const t of re)t.target.style.outline=t.outline,t.target.style.outlineOffset=t.outlineOffset,t.target.style.boxShadow=t.boxShadow,t.target.style.transition=t.transition,t.target.style.scrollMarginTop=t.scrollMarginTop,t.target.style.borderRadius=t.borderRadius,t.target.removeAttribute(O);re=[]}__name(we,\"clearHighlight\");function Wt(t,e){we(),re=t.map(r=>({target:r,outline:r.style.outline,outlineOffset:r.style.outlineOffset,boxShadow:r.style.boxShadow,transition:r.style.transition,scrollMarginTop:r.style.scrollMarginTop,borderRadius:r.style.borderRadius}));for(const r of t)r.setAttribute(O,\"true\"),r.style.scrollMarginTop=\"72px\",r.style.transition=\"outline-color 0.2s ease, box-shadow 0.2s ease\",r.style.outline=\"2px solid rgba(34, 197, 94, 0.98)\",r.style.outlineOffset=\"4px\",r.style.boxShadow=\"0 0 0 7px rgba(34, 197, 94, 0.2)\",r.style.borderRadius||(r.style.borderRadius=\"4px\");t[0]?.scrollIntoView({behavior:\"smooth\",block:e?\"start\":\"center\",inline:\"nearest\"})}__name(Wt,\"highlightTargets\");function sr(t,e){Wt([t],e)}__name(sr,\"highlight\");function jt(t){return Array.from(new Set([t.fieldValue,...t.fieldMatchValues??[]].filter(e=>typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"&&e.trim().length>0).map(e=>String(e))))}__name(jt,\"focusMatchValues\");function lr(t){const e=ge(t);if(e.length===0)return null;try{const r=JSON.parse(window.sessionStorage.getItem(Q)??\"{}\");for(const o of e){const i=r[`${window.location.pathname}|${o}`];if(!i)continue;const n=document.querySelector(i);if(!n)continue;const s=jt(t).map($),u=$(n.textContent);if(!(s.length>0&&u&&!s.some(p=>u===p||u.includes(p)||Bt(n,p))))return n}return null}catch{return null}}__name(lr,\"findRememberedFocusTarget\");function Tt(t){if(!t)return null;if(vt(t))return t;let e=t.parentElement;for(;e&&e!==document.body;){if(vt(e))return e;e=e.parentElement}return null}__name(Tt,\"pickVisibleHeuristicTarget\");function Ae(t){const e=ge(t),r=ir(t.fieldPath,e.filter(s=>s!==t.fieldPath));if(r.length>0)return{targets:r,result:\"exact\"};const o=Tt(lr(t));if(o)return{targets:[o],result:\"heuristic\"};const i=ye(t.fieldContext),n=t.fieldContext?.fieldKey;if(i){for(const u of jt(t)){const p=Tt(Ht(i,u)[0]??qt(i,u,n));if(p)return{targets:[p],result:\"heuristic\"}}const s=Tt(i);if(s)return{targets:[s],result:\"heuristic\"}}for(const s of jt(t)){const u=Ht(document,s),p=qt(document,s,n),b=p?[...u,p]:u,m=he(b.map(S=>Tt(S)).filter(S=>!!S));if(m.length>0)return{targets:[m[0]],result:\"heuristic\"}}return null}__name(Ae,\"resolveFieldTarget\");function Se(){document.documentElement.dataset.fivoraPreview=\"true\",document.querySelectorAll(\".reveal-on-scroll:not(.reveal-active)\").forEach(t=>t.classList.add(\"reveal-active\"))}__name(Se,\"activateRevealNodes\");function ut(t,e=0){Se();const r=!!t.fieldPath;if(t.focusOnly&&r){const s=Ae(t);if(s){Wt(s.targets,!1),yt(t,s.result,s.targets.length);return}if(e<12){window.setTimeout(()=>ut(t,e+1),120);return}yt(t,\"missing\");return}const o=Gt(t.pageKey,t.pageLabel),i=ar(o);if(!i){e<12?window.setTimeout(()=>ut(t,e+1),120):yt(t,\"missing\");return}const n=r?Ae(t):null;if(r&&!n&&e<12){window.setTimeout(()=>ut(t,e+1),120);return}n?(Wt(n.targets,!1),yt(t,n.result,n.targets.length)):(sr(i,!0),yt(t,\"page\",1))}__name(ut,\"applyFocus\");function cr(t){if(t.focusOnly){ht(),window.setTimeout(()=>ut(t),80);return}const e=Gt(t.pageKey,t.pageLabel),r=be(e,t.pageRoute);if((window.location.pathname.replace(/\\/+$/,\"\")||\"/\")!==r){try{window.sessionStorage.setItem(Z,JSON.stringify({...t,awaitingNavigation:!0}))}catch{}window.location.assign(r);return}ht(),window.setTimeout(()=>ut(t),80)}__name(cr,\"handleFocus\");function Ee(t){return $(t).replace(/\\.html$/i,\"\").replace(/[^a-z0-9]+/g,\"-\")}__name(Ee,\"normalizeRouteToken\");function dr(){const t=window.location.pathname.split(\"/\").map(n=>decodeURIComponent(n).trim()).filter(Boolean);if(t.length<2||z.length===0)return;const e=z.filter(n=>{const s=n.context;if(!s?.collectionPath||!s.fieldKey)return!1;const u=s.collectionPath.split(\".\").at(-1)??\"\",p=t.lastIndexOf(u);if(p<0||p>=t.length-1)return!1;const b=Ee(t.at(-1)??\"\");return s.itemValues.some(({key:m,value:S})=>{const A=$(m).replace(/[^a-z0-9]/g,\"\");return A!==\"id\"&&!A.endsWith(\"id\")&&A!==\"slug\"&&A!==\"name\"&&A!==\"title\"?!1:Ee(S)===b})});if(e.length===0)return;const r=Array.from(document.querySelectorAll(`[${K}]`)),o=[];for(const n of e){const s=n.context,u=s.fieldKey,p=$(u).replace(/[^a-z0-9]/g,\"\");if(p===\"slug\"||p===\"identifier\"||p.endsWith(\"id\"))continue;const b=s.collectionPath.split(\".\").at(-1)??\"\",m=$(b).replace(/s$/,\"\"),S=u.replace(/([a-z0-9])([A-Z])/g,\"$1 $2\").split(/[^a-z0-9]+/i).map($).filter(w=>w&&![\"url\",\"text\",\"value\"].includes(w)),A=$(n.value);for(const w of r){const F=$(w.getAttribute(K));if(!F||!F.includes(m))continue;let B=0;const At=S.filter(Rt=>F.includes(Rt));At.length>0&&(B+=40+At.length*5);const St=w.tagName===\"IMG\"?$(w.getAttribute(\"src\")??w.getAttribute(\"alt\")):$(w.textContent);A&&St===A?B+=120:A.length>=3&&St.includes(A)&&(B+=80),/image|photo|logo|banner|thumbnail|cover/i.test(u)&&w.tagName===\"IMG\"&&F.includes(\"image\")&&(B+=120),B>=40&&o.push({element:w,field:n,score:B})}}o.sort((n,s)=>s.score-n.score);const i=new Set;for(const{element:n,field:s}of o)if(!i.has(n)){if(i.add(n),n.tagName!==\"IMG\"){const u=n.textContent??\"\",p=String(s.value??\"\"),b=u.toLowerCase().indexOf(p.toLowerCase());p&&b>=0&&u!==p&&(n.setAttribute(\"data-fivora-value-prefix\",u.slice(0,b)),n.setAttribute(\"data-fivora-value-suffix\",u.slice(b+p.length)))}n.removeAttribute(K),n.setAttribute(\"data-preview-field-path\",s.path),de(s.path,s.value)}}__name(dr,\"promoteActiveRouteDetailFields\");const Hr=\"FIVORA_PREVIEW_ELEMENT_CLICKED\",Vr=y(\"ELEMENT_CLICKED\"),qr=\"FIVORA_PREVIEW_FIELD_CHANGED\",Gr=y(\"FIELD_CHANGED\"),Wr=\"FIVORA_PREVIEW_EDIT_MODE\",jr=y(\"EDIT_MODE\"),Ur=\"FIVORA_PREVIEW_FLUSH_EDIT\",zr=y(\"FLUSH_EDIT\"),Kr=\"FIVORA_PREVIEW_EDIT_FLUSHED\",Yr=y(\"EDIT_FLUSHED\"),Jr=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small, img\",Ut=\"ontouchstart\"in window||navigator.maxTouchPoints>0||window.matchMedia&&window.matchMedia(\"(pointer: coarse)\").matches,sn=(()=>{const t=navigator.userAgent||\"\",e=navigator.vendor||\"\";if(/iP(ad|hone|od)/i.test(t)||/Safari/i.test(t)&&/Apple Computer/i.test(e)&&!/Chrom(e|ium)/i.test(t))return!0;try{return!!window.safari}catch{return!1}})(),Xr=(()=>{try{const t=document.createElement(\"div\");return t.setAttribute(\"contenteditable\",\"plaintext-only\"),t.contentEditable===\"plaintext-only\"}catch{return!1}})(),Zr=Ut||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4||typeof navigator.deviceMemory==\"number\"&&(navigator.deviceMemory??8)<=4,Qr=!0;let z=[];window.addEventListener(\"message\",t=>{if(!Qe(t)||t.data&&typeof t.data==\"object\"&&t.data.__fivoraBridgeRelay===!0)return;if(t.data?.type===x||t.data?.type===v){t.stopImmediatePropagation(),cr(t.data);return}if((t.data?.type===D||t.data?.type===L)&&t.data.siteData){const s=t.data.full!==!1;if(t.data.contentOnly===!0){Ft(t.data.siteData,{contentOnly:!0});return}Ft(t.data.siteData,{fanOut:!1,colorReplacements:!1}),Ze({full:s});return}if(t.data?.type===mt||t.data?.type===_r){const s=t.data.patches;Array.isArray(s)&&Ke(s);return}if(t.data?.type===kr||t.data?.type===\"DENEB_PREVIEW_STYLE_PATCH\"){const s=t.data,u=typeof s.fieldPath==\"string\"?s.fieldPath:typeof s.targetPath==\"string\"?s.targetPath:\"\",p=s.styles??s.properties;u&&p&&Je(u,p);return}if(t.data?.type===Wr||t.data?.type===jr){z=Array.isArray(t.data.fields)?t.data.fields:[],dr(),t.data.editMode?(vr(),window.setTimeout(()=>ve(),50)):Tr();return}(t.data?.type===Ur||t.data?.type===zr)&&(ft(!0),Y({type:Kr,requestId:t.data.requestId}),Y({type:Yr,requestId:t.data.requestId}))},!0);try{const t=JSON.parse(window.sessionStorage.getItem(Z)??\"null\");if(t?.awaitingNavigation){const e=Gt(t.pageKey,t.pageLabel),r=be(e,t.pageRoute),o=window.location.pathname.replace(/\\/+$/,\"\")||\"/\";ht(),o===r&&window.setTimeout(()=>ut(t),220)}else t&&ht()}catch{ht()}try{const t=JSON.parse(window.sessionStorage.getItem(g)??window.sessionStorage.getItem(l)??\"null\");if(t){k=t;try{window[f]=t,window[h]=t}catch{}Zr||(ue(t),xt(t,{colorReplacements:!1}))}}catch{}let J=!1,rt=null,ot=null,zt=null,tt=null,Pt=[],it=null;function Ce(){if(document.querySelector(\"[data-fivora-empty-editable-styles]\"))return;const t=document.createElement(\"style\");t.setAttribute(\"data-fivora-empty-editable-styles\",\"true\"),t.textContent=`\n [${M}=\"true\"] {\n min-width: 7rem !important;\n min-height: 1.25em !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n span[${M}=\"true\"],\n a[${M}=\"true\"],\n strong[${M}=\"true\"],\n em[${M}=\"true\"],\n small[${M}=\"true\"],\n label[${M}=\"true\"] {\n display: inline-block !important;\n }\n [${M}=\"true\"]:empty::before {\n content: \"\";\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${M}=\"true\"]:empty:hover::before {\n content: \"Click to add text\";\n }\n [${V}=\"true\"] {\n min-width: 10rem !important;\n min-height: 3.5rem !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n [${V}=\"true\"]:empty::before {\n content: \"\";\n display: inline-flex;\n align-items: center;\n min-height: 3.5rem;\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${V}=\"true\"]:empty:hover::before {\n content: \"Click to add the first item\";\n }\n `,document.head.appendChild(t)}__name(Ce,\"ensureEmptyEditableStyles\");function ur(t){if(t.id)return\"#\"+CSS.escape(t.id);const e=[];let r=t;for(;r&&r!==document.body;){const o=r.tagName.toLowerCase(),i=r.parentElement?Array.from(r.parentElement.children).filter(s=>s.tagName===r?.tagName):[],n=i.indexOf(r)+1;e.unshift(i.length>1?`${o}:nth-of-type(${n})`:o),r=r.parentElement}return e.length>0?`body > ${e.join(\" > \")}`:\"\"}__name(ur,\"buildStructuralSelector\");function Kt(){try{const t=JSON.parse(window.sessionStorage.getItem(Q)??\"{}\");return t&&typeof t==\"object\"?t:{}}catch{return{}}}__name(Kt,\"readResolvedTargetSelectors\");function fr(t,e){const r=ur(t);if(!r)return;const o=Kt();o[`${window.location.pathname}|${e}`]=r;try{window.sessionStorage.setItem(Q,JSON.stringify(o))}catch{}}__name(fr,\"rememberResolvedTarget\");function tn(){const t=Kt(),e=`${window.location.pathname}|`;let r=!1;for(const o of Object.keys(t))o.startsWith(e)&&(delete t[o],r=!0);if(r)try{window.sessionStorage.setItem(Q,JSON.stringify(t))}catch{}}__name(tn,\"forgetResolvedTargetsForCurrentPage\");function xe(){document.querySelectorAll(`[${_}]`).forEach(t=>{tt?.target!==t&&(t.removeAttribute(_),t.removeAttribute(M),t.removeAttribute(V))})}__name(xe,\"clearResolvedEditableTargets\");function bt(t,e,r=!0){const o=t.getAttribute(_),i=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(U)??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\");if(o&&o!==e.path&&i!==e.path)return!1;t.setAttribute(_,e.path),Fe.register(t,e.path);const n=String(e.value??\"\").trim().length===0&&$(t.textContent).length===0;J&&n&&t.tagName!==\"IMG\"?t.setAttribute(M,\"true\"):t.removeAttribute(M);const s=e.kind===\"collection\"||e.type===\"list\",u=e.collection?.length;return J&&s&&(u===0||t.childElementCount===0)?(t.setAttribute(V,\"true\"),t.removeAttribute(M)):t.removeAttribute(V),r&&!s&&fr(t,e.path),!0}__name(bt,\"annotateEditableTarget\");function nt(t){const e=[t.value,...t.matchValues??[]].filter(r=>typeof r==\"number\"||typeof r==\"string\"&&r.trim().length>0);return Array.from(new Set(e.map(r=>String(r))))}__name(nt,\"editableFieldMatchValues\");function pr(t){for(const e of dt(t)){const r=CSS.escape(e),o=document.querySelector(`[data-preview-field-path=\"${r}\"], [${U}=\"${r}\"], [data-content-path=\"${r}\"], [data-field-path=\"${r}\"], [${_}=\"${r}\"]`);if(o)return o}return null}__name(pr,\"findExplicitEditableTarget\");function gr(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const r=Kt()[`${window.location.pathname}|${t.path}`];if(!r)return null;try{const o=document.querySelector(r);if(!o)return null;const i=nt(t).map($),n=$(o.textContent);return i.length>0&&n&&!i.includes(n)?null:(bt(o,t,!1),o)}catch{return null}}__name(gr,\"restoreRememberedTarget\");function mr(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const r=(t.context?ye({collectionPath:t.context.collectionPath,itemIndex:t.context.itemIndex,fieldKey:t.context.fieldKey,itemValues:t.context.itemValues}):null)??document;for(const o of nt(t)){const i=qt(r,o,t.context?.fieldKey),n=[...Ht(r,o),...i?[i]:[],...Vt(r,o,t.context?.fieldKey)];for(const s of n){if(s.closest(`[${K}]`))continue;const u=s.getAttribute(_);if(!u||u===t.path)return s}}return null}__name(mr,\"inferEditableTarget\");function hr(t){if(J){Ce(),Se();for(const e of z){const r=pr(e.path)??gr(e)??(t?.explicitOnly?null:mr(e));r&&bt(r,e)}}}__name(hr,\"indexEditableTargets\");let Yt=!1;function ve(){for(const e of Pt)window.clearTimeout(e);if(Pt=[],it!==null){const e=window.cancelIdleCallback;typeof e==\"function\"?e(it):window.clearTimeout(it),it=null}if(Yt)return;Yt=!0;const t=__name((e,r)=>{r&&(Yt=!1),e&&xe(),hr({explicitOnly:e})},\"runPass\");Pt=[window.setTimeout(()=>{t(!0,!0)},0)]}__name(ve,\"scheduleEditableTargetIndex\");function yr(){const t=document.createElement(\"div\");return t.setAttribute(\"data-fivora-edit-badge\",\"true\"),t.innerHTML=\"\\u270F\\uFE0F\",Object.assign(t.style,{position:\"fixed\",zIndex:\"2147483647\",width:\"28px\",height:\"28px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"14px\",borderRadius:\"8px\",background:\"rgba(37, 99, 235, 0.92)\",color:\"#fff\",cursor:\"pointer\",pointerEvents:\"auto\",boxShadow:\"0 2px 8px rgba(0,0,0,0.18)\",opacity:\"0\",transition:\"opacity 0.15s ease\",userSelect:\"none\"}),t.setAttribute(\"title\",\"Edit this content\"),t.setAttribute(\"aria-label\",\"Edit this content\"),document.body.appendChild(t),t}__name(yr,\"createHoverBadge\");function br(t){if(!rt)return;const e=t.getBoundingClientRect();rt.style.top=`${Math.max(4,e.top-4)}px`,rt.style.left=`${Math.min(window.innerWidth-36,e.right-32)}px`,rt.style.opacity=\"1\"}__name(br,\"positionBadge\");function It(){zt&&(zt(),zt=null),rt&&(rt.style.opacity=\"0\"),ot=null}__name(It,\"clearHoverOverlay\");function wr(t){if(t===ot)return;It(),ot=t;const e=t,r=e.style?.outline??\"\",o=e.style?.outlineOffset??\"\",i=e.style?.cursor??\"\";e.style&&(e.style.outline=\"2px dashed rgba(37, 99, 235, 0.6)\",e.style.outlineOffset=\"2px\",e.style.cursor=\"pointer\"),zt=__name(()=>{e.style&&(e.style.outline=r,e.style.outlineOffset=o,e.style.cursor=i)},\"hoverOutlineCleanup\"),br(t)}__name(wr,\"applyHoverOverlay\");function Te(t){let e=t instanceof Element?t:null;for(;e&&!(e instanceof HTMLElement);)e=e.parentElement;let r=e;for(;r&&r!==document.body;){if(r.hasAttribute(K)){r=r.parentElement;continue}if(r.hasAttribute(\"data-preview-field-path\")||r.hasAttribute(U)||r.hasAttribute(X)||r.hasAttribute(\"data-content-path\")||r.hasAttribute(\"data-field-path\")||r.hasAttribute(_)||!!Fe.getPath(r)||r.matches(Jr)){const i=Jt(r);if(i)return{element:r,field:i}}r=r.parentElement instanceof HTMLElement?r.parentElement:null}return null}__name(Te,\"findEditableTarget\");function Jt(t){if(t.closest(`[${K}]`))return null;const e=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\")??t.getAttribute(_);if(e)return z.find(m=>dt(m.path).includes(e))??{path:e,label:e.split(\".\").pop()??\"Content\",type:t.tagName===\"IMG\"?\"image\":\"text\",value:t.tagName===\"IMG\"?t.src:t.textContent?.trim()??\"\"};const r=t.getAttribute(X);if(r){const b=r.match(/^(.+)\\[(\\d+)\\]$/);if(b){const m=b[1],S=Number(b[2]),A=z.find(w=>(w.kind===\"collection\"||w.type===\"list\")&&dt(w.path).includes(m));if(A)return{...A,collection:{listPath:m,itemIndex:S,length:A.collection?.length??0,minItems:A.collection?.minItems,maxItems:A.collection?.maxItems,itemLabel:A.collection?.itemLabel}}}}const o=t.getAttribute(U);if(o)return z.find(m=>(m.kind===\"collection\"||m.type===\"list\")&&dt(m.path).includes(o))??{kind:\"collection\",path:o,label:o.split(\".\").pop()??\"Collection\",type:\"list\",value:0,collection:{listPath:o,length:t.children.length}};const i=t.tagName===\"IMG\"?t:t.querySelector(\"img\");if(i){const b=z.find(A=>A.type===\"image\"&&nt(A).some(w=>fe(i,w)));if(b)return b;const m=Pe(i);if(m.collectionPath&&typeof m.itemIndex==\"number\"){const A=z.find(w=>w.type===\"image\"&&w.context?.collectionPath===m.collectionPath&&w.context?.itemIndex===m.itemIndex);if(A)return A}const S=i.closest('section, article, [data-preview-page-key], main, header, footer, .card, [class*=\"section\"]');if(S){const A=S.getAttribute(\"data-preview-field-path\")||S.getAttribute(\"data-content-path\")||S.getAttribute(\"data-field-path\")||S.getAttribute(_);if(A){const w=A.split(\".\")[0],F=z.find(B=>B.type===\"image\"&&(B.path.startsWith(`${w}.`)||B.path.startsWith(`${A}.`)));if(F)return F}}if(t.tagName===\"IMG\"){const A=z.filter(F=>F.type===\"image\");if(A.length===1)return A[0];const w=i.getAttribute(\"src\")||i.src||\"\";return{path:e||\"image\",label:(e||\"\").split(\".\").pop()||\"Image\",type:\"image\",value:w}}}const n=z.filter(b=>nt(b).some(m=>Bt(t,m)));if(n.length===1)return n[0];const s=$(t.textContent);if(!s)return null;const u=z.filter(b=>typeof b.value!=\"boolean\"&&nt(b).some(m=>$(m)===s));if(u.length===1)return u[0];const p=z.filter(b=>typeof b.value==\"boolean\"?!1:nt(b).some(m=>{const S=$(m);return S.length>=3&&s.includes(S)})).sort((b,m)=>Math.max(...nt(m).map(S=>$(S).length),0)-Math.max(...nt(b).map(S=>$(S).length),0));return p.length===1?p[0]:null}__name(Jt,\"resolveEditableField\");function Ar(t,e){return t.tagName!==\"IMG\"&&t.childElementCount===0&&![\"INPUT\",\"TEXTAREA\",\"SELECT\",\"OPTION\",\"VIDEO\",\"AUDIO\",\"IFRAME\"].includes(t.tagName)&&!e.context&&![\"image\",\"color\",\"boolean\",\"select\",\"list\"].includes(e.type??\"text\")}__name(Ar,\"canEditInline\");function Sr(t){let e=t;for(;e&&e!==document.body;){const r=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(U)??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(_);if(r)return r;e=e.parentElement}return null}__name(Sr,\"extractFieldPath\");function Pe(t){let e=t;for(;e&&e!==document.body;){const r=e.getAttribute(X);if(r){const n=r.match(/^(.+)\\[(\\d+)\\]$/);if(n)return{collectionPath:n[1],itemIndex:Number(n[2])}}const o=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(_);if(o){const n=o.match(/^(.+)\\[(\\d+)\\]/);if(n)return{collectionPath:n[1],itemIndex:Number(n[2])}}const i=e.getAttribute(U);if(i)return{collectionPath:i,itemIndex:null};e=e.parentElement}return{collectionPath:null,itemIndex:null}}__name(Pe,\"extractCollectionContext\");function Ie(t,e){const r=[],o=new Set(e?.path?[e.path]:[]);let i=t,n=0;for(;i&&i!==document.body&&n<3&&!(i.hasAttribute(K)||n>0&&(i.hasAttribute(X)||i.hasAttribute(U)||i.tagName===\"SECTION\"));){if(i.hasAttribute(\"data-preview-field-path\")||i.hasAttribute(\"data-content-path\")||i.hasAttribute(\"data-field-path\")||i.hasAttribute(_)){const s=Jt(i);s?.path&&s.kind!==\"collection\"&&s.type!==\"list\"&&!o.has(s.path)&&(o.add(s.path),r.push({path:s.path,label:s.label??s.path.split(\".\").pop()??\"Content\",type:s.type??\"text\"}))}i=i.parentElement,n+=1}return r}__name(Ie,\"findRelatedAncestorFields\");function Er(t,e,r=Ie(t,e)){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),n=t.tagName===\"IMG\",s=t.tagName===\"INPUT\"||t.tagName===\"TEXTAREA\",u=e?.path??Sr(t),p=n?t.src:s?t.placeholder||t.value||\"\":t.textContent?.trim()??\"\",b=Pe(t);let m=e?.collection?.listPath??e?.collection?.path??e?.context?.collectionPath??b.collectionPath,S=e?.collection?.itemIndex??e?.context?.itemIndex??b.itemIndex;m&&u&&e?.kind!==\"collection\"&&!u.startsWith(`${m}[`)&&!u.startsWith(`${m}.`)&&u!==m&&(m=null,S=null);const A=e?.context?.itemPath??(m&&typeof S==\"number\"?`${m}[${S}]`:null),w=__name(_t=>String(_t??\"\").trim().replace(/[^a-zA-Z0-9_.-]+/g,\"-\").replace(/^-+|-+$/g,\"\").slice(0,64),\"safeScopePart\"),F=[],B=__name((_t,Xt,Zt)=>{!Xt||F.some(Qt=>Qt.key===Xt)||F.push({kind:_t,key:Xt,label:Zt})},\"pushStyleScope\");B(\"element\",u,\"This element\");const At=t.closest(`[${X}]`);B(\"card\",At?.getAttribute(X)??A,\"This card\");const St=t.closest(`[${U}]`);B(\"grid\",St?.getAttribute(U)??m,\"Entire grid\");const $r=t.closest(\"[data-preview-page-key]\"),Rt=w($r?.getAttribute(\"data-preview-page-key\")),pt=t.closest(\"section,[data-design-section],[data-section-id]\");if(pt){const _t=w(pt.getAttribute(\"data-design-section\")??pt.getAttribute(\"data-section-id\")??pt.id),Zt=(pt.parentElement?Array.from(pt.parentElement.children).filter(nn=>nn.tagName===\"SECTION\"):[]).indexOf(pt)+1,Qt=_t||(Zt>0?`nth-${Zt}`:\"\");B(\"section\",Qt?`section:${Rt||\"all\"}:${Qt}`:null,\"This section\")}B(\"page\",Rt?`page:${Rt}`:null,\"Current page\"),B(\"site\",\"site:all\",\"Whole website\");const Rr={type:Hr,fieldPath:u,descriptorKind:e?.kind??\"field\",fieldValue:p,elementTag:t.tagName.toLowerCase(),isImage:n,boundingRect:{top:o.top,left:o.left,width:o.width,height:o.height},computedStyle:{fontFamily:i.fontFamily,fontSize:i.fontSize,lineHeight:i.lineHeight,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,color:i.color,backgroundColor:i.backgroundColor,textAlign:i.textAlign,width:i.width,height:i.height,minWidth:i.minWidth,minHeight:i.minHeight,maxWidth:i.maxWidth,maxHeight:i.maxHeight,marginTop:i.marginTop,marginRight:i.marginRight,marginBottom:i.marginBottom,marginLeft:i.marginLeft,paddingTop:i.paddingTop,paddingRight:i.paddingRight,paddingBottom:i.paddingBottom,paddingLeft:i.paddingLeft,borderRadius:i.borderRadius},listPath:m,itemPath:A,collectionPath:m,itemIndex:S,relatedFields:r,styleScopes:F};Y(Rr),Y({...Rr,type:Vr})}__name(Er,\"emitClickEvent\");function Cr(t,e){Y({type:qr,fieldPath:t,value:e}),Y({type:Gr,fieldPath:t,value:e})}__name(Cr,\"emitFieldChange\");function ft(t){const e=tt;if(!e)return;tt=null,e.target.removeEventListener(\"keydown\",e.keydown),e.target.removeEventListener(\"blur\",e.blur);const r=t?(e.target.innerText??e.target.textContent??\"\").replace(/\\u00a0/g,\" \").trim():\"\";e.contentEditable===null?e.target.removeAttribute(\"contenteditable\"):e.target.setAttribute(\"contenteditable\",e.contentEditable),e.spellcheck===null?e.target.removeAttribute(\"spellcheck\"):e.target.setAttribute(\"spellcheck\",e.spellcheck),e.target.style.outline=e.outline,e.target.style.outlineOffset=e.outlineOffset,e.target.style.cursor=e.cursor,e.target.style.userSelect=e.userSelect,e.target.style.textTransform=e.textTransform,e.target.innerHTML=e.originalHtml,t&&(r!==e.originalText.trim()?(e.field.value=r,bt(e.target,e.field),Cr(e.field.path,r)):r||bt(e.target,e.field))}__name(ft,\"finishInlineEdit\");function xr(t,e,r){if(tt?.target===t)return;ft(!0),It(),bt(t,e),t.removeAttribute(M);const o=typeof e.value==\"string\"||typeof e.value==\"number\"?String(e.value):t.textContent??\"\",i=t.innerHTML,n=__name(u=>{if(u.key===\"Escape\"){u.preventDefault(),ft(!1);return}u.key===\"Enter\"&&e.type!==\"textarea\"&&!u.shiftKey&&(u.preventDefault(),ft(!0))},\"keydown\"),s=__name(()=>ft(!0),\"blur\");if(tt={target:t,field:e,originalText:o,originalHtml:i,contentEditable:t.getAttribute(\"contenteditable\"),spellcheck:t.getAttribute(\"spellcheck\"),outline:t.style.outline,outlineOffset:t.style.outlineOffset,cursor:t.style.cursor,userSelect:t.style.userSelect,textTransform:t.style.textTransform,keydown:n,blur:s},t.setAttribute(\"contenteditable\",Xr?\"plaintext-only\":\"true\"),t.setAttribute(\"spellcheck\",\"true\"),t.textContent=o,t.style.outline=\"2px solid rgba(37, 99, 235, 0.95)\",t.style.outlineOffset=\"3px\",t.style.cursor=\"text\",t.style.userSelect=\"text\",t.style.textTransform=\"none\",t.addEventListener(\"keydown\",n),t.addEventListener(\"blur\",s),t.focus(),r){const u=document,p=u.caretPositionFromPoint?.(r.x,r.y),b=p?(()=>{const m=document.createRange();return m.setStart(p.offsetNode,p.offset),m.collapse(!0),m})():u.caretRangeFromPoint?.(r.x,r.y);if(b){const m=window.getSelection();m?.removeAllRanges(),m?.addRange(b)}}else{const u=document.createRange();u.selectNodeContents(t);const p=window.getSelection();p?.removeAllRanges(),p?.addRange(u)}}__name(xr,\"beginInlineEdit\");let wt=null;function $e(t){if(!J||tt||Ut||wt!==null)return;const e=t.target;wt=requestAnimationFrame(()=>{if(wt=null,!J||tt)return;const r=Te(e);r&&!r.element.hasAttribute(\"data-fivora-edit-badge\")&&wr(r.element)})}__name($e,\"onEditMouseOver\");function Re(t){if(!J)return;const e=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null;e&&(e===rt||e===ot||ot?.contains(e))||It()}__name(Re,\"onEditMouseOut\");function _e(t){if(!J||tt&&t.target instanceof Node&&tt.target.contains(t.target))return;const e=t.target instanceof HTMLElement&&t.target.hasAttribute(\"data-fivora-edit-badge\")?t.target:null,r=e?ot?{element:ot,field:Jt(ot)}:null:Te(t.target),o=r?.element,i=r?.field;if(!o||!i)return;t.preventDefault(),t.stopPropagation();const n=Ie(o,i);!Qr&&Ar(o,i)&&n.length===0?xr(o,i,e?void 0:{x:t.clientX,y:t.clientY}):Er(o,i,n)}__name(_e,\"onEditClick\");function vr(){J||(J=!0,we(),Ce(),!Ut&&!rt&&(rt=yr()),Ut||(document.addEventListener(\"mouseover\",$e,!0),document.addEventListener(\"mouseout\",Re,!0)),document.addEventListener(\"click\",_e,!0),document.addEventListener(\"submit\",ke,!0),ve())}__name(vr,\"enterEditMode\");function ke(t){J&&(t.preventDefault(),t.stopPropagation())}__name(ke,\"preventEditModeSubmit\");function Tr(){if(J){J=!1,Yt=!1,ft(!0),It(),wt!==null&&(cancelAnimationFrame(wt),wt=null);for(const t of Pt)window.clearTimeout(t);if(Pt=[],it!==null){const t=window.cancelIdleCallback;typeof t==\"function\"?t(it):window.clearTimeout(it),it=null}xe(),document.querySelectorAll(`[${M}], [${V}]`).forEach(t=>{t.removeAttribute(M),t.removeAttribute(V)}),document.removeEventListener(\"mouseover\",$e,!0),document.removeEventListener(\"mouseout\",Re,!0),document.removeEventListener(\"click\",_e,!0),document.removeEventListener(\"submit\",ke,!0)}}__name(Tr,\"exitEditMode\");function Oe(t){if(t==null)return t;try{const e=new URL(String(t),window.location.href);if(e.origin!==window.location.origin)return t;const r=a(e.pathname);return r===e.pathname?t:`${r}${e.search}${e.hash}`}catch{return t}}__name(Oe,\"normalizePreviewHistoryUrl\");const en=window.history.pushState.bind(window.history),rn=window.history.replaceState.bind(window.history);window.history.pushState=(t,e,r)=>{en(t,e,Oe(r)),window.setTimeout(Ct,0)},window.history.replaceState=(t,e,r)=>{rn(t,e,Oe(r)),window.setTimeout(Ct,0)},window.addEventListener(\"popstate\",Ct);const $t=window.fetch.bind(window);window.fetch=(t,e)=>{const r=typeof t==\"string\"?t:t instanceof URL?t.href:null;if(!r)return $t(t,e);try{const o=new URL(r,window.location.href);if(o.origin!==window.location.origin)return $t(t,e);const i=a(o.pathname);return i===o.pathname?$t(t,e):(o.pathname=i,$t(o.href,e))}catch{return $t(t,e)}},/^\\/uploads\\/generated-sites\\/(?:template-preview|preview)\\//.test(window.location.pathname)&&window.addEventListener(\"submit\",t=>{t.preventDefault(),t.stopImmediatePropagation();const e=t.target;if(!(e instanceof HTMLFormElement))return;let r=e.parentElement?.querySelector(\"[data-fivora-preview-action-status]\");r||(r=document.createElement(\"p\"),r.setAttribute(\"data-fivora-preview-action-status\",\"true\"),r.setAttribute(\"role\",\"status\"),r.style.marginTop=\"0.75rem\",e.insertAdjacentElement(\"afterend\",r)),r.textContent=\"Preview only \\u2014 this form was not submitted. It becomes active on the published website.\"},!0),d();function Pr(){return window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|[^/]+)\\/[^/]+)/)?.[1]??\"\"}__name(Pr,\"resolvePreviewRootPrefix\");function Ir(t){if(t.target&&t.target!==\"_self\"||t.hasAttribute(\"download\"))return!1;const e=t.getAttribute(\"href\");if(!e||e.startsWith(\"#\")||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(e))return!1;const r=Pr(),o=e.startsWith(\"uploads/generated-sites/\")?`/${e}`:r&&e.startsWith(r.slice(1))?`/${e}`:e;let i;try{i=new URL(o,window.location.href)}catch{return!1}if(i.origin!==window.location.origin||r&&!i.pathname.startsWith(r))return!1;const n=window.location.pathname.replace(/\\/+$/,\"\")||\"/\",s=i.pathname.replace(/\\/+$/,\"\")||\"/\";return n!==s||i.search!==window.location.search?i:!1}__name(Ir,\"resolveInternalPreviewNavigation\"),document.addEventListener(\"click\",t=>{if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const e=t.target?.closest?.(\"a[href]\");if(!e)return;const r=Ir(e);r&&(t.preventDefault(),t.stopPropagation(),window.location.assign(r.href))},!0),Ct()})(function(C){const T=__name((c,y)=>{if(!c||c.trim()===\"null\")return null;try{const E=new URL(c,y??void 0).origin;return E===\"null\"?null:E}catch{return null}},\"normalizeOrigin\"),I=T(C.currentOrigin),P=T(C.ancestorOrigin,I),q=T(C.accessibleParentOrigin,I),a=T(C.referrer,I),d=T(C.rememberedOrigin);return P??q??(a&&a!==I?a:null)??d??a},function(C){const T=__name(l=>!!l&&typeof l==\"object\"&&!Array.isArray(l),\"isRecord\"),I=T(C)&&(C.designCustomizationVersion===1||!!C.elementStyles||!!C.sections);if(!T(C)||!I)return\"\";const P=C,q=__name(l=>{if(typeof l==\"number\")return`${l}px`;if(typeof l!=\"string\")return\"\";const f=l.trim();return!f||f.length>160||/[;{}<>\\r\\n]/.test(f)||/(?:url\\s*\\(|expression\\s*\\(|@import|javascript:)/i.test(f)?\"\":f},\"safeValue\"),a=__name(l=>q(P[l]),\"read\"),d=__name((l,f)=>f?`${l}:${f} !important;`:\"\",\"declaration\"),c=__name((l,f)=>{const h=f.filter(Boolean).join(\"\");return h?`${l}{${h}}`:\"\"},\"rule\"),y=__name(l=>l?[d(\"background\",l),d(\"background-color\",l),\"background-image:none !important;\"]:[],\"backgroundDeclarations\"),E=__name(l=>l===\"start\"?\"flex-start\":l===\"end\"?\"flex-end\":l===\"center\"||l===\"stretch\"?l:\"\",\"alignItems\"),x=__name(l=>{const f=Number(l);return Number.isInteger(f)&&f>=1&&f<=6?`repeat(${f},minmax(0,1fr))`:\"\"},\"gridColumns\"),v=(()=>{const l=Number(a(\"headingScale\"));return Number.isFinite(l)&&l>=.75&&l<=2?String(l):\"\"})(),N=__name(l=>({none:\"none\",subtle:\"0 4px 14px rgba(15,23,42,.08)\",medium:\"0 12px 30px rgba(15,23,42,.14)\",strong:\"0 22px 55px rgba(15,23,42,.22)\"})[l]??\"\",\"shadow\"),G=__name(l=>{if(!l)return!1;const f=l.trim().toLowerCase();if(!/^#[0-9a-f]{3,6}$/.test(f))return!1;const h=f.length===4?`#${f[1]}${f[1]}${f[2]}${f[2]}${f[3]}${f[3]}`:f,D=Number.parseInt(h.slice(1,3),16),L=Number.parseInt(h.slice(3,5),16),H=Number.parseInt(h.slice(5,7),16);return(D*299+L*587+H*114)/1e3<130},\"isDarkColor\"),R=G(a(\"backgroundColor\")),et=a(\"headingColor\")||a(\"textColor\"),O=a(\"textColor\"),_=a(\"mutedTextColor\")||(O?`color-mix(in srgb, ${O} 72%, transparent)`:\"\"),M=[[\"--brand-color\",a(\"primaryColor\")],[\"--brand-primary\",a(\"primaryColor\")],[\"--primary-color\",a(\"primaryColor\")],[\"--color-primary\",a(\"primaryColor\")],[\"--brand-secondary\",a(\"secondaryColor\")],[\"--secondary-color\",a(\"secondaryColor\")],[\"--brand-accent\",a(\"accentColor\")],[\"--accent-color\",a(\"accentColor\")],[\"--page-background\",a(\"backgroundColor\")],[\"--page-bg\",a(\"backgroundColor\")||a(\"canvasColor\")],[\"--page-text\",a(\"textColor\")],[\"--heading-color\",et],[\"--color-heading\",et],[\"--text-color\",a(\"textColor\")],[\"--text\",a(\"textColor\")],[\"--foreground\",a(\"textColor\")],[\"--color-foreground\",a(\"textColor\")],[\"--bg-primary\",a(\"backgroundColor\")||a(\"canvasColor\")],[\"--bg-secondary\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--surface\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--surface-color\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--card-bg\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--card-background\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--background\",a(\"backgroundColor\")||a(\"canvasColor\")],[\"--brand-primary\",a(\"primaryColor\")||a(\"brandPrimary\")],[\"--brand-secondary\",a(\"secondaryColor\")||a(\"brandSecondary\")],[\"--brand-accent\",a(\"accentColor\")||a(\"brandAccent\")],[\"--primary\",a(\"primaryColor\")||a(\"brandPrimary\")],[\"--secondary\",a(\"secondaryColor\")||a(\"brandSecondary\")],[\"--accent\",a(\"accentColor\")||a(\"brandAccent\")],[\"--text-primary\",a(\"textColor\")||a(\"textPrimary\")],[\"--text-secondary\",a(\"mutedTextColor\")||a(\"textSecondary\")||a(\"textColor\")],[\"--text-muted\",_],[\"--muted\",_],[\"--muted-color\",_],[\"--muted-text\",_],[\"--border-primary\",a(\"borderColor\")],[\"--border-secondary\",a(\"borderColor\")],[\"--border\",a(\"borderColor\")],[\"--color-border\",R?\"rgba(255, 255, 255, 0.1)\":a(\"borderColor\")||\"#e2e8f0\"],[\"--card-border\",R?\"rgba(255, 255, 255, 0.09)\":a(\"borderColor\")||\"#e2e8f0\"],[\"--color-text\",O],[\"--color-text-muted\",_],[\"--header-bg\",a(\"headerBackgroundColor\")||(R?`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 85%, transparent)`:\"rgba(255, 255, 255, 0.85)\")],[\"--input-bg\",R?`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 60%, ${a(\"cardBackgroundColor\")||\"#131b2e\"})`:\"#ffffff\"],[\"--input-color\",O],[\"--input-border\",R?\"rgba(255, 255, 255, 0.15)\":\"#cbd5e1\"],[\"--button-bg\",a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\"],[\"--button-text\",a(\"buttonTextColor\")||(G(a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\")?\"#ffffff\":\"#0f172a\")],[\"--button-primary-bg\",a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\"],[\"--button-primary-text\",a(\"buttonTextColor\")||(G(a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\")?\"#ffffff\":\"#0f172a\")],[\"--button-secondary-bg\",R?\"rgba(255, 255, 255, 0.08)\":a(\"secondaryColor\")&&!G(a(\"secondaryColor\"))?a(\"secondaryColor\"):\"#f1f5f9\"],[\"--button-secondary-text\",R?\"#f8fafc\":\"#0f172a\"],[\"--button-outline-border\",R?\"rgba(255, 255, 255, 0.22)\":\"currentColor\"],[\"--button-outline-text\",O||(R?\"#f8fafc\":\"#0f172a\")],[\"--button-ghost-text\",O||(R?\"#f8fafc\":\"#0f172a\")],[\"--product-card-bg\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||(R?\"#111a2e\":\"#ffffff\")],[\"--product-card-border\",R?\"rgba(255, 255, 255, 0.09)\":a(\"borderColor\")||\"#e2e8f0\"],[\"--tag-bg\",R?\"rgba(255, 255, 255, 0.08)\":\"rgba(241, 245, 249, 0.9)\"],[\"--tag-color\",_||(R?\"#94a3b8\":\"#64748b\")],[\"--card-shadow\",R?\"0 10px 25px -5px rgba(0, 0, 0, 0.4)\":\"0 10px 25px -5px rgba(0, 0, 0, 0.05)\"],[\"--card-radius\",a(\"cardRadius\")],[\"--button-radius\",a(\"buttonRadius\")],[\"--image-radius\",a(\"imageRadius\")]],V=new Set([\"sans-serif\",\"serif\",\"monospace\",\"inherit\",\"initial\",\"system-ui\",\"system sans\",\"editorial serif\"]),U=new Set,X=__name(l=>{if(typeof l==\"string\"&&l.trim()){const f=l.split(\",\")[0].replace(/['\"]/g,\"\").trim();f&&!V.has(f.toLowerCase())&&!f.toLowerCase().includes(\"system\")&&U.add(f)}},\"addFont\");X(P.headingFont),X(P.bodyFont);const K=T(P.elementStyles)?P.elementStyles:{};for(const l of Object.values(K))T(l)&&X(l.fontFamily);const Q=[...Array.from(U).map(l=>`@import url('https://fonts.googleapis.com/css2?family=${encodeURIComponent(l).replace(/%20/g,\"+\")}:wght@300;400;500;600;700;800&display=swap');`),c(\":root,html,body\",[d(\"color-scheme\",R?\"dark\":\"light\"),...M.map(([l,f])=>d(l,f))]),c(\"html\",[d(\"font-size\",a(\"baseSize\"))]),c(\"body\",[d(\"font-family\",a(\"bodyFont\")?`${a(\"bodyFont\")},sans-serif`:\"\"),d(\"font-weight\",a(\"bodyWeight\")),d(\"line-height\",a(\"bodyLineHeight\")),d(\"letter-spacing\",a(\"letterSpacing\")),...y(a(\"backgroundColor\")),d(\"color\",O)]),c('body :where(h1,h2,h3,h4,h5,h6),[data-preview-field-path*=\"title\"],[data-preview-field-path*=\"heading\"],[data-field-path*=\"title\"],[data-field-path*=\"heading\"]',[d(\"font-family\",a(\"headingFont\")?`${a(\"headingFont\")},sans-serif`:\"\"),d(\"font-weight\",a(\"headingWeight\")),d(\"line-height\",a(\"headingLineHeight\")),d(\"color\",et)]),c('body :where(p,li,label,address,[data-preview-field-path*=\"description\"],[data-preview-field-path*=\"subtitle\"])',[d(\"color\",O)]),c('body :where(small,.muted,[class*=\"muted\"])',[d(\"color\",_)]),v?`body h1{font-size:calc(2.5rem * ${v}) !important}body h2{font-size:calc(2rem * ${v}) !important}body h3{font-size:calc(1.5rem * ${v}) !important}body h4{font-size:calc(1.25rem * ${v}) !important}`:\"\",c(\"body header\",[...y(a(\"headerBackgroundColor\")),d(\"min-height\",a(\"headerHeight\"))]),c(\"body footer\",[...y(a(\"footerBackgroundColor\"))]),c(\"body main,body [data-preview-page-key]\",[...y(a(\"backgroundColor\")),d(\"color\",O),d(\"display\",\"flex\"),d(\"flex-direction\",\"column\")]),c(\"body main > section,body main [data-preview-page-key] > section\",[d(\"padding-block\",a(\"sectionPadding\")),d(\"text-align\",a(\"textAlign\"))]),c(\"body main :where(section,[data-design-section]) :where(h1,h2,h3,h4,h5,h6,p,[data-design-text])\",[d(\"text-align\",a(\"textAlign\"))]),c(\"body main > section + section,body main [data-preview-page-key] > section + section\",[d(\"margin-top\",a(\"sectionGap\"))]),c('body main :where([class*=\"flex\"],[class*=\"grid\"],[data-design-stack])',[d(\"gap\",a(\"elementGap\"))]),c(\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",[d(\"min-height\",a(\"heroMinHeight\")),d(\"text-align\",a(\"heroTextAlign\"))]),c('body main > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text]),body main [data-preview-page-key] > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text])',[d(\"text-align\",a(\"heroTextAlign\"))]),c('body main :where([class*=\"container\"],[class~=\"container\"],[data-design-container])',[d(\"max-width\",a(\"contentMaxWidth\")),d(\"padding-inline\",a(\"containerPadding\")),a(\"contentMaxWidth\")?\"margin-inline:auto !important;\":\"\"]),c('body main :where(section,[data-design-section]) > :where([class*=\"flex\"],[data-design-content])',[d(\"align-items\",E(a(\"contentAlign\"))),d(\"justify-items\",a(\"contentAlign\"))]),c(\"body main :where([data-preview-list-path],[data-design-grid])\",[x(a(\"gridColumns\"))?\"display:grid !important;\":\"\",d(\"grid-template-columns\",x(a(\"gridColumns\"))),d(\"gap\",a(\"gridGap\"))]),c('body main :where([data-preview-style-type=\"card\"],[data-design-card],.card,[class*=\"card-\"]:not([class*=\"card-list\"]):not([class*=\"card-grid\"]))',[d(\"width\",a(\"cardWidth\")),a(\"cardWidth\")?\"max-width:100% !important;\":\"\",d(\"min-height\",a(\"cardMinHeight\")),d(\"padding\",a(\"cardPadding\")),d(\"border-radius\",a(\"cardRadius\")),d(\"border-width\",a(\"cardBorderWidth\")),a(\"cardBorderWidth\")?\"border-style:solid !important;\":\"\",d(\"border-color\",a(\"borderColor\")),...y(a(\"cardBackgroundColor\")||a(\"surfaceColor\")),d(\"box-shadow\",N(a(\"cardShadow\"))),d(\"text-align\",a(\"cardTextAlign\"))]),c('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"]) :where(h1,h2,h3,h4,h5,h6,p,span,[data-design-text])',[d(\"text-align\",a(\"cardTextAlign\"))]),c('body main :where([data-design-button],.btn-primary,.button-primary,a[class*=\"btn-primary\"],a[class*=\"button-primary\"],button:not([data-preview-static]):not([aria-label]):not([class*=\"icon\"]):not([class*=\"close\"]):not([class*=\"toggle\"]):not([class*=\"nav\"]))',[d(\"padding\",a(\"buttonPadding\")),d(\"border-radius\",a(\"buttonRadius\")),...y(a(\"buttonBackgroundColor\")),d(\"color\",a(\"buttonTextColor\")),d(\"box-shadow\",N(a(\"buttonShadow\")))]),c(\"body main img\",[d(\"border-radius\",a(\"imageRadius\"))]),...R?[c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card,.editable-service-card)',[d(\"background\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||\"#111a2e\"),d(\"background-color\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||\"#111a2e\"),\"border:1px solid rgba(255, 255, 255, 0.09) !important;\",\"box-shadow:0 10px 30px -10px rgba(0,0,0,0.5), 0 1px 3px 0 rgba(255,255,255,0.02) !important;\",d(\"color\",O)]),c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card) :where(h1,h2,h3,h4,h5,h6,strong,b)',[d(\"color\",et)]),c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card) :where(p,li,span:not([class*=\"badge\"]):not([class*=\"tag\"]):not([class*=\"pill\"]))',[d(\"color\",_||`color-mix(in srgb, ${O} 75%, transparent)`)]),c('body header, body .deneb-navbar, body [class*=\"navbar\"]',[d(\"background-color\",a(\"headerBackgroundColor\")||`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 85%, transparent)`),\"backdrop-filter:blur(16px) !important;\",\"-webkit-backdrop-filter:blur(16px) !important;\",\"border-bottom:1px solid rgba(255, 255, 255, 0.08) !important;\"]),c(\"body .deneb-nav-item, body nav a, body nav button\",[`color:color-mix(in srgb, ${O} 75%, transparent) !important;`]),c(\"body .deneb-nav-item:hover, body nav a:hover, body nav button:hover\",[\"color:#ffffff !important;\",\"background-color:rgba(255, 255, 255, 0.08) !important;\"]),c(\"body .deneb-nav-item.active, body nav a.active\",[\"color:#ffffff !important;\",\"background-color:rgba(255, 255, 255, 0.12) !important;\"]),c('body input:not([type=\"button\"]):not([type=\"submit\"]):not([type=\"color\"]):not([type=\"checkbox\"]):not([type=\"radio\"]), body textarea, body select',[d(\"background-color\",`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 60%, ${a(\"cardBackgroundColor\")||\"#131b2e\"})`),\"border:1px solid rgba(255, 255, 255, 0.14) !important;\",d(\"color\",O)]),c(\"body footer, body .site-footer\",[d(\"background-color\",a(\"footerBackgroundColor\")||`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 80%, #000000)`),\"border-top:1px solid rgba(255, 255, 255, 0.08) !important;\",d(\"color\",O)]),c('body .hero, body [class*=\"hero\"]:not(button):not(a):not(span)',[`background:radial-gradient(ellipse at 50% 0%, color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 14%, transparent), transparent 70%), ${a(\"backgroundColor\")||\"#090d16\"} !important;`]),c(\"body .deneb-mobile-drawer, body .deneb-dialog-content\",[d(\"background-color\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||\"#111a2e\"),\"border-color:rgba(255, 255, 255, 0.1) !important;\",d(\"color\",O)]),c('body :where(.eyebrow,[class*=\"badge\"],[class*=\"pill\"]:not(button))',[`background-color:color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 15%, transparent) !important;`,`color:${a(\"accentColor\")||a(\"primaryColor\")||\"#38bdf8\"} !important;`,`border-color:color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 28%, transparent) !important;`]),c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card):hover',[\"border-color:rgba(255, 255, 255, 0.18) !important;\",\"box-shadow:0 16px 40px -10px rgba(0,0,0,0.65), 0 1px 3px 0 rgba(255,255,255,0.04) !important;\"]),c('body :where(hr,[class*=\"divider\"],[class*=\"separator\"])',[\"border-color:rgba(255, 255, 255, 0.08) !important;\"]),c(\"body :where(.page-section.alt,section.alt)\",[`background:color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 3%, ${a(\"backgroundColor\")||\"#090d16\"}) !important;`]),c('body :where(.btn-secondary,[class*=\"btn-secondary\"],[class*=\"button-secondary\"],[data-variant=\"secondary\"],.editable-btn-secondary)',[\"background-color:rgba(255, 255, 255, 0.08) !important;\",\"color:#f8fafc !important;\",\"border:1px solid rgba(255, 255, 255, 0.14) !important;\"]),c('body :where(.btn-outline,[class*=\"btn-outline\"],[class*=\"button-outline\"],[data-variant=\"outline\"])',[\"background-color:transparent !important;\",\"color:#f8fafc !important;\",\"border-color:rgba(255, 255, 255, 0.22) !important;\"]),c('body :where(.btn-ghost,[class*=\"btn-ghost\"],[class*=\"button-ghost\"],[data-variant=\"ghost\"])',[\"background-color:transparent !important;\",\"color:#f8fafc !important;\"]),c('body :where(.btn-primary,[class*=\"btn-primary\"],[class*=\"button-primary\"],[data-variant=\"primary\"],.editable-btn-primary)',[`background-color:${a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\"} !important;`,`color:${a(\"buttonTextColor\")||(G(a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\")?\"#ffffff\":\"#0f172a\")} !important;`])]:[]],gt=T(P.sections)?P.sections:{};for(const[l,f]of Object.entries(gt)){if(!/^[a-zA-Z0-9_-]{1,64}$/.test(l)||!T(f))continue;const h=__name(mt=>q(f[mt]),\"sectionRead\"),D=h(\"backgroundColor\"),L=['[class*=\"absolute\"][class*=\"inset-0\"]','[class*=\"fixed\"][class*=\"inset-0\"]','[class*=\"absolute\"][class*=\"inset-x-0\"][class*=\"inset-y-0\"]','[class*=\"absolute\"][class*=\"top-0\"][class*=\"right-0\"][class*=\"bottom-0\"][class*=\"left-0\"]'].join(\",\"),W={all:\"body main section\",hero:\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",header:\"body header\",footer:\"body footer\",cards:'body main :where([data-preview-style-type=\"card\"],[data-design-card],.card,[class*=\"card-\"]:not([class*=\"card-list\"]):not([class*=\"card-grid\"]))'}[l]??`body :where([data-preview-page-key=\"${l}\"] > section,[data-design-section=\"${l}\"],[data-section-id=\"${l}\"],section#${l},section.${l})`;Q.push(c(W,[f.visible===!1?\"display:none !important;\":\"\",...y(D),d(\"color\",h(\"textColor\")),d(\"min-height\",h(\"minHeight\")),d(\"padding-block\",h(\"padding\")),d(\"max-width\",h(\"contentMaxWidth\")),d(\"gap\",h(\"gap\")),d(\"text-align\",h(\"textAlign\")),d(\"align-items\",E(h(\"contentAlign\")))]),c(`${W} :where(h1,h2,h3,h4,h5,h6)`,[d(\"color\",h(\"headingColor\")),d(\"text-align\",h(\"textAlign\"))]),c(`${W} :where(p,span,[data-design-text])`,[d(\"text-align\",h(\"textAlign\"))]),c(`${W} :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`,[...y(h(\"cardBackgroundColor\")),d(\"width\",h(\"cardWidth\")),h(\"cardWidth\")?\"max-width:100% !important;\":\"\",d(\"min-height\",h(\"cardMinHeight\")),d(\"border-radius\",h(\"cardRadius\"))]),c(`${W} :where([data-preview-list-path],[data-design-grid])`,[x(h(\"gridColumns\"))?\"display:grid !important;\":\"\",d(\"grid-template-columns\",x(h(\"gridColumns\")))]),c(`${W}::before,${W}::after`,D?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),c(`${W} > :where(${L})`,D?[\"background:none !important;\",\"background-image:none !important;\",\"box-shadow:none !important;\",\"mask-image:none !important;\",\"-webkit-mask-image:none !important;\"]:[]),c(`${W} > :where(${L})::before,${W} > :where(${L})::after`,D?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),c(`${W} > :where(${L}) :where(img,video,canvas,picture)`,D?[\"opacity:0.2 !important;\"]:[]))}const Et=T(P.elementStyles)?P.elementStyles:{},g=[[\"display\",\"display\"],[\"order\",\"order\"],[\"fontFamily\",\"font-family\"],[\"fontSize\",\"font-size\"],[\"lineHeight\",\"line-height\"],[\"fontWeight\",\"font-weight\"],[\"letterSpacing\",\"letter-spacing\"],[\"color\",\"color\"],[\"backgroundColor\",\"background-color\"],[\"textAlign\",\"text-align\"],[\"justifyContent\",\"justify-content\"],[\"alignItems\",\"align-items\"],[\"width\",\"width\"],[\"height\",\"height\"],[\"minWidth\",\"min-width\"],[\"minHeight\",\"min-height\"],[\"maxWidth\",\"max-width\"],[\"maxHeight\",\"max-height\"],[\"marginTop\",\"margin-top\"],[\"marginRight\",\"margin-right\"],[\"marginBottom\",\"margin-bottom\"],[\"marginLeft\",\"margin-left\"],[\"paddingTop\",\"padding-top\"],[\"paddingRight\",\"padding-right\"],[\"paddingBottom\",\"padding-bottom\"],[\"paddingLeft\",\"padding-left\"],[\"padding\",\"padding\"],[\"borderRadius\",\"border-radius\"],[\"borderWidth\",\"border-width\"],[\"borderColor\",\"border-color\"],[\"borderStyle\",\"border-style\"],[\"boxShadow\",\"box-shadow\"]];for(const[l,f]of Object.entries(Et).slice(0,256)){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(l)||!T(f))continue;const h=l.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"'),D=(()=>{if(l===\"site:all\")return\"body\";if(l.startsWith(\"page:\"))return`body :where([data-preview-page-key=\"${h.slice(5)}\"])`;if(l.startsWith(\"section:\")){const[,L=\"all\",H=\"\"]=h.split(\":\"),W=L===\"all\"?\"body\":`body :where([data-preview-page-key=\"${L}\"])`,mt=H.match(/^nth-(\\d+)$/)?.[1];return mt?`${W} > section:nth-of-type(${mt})`:`${W} :where([data-design-section=\"${H}\"],[data-section-id=\"${H}\"],section#${H},section.${H})`}if(l.includes(\":\")){const[L,H]=h.split(\":\");if(H===\"card\")return`body [data-preview-list-path=\"${L}\"] :is([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`;if(H)return`body [data-preview-list-path=\"${L}\"] :is([data-preview-field-path$=\".${H}\"],[data-field-path$=\".${H}\"],[data-content-path$=\".${H}\"])`}return`body :is([data-preview-field-path=\"${h}\"],[data-content-path=\"${h}\"],[data-field-path=\"${h}\"],[data-fivora-resolved-field-path=\"${h}\"],[data-preview-list-path=\"${h}\"],[data-preview-item-path=\"${h}\"])`})();Q.push(c(D,g.map(([L,H])=>d(H,q(f[L])))))}return Q.filter(Boolean).join(`\n`)},function(C,T){if(!T||typeof T!=\"object\"||Array.isArray(T))return C;const I=__name(E=>{const x=E.trim().toLowerCase(),v=x.match(/^#([0-9a-f]{3})$/);return v?`#${[...v[1]].map(N=>N.repeat(2)).join(\"\")}`:/^#[0-9a-f]{6}$/.test(x)?x:null},\"normalize\"),P=new Map,q=new Map;for(const[E,x]of Object.entries(T).slice(0,64)){if(typeof x!=\"string\")continue;const v=I(E),N=I(x);if(!v||!N||v===N)continue;P.set(v,N);const G=__name(R=>[Number.parseInt(R.slice(1,3),16),Number.parseInt(R.slice(3,5),16),Number.parseInt(R.slice(5,7),16)],\"channels\");q.set(G(v).join(\",\"),G(N)),v[1]===v[2]&&v[3]===v[4]&&v[5]===v[6]&&P.set(`#${v[1]}${v[3]}${v[5]}`,N)}if(P.size===0)return C;const a=[...P.keys()].sort((E,x)=>x.length-E.length).map(E=>E.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")),d=new RegExp(`(?<!\\\\\\\\)(?:${a.join(\"|\")})(?![0-9a-f])`,\"gi\"),c=C.replace(d,E=>{const x=I(E);return x?P.get(x)??E:E}),y=/(rgba?\\(\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})/gi;return c.replace(y,(E,x,v,N,G,R,et)=>{const O=q.get(`${v},${G},${et}`);return O?`${x}${O[0]}${N}${O[1]}${R}${O[2]}`:E})},\"fivora-universal-design-overrides\",function(C,T){const I=T??document,P=C&&typeof C==\"object\"&&!Array.isArray(C)?C:null,q=P?.requirements&&typeof P.requirements==\"object\"&&!Array.isArray(P.requirements)?P.requirements:null,a=P?.template&&typeof P.template==\"object\"&&!Array.isArray(P.template)?P.template:null,d=a?.structure&&typeof a.structure==\"object\"&&!Array.isArray(a.structure)?a.structure:null,c=Array.isArray(q?.requiredPages),y=Array.isArray(d?.pages);if(!c&&!y)return;const E=c?q?.requiredPages:d?.pages,x=new Set(E.filter(g=>typeof g==\"string\").map(g=>g.trim()).filter(Boolean)),v=Array.isArray(a?.pageDefinitions)?a.pageDefinitions:[],N=Array.isArray(d?.pageDefinitions)?d.pageDefinitions:[],R=(v.length>0?v:N).flatMap(g=>{if(!g||typeof g!=\"object\"||Array.isArray(g))return[];const l=g;if(typeof l.id!=\"string\"||!l.id.trim())return[];const f=l.id.trim(),h=typeof l.label==\"string\"&&l.label.trim()?l.label.trim():f.replace(/_/g,\" \"),D=typeof l.route==\"string\"?l.route.trim():\"\",L=D===\"/\"?\"/\":`/${(D||f).replace(/^\\/+|\\/+$/g,\"\")}`;return[{id:f,label:h,route:L}]}),O=(y?d?.pages:E).filter(g=>typeof g==\"string\").map(g=>g.trim()).filter(Boolean).map((g,l)=>({id:g,label:g.replace(/_/g,\" \"),route:l===0?\"/\":`/${g}`})),_=R.length>0?R:O;if(_.length===0)return;const M=_.filter(g=>!x.has(g.id));if(M.length===0){I.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(g=>g.removeAttribute(\"data-fivora-page-disabled\"));return}let V=I.getElementById(\"fivora-page-selection-style\");(!V||V.tagName!==\"STYLE\")&&(V=I.createElement(\"style\"),V.id=\"fivora-page-selection-style\",V.textContent='[data-fivora-page-disabled=\"true\"]{display:none!important}',I.head.appendChild(V)),I.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(g=>g.removeAttribute(\"data-fivora-page-disabled\"));const U=__name(g=>{let l=g;try{const D=new URL(g,I.baseURI);if(D.origin!==I.location?.origin)return\"\";l=D.pathname}catch{return\"\"}const f=l.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];f&&l.startsWith(f)&&(l=l.slice(f.length)||\"/\"),l=l.replace(/\\/index\\.html$/i,\"/\").replace(/\\.html$/i,\"\");const h=l.replace(/\\/+$/g,\"\")||\"/\";return h.startsWith(\"/\")?h:`/${h}`},\"normalizePath\"),X=__name(g=>_.find(l=>{const f=U(l.route);return f?f===\"/\"?g===\"/\":g===f||g.startsWith(`${f}/`):!1}),\"pageForPath\"),K=__name(g=>{for(const l of[\"href\",\"formaction\",\"data-href\",\"data-route\",\"data-url\"]){const f=g.getAttribute(l);if(!f)continue;const h=X(U(f));if(h)return h}},\"pageForControl\"),Z=__name(g=>{g&&g.setAttribute(\"data-fivora-page-disabled\",\"true\")},\"disable\");for(const g of M)for(const l of[\"data-page-key\",\"data-required-page\",\"data-target-page\"])I.querySelectorAll(`[${l}]`).forEach(f=>{f.getAttribute(l)===g.id&&Z(f)});const Q=Array.from(I.querySelectorAll(\"a[href]\"));for(const g of Q){const l=K(g);if(!l||x.has(l.id))continue;if(g.classList.contains(\"absolute\")&&(g.classList.contains(\"inset-0\")||g.classList.contains(\"inset-x-0\")&&g.classList.contains(\"inset-y-0\")))Z(g.closest(\"[data-preview-item-path],[data-design-card],article,li\"));else{const h=g.closest(\"li\");Z(h&&h.querySelectorAll(\"a[href]\").length===1?h:g)}}const gt=Array.from(I.querySelectorAll('button,[role=\"button\"],[data-href],[data-route],[data-url]')).filter(g=>g.tagName!==\"A\");for(const g of gt){const l=K(g);if(!l||x.has(l.id))continue;const f=g.closest(\"li\");Z(f&&f.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]').length===1?f:g)}const Et=I.querySelector(\"main section\");for(const g of I.querySelectorAll(\"main section\")){const l=Array.from(g.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]')),f=l.map(K).filter(L=>!!L),h=g.hasAttribute(\"data-preview-page-key\"),D=g===Et||g.hasAttribute(\"data-design-hero\")||/(?:^|\\s)(?:hero|banner|masthead)(?:\\s|$)/i.test(g.className)||!!g.querySelector(\"h1\");!h&&!D&&f.length>0&&f.length===l.length&&f.every(L=>!x.has(L.id))&&Z(g)}},function(C){const T=C.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];if(!T)return C;let I=C;const P=`${T}${T}`;for(;I.startsWith(P);)I=`${T}${I.slice(P.length)}`;return I},function(){if(window.__fivoraSectionNavigationInstalled)return;window.__fivoraSectionNavigationInstalled=!0;const C=__name(c=>typeof CSS<\"u\"&&typeof CSS.escape==\"function\"?CSS.escape(c):c.replace(/[^a-zA-Z0-9_-]/g,y=>`\\\\${y.codePointAt(0)?.toString(16)??\"\"} `),\"escapeSelector\"),T=__name(()=>window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live|candidate)\\/[^/]+)/)?.[1]??\"\",\"previewRoot\"),I=__name(c=>{const y=T(),x=(y&&c.pathname.startsWith(y)?c.pathname.slice(y.length):c.pathname).replace(/\\/(?:index\\.html?)?$/i,\"\").split(\"/\").filter(Boolean);return(x[x.length-1]??\"home\").replace(/\\.html?$/i,\"\")},\"routeSectionKey\"),P=__name(c=>{const y=c.getAttribute(\"href\")?.trim();if(!y||c.hasAttribute(\"download\")||c.target&&c.target!==\"_self\"||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(y))return null;let E;try{E=new URL(y,window.location.href)}catch{return null}if(E.origin!==window.location.origin)return null;const x=E.hash?decodeURIComponent(E.hash.slice(1)).trim():\"\",v=x||I(E);if(!v)return null;if(x){const R=document.getElementById(x);if(R)return{target:R,key:v}}const N=C(v),G=document.querySelector(`section#${N},section[data-fivora-section=\"${N}\"],section[data-section-id=\"${N}\"],[data-preview-page-key=\"${N}\"]`);return G?{target:G,key:v}:null},\"findTarget\"),q=__name(()=>{let c=0;for(const y of document.querySelectorAll(\"header,nav,[data-fivora-sticky-header]\")){const E=window.getComputedStyle(y);if(E.position!==\"fixed\"&&E.position!==\"sticky\")continue;const x=y.getBoundingClientRect();x.height<=0||x.top>4||x.bottom<=0||(c=Math.max(c,x.bottom))}return c},\"fixedHeaderOffset\"),a=__name((c,y,E)=>{const x=Math.max(0,window.scrollY+c.getBoundingClientRect().top-q()-8),v=window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;window.scrollTo({top:x,behavior:v?\"auto\":\"smooth\"}),E&&window.location.hash!==`#${y}`&&window.history.pushState(null,\"\",`${window.location.pathname}${window.location.search}#${encodeURIComponent(y)}`),window.dispatchEvent(new CustomEvent(\"fivora:section-navigation\",{detail:{key:y,target:c}}))},\"scrollToTarget\");document.addEventListener(\"click\",c=>{if(c.defaultPrevented||c.button!==0||c.metaKey||c.ctrlKey||c.shiftKey||c.altKey)return;const y=c.target?.closest?.(\"a[href]\");if(!y)return;const E=P(y);!E||E.target===y||(c.preventDefault(),c.stopImmediatePropagation(),a(E.target,E.key,!0))},!0);const d=__name(()=>{if(!window.location.hash)return;const c=document.createElement(\"a\");c.href=window.location.hash;const y=P(c);y&&a(y.target,y.key,!1)},\"revealInitialHash\");window.requestAnimationFrame(()=>window.requestAnimationFrame(d))});";
|