@jsonpages/core 1.0.9 → 1.0.11
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/dist/index.d.ts +5 -6
- package/dist/jsonpages-core.js +3156 -3238
- package/dist/jsonpages-core.umd.cjs +39 -39
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(fe,J){typeof exports=="object"&&typeof module<"u"?J(exports,require("react"),require("react-router-dom"),require("zod"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","zod","react-dom"],J):(fe=typeof globalThis<"u"?globalThis:fe||self,J(fe.JsonPagesCore={},fe.React,fe.ReactRouterDOM,fe.z,fe.ReactDOM))})(this,(function(fe,J,je,_e,Cr){"use strict";function Ar(e){const k=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const m=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(k,r,m.get?m:{enumerable:!0,get:()=>e[r]})}}return k.default=e,Object.freeze(k)}const me=Ar(J),ve={UPDATE_DRAFTS:"jsonpages:update-drafts",SYNC_SELECTION:"jsonpages:sync-selection",REQUEST_CLEAN_HTML:"jsonpages:request-clean-html",SEND_CLEAN_HTML:"jsonpages:send-clean-html",SECTION_SELECT:"jsonpages:section-select",REQUEST_SCROLL_TO_SECTION:"jsonpages:request-scroll-to-section",ACTIVE_SECTION_CHANGED:"jsonpages:active-section-changed",STAGE_READY:"jsonpages:stage-ready"};var Ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Je(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ct={exports:{}};/*!
|
|
2
2
|
|
|
3
3
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
4
4
|
<http://stuartk.com/jszip>
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
JSZip uses the library pako released under the MIT license :
|
|
10
10
|
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
11
|
-
*/var Et;function
|
|
12
|
-
\0`,K+=i(z,2),K+=L.magic,K+=i(E,2),K+=i(N,2),K+=i(re.crc32,4),K+=i(re.compressedSize,4),K+=i(re.uncompressedSize,4),K+=i(O.length,2),K+=i(R.length,2),{fileRecord:w.LOCAL_FILE_HEADER+K+O+R,dirRecord:w.CENTRAL_FILE_HEADER+i(J,2)+K+i(X.length,2)+"\0\0\0\0"+i(S,4)+i(v,4)+O+R+X}}var n=r("../utils"),l=r("../stream/GenericWorker"),h=r("../utf8"),p=r("../crc32"),w=r("../signature");function y(c,x,d,v){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=d,this.encodeFileName=v,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(y,l),y.prototype.push=function(c){var x=c.meta.percent||0,d=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,l.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:d?(x+100*(d-v-1))/d:100}}))},y.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var x=this.streamFiles&&!c.file.dir;if(x){var d=o(c,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:d.fileRecord,meta:{percent:0}})}else this.accumulate=!0},y.prototype.closedSource=function(c){this.accumulate=!1;var x=this.streamFiles&&!c.file.dir,d=o(c,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(d.dirRecord),x)this.push({data:(function(v){return w.DATA_DESCRIPTOR+i(v.crc32,4)+i(v.compressedSize,4)+i(v.uncompressedSize,4)})(c),meta:{percent:100}});else for(this.push({data:d.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},y.prototype.flush=function(){for(var c=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var d=this.bytesWritten-c,v=(function(f,k,E,N,A){var L=n.transformTo("string",A(N));return w.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(f,2)+i(f,2)+i(k,4)+i(E,4)+i(L.length,2)+L})(this.dirRecords.length,d,c,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},y.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},y.prototype.registerPrevious=function(c){this._sources.push(c);var x=this;return c.on("data",function(d){x.processChunk(d)}),c.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),c.on("error",function(d){x.error(d)}),this},y.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},y.prototype.error=function(c){var x=this._sources;if(!l.prototype.error.call(this,c))return!1;for(var d=0;d<x.length;d++)try{x[d].error(c)}catch{}return!0},y.prototype.lock=function(){l.prototype.lock.call(this);for(var c=this._sources,x=0;x<c.length;x++)c[x].lock()},m.exports=y},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,m,u){var i=r("../compressions"),o=r("./ZipFileWorker");u.generateWorker=function(n,l,h){var p=new o(l.streamFiles,h,l.platform,l.encodeFileName),w=0;try{n.forEach(function(y,c){w++;var x=(function(k,E){var N=k||E,A=i[N];if(!A)throw new Error(N+" is not a valid compression method !");return A})(c.options.compression,l.compression),d=c.options.compressionOptions||l.compressionOptions||{},v=c.dir,f=c.date;c._compressWorker(x,d).withStreamInfo("file",{name:y,dir:v,date:f,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(p)}),p.entriesCount=w}catch(y){p.error(y)}return p}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,m,u){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new i;for(var n in this)typeof this[n]!="function"&&(o[n]=this[n]);return o}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(o,n){return new i().loadAsync(o,n)},i.external=r("./external"),m.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,m,u){var i=r("./utils"),o=r("./external"),n=r("./utf8"),l=r("./zipEntries"),h=r("./stream/Crc32Probe"),p=r("./nodejsUtils");function w(y){return new o.Promise(function(c,x){var d=y.decompressed.getContentWorker().pipe(new h);d.on("error",function(v){x(v)}).on("end",function(){d.streamInfo.crc32!==y.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}m.exports=function(y,c){var x=this;return c=i.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),p.isNode&&p.isStream(y)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",y,!0,c.optimizedBinaryString,c.base64).then(function(d){var v=new l(c);return v.load(d),v}).then(function(d){var v=[o.Promise.resolve(d)],f=d.files;if(c.checkCRC32)for(var k=0;k<f.length;k++)v.push(w(f[k]));return o.Promise.all(v)}).then(function(d){for(var v=d.shift(),f=v.files,k=0;k<f.length;k++){var E=f[k],N=E.fileNameStr,A=i.resolve(E.fileNameStr);x.file(A,E.decompressed,{binary:!0,optimizedBinaryString:!0,date:E.date,dir:E.dir,comment:E.fileCommentStr.length?E.fileCommentStr:null,unixPermissions:E.unixPermissions,dosPermissions:E.dosPermissions,createFolders:c.createFolders}),E.dir||(x.file(A).unsafeOriginalName=N)}return v.zipComment.length&&(x.comment=v.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,m,u){var i=r("../utils"),o=r("../stream/GenericWorker");function n(l,h){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(h)}i.inherits(n,o),n.prototype._bindStream=function(l){var h=this;(this._stream=l).pause(),l.on("data",function(p){h.push({data:p,meta:{percent:0}})}).on("error",function(p){h.isPaused?this.generatedError=p:h.error(p)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},n.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},m.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,m,u){var i=r("readable-stream").Readable;function o(n,l,h){i.call(this,l),this._helper=n;var p=this;n.on("data",function(w,y){p.push(w)||p._helper.pause(),h&&h(y)}).on("error",function(w){p.emit("error",w)}).on("end",function(){p.push(null)})}r("../utils").inherits(o,i),o.prototype._read=function(){this._helper.resume()},m.exports=o},{"../utils":32,"readable-stream":16}],14:[function(r,m,u){m.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,o);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,o)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var o=new Buffer(i);return o.fill(0),o},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,m,u){function i(A,L,I){var O,T=n.getTypeOf(L),B=n.extend(I||{},p);B.date=B.date||new Date,B.compression!==null&&(B.compression=B.compression.toUpperCase()),typeof B.unixPermissions=="string"&&(B.unixPermissions=parseInt(B.unixPermissions,8)),B.unixPermissions&&16384&B.unixPermissions&&(B.dir=!0),B.dosPermissions&&16&B.dosPermissions&&(B.dir=!0),B.dir&&(A=f(A)),B.createFolders&&(O=v(A))&&k.call(this,O,!0);var X=T==="string"&&B.binary===!1&&B.base64===!1;I&&I.binary!==void 0||(B.binary=!X),(L instanceof w&&L.uncompressedSize===0||B.dir||!L||L.length===0)&&(B.base64=!1,B.binary=!0,L="",B.compression="STORE",T="string");var j=null;j=L instanceof w||L instanceof l?L:x.isNode&&x.isStream(L)?new d(A,L):n.prepareContent(A,L,B.binary,B.optimizedBinaryString,B.base64);var P=new y(A,j,B);this.files[A]=P}var o=r("./utf8"),n=r("./utils"),l=r("./stream/GenericWorker"),h=r("./stream/StreamHelper"),p=r("./defaults"),w=r("./compressedObject"),y=r("./zipObject"),c=r("./generate"),x=r("./nodejsUtils"),d=r("./nodejs/NodejsStreamInputAdapter"),v=function(A){A.slice(-1)==="/"&&(A=A.substring(0,A.length-1));var L=A.lastIndexOf("/");return 0<L?A.substring(0,L):""},f=function(A){return A.slice(-1)!=="/"&&(A+="/"),A},k=function(A,L){return L=L!==void 0?L:p.createFolders,A=f(A),this.files[A]||i.call(this,A,null,{dir:!0,createFolders:L}),this.files[A]};function E(A){return Object.prototype.toString.call(A)==="[object RegExp]"}var N={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(A){var L,I,O;for(L in this.files)O=this.files[L],(I=L.slice(this.root.length,L.length))&&L.slice(0,this.root.length)===this.root&&A(I,O)},filter:function(A){var L=[];return this.forEach(function(I,O){A(I,O)&&L.push(O)}),L},file:function(A,L,I){if(arguments.length!==1)return A=this.root+A,i.call(this,A,L,I),this;if(E(A)){var O=A;return this.filter(function(B,X){return!X.dir&&O.test(B)})}var T=this.files[this.root+A];return T&&!T.dir?T:null},folder:function(A){if(!A)return this;if(E(A))return this.filter(function(T,B){return B.dir&&A.test(T)});var L=this.root+A,I=k.call(this,L),O=this.clone();return O.root=I.name,O},remove:function(A){A=this.root+A;var L=this.files[A];if(L||(A.slice(-1)!=="/"&&(A+="/"),L=this.files[A]),L&&!L.dir)delete this.files[A];else for(var I=this.filter(function(T,B){return B.name.slice(0,A.length)===A}),O=0;O<I.length;O++)delete this.files[I[O].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(A){var L,I={};try{if((I=n.extend(A||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=I.type.toLowerCase(),I.compression=I.compression.toUpperCase(),I.type==="binarystring"&&(I.type="string"),!I.type)throw new Error("No output type specified.");n.checkSupport(I.type),I.platform!=="darwin"&&I.platform!=="freebsd"&&I.platform!=="linux"&&I.platform!=="sunos"||(I.platform="UNIX"),I.platform==="win32"&&(I.platform="DOS");var O=I.comment||this.comment||"";L=c.generateWorker(this,I,O)}catch(T){(L=new l("error")).error(T)}return new h(L,I.type||"string",I.mimeType)},generateAsync:function(A,L){return this.generateInternalStream(A).accumulate(L)},generateNodeStream:function(A,L){return(A=A||{}).type||(A.type="nodebuffer"),this.generateInternalStream(A).toNodejsStream(L)}};m.exports=N},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,m,u){m.exports=r("stream")},{stream:void 0}],17:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n);for(var l=0;l<this.data.length;l++)n[l]=255&n[l]}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data[this.zero+n]},o.prototype.lastIndexOfSignature=function(n){for(var l=n.charCodeAt(0),h=n.charCodeAt(1),p=n.charCodeAt(2),w=n.charCodeAt(3),y=this.length-4;0<=y;--y)if(this.data[y]===l&&this.data[y+1]===h&&this.data[y+2]===p&&this.data[y+3]===w)return y-this.zero;return-1},o.prototype.readAndCheckSignature=function(n){var l=n.charCodeAt(0),h=n.charCodeAt(1),p=n.charCodeAt(2),w=n.charCodeAt(3),y=this.readData(4);return l===y[0]&&h===y[1]&&p===y[2]&&w===y[3]},o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],18:[function(r,m,u){var i=r("../utils");function o(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var l,h=0;for(this.checkOffset(n),l=this.index+n-1;l>=this.index;l--)h=(h<<8)+this.byteAt(l);return this.index+=n,h},readString:function(n){return i.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},m.exports=o},{"../utils":32}],19:[function(r,m,u){var i=r("./Uint8ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},o.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},o.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,m,u){var i=r("./ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,m,u){var i=r("../utils"),o=r("../support"),n=r("./ArrayReader"),l=r("./StringReader"),h=r("./NodeBufferReader"),p=r("./Uint8ArrayReader");m.exports=function(w){var y=i.getTypeOf(w);return i.checkSupport(y),y!=="string"||o.uint8array?y==="nodebuffer"?new h(w):o.uint8array?new p(i.transformTo("uint8array",w)):new n(i.transformTo("array",w)):new l(w)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,m,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,m,u){var i=r("./GenericWorker"),o=r("../utils");function n(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(n,i),n.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},m.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(r,m,u){var i=r("./GenericWorker"),o=r("../crc32");function n(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(n,i),n.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},m.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(n,o),n.prototype.processChunk=function(l){if(l){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+l.data.length}o.prototype.processChunk.call(this,l)},m.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(p){h.dataIsReady=!0,h.data=p,h.max=p&&p.length||0,h.type=i.getTypeOf(p),h.isPaused||h._tickAndRepeat()},function(p){h.error(p)})}i.inherits(n,o),n.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,h);break;case"uint8array":l=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":l=this.data.slice(this.index,h)}return this.index=h,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},m.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(r,m,u){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,n){return this._listeners[o].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,n){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,n)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var n=this;return o.on("data",function(l){n.processChunk(l)}),o.on("end",function(){n.end()}),o.on("error",function(l){n.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,n){return this.extraStreamInfo[o]=n,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},m.exports=i},{}],29:[function(r,m,u){var i=r("../utils"),o=r("./ConvertWorker"),n=r("./GenericWorker"),l=r("../base64"),h=r("../support"),p=r("../external"),w=null;if(h.nodestream)try{w=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function y(x,d){return new p.Promise(function(v,f){var k=[],E=x._internalType,N=x._outputType,A=x._mimeType;x.on("data",function(L,I){k.push(L),d&&d(I)}).on("error",function(L){k=[],f(L)}).on("end",function(){try{var L=(function(I,O,T){switch(I){case"blob":return i.newBlob(i.transformTo("arraybuffer",O),T);case"base64":return l.encode(O);default:return i.transformTo(I,O)}})(N,(function(I,O){var T,B=0,X=null,j=0;for(T=0;T<O.length;T++)j+=O[T].length;switch(I){case"string":return O.join("");case"array":return Array.prototype.concat.apply([],O);case"uint8array":for(X=new Uint8Array(j),T=0;T<O.length;T++)X.set(O[T],B),B+=O[T].length;return X;case"nodebuffer":return Buffer.concat(O);default:throw new Error("concat : unsupported type '"+I+"'")}})(E,k),A);v(L)}catch(I){f(I)}k=[]}).resume()})}function c(x,d,v){var f=d;switch(d){case"blob":case"arraybuffer":f="uint8array";break;case"base64":f="string"}try{this._internalType=f,this._outputType=d,this._mimeType=v,i.checkSupport(f),this._worker=x.pipe(new o(f)),x.lock()}catch(k){this._worker=new n("error"),this._worker.error(k)}}c.prototype={accumulate:function(x){return y(this,x)},on:function(x,d){var v=this;return x==="data"?this._worker.on(x,function(f){d.call(v,f.data,f.meta)}):this._worker.on(x,function(){i.delay(d,arguments,v)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new w(this,{objectMode:this._outputType!=="nodebuffer"},x)}},m.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,m,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var i=new ArrayBuffer(0);try{u.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),u.blob=o.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!r("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(r,m,u){for(var i=r("./utils"),o=r("./support"),n=r("./nodejsUtils"),l=r("./stream/GenericWorker"),h=new Array(256),p=0;p<256;p++)h[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;h[254]=h[254]=1;function w(){l.call(this,"utf-8 decode"),this.leftOver=null}function y(){l.call(this,"utf-8 encode")}u.utf8encode=function(c){return o.nodebuffer?n.newBufferFrom(c,"utf-8"):(function(x){var d,v,f,k,E,N=x.length,A=0;for(k=0;k<N;k++)(64512&(v=x.charCodeAt(k)))==55296&&k+1<N&&(64512&(f=x.charCodeAt(k+1)))==56320&&(v=65536+(v-55296<<10)+(f-56320),k++),A+=v<128?1:v<2048?2:v<65536?3:4;for(d=o.uint8array?new Uint8Array(A):new Array(A),k=E=0;E<A;k++)(64512&(v=x.charCodeAt(k)))==55296&&k+1<N&&(64512&(f=x.charCodeAt(k+1)))==56320&&(v=65536+(v-55296<<10)+(f-56320),k++),v<128?d[E++]=v:(v<2048?d[E++]=192|v>>>6:(v<65536?d[E++]=224|v>>>12:(d[E++]=240|v>>>18,d[E++]=128|v>>>12&63),d[E++]=128|v>>>6&63),d[E++]=128|63&v);return d})(c)},u.utf8decode=function(c){return o.nodebuffer?i.transformTo("nodebuffer",c).toString("utf-8"):(function(x){var d,v,f,k,E=x.length,N=new Array(2*E);for(d=v=0;d<E;)if((f=x[d++])<128)N[v++]=f;else if(4<(k=h[f]))N[v++]=65533,d+=k-1;else{for(f&=k===2?31:k===3?15:7;1<k&&d<E;)f=f<<6|63&x[d++],k--;1<k?N[v++]=65533:f<65536?N[v++]=f:(f-=65536,N[v++]=55296|f>>10&1023,N[v++]=56320|1023&f)}return N.length!==v&&(N.subarray?N=N.subarray(0,v):N.length=v),i.applyFromCharCode(N)})(c=i.transformTo(o.uint8array?"uint8array":"array",c))},i.inherits(w,l),w.prototype.processChunk=function(c){var x=i.transformTo(o.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var d=x;(x=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),x.set(d,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var v=(function(k,E){var N;for((E=E||k.length)>k.length&&(E=k.length),N=E-1;0<=N&&(192&k[N])==128;)N--;return N<0||N===0?E:N+h[k[N]]>E?N:E})(x),f=x;v!==x.length&&(o.uint8array?(f=x.subarray(0,v),this.leftOver=x.subarray(v,x.length)):(f=x.slice(0,v),this.leftOver=x.slice(v,x.length))),this.push({data:u.utf8decode(f),meta:c.meta})},w.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=w,i.inherits(y,l),y.prototype.processChunk=function(c){this.push({data:u.utf8encode(c.data),meta:c.meta})},u.Utf8EncodeWorker=y},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,m,u){var i=r("./support"),o=r("./base64"),n=r("./nodejsUtils"),l=r("./external");function h(d){return d}function p(d,v){for(var f=0;f<d.length;++f)v[f]=255&d.charCodeAt(f);return v}r("setimmediate"),u.newBlob=function(d,v){u.checkSupport("blob");try{return new Blob([d],{type:v})}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(d),f.getBlob(v)}catch{throw new Error("Bug : can't construct the Blob.")}}};var w={stringifyByChunk:function(d,v,f){var k=[],E=0,N=d.length;if(N<=f)return String.fromCharCode.apply(null,d);for(;E<N;)v==="array"||v==="nodebuffer"?k.push(String.fromCharCode.apply(null,d.slice(E,Math.min(E+f,N)))):k.push(String.fromCharCode.apply(null,d.subarray(E,Math.min(E+f,N)))),E+=f;return k.join("")},stringifyByChar:function(d){for(var v="",f=0;f<d.length;f++)v+=String.fromCharCode(d[f]);return v},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch{return!1}})()}};function y(d){var v=65536,f=u.getTypeOf(d),k=!0;if(f==="uint8array"?k=w.applyCanBeUsed.uint8array:f==="nodebuffer"&&(k=w.applyCanBeUsed.nodebuffer),k)for(;1<v;)try{return w.stringifyByChunk(d,f,v)}catch{v=Math.floor(v/2)}return w.stringifyByChar(d)}function c(d,v){for(var f=0;f<d.length;f++)v[f]=d[f];return v}u.applyFromCharCode=y;var x={};x.string={string:h,array:function(d){return p(d,new Array(d.length))},arraybuffer:function(d){return x.string.uint8array(d).buffer},uint8array:function(d){return p(d,new Uint8Array(d.length))},nodebuffer:function(d){return p(d,n.allocBuffer(d.length))}},x.array={string:y,array:h,arraybuffer:function(d){return new Uint8Array(d).buffer},uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(d)}},x.arraybuffer={string:function(d){return y(new Uint8Array(d))},array:function(d){return c(new Uint8Array(d),new Array(d.byteLength))},arraybuffer:h,uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(new Uint8Array(d))}},x.uint8array={string:y,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return d.buffer},uint8array:h,nodebuffer:function(d){return n.newBufferFrom(d)}},x.nodebuffer={string:y,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return x.nodebuffer.uint8array(d).buffer},uint8array:function(d){return c(d,new Uint8Array(d.length))},nodebuffer:h},u.transformTo=function(d,v){if(v=v||"",!d)return v;u.checkSupport(d);var f=u.getTypeOf(v);return x[f][d](v)},u.resolve=function(d){for(var v=d.split("/"),f=[],k=0;k<v.length;k++){var E=v[k];E==="."||E===""&&k!==0&&k!==v.length-1||(E===".."?f.pop():f.push(E))}return f.join("/")},u.getTypeOf=function(d){return typeof d=="string"?"string":Object.prototype.toString.call(d)==="[object Array]"?"array":i.nodebuffer&&n.isBuffer(d)?"nodebuffer":i.uint8array&&d instanceof Uint8Array?"uint8array":i.arraybuffer&&d instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(d){if(!i[d.toLowerCase()])throw new Error(d+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(d){var v,f,k="";for(f=0;f<(d||"").length;f++)k+="\\x"+((v=d.charCodeAt(f))<16?"0":"")+v.toString(16).toUpperCase();return k},u.delay=function(d,v,f){setImmediate(function(){d.apply(f||null,v||[])})},u.inherits=function(d,v){function f(){}f.prototype=v.prototype,d.prototype=new f},u.extend=function(){var d,v,f={};for(d=0;d<arguments.length;d++)for(v in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],v)&&f[v]===void 0&&(f[v]=arguments[d][v]);return f},u.prepareContent=function(d,v,f,k,E){return l.Promise.resolve(v).then(function(N){return i.blob&&(N instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(N))!==-1)&&typeof FileReader<"u"?new l.Promise(function(A,L){var I=new FileReader;I.onload=function(O){A(O.target.result)},I.onerror=function(O){L(O.target.error)},I.readAsArrayBuffer(N)}):N}).then(function(N){var A=u.getTypeOf(N);return A?(A==="arraybuffer"?N=u.transformTo("uint8array",N):A==="string"&&(E?N=o.decode(N):f&&k!==!0&&(N=(function(L){return p(L,i.uint8array?new Uint8Array(L.length):new Array(L.length))})(N))),N):l.Promise.reject(new Error("Can't read the data of '"+d+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./signature"),l=r("./zipEntry"),h=r("./support");function p(w){this.files=[],this.loadOptions=w}p.prototype={checkSignature:function(w){if(!this.reader.readAndCheckSignature(w)){this.reader.index-=4;var y=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(y)+", expected "+o.pretty(w)+")")}},isSignature:function(w,y){var c=this.reader.index;this.reader.setIndex(w);var x=this.reader.readString(4)===y;return this.reader.setIndex(c),x},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var w=this.reader.readData(this.zipCommentLength),y=h.uint8array?"uint8array":"array",c=o.transformTo(y,w);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var w,y,c,x=this.zip64EndOfCentralSize-44;0<x;)w=this.reader.readInt(2),y=this.reader.readInt(4),c=this.reader.readData(y),this.zip64ExtensibleData[w]={id:w,length:y,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var w,y;for(w=0;w<this.files.length;w++)y=this.files[w],this.reader.setIndex(y.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),y.readLocalPart(this.reader),y.handleUTF8(),y.processAttributes()},readCentralDir:function(){var w;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(w=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(w);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var w=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(w<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(w);var y=w;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(w=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(w),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var x=y-c;if(0<x)this.isSignature(y,n.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(x<0)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(w){this.reader=i(w)},load:function(w){this.prepareReader(w),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},m.exports=p},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./compressedObject"),l=r("./crc32"),h=r("./utf8"),p=r("./compressions"),w=r("./support");function y(c,x){this.options=c,this.loadOptions=x}y.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var x,d;if(c.skip(22),this.fileNameLength=c.readInt(2),d=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(d),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((x=(function(v){for(var f in p)if(Object.prototype.hasOwnProperty.call(p,f)&&p[f].magic===v)return p[f];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,x,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var x=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(x),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),c==0&&(this.dosPermissions=63&this.externalFileAttributes),c==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var c=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var x,d,v,f=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<f;)x=c.readInt(2),d=c.readInt(2),v=c.readData(d),this.extraFields[x]={id:x,length:d,value:v};c.setIndex(f)},handleUTF8:function(){var c=w.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var d=o.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(d)}var v=this.findExtraFieldUnicodeComment();if(v!==null)this.fileCommentStr=v;else{var f=o.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var x=i(c.value);return x.readInt(1)!==1||l(this.fileName)!==x.readInt(4)?null:h.utf8decode(x.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var x=i(c.value);return x.readInt(1)!==1||l(this.fileComment)!==x.readInt(4)?null:h.utf8decode(x.readData(c.length-5))}return null}},m.exports=y},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,m,u){function i(x,d,v){this.name=x,this.dir=v.dir,this.date=v.date,this.comment=v.comment,this.unixPermissions=v.unixPermissions,this.dosPermissions=v.dosPermissions,this._data=d,this._dataBinary=v.binary,this.options={compression:v.compression,compressionOptions:v.compressionOptions}}var o=r("./stream/StreamHelper"),n=r("./stream/DataWorker"),l=r("./utf8"),h=r("./compressedObject"),p=r("./stream/GenericWorker");i.prototype={internalStream:function(x){var d=null,v="string";try{if(!x)throw new Error("No output type specified.");var f=(v=x.toLowerCase())==="string"||v==="text";v!=="binarystring"&&v!=="text"||(v="string"),d=this._decompressWorker();var k=!this._dataBinary;k&&!f&&(d=d.pipe(new l.Utf8EncodeWorker)),!k&&f&&(d=d.pipe(new l.Utf8DecodeWorker))}catch(E){(d=new p("error")).error(E)}return new o(d,v,"")},async:function(x,d){return this.internalStream(x).accumulate(d)},nodeStream:function(x,d){return this.internalStream(x||"nodebuffer").toNodejsStream(d)},_compressWorker:function(x,d){if(this._data instanceof h&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var v=this._decompressWorker();return this._dataBinary||(v=v.pipe(new l.Utf8EncodeWorker)),h.createWorkerFrom(v,x,d)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof p?this._data:new n(this._data)}};for(var w=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],y=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<w.length;c++)i.prototype[w[c]]=y;m.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,m,u){(function(i){var o,n,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var h=0,p=new l(x),w=i.document.createTextNode("");p.observe(w,{characterData:!0}),o=function(){w.data=h=++h%2}}else if(i.setImmediate||i.MessageChannel===void 0)o="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var d=i.document.createElement("script");d.onreadystatechange=function(){x(),d.onreadystatechange=null,d.parentNode.removeChild(d),d=null},i.document.documentElement.appendChild(d)}:function(){setTimeout(x,0)};else{var y=new i.MessageChannel;y.port1.onmessage=x,o=function(){y.port2.postMessage(0)}}var c=[];function x(){var d,v;n=!0;for(var f=c.length;f;){for(v=c,c=[],d=-1;++d<f;)v[d]();f=c.length}n=!1}m.exports=function(d){c.push(d)!==1||n||o()}}).call(this,typeof Ie<"u"?Ie:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,m,u){var i=r("immediate");function o(){}var n={},l=["REJECTED"],h=["FULFILLED"],p=["PENDING"];function w(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,f!==o&&d(this,f)}function y(f,k,E){this.promise=f,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}function c(f,k,E){i(function(){var N;try{N=k(E)}catch(A){return n.reject(f,A)}N===f?n.reject(f,new TypeError("Cannot resolve promise with itself")):n.resolve(f,N)})}function x(f){var k=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof k=="function")return function(){k.apply(f,arguments)}}function d(f,k){var E=!1;function N(I){E||(E=!0,n.reject(f,I))}function A(I){E||(E=!0,n.resolve(f,I))}var L=v(function(){k(A,N)});L.status==="error"&&N(L.value)}function v(f,k){var E={};try{E.value=f(k),E.status="success"}catch(N){E.status="error",E.value=N}return E}(m.exports=w).prototype.finally=function(f){if(typeof f!="function")return this;var k=this.constructor;return this.then(function(E){return k.resolve(f()).then(function(){return E})},function(E){return k.resolve(f()).then(function(){throw E})})},w.prototype.catch=function(f){return this.then(null,f)},w.prototype.then=function(f,k){if(typeof f!="function"&&this.state===h||typeof k!="function"&&this.state===l)return this;var E=new this.constructor(o);return this.state!==p?c(E,this.state===h?f:k,this.outcome):this.queue.push(new y(E,f,k)),E},y.prototype.callFulfilled=function(f){n.resolve(this.promise,f)},y.prototype.otherCallFulfilled=function(f){c(this.promise,this.onFulfilled,f)},y.prototype.callRejected=function(f){n.reject(this.promise,f)},y.prototype.otherCallRejected=function(f){c(this.promise,this.onRejected,f)},n.resolve=function(f,k){var E=v(x,k);if(E.status==="error")return n.reject(f,E.value);var N=E.value;if(N)d(f,N);else{f.state=h,f.outcome=k;for(var A=-1,L=f.queue.length;++A<L;)f.queue[A].callFulfilled(k)}return f},n.reject=function(f,k){f.state=l,f.outcome=k;for(var E=-1,N=f.queue.length;++E<N;)f.queue[E].callRejected(k);return f},w.resolve=function(f){return f instanceof this?f:n.resolve(new this(o),f)},w.reject=function(f){var k=new this(o);return n.reject(k,f)},w.all=function(f){var k=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=f.length,N=!1;if(!E)return this.resolve([]);for(var A=new Array(E),L=0,I=-1,O=new this(o);++I<E;)T(f[I],I);return O;function T(B,X){k.resolve(B).then(function(j){A[X]=j,++L!==E||N||(N=!0,n.resolve(O,A))},function(j){N||(N=!0,n.reject(O,j))})}},w.race=function(f){var k=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=f.length,N=!1;if(!E)return this.resolve([]);for(var A=-1,L=new this(o);++A<E;)I=f[A],k.resolve(I).then(function(O){N||(N=!0,n.resolve(L,O))},function(O){N||(N=!0,n.reject(L,O))});var I;return L}},{immediate:36}],38:[function(r,m,u){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),m.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,m,u){var i=r("./zlib/deflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/messages"),h=r("./zlib/zstream"),p=Object.prototype.toString,w=0,y=-1,c=0,x=8;function d(f){if(!(this instanceof d))return new d(f);this.options=o.assign({level:y,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},f||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var E=i.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(E!==w)throw new Error(l[E]);if(k.header&&i.deflateSetHeader(this.strm,k.header),k.dictionary){var N;if(N=typeof k.dictionary=="string"?n.string2buf(k.dictionary):p.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(E=i.deflateSetDictionary(this.strm,N))!==w)throw new Error(l[E]);this._dict_set=!0}}function v(f,k){var E=new d(k);if(E.push(f,!0),E.err)throw E.msg||l[E.err];return E.result}d.prototype.push=function(f,k){var E,N,A=this.strm,L=this.options.chunkSize;if(this.ended)return!1;N=k===~~k?k:k===!0?4:0,typeof f=="string"?A.input=n.string2buf(f):p.call(f)==="[object ArrayBuffer]"?A.input=new Uint8Array(f):A.input=f,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&&(A.output=new o.Buf8(L),A.next_out=0,A.avail_out=L),(E=i.deflate(A,N))!==1&&E!==w)return this.onEnd(E),!(this.ended=!0);A.avail_out!==0&&(A.avail_in!==0||N!==4&&N!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(o.shrinkBuf(A.output,A.next_out))):this.onData(o.shrinkBuf(A.output,A.next_out)))}while((0<A.avail_in||A.avail_out===0)&&E!==1);return N===4?(E=i.deflateEnd(this.strm),this.onEnd(E),this.ended=!0,E===w):N!==2||(this.onEnd(w),!(A.avail_out=0))},d.prototype.onData=function(f){this.chunks.push(f)},d.prototype.onEnd=function(f){f===w&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},u.Deflate=d,u.deflate=v,u.deflateRaw=function(f,k){return(k=k||{}).raw=!0,v(f,k)},u.gzip=function(f,k){return(k=k||{}).gzip=!0,v(f,k)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,m,u){var i=r("./zlib/inflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/constants"),h=r("./zlib/messages"),p=r("./zlib/zstream"),w=r("./zlib/gzheader"),y=Object.prototype.toString;function c(d){if(!(this instanceof c))return new c(d);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},d||{});var v=this.options;v.raw&&0<=v.windowBits&&v.windowBits<16&&(v.windowBits=-v.windowBits,v.windowBits===0&&(v.windowBits=-15)),!(0<=v.windowBits&&v.windowBits<16)||d&&d.windowBits||(v.windowBits+=32),15<v.windowBits&&v.windowBits<48&&(15&v.windowBits)==0&&(v.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var f=i.inflateInit2(this.strm,v.windowBits);if(f!==l.Z_OK)throw new Error(h[f]);this.header=new w,i.inflateGetHeader(this.strm,this.header)}function x(d,v){var f=new c(v);if(f.push(d,!0),f.err)throw f.msg||h[f.err];return f.result}c.prototype.push=function(d,v){var f,k,E,N,A,L,I=this.strm,O=this.options.chunkSize,T=this.options.dictionary,B=!1;if(this.ended)return!1;k=v===~~v?v:v===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof d=="string"?I.input=n.binstring2buf(d):y.call(d)==="[object ArrayBuffer]"?I.input=new Uint8Array(d):I.input=d,I.next_in=0,I.avail_in=I.input.length;do{if(I.avail_out===0&&(I.output=new o.Buf8(O),I.next_out=0,I.avail_out=O),(f=i.inflate(I,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&T&&(L=typeof T=="string"?n.string2buf(T):y.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,f=i.inflateSetDictionary(this.strm,L)),f===l.Z_BUF_ERROR&&B===!0&&(f=l.Z_OK,B=!1),f!==l.Z_STREAM_END&&f!==l.Z_OK)return this.onEnd(f),!(this.ended=!0);I.next_out&&(I.avail_out!==0&&f!==l.Z_STREAM_END&&(I.avail_in!==0||k!==l.Z_FINISH&&k!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(E=n.utf8border(I.output,I.next_out),N=I.next_out-E,A=n.buf2string(I.output,E),I.next_out=N,I.avail_out=O-N,N&&o.arraySet(I.output,I.output,E,N,0),this.onData(A)):this.onData(o.shrinkBuf(I.output,I.next_out)))),I.avail_in===0&&I.avail_out===0&&(B=!0)}while((0<I.avail_in||I.avail_out===0)&&f!==l.Z_STREAM_END);return f===l.Z_STREAM_END&&(k=l.Z_FINISH),k===l.Z_FINISH?(f=i.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===l.Z_OK):k!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(I.avail_out=0))},c.prototype.onData=function(d){this.chunks.push(d)},c.prototype.onEnd=function(d){d===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=d,this.msg=this.strm.msg},u.Inflate=c,u.inflate=x,u.inflateRaw=function(d,v){return(v=v||{}).raw=!0,x(d,v)},u.ungzip=x},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(l){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var p=h.shift();if(p){if(typeof p!="object")throw new TypeError(p+"must be non-object");for(var w in p)p.hasOwnProperty(w)&&(l[w]=p[w])}}return l},u.shrinkBuf=function(l,h){return l.length===h?l:l.subarray?l.subarray(0,h):(l.length=h,l)};var o={arraySet:function(l,h,p,w,y){if(h.subarray&&l.subarray)l.set(h.subarray(p,p+w),y);else for(var c=0;c<w;c++)l[y+c]=h[p+c]},flattenChunks:function(l){var h,p,w,y,c,x;for(h=w=0,p=l.length;h<p;h++)w+=l[h].length;for(x=new Uint8Array(w),h=y=0,p=l.length;h<p;h++)c=l[h],x.set(c,y),y+=c.length;return x}},n={arraySet:function(l,h,p,w,y){for(var c=0;c<w;c++)l[y+c]=h[p+c]},flattenChunks:function(l){return[].concat.apply([],l)}};u.setTyped=function(l){l?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,o)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,n))},u.setTyped(i)},{}],42:[function(r,m,u){var i=r("./common"),o=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var l=new i.Buf8(256),h=0;h<256;h++)l[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function p(w,y){if(y<65537&&(w.subarray&&n||!w.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(w,y));for(var c="",x=0;x<y;x++)c+=String.fromCharCode(w[x]);return c}l[254]=l[254]=1,u.string2buf=function(w){var y,c,x,d,v,f=w.length,k=0;for(d=0;d<f;d++)(64512&(c=w.charCodeAt(d)))==55296&&d+1<f&&(64512&(x=w.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(x-56320),d++),k+=c<128?1:c<2048?2:c<65536?3:4;for(y=new i.Buf8(k),d=v=0;v<k;d++)(64512&(c=w.charCodeAt(d)))==55296&&d+1<f&&(64512&(x=w.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(x-56320),d++),c<128?y[v++]=c:(c<2048?y[v++]=192|c>>>6:(c<65536?y[v++]=224|c>>>12:(y[v++]=240|c>>>18,y[v++]=128|c>>>12&63),y[v++]=128|c>>>6&63),y[v++]=128|63&c);return y},u.buf2binstring=function(w){return p(w,w.length)},u.binstring2buf=function(w){for(var y=new i.Buf8(w.length),c=0,x=y.length;c<x;c++)y[c]=w.charCodeAt(c);return y},u.buf2string=function(w,y){var c,x,d,v,f=y||w.length,k=new Array(2*f);for(c=x=0;c<f;)if((d=w[c++])<128)k[x++]=d;else if(4<(v=l[d]))k[x++]=65533,c+=v-1;else{for(d&=v===2?31:v===3?15:7;1<v&&c<f;)d=d<<6|63&w[c++],v--;1<v?k[x++]=65533:d<65536?k[x++]=d:(d-=65536,k[x++]=55296|d>>10&1023,k[x++]=56320|1023&d)}return p(k,x)},u.utf8border=function(w,y){var c;for((y=y||w.length)>w.length&&(y=w.length),c=y-1;0<=c&&(192&w[c])==128;)c--;return c<0||c===0?y:c+l[w[c]]>y?c:y}},{"./common":41}],43:[function(r,m,u){m.exports=function(i,o,n,l){for(var h=65535&i|0,p=i>>>16&65535|0,w=0;n!==0;){for(n-=w=2e3<n?2e3:n;p=p+(h=h+o[l++]|0)|0,--w;);h%=65521,p%=65521}return h|p<<16|0}},{}],44:[function(r,m,u){m.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,m,u){var i=(function(){for(var o,n=[],l=0;l<256;l++){o=l;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;n[l]=o}return n})();m.exports=function(o,n,l,h){var p=i,w=h+l;o^=-1;for(var y=h;y<w;y++)o=o>>>8^p[255&(o^n[y])];return-1^o}},{}],46:[function(r,m,u){var i,o=r("../utils/common"),n=r("./trees"),l=r("./adler32"),h=r("./crc32"),p=r("./messages"),w=0,y=4,c=0,x=-2,d=-1,v=4,f=2,k=8,E=9,N=286,A=30,L=19,I=2*N+1,O=15,T=3,B=258,X=B+T+1,j=42,P=113,s=1,R=2,ee=3,U=4;function H(t,Z){return t.msg=p[Z],Z}function $(t){return(t<<1)-(4<t?9:0)}function re(t){for(var Z=t.length;0<=--Z;)t[Z]=0}function z(t){var Z=t.state,F=Z.pending;F>t.avail_out&&(F=t.avail_out),F!==0&&(o.arraySet(t.output,Z.pending_buf,Z.pending_out,F,t.next_out),t.next_out+=F,Z.pending_out+=F,t.total_out+=F,t.avail_out-=F,Z.pending-=F,Z.pending===0&&(Z.pending_out=0))}function S(t,Z){n._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,Z),t.block_start=t.strstart,z(t.strm)}function J(t,Z){t.pending_buf[t.pending++]=Z}function K(t,Z){t.pending_buf[t.pending++]=Z>>>8&255,t.pending_buf[t.pending++]=255&Z}function Q(t,Z){var F,b,g=t.max_chain_length,C=t.strstart,M=t.prev_length,G=t.nice_match,D=t.strstart>t.w_size-X?t.strstart-(t.w_size-X):0,Y=t.window,oe=t.w_mask,V=t.prev,W=t.strstart+B,te=Y[C+M-1],ne=Y[C+M];t.prev_length>=t.good_match&&(g>>=2),G>t.lookahead&&(G=t.lookahead);do if(Y[(F=Z)+M]===ne&&Y[F+M-1]===te&&Y[F]===Y[C]&&Y[++F]===Y[C+1]){C+=2,F++;do;while(Y[++C]===Y[++F]&&Y[++C]===Y[++F]&&Y[++C]===Y[++F]&&Y[++C]===Y[++F]&&Y[++C]===Y[++F]&&Y[++C]===Y[++F]&&Y[++C]===Y[++F]&&Y[++C]===Y[++F]&&C<W);if(b=B-(W-C),C=W-B,M<b){if(t.match_start=Z,G<=(M=b))break;te=Y[C+M-1],ne=Y[C+M]}}while((Z=V[Z&oe])>D&&--g!=0);return M<=t.lookahead?M:t.lookahead}function fe(t){var Z,F,b,g,C,M,G,D,Y,oe,V=t.w_size;do{if(g=t.window_size-t.lookahead-t.strstart,t.strstart>=V+(V-X)){for(o.arraySet(t.window,t.window,V,V,0),t.match_start-=V,t.strstart-=V,t.block_start-=V,Z=F=t.hash_size;b=t.head[--Z],t.head[Z]=V<=b?b-V:0,--F;);for(Z=F=V;b=t.prev[--Z],t.prev[Z]=V<=b?b-V:0,--F;);g+=V}if(t.strm.avail_in===0)break;if(M=t.strm,G=t.window,D=t.strstart+t.lookahead,Y=g,oe=void 0,oe=M.avail_in,Y<oe&&(oe=Y),F=oe===0?0:(M.avail_in-=oe,o.arraySet(G,M.input,M.next_in,oe,D),M.state.wrap===1?M.adler=l(M.adler,G,oe,D):M.state.wrap===2&&(M.adler=h(M.adler,G,oe,D)),M.next_in+=oe,M.total_in+=oe,oe),t.lookahead+=F,t.lookahead+t.insert>=T)for(C=t.strstart-t.insert,t.ins_h=t.window[C],t.ins_h=(t.ins_h<<t.hash_shift^t.window[C+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[C+T-1])&t.hash_mask,t.prev[C&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=C,C++,t.insert--,!(t.lookahead+t.insert<T)););}while(t.lookahead<X&&t.strm.avail_in!==0)}function se(t,Z){for(var F,b;;){if(t.lookahead<X){if(fe(t),t.lookahead<X&&Z===w)return s;if(t.lookahead===0)break}if(F=0,t.lookahead>=T&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,F=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),F!==0&&t.strstart-F<=t.w_size-X&&(t.match_length=Q(t,F)),t.match_length>=T)if(b=n._tr_tally(t,t.strstart-t.match_start,t.match_length-T),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=T){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,F=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,--t.match_length!=0;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else b=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(b&&(S(t,!1),t.strm.avail_out===0))return s}return t.insert=t.strstart<T-1?t.strstart:T-1,Z===y?(S(t,!0),t.strm.avail_out===0?ee:U):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?s:R}function le(t,Z){for(var F,b,g;;){if(t.lookahead<X){if(fe(t),t.lookahead<X&&Z===w)return s;if(t.lookahead===0)break}if(F=0,t.lookahead>=T&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,F=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=T-1,F!==0&&t.prev_length<t.max_lazy_match&&t.strstart-F<=t.w_size-X&&(t.match_length=Q(t,F),t.match_length<=5&&(t.strategy===1||t.match_length===T&&4096<t.strstart-t.match_start)&&(t.match_length=T-1)),t.prev_length>=T&&t.match_length<=t.prev_length){for(g=t.strstart+t.lookahead-T,b=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-T),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=g&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,F=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),--t.prev_length!=0;);if(t.match_available=0,t.match_length=T-1,t.strstart++,b&&(S(t,!1),t.strm.avail_out===0))return s}else if(t.match_available){if((b=n._tr_tally(t,0,t.window[t.strstart-1]))&&S(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return s}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(b=n._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<T-1?t.strstart:T-1,Z===y?(S(t,!0),t.strm.avail_out===0?ee:U):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?s:R}function ce(t,Z,F,b,g){this.good_length=t,this.max_lazy=Z,this.nice_length=F,this.max_chain=b,this.func=g}function ge(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=k,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*I),this.dyn_dtree=new o.Buf16(2*(2*A+1)),this.bl_tree=new o.Buf16(2*(2*L+1)),re(this.dyn_ltree),re(this.dyn_dtree),re(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(O+1),this.heap=new o.Buf16(2*N+1),re(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*N+1),re(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function pe(t){var Z;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=f,(Z=t.state).pending=0,Z.pending_out=0,Z.wrap<0&&(Z.wrap=-Z.wrap),Z.status=Z.wrap?j:P,t.adler=Z.wrap===2?0:1,Z.last_flush=w,n._tr_init(Z),c):H(t,x)}function _e(t){var Z=pe(t);return Z===c&&(function(F){F.window_size=2*F.w_size,re(F.head),F.max_lazy_match=i[F.level].max_lazy,F.good_match=i[F.level].good_length,F.nice_match=i[F.level].nice_length,F.max_chain_length=i[F.level].max_chain,F.strstart=0,F.block_start=0,F.lookahead=0,F.insert=0,F.match_length=F.prev_length=T-1,F.match_available=0,F.ins_h=0})(t.state),Z}function je(t,Z,F,b,g,C){if(!t)return x;var M=1;if(Z===d&&(Z=6),b<0?(M=0,b=-b):15<b&&(M=2,b-=16),g<1||E<g||F!==k||b<8||15<b||Z<0||9<Z||C<0||v<C)return H(t,x);b===8&&(b=9);var G=new ge;return(t.state=G).strm=t,G.wrap=M,G.gzhead=null,G.w_bits=b,G.w_size=1<<G.w_bits,G.w_mask=G.w_size-1,G.hash_bits=g+7,G.hash_size=1<<G.hash_bits,G.hash_mask=G.hash_size-1,G.hash_shift=~~((G.hash_bits+T-1)/T),G.window=new o.Buf8(2*G.w_size),G.head=new o.Buf16(G.hash_size),G.prev=new o.Buf16(G.w_size),G.lit_bufsize=1<<g+6,G.pending_buf_size=4*G.lit_bufsize,G.pending_buf=new o.Buf8(G.pending_buf_size),G.d_buf=1*G.lit_bufsize,G.l_buf=3*G.lit_bufsize,G.level=Z,G.strategy=C,G.method=F,_e(t)}i=[new ce(0,0,0,0,function(t,Z){var F=65535;for(F>t.pending_buf_size-5&&(F=t.pending_buf_size-5);;){if(t.lookahead<=1){if(fe(t),t.lookahead===0&&Z===w)return s;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var b=t.block_start+F;if((t.strstart===0||t.strstart>=b)&&(t.lookahead=t.strstart-b,t.strstart=b,S(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-X&&(S(t,!1),t.strm.avail_out===0))return s}return t.insert=0,Z===y?(S(t,!0),t.strm.avail_out===0?ee:U):(t.strstart>t.block_start&&(S(t,!1),t.strm.avail_out),s)}),new ce(4,4,8,4,se),new ce(4,5,16,8,se),new ce(4,6,32,32,se),new ce(4,4,16,16,le),new ce(8,16,32,32,le),new ce(8,16,128,128,le),new ce(8,32,128,256,le),new ce(32,128,258,1024,le),new ce(32,258,258,4096,le)],u.deflateInit=function(t,Z){return je(t,Z,k,15,8,0)},u.deflateInit2=je,u.deflateReset=_e,u.deflateResetKeep=pe,u.deflateSetHeader=function(t,Z){return t&&t.state?t.state.wrap!==2?x:(t.state.gzhead=Z,c):x},u.deflate=function(t,Z){var F,b,g,C;if(!t||!t.state||5<Z||Z<0)return t?H(t,x):x;if(b=t.state,!t.output||!t.input&&t.avail_in!==0||b.status===666&&Z!==y)return H(t,t.avail_out===0?-5:x);if(b.strm=t,F=b.last_flush,b.last_flush=Z,b.status===j)if(b.wrap===2)t.adler=0,J(b,31),J(b,139),J(b,8),b.gzhead?(J(b,(b.gzhead.text?1:0)+(b.gzhead.hcrc?2:0)+(b.gzhead.extra?4:0)+(b.gzhead.name?8:0)+(b.gzhead.comment?16:0)),J(b,255&b.gzhead.time),J(b,b.gzhead.time>>8&255),J(b,b.gzhead.time>>16&255),J(b,b.gzhead.time>>24&255),J(b,b.level===9?2:2<=b.strategy||b.level<2?4:0),J(b,255&b.gzhead.os),b.gzhead.extra&&b.gzhead.extra.length&&(J(b,255&b.gzhead.extra.length),J(b,b.gzhead.extra.length>>8&255)),b.gzhead.hcrc&&(t.adler=h(t.adler,b.pending_buf,b.pending,0)),b.gzindex=0,b.status=69):(J(b,0),J(b,0),J(b,0),J(b,0),J(b,0),J(b,b.level===9?2:2<=b.strategy||b.level<2?4:0),J(b,3),b.status=P);else{var M=k+(b.w_bits-8<<4)<<8;M|=(2<=b.strategy||b.level<2?0:b.level<6?1:b.level===6?2:3)<<6,b.strstart!==0&&(M|=32),M+=31-M%31,b.status=P,K(b,M),b.strstart!==0&&(K(b,t.adler>>>16),K(b,65535&t.adler)),t.adler=1}if(b.status===69)if(b.gzhead.extra){for(g=b.pending;b.gzindex<(65535&b.gzhead.extra.length)&&(b.pending!==b.pending_buf_size||(b.gzhead.hcrc&&b.pending>g&&(t.adler=h(t.adler,b.pending_buf,b.pending-g,g)),z(t),g=b.pending,b.pending!==b.pending_buf_size));)J(b,255&b.gzhead.extra[b.gzindex]),b.gzindex++;b.gzhead.hcrc&&b.pending>g&&(t.adler=h(t.adler,b.pending_buf,b.pending-g,g)),b.gzindex===b.gzhead.extra.length&&(b.gzindex=0,b.status=73)}else b.status=73;if(b.status===73)if(b.gzhead.name){g=b.pending;do{if(b.pending===b.pending_buf_size&&(b.gzhead.hcrc&&b.pending>g&&(t.adler=h(t.adler,b.pending_buf,b.pending-g,g)),z(t),g=b.pending,b.pending===b.pending_buf_size)){C=1;break}C=b.gzindex<b.gzhead.name.length?255&b.gzhead.name.charCodeAt(b.gzindex++):0,J(b,C)}while(C!==0);b.gzhead.hcrc&&b.pending>g&&(t.adler=h(t.adler,b.pending_buf,b.pending-g,g)),C===0&&(b.gzindex=0,b.status=91)}else b.status=91;if(b.status===91)if(b.gzhead.comment){g=b.pending;do{if(b.pending===b.pending_buf_size&&(b.gzhead.hcrc&&b.pending>g&&(t.adler=h(t.adler,b.pending_buf,b.pending-g,g)),z(t),g=b.pending,b.pending===b.pending_buf_size)){C=1;break}C=b.gzindex<b.gzhead.comment.length?255&b.gzhead.comment.charCodeAt(b.gzindex++):0,J(b,C)}while(C!==0);b.gzhead.hcrc&&b.pending>g&&(t.adler=h(t.adler,b.pending_buf,b.pending-g,g)),C===0&&(b.status=103)}else b.status=103;if(b.status===103&&(b.gzhead.hcrc?(b.pending+2>b.pending_buf_size&&z(t),b.pending+2<=b.pending_buf_size&&(J(b,255&t.adler),J(b,t.adler>>8&255),t.adler=0,b.status=P)):b.status=P),b.pending!==0){if(z(t),t.avail_out===0)return b.last_flush=-1,c}else if(t.avail_in===0&&$(Z)<=$(F)&&Z!==y)return H(t,-5);if(b.status===666&&t.avail_in!==0)return H(t,-5);if(t.avail_in!==0||b.lookahead!==0||Z!==w&&b.status!==666){var G=b.strategy===2?(function(D,Y){for(var oe;;){if(D.lookahead===0&&(fe(D),D.lookahead===0)){if(Y===w)return s;break}if(D.match_length=0,oe=n._tr_tally(D,0,D.window[D.strstart]),D.lookahead--,D.strstart++,oe&&(S(D,!1),D.strm.avail_out===0))return s}return D.insert=0,Y===y?(S(D,!0),D.strm.avail_out===0?ee:U):D.last_lit&&(S(D,!1),D.strm.avail_out===0)?s:R})(b,Z):b.strategy===3?(function(D,Y){for(var oe,V,W,te,ne=D.window;;){if(D.lookahead<=B){if(fe(D),D.lookahead<=B&&Y===w)return s;if(D.lookahead===0)break}if(D.match_length=0,D.lookahead>=T&&0<D.strstart&&(V=ne[W=D.strstart-1])===ne[++W]&&V===ne[++W]&&V===ne[++W]){te=D.strstart+B;do;while(V===ne[++W]&&V===ne[++W]&&V===ne[++W]&&V===ne[++W]&&V===ne[++W]&&V===ne[++W]&&V===ne[++W]&&V===ne[++W]&&W<te);D.match_length=B-(te-W),D.match_length>D.lookahead&&(D.match_length=D.lookahead)}if(D.match_length>=T?(oe=n._tr_tally(D,1,D.match_length-T),D.lookahead-=D.match_length,D.strstart+=D.match_length,D.match_length=0):(oe=n._tr_tally(D,0,D.window[D.strstart]),D.lookahead--,D.strstart++),oe&&(S(D,!1),D.strm.avail_out===0))return s}return D.insert=0,Y===y?(S(D,!0),D.strm.avail_out===0?ee:U):D.last_lit&&(S(D,!1),D.strm.avail_out===0)?s:R})(b,Z):i[b.level].func(b,Z);if(G!==ee&&G!==U||(b.status=666),G===s||G===ee)return t.avail_out===0&&(b.last_flush=-1),c;if(G===R&&(Z===1?n._tr_align(b):Z!==5&&(n._tr_stored_block(b,0,0,!1),Z===3&&(re(b.head),b.lookahead===0&&(b.strstart=0,b.block_start=0,b.insert=0))),z(t),t.avail_out===0))return b.last_flush=-1,c}return Z!==y?c:b.wrap<=0?1:(b.wrap===2?(J(b,255&t.adler),J(b,t.adler>>8&255),J(b,t.adler>>16&255),J(b,t.adler>>24&255),J(b,255&t.total_in),J(b,t.total_in>>8&255),J(b,t.total_in>>16&255),J(b,t.total_in>>24&255)):(K(b,t.adler>>>16),K(b,65535&t.adler)),z(t),0<b.wrap&&(b.wrap=-b.wrap),b.pending!==0?c:1)},u.deflateEnd=function(t){var Z;return t&&t.state?(Z=t.state.status)!==j&&Z!==69&&Z!==73&&Z!==91&&Z!==103&&Z!==P&&Z!==666?H(t,x):(t.state=null,Z===P?H(t,-3):c):x},u.deflateSetDictionary=function(t,Z){var F,b,g,C,M,G,D,Y,oe=Z.length;if(!t||!t.state||(C=(F=t.state).wrap)===2||C===1&&F.status!==j||F.lookahead)return x;for(C===1&&(t.adler=l(t.adler,Z,oe,0)),F.wrap=0,oe>=F.w_size&&(C===0&&(re(F.head),F.strstart=0,F.block_start=0,F.insert=0),Y=new o.Buf8(F.w_size),o.arraySet(Y,Z,oe-F.w_size,F.w_size,0),Z=Y,oe=F.w_size),M=t.avail_in,G=t.next_in,D=t.input,t.avail_in=oe,t.next_in=0,t.input=Z,fe(F);F.lookahead>=T;){for(b=F.strstart,g=F.lookahead-(T-1);F.ins_h=(F.ins_h<<F.hash_shift^F.window[b+T-1])&F.hash_mask,F.prev[b&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=b,b++,--g;);F.strstart=b,F.lookahead=T-1,fe(F)}return F.strstart+=F.lookahead,F.block_start=F.strstart,F.insert=F.lookahead,F.lookahead=0,F.match_length=F.prev_length=T-1,F.match_available=0,t.next_in=G,t.input=D,t.avail_in=M,F.wrap=C,c},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,m,u){m.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,m,u){m.exports=function(i,o){var n,l,h,p,w,y,c,x,d,v,f,k,E,N,A,L,I,O,T,B,X,j,P,s,R;n=i.state,l=i.next_in,s=i.input,h=l+(i.avail_in-5),p=i.next_out,R=i.output,w=p-(o-i.avail_out),y=p+(i.avail_out-257),c=n.dmax,x=n.wsize,d=n.whave,v=n.wnext,f=n.window,k=n.hold,E=n.bits,N=n.lencode,A=n.distcode,L=(1<<n.lenbits)-1,I=(1<<n.distbits)-1;e:do{E<15&&(k+=s[l++]<<E,E+=8,k+=s[l++]<<E,E+=8),O=N[k&L];t:for(;;){if(k>>>=T=O>>>24,E-=T,(T=O>>>16&255)===0)R[p++]=65535&O;else{if(!(16&T)){if((64&T)==0){O=N[(65535&O)+(k&(1<<T)-1)];continue t}if(32&T){n.mode=12;break e}i.msg="invalid literal/length code",n.mode=30;break e}B=65535&O,(T&=15)&&(E<T&&(k+=s[l++]<<E,E+=8),B+=k&(1<<T)-1,k>>>=T,E-=T),E<15&&(k+=s[l++]<<E,E+=8,k+=s[l++]<<E,E+=8),O=A[k&I];r:for(;;){if(k>>>=T=O>>>24,E-=T,!(16&(T=O>>>16&255))){if((64&T)==0){O=A[(65535&O)+(k&(1<<T)-1)];continue r}i.msg="invalid distance code",n.mode=30;break e}if(X=65535&O,E<(T&=15)&&(k+=s[l++]<<E,(E+=8)<T&&(k+=s[l++]<<E,E+=8)),c<(X+=k&(1<<T)-1)){i.msg="invalid distance too far back",n.mode=30;break e}if(k>>>=T,E-=T,(T=p-w)<X){if(d<(T=X-T)&&n.sane){i.msg="invalid distance too far back",n.mode=30;break e}if(P=f,(j=0)===v){if(j+=x-T,T<B){for(B-=T;R[p++]=f[j++],--T;);j=p-X,P=R}}else if(v<T){if(j+=x+v-T,(T-=v)<B){for(B-=T;R[p++]=f[j++],--T;);if(j=0,v<B){for(B-=T=v;R[p++]=f[j++],--T;);j=p-X,P=R}}}else if(j+=v-T,T<B){for(B-=T;R[p++]=f[j++],--T;);j=p-X,P=R}for(;2<B;)R[p++]=P[j++],R[p++]=P[j++],R[p++]=P[j++],B-=3;B&&(R[p++]=P[j++],1<B&&(R[p++]=P[j++]))}else{for(j=p-X;R[p++]=R[j++],R[p++]=R[j++],R[p++]=R[j++],2<(B-=3););B&&(R[p++]=R[j++],1<B&&(R[p++]=R[j++]))}break}}break}}while(l<h&&p<y);l-=B=E>>3,k&=(1<<(E-=B<<3))-1,i.next_in=l,i.next_out=p,i.avail_in=l<h?h-l+5:5-(l-h),i.avail_out=p<y?y-p+257:257-(p-y),n.hold=k,n.bits=E}},{}],49:[function(r,m,u){var i=r("../utils/common"),o=r("./adler32"),n=r("./crc32"),l=r("./inffast"),h=r("./inftrees"),p=1,w=2,y=0,c=-2,x=1,d=852,v=592;function f(j){return(j>>>24&255)+(j>>>8&65280)+((65280&j)<<8)+((255&j)<<24)}function k(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(j){var P;return j&&j.state?(P=j.state,j.total_in=j.total_out=P.total=0,j.msg="",P.wrap&&(j.adler=1&P.wrap),P.mode=x,P.last=0,P.havedict=0,P.dmax=32768,P.head=null,P.hold=0,P.bits=0,P.lencode=P.lendyn=new i.Buf32(d),P.distcode=P.distdyn=new i.Buf32(v),P.sane=1,P.back=-1,y):c}function N(j){var P;return j&&j.state?((P=j.state).wsize=0,P.whave=0,P.wnext=0,E(j)):c}function A(j,P){var s,R;return j&&j.state?(R=j.state,P<0?(s=0,P=-P):(s=1+(P>>4),P<48&&(P&=15)),P&&(P<8||15<P)?c:(R.window!==null&&R.wbits!==P&&(R.window=null),R.wrap=s,R.wbits=P,N(j))):c}function L(j,P){var s,R;return j?(R=new k,(j.state=R).window=null,(s=A(j,P))!==y&&(j.state=null),s):c}var I,O,T=!0;function B(j){if(T){var P;for(I=new i.Buf32(512),O=new i.Buf32(32),P=0;P<144;)j.lens[P++]=8;for(;P<256;)j.lens[P++]=9;for(;P<280;)j.lens[P++]=7;for(;P<288;)j.lens[P++]=8;for(h(p,j.lens,0,288,I,0,j.work,{bits:9}),P=0;P<32;)j.lens[P++]=5;h(w,j.lens,0,32,O,0,j.work,{bits:5}),T=!1}j.lencode=I,j.lenbits=9,j.distcode=O,j.distbits=5}function X(j,P,s,R){var ee,U=j.state;return U.window===null&&(U.wsize=1<<U.wbits,U.wnext=0,U.whave=0,U.window=new i.Buf8(U.wsize)),R>=U.wsize?(i.arraySet(U.window,P,s-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(R<(ee=U.wsize-U.wnext)&&(ee=R),i.arraySet(U.window,P,s-R,ee,U.wnext),(R-=ee)?(i.arraySet(U.window,P,s-R,R,0),U.wnext=R,U.whave=U.wsize):(U.wnext+=ee,U.wnext===U.wsize&&(U.wnext=0),U.whave<U.wsize&&(U.whave+=ee))),0}u.inflateReset=N,u.inflateReset2=A,u.inflateResetKeep=E,u.inflateInit=function(j){return L(j,15)},u.inflateInit2=L,u.inflate=function(j,P){var s,R,ee,U,H,$,re,z,S,J,K,Q,fe,se,le,ce,ge,pe,_e,je,t,Z,F,b,g=0,C=new i.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!j||!j.state||!j.output||!j.input&&j.avail_in!==0)return c;(s=j.state).mode===12&&(s.mode=13),H=j.next_out,ee=j.output,re=j.avail_out,U=j.next_in,R=j.input,$=j.avail_in,z=s.hold,S=s.bits,J=$,K=re,Z=y;e:for(;;)switch(s.mode){case x:if(s.wrap===0){s.mode=13;break}for(;S<16;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if(2&s.wrap&&z===35615){C[s.check=0]=255&z,C[1]=z>>>8&255,s.check=n(s.check,C,2,0),S=z=0,s.mode=2;break}if(s.flags=0,s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&z)<<8)+(z>>8))%31){j.msg="incorrect header check",s.mode=30;break}if((15&z)!=8){j.msg="unknown compression method",s.mode=30;break}if(S-=4,t=8+(15&(z>>>=4)),s.wbits===0)s.wbits=t;else if(t>s.wbits){j.msg="invalid window size",s.mode=30;break}s.dmax=1<<t,j.adler=s.check=1,s.mode=512&z?10:12,S=z=0;break;case 2:for(;S<16;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if(s.flags=z,(255&s.flags)!=8){j.msg="unknown compression method",s.mode=30;break}if(57344&s.flags){j.msg="unknown header flags set",s.mode=30;break}s.head&&(s.head.text=z>>8&1),512&s.flags&&(C[0]=255&z,C[1]=z>>>8&255,s.check=n(s.check,C,2,0)),S=z=0,s.mode=3;case 3:for(;S<32;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}s.head&&(s.head.time=z),512&s.flags&&(C[0]=255&z,C[1]=z>>>8&255,C[2]=z>>>16&255,C[3]=z>>>24&255,s.check=n(s.check,C,4,0)),S=z=0,s.mode=4;case 4:for(;S<16;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}s.head&&(s.head.xflags=255&z,s.head.os=z>>8),512&s.flags&&(C[0]=255&z,C[1]=z>>>8&255,s.check=n(s.check,C,2,0)),S=z=0,s.mode=5;case 5:if(1024&s.flags){for(;S<16;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}s.length=z,s.head&&(s.head.extra_len=z),512&s.flags&&(C[0]=255&z,C[1]=z>>>8&255,s.check=n(s.check,C,2,0)),S=z=0}else s.head&&(s.head.extra=null);s.mode=6;case 6:if(1024&s.flags&&($<(Q=s.length)&&(Q=$),Q&&(s.head&&(t=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Array(s.head.extra_len)),i.arraySet(s.head.extra,R,U,Q,t)),512&s.flags&&(s.check=n(s.check,R,Q,U)),$-=Q,U+=Q,s.length-=Q),s.length))break e;s.length=0,s.mode=7;case 7:if(2048&s.flags){if($===0)break e;for(Q=0;t=R[U+Q++],s.head&&t&&s.length<65536&&(s.head.name+=String.fromCharCode(t)),t&&Q<$;);if(512&s.flags&&(s.check=n(s.check,R,Q,U)),$-=Q,U+=Q,t)break e}else s.head&&(s.head.name=null);s.length=0,s.mode=8;case 8:if(4096&s.flags){if($===0)break e;for(Q=0;t=R[U+Q++],s.head&&t&&s.length<65536&&(s.head.comment+=String.fromCharCode(t)),t&&Q<$;);if(512&s.flags&&(s.check=n(s.check,R,Q,U)),$-=Q,U+=Q,t)break e}else s.head&&(s.head.comment=null);s.mode=9;case 9:if(512&s.flags){for(;S<16;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if(z!==(65535&s.check)){j.msg="header crc mismatch",s.mode=30;break}S=z=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),j.adler=s.check=0,s.mode=12;break;case 10:for(;S<32;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}j.adler=s.check=f(z),S=z=0,s.mode=11;case 11:if(s.havedict===0)return j.next_out=H,j.avail_out=re,j.next_in=U,j.avail_in=$,s.hold=z,s.bits=S,2;j.adler=s.check=1,s.mode=12;case 12:if(P===5||P===6)break e;case 13:if(s.last){z>>>=7&S,S-=7&S,s.mode=27;break}for(;S<3;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}switch(s.last=1&z,S-=1,3&(z>>>=1)){case 0:s.mode=14;break;case 1:if(B(s),s.mode=20,P!==6)break;z>>>=2,S-=2;break e;case 2:s.mode=17;break;case 3:j.msg="invalid block type",s.mode=30}z>>>=2,S-=2;break;case 14:for(z>>>=7&S,S-=7&S;S<32;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if((65535&z)!=(z>>>16^65535)){j.msg="invalid stored block lengths",s.mode=30;break}if(s.length=65535&z,S=z=0,s.mode=15,P===6)break e;case 15:s.mode=16;case 16:if(Q=s.length){if($<Q&&(Q=$),re<Q&&(Q=re),Q===0)break e;i.arraySet(ee,R,U,Q,H),$-=Q,U+=Q,re-=Q,H+=Q,s.length-=Q;break}s.mode=12;break;case 17:for(;S<14;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if(s.nlen=257+(31&z),z>>>=5,S-=5,s.ndist=1+(31&z),z>>>=5,S-=5,s.ncode=4+(15&z),z>>>=4,S-=4,286<s.nlen||30<s.ndist){j.msg="too many length or distance symbols",s.mode=30;break}s.have=0,s.mode=18;case 18:for(;s.have<s.ncode;){for(;S<3;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}s.lens[M[s.have++]]=7&z,z>>>=3,S-=3}for(;s.have<19;)s.lens[M[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,F={bits:s.lenbits},Z=h(0,s.lens,0,19,s.lencode,0,s.work,F),s.lenbits=F.bits,Z){j.msg="invalid code lengths set",s.mode=30;break}s.have=0,s.mode=19;case 19:for(;s.have<s.nlen+s.ndist;){for(;ce=(g=s.lencode[z&(1<<s.lenbits)-1])>>>16&255,ge=65535&g,!((le=g>>>24)<=S);){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if(ge<16)z>>>=le,S-=le,s.lens[s.have++]=ge;else{if(ge===16){for(b=le+2;S<b;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if(z>>>=le,S-=le,s.have===0){j.msg="invalid bit length repeat",s.mode=30;break}t=s.lens[s.have-1],Q=3+(3&z),z>>>=2,S-=2}else if(ge===17){for(b=le+3;S<b;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}S-=le,t=0,Q=3+(7&(z>>>=le)),z>>>=3,S-=3}else{for(b=le+7;S<b;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}S-=le,t=0,Q=11+(127&(z>>>=le)),z>>>=7,S-=7}if(s.have+Q>s.nlen+s.ndist){j.msg="invalid bit length repeat",s.mode=30;break}for(;Q--;)s.lens[s.have++]=t}}if(s.mode===30)break;if(s.lens[256]===0){j.msg="invalid code -- missing end-of-block",s.mode=30;break}if(s.lenbits=9,F={bits:s.lenbits},Z=h(p,s.lens,0,s.nlen,s.lencode,0,s.work,F),s.lenbits=F.bits,Z){j.msg="invalid literal/lengths set",s.mode=30;break}if(s.distbits=6,s.distcode=s.distdyn,F={bits:s.distbits},Z=h(w,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,F),s.distbits=F.bits,Z){j.msg="invalid distances set",s.mode=30;break}if(s.mode=20,P===6)break e;case 20:s.mode=21;case 21:if(6<=$&&258<=re){j.next_out=H,j.avail_out=re,j.next_in=U,j.avail_in=$,s.hold=z,s.bits=S,l(j,K),H=j.next_out,ee=j.output,re=j.avail_out,U=j.next_in,R=j.input,$=j.avail_in,z=s.hold,S=s.bits,s.mode===12&&(s.back=-1);break}for(s.back=0;ce=(g=s.lencode[z&(1<<s.lenbits)-1])>>>16&255,ge=65535&g,!((le=g>>>24)<=S);){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if(ce&&(240&ce)==0){for(pe=le,_e=ce,je=ge;ce=(g=s.lencode[je+((z&(1<<pe+_e)-1)>>pe)])>>>16&255,ge=65535&g,!(pe+(le=g>>>24)<=S);){if($===0)break e;$--,z+=R[U++]<<S,S+=8}z>>>=pe,S-=pe,s.back+=pe}if(z>>>=le,S-=le,s.back+=le,s.length=ge,ce===0){s.mode=26;break}if(32&ce){s.back=-1,s.mode=12;break}if(64&ce){j.msg="invalid literal/length code",s.mode=30;break}s.extra=15&ce,s.mode=22;case 22:if(s.extra){for(b=s.extra;S<b;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}s.length+=z&(1<<s.extra)-1,z>>>=s.extra,S-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=23;case 23:for(;ce=(g=s.distcode[z&(1<<s.distbits)-1])>>>16&255,ge=65535&g,!((le=g>>>24)<=S);){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if((240&ce)==0){for(pe=le,_e=ce,je=ge;ce=(g=s.distcode[je+((z&(1<<pe+_e)-1)>>pe)])>>>16&255,ge=65535&g,!(pe+(le=g>>>24)<=S);){if($===0)break e;$--,z+=R[U++]<<S,S+=8}z>>>=pe,S-=pe,s.back+=pe}if(z>>>=le,S-=le,s.back+=le,64&ce){j.msg="invalid distance code",s.mode=30;break}s.offset=ge,s.extra=15&ce,s.mode=24;case 24:if(s.extra){for(b=s.extra;S<b;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}s.offset+=z&(1<<s.extra)-1,z>>>=s.extra,S-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){j.msg="invalid distance too far back",s.mode=30;break}s.mode=25;case 25:if(re===0)break e;if(Q=K-re,s.offset>Q){if((Q=s.offset-Q)>s.whave&&s.sane){j.msg="invalid distance too far back",s.mode=30;break}fe=Q>s.wnext?(Q-=s.wnext,s.wsize-Q):s.wnext-Q,Q>s.length&&(Q=s.length),se=s.window}else se=ee,fe=H-s.offset,Q=s.length;for(re<Q&&(Q=re),re-=Q,s.length-=Q;ee[H++]=se[fe++],--Q;);s.length===0&&(s.mode=21);break;case 26:if(re===0)break e;ee[H++]=s.length,re--,s.mode=21;break;case 27:if(s.wrap){for(;S<32;){if($===0)break e;$--,z|=R[U++]<<S,S+=8}if(K-=re,j.total_out+=K,s.total+=K,K&&(j.adler=s.check=s.flags?n(s.check,ee,K,H-K):o(s.check,ee,K,H-K)),K=re,(s.flags?z:f(z))!==s.check){j.msg="incorrect data check",s.mode=30;break}S=z=0}s.mode=28;case 28:if(s.wrap&&s.flags){for(;S<32;){if($===0)break e;$--,z+=R[U++]<<S,S+=8}if(z!==(4294967295&s.total)){j.msg="incorrect length check",s.mode=30;break}S=z=0}s.mode=29;case 29:Z=1;break e;case 30:Z=-3;break e;case 31:return-4;case 32:default:return c}return j.next_out=H,j.avail_out=re,j.next_in=U,j.avail_in=$,s.hold=z,s.bits=S,(s.wsize||K!==j.avail_out&&s.mode<30&&(s.mode<27||P!==4))&&X(j,j.output,j.next_out,K-j.avail_out)?(s.mode=31,-4):(J-=j.avail_in,K-=j.avail_out,j.total_in+=J,j.total_out+=K,s.total+=K,s.wrap&&K&&(j.adler=s.check=s.flags?n(s.check,ee,K,j.next_out-K):o(s.check,ee,K,j.next_out-K)),j.data_type=s.bits+(s.last?64:0)+(s.mode===12?128:0)+(s.mode===20||s.mode===15?256:0),(J==0&&K===0||P===4)&&Z===y&&(Z=-5),Z)},u.inflateEnd=function(j){if(!j||!j.state)return c;var P=j.state;return P.window&&(P.window=null),j.state=null,y},u.inflateGetHeader=function(j,P){var s;return j&&j.state?(2&(s=j.state).wrap)==0?c:((s.head=P).done=!1,y):c},u.inflateSetDictionary=function(j,P){var s,R=P.length;return j&&j.state?(s=j.state).wrap!==0&&s.mode!==11?c:s.mode===11&&o(1,P,R,0)!==s.check?-3:X(j,P,R,R)?(s.mode=31,-4):(s.havedict=1,y):c},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,m,u){var i=r("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];m.exports=function(p,w,y,c,x,d,v,f){var k,E,N,A,L,I,O,T,B,X=f.bits,j=0,P=0,s=0,R=0,ee=0,U=0,H=0,$=0,re=0,z=0,S=null,J=0,K=new i.Buf16(16),Q=new i.Buf16(16),fe=null,se=0;for(j=0;j<=15;j++)K[j]=0;for(P=0;P<c;P++)K[w[y+P]]++;for(ee=X,R=15;1<=R&&K[R]===0;R--);if(R<ee&&(ee=R),R===0)return x[d++]=20971520,x[d++]=20971520,f.bits=1,0;for(s=1;s<R&&K[s]===0;s++);for(ee<s&&(ee=s),j=$=1;j<=15;j++)if($<<=1,($-=K[j])<0)return-1;if(0<$&&(p===0||R!==1))return-1;for(Q[1]=0,j=1;j<15;j++)Q[j+1]=Q[j]+K[j];for(P=0;P<c;P++)w[y+P]!==0&&(v[Q[w[y+P]]++]=P);if(I=p===0?(S=fe=v,19):p===1?(S=o,J-=257,fe=n,se-=257,256):(S=l,fe=h,-1),j=s,L=d,H=P=z=0,N=-1,A=(re=1<<(U=ee))-1,p===1&&852<re||p===2&&592<re)return 1;for(;;){for(O=j-H,B=v[P]<I?(T=0,v[P]):v[P]>I?(T=fe[se+v[P]],S[J+v[P]]):(T=96,0),k=1<<j-H,s=E=1<<U;x[L+(z>>H)+(E-=k)]=O<<24|T<<16|B|0,E!==0;);for(k=1<<j-1;z&k;)k>>=1;if(k!==0?(z&=k-1,z+=k):z=0,P++,--K[j]==0){if(j===R)break;j=w[y+v[P]]}if(ee<j&&(z&A)!==N){for(H===0&&(H=ee),L+=s,$=1<<(U=j-H);U+H<R&&!(($-=K[U+H])<=0);)U++,$<<=1;if(re+=1<<U,p===1&&852<re||p===2&&592<re)return 1;x[N=z&A]=ee<<24|U<<16|L-d|0}}return z!==0&&(x[L+z]=j-H<<24|64<<16|0),f.bits=ee,0}},{"../utils/common":41}],51:[function(r,m,u){m.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,m,u){var i=r("../utils/common"),o=0,n=1;function l(g){for(var C=g.length;0<=--C;)g[C]=0}var h=0,p=29,w=256,y=w+1+p,c=30,x=19,d=2*y+1,v=15,f=16,k=7,E=256,N=16,A=17,L=18,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],O=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=new Array(2*(y+2));l(X);var j=new Array(2*c);l(j);var P=new Array(512);l(P);var s=new Array(256);l(s);var R=new Array(p);l(R);var ee,U,H,$=new Array(c);function re(g,C,M,G,D){this.static_tree=g,this.extra_bits=C,this.extra_base=M,this.elems=G,this.max_length=D,this.has_stree=g&&g.length}function z(g,C){this.dyn_tree=g,this.max_code=0,this.stat_desc=C}function S(g){return g<256?P[g]:P[256+(g>>>7)]}function J(g,C){g.pending_buf[g.pending++]=255&C,g.pending_buf[g.pending++]=C>>>8&255}function K(g,C,M){g.bi_valid>f-M?(g.bi_buf|=C<<g.bi_valid&65535,J(g,g.bi_buf),g.bi_buf=C>>f-g.bi_valid,g.bi_valid+=M-f):(g.bi_buf|=C<<g.bi_valid&65535,g.bi_valid+=M)}function Q(g,C,M){K(g,M[2*C],M[2*C+1])}function fe(g,C){for(var M=0;M|=1&g,g>>>=1,M<<=1,0<--C;);return M>>>1}function se(g,C,M){var G,D,Y=new Array(v+1),oe=0;for(G=1;G<=v;G++)Y[G]=oe=oe+M[G-1]<<1;for(D=0;D<=C;D++){var V=g[2*D+1];V!==0&&(g[2*D]=fe(Y[V]++,V))}}function le(g){var C;for(C=0;C<y;C++)g.dyn_ltree[2*C]=0;for(C=0;C<c;C++)g.dyn_dtree[2*C]=0;for(C=0;C<x;C++)g.bl_tree[2*C]=0;g.dyn_ltree[2*E]=1,g.opt_len=g.static_len=0,g.last_lit=g.matches=0}function ce(g){8<g.bi_valid?J(g,g.bi_buf):0<g.bi_valid&&(g.pending_buf[g.pending++]=g.bi_buf),g.bi_buf=0,g.bi_valid=0}function ge(g,C,M,G){var D=2*C,Y=2*M;return g[D]<g[Y]||g[D]===g[Y]&&G[C]<=G[M]}function pe(g,C,M){for(var G=g.heap[M],D=M<<1;D<=g.heap_len&&(D<g.heap_len&&ge(C,g.heap[D+1],g.heap[D],g.depth)&&D++,!ge(C,G,g.heap[D],g.depth));)g.heap[M]=g.heap[D],M=D,D<<=1;g.heap[M]=G}function _e(g,C,M){var G,D,Y,oe,V=0;if(g.last_lit!==0)for(;G=g.pending_buf[g.d_buf+2*V]<<8|g.pending_buf[g.d_buf+2*V+1],D=g.pending_buf[g.l_buf+V],V++,G===0?Q(g,D,C):(Q(g,(Y=s[D])+w+1,C),(oe=I[Y])!==0&&K(g,D-=R[Y],oe),Q(g,Y=S(--G),M),(oe=O[Y])!==0&&K(g,G-=$[Y],oe)),V<g.last_lit;);Q(g,E,C)}function je(g,C){var M,G,D,Y=C.dyn_tree,oe=C.stat_desc.static_tree,V=C.stat_desc.has_stree,W=C.stat_desc.elems,te=-1;for(g.heap_len=0,g.heap_max=d,M=0;M<W;M++)Y[2*M]!==0?(g.heap[++g.heap_len]=te=M,g.depth[M]=0):Y[2*M+1]=0;for(;g.heap_len<2;)Y[2*(D=g.heap[++g.heap_len]=te<2?++te:0)]=1,g.depth[D]=0,g.opt_len--,V&&(g.static_len-=oe[2*D+1]);for(C.max_code=te,M=g.heap_len>>1;1<=M;M--)pe(g,Y,M);for(D=W;M=g.heap[1],g.heap[1]=g.heap[g.heap_len--],pe(g,Y,1),G=g.heap[1],g.heap[--g.heap_max]=M,g.heap[--g.heap_max]=G,Y[2*D]=Y[2*M]+Y[2*G],g.depth[D]=(g.depth[M]>=g.depth[G]?g.depth[M]:g.depth[G])+1,Y[2*M+1]=Y[2*G+1]=D,g.heap[1]=D++,pe(g,Y,1),2<=g.heap_len;);g.heap[--g.heap_max]=g.heap[1],(function(ne,de){var ze,ye,Se,xe,Ue,jt,Ae=de.dyn_tree,Nr=de.max_code,vo=de.stat_desc.static_tree,xo=de.stat_desc.has_stree,wo=de.stat_desc.extra_bits,Cr=de.stat_desc.extra_base,Je=de.stat_desc.max_length,lt=0;for(xe=0;xe<=v;xe++)ne.bl_count[xe]=0;for(Ae[2*ne.heap[ne.heap_max]+1]=0,ze=ne.heap_max+1;ze<d;ze++)Je<(xe=Ae[2*Ae[2*(ye=ne.heap[ze])+1]+1]+1)&&(xe=Je,lt++),Ae[2*ye+1]=xe,Nr<ye||(ne.bl_count[xe]++,Ue=0,Cr<=ye&&(Ue=wo[ye-Cr]),jt=Ae[2*ye],ne.opt_len+=jt*(xe+Ue),xo&&(ne.static_len+=jt*(vo[2*ye+1]+Ue)));if(lt!==0){do{for(xe=Je-1;ne.bl_count[xe]===0;)xe--;ne.bl_count[xe]--,ne.bl_count[xe+1]+=2,ne.bl_count[Je]--,lt-=2}while(0<lt);for(xe=Je;xe!==0;xe--)for(ye=ne.bl_count[xe];ye!==0;)Nr<(Se=ne.heap[--ze])||(Ae[2*Se+1]!==xe&&(ne.opt_len+=(xe-Ae[2*Se+1])*Ae[2*Se],Ae[2*Se+1]=xe),ye--)}})(g,C),se(Y,te,g.bl_count)}function t(g,C,M){var G,D,Y=-1,oe=C[1],V=0,W=7,te=4;for(oe===0&&(W=138,te=3),C[2*(M+1)+1]=65535,G=0;G<=M;G++)D=oe,oe=C[2*(G+1)+1],++V<W&&D===oe||(V<te?g.bl_tree[2*D]+=V:D!==0?(D!==Y&&g.bl_tree[2*D]++,g.bl_tree[2*N]++):V<=10?g.bl_tree[2*A]++:g.bl_tree[2*L]++,Y=D,te=(V=0)===oe?(W=138,3):D===oe?(W=6,3):(W=7,4))}function Z(g,C,M){var G,D,Y=-1,oe=C[1],V=0,W=7,te=4;for(oe===0&&(W=138,te=3),G=0;G<=M;G++)if(D=oe,oe=C[2*(G+1)+1],!(++V<W&&D===oe)){if(V<te)for(;Q(g,D,g.bl_tree),--V!=0;);else D!==0?(D!==Y&&(Q(g,D,g.bl_tree),V--),Q(g,N,g.bl_tree),K(g,V-3,2)):V<=10?(Q(g,A,g.bl_tree),K(g,V-3,3)):(Q(g,L,g.bl_tree),K(g,V-11,7));Y=D,te=(V=0)===oe?(W=138,3):D===oe?(W=6,3):(W=7,4)}}l($);var F=!1;function b(g,C,M,G){K(g,(h<<1)+(G?1:0),3),(function(D,Y,oe,V){ce(D),J(D,oe),J(D,~oe),i.arraySet(D.pending_buf,D.window,Y,oe,D.pending),D.pending+=oe})(g,C,M)}u._tr_init=function(g){F||((function(){var C,M,G,D,Y,oe=new Array(v+1);for(D=G=0;D<p-1;D++)for(R[D]=G,C=0;C<1<<I[D];C++)s[G++]=D;for(s[G-1]=D,D=Y=0;D<16;D++)for($[D]=Y,C=0;C<1<<O[D];C++)P[Y++]=D;for(Y>>=7;D<c;D++)for($[D]=Y<<7,C=0;C<1<<O[D]-7;C++)P[256+Y++]=D;for(M=0;M<=v;M++)oe[M]=0;for(C=0;C<=143;)X[2*C+1]=8,C++,oe[8]++;for(;C<=255;)X[2*C+1]=9,C++,oe[9]++;for(;C<=279;)X[2*C+1]=7,C++,oe[7]++;for(;C<=287;)X[2*C+1]=8,C++,oe[8]++;for(se(X,y+1,oe),C=0;C<c;C++)j[2*C+1]=5,j[2*C]=fe(C,5);ee=new re(X,I,w+1,y,v),U=new re(j,O,0,c,v),H=new re(new Array(0),T,0,x,k)})(),F=!0),g.l_desc=new z(g.dyn_ltree,ee),g.d_desc=new z(g.dyn_dtree,U),g.bl_desc=new z(g.bl_tree,H),g.bi_buf=0,g.bi_valid=0,le(g)},u._tr_stored_block=b,u._tr_flush_block=function(g,C,M,G){var D,Y,oe=0;0<g.level?(g.strm.data_type===2&&(g.strm.data_type=(function(V){var W,te=4093624447;for(W=0;W<=31;W++,te>>>=1)if(1&te&&V.dyn_ltree[2*W]!==0)return o;if(V.dyn_ltree[18]!==0||V.dyn_ltree[20]!==0||V.dyn_ltree[26]!==0)return n;for(W=32;W<w;W++)if(V.dyn_ltree[2*W]!==0)return n;return o})(g)),je(g,g.l_desc),je(g,g.d_desc),oe=(function(V){var W;for(t(V,V.dyn_ltree,V.l_desc.max_code),t(V,V.dyn_dtree,V.d_desc.max_code),je(V,V.bl_desc),W=x-1;3<=W&&V.bl_tree[2*B[W]+1]===0;W--);return V.opt_len+=3*(W+1)+5+5+4,W})(g),D=g.opt_len+3+7>>>3,(Y=g.static_len+3+7>>>3)<=D&&(D=Y)):D=Y=M+5,M+4<=D&&C!==-1?b(g,C,M,G):g.strategy===4||Y===D?(K(g,2+(G?1:0),3),_e(g,X,j)):(K(g,4+(G?1:0),3),(function(V,W,te,ne){var de;for(K(V,W-257,5),K(V,te-1,5),K(V,ne-4,4),de=0;de<ne;de++)K(V,V.bl_tree[2*B[de]+1],3);Z(V,V.dyn_ltree,W-1),Z(V,V.dyn_dtree,te-1)})(g,g.l_desc.max_code+1,g.d_desc.max_code+1,oe+1),_e(g,g.dyn_ltree,g.dyn_dtree)),le(g),G&&ce(g)},u._tr_tally=function(g,C,M){return g.pending_buf[g.d_buf+2*g.last_lit]=C>>>8&255,g.pending_buf[g.d_buf+2*g.last_lit+1]=255&C,g.pending_buf[g.l_buf+g.last_lit]=255&M,g.last_lit++,C===0?g.dyn_ltree[2*M]++:(g.matches++,C--,g.dyn_ltree[2*(s[M]+w+1)]++,g.dyn_dtree[2*S(C)]++),g.last_lit===g.lit_bufsize-1},u._tr_align=function(g){K(g,2,3),Q(g,E,X),(function(C){C.bi_valid===16?(J(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):8<=C.bi_valid&&(C.pending_buf[C.pending++]=255&C.bi_buf,C.bi_buf>>=8,C.bi_valid-=8)})(g)}},{"../utils/common":41}],53:[function(r,m,u){m.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,m,u){(function(i){(function(o,n){if(!o.setImmediate){var l,h,p,w,y=1,c={},x=!1,d=o.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(o);v=v&&v.setTimeout?v:o,l={}.toString.call(o.process)==="[object process]"?function(N){process.nextTick(function(){k(N)})}:(function(){if(o.postMessage&&!o.importScripts){var N=!0,A=o.onmessage;return o.onmessage=function(){N=!1},o.postMessage("","*"),o.onmessage=A,N}})()?(w="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",E,!1):o.attachEvent("onmessage",E),function(N){o.postMessage(w+N,"*")}):o.MessageChannel?((p=new MessageChannel).port1.onmessage=function(N){k(N.data)},function(N){p.port2.postMessage(N)}):d&&"onreadystatechange"in d.createElement("script")?(h=d.documentElement,function(N){var A=d.createElement("script");A.onreadystatechange=function(){k(N),A.onreadystatechange=null,h.removeChild(A),A=null},h.appendChild(A)}):function(N){setTimeout(k,0,N)},v.setImmediate=function(N){typeof N!="function"&&(N=new Function(""+N));for(var A=new Array(arguments.length-1),L=0;L<A.length;L++)A[L]=arguments[L+1];var I={callback:N,args:A};return c[y]=I,l(y),y++},v.clearImmediate=f}function f(N){delete c[N]}function k(N){if(x)setTimeout(k,0,N);else{var A=c[N];if(A){x=!0;try{(function(L){var I=L.callback,O=L.args;switch(O.length){case 0:I();break;case 1:I(O[0]);break;case 2:I(O[0],O[1]);break;case 3:I(O[0],O[1],O[2]);break;default:I.apply(n,O)}})(A)}finally{f(N),x=!1}}}}function E(N){N.source===o&&typeof N.data=="string"&&N.data.indexOf(w)===0&&k(+N.data.slice(w.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof Ie<"u"?Ie:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ct)),ct.exports}var Dr=Or();const Lr=Tr(Dr);var Ye={exports:{}},Pr=Ye.exports,St;function Fr(){return St||(St=1,(function(e,_){(function(r,m){m()})(Pr,function(){function r(h,p){return typeof p>"u"?p={autoBom:!1}:typeof p!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),p={autoBom:!p}),p.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function m(h,p,w){var y=new XMLHttpRequest;y.open("GET",h),y.responseType="blob",y.onload=function(){l(y.response,p,w)},y.onerror=function(){console.error("could not download file")},y.send()}function u(h){var p=new XMLHttpRequest;p.open("HEAD",h,!1);try{p.send()}catch{}return 200<=p.status&&299>=p.status}function i(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var p=document.createEvent("MouseEvents");p.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(p)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ie=="object"&&Ie.global===Ie?Ie:void 0,n=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!n?function(h,p,w){var y=o.URL||o.webkitURL,c=document.createElement("a");p=p||h.name||"download",c.download=p,c.rel="noopener",typeof h=="string"?(c.href=h,c.origin===location.origin?i(c):u(c.href)?m(h,p,w):i(c,c.target="_blank")):(c.href=y.createObjectURL(h),setTimeout(function(){y.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:"msSaveOrOpenBlob"in navigator?function(h,p,w){if(p=p||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(r(h,w),p);else if(u(h))m(h,p,w);else{var y=document.createElement("a");y.href=h,y.target="_blank",setTimeout(function(){i(y)})}}:function(h,p,w,y){if(y=y||open("","_blank"),y&&(y.document.title=y.document.body.innerText="downloading..."),typeof h=="string")return m(h,p,w);var c=h.type==="application/octet-stream",x=/constructor/i.test(o.HTMLElement)||o.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||c&&x||n)&&typeof FileReader<"u"){var v=new FileReader;v.onloadend=function(){var E=v.result;E=d?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),y?y.location.href=E:location=E,y=null},v.readAsDataURL(h)}else{var f=o.URL||o.webkitURL,k=f.createObjectURL(h);y?y.location=k:location.href=k,y=null,setTimeout(function(){f.revokeObjectURL(k)},4e4)}});o.saveAs=l.saveAs=l,e.exports=l})})(Ye)),Ye.exports}var Nt=Fr();const Ct=async(e,_)=>{const r=new Lr,m=r.folder("config");m==null||m.file("site.json",JSON.stringify(e.site,null,2)),m==null||m.file("theme.json",JSON.stringify(e.theme,null,2)),m==null||m.file("menu.json",JSON.stringify(e.menu,null,2));const u=r.folder("pages");u==null||u.file(`${_}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});Nt.saveAs(i,`jsonpages-project-${_}-${Date.now()}.zip`)},At=(e,_,r)=>{const{pages:m,...u}=e.site,i={page:e.page,site:u,menu:e.menu,theme:e.theme},n=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${n}</head>`),h=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});Nt.saveAs(h,`${_}.html`)};function It(e){var _,r,m="";if(typeof e=="string"||typeof e=="number")m+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(_=0;_<u;_++)e[_]&&(r=It(e[_]))&&(m&&(m+=" "),m+=r)}else for(r in e)e[r]&&(m&&(m+=" "),m+=r);return m}function Rr(){for(var e,_,r=0,m="",u=arguments.length;r<u;r++)(e=arguments[r])&&(_=It(e))&&(m&&(m+=" "),m+=_);return m}const Mr=(e,_)=>{const r=new Array(e.length+_.length);for(let m=0;m<e.length;m++)r[m]=e[m];for(let m=0;m<_.length;m++)r[e.length+m]=_[m];return r},Br=(e,_)=>({classGroupId:e,validator:_}),Tt=(e=new Map,_=null,r)=>({nextPart:e,validators:_,classGroupId:r}),Xe="-",Ot=[],Ur="arbitrary..",Wr=e=>{const _=Zr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:m}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return $r(o);const n=o.split(Xe),l=n[0]===""&&n.length>1?1:0;return Dt(n,l,_)},getConflictingClassGroupIds:(o,n)=>{if(n){const l=m[o],h=r[o];return l?h?Mr(h,l):l:h||Ot}return r[o]||Ot}}},Dt=(e,_,r)=>{if(e.length-_===0)return r.classGroupId;const u=e[_],i=r.nextPart.get(u);if(i){const h=Dt(e,_+1,i);if(h)return h}const o=r.validators;if(o===null)return;const n=_===0?e.join(Xe):e.slice(_).join(Xe),l=o.length;for(let h=0;h<l;h++){const p=o[h];if(p.validator(n))return p.classGroupId}},$r=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const _=e.slice(1,-1),r=_.indexOf(":"),m=_.slice(0,r);return m?Ur+m:void 0})(),Zr=e=>{const{theme:_,classGroups:r}=e;return Hr(r,_)},Hr=(e,_)=>{const r=Tt();for(const m in e){const u=e[m];dt(u,r,m,_)}return r},dt=(e,_,r,m)=>{const u=e.length;for(let i=0;i<u;i++){const o=e[i];Gr(o,_,r,m)}},Gr=(e,_,r,m)=>{if(typeof e=="string"){Kr(e,_,r);return}if(typeof e=="function"){Vr(e,_,r,m);return}Jr(e,_,r,m)},Kr=(e,_,r)=>{const m=e===""?_:Lt(_,e);m.classGroupId=r},Vr=(e,_,r,m)=>{if(qr(e)){dt(e(m),_,r,m);return}_.validators===null&&(_.validators=[]),_.validators.push(Br(r,e))},Jr=(e,_,r,m)=>{const u=Object.entries(e),i=u.length;for(let o=0;o<i;o++){const[n,l]=u[o];dt(l,Lt(_,n),r,m)}},Lt=(e,_)=>{let r=e;const m=_.split(Xe),u=m.length;for(let i=0;i<u;i++){const o=m[i];let n=r.nextPart.get(o);n||(n=Tt(),r.nextPart.set(o,n)),r=n}return r},qr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Yr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let _=0,r=Object.create(null),m=Object.create(null);const u=(i,o)=>{r[i]=o,_++,_>e&&(_=0,m=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=m[i])!==void 0)return u(i,o),o},set(i,o){i in r?r[i]=o:u(i,o)}}},ut="!",Pt=":",Xr=[],Ft=(e,_,r,m,u)=>({modifiers:e,hasImportantModifier:_,baseClassName:r,maybePostfixModifierPosition:m,isExternal:u}),Qr=e=>{const{prefix:_,experimentalParseClassName:r}=e;let m=u=>{const i=[];let o=0,n=0,l=0,h;const p=u.length;for(let d=0;d<p;d++){const v=u[d];if(o===0&&n===0){if(v===Pt){i.push(u.slice(l,d)),l=d+1;continue}if(v==="/"){h=d;continue}}v==="["?o++:v==="]"?o--:v==="("?n++:v===")"&&n--}const w=i.length===0?u:u.slice(l);let y=w,c=!1;w.endsWith(ut)?(y=w.slice(0,-1),c=!0):w.startsWith(ut)&&(y=w.slice(1),c=!0);const x=h&&h>l?h-l:void 0;return Ft(i,c,y,x)};if(_){const u=_+Pt,i=m;m=o=>o.startsWith(u)?i(o.slice(u.length)):Ft(Xr,!1,o,void 0,!0)}if(r){const u=m;m=i=>r({className:i,parseClassName:u})}return m},en=e=>{const _=new Map;return e.orderSensitiveModifiers.forEach((r,m)=>{_.set(r,1e6+m)}),r=>{const m=[];let u=[];for(let i=0;i<r.length;i++){const o=r[i],n=o[0]==="[",l=_.has(o);n||l?(u.length>0&&(u.sort(),m.push(...u),u=[]),m.push(o)):u.push(o)}return u.length>0&&(u.sort(),m.push(...u)),m}},tn=e=>({cache:Yr(e.cacheSize),parseClassName:Qr(e),sortModifiers:en(e),...Wr(e)}),rn=/\s+/,nn=(e,_)=>{const{parseClassName:r,getClassGroupId:m,getConflictingClassGroupIds:u,sortModifiers:i}=_,o=[],n=e.trim().split(rn);let l="";for(let h=n.length-1;h>=0;h-=1){const p=n[h],{isExternal:w,modifiers:y,hasImportantModifier:c,baseClassName:x,maybePostfixModifierPosition:d}=r(p);if(w){l=p+(l.length>0?" "+l:l);continue}let v=!!d,f=m(v?x.substring(0,d):x);if(!f){if(!v){l=p+(l.length>0?" "+l:l);continue}if(f=m(x),!f){l=p+(l.length>0?" "+l:l);continue}v=!1}const k=y.length===0?"":y.length===1?y[0]:i(y).join(":"),E=c?k+ut:k,N=E+f;if(o.indexOf(N)>-1)continue;o.push(N);const A=u(f,v);for(let L=0;L<A.length;++L){const I=A[L];o.push(E+I)}l=p+(l.length>0?" "+l:l)}return l},on=(...e)=>{let _=0,r,m,u="";for(;_<e.length;)(r=e[_++])&&(m=Rt(r))&&(u&&(u+=" "),u+=m);return u},Rt=e=>{if(typeof e=="string")return e;let _,r="";for(let m=0;m<e.length;m++)e[m]&&(_=Rt(e[m]))&&(r&&(r+=" "),r+=_);return r},an=(e,..._)=>{let r,m,u,i;const o=l=>{const h=_.reduce((p,w)=>w(p),e());return r=tn(h),m=r.cache.get,u=r.cache.set,i=n,n(l)},n=l=>{const h=m(l);if(h)return h;const p=nn(l,r);return u(l,p),p};return i=o,(...l)=>i(on(...l))},sn=[],ke=e=>{const _=r=>r[e]||sn;return _.isThemeGetter=!0,_},Mt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ln=/^\d+\/\d+$/,cn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,un=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pe=e=>ln.test(e),ue=e=>!!e&&!Number.isNaN(Number(e)),Te=e=>!!e&&Number.isInteger(Number(e)),ht=e=>e.endsWith("%")&&ue(e.slice(0,-1)),Ce=e=>cn.test(e),pn=()=>!0,mn=e=>dn.test(e)&&!un.test(e),Ut=()=>!1,bn=e=>hn.test(e),gn=e=>fn.test(e),vn=e=>!ie(e)&&!ae(e),xn=e=>Fe(e,Gt,Ut),ie=e=>Mt.test(e),De=e=>Fe(e,Kt,mn),ft=e=>Fe(e,zn,ue),Wt=e=>Fe(e,Zt,Ut),wn=e=>Fe(e,Ht,gn),Qe=e=>Fe(e,Vt,bn),ae=e=>Bt.test(e),We=e=>Re(e,Kt),yn=e=>Re(e,jn),$t=e=>Re(e,Zt),kn=e=>Re(e,Gt),_n=e=>Re(e,Ht),et=e=>Re(e,Vt,!0),Fe=(e,_,r)=>{const m=Mt.exec(e);return m?m[1]?_(m[1]):r(m[2]):!1},Re=(e,_,r=!1)=>{const m=Bt.exec(e);return m?m[1]?_(m[1]):r:!1},Zt=e=>e==="position"||e==="percentage",Ht=e=>e==="image"||e==="url",Gt=e=>e==="length"||e==="size"||e==="bg-size",Kt=e=>e==="length",zn=e=>e==="number",jn=e=>e==="family-name",Vt=e=>e==="shadow",En=an(()=>{const e=ke("color"),_=ke("font"),r=ke("text"),m=ke("font-weight"),u=ke("tracking"),i=ke("leading"),o=ke("breakpoint"),n=ke("container"),l=ke("spacing"),h=ke("radius"),p=ke("shadow"),w=ke("inset-shadow"),y=ke("text-shadow"),c=ke("drop-shadow"),x=ke("blur"),d=ke("perspective"),v=ke("aspect"),f=ke("ease"),k=ke("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...N(),ae,ie],L=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],O=()=>[ae,ie,l],T=()=>[Pe,"full","auto",...O()],B=()=>[Te,"none","subgrid",ae,ie],X=()=>["auto",{span:["full",Te,ae,ie]},Te,ae,ie],j=()=>[Te,"auto",ae,ie],P=()=>["auto","min","max","fr",ae,ie],s=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...O()],U=()=>[Pe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],H=()=>[e,ae,ie],$=()=>[...N(),$t,Wt,{position:[ae,ie]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",kn,xn,{size:[ae,ie]}],S=()=>[ht,We,De],J=()=>["","none","full",h,ae,ie],K=()=>["",ue,We,De],Q=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[ue,ht,$t,Wt],le=()=>["","none",x,ae,ie],ce=()=>["none",ue,ae,ie],ge=()=>["none",ue,ae,ie],pe=()=>[ue,ae,ie],_e=()=>[Pe,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ce],breakpoint:[Ce],color:[pn],container:[Ce],"drop-shadow":[Ce],ease:["in","out","in-out"],font:[vn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ce],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ce],shadow:[Ce],spacing:["px",ue],text:[Ce],"text-shadow":[Ce],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pe,ie,ae,v]}],container:["container"],columns:[{columns:[ue,ie,ae,n]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",ae,ie]}],basis:[{basis:[Pe,"full","auto",n,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,Pe,"auto","initial","none",ie]}],grow:[{grow:["",ue,ae,ie]}],shrink:[{shrink:["",ue,ae,ie]}],order:[{order:[Te,"first","last","none",ae,ie]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...s(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...s()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":s()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[n,"screen",...U()]}],"min-w":[{"min-w":[n,"screen","none",...U()]}],"max-w":[{"max-w":[n,"screen","none","prose",{screen:[o]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,We,De]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[m,ae,ft]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ht,ie]}],"font-family":[{font:[yn,ie,_]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,ae,ie]}],"line-clamp":[{"line-clamp":[ue,"none",ae,ft]}],leading:[{leading:[i,...O()]}],"list-image":[{"list-image":["none",ae,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",ae,De]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[ue,"auto",ae,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Te,ae,ie],radial:["",ae,ie],conic:[Te,ae,ie]},_n,wn]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:S()}],"gradient-via-pos":[{via:S()}],"gradient-to-pos":[{to:S()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,ae,ie]}],"outline-w":[{outline:["",ue,We,De]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",p,et,Qe]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",w,et,Qe]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[ue,De]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",y,et,Qe]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[ue,ae,ie]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[ae,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,ie]}],filter:[{filter:["","none",ae,ie]}],blur:[{blur:le()}],brightness:[{brightness:[ue,ae,ie]}],contrast:[{contrast:[ue,ae,ie]}],"drop-shadow":[{"drop-shadow":["","none",c,et,Qe]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",ue,ae,ie]}],"hue-rotate":[{"hue-rotate":[ue,ae,ie]}],invert:[{invert:["",ue,ae,ie]}],saturate:[{saturate:[ue,ae,ie]}],sepia:[{sepia:["",ue,ae,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,ie]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[ue,ae,ie]}],"backdrop-contrast":[{"backdrop-contrast":[ue,ae,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,ae,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,ae,ie]}],"backdrop-invert":[{"backdrop-invert":["",ue,ae,ie]}],"backdrop-opacity":[{"backdrop-opacity":[ue,ae,ie]}],"backdrop-saturate":[{"backdrop-saturate":[ue,ae,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,ae,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",ae,ie]}],ease:[{ease:["linear","initial",f,ae,ie]}],delay:[{delay:[ue,ae,ie]}],animate:[{animate:["none",k,ae,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[d,ae,ie]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[ae,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,ie]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[ue,We,De,ft]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function he(...e){return En(Rr(e))}var tt={exports:{}},$e={};/**
|
|
11
|
+
*/var Et;function Tr(){return Et||(Et=1,(function(e,k){(function(r){e.exports=r()})(function(){return(function r(m,u,i){function o(h,f){if(!u[h]){if(!m[h]){var v=typeof Je=="function"&&Je;if(!f&&v)return v(h,!0);if(n)return n(h,!0);var x=new Error("Cannot find module '"+h+"'");throw x.code="MODULE_NOT_FOUND",x}var c=u[h]={exports:{}};m[h][0].call(c.exports,function(g){var d=m[h][1][g];return o(d||g)},c,c.exports,r,m,u,i)}return u[h].exports}for(var n=typeof Je=="function"&&Je,l=0;l<i.length;l++)o(i[l]);return o})({1:[function(r,m,u){var i=r("./utils"),o=r("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(l){for(var h,f,v,x,c,g,d,b=[],p=0,y=l.length,j=y,N=i.getTypeOf(l)!=="string";p<l.length;)j=y-p,v=N?(h=l[p++],f=p<y?l[p++]:0,p<y?l[p++]:0):(h=l.charCodeAt(p++),f=p<y?l.charCodeAt(p++):0,p<y?l.charCodeAt(p++):0),x=h>>2,c=(3&h)<<4|f>>4,g=1<j?(15&f)<<2|v>>6:64,d=2<j?63&v:64,b.push(n.charAt(x)+n.charAt(c)+n.charAt(g)+n.charAt(d));return b.join("")},u.decode=function(l){var h,f,v,x,c,g,d=0,b=0,p="data:";if(l.substr(0,p.length)===p)throw new Error("Invalid base64 input, it looks like a data url.");var y,j=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===n.charAt(64)&&j--,l.charAt(l.length-2)===n.charAt(64)&&j--,j%1!=0)throw new Error("Invalid base64 input, bad content length.");for(y=o.uint8array?new Uint8Array(0|j):new Array(0|j);d<l.length;)h=n.indexOf(l.charAt(d++))<<2|(x=n.indexOf(l.charAt(d++)))>>4,f=(15&x)<<4|(c=n.indexOf(l.charAt(d++)))>>2,v=(3&c)<<6|(g=n.indexOf(l.charAt(d++))),y[b++]=h,c!==64&&(y[b++]=f),g!==64&&(y[b++]=v);return y}},{"./support":30,"./utils":32}],2:[function(r,m,u){var i=r("./external"),o=r("./stream/DataWorker"),n=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function h(f,v,x,c,g){this.compressedSize=f,this.uncompressedSize=v,this.crc32=x,this.compression=c,this.compressedContent=g}h.prototype={getContentWorker:function(){var f=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),v=this;return f.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(f,v,x){return f.pipe(new n).pipe(new l("uncompressedSize")).pipe(v.compressWorker(x)).pipe(new l("compressedSize")).withStreamInfo("compression",v)},m.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,m,u){var i=r("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},u.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,m,u){var i=r("./utils"),o=(function(){for(var n,l=[],h=0;h<256;h++){n=h;for(var f=0;f<8;f++)n=1&n?3988292384^n>>>1:n>>>1;l[h]=n}return l})();m.exports=function(n,l){return n!==void 0&&n.length?i.getTypeOf(n)!=="string"?(function(h,f,v,x){var c=o,g=x+v;h^=-1;for(var d=x;d<g;d++)h=h>>>8^c[255&(h^f[d])];return-1^h})(0|l,n,n.length,0):(function(h,f,v,x){var c=o,g=x+v;h^=-1;for(var d=x;d<g;d++)h=h>>>8^c[255&(h^f.charCodeAt(d))];return-1^h})(0|l,n,n.length,0):0}},{"./utils":32}],5:[function(r,m,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(r,m,u){var i=null;i=typeof Promise<"u"?Promise:r("lie"),m.exports={Promise:i}},{lie:37}],7:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),n=r("./utils"),l=r("./stream/GenericWorker"),h=i?"uint8array":"array";function f(v,x){l.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=x,this.meta={}}u.magic="\b\0",n.inherits(f,l),f.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(h,v.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(x){v.push({data:x,meta:v.meta})}},u.compressWorker=function(v){return new f("Deflate",v)},u.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,m,u){function i(c,g){var d,b="";for(d=0;d<g;d++)b+=String.fromCharCode(255&c),c>>>=8;return b}function o(c,g,d,b,p,y){var j,N,A=c.file,O=c.compression,P=y!==h.utf8encode,F=n.transformTo("string",y(A.name)),D=n.transformTo("string",h.utf8encode(A.name)),U=A.comment,te=n.transformTo("string",y(U)),E=n.transformTo("string",h.utf8encode(U)),M=D.length!==A.name.length,a=E.length!==U.length,W="",ee="",$="",G=A.dir,H=A.date,q={crc32:0,compressedSize:0,uncompressedSize:0};g&&!d||(q.crc32=c.crc32,q.compressedSize=c.compressedSize,q.uncompressedSize=c.uncompressedSize);var z=0;g&&(z|=8),P||!M&&!a||(z|=2048);var S=0,K=0;G&&(S|=16),p==="UNIX"?(K=798,S|=(function(Q,de){var ie=Q;return Q||(ie=de?16893:33204),(65535&ie)<<16})(A.unixPermissions,G)):(K=20,S|=(function(Q){return 63&(Q||0)})(A.dosPermissions)),j=H.getUTCHours(),j<<=6,j|=H.getUTCMinutes(),j<<=5,j|=H.getUTCSeconds()/2,N=H.getUTCFullYear()-1980,N<<=4,N|=H.getUTCMonth()+1,N<<=5,N|=H.getUTCDate(),M&&(ee=i(1,1)+i(f(F),4)+D,W+="up"+i(ee.length,2)+ee),a&&($=i(1,1)+i(f(te),4)+E,W+="uc"+i($.length,2)+$);var V="";return V+=`
|
|
12
|
+
\0`,V+=i(z,2),V+=O.magic,V+=i(j,2),V+=i(N,2),V+=i(q.crc32,4),V+=i(q.compressedSize,4),V+=i(q.uncompressedSize,4),V+=i(F.length,2),V+=i(W.length,2),{fileRecord:v.LOCAL_FILE_HEADER+V+F+W,dirRecord:v.CENTRAL_FILE_HEADER+i(K,2)+V+i(te.length,2)+"\0\0\0\0"+i(S,4)+i(b,4)+F+W+te}}var n=r("../utils"),l=r("../stream/GenericWorker"),h=r("../utf8"),f=r("../crc32"),v=r("../signature");function x(c,g,d,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=d,this.encodeFileName=b,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(x,l),x.prototype.push=function(c){var g=c.meta.percent||0,d=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,l.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:d?(g+100*(d-b-1))/d:100}}))},x.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var g=this.streamFiles&&!c.file.dir;if(g){var d=o(c,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:d.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(c){this.accumulate=!1;var g=this.streamFiles&&!c.file.dir,d=o(c,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(d.dirRecord),g)this.push({data:(function(b){return v.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.uncompressedSize,4)})(c),meta:{percent:100}});else for(this.push({data:d.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var c=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var d=this.bytesWritten-c,b=(function(p,y,j,N,A){var O=n.transformTo("string",A(N));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(p,2)+i(p,2)+i(y,4)+i(j,4)+i(O.length,2)+O})(this.dirRecords.length,d,c,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},x.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},x.prototype.registerPrevious=function(c){this._sources.push(c);var g=this;return c.on("data",function(d){g.processChunk(d)}),c.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),c.on("error",function(d){g.error(d)}),this},x.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},x.prototype.error=function(c){var g=this._sources;if(!l.prototype.error.call(this,c))return!1;for(var d=0;d<g.length;d++)try{g[d].error(c)}catch{}return!0},x.prototype.lock=function(){l.prototype.lock.call(this);for(var c=this._sources,g=0;g<c.length;g++)c[g].lock()},m.exports=x},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,m,u){var i=r("../compressions"),o=r("./ZipFileWorker");u.generateWorker=function(n,l,h){var f=new o(l.streamFiles,h,l.platform,l.encodeFileName),v=0;try{n.forEach(function(x,c){v++;var g=(function(y,j){var N=y||j,A=i[N];if(!A)throw new Error(N+" is not a valid compression method !");return A})(c.options.compression,l.compression),d=c.options.compressionOptions||l.compressionOptions||{},b=c.dir,p=c.date;c._compressWorker(g,d).withStreamInfo("file",{name:x,dir:b,date:p,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(f)}),f.entriesCount=v}catch(x){f.error(x)}return f}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,m,u){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new i;for(var n in this)typeof this[n]!="function"&&(o[n]=this[n]);return o}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(o,n){return new i().loadAsync(o,n)},i.external=r("./external"),m.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,m,u){var i=r("./utils"),o=r("./external"),n=r("./utf8"),l=r("./zipEntries"),h=r("./stream/Crc32Probe"),f=r("./nodejsUtils");function v(x){return new o.Promise(function(c,g){var d=x.decompressed.getContentWorker().pipe(new h);d.on("error",function(b){g(b)}).on("end",function(){d.streamInfo.crc32!==x.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}m.exports=function(x,c){var g=this;return c=i.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),f.isNode&&f.isStream(x)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",x,!0,c.optimizedBinaryString,c.base64).then(function(d){var b=new l(c);return b.load(d),b}).then(function(d){var b=[o.Promise.resolve(d)],p=d.files;if(c.checkCRC32)for(var y=0;y<p.length;y++)b.push(v(p[y]));return o.Promise.all(b)}).then(function(d){for(var b=d.shift(),p=b.files,y=0;y<p.length;y++){var j=p[y],N=j.fileNameStr,A=i.resolve(j.fileNameStr);g.file(A,j.decompressed,{binary:!0,optimizedBinaryString:!0,date:j.date,dir:j.dir,comment:j.fileCommentStr.length?j.fileCommentStr:null,unixPermissions:j.unixPermissions,dosPermissions:j.dosPermissions,createFolders:c.createFolders}),j.dir||(g.file(A).unsafeOriginalName=N)}return b.zipComment.length&&(g.comment=b.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,m,u){var i=r("../utils"),o=r("../stream/GenericWorker");function n(l,h){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(h)}i.inherits(n,o),n.prototype._bindStream=function(l){var h=this;(this._stream=l).pause(),l.on("data",function(f){h.push({data:f,meta:{percent:0}})}).on("error",function(f){h.isPaused?this.generatedError=f:h.error(f)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},n.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},m.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,m,u){var i=r("readable-stream").Readable;function o(n,l,h){i.call(this,l),this._helper=n;var f=this;n.on("data",function(v,x){f.push(v)||f._helper.pause(),h&&h(x)}).on("error",function(v){f.emit("error",v)}).on("end",function(){f.push(null)})}r("../utils").inherits(o,i),o.prototype._read=function(){this._helper.resume()},m.exports=o},{"../utils":32,"readable-stream":16}],14:[function(r,m,u){m.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,o);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,o)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var o=new Buffer(i);return o.fill(0),o},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,m,u){function i(A,O,P){var F,D=n.getTypeOf(O),U=n.extend(P||{},f);U.date=U.date||new Date,U.compression!==null&&(U.compression=U.compression.toUpperCase()),typeof U.unixPermissions=="string"&&(U.unixPermissions=parseInt(U.unixPermissions,8)),U.unixPermissions&&16384&U.unixPermissions&&(U.dir=!0),U.dosPermissions&&16&U.dosPermissions&&(U.dir=!0),U.dir&&(A=p(A)),U.createFolders&&(F=b(A))&&y.call(this,F,!0);var te=D==="string"&&U.binary===!1&&U.base64===!1;P&&P.binary!==void 0||(U.binary=!te),(O instanceof v&&O.uncompressedSize===0||U.dir||!O||O.length===0)&&(U.base64=!1,U.binary=!0,O="",U.compression="STORE",D="string");var E=null;E=O instanceof v||O instanceof l?O:g.isNode&&g.isStream(O)?new d(A,O):n.prepareContent(A,O,U.binary,U.optimizedBinaryString,U.base64);var M=new x(A,E,U);this.files[A]=M}var o=r("./utf8"),n=r("./utils"),l=r("./stream/GenericWorker"),h=r("./stream/StreamHelper"),f=r("./defaults"),v=r("./compressedObject"),x=r("./zipObject"),c=r("./generate"),g=r("./nodejsUtils"),d=r("./nodejs/NodejsStreamInputAdapter"),b=function(A){A.slice(-1)==="/"&&(A=A.substring(0,A.length-1));var O=A.lastIndexOf("/");return 0<O?A.substring(0,O):""},p=function(A){return A.slice(-1)!=="/"&&(A+="/"),A},y=function(A,O){return O=O!==void 0?O:f.createFolders,A=p(A),this.files[A]||i.call(this,A,null,{dir:!0,createFolders:O}),this.files[A]};function j(A){return Object.prototype.toString.call(A)==="[object RegExp]"}var N={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(A){var O,P,F;for(O in this.files)F=this.files[O],(P=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&A(P,F)},filter:function(A){var O=[];return this.forEach(function(P,F){A(P,F)&&O.push(F)}),O},file:function(A,O,P){if(arguments.length!==1)return A=this.root+A,i.call(this,A,O,P),this;if(j(A)){var F=A;return this.filter(function(U,te){return!te.dir&&F.test(U)})}var D=this.files[this.root+A];return D&&!D.dir?D:null},folder:function(A){if(!A)return this;if(j(A))return this.filter(function(D,U){return U.dir&&A.test(D)});var O=this.root+A,P=y.call(this,O),F=this.clone();return F.root=P.name,F},remove:function(A){A=this.root+A;var O=this.files[A];if(O||(A.slice(-1)!=="/"&&(A+="/"),O=this.files[A]),O&&!O.dir)delete this.files[A];else for(var P=this.filter(function(D,U){return U.name.slice(0,A.length)===A}),F=0;F<P.length;F++)delete this.files[P[F].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(A){var O,P={};try{if((P=n.extend(A||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=P.type.toLowerCase(),P.compression=P.compression.toUpperCase(),P.type==="binarystring"&&(P.type="string"),!P.type)throw new Error("No output type specified.");n.checkSupport(P.type),P.platform!=="darwin"&&P.platform!=="freebsd"&&P.platform!=="linux"&&P.platform!=="sunos"||(P.platform="UNIX"),P.platform==="win32"&&(P.platform="DOS");var F=P.comment||this.comment||"";O=c.generateWorker(this,P,F)}catch(D){(O=new l("error")).error(D)}return new h(O,P.type||"string",P.mimeType)},generateAsync:function(A,O){return this.generateInternalStream(A).accumulate(O)},generateNodeStream:function(A,O){return(A=A||{}).type||(A.type="nodebuffer"),this.generateInternalStream(A).toNodejsStream(O)}};m.exports=N},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,m,u){m.exports=r("stream")},{stream:void 0}],17:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n);for(var l=0;l<this.data.length;l++)n[l]=255&n[l]}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data[this.zero+n]},o.prototype.lastIndexOfSignature=function(n){for(var l=n.charCodeAt(0),h=n.charCodeAt(1),f=n.charCodeAt(2),v=n.charCodeAt(3),x=this.length-4;0<=x;--x)if(this.data[x]===l&&this.data[x+1]===h&&this.data[x+2]===f&&this.data[x+3]===v)return x-this.zero;return-1},o.prototype.readAndCheckSignature=function(n){var l=n.charCodeAt(0),h=n.charCodeAt(1),f=n.charCodeAt(2),v=n.charCodeAt(3),x=this.readData(4);return l===x[0]&&h===x[1]&&f===x[2]&&v===x[3]},o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],18:[function(r,m,u){var i=r("../utils");function o(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var l,h=0;for(this.checkOffset(n),l=this.index+n-1;l>=this.index;l--)h=(h<<8)+this.byteAt(l);return this.index+=n,h},readString:function(n){return i.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},m.exports=o},{"../utils":32}],19:[function(r,m,u){var i=r("./Uint8ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},o.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},o.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,m,u){var i=r("./ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,m,u){var i=r("../utils"),o=r("../support"),n=r("./ArrayReader"),l=r("./StringReader"),h=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");m.exports=function(v){var x=i.getTypeOf(v);return i.checkSupport(x),x!=="string"||o.uint8array?x==="nodebuffer"?new h(v):o.uint8array?new f(i.transformTo("uint8array",v)):new n(i.transformTo("array",v)):new l(v)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,m,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,m,u){var i=r("./GenericWorker"),o=r("../utils");function n(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(n,i),n.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},m.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(r,m,u){var i=r("./GenericWorker"),o=r("../crc32");function n(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(n,i),n.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},m.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(n,o),n.prototype.processChunk=function(l){if(l){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+l.data.length}o.prototype.processChunk.call(this,l)},m.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){h.dataIsReady=!0,h.data=f,h.max=f&&f.length||0,h.type=i.getTypeOf(f),h.isPaused||h._tickAndRepeat()},function(f){h.error(f)})}i.inherits(n,o),n.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,h);break;case"uint8array":l=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":l=this.data.slice(this.index,h)}return this.index=h,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},m.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(r,m,u){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,n){return this._listeners[o].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,n){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,n)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var n=this;return o.on("data",function(l){n.processChunk(l)}),o.on("end",function(){n.end()}),o.on("error",function(l){n.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,n){return this.extraStreamInfo[o]=n,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},m.exports=i},{}],29:[function(r,m,u){var i=r("../utils"),o=r("./ConvertWorker"),n=r("./GenericWorker"),l=r("../base64"),h=r("../support"),f=r("../external"),v=null;if(h.nodestream)try{v=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(g,d){return new f.Promise(function(b,p){var y=[],j=g._internalType,N=g._outputType,A=g._mimeType;g.on("data",function(O,P){y.push(O),d&&d(P)}).on("error",function(O){y=[],p(O)}).on("end",function(){try{var O=(function(P,F,D){switch(P){case"blob":return i.newBlob(i.transformTo("arraybuffer",F),D);case"base64":return l.encode(F);default:return i.transformTo(P,F)}})(N,(function(P,F){var D,U=0,te=null,E=0;for(D=0;D<F.length;D++)E+=F[D].length;switch(P){case"string":return F.join("");case"array":return Array.prototype.concat.apply([],F);case"uint8array":for(te=new Uint8Array(E),D=0;D<F.length;D++)te.set(F[D],U),U+=F[D].length;return te;case"nodebuffer":return Buffer.concat(F);default:throw new Error("concat : unsupported type '"+P+"'")}})(j,y),A);b(O)}catch(P){p(P)}y=[]}).resume()})}function c(g,d,b){var p=d;switch(d){case"blob":case"arraybuffer":p="uint8array";break;case"base64":p="string"}try{this._internalType=p,this._outputType=d,this._mimeType=b,i.checkSupport(p),this._worker=g.pipe(new o(p)),g.lock()}catch(y){this._worker=new n("error"),this._worker.error(y)}}c.prototype={accumulate:function(g){return x(this,g)},on:function(g,d){var b=this;return g==="data"?this._worker.on(g,function(p){d.call(b,p.data,p.meta)}):this._worker.on(g,function(){i.delay(d,arguments,b)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new v(this,{objectMode:this._outputType!=="nodebuffer"},g)}},m.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,m,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var i=new ArrayBuffer(0);try{u.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),u.blob=o.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!r("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(r,m,u){for(var i=r("./utils"),o=r("./support"),n=r("./nodejsUtils"),l=r("./stream/GenericWorker"),h=new Array(256),f=0;f<256;f++)h[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;h[254]=h[254]=1;function v(){l.call(this,"utf-8 decode"),this.leftOver=null}function x(){l.call(this,"utf-8 encode")}u.utf8encode=function(c){return o.nodebuffer?n.newBufferFrom(c,"utf-8"):(function(g){var d,b,p,y,j,N=g.length,A=0;for(y=0;y<N;y++)(64512&(b=g.charCodeAt(y)))==55296&&y+1<N&&(64512&(p=g.charCodeAt(y+1)))==56320&&(b=65536+(b-55296<<10)+(p-56320),y++),A+=b<128?1:b<2048?2:b<65536?3:4;for(d=o.uint8array?new Uint8Array(A):new Array(A),y=j=0;j<A;y++)(64512&(b=g.charCodeAt(y)))==55296&&y+1<N&&(64512&(p=g.charCodeAt(y+1)))==56320&&(b=65536+(b-55296<<10)+(p-56320),y++),b<128?d[j++]=b:(b<2048?d[j++]=192|b>>>6:(b<65536?d[j++]=224|b>>>12:(d[j++]=240|b>>>18,d[j++]=128|b>>>12&63),d[j++]=128|b>>>6&63),d[j++]=128|63&b);return d})(c)},u.utf8decode=function(c){return o.nodebuffer?i.transformTo("nodebuffer",c).toString("utf-8"):(function(g){var d,b,p,y,j=g.length,N=new Array(2*j);for(d=b=0;d<j;)if((p=g[d++])<128)N[b++]=p;else if(4<(y=h[p]))N[b++]=65533,d+=y-1;else{for(p&=y===2?31:y===3?15:7;1<y&&d<j;)p=p<<6|63&g[d++],y--;1<y?N[b++]=65533:p<65536?N[b++]=p:(p-=65536,N[b++]=55296|p>>10&1023,N[b++]=56320|1023&p)}return N.length!==b&&(N.subarray?N=N.subarray(0,b):N.length=b),i.applyFromCharCode(N)})(c=i.transformTo(o.uint8array?"uint8array":"array",c))},i.inherits(v,l),v.prototype.processChunk=function(c){var g=i.transformTo(o.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var d=g;(g=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),g.set(d,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var b=(function(y,j){var N;for((j=j||y.length)>y.length&&(j=y.length),N=j-1;0<=N&&(192&y[N])==128;)N--;return N<0||N===0?j:N+h[y[N]]>j?N:j})(g),p=g;b!==g.length&&(o.uint8array?(p=g.subarray(0,b),this.leftOver=g.subarray(b,g.length)):(p=g.slice(0,b),this.leftOver=g.slice(b,g.length))),this.push({data:u.utf8decode(p),meta:c.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=v,i.inherits(x,l),x.prototype.processChunk=function(c){this.push({data:u.utf8encode(c.data),meta:c.meta})},u.Utf8EncodeWorker=x},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,m,u){var i=r("./support"),o=r("./base64"),n=r("./nodejsUtils"),l=r("./external");function h(d){return d}function f(d,b){for(var p=0;p<d.length;++p)b[p]=255&d.charCodeAt(p);return b}r("setimmediate"),u.newBlob=function(d,b){u.checkSupport("blob");try{return new Blob([d],{type:b})}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return p.append(d),p.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(d,b,p){var y=[],j=0,N=d.length;if(N<=p)return String.fromCharCode.apply(null,d);for(;j<N;)b==="array"||b==="nodebuffer"?y.push(String.fromCharCode.apply(null,d.slice(j,Math.min(j+p,N)))):y.push(String.fromCharCode.apply(null,d.subarray(j,Math.min(j+p,N)))),j+=p;return y.join("")},stringifyByChar:function(d){for(var b="",p=0;p<d.length;p++)b+=String.fromCharCode(d[p]);return b},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch{return!1}})()}};function x(d){var b=65536,p=u.getTypeOf(d),y=!0;if(p==="uint8array"?y=v.applyCanBeUsed.uint8array:p==="nodebuffer"&&(y=v.applyCanBeUsed.nodebuffer),y)for(;1<b;)try{return v.stringifyByChunk(d,p,b)}catch{b=Math.floor(b/2)}return v.stringifyByChar(d)}function c(d,b){for(var p=0;p<d.length;p++)b[p]=d[p];return b}u.applyFromCharCode=x;var g={};g.string={string:h,array:function(d){return f(d,new Array(d.length))},arraybuffer:function(d){return g.string.uint8array(d).buffer},uint8array:function(d){return f(d,new Uint8Array(d.length))},nodebuffer:function(d){return f(d,n.allocBuffer(d.length))}},g.array={string:x,array:h,arraybuffer:function(d){return new Uint8Array(d).buffer},uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(d)}},g.arraybuffer={string:function(d){return x(new Uint8Array(d))},array:function(d){return c(new Uint8Array(d),new Array(d.byteLength))},arraybuffer:h,uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(new Uint8Array(d))}},g.uint8array={string:x,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return d.buffer},uint8array:h,nodebuffer:function(d){return n.newBufferFrom(d)}},g.nodebuffer={string:x,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return g.nodebuffer.uint8array(d).buffer},uint8array:function(d){return c(d,new Uint8Array(d.length))},nodebuffer:h},u.transformTo=function(d,b){if(b=b||"",!d)return b;u.checkSupport(d);var p=u.getTypeOf(b);return g[p][d](b)},u.resolve=function(d){for(var b=d.split("/"),p=[],y=0;y<b.length;y++){var j=b[y];j==="."||j===""&&y!==0&&y!==b.length-1||(j===".."?p.pop():p.push(j))}return p.join("/")},u.getTypeOf=function(d){return typeof d=="string"?"string":Object.prototype.toString.call(d)==="[object Array]"?"array":i.nodebuffer&&n.isBuffer(d)?"nodebuffer":i.uint8array&&d instanceof Uint8Array?"uint8array":i.arraybuffer&&d instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(d){if(!i[d.toLowerCase()])throw new Error(d+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(d){var b,p,y="";for(p=0;p<(d||"").length;p++)y+="\\x"+((b=d.charCodeAt(p))<16?"0":"")+b.toString(16).toUpperCase();return y},u.delay=function(d,b,p){setImmediate(function(){d.apply(p||null,b||[])})},u.inherits=function(d,b){function p(){}p.prototype=b.prototype,d.prototype=new p},u.extend=function(){var d,b,p={};for(d=0;d<arguments.length;d++)for(b in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],b)&&p[b]===void 0&&(p[b]=arguments[d][b]);return p},u.prepareContent=function(d,b,p,y,j){return l.Promise.resolve(b).then(function(N){return i.blob&&(N instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(N))!==-1)&&typeof FileReader<"u"?new l.Promise(function(A,O){var P=new FileReader;P.onload=function(F){A(F.target.result)},P.onerror=function(F){O(F.target.error)},P.readAsArrayBuffer(N)}):N}).then(function(N){var A=u.getTypeOf(N);return A?(A==="arraybuffer"?N=u.transformTo("uint8array",N):A==="string"&&(j?N=o.decode(N):p&&y!==!0&&(N=(function(O){return f(O,i.uint8array?new Uint8Array(O.length):new Array(O.length))})(N))),N):l.Promise.reject(new Error("Can't read the data of '"+d+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./signature"),l=r("./zipEntry"),h=r("./support");function f(v){this.files=[],this.loadOptions=v}f.prototype={checkSignature:function(v){if(!this.reader.readAndCheckSignature(v)){this.reader.index-=4;var x=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(x)+", expected "+o.pretty(v)+")")}},isSignature:function(v,x){var c=this.reader.index;this.reader.setIndex(v);var g=this.reader.readString(4)===x;return this.reader.setIndex(c),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var v=this.reader.readData(this.zipCommentLength),x=h.uint8array?"uint8array":"array",c=o.transformTo(x,v);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var v,x,c,g=this.zip64EndOfCentralSize-44;0<g;)v=this.reader.readInt(2),x=this.reader.readInt(4),c=this.reader.readData(x),this.zip64ExtensibleData[v]={id:v,length:x,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var v,x;for(v=0;v<this.files.length;v++)x=this.files[v],this.reader.setIndex(x.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),x.readLocalPart(this.reader),x.handleUTF8(),x.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(v=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(v);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var v=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(v<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(v);var x=v;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(v=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(v),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var g=x-c;if(0<g)this.isSignature(x,n.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(v){this.reader=i(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},m.exports=f},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./compressedObject"),l=r("./crc32"),h=r("./utf8"),f=r("./compressions"),v=r("./support");function x(c,g){this.options=c,this.loadOptions=g}x.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var g,d;if(c.skip(22),this.fileNameLength=c.readInt(2),d=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(d),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=(function(b){for(var p in f)if(Object.prototype.hasOwnProperty.call(f,p)&&f[p].magic===b)return f[p];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,g,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var g=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(g),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),c==0&&(this.dosPermissions=63&this.externalFileAttributes),c==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var c=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var g,d,b,p=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<p;)g=c.readInt(2),d=c.readInt(2),b=c.readData(d),this.extraFields[g]={id:g,length:d,value:b};c.setIndex(p)},handleUTF8:function(){var c=v.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var d=o.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(d)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var p=o.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(p)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var g=i(c.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:h.utf8decode(g.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var g=i(c.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:h.utf8decode(g.readData(c.length-5))}return null}},m.exports=x},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,m,u){function i(g,d,b){this.name=g,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=d,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var o=r("./stream/StreamHelper"),n=r("./stream/DataWorker"),l=r("./utf8"),h=r("./compressedObject"),f=r("./stream/GenericWorker");i.prototype={internalStream:function(g){var d=null,b="string";try{if(!g)throw new Error("No output type specified.");var p=(b=g.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),d=this._decompressWorker();var y=!this._dataBinary;y&&!p&&(d=d.pipe(new l.Utf8EncodeWorker)),!y&&p&&(d=d.pipe(new l.Utf8DecodeWorker))}catch(j){(d=new f("error")).error(j)}return new o(d,b,"")},async:function(g,d){return this.internalStream(g).accumulate(d)},nodeStream:function(g,d){return this.internalStream(g||"nodebuffer").toNodejsStream(d)},_compressWorker:function(g,d){if(this._data instanceof h&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),h.createWorkerFrom(b,g,d)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof f?this._data:new n(this._data)}};for(var v=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],x=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<v.length;c++)i.prototype[v[c]]=x;m.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,m,u){(function(i){var o,n,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var h=0,f=new l(g),v=i.document.createTextNode("");f.observe(v,{characterData:!0}),o=function(){v.data=h=++h%2}}else if(i.setImmediate||i.MessageChannel===void 0)o="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var d=i.document.createElement("script");d.onreadystatechange=function(){g(),d.onreadystatechange=null,d.parentNode.removeChild(d),d=null},i.document.documentElement.appendChild(d)}:function(){setTimeout(g,0)};else{var x=new i.MessageChannel;x.port1.onmessage=g,o=function(){x.port2.postMessage(0)}}var c=[];function g(){var d,b;n=!0;for(var p=c.length;p;){for(b=c,c=[],d=-1;++d<p;)b[d]();p=c.length}n=!1}m.exports=function(d){c.push(d)!==1||n||o()}}).call(this,typeof Ce<"u"?Ce:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,m,u){var i=r("immediate");function o(){}var n={},l=["REJECTED"],h=["FULFILLED"],f=["PENDING"];function v(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,p!==o&&d(this,p)}function x(p,y,j){this.promise=p,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof j=="function"&&(this.onRejected=j,this.callRejected=this.otherCallRejected)}function c(p,y,j){i(function(){var N;try{N=y(j)}catch(A){return n.reject(p,A)}N===p?n.reject(p,new TypeError("Cannot resolve promise with itself")):n.resolve(p,N)})}function g(p){var y=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof y=="function")return function(){y.apply(p,arguments)}}function d(p,y){var j=!1;function N(P){j||(j=!0,n.reject(p,P))}function A(P){j||(j=!0,n.resolve(p,P))}var O=b(function(){y(A,N)});O.status==="error"&&N(O.value)}function b(p,y){var j={};try{j.value=p(y),j.status="success"}catch(N){j.status="error",j.value=N}return j}(m.exports=v).prototype.finally=function(p){if(typeof p!="function")return this;var y=this.constructor;return this.then(function(j){return y.resolve(p()).then(function(){return j})},function(j){return y.resolve(p()).then(function(){throw j})})},v.prototype.catch=function(p){return this.then(null,p)},v.prototype.then=function(p,y){if(typeof p!="function"&&this.state===h||typeof y!="function"&&this.state===l)return this;var j=new this.constructor(o);return this.state!==f?c(j,this.state===h?p:y,this.outcome):this.queue.push(new x(j,p,y)),j},x.prototype.callFulfilled=function(p){n.resolve(this.promise,p)},x.prototype.otherCallFulfilled=function(p){c(this.promise,this.onFulfilled,p)},x.prototype.callRejected=function(p){n.reject(this.promise,p)},x.prototype.otherCallRejected=function(p){c(this.promise,this.onRejected,p)},n.resolve=function(p,y){var j=b(g,y);if(j.status==="error")return n.reject(p,j.value);var N=j.value;if(N)d(p,N);else{p.state=h,p.outcome=y;for(var A=-1,O=p.queue.length;++A<O;)p.queue[A].callFulfilled(y)}return p},n.reject=function(p,y){p.state=l,p.outcome=y;for(var j=-1,N=p.queue.length;++j<N;)p.queue[j].callRejected(y);return p},v.resolve=function(p){return p instanceof this?p:n.resolve(new this(o),p)},v.reject=function(p){var y=new this(o);return n.reject(y,p)},v.all=function(p){var y=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=p.length,N=!1;if(!j)return this.resolve([]);for(var A=new Array(j),O=0,P=-1,F=new this(o);++P<j;)D(p[P],P);return F;function D(U,te){y.resolve(U).then(function(E){A[te]=E,++O!==j||N||(N=!0,n.resolve(F,A))},function(E){N||(N=!0,n.reject(F,E))})}},v.race=function(p){var y=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=p.length,N=!1;if(!j)return this.resolve([]);for(var A=-1,O=new this(o);++A<j;)P=p[A],y.resolve(P).then(function(F){N||(N=!0,n.resolve(O,F))},function(F){N||(N=!0,n.reject(O,F))});var P;return O}},{immediate:36}],38:[function(r,m,u){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),m.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,m,u){var i=r("./zlib/deflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/messages"),h=r("./zlib/zstream"),f=Object.prototype.toString,v=0,x=-1,c=0,g=8;function d(p){if(!(this instanceof d))return new d(p);this.options=o.assign({level:x,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},p||{});var y=this.options;y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var j=i.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(j!==v)throw new Error(l[j]);if(y.header&&i.deflateSetHeader(this.strm,y.header),y.dictionary){var N;if(N=typeof y.dictionary=="string"?n.string2buf(y.dictionary):f.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(j=i.deflateSetDictionary(this.strm,N))!==v)throw new Error(l[j]);this._dict_set=!0}}function b(p,y){var j=new d(y);if(j.push(p,!0),j.err)throw j.msg||l[j.err];return j.result}d.prototype.push=function(p,y){var j,N,A=this.strm,O=this.options.chunkSize;if(this.ended)return!1;N=y===~~y?y:y===!0?4:0,typeof p=="string"?A.input=n.string2buf(p):f.call(p)==="[object ArrayBuffer]"?A.input=new Uint8Array(p):A.input=p,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&&(A.output=new o.Buf8(O),A.next_out=0,A.avail_out=O),(j=i.deflate(A,N))!==1&&j!==v)return this.onEnd(j),!(this.ended=!0);A.avail_out!==0&&(A.avail_in!==0||N!==4&&N!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(o.shrinkBuf(A.output,A.next_out))):this.onData(o.shrinkBuf(A.output,A.next_out)))}while((0<A.avail_in||A.avail_out===0)&&j!==1);return N===4?(j=i.deflateEnd(this.strm),this.onEnd(j),this.ended=!0,j===v):N!==2||(this.onEnd(v),!(A.avail_out=0))},d.prototype.onData=function(p){this.chunks.push(p)},d.prototype.onEnd=function(p){p===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},u.Deflate=d,u.deflate=b,u.deflateRaw=function(p,y){return(y=y||{}).raw=!0,b(p,y)},u.gzip=function(p,y){return(y=y||{}).gzip=!0,b(p,y)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,m,u){var i=r("./zlib/inflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/constants"),h=r("./zlib/messages"),f=r("./zlib/zstream"),v=r("./zlib/gzheader"),x=Object.prototype.toString;function c(d){if(!(this instanceof c))return new c(d);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},d||{});var b=this.options;b.raw&&0<=b.windowBits&&b.windowBits<16&&(b.windowBits=-b.windowBits,b.windowBits===0&&(b.windowBits=-15)),!(0<=b.windowBits&&b.windowBits<16)||d&&d.windowBits||(b.windowBits+=32),15<b.windowBits&&b.windowBits<48&&(15&b.windowBits)==0&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var p=i.inflateInit2(this.strm,b.windowBits);if(p!==l.Z_OK)throw new Error(h[p]);this.header=new v,i.inflateGetHeader(this.strm,this.header)}function g(d,b){var p=new c(b);if(p.push(d,!0),p.err)throw p.msg||h[p.err];return p.result}c.prototype.push=function(d,b){var p,y,j,N,A,O,P=this.strm,F=this.options.chunkSize,D=this.options.dictionary,U=!1;if(this.ended)return!1;y=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof d=="string"?P.input=n.binstring2buf(d):x.call(d)==="[object ArrayBuffer]"?P.input=new Uint8Array(d):P.input=d,P.next_in=0,P.avail_in=P.input.length;do{if(P.avail_out===0&&(P.output=new o.Buf8(F),P.next_out=0,P.avail_out=F),(p=i.inflate(P,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&D&&(O=typeof D=="string"?n.string2buf(D):x.call(D)==="[object ArrayBuffer]"?new Uint8Array(D):D,p=i.inflateSetDictionary(this.strm,O)),p===l.Z_BUF_ERROR&&U===!0&&(p=l.Z_OK,U=!1),p!==l.Z_STREAM_END&&p!==l.Z_OK)return this.onEnd(p),!(this.ended=!0);P.next_out&&(P.avail_out!==0&&p!==l.Z_STREAM_END&&(P.avail_in!==0||y!==l.Z_FINISH&&y!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(j=n.utf8border(P.output,P.next_out),N=P.next_out-j,A=n.buf2string(P.output,j),P.next_out=N,P.avail_out=F-N,N&&o.arraySet(P.output,P.output,j,N,0),this.onData(A)):this.onData(o.shrinkBuf(P.output,P.next_out)))),P.avail_in===0&&P.avail_out===0&&(U=!0)}while((0<P.avail_in||P.avail_out===0)&&p!==l.Z_STREAM_END);return p===l.Z_STREAM_END&&(y=l.Z_FINISH),y===l.Z_FINISH?(p=i.inflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===l.Z_OK):y!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(P.avail_out=0))},c.prototype.onData=function(d){this.chunks.push(d)},c.prototype.onEnd=function(d){d===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=d,this.msg=this.strm.msg},u.Inflate=c,u.inflate=g,u.inflateRaw=function(d,b){return(b=b||{}).raw=!0,g(d,b)},u.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(l){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var f=h.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var v in f)f.hasOwnProperty(v)&&(l[v]=f[v])}}return l},u.shrinkBuf=function(l,h){return l.length===h?l:l.subarray?l.subarray(0,h):(l.length=h,l)};var o={arraySet:function(l,h,f,v,x){if(h.subarray&&l.subarray)l.set(h.subarray(f,f+v),x);else for(var c=0;c<v;c++)l[x+c]=h[f+c]},flattenChunks:function(l){var h,f,v,x,c,g;for(h=v=0,f=l.length;h<f;h++)v+=l[h].length;for(g=new Uint8Array(v),h=x=0,f=l.length;h<f;h++)c=l[h],g.set(c,x),x+=c.length;return g}},n={arraySet:function(l,h,f,v,x){for(var c=0;c<v;c++)l[x+c]=h[f+c]},flattenChunks:function(l){return[].concat.apply([],l)}};u.setTyped=function(l){l?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,o)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,n))},u.setTyped(i)},{}],42:[function(r,m,u){var i=r("./common"),o=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var l=new i.Buf8(256),h=0;h<256;h++)l[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function f(v,x){if(x<65537&&(v.subarray&&n||!v.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(v,x));for(var c="",g=0;g<x;g++)c+=String.fromCharCode(v[g]);return c}l[254]=l[254]=1,u.string2buf=function(v){var x,c,g,d,b,p=v.length,y=0;for(d=0;d<p;d++)(64512&(c=v.charCodeAt(d)))==55296&&d+1<p&&(64512&(g=v.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),d++),y+=c<128?1:c<2048?2:c<65536?3:4;for(x=new i.Buf8(y),d=b=0;b<y;d++)(64512&(c=v.charCodeAt(d)))==55296&&d+1<p&&(64512&(g=v.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),d++),c<128?x[b++]=c:(c<2048?x[b++]=192|c>>>6:(c<65536?x[b++]=224|c>>>12:(x[b++]=240|c>>>18,x[b++]=128|c>>>12&63),x[b++]=128|c>>>6&63),x[b++]=128|63&c);return x},u.buf2binstring=function(v){return f(v,v.length)},u.binstring2buf=function(v){for(var x=new i.Buf8(v.length),c=0,g=x.length;c<g;c++)x[c]=v.charCodeAt(c);return x},u.buf2string=function(v,x){var c,g,d,b,p=x||v.length,y=new Array(2*p);for(c=g=0;c<p;)if((d=v[c++])<128)y[g++]=d;else if(4<(b=l[d]))y[g++]=65533,c+=b-1;else{for(d&=b===2?31:b===3?15:7;1<b&&c<p;)d=d<<6|63&v[c++],b--;1<b?y[g++]=65533:d<65536?y[g++]=d:(d-=65536,y[g++]=55296|d>>10&1023,y[g++]=56320|1023&d)}return f(y,g)},u.utf8border=function(v,x){var c;for((x=x||v.length)>v.length&&(x=v.length),c=x-1;0<=c&&(192&v[c])==128;)c--;return c<0||c===0?x:c+l[v[c]]>x?c:x}},{"./common":41}],43:[function(r,m,u){m.exports=function(i,o,n,l){for(var h=65535&i|0,f=i>>>16&65535|0,v=0;n!==0;){for(n-=v=2e3<n?2e3:n;f=f+(h=h+o[l++]|0)|0,--v;);h%=65521,f%=65521}return h|f<<16|0}},{}],44:[function(r,m,u){m.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,m,u){var i=(function(){for(var o,n=[],l=0;l<256;l++){o=l;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;n[l]=o}return n})();m.exports=function(o,n,l,h){var f=i,v=h+l;o^=-1;for(var x=h;x<v;x++)o=o>>>8^f[255&(o^n[x])];return-1^o}},{}],46:[function(r,m,u){var i,o=r("../utils/common"),n=r("./trees"),l=r("./adler32"),h=r("./crc32"),f=r("./messages"),v=0,x=4,c=0,g=-2,d=-1,b=4,p=2,y=8,j=9,N=286,A=30,O=19,P=2*N+1,F=15,D=3,U=258,te=U+D+1,E=42,M=113,a=1,W=2,ee=3,$=4;function G(t,T){return t.msg=f[T],T}function H(t){return(t<<1)-(4<t?9:0)}function q(t){for(var T=t.length;0<=--T;)t[T]=0}function z(t){var T=t.state,R=T.pending;R>t.avail_out&&(R=t.avail_out),R!==0&&(o.arraySet(t.output,T.pending_buf,T.pending_out,R,t.next_out),t.next_out+=R,T.pending_out+=R,t.total_out+=R,t.avail_out-=R,T.pending-=R,T.pending===0&&(T.pending_out=0))}function S(t,T){n._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,T),t.block_start=t.strstart,z(t.strm)}function K(t,T){t.pending_buf[t.pending++]=T}function V(t,T){t.pending_buf[t.pending++]=T>>>8&255,t.pending_buf[t.pending++]=255&T}function Q(t,T){var R,_,w=t.max_chain_length,I=t.strstart,Z=t.prev_length,L=t.nice_match,C=t.strstart>t.w_size-te?t.strstart-(t.w_size-te):0,B=t.window,Y=t.w_mask,X=t.prev,oe=t.strstart+U,he=B[I+Z-1],le=B[I+Z];t.prev_length>=t.good_match&&(w>>=2),L>t.lookahead&&(L=t.lookahead);do if(B[(R=T)+Z]===le&&B[R+Z-1]===he&&B[R]===B[I]&&B[++R]===B[I+1]){I+=2,R++;do;while(B[++I]===B[++R]&&B[++I]===B[++R]&&B[++I]===B[++R]&&B[++I]===B[++R]&&B[++I]===B[++R]&&B[++I]===B[++R]&&B[++I]===B[++R]&&B[++I]===B[++R]&&I<oe);if(_=U-(oe-I),I=oe-U,Z<_){if(t.match_start=T,L<=(Z=_))break;he=B[I+Z-1],le=B[I+Z]}}while((T=X[T&Y])>C&&--w!=0);return Z<=t.lookahead?Z:t.lookahead}function de(t){var T,R,_,w,I,Z,L,C,B,Y,X=t.w_size;do{if(w=t.window_size-t.lookahead-t.strstart,t.strstart>=X+(X-te)){for(o.arraySet(t.window,t.window,X,X,0),t.match_start-=X,t.strstart-=X,t.block_start-=X,T=R=t.hash_size;_=t.head[--T],t.head[T]=X<=_?_-X:0,--R;);for(T=R=X;_=t.prev[--T],t.prev[T]=X<=_?_-X:0,--R;);w+=X}if(t.strm.avail_in===0)break;if(Z=t.strm,L=t.window,C=t.strstart+t.lookahead,B=w,Y=void 0,Y=Z.avail_in,B<Y&&(Y=B),R=Y===0?0:(Z.avail_in-=Y,o.arraySet(L,Z.input,Z.next_in,Y,C),Z.state.wrap===1?Z.adler=l(Z.adler,L,Y,C):Z.state.wrap===2&&(Z.adler=h(Z.adler,L,Y,C)),Z.next_in+=Y,Z.total_in+=Y,Y),t.lookahead+=R,t.lookahead+t.insert>=D)for(I=t.strstart-t.insert,t.ins_h=t.window[I],t.ins_h=(t.ins_h<<t.hash_shift^t.window[I+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[I+D-1])&t.hash_mask,t.prev[I&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=I,I++,t.insert--,!(t.lookahead+t.insert<D)););}while(t.lookahead<te&&t.strm.avail_in!==0)}function ie(t,T){for(var R,_;;){if(t.lookahead<te){if(de(t),t.lookahead<te&&T===v)return a;if(t.lookahead===0)break}if(R=0,t.lookahead>=D&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,R=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),R!==0&&t.strstart-R<=t.w_size-te&&(t.match_length=Q(t,R)),t.match_length>=D)if(_=n._tr_tally(t,t.strstart-t.match_start,t.match_length-D),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=D){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,R=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,--t.match_length!=0;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else _=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(_&&(S(t,!1),t.strm.avail_out===0))return a}return t.insert=t.strstart<D-1?t.strstart:D-1,T===x?(S(t,!0),t.strm.avail_out===0?ee:$):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?a:W}function ae(t,T){for(var R,_,w;;){if(t.lookahead<te){if(de(t),t.lookahead<te&&T===v)return a;if(t.lookahead===0)break}if(R=0,t.lookahead>=D&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,R=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=D-1,R!==0&&t.prev_length<t.max_lazy_match&&t.strstart-R<=t.w_size-te&&(t.match_length=Q(t,R),t.match_length<=5&&(t.strategy===1||t.match_length===D&&4096<t.strstart-t.match_start)&&(t.match_length=D-1)),t.prev_length>=D&&t.match_length<=t.prev_length){for(w=t.strstart+t.lookahead-D,_=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-D),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=w&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,R=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),--t.prev_length!=0;);if(t.match_available=0,t.match_length=D-1,t.strstart++,_&&(S(t,!1),t.strm.avail_out===0))return a}else if(t.match_available){if((_=n._tr_tally(t,0,t.window[t.strstart-1]))&&S(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return a}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(_=n._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<D-1?t.strstart:D-1,T===x?(S(t,!0),t.strm.avail_out===0?ee:$):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?a:W}function se(t,T,R,_,w){this.good_length=t,this.max_lazy=T,this.nice_length=R,this.max_chain=_,this.func=w}function pe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*P),this.dyn_dtree=new o.Buf16(2*(2*A+1)),this.bl_tree=new o.Buf16(2*(2*O+1)),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(F+1),this.heap=new o.Buf16(2*N+1),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*N+1),q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function be(t){var T;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=p,(T=t.state).pending=0,T.pending_out=0,T.wrap<0&&(T.wrap=-T.wrap),T.status=T.wrap?E:M,t.adler=T.wrap===2?0:1,T.last_flush=v,n._tr_init(T),c):G(t,g)}function xe(t){var T=be(t);return T===c&&(function(R){R.window_size=2*R.w_size,q(R.head),R.max_lazy_match=i[R.level].max_lazy,R.good_match=i[R.level].good_length,R.nice_match=i[R.level].nice_length,R.max_chain_length=i[R.level].max_chain,R.strstart=0,R.block_start=0,R.lookahead=0,R.insert=0,R.match_length=R.prev_length=D-1,R.match_available=0,R.ins_h=0})(t.state),T}function ke(t,T,R,_,w,I){if(!t)return g;var Z=1;if(T===d&&(T=6),_<0?(Z=0,_=-_):15<_&&(Z=2,_-=16),w<1||j<w||R!==y||_<8||15<_||T<0||9<T||I<0||b<I)return G(t,g);_===8&&(_=9);var L=new pe;return(t.state=L).strm=t,L.wrap=Z,L.gzhead=null,L.w_bits=_,L.w_size=1<<L.w_bits,L.w_mask=L.w_size-1,L.hash_bits=w+7,L.hash_size=1<<L.hash_bits,L.hash_mask=L.hash_size-1,L.hash_shift=~~((L.hash_bits+D-1)/D),L.window=new o.Buf8(2*L.w_size),L.head=new o.Buf16(L.hash_size),L.prev=new o.Buf16(L.w_size),L.lit_bufsize=1<<w+6,L.pending_buf_size=4*L.lit_bufsize,L.pending_buf=new o.Buf8(L.pending_buf_size),L.d_buf=1*L.lit_bufsize,L.l_buf=3*L.lit_bufsize,L.level=T,L.strategy=I,L.method=R,xe(t)}i=[new se(0,0,0,0,function(t,T){var R=65535;for(R>t.pending_buf_size-5&&(R=t.pending_buf_size-5);;){if(t.lookahead<=1){if(de(t),t.lookahead===0&&T===v)return a;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var _=t.block_start+R;if((t.strstart===0||t.strstart>=_)&&(t.lookahead=t.strstart-_,t.strstart=_,S(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-te&&(S(t,!1),t.strm.avail_out===0))return a}return t.insert=0,T===x?(S(t,!0),t.strm.avail_out===0?ee:$):(t.strstart>t.block_start&&(S(t,!1),t.strm.avail_out),a)}),new se(4,4,8,4,ie),new se(4,5,16,8,ie),new se(4,6,32,32,ie),new se(4,4,16,16,ae),new se(8,16,32,32,ae),new se(8,16,128,128,ae),new se(8,32,128,256,ae),new se(32,128,258,1024,ae),new se(32,258,258,4096,ae)],u.deflateInit=function(t,T){return ke(t,T,y,15,8,0)},u.deflateInit2=ke,u.deflateReset=xe,u.deflateResetKeep=be,u.deflateSetHeader=function(t,T){return t&&t.state?t.state.wrap!==2?g:(t.state.gzhead=T,c):g},u.deflate=function(t,T){var R,_,w,I;if(!t||!t.state||5<T||T<0)return t?G(t,g):g;if(_=t.state,!t.output||!t.input&&t.avail_in!==0||_.status===666&&T!==x)return G(t,t.avail_out===0?-5:g);if(_.strm=t,R=_.last_flush,_.last_flush=T,_.status===E)if(_.wrap===2)t.adler=0,K(_,31),K(_,139),K(_,8),_.gzhead?(K(_,(_.gzhead.text?1:0)+(_.gzhead.hcrc?2:0)+(_.gzhead.extra?4:0)+(_.gzhead.name?8:0)+(_.gzhead.comment?16:0)),K(_,255&_.gzhead.time),K(_,_.gzhead.time>>8&255),K(_,_.gzhead.time>>16&255),K(_,_.gzhead.time>>24&255),K(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),K(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(K(_,255&_.gzhead.extra.length),K(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(t.adler=h(t.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(K(_,0),K(_,0),K(_,0),K(_,0),K(_,0),K(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),K(_,3),_.status=M);else{var Z=y+(_.w_bits-8<<4)<<8;Z|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&(Z|=32),Z+=31-Z%31,_.status=M,V(_,Z),_.strstart!==0&&(V(_,t.adler>>>16),V(_,65535&t.adler)),t.adler=1}if(_.status===69)if(_.gzhead.extra){for(w=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),z(t),w=_.pending,_.pending!==_.pending_buf_size));)K(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){w=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),z(t),w=_.pending,_.pending===_.pending_buf_size)){I=1;break}I=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,K(_,I)}while(I!==0);_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),I===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){w=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),z(t),w=_.pending,_.pending===_.pending_buf_size)){I=1;break}I=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,K(_,I)}while(I!==0);_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),I===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&z(t),_.pending+2<=_.pending_buf_size&&(K(_,255&t.adler),K(_,t.adler>>8&255),t.adler=0,_.status=M)):_.status=M),_.pending!==0){if(z(t),t.avail_out===0)return _.last_flush=-1,c}else if(t.avail_in===0&&H(T)<=H(R)&&T!==x)return G(t,-5);if(_.status===666&&t.avail_in!==0)return G(t,-5);if(t.avail_in!==0||_.lookahead!==0||T!==v&&_.status!==666){var L=_.strategy===2?(function(C,B){for(var Y;;){if(C.lookahead===0&&(de(C),C.lookahead===0)){if(B===v)return a;break}if(C.match_length=0,Y=n._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++,Y&&(S(C,!1),C.strm.avail_out===0))return a}return C.insert=0,B===x?(S(C,!0),C.strm.avail_out===0?ee:$):C.last_lit&&(S(C,!1),C.strm.avail_out===0)?a:W})(_,T):_.strategy===3?(function(C,B){for(var Y,X,oe,he,le=C.window;;){if(C.lookahead<=U){if(de(C),C.lookahead<=U&&B===v)return a;if(C.lookahead===0)break}if(C.match_length=0,C.lookahead>=D&&0<C.strstart&&(X=le[oe=C.strstart-1])===le[++oe]&&X===le[++oe]&&X===le[++oe]){he=C.strstart+U;do;while(X===le[++oe]&&X===le[++oe]&&X===le[++oe]&&X===le[++oe]&&X===le[++oe]&&X===le[++oe]&&X===le[++oe]&&X===le[++oe]&&oe<he);C.match_length=U-(he-oe),C.match_length>C.lookahead&&(C.match_length=C.lookahead)}if(C.match_length>=D?(Y=n._tr_tally(C,1,C.match_length-D),C.lookahead-=C.match_length,C.strstart+=C.match_length,C.match_length=0):(Y=n._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++),Y&&(S(C,!1),C.strm.avail_out===0))return a}return C.insert=0,B===x?(S(C,!0),C.strm.avail_out===0?ee:$):C.last_lit&&(S(C,!1),C.strm.avail_out===0)?a:W})(_,T):i[_.level].func(_,T);if(L!==ee&&L!==$||(_.status=666),L===a||L===ee)return t.avail_out===0&&(_.last_flush=-1),c;if(L===W&&(T===1?n._tr_align(_):T!==5&&(n._tr_stored_block(_,0,0,!1),T===3&&(q(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),z(t),t.avail_out===0))return _.last_flush=-1,c}return T!==x?c:_.wrap<=0?1:(_.wrap===2?(K(_,255&t.adler),K(_,t.adler>>8&255),K(_,t.adler>>16&255),K(_,t.adler>>24&255),K(_,255&t.total_in),K(_,t.total_in>>8&255),K(_,t.total_in>>16&255),K(_,t.total_in>>24&255)):(V(_,t.adler>>>16),V(_,65535&t.adler)),z(t),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?c:1)},u.deflateEnd=function(t){var T;return t&&t.state?(T=t.state.status)!==E&&T!==69&&T!==73&&T!==91&&T!==103&&T!==M&&T!==666?G(t,g):(t.state=null,T===M?G(t,-3):c):g},u.deflateSetDictionary=function(t,T){var R,_,w,I,Z,L,C,B,Y=T.length;if(!t||!t.state||(I=(R=t.state).wrap)===2||I===1&&R.status!==E||R.lookahead)return g;for(I===1&&(t.adler=l(t.adler,T,Y,0)),R.wrap=0,Y>=R.w_size&&(I===0&&(q(R.head),R.strstart=0,R.block_start=0,R.insert=0),B=new o.Buf8(R.w_size),o.arraySet(B,T,Y-R.w_size,R.w_size,0),T=B,Y=R.w_size),Z=t.avail_in,L=t.next_in,C=t.input,t.avail_in=Y,t.next_in=0,t.input=T,de(R);R.lookahead>=D;){for(_=R.strstart,w=R.lookahead-(D-1);R.ins_h=(R.ins_h<<R.hash_shift^R.window[_+D-1])&R.hash_mask,R.prev[_&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=_,_++,--w;);R.strstart=_,R.lookahead=D-1,de(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=D-1,R.match_available=0,t.next_in=L,t.input=C,t.avail_in=Z,R.wrap=I,c},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,m,u){m.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,m,u){m.exports=function(i,o){var n,l,h,f,v,x,c,g,d,b,p,y,j,N,A,O,P,F,D,U,te,E,M,a,W;n=i.state,l=i.next_in,a=i.input,h=l+(i.avail_in-5),f=i.next_out,W=i.output,v=f-(o-i.avail_out),x=f+(i.avail_out-257),c=n.dmax,g=n.wsize,d=n.whave,b=n.wnext,p=n.window,y=n.hold,j=n.bits,N=n.lencode,A=n.distcode,O=(1<<n.lenbits)-1,P=(1<<n.distbits)-1;e:do{j<15&&(y+=a[l++]<<j,j+=8,y+=a[l++]<<j,j+=8),F=N[y&O];t:for(;;){if(y>>>=D=F>>>24,j-=D,(D=F>>>16&255)===0)W[f++]=65535&F;else{if(!(16&D)){if((64&D)==0){F=N[(65535&F)+(y&(1<<D)-1)];continue t}if(32&D){n.mode=12;break e}i.msg="invalid literal/length code",n.mode=30;break e}U=65535&F,(D&=15)&&(j<D&&(y+=a[l++]<<j,j+=8),U+=y&(1<<D)-1,y>>>=D,j-=D),j<15&&(y+=a[l++]<<j,j+=8,y+=a[l++]<<j,j+=8),F=A[y&P];r:for(;;){if(y>>>=D=F>>>24,j-=D,!(16&(D=F>>>16&255))){if((64&D)==0){F=A[(65535&F)+(y&(1<<D)-1)];continue r}i.msg="invalid distance code",n.mode=30;break e}if(te=65535&F,j<(D&=15)&&(y+=a[l++]<<j,(j+=8)<D&&(y+=a[l++]<<j,j+=8)),c<(te+=y&(1<<D)-1)){i.msg="invalid distance too far back",n.mode=30;break e}if(y>>>=D,j-=D,(D=f-v)<te){if(d<(D=te-D)&&n.sane){i.msg="invalid distance too far back",n.mode=30;break e}if(M=p,(E=0)===b){if(E+=g-D,D<U){for(U-=D;W[f++]=p[E++],--D;);E=f-te,M=W}}else if(b<D){if(E+=g+b-D,(D-=b)<U){for(U-=D;W[f++]=p[E++],--D;);if(E=0,b<U){for(U-=D=b;W[f++]=p[E++],--D;);E=f-te,M=W}}}else if(E+=b-D,D<U){for(U-=D;W[f++]=p[E++],--D;);E=f-te,M=W}for(;2<U;)W[f++]=M[E++],W[f++]=M[E++],W[f++]=M[E++],U-=3;U&&(W[f++]=M[E++],1<U&&(W[f++]=M[E++]))}else{for(E=f-te;W[f++]=W[E++],W[f++]=W[E++],W[f++]=W[E++],2<(U-=3););U&&(W[f++]=W[E++],1<U&&(W[f++]=W[E++]))}break}}break}}while(l<h&&f<x);l-=U=j>>3,y&=(1<<(j-=U<<3))-1,i.next_in=l,i.next_out=f,i.avail_in=l<h?h-l+5:5-(l-h),i.avail_out=f<x?x-f+257:257-(f-x),n.hold=y,n.bits=j}},{}],49:[function(r,m,u){var i=r("../utils/common"),o=r("./adler32"),n=r("./crc32"),l=r("./inffast"),h=r("./inftrees"),f=1,v=2,x=0,c=-2,g=1,d=852,b=592;function p(E){return(E>>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function j(E){var M;return E&&E.state?(M=E.state,E.total_in=E.total_out=M.total=0,E.msg="",M.wrap&&(E.adler=1&M.wrap),M.mode=g,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new i.Buf32(d),M.distcode=M.distdyn=new i.Buf32(b),M.sane=1,M.back=-1,x):c}function N(E){var M;return E&&E.state?((M=E.state).wsize=0,M.whave=0,M.wnext=0,j(E)):c}function A(E,M){var a,W;return E&&E.state?(W=E.state,M<0?(a=0,M=-M):(a=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15<M)?c:(W.window!==null&&W.wbits!==M&&(W.window=null),W.wrap=a,W.wbits=M,N(E))):c}function O(E,M){var a,W;return E?(W=new y,(E.state=W).window=null,(a=A(E,M))!==x&&(E.state=null),a):c}var P,F,D=!0;function U(E){if(D){var M;for(P=new i.Buf32(512),F=new i.Buf32(32),M=0;M<144;)E.lens[M++]=8;for(;M<256;)E.lens[M++]=9;for(;M<280;)E.lens[M++]=7;for(;M<288;)E.lens[M++]=8;for(h(f,E.lens,0,288,P,0,E.work,{bits:9}),M=0;M<32;)E.lens[M++]=5;h(v,E.lens,0,32,F,0,E.work,{bits:5}),D=!1}E.lencode=P,E.lenbits=9,E.distcode=F,E.distbits=5}function te(E,M,a,W){var ee,$=E.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new i.Buf8($.wsize)),W>=$.wsize?(i.arraySet($.window,M,a-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(W<(ee=$.wsize-$.wnext)&&(ee=W),i.arraySet($.window,M,a-W,ee,$.wnext),(W-=ee)?(i.arraySet($.window,M,a-W,W,0),$.wnext=W,$.whave=$.wsize):($.wnext+=ee,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=ee))),0}u.inflateReset=N,u.inflateReset2=A,u.inflateResetKeep=j,u.inflateInit=function(E){return O(E,15)},u.inflateInit2=O,u.inflate=function(E,M){var a,W,ee,$,G,H,q,z,S,K,V,Q,de,ie,ae,se,pe,be,xe,ke,t,T,R,_,w=0,I=new i.Buf8(4),Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!E||!E.state||!E.output||!E.input&&E.avail_in!==0)return c;(a=E.state).mode===12&&(a.mode=13),G=E.next_out,ee=E.output,q=E.avail_out,$=E.next_in,W=E.input,H=E.avail_in,z=a.hold,S=a.bits,K=H,V=q,T=x;e:for(;;)switch(a.mode){case g:if(a.wrap===0){a.mode=13;break}for(;S<16;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if(2&a.wrap&&z===35615){I[a.check=0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0),S=z=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&z)<<8)+(z>>8))%31){E.msg="incorrect header check",a.mode=30;break}if((15&z)!=8){E.msg="unknown compression method",a.mode=30;break}if(S-=4,t=8+(15&(z>>>=4)),a.wbits===0)a.wbits=t;else if(t>a.wbits){E.msg="invalid window size",a.mode=30;break}a.dmax=1<<t,E.adler=a.check=1,a.mode=512&z?10:12,S=z=0;break;case 2:for(;S<16;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if(a.flags=z,(255&a.flags)!=8){E.msg="unknown compression method",a.mode=30;break}if(57344&a.flags){E.msg="unknown header flags set",a.mode=30;break}a.head&&(a.head.text=z>>8&1),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0)),S=z=0,a.mode=3;case 3:for(;S<32;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}a.head&&(a.head.time=z),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,I[2]=z>>>16&255,I[3]=z>>>24&255,a.check=n(a.check,I,4,0)),S=z=0,a.mode=4;case 4:for(;S<16;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}a.head&&(a.head.xflags=255&z,a.head.os=z>>8),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0)),S=z=0,a.mode=5;case 5:if(1024&a.flags){for(;S<16;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}a.length=z,a.head&&(a.head.extra_len=z),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0)),S=z=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(H<(Q=a.length)&&(Q=H),Q&&(a.head&&(t=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),i.arraySet(a.head.extra,W,$,Q,t)),512&a.flags&&(a.check=n(a.check,W,Q,$)),H-=Q,$+=Q,a.length-=Q),a.length))break e;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(H===0)break e;for(Q=0;t=W[$+Q++],a.head&&t&&a.length<65536&&(a.head.name+=String.fromCharCode(t)),t&&Q<H;);if(512&a.flags&&(a.check=n(a.check,W,Q,$)),H-=Q,$+=Q,t)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=8;case 8:if(4096&a.flags){if(H===0)break e;for(Q=0;t=W[$+Q++],a.head&&t&&a.length<65536&&(a.head.comment+=String.fromCharCode(t)),t&&Q<H;);if(512&a.flags&&(a.check=n(a.check,W,Q,$)),H-=Q,$+=Q,t)break e}else a.head&&(a.head.comment=null);a.mode=9;case 9:if(512&a.flags){for(;S<16;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if(z!==(65535&a.check)){E.msg="header crc mismatch",a.mode=30;break}S=z=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),E.adler=a.check=0,a.mode=12;break;case 10:for(;S<32;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}E.adler=a.check=p(z),S=z=0,a.mode=11;case 11:if(a.havedict===0)return E.next_out=G,E.avail_out=q,E.next_in=$,E.avail_in=H,a.hold=z,a.bits=S,2;E.adler=a.check=1,a.mode=12;case 12:if(M===5||M===6)break e;case 13:if(a.last){z>>>=7&S,S-=7&S,a.mode=27;break}for(;S<3;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}switch(a.last=1&z,S-=1,3&(z>>>=1)){case 0:a.mode=14;break;case 1:if(U(a),a.mode=20,M!==6)break;z>>>=2,S-=2;break e;case 2:a.mode=17;break;case 3:E.msg="invalid block type",a.mode=30}z>>>=2,S-=2;break;case 14:for(z>>>=7&S,S-=7&S;S<32;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if((65535&z)!=(z>>>16^65535)){E.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&z,S=z=0,a.mode=15,M===6)break e;case 15:a.mode=16;case 16:if(Q=a.length){if(H<Q&&(Q=H),q<Q&&(Q=q),Q===0)break e;i.arraySet(ee,W,$,Q,G),H-=Q,$+=Q,q-=Q,G+=Q,a.length-=Q;break}a.mode=12;break;case 17:for(;S<14;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if(a.nlen=257+(31&z),z>>>=5,S-=5,a.ndist=1+(31&z),z>>>=5,S-=5,a.ncode=4+(15&z),z>>>=4,S-=4,286<a.nlen||30<a.ndist){E.msg="too many length or distance symbols",a.mode=30;break}a.have=0,a.mode=18;case 18:for(;a.have<a.ncode;){for(;S<3;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}a.lens[Z[a.have++]]=7&z,z>>>=3,S-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,R={bits:a.lenbits},T=h(0,a.lens,0,19,a.lencode,0,a.work,R),a.lenbits=R.bits,T){E.msg="invalid code lengths set",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have<a.nlen+a.ndist;){for(;se=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,pe=65535&w,!((ae=w>>>24)<=S);){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if(pe<16)z>>>=ae,S-=ae,a.lens[a.have++]=pe;else{if(pe===16){for(_=ae+2;S<_;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if(z>>>=ae,S-=ae,a.have===0){E.msg="invalid bit length repeat",a.mode=30;break}t=a.lens[a.have-1],Q=3+(3&z),z>>>=2,S-=2}else if(pe===17){for(_=ae+3;S<_;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}S-=ae,t=0,Q=3+(7&(z>>>=ae)),z>>>=3,S-=3}else{for(_=ae+7;S<_;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}S-=ae,t=0,Q=11+(127&(z>>>=ae)),z>>>=7,S-=7}if(a.have+Q>a.nlen+a.ndist){E.msg="invalid bit length repeat",a.mode=30;break}for(;Q--;)a.lens[a.have++]=t}}if(a.mode===30)break;if(a.lens[256]===0){E.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,R={bits:a.lenbits},T=h(f,a.lens,0,a.nlen,a.lencode,0,a.work,R),a.lenbits=R.bits,T){E.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,R={bits:a.distbits},T=h(v,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,R),a.distbits=R.bits,T){E.msg="invalid distances set",a.mode=30;break}if(a.mode=20,M===6)break e;case 20:a.mode=21;case 21:if(6<=H&&258<=q){E.next_out=G,E.avail_out=q,E.next_in=$,E.avail_in=H,a.hold=z,a.bits=S,l(E,V),G=E.next_out,ee=E.output,q=E.avail_out,$=E.next_in,W=E.input,H=E.avail_in,z=a.hold,S=a.bits,a.mode===12&&(a.back=-1);break}for(a.back=0;se=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,pe=65535&w,!((ae=w>>>24)<=S);){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if(se&&(240&se)==0){for(be=ae,xe=se,ke=pe;se=(w=a.lencode[ke+((z&(1<<be+xe)-1)>>be)])>>>16&255,pe=65535&w,!(be+(ae=w>>>24)<=S);){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}z>>>=be,S-=be,a.back+=be}if(z>>>=ae,S-=ae,a.back+=ae,a.length=pe,se===0){a.mode=26;break}if(32&se){a.back=-1,a.mode=12;break}if(64&se){E.msg="invalid literal/length code",a.mode=30;break}a.extra=15&se,a.mode=22;case 22:if(a.extra){for(_=a.extra;S<_;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}a.length+=z&(1<<a.extra)-1,z>>>=a.extra,S-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;se=(w=a.distcode[z&(1<<a.distbits)-1])>>>16&255,pe=65535&w,!((ae=w>>>24)<=S);){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if((240&se)==0){for(be=ae,xe=se,ke=pe;se=(w=a.distcode[ke+((z&(1<<be+xe)-1)>>be)])>>>16&255,pe=65535&w,!(be+(ae=w>>>24)<=S);){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}z>>>=be,S-=be,a.back+=be}if(z>>>=ae,S-=ae,a.back+=ae,64&se){E.msg="invalid distance code",a.mode=30;break}a.offset=pe,a.extra=15&se,a.mode=24;case 24:if(a.extra){for(_=a.extra;S<_;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}a.offset+=z&(1<<a.extra)-1,z>>>=a.extra,S-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){E.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(q===0)break e;if(Q=V-q,a.offset>Q){if((Q=a.offset-Q)>a.whave&&a.sane){E.msg="invalid distance too far back",a.mode=30;break}de=Q>a.wnext?(Q-=a.wnext,a.wsize-Q):a.wnext-Q,Q>a.length&&(Q=a.length),ie=a.window}else ie=ee,de=G-a.offset,Q=a.length;for(q<Q&&(Q=q),q-=Q,a.length-=Q;ee[G++]=ie[de++],--Q;);a.length===0&&(a.mode=21);break;case 26:if(q===0)break e;ee[G++]=a.length,q--,a.mode=21;break;case 27:if(a.wrap){for(;S<32;){if(H===0)break e;H--,z|=W[$++]<<S,S+=8}if(V-=q,E.total_out+=V,a.total+=V,V&&(E.adler=a.check=a.flags?n(a.check,ee,V,G-V):o(a.check,ee,V,G-V)),V=q,(a.flags?z:p(z))!==a.check){E.msg="incorrect data check",a.mode=30;break}S=z=0}a.mode=28;case 28:if(a.wrap&&a.flags){for(;S<32;){if(H===0)break e;H--,z+=W[$++]<<S,S+=8}if(z!==(4294967295&a.total)){E.msg="incorrect length check",a.mode=30;break}S=z=0}a.mode=29;case 29:T=1;break e;case 30:T=-3;break e;case 31:return-4;case 32:default:return c}return E.next_out=G,E.avail_out=q,E.next_in=$,E.avail_in=H,a.hold=z,a.bits=S,(a.wsize||V!==E.avail_out&&a.mode<30&&(a.mode<27||M!==4))&&te(E,E.output,E.next_out,V-E.avail_out)?(a.mode=31,-4):(K-=E.avail_in,V-=E.avail_out,E.total_in+=K,E.total_out+=V,a.total+=V,a.wrap&&V&&(E.adler=a.check=a.flags?n(a.check,ee,V,E.next_out-V):o(a.check,ee,V,E.next_out-V)),E.data_type=a.bits+(a.last?64:0)+(a.mode===12?128:0)+(a.mode===20||a.mode===15?256:0),(K==0&&V===0||M===4)&&T===x&&(T=-5),T)},u.inflateEnd=function(E){if(!E||!E.state)return c;var M=E.state;return M.window&&(M.window=null),E.state=null,x},u.inflateGetHeader=function(E,M){var a;return E&&E.state?(2&(a=E.state).wrap)==0?c:((a.head=M).done=!1,x):c},u.inflateSetDictionary=function(E,M){var a,W=M.length;return E&&E.state?(a=E.state).wrap!==0&&a.mode!==11?c:a.mode===11&&o(1,M,W,0)!==a.check?-3:te(E,M,W,W)?(a.mode=31,-4):(a.havedict=1,x):c},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,m,u){var i=r("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];m.exports=function(f,v,x,c,g,d,b,p){var y,j,N,A,O,P,F,D,U,te=p.bits,E=0,M=0,a=0,W=0,ee=0,$=0,G=0,H=0,q=0,z=0,S=null,K=0,V=new i.Buf16(16),Q=new i.Buf16(16),de=null,ie=0;for(E=0;E<=15;E++)V[E]=0;for(M=0;M<c;M++)V[v[x+M]]++;for(ee=te,W=15;1<=W&&V[W]===0;W--);if(W<ee&&(ee=W),W===0)return g[d++]=20971520,g[d++]=20971520,p.bits=1,0;for(a=1;a<W&&V[a]===0;a++);for(ee<a&&(ee=a),E=H=1;E<=15;E++)if(H<<=1,(H-=V[E])<0)return-1;if(0<H&&(f===0||W!==1))return-1;for(Q[1]=0,E=1;E<15;E++)Q[E+1]=Q[E]+V[E];for(M=0;M<c;M++)v[x+M]!==0&&(b[Q[v[x+M]]++]=M);if(P=f===0?(S=de=b,19):f===1?(S=o,K-=257,de=n,ie-=257,256):(S=l,de=h,-1),E=a,O=d,G=M=z=0,N=-1,A=(q=1<<($=ee))-1,f===1&&852<q||f===2&&592<q)return 1;for(;;){for(F=E-G,U=b[M]<P?(D=0,b[M]):b[M]>P?(D=de[ie+b[M]],S[K+b[M]]):(D=96,0),y=1<<E-G,a=j=1<<$;g[O+(z>>G)+(j-=y)]=F<<24|D<<16|U|0,j!==0;);for(y=1<<E-1;z&y;)y>>=1;if(y!==0?(z&=y-1,z+=y):z=0,M++,--V[E]==0){if(E===W)break;E=v[x+b[M]]}if(ee<E&&(z&A)!==N){for(G===0&&(G=ee),O+=a,H=1<<($=E-G);$+G<W&&!((H-=V[$+G])<=0);)$++,H<<=1;if(q+=1<<$,f===1&&852<q||f===2&&592<q)return 1;g[N=z&A]=ee<<24|$<<16|O-d|0}}return z!==0&&(g[O+z]=E-G<<24|64<<16|0),p.bits=ee,0}},{"../utils/common":41}],51:[function(r,m,u){m.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,m,u){var i=r("../utils/common"),o=0,n=1;function l(w){for(var I=w.length;0<=--I;)w[I]=0}var h=0,f=29,v=256,x=v+1+f,c=30,g=19,d=2*x+1,b=15,p=16,y=7,j=256,N=16,A=17,O=18,P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],F=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],te=new Array(2*(x+2));l(te);var E=new Array(2*c);l(E);var M=new Array(512);l(M);var a=new Array(256);l(a);var W=new Array(f);l(W);var ee,$,G,H=new Array(c);function q(w,I,Z,L,C){this.static_tree=w,this.extra_bits=I,this.extra_base=Z,this.elems=L,this.max_length=C,this.has_stree=w&&w.length}function z(w,I){this.dyn_tree=w,this.max_code=0,this.stat_desc=I}function S(w){return w<256?M[w]:M[256+(w>>>7)]}function K(w,I){w.pending_buf[w.pending++]=255&I,w.pending_buf[w.pending++]=I>>>8&255}function V(w,I,Z){w.bi_valid>p-Z?(w.bi_buf|=I<<w.bi_valid&65535,K(w,w.bi_buf),w.bi_buf=I>>p-w.bi_valid,w.bi_valid+=Z-p):(w.bi_buf|=I<<w.bi_valid&65535,w.bi_valid+=Z)}function Q(w,I,Z){V(w,Z[2*I],Z[2*I+1])}function de(w,I){for(var Z=0;Z|=1&w,w>>>=1,Z<<=1,0<--I;);return Z>>>1}function ie(w,I,Z){var L,C,B=new Array(b+1),Y=0;for(L=1;L<=b;L++)B[L]=Y=Y+Z[L-1]<<1;for(C=0;C<=I;C++){var X=w[2*C+1];X!==0&&(w[2*C]=de(B[X]++,X))}}function ae(w){var I;for(I=0;I<x;I++)w.dyn_ltree[2*I]=0;for(I=0;I<c;I++)w.dyn_dtree[2*I]=0;for(I=0;I<g;I++)w.bl_tree[2*I]=0;w.dyn_ltree[2*j]=1,w.opt_len=w.static_len=0,w.last_lit=w.matches=0}function se(w){8<w.bi_valid?K(w,w.bi_buf):0<w.bi_valid&&(w.pending_buf[w.pending++]=w.bi_buf),w.bi_buf=0,w.bi_valid=0}function pe(w,I,Z,L){var C=2*I,B=2*Z;return w[C]<w[B]||w[C]===w[B]&&L[I]<=L[Z]}function be(w,I,Z){for(var L=w.heap[Z],C=Z<<1;C<=w.heap_len&&(C<w.heap_len&&pe(I,w.heap[C+1],w.heap[C],w.depth)&&C++,!pe(I,L,w.heap[C],w.depth));)w.heap[Z]=w.heap[C],Z=C,C<<=1;w.heap[Z]=L}function xe(w,I,Z){var L,C,B,Y,X=0;if(w.last_lit!==0)for(;L=w.pending_buf[w.d_buf+2*X]<<8|w.pending_buf[w.d_buf+2*X+1],C=w.pending_buf[w.l_buf+X],X++,L===0?Q(w,C,I):(Q(w,(B=a[C])+v+1,I),(Y=P[B])!==0&&V(w,C-=W[B],Y),Q(w,B=S(--L),Z),(Y=F[B])!==0&&V(w,L-=H[B],Y)),X<w.last_lit;);Q(w,j,I)}function ke(w,I){var Z,L,C,B=I.dyn_tree,Y=I.stat_desc.static_tree,X=I.stat_desc.has_stree,oe=I.stat_desc.elems,he=-1;for(w.heap_len=0,w.heap_max=d,Z=0;Z<oe;Z++)B[2*Z]!==0?(w.heap[++w.heap_len]=he=Z,w.depth[Z]=0):B[2*Z+1]=0;for(;w.heap_len<2;)B[2*(C=w.heap[++w.heap_len]=he<2?++he:0)]=1,w.depth[C]=0,w.opt_len--,X&&(w.static_len-=Y[2*C+1]);for(I.max_code=he,Z=w.heap_len>>1;1<=Z;Z--)be(w,B,Z);for(C=oe;Z=w.heap[1],w.heap[1]=w.heap[w.heap_len--],be(w,B,1),L=w.heap[1],w.heap[--w.heap_max]=Z,w.heap[--w.heap_max]=L,B[2*C]=B[2*Z]+B[2*L],w.depth[C]=(w.depth[Z]>=w.depth[L]?w.depth[Z]:w.depth[L])+1,B[2*Z+1]=B[2*L+1]=C,w.heap[1]=C++,be(w,B,1),2<=w.heap_len;);w.heap[--w.heap_max]=w.heap[1],(function(le,ze){var Ge,Ee,Ve,we,st,jt,Se=ze.dyn_tree,Nr=ze.max_code,go=ze.stat_desc.static_tree,vo=ze.stat_desc.has_stree,xo=ze.stat_desc.extra_bits,Sr=ze.stat_desc.extra_base,Ke=ze.stat_desc.max_length,lt=0;for(we=0;we<=b;we++)le.bl_count[we]=0;for(Se[2*le.heap[le.heap_max]+1]=0,Ge=le.heap_max+1;Ge<d;Ge++)Ke<(we=Se[2*Se[2*(Ee=le.heap[Ge])+1]+1]+1)&&(we=Ke,lt++),Se[2*Ee+1]=we,Nr<Ee||(le.bl_count[we]++,st=0,Sr<=Ee&&(st=xo[Ee-Sr]),jt=Se[2*Ee],le.opt_len+=jt*(we+st),vo&&(le.static_len+=jt*(go[2*Ee+1]+st)));if(lt!==0){do{for(we=Ke-1;le.bl_count[we]===0;)we--;le.bl_count[we]--,le.bl_count[we+1]+=2,le.bl_count[Ke]--,lt-=2}while(0<lt);for(we=Ke;we!==0;we--)for(Ee=le.bl_count[we];Ee!==0;)Nr<(Ve=le.heap[--Ge])||(Se[2*Ve+1]!==we&&(le.opt_len+=(we-Se[2*Ve+1])*Se[2*Ve],Se[2*Ve+1]=we),Ee--)}})(w,I),ie(B,he,w.bl_count)}function t(w,I,Z){var L,C,B=-1,Y=I[1],X=0,oe=7,he=4;for(Y===0&&(oe=138,he=3),I[2*(Z+1)+1]=65535,L=0;L<=Z;L++)C=Y,Y=I[2*(L+1)+1],++X<oe&&C===Y||(X<he?w.bl_tree[2*C]+=X:C!==0?(C!==B&&w.bl_tree[2*C]++,w.bl_tree[2*N]++):X<=10?w.bl_tree[2*A]++:w.bl_tree[2*O]++,B=C,he=(X=0)===Y?(oe=138,3):C===Y?(oe=6,3):(oe=7,4))}function T(w,I,Z){var L,C,B=-1,Y=I[1],X=0,oe=7,he=4;for(Y===0&&(oe=138,he=3),L=0;L<=Z;L++)if(C=Y,Y=I[2*(L+1)+1],!(++X<oe&&C===Y)){if(X<he)for(;Q(w,C,w.bl_tree),--X!=0;);else C!==0?(C!==B&&(Q(w,C,w.bl_tree),X--),Q(w,N,w.bl_tree),V(w,X-3,2)):X<=10?(Q(w,A,w.bl_tree),V(w,X-3,3)):(Q(w,O,w.bl_tree),V(w,X-11,7));B=C,he=(X=0)===Y?(oe=138,3):C===Y?(oe=6,3):(oe=7,4)}}l(H);var R=!1;function _(w,I,Z,L){V(w,(h<<1)+(L?1:0),3),(function(C,B,Y,X){se(C),K(C,Y),K(C,~Y),i.arraySet(C.pending_buf,C.window,B,Y,C.pending),C.pending+=Y})(w,I,Z)}u._tr_init=function(w){R||((function(){var I,Z,L,C,B,Y=new Array(b+1);for(C=L=0;C<f-1;C++)for(W[C]=L,I=0;I<1<<P[C];I++)a[L++]=C;for(a[L-1]=C,C=B=0;C<16;C++)for(H[C]=B,I=0;I<1<<F[C];I++)M[B++]=C;for(B>>=7;C<c;C++)for(H[C]=B<<7,I=0;I<1<<F[C]-7;I++)M[256+B++]=C;for(Z=0;Z<=b;Z++)Y[Z]=0;for(I=0;I<=143;)te[2*I+1]=8,I++,Y[8]++;for(;I<=255;)te[2*I+1]=9,I++,Y[9]++;for(;I<=279;)te[2*I+1]=7,I++,Y[7]++;for(;I<=287;)te[2*I+1]=8,I++,Y[8]++;for(ie(te,x+1,Y),I=0;I<c;I++)E[2*I+1]=5,E[2*I]=de(I,5);ee=new q(te,P,v+1,x,b),$=new q(E,F,0,c,b),G=new q(new Array(0),D,0,g,y)})(),R=!0),w.l_desc=new z(w.dyn_ltree,ee),w.d_desc=new z(w.dyn_dtree,$),w.bl_desc=new z(w.bl_tree,G),w.bi_buf=0,w.bi_valid=0,ae(w)},u._tr_stored_block=_,u._tr_flush_block=function(w,I,Z,L){var C,B,Y=0;0<w.level?(w.strm.data_type===2&&(w.strm.data_type=(function(X){var oe,he=4093624447;for(oe=0;oe<=31;oe++,he>>>=1)if(1&he&&X.dyn_ltree[2*oe]!==0)return o;if(X.dyn_ltree[18]!==0||X.dyn_ltree[20]!==0||X.dyn_ltree[26]!==0)return n;for(oe=32;oe<v;oe++)if(X.dyn_ltree[2*oe]!==0)return n;return o})(w)),ke(w,w.l_desc),ke(w,w.d_desc),Y=(function(X){var oe;for(t(X,X.dyn_ltree,X.l_desc.max_code),t(X,X.dyn_dtree,X.d_desc.max_code),ke(X,X.bl_desc),oe=g-1;3<=oe&&X.bl_tree[2*U[oe]+1]===0;oe--);return X.opt_len+=3*(oe+1)+5+5+4,oe})(w),C=w.opt_len+3+7>>>3,(B=w.static_len+3+7>>>3)<=C&&(C=B)):C=B=Z+5,Z+4<=C&&I!==-1?_(w,I,Z,L):w.strategy===4||B===C?(V(w,2+(L?1:0),3),xe(w,te,E)):(V(w,4+(L?1:0),3),(function(X,oe,he,le){var ze;for(V(X,oe-257,5),V(X,he-1,5),V(X,le-4,4),ze=0;ze<le;ze++)V(X,X.bl_tree[2*U[ze]+1],3);T(X,X.dyn_ltree,oe-1),T(X,X.dyn_dtree,he-1)})(w,w.l_desc.max_code+1,w.d_desc.max_code+1,Y+1),xe(w,w.dyn_ltree,w.dyn_dtree)),ae(w),L&&se(w)},u._tr_tally=function(w,I,Z){return w.pending_buf[w.d_buf+2*w.last_lit]=I>>>8&255,w.pending_buf[w.d_buf+2*w.last_lit+1]=255&I,w.pending_buf[w.l_buf+w.last_lit]=255&Z,w.last_lit++,I===0?w.dyn_ltree[2*Z]++:(w.matches++,I--,w.dyn_ltree[2*(a[Z]+v+1)]++,w.dyn_dtree[2*S(I)]++),w.last_lit===w.lit_bufsize-1},u._tr_align=function(w){V(w,2,3),Q(w,j,te),(function(I){I.bi_valid===16?(K(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):8<=I.bi_valid&&(I.pending_buf[I.pending++]=255&I.bi_buf,I.bi_buf>>=8,I.bi_valid-=8)})(w)}},{"../utils/common":41}],53:[function(r,m,u){m.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,m,u){(function(i){(function(o,n){if(!o.setImmediate){var l,h,f,v,x=1,c={},g=!1,d=o.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(o);b=b&&b.setTimeout?b:o,l={}.toString.call(o.process)==="[object process]"?function(N){process.nextTick(function(){y(N)})}:(function(){if(o.postMessage&&!o.importScripts){var N=!0,A=o.onmessage;return o.onmessage=function(){N=!1},o.postMessage("","*"),o.onmessage=A,N}})()?(v="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",j,!1):o.attachEvent("onmessage",j),function(N){o.postMessage(v+N,"*")}):o.MessageChannel?((f=new MessageChannel).port1.onmessage=function(N){y(N.data)},function(N){f.port2.postMessage(N)}):d&&"onreadystatechange"in d.createElement("script")?(h=d.documentElement,function(N){var A=d.createElement("script");A.onreadystatechange=function(){y(N),A.onreadystatechange=null,h.removeChild(A),A=null},h.appendChild(A)}):function(N){setTimeout(y,0,N)},b.setImmediate=function(N){typeof N!="function"&&(N=new Function(""+N));for(var A=new Array(arguments.length-1),O=0;O<A.length;O++)A[O]=arguments[O+1];var P={callback:N,args:A};return c[x]=P,l(x),x++},b.clearImmediate=p}function p(N){delete c[N]}function y(N){if(g)setTimeout(y,0,N);else{var A=c[N];if(A){g=!0;try{(function(O){var P=O.callback,F=O.args;switch(F.length){case 0:P();break;case 1:P(F[0]);break;case 2:P(F[0],F[1]);break;case 3:P(F[0],F[1],F[2]);break;default:P.apply(n,F)}})(A)}finally{p(N),g=!1}}}}function j(N){N.source===o&&typeof N.data=="string"&&N.data.indexOf(v)===0&&y(+N.data.slice(v.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof Ce<"u"?Ce:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ct)),ct.exports}var Or=Tr();const Dr=Ir(Or);var qe={exports:{}},Lr=qe.exports,Nt;function Pr(){return Nt||(Nt=1,(function(e,k){(function(r,m){m()})(Lr,function(){function r(h,f){return typeof f>"u"?f={autoBom:!1}:typeof f!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function m(h,f,v){var x=new XMLHttpRequest;x.open("GET",h),x.responseType="blob",x.onload=function(){l(x.response,f,v)},x.onerror=function(){console.error("could not download file")},x.send()}function u(h){var f=new XMLHttpRequest;f.open("HEAD",h,!1);try{f.send()}catch{}return 200<=f.status&&299>=f.status}function i(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(f)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ce=="object"&&Ce.global===Ce?Ce:void 0,n=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!n?function(h,f,v){var x=o.URL||o.webkitURL,c=document.createElement("a");f=f||h.name||"download",c.download=f,c.rel="noopener",typeof h=="string"?(c.href=h,c.origin===location.origin?i(c):u(c.href)?m(h,f,v):i(c,c.target="_blank")):(c.href=x.createObjectURL(h),setTimeout(function(){x.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:"msSaveOrOpenBlob"in navigator?function(h,f,v){if(f=f||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(r(h,v),f);else if(u(h))m(h,f,v);else{var x=document.createElement("a");x.href=h,x.target="_blank",setTimeout(function(){i(x)})}}:function(h,f,v,x){if(x=x||open("","_blank"),x&&(x.document.title=x.document.body.innerText="downloading..."),typeof h=="string")return m(h,f,v);var c=h.type==="application/octet-stream",g=/constructor/i.test(o.HTMLElement)||o.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||c&&g||n)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var j=b.result;j=d?j:j.replace(/^data:[^;]*;/,"data:attachment/file;"),x?x.location.href=j:location=j,x=null},b.readAsDataURL(h)}else{var p=o.URL||o.webkitURL,y=p.createObjectURL(h);x?x.location=y:location.href=y,x=null,setTimeout(function(){p.revokeObjectURL(y)},4e4)}});o.saveAs=l.saveAs=l,e.exports=l})})(qe)),qe.exports}var St=Pr();const Ct=async(e,k)=>{const r=new Dr,m=r.folder("config");m==null||m.file("site.json",JSON.stringify(e.site,null,2)),m==null||m.file("theme.json",JSON.stringify(e.theme,null,2)),m==null||m.file("menu.json",JSON.stringify(e.menu,null,2));const u=r.folder("pages");u==null||u.file(`${k}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});St.saveAs(i,`jsonpages-project-${k}-${Date.now()}.zip`)},At=(e,k,r)=>{const{pages:m,...u}=e.site,i={page:e.page,site:u,menu:e.menu,theme:e.theme},n=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${n}</head>`),h=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});St.saveAs(h,`${k}.html`)};function It(e){var k,r,m="";if(typeof e=="string"||typeof e=="number")m+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(k=0;k<u;k++)e[k]&&(r=It(e[k]))&&(m&&(m+=" "),m+=r)}else for(r in e)e[r]&&(m&&(m+=" "),m+=r);return m}function Fr(){for(var e,k,r=0,m="",u=arguments.length;r<u;r++)(e=arguments[r])&&(k=It(e))&&(m&&(m+=" "),m+=k);return m}const Rr=(e,k)=>{const r=new Array(e.length+k.length);for(let m=0;m<e.length;m++)r[m]=e[m];for(let m=0;m<k.length;m++)r[e.length+m]=k[m];return r},Mr=(e,k)=>({classGroupId:e,validator:k}),Tt=(e=new Map,k=null,r)=>({nextPart:e,validators:k,classGroupId:r}),Ye="-",Ot=[],Br="arbitrary..",Ur=e=>{const k=$r(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:m}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Wr(o);const n=o.split(Ye),l=n[0]===""&&n.length>1?1:0;return Dt(n,l,k)},getConflictingClassGroupIds:(o,n)=>{if(n){const l=m[o],h=r[o];return l?h?Rr(h,l):l:h||Ot}return r[o]||Ot}}},Dt=(e,k,r)=>{if(e.length-k===0)return r.classGroupId;const u=e[k],i=r.nextPart.get(u);if(i){const h=Dt(e,k+1,i);if(h)return h}const o=r.validators;if(o===null)return;const n=k===0?e.join(Ye):e.slice(k).join(Ye),l=o.length;for(let h=0;h<l;h++){const f=o[h];if(f.validator(n))return f.classGroupId}},Wr=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const k=e.slice(1,-1),r=k.indexOf(":"),m=k.slice(0,r);return m?Br+m:void 0})(),$r=e=>{const{theme:k,classGroups:r}=e;return Zr(r,k)},Zr=(e,k)=>{const r=Tt();for(const m in e){const u=e[m];dt(u,r,m,k)}return r},dt=(e,k,r,m)=>{const u=e.length;for(let i=0;i<u;i++){const o=e[i];Hr(o,k,r,m)}},Hr=(e,k,r,m)=>{if(typeof e=="string"){Gr(e,k,r);return}if(typeof e=="function"){Vr(e,k,r,m);return}Kr(e,k,r,m)},Gr=(e,k,r)=>{const m=e===""?k:Lt(k,e);m.classGroupId=r},Vr=(e,k,r,m)=>{if(Jr(e)){dt(e(m),k,r,m);return}k.validators===null&&(k.validators=[]),k.validators.push(Mr(r,e))},Kr=(e,k,r,m)=>{const u=Object.entries(e),i=u.length;for(let o=0;o<i;o++){const[n,l]=u[o];dt(l,Lt(k,n),r,m)}},Lt=(e,k)=>{let r=e;const m=k.split(Ye),u=m.length;for(let i=0;i<u;i++){const o=m[i];let n=r.nextPart.get(o);n||(n=Tt(),r.nextPart.set(o,n)),r=n}return r},Jr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let k=0,r=Object.create(null),m=Object.create(null);const u=(i,o)=>{r[i]=o,k++,k>e&&(k=0,m=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=m[i])!==void 0)return u(i,o),o},set(i,o){i in r?r[i]=o:u(i,o)}}},ut="!",Pt=":",Yr=[],Ft=(e,k,r,m,u)=>({modifiers:e,hasImportantModifier:k,baseClassName:r,maybePostfixModifierPosition:m,isExternal:u}),Xr=e=>{const{prefix:k,experimentalParseClassName:r}=e;let m=u=>{const i=[];let o=0,n=0,l=0,h;const f=u.length;for(let d=0;d<f;d++){const b=u[d];if(o===0&&n===0){if(b===Pt){i.push(u.slice(l,d)),l=d+1;continue}if(b==="/"){h=d;continue}}b==="["?o++:b==="]"?o--:b==="("?n++:b===")"&&n--}const v=i.length===0?u:u.slice(l);let x=v,c=!1;v.endsWith(ut)?(x=v.slice(0,-1),c=!0):v.startsWith(ut)&&(x=v.slice(1),c=!0);const g=h&&h>l?h-l:void 0;return Ft(i,c,x,g)};if(k){const u=k+Pt,i=m;m=o=>o.startsWith(u)?i(o.slice(u.length)):Ft(Yr,!1,o,void 0,!0)}if(r){const u=m;m=i=>r({className:i,parseClassName:u})}return m},Qr=e=>{const k=new Map;return e.orderSensitiveModifiers.forEach((r,m)=>{k.set(r,1e6+m)}),r=>{const m=[];let u=[];for(let i=0;i<r.length;i++){const o=r[i],n=o[0]==="[",l=k.has(o);n||l?(u.length>0&&(u.sort(),m.push(...u),u=[]),m.push(o)):u.push(o)}return u.length>0&&(u.sort(),m.push(...u)),m}},en=e=>({cache:qr(e.cacheSize),parseClassName:Xr(e),sortModifiers:Qr(e),...Ur(e)}),tn=/\s+/,rn=(e,k)=>{const{parseClassName:r,getClassGroupId:m,getConflictingClassGroupIds:u,sortModifiers:i}=k,o=[],n=e.trim().split(tn);let l="";for(let h=n.length-1;h>=0;h-=1){const f=n[h],{isExternal:v,modifiers:x,hasImportantModifier:c,baseClassName:g,maybePostfixModifierPosition:d}=r(f);if(v){l=f+(l.length>0?" "+l:l);continue}let b=!!d,p=m(b?g.substring(0,d):g);if(!p){if(!b){l=f+(l.length>0?" "+l:l);continue}if(p=m(g),!p){l=f+(l.length>0?" "+l:l);continue}b=!1}const y=x.length===0?"":x.length===1?x[0]:i(x).join(":"),j=c?y+ut:y,N=j+p;if(o.indexOf(N)>-1)continue;o.push(N);const A=u(p,b);for(let O=0;O<A.length;++O){const P=A[O];o.push(j+P)}l=f+(l.length>0?" "+l:l)}return l},nn=(...e)=>{let k=0,r,m,u="";for(;k<e.length;)(r=e[k++])&&(m=Rt(r))&&(u&&(u+=" "),u+=m);return u},Rt=e=>{if(typeof e=="string")return e;let k,r="";for(let m=0;m<e.length;m++)e[m]&&(k=Rt(e[m]))&&(r&&(r+=" "),r+=k);return r},on=(e,...k)=>{let r,m,u,i;const o=l=>{const h=k.reduce((f,v)=>v(f),e());return r=en(h),m=r.cache.get,u=r.cache.set,i=n,n(l)},n=l=>{const h=m(l);if(h)return h;const f=rn(l,r);return u(l,f),f};return i=o,(...l)=>i(nn(...l))},an=[],ye=e=>{const k=r=>r[e]||an;return k.isThemeGetter=!0,k},Mt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sn=/^\d+\/\d+$/,ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,un=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,De=e=>sn.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),Ae=e=>!!e&&Number.isInteger(Number(e)),ht=e=>e.endsWith("%")&&ce(e.slice(0,-1)),Ne=e=>ln.test(e),fn=()=>!0,pn=e=>cn.test(e)&&!dn.test(e),Ut=()=>!1,mn=e=>un.test(e),bn=e=>hn.test(e),gn=e=>!re(e)&&!ne(e),vn=e=>Le(e,Gt,Ut),re=e=>Mt.test(e),Ie=e=>Le(e,Vt,pn),ft=e=>Le(e,_n,ce),Wt=e=>Le(e,Zt,Ut),xn=e=>Le(e,Ht,bn),Xe=e=>Le(e,Kt,mn),ne=e=>Bt.test(e),Me=e=>Pe(e,Vt),wn=e=>Pe(e,zn),$t=e=>Pe(e,Zt),yn=e=>Pe(e,Gt),kn=e=>Pe(e,Ht),Qe=e=>Pe(e,Kt,!0),Le=(e,k,r)=>{const m=Mt.exec(e);return m?m[1]?k(m[1]):r(m[2]):!1},Pe=(e,k,r=!1)=>{const m=Bt.exec(e);return m?m[1]?k(m[1]):r:!1},Zt=e=>e==="position"||e==="percentage",Ht=e=>e==="image"||e==="url",Gt=e=>e==="length"||e==="size"||e==="bg-size",Vt=e=>e==="length",_n=e=>e==="number",zn=e=>e==="family-name",Kt=e=>e==="shadow",jn=on(()=>{const e=ye("color"),k=ye("font"),r=ye("text"),m=ye("font-weight"),u=ye("tracking"),i=ye("leading"),o=ye("breakpoint"),n=ye("container"),l=ye("spacing"),h=ye("radius"),f=ye("shadow"),v=ye("inset-shadow"),x=ye("text-shadow"),c=ye("drop-shadow"),g=ye("blur"),d=ye("perspective"),b=ye("aspect"),p=ye("ease"),y=ye("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...N(),ne,re],O=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],F=()=>[ne,re,l],D=()=>[De,"full","auto",...F()],U=()=>[Ae,"none","subgrid",ne,re],te=()=>["auto",{span:["full",Ae,ne,re]},Ae,ne,re],E=()=>[Ae,"auto",ne,re],M=()=>["auto","min","max","fr",ne,re],a=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...F()],$=()=>[De,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...F()],G=()=>[e,ne,re],H=()=>[...N(),$t,Wt,{position:[ne,re]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",yn,vn,{size:[ne,re]}],S=()=>[ht,Me,Ie],K=()=>["","none","full",h,ne,re],V=()=>["",ce,Me,Ie],Q=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[ce,ht,$t,Wt],ae=()=>["","none",g,ne,re],se=()=>["none",ce,ne,re],pe=()=>["none",ce,ne,re],be=()=>[ce,ne,re],xe=()=>[De,"full",...F()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ne],breakpoint:[Ne],color:[fn],container:[Ne],"drop-shadow":[Ne],ease:["in","out","in-out"],font:[gn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ne],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ne],shadow:[Ne],spacing:["px",ce],text:[Ne],"text-shadow":[Ne],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",De,re,ne,b]}],container:["container"],columns:[{columns:[ce,re,ne,n]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Ae,"auto",ne,re]}],basis:[{basis:[De,"full","auto",n,...F()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,De,"auto","initial","none",re]}],grow:[{grow:["",ce,ne,re]}],shrink:[{shrink:["",ce,ne,re]}],order:[{order:[Ae,"first","last","none",ne,re]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:F()}],"gap-x":[{"gap-x":F()}],"gap-y":[{"gap-y":F()}],"justify-content":[{justify:[...a(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...a()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":a()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:F()}],px:[{px:F()}],py:[{py:F()}],ps:[{ps:F()}],pe:[{pe:F()}],pt:[{pt:F()}],pr:[{pr:F()}],pb:[{pb:F()}],pl:[{pl:F()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":F()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":F()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[n,"screen",...$()]}],"min-w":[{"min-w":[n,"screen","none",...$()]}],"max-w":[{"max-w":[n,"screen","none","prose",{screen:[o]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,Me,Ie]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[m,ne,ft]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ht,re]}],"font-family":[{font:[wn,re,k]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,ne,re]}],"line-clamp":[{"line-clamp":[ce,"none",ne,ft]}],leading:[{leading:[i,...F()]}],"list-image":[{"list-image":["none",ne,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",ne,Ie]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[ce,"auto",ne,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ae,ne,re],radial:["",ne,re],conic:[Ae,ne,re]},kn,xn]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:S()}],"gradient-via-pos":[{via:S()}],"gradient-to-pos":[{to:S()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":V()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,ne,re]}],"outline-w":[{outline:["",ce,Me,Ie]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",f,Qe,Xe]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",v,Qe,Xe]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[ce,Ie]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",x,Qe,Xe]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[ce,ne,re]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[ne,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,re]}],filter:[{filter:["","none",ne,re]}],blur:[{blur:ae()}],brightness:[{brightness:[ce,ne,re]}],contrast:[{contrast:[ce,ne,re]}],"drop-shadow":[{"drop-shadow":["","none",c,Qe,Xe]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",ce,ne,re]}],"hue-rotate":[{"hue-rotate":[ce,ne,re]}],invert:[{invert:["",ce,ne,re]}],saturate:[{saturate:[ce,ne,re]}],sepia:[{sepia:["",ce,ne,re]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,re]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[ce,ne,re]}],"backdrop-contrast":[{"backdrop-contrast":[ce,ne,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,ne,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,ne,re]}],"backdrop-invert":[{"backdrop-invert":["",ce,ne,re]}],"backdrop-opacity":[{"backdrop-opacity":[ce,ne,re]}],"backdrop-saturate":[{"backdrop-saturate":[ce,ne,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,ne,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":F()}],"border-spacing-x":[{"border-spacing-x":F()}],"border-spacing-y":[{"border-spacing-y":F()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",ne,re]}],ease:[{ease:["linear","initial",p,ne,re]}],delay:[{delay:[ce,ne,re]}],animate:[{animate:["none",y,ne,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[d,ne,re]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":["scale-3d"],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[ne,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne,re]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[ce,Me,Ie,ft]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ue(...e){return jn(Fr(e))}var et={exports:{}},Be={};/**
|
|
13
13
|
* @license React
|
|
14
14
|
* react-jsx-runtime.production.js
|
|
15
15
|
*
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/var Jt;function
|
|
20
|
+
*/var Jt;function En(){if(Jt)return Be;Jt=1;var e=Symbol.for("react.transitional.element"),k=Symbol.for("react.fragment");function r(m,u,i){var o=null;if(i!==void 0&&(o=""+i),u.key!==void 0&&(o=""+u.key),"key"in u){i={};for(var n in u)n!=="key"&&(i[n]=u[n])}else i=u;return u=i.ref,{$$typeof:e,type:m,key:o,ref:u!==void 0?u:null,props:i}}return Be.Fragment=k,Be.jsx=r,Be.jsxs=r,Be}var Ue={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-jsx-runtime.development.js
|
|
23
23
|
*
|
|
@@ -25,174 +25,174 @@
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/var qt;function Nn(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){function e(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===
|
|
28
|
+
*/var qt;function Nn(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){function e(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===te?null:z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case b:return"Fragment";case y:return"Profiler";case p:return"StrictMode";case O:return"Suspense";case P:return"SuspenseList";case U:return"Activity"}if(typeof z=="object")switch(typeof z.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),z.$$typeof){case d:return"Portal";case N:return z.displayName||"Context";case j:return(z._context.displayName||"Context")+".Consumer";case A:var S=z.render;return z=z.displayName,z||(z=S.displayName||S.name||"",z=z!==""?"ForwardRef("+z+")":"ForwardRef"),z;case F:return S=z.displayName||null,S!==null?S:e(z.type)||"Memo";case D:S=z._payload,z=z._init;try{return e(z(S))}catch{}}return null}function k(z){return""+z}function r(z){try{k(z);var S=!1}catch{S=!0}if(S){S=console;var K=S.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object";return K.call(S,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),k(z)}}function m(z){if(z===b)return"<>";if(typeof z=="object"&&z!==null&&z.$$typeof===D)return"<...>";try{var S=e(z);return S?"<"+S+">":"<...>"}catch{return"<...>"}}function u(){var z=E.A;return z===null?null:z.getOwner()}function i(){return Error("react-stack-top-frame")}function o(z){if(M.call(z,"key")){var S=Object.getOwnPropertyDescriptor(z,"key").get;if(S&&S.isReactWarning)return!1}return z.key!==void 0}function n(z,S){function K(){ee||(ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",S))}K.isReactWarning=!0,Object.defineProperty(z,"key",{get:K,configurable:!0})}function l(){var z=e(this.type);return $[z]||($[z]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),z=this.props.ref,z!==void 0?z:null}function h(z,S,K,V,Q,de){var ie=K.ref;return z={$$typeof:g,type:z,key:S,props:K,_owner:V},(ie!==void 0?ie:null)!==null?Object.defineProperty(z,"ref",{enumerable:!1,get:l}):Object.defineProperty(z,"ref",{enumerable:!1,value:null}),z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(z,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(z,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(z,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:de}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z}function f(z,S,K,V,Q,de){var ie=S.children;if(ie!==void 0)if(V)if(a(ie)){for(V=0;V<ie.length;V++)v(ie[V]);Object.freeze&&Object.freeze(ie)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(ie);if(M.call(S,"key")){ie=e(z);var ae=Object.keys(S).filter(function(pe){return pe!=="key"});V=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",q[ie+V]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
29
29
|
let props = %s;
|
|
30
30
|
<%s {...props} />
|
|
31
31
|
React keys must be passed directly to JSX without using spread:
|
|
32
32
|
let props = %s;
|
|
33
|
-
<%s key={someKey} {...props} />`,
|
|
33
|
+
<%s key={someKey} {...props} />`,V,ie,ae,ie),q[ie+V]=!0)}if(ie=null,K!==void 0&&(r(K),ie=""+K),o(S)&&(r(S.key),ie=""+S.key),"key"in S){K={};for(var se in S)se!=="key"&&(K[se]=S[se])}else K=S;return ie&&n(K,typeof z=="function"?z.displayName||z.name||"Unknown":z),h(z,ie,K,u(),Q,de)}function v(z){x(z)?z._store&&(z._store.validated=1):typeof z=="object"&&z!==null&&z.$$typeof===D&&(z._payload.status==="fulfilled"?x(z._payload.value)&&z._payload.value._store&&(z._payload.value._store.validated=1):z._store&&(z._store.validated=1))}function x(z){return typeof z=="object"&&z!==null&&z.$$typeof===g}var c=J,g=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),N=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),E=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,a=Array.isArray,W=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(z){return z()}};var ee,$={},G=c.react_stack_bottom_frame.bind(c,i)(),H=W(m(i)),q={};Ue.Fragment=b,Ue.jsx=function(z,S,K){var V=1e4>E.recentlyCreatedOwnerStacks++;return f(z,S,K,!1,V?Error("react-stack-top-frame"):G,V?W(m(z)):H)},Ue.jsxs=function(z,S,K){var V=1e4>E.recentlyCreatedOwnerStacks++;return f(z,S,K,!0,V?Error("react-stack-top-frame"):G,V?W(m(z)):H)}})()),Ue}var Yt;function Sn(){return Yt||(Yt=1,process.env.NODE_ENV==="production"?et.exports=En():et.exports=Nn()),et.exports}var s=Sn();const Xt=J.createContext(void 0),Qt=({config:e,children:k})=>s.jsx(Xt.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets},children:k});function We(){const e=J.useContext(Xt);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const er=J.createContext(void 0),tt=({mode:e,children:k})=>(J.useEffect(()=>{if(e!=="studio")return;const r=new MutationObserver(m=>{m.forEach(u=>{u.addedNodes.forEach(i=>{i instanceof HTMLElement&&i.hasAttribute("data-radix-portal")&&i.setAttribute("data-jp-studio-portal","true")})})});return r.observe(document.body,{childList:!0}),()=>r.disconnect()},[e]),s.jsx(er.Provider,{value:{mode:e},children:k})),tr=()=>{const e=J.useContext(er);if(e===void 0)throw new Error("useStudio must be used within a StudioProvider");return e};/**
|
|
34
34
|
* @license lucide-react v0.474.0 - ISC
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the ISC license.
|
|
37
37
|
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/const
|
|
38
|
+
*/const Cn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rr=(...e)=>e.filter((k,r,m)=>!!k&&k.trim()!==""&&m.indexOf(k)===r).join(" ").trim();/**
|
|
39
39
|
* @license lucide-react v0.474.0 - ISC
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/var
|
|
43
|
+
*/var An={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
44
44
|
* @license lucide-react v0.474.0 - ISC
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the ISC license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/const
|
|
48
|
+
*/const In=J.forwardRef(({color:e="currentColor",size:k=24,strokeWidth:r=2,absoluteStrokeWidth:m,className:u="",children:i,iconNode:o,...n},l)=>J.createElement("svg",{ref:l,...An,width:k,height:k,stroke:e,strokeWidth:m?Number(r)*24/Number(k):r,className:rr("lucide",u),...n},[...o.map(([h,f])=>J.createElement(h,f)),...Array.isArray(i)?i:[i]]));/**
|
|
49
49
|
* @license lucide-react v0.474.0 - ISC
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the ISC license.
|
|
52
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/const
|
|
53
|
+
*/const ge=(e,k)=>{const r=J.forwardRef(({className:m,...u},i)=>J.createElement(In,{ref:i,iconNode:k,className:rr(`lucide-${Cn(e)}`,m),...u}));return r.displayName=`${e}`,r};/**
|
|
54
54
|
* @license lucide-react v0.474.0 - ISC
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/const
|
|
58
|
+
*/const Tn=ge("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
59
59
|
* @license lucide-react v0.474.0 - ISC
|
|
60
60
|
*
|
|
61
61
|
* This source code is licensed under the ISC license.
|
|
62
62
|
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/const
|
|
63
|
+
*/const On=ge("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
64
64
|
* @license lucide-react v0.474.0 - ISC
|
|
65
65
|
*
|
|
66
66
|
* This source code is licensed under the ISC license.
|
|
67
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const
|
|
68
|
+
*/const Dn=ge("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
69
69
|
* @license lucide-react v0.474.0 - ISC
|
|
70
70
|
*
|
|
71
71
|
* This source code is licensed under the ISC license.
|
|
72
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const
|
|
73
|
+
*/const Ln=ge("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
74
74
|
* @license lucide-react v0.474.0 - ISC
|
|
75
75
|
*
|
|
76
76
|
* This source code is licensed under the ISC license.
|
|
77
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const nr=
|
|
78
|
+
*/const nr=ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
79
79
|
* @license lucide-react v0.474.0 - ISC
|
|
80
80
|
*
|
|
81
81
|
* This source code is licensed under the ISC license.
|
|
82
82
|
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const pt=
|
|
83
|
+
*/const pt=ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
84
84
|
* @license lucide-react v0.474.0 - ISC
|
|
85
85
|
*
|
|
86
86
|
* This source code is licensed under the ISC license.
|
|
87
87
|
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const
|
|
88
|
+
*/const Pn=ge("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
89
89
|
* @license lucide-react v0.474.0 - ISC
|
|
90
90
|
*
|
|
91
91
|
* This source code is licensed under the ISC license.
|
|
92
92
|
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const mt=
|
|
93
|
+
*/const mt=ge("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
94
94
|
* @license lucide-react v0.474.0 - ISC
|
|
95
95
|
*
|
|
96
96
|
* This source code is licensed under the ISC license.
|
|
97
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const
|
|
98
|
+
*/const Fn=ge("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
99
99
|
* @license lucide-react v0.474.0 - ISC
|
|
100
100
|
*
|
|
101
101
|
* This source code is licensed under the ISC license.
|
|
102
102
|
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const or=
|
|
103
|
+
*/const or=ge("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
104
104
|
* @license lucide-react v0.474.0 - ISC
|
|
105
105
|
*
|
|
106
106
|
* This source code is licensed under the ISC license.
|
|
107
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const ir=
|
|
108
|
+
*/const ir=ge("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
|
|
109
109
|
* @license lucide-react v0.474.0 - ISC
|
|
110
110
|
*
|
|
111
111
|
* This source code is licensed under the ISC license.
|
|
112
112
|
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const
|
|
113
|
+
*/const Rn=ge("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
|
|
114
114
|
* @license lucide-react v0.474.0 - ISC
|
|
115
115
|
*
|
|
116
116
|
* This source code is licensed under the ISC license.
|
|
117
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const bt=
|
|
118
|
+
*/const bt=ge("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
119
119
|
* @license lucide-react v0.474.0 - ISC
|
|
120
120
|
*
|
|
121
121
|
* This source code is licensed under the ISC license.
|
|
122
122
|
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const
|
|
123
|
+
*/const rt=ge("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
124
124
|
* @license lucide-react v0.474.0 - ISC
|
|
125
125
|
*
|
|
126
126
|
* This source code is licensed under the ISC license.
|
|
127
127
|
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const gt=
|
|
128
|
+
*/const gt=ge("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
129
129
|
* @license lucide-react v0.474.0 - ISC
|
|
130
130
|
*
|
|
131
131
|
* This source code is licensed under the ISC license.
|
|
132
132
|
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const ar=
|
|
133
|
+
*/const ar=ge("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
134
134
|
* @license lucide-react v0.474.0 - ISC
|
|
135
135
|
*
|
|
136
136
|
* This source code is licensed under the ISC license.
|
|
137
137
|
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const
|
|
138
|
+
*/const Mn=ge("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
139
139
|
* @license lucide-react v0.474.0 - ISC
|
|
140
140
|
*
|
|
141
141
|
* This source code is licensed under the ISC license.
|
|
142
142
|
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const
|
|
143
|
+
*/const Bn=ge("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
144
144
|
* @license lucide-react v0.474.0 - ISC
|
|
145
145
|
*
|
|
146
146
|
* This source code is licensed under the ISC license.
|
|
147
147
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const sr=
|
|
148
|
+
*/const sr=ge("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
149
149
|
* @license lucide-react v0.474.0 - ISC
|
|
150
150
|
*
|
|
151
151
|
* This source code is licensed under the ISC license.
|
|
152
152
|
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const
|
|
153
|
+
*/const Un=ge("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
154
154
|
* @license lucide-react v0.474.0 - ISC
|
|
155
155
|
*
|
|
156
156
|
* This source code is licensed under the ISC license.
|
|
157
157
|
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const lr=
|
|
158
|
+
*/const lr=ge("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
159
159
|
* @license lucide-react v0.474.0 - ISC
|
|
160
160
|
*
|
|
161
161
|
* This source code is licensed under the ISC license.
|
|
162
162
|
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const
|
|
163
|
+
*/const Wn=ge("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
164
164
|
* @license lucide-react v0.474.0 - ISC
|
|
165
165
|
*
|
|
166
166
|
* This source code is licensed under the ISC license.
|
|
167
167
|
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const
|
|
168
|
+
*/const $n=ge("SquarePlus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
|
|
169
169
|
* @license lucide-react v0.474.0 - ISC
|
|
170
170
|
*
|
|
171
171
|
* This source code is licensed under the ISC license.
|
|
172
172
|
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const
|
|
173
|
+
*/const Zn=ge("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
174
174
|
* @license lucide-react v0.474.0 - ISC
|
|
175
175
|
*
|
|
176
176
|
* This source code is licensed under the ISC license.
|
|
177
177
|
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const
|
|
178
|
+
*/const nt=ge("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
179
179
|
* @license lucide-react v0.474.0 - ISC
|
|
180
180
|
*
|
|
181
181
|
* This source code is licensed under the ISC license.
|
|
182
182
|
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const
|
|
183
|
+
*/const Hn=ge("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
184
184
|
* @license lucide-react v0.474.0 - ISC
|
|
185
185
|
*
|
|
186
186
|
* This source code is licensed under the ISC license.
|
|
187
187
|
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const cr=
|
|
188
|
+
*/const cr=ge("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
189
189
|
* @license lucide-react v0.474.0 - ISC
|
|
190
190
|
*
|
|
191
191
|
* This source code is licensed under the ISC license.
|
|
192
192
|
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const
|
|
193
|
+
*/const Fe=ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
194
194
|
* @license lucide-react v0.474.0 - ISC
|
|
195
195
|
*
|
|
196
196
|
* This source code is licensed under the ISC license.
|
|
197
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/const Kn=ve("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);class Vn extends q.Component{constructor(_){super(_),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(_,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,_,r)}render(){return this.state.hasError?a.jsxs("div",{className:"p-8 m-4 bg-amber-500/5 border-2 border-dashed border-amber-500/20 rounded-xl flex flex-col items-center text-center gap-3",children:[a.jsx(Gn,{className:"text-amber-500",size:32}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),a.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),a.jsx("p",{className:"text-xs text-zinc-400 max-w-[280px] leading-relaxed",children:"This section failed to render. Check the console for details or verify the JSON data structure."})]}):this.props.children}}const Jn=({type:e,scope:_,isSelected:r,sectionId:m,sectionIndex:u=0,totalSections:i=0,onReorder:o})=>{const n=typeof u=="number"&&u>0&&o,l=typeof u=="number"&&u<i-1&&o;return a.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:he("absolute inset-0 pointer-events-none transition-all duration-200 z-[50]","border-2 border-transparent group-hover:border-blue-400/50 group-hover:border-dashed",r&&"border-2 border-blue-600 border-solid bg-blue-500/5"),children:a.jsxs("div",{className:he("absolute top-0 right-0 flex flex-nowrap items-center gap-1 pl-1 pr-2 py-1 text-[9px] font-black uppercase tracking-widest transition-opacity pointer-events-auto","bg-blue-600 text-white",r||"group-hover:opacity-100 opacity-0"),children:[o&&m!=null&&a.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[a.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),n&&o(m,u-1)},disabled:!n,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section up","aria-label":"Move section up",children:a.jsx(mt,{size:12,strokeWidth:2.5})}),a.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),l&&o(m,u+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:a.jsx(pt,{size:12,strokeWidth:2.5})})]}),a.jsx("span",{className:"shrink-0",children:e}),a.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),a.jsx("span",{className:"shrink-0",children:_})]})})},Ge=({section:e,menu:_,selectedId:r,reorderable:m,sectionIndex:u,totalSections:i,onReorder:o})=>{var f,k;const{mode:n}=tr(),{registry:l}=He(),h=n==="studio",p=h&&r===e.id,w=l[e.type],y=e.type==="header"||e.type==="footer"?"global":"local",c=e.type==="header"&&((f=e.settings)==null?void 0:f.sticky);if(!w)return a.jsxs("div",{className:"p-6 m-4 bg-red-500/10 text-red-400 border border-red-500/20 rounded-lg text-sm font-mono",children:[a.jsx("strong",{children:"Missing Component:"})," ",e.type]});const x=E=>{var X,j,P,s,R;if(!h)return;E.preventDefault(),E.stopPropagation();const N=E.currentTarget,A=E.clientX,L=E.clientY;if(E.target===N){window.parent.postMessage({type:we.SECTION_SELECT,section:{id:e.id,type:e.type,scope:y}},"*");return}const I=document.elementFromPoint(A,L)??E.target;if(!I||!N.contains(I)){window.parent.postMessage({type:we.SECTION_SELECT,section:{id:e.id,type:e.type,scope:y}},"*");return}if(I===N){window.parent.postMessage({type:we.SECTION_SELECT,section:{id:e.id,type:e.type,scope:y}},"*");return}const O=[];let T=I;for(;T&&T!==N;){const ee=(X=T.getAttribute)==null?void 0:X.call(T,"data-jp-item-id"),U=(j=T.getAttribute)==null?void 0:j.call(T,"data-jp-item-field");ee&&U&&O.push({fieldKey:U||"items",itemId:ee}),T=T.parentElement}if(O.reverse(),O.length===0)for(T=I;T&&T!==N;){const ee=(P=T.getAttribute)==null?void 0:P.call(T,"data-jp-field");if(ee){O.push({fieldKey:ee});break}T=T.parentElement}if(O.length===0&&I){let ee=null;const U=H=>{var re,z;const $=H.getBoundingClientRect();if($.left<=A&&A<=$.right&&$.top<=L&&L<=$.bottom){for(let S=0;S<H.children.length;S++)U(H.children[S]);((re=H.getAttribute)!=null&&re.call(H,"data-jp-item-id")||(z=H.getAttribute)!=null&&z.call(H,"data-jp-field"))&&(ee=H)}};if(U(I),ee){const H=ee,$=(s=H.getAttribute)==null?void 0:s.call(H,"data-jp-item-id"),re=(R=H.getAttribute)==null?void 0:R.call(H,"data-jp-field");$&&re?O.push({fieldKey:re||"items",itemId:$}):re&&O.push({fieldKey:re})}}const B={type:we.SECTION_SELECT,section:{id:e.id,type:e.type,scope:y}};if(O.length>0){B.itemPath=O;const ee=O[0];ee.itemId!=null?(B.itemField=ee.fieldKey,B.itemId=ee.itemId):B.itemField=ee.fieldKey}window.parent.postMessage(B,"*")},d=()=>{const E=w;return e.type==="header"&&_?a.jsx(E,{data:e.data,settings:e.settings,menu:_}):a.jsx(E,{data:e.data,settings:e.settings})},v=(k=e.data)==null?void 0:k.anchorId;return a.jsxs("div",{id:v||void 0,"data-section-id":h?e.id:void 0,"data-section-type":h?e.type:void 0,"data-section-scope":h?y:void 0,...h&&p?{"data-jp-selected":!0}:{},onClickCapture:h?x:void 0,className:he("relative w-full",h&&"group cursor-pointer",h&&c?"sticky top-0 z-[60]":"relative z-0",p&&"z-[70]"),children:[a.jsx("div",{className:"relative z-0",children:a.jsx(Vn,{type:e.type,children:d()})}),h&&a.jsx(Jn,{type:e.type,scope:y,isSelected:!!p,sectionId:m&&y==="local"?e.id:void 0,sectionIndex:m&&y==="local"?u:void 0,totalSections:m&&y==="local"?i:void 0,onReorder:m&&y==="local"?o:void 0})]})},qn=e=>{q.useEffect(()=>{document.title=e.title;let _=document.querySelector('meta[name="description"]');_||(_=document.createElement("meta"),_.setAttribute("name","description"),document.head.appendChild(_)),_.setAttribute("content",e.description)},[e.title,e.description])},Yn="application/json",vt=({pageConfig:e,siteConfig:_,menuConfig:r,selectedId:m,onReorder:u,scrollToSectionId:i,onActiveSectionChange:o})=>{var v,f;qn(e.meta);const[n,l]=q.useState(null),h=q.useRef({}),p=q.useRef(o);p.current=o;const w=k=>{var E;(E=p.current)==null||E.call(p,k)};q.useEffect(()=>{if(!i)return;const k=h.current[i];k&&k.scrollIntoView({behavior:"smooth",block:"center"})},[i]),q.useEffect(()=>{if(!p.current)return;const E=[..._.header?[_.header.id]:[],...e.sections.map(I=>I.id),..._.footer?[_.footer.id]:[]],N=new IntersectionObserver(I=>{I.forEach(O=>{var T;if(O.isIntersecting&&O.intersectionRatio>.5){const B=O.target.getAttribute("data-section-id");B&&((T=p.current)==null||T.call(p,B))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let A=!1;const L=requestAnimationFrame(()=>{A||E.forEach(I=>{const O=h.current[I];O&&N.observe(O)})});return()=>{A=!0,cancelAnimationFrame(L),N.disconnect()}},[e.sections,(v=_.header)==null?void 0:v.id,(f=_.footer)==null?void 0:f.id]);const y=(k,E)=>{k.preventDefault(),k.dataTransfer.dropEffect="move",l(E)},c=()=>{l(null)},x=(k,E)=>{if(k.preventDefault(),l(null),!!u)try{const N=k.dataTransfer.getData(Yn),{sectionId:A}=JSON.parse(N);typeof A=="string"&&u(A,E)}catch{}},d=()=>{const k=typeof u=="function",E=e.sections.map((N,A)=>{const L=n===A;return k?a.jsxs("div",{ref:I=>{h.current[N.id]=I},"data-section-id":N.id,style:{position:"relative"},onMouseEnter:()=>w(N.id),children:[a.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:L?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:L?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:I=>y(I,A),onDragLeave:c,onDrop:I=>x(I,A)}),a.jsx(Ge,{section:N,selectedId:m,reorderable:!0,sectionIndex:A,totalSections:e.sections.length,onReorder:u})]},N.id):a.jsx("div",{ref:I=>{h.current[N.id]=I},"data-section-id":N.id,onMouseEnter:()=>w(N.id),children:a.jsx(Ge,{section:N,selectedId:m})},N.id)});if(k&&E.length>0){const N=e.sections.length,A=n===N;E.push(a.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:A?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:A?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:L=>y(L,N),onDragLeave:c,onDrop:L=>x(L,N)},"jp-drop-after-last"))}return E};return a.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[_.header!=null&&a.jsx("div",{ref:k=>{h.current[_.header.id]=k},"data-section-id":_.header.id,onMouseEnter:()=>w(_.header.id),children:a.jsx(Ge,{section:_.header,menu:r.main,selectedId:m})}),a.jsx("main",{className:"flex-1",children:d()}),_.footer!=null&&a.jsx("div",{ref:k=>{h.current[_.footer.id]=k},"data-section-id":_.footer.id,onMouseEnter:()=>w(_.footer.id),children:a.jsx(Ge,{section:_.footer,selectedId:m})})]})},it=({mode:e,tenantCss:_,adminCss:r,children:m})=>(q.useLayoutEffect(()=>{const u=`jp-theme-${e}`,i=e==="tenant"?_:r;if(!document.getElementById(u)&&i){const o=document.createElement("style");o.id=u,o.innerHTML=i,document.head.appendChild(o)}return()=>{const o=document.getElementById(u);o&&o.remove()}},[e,_,r]),a.jsx(a.Fragment,{children:m}));function xt({className:e,type:_,...r}){return a.jsx("input",{type:_,className:he("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...r})}function Xn({className:e,..._}){return a.jsx("textarea",{className:he("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),..._})}function Qn({className:e,checked:_,onCheckedChange:r,...m}){return a.jsx("input",{type:"checkbox",checked:_,onChange:u=>r==null?void 0:r(u.target.checked),className:he("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...m})}function Oe({className:e,..._}){return a.jsx("label",{className:he("text-sm font-medium leading-none select-none",e),..._})}const dr=be.createContext(null);function eo(){const e=be.useContext(dr);if(!e)throw new Error("Select components must be used within Select");return e}function to({value:e,onValueChange:_,children:r}){const m=e??"",u=be.Children.toArray(r).find(w=>be.isValidElement(w)&&w.type===kt),i=be.Children.toArray(r).find(w=>be.isValidElement(w)&&w.type===wt),o=u&&be.isValidElement(u)?u.props.children:void 0,n=i&&be.isValidElement(i)?i.props.children:void 0,l=be.useMemo(()=>!u||!be.isValidElement(u)?[]:be.Children.toArray(u.props.children).filter(w=>be.isValidElement(w)&&w.props.value!==void 0).map(w=>({value:w.props.value,label:w.props.children??w.props.value})),[u,o]),h=be.useMemo(()=>{if(!i||!be.isValidElement(i))return"";const w=be.Children.toArray(i.props.children).find(y=>be.isValidElement(y)&&y.type===yt);return w&&be.isValidElement(w)?w.props.placeholder??"":""},[i,n]),p=be.useMemo(()=>({value:m,onValueChange:w=>_==null?void 0:_(w),options:l,placeholder:h}),[m,_,l,h]);return a.jsx(dr.Provider,{value:p,children:i})}function wt({className:e,children:_,...r}){const{value:m,onValueChange:u,options:i,placeholder:o}=eo();return a.jsxs("div",{className:he("relative",e),...r,children:[a.jsxs("select",{value:m,onChange:n=>u(n.target.value),className:"w-full h-7 rounded border border-zinc-800 bg-zinc-900/50 text-[11px] text-left px-2 pr-6 appearance-none bg-no-repeat bg-[length:12px] bg-[right_0.25rem_center] focus:ring-2 focus:ring-blue-600 focus:outline-none",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")`},children:[o?a.jsx("option",{value:"",children:o}):null,i.map(n=>a.jsx("option",{value:n.value,children:String(n.label)},n.value))]}),_]})}function yt(e){return null}function kt({className:e,children:_}){return a.jsx("div",{className:he("hidden",e),"aria-hidden":!0,children:_})}function ur({className:e,value:_,children:r}){return a.jsx("div",{"data-value":_,className:e,"aria-hidden":!0,children:r})}wt.displayName="SelectTrigger",yt.displayName="SelectValue",kt.displayName="SelectContent",ur.displayName="SelectItem";const hr=be.createContext(null);function fr(){const e=be.useContext(hr);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function pr({open:e,onOpenChange:_,children:r}){const[m,u]=be.useState(!1),i=e!==void 0,o=i?e:m,n=be.useCallback(h=>{i||u(h),_==null||_(h)},[i,_]),l=be.useMemo(()=>({open:o,onOpenChange:n}),[o,n]);return a.jsx(hr.Provider,{value:l,children:r})}function ro({asChild:e,children:_}){const{onOpenChange:r}=fr(),m=be.Children.only(_);return e&&be.isValidElement(m)?be.cloneElement(m,{onClick:u=>{var i,o;(o=(i=m.props).onClick)==null||o.call(i,u),r(!0)}}):a.jsx("button",{type:"button",onClick:()=>r(!0),children:_})}function mr({className:e,children:_,preventCloseOnBackdropClick:r,...m}){const{open:u,onOpenChange:i}=fr();if(be.useEffect(()=>{const n=l=>{l.key==="Escape"&&i(!1)};return u&&(document.addEventListener("keydown",n),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",n),document.body.style.overflow=""}},[u,i]),!u)return null;const o=n=>{n.preventDefault(),n.stopPropagation()};return Ar.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:o,onDrop:o}),a.jsx("div",{role:"dialog","aria-modal":!0,className:he("fixed left-1/2 top-1/2 z-[9999] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),onClick:n=>n.stopPropagation(),...m,children:_})]}),document.body)}function br({className:e,..._}){return a.jsx("div",{className:he("flex flex-col gap-1.5 pb-4",e),..._})}function no({className:e,..._}){return a.jsx("div",{className:he("flex justify-end gap-2 pt-4",e),..._})}function gr({className:e,..._}){return a.jsx("h2",{className:he("text-sm font-semibold text-white",e),..._})}function vr({className:e,..._}){return a.jsx("p",{className:he("text-xs text-zinc-400",e),..._})}const Le=be.forwardRef(({className:e,variant:_="default",size:r="default",asChild:m,children:u,...i},o)=>{const n="inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 disabled:pointer-events-none disabled:opacity-50",l={default:"bg-blue-600 text-white hover:bg-blue-700",outline:"border border-zinc-700 bg-transparent hover:bg-zinc-800",ghost:"hover:bg-zinc-800"},h={sm:"h-7 px-2.5 text-xs",default:"h-9 px-4 text-sm",lg:"h-10 px-6 text-base"};if(m&&be.isValidElement(u)){const p=u,w=he(n,l[_],h[r],p.props.className,e);return be.cloneElement(p,{className:w})}return a.jsx("button",{ref:o,type:"button",className:he(n,l[_],h[r],e),...i,children:u})});Le.displayName="Button";const oo=["library","upload","url"];function io({library:e,selectedId:_,onSelect:r}){const[m,u]=q.useState(""),[i,o]=q.useState("all"),n=["all",...new Set(e.flatMap(h=>h.tags??[]))],l=e.filter(h=>{const p=i==="all"||(h.tags??[]).includes(i),w=!m||(h.alt??"").toLowerCase().includes(m.toLowerCase());return p&&w});return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"relative",children:[a.jsx(Wn,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),a.jsx(xt,{value:m,onChange:h=>u(h.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(h=>a.jsx("button",{type:"button",onClick:()=>o(h),className:he("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===h?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:h==="all"?"Tutte":h},h))}),l.length>0?a.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(h=>{const p=_===h.id;return a.jsxs("button",{type:"button",onClick:()=>r(p?null:h.id),className:he("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",p?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[a.jsx("img",{src:h.url,alt:h.alt,loading:"lazy",className:he("w-full h-full object-cover transition-[filter] duration-150",p?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),a.jsx("div",{className:he("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",p&&"opacity-100"),children:a.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:h.alt})}),p&&a.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:a.jsx(nr,{size:14,className:"text-white"})})]},h.id)})}):a.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function ao({preview:e,onPreviewChange:_,onAssetUpload:r}){const[m,u]=q.useState(!1),i=q.useRef(null),o=q.useCallback(async p=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:p.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!p.type.startsWith("image/"))return;if(r){try{const y=await r(p);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:y==null?void 0:y.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),_({name:p.name,size:p.size,dataUrl:y})}catch{const y=new FileReader;y.onload=c=>{var x;_({name:p.name,size:p.size,dataUrl:(x=c.target)==null?void 0:x.result})},y.readAsDataURL(p)}return}const w=new FileReader;w.onload=y=>{var c;_({name:p.name,size:p.size,dataUrl:(c=y.target)==null?void 0:c.result})},w.readAsDataURL(p)},[_,r]),n=q.useCallback(p=>{var y,c;p.preventDefault(),p.stopPropagation(),u(!1);const w=(c=(y=p.dataTransfer)==null?void 0:y.files)==null?void 0:c[0];w&&o(w)},[o]),l=q.useCallback(p=>{p.preventDefault(),p.stopPropagation(),u(!0)},[]),h=q.useCallback(p=>{var y;const w=(y=p.target.files)==null?void 0:y[0];w&&o(w)},[o]);return a.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:p=>{p.preventDefault(),p.stopPropagation(),u(!1)},onDrop:n,onClick:()=>{var p;return!e&&((p=i.current)==null?void 0:p.click())},className:he("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",m?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?a.jsxs(a.Fragment,{children:[a.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),a.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),a.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),a.jsx(Le,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:p=>{p.stopPropagation(),_(null)},children:a.jsx(ot,{size:14})})]})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:a.jsx(cr,{size:22})}),a.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),a.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),a.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),a.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:h})]})}function so({urlPreview:e,onUrlPreviewChange:_}){const[r,m]=q.useState(""),[u,i]=q.useState(!1),o=()=>{if(r.trim())try{new URL(r),_(r),i(!1)}catch{i(!0),_(null)}};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(Oe,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(xt,{value:r,onChange:n=>{m(n.target.value),i(!1)},onKeyDown:n=>n.key==="Enter"&&o(),placeholder:"https://images.unsplash.com/photo-...",className:he("h-8 text-xs bg-zinc-900/50 border-zinc-800",u&&"border-red-500/50")}),a.jsx(Le,{type:"button",variant:"outline",onClick:o,className:"shrink-0 h-8",children:"Anteprima"})]}),u&&a.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?a.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[a.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),_(null)}}),a.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[a.jsx(nr,{size:14,className:"text-emerald-400"}),a.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):u?null:a.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[a.jsx(ar,{size:32,className:"mb-3 opacity-40"}),a.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const lo=({open:e,onOpenChange:_,onSelect:r})=>{const{assets:m}=He(),u=(m==null?void 0:m.assetsManifest)??[],[i,o]=q.useState("library"),[n,l]=q.useState(null),[h,p]=q.useState(null),[w,y]=q.useState(null);q.useEffect(()=>{e&&(o("library"),l(null),p(null),y(null))},[e]),q.useEffect(()=>{if(!e||i!=="upload")return;const f=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",f),()=>window.removeEventListener("beforeunload",f)},[e,i]),q.useEffect(()=>{if(!e||i!=="upload")return;const f=E=>{E.preventDefault()},k={capture:!0};return document.addEventListener("dragover",f,k),document.addEventListener("drop",f,k),window.addEventListener("dragover",f,k),window.addEventListener("drop",f,k),()=>{document.removeEventListener("dragover",f,k),document.removeEventListener("drop",f,k),window.removeEventListener("dragover",f,k),window.removeEventListener("drop",f,k)}},[e,i]);const c=i==="library"&&n!=null||i==="upload"&&h!=null||i==="url"&&w!=null,x=()=>{if(i==="library"&&n){const f=u.find(k=>k.id===n);f&&r({url:f.url,alt:f.alt})}else i==="upload"&&h?r({url:h.dataUrl,alt:h.name}):i==="url"&&w&&r({url:w,alt:""});setTimeout(()=>_(!1),0)},d=i==="library"&&n?"1 immagine selezionata":i==="upload"&&h?h.name:i==="url"&&w?"URL pronto":"Nessuna selezione",v=f=>{f.preventDefault(),f.stopPropagation()};return a.jsx(pr,{open:e,onOpenChange:_,children:a.jsxs(mr,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:v,onDrop:v,children:[a.jsxs(br,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:a.jsx(nt,{size:18})}),a.jsxs("div",{children:[a.jsx(gr,{children:"Image Picker"}),a.jsx(vr,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),a.jsx("button",{type:"button",onClick:()=>_(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:a.jsx(Me,{size:18})})]}),a.jsx("div",{className:"flex border-b border-zinc-800",children:oo.map(f=>a.jsxs("button",{type:"button",onClick:()=>o(f),className:he("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===f?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[f==="library"&&a.jsx(nt,{size:14}),f==="upload"&&a.jsx(cr,{size:14}),f==="url"&&a.jsx(ar,{size:14}),f==="library"?"Libreria":f==="upload"?"Upload":"URL"]},f))}),a.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&a.jsx(io,{library:u,selectedId:n,onSelect:l}),i==="upload"&&a.jsx(ao,{preview:h,onPreviewChange:p,onAssetUpload:m==null?void 0:m.onAssetUpload}),i==="url"&&a.jsx(so,{urlPreview:w,onUrlPreviewChange:y})]}),a.jsxs(no,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[a.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:d}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:()=>_(!1),children:"Annulla"}),a.jsx(Le,{type:"button",size:"sm",disabled:!c,onClick:x,className:he(!c&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},xr=(e,_="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const m=e.replace(/^\//,"");return`/assets/${_}/${m}`},co=({value:e,onChange:_,label:r="IMAGE",className:m})=>{const{tenantId:u="default"}=He(),[i,o]=q.useState(!1),[n,l]=q.useState(!1),h=!!(e!=null&&e.url),p=e!=null&&e.url?xr(e.url,u):"",w=c=>{_(c),o(!1)},y=c=>{c.stopPropagation(),_({url:"",alt:""})};return a.jsxs("div",{className:he("space-y-1.5",m),children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),h?a.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(!0),onKeyDown:c=>c.key==="Enter"&&o(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:he("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",n&&"ring-blue-500/40"),children:[a.jsx("img",{src:p,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:c=>{c.target.style.display="none"}}),a.jsx("div",{className:he("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",n?"bg-black/50":"bg-black/0"),children:n&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[a.jsx(Un,{size:13}),a.jsx("span",{children:"Cambia"})]}),a.jsx(Le,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:y,children:a.jsx(ot,{size:13})})]})}),a.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):a.jsxs("button",{type:"button",onClick:()=>o(!0),className:he("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[a.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:a.jsx(nt,{size:18})}),a.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),a.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),a.jsx(lo,{open:i,onOpenChange:o,onSelect:w})]})},wr=[{name:"layers",Icon:gt},{name:"github",Icon:Mn},{name:"arrow-right",Icon:Dn},{name:"box",Icon:Pn},{name:"terminal",Icon:Hn},{name:"chevron-right",Icon:Fn},{name:"menu",Icon:Bn},{name:"x",Icon:Me},{name:"sparkles",Icon:$n},{name:"zap",Icon:Kn}],Ke={"ui:text":({label:e,value:_,onChange:r})=>a.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),a.jsx(xt,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:_||"",onChange:m=>r(m.target.value)})]}),"ui:textarea":({label:e,value:_,onChange:r})=>a.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),a.jsx(Xn,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:_||"",onChange:m=>r(m.target.value)})]}),"ui:select":({label:e,value:_,onChange:r,options:m=[]})=>a.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),a.jsxs(to,{value:_||"",onValueChange:r,children:[a.jsx(wt,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:a.jsx(yt,{placeholder:"Select..."})}),a.jsx(kt,{className:"dark",children:m.map(u=>a.jsx(ur,{value:u,className:"text-[11px]",children:u},u))})]})]}),"ui:checkbox":({label:e,value:_,onChange:r})=>a.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[a.jsx(Qn,{id:e,checked:!!_,onCheckedChange:m=>r(m===!0)}),a.jsx(Oe,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:_,onChange:r})=>{const m=_!=null&&typeof _=="object"&&"url"in _?{url:String(_.url??""),alt:String(_.alt??"")}:{url:typeof _=="string"?_:"",alt:""},u=i=>{r(i)};return a.jsx("div",{className:"mb-4",children:a.jsx(co,{label:e,value:m,onChange:u})})},"ui:icon-picker":({label:e,value:_,onChange:r})=>{const[m,u]=q.useState(!1),i=wr.find(o=>o.name===(_||""));return a.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),a.jsxs(pr,{open:m,onOpenChange:u,children:[a.jsx(ro,{asChild:!0,children:a.jsx(Le,{variant:"outline",className:"w-full h-9 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex items-center gap-2 text-left",children:i?a.jsxs(a.Fragment,{children:[a.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),a.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):a.jsxs(a.Fragment,{children:[a.jsx(nt,{size:16,className:"text-zinc-500 shrink-0"}),a.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),a.jsxs(mr,{className:"sm:max-w-[280px] p-4",children:[a.jsxs(br,{children:[a.jsx(gr,{className:"text-sm",children:"Choose icon"}),a.jsx(vr,{className:"text-xs",children:"Click an icon to select it."})]}),a.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:wr.map(({name:o,Icon:n})=>a.jsx("button",{type:"button",onClick:()=>{r(o),u(!1)},className:he("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",_===o?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 text-zinc-400 hover:text-zinc-200"),title:o,children:a.jsx(n,{size:20})},o))})]})]})]})}},_t=e=>{if(e instanceof Ee.z.ZodOptional||e instanceof Ee.z.ZodDefault)return _t(e._def.innerType);if(e instanceof Ee.z.ZodObject){const _={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(_[r]=_t(e.shape[r]));return _}return e instanceof Ee.z.ZodArray?[]:e instanceof Ee.z.ZodString?"":e instanceof Ee.z.ZodNumber?0:e instanceof Ee.z.ZodBoolean?!1:e instanceof Ee.z.ZodEnum?e._def.values[0]:null},zt=e=>e instanceof Ee.z.ZodOptional||e instanceof Ee.z.ZodDefault?zt(e._def.innerType):e,at=(e,_)=>e&&!_?"opacity-10":"opacity-100",Be=(e,_)=>e!=null&&_.toLowerCase()===e.toLowerCase(),uo=(e,_)=>{if(!e)return;const r=_.toLowerCase(),m=Object.entries(e).find(([u])=>u.toLowerCase()===r);return m==null?void 0:m[1]},Ve=({schema:e,data:_,onChange:r,keys:m,expandedItemPath:u,expandedItemIdByField:i,focusedFieldKey:o,onSidebarExpandedItemChange:n})=>{const l=e.shape,h=m!=null?Object.keys(l).filter(x=>m.includes(x)):Object.keys(l),p=u==null?void 0:u[0],w=(p==null?void 0:p.itemId)!=null?{[p.fieldKey]:p.itemId}:i,y=(p==null?void 0:p.fieldKey)??o??null,c=y!=null;return a.jsx("div",{className:"space-y-4",children:h.map(x=>{const d=l[x];if(!d)return null;const v=zt(d),f=d.description||"ui:text",k=_[x];if(f==="ui:image-picker"&&v instanceof Ee.z.ZodObject){const L=Be(y,x),I=Ke["ui:image-picker"]||Ke["ui:text"];return a.jsx("div",{className:`transition-opacity duration-200 ${at(c,L)}`,...L?{"data-jp-focused-field":x}:{},children:a.jsx(I,{label:x,value:k,onChange:O=>r({..._,[x]:O})})},x)}if(v instanceof Ee.z.ZodObject){const L=k||{},I=Be(y,x);return a.jsxs("div",{className:`group/obj mb-6 p-4 border border-zinc-800 rounded-lg bg-zinc-900/20 hover:border-zinc-700 transition-[border-color,opacity] duration-200 ${at(c,I)}`,...I?{"data-jp-focused-field":x}:{},children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),a.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:x})]}),a.jsx(Ve,{schema:v,data:L,onChange:O=>r({..._,[x]:O}),expandedItemPath:u&&Be(p==null?void 0:p.fieldKey,x)?u.slice(1):void 0,expandedItemIdByField:w,focusedFieldKey:y})]},x)}if(v instanceof Ee.z.ZodArray){const L=Array.isArray(k)?k:[],I=zt(v.element),O=(j,P)=>{if(P<0||P>=L.length)return;const s=[...L],[R]=s.splice(j,1);s.splice(P,0,R),r({..._,[x]:s})},T=Be(y,x),B=Be(p==null?void 0:p.fieldKey,x)?p==null?void 0:p.itemId:void 0,X=uo(w,x)??B;return a.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${at(c,T)}`,...T?{"data-jp-focused-field":x}:{},children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[x," (",L.length,")"]}),a.jsxs("button",{type:"button",onClick:()=>{const j=_t(I);r({..._,[x]:[...L,j]})},className:"flex items-center gap-1 px-2 py-1 bg-blue-600/10 hover:bg-blue-600/20 text-blue-500 rounded text-[10px] font-bold transition-colors",children:[a.jsx(sr,{size:12})," Add Item"]})]}),a.jsx("div",{className:"space-y-2",children:L.map((j,P)=>{const s=j,R=s.id||`legacy-${P}`,ee=(typeof s.title=="string"?s.title:null)||(typeof s.label=="string"?s.label:null)||(typeof s.name=="string"?s.name:null)||(typeof s.content=="string"?s.content:null)||(typeof s.text=="string"?s.text:null)||`${x} #${P+1}`,U=X,H=String(s.id??R),$=U!=null&&String(U)===H,re=$&&u&&u.length>1?u.slice(1):void 0,z=c&&T&&U!=null&&!$;return a.jsx(ho,{itemId:H,openItemId:U!=null?String(U):void 0,isFaded:z,index:P,isFirst:P===0,isLast:P===L.length-1,label:ee,onExpandedChange:n?S=>n(S?{fieldKey:x,itemId:H}:null):void 0,onRemove:()=>{const S=L.filter((J,K)=>K!==P);r({..._,[x]:S})},onMoveUp:()=>O(P,P-1),onMoveDown:()=>O(P,P+1),children:I instanceof Ee.z.ZodObject?a.jsx(Ve,{schema:I,data:s||{},expandedItemPath:re,onChange:S=>{const J=[...L];J[P]=S,r({..._,[x]:J})}}):a.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},R)})})]},x)}const E=Ke[f]||Ke["ui:text"],N=v instanceof Ee.z.ZodEnum?v._def.values:void 0,A=Be(y,x);return a.jsx("div",{className:`transition-opacity duration-200 ${at(c,A)}`,...A?{"data-jp-focused-field":x}:{},children:a.jsx(E,{label:x,value:k,options:N,onChange:L=>r({..._,[x]:L})})},x)})})},ho=({itemId:e,openItemId:_,isFaded:r=!1,label:m,onExpandedChange:u,onRemove:i,onMoveUp:o,onMoveDown:n,isFirst:l,isLast:h,children:p})=>{const w=_!=null&&String(_)===String(e),[y,c]=q.useState(w);q.useEffect(()=>{w&&!y&&c(!0),!w&&y&&c(!1)},[w,y]);const x=()=>{const v=!y;c(v),u==null||u(v)},d=w&&y;return a.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...d?{"data-jp-expanded-item":e}:{},children:[a.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[a.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:a.jsxs("button",{type:"button",onClick:x,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[y?a.jsx(mt,{size:12,className:"shrink-0"}):a.jsx(pt,{size:12,className:"shrink-0"}),a.jsx("span",{className:"truncate",children:m})]})}),a.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[a.jsx("button",{type:"button",disabled:l,onClick:o,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:a.jsx(Ln,{size:12})}),a.jsx("button",{type:"button",disabled:h,onClick:n,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:a.jsx(On,{size:12})}),a.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),a.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:a.jsx(ot,{size:12})})]})]}),y&&a.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:p})]})},yr=be.forwardRef(({className:e,checked:_=!1,onCheckedChange:r,...m},u)=>{const i=()=>r==null?void 0:r(!_);return a.jsx("button",{ref:u,type:"button",role:"switch","aria-checked":_,"data-state":_?"checked":"unchecked",onClick:i,className:he("peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-900","disabled:cursor-not-allowed disabled:opacity-50",_?"bg-blue-600":"bg-zinc-700",e),...m,children:a.jsx("span",{className:he("pointer-events-none block h-3 w-3 rounded-full bg-white shadow ring-0 transition-transform",_?"translate-x-3":"translate-x-0.5")})})});yr.displayName="Switch";const kr=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),_r=({selectedSection:e,pageData:_,allSectionsData:r=[],onUpdate:m,onUpdateSection:u,onClose:i,expandedItemPath:o=null,onReorderSection:n,allLayers:l=[],activeSectionId:h,onRequestScrollToSection:p,onDeleteSection:w,onAddSection:y,hasChanges:c=!1,autosaveEnabled:x=!0,onAutosaveChange:d,onExportHTML:v,onExportJSON:f,onResetToFile:k,showResetToFile:E=!1})=>{const{schemas:N}=He(),[A,L]=q.useState(!0),[I,O]=q.useState(null),[T,B]=q.useState(null),[X,j]=q.useState(null),[P,s]=q.useState(null),[R,ee]=q.useState(null),U=q.useRef(null),H=q.useRef(null),$=q.useDeferredValue(e),re=e!=null&&($==null?void 0:$.id)!==e.id,z=o&&o.length>0?o:P?[P]:null,S=z!=null&&z.length?{fieldKey:z[z.length-1].fieldKey,itemId:z[z.length-1].itemId}:null,J=q.useRef(o);q.useEffect(()=>{J.current!=null&&o==null&&s(null),J.current=o},[o]),q.useEffect(()=>{(e==null?void 0:e.id)!=null&&L(!1)},[e==null?void 0:e.id]);const K=()=>{const b=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const g=U.current;g&&g.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(b)},Q=q.useRef(A);q.useEffect(()=>{if(A&&!Q.current){const b=K();return Q.current=A,b}Q.current=A},[A]),q.useEffect(()=>{if(!S)return;const b=U.current;if(!b)return;const g=requestAnimationFrame(()=>{const C=b.querySelector("[data-jp-expanded-item]")??b.querySelector("[data-jp-focused-field]");C&&C.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(g)},[S]);const fe=b=>{L(!1),p==null||p(b)},se=()=>{L(b=>{const g=!b;return g&&K(),g})},le=(b,g)=>{g.stopPropagation(),r.length>0&&u?ee(b):(L(!1),p==null||p(b))};q.useEffect(()=>{if(R==null)return;const b=g=>{g.key==="Escape"&&ee(null)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[R]);const ce=b=>{I===b?(w==null||w(b),O(null)):(O(b),setTimeout(()=>O(null),3e3))},ge=(b,g)=>{B(g),b.dataTransfer.effectAllowed="move",b.dataTransfer.setData("application/json",JSON.stringify({sectionId:g}))},pe=(b,g)=>{b.preventDefault(),T!==g&&j(g)},_e=(b,g)=>{if(b.preventDefault(),B(null),j(null),!T||T===g||!n)return;const C=l.filter(D=>D.scope==="local"),M=C.findIndex(D=>D.id===T),G=C.findIndex(D=>D.id===g);M===-1||G===-1||n(T,G)},je=e?_.sections.find(b=>b.id===e.id):void 0,t=$?_.sections.find(b=>b.id===$.id):void 0,Z=$?N[$.type]:void 0,F=l.length>0&&(A||!e);return a.jsxs("aside",{className:"relative w-full h-full bg-zinc-950 border-l border-zinc-800 flex flex-col shadow-2xl shrink-0 min-w-0 animate-in slide-in-from-right duration-300",children:[a.jsxs("div",{className:"sticky top-0 z-10 flex flex-col shrink-0 bg-zinc-950 border-b border-zinc-800",children:[a.jsxs("div",{className:"py-2 px-3 flex justify-between items-center bg-zinc-900/50",children:[a.jsx("div",{className:"flex items-center gap-2 min-w-0",children:a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-bold text-white leading-tight",children:"Inspector"}),a.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider flex items-center gap-1.5 leading-tight mt-0.5",children:e?a.jsxs(a.Fragment,{children:[n&&e.scope==="local"&&a.jsx("span",{className:"text-zinc-500 shrink-0",title:"Reorder section on page",children:a.jsx(bt,{size:12,strokeWidth:2})}),a.jsx("span",{className:"text-blue-400",children:e.type}),a.jsx("span",{className:"text-zinc-600",children:"|"}),a.jsx("span",{className:"text-zinc-500",children:e.scope})]}):a.jsx("span",{className:"text-zinc-500",children:"Waiting for Selection..."})})]})}),a.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y!=null&&a.jsxs("button",{type:"button",onClick:y,className:"flex items-center gap-1.5 text-zinc-500 hover:text-white transition-colors p-1 hover:bg-zinc-800 rounded",title:"Add section","aria-label":"Add section",children:[a.jsx(sr,{size:16}),a.jsx("span",{className:"text-xs font-medium",children:"Add section"})]}),a.jsx("button",{type:"button",onClick:i,className:"p-1 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors",title:"Close Inspector","aria-label":"Close Inspector",children:a.jsx(Me,{size:16})})]})]}),l.length>0&&a.jsxs("div",{className:"bg-zinc-900/20 opacity-100",children:[a.jsxs("button",{type:"button",onClick:se,className:"w-full flex items-center justify-between py-3 px-4 hover:bg-zinc-800/30 transition-colors cursor-pointer text-left rounded-none border-0 bg-transparent","aria-expanded":F,"aria-label":F?"Collapse Page Layers":"Expand Page Layers",children:[a.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[a.jsx(gt,{size:14,className:"text-primary shrink-0"}),a.jsx("span",{className:"text-xs font-bold text-white",children:"Page Layers"}),a.jsxs("span",{className:"text-[10px] text-zinc-500",children:["(",l.length,")"]})]}),a.jsx("span",{className:"text-zinc-500 shrink-0 pointer-events-none","aria-hidden":!0,children:F?a.jsx(mt,{size:14}):a.jsx(pt,{size:14})})]}),!F&&e&&(()=>{const b=l.find(C=>C.id===e.id);if(!b)return null;const g=h===e.id;return a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2 bg-primary/10 border-t border-zinc-800/50",children:[a.jsx(bt,{size:12,className:"text-primary shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-primary truncate flex items-center gap-1",children:[b.type,g&&a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),a.jsx("p",{className:"text-xs text-white font-medium truncate",children:b.title??`${b.type} section`})]}),a.jsx("button",{type:"button",onClick:C=>le(b.id,C),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${b.type}`,"aria-label":`Open settings for ${b.type} section`,children:a.jsx(lr,{size:12})})]})})()]})]}),a.jsxs("div",{ref:U,className:"flex-1 min-h-0 overflow-y-auto flex flex-col custom-scrollbar",children:[F&&a.jsxs("div",{className:"border-b border-zinc-800 bg-zinc-900/20 px-3 pb-3 pt-1",children:[l.map(b=>{const g=(e==null?void 0:e.id)===b.id,C=h===b.id,M=T===b.id,G=X===b.id,D=b.scope==="local"&&w,oe=b.scope==="local"&&!!n;return a.jsxs("div",{draggable:oe,onDragStart:V=>oe&&ge(V,b.id),onDragOver:V=>oe&&pe(V,b.id),onDragLeave:()=>j(null),onDrop:V=>oe&&_e(V,b.id),onDragEnd:()=>{B(null),j(null)},className:he("flex items-center gap-2 py-2.5 px-2 rounded-sm border-t transition-colors",G&&"border-t-2 border-dashed border-primary bg-primary/5",!G&&g&&"border-primary/30 bg-primary/10",!G&&!g&&"border-zinc-800/90 hover:bg-zinc-800/40",M&&"opacity-40",oe?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[a.jsx(bt,{size:12,className:`shrink-0 ${g?"text-primary":"text-zinc-500"}`}),a.jsxs("button",{type:"button",onClick:()=>fe(b.id),className:"flex-1 min-w-0 text-left",children:[a.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-zinc-400 truncate flex items-center gap-1",children:[b.type,C&&a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),a.jsx("p",{className:`text-xs truncate ${g?"text-white font-medium":"text-zinc-500"}`,children:b.title??`${b.type} section`})]}),a.jsx("button",{type:"button",onClick:V=>le(b.id,V),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${b.type}`,"aria-label":`Open settings for ${b.type} section`,children:a.jsx(lr,{size:12})}),D&&a.jsx("button",{type:"button",onClick:V=>{V.stopPropagation(),ce(b.id)},className:`p-1 rounded shrink-0 ${I===b.id?"bg-red-500/20 text-red-400":"text-zinc-500 hover:text-red-400"}`,title:"Delete section",children:a.jsx(ot,{size:12})})]},b.id)}),I&&a.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 rounded-md bg-amber-500/10 border border-amber-500/30",children:[a.jsx(Rn,{size:12,className:"text-amber-500 shrink-0"}),a.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]}),S&&je&&(()=>{const b=je.data||{};let g;if(z&&z.length>0){let C=b;for(const D of z){const Y=C==null?void 0:C[D.fieldKey];D.itemId!=null&&Array.isArray(Y)?C=Y.find(V=>String(V==null?void 0:V.id)===String(D.itemId))??null:C=Y}const M=C||{},G=S.fieldKey;g=(typeof M.name=="string"?M.name:null)??(typeof M.title=="string"?M.title:null)??(typeof M.label=="string"?M.label:null)??G.charAt(0).toUpperCase()+G.slice(1).replace(/([A-Z])/g," $1").trim()}else{const C=S.fieldKey;if(S.itemId!=null){const D=(Array.isArray(b[C])?b[C]:[]).find(Y=>String(Y==null?void 0:Y.id)===String(S.itemId))||{};g=(typeof D.name=="string"?D.name:null)??(typeof D.title=="string"?D.title:null)??(typeof D.label=="string"?D.label:null)??C}else g=C.charAt(0).toUpperCase()+C.slice(1).replace(/([A-Z])/g," $1").trim()}return a.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[a.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),a.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:g})]})})(),a.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&L(!1),children:e?re?a.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[a.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),a.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),a.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),a.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),a.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):Z?(()=>{const g=Object.keys(Z.shape).filter(Y=>!kr.has(Y)),C=(t==null?void 0:t.data)||{};if(g.length===0)return a.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const M=z==null?void 0:z[0],G=(M==null?void 0:M.itemId)!=null?{[M.fieldKey]:M.itemId}:(S==null?void 0:S.itemId)!=null?{[S.fieldKey]:S.itemId}:void 0,D=(M==null?void 0:M.fieldKey)??(S==null?void 0:S.fieldKey)??null;return a.jsx(Ve,{schema:Z,data:C,onChange:Y=>m(Y),keys:g,expandedItemPath:z,expandedItemIdByField:G,focusedFieldKey:D,onSidebarExpandedItemChange:s})})():a.jsxs("div",{className:"text-xs text-red-400 p-4 border border-dashed border-red-900/30 rounded bg-red-900/10",children:["No schema found for ",($==null?void 0:$.type)??e.type]}):a.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"Select a layer above or on the stage to edit."})})]}),a.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center gap-3 opacity-100 flex-wrap",children:(d!=null||v!=null||f!=null||k!=null)&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",c?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),a.jsx("span",{className:he("text-xs font-medium transition-colors duration-300 shrink-0",c?"text-amber-500":"text-zinc-500"),children:c?"Unsaved Changes":"All Changes Saved"}),d!=null&&a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[a.jsx(yr,{id:"autosave-toggle",checked:x,onCheckedChange:d,className:"shrink-0"}),a.jsx(Oe,{htmlFor:"autosave-toggle",className:"text-[11px] font-medium text-zinc-400 cursor-pointer",children:"Autosave"})]}),v!=null&&a.jsxs("button",{type:"button",onClick:v,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[a.jsx(or,{size:12,className:"shrink-0"}),a.jsx("span",{children:"HTML"})]}),f!=null&&a.jsxs("button",{type:"button",onClick:f,disabled:!c,className:he("shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all",c?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[a.jsx(ir,{size:12,className:"shrink-0"}),a.jsx("span",{children:"JSON"})]}),k!=null&&E&&a.jsx("button",{type:"button",onClick:k,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:a.jsx("span",{children:"Ripristina da file"})})]})}),R!=null&&r.length>0&&u!=null&&(()=>{const b=r.find(V=>V.id===R),g=l.find(V=>V.id===R);if(!b)return null;const C=(g==null?void 0:g.scope)==="global"?"global":"local",M=b.type,G=N[M],Y=(G?Object.keys(G.shape):[]).filter(V=>kr.has(V)),oe=b.data??{};return Y.length===0?a.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:()=>ee(null),children:a.jsxs("div",{ref:H,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:V=>V.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[a.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",M]}),a.jsx("button",{type:"button",onClick:()=>ee(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:a.jsx(Me,{size:18})})]}),a.jsx("div",{className:"p-4",children:a.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):a.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:V=>V.target===V.currentTarget&&ee(null),children:a.jsxs("div",{ref:H,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full max-h-[85vh] flex flex-col overflow-hidden",onClick:V=>V.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[a.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",M]}),a.jsx("button",{type:"button",onClick:()=>ee(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:a.jsx(Me,{size:18})})]}),a.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:a.jsx(Ve,{schema:G,data:oe,onChange:V=>{const W={...b.data,...V};u(R,C,M,W)},keys:Y})})]})})})()]})},zr=({draft:e,globalDraft:_,themeConfig:r,slug:m,selectedId:u,scrollToSectionId:i,onScrollRequested:o})=>{const n=q.useRef(null),l=q.useCallback(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:we.UPDATE_DRAFTS,draft:e,globalDraft:_,themeConfig:r},"*")},[e,_,r]);return q.useEffect(()=>{l()},[l]),q.useEffect(()=>{const h=p=>{p.data.type===we.STAGE_READY&&l()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[l]),q.useEffect(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:we.SYNC_SELECTION,selectedId:u},"*")},[u]),q.useEffect(()=>{var h;!i||!((h=n.current)!=null&&h.contentWindow)||(n.current.contentWindow.postMessage({type:we.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),o==null||o())},[i,o]),a.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:a.jsx("iframe",{ref:n,src:`/admin/preview/${m}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},st={setTheme:e=>{const _=document.documentElement,{tokens:r}=e,m={"--theme-primary":r.colors.primary,"--theme-secondary":r.colors.secondary,"--theme-accent":r.colors.accent,"--theme-background":r.colors.background,"--theme-surface":r.colors.surface,"--theme-surface-alt":r.colors.surfaceAlt,"--theme-text":r.colors.text,"--theme-text-muted":r.colors.textMuted,"--theme-border":r.colors.border,"--theme-font-primary":r.typography.fontFamily.primary,"--theme-font-mono":r.typography.fontFamily.mono,"--theme-radius-sm":r.borderRadius.sm,"--theme-radius-md":r.borderRadius.md,"--theme-radius-lg":r.borderRadius.lg};Object.entries(m).forEach(([u,i])=>{_.style.setProperty(u,i)})}},jr=()=>{var c;const[e,_]=q.useState(null),[r,m]=q.useState(null),[u,i]=q.useState(null),[o,n]=q.useState(null),[l,h]=q.useState(!1);if(q.useEffect(()=>{const x=d=>{d.data.type===we.UPDATE_DRAFTS&&(_(d.data.draft),m(d.data.globalDraft),d.data.themeConfig&&st.setTheme(d.data.themeConfig)),d.data.type===we.SYNC_SELECTION&&i(d.data.selectedId),d.data.type===we.REQUEST_SCROLL_TO_SECTION&&n(d.data.sectionId??null),d.data.type===we.REQUEST_CLEAN_HTML&&(h(!0),setTimeout(()=>{const v=document.documentElement.outerHTML;window.parent.postMessage({type:we.SEND_CLEAN_HTML,html:v},"*"),h(!1)},50))};return window.addEventListener("message",x),window.parent.postMessage({type:we.STAGE_READY},"*"),()=>window.removeEventListener("message",x)},[]),q.useEffect(()=>{const x=d=>{var j,P,s,R,ee,U,H,$;const v=d.target,f=d.clientX,k=d.clientY;let E=null,N=v;for(;N&&N!==document.body;){const re=(j=N.getAttribute)==null?void 0:j.call(N,"data-section-id"),z=(P=N.getAttribute)==null?void 0:P.call(N,"data-section-type"),S=(s=N.getAttribute)==null?void 0:s.call(N,"data-section-scope");if(re&&z&&S){E=N;break}N=N.parentElement}if(!E)return;d.preventDefault(),d.stopPropagation();const A=E.getAttribute("data-section-id"),L=E.getAttribute("data-section-type"),I=E.getAttribute("data-section-scope");if(!A||!L||!I)return;const O={id:A,type:L,scope:I};if(v===E){window.parent.postMessage({type:we.SECTION_SELECT,section:O},"*");return}const T=document.elementFromPoint(f,k)??v;if(!T||!E.contains(T)){window.parent.postMessage({type:we.SECTION_SELECT,section:O},"*");return}if(T===E){window.parent.postMessage({type:we.SECTION_SELECT,section:O},"*");return}const B=[];for(N=T;N&&N!==E;){const re=(R=N.getAttribute)==null?void 0:R.call(N,"data-jp-item-id"),z=(ee=N.getAttribute)==null?void 0:ee.call(N,"data-jp-item-field");re&&z&&B.push({fieldKey:z||"items",itemId:re}),N=N.parentElement}if(B.reverse(),B.length===0)for(N=T;N&&N!==E;){const re=(U=N.getAttribute)==null?void 0:U.call(N,"data-jp-field");if(re){B.push({fieldKey:re});break}N=N.parentElement}if(B.length===0&&T){let re=null;const z=S=>{var K,Q;const J=S.getBoundingClientRect();if(J.left<=f&&f<=J.right&&J.top<=k&&k<=J.bottom){for(let fe=0;fe<S.children.length;fe++)z(S.children[fe]);((K=S.getAttribute)!=null&&K.call(S,"data-jp-item-id")||(Q=S.getAttribute)!=null&&Q.call(S,"data-jp-field"))&&(re=S)}};if(z(T),re){const S=re,J=(H=S.getAttribute)==null?void 0:H.call(S,"data-jp-item-id"),K=($=S.getAttribute)==null?void 0:$.call(S,"data-jp-field");J&&K?B.push({fieldKey:K||"items",itemId:J}):K&&B.push({fieldKey:K})}}const X={type:we.SECTION_SELECT,section:O};if(B.length>0){X.itemPath=B;const re=B[0];re.itemId!=null?(X.itemField=re.fieldKey,X.itemId=re.itemId):X.itemField=re.fieldKey}window.parent.postMessage(X,"*")};return document.addEventListener("click",x,!0),()=>document.removeEventListener("click",x,!0)},[]),q.useEffect(()=>{if(!o)return;const x=setTimeout(()=>n(null),600);return()=>clearTimeout(x)},[o]),!e||!r)return a.jsx("div",{className:"flex items-center justify-center h-screen w-full bg-zinc-950 text-zinc-500 font-mono text-xs uppercase tracking-widest animate-pulse",children:"Waiting for Studio Signal..."});const p=(c=r.header)==null?void 0:c.data,w={main:(p==null?void 0:p.links)??[]},y=x=>{window.parent.postMessage({type:we.ACTIVE_SECTION_CHANGED,activeSectionId:x},"*")};return a.jsx(rt,{mode:l?"visitor":"studio",children:a.jsx("div",{className:l?"":"jp-ice-active",children:a.jsx(vt,{pageConfig:e,siteConfig:r,menuConfig:w,selectedId:l?null:u,scrollToSectionId:o,onActiveSectionChange:y})})})};function fo(e){return e.split("-").map(_=>_.charAt(0).toUpperCase()+_.slice(1).toLowerCase()).join(" ")}const Er=({open:e,onClose:_,sectionTypes:r,sectionTypeLabels:m,onSelect:u})=>{if(q.useEffect(()=>{if(!e)return;const o=n=>{n.key==="Escape"&&_()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,_]),!e)return null;const i=o=>(m==null?void 0:m[o])??fo(o);return a.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"jp-add-section-title",children:[a.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:_,"aria-hidden":"true"}),a.jsxs("div",{className:"relative w-full max-w-md max-h-[85vh] flex flex-col rounded-xl border border-zinc-700 bg-zinc-900 shadow-2xl overflow-hidden",children:[a.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:a.jsx(gt,{size:18})}),a.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),a.jsx("button",{type:"button",onClick:_,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:a.jsx(Me,{size:18})})]}),a.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?a.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):a.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(o=>a.jsx("li",{role:"option",children:a.jsxs("button",{type:"button",onClick:()=>{u(o),_()},className:he("w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left","border border-zinc-700/80 bg-zinc-800/50","hover:border-blue-500/40 hover:bg-zinc-800 transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-2 focus:ring-offset-zinc-900"),children:[a.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-md bg-zinc-700/80 text-zinc-400 text-xs font-mono shrink-0",children:o}),a.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(o)})]})},o))})}),a.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:a.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},Sr=()=>a.jsxs("div",{style:{"--local-bg":"var(--color-background)","--local-text":"var(--color-text)","--local-text-muted":"var(--color-text-muted)","--local-primary":"var(--color-primary)","--local-radius-md":"var(--radius-md)"},className:"min-h-screen flex flex-col items-center justify-center bg-[var(--local-bg)] px-6",children:[a.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),a.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),a.jsx("a",{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 rounded-[var(--local-radius-md)] bg-[var(--local-primary)] text-[var(--local-bg)] font-semibold text-sm hover:opacity-90 transition-opacity",children:"Back to Home"})]}),po='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.z-0{z-index:0}.z-10{z-index:10}.z-50,.z-\\[50\\]{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[70\\]{z-index:70}.z-\\[100\\]{z-index:100}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\/4{width:75%}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[18px\\]{min-width:18px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[var\\(--local-radius-md\\)\\]{border-radius:var(--local-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-primary,.border-primary\\/30{border-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\\/30{border-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/90{border-color:#27272ae6}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/90{border-color:color-mix(in oklab,var(--color-zinc-800)90%,transparent)}}.bg-\\[var\\(--color-background\\)\\]{background-color:var(--color-background)}.bg-\\[var\\(--local-bg\\)\\]{background-color:var(--local-bg)}.bg-\\[var\\(--local-primary\\)\\]{background-color:var(--local-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-background{background-color:var(--color-background)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary)5%,transparent)}}.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-\\[length\\:12px\\]{background-size:12px}.bg-\\[right_0\\.25rem_center\\]{background-position:right .25rem center}.bg-no-repeat{background-repeat:no-repeat}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-6{padding-right:calc(var(--spacing)*6)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-\\[var\\(--local-bg\\)\\]{color:var(--local-bg)}.text-\\[var\\(--local-text\\)\\]{color:var(--local-text)}.text-\\[var\\(--local-text-muted\\)\\]{color:var(--local-text-muted)}.text-amber-200{color:var(--color-amber-200)}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\\/70{color:#f99c00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-500\\/70{color:color-mix(in oklab,var(--color-amber-500)70%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-blue-900\\/20{--tw-shadow-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.shadow-blue-900\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-900)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-primary\\/40:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/40:hover{background-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:bg-zinc-800\\/30:hover{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/30:hover{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.hover\\:bg-zinc-800\\/40:hover{background-color:#27272a66}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/40:hover{background-color:color-mix(in oklab,var(--color-zinc-800)40%,transparent)}}.hover\\:bg-zinc-800\\/50:hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.focus\\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-zinc-900:focus{--tw-ring-offset-color:var(--color-zinc-900)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}}:root{--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(42% .18 266);--primary-foreground:oklch(97% .014 254.604);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(42% .18 266);--accent-foreground:oklch(97% .014 254.604);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(97% .014 254.604);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--radius:.5rem;font-family:ui-sans-serif,system-ui,sans-serif}[data-radix-portal]{z-index:9999!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class mo extends q.Component{constructor(_){super(_),this.state={hasError:!1,error:null}}static getDerivedStateFromError(_){return{hasError:!0,error:_}}componentDidCatch(_,r){console.error("[JsonPages Engine]",_,r)}render(){return this.state.hasError&&this.state.error?a.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24,backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:"ui-sans-serif, system-ui, sans-serif"},children:[a.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),a.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function bo({config:e}){var N,A;const{registry:_={},schemas:r={},pages:m={},siteConfig:u,themeConfig:i,menuConfig:o,themeCss:n,addSection:l,NotFoundComponent:h=Sr}=e,p=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(L=>L!=="header"&&L!=="footer"),w={exportJSON:((N=e.persistence)==null?void 0:N.exportJSON)??Ct,exportHTML:((A=e.persistence)==null?void 0:A.exportHTML)??At},y=typeof(n==null?void 0:n.tenant)=="string"?n.tenant:"",c=typeof(n==null?void 0:n.admin)=="string"?n.admin:po,[x,d]=q.useState(!1);q.useEffect(()=>{try{i!=null&&i.tokens&&st.setTheme(i)}catch(L){console.warn("[JsonPages] setTheme failed",L)}d(!0)},[i]);const v=()=>{const{slug:L="home"}=Ne.useParams(),[I,O]=q.useState(null);q.useEffect(()=>{const j=document.getElementById("jp-baked-state");if(j!=null&&j.textContent)try{const P=JSON.parse(j.textContent);O(P),st.setTheme(P.theme)}catch(P){console.error("Failed to parse baked state",P)}},[]);const T=I?I.page:m[L],B=I?I.site:u,X=I?I.menu:o;return T?a.jsx(it,{mode:"tenant",tenantCss:y,adminCss:c,children:a.jsx(rt,{mode:"visitor",children:a.jsx(vt,{pageConfig:T,siteConfig:B,menuConfig:X})})}):a.jsx(h,{})},f=e.tenantId??"default",k=()=>{const{slug:L="home"}=Ne.useParams(),[I,O]=q.useState(null),[T,B]=q.useState(!1),[X,j]=q.useState(()=>{var W;try{const te=JSON.parse(JSON.stringify(u??{}));te.identity||(te.identity={title:"Site"}),te.pages||(te.pages=[]);const ne=(W=te.header)==null?void 0:W.data;return ne&&(o!=null&&o.main)&&(ne.links=JSON.parse(JSON.stringify(o.main))),te}catch{return{identity:{title:"Site"},pages:[]}}}),[P,s]=q.useState(null),[R,ee]=q.useState(null),[U,H]=q.useState(null),[$,re]=q.useState(null),[z,S]=q.useState(!1),[J,K]=q.useState(400),Q=360,fe=920,se=q.useCallback(W=>{W.preventDefault();const te=W.currentTarget;te.setPointerCapture(W.pointerId);const ne=W.clientX,de=J,ze=Se=>{const xe=ne-Se.clientX,Ue=Math.min(fe,Math.max(Q,de+xe));K(Ue)},ye=()=>{te.releasePointerCapture(W.pointerId),te.removeEventListener("pointermove",ze),te.removeEventListener("pointerup",ye),te.removeEventListener("pointercancel",ye),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",te.addEventListener("pointermove",ze),te.addEventListener("pointerup",ye),te.addEventListener("pointercancel",ye)},[J]),le=I?[...X.header?[{id:X.header.id,type:X.header.type,scope:"global",title:"Header"}]:[],...I.sections.map(W=>{var te,ne;return{id:W.id,type:W.type,scope:"local",title:((te=W.data)==null?void 0:te.title)??((ne=W.data)==null?void 0:ne.titleHighlight)}}),...X.footer?[{id:X.footer.id,type:X.footer.type,scope:"global",title:"Footer"}]:[]]:[],ce=`jsonpages-draft-${f}-${L}`,ge=`jsonpages-autosave-enabled-${f}`,[pe,_e]=q.useState(()=>{if(typeof window>"u")return!0;try{return localStorage.getItem(ge)!=="false"}catch{return!0}});q.useEffect(()=>{const W=m[L];try{const te=typeof window<"u"?localStorage.getItem(ce):null,ne=te?JSON.parse(te):null;ne!=null&&ne.page&&(ne!=null&&ne.site)?(O(JSON.parse(JSON.stringify(ne.page))),j(JSON.parse(JSON.stringify(ne.site)))):W&&O(JSON.parse(JSON.stringify(W)))}catch{W&&O(JSON.parse(JSON.stringify(W)))}s(null),ee(null),B(!1)},[L,m,ce]),q.useEffect(()=>{if(typeof window<"u")try{localStorage.setItem(ge,String(pe))}catch{}},[pe,ge]),q.useEffect(()=>{if(!pe||!I||typeof window>"u")return;const W=setTimeout(()=>{try{localStorage.setItem(ce,JSON.stringify({page:I,site:X})),B(!1)}catch{}},3e3);return()=>clearTimeout(W)},[pe,I,X,ce]);const je=q.useCallback(()=>{const W=m[L];try{typeof window<"u"&&localStorage.removeItem(ce)}catch{}W&&O(JSON.parse(JSON.stringify(W))),s(null),ee(null),B(!1)},[L,m,ce]),t=q.useCallback((W,te,ne)=>{const de=[...ne.sections],ze=de.findIndex(xe=>xe.id===W);if(ze===-1||te<0||te>=de.length)return;const[ye]=de.splice(ze,1),Se=te>ze?te-1:te;de.splice(Math.min(Se,de.length),0,ye),O({...ne,sections:de}),B(!0)},[]),Z=q.useCallback(W=>{var te;if(W.origin===window.location.origin){if(W.data.type===we.SECTION_SELECT){s(W.data.section);const ne=W.data.itemPath;if(Array.isArray(ne)&&ne.length>0)ee(ne.map(de=>({fieldKey:de.fieldKey,...de.itemId!=null?{itemId:String(de.itemId)}:{}})));else{const de=W.data.itemField,ze=W.data.itemId;ee(typeof de=="string"?[{fieldKey:de,...ze!=null?{itemId:String(ze)}:{}}]:null)}}if(W.data.type===we.ACTIVE_SECTION_CHANGED&&H(W.data.activeSectionId??null),W.data.type==="jsonpages:section-reorder"&&I){const{sectionId:ne,newIndex:de}=W.data;typeof ne=="string"&&typeof de=="number"&&de>=0&&t(ne,de,I)}if(W.data.type===we.SEND_CLEAN_HTML){if(!I)return;const ne=(te=X.header)==null?void 0:te.data,de={page:I,site:X,menu:{main:(ne==null?void 0:ne.links)??[]},theme:i};w.exportHTML(de,L,W.data.html),B(!1)}}},[I,X,L,i,t]);q.useEffect(()=>(window.addEventListener("message",Z),()=>window.removeEventListener("message",Z)),[Z]);const F=q.useCallback(W=>{const te=le.find(ne=>ne.id===W);te&&s({id:te.id,type:te.type,scope:te.scope}),ee(null),re(W)},[le]),b=q.useCallback(()=>{re(null)},[]),g=q.useCallback(W=>{O(te=>te&&{...te,sections:te.sections.filter(ne=>ne.id!==W)}),B(!0),s(te=>(te==null?void 0:te.id)===W?null:te)},[]),C=W=>{if(!(!P||!I))if(B(!0),P.scope==="global")P.type==="header"&&X.header!=null?j({...X,header:{...X.header,data:W}}):P.type==="footer"&&X.footer!=null&&j({...X,footer:{...X.footer,data:W}});else{const te=I.sections.map(ne=>ne.id===P.id?{...ne,data:W}:ne);O({...I,sections:te})}},M=q.useCallback((W,te,ne,de)=>{var ze,ye;if(B(!0),te==="global")((ze=X.header)==null?void 0:ze.id)===W?j({...X,header:{...X.header,data:de}}):((ye=X.footer)==null?void 0:ye.id)===W&&j({...X,footer:{...X.footer,data:de}});else if(I){const Se=I.sections.map(xe=>xe.id===W?{...xe,data:de}:xe);O({...I,sections:Se})}},[I,X]),G=()=>{var te;const W=document.querySelector("iframe");(te=W==null?void 0:W.contentWindow)==null||te.postMessage({type:we.REQUEST_CLEAN_HTML},"*")},D=()=>{var ne;if(!I)return;const W=(ne=X.header)==null?void 0:ne.data,te={page:I,site:X,menu:{main:(W==null?void 0:W.links)??[]},theme:i};w.exportJSON(te,L),B(!1)},Y=W=>{var de;if(!I)return;const te=((de=l==null?void 0:l.getDefaultSectionData)==null?void 0:de.call(l,W))??{},ne={id:crypto.randomUUID(),type:W,data:te,settings:void 0};O({...I,sections:[...I.sections,ne]}),B(!0),s({id:ne.id,type:W,scope:"local"})};if(!I)return a.jsx("div",{children:"Loading Studio..."});const oe=(P==null?void 0:P.scope)==="global"?{sections:[X.header,X.footer].filter(W=>W!=null)}:I,V=[...X.header?[X.header]:[],...I.sections,...X.footer?[X.footer]:[]];return a.jsx(it,{mode:"admin",tenantCss:y,adminCss:c,children:a.jsx(rt,{mode:"studio",children:a.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[a.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[a.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:a.jsx(zr,{draft:I,globalDraft:X,themeConfig:i,slug:L,selectedId:P==null?void 0:P.id,scrollToSectionId:$,onScrollRequested:b})}),a.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:J,minWidth:Q,maxWidth:fe},children:[a.jsx("div",{role:"separator","aria-label":"Resize inspector",className:"absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-primary/40 active:bg-primary/60 transition-colors shrink-0",style:{zIndex:9999},onPointerDown:se}),a.jsx(_r,{selectedSection:P,pageData:oe,allSectionsData:V,onUpdate:C,onUpdateSection:M,onClose:()=>{s(null),ee(null)},expandedItemPath:R,onReorderSection:I?(W,te)=>t(W,te,I):void 0,allLayers:le,activeSectionId:U,onRequestScrollToSection:F,onDeleteSection:I?g:void 0,onAddSection:p.length>0?()=>S(!0):void 0,hasChanges:T,autosaveEnabled:pe,onAutosaveChange:_e,onExportHTML:G,onExportJSON:D,onResetToFile:je})]})]}),a.jsx(Er,{open:z,onClose:()=>S(!1),sectionTypes:p,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:Y})]})})})},E=()=>a.jsx(it,{mode:"tenant",tenantCss:y,adminCss:c,children:a.jsx(jr,{})});return x?a.jsx(mo,{children:a.jsx(Qt,{config:{registry:_,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:a.jsx(Ne.BrowserRouter,{children:a.jsxs(Ne.Routes,{children:[a.jsx(Ne.Route,{path:"/",element:a.jsx(v,{})}),a.jsx(Ne.Route,{path:"/:slug",element:a.jsx(v,{})}),a.jsx(Ne.Route,{path:"/admin",element:a.jsx(k,{})}),a.jsx(Ne.Route,{path:"/admin/:slug",element:a.jsx(k,{})}),a.jsx(Ne.Route,{path:"/admin/preview/:slug",element:a.jsx(E,{})}),a.jsx(Ne.Route,{path:"*",element:a.jsx(h,{})})]})})})}):a.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#0f172a",color:"#94a3b8",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:14},children:"Loading…"})}const go=({hasChanges:e,onExportJSON:_,onExportHTML:r,onAddSection:m})=>a.jsxs("div",{className:"h-14 border-b border-zinc-800 bg-zinc-950 flex items-center justify-between px-6 shrink-0 z-50 relative",children:[a.jsx("div",{className:"flex items-center gap-3",children:m!=null&&a.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600 transition-colors",title:"Add section","aria-label":"Add section",children:[a.jsx(Zn,{size:14}),a.jsx("span",{children:"Add section"})]})}),a.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:a.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium transition-all border bg-zinc-900 border-zinc-700 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[a.jsx(or,{size:14}),a.jsx("span",{children:"Bake HTML"})]}),a.jsxs("button",{onClick:_,disabled:!e,className:he("flex items-center gap-2 px-4 py-1.5 rounded-md text-xs font-bold transition-all shadow-lg",e?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[a.jsx(ir,{size:14}),a.jsx("span",{children:"Export JSON"})]})]})]});me.AddSectionLibrary=Er,me.AdminSidebar=_r,me.ConfigProvider=Qt,me.ControlBar=go,me.DefaultNotFound=Sr,me.FormFactory=Ve,me.InputWidgets=Ke,me.JsonPagesEngine=bo,me.PageRenderer=vt,me.PreviewEntry=jr,me.STUDIO_EVENTS=we,me.SectionRenderer=Ge,me.StudioProvider=rt,me.StudioStage=zr,me.ThemeLoader=it,me.cn=he,me.exportBakedHTML=At,me.exportProjectJSON=Ct,me.resolveAssetUrl=xr,me.themeManager=st,me.useConfig=He,me.useStudio=tr,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})}));
|
|
198
|
+
*/const Gn=ge("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);class Vn extends J.Component{constructor(k){super(k),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(k,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,k,r)}render(){return this.state.hasError?s.jsxs("div",{className:"p-8 m-4 bg-amber-500/5 border-2 border-dashed border-amber-500/20 rounded-xl flex flex-col items-center text-center gap-3",children:[s.jsx(Hn,{className:"text-amber-500",size:32}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),s.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),s.jsx("p",{className:"text-xs text-zinc-400 max-w-[280px] leading-relaxed",children:"This section failed to render. Check the console for details or verify the JSON data structure."})]}):this.props.children}}const Kn=({type:e,scope:k,isSelected:r,sectionId:m,sectionIndex:u=0,totalSections:i=0,onReorder:o})=>{const n=typeof u=="number"&&u>0&&o,l=typeof u=="number"&&u<i-1&&o;return s.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:ue("absolute inset-0 pointer-events-none transition-all duration-200 z-[50]","border-2 border-transparent group-hover:border-blue-400/50 group-hover:border-dashed",r&&"border-2 border-blue-600 border-solid bg-blue-500/5"),children:s.jsxs("div",{className:ue("absolute top-0 right-0 flex flex-nowrap items-center gap-1 pl-1 pr-2 py-1 text-[9px] font-black uppercase tracking-widest transition-opacity pointer-events-auto","bg-blue-600 text-white",r||"group-hover:opacity-100 opacity-0"),children:[o&&m!=null&&s.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[s.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),n&&o(m,u-1)},disabled:!n,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section up","aria-label":"Move section up",children:s.jsx(mt,{size:12,strokeWidth:2.5})}),s.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),l&&o(m,u+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:s.jsx(pt,{size:12,strokeWidth:2.5})})]}),s.jsx("span",{className:"shrink-0",children:e}),s.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),s.jsx("span",{className:"shrink-0",children:k})]})})},$e=({section:e,menu:k,selectedId:r,reorderable:m,sectionIndex:u,totalSections:i,onReorder:o})=>{var p,y;const{mode:n}=tr(),{registry:l}=We(),h=n==="studio",f=h&&r===e.id,v=l[e.type],x=e.type==="header"||e.type==="footer"?"global":"local",c=e.type==="header"&&((p=e.settings)==null?void 0:p.sticky);if(!v)return s.jsxs("div",{className:"p-6 m-4 bg-red-500/10 text-red-400 border border-red-500/20 rounded-lg text-sm font-mono",children:[s.jsx("strong",{children:"Missing Component:"})," ",e.type]});const g=j=>{var te,E,M,a,W;if(!h)return;j.preventDefault(),j.stopPropagation();const N=j.currentTarget,A=j.clientX,O=j.clientY;if(j.target===N){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const P=document.elementFromPoint(A,O)??j.target;if(!P||!N.contains(P)){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}if(P===N){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const F=[];let D=P;for(;D&&D!==N;){const ee=(te=D.getAttribute)==null?void 0:te.call(D,"data-jp-item-id"),$=(E=D.getAttribute)==null?void 0:E.call(D,"data-jp-item-field");ee&&$&&F.push({fieldKey:$||"items",itemId:ee}),D=D.parentElement}if(F.reverse(),F.length===0)for(D=P;D&&D!==N;){const ee=(M=D.getAttribute)==null?void 0:M.call(D,"data-jp-field");if(ee){F.push({fieldKey:ee});break}D=D.parentElement}if(F.length===0&&P){let ee=null;const $=G=>{var q,z;const H=G.getBoundingClientRect();if(H.left<=A&&A<=H.right&&H.top<=O&&O<=H.bottom){for(let S=0;S<G.children.length;S++)$(G.children[S]);((q=G.getAttribute)!=null&&q.call(G,"data-jp-item-id")||(z=G.getAttribute)!=null&&z.call(G,"data-jp-field"))&&(ee=G)}};if($(P),ee){const G=ee,H=(a=G.getAttribute)==null?void 0:a.call(G,"data-jp-item-id"),q=(W=G.getAttribute)==null?void 0:W.call(G,"data-jp-field");H&&q?F.push({fieldKey:q||"items",itemId:H}):q&&F.push({fieldKey:q})}}const U={type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}};if(F.length>0){U.itemPath=F;const ee=F[0];ee.itemId!=null?(U.itemField=ee.fieldKey,U.itemId=ee.itemId):U.itemField=ee.fieldKey}window.parent.postMessage(U,"*")},d=()=>{const j=v;return e.type==="header"&&k?s.jsx(j,{data:e.data,settings:e.settings,menu:k}):s.jsx(j,{data:e.data,settings:e.settings})},b=(y=e.data)==null?void 0:y.anchorId;return s.jsxs("div",{id:b||void 0,"data-section-id":h?e.id:void 0,"data-section-type":h?e.type:void 0,"data-section-scope":h?x:void 0,...h&&f?{"data-jp-selected":!0}:{},onClickCapture:h?g:void 0,className:ue("relative w-full",h&&"group cursor-pointer",h&&c?"sticky top-0 z-[60]":"relative z-0",f&&"z-[70]"),children:[s.jsx("div",{className:"relative z-0",children:s.jsx(Vn,{type:e.type,children:d()})}),h&&s.jsx(Kn,{type:e.type,scope:x,isSelected:!!f,sectionId:m&&x==="local"?e.id:void 0,sectionIndex:m&&x==="local"?u:void 0,totalSections:m&&x==="local"?i:void 0,onReorder:m&&x==="local"?o:void 0})]})},Jn=e=>{J.useEffect(()=>{document.title=e.title;let k=document.querySelector('meta[name="description"]');k||(k=document.createElement("meta"),k.setAttribute("name","description"),document.head.appendChild(k)),k.setAttribute("content",e.description)},[e.title,e.description])},qn="application/json",vt=({pageConfig:e,siteConfig:k,menuConfig:r,selectedId:m,onReorder:u,scrollToSectionId:i,onActiveSectionChange:o})=>{var b,p;Jn(e.meta);const[n,l]=J.useState(null),h=J.useRef({}),f=J.useRef(o);f.current=o;const v=y=>{var j;(j=f.current)==null||j.call(f,y)};J.useEffect(()=>{if(!i)return;const y=h.current[i];y&&y.scrollIntoView({behavior:"smooth",block:"center"})},[i]),J.useEffect(()=>{if(!f.current)return;const j=[...k.header?[k.header.id]:[],...e.sections.map(P=>P.id),...k.footer?[k.footer.id]:[]],N=new IntersectionObserver(P=>{P.forEach(F=>{var D;if(F.isIntersecting&&F.intersectionRatio>.5){const U=F.target.getAttribute("data-section-id");U&&((D=f.current)==null||D.call(f,U))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let A=!1;const O=requestAnimationFrame(()=>{A||j.forEach(P=>{const F=h.current[P];F&&N.observe(F)})});return()=>{A=!0,cancelAnimationFrame(O),N.disconnect()}},[e.sections,(b=k.header)==null?void 0:b.id,(p=k.footer)==null?void 0:p.id]);const x=(y,j)=>{y.preventDefault(),y.dataTransfer.dropEffect="move",l(j)},c=()=>{l(null)},g=(y,j)=>{if(y.preventDefault(),l(null),!!u)try{const N=y.dataTransfer.getData(qn),{sectionId:A}=JSON.parse(N);typeof A=="string"&&u(A,j)}catch{}},d=()=>{const y=typeof u=="function",j=e.sections.map((N,A)=>{const O=n===A;return y?s.jsxs("div",{ref:P=>{h.current[N.id]=P},"data-section-id":N.id,style:{position:"relative"},onMouseEnter:()=>v(N.id),children:[s.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:O?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:O?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:P=>x(P,A),onDragLeave:c,onDrop:P=>g(P,A)}),s.jsx($e,{section:N,selectedId:m,reorderable:!0,sectionIndex:A,totalSections:e.sections.length,onReorder:u})]},N.id):s.jsx("div",{ref:P=>{h.current[N.id]=P},"data-section-id":N.id,onMouseEnter:()=>v(N.id),children:s.jsx($e,{section:N,selectedId:m})},N.id)});if(y&&j.length>0){const N=e.sections.length,A=n===N;j.push(s.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:A?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:A?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:O=>x(O,N),onDragLeave:c,onDrop:O=>g(O,N)},"jp-drop-after-last"))}return j};return s.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[k.header!=null&&s.jsx("div",{ref:y=>{h.current[k.header.id]=y},"data-section-id":k.header.id,onMouseEnter:()=>v(k.header.id),children:s.jsx($e,{section:k.header,menu:r.main,selectedId:m})}),s.jsx("main",{className:"flex-1",children:d()}),k.footer!=null&&s.jsx("div",{ref:y=>{h.current[k.footer.id]=y},"data-section-id":k.footer.id,onMouseEnter:()=>v(k.footer.id),children:s.jsx($e,{section:k.footer,selectedId:m})})]})},ot=({mode:e,tenantCss:k,adminCss:r,children:m})=>(J.useLayoutEffect(()=>{const u=`jp-theme-${e}`,i=e==="tenant"?k:r;if(!document.getElementById(u)&&i){const o=document.createElement("style");o.id=u,o.innerHTML=i,document.head.appendChild(o)}return()=>{const o=document.getElementById(u);o&&o.remove()}},[e,k,r]),s.jsx(s.Fragment,{children:m}));function xt({className:e,type:k,...r}){return s.jsx("input",{type:k,className:ue("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...r})}function Yn({className:e,...k}){return s.jsx("textarea",{className:ue("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),...k})}function Xn({className:e,checked:k,onCheckedChange:r,...m}){return s.jsx("input",{type:"checkbox",checked:k,onChange:u=>r==null?void 0:r(u.target.checked),className:ue("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...m})}function Te({className:e,...k}){return s.jsx("label",{className:ue("text-sm font-medium leading-none select-none",e),...k})}const dr=me.createContext(null);function Qn(){const e=me.useContext(dr);if(!e)throw new Error("Select components must be used within Select");return e}function eo({value:e,onValueChange:k,children:r}){const m=e??"",u=me.Children.toArray(r).find(v=>me.isValidElement(v)&&v.type===kt),i=me.Children.toArray(r).find(v=>me.isValidElement(v)&&v.type===wt),o=u&&me.isValidElement(u)?u.props.children:void 0,n=i&&me.isValidElement(i)?i.props.children:void 0,l=me.useMemo(()=>!u||!me.isValidElement(u)?[]:me.Children.toArray(u.props.children).filter(v=>me.isValidElement(v)&&v.props.value!==void 0).map(v=>({value:v.props.value,label:v.props.children??v.props.value})),[u,o]),h=me.useMemo(()=>{if(!i||!me.isValidElement(i))return"";const v=me.Children.toArray(i.props.children).find(x=>me.isValidElement(x)&&x.type===yt);return v&&me.isValidElement(v)?v.props.placeholder??"":""},[i,n]),f=me.useMemo(()=>({value:m,onValueChange:v=>k==null?void 0:k(v),options:l,placeholder:h}),[m,k,l,h]);return s.jsx(dr.Provider,{value:f,children:i})}function wt({className:e,children:k,...r}){const{value:m,onValueChange:u,options:i,placeholder:o}=Qn();return s.jsxs("div",{className:ue("relative",e),...r,children:[s.jsxs("select",{value:m,onChange:n=>u(n.target.value),className:"w-full h-7 rounded border border-zinc-800 bg-zinc-900/50 text-[11px] text-left px-2 pr-6 appearance-none bg-no-repeat bg-[length:12px] bg-[right_0.25rem_center] focus:ring-2 focus:ring-blue-600 focus:outline-none",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")`},children:[o?s.jsx("option",{value:"",children:o}):null,i.map(n=>s.jsx("option",{value:n.value,children:String(n.label)},n.value))]}),k]})}function yt(e){return null}function kt({className:e,children:k}){return s.jsx("div",{className:ue("hidden",e),"aria-hidden":!0,children:k})}function ur({className:e,value:k,children:r}){return s.jsx("div",{"data-value":k,className:e,"aria-hidden":!0,children:r})}wt.displayName="SelectTrigger",yt.displayName="SelectValue",kt.displayName="SelectContent",ur.displayName="SelectItem";const hr=me.createContext(null);function fr(){const e=me.useContext(hr);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function pr({open:e,onOpenChange:k,children:r}){const[m,u]=me.useState(!1),i=e!==void 0,o=i?e:m,n=me.useCallback(h=>{i||u(h),k==null||k(h)},[i,k]),l=me.useMemo(()=>({open:o,onOpenChange:n}),[o,n]);return s.jsx(hr.Provider,{value:l,children:r})}function to({asChild:e,children:k}){const{onOpenChange:r}=fr(),m=me.Children.only(k);return e&&me.isValidElement(m)?me.cloneElement(m,{onClick:u=>{var i,o;(o=(i=m.props).onClick)==null||o.call(i,u),r(!0)}}):s.jsx("button",{type:"button",onClick:()=>r(!0),children:k})}function mr({className:e,children:k,preventCloseOnBackdropClick:r,...m}){const{open:u,onOpenChange:i}=fr();if(me.useEffect(()=>{const n=l=>{l.key==="Escape"&&i(!1)};return u&&(document.addEventListener("keydown",n),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",n),document.body.style.overflow=""}},[u,i]),!u)return null;const o=n=>{n.preventDefault(),n.stopPropagation()};return Cr.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:o,onDrop:o}),s.jsx("div",{role:"dialog","aria-modal":!0,className:ue("fixed left-1/2 top-1/2 z-[9999] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),onClick:n=>n.stopPropagation(),...m,children:k})]}),document.body)}function br({className:e,...k}){return s.jsx("div",{className:ue("flex flex-col gap-1.5 pb-4",e),...k})}function ro({className:e,...k}){return s.jsx("div",{className:ue("flex justify-end gap-2 pt-4",e),...k})}function gr({className:e,...k}){return s.jsx("h2",{className:ue("text-sm font-semibold text-white",e),...k})}function vr({className:e,...k}){return s.jsx("p",{className:ue("text-xs text-zinc-400",e),...k})}const Oe=me.forwardRef(({className:e,variant:k="default",size:r="default",asChild:m,children:u,...i},o)=>{const n="inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 disabled:pointer-events-none disabled:opacity-50",l={default:"bg-blue-600 text-white hover:bg-blue-700",outline:"border border-zinc-700 bg-transparent hover:bg-zinc-800",ghost:"hover:bg-zinc-800"},h={sm:"h-7 px-2.5 text-xs",default:"h-9 px-4 text-sm",lg:"h-10 px-6 text-base"};if(m&&me.isValidElement(u)){const f=u,v=ue(n,l[k],h[r],f.props.className,e);return me.cloneElement(f,{className:v})}return s.jsx("button",{ref:o,type:"button",className:ue(n,l[k],h[r],e),...i,children:u})});Oe.displayName="Button";const no=["library","upload","url"];function oo({library:e,selectedId:k,onSelect:r}){const[m,u]=J.useState(""),[i,o]=J.useState("all"),n=["all",...new Set(e.flatMap(h=>h.tags??[]))],l=e.filter(h=>{const f=i==="all"||(h.tags??[]).includes(i),v=!m||(h.alt??"").toLowerCase().includes(m.toLowerCase());return f&&v});return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Un,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),s.jsx(xt,{value:m,onChange:h=>u(h.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(h=>s.jsx("button",{type:"button",onClick:()=>o(h),className:ue("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===h?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:h==="all"?"Tutte":h},h))}),l.length>0?s.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(h=>{const f=k===h.id;return s.jsxs("button",{type:"button",onClick:()=>r(f?null:h.id),className:ue("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",f?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[s.jsx("img",{src:h.url,alt:h.alt,loading:"lazy",className:ue("w-full h-full object-cover transition-[filter] duration-150",f?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),s.jsx("div",{className:ue("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",f&&"opacity-100"),children:s.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:h.alt})}),f&&s.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:s.jsx(nr,{size:14,className:"text-white"})})]},h.id)})}):s.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function io({preview:e,onPreviewChange:k,onAssetUpload:r}){const[m,u]=J.useState(!1),i=J.useRef(null),o=J.useCallback(async f=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:f.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!f.type.startsWith("image/"))return;if(r){try{const x=await r(f);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:x==null?void 0:x.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),k({name:f.name,size:f.size,dataUrl:x})}catch{const x=new FileReader;x.onload=c=>{var g;k({name:f.name,size:f.size,dataUrl:(g=c.target)==null?void 0:g.result})},x.readAsDataURL(f)}return}const v=new FileReader;v.onload=x=>{var c;k({name:f.name,size:f.size,dataUrl:(c=x.target)==null?void 0:c.result})},v.readAsDataURL(f)},[k,r]),n=J.useCallback(f=>{var x,c;f.preventDefault(),f.stopPropagation(),u(!1);const v=(c=(x=f.dataTransfer)==null?void 0:x.files)==null?void 0:c[0];v&&o(v)},[o]),l=J.useCallback(f=>{f.preventDefault(),f.stopPropagation(),u(!0)},[]),h=J.useCallback(f=>{var x;const v=(x=f.target.files)==null?void 0:x[0];v&&o(v)},[o]);return s.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:f=>{f.preventDefault(),f.stopPropagation(),u(!1)},onDrop:n,onClick:()=>{var f;return!e&&((f=i.current)==null?void 0:f.click())},className:ue("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",m?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),s.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),s.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),s.jsx(Oe,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:f=>{f.stopPropagation(),k(null)},children:s.jsx(nt,{size:14})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:s.jsx(cr,{size:22})}),s.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),s.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),s.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),s.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:h})]})}function ao({urlPreview:e,onUrlPreviewChange:k}){const[r,m]=J.useState(""),[u,i]=J.useState(!1),o=()=>{if(r.trim())try{new URL(r),k(r),i(!1)}catch{i(!0),k(null)}};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Te,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(xt,{value:r,onChange:n=>{m(n.target.value),i(!1)},onKeyDown:n=>n.key==="Enter"&&o(),placeholder:"https://images.unsplash.com/photo-...",className:ue("h-8 text-xs bg-zinc-900/50 border-zinc-800",u&&"border-red-500/50")}),s.jsx(Oe,{type:"button",variant:"outline",onClick:o,className:"shrink-0 h-8",children:"Anteprima"})]}),u&&s.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?s.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[s.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),k(null)}}),s.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[s.jsx(nr,{size:14,className:"text-emerald-400"}),s.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):u?null:s.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[s.jsx(ar,{size:32,className:"mb-3 opacity-40"}),s.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const so=({open:e,onOpenChange:k,onSelect:r})=>{const{assets:m}=We(),u=(m==null?void 0:m.assetsManifest)??[],[i,o]=J.useState("library"),[n,l]=J.useState(null),[h,f]=J.useState(null),[v,x]=J.useState(null);J.useEffect(()=>{e&&(o("library"),l(null),f(null),x(null))},[e]),J.useEffect(()=>{if(!e||i!=="upload")return;const p=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",p),()=>window.removeEventListener("beforeunload",p)},[e,i]),J.useEffect(()=>{if(!e||i!=="upload")return;const p=j=>{j.preventDefault()},y={capture:!0};return document.addEventListener("dragover",p,y),document.addEventListener("drop",p,y),window.addEventListener("dragover",p,y),window.addEventListener("drop",p,y),()=>{document.removeEventListener("dragover",p,y),document.removeEventListener("drop",p,y),window.removeEventListener("dragover",p,y),window.removeEventListener("drop",p,y)}},[e,i]);const c=i==="library"&&n!=null||i==="upload"&&h!=null||i==="url"&&v!=null,g=()=>{if(i==="library"&&n){const p=u.find(y=>y.id===n);p&&r({url:p.url,alt:p.alt})}else i==="upload"&&h?r({url:h.dataUrl,alt:h.name}):i==="url"&&v&&r({url:v,alt:""});setTimeout(()=>k(!1),0)},d=i==="library"&&n?"1 immagine selezionata":i==="upload"&&h?h.name:i==="url"&&v?"URL pronto":"Nessuna selezione",b=p=>{p.preventDefault(),p.stopPropagation()};return s.jsx(pr,{open:e,onOpenChange:k,children:s.jsxs(mr,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[s.jsxs(br,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:s.jsx(rt,{size:18})}),s.jsxs("div",{children:[s.jsx(gr,{children:"Image Picker"}),s.jsx(vr,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),s.jsx("button",{type:"button",onClick:()=>k(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:s.jsx(Fe,{size:18})})]}),s.jsx("div",{className:"flex border-b border-zinc-800",children:no.map(p=>s.jsxs("button",{type:"button",onClick:()=>o(p),className:ue("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===p?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[p==="library"&&s.jsx(rt,{size:14}),p==="upload"&&s.jsx(cr,{size:14}),p==="url"&&s.jsx(ar,{size:14}),p==="library"?"Libreria":p==="upload"?"Upload":"URL"]},p))}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&s.jsx(oo,{library:u,selectedId:n,onSelect:l}),i==="upload"&&s.jsx(io,{preview:h,onPreviewChange:f,onAssetUpload:m==null?void 0:m.onAssetUpload}),i==="url"&&s.jsx(ao,{urlPreview:v,onUrlPreviewChange:x})]}),s.jsxs(ro,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[s.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:d}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Oe,{type:"button",variant:"outline",size:"sm",onClick:()=>k(!1),children:"Annulla"}),s.jsx(Oe,{type:"button",size:"sm",disabled:!c,onClick:g,className:ue(!c&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},xr=(e,k="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const m=e.replace(/^\//,"");return`/assets/${k}/${m}`},lo=({value:e,onChange:k,label:r="IMAGE",className:m})=>{const{tenantId:u="default"}=We(),[i,o]=J.useState(!1),[n,l]=J.useState(!1),h=!!(e!=null&&e.url),f=e!=null&&e.url?xr(e.url,u):"",v=c=>{k(c),o(!1)},x=c=>{c.stopPropagation(),k({url:"",alt:""})};return s.jsxs("div",{className:ue("space-y-1.5",m),children:[s.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),h?s.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(!0),onKeyDown:c=>c.key==="Enter"&&o(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:ue("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",n&&"ring-blue-500/40"),children:[s.jsx("img",{src:f,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:c=>{c.target.style.display="none"}}),s.jsx("div",{className:ue("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",n?"bg-black/50":"bg-black/0"),children:n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[s.jsx(Bn,{size:13}),s.jsx("span",{children:"Cambia"})]}),s.jsx(Oe,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:x,children:s.jsx(nt,{size:13})})]})}),s.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):s.jsxs("button",{type:"button",onClick:()=>o(!0),className:ue("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[s.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:s.jsx(rt,{size:18})}),s.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),s.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),s.jsx(so,{open:i,onOpenChange:o,onSelect:v})]})},wr=[{name:"layers",Icon:gt},{name:"github",Icon:Rn},{name:"arrow-right",Icon:On},{name:"box",Icon:Ln},{name:"terminal",Icon:Zn},{name:"chevron-right",Icon:Pn},{name:"menu",Icon:Mn},{name:"x",Icon:Fe},{name:"sparkles",Icon:Wn},{name:"zap",Icon:Gn}],Ze={"ui:text":({label:e,value:k,onChange:r})=>s.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[s.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsx(xt,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:k||"",onChange:m=>r(m.target.value)})]}),"ui:textarea":({label:e,value:k,onChange:r})=>s.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[s.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsx(Yn,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:k||"",onChange:m=>r(m.target.value)})]}),"ui:select":({label:e,value:k,onChange:r,options:m=[]})=>s.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[s.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsxs(eo,{value:k||"",onValueChange:r,children:[s.jsx(wt,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:s.jsx(yt,{placeholder:"Select..."})}),s.jsx(kt,{className:"dark",children:m.map(u=>s.jsx(ur,{value:u,className:"text-[11px]",children:u},u))})]})]}),"ui:checkbox":({label:e,value:k,onChange:r})=>s.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[s.jsx(Xn,{id:e,checked:!!k,onCheckedChange:m=>r(m===!0)}),s.jsx(Te,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:k,onChange:r})=>{const m=k!=null&&typeof k=="object"&&"url"in k?{url:String(k.url??""),alt:String(k.alt??"")}:{url:typeof k=="string"?k:"",alt:""},u=i=>{r(i)};return s.jsx("div",{className:"mb-4",children:s.jsx(lo,{label:e,value:m,onChange:u})})},"ui:icon-picker":({label:e,value:k,onChange:r})=>{const[m,u]=J.useState(!1),i=wr.find(o=>o.name===(k||""));return s.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[s.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsxs(pr,{open:m,onOpenChange:u,children:[s.jsx(to,{asChild:!0,children:s.jsx(Oe,{variant:"outline",className:"w-full h-9 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex items-center gap-2 text-left",children:i?s.jsxs(s.Fragment,{children:[s.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),s.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):s.jsxs(s.Fragment,{children:[s.jsx(rt,{size:16,className:"text-zinc-500 shrink-0"}),s.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),s.jsxs(mr,{className:"sm:max-w-[280px] p-4",children:[s.jsxs(br,{children:[s.jsx(gr,{className:"text-sm",children:"Choose icon"}),s.jsx(vr,{className:"text-xs",children:"Click an icon to select it."})]}),s.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:wr.map(({name:o,Icon:n})=>s.jsx("button",{type:"button",onClick:()=>{r(o),u(!1)},className:ue("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",k===o?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 text-zinc-400 hover:text-zinc-200"),title:o,children:s.jsx(n,{size:20})},o))})]})]})]})}},_t=e=>{if(e instanceof _e.z.ZodOptional||e instanceof _e.z.ZodDefault)return _t(e._def.innerType);if(e instanceof _e.z.ZodObject){const k={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(k[r]=_t(e.shape[r]));return k}return e instanceof _e.z.ZodArray?[]:e instanceof _e.z.ZodString?"":e instanceof _e.z.ZodNumber?0:e instanceof _e.z.ZodBoolean?!1:e instanceof _e.z.ZodEnum?e._def.values[0]:null},zt=e=>e instanceof _e.z.ZodOptional||e instanceof _e.z.ZodDefault?zt(e._def.innerType):e,it=(e,k)=>e&&!k?"opacity-10":"opacity-100",Re=(e,k)=>e!=null&&k.toLowerCase()===e.toLowerCase(),co=(e,k)=>{if(!e)return;const r=k.toLowerCase(),m=Object.entries(e).find(([u])=>u.toLowerCase()===r);return m==null?void 0:m[1]},He=({schema:e,data:k,onChange:r,keys:m,expandedItemPath:u,expandedItemIdByField:i,focusedFieldKey:o,onSidebarExpandedItemChange:n})=>{const l=e.shape,h=m!=null?Object.keys(l).filter(g=>m.includes(g)):Object.keys(l),f=u==null?void 0:u[0],v=(f==null?void 0:f.itemId)!=null?{[f.fieldKey]:f.itemId}:i,x=(f==null?void 0:f.fieldKey)??o??null,c=x!=null;return s.jsx("div",{className:"space-y-4",children:h.map(g=>{const d=l[g];if(!d)return null;const b=zt(d),p=d.description||"ui:text",y=k[g];if(p==="ui:image-picker"&&b instanceof _e.z.ZodObject){const O=Re(x,g),P=Ze["ui:image-picker"]||Ze["ui:text"];return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,O)}`,...O?{"data-jp-focused-field":g}:{},children:s.jsx(P,{label:g,value:y,onChange:F=>r({...k,[g]:F})})},g)}if(b instanceof _e.z.ZodObject){const O=y||{},P=Re(x,g);return s.jsxs("div",{className:`group/obj mb-6 p-4 border border-zinc-800 rounded-lg bg-zinc-900/20 hover:border-zinc-700 transition-[border-color,opacity] duration-200 ${it(c,P)}`,...P?{"data-jp-focused-field":g}:{},children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),s.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:g})]}),s.jsx(He,{schema:b,data:O,onChange:F=>r({...k,[g]:F}),expandedItemPath:u&&Re(f==null?void 0:f.fieldKey,g)?u.slice(1):void 0,expandedItemIdByField:v,focusedFieldKey:x})]},g)}if(b instanceof _e.z.ZodArray){const O=Array.isArray(y)?y:[],P=zt(b.element),F=(E,M)=>{if(M<0||M>=O.length)return;const a=[...O],[W]=a.splice(E,1);a.splice(M,0,W),r({...k,[g]:a})},D=Re(x,g),U=Re(f==null?void 0:f.fieldKey,g)?f==null?void 0:f.itemId:void 0,te=co(v,g)??U;return s.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${it(c,D)}`,...D?{"data-jp-focused-field":g}:{},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[g," (",O.length,")"]}),s.jsxs("button",{type:"button",onClick:()=>{const E=_t(P);r({...k,[g]:[...O,E]})},className:"flex items-center gap-1 px-2 py-1 bg-blue-600/10 hover:bg-blue-600/20 text-blue-500 rounded text-[10px] font-bold transition-colors",children:[s.jsx(sr,{size:12})," Add Item"]})]}),s.jsx("div",{className:"space-y-2",children:O.map((E,M)=>{const a=E,W=a.id||`legacy-${M}`,ee=(typeof a.title=="string"?a.title:null)||(typeof a.label=="string"?a.label:null)||(typeof a.name=="string"?a.name:null)||(typeof a.content=="string"?a.content:null)||(typeof a.text=="string"?a.text:null)||`${g} #${M+1}`,$=te,G=String(a.id??W),H=$!=null&&String($)===G,q=H&&u&&u.length>1?u.slice(1):void 0,z=c&&D&&$!=null&&!H;return s.jsx(uo,{itemId:G,openItemId:$!=null?String($):void 0,isFaded:z,index:M,isFirst:M===0,isLast:M===O.length-1,label:ee,onExpandedChange:n?S=>n(S?{fieldKey:g,itemId:G}:null):void 0,onRemove:()=>{const S=O.filter((K,V)=>V!==M);r({...k,[g]:S})},onMoveUp:()=>F(M,M-1),onMoveDown:()=>F(M,M+1),children:P instanceof _e.z.ZodObject?s.jsx(He,{schema:P,data:a||{},expandedItemPath:q,onChange:S=>{const K=[...O];K[M]=S,r({...k,[g]:K})}}):s.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},W)})})]},g)}const j=Ze[p]||Ze["ui:text"],N=b instanceof _e.z.ZodEnum?b._def.values:void 0,A=Re(x,g);return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,A)}`,...A?{"data-jp-focused-field":g}:{},children:s.jsx(j,{label:g,value:y,options:N,onChange:O=>r({...k,[g]:O})})},g)})})},uo=({itemId:e,openItemId:k,isFaded:r=!1,label:m,onExpandedChange:u,onRemove:i,onMoveUp:o,onMoveDown:n,isFirst:l,isLast:h,children:f})=>{const v=k!=null&&String(k)===String(e),[x,c]=J.useState(v);J.useEffect(()=>{v&&!x&&c(!0),!v&&x&&c(!1)},[v,x]);const g=()=>{const b=!x;c(b),u==null||u(b)},d=v&&x;return s.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...d?{"data-jp-expanded-item":e}:{},children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsxs("button",{type:"button",onClick:g,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[x?s.jsx(mt,{size:12,className:"shrink-0"}):s.jsx(pt,{size:12,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:m})]})}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[s.jsx("button",{type:"button",disabled:l,onClick:o,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:s.jsx(Dn,{size:12})}),s.jsx("button",{type:"button",disabled:h,onClick:n,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:s.jsx(Tn,{size:12})}),s.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),s.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:s.jsx(nt,{size:12})})]})]}),x&&s.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:f})]})},yr=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),kr=({selectedSection:e,pageData:k,allSectionsData:r=[],onUpdate:m,onUpdateSection:u,onClose:i,expandedItemPath:o=null,onReorderSection:n,allLayers:l=[],activeSectionId:h,onRequestScrollToSection:f,onDeleteSection:v,onAddSection:x,hasChanges:c=!1,onExportHTML:g,onExportJSON:d,onResetToFile:b,showResetToFile:p=!1})=>{const{schemas:y}=We(),[j,N]=J.useState(!0),[A,O]=J.useState(null),[P,F]=J.useState(null),[D,U]=J.useState(null),[te,E]=J.useState(null),[M,a]=J.useState(null),W=J.useRef(null),ee=J.useRef(null),$=J.useDeferredValue(e),G=e!=null&&($==null?void 0:$.id)!==e.id,H=o&&o.length>0?o:te?[te]:null,q=H!=null&&H.length?{fieldKey:H[H.length-1].fieldKey,itemId:H[H.length-1].itemId}:null,z=J.useRef(o);J.useEffect(()=>{z.current!=null&&o==null&&E(null),z.current=o},[o]),J.useEffect(()=>{(e==null?void 0:e.id)!=null&&N(!1)},[e==null?void 0:e.id]);const S=()=>{const T=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const R=W.current;R&&R.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(T)},K=J.useRef(j);J.useEffect(()=>{if(j&&!K.current){const T=S();return K.current=j,T}K.current=j},[j]),J.useEffect(()=>{if(!q)return;const T=W.current;if(!T)return;const R=requestAnimationFrame(()=>{const _=T.querySelector("[data-jp-expanded-item]")??T.querySelector("[data-jp-focused-field]");_&&_.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(R)},[q]);const V=T=>{N(!1),f==null||f(T)},Q=()=>{N(T=>{const R=!T;return R&&S(),R})},de=(T,R)=>{R.stopPropagation(),r.length>0&&u?a(T):(N(!1),f==null||f(T))};J.useEffect(()=>{if(M==null)return;const T=R=>{R.key==="Escape"&&a(null)};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[M]);const ie=T=>{A===T?(v==null||v(T),O(null)):(O(T),setTimeout(()=>O(null),3e3))},ae=(T,R)=>{F(R),T.dataTransfer.effectAllowed="move",T.dataTransfer.setData("application/json",JSON.stringify({sectionId:R}))},se=(T,R)=>{T.preventDefault(),P!==R&&U(R)},pe=(T,R)=>{if(T.preventDefault(),F(null),U(null),!P||P===R||!n)return;const _=l.filter(Z=>Z.scope==="local"),w=_.findIndex(Z=>Z.id===P),I=_.findIndex(Z=>Z.id===R);w===-1||I===-1||n(P,I)},be=e?k.sections.find(T=>T.id===e.id):void 0,xe=$?k.sections.find(T=>T.id===$.id):void 0,ke=$?y[$.type]:void 0,t=l.length>0&&(j||!e);return s.jsxs("aside",{className:"relative w-full h-full bg-zinc-950 border-l border-zinc-800 flex flex-col shadow-2xl shrink-0 min-w-0 animate-in slide-in-from-right duration-300",children:[s.jsxs("div",{className:"sticky top-0 z-10 flex flex-col shrink-0 bg-zinc-950 border-b border-zinc-800",children:[s.jsxs("div",{className:"py-2 px-3 flex justify-between items-center bg-zinc-900/50",children:[s.jsx("div",{className:"flex items-center gap-2 min-w-0",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white leading-tight",children:"Inspector"}),s.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider flex items-center gap-1.5 leading-tight mt-0.5",children:e?s.jsxs(s.Fragment,{children:[n&&e.scope==="local"&&s.jsx("span",{className:"text-zinc-500 shrink-0",title:"Reorder section on page",children:s.jsx(bt,{size:12,strokeWidth:2})}),s.jsx("span",{className:"text-blue-400",children:e.type}),s.jsx("span",{className:"text-zinc-600",children:"|"}),s.jsx("span",{className:"text-zinc-500",children:e.scope})]}):s.jsx("span",{className:"text-zinc-500",children:"Waiting for Selection..."})})]})}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[x!=null&&s.jsxs("button",{type:"button",onClick:x,className:"flex items-center gap-1.5 text-zinc-500 hover:text-white transition-colors p-1 hover:bg-zinc-800 rounded",title:"Add section","aria-label":"Add section",children:[s.jsx(sr,{size:16}),s.jsx("span",{className:"text-xs font-medium",children:"Add section"})]}),s.jsx("button",{type:"button",onClick:i,className:"p-1 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors",title:"Close Inspector","aria-label":"Close Inspector",children:s.jsx(Fe,{size:16})})]})]}),l.length>0&&s.jsxs("div",{className:"bg-zinc-900/20 opacity-100",children:[s.jsxs("button",{type:"button",onClick:Q,className:"w-full flex items-center justify-between py-3 px-4 hover:bg-zinc-800/30 transition-colors cursor-pointer text-left rounded-none border-0 bg-transparent","aria-expanded":t,"aria-label":t?"Collapse Page Layers":"Expand Page Layers",children:[s.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(gt,{size:14,className:"text-primary shrink-0"}),s.jsx("span",{className:"text-xs font-bold text-white",children:"Page Layers"}),s.jsxs("span",{className:"text-[10px] text-zinc-500",children:["(",l.length,")"]})]}),s.jsx("span",{className:"text-zinc-500 shrink-0 pointer-events-none","aria-hidden":!0,children:t?s.jsx(mt,{size:14}):s.jsx(pt,{size:14})})]}),!t&&e&&(()=>{const T=l.find(_=>_.id===e.id);if(!T)return null;const R=h===e.id;return s.jsxs("div",{className:"px-3 py-2 flex items-center gap-2 bg-primary/10 border-t border-zinc-800/50",children:[s.jsx(bt,{size:12,className:"text-primary shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-primary truncate flex items-center gap-1",children:[T.type,R&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),s.jsx("p",{className:"text-xs text-white font-medium truncate",children:T.title??`${T.type} section`})]}),s.jsx("button",{type:"button",onClick:_=>de(T.id,_),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${T.type}`,"aria-label":`Open settings for ${T.type} section`,children:s.jsx(lr,{size:12})})]})})()]})]}),s.jsxs("div",{ref:W,className:"flex-1 min-h-0 overflow-y-auto flex flex-col custom-scrollbar",children:[t&&s.jsxs("div",{className:"border-b border-zinc-800 bg-zinc-900/20 px-3 pb-3 pt-1",children:[l.map(T=>{const R=(e==null?void 0:e.id)===T.id,_=h===T.id,w=P===T.id,I=D===T.id,Z=T.scope==="local"&&v,C=T.scope==="local"&&!!n;return s.jsxs("div",{draggable:C,onDragStart:B=>C&&ae(B,T.id),onDragOver:B=>C&&se(B,T.id),onDragLeave:()=>U(null),onDrop:B=>C&&pe(B,T.id),onDragEnd:()=>{F(null),U(null)},className:ue("flex items-center gap-2 py-2.5 px-2 rounded-sm border-t transition-colors",I&&"border-t-2 border-dashed border-primary bg-primary/5",!I&&R&&"border-primary/30 bg-primary/10",!I&&!R&&"border-zinc-800/90 hover:bg-zinc-800/40",w&&"opacity-40",C?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[s.jsx(bt,{size:12,className:`shrink-0 ${R?"text-primary":"text-zinc-500"}`}),s.jsxs("button",{type:"button",onClick:()=>V(T.id),className:"flex-1 min-w-0 text-left",children:[s.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-zinc-400 truncate flex items-center gap-1",children:[T.type,_&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),s.jsx("p",{className:`text-xs truncate ${R?"text-white font-medium":"text-zinc-500"}`,children:T.title??`${T.type} section`})]}),s.jsx("button",{type:"button",onClick:B=>de(T.id,B),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${T.type}`,"aria-label":`Open settings for ${T.type} section`,children:s.jsx(lr,{size:12})}),Z&&s.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),ie(T.id)},className:`p-1 rounded shrink-0 ${A===T.id?"bg-red-500/20 text-red-400":"text-zinc-500 hover:text-red-400"}`,title:"Delete section",children:s.jsx(nt,{size:12})})]},T.id)}),A&&s.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 rounded-md bg-amber-500/10 border border-amber-500/30",children:[s.jsx(Fn,{size:12,className:"text-amber-500 shrink-0"}),s.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]}),q&&be&&(()=>{const T=be.data||{};let R;if(H&&H.length>0){let _=T;for(const Z of H){const L=_==null?void 0:_[Z.fieldKey];Z.itemId!=null&&Array.isArray(L)?_=L.find(B=>String(B==null?void 0:B.id)===String(Z.itemId))??null:_=L}const w=_||{},I=q.fieldKey;R=(typeof w.name=="string"?w.name:null)??(typeof w.title=="string"?w.title:null)??(typeof w.label=="string"?w.label:null)??I.charAt(0).toUpperCase()+I.slice(1).replace(/([A-Z])/g," $1").trim()}else{const _=q.fieldKey;if(q.itemId!=null){const Z=(Array.isArray(T[_])?T[_]:[]).find(L=>String(L==null?void 0:L.id)===String(q.itemId))||{};R=(typeof Z.name=="string"?Z.name:null)??(typeof Z.title=="string"?Z.title:null)??(typeof Z.label=="string"?Z.label:null)??_}else R=_.charAt(0).toUpperCase()+_.slice(1).replace(/([A-Z])/g," $1").trim()}return s.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),s.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:R})]})})(),s.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&N(!1),children:e?G?s.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[s.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),s.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),s.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),s.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),s.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):ke?(()=>{const R=Object.keys(ke.shape).filter(L=>!yr.has(L)),_=(xe==null?void 0:xe.data)||{};if(R.length===0)return s.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const w=H==null?void 0:H[0],I=(w==null?void 0:w.itemId)!=null?{[w.fieldKey]:w.itemId}:(q==null?void 0:q.itemId)!=null?{[q.fieldKey]:q.itemId}:void 0,Z=(w==null?void 0:w.fieldKey)??(q==null?void 0:q.fieldKey)??null;return s.jsx(He,{schema:ke,data:_,onChange:L=>m(L),keys:R,expandedItemPath:H,expandedItemIdByField:I,focusedFieldKey:Z,onSidebarExpandedItemChange:E})})():s.jsxs("div",{className:"text-xs text-red-400 p-4 border border-dashed border-red-900/30 rounded bg-red-900/10",children:["No schema found for ",($==null?void 0:$.type)??e.type]}):s.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"Select a layer above or on the stage to edit."})})]}),s.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center gap-3 opacity-100 flex-wrap",children:(g!=null||d!=null||b!=null)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:ue("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",c?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),s.jsx("span",{className:ue("text-xs font-medium transition-colors duration-300 shrink-0",c?"text-amber-500":"text-zinc-500"),children:c?"Unsaved Changes":"All Changes Saved"}),g!=null&&s.jsxs("button",{type:"button",onClick:g,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[s.jsx(or,{size:12,className:"shrink-0"}),s.jsx("span",{children:"HTML"})]}),d!=null&&s.jsxs("button",{type:"button",onClick:d,disabled:!c,className:ue("shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all",c?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[s.jsx(ir,{size:12,className:"shrink-0"}),s.jsx("span",{children:"JSON"})]}),b!=null&&p&&s.jsx("button",{type:"button",onClick:b,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:s.jsx("span",{children:"Ripristina da file"})})]})}),M!=null&&r.length>0&&u!=null&&(()=>{const T=r.find(B=>B.id===M),R=l.find(B=>B.id===M);if(!T)return null;const _=(R==null?void 0:R.scope)==="global"?"global":"local",w=T.type,I=y[w],L=(I?Object.keys(I.shape):[]).filter(B=>yr.has(B)),C=T.data??{};return L.length===0?s.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:()=>a(null),children:s.jsxs("div",{ref:ee,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:B=>B.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[s.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",w]}),s.jsx("button",{type:"button",onClick:()=>a(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:s.jsx(Fe,{size:18})})]}),s.jsx("div",{className:"p-4",children:s.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):s.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:B=>B.target===B.currentTarget&&a(null),children:s.jsxs("div",{ref:ee,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full max-h-[85vh] flex flex-col overflow-hidden",onClick:B=>B.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[s.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",w]}),s.jsx("button",{type:"button",onClick:()=>a(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:s.jsx(Fe,{size:18})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:s.jsx(He,{schema:I,data:C,onChange:B=>{const Y={...T.data,...B};u(M,_,w,Y)},keys:L})})]})})})()]})},_r=({draft:e,globalDraft:k,themeConfig:r,slug:m,selectedId:u,scrollToSectionId:i,onScrollRequested:o})=>{const n=J.useRef(null),l=J.useCallback(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.UPDATE_DRAFTS,draft:e,globalDraft:k,themeConfig:r},"*")},[e,k,r]);return J.useEffect(()=>{l()},[l]),J.useEffect(()=>{const h=f=>{f.data.type===ve.STAGE_READY&&l()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[l]),J.useEffect(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.SYNC_SELECTION,selectedId:u},"*")},[u]),J.useEffect(()=>{var h;!i||!((h=n.current)!=null&&h.contentWindow)||(n.current.contentWindow.postMessage({type:ve.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),o==null||o())},[i,o]),s.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:s.jsx("iframe",{ref:n,src:`/admin/preview/${m}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},at={setTheme:e=>{const k=document.documentElement,{tokens:r}=e,m={"--theme-primary":r.colors.primary,"--theme-secondary":r.colors.secondary,"--theme-accent":r.colors.accent,"--theme-background":r.colors.background,"--theme-surface":r.colors.surface,"--theme-surface-alt":r.colors.surfaceAlt,"--theme-text":r.colors.text,"--theme-text-muted":r.colors.textMuted,"--theme-border":r.colors.border,"--theme-font-primary":r.typography.fontFamily.primary,"--theme-font-mono":r.typography.fontFamily.mono,"--theme-radius-sm":r.borderRadius.sm,"--theme-radius-md":r.borderRadius.md,"--theme-radius-lg":r.borderRadius.lg};Object.entries(m).forEach(([u,i])=>{k.style.setProperty(u,i)})}},zr=()=>{var c;const[e,k]=J.useState(null),[r,m]=J.useState(null),[u,i]=J.useState(null),[o,n]=J.useState(null),[l,h]=J.useState(!1);if(J.useEffect(()=>{const g=d=>{d.data.type===ve.UPDATE_DRAFTS&&(k(d.data.draft),m(d.data.globalDraft),d.data.themeConfig&&at.setTheme(d.data.themeConfig)),d.data.type===ve.SYNC_SELECTION&&i(d.data.selectedId),d.data.type===ve.REQUEST_SCROLL_TO_SECTION&&n(d.data.sectionId??null),d.data.type===ve.REQUEST_CLEAN_HTML&&(h(!0),setTimeout(()=>{const b=document.documentElement.outerHTML;window.parent.postMessage({type:ve.SEND_CLEAN_HTML,html:b},"*"),h(!1)},50))};return window.addEventListener("message",g),window.parent.postMessage({type:ve.STAGE_READY},"*"),()=>window.removeEventListener("message",g)},[]),J.useEffect(()=>{const g=d=>{var E,M,a,W,ee,$,G,H;const b=d.target,p=d.clientX,y=d.clientY;let j=null,N=b;for(;N&&N!==document.body;){const q=(E=N.getAttribute)==null?void 0:E.call(N,"data-section-id"),z=(M=N.getAttribute)==null?void 0:M.call(N,"data-section-type"),S=(a=N.getAttribute)==null?void 0:a.call(N,"data-section-scope");if(q&&z&&S){j=N;break}N=N.parentElement}if(!j)return;d.preventDefault(),d.stopPropagation();const A=j.getAttribute("data-section-id"),O=j.getAttribute("data-section-type"),P=j.getAttribute("data-section-scope");if(!A||!O||!P)return;const F={id:A,type:O,scope:P};if(b===j){window.parent.postMessage({type:ve.SECTION_SELECT,section:F},"*");return}const D=document.elementFromPoint(p,y)??b;if(!D||!j.contains(D)){window.parent.postMessage({type:ve.SECTION_SELECT,section:F},"*");return}if(D===j){window.parent.postMessage({type:ve.SECTION_SELECT,section:F},"*");return}const U=[];for(N=D;N&&N!==j;){const q=(W=N.getAttribute)==null?void 0:W.call(N,"data-jp-item-id"),z=(ee=N.getAttribute)==null?void 0:ee.call(N,"data-jp-item-field");q&&z&&U.push({fieldKey:z||"items",itemId:q}),N=N.parentElement}if(U.reverse(),U.length===0)for(N=D;N&&N!==j;){const q=($=N.getAttribute)==null?void 0:$.call(N,"data-jp-field");if(q){U.push({fieldKey:q});break}N=N.parentElement}if(U.length===0&&D){let q=null;const z=S=>{var V,Q;const K=S.getBoundingClientRect();if(K.left<=p&&p<=K.right&&K.top<=y&&y<=K.bottom){for(let de=0;de<S.children.length;de++)z(S.children[de]);((V=S.getAttribute)!=null&&V.call(S,"data-jp-item-id")||(Q=S.getAttribute)!=null&&Q.call(S,"data-jp-field"))&&(q=S)}};if(z(D),q){const S=q,K=(G=S.getAttribute)==null?void 0:G.call(S,"data-jp-item-id"),V=(H=S.getAttribute)==null?void 0:H.call(S,"data-jp-field");K&&V?U.push({fieldKey:V||"items",itemId:K}):V&&U.push({fieldKey:V})}}const te={type:ve.SECTION_SELECT,section:F};if(U.length>0){te.itemPath=U;const q=U[0];q.itemId!=null?(te.itemField=q.fieldKey,te.itemId=q.itemId):te.itemField=q.fieldKey}window.parent.postMessage(te,"*")};return document.addEventListener("click",g,!0),()=>document.removeEventListener("click",g,!0)},[]),J.useEffect(()=>{if(!o)return;const g=setTimeout(()=>n(null),600);return()=>clearTimeout(g)},[o]),!e||!r)return s.jsx("div",{className:"flex items-center justify-center h-screen w-full bg-zinc-950 text-zinc-500 font-mono text-xs uppercase tracking-widest animate-pulse",children:"Waiting for Studio Signal..."});const f=(c=r.header)==null?void 0:c.data,v={main:(f==null?void 0:f.links)??[]},x=g=>{window.parent.postMessage({type:ve.ACTIVE_SECTION_CHANGED,activeSectionId:g},"*")};return s.jsx(tt,{mode:l?"visitor":"studio",children:s.jsx("div",{className:l?"":"jp-ice-active",children:s.jsx(vt,{pageConfig:e,siteConfig:r,menuConfig:v,selectedId:l?null:u,scrollToSectionId:o,onActiveSectionChange:x})})})};function ho(e){return e.split("-").map(k=>k.charAt(0).toUpperCase()+k.slice(1).toLowerCase()).join(" ")}const jr=({open:e,onClose:k,sectionTypes:r,sectionTypeLabels:m,onSelect:u})=>{if(J.useEffect(()=>{if(!e)return;const o=n=>{n.key==="Escape"&&k()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,k]),!e)return null;const i=o=>(m==null?void 0:m[o])??ho(o);return s.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"jp-add-section-title",children:[s.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:k,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md max-h-[85vh] flex flex-col rounded-xl border border-zinc-700 bg-zinc-900 shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:s.jsx(gt,{size:18})}),s.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),s.jsx("button",{type:"button",onClick:k,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:s.jsx(Fe,{size:18})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?s.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):s.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(o=>s.jsx("li",{role:"option",children:s.jsxs("button",{type:"button",onClick:()=>{u(o),k()},className:ue("w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left","border border-zinc-700/80 bg-zinc-800/50","hover:border-blue-500/40 hover:bg-zinc-800 transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-2 focus:ring-offset-zinc-900"),children:[s.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-md bg-zinc-700/80 text-zinc-400 text-xs font-mono shrink-0",children:o}),s.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(o)})]})},o))})}),s.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:s.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},Er=()=>s.jsxs("div",{style:{"--local-bg":"var(--color-background)","--local-text":"var(--color-text)","--local-text-muted":"var(--color-text-muted)","--local-primary":"var(--color-primary)","--local-radius-md":"var(--radius-md)"},className:"min-h-screen flex flex-col items-center justify-center bg-[var(--local-bg)] px-6",children:[s.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),s.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),s.jsx("a",{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 rounded-[var(--local-radius-md)] bg-[var(--local-primary)] text-[var(--local-bg)] font-semibold text-sm hover:opacity-90 transition-opacity",children:"Back to Home"})]}),fo='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.z-0{z-index:0}.z-10{z-index:10}.z-50,.z-\\[50\\]{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[70\\]{z-index:70}.z-\\[100\\]{z-index:100}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\/4{width:75%}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[18px\\]{min-width:18px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[var\\(--local-radius-md\\)\\]{border-radius:var(--local-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-primary,.border-primary\\/30{border-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\\/30{border-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/90{border-color:#27272ae6}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/90{border-color:color-mix(in oklab,var(--color-zinc-800)90%,transparent)}}.bg-\\[var\\(--color-background\\)\\]{background-color:var(--color-background)}.bg-\\[var\\(--local-bg\\)\\]{background-color:var(--local-bg)}.bg-\\[var\\(--local-primary\\)\\]{background-color:var(--local-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-background{background-color:var(--color-background)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary)5%,transparent)}}.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-\\[length\\:12px\\]{background-size:12px}.bg-\\[right_0\\.25rem_center\\]{background-position:right .25rem center}.bg-no-repeat{background-repeat:no-repeat}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-6{padding-right:calc(var(--spacing)*6)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-\\[var\\(--local-bg\\)\\]{color:var(--local-bg)}.text-\\[var\\(--local-text\\)\\]{color:var(--local-text)}.text-\\[var\\(--local-text-muted\\)\\]{color:var(--local-text-muted)}.text-amber-200{color:var(--color-amber-200)}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\\/70{color:#f99c00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-500\\/70{color:color-mix(in oklab,var(--color-amber-500)70%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-blue-900\\/20{--tw-shadow-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.shadow-blue-900\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-900)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-primary\\/40:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/40:hover{background-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:bg-zinc-800\\/30:hover{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/30:hover{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.hover\\:bg-zinc-800\\/40:hover{background-color:#27272a66}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/40:hover{background-color:color-mix(in oklab,var(--color-zinc-800)40%,transparent)}}.hover\\:bg-zinc-800\\/50:hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.focus\\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-zinc-900:focus{--tw-ring-offset-color:var(--color-zinc-900)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}}:root{--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(42% .18 266);--primary-foreground:oklch(97% .014 254.604);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(42% .18 266);--accent-foreground:oklch(97% .014 254.604);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(97% .014 254.604);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--radius:.5rem;font-family:ui-sans-serif,system-ui,sans-serif}[data-radix-portal]{z-index:9999!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class po extends J.Component{constructor(k){super(k),this.state={hasError:!1,error:null}}static getDerivedStateFromError(k){return{hasError:!0,error:k}}componentDidCatch(k,r){console.error("[JsonPages Engine]",k,r)}render(){return this.state.hasError&&this.state.error?s.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24,backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:"ui-sans-serif, system-ui, sans-serif"},children:[s.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),s.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function mo({config:e}){var j,N;const{registry:k={},schemas:r={},pages:m={},siteConfig:u,themeConfig:i,menuConfig:o,themeCss:n,addSection:l,NotFoundComponent:h=Er}=e,f=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(A=>A!=="header"&&A!=="footer"),v={exportJSON:((j=e.persistence)==null?void 0:j.exportJSON)??Ct,exportHTML:((N=e.persistence)==null?void 0:N.exportHTML)??At},x=typeof(n==null?void 0:n.tenant)=="string"?n.tenant:"",c=typeof(n==null?void 0:n.admin)=="string"?n.admin:fo,[g,d]=J.useState(!1);J.useEffect(()=>{try{i!=null&&i.tokens&&at.setTheme(i)}catch(A){console.warn("[JsonPages] setTheme failed",A)}d(!0)},[i]);const b=()=>{const{slug:A="home"}=je.useParams(),[O,P]=J.useState(null);J.useEffect(()=>{const te=document.getElementById("jp-baked-state");if(te!=null&&te.textContent)try{const E=JSON.parse(te.textContent);P(E),at.setTheme(E.theme)}catch(E){console.error("Failed to parse baked state",E)}},[]);const F=O?O.page:m[A],D=O?O.site:u,U=O?O.menu:o;return F?s.jsx(ot,{mode:"tenant",tenantCss:x,adminCss:c,children:s.jsx(tt,{mode:"visitor",children:s.jsx(vt,{pageConfig:F,siteConfig:D,menuConfig:U})})}):s.jsx(h,{})},p=()=>{const{slug:A="home"}=je.useParams(),[O,P]=J.useState(null),[F,D]=J.useState(!1),[U,te]=J.useState(()=>{var L;try{const C=JSON.parse(JSON.stringify(u??{}));C.identity||(C.identity={title:"Site"}),C.pages||(C.pages=[]);const B=(L=C.header)==null?void 0:L.data;return B&&(o!=null&&o.main)&&(B.links=JSON.parse(JSON.stringify(o.main))),C}catch{return{identity:{title:"Site"},pages:[]}}}),[E,M]=J.useState(null),[a,W]=J.useState(null),[ee,$]=J.useState(null),[G,H]=J.useState(null),[q,z]=J.useState(!1),[S,K]=J.useState(400),V=360,Q=920,de=J.useCallback(L=>{L.preventDefault();const C=L.currentTarget;C.setPointerCapture(L.pointerId);const B=L.clientX,Y=S,X=he=>{const le=B-he.clientX,ze=Math.min(Q,Math.max(V,Y+le));K(ze)},oe=()=>{C.releasePointerCapture(L.pointerId),C.removeEventListener("pointermove",X),C.removeEventListener("pointerup",oe),C.removeEventListener("pointercancel",oe),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",C.addEventListener("pointermove",X),C.addEventListener("pointerup",oe),C.addEventListener("pointercancel",oe)},[S]),ie=O?[...U.header?[{id:U.header.id,type:U.header.type,scope:"global",title:"Header"}]:[],...O.sections.map(L=>{var C,B;return{id:L.id,type:L.type,scope:"local",title:((C=L.data)==null?void 0:C.title)??((B=L.data)==null?void 0:B.titleHighlight)}}),...U.footer?[{id:U.footer.id,type:U.footer.type,scope:"global",title:"Footer"}]:[]]:[];J.useEffect(()=>{const L=m[A];L&&P(JSON.parse(JSON.stringify(L))),M(null),W(null),D(!1)},[A,m]);const ae=J.useCallback(()=>{const L=m[A];L&&P(JSON.parse(JSON.stringify(L))),M(null),W(null),D(!1)},[A,m]),se=J.useCallback((L,C,B)=>{const Y=[...B.sections],X=Y.findIndex(le=>le.id===L);if(X===-1||C<0||C>=Y.length)return;const[oe]=Y.splice(X,1),he=C>X?C-1:C;Y.splice(Math.min(he,Y.length),0,oe),P({...B,sections:Y}),D(!0)},[]),pe=J.useCallback(L=>{var C;if(L.origin===window.location.origin){if(L.data.type===ve.SECTION_SELECT){M(L.data.section);const B=L.data.itemPath;if(Array.isArray(B)&&B.length>0)W(B.map(Y=>({fieldKey:Y.fieldKey,...Y.itemId!=null?{itemId:String(Y.itemId)}:{}})));else{const Y=L.data.itemField,X=L.data.itemId;W(typeof Y=="string"?[{fieldKey:Y,...X!=null?{itemId:String(X)}:{}}]:null)}}if(L.data.type===ve.ACTIVE_SECTION_CHANGED&&$(L.data.activeSectionId??null),L.data.type==="jsonpages:section-reorder"&&O){const{sectionId:B,newIndex:Y}=L.data;typeof B=="string"&&typeof Y=="number"&&Y>=0&&se(B,Y,O)}if(L.data.type===ve.SEND_CLEAN_HTML){if(!O)return;const B=(C=U.header)==null?void 0:C.data,Y={page:O,site:U,menu:{main:(B==null?void 0:B.links)??[]},theme:i};v.exportHTML(Y,A,L.data.html),D(!1)}}},[O,U,A,i,se]);J.useEffect(()=>(window.addEventListener("message",pe),()=>window.removeEventListener("message",pe)),[pe]);const be=J.useCallback(L=>{const C=ie.find(B=>B.id===L);C&&M({id:C.id,type:C.type,scope:C.scope}),W(null),H(L)},[ie]),xe=J.useCallback(()=>{H(null)},[]),ke=J.useCallback(L=>{P(C=>C&&{...C,sections:C.sections.filter(B=>B.id!==L)}),D(!0),M(C=>(C==null?void 0:C.id)===L?null:C)},[]),t=L=>{if(!(!E||!O))if(D(!0),E.scope==="global")E.type==="header"&&U.header!=null?te({...U,header:{...U.header,data:L}}):E.type==="footer"&&U.footer!=null&&te({...U,footer:{...U.footer,data:L}});else{const C=O.sections.map(B=>B.id===E.id?{...B,data:L}:B);P({...O,sections:C})}},T=J.useCallback((L,C,B,Y)=>{var X,oe;if(D(!0),C==="global")((X=U.header)==null?void 0:X.id)===L?te({...U,header:{...U.header,data:Y}}):((oe=U.footer)==null?void 0:oe.id)===L&&te({...U,footer:{...U.footer,data:Y}});else if(O){const he=O.sections.map(le=>le.id===L?{...le,data:Y}:le);P({...O,sections:he})}},[O,U]),R=()=>{var C;const L=document.querySelector("iframe");(C=L==null?void 0:L.contentWindow)==null||C.postMessage({type:ve.REQUEST_CLEAN_HTML},"*")},_=()=>{var B;if(!O)return;const L=(B=U.header)==null?void 0:B.data,C={page:O,site:U,menu:{main:(L==null?void 0:L.links)??[]},theme:i};v.exportJSON(C,A),D(!1)},w=L=>{var Y;if(!O)return;const C=((Y=l==null?void 0:l.getDefaultSectionData)==null?void 0:Y.call(l,L))??{},B={id:crypto.randomUUID(),type:L,data:C,settings:void 0};P({...O,sections:[...O.sections,B]}),D(!0),M({id:B.id,type:L,scope:"local"})};if(!O)return s.jsx("div",{children:"Loading Studio..."});const I=(E==null?void 0:E.scope)==="global"?{sections:[U.header,U.footer].filter(L=>L!=null)}:O,Z=[...U.header?[U.header]:[],...O.sections,...U.footer?[U.footer]:[]];return s.jsx(ot,{mode:"admin",tenantCss:x,adminCss:c,children:s.jsx(tt,{mode:"studio",children:s.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[s.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:s.jsx(_r,{draft:O,globalDraft:U,themeConfig:i,slug:A,selectedId:E==null?void 0:E.id,scrollToSectionId:G,onScrollRequested:xe})}),s.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:S,minWidth:V,maxWidth:Q},children:[s.jsx("div",{role:"separator","aria-label":"Resize inspector",className:"absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-primary/40 active:bg-primary/60 transition-colors shrink-0",style:{zIndex:9999},onPointerDown:de}),s.jsx(kr,{selectedSection:E,pageData:I,allSectionsData:Z,onUpdate:t,onUpdateSection:T,onClose:()=>{M(null),W(null)},expandedItemPath:a,onReorderSection:O?(L,C)=>se(L,C,O):void 0,allLayers:ie,activeSectionId:ee,onRequestScrollToSection:be,onDeleteSection:O?ke:void 0,onAddSection:f.length>0?()=>z(!0):void 0,hasChanges:F,onExportHTML:R,onExportJSON:_,onResetToFile:ae})]})]}),s.jsx(jr,{open:q,onClose:()=>z(!1),sectionTypes:f,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:w})]})})})},y=()=>s.jsx(ot,{mode:"tenant",tenantCss:x,adminCss:c,children:s.jsx(zr,{})});return g?s.jsx(po,{children:s.jsx(Qt,{config:{registry:k,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:s.jsx(je.BrowserRouter,{children:s.jsxs(je.Routes,{children:[s.jsx(je.Route,{path:"/",element:s.jsx(b,{})}),s.jsx(je.Route,{path:"/:slug",element:s.jsx(b,{})}),s.jsx(je.Route,{path:"/admin",element:s.jsx(p,{})}),s.jsx(je.Route,{path:"/admin/:slug",element:s.jsx(p,{})}),s.jsx(je.Route,{path:"/admin/preview/:slug",element:s.jsx(y,{})}),s.jsx(je.Route,{path:"*",element:s.jsx(h,{})})]})})})}):s.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#0f172a",color:"#94a3b8",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:14},children:"Loading…"})}const bo=({hasChanges:e,onExportJSON:k,onExportHTML:r,onAddSection:m})=>s.jsxs("div",{className:"h-14 border-b border-zinc-800 bg-zinc-950 flex items-center justify-between px-6 shrink-0 z-50 relative",children:[s.jsx("div",{className:"flex items-center gap-3",children:m!=null&&s.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600 transition-colors",title:"Add section","aria-label":"Add section",children:[s.jsx($n,{size:14}),s.jsx("span",{children:"Add section"})]})}),s.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:s.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium transition-all border bg-zinc-900 border-zinc-700 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[s.jsx(or,{size:14}),s.jsx("span",{children:"Bake HTML"})]}),s.jsxs("button",{onClick:k,disabled:!e,className:ue("flex items-center gap-2 px-4 py-1.5 rounded-md text-xs font-bold transition-all shadow-lg",e?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[s.jsx(ir,{size:14}),s.jsx("span",{children:"Export JSON"})]})]})]});fe.AddSectionLibrary=jr,fe.AdminSidebar=kr,fe.ConfigProvider=Qt,fe.ControlBar=bo,fe.DefaultNotFound=Er,fe.FormFactory=He,fe.InputWidgets=Ze,fe.JsonPagesEngine=mo,fe.PageRenderer=vt,fe.PreviewEntry=zr,fe.STUDIO_EVENTS=ve,fe.SectionRenderer=$e,fe.StudioProvider=tt,fe.StudioStage=_r,fe.ThemeLoader=ot,fe.cn=ue,fe.exportBakedHTML=At,fe.exportProjectJSON=Ct,fe.resolveAssetUrl=xr,fe.themeManager=at,fe.useConfig=We,fe.useStudio=tr,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})}));
|