@jsonpages/core 1.0.41 → 1.0.43
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 +12 -4
- package/dist/jsonpages-core.js +5068 -5046
- package/dist/jsonpages-core.umd.cjs +48 -48
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(xe,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):(xe=typeof globalThis<"u"?globalThis:xe||self,j(xe.JsonPagesCore={},xe.React,xe.ReactRouterDOM,xe.z,xe.ReactDOM))})(this,(function(xe,j,He,je,ht){"use strict";function vi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const E=vi(j),Rr=vi(ht),Ce={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",INLINE_FIELD_UPDATE:"jsonpages:inline-field-update",INLINE_FLUSHED:"jsonpages:inline-flushed",REQUEST_SCROLL_TO_SECTION:"jsonpages:request-scroll-to-section",REQUEST_INLINE_FLUSH:"jsonpages:request-inline-flush",ACTIVE_SECTION_CHANGED:"jsonpages:active-section-changed",STAGE_READY:"jsonpages:stage-ready"};var pt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lr(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 Kn={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
|
|
12
|
-
\0`,Z+=i(j,2),Z+=O.magic,Z+=i(k,2),Z+=i(S,2),Z+=i(Q.crc32,4),Z+=i(Q.compressedSize,4),Z+=i(Q.uncompressedSize,4),Z+=i(P.length,2),Z+=i($.length,2),{fileRecord:f.LOCAL_FILE_HEADER+Z+P+$,dirRecord:f.CENTRAL_FILE_HEADER+i(K,2)+Z+i(G.length,2)+"\0\0\0\0"+i(I,4)+i(b,4)+P+$+G}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),d=r("../crc32"),f=r("../signature");function m(u,w,h,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=h,this.encodeFileName=b,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(u){var w=u.meta.percent||0,h=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,l.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:h?(w+100*(h-b-1))/h:100}}))},m.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var w=this.streamFiles&&!u.file.dir;if(w){var h=s(u,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(u){this.accumulate=!1;var w=this.streamFiles&&!u.file.dir,h=s(u,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),w)this.push({data:(function(b){return f.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.uncompressedSize,4)})(u),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var u=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var h=this.bytesWritten-u,b=(function(v,x,k,S,C){var O=a.transformTo("string",C(S));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(v,2)+i(v,2)+i(x,4)+i(k,4)+i(O.length,2)+O})(this.dirRecords.length,h,u,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(u){this._sources.push(u);var w=this;return u.on("data",function(h){w.processChunk(h)}),u.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),u.on("error",function(h){w.error(h)}),this},m.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))},m.prototype.error=function(u){var w=this._sources;if(!l.prototype.error.call(this,u))return!1;for(var h=0;h<w.length;h++)try{w[h].error(u)}catch{}return!0},m.prototype.lock=function(){l.prototype.lock.call(this);for(var u=this._sources,w=0;w<u.length;w++)u[w].lock()},n.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,o){var i=r("../compressions"),s=r("./ZipFileWorker");o.generateWorker=function(a,l,c){var d=new s(l.streamFiles,c,l.platform,l.encodeFileName),f=0;try{a.forEach(function(m,u){f++;var w=(function(x,k){var S=x||k,C=i[S];if(!C)throw new Error(S+" is not a valid compression method !");return C})(u.options.compression,l.compression),h=u.options.compressionOptions||l.compressionOptions||{},b=u.dir,v=u.date;u._compressWorker(w,h).withStreamInfo("file",{name:m,dir:b,date:v,comment:u.comment||"",unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,o){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 s=new i;for(var a in this)typeof this[a]!="function"&&(s[a]=this[a]);return s}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(s,a){return new i().loadAsync(s,a)},i.external=r("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,o){var i=r("./utils"),s=r("./external"),a=r("./utf8"),l=r("./zipEntries"),c=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function f(m){return new s.Promise(function(u,w){var h=m.decompressed.getContentWorker().pipe(new c);h.on("error",function(b){w(b)}).on("end",function(){h.streamInfo.crc32!==m.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):u()}).resume()})}n.exports=function(m,u){var w=this;return u=i.extend(u||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(m)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",m,!0,u.optimizedBinaryString,u.base64).then(function(h){var b=new l(u);return b.load(h),b}).then(function(h){var b=[s.Promise.resolve(h)],v=h.files;if(u.checkCRC32)for(var x=0;x<v.length;x++)b.push(f(v[x]));return s.Promise.all(b)}).then(function(h){for(var b=h.shift(),v=b.files,x=0;x<v.length;x++){var k=v[x],S=k.fileNameStr,C=i.resolve(k.fileNameStr);w.file(C,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:u.createFolders}),k.dir||(w.file(C).unsafeOriginalName=S)}return b.zipComment.length&&(w.comment=b.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,o){var i=r("../utils"),s=r("../stream/GenericWorker");function a(l,c){s.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}i.inherits(a,s),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(d){c.push({data:d,meta:{percent:0}})}).on("error",function(d){c.isPaused?this.generatedError=d:c.error(d)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,o){var i=r("readable-stream").Readable;function s(a,l,c){i.call(this,l),this._helper=a;var d=this;a.on("data",function(f,m){d.push(f)||d._helper.pause(),c&&c(m)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}r("../utils").inherits(s,i),s.prototype._read=function(){this._helper.resume()},n.exports=s},{"../utils":32,"readable-stream":16}],14:[function(r,n,o){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,s);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,s)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var s=new Buffer(i);return s.fill(0),s},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,n,o){function i(C,O,N){var P,D=a.getTypeOf(O),W=a.extend(N||{},d);W.date=W.date||new Date,W.compression!==null&&(W.compression=W.compression.toUpperCase()),typeof W.unixPermissions=="string"&&(W.unixPermissions=parseInt(W.unixPermissions,8)),W.unixPermissions&&16384&W.unixPermissions&&(W.dir=!0),W.dosPermissions&&16&W.dosPermissions&&(W.dir=!0),W.dir&&(C=v(C)),W.createFolders&&(P=b(C))&&x.call(this,P,!0);var G=D==="string"&&W.binary===!1&&W.base64===!1;N&&N.binary!==void 0||(W.binary=!G),(O instanceof f&&O.uncompressedSize===0||W.dir||!O||O.length===0)&&(W.base64=!1,W.binary=!0,O="",W.compression="STORE",D="string");var z=null;z=O instanceof f||O instanceof l?O:w.isNode&&w.isStream(O)?new h(C,O):a.prepareContent(C,O,W.binary,W.optimizedBinaryString,W.base64);var L=new m(C,z,W);this.files[C]=L}var s=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),c=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),m=r("./zipObject"),u=r("./generate"),w=r("./nodejsUtils"),h=r("./nodejs/NodejsStreamInputAdapter"),b=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var O=C.lastIndexOf("/");return 0<O?C.substring(0,O):""},v=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},x=function(C,O){return O=O!==void 0?O:d.createFolders,C=v(C),this.files[C]||i.call(this,C,null,{dir:!0,createFolders:O}),this.files[C]};function k(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var O,N,P;for(O in this.files)P=this.files[O],(N=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&C(N,P)},filter:function(C){var O=[];return this.forEach(function(N,P){C(N,P)&&O.push(P)}),O},file:function(C,O,N){if(arguments.length!==1)return C=this.root+C,i.call(this,C,O,N),this;if(k(C)){var P=C;return this.filter(function(W,G){return!G.dir&&P.test(W)})}var D=this.files[this.root+C];return D&&!D.dir?D:null},folder:function(C){if(!C)return this;if(k(C))return this.filter(function(D,W){return W.dir&&C.test(D)});var O=this.root+C,N=x.call(this,O),P=this.clone();return P.root=N.name,P},remove:function(C){C=this.root+C;var O=this.files[C];if(O||(C.slice(-1)!=="/"&&(C+="/"),O=this.files[C]),O&&!O.dir)delete this.files[C];else for(var N=this.filter(function(D,W){return W.name.slice(0,C.length)===C}),P=0;P<N.length;P++)delete this.files[N[P].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var O,N={};try{if((N=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=N.type.toLowerCase(),N.compression=N.compression.toUpperCase(),N.type==="binarystring"&&(N.type="string"),!N.type)throw new Error("No output type specified.");a.checkSupport(N.type),N.platform!=="darwin"&&N.platform!=="freebsd"&&N.platform!=="linux"&&N.platform!=="sunos"||(N.platform="UNIX"),N.platform==="win32"&&(N.platform="DOS");var P=N.comment||this.comment||"";O=u.generateWorker(this,N,P)}catch(D){(O=new l("error")).error(D)}return new c(O,N.type||"string",N.mimeType)},generateAsync:function(C,O){return this.generateInternalStream(C).accumulate(O)},generateNodeStream:function(C,O){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(O)}};n.exports=S},{"./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,n,o){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,o){var i=r("./DataReader");function s(a){i.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data[this.zero+a]},s.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===l&&this.data[m+1]===c&&this.data[m+2]===d&&this.data[m+3]===f)return m-this.zero;return-1},s.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.readData(4);return l===m[0]&&c===m[1]&&d===m[2]&&f===m[3]},s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],18:[function(r,n,o){var i=r("../utils");function s(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=s},{"../utils":32}],19:[function(r,n,o){var i=r("./Uint8ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,o){var i=r("./DataReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],21:[function(r,n,o){var i=r("./ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,o){var i=r("../utils"),s=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(f){var m=i.getTypeOf(f);return i.checkSupport(m),m!=="string"||s.uint8array?m==="nodebuffer"?new c(f):s.uint8array?new d(i.transformTo("uint8array",f)):new a(i.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,o){var i=r("./GenericWorker"),s=r("../utils");function a(l){i.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(a,i),a.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,o){var i=r("./GenericWorker"),s=r("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,i),a.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,o){var i=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(a,s),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,o){var i=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=i.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}i.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=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,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,o){function i(s){this.name=s||"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(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var l=0;l<this._listeners[s].length;l++)this._listeners[s][l].call(this,a)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var a=this;return s.on("data",function(l){a.processChunk(l)}),s.on("end",function(){a.end()}),s.on("error",function(l){a.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 s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,a){return this.extraStreamInfo[s]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},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 s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},n.exports=i},{}],29:[function(r,n,o){var i=r("../utils"),s=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),c=r("../support"),d=r("../external"),f=null;if(c.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(w,h){return new d.Promise(function(b,v){var x=[],k=w._internalType,S=w._outputType,C=w._mimeType;w.on("data",function(O,N){x.push(O),h&&h(N)}).on("error",function(O){x=[],v(O)}).on("end",function(){try{var O=(function(N,P,D){switch(N){case"blob":return i.newBlob(i.transformTo("arraybuffer",P),D);case"base64":return l.encode(P);default:return i.transformTo(N,P)}})(S,(function(N,P){var D,W=0,G=null,z=0;for(D=0;D<P.length;D++)z+=P[D].length;switch(N){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(G=new Uint8Array(z),D=0;D<P.length;D++)G.set(P[D],W),W+=P[D].length;return G;case"nodebuffer":return Buffer.concat(P);default:throw new Error("concat : unsupported type '"+N+"'")}})(k,x),C);b(O)}catch(N){v(N)}x=[]}).resume()})}function u(w,h,b){var v=h;switch(h){case"blob":case"arraybuffer":v="uint8array";break;case"base64":v="string"}try{this._internalType=v,this._outputType=h,this._mimeType=b,i.checkSupport(v),this._worker=w.pipe(new s(v)),w.lock()}catch(x){this._worker=new a("error"),this._worker.error(x)}}u.prototype={accumulate:function(w){return m(this,w)},on:function(w,h){var b=this;return w==="data"?this._worker.on(w,function(v){h.call(b,v.data,v.meta)}):this._worker.on(w,function(){i.delay(h,arguments,b)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},w)}},n.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var i=new ArrayBuffer(0);try{o.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),o.blob=s.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!r("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,o){for(var i=r("./utils"),s=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}o.utf8encode=function(u){return s.nodebuffer?a.newBufferFrom(u,"utf-8"):(function(w){var h,b,v,x,k,S=w.length,C=0;for(x=0;x<S;x++)(64512&(b=w.charCodeAt(x)))==55296&&x+1<S&&(64512&(v=w.charCodeAt(x+1)))==56320&&(b=65536+(b-55296<<10)+(v-56320),x++),C+=b<128?1:b<2048?2:b<65536?3:4;for(h=s.uint8array?new Uint8Array(C):new Array(C),x=k=0;k<C;x++)(64512&(b=w.charCodeAt(x)))==55296&&x+1<S&&(64512&(v=w.charCodeAt(x+1)))==56320&&(b=65536+(b-55296<<10)+(v-56320),x++),b<128?h[k++]=b:(b<2048?h[k++]=192|b>>>6:(b<65536?h[k++]=224|b>>>12:(h[k++]=240|b>>>18,h[k++]=128|b>>>12&63),h[k++]=128|b>>>6&63),h[k++]=128|63&b);return h})(u)},o.utf8decode=function(u){return s.nodebuffer?i.transformTo("nodebuffer",u).toString("utf-8"):(function(w){var h,b,v,x,k=w.length,S=new Array(2*k);for(h=b=0;h<k;)if((v=w[h++])<128)S[b++]=v;else if(4<(x=c[v]))S[b++]=65533,h+=x-1;else{for(v&=x===2?31:x===3?15:7;1<x&&h<k;)v=v<<6|63&w[h++],x--;1<x?S[b++]=65533:v<65536?S[b++]=v:(v-=65536,S[b++]=55296|v>>10&1023,S[b++]=56320|1023&v)}return S.length!==b&&(S.subarray?S=S.subarray(0,b):S.length=b),i.applyFromCharCode(S)})(u=i.transformTo(s.uint8array?"uint8array":"array",u))},i.inherits(f,l),f.prototype.processChunk=function(u){var w=i.transformTo(s.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var h=w;(w=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),w.set(h,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var b=(function(x,k){var S;for((k=k||x.length)>x.length&&(k=x.length),S=k-1;0<=S&&(192&x[S])==128;)S--;return S<0||S===0?k:S+c[x[S]]>k?S:k})(w),v=w;b!==w.length&&(s.uint8array?(v=w.subarray(0,b),this.leftOver=w.subarray(b,w.length)):(v=w.slice(0,b),this.leftOver=w.slice(b,w.length))),this.push({data:o.utf8decode(v),meta:u.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=f,i.inherits(m,l),m.prototype.processChunk=function(u){this.push({data:o.utf8encode(u.data),meta:u.meta})},o.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,o){var i=r("./support"),s=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function c(h){return h}function d(h,b){for(var v=0;v<h.length;++v)b[v]=255&h.charCodeAt(v);return b}r("setimmediate"),o.newBlob=function(h,b){o.checkSupport("blob");try{return new Blob([h],{type:b})}catch{try{var v=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return v.append(h),v.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(h,b,v){var x=[],k=0,S=h.length;if(S<=v)return String.fromCharCode.apply(null,h);for(;k<S;)b==="array"||b==="nodebuffer"?x.push(String.fromCharCode.apply(null,h.slice(k,Math.min(k+v,S)))):x.push(String.fromCharCode.apply(null,h.subarray(k,Math.min(k+v,S)))),k+=v;return x.join("")},stringifyByChar:function(h){for(var b="",v=0;v<h.length;v++)b+=String.fromCharCode(h[v]);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,a.allocBuffer(1)).length===1}catch{return!1}})()}};function m(h){var b=65536,v=o.getTypeOf(h),x=!0;if(v==="uint8array"?x=f.applyCanBeUsed.uint8array:v==="nodebuffer"&&(x=f.applyCanBeUsed.nodebuffer),x)for(;1<b;)try{return f.stringifyByChunk(h,v,b)}catch{b=Math.floor(b/2)}return f.stringifyByChar(h)}function u(h,b){for(var v=0;v<h.length;v++)b[v]=h[v];return b}o.applyFromCharCode=m;var w={};w.string={string:c,array:function(h){return d(h,new Array(h.length))},arraybuffer:function(h){return w.string.uint8array(h).buffer},uint8array:function(h){return d(h,new Uint8Array(h.length))},nodebuffer:function(h){return d(h,a.allocBuffer(h.length))}},w.array={string:m,array:c,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(h)}},w.arraybuffer={string:function(h){return m(new Uint8Array(h))},array:function(h){return u(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:c,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(new Uint8Array(h))}},w.uint8array={string:m,array:function(h){return u(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:c,nodebuffer:function(h){return a.newBufferFrom(h)}},w.nodebuffer={string:m,array:function(h){return u(h,new Array(h.length))},arraybuffer:function(h){return w.nodebuffer.uint8array(h).buffer},uint8array:function(h){return u(h,new Uint8Array(h.length))},nodebuffer:c},o.transformTo=function(h,b){if(b=b||"",!h)return b;o.checkSupport(h);var v=o.getTypeOf(b);return w[v][h](b)},o.resolve=function(h){for(var b=h.split("/"),v=[],x=0;x<b.length;x++){var k=b[x];k==="."||k===""&&x!==0&&x!==b.length-1||(k===".."?v.pop():v.push(k))}return v.join("/")},o.getTypeOf=function(h){return typeof h=="string"?"string":Object.prototype.toString.call(h)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(h)?"nodebuffer":i.uint8array&&h instanceof Uint8Array?"uint8array":i.arraybuffer&&h instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(h){if(!i[h.toLowerCase()])throw new Error(h+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(h){var b,v,x="";for(v=0;v<(h||"").length;v++)x+="\\x"+((b=h.charCodeAt(v))<16?"0":"")+b.toString(16).toUpperCase();return x},o.delay=function(h,b,v){setImmediate(function(){h.apply(v||null,b||[])})},o.inherits=function(h,b){function v(){}v.prototype=b.prototype,h.prototype=new v},o.extend=function(){var h,b,v={};for(h=0;h<arguments.length;h++)for(b in arguments[h])Object.prototype.hasOwnProperty.call(arguments[h],b)&&v[b]===void 0&&(v[b]=arguments[h][b]);return v},o.prepareContent=function(h,b,v,x,k){return l.Promise.resolve(b).then(function(S){return i.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new l.Promise(function(C,O){var N=new FileReader;N.onload=function(P){C(P.target.result)},N.onerror=function(P){O(P.target.error)},N.readAsArrayBuffer(S)}):S}).then(function(S){var C=o.getTypeOf(S);return C?(C==="arraybuffer"?S=o.transformTo("uint8array",S):C==="string"&&(k?S=s.decode(S):v&&x!==!0&&(S=(function(O){return d(O,i.uint8array?new Uint8Array(O.length):new Array(O.length))})(S))),S):l.Promise.reject(new Error("Can't read the data of '"+h+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,o){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./signature"),l=r("./zipEntry"),c=r("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(m)+", expected "+s.pretty(f)+")")}},isSignature:function(f,m){var u=this.reader.index;this.reader.setIndex(f);var w=this.reader.readString(4)===m;return this.reader.setIndex(u),w},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 f=this.reader.readData(this.zipCommentLength),m=c.uint8array?"uint8array":"array",u=s.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(u)},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 f,m,u,w=this.zip64EndOfCentralSize-44;0<w;)f=this.reader.readInt(2),m=this.reader.readInt(4),u=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:u}},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 f,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);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 f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.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(f);var m=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.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(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var u=this.centralDirOffset+this.centralDirSize;this.zip64&&(u+=20,u+=12+this.zip64EndOfCentralSize);var w=m-u;if(0<w)this.isSignature(m,a.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(f){this.reader=i(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,o){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./compressedObject"),l=r("./crc32"),c=r("./utf8"),d=r("./compressions"),f=r("./support");function m(u,w){this.options=u,this.loadOptions=w}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(u){var w,h;if(u.skip(22),this.fileNameLength=u.readInt(2),h=u.readInt(2),this.fileName=u.readData(this.fileNameLength),u.skip(h),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((w=(function(b){for(var v in d)if(Object.prototype.hasOwnProperty.call(d,v)&&d[v].magic===b)return d[v];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,w,u.readData(this.compressedSize))},readCentralPart:function(u){this.versionMadeBy=u.readInt(2),u.skip(2),this.bitFlag=u.readInt(2),this.compressionMethod=u.readString(2),this.date=u.readDate(),this.crc32=u.readInt(4),this.compressedSize=u.readInt(4),this.uncompressedSize=u.readInt(4);var w=u.readInt(2);if(this.extraFieldsLength=u.readInt(2),this.fileCommentLength=u.readInt(2),this.diskNumberStart=u.readInt(2),this.internalFileAttributes=u.readInt(2),this.externalFileAttributes=u.readInt(4),this.localHeaderOffset=u.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");u.skip(w),this.readExtraFields(u),this.parseZIP64ExtraField(u),this.fileComment=u.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var u=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var w,h,b,v=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4<v;)w=u.readInt(2),h=u.readInt(2),b=u.readData(h),this.extraFields[w]={id:w,length:h,value:b};u.setIndex(v)},handleUTF8:function(){var u=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var h=s.transformTo(u,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var v=s.transformTo(u,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(v)}}},findExtraFieldUnicodePath:function(){var u=this.extraFields[28789];if(u){var w=i(u.value);return w.readInt(1)!==1||l(this.fileName)!==w.readInt(4)?null:c.utf8decode(w.readData(u.length-5))}return null},findExtraFieldUnicodeComment:function(){var u=this.extraFields[25461];if(u){var w=i(u.value);return w.readInt(1)!==1||l(this.fileComment)!==w.readInt(4)?null:c.utf8decode(w.readData(u.length-5))}return null}},n.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,o){function i(w,h,b){this.name=w,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=h,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var s=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),l=r("./utf8"),c=r("./compressedObject"),d=r("./stream/GenericWorker");i.prototype={internalStream:function(w){var h=null,b="string";try{if(!w)throw new Error("No output type specified.");var v=(b=w.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),h=this._decompressWorker();var x=!this._dataBinary;x&&!v&&(h=h.pipe(new l.Utf8EncodeWorker)),!x&&v&&(h=h.pipe(new l.Utf8DecodeWorker))}catch(k){(h=new d("error")).error(k)}return new s(h,b,"")},async:function(w,h){return this.internalStream(w).accumulate(h)},nodeStream:function(w,h){return this.internalStream(w||"nodebuffer").toNodejsStream(h)},_compressWorker:function(w,h){if(this._data instanceof c&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(b,w,h)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<f.length;u++)i.prototype[f[u]]=m;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,o){(function(i){var s,a,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var c=0,d=new l(w),f=i.document.createTextNode("");d.observe(f,{characterData:!0}),s=function(){f.data=c=++c%2}}else if(i.setImmediate||i.MessageChannel===void 0)s="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var h=i.document.createElement("script");h.onreadystatechange=function(){w(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},i.document.documentElement.appendChild(h)}:function(){setTimeout(w,0)};else{var m=new i.MessageChannel;m.port1.onmessage=w,s=function(){m.port2.postMessage(0)}}var u=[];function w(){var h,b;a=!0;for(var v=u.length;v;){for(b=u,u=[],h=-1;++h<v;)b[h]();v=u.length}a=!1}n.exports=function(h){u.push(h)!==1||a||s()}}).call(this,typeof pt<"u"?pt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,o){var i=r("immediate");function s(){}var a={},l=["REJECTED"],c=["FULFILLED"],d=["PENDING"];function f(v){if(typeof v!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,v!==s&&h(this,v)}function m(v,x,k){this.promise=v,typeof x=="function"&&(this.onFulfilled=x,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function u(v,x,k){i(function(){var S;try{S=x(k)}catch(C){return a.reject(v,C)}S===v?a.reject(v,new TypeError("Cannot resolve promise with itself")):a.resolve(v,S)})}function w(v){var x=v&&v.then;if(v&&(typeof v=="object"||typeof v=="function")&&typeof x=="function")return function(){x.apply(v,arguments)}}function h(v,x){var k=!1;function S(N){k||(k=!0,a.reject(v,N))}function C(N){k||(k=!0,a.resolve(v,N))}var O=b(function(){x(C,S)});O.status==="error"&&S(O.value)}function b(v,x){var k={};try{k.value=v(x),k.status="success"}catch(S){k.status="error",k.value=S}return k}(n.exports=f).prototype.finally=function(v){if(typeof v!="function")return this;var x=this.constructor;return this.then(function(k){return x.resolve(v()).then(function(){return k})},function(k){return x.resolve(v()).then(function(){throw k})})},f.prototype.catch=function(v){return this.then(null,v)},f.prototype.then=function(v,x){if(typeof v!="function"&&this.state===c||typeof x!="function"&&this.state===l)return this;var k=new this.constructor(s);return this.state!==d?u(k,this.state===c?v:x,this.outcome):this.queue.push(new m(k,v,x)),k},m.prototype.callFulfilled=function(v){a.resolve(this.promise,v)},m.prototype.otherCallFulfilled=function(v){u(this.promise,this.onFulfilled,v)},m.prototype.callRejected=function(v){a.reject(this.promise,v)},m.prototype.otherCallRejected=function(v){u(this.promise,this.onRejected,v)},a.resolve=function(v,x){var k=b(w,x);if(k.status==="error")return a.reject(v,k.value);var S=k.value;if(S)h(v,S);else{v.state=c,v.outcome=x;for(var C=-1,O=v.queue.length;++C<O;)v.queue[C].callFulfilled(x)}return v},a.reject=function(v,x){v.state=l,v.outcome=x;for(var k=-1,S=v.queue.length;++k<S;)v.queue[k].callRejected(x);return v},f.resolve=function(v){return v instanceof this?v:a.resolve(new this(s),v)},f.reject=function(v){var x=new this(s);return a.reject(x,v)},f.all=function(v){var x=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=v.length,S=!1;if(!k)return this.resolve([]);for(var C=new Array(k),O=0,N=-1,P=new this(s);++N<k;)D(v[N],N);return P;function D(W,G){x.resolve(W).then(function(z){C[G]=z,++O!==k||S||(S=!0,a.resolve(P,C))},function(z){S||(S=!0,a.reject(P,z))})}},f.race=function(v){var x=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=v.length,S=!1;if(!k)return this.resolve([]);for(var C=-1,O=new this(s);++C<k;)N=v[C],x.resolve(N).then(function(P){S||(S=!0,a.resolve(O,P))},function(P){S||(S=!0,a.reject(O,P))});var N;return O}},{immediate:36}],38:[function(r,n,o){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,o){var i=r("./zlib/deflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/messages"),c=r("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,u=0,w=8;function h(v){if(!(this instanceof h))return new h(v);this.options=s.assign({level:m,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},v||{});var x=this.options;x.raw&&0<x.windowBits?x.windowBits=-x.windowBits:x.gzip&&0<x.windowBits&&x.windowBits<16&&(x.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var k=i.deflateInit2(this.strm,x.level,x.method,x.windowBits,x.memLevel,x.strategy);if(k!==f)throw new Error(l[k]);if(x.header&&i.deflateSetHeader(this.strm,x.header),x.dictionary){var S;if(S=typeof x.dictionary=="string"?a.string2buf(x.dictionary):d.call(x.dictionary)==="[object ArrayBuffer]"?new Uint8Array(x.dictionary):x.dictionary,(k=i.deflateSetDictionary(this.strm,S))!==f)throw new Error(l[k]);this._dict_set=!0}}function b(v,x){var k=new h(x);if(k.push(v,!0),k.err)throw k.msg||l[k.err];return k.result}h.prototype.push=function(v,x){var k,S,C=this.strm,O=this.options.chunkSize;if(this.ended)return!1;S=x===~~x?x:x===!0?4:0,typeof v=="string"?C.input=a.string2buf(v):d.call(v)==="[object ArrayBuffer]"?C.input=new Uint8Array(v):C.input=v,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new s.Buf8(O),C.next_out=0,C.avail_out=O),(k=i.deflate(C,S))!==1&&k!==f)return this.onEnd(k),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf(C.output,C.next_out))):this.onData(s.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&k!==1);return S===4?(k=i.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===f):S!==2||(this.onEnd(f),!(C.avail_out=0))},h.prototype.onData=function(v){this.chunks.push(v)},h.prototype.onEnd=function(v){v===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},o.Deflate=h,o.deflate=b,o.deflateRaw=function(v,x){return(x=x||{}).raw=!0,b(v,x)},o.gzip=function(v,x){return(x=x||{}).gzip=!0,b(v,x)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,o){var i=r("./zlib/inflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/constants"),c=r("./zlib/messages"),d=r("./zlib/zstream"),f=r("./zlib/gzheader"),m=Object.prototype.toString;function u(h){if(!(this instanceof u))return new u(h);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},h||{});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)||h&&h.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 d,this.strm.avail_out=0;var v=i.inflateInit2(this.strm,b.windowBits);if(v!==l.Z_OK)throw new Error(c[v]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function w(h,b){var v=new u(b);if(v.push(h,!0),v.err)throw v.msg||c[v.err];return v.result}u.prototype.push=function(h,b){var v,x,k,S,C,O,N=this.strm,P=this.options.chunkSize,D=this.options.dictionary,W=!1;if(this.ended)return!1;x=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof h=="string"?N.input=a.binstring2buf(h):m.call(h)==="[object ArrayBuffer]"?N.input=new Uint8Array(h):N.input=h,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new s.Buf8(P),N.next_out=0,N.avail_out=P),(v=i.inflate(N,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&D&&(O=typeof D=="string"?a.string2buf(D):m.call(D)==="[object ArrayBuffer]"?new Uint8Array(D):D,v=i.inflateSetDictionary(this.strm,O)),v===l.Z_BUF_ERROR&&W===!0&&(v=l.Z_OK,W=!1),v!==l.Z_STREAM_END&&v!==l.Z_OK)return this.onEnd(v),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&v!==l.Z_STREAM_END&&(N.avail_in!==0||x!==l.Z_FINISH&&x!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=a.utf8border(N.output,N.next_out),S=N.next_out-k,C=a.buf2string(N.output,k),N.next_out=S,N.avail_out=P-S,S&&s.arraySet(N.output,N.output,k,S,0),this.onData(C)):this.onData(s.shrinkBuf(N.output,N.next_out)))),N.avail_in===0&&N.avail_out===0&&(W=!0)}while((0<N.avail_in||N.avail_out===0)&&v!==l.Z_STREAM_END);return v===l.Z_STREAM_END&&(x=l.Z_FINISH),x===l.Z_FINISH?(v=i.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===l.Z_OK):x!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(N.avail_out=0))},u.prototype.onData=function(h){this.chunks.push(h)},u.prototype.onEnd=function(h){h===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},o.Inflate=u,o.inflate=w,o.inflateRaw=function(h,b){return(b=b||{}).raw=!0,w(h,b)},o.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,o){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(l[f]=d[f])}}return l},o.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var s={arraySet:function(l,c,d,f,m){if(c.subarray&&l.subarray)l.set(c.subarray(d,d+f),m);else for(var u=0;u<f;u++)l[m+u]=c[d+u]},flattenChunks:function(l){var c,d,f,m,u,w;for(c=f=0,d=l.length;c<d;c++)f+=l[c].length;for(w=new Uint8Array(f),c=m=0,d=l.length;c<d;c++)u=l[c],w.set(u,m),m+=u.length;return w}},a={arraySet:function(l,c,d,f,m){for(var u=0;u<f;u++)l[m+u]=c[d+u]},flattenChunks:function(l){return[].concat.apply([],l)}};o.setTyped=function(l){l?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,s)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,a))},o.setTyped(i)},{}],42:[function(r,n,o){var i=r("./common"),s=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new i.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function d(f,m){if(m<65537&&(f.subarray&&a||!f.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(f,m));for(var u="",w=0;w<m;w++)u+=String.fromCharCode(f[w]);return u}l[254]=l[254]=1,o.string2buf=function(f){var m,u,w,h,b,v=f.length,x=0;for(h=0;h<v;h++)(64512&(u=f.charCodeAt(h)))==55296&&h+1<v&&(64512&(w=f.charCodeAt(h+1)))==56320&&(u=65536+(u-55296<<10)+(w-56320),h++),x+=u<128?1:u<2048?2:u<65536?3:4;for(m=new i.Buf8(x),h=b=0;b<x;h++)(64512&(u=f.charCodeAt(h)))==55296&&h+1<v&&(64512&(w=f.charCodeAt(h+1)))==56320&&(u=65536+(u-55296<<10)+(w-56320),h++),u<128?m[b++]=u:(u<2048?m[b++]=192|u>>>6:(u<65536?m[b++]=224|u>>>12:(m[b++]=240|u>>>18,m[b++]=128|u>>>12&63),m[b++]=128|u>>>6&63),m[b++]=128|63&u);return m},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var m=new i.Buf8(f.length),u=0,w=m.length;u<w;u++)m[u]=f.charCodeAt(u);return m},o.buf2string=function(f,m){var u,w,h,b,v=m||f.length,x=new Array(2*v);for(u=w=0;u<v;)if((h=f[u++])<128)x[w++]=h;else if(4<(b=l[h]))x[w++]=65533,u+=b-1;else{for(h&=b===2?31:b===3?15:7;1<b&&u<v;)h=h<<6|63&f[u++],b--;1<b?x[w++]=65533:h<65536?x[w++]=h:(h-=65536,x[w++]=55296|h>>10&1023,x[w++]=56320|1023&h)}return d(x,w)},o.utf8border=function(f,m){var u;for((m=m||f.length)>f.length&&(m=f.length),u=m-1;0<=u&&(192&f[u])==128;)u--;return u<0||u===0?m:u+l[f[u]]>m?u:m}},{"./common":41}],43:[function(r,n,o){n.exports=function(i,s,a,l){for(var c=65535&i|0,d=i>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(c=c+s[l++]|0)|0,--f;);c%=65521,d%=65521}return c|d<<16|0}},{}],44:[function(r,n,o){n.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,n,o){var i=(function(){for(var s,a=[],l=0;l<256;l++){s=l;for(var c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;a[l]=s}return a})();n.exports=function(s,a,l,c){var d=i,f=c+l;s^=-1;for(var m=c;m<f;m++)s=s>>>8^d[255&(s^a[m])];return-1^s}},{}],46:[function(r,n,o){var i,s=r("../utils/common"),a=r("./trees"),l=r("./adler32"),c=r("./crc32"),d=r("./messages"),f=0,m=4,u=0,w=-2,h=-1,b=4,v=2,x=8,k=9,S=286,C=30,O=19,N=2*S+1,P=15,D=3,W=258,G=W+D+1,z=42,L=113,y=1,$=2,X=3,H=4;function V(g,F){return g.msg=d[F],F}function Y(g){return(g<<1)-(4<g?9:0)}function Q(g){for(var F=g.length;0<=--F;)g[F]=0}function j(g){var F=g.state,U=F.pending;U>g.avail_out&&(U=g.avail_out),U!==0&&(s.arraySet(g.output,F.pending_buf,F.pending_out,U,g.next_out),g.next_out+=U,F.pending_out+=U,g.total_out+=U,g.avail_out-=U,F.pending-=U,F.pending===0&&(F.pending_out=0))}function I(g,F){a._tr_flush_block(g,0<=g.block_start?g.block_start:-1,g.strstart-g.block_start,F),g.block_start=g.strstart,j(g.strm)}function K(g,F){g.pending_buf[g.pending++]=F}function Z(g,F){g.pending_buf[g.pending++]=F>>>8&255,g.pending_buf[g.pending++]=255&F}function te(g,F){var U,E,A=g.max_chain_length,R=g.strstart,q=g.prev_length,B=g.nice_match,M=g.strstart>g.w_size-G?g.strstart-(g.w_size-G):0,J=g.window,ne=g.w_mask,re=g.prev,ae=g.strstart+W,he=J[R+q-1],me=J[R+q];g.prev_length>=g.good_match&&(A>>=2),B>g.lookahead&&(B=g.lookahead);do if(J[(U=F)+q]===me&&J[U+q-1]===he&&J[U]===J[R]&&J[++U]===J[R+1]){R+=2,U++;do;while(J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&R<ae);if(E=W-(ae-R),R=ae-W,q<E){if(g.match_start=F,B<=(q=E))break;he=J[R+q-1],me=J[R+q]}}while((F=re[F&ne])>M&&--A!=0);return q<=g.lookahead?q:g.lookahead}function ue(g){var F,U,E,A,R,q,B,M,J,ne,re=g.w_size;do{if(A=g.window_size-g.lookahead-g.strstart,g.strstart>=re+(re-G)){for(s.arraySet(g.window,g.window,re,re,0),g.match_start-=re,g.strstart-=re,g.block_start-=re,F=U=g.hash_size;E=g.head[--F],g.head[F]=re<=E?E-re:0,--U;);for(F=U=re;E=g.prev[--F],g.prev[F]=re<=E?E-re:0,--U;);A+=re}if(g.strm.avail_in===0)break;if(q=g.strm,B=g.window,M=g.strstart+g.lookahead,J=A,ne=void 0,ne=q.avail_in,J<ne&&(ne=J),U=ne===0?0:(q.avail_in-=ne,s.arraySet(B,q.input,q.next_in,ne,M),q.state.wrap===1?q.adler=l(q.adler,B,ne,M):q.state.wrap===2&&(q.adler=c(q.adler,B,ne,M)),q.next_in+=ne,q.total_in+=ne,ne),g.lookahead+=U,g.lookahead+g.insert>=D)for(R=g.strstart-g.insert,g.ins_h=g.window[R],g.ins_h=(g.ins_h<<g.hash_shift^g.window[R+1])&g.hash_mask;g.insert&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[R+D-1])&g.hash_mask,g.prev[R&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=R,R++,g.insert--,!(g.lookahead+g.insert<D)););}while(g.lookahead<G&&g.strm.avail_in!==0)}function ee(g,F){for(var U,E;;){if(g.lookahead<G){if(ue(g),g.lookahead<G&&F===f)return y;if(g.lookahead===0)break}if(U=0,g.lookahead>=D&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,U=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),U!==0&&g.strstart-U<=g.w_size-G&&(g.match_length=te(g,U)),g.match_length>=D)if(E=a._tr_tally(g,g.strstart-g.match_start,g.match_length-D),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=D){for(g.match_length--;g.strstart++,g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,U=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart,--g.match_length!=0;);g.strstart++}else g.strstart+=g.match_length,g.match_length=0,g.ins_h=g.window[g.strstart],g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+1])&g.hash_mask;else E=a._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++;if(E&&(I(g,!1),g.strm.avail_out===0))return y}return g.insert=g.strstart<D-1?g.strstart:D-1,F===m?(I(g,!0),g.strm.avail_out===0?X:H):g.last_lit&&(I(g,!1),g.strm.avail_out===0)?y:$}function ie(g,F){for(var U,E,A;;){if(g.lookahead<G){if(ue(g),g.lookahead<G&&F===f)return y;if(g.lookahead===0)break}if(U=0,g.lookahead>=D&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,U=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),g.prev_length=g.match_length,g.prev_match=g.match_start,g.match_length=D-1,U!==0&&g.prev_length<g.max_lazy_match&&g.strstart-U<=g.w_size-G&&(g.match_length=te(g,U),g.match_length<=5&&(g.strategy===1||g.match_length===D&&4096<g.strstart-g.match_start)&&(g.match_length=D-1)),g.prev_length>=D&&g.match_length<=g.prev_length){for(A=g.strstart+g.lookahead-D,E=a._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-D),g.lookahead-=g.prev_length-1,g.prev_length-=2;++g.strstart<=A&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,U=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),--g.prev_length!=0;);if(g.match_available=0,g.match_length=D-1,g.strstart++,E&&(I(g,!1),g.strm.avail_out===0))return y}else if(g.match_available){if((E=a._tr_tally(g,0,g.window[g.strstart-1]))&&I(g,!1),g.strstart++,g.lookahead--,g.strm.avail_out===0)return y}else g.match_available=1,g.strstart++,g.lookahead--}return g.match_available&&(E=a._tr_tally(g,0,g.window[g.strstart-1]),g.match_available=0),g.insert=g.strstart<D-1?g.strstart:D-1,F===m?(I(g,!0),g.strm.avail_out===0?X:H):g.last_lit&&(I(g,!1),g.strm.avail_out===0)?y:$}function se(g,F,U,E,A){this.good_length=g,this.max_lazy=F,this.nice_length=U,this.max_chain=E,this.func=A}function oe(){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=x,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 s.Buf16(2*N),this.dyn_dtree=new s.Buf16(2*(2*C+1)),this.bl_tree=new s.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 s.Buf16(P+1),this.heap=new s.Buf16(2*S+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*S+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 le(g){var F;return g&&g.state?(g.total_in=g.total_out=0,g.data_type=v,(F=g.state).pending=0,F.pending_out=0,F.wrap<0&&(F.wrap=-F.wrap),F.status=F.wrap?z:L,g.adler=F.wrap===2?0:1,F.last_flush=f,a._tr_init(F),u):V(g,w)}function fe(g){var F=le(g);return F===u&&(function(U){U.window_size=2*U.w_size,Q(U.head),U.max_lazy_match=i[U.level].max_lazy,U.good_match=i[U.level].good_length,U.nice_match=i[U.level].nice_length,U.max_chain_length=i[U.level].max_chain,U.strstart=0,U.block_start=0,U.lookahead=0,U.insert=0,U.match_length=U.prev_length=D-1,U.match_available=0,U.ins_h=0})(g.state),F}function we(g,F,U,E,A,R){if(!g)return w;var q=1;if(F===h&&(F=6),E<0?(q=0,E=-E):15<E&&(q=2,E-=16),A<1||k<A||U!==x||E<8||15<E||F<0||9<F||R<0||b<R)return V(g,w);E===8&&(E=9);var B=new oe;return(g.state=B).strm=g,B.wrap=q,B.gzhead=null,B.w_bits=E,B.w_size=1<<B.w_bits,B.w_mask=B.w_size-1,B.hash_bits=A+7,B.hash_size=1<<B.hash_bits,B.hash_mask=B.hash_size-1,B.hash_shift=~~((B.hash_bits+D-1)/D),B.window=new s.Buf8(2*B.w_size),B.head=new s.Buf16(B.hash_size),B.prev=new s.Buf16(B.w_size),B.lit_bufsize=1<<A+6,B.pending_buf_size=4*B.lit_bufsize,B.pending_buf=new s.Buf8(B.pending_buf_size),B.d_buf=1*B.lit_bufsize,B.l_buf=3*B.lit_bufsize,B.level=F,B.strategy=R,B.method=U,fe(g)}i=[new se(0,0,0,0,function(g,F){var U=65535;for(U>g.pending_buf_size-5&&(U=g.pending_buf_size-5);;){if(g.lookahead<=1){if(ue(g),g.lookahead===0&&F===f)return y;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var E=g.block_start+U;if((g.strstart===0||g.strstart>=E)&&(g.lookahead=g.strstart-E,g.strstart=E,I(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-G&&(I(g,!1),g.strm.avail_out===0))return y}return g.insert=0,F===m?(I(g,!0),g.strm.avail_out===0?X:H):(g.strstart>g.block_start&&(I(g,!1),g.strm.avail_out),y)}),new se(4,4,8,4,ee),new se(4,5,16,8,ee),new se(4,6,32,32,ee),new se(4,4,16,16,ie),new se(8,16,32,32,ie),new se(8,16,128,128,ie),new se(8,32,128,256,ie),new se(32,128,258,1024,ie),new se(32,258,258,4096,ie)],o.deflateInit=function(g,F){return we(g,F,x,15,8,0)},o.deflateInit2=we,o.deflateReset=fe,o.deflateResetKeep=le,o.deflateSetHeader=function(g,F){return g&&g.state?g.state.wrap!==2?w:(g.state.gzhead=F,u):w},o.deflate=function(g,F){var U,E,A,R;if(!g||!g.state||5<F||F<0)return g?V(g,w):w;if(E=g.state,!g.output||!g.input&&g.avail_in!==0||E.status===666&&F!==m)return V(g,g.avail_out===0?-5:w);if(E.strm=g,U=E.last_flush,E.last_flush=F,E.status===z)if(E.wrap===2)g.adler=0,K(E,31),K(E,139),K(E,8),E.gzhead?(K(E,(E.gzhead.text?1:0)+(E.gzhead.hcrc?2:0)+(E.gzhead.extra?4:0)+(E.gzhead.name?8:0)+(E.gzhead.comment?16:0)),K(E,255&E.gzhead.time),K(E,E.gzhead.time>>8&255),K(E,E.gzhead.time>>16&255),K(E,E.gzhead.time>>24&255),K(E,E.level===9?2:2<=E.strategy||E.level<2?4:0),K(E,255&E.gzhead.os),E.gzhead.extra&&E.gzhead.extra.length&&(K(E,255&E.gzhead.extra.length),K(E,E.gzhead.extra.length>>8&255)),E.gzhead.hcrc&&(g.adler=c(g.adler,E.pending_buf,E.pending,0)),E.gzindex=0,E.status=69):(K(E,0),K(E,0),K(E,0),K(E,0),K(E,0),K(E,E.level===9?2:2<=E.strategy||E.level<2?4:0),K(E,3),E.status=L);else{var q=x+(E.w_bits-8<<4)<<8;q|=(2<=E.strategy||E.level<2?0:E.level<6?1:E.level===6?2:3)<<6,E.strstart!==0&&(q|=32),q+=31-q%31,E.status=L,Z(E,q),E.strstart!==0&&(Z(E,g.adler>>>16),Z(E,65535&g.adler)),g.adler=1}if(E.status===69)if(E.gzhead.extra){for(A=E.pending;E.gzindex<(65535&E.gzhead.extra.length)&&(E.pending!==E.pending_buf_size||(E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),j(g),A=E.pending,E.pending!==E.pending_buf_size));)K(E,255&E.gzhead.extra[E.gzindex]),E.gzindex++;E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),E.gzindex===E.gzhead.extra.length&&(E.gzindex=0,E.status=73)}else E.status=73;if(E.status===73)if(E.gzhead.name){A=E.pending;do{if(E.pending===E.pending_buf_size&&(E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),j(g),A=E.pending,E.pending===E.pending_buf_size)){R=1;break}R=E.gzindex<E.gzhead.name.length?255&E.gzhead.name.charCodeAt(E.gzindex++):0,K(E,R)}while(R!==0);E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),R===0&&(E.gzindex=0,E.status=91)}else E.status=91;if(E.status===91)if(E.gzhead.comment){A=E.pending;do{if(E.pending===E.pending_buf_size&&(E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),j(g),A=E.pending,E.pending===E.pending_buf_size)){R=1;break}R=E.gzindex<E.gzhead.comment.length?255&E.gzhead.comment.charCodeAt(E.gzindex++):0,K(E,R)}while(R!==0);E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),R===0&&(E.status=103)}else E.status=103;if(E.status===103&&(E.gzhead.hcrc?(E.pending+2>E.pending_buf_size&&j(g),E.pending+2<=E.pending_buf_size&&(K(E,255&g.adler),K(E,g.adler>>8&255),g.adler=0,E.status=L)):E.status=L),E.pending!==0){if(j(g),g.avail_out===0)return E.last_flush=-1,u}else if(g.avail_in===0&&Y(F)<=Y(U)&&F!==m)return V(g,-5);if(E.status===666&&g.avail_in!==0)return V(g,-5);if(g.avail_in!==0||E.lookahead!==0||F!==f&&E.status!==666){var B=E.strategy===2?(function(M,J){for(var ne;;){if(M.lookahead===0&&(ue(M),M.lookahead===0)){if(J===f)return y;break}if(M.match_length=0,ne=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,ne&&(I(M,!1),M.strm.avail_out===0))return y}return M.insert=0,J===m?(I(M,!0),M.strm.avail_out===0?X:H):M.last_lit&&(I(M,!1),M.strm.avail_out===0)?y:$})(E,F):E.strategy===3?(function(M,J){for(var ne,re,ae,he,me=M.window;;){if(M.lookahead<=W){if(ue(M),M.lookahead<=W&&J===f)return y;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=D&&0<M.strstart&&(re=me[ae=M.strstart-1])===me[++ae]&&re===me[++ae]&&re===me[++ae]){he=M.strstart+W;do;while(re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&ae<he);M.match_length=W-(he-ae),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=D?(ne=a._tr_tally(M,1,M.match_length-D),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(ne=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),ne&&(I(M,!1),M.strm.avail_out===0))return y}return M.insert=0,J===m?(I(M,!0),M.strm.avail_out===0?X:H):M.last_lit&&(I(M,!1),M.strm.avail_out===0)?y:$})(E,F):i[E.level].func(E,F);if(B!==X&&B!==H||(E.status=666),B===y||B===X)return g.avail_out===0&&(E.last_flush=-1),u;if(B===$&&(F===1?a._tr_align(E):F!==5&&(a._tr_stored_block(E,0,0,!1),F===3&&(Q(E.head),E.lookahead===0&&(E.strstart=0,E.block_start=0,E.insert=0))),j(g),g.avail_out===0))return E.last_flush=-1,u}return F!==m?u:E.wrap<=0?1:(E.wrap===2?(K(E,255&g.adler),K(E,g.adler>>8&255),K(E,g.adler>>16&255),K(E,g.adler>>24&255),K(E,255&g.total_in),K(E,g.total_in>>8&255),K(E,g.total_in>>16&255),K(E,g.total_in>>24&255)):(Z(E,g.adler>>>16),Z(E,65535&g.adler)),j(g),0<E.wrap&&(E.wrap=-E.wrap),E.pending!==0?u:1)},o.deflateEnd=function(g){var F;return g&&g.state?(F=g.state.status)!==z&&F!==69&&F!==73&&F!==91&&F!==103&&F!==L&&F!==666?V(g,w):(g.state=null,F===L?V(g,-3):u):w},o.deflateSetDictionary=function(g,F){var U,E,A,R,q,B,M,J,ne=F.length;if(!g||!g.state||(R=(U=g.state).wrap)===2||R===1&&U.status!==z||U.lookahead)return w;for(R===1&&(g.adler=l(g.adler,F,ne,0)),U.wrap=0,ne>=U.w_size&&(R===0&&(Q(U.head),U.strstart=0,U.block_start=0,U.insert=0),J=new s.Buf8(U.w_size),s.arraySet(J,F,ne-U.w_size,U.w_size,0),F=J,ne=U.w_size),q=g.avail_in,B=g.next_in,M=g.input,g.avail_in=ne,g.next_in=0,g.input=F,ue(U);U.lookahead>=D;){for(E=U.strstart,A=U.lookahead-(D-1);U.ins_h=(U.ins_h<<U.hash_shift^U.window[E+D-1])&U.hash_mask,U.prev[E&U.w_mask]=U.head[U.ins_h],U.head[U.ins_h]=E,E++,--A;);U.strstart=E,U.lookahead=D-1,ue(U)}return U.strstart+=U.lookahead,U.block_start=U.strstart,U.insert=U.lookahead,U.lookahead=0,U.match_length=U.prev_length=D-1,U.match_available=0,g.next_in=B,g.input=M,g.avail_in=q,U.wrap=R,u},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,o){n.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,n,o){n.exports=function(i,s){var a,l,c,d,f,m,u,w,h,b,v,x,k,S,C,O,N,P,D,W,G,z,L,y,$;a=i.state,l=i.next_in,y=i.input,c=l+(i.avail_in-5),d=i.next_out,$=i.output,f=d-(s-i.avail_out),m=d+(i.avail_out-257),u=a.dmax,w=a.wsize,h=a.whave,b=a.wnext,v=a.window,x=a.hold,k=a.bits,S=a.lencode,C=a.distcode,O=(1<<a.lenbits)-1,N=(1<<a.distbits)-1;e:do{k<15&&(x+=y[l++]<<k,k+=8,x+=y[l++]<<k,k+=8),P=S[x&O];t:for(;;){if(x>>>=D=P>>>24,k-=D,(D=P>>>16&255)===0)$[d++]=65535&P;else{if(!(16&D)){if((64&D)==0){P=S[(65535&P)+(x&(1<<D)-1)];continue t}if(32&D){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}W=65535&P,(D&=15)&&(k<D&&(x+=y[l++]<<k,k+=8),W+=x&(1<<D)-1,x>>>=D,k-=D),k<15&&(x+=y[l++]<<k,k+=8,x+=y[l++]<<k,k+=8),P=C[x&N];r:for(;;){if(x>>>=D=P>>>24,k-=D,!(16&(D=P>>>16&255))){if((64&D)==0){P=C[(65535&P)+(x&(1<<D)-1)];continue r}i.msg="invalid distance code",a.mode=30;break e}if(G=65535&P,k<(D&=15)&&(x+=y[l++]<<k,(k+=8)<D&&(x+=y[l++]<<k,k+=8)),u<(G+=x&(1<<D)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(x>>>=D,k-=D,(D=d-f)<G){if(h<(D=G-D)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(L=v,(z=0)===b){if(z+=w-D,D<W){for(W-=D;$[d++]=v[z++],--D;);z=d-G,L=$}}else if(b<D){if(z+=w+b-D,(D-=b)<W){for(W-=D;$[d++]=v[z++],--D;);if(z=0,b<W){for(W-=D=b;$[d++]=v[z++],--D;);z=d-G,L=$}}}else if(z+=b-D,D<W){for(W-=D;$[d++]=v[z++],--D;);z=d-G,L=$}for(;2<W;)$[d++]=L[z++],$[d++]=L[z++],$[d++]=L[z++],W-=3;W&&($[d++]=L[z++],1<W&&($[d++]=L[z++]))}else{for(z=d-G;$[d++]=$[z++],$[d++]=$[z++],$[d++]=$[z++],2<(W-=3););W&&($[d++]=$[z++],1<W&&($[d++]=$[z++]))}break}}break}}while(l<c&&d<m);l-=W=k>>3,x&=(1<<(k-=W<<3))-1,i.next_in=l,i.next_out=d,i.avail_in=l<c?c-l+5:5-(l-c),i.avail_out=d<m?m-d+257:257-(d-m),a.hold=x,a.bits=k}},{}],49:[function(r,n,o){var i=r("../utils/common"),s=r("./adler32"),a=r("./crc32"),l=r("./inffast"),c=r("./inftrees"),d=1,f=2,m=0,u=-2,w=1,h=852,b=592;function v(z){return(z>>>24&255)+(z>>>8&65280)+((65280&z)<<8)+((255&z)<<24)}function x(){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 k(z){var L;return z&&z.state?(L=z.state,z.total_in=z.total_out=L.total=0,z.msg="",L.wrap&&(z.adler=1&L.wrap),L.mode=w,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new i.Buf32(h),L.distcode=L.distdyn=new i.Buf32(b),L.sane=1,L.back=-1,m):u}function S(z){var L;return z&&z.state?((L=z.state).wsize=0,L.whave=0,L.wnext=0,k(z)):u}function C(z,L){var y,$;return z&&z.state?($=z.state,L<0?(y=0,L=-L):(y=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15<L)?u:($.window!==null&&$.wbits!==L&&($.window=null),$.wrap=y,$.wbits=L,S(z))):u}function O(z,L){var y,$;return z?($=new x,(z.state=$).window=null,(y=C(z,L))!==m&&(z.state=null),y):u}var N,P,D=!0;function W(z){if(D){var L;for(N=new i.Buf32(512),P=new i.Buf32(32),L=0;L<144;)z.lens[L++]=8;for(;L<256;)z.lens[L++]=9;for(;L<280;)z.lens[L++]=7;for(;L<288;)z.lens[L++]=8;for(c(d,z.lens,0,288,N,0,z.work,{bits:9}),L=0;L<32;)z.lens[L++]=5;c(f,z.lens,0,32,P,0,z.work,{bits:5}),D=!1}z.lencode=N,z.lenbits=9,z.distcode=P,z.distbits=5}function G(z,L,y,$){var X,H=z.state;return H.window===null&&(H.wsize=1<<H.wbits,H.wnext=0,H.whave=0,H.window=new i.Buf8(H.wsize)),$>=H.wsize?(i.arraySet(H.window,L,y-H.wsize,H.wsize,0),H.wnext=0,H.whave=H.wsize):($<(X=H.wsize-H.wnext)&&(X=$),i.arraySet(H.window,L,y-$,X,H.wnext),($-=X)?(i.arraySet(H.window,L,y-$,$,0),H.wnext=$,H.whave=H.wsize):(H.wnext+=X,H.wnext===H.wsize&&(H.wnext=0),H.whave<H.wsize&&(H.whave+=X))),0}o.inflateReset=S,o.inflateReset2=C,o.inflateResetKeep=k,o.inflateInit=function(z){return O(z,15)},o.inflateInit2=O,o.inflate=function(z,L){var y,$,X,H,V,Y,Q,j,I,K,Z,te,ue,ee,ie,se,oe,le,fe,we,g,F,U,E,A=0,R=new i.Buf8(4),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!z||!z.state||!z.output||!z.input&&z.avail_in!==0)return u;(y=z.state).mode===12&&(y.mode=13),V=z.next_out,X=z.output,Q=z.avail_out,H=z.next_in,$=z.input,Y=z.avail_in,j=y.hold,I=y.bits,K=Y,Z=Q,F=m;e:for(;;)switch(y.mode){case w:if(y.wrap===0){y.mode=13;break}for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(2&y.wrap&&j===35615){R[y.check=0]=255&j,R[1]=j>>>8&255,y.check=a(y.check,R,2,0),I=j=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&j)<<8)+(j>>8))%31){z.msg="incorrect header check",y.mode=30;break}if((15&j)!=8){z.msg="unknown compression method",y.mode=30;break}if(I-=4,g=8+(15&(j>>>=4)),y.wbits===0)y.wbits=g;else if(g>y.wbits){z.msg="invalid window size",y.mode=30;break}y.dmax=1<<g,z.adler=y.check=1,y.mode=512&j?10:12,I=j=0;break;case 2:for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(y.flags=j,(255&y.flags)!=8){z.msg="unknown compression method",y.mode=30;break}if(57344&y.flags){z.msg="unknown header flags set",y.mode=30;break}y.head&&(y.head.text=j>>8&1),512&y.flags&&(R[0]=255&j,R[1]=j>>>8&255,y.check=a(y.check,R,2,0)),I=j=0,y.mode=3;case 3:for(;I<32;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.head&&(y.head.time=j),512&y.flags&&(R[0]=255&j,R[1]=j>>>8&255,R[2]=j>>>16&255,R[3]=j>>>24&255,y.check=a(y.check,R,4,0)),I=j=0,y.mode=4;case 4:for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.head&&(y.head.xflags=255&j,y.head.os=j>>8),512&y.flags&&(R[0]=255&j,R[1]=j>>>8&255,y.check=a(y.check,R,2,0)),I=j=0,y.mode=5;case 5:if(1024&y.flags){for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.length=j,y.head&&(y.head.extra_len=j),512&y.flags&&(R[0]=255&j,R[1]=j>>>8&255,y.check=a(y.check,R,2,0)),I=j=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&(Y<(te=y.length)&&(te=Y),te&&(y.head&&(g=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),i.arraySet(y.head.extra,$,H,te,g)),512&y.flags&&(y.check=a(y.check,$,te,H)),Y-=te,H+=te,y.length-=te),y.length))break e;y.length=0,y.mode=7;case 7:if(2048&y.flags){if(Y===0)break e;for(te=0;g=$[H+te++],y.head&&g&&y.length<65536&&(y.head.name+=String.fromCharCode(g)),g&&te<Y;);if(512&y.flags&&(y.check=a(y.check,$,te,H)),Y-=te,H+=te,g)break e}else y.head&&(y.head.name=null);y.length=0,y.mode=8;case 8:if(4096&y.flags){if(Y===0)break e;for(te=0;g=$[H+te++],y.head&&g&&y.length<65536&&(y.head.comment+=String.fromCharCode(g)),g&&te<Y;);if(512&y.flags&&(y.check=a(y.check,$,te,H)),Y-=te,H+=te,g)break e}else y.head&&(y.head.comment=null);y.mode=9;case 9:if(512&y.flags){for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(j!==(65535&y.check)){z.msg="header crc mismatch",y.mode=30;break}I=j=0}y.head&&(y.head.hcrc=y.flags>>9&1,y.head.done=!0),z.adler=y.check=0,y.mode=12;break;case 10:for(;I<32;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}z.adler=y.check=v(j),I=j=0,y.mode=11;case 11:if(y.havedict===0)return z.next_out=V,z.avail_out=Q,z.next_in=H,z.avail_in=Y,y.hold=j,y.bits=I,2;z.adler=y.check=1,y.mode=12;case 12:if(L===5||L===6)break e;case 13:if(y.last){j>>>=7&I,I-=7&I,y.mode=27;break}for(;I<3;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}switch(y.last=1&j,I-=1,3&(j>>>=1)){case 0:y.mode=14;break;case 1:if(W(y),y.mode=20,L!==6)break;j>>>=2,I-=2;break e;case 2:y.mode=17;break;case 3:z.msg="invalid block type",y.mode=30}j>>>=2,I-=2;break;case 14:for(j>>>=7&I,I-=7&I;I<32;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if((65535&j)!=(j>>>16^65535)){z.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&j,I=j=0,y.mode=15,L===6)break e;case 15:y.mode=16;case 16:if(te=y.length){if(Y<te&&(te=Y),Q<te&&(te=Q),te===0)break e;i.arraySet(X,$,H,te,V),Y-=te,H+=te,Q-=te,V+=te,y.length-=te;break}y.mode=12;break;case 17:for(;I<14;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(y.nlen=257+(31&j),j>>>=5,I-=5,y.ndist=1+(31&j),j>>>=5,I-=5,y.ncode=4+(15&j),j>>>=4,I-=4,286<y.nlen||30<y.ndist){z.msg="too many length or distance symbols",y.mode=30;break}y.have=0,y.mode=18;case 18:for(;y.have<y.ncode;){for(;I<3;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.lens[q[y.have++]]=7&j,j>>>=3,I-=3}for(;y.have<19;)y.lens[q[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,U={bits:y.lenbits},F=c(0,y.lens,0,19,y.lencode,0,y.work,U),y.lenbits=U.bits,F){z.msg="invalid code lengths set",y.mode=30;break}y.have=0,y.mode=19;case 19:for(;y.have<y.nlen+y.ndist;){for(;se=(A=y.lencode[j&(1<<y.lenbits)-1])>>>16&255,oe=65535&A,!((ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(oe<16)j>>>=ie,I-=ie,y.lens[y.have++]=oe;else{if(oe===16){for(E=ie+2;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(j>>>=ie,I-=ie,y.have===0){z.msg="invalid bit length repeat",y.mode=30;break}g=y.lens[y.have-1],te=3+(3&j),j>>>=2,I-=2}else if(oe===17){for(E=ie+3;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}I-=ie,g=0,te=3+(7&(j>>>=ie)),j>>>=3,I-=3}else{for(E=ie+7;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}I-=ie,g=0,te=11+(127&(j>>>=ie)),j>>>=7,I-=7}if(y.have+te>y.nlen+y.ndist){z.msg="invalid bit length repeat",y.mode=30;break}for(;te--;)y.lens[y.have++]=g}}if(y.mode===30)break;if(y.lens[256]===0){z.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,U={bits:y.lenbits},F=c(d,y.lens,0,y.nlen,y.lencode,0,y.work,U),y.lenbits=U.bits,F){z.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,U={bits:y.distbits},F=c(f,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,U),y.distbits=U.bits,F){z.msg="invalid distances set",y.mode=30;break}if(y.mode=20,L===6)break e;case 20:y.mode=21;case 21:if(6<=Y&&258<=Q){z.next_out=V,z.avail_out=Q,z.next_in=H,z.avail_in=Y,y.hold=j,y.bits=I,l(z,Z),V=z.next_out,X=z.output,Q=z.avail_out,H=z.next_in,$=z.input,Y=z.avail_in,j=y.hold,I=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;se=(A=y.lencode[j&(1<<y.lenbits)-1])>>>16&255,oe=65535&A,!((ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(se&&(240&se)==0){for(le=ie,fe=se,we=oe;se=(A=y.lencode[we+((j&(1<<le+fe)-1)>>le)])>>>16&255,oe=65535&A,!(le+(ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}j>>>=le,I-=le,y.back+=le}if(j>>>=ie,I-=ie,y.back+=ie,y.length=oe,se===0){y.mode=26;break}if(32&se){y.back=-1,y.mode=12;break}if(64&se){z.msg="invalid literal/length code",y.mode=30;break}y.extra=15&se,y.mode=22;case 22:if(y.extra){for(E=y.extra;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.length+=j&(1<<y.extra)-1,j>>>=y.extra,I-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;se=(A=y.distcode[j&(1<<y.distbits)-1])>>>16&255,oe=65535&A,!((ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if((240&se)==0){for(le=ie,fe=se,we=oe;se=(A=y.distcode[we+((j&(1<<le+fe)-1)>>le)])>>>16&255,oe=65535&A,!(le+(ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}j>>>=le,I-=le,y.back+=le}if(j>>>=ie,I-=ie,y.back+=ie,64&se){z.msg="invalid distance code",y.mode=30;break}y.offset=oe,y.extra=15&se,y.mode=24;case 24:if(y.extra){for(E=y.extra;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.offset+=j&(1<<y.extra)-1,j>>>=y.extra,I-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){z.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(Q===0)break e;if(te=Z-Q,y.offset>te){if((te=y.offset-te)>y.whave&&y.sane){z.msg="invalid distance too far back",y.mode=30;break}ue=te>y.wnext?(te-=y.wnext,y.wsize-te):y.wnext-te,te>y.length&&(te=y.length),ee=y.window}else ee=X,ue=V-y.offset,te=y.length;for(Q<te&&(te=Q),Q-=te,y.length-=te;X[V++]=ee[ue++],--te;);y.length===0&&(y.mode=21);break;case 26:if(Q===0)break e;X[V++]=y.length,Q--,y.mode=21;break;case 27:if(y.wrap){for(;I<32;){if(Y===0)break e;Y--,j|=$[H++]<<I,I+=8}if(Z-=Q,z.total_out+=Z,y.total+=Z,Z&&(z.adler=y.check=y.flags?a(y.check,X,Z,V-Z):s(y.check,X,Z,V-Z)),Z=Q,(y.flags?j:v(j))!==y.check){z.msg="incorrect data check",y.mode=30;break}I=j=0}y.mode=28;case 28:if(y.wrap&&y.flags){for(;I<32;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(j!==(4294967295&y.total)){z.msg="incorrect length check",y.mode=30;break}I=j=0}y.mode=29;case 29:F=1;break e;case 30:F=-3;break e;case 31:return-4;case 32:default:return u}return z.next_out=V,z.avail_out=Q,z.next_in=H,z.avail_in=Y,y.hold=j,y.bits=I,(y.wsize||Z!==z.avail_out&&y.mode<30&&(y.mode<27||L!==4))&&G(z,z.output,z.next_out,Z-z.avail_out)?(y.mode=31,-4):(K-=z.avail_in,Z-=z.avail_out,z.total_in+=K,z.total_out+=Z,y.total+=Z,y.wrap&&Z&&(z.adler=y.check=y.flags?a(y.check,X,Z,z.next_out-Z):s(y.check,X,Z,z.next_out-Z)),z.data_type=y.bits+(y.last?64:0)+(y.mode===12?128:0)+(y.mode===20||y.mode===15?256:0),(K==0&&Z===0||L===4)&&F===m&&(F=-5),F)},o.inflateEnd=function(z){if(!z||!z.state)return u;var L=z.state;return L.window&&(L.window=null),z.state=null,m},o.inflateGetHeader=function(z,L){var y;return z&&z.state?(2&(y=z.state).wrap)==0?u:((y.head=L).done=!1,m):u},o.inflateSetDictionary=function(z,L){var y,$=L.length;return z&&z.state?(y=z.state).wrap!==0&&y.mode!==11?u:y.mode===11&&s(1,L,$,0)!==y.check?-3:G(z,L,$,$)?(y.mode=31,-4):(y.havedict=1,m):u},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,o){var i=r("../utils/common"),s=[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],a=[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],c=[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];n.exports=function(d,f,m,u,w,h,b,v){var x,k,S,C,O,N,P,D,W,G=v.bits,z=0,L=0,y=0,$=0,X=0,H=0,V=0,Y=0,Q=0,j=0,I=null,K=0,Z=new i.Buf16(16),te=new i.Buf16(16),ue=null,ee=0;for(z=0;z<=15;z++)Z[z]=0;for(L=0;L<u;L++)Z[f[m+L]]++;for(X=G,$=15;1<=$&&Z[$]===0;$--);if($<X&&(X=$),$===0)return w[h++]=20971520,w[h++]=20971520,v.bits=1,0;for(y=1;y<$&&Z[y]===0;y++);for(X<y&&(X=y),z=Y=1;z<=15;z++)if(Y<<=1,(Y-=Z[z])<0)return-1;if(0<Y&&(d===0||$!==1))return-1;for(te[1]=0,z=1;z<15;z++)te[z+1]=te[z]+Z[z];for(L=0;L<u;L++)f[m+L]!==0&&(b[te[f[m+L]]++]=L);if(N=d===0?(I=ue=b,19):d===1?(I=s,K-=257,ue=a,ee-=257,256):(I=l,ue=c,-1),z=y,O=h,V=L=j=0,S=-1,C=(Q=1<<(H=X))-1,d===1&&852<Q||d===2&&592<Q)return 1;for(;;){for(P=z-V,W=b[L]<N?(D=0,b[L]):b[L]>N?(D=ue[ee+b[L]],I[K+b[L]]):(D=96,0),x=1<<z-V,y=k=1<<H;w[O+(j>>V)+(k-=x)]=P<<24|D<<16|W|0,k!==0;);for(x=1<<z-1;j&x;)x>>=1;if(x!==0?(j&=x-1,j+=x):j=0,L++,--Z[z]==0){if(z===$)break;z=f[m+b[L]]}if(X<z&&(j&C)!==S){for(V===0&&(V=X),O+=y,Y=1<<(H=z-V);H+V<$&&!((Y-=Z[H+V])<=0);)H++,Y<<=1;if(Q+=1<<H,d===1&&852<Q||d===2&&592<Q)return 1;w[S=j&C]=X<<24|H<<16|O-h|0}}return j!==0&&(w[O+j]=z-V<<24|64<<16|0),v.bits=X,0}},{"../utils/common":41}],51:[function(r,n,o){n.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,n,o){var i=r("../utils/common"),s=0,a=1;function l(A){for(var R=A.length;0<=--R;)A[R]=0}var c=0,d=29,f=256,m=f+1+d,u=30,w=19,h=2*m+1,b=15,v=16,x=7,k=256,S=16,C=17,O=18,N=[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],P=[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],W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(2*(m+2));l(G);var z=new Array(2*u);l(z);var L=new Array(512);l(L);var y=new Array(256);l(y);var $=new Array(d);l($);var X,H,V,Y=new Array(u);function Q(A,R,q,B,M){this.static_tree=A,this.extra_bits=R,this.extra_base=q,this.elems=B,this.max_length=M,this.has_stree=A&&A.length}function j(A,R){this.dyn_tree=A,this.max_code=0,this.stat_desc=R}function I(A){return A<256?L[A]:L[256+(A>>>7)]}function K(A,R){A.pending_buf[A.pending++]=255&R,A.pending_buf[A.pending++]=R>>>8&255}function Z(A,R,q){A.bi_valid>v-q?(A.bi_buf|=R<<A.bi_valid&65535,K(A,A.bi_buf),A.bi_buf=R>>v-A.bi_valid,A.bi_valid+=q-v):(A.bi_buf|=R<<A.bi_valid&65535,A.bi_valid+=q)}function te(A,R,q){Z(A,q[2*R],q[2*R+1])}function ue(A,R){for(var q=0;q|=1&A,A>>>=1,q<<=1,0<--R;);return q>>>1}function ee(A,R,q){var B,M,J=new Array(b+1),ne=0;for(B=1;B<=b;B++)J[B]=ne=ne+q[B-1]<<1;for(M=0;M<=R;M++){var re=A[2*M+1];re!==0&&(A[2*M]=ue(J[re]++,re))}}function ie(A){var R;for(R=0;R<m;R++)A.dyn_ltree[2*R]=0;for(R=0;R<u;R++)A.dyn_dtree[2*R]=0;for(R=0;R<w;R++)A.bl_tree[2*R]=0;A.dyn_ltree[2*k]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function se(A){8<A.bi_valid?K(A,A.bi_buf):0<A.bi_valid&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function oe(A,R,q,B){var M=2*R,J=2*q;return A[M]<A[J]||A[M]===A[J]&&B[R]<=B[q]}function le(A,R,q){for(var B=A.heap[q],M=q<<1;M<=A.heap_len&&(M<A.heap_len&&oe(R,A.heap[M+1],A.heap[M],A.depth)&&M++,!oe(R,B,A.heap[M],A.depth));)A.heap[q]=A.heap[M],q=M,M<<=1;A.heap[q]=B}function fe(A,R,q){var B,M,J,ne,re=0;if(A.last_lit!==0)for(;B=A.pending_buf[A.d_buf+2*re]<<8|A.pending_buf[A.d_buf+2*re+1],M=A.pending_buf[A.l_buf+re],re++,B===0?te(A,M,R):(te(A,(J=y[M])+f+1,R),(ne=N[J])!==0&&Z(A,M-=$[J],ne),te(A,J=I(--B),q),(ne=P[J])!==0&&Z(A,B-=Y[J],ne)),re<A.last_lit;);te(A,k,R)}function we(A,R){var q,B,M,J=R.dyn_tree,ne=R.stat_desc.static_tree,re=R.stat_desc.has_stree,ae=R.stat_desc.elems,he=-1;for(A.heap_len=0,A.heap_max=h,q=0;q<ae;q++)J[2*q]!==0?(A.heap[++A.heap_len]=he=q,A.depth[q]=0):J[2*q+1]=0;for(;A.heap_len<2;)J[2*(M=A.heap[++A.heap_len]=he<2?++he:0)]=1,A.depth[M]=0,A.opt_len--,re&&(A.static_len-=ne[2*M+1]);for(R.max_code=he,q=A.heap_len>>1;1<=q;q--)le(A,J,q);for(M=ae;q=A.heap[1],A.heap[1]=A.heap[A.heap_len--],le(A,J,1),B=A.heap[1],A.heap[--A.heap_max]=q,A.heap[--A.heap_max]=B,J[2*M]=J[2*q]+J[2*B],A.depth[M]=(A.depth[q]>=A.depth[B]?A.depth[q]:A.depth[B])+1,J[2*q+1]=J[2*B+1]=M,A.heap[1]=M++,le(A,J,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],(function(me,ve){var it,je,_t,Ee,ir,Pt,Ve=ve.dyn_tree,Vn=ve.max_code,Yn=ve.stat_desc.static_tree,fi=ve.stat_desc.has_stree,hi=ve.stat_desc.extra_bits,Kn=ve.stat_desc.extra_base,Ae=ve.stat_desc.max_length,Oe=0;for(Ee=0;Ee<=b;Ee++)me.bl_count[Ee]=0;for(Ve[2*me.heap[me.heap_max]+1]=0,it=me.heap_max+1;it<h;it++)Ae<(Ee=Ve[2*Ve[2*(je=me.heap[it])+1]+1]+1)&&(Ee=Ae,Oe++),Ve[2*je+1]=Ee,Vn<je||(me.bl_count[Ee]++,ir=0,Kn<=je&&(ir=hi[je-Kn]),Pt=Ve[2*je],me.opt_len+=Pt*(Ee+ir),fi&&(me.static_len+=Pt*(Yn[2*je+1]+ir)));if(Oe!==0){do{for(Ee=Ae-1;me.bl_count[Ee]===0;)Ee--;me.bl_count[Ee]--,me.bl_count[Ee+1]+=2,me.bl_count[Ae]--,Oe-=2}while(0<Oe);for(Ee=Ae;Ee!==0;Ee--)for(je=me.bl_count[Ee];je!==0;)Vn<(_t=me.heap[--it])||(Ve[2*_t+1]!==Ee&&(me.opt_len+=(Ee-Ve[2*_t+1])*Ve[2*_t],Ve[2*_t+1]=Ee),je--)}})(A,R),ee(J,he,A.bl_count)}function g(A,R,q){var B,M,J=-1,ne=R[1],re=0,ae=7,he=4;for(ne===0&&(ae=138,he=3),R[2*(q+1)+1]=65535,B=0;B<=q;B++)M=ne,ne=R[2*(B+1)+1],++re<ae&&M===ne||(re<he?A.bl_tree[2*M]+=re:M!==0?(M!==J&&A.bl_tree[2*M]++,A.bl_tree[2*S]++):re<=10?A.bl_tree[2*C]++:A.bl_tree[2*O]++,J=M,he=(re=0)===ne?(ae=138,3):M===ne?(ae=6,3):(ae=7,4))}function F(A,R,q){var B,M,J=-1,ne=R[1],re=0,ae=7,he=4;for(ne===0&&(ae=138,he=3),B=0;B<=q;B++)if(M=ne,ne=R[2*(B+1)+1],!(++re<ae&&M===ne)){if(re<he)for(;te(A,M,A.bl_tree),--re!=0;);else M!==0?(M!==J&&(te(A,M,A.bl_tree),re--),te(A,S,A.bl_tree),Z(A,re-3,2)):re<=10?(te(A,C,A.bl_tree),Z(A,re-3,3)):(te(A,O,A.bl_tree),Z(A,re-11,7));J=M,he=(re=0)===ne?(ae=138,3):M===ne?(ae=6,3):(ae=7,4)}}l(Y);var U=!1;function E(A,R,q,B){Z(A,(c<<1)+(B?1:0),3),(function(M,J,ne,re){se(M),K(M,ne),K(M,~ne),i.arraySet(M.pending_buf,M.window,J,ne,M.pending),M.pending+=ne})(A,R,q)}o._tr_init=function(A){U||((function(){var R,q,B,M,J,ne=new Array(b+1);for(M=B=0;M<d-1;M++)for($[M]=B,R=0;R<1<<N[M];R++)y[B++]=M;for(y[B-1]=M,M=J=0;M<16;M++)for(Y[M]=J,R=0;R<1<<P[M];R++)L[J++]=M;for(J>>=7;M<u;M++)for(Y[M]=J<<7,R=0;R<1<<P[M]-7;R++)L[256+J++]=M;for(q=0;q<=b;q++)ne[q]=0;for(R=0;R<=143;)G[2*R+1]=8,R++,ne[8]++;for(;R<=255;)G[2*R+1]=9,R++,ne[9]++;for(;R<=279;)G[2*R+1]=7,R++,ne[7]++;for(;R<=287;)G[2*R+1]=8,R++,ne[8]++;for(ee(G,m+1,ne),R=0;R<u;R++)z[2*R+1]=5,z[2*R]=ue(R,5);X=new Q(G,N,f+1,m,b),H=new Q(z,P,0,u,b),V=new Q(new Array(0),D,0,w,x)})(),U=!0),A.l_desc=new j(A.dyn_ltree,X),A.d_desc=new j(A.dyn_dtree,H),A.bl_desc=new j(A.bl_tree,V),A.bi_buf=0,A.bi_valid=0,ie(A)},o._tr_stored_block=E,o._tr_flush_block=function(A,R,q,B){var M,J,ne=0;0<A.level?(A.strm.data_type===2&&(A.strm.data_type=(function(re){var ae,he=4093624447;for(ae=0;ae<=31;ae++,he>>>=1)if(1&he&&re.dyn_ltree[2*ae]!==0)return s;if(re.dyn_ltree[18]!==0||re.dyn_ltree[20]!==0||re.dyn_ltree[26]!==0)return a;for(ae=32;ae<f;ae++)if(re.dyn_ltree[2*ae]!==0)return a;return s})(A)),we(A,A.l_desc),we(A,A.d_desc),ne=(function(re){var ae;for(g(re,re.dyn_ltree,re.l_desc.max_code),g(re,re.dyn_dtree,re.d_desc.max_code),we(re,re.bl_desc),ae=w-1;3<=ae&&re.bl_tree[2*W[ae]+1]===0;ae--);return re.opt_len+=3*(ae+1)+5+5+4,ae})(A),M=A.opt_len+3+7>>>3,(J=A.static_len+3+7>>>3)<=M&&(M=J)):M=J=q+5,q+4<=M&&R!==-1?E(A,R,q,B):A.strategy===4||J===M?(Z(A,2+(B?1:0),3),fe(A,G,z)):(Z(A,4+(B?1:0),3),(function(re,ae,he,me){var ve;for(Z(re,ae-257,5),Z(re,he-1,5),Z(re,me-4,4),ve=0;ve<me;ve++)Z(re,re.bl_tree[2*W[ve]+1],3);F(re,re.dyn_ltree,ae-1),F(re,re.dyn_dtree,he-1)})(A,A.l_desc.max_code+1,A.d_desc.max_code+1,ne+1),fe(A,A.dyn_ltree,A.dyn_dtree)),ie(A),B&&se(A)},o._tr_tally=function(A,R,q){return A.pending_buf[A.d_buf+2*A.last_lit]=R>>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&R,A.pending_buf[A.l_buf+A.last_lit]=255&q,A.last_lit++,R===0?A.dyn_ltree[2*q]++:(A.matches++,R--,A.dyn_ltree[2*(y[q]+f+1)]++,A.dyn_dtree[2*I(R)]++),A.last_lit===A.lit_bufsize-1},o._tr_align=function(A){Z(A,2,3),te(A,k,G),(function(R){R.bi_valid===16?(K(R,R.bi_buf),R.bi_buf=0,R.bi_valid=0):8<=R.bi_valid&&(R.pending_buf[R.pending++]=255&R.bi_buf,R.bi_buf>>=8,R.bi_valid-=8)})(A)}},{"../utils/common":41}],53:[function(r,n,o){n.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,n,o){(function(i){(function(s,a){if(!s.setImmediate){var l,c,d,f,m=1,u={},w=!1,h=s.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(s);b=b&&b.setTimeout?b:s,l={}.toString.call(s.process)==="[object process]"?function(S){process.nextTick(function(){x(S)})}:(function(){if(s.postMessage&&!s.importScripts){var S=!0,C=s.onmessage;return s.onmessage=function(){S=!1},s.postMessage("","*"),s.onmessage=C,S}})()?(f="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",k,!1):s.attachEvent("onmessage",k),function(S){s.postMessage(f+S,"*")}):s.MessageChannel?((d=new MessageChannel).port1.onmessage=function(S){x(S.data)},function(S){d.port2.postMessage(S)}):h&&"onreadystatechange"in h.createElement("script")?(c=h.documentElement,function(S){var C=h.createElement("script");C.onreadystatechange=function(){x(S),C.onreadystatechange=null,c.removeChild(C),C=null},c.appendChild(C)}):function(S){setTimeout(x,0,S)},b.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var C=new Array(arguments.length-1),O=0;O<C.length;O++)C[O]=arguments[O+1];var N={callback:S,args:C};return u[m]=N,l(m),m++},b.clearImmediate=v}function v(S){delete u[S]}function x(S){if(w)setTimeout(x,0,S);else{var C=u[S];if(C){w=!0;try{(function(O){var N=O.callback,P=O.args;switch(P.length){case 0:N();break;case 1:N(P[0]);break;case 2:N(P[0],P[1]);break;case 3:N(P[0],P[1],P[2]);break;default:N.apply(a,P)}})(C)}finally{v(S),w=!1}}}}function k(S){S.source===s&&typeof S.data=="string"&&S.data.indexOf(f)===0&&x(+S.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof pt<"u"?pt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Gn)),Gn.exports}var Nc=Ac();const zc=Ec(Nc);var Lr={exports:{}},jc=Lr.exports,bi;function Tc(){return bi||(bi=1,(function(e,t){(function(r,n){n()})(jc,function(){function r(c,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,d,f){var m=new XMLHttpRequest;m.open("GET",c),m.responseType="blob",m.onload=function(){l(m.response,d,f)},m.onerror=function(){console.error("could not download file")},m.send()}function o(c){var d=new XMLHttpRequest;d.open("HEAD",c,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function i(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(d)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof pt=="object"&&pt.global===pt?pt:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(c,d,f){var m=s.URL||s.webkitURL,u=document.createElement("a");d=d||c.name||"download",u.download=d,u.rel="noopener",typeof c=="string"?(u.href=c,u.origin===location.origin?i(u):o(u.href)?n(c,d,f):i(u,u.target="_blank")):(u.href=m.createObjectURL(c),setTimeout(function(){m.revokeObjectURL(u.href)},4e4),setTimeout(function(){i(u)},0))}:"msSaveOrOpenBlob"in navigator?function(c,d,f){if(d=d||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(r(c,f),d);else if(o(c))n(c,d,f);else{var m=document.createElement("a");m.href=c,m.target="_blank",setTimeout(function(){i(m)})}}:function(c,d,f,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof c=="string")return n(c,d,f);var u=c.type==="application/octet-stream",w=/constructor/i.test(s.HTMLElement)||s.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||u&&w||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var k=b.result;k=h?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=k:location=k,m=null},b.readAsDataURL(c)}else{var v=s.URL||s.webkitURL,x=v.createObjectURL(c);m?m.location=x:location.href=x,m=null,setTimeout(function(){v.revokeObjectURL(x)},4e4)}});s.saveAs=l.saveAs=l,e.exports=l})})(Lr)),Lr.exports}var vi=Tc();const wi=async(e,t)=>{const r=new zc,n=r.folder("config");n==null||n.file("site.json",JSON.stringify(e.site,null,2)),n==null||n.file("theme.json",JSON.stringify(e.theme,null,2)),n==null||n.file("menu.json",JSON.stringify(e.menu,null,2));const o=r.folder("pages");o==null||o.file(`${t}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});vi.saveAs(i,`jsonpages-project-${t}-${Date.now()}.zip`)},xi=(e,t,r)=>{const{pages:n,...o}=e.site,i={page:e.page,site:o,menu:e.menu,theme:e.theme},a=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${a}</head>`),c=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});vi.saveAs(c,`${t}.html`)};function yi(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=yi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Oc(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=yi(e))&&(n&&(n+=" "),n+=t);return n}const Pc=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Ic=(e,t)=>({classGroupId:e,validator:t}),ki=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Fr="-",Si=[],Dc="arbitrary..",Rc=e=>{const t=Lc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Mc(s);const a=s.split(Fr),l=a[0]===""&&a.length>1?1:0;return _i(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=n[s],c=r[s];return l?c?Pc(c,l):l:c||Si}return r[s]||Si}}},_i=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const c=_i(e,t+1,i);if(c)return c}const s=r.validators;if(s===null)return;const a=t===0?e.join(Fr):e.slice(t).join(Fr),l=s.length;for(let c=0;c<l;c++){const d=s[c];if(d.validator(a))return d.classGroupId}},Mc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Dc+n:void 0})(),Lc=e=>{const{theme:t,classGroups:r}=e;return Fc(r,t)},Fc=(e,t)=>{const r=ki();for(const n in e){const o=e[n];Zn(o,r,n,t)}return r},Zn=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Bc(s,t,r,n)}},Bc=(e,t,r,n)=>{if(typeof e=="string"){Uc(e,t,r);return}if(typeof e=="function"){Wc(e,t,r,n);return}$c(e,t,r,n)},Uc=(e,t,r)=>{const n=e===""?t:Ci(t,e);n.classGroupId=r},Wc=(e,t,r,n)=>{if(Hc(e)){Zn(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Ic(r,e))},$c=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Zn(l,Ci(t,a),r,n)}},Ci=(e,t)=>{let r=e;const n=t.split(Fr),o=n.length;for(let i=0;i<o;i++){const s=n[i];let a=r.nextPart.get(s);a||(a=ki(),r.nextPart.set(s,a)),r=a}return r},Hc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Vc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,s)=>{r[i]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let s=r[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set(i,s){i in r?r[i]=s:o(i,s)}}},Xn="!",Ei=":",Yc=[],Ai=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Kc=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let s=0,a=0,l=0,c;const d=o.length;for(let h=0;h<d;h++){const b=o[h];if(s===0&&a===0){if(b===Ei){i.push(o.slice(l,h)),l=h+1;continue}if(b==="/"){c=h;continue}}b==="["?s++:b==="]"?s--:b==="("?a++:b===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,u=!1;f.endsWith(Xn)?(m=f.slice(0,-1),u=!0):f.startsWith(Xn)&&(m=f.slice(1),u=!0);const w=c&&c>l?c-l:void 0;return Ai(i,u,m,w)};if(t){const o=t+Ei,i=n;n=s=>s.startsWith(o)?i(s.slice(o.length)):Ai(Yc,!1,s,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},Gc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const s=r[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(s)):o.push(s)}return o.length>0&&(o.sort(),n.push(...o)),n}},Zc=e=>({cache:Vc(e.cacheSize),parseClassName:Kc(e),sortModifiers:Gc(e),...Rc(e)}),Xc=/\s+/,qc=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(Xc);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:f,modifiers:m,hasImportantModifier:u,baseClassName:w,maybePostfixModifierPosition:h}=r(d);if(f){l=d+(l.length>0?" "+l:l);continue}let b=!!h,v=n(b?w.substring(0,h):w);if(!v){if(!b){l=d+(l.length>0?" "+l:l);continue}if(v=n(w),!v){l=d+(l.length>0?" "+l:l);continue}b=!1}const x=m.length===0?"":m.length===1?m[0]:i(m).join(":"),k=u?x+Xn:x,S=k+v;if(s.indexOf(S)>-1)continue;s.push(S);const C=o(v,b);for(let O=0;O<C.length;++O){const N=C[O];s.push(k+N)}l=d+(l.length>0?" "+l:l)}return l},Jc=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Ni(r))&&(o&&(o+=" "),o+=n);return o},Ni=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ni(e[n]))&&(r&&(r+=" "),r+=t);return r},Qc=(e,...t)=>{let r,n,o,i;const s=l=>{const c=t.reduce((d,f)=>f(d),e());return r=Zc(c),n=r.cache.get,o=r.cache.set,i=a,a(l)},a=l=>{const c=n(l);if(c)return c;const d=qc(l,r);return o(l,d),d};return i=s,(...l)=>i(Jc(...l))},ed=[],Ne=e=>{const t=r=>r[e]||ed;return t.isThemeGetter=!0,t},zi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ji=/^\((?:(\w[\w-]*):)?(.+)\)$/i,td=/^\d+\/\d+$/,rd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nd=/\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$/,od=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,id=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,It=e=>td.test(e),ge=e=>!!e&&!Number.isNaN(Number(e)),mt=e=>!!e&&Number.isInteger(Number(e)),qn=e=>e.endsWith("%")&&ge(e.slice(0,-1)),lt=e=>rd.test(e),ad=()=>!0,ld=e=>nd.test(e)&&!od.test(e),Ti=()=>!1,cd=e=>id.test(e),dd=e=>sd.test(e),ud=e=>!ce(e)&&!de(e),fd=e=>Dt(e,Ri,Ti),ce=e=>zi.test(e),Nt=e=>Dt(e,Mi,ld),Jn=e=>Dt(e,bd,ge),Oi=e=>Dt(e,Ii,Ti),hd=e=>Dt(e,Di,dd),Br=e=>Dt(e,Li,cd),de=e=>ji.test(e),ar=e=>Rt(e,Mi),pd=e=>Rt(e,vd),Pi=e=>Rt(e,Ii),md=e=>Rt(e,Ri),gd=e=>Rt(e,Di),Ur=e=>Rt(e,Li,!0),Dt=(e,t,r)=>{const n=zi.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Rt=(e,t,r=!1)=>{const n=ji.exec(e);return n?n[1]?t(n[1]):r:!1},Ii=e=>e==="position"||e==="percentage",Di=e=>e==="image"||e==="url",Ri=e=>e==="length"||e==="size"||e==="bg-size",Mi=e=>e==="length",bd=e=>e==="number",vd=e=>e==="family-name",Li=e=>e==="shadow",wd=Qc(()=>{const e=Ne("color"),t=Ne("font"),r=Ne("text"),n=Ne("font-weight"),o=Ne("tracking"),i=Ne("leading"),s=Ne("breakpoint"),a=Ne("container"),l=Ne("spacing"),c=Ne("radius"),d=Ne("shadow"),f=Ne("inset-shadow"),m=Ne("text-shadow"),u=Ne("drop-shadow"),w=Ne("blur"),h=Ne("perspective"),b=Ne("aspect"),v=Ne("ease"),x=Ne("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),de,ce],O=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[de,ce,l],D=()=>[It,"full","auto",...P()],W=()=>[mt,"none","subgrid",de,ce],G=()=>["auto",{span:["full",mt,de,ce]},mt,de,ce],z=()=>[mt,"auto",de,ce],L=()=>["auto","min","max","fr",de,ce],y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",...P()],H=()=>[It,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],V=()=>[e,de,ce],Y=()=>[...S(),Pi,Oi,{position:[de,ce]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",md,fd,{size:[de,ce]}],I=()=>[qn,ar,Nt],K=()=>["","none","full",c,de,ce],Z=()=>["",ge,ar,Nt],te=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[ge,qn,Pi,Oi],ie=()=>["","none",w,de,ce],se=()=>["none",ge,de,ce],oe=()=>["none",ge,de,ce],le=()=>[ge,de,ce],fe=()=>[It,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lt],breakpoint:[lt],color:[ad],container:[lt],"drop-shadow":[lt],ease:["in","out","in-out"],font:[ud],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lt],shadow:[lt],spacing:["px",ge],text:[lt],"text-shadow":[lt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",It,ce,de,b]}],container:["container"],columns:[{columns:[ge,ce,de,a]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:C()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],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:[mt,"auto",de,ce]}],basis:[{basis:[It,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,It,"auto","initial","none",ce]}],grow:[{grow:["",ge,de,ce]}],shrink:[{shrink:["",ge,de,ce]}],order:[{order:[mt,"first","last","none",de,ce]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...y(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...y()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":y()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[a,"screen",...H()]}],"min-w":[{"min-w":[a,"screen","none",...H()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,ar,Nt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,de,Jn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qn,ce]}],"font-family":[{font:[pd,ce,t]}],"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:[o,de,ce]}],"line-clamp":[{"line-clamp":[ge,"none",de,Jn]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",de,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",de,Nt]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[ge,"auto",de,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,ce]}],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",de,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mt,de,ce],radial:["",de,ce],conic:[mt,de,ce]},gd,hd]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],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:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,de,ce]}],"outline-w":[{outline:["",ge,ar,Nt]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",d,Ur,Br]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",f,Ur,Br]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[ge,Nt]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",m,Ur,Br]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[ge,de,ce]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"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":[ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[de,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ce]}],filter:[{filter:["","none",de,ce]}],blur:[{blur:ie()}],brightness:[{brightness:[ge,de,ce]}],contrast:[{contrast:[ge,de,ce]}],"drop-shadow":[{"drop-shadow":["","none",u,Ur,Br]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",ge,de,ce]}],"hue-rotate":[{"hue-rotate":[ge,de,ce]}],invert:[{invert:["",ge,de,ce]}],saturate:[{saturate:[ge,de,ce]}],sepia:[{sepia:["",ge,de,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ce]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[ge,de,ce]}],"backdrop-contrast":[{"backdrop-contrast":[ge,de,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,de,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,de,ce]}],"backdrop-invert":[{"backdrop-invert":["",ge,de,ce]}],"backdrop-opacity":[{"backdrop-opacity":[ge,de,ce]}],"backdrop-saturate":[{"backdrop-saturate":[ge,de,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,de,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ge,"initial",de,ce]}],ease:[{ease:["linear","initial",v,de,ce]}],delay:[{delay:[ge,de,ce]}],animate:[{animate:["none",x,de,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,de,ce]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[de,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",de,ce]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",de,ce]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[ge,ar,Nt,Jn]}],stroke:[{stroke:["none",...V()]}],"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 pe(...e){return wd(Oc(e))}var Wr={exports:{}},lr={};/**
|
|
11
|
+
*/var wi;function Ic(){return wi||(wi=1,(function(e,t){(function(r){e.exports=r()})(function(){return(function r(n,o,i){function s(c,d){if(!o[c]){if(!n[c]){var u=typeof Lr=="function"&&Lr;if(!d&&u)return u(c,!0);if(a)return a(c,!0);var m=new Error("Cannot find module '"+c+"'");throw m.code="MODULE_NOT_FOUND",m}var f=o[c]={exports:{}};n[c][0].call(f.exports,function(v){var h=n[c][1][v];return s(h||v)},f,f.exports,r,n,o,i)}return o[c].exports}for(var a=typeof Lr=="function"&&Lr,l=0;l<i.length;l++)s(i[l]);return s})({1:[function(r,n,o){var i=r("./utils"),s=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(l){for(var c,d,u,m,f,v,h,b=[],g=0,x=l.length,k=x,_=i.getTypeOf(l)!=="string";g<l.length;)k=x-g,u=_?(c=l[g++],d=g<x?l[g++]:0,g<x?l[g++]:0):(c=l.charCodeAt(g++),d=g<x?l.charCodeAt(g++):0,g<x?l.charCodeAt(g++):0),m=c>>2,f=(3&c)<<4|d>>4,v=1<k?(15&d)<<2|u>>6:64,h=2<k?63&u:64,b.push(a.charAt(m)+a.charAt(f)+a.charAt(v)+a.charAt(h));return b.join("")},o.decode=function(l){var c,d,u,m,f,v,h=0,b=0,g="data:";if(l.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var x,k=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&k--,l.charAt(l.length-2)===a.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(x=s.uint8array?new Uint8Array(0|k):new Array(0|k);h<l.length;)c=a.indexOf(l.charAt(h++))<<2|(m=a.indexOf(l.charAt(h++)))>>4,d=(15&m)<<4|(f=a.indexOf(l.charAt(h++)))>>2,u=(3&f)<<6|(v=a.indexOf(l.charAt(h++))),x[b++]=c,f!==64&&(x[b++]=d),v!==64&&(x[b++]=u);return x}},{"./support":30,"./utils":32}],2:[function(r,n,o){var i=r("./external"),s=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function c(d,u,m,f,v){this.compressedSize=d,this.uncompressedSize=u,this.crc32=m,this.compression=f,this.compressedContent=v}c.prototype={getContentWorker:function(){var d=new s(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),u=this;return d.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new s(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(d,u,m){return d.pipe(new a).pipe(new l("uncompressedSize")).pipe(u.compressWorker(m)).pipe(new l("compressedSize")).withStreamInfo("compression",u)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,o){var i=r("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},o.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,o){var i=r("./utils"),s=(function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l})();n.exports=function(a,l){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?(function(c,d,u,m){var f=s,v=m+u;c^=-1;for(var h=m;h<v;h++)c=c>>>8^f[255&(c^d[h])];return-1^c})(0|l,a,a.length,0):(function(c,d,u,m){var f=s,v=m+u;c^=-1;for(var h=m;h<v;h++)c=c>>>8^f[255&(c^d.charCodeAt(h))];return-1^c})(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(r,n,o){var i=null;i=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:i}},{lie:37}],7:[function(r,n,o){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),c=i?"uint8array":"array";function d(u,m){l.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=m,this.meta={}}o.magic="\b\0",a.inherits(d,l),d.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,u.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(m){u.push({data:m,meta:u.meta})}},o.compressWorker=function(u){return new d("Deflate",u)},o.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,o){function i(f,v){var h,b="";for(h=0;h<v;h++)b+=String.fromCharCode(255&f),f>>>=8;return b}function s(f,v,h,b,g,x){var k,_,C=f.file,I=f.compression,A=x!==c.utf8encode,D=a.transformTo("string",x(C.name)),R=a.transformTo("string",c.utf8encode(C.name)),F=C.comment,Y=a.transformTo("string",x(F)),N=a.transformTo("string",c.utf8encode(F)),M=R.length!==C.name.length,y=N.length!==F.length,B="",te="",U="",$=C.dir,Z=C.date,ne={crc32:0,compressedSize:0,uncompressedSize:0};v&&!h||(ne.crc32=f.crc32,ne.compressedSize=f.compressedSize,ne.uncompressedSize=f.uncompressedSize);var z=0;v&&(z|=8),A||!M&&!y||(z|=2048);var L=0,K=0;$&&(L|=16),g==="UNIX"?(K=798,L|=(function(ee,ue){var re=ee;return ee||(re=ue?16893:33204),(65535&re)<<16})(C.unixPermissions,$)):(K=20,L|=(function(ee){return 63&(ee||0)})(C.dosPermissions)),k=Z.getUTCHours(),k<<=6,k|=Z.getUTCMinutes(),k<<=5,k|=Z.getUTCSeconds()/2,_=Z.getUTCFullYear()-1980,_<<=4,_|=Z.getUTCMonth()+1,_<<=5,_|=Z.getUTCDate(),M&&(te=i(1,1)+i(d(D),4)+R,B+="up"+i(te.length,2)+te),y&&(U=i(1,1)+i(d(Y),4)+N,B+="uc"+i(U.length,2)+U);var q="";return q+=`
|
|
12
|
+
\0`,q+=i(z,2),q+=I.magic,q+=i(k,2),q+=i(_,2),q+=i(ne.crc32,4),q+=i(ne.compressedSize,4),q+=i(ne.uncompressedSize,4),q+=i(D.length,2),q+=i(B.length,2),{fileRecord:u.LOCAL_FILE_HEADER+q+D+B,dirRecord:u.CENTRAL_FILE_HEADER+i(K,2)+q+i(Y.length,2)+"\0\0\0\0"+i(L,4)+i(b,4)+D+B+Y}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),d=r("../crc32"),u=r("../signature");function m(f,v,h,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=h,this.encodeFileName=b,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(f){var v=f.meta.percent||0,h=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,l.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:h?(v+100*(h-b-1))/h:100}}))},m.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var v=this.streamFiles&&!f.file.dir;if(v){var h=s(f,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(f){this.accumulate=!1;var v=this.streamFiles&&!f.file.dir,h=s(f,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),v)this.push({data:(function(b){return u.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.uncompressedSize,4)})(f),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var f=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var h=this.bytesWritten-f,b=(function(g,x,k,_,C){var I=a.transformTo("string",C(_));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(g,2)+i(g,2)+i(x,4)+i(k,4)+i(I.length,2)+I})(this.dirRecords.length,h,f,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(f){this._sources.push(f);var v=this;return f.on("data",function(h){v.processChunk(h)}),f.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),f.on("error",function(h){v.error(h)}),this},m.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))},m.prototype.error=function(f){var v=this._sources;if(!l.prototype.error.call(this,f))return!1;for(var h=0;h<v.length;h++)try{v[h].error(f)}catch{}return!0},m.prototype.lock=function(){l.prototype.lock.call(this);for(var f=this._sources,v=0;v<f.length;v++)f[v].lock()},n.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,o){var i=r("../compressions"),s=r("./ZipFileWorker");o.generateWorker=function(a,l,c){var d=new s(l.streamFiles,c,l.platform,l.encodeFileName),u=0;try{a.forEach(function(m,f){u++;var v=(function(x,k){var _=x||k,C=i[_];if(!C)throw new Error(_+" is not a valid compression method !");return C})(f.options.compression,l.compression),h=f.options.compressionOptions||l.compressionOptions||{},b=f.dir,g=f.date;f._compressWorker(v,h).withStreamInfo("file",{name:m,dir:b,date:g,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(d)}),d.entriesCount=u}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,o){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 s=new i;for(var a in this)typeof this[a]!="function"&&(s[a]=this[a]);return s}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(s,a){return new i().loadAsync(s,a)},i.external=r("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,o){var i=r("./utils"),s=r("./external"),a=r("./utf8"),l=r("./zipEntries"),c=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function u(m){return new s.Promise(function(f,v){var h=m.decompressed.getContentWorker().pipe(new c);h.on("error",function(b){v(b)}).on("end",function(){h.streamInfo.crc32!==m.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):f()}).resume()})}n.exports=function(m,f){var v=this;return f=i.extend(f||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(m)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",m,!0,f.optimizedBinaryString,f.base64).then(function(h){var b=new l(f);return b.load(h),b}).then(function(h){var b=[s.Promise.resolve(h)],g=h.files;if(f.checkCRC32)for(var x=0;x<g.length;x++)b.push(u(g[x]));return s.Promise.all(b)}).then(function(h){for(var b=h.shift(),g=b.files,x=0;x<g.length;x++){var k=g[x],_=k.fileNameStr,C=i.resolve(k.fileNameStr);v.file(C,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:f.createFolders}),k.dir||(v.file(C).unsafeOriginalName=_)}return b.zipComment.length&&(v.comment=b.zipComment),v})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,o){var i=r("../utils"),s=r("../stream/GenericWorker");function a(l,c){s.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}i.inherits(a,s),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(d){c.push({data:d,meta:{percent:0}})}).on("error",function(d){c.isPaused?this.generatedError=d:c.error(d)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,o){var i=r("readable-stream").Readable;function s(a,l,c){i.call(this,l),this._helper=a;var d=this;a.on("data",function(u,m){d.push(u)||d._helper.pause(),c&&c(m)}).on("error",function(u){d.emit("error",u)}).on("end",function(){d.push(null)})}r("../utils").inherits(s,i),s.prototype._read=function(){this._helper.resume()},n.exports=s},{"../utils":32,"readable-stream":16}],14:[function(r,n,o){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,s);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,s)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var s=new Buffer(i);return s.fill(0),s},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,n,o){function i(C,I,A){var D,R=a.getTypeOf(I),F=a.extend(A||{},d);F.date=F.date||new Date,F.compression!==null&&(F.compression=F.compression.toUpperCase()),typeof F.unixPermissions=="string"&&(F.unixPermissions=parseInt(F.unixPermissions,8)),F.unixPermissions&&16384&F.unixPermissions&&(F.dir=!0),F.dosPermissions&&16&F.dosPermissions&&(F.dir=!0),F.dir&&(C=g(C)),F.createFolders&&(D=b(C))&&x.call(this,D,!0);var Y=R==="string"&&F.binary===!1&&F.base64===!1;A&&A.binary!==void 0||(F.binary=!Y),(I instanceof u&&I.uncompressedSize===0||F.dir||!I||I.length===0)&&(F.base64=!1,F.binary=!0,I="",F.compression="STORE",R="string");var N=null;N=I instanceof u||I instanceof l?I:v.isNode&&v.isStream(I)?new h(C,I):a.prepareContent(C,I,F.binary,F.optimizedBinaryString,F.base64);var M=new m(C,N,F);this.files[C]=M}var s=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),c=r("./stream/StreamHelper"),d=r("./defaults"),u=r("./compressedObject"),m=r("./zipObject"),f=r("./generate"),v=r("./nodejsUtils"),h=r("./nodejs/NodejsStreamInputAdapter"),b=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var I=C.lastIndexOf("/");return 0<I?C.substring(0,I):""},g=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},x=function(C,I){return I=I!==void 0?I:d.createFolders,C=g(C),this.files[C]||i.call(this,C,null,{dir:!0,createFolders:I}),this.files[C]};function k(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var I,A,D;for(I in this.files)D=this.files[I],(A=I.slice(this.root.length,I.length))&&I.slice(0,this.root.length)===this.root&&C(A,D)},filter:function(C){var I=[];return this.forEach(function(A,D){C(A,D)&&I.push(D)}),I},file:function(C,I,A){if(arguments.length!==1)return C=this.root+C,i.call(this,C,I,A),this;if(k(C)){var D=C;return this.filter(function(F,Y){return!Y.dir&&D.test(F)})}var R=this.files[this.root+C];return R&&!R.dir?R:null},folder:function(C){if(!C)return this;if(k(C))return this.filter(function(R,F){return F.dir&&C.test(R)});var I=this.root+C,A=x.call(this,I),D=this.clone();return D.root=A.name,D},remove:function(C){C=this.root+C;var I=this.files[C];if(I||(C.slice(-1)!=="/"&&(C+="/"),I=this.files[C]),I&&!I.dir)delete this.files[C];else for(var A=this.filter(function(R,F){return F.name.slice(0,C.length)===C}),D=0;D<A.length;D++)delete this.files[A[D].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var I,A={};try{if((A=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=A.type.toLowerCase(),A.compression=A.compression.toUpperCase(),A.type==="binarystring"&&(A.type="string"),!A.type)throw new Error("No output type specified.");a.checkSupport(A.type),A.platform!=="darwin"&&A.platform!=="freebsd"&&A.platform!=="linux"&&A.platform!=="sunos"||(A.platform="UNIX"),A.platform==="win32"&&(A.platform="DOS");var D=A.comment||this.comment||"";I=f.generateWorker(this,A,D)}catch(R){(I=new l("error")).error(R)}return new c(I,A.type||"string",A.mimeType)},generateAsync:function(C,I){return this.generateInternalStream(C).accumulate(I)},generateNodeStream:function(C,I){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(I)}};n.exports=_},{"./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,n,o){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,o){var i=r("./DataReader");function s(a){i.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data[this.zero+a]},s.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),u=a.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===l&&this.data[m+1]===c&&this.data[m+2]===d&&this.data[m+3]===u)return m-this.zero;return-1},s.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),u=a.charCodeAt(3),m=this.readData(4);return l===m[0]&&c===m[1]&&d===m[2]&&u===m[3]},s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],18:[function(r,n,o){var i=r("../utils");function s(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=s},{"../utils":32}],19:[function(r,n,o){var i=r("./Uint8ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,o){var i=r("./DataReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],21:[function(r,n,o){var i=r("./ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,o){var i=r("../utils"),s=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(u){var m=i.getTypeOf(u);return i.checkSupport(m),m!=="string"||s.uint8array?m==="nodebuffer"?new c(u):s.uint8array?new d(i.transformTo("uint8array",u)):new a(i.transformTo("array",u)):new l(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,o){var i=r("./GenericWorker"),s=r("../utils");function a(l){i.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(a,i),a.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,o){var i=r("./GenericWorker"),s=r("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,i),a.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,o){var i=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(a,s),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,o){var i=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=i.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}i.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=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,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,o){function i(s){this.name=s||"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(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var l=0;l<this._listeners[s].length;l++)this._listeners[s][l].call(this,a)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var a=this;return s.on("data",function(l){a.processChunk(l)}),s.on("end",function(){a.end()}),s.on("error",function(l){a.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 s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,a){return this.extraStreamInfo[s]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},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 s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},n.exports=i},{}],29:[function(r,n,o){var i=r("../utils"),s=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),c=r("../support"),d=r("../external"),u=null;if(c.nodestream)try{u=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(v,h){return new d.Promise(function(b,g){var x=[],k=v._internalType,_=v._outputType,C=v._mimeType;v.on("data",function(I,A){x.push(I),h&&h(A)}).on("error",function(I){x=[],g(I)}).on("end",function(){try{var I=(function(A,D,R){switch(A){case"blob":return i.newBlob(i.transformTo("arraybuffer",D),R);case"base64":return l.encode(D);default:return i.transformTo(A,D)}})(_,(function(A,D){var R,F=0,Y=null,N=0;for(R=0;R<D.length;R++)N+=D[R].length;switch(A){case"string":return D.join("");case"array":return Array.prototype.concat.apply([],D);case"uint8array":for(Y=new Uint8Array(N),R=0;R<D.length;R++)Y.set(D[R],F),F+=D[R].length;return Y;case"nodebuffer":return Buffer.concat(D);default:throw new Error("concat : unsupported type '"+A+"'")}})(k,x),C);b(I)}catch(A){g(A)}x=[]}).resume()})}function f(v,h,b){var g=h;switch(h){case"blob":case"arraybuffer":g="uint8array";break;case"base64":g="string"}try{this._internalType=g,this._outputType=h,this._mimeType=b,i.checkSupport(g),this._worker=v.pipe(new s(g)),v.lock()}catch(x){this._worker=new a("error"),this._worker.error(x)}}f.prototype={accumulate:function(v){return m(this,v)},on:function(v,h){var b=this;return v==="data"?this._worker.on(v,function(g){h.call(b,g.data,g.meta)}):this._worker.on(v,function(){i.delay(h,arguments,b)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(v){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:this._outputType!=="nodebuffer"},v)}},n.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var i=new ArrayBuffer(0);try{o.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),o.blob=s.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!r("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,o){for(var i=r("./utils"),s=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function u(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}o.utf8encode=function(f){return s.nodebuffer?a.newBufferFrom(f,"utf-8"):(function(v){var h,b,g,x,k,_=v.length,C=0;for(x=0;x<_;x++)(64512&(b=v.charCodeAt(x)))==55296&&x+1<_&&(64512&(g=v.charCodeAt(x+1)))==56320&&(b=65536+(b-55296<<10)+(g-56320),x++),C+=b<128?1:b<2048?2:b<65536?3:4;for(h=s.uint8array?new Uint8Array(C):new Array(C),x=k=0;k<C;x++)(64512&(b=v.charCodeAt(x)))==55296&&x+1<_&&(64512&(g=v.charCodeAt(x+1)))==56320&&(b=65536+(b-55296<<10)+(g-56320),x++),b<128?h[k++]=b:(b<2048?h[k++]=192|b>>>6:(b<65536?h[k++]=224|b>>>12:(h[k++]=240|b>>>18,h[k++]=128|b>>>12&63),h[k++]=128|b>>>6&63),h[k++]=128|63&b);return h})(f)},o.utf8decode=function(f){return s.nodebuffer?i.transformTo("nodebuffer",f).toString("utf-8"):(function(v){var h,b,g,x,k=v.length,_=new Array(2*k);for(h=b=0;h<k;)if((g=v[h++])<128)_[b++]=g;else if(4<(x=c[g]))_[b++]=65533,h+=x-1;else{for(g&=x===2?31:x===3?15:7;1<x&&h<k;)g=g<<6|63&v[h++],x--;1<x?_[b++]=65533:g<65536?_[b++]=g:(g-=65536,_[b++]=55296|g>>10&1023,_[b++]=56320|1023&g)}return _.length!==b&&(_.subarray?_=_.subarray(0,b):_.length=b),i.applyFromCharCode(_)})(f=i.transformTo(s.uint8array?"uint8array":"array",f))},i.inherits(u,l),u.prototype.processChunk=function(f){var v=i.transformTo(s.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var h=v;(v=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),v.set(h,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var b=(function(x,k){var _;for((k=k||x.length)>x.length&&(k=x.length),_=k-1;0<=_&&(192&x[_])==128;)_--;return _<0||_===0?k:_+c[x[_]]>k?_:k})(v),g=v;b!==v.length&&(s.uint8array?(g=v.subarray(0,b),this.leftOver=v.subarray(b,v.length)):(g=v.slice(0,b),this.leftOver=v.slice(b,v.length))),this.push({data:o.utf8decode(g),meta:f.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=u,i.inherits(m,l),m.prototype.processChunk=function(f){this.push({data:o.utf8encode(f.data),meta:f.meta})},o.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,o){var i=r("./support"),s=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function c(h){return h}function d(h,b){for(var g=0;g<h.length;++g)b[g]=255&h.charCodeAt(g);return b}r("setimmediate"),o.newBlob=function(h,b){o.checkSupport("blob");try{return new Blob([h],{type:b})}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return g.append(h),g.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(h,b,g){var x=[],k=0,_=h.length;if(_<=g)return String.fromCharCode.apply(null,h);for(;k<_;)b==="array"||b==="nodebuffer"?x.push(String.fromCharCode.apply(null,h.slice(k,Math.min(k+g,_)))):x.push(String.fromCharCode.apply(null,h.subarray(k,Math.min(k+g,_)))),k+=g;return x.join("")},stringifyByChar:function(h){for(var b="",g=0;g<h.length;g++)b+=String.fromCharCode(h[g]);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,a.allocBuffer(1)).length===1}catch{return!1}})()}};function m(h){var b=65536,g=o.getTypeOf(h),x=!0;if(g==="uint8array"?x=u.applyCanBeUsed.uint8array:g==="nodebuffer"&&(x=u.applyCanBeUsed.nodebuffer),x)for(;1<b;)try{return u.stringifyByChunk(h,g,b)}catch{b=Math.floor(b/2)}return u.stringifyByChar(h)}function f(h,b){for(var g=0;g<h.length;g++)b[g]=h[g];return b}o.applyFromCharCode=m;var v={};v.string={string:c,array:function(h){return d(h,new Array(h.length))},arraybuffer:function(h){return v.string.uint8array(h).buffer},uint8array:function(h){return d(h,new Uint8Array(h.length))},nodebuffer:function(h){return d(h,a.allocBuffer(h.length))}},v.array={string:m,array:c,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(h)}},v.arraybuffer={string:function(h){return m(new Uint8Array(h))},array:function(h){return f(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:c,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(new Uint8Array(h))}},v.uint8array={string:m,array:function(h){return f(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:c,nodebuffer:function(h){return a.newBufferFrom(h)}},v.nodebuffer={string:m,array:function(h){return f(h,new Array(h.length))},arraybuffer:function(h){return v.nodebuffer.uint8array(h).buffer},uint8array:function(h){return f(h,new Uint8Array(h.length))},nodebuffer:c},o.transformTo=function(h,b){if(b=b||"",!h)return b;o.checkSupport(h);var g=o.getTypeOf(b);return v[g][h](b)},o.resolve=function(h){for(var b=h.split("/"),g=[],x=0;x<b.length;x++){var k=b[x];k==="."||k===""&&x!==0&&x!==b.length-1||(k===".."?g.pop():g.push(k))}return g.join("/")},o.getTypeOf=function(h){return typeof h=="string"?"string":Object.prototype.toString.call(h)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(h)?"nodebuffer":i.uint8array&&h instanceof Uint8Array?"uint8array":i.arraybuffer&&h instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(h){if(!i[h.toLowerCase()])throw new Error(h+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(h){var b,g,x="";for(g=0;g<(h||"").length;g++)x+="\\x"+((b=h.charCodeAt(g))<16?"0":"")+b.toString(16).toUpperCase();return x},o.delay=function(h,b,g){setImmediate(function(){h.apply(g||null,b||[])})},o.inherits=function(h,b){function g(){}g.prototype=b.prototype,h.prototype=new g},o.extend=function(){var h,b,g={};for(h=0;h<arguments.length;h++)for(b in arguments[h])Object.prototype.hasOwnProperty.call(arguments[h],b)&&g[b]===void 0&&(g[b]=arguments[h][b]);return g},o.prepareContent=function(h,b,g,x,k){return l.Promise.resolve(b).then(function(_){return i.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new l.Promise(function(C,I){var A=new FileReader;A.onload=function(D){C(D.target.result)},A.onerror=function(D){I(D.target.error)},A.readAsArrayBuffer(_)}):_}).then(function(_){var C=o.getTypeOf(_);return C?(C==="arraybuffer"?_=o.transformTo("uint8array",_):C==="string"&&(k?_=s.decode(_):g&&x!==!0&&(_=(function(I){return d(I,i.uint8array?new Uint8Array(I.length):new Array(I.length))})(_))),_):l.Promise.reject(new Error("Can't read the data of '"+h+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,o){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./signature"),l=r("./zipEntry"),c=r("./support");function d(u){this.files=[],this.loadOptions=u}d.prototype={checkSignature:function(u){if(!this.reader.readAndCheckSignature(u)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(m)+", expected "+s.pretty(u)+")")}},isSignature:function(u,m){var f=this.reader.index;this.reader.setIndex(u);var v=this.reader.readString(4)===m;return this.reader.setIndex(f),v},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 u=this.reader.readData(this.zipCommentLength),m=c.uint8array?"uint8array":"array",f=s.transformTo(m,u);this.zipComment=this.loadOptions.decodeFileName(f)},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 u,m,f,v=this.zip64EndOfCentralSize-44;0<v;)u=this.reader.readInt(2),m=this.reader.readInt(4),f=this.reader.readData(m),this.zip64ExtensibleData[u]={id:u,length:m,value:f}},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 u,m;for(u=0;u<this.files.length;u++)m=this.files[u],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var u;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(u=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(u);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 u=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(u<0)throw this.isSignature(0,a.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(u);var m=u;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(u=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(u),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.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(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var f=this.centralDirOffset+this.centralDirSize;this.zip64&&(f+=20,f+=12+this.zip64EndOfCentralSize);var v=m-f;if(0<v)this.isSignature(m,a.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(u){this.reader=i(u)},load:function(u){this.prepareReader(u),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,o){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./compressedObject"),l=r("./crc32"),c=r("./utf8"),d=r("./compressions"),u=r("./support");function m(f,v){this.options=f,this.loadOptions=v}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(f){var v,h;if(f.skip(22),this.fileNameLength=f.readInt(2),h=f.readInt(2),this.fileName=f.readData(this.fileNameLength),f.skip(h),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((v=(function(b){for(var g in d)if(Object.prototype.hasOwnProperty.call(d,g)&&d[g].magic===b)return d[g];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,v,f.readData(this.compressedSize))},readCentralPart:function(f){this.versionMadeBy=f.readInt(2),f.skip(2),this.bitFlag=f.readInt(2),this.compressionMethod=f.readString(2),this.date=f.readDate(),this.crc32=f.readInt(4),this.compressedSize=f.readInt(4),this.uncompressedSize=f.readInt(4);var v=f.readInt(2);if(this.extraFieldsLength=f.readInt(2),this.fileCommentLength=f.readInt(2),this.diskNumberStart=f.readInt(2),this.internalFileAttributes=f.readInt(2),this.externalFileAttributes=f.readInt(4),this.localHeaderOffset=f.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");f.skip(v),this.readExtraFields(f),this.parseZIP64ExtraField(f),this.fileComment=f.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var f=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var v,h,b,g=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4<g;)v=f.readInt(2),h=f.readInt(2),b=f.readData(h),this.extraFields[v]={id:v,length:h,value:b};f.setIndex(g)},handleUTF8:function(){var f=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var v=this.findExtraFieldUnicodePath();if(v!==null)this.fileNameStr=v;else{var h=s.transformTo(f,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var g=s.transformTo(f,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var f=this.extraFields[28789];if(f){var v=i(f.value);return v.readInt(1)!==1||l(this.fileName)!==v.readInt(4)?null:c.utf8decode(v.readData(f.length-5))}return null},findExtraFieldUnicodeComment:function(){var f=this.extraFields[25461];if(f){var v=i(f.value);return v.readInt(1)!==1||l(this.fileComment)!==v.readInt(4)?null:c.utf8decode(v.readData(f.length-5))}return null}},n.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,o){function i(v,h,b){this.name=v,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=h,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var s=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),l=r("./utf8"),c=r("./compressedObject"),d=r("./stream/GenericWorker");i.prototype={internalStream:function(v){var h=null,b="string";try{if(!v)throw new Error("No output type specified.");var g=(b=v.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),h=this._decompressWorker();var x=!this._dataBinary;x&&!g&&(h=h.pipe(new l.Utf8EncodeWorker)),!x&&g&&(h=h.pipe(new l.Utf8DecodeWorker))}catch(k){(h=new d("error")).error(k)}return new s(h,b,"")},async:function(v,h){return this.internalStream(v).accumulate(h)},nodeStream:function(v,h){return this.internalStream(v||"nodebuffer").toNodejsStream(h)},_compressWorker:function(v,h){if(this._data instanceof c&&this._data.compression.magic===v.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(b,v,h)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)i.prototype[u[f]]=m;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,o){(function(i){var s,a,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var c=0,d=new l(v),u=i.document.createTextNode("");d.observe(u,{characterData:!0}),s=function(){u.data=c=++c%2}}else if(i.setImmediate||i.MessageChannel===void 0)s="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var h=i.document.createElement("script");h.onreadystatechange=function(){v(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},i.document.documentElement.appendChild(h)}:function(){setTimeout(v,0)};else{var m=new i.MessageChannel;m.port1.onmessage=v,s=function(){m.port2.postMessage(0)}}var f=[];function v(){var h,b;a=!0;for(var g=f.length;g;){for(b=f,f=[],h=-1;++h<g;)b[h]();g=f.length}a=!1}n.exports=function(h){f.push(h)!==1||a||s()}}).call(this,typeof pt<"u"?pt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,o){var i=r("immediate");function s(){}var a={},l=["REJECTED"],c=["FULFILLED"],d=["PENDING"];function u(g){if(typeof g!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,g!==s&&h(this,g)}function m(g,x,k){this.promise=g,typeof x=="function"&&(this.onFulfilled=x,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function f(g,x,k){i(function(){var _;try{_=x(k)}catch(C){return a.reject(g,C)}_===g?a.reject(g,new TypeError("Cannot resolve promise with itself")):a.resolve(g,_)})}function v(g){var x=g&&g.then;if(g&&(typeof g=="object"||typeof g=="function")&&typeof x=="function")return function(){x.apply(g,arguments)}}function h(g,x){var k=!1;function _(A){k||(k=!0,a.reject(g,A))}function C(A){k||(k=!0,a.resolve(g,A))}var I=b(function(){x(C,_)});I.status==="error"&&_(I.value)}function b(g,x){var k={};try{k.value=g(x),k.status="success"}catch(_){k.status="error",k.value=_}return k}(n.exports=u).prototype.finally=function(g){if(typeof g!="function")return this;var x=this.constructor;return this.then(function(k){return x.resolve(g()).then(function(){return k})},function(k){return x.resolve(g()).then(function(){throw k})})},u.prototype.catch=function(g){return this.then(null,g)},u.prototype.then=function(g,x){if(typeof g!="function"&&this.state===c||typeof x!="function"&&this.state===l)return this;var k=new this.constructor(s);return this.state!==d?f(k,this.state===c?g:x,this.outcome):this.queue.push(new m(k,g,x)),k},m.prototype.callFulfilled=function(g){a.resolve(this.promise,g)},m.prototype.otherCallFulfilled=function(g){f(this.promise,this.onFulfilled,g)},m.prototype.callRejected=function(g){a.reject(this.promise,g)},m.prototype.otherCallRejected=function(g){f(this.promise,this.onRejected,g)},a.resolve=function(g,x){var k=b(v,x);if(k.status==="error")return a.reject(g,k.value);var _=k.value;if(_)h(g,_);else{g.state=c,g.outcome=x;for(var C=-1,I=g.queue.length;++C<I;)g.queue[C].callFulfilled(x)}return g},a.reject=function(g,x){g.state=l,g.outcome=x;for(var k=-1,_=g.queue.length;++k<_;)g.queue[k].callRejected(x);return g},u.resolve=function(g){return g instanceof this?g:a.resolve(new this(s),g)},u.reject=function(g){var x=new this(s);return a.reject(x,g)},u.all=function(g){var x=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=g.length,_=!1;if(!k)return this.resolve([]);for(var C=new Array(k),I=0,A=-1,D=new this(s);++A<k;)R(g[A],A);return D;function R(F,Y){x.resolve(F).then(function(N){C[Y]=N,++I!==k||_||(_=!0,a.resolve(D,C))},function(N){_||(_=!0,a.reject(D,N))})}},u.race=function(g){var x=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=g.length,_=!1;if(!k)return this.resolve([]);for(var C=-1,I=new this(s);++C<k;)A=g[C],x.resolve(A).then(function(D){_||(_=!0,a.resolve(I,D))},function(D){_||(_=!0,a.reject(I,D))});var A;return I}},{immediate:36}],38:[function(r,n,o){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,o){var i=r("./zlib/deflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/messages"),c=r("./zlib/zstream"),d=Object.prototype.toString,u=0,m=-1,f=0,v=8;function h(g){if(!(this instanceof h))return new h(g);this.options=s.assign({level:m,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},g||{});var x=this.options;x.raw&&0<x.windowBits?x.windowBits=-x.windowBits:x.gzip&&0<x.windowBits&&x.windowBits<16&&(x.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var k=i.deflateInit2(this.strm,x.level,x.method,x.windowBits,x.memLevel,x.strategy);if(k!==u)throw new Error(l[k]);if(x.header&&i.deflateSetHeader(this.strm,x.header),x.dictionary){var _;if(_=typeof x.dictionary=="string"?a.string2buf(x.dictionary):d.call(x.dictionary)==="[object ArrayBuffer]"?new Uint8Array(x.dictionary):x.dictionary,(k=i.deflateSetDictionary(this.strm,_))!==u)throw new Error(l[k]);this._dict_set=!0}}function b(g,x){var k=new h(x);if(k.push(g,!0),k.err)throw k.msg||l[k.err];return k.result}h.prototype.push=function(g,x){var k,_,C=this.strm,I=this.options.chunkSize;if(this.ended)return!1;_=x===~~x?x:x===!0?4:0,typeof g=="string"?C.input=a.string2buf(g):d.call(g)==="[object ArrayBuffer]"?C.input=new Uint8Array(g):C.input=g,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new s.Buf8(I),C.next_out=0,C.avail_out=I),(k=i.deflate(C,_))!==1&&k!==u)return this.onEnd(k),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf(C.output,C.next_out))):this.onData(s.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&k!==1);return _===4?(k=i.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===u):_!==2||(this.onEnd(u),!(C.avail_out=0))},h.prototype.onData=function(g){this.chunks.push(g)},h.prototype.onEnd=function(g){g===u&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},o.Deflate=h,o.deflate=b,o.deflateRaw=function(g,x){return(x=x||{}).raw=!0,b(g,x)},o.gzip=function(g,x){return(x=x||{}).gzip=!0,b(g,x)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,o){var i=r("./zlib/inflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/constants"),c=r("./zlib/messages"),d=r("./zlib/zstream"),u=r("./zlib/gzheader"),m=Object.prototype.toString;function f(h){if(!(this instanceof f))return new f(h);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},h||{});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)||h&&h.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 d,this.strm.avail_out=0;var g=i.inflateInit2(this.strm,b.windowBits);if(g!==l.Z_OK)throw new Error(c[g]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function v(h,b){var g=new f(b);if(g.push(h,!0),g.err)throw g.msg||c[g.err];return g.result}f.prototype.push=function(h,b){var g,x,k,_,C,I,A=this.strm,D=this.options.chunkSize,R=this.options.dictionary,F=!1;if(this.ended)return!1;x=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof h=="string"?A.input=a.binstring2buf(h):m.call(h)==="[object ArrayBuffer]"?A.input=new Uint8Array(h):A.input=h,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&&(A.output=new s.Buf8(D),A.next_out=0,A.avail_out=D),(g=i.inflate(A,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&R&&(I=typeof R=="string"?a.string2buf(R):m.call(R)==="[object ArrayBuffer]"?new Uint8Array(R):R,g=i.inflateSetDictionary(this.strm,I)),g===l.Z_BUF_ERROR&&F===!0&&(g=l.Z_OK,F=!1),g!==l.Z_STREAM_END&&g!==l.Z_OK)return this.onEnd(g),!(this.ended=!0);A.next_out&&(A.avail_out!==0&&g!==l.Z_STREAM_END&&(A.avail_in!==0||x!==l.Z_FINISH&&x!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=a.utf8border(A.output,A.next_out),_=A.next_out-k,C=a.buf2string(A.output,k),A.next_out=_,A.avail_out=D-_,_&&s.arraySet(A.output,A.output,k,_,0),this.onData(C)):this.onData(s.shrinkBuf(A.output,A.next_out)))),A.avail_in===0&&A.avail_out===0&&(F=!0)}while((0<A.avail_in||A.avail_out===0)&&g!==l.Z_STREAM_END);return g===l.Z_STREAM_END&&(x=l.Z_FINISH),x===l.Z_FINISH?(g=i.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===l.Z_OK):x!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(A.avail_out=0))},f.prototype.onData=function(h){this.chunks.push(h)},f.prototype.onEnd=function(h){h===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},o.Inflate=f,o.inflate=v,o.inflateRaw=function(h,b){return(b=b||{}).raw=!0,v(h,b)},o.ungzip=v},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,o){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var u in d)d.hasOwnProperty(u)&&(l[u]=d[u])}}return l},o.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var s={arraySet:function(l,c,d,u,m){if(c.subarray&&l.subarray)l.set(c.subarray(d,d+u),m);else for(var f=0;f<u;f++)l[m+f]=c[d+f]},flattenChunks:function(l){var c,d,u,m,f,v;for(c=u=0,d=l.length;c<d;c++)u+=l[c].length;for(v=new Uint8Array(u),c=m=0,d=l.length;c<d;c++)f=l[c],v.set(f,m),m+=f.length;return v}},a={arraySet:function(l,c,d,u,m){for(var f=0;f<u;f++)l[m+f]=c[d+f]},flattenChunks:function(l){return[].concat.apply([],l)}};o.setTyped=function(l){l?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,s)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,a))},o.setTyped(i)},{}],42:[function(r,n,o){var i=r("./common"),s=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new i.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function d(u,m){if(m<65537&&(u.subarray&&a||!u.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(u,m));for(var f="",v=0;v<m;v++)f+=String.fromCharCode(u[v]);return f}l[254]=l[254]=1,o.string2buf=function(u){var m,f,v,h,b,g=u.length,x=0;for(h=0;h<g;h++)(64512&(f=u.charCodeAt(h)))==55296&&h+1<g&&(64512&(v=u.charCodeAt(h+1)))==56320&&(f=65536+(f-55296<<10)+(v-56320),h++),x+=f<128?1:f<2048?2:f<65536?3:4;for(m=new i.Buf8(x),h=b=0;b<x;h++)(64512&(f=u.charCodeAt(h)))==55296&&h+1<g&&(64512&(v=u.charCodeAt(h+1)))==56320&&(f=65536+(f-55296<<10)+(v-56320),h++),f<128?m[b++]=f:(f<2048?m[b++]=192|f>>>6:(f<65536?m[b++]=224|f>>>12:(m[b++]=240|f>>>18,m[b++]=128|f>>>12&63),m[b++]=128|f>>>6&63),m[b++]=128|63&f);return m},o.buf2binstring=function(u){return d(u,u.length)},o.binstring2buf=function(u){for(var m=new i.Buf8(u.length),f=0,v=m.length;f<v;f++)m[f]=u.charCodeAt(f);return m},o.buf2string=function(u,m){var f,v,h,b,g=m||u.length,x=new Array(2*g);for(f=v=0;f<g;)if((h=u[f++])<128)x[v++]=h;else if(4<(b=l[h]))x[v++]=65533,f+=b-1;else{for(h&=b===2?31:b===3?15:7;1<b&&f<g;)h=h<<6|63&u[f++],b--;1<b?x[v++]=65533:h<65536?x[v++]=h:(h-=65536,x[v++]=55296|h>>10&1023,x[v++]=56320|1023&h)}return d(x,v)},o.utf8border=function(u,m){var f;for((m=m||u.length)>u.length&&(m=u.length),f=m-1;0<=f&&(192&u[f])==128;)f--;return f<0||f===0?m:f+l[u[f]]>m?f:m}},{"./common":41}],43:[function(r,n,o){n.exports=function(i,s,a,l){for(var c=65535&i|0,d=i>>>16&65535|0,u=0;a!==0;){for(a-=u=2e3<a?2e3:a;d=d+(c=c+s[l++]|0)|0,--u;);c%=65521,d%=65521}return c|d<<16|0}},{}],44:[function(r,n,o){n.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,n,o){var i=(function(){for(var s,a=[],l=0;l<256;l++){s=l;for(var c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;a[l]=s}return a})();n.exports=function(s,a,l,c){var d=i,u=c+l;s^=-1;for(var m=c;m<u;m++)s=s>>>8^d[255&(s^a[m])];return-1^s}},{}],46:[function(r,n,o){var i,s=r("../utils/common"),a=r("./trees"),l=r("./adler32"),c=r("./crc32"),d=r("./messages"),u=0,m=4,f=0,v=-2,h=-1,b=4,g=2,x=8,k=9,_=286,C=30,I=19,A=2*_+1,D=15,R=3,F=258,Y=F+R+1,N=42,M=113,y=1,B=2,te=3,U=4;function $(w,X){return w.msg=d[X],X}function Z(w){return(w<<1)-(4<w?9:0)}function ne(w){for(var X=w.length;0<=--X;)w[X]=0}function z(w){var X=w.state,H=X.pending;H>w.avail_out&&(H=w.avail_out),H!==0&&(s.arraySet(w.output,X.pending_buf,X.pending_out,H,w.next_out),w.next_out+=H,X.pending_out+=H,w.total_out+=H,w.avail_out-=H,X.pending-=H,X.pending===0&&(X.pending_out=0))}function L(w,X){a._tr_flush_block(w,0<=w.block_start?w.block_start:-1,w.strstart-w.block_start,X),w.block_start=w.strstart,z(w.strm)}function K(w,X){w.pending_buf[w.pending++]=X}function q(w,X){w.pending_buf[w.pending++]=X>>>8&255,w.pending_buf[w.pending++]=255&X}function ee(w,X){var H,T,S=w.max_chain_length,P=w.strstart,W=w.prev_length,G=w.nice_match,O=w.strstart>w.w_size-Y?w.strstart-(w.w_size-Y):0,V=w.window,J=w.w_mask,Q=w.prev,se=w.strstart+F,pe=V[P+W-1],he=V[P+W];w.prev_length>=w.good_match&&(S>>=2),G>w.lookahead&&(G=w.lookahead);do if(V[(H=X)+W]===he&&V[H+W-1]===pe&&V[H]===V[P]&&V[++H]===V[P+1]){P+=2,H++;do;while(V[++P]===V[++H]&&V[++P]===V[++H]&&V[++P]===V[++H]&&V[++P]===V[++H]&&V[++P]===V[++H]&&V[++P]===V[++H]&&V[++P]===V[++H]&&V[++P]===V[++H]&&P<se);if(T=F-(se-P),P=se-F,W<T){if(w.match_start=X,G<=(W=T))break;pe=V[P+W-1],he=V[P+W]}}while((X=Q[X&J])>O&&--S!=0);return W<=w.lookahead?W:w.lookahead}function ue(w){var X,H,T,S,P,W,G,O,V,J,Q=w.w_size;do{if(S=w.window_size-w.lookahead-w.strstart,w.strstart>=Q+(Q-Y)){for(s.arraySet(w.window,w.window,Q,Q,0),w.match_start-=Q,w.strstart-=Q,w.block_start-=Q,X=H=w.hash_size;T=w.head[--X],w.head[X]=Q<=T?T-Q:0,--H;);for(X=H=Q;T=w.prev[--X],w.prev[X]=Q<=T?T-Q:0,--H;);S+=Q}if(w.strm.avail_in===0)break;if(W=w.strm,G=w.window,O=w.strstart+w.lookahead,V=S,J=void 0,J=W.avail_in,V<J&&(J=V),H=J===0?0:(W.avail_in-=J,s.arraySet(G,W.input,W.next_in,J,O),W.state.wrap===1?W.adler=l(W.adler,G,J,O):W.state.wrap===2&&(W.adler=c(W.adler,G,J,O)),W.next_in+=J,W.total_in+=J,J),w.lookahead+=H,w.lookahead+w.insert>=R)for(P=w.strstart-w.insert,w.ins_h=w.window[P],w.ins_h=(w.ins_h<<w.hash_shift^w.window[P+1])&w.hash_mask;w.insert&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[P+R-1])&w.hash_mask,w.prev[P&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=P,P++,w.insert--,!(w.lookahead+w.insert<R)););}while(w.lookahead<Y&&w.strm.avail_in!==0)}function re(w,X){for(var H,T;;){if(w.lookahead<Y){if(ue(w),w.lookahead<Y&&X===u)return y;if(w.lookahead===0)break}if(H=0,w.lookahead>=R&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+R-1])&w.hash_mask,H=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),H!==0&&w.strstart-H<=w.w_size-Y&&(w.match_length=ee(w,H)),w.match_length>=R)if(T=a._tr_tally(w,w.strstart-w.match_start,w.match_length-R),w.lookahead-=w.match_length,w.match_length<=w.max_lazy_match&&w.lookahead>=R){for(w.match_length--;w.strstart++,w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+R-1])&w.hash_mask,H=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart,--w.match_length!=0;);w.strstart++}else w.strstart+=w.match_length,w.match_length=0,w.ins_h=w.window[w.strstart],w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+1])&w.hash_mask;else T=a._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++;if(T&&(L(w,!1),w.strm.avail_out===0))return y}return w.insert=w.strstart<R-1?w.strstart:R-1,X===m?(L(w,!0),w.strm.avail_out===0?te:U):w.last_lit&&(L(w,!1),w.strm.avail_out===0)?y:B}function ie(w,X){for(var H,T,S;;){if(w.lookahead<Y){if(ue(w),w.lookahead<Y&&X===u)return y;if(w.lookahead===0)break}if(H=0,w.lookahead>=R&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+R-1])&w.hash_mask,H=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),w.prev_length=w.match_length,w.prev_match=w.match_start,w.match_length=R-1,H!==0&&w.prev_length<w.max_lazy_match&&w.strstart-H<=w.w_size-Y&&(w.match_length=ee(w,H),w.match_length<=5&&(w.strategy===1||w.match_length===R&&4096<w.strstart-w.match_start)&&(w.match_length=R-1)),w.prev_length>=R&&w.match_length<=w.prev_length){for(S=w.strstart+w.lookahead-R,T=a._tr_tally(w,w.strstart-1-w.prev_match,w.prev_length-R),w.lookahead-=w.prev_length-1,w.prev_length-=2;++w.strstart<=S&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+R-1])&w.hash_mask,H=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),--w.prev_length!=0;);if(w.match_available=0,w.match_length=R-1,w.strstart++,T&&(L(w,!1),w.strm.avail_out===0))return y}else if(w.match_available){if((T=a._tr_tally(w,0,w.window[w.strstart-1]))&&L(w,!1),w.strstart++,w.lookahead--,w.strm.avail_out===0)return y}else w.match_available=1,w.strstart++,w.lookahead--}return w.match_available&&(T=a._tr_tally(w,0,w.window[w.strstart-1]),w.match_available=0),w.insert=w.strstart<R-1?w.strstart:R-1,X===m?(L(w,!0),w.strm.avail_out===0?te:U):w.last_lit&&(L(w,!1),w.strm.avail_out===0)?y:B}function ae(w,X,H,T,S){this.good_length=w,this.max_lazy=X,this.nice_length=H,this.max_chain=T,this.func=S}function oe(){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=x,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 s.Buf16(2*A),this.dyn_dtree=new s.Buf16(2*(2*C+1)),this.bl_tree=new s.Buf16(2*(2*I+1)),ne(this.dyn_ltree),ne(this.dyn_dtree),ne(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(D+1),this.heap=new s.Buf16(2*_+1),ne(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*_+1),ne(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 le(w){var X;return w&&w.state?(w.total_in=w.total_out=0,w.data_type=g,(X=w.state).pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap?N:M,w.adler=X.wrap===2?0:1,X.last_flush=u,a._tr_init(X),f):$(w,v)}function fe(w){var X=le(w);return X===f&&(function(H){H.window_size=2*H.w_size,ne(H.head),H.max_lazy_match=i[H.level].max_lazy,H.good_match=i[H.level].good_length,H.nice_match=i[H.level].nice_length,H.max_chain_length=i[H.level].max_chain,H.strstart=0,H.block_start=0,H.lookahead=0,H.insert=0,H.match_length=H.prev_length=R-1,H.match_available=0,H.ins_h=0})(w.state),X}function ve(w,X,H,T,S,P){if(!w)return v;var W=1;if(X===h&&(X=6),T<0?(W=0,T=-T):15<T&&(W=2,T-=16),S<1||k<S||H!==x||T<8||15<T||X<0||9<X||P<0||b<P)return $(w,v);T===8&&(T=9);var G=new oe;return(w.state=G).strm=w,G.wrap=W,G.gzhead=null,G.w_bits=T,G.w_size=1<<G.w_bits,G.w_mask=G.w_size-1,G.hash_bits=S+7,G.hash_size=1<<G.hash_bits,G.hash_mask=G.hash_size-1,G.hash_shift=~~((G.hash_bits+R-1)/R),G.window=new s.Buf8(2*G.w_size),G.head=new s.Buf16(G.hash_size),G.prev=new s.Buf16(G.w_size),G.lit_bufsize=1<<S+6,G.pending_buf_size=4*G.lit_bufsize,G.pending_buf=new s.Buf8(G.pending_buf_size),G.d_buf=1*G.lit_bufsize,G.l_buf=3*G.lit_bufsize,G.level=X,G.strategy=P,G.method=H,fe(w)}i=[new ae(0,0,0,0,function(w,X){var H=65535;for(H>w.pending_buf_size-5&&(H=w.pending_buf_size-5);;){if(w.lookahead<=1){if(ue(w),w.lookahead===0&&X===u)return y;if(w.lookahead===0)break}w.strstart+=w.lookahead,w.lookahead=0;var T=w.block_start+H;if((w.strstart===0||w.strstart>=T)&&(w.lookahead=w.strstart-T,w.strstart=T,L(w,!1),w.strm.avail_out===0)||w.strstart-w.block_start>=w.w_size-Y&&(L(w,!1),w.strm.avail_out===0))return y}return w.insert=0,X===m?(L(w,!0),w.strm.avail_out===0?te:U):(w.strstart>w.block_start&&(L(w,!1),w.strm.avail_out),y)}),new ae(4,4,8,4,re),new ae(4,5,16,8,re),new ae(4,6,32,32,re),new ae(4,4,16,16,ie),new ae(8,16,32,32,ie),new ae(8,16,128,128,ie),new ae(8,32,128,256,ie),new ae(32,128,258,1024,ie),new ae(32,258,258,4096,ie)],o.deflateInit=function(w,X){return ve(w,X,x,15,8,0)},o.deflateInit2=ve,o.deflateReset=fe,o.deflateResetKeep=le,o.deflateSetHeader=function(w,X){return w&&w.state?w.state.wrap!==2?v:(w.state.gzhead=X,f):v},o.deflate=function(w,X){var H,T,S,P;if(!w||!w.state||5<X||X<0)return w?$(w,v):v;if(T=w.state,!w.output||!w.input&&w.avail_in!==0||T.status===666&&X!==m)return $(w,w.avail_out===0?-5:v);if(T.strm=w,H=T.last_flush,T.last_flush=X,T.status===N)if(T.wrap===2)w.adler=0,K(T,31),K(T,139),K(T,8),T.gzhead?(K(T,(T.gzhead.text?1:0)+(T.gzhead.hcrc?2:0)+(T.gzhead.extra?4:0)+(T.gzhead.name?8:0)+(T.gzhead.comment?16:0)),K(T,255&T.gzhead.time),K(T,T.gzhead.time>>8&255),K(T,T.gzhead.time>>16&255),K(T,T.gzhead.time>>24&255),K(T,T.level===9?2:2<=T.strategy||T.level<2?4:0),K(T,255&T.gzhead.os),T.gzhead.extra&&T.gzhead.extra.length&&(K(T,255&T.gzhead.extra.length),K(T,T.gzhead.extra.length>>8&255)),T.gzhead.hcrc&&(w.adler=c(w.adler,T.pending_buf,T.pending,0)),T.gzindex=0,T.status=69):(K(T,0),K(T,0),K(T,0),K(T,0),K(T,0),K(T,T.level===9?2:2<=T.strategy||T.level<2?4:0),K(T,3),T.status=M);else{var W=x+(T.w_bits-8<<4)<<8;W|=(2<=T.strategy||T.level<2?0:T.level<6?1:T.level===6?2:3)<<6,T.strstart!==0&&(W|=32),W+=31-W%31,T.status=M,q(T,W),T.strstart!==0&&(q(T,w.adler>>>16),q(T,65535&w.adler)),w.adler=1}if(T.status===69)if(T.gzhead.extra){for(S=T.pending;T.gzindex<(65535&T.gzhead.extra.length)&&(T.pending!==T.pending_buf_size||(T.gzhead.hcrc&&T.pending>S&&(w.adler=c(w.adler,T.pending_buf,T.pending-S,S)),z(w),S=T.pending,T.pending!==T.pending_buf_size));)K(T,255&T.gzhead.extra[T.gzindex]),T.gzindex++;T.gzhead.hcrc&&T.pending>S&&(w.adler=c(w.adler,T.pending_buf,T.pending-S,S)),T.gzindex===T.gzhead.extra.length&&(T.gzindex=0,T.status=73)}else T.status=73;if(T.status===73)if(T.gzhead.name){S=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>S&&(w.adler=c(w.adler,T.pending_buf,T.pending-S,S)),z(w),S=T.pending,T.pending===T.pending_buf_size)){P=1;break}P=T.gzindex<T.gzhead.name.length?255&T.gzhead.name.charCodeAt(T.gzindex++):0,K(T,P)}while(P!==0);T.gzhead.hcrc&&T.pending>S&&(w.adler=c(w.adler,T.pending_buf,T.pending-S,S)),P===0&&(T.gzindex=0,T.status=91)}else T.status=91;if(T.status===91)if(T.gzhead.comment){S=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>S&&(w.adler=c(w.adler,T.pending_buf,T.pending-S,S)),z(w),S=T.pending,T.pending===T.pending_buf_size)){P=1;break}P=T.gzindex<T.gzhead.comment.length?255&T.gzhead.comment.charCodeAt(T.gzindex++):0,K(T,P)}while(P!==0);T.gzhead.hcrc&&T.pending>S&&(w.adler=c(w.adler,T.pending_buf,T.pending-S,S)),P===0&&(T.status=103)}else T.status=103;if(T.status===103&&(T.gzhead.hcrc?(T.pending+2>T.pending_buf_size&&z(w),T.pending+2<=T.pending_buf_size&&(K(T,255&w.adler),K(T,w.adler>>8&255),w.adler=0,T.status=M)):T.status=M),T.pending!==0){if(z(w),w.avail_out===0)return T.last_flush=-1,f}else if(w.avail_in===0&&Z(X)<=Z(H)&&X!==m)return $(w,-5);if(T.status===666&&w.avail_in!==0)return $(w,-5);if(w.avail_in!==0||T.lookahead!==0||X!==u&&T.status!==666){var G=T.strategy===2?(function(O,V){for(var J;;){if(O.lookahead===0&&(ue(O),O.lookahead===0)){if(V===u)return y;break}if(O.match_length=0,J=a._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++,J&&(L(O,!1),O.strm.avail_out===0))return y}return O.insert=0,V===m?(L(O,!0),O.strm.avail_out===0?te:U):O.last_lit&&(L(O,!1),O.strm.avail_out===0)?y:B})(T,X):T.strategy===3?(function(O,V){for(var J,Q,se,pe,he=O.window;;){if(O.lookahead<=F){if(ue(O),O.lookahead<=F&&V===u)return y;if(O.lookahead===0)break}if(O.match_length=0,O.lookahead>=R&&0<O.strstart&&(Q=he[se=O.strstart-1])===he[++se]&&Q===he[++se]&&Q===he[++se]){pe=O.strstart+F;do;while(Q===he[++se]&&Q===he[++se]&&Q===he[++se]&&Q===he[++se]&&Q===he[++se]&&Q===he[++se]&&Q===he[++se]&&Q===he[++se]&&se<pe);O.match_length=F-(pe-se),O.match_length>O.lookahead&&(O.match_length=O.lookahead)}if(O.match_length>=R?(J=a._tr_tally(O,1,O.match_length-R),O.lookahead-=O.match_length,O.strstart+=O.match_length,O.match_length=0):(J=a._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++),J&&(L(O,!1),O.strm.avail_out===0))return y}return O.insert=0,V===m?(L(O,!0),O.strm.avail_out===0?te:U):O.last_lit&&(L(O,!1),O.strm.avail_out===0)?y:B})(T,X):i[T.level].func(T,X);if(G!==te&&G!==U||(T.status=666),G===y||G===te)return w.avail_out===0&&(T.last_flush=-1),f;if(G===B&&(X===1?a._tr_align(T):X!==5&&(a._tr_stored_block(T,0,0,!1),X===3&&(ne(T.head),T.lookahead===0&&(T.strstart=0,T.block_start=0,T.insert=0))),z(w),w.avail_out===0))return T.last_flush=-1,f}return X!==m?f:T.wrap<=0?1:(T.wrap===2?(K(T,255&w.adler),K(T,w.adler>>8&255),K(T,w.adler>>16&255),K(T,w.adler>>24&255),K(T,255&w.total_in),K(T,w.total_in>>8&255),K(T,w.total_in>>16&255),K(T,w.total_in>>24&255)):(q(T,w.adler>>>16),q(T,65535&w.adler)),z(w),0<T.wrap&&(T.wrap=-T.wrap),T.pending!==0?f:1)},o.deflateEnd=function(w){var X;return w&&w.state?(X=w.state.status)!==N&&X!==69&&X!==73&&X!==91&&X!==103&&X!==M&&X!==666?$(w,v):(w.state=null,X===M?$(w,-3):f):v},o.deflateSetDictionary=function(w,X){var H,T,S,P,W,G,O,V,J=X.length;if(!w||!w.state||(P=(H=w.state).wrap)===2||P===1&&H.status!==N||H.lookahead)return v;for(P===1&&(w.adler=l(w.adler,X,J,0)),H.wrap=0,J>=H.w_size&&(P===0&&(ne(H.head),H.strstart=0,H.block_start=0,H.insert=0),V=new s.Buf8(H.w_size),s.arraySet(V,X,J-H.w_size,H.w_size,0),X=V,J=H.w_size),W=w.avail_in,G=w.next_in,O=w.input,w.avail_in=J,w.next_in=0,w.input=X,ue(H);H.lookahead>=R;){for(T=H.strstart,S=H.lookahead-(R-1);H.ins_h=(H.ins_h<<H.hash_shift^H.window[T+R-1])&H.hash_mask,H.prev[T&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=T,T++,--S;);H.strstart=T,H.lookahead=R-1,ue(H)}return H.strstart+=H.lookahead,H.block_start=H.strstart,H.insert=H.lookahead,H.lookahead=0,H.match_length=H.prev_length=R-1,H.match_available=0,w.next_in=G,w.input=O,w.avail_in=W,H.wrap=P,f},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,o){n.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,n,o){n.exports=function(i,s){var a,l,c,d,u,m,f,v,h,b,g,x,k,_,C,I,A,D,R,F,Y,N,M,y,B;a=i.state,l=i.next_in,y=i.input,c=l+(i.avail_in-5),d=i.next_out,B=i.output,u=d-(s-i.avail_out),m=d+(i.avail_out-257),f=a.dmax,v=a.wsize,h=a.whave,b=a.wnext,g=a.window,x=a.hold,k=a.bits,_=a.lencode,C=a.distcode,I=(1<<a.lenbits)-1,A=(1<<a.distbits)-1;e:do{k<15&&(x+=y[l++]<<k,k+=8,x+=y[l++]<<k,k+=8),D=_[x&I];t:for(;;){if(x>>>=R=D>>>24,k-=R,(R=D>>>16&255)===0)B[d++]=65535&D;else{if(!(16&R)){if((64&R)==0){D=_[(65535&D)+(x&(1<<R)-1)];continue t}if(32&R){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}F=65535&D,(R&=15)&&(k<R&&(x+=y[l++]<<k,k+=8),F+=x&(1<<R)-1,x>>>=R,k-=R),k<15&&(x+=y[l++]<<k,k+=8,x+=y[l++]<<k,k+=8),D=C[x&A];r:for(;;){if(x>>>=R=D>>>24,k-=R,!(16&(R=D>>>16&255))){if((64&R)==0){D=C[(65535&D)+(x&(1<<R)-1)];continue r}i.msg="invalid distance code",a.mode=30;break e}if(Y=65535&D,k<(R&=15)&&(x+=y[l++]<<k,(k+=8)<R&&(x+=y[l++]<<k,k+=8)),f<(Y+=x&(1<<R)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(x>>>=R,k-=R,(R=d-u)<Y){if(h<(R=Y-R)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(M=g,(N=0)===b){if(N+=v-R,R<F){for(F-=R;B[d++]=g[N++],--R;);N=d-Y,M=B}}else if(b<R){if(N+=v+b-R,(R-=b)<F){for(F-=R;B[d++]=g[N++],--R;);if(N=0,b<F){for(F-=R=b;B[d++]=g[N++],--R;);N=d-Y,M=B}}}else if(N+=b-R,R<F){for(F-=R;B[d++]=g[N++],--R;);N=d-Y,M=B}for(;2<F;)B[d++]=M[N++],B[d++]=M[N++],B[d++]=M[N++],F-=3;F&&(B[d++]=M[N++],1<F&&(B[d++]=M[N++]))}else{for(N=d-Y;B[d++]=B[N++],B[d++]=B[N++],B[d++]=B[N++],2<(F-=3););F&&(B[d++]=B[N++],1<F&&(B[d++]=B[N++]))}break}}break}}while(l<c&&d<m);l-=F=k>>3,x&=(1<<(k-=F<<3))-1,i.next_in=l,i.next_out=d,i.avail_in=l<c?c-l+5:5-(l-c),i.avail_out=d<m?m-d+257:257-(d-m),a.hold=x,a.bits=k}},{}],49:[function(r,n,o){var i=r("../utils/common"),s=r("./adler32"),a=r("./crc32"),l=r("./inffast"),c=r("./inftrees"),d=1,u=2,m=0,f=-2,v=1,h=852,b=592;function g(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function x(){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 k(N){var M;return N&&N.state?(M=N.state,N.total_in=N.total_out=M.total=0,N.msg="",M.wrap&&(N.adler=1&M.wrap),M.mode=v,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(h),M.distcode=M.distdyn=new i.Buf32(b),M.sane=1,M.back=-1,m):f}function _(N){var M;return N&&N.state?((M=N.state).wsize=0,M.whave=0,M.wnext=0,k(N)):f}function C(N,M){var y,B;return N&&N.state?(B=N.state,M<0?(y=0,M=-M):(y=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15<M)?f:(B.window!==null&&B.wbits!==M&&(B.window=null),B.wrap=y,B.wbits=M,_(N))):f}function I(N,M){var y,B;return N?(B=new x,(N.state=B).window=null,(y=C(N,M))!==m&&(N.state=null),y):f}var A,D,R=!0;function F(N){if(R){var M;for(A=new i.Buf32(512),D=new i.Buf32(32),M=0;M<144;)N.lens[M++]=8;for(;M<256;)N.lens[M++]=9;for(;M<280;)N.lens[M++]=7;for(;M<288;)N.lens[M++]=8;for(c(d,N.lens,0,288,A,0,N.work,{bits:9}),M=0;M<32;)N.lens[M++]=5;c(u,N.lens,0,32,D,0,N.work,{bits:5}),R=!1}N.lencode=A,N.lenbits=9,N.distcode=D,N.distbits=5}function Y(N,M,y,B){var te,U=N.state;return U.window===null&&(U.wsize=1<<U.wbits,U.wnext=0,U.whave=0,U.window=new i.Buf8(U.wsize)),B>=U.wsize?(i.arraySet(U.window,M,y-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(B<(te=U.wsize-U.wnext)&&(te=B),i.arraySet(U.window,M,y-B,te,U.wnext),(B-=te)?(i.arraySet(U.window,M,y-B,B,0),U.wnext=B,U.whave=U.wsize):(U.wnext+=te,U.wnext===U.wsize&&(U.wnext=0),U.whave<U.wsize&&(U.whave+=te))),0}o.inflateReset=_,o.inflateReset2=C,o.inflateResetKeep=k,o.inflateInit=function(N){return I(N,15)},o.inflateInit2=I,o.inflate=function(N,M){var y,B,te,U,$,Z,ne,z,L,K,q,ee,ue,re,ie,ae,oe,le,fe,ve,w,X,H,T,S=0,P=new i.Buf8(4),W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return f;(y=N.state).mode===12&&(y.mode=13),$=N.next_out,te=N.output,ne=N.avail_out,U=N.next_in,B=N.input,Z=N.avail_in,z=y.hold,L=y.bits,K=Z,q=ne,X=m;e:for(;;)switch(y.mode){case v:if(y.wrap===0){y.mode=13;break}for(;L<16;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if(2&y.wrap&&z===35615){P[y.check=0]=255&z,P[1]=z>>>8&255,y.check=a(y.check,P,2,0),L=z=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&z)<<8)+(z>>8))%31){N.msg="incorrect header check",y.mode=30;break}if((15&z)!=8){N.msg="unknown compression method",y.mode=30;break}if(L-=4,w=8+(15&(z>>>=4)),y.wbits===0)y.wbits=w;else if(w>y.wbits){N.msg="invalid window size",y.mode=30;break}y.dmax=1<<w,N.adler=y.check=1,y.mode=512&z?10:12,L=z=0;break;case 2:for(;L<16;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if(y.flags=z,(255&y.flags)!=8){N.msg="unknown compression method",y.mode=30;break}if(57344&y.flags){N.msg="unknown header flags set",y.mode=30;break}y.head&&(y.head.text=z>>8&1),512&y.flags&&(P[0]=255&z,P[1]=z>>>8&255,y.check=a(y.check,P,2,0)),L=z=0,y.mode=3;case 3:for(;L<32;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}y.head&&(y.head.time=z),512&y.flags&&(P[0]=255&z,P[1]=z>>>8&255,P[2]=z>>>16&255,P[3]=z>>>24&255,y.check=a(y.check,P,4,0)),L=z=0,y.mode=4;case 4:for(;L<16;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}y.head&&(y.head.xflags=255&z,y.head.os=z>>8),512&y.flags&&(P[0]=255&z,P[1]=z>>>8&255,y.check=a(y.check,P,2,0)),L=z=0,y.mode=5;case 5:if(1024&y.flags){for(;L<16;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}y.length=z,y.head&&(y.head.extra_len=z),512&y.flags&&(P[0]=255&z,P[1]=z>>>8&255,y.check=a(y.check,P,2,0)),L=z=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&(Z<(ee=y.length)&&(ee=Z),ee&&(y.head&&(w=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),i.arraySet(y.head.extra,B,U,ee,w)),512&y.flags&&(y.check=a(y.check,B,ee,U)),Z-=ee,U+=ee,y.length-=ee),y.length))break e;y.length=0,y.mode=7;case 7:if(2048&y.flags){if(Z===0)break e;for(ee=0;w=B[U+ee++],y.head&&w&&y.length<65536&&(y.head.name+=String.fromCharCode(w)),w&&ee<Z;);if(512&y.flags&&(y.check=a(y.check,B,ee,U)),Z-=ee,U+=ee,w)break e}else y.head&&(y.head.name=null);y.length=0,y.mode=8;case 8:if(4096&y.flags){if(Z===0)break e;for(ee=0;w=B[U+ee++],y.head&&w&&y.length<65536&&(y.head.comment+=String.fromCharCode(w)),w&&ee<Z;);if(512&y.flags&&(y.check=a(y.check,B,ee,U)),Z-=ee,U+=ee,w)break e}else y.head&&(y.head.comment=null);y.mode=9;case 9:if(512&y.flags){for(;L<16;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if(z!==(65535&y.check)){N.msg="header crc mismatch",y.mode=30;break}L=z=0}y.head&&(y.head.hcrc=y.flags>>9&1,y.head.done=!0),N.adler=y.check=0,y.mode=12;break;case 10:for(;L<32;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}N.adler=y.check=g(z),L=z=0,y.mode=11;case 11:if(y.havedict===0)return N.next_out=$,N.avail_out=ne,N.next_in=U,N.avail_in=Z,y.hold=z,y.bits=L,2;N.adler=y.check=1,y.mode=12;case 12:if(M===5||M===6)break e;case 13:if(y.last){z>>>=7&L,L-=7&L,y.mode=27;break}for(;L<3;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}switch(y.last=1&z,L-=1,3&(z>>>=1)){case 0:y.mode=14;break;case 1:if(F(y),y.mode=20,M!==6)break;z>>>=2,L-=2;break e;case 2:y.mode=17;break;case 3:N.msg="invalid block type",y.mode=30}z>>>=2,L-=2;break;case 14:for(z>>>=7&L,L-=7&L;L<32;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if((65535&z)!=(z>>>16^65535)){N.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&z,L=z=0,y.mode=15,M===6)break e;case 15:y.mode=16;case 16:if(ee=y.length){if(Z<ee&&(ee=Z),ne<ee&&(ee=ne),ee===0)break e;i.arraySet(te,B,U,ee,$),Z-=ee,U+=ee,ne-=ee,$+=ee,y.length-=ee;break}y.mode=12;break;case 17:for(;L<14;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if(y.nlen=257+(31&z),z>>>=5,L-=5,y.ndist=1+(31&z),z>>>=5,L-=5,y.ncode=4+(15&z),z>>>=4,L-=4,286<y.nlen||30<y.ndist){N.msg="too many length or distance symbols",y.mode=30;break}y.have=0,y.mode=18;case 18:for(;y.have<y.ncode;){for(;L<3;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}y.lens[W[y.have++]]=7&z,z>>>=3,L-=3}for(;y.have<19;)y.lens[W[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,H={bits:y.lenbits},X=c(0,y.lens,0,19,y.lencode,0,y.work,H),y.lenbits=H.bits,X){N.msg="invalid code lengths set",y.mode=30;break}y.have=0,y.mode=19;case 19:for(;y.have<y.nlen+y.ndist;){for(;ae=(S=y.lencode[z&(1<<y.lenbits)-1])>>>16&255,oe=65535&S,!((ie=S>>>24)<=L);){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if(oe<16)z>>>=ie,L-=ie,y.lens[y.have++]=oe;else{if(oe===16){for(T=ie+2;L<T;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if(z>>>=ie,L-=ie,y.have===0){N.msg="invalid bit length repeat",y.mode=30;break}w=y.lens[y.have-1],ee=3+(3&z),z>>>=2,L-=2}else if(oe===17){for(T=ie+3;L<T;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}L-=ie,w=0,ee=3+(7&(z>>>=ie)),z>>>=3,L-=3}else{for(T=ie+7;L<T;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}L-=ie,w=0,ee=11+(127&(z>>>=ie)),z>>>=7,L-=7}if(y.have+ee>y.nlen+y.ndist){N.msg="invalid bit length repeat",y.mode=30;break}for(;ee--;)y.lens[y.have++]=w}}if(y.mode===30)break;if(y.lens[256]===0){N.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,H={bits:y.lenbits},X=c(d,y.lens,0,y.nlen,y.lencode,0,y.work,H),y.lenbits=H.bits,X){N.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,H={bits:y.distbits},X=c(u,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,H),y.distbits=H.bits,X){N.msg="invalid distances set",y.mode=30;break}if(y.mode=20,M===6)break e;case 20:y.mode=21;case 21:if(6<=Z&&258<=ne){N.next_out=$,N.avail_out=ne,N.next_in=U,N.avail_in=Z,y.hold=z,y.bits=L,l(N,q),$=N.next_out,te=N.output,ne=N.avail_out,U=N.next_in,B=N.input,Z=N.avail_in,z=y.hold,L=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;ae=(S=y.lencode[z&(1<<y.lenbits)-1])>>>16&255,oe=65535&S,!((ie=S>>>24)<=L);){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if(ae&&(240&ae)==0){for(le=ie,fe=ae,ve=oe;ae=(S=y.lencode[ve+((z&(1<<le+fe)-1)>>le)])>>>16&255,oe=65535&S,!(le+(ie=S>>>24)<=L);){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}z>>>=le,L-=le,y.back+=le}if(z>>>=ie,L-=ie,y.back+=ie,y.length=oe,ae===0){y.mode=26;break}if(32&ae){y.back=-1,y.mode=12;break}if(64&ae){N.msg="invalid literal/length code",y.mode=30;break}y.extra=15&ae,y.mode=22;case 22:if(y.extra){for(T=y.extra;L<T;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}y.length+=z&(1<<y.extra)-1,z>>>=y.extra,L-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;ae=(S=y.distcode[z&(1<<y.distbits)-1])>>>16&255,oe=65535&S,!((ie=S>>>24)<=L);){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if((240&ae)==0){for(le=ie,fe=ae,ve=oe;ae=(S=y.distcode[ve+((z&(1<<le+fe)-1)>>le)])>>>16&255,oe=65535&S,!(le+(ie=S>>>24)<=L);){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}z>>>=le,L-=le,y.back+=le}if(z>>>=ie,L-=ie,y.back+=ie,64&ae){N.msg="invalid distance code",y.mode=30;break}y.offset=oe,y.extra=15&ae,y.mode=24;case 24:if(y.extra){for(T=y.extra;L<T;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}y.offset+=z&(1<<y.extra)-1,z>>>=y.extra,L-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){N.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(ne===0)break e;if(ee=q-ne,y.offset>ee){if((ee=y.offset-ee)>y.whave&&y.sane){N.msg="invalid distance too far back",y.mode=30;break}ue=ee>y.wnext?(ee-=y.wnext,y.wsize-ee):y.wnext-ee,ee>y.length&&(ee=y.length),re=y.window}else re=te,ue=$-y.offset,ee=y.length;for(ne<ee&&(ee=ne),ne-=ee,y.length-=ee;te[$++]=re[ue++],--ee;);y.length===0&&(y.mode=21);break;case 26:if(ne===0)break e;te[$++]=y.length,ne--,y.mode=21;break;case 27:if(y.wrap){for(;L<32;){if(Z===0)break e;Z--,z|=B[U++]<<L,L+=8}if(q-=ne,N.total_out+=q,y.total+=q,q&&(N.adler=y.check=y.flags?a(y.check,te,q,$-q):s(y.check,te,q,$-q)),q=ne,(y.flags?z:g(z))!==y.check){N.msg="incorrect data check",y.mode=30;break}L=z=0}y.mode=28;case 28:if(y.wrap&&y.flags){for(;L<32;){if(Z===0)break e;Z--,z+=B[U++]<<L,L+=8}if(z!==(4294967295&y.total)){N.msg="incorrect length check",y.mode=30;break}L=z=0}y.mode=29;case 29:X=1;break e;case 30:X=-3;break e;case 31:return-4;case 32:default:return f}return N.next_out=$,N.avail_out=ne,N.next_in=U,N.avail_in=Z,y.hold=z,y.bits=L,(y.wsize||q!==N.avail_out&&y.mode<30&&(y.mode<27||M!==4))&&Y(N,N.output,N.next_out,q-N.avail_out)?(y.mode=31,-4):(K-=N.avail_in,q-=N.avail_out,N.total_in+=K,N.total_out+=q,y.total+=q,y.wrap&&q&&(N.adler=y.check=y.flags?a(y.check,te,q,N.next_out-q):s(y.check,te,q,N.next_out-q)),N.data_type=y.bits+(y.last?64:0)+(y.mode===12?128:0)+(y.mode===20||y.mode===15?256:0),(K==0&&q===0||M===4)&&X===m&&(X=-5),X)},o.inflateEnd=function(N){if(!N||!N.state)return f;var M=N.state;return M.window&&(M.window=null),N.state=null,m},o.inflateGetHeader=function(N,M){var y;return N&&N.state?(2&(y=N.state).wrap)==0?f:((y.head=M).done=!1,m):f},o.inflateSetDictionary=function(N,M){var y,B=M.length;return N&&N.state?(y=N.state).wrap!==0&&y.mode!==11?f:y.mode===11&&s(1,M,B,0)!==y.check?-3:Y(N,M,B,B)?(y.mode=31,-4):(y.havedict=1,m):f},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,o){var i=r("../utils/common"),s=[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],a=[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],c=[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];n.exports=function(d,u,m,f,v,h,b,g){var x,k,_,C,I,A,D,R,F,Y=g.bits,N=0,M=0,y=0,B=0,te=0,U=0,$=0,Z=0,ne=0,z=0,L=null,K=0,q=new i.Buf16(16),ee=new i.Buf16(16),ue=null,re=0;for(N=0;N<=15;N++)q[N]=0;for(M=0;M<f;M++)q[u[m+M]]++;for(te=Y,B=15;1<=B&&q[B]===0;B--);if(B<te&&(te=B),B===0)return v[h++]=20971520,v[h++]=20971520,g.bits=1,0;for(y=1;y<B&&q[y]===0;y++);for(te<y&&(te=y),N=Z=1;N<=15;N++)if(Z<<=1,(Z-=q[N])<0)return-1;if(0<Z&&(d===0||B!==1))return-1;for(ee[1]=0,N=1;N<15;N++)ee[N+1]=ee[N]+q[N];for(M=0;M<f;M++)u[m+M]!==0&&(b[ee[u[m+M]]++]=M);if(A=d===0?(L=ue=b,19):d===1?(L=s,K-=257,ue=a,re-=257,256):(L=l,ue=c,-1),N=y,I=h,$=M=z=0,_=-1,C=(ne=1<<(U=te))-1,d===1&&852<ne||d===2&&592<ne)return 1;for(;;){for(D=N-$,F=b[M]<A?(R=0,b[M]):b[M]>A?(R=ue[re+b[M]],L[K+b[M]]):(R=96,0),x=1<<N-$,y=k=1<<U;v[I+(z>>$)+(k-=x)]=D<<24|R<<16|F|0,k!==0;);for(x=1<<N-1;z&x;)x>>=1;if(x!==0?(z&=x-1,z+=x):z=0,M++,--q[N]==0){if(N===B)break;N=u[m+b[M]]}if(te<N&&(z&C)!==_){for($===0&&($=te),I+=y,Z=1<<(U=N-$);U+$<B&&!((Z-=q[U+$])<=0);)U++,Z<<=1;if(ne+=1<<U,d===1&&852<ne||d===2&&592<ne)return 1;v[_=z&C]=te<<24|U<<16|I-h|0}}return z!==0&&(v[I+z]=N-$<<24|64<<16|0),g.bits=te,0}},{"../utils/common":41}],51:[function(r,n,o){n.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,n,o){var i=r("../utils/common"),s=0,a=1;function l(S){for(var P=S.length;0<=--P;)S[P]=0}var c=0,d=29,u=256,m=u+1+d,f=30,v=19,h=2*m+1,b=15,g=16,x=7,k=256,_=16,C=17,I=18,A=[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],D=[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],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=new Array(2*(m+2));l(Y);var N=new Array(2*f);l(N);var M=new Array(512);l(M);var y=new Array(256);l(y);var B=new Array(d);l(B);var te,U,$,Z=new Array(f);function ne(S,P,W,G,O){this.static_tree=S,this.extra_bits=P,this.extra_base=W,this.elems=G,this.max_length=O,this.has_stree=S&&S.length}function z(S,P){this.dyn_tree=S,this.max_code=0,this.stat_desc=P}function L(S){return S<256?M[S]:M[256+(S>>>7)]}function K(S,P){S.pending_buf[S.pending++]=255&P,S.pending_buf[S.pending++]=P>>>8&255}function q(S,P,W){S.bi_valid>g-W?(S.bi_buf|=P<<S.bi_valid&65535,K(S,S.bi_buf),S.bi_buf=P>>g-S.bi_valid,S.bi_valid+=W-g):(S.bi_buf|=P<<S.bi_valid&65535,S.bi_valid+=W)}function ee(S,P,W){q(S,W[2*P],W[2*P+1])}function ue(S,P){for(var W=0;W|=1&S,S>>>=1,W<<=1,0<--P;);return W>>>1}function re(S,P,W){var G,O,V=new Array(b+1),J=0;for(G=1;G<=b;G++)V[G]=J=J+W[G-1]<<1;for(O=0;O<=P;O++){var Q=S[2*O+1];Q!==0&&(S[2*O]=ue(V[Q]++,Q))}}function ie(S){var P;for(P=0;P<m;P++)S.dyn_ltree[2*P]=0;for(P=0;P<f;P++)S.dyn_dtree[2*P]=0;for(P=0;P<v;P++)S.bl_tree[2*P]=0;S.dyn_ltree[2*k]=1,S.opt_len=S.static_len=0,S.last_lit=S.matches=0}function ae(S){8<S.bi_valid?K(S,S.bi_buf):0<S.bi_valid&&(S.pending_buf[S.pending++]=S.bi_buf),S.bi_buf=0,S.bi_valid=0}function oe(S,P,W,G){var O=2*P,V=2*W;return S[O]<S[V]||S[O]===S[V]&&G[P]<=G[W]}function le(S,P,W){for(var G=S.heap[W],O=W<<1;O<=S.heap_len&&(O<S.heap_len&&oe(P,S.heap[O+1],S.heap[O],S.depth)&&O++,!oe(P,G,S.heap[O],S.depth));)S.heap[W]=S.heap[O],W=O,O<<=1;S.heap[W]=G}function fe(S,P,W){var G,O,V,J,Q=0;if(S.last_lit!==0)for(;G=S.pending_buf[S.d_buf+2*Q]<<8|S.pending_buf[S.d_buf+2*Q+1],O=S.pending_buf[S.l_buf+Q],Q++,G===0?ee(S,O,P):(ee(S,(V=y[O])+u+1,P),(J=A[V])!==0&&q(S,O-=B[V],J),ee(S,V=L(--G),W),(J=D[V])!==0&&q(S,G-=Z[V],J)),Q<S.last_lit;);ee(S,k,P)}function ve(S,P){var W,G,O,V=P.dyn_tree,J=P.stat_desc.static_tree,Q=P.stat_desc.has_stree,se=P.stat_desc.elems,pe=-1;for(S.heap_len=0,S.heap_max=h,W=0;W<se;W++)V[2*W]!==0?(S.heap[++S.heap_len]=pe=W,S.depth[W]=0):V[2*W+1]=0;for(;S.heap_len<2;)V[2*(O=S.heap[++S.heap_len]=pe<2?++pe:0)]=1,S.depth[O]=0,S.opt_len--,Q&&(S.static_len-=J[2*O+1]);for(P.max_code=pe,W=S.heap_len>>1;1<=W;W--)le(S,V,W);for(O=se;W=S.heap[1],S.heap[1]=S.heap[S.heap_len--],le(S,V,1),G=S.heap[1],S.heap[--S.heap_max]=W,S.heap[--S.heap_max]=G,V[2*O]=V[2*W]+V[2*G],S.depth[O]=(S.depth[W]>=S.depth[G]?S.depth[W]:S.depth[G])+1,V[2*W+1]=V[2*G+1]=O,S.heap[1]=O++,le(S,V,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],(function(he,Ae){var Se,ze,St,Ee,sr,Pt,Ze=Ae.dyn_tree,Yn=Ae.max_code,Zn=Ae.stat_desc.static_tree,mi=Ae.stat_desc.has_stree,gi=Ae.stat_desc.extra_bits,Gn=Ae.stat_desc.extra_base,Ne=Ae.stat_desc.max_length,Ie=0;for(Ee=0;Ee<=b;Ee++)he.bl_count[Ee]=0;for(Ze[2*he.heap[he.heap_max]+1]=0,Se=he.heap_max+1;Se<h;Se++)Ne<(Ee=Ze[2*Ze[2*(ze=he.heap[Se])+1]+1]+1)&&(Ee=Ne,Ie++),Ze[2*ze+1]=Ee,Yn<ze||(he.bl_count[Ee]++,sr=0,Gn<=ze&&(sr=gi[ze-Gn]),Pt=Ze[2*ze],he.opt_len+=Pt*(Ee+sr),mi&&(he.static_len+=Pt*(Zn[2*ze+1]+sr)));if(Ie!==0){do{for(Ee=Ne-1;he.bl_count[Ee]===0;)Ee--;he.bl_count[Ee]--,he.bl_count[Ee+1]+=2,he.bl_count[Ne]--,Ie-=2}while(0<Ie);for(Ee=Ne;Ee!==0;Ee--)for(ze=he.bl_count[Ee];ze!==0;)Yn<(St=he.heap[--Se])||(Ze[2*St+1]!==Ee&&(he.opt_len+=(Ee-Ze[2*St+1])*Ze[2*St],Ze[2*St+1]=Ee),ze--)}})(S,P),re(V,pe,S.bl_count)}function w(S,P,W){var G,O,V=-1,J=P[1],Q=0,se=7,pe=4;for(J===0&&(se=138,pe=3),P[2*(W+1)+1]=65535,G=0;G<=W;G++)O=J,J=P[2*(G+1)+1],++Q<se&&O===J||(Q<pe?S.bl_tree[2*O]+=Q:O!==0?(O!==V&&S.bl_tree[2*O]++,S.bl_tree[2*_]++):Q<=10?S.bl_tree[2*C]++:S.bl_tree[2*I]++,V=O,pe=(Q=0)===J?(se=138,3):O===J?(se=6,3):(se=7,4))}function X(S,P,W){var G,O,V=-1,J=P[1],Q=0,se=7,pe=4;for(J===0&&(se=138,pe=3),G=0;G<=W;G++)if(O=J,J=P[2*(G+1)+1],!(++Q<se&&O===J)){if(Q<pe)for(;ee(S,O,S.bl_tree),--Q!=0;);else O!==0?(O!==V&&(ee(S,O,S.bl_tree),Q--),ee(S,_,S.bl_tree),q(S,Q-3,2)):Q<=10?(ee(S,C,S.bl_tree),q(S,Q-3,3)):(ee(S,I,S.bl_tree),q(S,Q-11,7));V=O,pe=(Q=0)===J?(se=138,3):O===J?(se=6,3):(se=7,4)}}l(Z);var H=!1;function T(S,P,W,G){q(S,(c<<1)+(G?1:0),3),(function(O,V,J,Q){ae(O),K(O,J),K(O,~J),i.arraySet(O.pending_buf,O.window,V,J,O.pending),O.pending+=J})(S,P,W)}o._tr_init=function(S){H||((function(){var P,W,G,O,V,J=new Array(b+1);for(O=G=0;O<d-1;O++)for(B[O]=G,P=0;P<1<<A[O];P++)y[G++]=O;for(y[G-1]=O,O=V=0;O<16;O++)for(Z[O]=V,P=0;P<1<<D[O];P++)M[V++]=O;for(V>>=7;O<f;O++)for(Z[O]=V<<7,P=0;P<1<<D[O]-7;P++)M[256+V++]=O;for(W=0;W<=b;W++)J[W]=0;for(P=0;P<=143;)Y[2*P+1]=8,P++,J[8]++;for(;P<=255;)Y[2*P+1]=9,P++,J[9]++;for(;P<=279;)Y[2*P+1]=7,P++,J[7]++;for(;P<=287;)Y[2*P+1]=8,P++,J[8]++;for(re(Y,m+1,J),P=0;P<f;P++)N[2*P+1]=5,N[2*P]=ue(P,5);te=new ne(Y,A,u+1,m,b),U=new ne(N,D,0,f,b),$=new ne(new Array(0),R,0,v,x)})(),H=!0),S.l_desc=new z(S.dyn_ltree,te),S.d_desc=new z(S.dyn_dtree,U),S.bl_desc=new z(S.bl_tree,$),S.bi_buf=0,S.bi_valid=0,ie(S)},o._tr_stored_block=T,o._tr_flush_block=function(S,P,W,G){var O,V,J=0;0<S.level?(S.strm.data_type===2&&(S.strm.data_type=(function(Q){var se,pe=4093624447;for(se=0;se<=31;se++,pe>>>=1)if(1&pe&&Q.dyn_ltree[2*se]!==0)return s;if(Q.dyn_ltree[18]!==0||Q.dyn_ltree[20]!==0||Q.dyn_ltree[26]!==0)return a;for(se=32;se<u;se++)if(Q.dyn_ltree[2*se]!==0)return a;return s})(S)),ve(S,S.l_desc),ve(S,S.d_desc),J=(function(Q){var se;for(w(Q,Q.dyn_ltree,Q.l_desc.max_code),w(Q,Q.dyn_dtree,Q.d_desc.max_code),ve(Q,Q.bl_desc),se=v-1;3<=se&&Q.bl_tree[2*F[se]+1]===0;se--);return Q.opt_len+=3*(se+1)+5+5+4,se})(S),O=S.opt_len+3+7>>>3,(V=S.static_len+3+7>>>3)<=O&&(O=V)):O=V=W+5,W+4<=O&&P!==-1?T(S,P,W,G):S.strategy===4||V===O?(q(S,2+(G?1:0),3),fe(S,Y,N)):(q(S,4+(G?1:0),3),(function(Q,se,pe,he){var Ae;for(q(Q,se-257,5),q(Q,pe-1,5),q(Q,he-4,4),Ae=0;Ae<he;Ae++)q(Q,Q.bl_tree[2*F[Ae]+1],3);X(Q,Q.dyn_ltree,se-1),X(Q,Q.dyn_dtree,pe-1)})(S,S.l_desc.max_code+1,S.d_desc.max_code+1,J+1),fe(S,S.dyn_ltree,S.dyn_dtree)),ie(S),G&&ae(S)},o._tr_tally=function(S,P,W){return S.pending_buf[S.d_buf+2*S.last_lit]=P>>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&P,S.pending_buf[S.l_buf+S.last_lit]=255&W,S.last_lit++,P===0?S.dyn_ltree[2*W]++:(S.matches++,P--,S.dyn_ltree[2*(y[W]+u+1)]++,S.dyn_dtree[2*L(P)]++),S.last_lit===S.lit_bufsize-1},o._tr_align=function(S){q(S,2,3),ee(S,k,Y),(function(P){P.bi_valid===16?(K(P,P.bi_buf),P.bi_buf=0,P.bi_valid=0):8<=P.bi_valid&&(P.pending_buf[P.pending++]=255&P.bi_buf,P.bi_buf>>=8,P.bi_valid-=8)})(S)}},{"../utils/common":41}],53:[function(r,n,o){n.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,n,o){(function(i){(function(s,a){if(!s.setImmediate){var l,c,d,u,m=1,f={},v=!1,h=s.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(s);b=b&&b.setTimeout?b:s,l={}.toString.call(s.process)==="[object process]"?function(_){process.nextTick(function(){x(_)})}:(function(){if(s.postMessage&&!s.importScripts){var _=!0,C=s.onmessage;return s.onmessage=function(){_=!1},s.postMessage("","*"),s.onmessage=C,_}})()?(u="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",k,!1):s.attachEvent("onmessage",k),function(_){s.postMessage(u+_,"*")}):s.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){x(_.data)},function(_){d.port2.postMessage(_)}):h&&"onreadystatechange"in h.createElement("script")?(c=h.documentElement,function(_){var C=h.createElement("script");C.onreadystatechange=function(){x(_),C.onreadystatechange=null,c.removeChild(C),C=null},c.appendChild(C)}):function(_){setTimeout(x,0,_)},b.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var C=new Array(arguments.length-1),I=0;I<C.length;I++)C[I]=arguments[I+1];var A={callback:_,args:C};return f[m]=A,l(m),m++},b.clearImmediate=g}function g(_){delete f[_]}function x(_){if(v)setTimeout(x,0,_);else{var C=f[_];if(C){v=!0;try{(function(I){var A=I.callback,D=I.args;switch(D.length){case 0:A();break;case 1:A(D[0]);break;case 2:A(D[0],D[1]);break;case 3:A(D[0],D[1],D[2]);break;default:A.apply(a,D)}})(C)}finally{g(_),v=!1}}}}function k(_){_.source===s&&typeof _.data=="string"&&_.data.indexOf(u)===0&&x(+_.data.slice(u.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof pt<"u"?pt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Kn)),Kn.exports}var Dc=Ic();const Rc=Pc(Dc);var Mr={exports:{}},Lc=Mr.exports,xi;function Mc(){return xi||(xi=1,(function(e,t){(function(r,n){n()})(Lc,function(){function r(c,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,d,u){var m=new XMLHttpRequest;m.open("GET",c),m.responseType="blob",m.onload=function(){l(m.response,d,u)},m.onerror=function(){console.error("could not download file")},m.send()}function o(c){var d=new XMLHttpRequest;d.open("HEAD",c,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function i(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(d)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof pt=="object"&&pt.global===pt?pt:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(c,d,u){var m=s.URL||s.webkitURL,f=document.createElement("a");d=d||c.name||"download",f.download=d,f.rel="noopener",typeof c=="string"?(f.href=c,f.origin===location.origin?i(f):o(f.href)?n(c,d,u):i(f,f.target="_blank")):(f.href=m.createObjectURL(c),setTimeout(function(){m.revokeObjectURL(f.href)},4e4),setTimeout(function(){i(f)},0))}:"msSaveOrOpenBlob"in navigator?function(c,d,u){if(d=d||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(r(c,u),d);else if(o(c))n(c,d,u);else{var m=document.createElement("a");m.href=c,m.target="_blank",setTimeout(function(){i(m)})}}:function(c,d,u,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof c=="string")return n(c,d,u);var f=c.type==="application/octet-stream",v=/constructor/i.test(s.HTMLElement)||s.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||f&&v||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var k=b.result;k=h?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=k:location=k,m=null},b.readAsDataURL(c)}else{var g=s.URL||s.webkitURL,x=g.createObjectURL(c);m?m.location=x:location.href=x,m=null,setTimeout(function(){g.revokeObjectURL(x)},4e4)}});s.saveAs=l.saveAs=l,e.exports=l})})(Mr)),Mr.exports}var yi=Mc();const ki=async(e,t)=>{const r=new Rc,n=r.folder("config");n==null||n.file("site.json",JSON.stringify(e.site,null,2)),n==null||n.file("theme.json",JSON.stringify(e.theme,null,2)),n==null||n.file("menu.json",JSON.stringify(e.menu,null,2));const o=r.folder("pages");o==null||o.file(`${t}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});yi.saveAs(i,`jsonpages-project-${t}-${Date.now()}.zip`)},_i=(e,t,r)=>{const{pages:n,...o}=e.site,i={page:e.page,site:o,menu:e.menu,theme:e.theme},a=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${a}</head>`),c=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});yi.saveAs(c,`${t}.html`)};function Si(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Si(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Fc(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Si(e))&&(n&&(n+=" "),n+=t);return n}const Bc=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Uc=(e,t)=>({classGroupId:e,validator:t}),Ci=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Fr="-",Ei=[],Wc="arbitrary..",$c=e=>{const t=Vc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Hc(s);const a=s.split(Fr),l=a[0]===""&&a.length>1?1:0;return Ni(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=n[s],c=r[s];return l?c?Bc(c,l):l:c||Ei}return r[s]||Ei}}},Ni=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const c=Ni(e,t+1,i);if(c)return c}const s=r.validators;if(s===null)return;const a=t===0?e.join(Fr):e.slice(t).join(Fr),l=s.length;for(let c=0;c<l;c++){const d=s[c];if(d.validator(a))return d.classGroupId}},Hc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Wc+n:void 0})(),Vc=e=>{const{theme:t,classGroups:r}=e;return Yc(r,t)},Yc=(e,t)=>{const r=Ci();for(const n in e){const o=e[n];Xn(o,r,n,t)}return r},Xn=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Zc(s,t,r,n)}},Zc=(e,t,r,n)=>{if(typeof e=="string"){Gc(e,t,r);return}if(typeof e=="function"){Kc(e,t,r,n);return}Xc(e,t,r,n)},Gc=(e,t,r)=>{const n=e===""?t:Ai(t,e);n.classGroupId=r},Kc=(e,t,r,n)=>{if(qc(e)){Xn(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Uc(r,e))},Xc=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Xn(l,Ai(t,a),r,n)}},Ai=(e,t)=>{let r=e;const n=t.split(Fr),o=n.length;for(let i=0;i<o;i++){const s=n[i];let a=r.nextPart.get(s);a||(a=Ci(),r.nextPart.set(s,a)),r=a}return r},qc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Jc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,s)=>{r[i]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let s=r[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set(i,s){i in r?r[i]=s:o(i,s)}}},qn="!",zi=":",Qc=[],ji=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),ed=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let s=0,a=0,l=0,c;const d=o.length;for(let h=0;h<d;h++){const b=o[h];if(s===0&&a===0){if(b===zi){i.push(o.slice(l,h)),l=h+1;continue}if(b==="/"){c=h;continue}}b==="["?s++:b==="]"?s--:b==="("?a++:b===")"&&a--}const u=i.length===0?o:o.slice(l);let m=u,f=!1;u.endsWith(qn)?(m=u.slice(0,-1),f=!0):u.startsWith(qn)&&(m=u.slice(1),f=!0);const v=c&&c>l?c-l:void 0;return ji(i,f,m,v)};if(t){const o=t+zi,i=n;n=s=>s.startsWith(o)?i(s.slice(o.length)):ji(Qc,!1,s,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},td=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const s=r[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(s)):o.push(s)}return o.length>0&&(o.sort(),n.push(...o)),n}},rd=e=>({cache:Jc(e.cacheSize),parseClassName:ed(e),sortModifiers:td(e),...$c(e)}),nd=/\s+/,od=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(nd);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:m,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:h}=r(d);if(u){l=d+(l.length>0?" "+l:l);continue}let b=!!h,g=n(b?v.substring(0,h):v);if(!g){if(!b){l=d+(l.length>0?" "+l:l);continue}if(g=n(v),!g){l=d+(l.length>0?" "+l:l);continue}b=!1}const x=m.length===0?"":m.length===1?m[0]:i(m).join(":"),k=f?x+qn:x,_=k+g;if(s.indexOf(_)>-1)continue;s.push(_);const C=o(g,b);for(let I=0;I<C.length;++I){const A=C[I];s.push(k+A)}l=d+(l.length>0?" "+l:l)}return l},id=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Ti(r))&&(o&&(o+=" "),o+=n);return o},Ti=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ti(e[n]))&&(r&&(r+=" "),r+=t);return r},sd=(e,...t)=>{let r,n,o,i;const s=l=>{const c=t.reduce((d,u)=>u(d),e());return r=rd(c),n=r.cache.get,o=r.cache.set,i=a,a(l)},a=l=>{const c=n(l);if(c)return c;const d=od(l,r);return o(l,d),d};return i=s,(...l)=>i(id(...l))},ad=[],Te=e=>{const t=r=>r[e]||ad;return t.isThemeGetter=!0,t},Oi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ld=/^\d+\/\d+$/,cd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dd=/\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$/,ud=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,It=e=>ld.test(e),ge=e=>!!e&&!Number.isNaN(Number(e)),mt=e=>!!e&&Number.isInteger(Number(e)),Jn=e=>e.endsWith("%")&&ge(e.slice(0,-1)),lt=e=>cd.test(e),pd=()=>!0,md=e=>dd.test(e)&&!ud.test(e),Ii=()=>!1,gd=e=>fd.test(e),bd=e=>hd.test(e),vd=e=>!ce(e)&&!de(e),wd=e=>Dt(e,Fi,Ii),ce=e=>Oi.test(e),At=e=>Dt(e,Bi,md),Qn=e=>Dt(e,Sd,ge),Di=e=>Dt(e,Li,Ii),xd=e=>Dt(e,Mi,bd),Br=e=>Dt(e,Ui,gd),de=e=>Pi.test(e),lr=e=>Rt(e,Bi),yd=e=>Rt(e,Cd),Ri=e=>Rt(e,Li),kd=e=>Rt(e,Fi),_d=e=>Rt(e,Mi),Ur=e=>Rt(e,Ui,!0),Dt=(e,t,r)=>{const n=Oi.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Rt=(e,t,r=!1)=>{const n=Pi.exec(e);return n?n[1]?t(n[1]):r:!1},Li=e=>e==="position"||e==="percentage",Mi=e=>e==="image"||e==="url",Fi=e=>e==="length"||e==="size"||e==="bg-size",Bi=e=>e==="length",Sd=e=>e==="number",Cd=e=>e==="family-name",Ui=e=>e==="shadow",Ed=sd(()=>{const e=Te("color"),t=Te("font"),r=Te("text"),n=Te("font-weight"),o=Te("tracking"),i=Te("leading"),s=Te("breakpoint"),a=Te("container"),l=Te("spacing"),c=Te("radius"),d=Te("shadow"),u=Te("inset-shadow"),m=Te("text-shadow"),f=Te("drop-shadow"),v=Te("blur"),h=Te("perspective"),b=Te("aspect"),g=Te("ease"),x=Te("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[..._(),de,ce],I=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],D=()=>[de,ce,l],R=()=>[It,"full","auto",...D()],F=()=>[mt,"none","subgrid",de,ce],Y=()=>["auto",{span:["full",mt,de,ce]},mt,de,ce],N=()=>[mt,"auto",de,ce],M=()=>["auto","min","max","fr",de,ce],y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...D()],U=()=>[It,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],$=()=>[e,de,ce],Z=()=>[..._(),Ri,Di,{position:[de,ce]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",kd,wd,{size:[de,ce]}],L=()=>[Jn,lr,At],K=()=>["","none","full",c,de,ce],q=()=>["",ge,lr,At],ee=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[ge,Jn,Ri,Di],ie=()=>["","none",v,de,ce],ae=()=>["none",ge,de,ce],oe=()=>["none",ge,de,ce],le=()=>[ge,de,ce],fe=()=>[It,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lt],breakpoint:[lt],color:[pd],container:[lt],"drop-shadow":[lt],ease:["in","out","in-out"],font:[vd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lt],shadow:[lt],spacing:["px",ge],text:[lt],"text-shadow":[lt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",It,ce,de,b]}],container:["container"],columns:[{columns:[ge,ce,de,a]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:C()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[mt,"auto",de,ce]}],basis:[{basis:[It,"full","auto",a,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,It,"auto","initial","none",ce]}],grow:[{grow:["",ge,de,ce]}],shrink:[{shrink:["",ge,de,ce]}],order:[{order:[mt,"first","last","none",de,ce]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...y(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...y()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":y()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[a,"screen",...U()]}],"min-w":[{"min-w":[a,"screen","none",...U()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...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,lr,At]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,de,Qn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jn,ce]}],"font-family":[{font:[yd,ce,t]}],"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:[o,de,ce]}],"line-clamp":[{"line-clamp":[ge,"none",de,Qn]}],leading:[{leading:[i,...D()]}],"list-image":[{"list-image":["none",de,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",de,At]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[ge,"auto",de,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,ce]}],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",de,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mt,de,ce],radial:["",de,ce],conic:[mt,de,ce]},_d,xd]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],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:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,de,ce]}],"outline-w":[{outline:["",ge,lr,At]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",d,Ur,Br]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",u,Ur,Br]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[ge,At]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",m,Ur,Br]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[ge,de,ce]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"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":[ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[de,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ce]}],filter:[{filter:["","none",de,ce]}],blur:[{blur:ie()}],brightness:[{brightness:[ge,de,ce]}],contrast:[{contrast:[ge,de,ce]}],"drop-shadow":[{"drop-shadow":["","none",f,Ur,Br]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",ge,de,ce]}],"hue-rotate":[{"hue-rotate":[ge,de,ce]}],invert:[{invert:["",ge,de,ce]}],saturate:[{saturate:[ge,de,ce]}],sepia:[{sepia:["",ge,de,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ce]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[ge,de,ce]}],"backdrop-contrast":[{"backdrop-contrast":[ge,de,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,de,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,de,ce]}],"backdrop-invert":[{"backdrop-invert":["",ge,de,ce]}],"backdrop-opacity":[{"backdrop-opacity":[ge,de,ce]}],"backdrop-saturate":[{"backdrop-saturate":[ge,de,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,de,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ge,"initial",de,ce]}],ease:[{ease:["linear","initial",g,de,ce]}],delay:[{delay:[ge,de,ce]}],animate:[{animate:["none",x,de,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,de,ce]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[de,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",de,ce]}],"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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",de,ce]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[ge,lr,At,Qn]}],stroke:[{stroke:["none",...$()]}],"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 me(...e){return Ed(Fc(e))}var Wr={exports:{}},cr={};/**
|
|
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
|
|
20
|
+
*/var Wi;function Nd(){if(Wi)return cr;Wi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,i){var s=null;if(i!==void 0&&(s=""+i),o.key!==void 0&&(s=""+o.key),"key"in o){i={};for(var a in o)a!=="key"&&(i[a]=o[a])}else i=o;return o=i.ref,{$$typeof:e,type:n,key:s,ref:o!==void 0?o:null,props:i}}return cr.Fragment=t,cr.jsx=r,cr.jsxs=r,cr}var dr={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-jsx-runtime.development.js
|
|
23
23
|
*
|
|
@@ -25,192 +25,192 @@
|
|
|
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
|
|
28
|
+
*/var $i;function Ad(){return $i||($i=1,process.env.NODE_ENV!=="production"&&(function(){function e(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===Y?null:z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case b:return"Fragment";case x:return"Profiler";case g:return"StrictMode";case I:return"Suspense";case A:return"SuspenseList";case F: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 h:return"Portal";case _:return z.displayName||"Context";case k:return(z._context.displayName||"Context")+".Consumer";case C:var L=z.render;return z=z.displayName,z||(z=L.displayName||L.name||"",z=z!==""?"ForwardRef("+z+")":"ForwardRef"),z;case D:return L=z.displayName||null,L!==null?L:e(z.type)||"Memo";case R:L=z._payload,z=z._init;try{return e(z(L))}catch{}}return null}function t(z){return""+z}function r(z){try{t(z);var L=!1}catch{L=!0}if(L){L=console;var K=L.error,q=typeof Symbol=="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object";return K.call(L,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",q),t(z)}}function n(z){if(z===b)return"<>";if(typeof z=="object"&&z!==null&&z.$$typeof===R)return"<...>";try{var L=e(z);return L?"<"+L+">":"<...>"}catch{return"<...>"}}function o(){var z=N.A;return z===null?null:z.getOwner()}function i(){return Error("react-stack-top-frame")}function s(z){if(M.call(z,"key")){var L=Object.getOwnPropertyDescriptor(z,"key").get;if(L&&L.isReactWarning)return!1}return z.key!==void 0}function a(z,L){function K(){te||(te=!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)",L))}K.isReactWarning=!0,Object.defineProperty(z,"key",{get:K,configurable:!0})}function l(){var z=e(this.type);return U[z]||(U[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 c(z,L,K,q,ee,ue){var re=K.ref;return z={$$typeof:v,type:z,key:L,props:K,_owner:q},(re!==void 0?re: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:ee}),Object.defineProperty(z,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z}function d(z,L,K,q,ee,ue){var re=L.children;if(re!==void 0)if(q)if(y(re)){for(q=0;q<re.length;q++)u(re[q]);Object.freeze&&Object.freeze(re)}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 u(re);if(M.call(L,"key")){re=e(z);var ie=Object.keys(L).filter(function(oe){return oe!=="key"});q=0<ie.length?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}",ne[re+q]||(ie=0<ie.length?"{"+ie.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} />`,q,re,ie,re),ne[re+q]=!0)}if(re=null,K!==void 0&&(r(K),re=""+K),s(L)&&(r(L.key),re=""+L.key),"key"in L){K={};for(var ae in L)ae!=="key"&&(K[ae]=L[ae])}else K=L;return re&&a(K,typeof z=="function"?z.displayName||z.name||"Unknown":z),c(z,re,K,o(),ee,ue)}function u(z){m(z)?z._store&&(z._store.validated=1):typeof z=="object"&&z!==null&&z.$$typeof===R&&(z._payload.status==="fulfilled"?m(z._payload.value)&&z._payload.value._store&&(z._payload.value._store.validated=1):z._store&&(z._store.validated=1))}function m(z){return typeof z=="object"&&z!==null&&z.$$typeof===v}var f=j,v=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),_=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),Y=Symbol.for("react.client.reference"),N=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,y=Array.isArray,B=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(z){return z()}};var te,U={},$=f.react_stack_bottom_frame.bind(f,i)(),Z=B(n(i)),ne={};dr.Fragment=b,dr.jsx=function(z,L,K){var q=1e4>N.recentlyCreatedOwnerStacks++;return d(z,L,K,!1,q?Error("react-stack-top-frame"):$,q?B(n(z)):Z)},dr.jsxs=function(z,L,K){var q=1e4>N.recentlyCreatedOwnerStacks++;return d(z,L,K,!0,q?Error("react-stack-top-frame"):$,q?B(n(z)):Z)}})()),dr}var Hi;function zd(){return Hi||(Hi=1,process.env.NODE_ENV==="production"?Wr.exports=Nd():Wr.exports=Ad()),Wr.exports}var p=zd();const Vi=j.createContext(void 0),Yi=({config:e,children:t})=>p.jsx(Vi.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets},children:t});function ur(){const e=j.useContext(Vi);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const Zi=j.createContext(void 0),$r=({mode:e,children:t})=>(j.useEffect(()=>{if(e!=="studio")return;const r=new MutationObserver(n=>{n.forEach(o=>{o.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]),p.jsx(Zi.Provider,{value:{mode:e},children:t})),Gi=()=>{const e=j.useContext(Zi);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 jd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ki=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===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 Td={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 Od=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:s,...a},l)=>j.createElement("svg",{ref:l,...Td,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ki("lucide",o),...a},[...s.map(([c,d])=>j.createElement(c,d)),...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 ye=(e,t)=>{const r=j.forwardRef(({className:n,...o},i)=>j.createElement(Od,{ref:i,iconNode:t,className:Ki(`lucide-${jd(e)}`,n),...o}));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 Pd=ye("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 Id=ye("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 Dd=ye("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 Rd=ye("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
|
|
78
|
+
*/const eo=ye("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 Hr=
|
|
83
|
+
*/const Hr=ye("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 Ld=ye("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
|
|
93
|
+
*/const to=ye("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 Md=ye("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
|
|
103
|
+
*/const Xi=ye("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
|
|
108
|
+
*/const Fd=ye("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 Bd=ye("FileText",[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
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
|
|
118
|
+
*/const Ud=ye("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"}]]);/**
|
|
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 qi=ye("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"}]]);/**
|
|
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 Vr=
|
|
128
|
+
*/const Vr=ye("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"}]]);/**
|
|
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
|
|
133
|
+
*/const ro=ye("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"}]]);/**
|
|
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 Ji=ye("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"}]]);/**
|
|
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 Wd=ye("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"}]]);/**
|
|
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
|
|
148
|
+
*/const $d=ye("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"}]]);/**
|
|
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 no=ye("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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
|
|
158
|
+
*/const Hd=ye("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
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 Vd=ye("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
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 Yd=ye("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"}]]);/**
|
|
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 Zd=ye("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"}]]);/**
|
|
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 Gd=ye("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"}]]);/**
|
|
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 Kd=ye("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
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 Yr=
|
|
188
|
+
*/const Yr=ye("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"}]]);/**
|
|
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 Xd=ye("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"}]]);/**
|
|
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
|
|
198
|
+
*/const Qi=ye("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"}]]);/**
|
|
199
199
|
* @license lucide-react v0.474.0 - ISC
|
|
200
200
|
*
|
|
201
201
|
* This source code is licensed under the ISC license.
|
|
202
202
|
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
-
*/const
|
|
203
|
+
*/const Lt=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
204
204
|
* @license lucide-react v0.474.0 - ISC
|
|
205
205
|
*
|
|
206
206
|
* This source code is licensed under the ISC license.
|
|
207
207
|
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
-
*/const Hd=ke("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 Vd extends T.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,t,r)}render(){return this.state.hasError?p.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:[p.jsx($d,{className:"text-amber-500",size:32}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),p.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),p.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 Yd=({type:e,scope:t,isSelected:r,sectionId:n,sectionIndex:o=0,totalSections:i=0,onReorder:s})=>{const a=typeof o=="number"&&o>0&&s,l=typeof o=="number"&&o<i-1&&s;return p.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:pe("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:p.jsxs("div",{className:pe("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:[s&&n!=null&&p.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[p.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),a&&s(n,o-1)},disabled:!a,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:p.jsx(eo,{size:12,strokeWidth:2.5})}),p.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),l&&s(n,o+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:p.jsx(Hr,{size:12,strokeWidth:2.5})})]}),p.jsx("span",{className:"shrink-0",children:e}),p.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),p.jsx("span",{className:"shrink-0",children:t})]})})},ur=({section:e,menu:t,selectedId:r,reorderable:n,sectionIndex:o,totalSections:i,onReorder:s})=>{var v,x;const{mode:a}=Vi(),{registry:l}=dr(),c=a==="studio",d=c&&r===e.id,f=l[e.type],m=e.type==="header"||e.type==="footer"?"global":"local",u=e.type==="header"&&((v=e.settings)==null?void 0:v.sticky);if(!f)return p.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:[p.jsx("strong",{children:"Missing Component:"})," ",e.type]});const w=k=>{var G,z,L,y,$;if(!c)return;k.preventDefault(),k.stopPropagation();const S=k.currentTarget,C=k.clientX,O=k.clientY;if(k.target===S){window.parent.postMessage({type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}},"*");return}const N=document.elementFromPoint(C,O)??k.target;if(!N||!S.contains(N)){window.parent.postMessage({type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}},"*");return}if(N===S){window.parent.postMessage({type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}},"*");return}const P=[];let D=N;for(;D&&D!==S;){const X=(G=D.getAttribute)==null?void 0:G.call(D,"data-jp-item-id"),H=(z=D.getAttribute)==null?void 0:z.call(D,"data-jp-item-field");X&&H&&P.push({fieldKey:H||"items",itemId:X}),D=D.parentElement}if(P.reverse(),P.length===0)for(D=N;D&&D!==S;){const X=(L=D.getAttribute)==null?void 0:L.call(D,"data-jp-field");if(X){P.push({fieldKey:X});break}D=D.parentElement}if(P.length===0&&N){let X=null;const H=V=>{var Q,j;const Y=V.getBoundingClientRect();if(Y.left<=C&&C<=Y.right&&Y.top<=O&&O<=Y.bottom){for(let I=0;I<V.children.length;I++)H(V.children[I]);((Q=V.getAttribute)!=null&&Q.call(V,"data-jp-item-id")||(j=V.getAttribute)!=null&&j.call(V,"data-jp-field"))&&(X=V)}};if(H(N),X){const V=X,Y=(y=V.getAttribute)==null?void 0:y.call(V,"data-jp-item-id"),Q=($=V.getAttribute)==null?void 0:$.call(V,"data-jp-field");Y&&Q?P.push({fieldKey:Q||"items",itemId:Y}):Q&&P.push({fieldKey:Q})}}const W={type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}};if(P.length>0){W.itemPath=P;const X=P[0];X.itemId!=null?(W.itemField=X.fieldKey,W.itemId=X.itemId):W.itemField=X.fieldKey}window.parent.postMessage(W,"*")},h=()=>{const k=f;return e.type==="header"&&t?p.jsx(k,{data:e.data,settings:e.settings,menu:t}):p.jsx(k,{data:e.data,settings:e.settings})},b=(x=e.data)==null?void 0:x.anchorId;return p.jsxs("div",{id:b||void 0,"data-section-id":c?e.id:void 0,"data-section-type":c?e.type:void 0,"data-section-scope":c?m:void 0,...c&&d?{"data-jp-selected":!0}:{},onClickCapture:c?w:void 0,className:pe("relative w-full",c&&"group cursor-pointer",c&&u?"sticky top-0 z-[60]":"relative z-0",d&&"z-[70]"),children:[p.jsx("div",{className:"relative z-0",children:p.jsx(Vd,{type:e.type,children:h()})}),c&&p.jsx(Yd,{type:e.type,scope:m,isSelected:!!d,sectionId:n&&m==="local"?e.id:void 0,sectionIndex:n&&m==="local"?o:void 0,totalSections:n&&m==="local"?i:void 0,onReorder:n&&m==="local"?s:void 0})]})},Kd=e=>{T.useEffect(()=>{document.title=e.title;let t=document.querySelector('meta[name="description"]');t||(t=document.createElement("meta"),t.setAttribute("name","description"),document.head.appendChild(t)),t.setAttribute("content",e.description)},[e.title,e.description])},Gd="application/json",no=({pageConfig:e,siteConfig:t,menuConfig:r,selectedId:n,onReorder:o,scrollToSectionId:i,onActiveSectionChange:s})=>{var b,v;Kd(e.meta);const[a,l]=T.useState(null),c=T.useRef({}),d=T.useRef(s);d.current=s;const f=x=>{var k;(k=d.current)==null||k.call(d,x)};T.useEffect(()=>{if(!i)return;const x=c.current[i];x&&x.scrollIntoView({behavior:"smooth",block:"center"})},[i]),T.useEffect(()=>{if(!d.current)return;const k=[...t.header?[t.header.id]:[],...e.sections.map(N=>N.id),...t.footer?[t.footer.id]:[]],S=new IntersectionObserver(N=>{N.forEach(P=>{var D;if(P.isIntersecting&&P.intersectionRatio>.5){const W=P.target.getAttribute("data-section-id");W&&((D=d.current)==null||D.call(d,W))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let C=!1;const O=requestAnimationFrame(()=>{C||k.forEach(N=>{const P=c.current[N];P&&S.observe(P)})});return()=>{C=!0,cancelAnimationFrame(O),S.disconnect()}},[e.sections,(b=t.header)==null?void 0:b.id,(v=t.footer)==null?void 0:v.id]);const m=(x,k)=>{x.preventDefault(),x.dataTransfer.dropEffect="move",l(k)},u=()=>{l(null)},w=(x,k)=>{if(x.preventDefault(),l(null),!!o)try{const S=x.dataTransfer.getData(Gd),{sectionId:C}=JSON.parse(S);typeof C=="string"&&o(C,k)}catch{}},h=()=>{const x=typeof o=="function",k=e.sections.map((S,C)=>{const O=a===C;return x?p.jsxs("div",{ref:N=>{c.current[S.id]=N},"data-section-id":S.id,style:{position:"relative"},onMouseEnter:()=>f(S.id),children:[p.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:N=>m(N,C),onDragLeave:u,onDrop:N=>w(N,C)}),p.jsx(ur,{section:S,selectedId:n,reorderable:!0,sectionIndex:C,totalSections:e.sections.length,onReorder:o})]},S.id):p.jsx("div",{ref:N=>{c.current[S.id]=N},"data-section-id":S.id,onMouseEnter:()=>f(S.id),children:p.jsx(ur,{section:S,selectedId:n})},S.id)});if(x&&k.length>0){const S=e.sections.length,C=a===S;k.push(p.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:C?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:C?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:O=>m(O,S),onDragLeave:u,onDrop:O=>w(O,S)},"jp-drop-after-last"))}return k};return p.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[t.header!=null&&p.jsx("div",{ref:x=>{c.current[t.header.id]=x},"data-section-id":t.header.id,onMouseEnter:()=>f(t.header.id),children:p.jsx(ur,{section:t.header,menu:r.main,selectedId:n})}),p.jsx("main",{className:"flex-1",children:h()}),t.footer!=null&&p.jsx("div",{ref:x=>{c.current[t.footer.id]=x},"data-section-id":t.footer.id,onMouseEnter:()=>f(t.footer.id),children:p.jsx(ur,{section:t.footer,selectedId:n})})]})},Kr=({mode:e,tenantCss:t,adminCss:r,children:n})=>(T.useLayoutEffect(()=>{const o=`jp-theme-${e}`,i=e==="tenant"?t:r;if(!document.getElementById(o)&&i){const s=document.createElement("style");s.id=o,s.innerHTML=i,document.head.appendChild(s)}return()=>{const s=document.getElementById(o);s&&s.remove()}},[e,t,r]),p.jsx(p.Fragment,{children:n}));function Zd(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return T.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const Gr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Lt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function oo(e){return"nodeType"in e}function Re(e){var t,r;return e?Lt(e)?e:oo(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function io(e){const{Document:t}=Re(e);return e instanceof t}function fr(e){return Lt(e)?!1:e instanceof Re(e).HTMLElement}function qi(e){return e instanceof Re(e).SVGElement}function Ft(e){return e?Lt(e)?e.document:oo(e)?io(e)?e:fr(e)||qi(e)?e.ownerDocument:document:document:document}const Ge=Gr?T.useLayoutEffect:T.useEffect;function Zr(e){const t=T.useRef(e);return Ge(()=>{t.current=e}),T.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function Xd(){const e=T.useRef(null),t=T.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=T.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function hr(e,t){t===void 0&&(t=[e]);const r=T.useRef(e);return Ge(()=>{r.current!==e&&(r.current=e)},t),r}function pr(e,t){const r=T.useRef();return T.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Xr(e){const t=Zr(e),r=T.useRef(null),n=T.useCallback(o=>{o!==r.current&&(t==null||t(o,r.current)),r.current=o},[]);return[r,n]}function qr(e){const t=T.useRef();return T.useEffect(()=>{t.current=e},[e]),t.current}let so={};function mr(e,t){return T.useMemo(()=>{if(t)return t;const r=so[e]==null?0:so[e]+1;return so[e]=r,e+"-"+r},[e,t])}function Ji(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((i,s)=>{const a=Object.entries(s);for(const[l,c]of a){const d=i[l];d!=null&&(i[l]=d+e*c)}return i},{...t})}}const Bt=Ji(1),gr=Ji(-1);function qd(e){return"clientX"in e&&"clientY"in e}function Jr(e){if(!e)return!1;const{KeyboardEvent:t}=Re(e.target);return t&&e instanceof t}function Jd(e){if(!e)return!1;const{TouchEvent:t}=Re(e.target);return t&&e instanceof t}function Qr(e){if(Jd(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return qd(e)?{x:e.clientX,y:e.clientY}:null}const gt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[gt.Translate.toString(e),gt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),Qi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Qd(e){return e.matches(Qi)?e:e.querySelector(Qi)}const eu={display:"none"};function tu(e){let{id:t,value:r}=e;return T.createElement("div",{id:t,style:eu},r)}function ru(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return T.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function nu(){const[e,t]=T.useState("");return{announce:T.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const es=T.createContext(null);function ou(e){const t=T.useContext(es);T.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function iu(){const[e]=T.useState(()=>new Set),t=T.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[T.useCallback(n=>{let{type:o,event:i}=n;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const su={draggable:`
|
|
208
|
+
*/const qd=ye("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 Jd extends j.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,t,r)}render(){return this.state.hasError?p.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:[p.jsx(Xd,{className:"text-amber-500",size:32}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),p.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),p.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 Qd=({type:e,scope:t,isSelected:r,sectionId:n,sectionIndex:o=0,totalSections:i=0,onReorder:s})=>{const a=typeof o=="number"&&o>0&&s,l=typeof o=="number"&&o<i-1&&s;return p.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:me("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:p.jsxs("div",{className:me("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:[s&&n!=null&&p.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[p.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),a&&s(n,o-1)},disabled:!a,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:p.jsx(to,{size:12,strokeWidth:2.5})}),p.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),l&&s(n,o+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:p.jsx(Hr,{size:12,strokeWidth:2.5})})]}),p.jsx("span",{className:"shrink-0",children:e}),p.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),p.jsx("span",{className:"shrink-0",children:t})]})})},fr=({section:e,menu:t,selectedId:r,reorderable:n,sectionIndex:o,totalSections:i,onReorder:s})=>{var g,x;const{mode:a}=Gi(),{registry:l}=ur(),c=a==="studio",d=c&&r===e.id,u=l[e.type],m=e.type==="header"||e.type==="footer"?"global":"local",f=e.type==="tiptap",v=e.type==="header"&&((g=e.settings)==null?void 0:g.sticky);if(!u)return p.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:[p.jsx("strong",{children:"Missing Component:"})," ",e.type]});const h=()=>{const k=u;return e.type==="header"&&t?p.jsx(k,{data:e.data,settings:e.settings,menu:t}):p.jsx(k,{data:e.data,settings:e.settings})},b=(x=e.data)==null?void 0:x.anchorId;return p.jsxs("div",{id:b||void 0,"data-section-id":c?e.id:void 0,"data-section-type":c?e.type:void 0,"data-section-scope":c?m:void 0,...c&&d?{"data-jp-selected":!0}:{},className:me("relative w-full",c&&!f&&"group cursor-pointer",c&&v?"sticky top-0 z-[60]":"relative z-0",d&&"z-[70]"),children:[p.jsx("div",{className:"relative z-0",children:p.jsx(Jd,{type:e.type,children:h()})}),c&&!f&&p.jsx(Qd,{type:e.type,scope:m,isSelected:!!d,sectionId:n&&m==="local"?e.id:void 0,sectionIndex:n&&m==="local"?o:void 0,totalSections:n&&m==="local"?i:void 0,onReorder:n&&m==="local"?s:void 0})]})},eu=e=>{j.useEffect(()=>{document.title=e.title;let t=document.querySelector('meta[name="description"]');t||(t=document.createElement("meta"),t.setAttribute("name","description"),document.head.appendChild(t)),t.setAttribute("content",e.description)},[e.title,e.description])},tu="application/json",oo=({pageConfig:e,siteConfig:t,menuConfig:r,selectedId:n,onReorder:o,scrollToSectionId:i,onActiveSectionChange:s})=>{var b,g;eu(e.meta);const[a,l]=j.useState(null),c=j.useRef({}),d=j.useRef(s);d.current=s;const u=x=>{var k;(k=d.current)==null||k.call(d,x)};j.useEffect(()=>{if(!i)return;const x=c.current[i];x&&x.scrollIntoView({behavior:"smooth",block:"center"})},[i]),j.useEffect(()=>{if(!d.current)return;const k=[...t.header?[t.header.id]:[],...e.sections.map(A=>A.id),...t.footer?[t.footer.id]:[]],_=new IntersectionObserver(A=>{A.forEach(D=>{var R;if(D.isIntersecting&&D.intersectionRatio>.5){const F=D.target.getAttribute("data-section-id");F&&((R=d.current)==null||R.call(d,F))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let C=!1;const I=requestAnimationFrame(()=>{C||k.forEach(A=>{const D=c.current[A];D&&_.observe(D)})});return()=>{C=!0,cancelAnimationFrame(I),_.disconnect()}},[e.sections,(b=t.header)==null?void 0:b.id,(g=t.footer)==null?void 0:g.id]);const m=(x,k)=>{x.preventDefault(),x.dataTransfer.dropEffect="move",l(k)},f=()=>{l(null)},v=(x,k)=>{if(x.preventDefault(),l(null),!!o)try{const _=x.dataTransfer.getData(tu),{sectionId:C}=JSON.parse(_);typeof C=="string"&&o(C,k)}catch{}},h=()=>{const x=typeof o=="function",k=e.sections.map((_,C)=>{const I=a===C;return x?p.jsxs("div",{ref:A=>{c.current[_.id]=A},"data-section-id":_.id,style:{position:"relative"},onMouseEnter:()=>u(_.id),children:[p.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:I?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:I?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:A=>m(A,C),onDragLeave:f,onDrop:A=>v(A,C)}),p.jsx(fr,{section:_,selectedId:n,reorderable:!0,sectionIndex:C,totalSections:e.sections.length,onReorder:o})]},_.id):p.jsx("div",{ref:A=>{c.current[_.id]=A},"data-section-id":_.id,onMouseEnter:()=>u(_.id),children:p.jsx(fr,{section:_,selectedId:n})},_.id)});if(x&&k.length>0){const _=e.sections.length,C=a===_;k.push(p.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:C?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:C?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:I=>m(I,_),onDragLeave:f,onDrop:I=>v(I,_)},"jp-drop-after-last"))}return k};return p.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[t.header!=null&&p.jsx("div",{ref:x=>{c.current[t.header.id]=x},"data-section-id":t.header.id,onMouseEnter:()=>u(t.header.id),children:p.jsx(fr,{section:t.header,menu:r.main,selectedId:n})}),p.jsx("main",{className:"flex-1",children:h()}),t.footer!=null&&p.jsx("div",{ref:x=>{c.current[t.footer.id]=x},"data-section-id":t.footer.id,onMouseEnter:()=>u(t.footer.id),children:p.jsx(fr,{section:t.footer,selectedId:n})})]})},Zr=({mode:e,tenantCss:t,adminCss:r,children:n})=>(j.useLayoutEffect(()=>{const o=`jp-theme-${e}`,i=e==="tenant"?t:r;if(!document.getElementById(o)&&i){const s=document.createElement("style");s.id=o,s.innerHTML=i,document.head.appendChild(s)}return()=>{const s=document.getElementById(o);s&&s.remove()}},[e,t,r]),p.jsx(p.Fragment,{children:n}));function ru(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return j.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const Gr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Mt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function io(e){return"nodeType"in e}function Le(e){var t,r;return e?Mt(e)?e:io(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function so(e){const{Document:t}=Le(e);return e instanceof t}function hr(e){return Mt(e)?!1:e instanceof Le(e).HTMLElement}function es(e){return e instanceof Le(e).SVGElement}function Ft(e){return e?Mt(e)?e.document:io(e)?so(e)?e:hr(e)||es(e)?e.ownerDocument:document:document:document}const Ke=Gr?j.useLayoutEffect:j.useEffect;function Kr(e){const t=j.useRef(e);return Ke(()=>{t.current=e}),j.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function nu(){const e=j.useRef(null),t=j.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=j.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function pr(e,t){t===void 0&&(t=[e]);const r=j.useRef(e);return Ke(()=>{r.current!==e&&(r.current=e)},t),r}function mr(e,t){const r=j.useRef();return j.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Xr(e){const t=Kr(e),r=j.useRef(null),n=j.useCallback(o=>{o!==r.current&&(t==null||t(o,r.current)),r.current=o},[]);return[r,n]}function qr(e){const t=j.useRef();return j.useEffect(()=>{t.current=e},[e]),t.current}let ao={};function gr(e,t){return j.useMemo(()=>{if(t)return t;const r=ao[e]==null?0:ao[e]+1;return ao[e]=r,e+"-"+r},[e,t])}function ts(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((i,s)=>{const a=Object.entries(s);for(const[l,c]of a){const d=i[l];d!=null&&(i[l]=d+e*c)}return i},{...t})}}const Bt=ts(1),br=ts(-1);function ou(e){return"clientX"in e&&"clientY"in e}function Jr(e){if(!e)return!1;const{KeyboardEvent:t}=Le(e.target);return t&&e instanceof t}function iu(e){if(!e)return!1;const{TouchEvent:t}=Le(e.target);return t&&e instanceof t}function Qr(e){if(iu(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return ou(e)?{x:e.clientX,y:e.clientY}:null}const gt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[gt.Translate.toString(e),gt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),rs="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function su(e){return e.matches(rs)?e:e.querySelector(rs)}const au={display:"none"};function lu(e){let{id:t,value:r}=e;return j.createElement("div",{id:t,style:au},r)}function cu(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return j.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function du(){const[e,t]=j.useState("");return{announce:j.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const ns=j.createContext(null);function uu(e){const t=j.useContext(ns);j.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function fu(){const[e]=j.useState(()=>new Set),t=j.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[j.useCallback(n=>{let{type:o,event:i}=n;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const hu={draggable:`
|
|
209
209
|
To pick up a draggable item, press the space bar.
|
|
210
210
|
While dragging, use the arrow keys to move the item.
|
|
211
211
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
212
|
-
`},au={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function lu(e){let{announcements:t=au,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=su}=e;const{announce:i,announcement:s}=nu(),a=mr("DndLiveRegion"),[l,c]=T.useState(!1);if(T.useEffect(()=>{c(!0)},[]),ou(T.useMemo(()=>({onDragStart(f){let{active:m}=f;i(t.onDragStart({active:m}))},onDragMove(f){let{active:m,over:u}=f;t.onDragMove&&i(t.onDragMove({active:m,over:u}))},onDragOver(f){let{active:m,over:u}=f;i(t.onDragOver({active:m,over:u}))},onDragEnd(f){let{active:m,over:u}=f;i(t.onDragEnd({active:m,over:u}))},onDragCancel(f){let{active:m,over:u}=f;i(t.onDragCancel({active:m,over:u}))}}),[i,t])),!l)return null;const d=T.createElement(T.Fragment,null,T.createElement(tu,{id:n,value:o.draggable}),T.createElement(ru,{id:a,announcement:s}));return r?ht.createPortal(d,r):d}var ze;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ze||(ze={}));function en(){}function ao(e,t){return T.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function cu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return T.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Ze=Object.freeze({x:0,y:0});function ts(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function du(e,t){const r=Qr(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function rs(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function uu(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function ns(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function os(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function is(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const fu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=is(t,t.left,t.top),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=ts(is(l),o);i.push({id:a,data:{droppableContainer:s,value:c}})}}return i.sort(rs)},hu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ns(t),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=ns(l),d=o.reduce((m,u,w)=>m+ts(c[w],u),0),f=Number((d/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:f}})}}return i.sort(rs)};function pu(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-n,a=i-r;if(n<o&&r<i){const l=t.width*t.height,c=e.width*e.height,d=s*a,f=d/(l+c-d);return Number(f.toFixed(4))}return 0}const mu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const i of n){const{id:s}=i,a=r.get(s);if(a){const l=pu(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort(uu)};function gu(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function ss(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ze}function bu(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...r})}}const vu=bu(1);function as(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function wu(e,t,r){const n=as(t);if(!n)return e;const{scaleX:o,scaleY:i,x:s,y:a}=n,l=e.left-s-(1-o)*parseFloat(r),c=e.top-a-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),d=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:d,height:f,top:c,right:l+d,bottom:c+f,left:l}}const xu={ignoreTransform:!1};function Ut(e,t){t===void 0&&(t=xu);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Re(e).getComputedStyle(e);c&&(r=wu(r,c,d))}const{top:n,left:o,width:i,height:s,bottom:a,right:l}=r;return{top:n,left:o,width:i,height:s,bottom:a,right:l}}function ls(e){return Ut(e,{ignoreTransform:!0})}function yu(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function ku(e,t){return t===void 0&&(t=Re(e).getComputedStyle(e)),t.position==="fixed"}function Su(e,t){t===void 0&&(t=Re(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?r.test(i):!1})}function tn(e,t){const r=[];function n(o){if(t!=null&&r.length>=t||!o)return r;if(io(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!fr(o)||qi(o)||r.includes(o))return r;const i=Re(e).getComputedStyle(o);return o!==e&&Su(o,i)&&r.push(o),ku(o,i)?r:n(o.parentNode)}return e?n(e):r}function cs(e){const[t]=tn(e,1);return t??null}function lo(e){return!Gr||!e?null:Lt(e)?e:oo(e)?io(e)||e===Ft(e).scrollingElement?window:fr(e)?e:null:null}function ds(e){return Lt(e)?e.scrollX:e.scrollLeft}function us(e){return Lt(e)?e.scrollY:e.scrollTop}function co(e){return{x:ds(e),y:us(e)}}var Te;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Te||(Te={}));function fs(e){return!Gr||!e?!1:e===document.scrollingElement}function hs(e){const t={x:0,y:0},r=fs(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:n,minScroll:t}}const _u={x:.2,y:.2};function Cu(e,t,r,n,o){let{top:i,left:s,right:a,bottom:l}=r;n===void 0&&(n=10),o===void 0&&(o=_u);const{isTop:c,isBottom:d,isLeft:f,isRight:m}=hs(e),u={x:0,y:0},w={x:0,y:0},h={height:t.height*o.y,width:t.width*o.x};return!c&&i<=t.top+h.height?(u.y=Te.Backward,w.y=n*Math.abs((t.top+h.height-i)/h.height)):!d&&l>=t.bottom-h.height&&(u.y=Te.Forward,w.y=n*Math.abs((t.bottom-h.height-l)/h.height)),!m&&a>=t.right-h.width?(u.x=Te.Forward,w.x=n*Math.abs((t.right-h.width-a)/h.width)):!f&&s<=t.left+h.width&&(u.x=Te.Backward,w.x=n*Math.abs((t.left+h.width-s)/h.width)),{direction:u,speed:w}}function Eu(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:r,right:n,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ps(e){return e.reduce((t,r)=>Bt(t,co(r)),Ze)}function Au(e){return e.reduce((t,r)=>t+ds(r),0)}function Nu(e){return e.reduce((t,r)=>t+us(r),0)}function ms(e,t){if(t===void 0&&(t=Ut),!e)return;const{top:r,left:n,bottom:o,right:i}=t(e);cs(e)&&(o<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const zu=[["x",["left","right"],Au],["y",["top","bottom"],Nu]];class uo{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=tn(r),o=ps(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of zu)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(n),d=o[i]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class br{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function ju(e){const{EventTarget:t}=Re(e);return e instanceof t?e:Ft(e)}function fo(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var $e;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})($e||($e={}));function gs(e){e.preventDefault()}function Tu(e){e.stopPropagation()}var xe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(xe||(xe={}));const bs={start:[xe.Space,xe.Enter],cancel:[xe.Esc],end:[xe.Space,xe.Enter,xe.Tab]},Ou=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case xe.Right:return{...r,x:r.x+25};case xe.Left:return{...r,x:r.x-25};case xe.Down:return{...r,y:r.y+25};case xe.Up:return{...r,y:r.y-25}}};class ho{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new br(Ft(r)),this.windowListeners=new br(Re(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add($e.Resize,this.handleCancel),this.windowListeners.add($e.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add($e.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&ms(n),r(Ze)}handleKeyDown(t){if(Jr(t)){const{active:r,context:n,options:o}=this.props,{keyboardCodes:i=bs,coordinateGetter:s=Ou,scrollBehavior:a="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:Ze;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:r,context:n.current,currentCoordinates:d});if(f){const m=gr(f,d),u={x:0,y:0},{scrollableAncestors:w}=n.current;for(const h of w){const b=t.code,{isTop:v,isRight:x,isLeft:k,isBottom:S,maxScroll:C,minScroll:O}=hs(h),N=Eu(h),P={x:Math.min(b===xe.Right?N.right-N.width/2:N.right,Math.max(b===xe.Right?N.left:N.left+N.width/2,f.x)),y:Math.min(b===xe.Down?N.bottom-N.height/2:N.bottom,Math.max(b===xe.Down?N.top:N.top+N.height/2,f.y))},D=b===xe.Right&&!x||b===xe.Left&&!k,W=b===xe.Down&&!S||b===xe.Up&&!v;if(D&&P.x!==f.x){const G=h.scrollLeft+m.x,z=b===xe.Right&&G<=C.x||b===xe.Left&&G>=O.x;if(z&&!m.y){h.scrollTo({left:G,behavior:a});return}z?u.x=h.scrollLeft-G:u.x=b===xe.Right?h.scrollLeft-C.x:h.scrollLeft-O.x,u.x&&h.scrollBy({left:-u.x,behavior:a});break}else if(W&&P.y!==f.y){const G=h.scrollTop+m.y,z=b===xe.Down&&G<=C.y||b===xe.Up&&G>=O.y;if(z&&!m.x){h.scrollTo({top:G,behavior:a});return}z?u.y=h.scrollTop-G:u.y=b===xe.Down?h.scrollTop-C.y:h.scrollTop-O.y,u.y&&h.scrollBy({top:-u.y,behavior:a});break}}this.handleMove(t,Bt(gr(f,this.referenceCoordinates),u))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}ho.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=bs,onActivation:o}=t,{active:i}=r;const{code:s}=e.nativeEvent;if(n.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function vs(e){return!!(e&&"distance"in e)}function ws(e){return!!(e&&"delay"in e)}class po{constructor(t,r,n){var o;n===void 0&&(n=ju(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:i}=t,{target:s}=i;this.props=t,this.events=r,this.document=Ft(s),this.documentListeners=new br(this.document),this.listeners=new br(n),this.windowListeners=new br(Re(s)),this.initialCoordinates=(o=Qr(i))!=null?o:Ze,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add($e.Resize,this.handleCancel),this.windowListeners.add($e.DragStart,gs),this.windowListeners.add($e.VisibilityChange,this.handleCancel),this.windowListeners.add($e.ContextMenu,gs),this.documentListeners.add($e.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ws(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(vs(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add($e.Click,Tu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add($e.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const l=(r=Qr(t))!=null?r:Ze,c=gr(o,l);if(!n&&a){if(vs(a)){if(a.tolerance!=null&&fo(c,a.tolerance))return this.handleCancel();if(fo(c,a.distance))return this.handleStart()}if(ws(a)&&fo(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===xe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Pu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class mo extends po{constructor(t){const{event:r}=t,n=Ft(r.target);super(t,Pu,n)}}mo.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const Iu={move:{name:"mousemove"},end:{name:"mouseup"}};var go;(function(e){e[e.RightClick=2]="RightClick"})(go||(go={}));class Du extends po{constructor(t){super(t,Iu,Ft(t.event.target))}}Du.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===go.RightClick?!1:(n==null||n({event:r}),!0)}}];const bo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class xs extends po{constructor(t){super(t,bo)}static setup(){return window.addEventListener(bo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(bo.move.name,t)};function t(){}}}xs.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:o}=r;return o.length>1?!1:(n==null||n({event:r}),!0)}}];var vr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(vr||(vr={}));var rn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(rn||(rn={}));function Ru(e){let{acceleration:t,activator:r=vr.Pointer,canScroll:n,draggingRect:o,enabled:i,interval:s=5,order:a=rn.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:m}=e;const u=Lu({delta:f,disabled:!i}),[w,h]=Xd(),b=T.useRef({x:0,y:0}),v=T.useRef({x:0,y:0}),x=T.useMemo(()=>{switch(r){case vr.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case vr.DraggableRect:return o}},[r,o,l]),k=T.useRef(null),S=T.useCallback(()=>{const O=k.current;if(!O)return;const N=b.current.x*v.current.x,P=b.current.y*v.current.y;O.scrollBy(N,P)},[]),C=T.useMemo(()=>a===rn.TreeOrder?[...c].reverse():c,[a,c]);T.useEffect(()=>{if(!i||!c.length||!x){h();return}for(const O of C){if((n==null?void 0:n(O))===!1)continue;const N=c.indexOf(O),P=d[N];if(!P)continue;const{direction:D,speed:W}=Cu(O,P,x,t,m);for(const G of["x","y"])u[G][D[G]]||(W[G]=0,D[G]=0);if(W.x>0||W.y>0){h(),k.current=O,w(S,s),b.current=W,v.current=D;return}}b.current={x:0,y:0},v.current={x:0,y:0},h()},[t,S,n,h,i,s,JSON.stringify(x),JSON.stringify(u),w,c,C,d,JSON.stringify(m)])}const Mu={x:{[Te.Backward]:!1,[Te.Forward]:!1},y:{[Te.Backward]:!1,[Te.Forward]:!1}};function Lu(e){let{delta:t,disabled:r}=e;const n=qr(t);return pr(o=>{if(r||!n||!o)return Mu;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Te.Backward]:o.x[Te.Backward]||i.x===-1,[Te.Forward]:o.x[Te.Forward]||i.x===1},y:{[Te.Backward]:o.y[Te.Backward]||i.y===-1,[Te.Forward]:o.y[Te.Forward]||i.y===1}}},[r,t,n])}function Fu(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return pr(o=>{var i;return t==null?null:(i=n??o)!=null?i:null},[n,t])}function Bu(e,t){return T.useMemo(()=>e.reduce((r,n)=>{const{sensor:o}=n,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,n)}));return[...r,...i]},[]),[e,t])}var wr;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(wr||(wr={}));var vo;(function(e){e.Optimized="optimized"})(vo||(vo={}));const ys=new Map;function Uu(e,t){let{dragging:r,dependencies:n,config:o}=t;const[i,s]=T.useState(null),{frequency:a,measure:l,strategy:c}=o,d=T.useRef(e),f=b(),m=hr(f),u=T.useCallback(function(v){v===void 0&&(v=[]),!m.current&&s(x=>x===null?v:x.concat(v.filter(k=>!x.includes(k))))},[m]),w=T.useRef(null),h=pr(v=>{if(f&&!r)return ys;if(!v||v===ys||d.current!==e||i!=null){const x=new Map;for(let k of e){if(!k)continue;if(i&&i.length>0&&!i.includes(k.id)&&k.rect.current){x.set(k.id,k.rect.current);continue}const S=k.node.current,C=S?new uo(l(S),S):null;k.rect.current=C,C&&x.set(k.id,C)}return x}return v},[e,i,r,f,l]);return T.useEffect(()=>{d.current=e},[e]),T.useEffect(()=>{f||u()},[r,f]),T.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),T.useEffect(()=>{f||typeof a!="number"||w.current!==null||(w.current=setTimeout(()=>{u(),w.current=null},a))},[a,f,u,...n]),{droppableRects:h,measureDroppableContainers:u,measuringScheduled:i!=null};function b(){switch(c){case wr.Always:return!1;case wr.BeforeDragging:return r;default:return!r}}}function wo(e,t){return pr(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Wu(e,t){return wo(e,t)}function $u(e){let{callback:t,disabled:r}=e;const n=Zr(t),o=T.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return T.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function nn(e){let{callback:t,disabled:r}=e;const n=Zr(t),o=T.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return T.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Hu(e){return new uo(Ut(e),e)}function ks(e,t,r){t===void 0&&(t=Hu);const[n,o]=T.useState(null);function i(){o(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??r)!=null?c:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const s=$u({callback(l){if(e)for(const c of l){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),a=nn({callback:i});return Ge(()=>{i(),e?(a==null||a.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),s==null||s.disconnect())},[e]),n}function Vu(e){const t=wo(e);return ss(e,t)}const Ss=[];function Yu(e){const t=T.useRef(e),r=pr(n=>e?n&&n!==Ss&&e&&t.current&&e.parentNode===t.current.parentNode?n:tn(e):Ss,[e]);return T.useEffect(()=>{t.current=e},[e]),r}function Ku(e){const[t,r]=T.useState(null),n=T.useRef(e),o=T.useCallback(i=>{const s=lo(i.target);s&&r(a=>a?(a.set(s,co(s)),new Map(a)):null)},[]);return T.useEffect(()=>{const i=n.current;if(e!==i){s(i);const a=e.map(l=>{const c=lo(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,co(c)]):null}).filter(l=>l!=null);r(a.length?new Map(a):null),n.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const c=lo(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),T.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>Bt(i,s),Ze):ps(e):Ze,[e,t])}function _s(e,t){t===void 0&&(t=[]);const r=T.useRef(null);return T.useEffect(()=>{r.current=null},t),T.useEffect(()=>{const n=e!==Ze;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?gr(e,r.current):Ze}function Gu(e){T.useEffect(()=>{if(!Gr)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function Zu(e,t){return T.useMemo(()=>e.reduce((r,n)=>{let{eventName:o,handler:i}=n;return r[o]=s=>{i(s,t)},r},{}),[e,t])}function Cs(e){return T.useMemo(()=>e?yu(e):null,[e])}const Es=[];function Xu(e,t){t===void 0&&(t=Ut);const[r]=e,n=Cs(r?Re(r):null),[o,i]=T.useState(Es);function s(){i(()=>e.length?e.map(l=>fs(l)?n:new uo(t(l),l)):Es)}const a=nn({callback:s});return Ge(()=>{a==null||a.disconnect(),s(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),o}function As(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fr(t)?t:e}function qu(e){let{measure:t}=e;const[r,n]=T.useState(null),o=T.useCallback(c=>{for(const{target:d}of c)if(fr(d)){n(f=>{const m=t(d);return f?{...f,width:m.width,height:m.height}:m});break}},[t]),i=nn({callback:o}),s=T.useCallback(c=>{const d=As(c);i==null||i.disconnect(),d&&(i==null||i.observe(d)),n(d?t(d):null)},[t,i]),[a,l]=Xr(s);return T.useMemo(()=>({nodeRef:a,rect:r,setRef:l}),[r,a,l])}const Ju=[{sensor:mo,options:{}},{sensor:ho,options:{}}],Qu={current:{}},on={draggable:{measure:ls},droppable:{measure:ls,strategy:wr.WhileDragging,frequency:vo.Optimized},dragOverlay:{measure:Ut}};class xr extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const ef={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new xr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:en},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:on,measureDroppableContainers:en,windowRect:null,measuringScheduled:!1},Ns={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:en,draggableNodes:new Map,over:null,measureDroppableContainers:en},yr=T.createContext(Ns),zs=T.createContext(ef);function tf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new xr}}}function rf(e,t){switch(t.type){case ze.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ze.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ze.DragEnd:case ze.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ze.RegisterDroppable:{const{element:r}=t,{id:n}=r,o=new xr(e.droppable.containers);return o.set(n,r),{...e,droppable:{...e.droppable,containers:o}}}case ze.SetDroppableDisabled:{const{id:r,key:n,disabled:o}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const s=new xr(e.droppable.containers);return s.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case ze.UnregisterDroppable:{const{id:r,key:n}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const i=new xr(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function nf(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:o}=T.useContext(yr),i=qr(n),s=qr(r==null?void 0:r.id);return T.useEffect(()=>{if(!t&&!n&&i&&s!=null){if(!Jr(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const f=Qd(d);if(f){f.focus();break}}})}},[n,t,o,s,i]),null}function js(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...n}),r):r}function of(e){return T.useMemo(()=>({draggable:{...on.draggable,...e==null?void 0:e.draggable},droppable:{...on.droppable,...e==null?void 0:e.droppable},dragOverlay:{...on.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function sf(e){let{activeNode:t,measure:r,initialRect:n,config:o=!0}=e;const i=T.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Ge(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!n)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=r(c),f=ss(d,n);if(s||(f.x=0),a||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const m=cs(c);m&&m.scrollBy({top:f.y,left:f.x})}},[t,s,a,n,r])}const sn=T.createContext({...Ze,scaleX:1,scaleY:1});var bt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(bt||(bt={}));const af=T.memo(function(t){var r,n,o,i;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:d=Ju,collisionDetection:f=mu,measuring:m,modifiers:u,...w}=t;const h=T.useReducer(rf,void 0,tf),[b,v]=h,[x,k]=iu(),[S,C]=T.useState(bt.Uninitialized),O=S===bt.Initialized,{draggable:{active:N,nodes:P,translate:D},droppable:{containers:W}}=b,G=N!=null?P.get(N):null,z=T.useRef({initial:null,translated:null}),L=T.useMemo(()=>{var Ae;return N!=null?{id:N,data:(Ae=G==null?void 0:G.data)!=null?Ae:Qu,rect:z}:null},[N,G]),y=T.useRef(null),[$,X]=T.useState(null),[H,V]=T.useState(null),Y=hr(w,Object.values(w)),Q=mr("DndDescribedBy",s),j=T.useMemo(()=>W.getEnabled(),[W]),I=of(m),{droppableRects:K,measureDroppableContainers:Z,measuringScheduled:te}=Uu(j,{dragging:O,dependencies:[D.x,D.y],config:I.droppable}),ue=Fu(P,N),ee=T.useMemo(()=>H?Qr(H):null,[H]),ie=Kn(),se=Wu(ue,I.draggable.measure);sf({activeNode:N!=null?P.get(N):null,config:ie.layoutShiftCompensation,initialRect:se,measure:I.draggable.measure});const oe=ks(ue,I.draggable.measure,se),le=ks(ue?ue.parentElement:null),fe=T.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:K,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:W,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),we=W.getNodeFor((r=fe.current.over)==null?void 0:r.id),g=qu({measure:I.dragOverlay.measure}),F=(n=g.nodeRef.current)!=null?n:ue,U=O?(o=g.rect)!=null?o:oe:null,E=!!(g.nodeRef.current&&g.rect),A=Vu(E?null:oe),R=Cs(F?Re(F):null),q=Yu(O?we??ue:null),B=Xu(q),M=js(u,{transform:{x:D.x-A.x,y:D.y-A.y,scaleX:1,scaleY:1},activatorEvent:H,active:L,activeNodeRect:oe,containerNodeRect:le,draggingNodeRect:U,over:fe.current.over,overlayNodeRect:g.rect,scrollableAncestors:q,scrollableAncestorRects:B,windowRect:R}),J=ee?Bt(ee,D):null,ne=Ku(q),re=_s(ne),ae=_s(ne,[oe]),he=Bt(M,re),me=U?vu(U,M):null,ve=L&&me?f({active:L,collisionRect:me,droppableRects:K,droppableContainers:j,pointerCoordinates:J}):null,it=os(ve,"id"),[je,_t]=T.useState(null),Ee=E?M:Bt(M,ae),ir=gu(Ee,(i=je==null?void 0:je.rect)!=null?i:null,oe),Pt=T.useRef(null),Ve=T.useCallback((Ae,Oe)=>{let{sensor:Ue,options:Ct}=Oe;if(y.current==null)return;const Ye=P.get(y.current);if(!Ye)return;const We=Ae.nativeEvent,st=new Ue({active:y.current,activeNode:Ye,event:We,options:Ct,context:fe,onAbort(Ie){if(!P.get(Ie))return;const{onDragAbort:at}=Y.current,ft={id:Ie};at==null||at(ft),x({type:"onDragAbort",event:ft})},onPending(Ie,Et,at,ft){if(!P.get(Ie))return;const{onDragPending:Ir}=Y.current,At={id:Ie,constraint:Et,initialCoordinates:at,offset:ft};Ir==null||Ir(At),x({type:"onDragPending",event:At})},onStart(Ie){const Et=y.current;if(Et==null)return;const at=P.get(Et);if(!at)return;const{onDragStart:ft}=Y.current,Pr={activatorEvent:We,active:{id:Et,data:at.data,rect:z}};ht.unstable_batchedUpdates(()=>{ft==null||ft(Pr),C(bt.Initializing),v({type:ze.DragStart,initialCoordinates:Ie,active:Et}),x({type:"onDragStart",event:Pr}),X(Pt.current),V(We)})},onMove(Ie){v({type:ze.DragMove,coordinates:Ie})},onEnd:sr(ze.DragEnd),onCancel:sr(ze.DragCancel)});Pt.current=st;function sr(Ie){return async function(){const{active:at,collisions:ft,over:Pr,scrollAdjustedTranslate:Ir}=fe.current;let At=null;if(at&&Ir){const{cancelDrop:Dr}=Y.current;At={activatorEvent:We,active:at,collisions:ft,delta:Ir,over:Pr},Ie===ze.DragEnd&&typeof Dr=="function"&&await Promise.resolve(Dr(At))&&(Ie=ze.DragCancel)}y.current=null,ht.unstable_batchedUpdates(()=>{v({type:Ie}),C(bt.Uninitialized),_t(null),X(null),V(null),Pt.current=null;const Dr=Ie===ze.DragEnd?"onDragEnd":"onDragCancel";if(At){const pi=Y.current[Dr];pi==null||pi(At),x({type:Dr,event:At})}})}}},[P]),Vn=T.useCallback((Ae,Oe)=>(Ue,Ct)=>{const Ye=Ue.nativeEvent,We=P.get(Ct);if(y.current!==null||!We||Ye.dndKit||Ye.defaultPrevented)return;const st={active:We};Ae(Ue,Oe.options,st)===!0&&(Ye.dndKit={capturedBy:Oe.sensor},y.current=Ct,Ve(Ue,Oe))},[P,Ve]),Yn=Bu(d,Vn);Gu(d),Ge(()=>{oe&&S===bt.Initializing&&C(bt.Initialized)},[oe,S]),T.useEffect(()=>{const{onDragMove:Ae}=Y.current,{active:Oe,activatorEvent:Ue,collisions:Ct,over:Ye}=fe.current;if(!Oe||!Ue)return;const We={active:Oe,activatorEvent:Ue,collisions:Ct,delta:{x:he.x,y:he.y},over:Ye};ht.unstable_batchedUpdates(()=>{Ae==null||Ae(We),x({type:"onDragMove",event:We})})},[he.x,he.y]),T.useEffect(()=>{const{active:Ae,activatorEvent:Oe,collisions:Ue,droppableContainers:Ct,scrollAdjustedTranslate:Ye}=fe.current;if(!Ae||y.current==null||!Oe||!Ye)return;const{onDragOver:We}=Y.current,st=Ct.get(it),sr=st&&st.rect.current?{id:st.id,rect:st.rect.current,data:st.data,disabled:st.disabled}:null,Ie={active:Ae,activatorEvent:Oe,collisions:Ue,delta:{x:Ye.x,y:Ye.y},over:sr};ht.unstable_batchedUpdates(()=>{_t(sr),We==null||We(Ie),x({type:"onDragOver",event:Ie})})},[it]),Ge(()=>{fe.current={activatorEvent:H,active:L,activeNode:ue,collisionRect:me,collisions:ve,droppableRects:K,draggableNodes:P,draggingNode:F,draggingNodeRect:U,droppableContainers:W,over:je,scrollableAncestors:q,scrollAdjustedTranslate:he},z.current={initial:U,translated:me}},[L,ue,ve,me,P,F,U,K,W,je,q,he]),Ru({...ie,delta:D,draggingRect:me,pointerCoordinates:J,scrollableAncestors:q,scrollableAncestorRects:B});const fi=T.useMemo(()=>({active:L,activeNode:ue,activeNodeRect:oe,activatorEvent:H,collisions:ve,containerNodeRect:le,dragOverlay:g,draggableNodes:P,droppableContainers:W,droppableRects:K,over:je,measureDroppableContainers:Z,scrollableAncestors:q,scrollableAncestorRects:B,measuringConfiguration:I,measuringScheduled:te,windowRect:R}),[L,ue,oe,H,ve,le,g,P,W,K,je,Z,q,B,I,te,R]),hi=T.useMemo(()=>({activatorEvent:H,activators:Yn,active:L,activeNodeRect:oe,ariaDescribedById:{draggable:Q},dispatch:v,draggableNodes:P,over:je,measureDroppableContainers:Z}),[H,Yn,L,oe,v,Q,P,je,Z]);return T.createElement(es.Provider,{value:k},T.createElement(yr.Provider,{value:hi},T.createElement(zs.Provider,{value:fi},T.createElement(sn.Provider,{value:ir},c)),T.createElement(nf,{disabled:(a==null?void 0:a.restoreFocus)===!1})),T.createElement(lu,{...a,hiddenTextDescribedById:Q}));function Kn(){const Ae=($==null?void 0:$.autoScrollEnabled)===!1,Oe=typeof l=="object"?l.enabled===!1:l===!1,Ue=O&&!Ae&&!Oe;return typeof l=="object"?{...l,enabled:Ue}:{enabled:Ue}}}),lf=T.createContext(null),Ts="button",cf="Draggable";function df(e){let{id:t,data:r,disabled:n=!1,attributes:o}=e;const i=mr(cf),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:m}=T.useContext(yr),{role:u=Ts,roleDescription:w="draggable",tabIndex:h=0}=o??{},b=(l==null?void 0:l.id)===t,v=T.useContext(b?sn:lf),[x,k]=Xr(),[S,C]=Xr(),O=Zu(s,t),N=hr(r);Ge(()=>(f.set(t,{id:t,key:i,node:x,activatorNode:S,data:N}),()=>{const D=f.get(t);D&&D.key===i&&f.delete(t)}),[f,t]);const P=T.useMemo(()=>({role:u,tabIndex:h,"aria-disabled":n,"aria-pressed":b&&u===Ts?!0:void 0,"aria-roledescription":w,"aria-describedby":d.draggable}),[n,u,h,b,w,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:P,isDragging:b,listeners:n?void 0:O,node:x,over:m,setNodeRef:k,setActivatorNodeRef:C,transform:v}}function Os(){return T.useContext(zs)}const uf="Droppable",ff={timeout:25};function hf(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e;const i=mr(uf),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=T.useContext(yr),d=T.useRef({disabled:r}),f=T.useRef(!1),m=T.useRef(null),u=T.useRef(null),{disabled:w,updateMeasurementsFor:h,timeout:b}={...ff,...o},v=hr(h??n),x=T.useCallback(()=>{if(!f.current){f.current=!0;return}u.current!=null&&clearTimeout(u.current),u.current=setTimeout(()=>{c(Array.isArray(v.current)?v.current:[v.current]),u.current=null},b)},[b]),k=nn({callback:x,disabled:w||!s}),S=T.useCallback((P,D)=>{k&&(D&&(k.unobserve(D),f.current=!1),P&&k.observe(P))},[k]),[C,O]=Xr(S),N=hr(t);return T.useEffect(()=>{!k||!C.current||(k.disconnect(),f.current=!1,k.observe(C.current))},[C,k]),T.useEffect(()=>(a({type:ze.RegisterDroppable,element:{id:n,key:i,disabled:r,node:C,rect:m,data:N}}),()=>a({type:ze.UnregisterDroppable,key:i,id:n})),[n]),T.useEffect(()=>{r!==d.current.disabled&&(a({type:ze.SetDroppableDisabled,id:n,key:i,disabled:r}),d.current.disabled=r)},[n,i,r,a]),{active:s,rect:m,isOver:(l==null?void 0:l.id)===n,node:C,over:l,setNodeRef:O}}function pf(e){let{animation:t,children:r}=e;const[n,o]=T.useState(null),[i,s]=T.useState(null),a=qr(r);return!r&&!n&&a&&o(a),Ge(()=>{if(!i)return;const l=n==null?void 0:n.key,c=n==null?void 0:n.props.id;if(l==null||c==null){o(null);return}Promise.resolve(t(c,i)).then(()=>{o(null)})},[t,n,i]),T.createElement(T.Fragment,null,r,n?T.cloneElement(n,{ref:s}):null)}const mf={x:0,y:0,scaleX:1,scaleY:1};function gf(e){let{children:t}=e;return T.createElement(yr.Provider,{value:Ns},T.createElement(sn.Provider,{value:mf},t))}const bf={position:"fixed",touchAction:"none"},vf=e=>Jr(e)?"transform 250ms ease":void 0,wf=T.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:o,children:i,className:s,rect:a,style:l,transform:c,transition:d=vf}=e;if(!a)return null;const f=o?c:{...c,scaleX:1,scaleY:1},m={...bf,width:a.width,height:a.height,top:a.top,left:a.left,transform:gt.Transform.toString(f),transformOrigin:o&&n?du(n,a):void 0,transition:typeof d=="function"?d(n):d,...l};return T.createElement(r,{className:s,style:m,ref:t},i)}),xf={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:r}}=e;return[{transform:gt.Transform.toString(t)},{transform:gt.Transform.toString(r)}]},sideEffects:(e=>t=>{let{active:r,dragOverlay:n}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(o[a]=r.node.style.getPropertyValue(a),r.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&n.node.style.setProperty(a,l);return s!=null&&s.active&&r.node.classList.add(s.active),s!=null&&s.dragOverlay&&n.node.classList.add(s.dragOverlay),function(){for(const[l,c]of Object.entries(o))r.node.style.setProperty(l,c);s!=null&&s.active&&r.node.classList.remove(s.active)}})({styles:{active:{opacity:"0"}}})};function yf(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:o}=e;return Zr((i,s)=>{if(t===null)return;const a=r.get(i);if(!a)return;const l=a.node.current;if(!l)return;const c=As(s);if(!c)return;const{transform:d}=Re(s).getComputedStyle(s),f=as(d);if(!f)return;const m=typeof t=="function"?t:kf(t);return ms(l,o.draggable.measure),m({active:{id:i,data:a.data,node:l,rect:o.draggable.measure(l)},draggableNodes:r,dragOverlay:{node:s,rect:o.dragOverlay.measure(c)},droppableContainers:n,measuringConfiguration:o,transform:f})})}function kf(e){const{duration:t,easing:r,sideEffects:n,keyframes:o}={...xf,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...c}=i;if(!t)return;const d={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},f={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},m={x:l.x-d.x,y:l.y-d.y,...f},u=o({...c,active:s,dragOverlay:a,transform:{initial:l,final:m}}),[w]=u,h=u[u.length-1];if(JSON.stringify(w)===JSON.stringify(h))return;const b=n==null?void 0:n({active:s,dragOverlay:a,...c}),v=a.node.animate(u,{duration:t,easing:r,fill:"forwards"});return new Promise(x=>{v.onfinish=()=>{b==null||b(),x()}})}}let Ps=0;function Sf(e){return T.useMemo(()=>{if(e!=null)return Ps++,Ps},[e])}const _f=T.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:c=999}=e;const{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:u,draggableNodes:w,droppableContainers:h,dragOverlay:b,over:v,measuringConfiguration:x,scrollableAncestors:k,scrollableAncestorRects:S,windowRect:C}=Os(),O=T.useContext(sn),N=Sf(f==null?void 0:f.id),P=js(s,{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:u,draggingNodeRect:b.rect,over:v,overlayNodeRect:b.rect,scrollableAncestors:k,scrollableAncestorRects:S,transform:O,windowRect:C}),D=wo(m),W=yf({config:n,draggableNodes:w,droppableContainers:h,measuringConfiguration:x}),G=D?b.setRef:void 0;return T.createElement(gf,null,T.createElement(pf,{animation:W},f&&N?T.createElement(wf,{key:N,id:f.id,ref:G,as:a,activatorEvent:d,adjustScale:t,className:l,transition:i,rect:D,style:{zIndex:c,...o},transform:P},r):null))}),Cf=e=>{let{transform:t}=e;return{...t,x:0}};function Is(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Ef(e,t){return e.reduce((r,n,o)=>{const i=t.get(n);return i&&(r[o]=i),r},Array(e.length))}function an(e){return e!==null&&e>=0}function Af(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Nf(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Ds=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const i=Is(t,n,r),s=t[o],a=i[o];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},ln={scaleX:1,scaleY:1},zf=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:o,rects:i,overIndex:s}=e;const a=(t=i[r])!=null?t:n;if(!a)return null;if(o===r){const c=i[s];return c?{x:0,y:r<s?c.top+c.height-(a.top+a.height):c.top-a.top,...ln}:null}const l=jf(i,o,r);return o>r&&o<=s?{x:0,y:-a.height-l,...ln}:o<r&&o>=s?{x:0,y:a.height+l,...ln}:{x:0,y:0,...ln}};function jf(e,t,r){const n=e[t],o=e[t-1],i=e[t+1];return n?r<t?o?n.top-(o.top+o.height):i?i.top-(n.top+n.height):0:i?i.top-(n.top+n.height):o?n.top-(o.top+o.height):0:0}const Rs="Sortable",Ms=T.createContext({activeIndex:-1,containerId:Rs,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ds,disabled:{draggable:!1,droppable:!1}});function Tf(e){let{children:t,id:r,items:n,strategy:o=Ds,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:d}=Os(),f=mr(Rs,r),m=a.rect!==null,u=T.useMemo(()=>n.map(O=>typeof O=="object"&&"id"in O?O.id:O),[n]),w=s!=null,h=s?u.indexOf(s.id):-1,b=c?u.indexOf(c.id):-1,v=T.useRef(u),x=!Af(u,v.current),k=b!==-1&&h===-1||x,S=Nf(i);Ge(()=>{x&&w&&d(u)},[x,u,w,d]),T.useEffect(()=>{v.current=u},[u]);const C=T.useMemo(()=>({activeIndex:h,containerId:f,disabled:S,disableTransforms:k,items:u,overIndex:b,useDragOverlay:m,sortedRects:Ef(u,l),strategy:o}),[h,f,S.draggable,S.droppable,k,u,b,l,m,o]);return T.createElement(Ms.Provider,{value:C},t)}const Of=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return Is(r,n,o).indexOf(t)},Pf=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!n||a!==i&&o===s?!1:r?!0:s!==o&&t===l},If={duration:200,easing:"ease"},Ls="transform",Df=gt.Transition.toString({property:Ls,duration:0,easing:"linear"}),Rf={roleDescription:"sortable"};function Mf(e){let{disabled:t,index:r,node:n,rect:o}=e;const[i,s]=T.useState(null),a=T.useRef(r);return Ge(()=>{if(!t&&r!==a.current&&n.current){const l=o.current;if(l){const c=Ut(n.current,{ignoreTransform:!0}),d={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(d.x||d.y)&&s(d)}}r!==a.current&&(a.current=r)},[t,r,n,o]),T.useEffect(()=>{i&&s(null)},[i]),i}function Lf(e){let{animateLayoutChanges:t=Pf,attributes:r,disabled:n,data:o,getNewIndex:i=Of,id:s,strategy:a,resizeObserverConfig:l,transition:c=If}=e;const{items:d,containerId:f,activeIndex:m,disabled:u,disableTransforms:w,sortedRects:h,overIndex:b,useDragOverlay:v,strategy:x}=T.useContext(Ms),k=Ff(n,u),S=d.indexOf(s),C=T.useMemo(()=>({sortable:{containerId:f,index:S,items:d},...o}),[f,o,S,d]),O=T.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:N,node:P,isOver:D,setNodeRef:W}=hf({id:s,data:C,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...l}}),{active:G,activatorEvent:z,activeNodeRect:L,attributes:y,setNodeRef:$,listeners:X,isDragging:H,over:V,setActivatorNodeRef:Y,transform:Q}=df({id:s,data:C,attributes:{...Rf,...r},disabled:k.draggable}),j=Zd(W,$),I=!!G,K=I&&!w&&an(m)&&an(b),Z=!v&&H,te=Z&&K?Q:null,ee=K?te??(a??x)({rects:h,activeNodeRect:L,activeIndex:m,overIndex:b,index:S}):null,ie=an(m)&&an(b)?i({id:s,items:d,activeIndex:m,overIndex:b}):S,se=G==null?void 0:G.id,oe=T.useRef({activeId:se,items:d,newIndex:ie,containerId:f}),le=d!==oe.current.items,fe=t({active:G,containerId:f,isDragging:H,isSorting:I,id:s,index:S,items:d,newIndex:oe.current.newIndex,previousItems:oe.current.items,previousContainerId:oe.current.containerId,transition:c,wasDragging:oe.current.activeId!=null}),we=Mf({disabled:!fe,index:S,node:P,rect:N});return T.useEffect(()=>{I&&oe.current.newIndex!==ie&&(oe.current.newIndex=ie),f!==oe.current.containerId&&(oe.current.containerId=f),d!==oe.current.items&&(oe.current.items=d)},[I,ie,f,d]),T.useEffect(()=>{if(se===oe.current.activeId)return;if(se!=null&&oe.current.activeId==null){oe.current.activeId=se;return}const F=setTimeout(()=>{oe.current.activeId=se},50);return()=>clearTimeout(F)},[se]),{active:G,activeIndex:m,attributes:y,data:C,rect:N,index:S,newIndex:ie,items:d,isOver:D,isSorting:I,isDragging:H,listeners:X,node:P,overIndex:b,over:V,setNodeRef:j,setActivatorNodeRef:Y,setDroppableNodeRef:W,setDraggableNodeRef:$,transform:we??ee,transition:g()};function g(){if(we||le&&oe.current.newIndex===S)return Df;if(!(Z&&!Jr(z)||!c)&&(I||fe))return gt.Transition.toString({...c,property:Ls})}}function Ff(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function cn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Bf=[xe.Down,xe.Right,xe.Up,xe.Left],Uf=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:a}}=t;if(Bf.includes(e.code)){if(e.preventDefault(),!r||!n)return;const l=[];i.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const m=o.get(f.id);if(m)switch(e.code){case xe.Down:n.top<m.top&&l.push(f);break;case xe.Up:n.top>m.top&&l.push(f);break;case xe.Left:n.left>m.left&&l.push(f);break;case xe.Right:n.left<m.left&&l.push(f);break}});const c=hu({collisionRect:n,droppableRects:o,droppableContainers:l});let d=os(c,"id");if(d===(s==null?void 0:s.id)&&c.length>1&&(d=c[1].id),d!=null){const f=i.get(r.id),m=i.get(d),u=m?o.get(m.id):null,w=m==null?void 0:m.node.current;if(w&&u&&f&&m){const b=tn(w).some((O,N)=>a[N]!==O),v=Fs(f,m),x=Wf(f,m),k=b||!v?{x:0,y:0}:{x:x?n.width-u.width:0,y:x?n.height-u.height:0},S={x:u.left,y:u.top};return k.x&&k.y?S:gr(S,k)}}}};function Fs(e,t){return!cn(e)||!cn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Wf(e,t){return!cn(e)||!cn(t)||!Fs(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function xo({className:e,type:t,...r}){return p.jsx("input",{type:t,className:pe("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 $f({className:e,...t}){return p.jsx("textarea",{className:pe("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),...t})}function Hf({className:e,checked:t,onCheckedChange:r,...n}){return p.jsx("input",{type:"checkbox",checked:t,onChange:o=>r==null?void 0:r(o.target.checked),className:pe("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...n})}function zt({className:e,...t}){return p.jsx("label",{className:pe("text-sm font-medium leading-none select-none",e),...t})}function yo(e,[t,r]){return Math.min(r,Math.max(t,e))}function be(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Wt(e,t=[]){let r=[];function n(i,s){const a=_.createContext(s),l=r.length;r=[...r,s];const c=f=>{var v;const{scope:m,children:u,...w}=f,h=((v=m==null?void 0:m[e])==null?void 0:v[l])||a,b=_.useMemo(()=>w,Object.values(w));return p.jsx(h.Provider,{value:b,children:u})};c.displayName=i+"Provider";function d(f,m){var h;const u=((h=m==null?void 0:m[e])==null?void 0:h[l])||a,w=_.useContext(u);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=r.map(s=>_.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,Vf(o,...t)]}function Vf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((a,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...a,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Bs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Us(...e){return t=>{let r=!1;const n=e.map(o=>{const i=Bs(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():Bs(e[o],null)}}}}function _e(...e){return _.useCallback(Us(...e),e)}function $t(e){const t=Kf(e),r=_.forwardRef((n,o)=>{const{children:i,...s}=n,a=_.Children.toArray(i),l=a.find(Zf);if(l){const c=l.props.children,d=a.map(f=>f===l?_.Children.count(c)>1?_.Children.only(null):_.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...s,ref:o,children:_.isValidElement(c)?_.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var Yf=$t("Slot");function Kf(e){const t=_.forwardRef((r,n)=>{const{children:o,...i}=r;if(_.isValidElement(o)){const s=qf(o),a=Xf(i,o.props);return o.type!==_.Fragment&&(a.ref=n?Us(n,s):s),_.cloneElement(o,a)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ws=Symbol("radix.slottable");function Gf(e){const t=({children:r})=>p.jsx(p.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Ws,t}function Zf(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ws}function Xf(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function qf(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Jf(e){const t=e+"CollectionProvider",[r,n]=Wt(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:b,children:v}=h,x=T.useRef(null),k=T.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:k,collectionRef:x,children:v})};s.displayName=t;const a=e+"CollectionSlot",l=$t(a),c=T.forwardRef((h,b)=>{const{scope:v,children:x}=h,k=i(a,v),S=_e(b,k.collectionRef);return p.jsx(l,{ref:S,children:x})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=$t(d),u=T.forwardRef((h,b)=>{const{scope:v,children:x,...k}=h,S=T.useRef(null),C=_e(b,S),O=i(d,v);return T.useEffect(()=>(O.itemMap.set(S,{ref:S,...k}),()=>void O.itemMap.delete(S))),p.jsx(m,{[f]:"",ref:C,children:x})});u.displayName=d;function w(h){const b=i(e+"CollectionConsumer",h);return T.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const k=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((O,N)=>k.indexOf(O.ref.current)-k.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:c,ItemSlot:u},w,n]}var Qf=_.createContext(void 0);function $s(e){const t=_.useContext(Qf);return e||t||"ltr"}var eh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Se=eh.reduce((e,t)=>{const r=$t(`Primitive.${t}`),n=_.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function th(e,t){e&&Rr.flushSync(()=>e.dispatchEvent(t))}function Me(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function rh(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e);_.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var nh="DismissableLayer",ko="dismissableLayer.update",oh="dismissableLayer.pointerDownOutside",ih="dismissableLayer.focusOutside",Hs,Vs=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dn=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=_.useContext(Vs),[d,f]=_.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,u]=_.useState({}),w=_e(t,N=>f(N)),h=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(b),x=d?h.indexOf(d):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,C=lh(N=>{const P=N.target,D=[...c.branches].some(W=>W.contains(P));!S||D||(o==null||o(N),s==null||s(N),N.defaultPrevented||a==null||a())},m),O=ch(N=>{const P=N.target;[...c.branches].some(W=>W.contains(P))||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},m);return rh(N=>{x===c.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},m),_.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Hs=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ys(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Hs)}},[d,m,r,c]),_.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ys())},[d,c]),_.useEffect(()=>{const N=()=>u({});return document.addEventListener(ko,N),()=>document.removeEventListener(ko,N)},[]),p.jsx(Se.div,{...l,ref:w,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,O.onFocusCapture),onBlurCapture:be(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,C.onPointerDownCapture)})});dn.displayName=nh;var sh="DismissableLayerBranch",ah=_.forwardRef((e,t)=>{const r=_.useContext(Vs),n=_.useRef(null),o=_e(t,n);return _.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),p.jsx(Se.div,{...e,ref:o})});ah.displayName=sh;function lh(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e),n=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Ks(oh,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ch(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e),n=_.useRef(!1);return _.useEffect(()=>{const o=i=>{i.target&&!n.current&&Ks(ih,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ys(){const e=new CustomEvent(ko);document.dispatchEvent(e)}function Ks(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?th(o,i):o.dispatchEvent(i)}var So=0;function Gs(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Zs()),document.body.insertAdjacentElement("beforeend",e[1]??Zs()),So++,()=>{So===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),So--}},[])}function Zs(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _o="focusScope.autoFocusOnMount",Co="focusScope.autoFocusOnUnmount",Xs={bubbles:!1,cancelable:!0},dh="FocusScope",Eo=_.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=_.useState(null),c=Me(o),d=Me(i),f=_.useRef(null),m=_e(t,h=>l(h)),u=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(n){let h=function(k){if(u.paused||!a)return;const S=k.target;a.contains(S)?f.current=S:vt(f.current,{select:!0})},b=function(k){if(u.paused||!a)return;const S=k.relatedTarget;S!==null&&(a.contains(S)||vt(f.current,{select:!0}))},v=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&vt(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const x=new MutationObserver(v);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),x.disconnect()}}},[n,a,u.paused]),_.useEffect(()=>{if(a){Qs.add(u);const h=document.activeElement;if(!a.contains(h)){const v=new CustomEvent(_o,Xs);a.addEventListener(_o,c),a.dispatchEvent(v),v.defaultPrevented||(uh(gh(qs(a)),{select:!0}),document.activeElement===h&&vt(a))}return()=>{a.removeEventListener(_o,c),setTimeout(()=>{const v=new CustomEvent(Co,Xs);a.addEventListener(Co,d),a.dispatchEvent(v),v.defaultPrevented||vt(h??document.body,{select:!0}),a.removeEventListener(Co,d),Qs.remove(u)},0)}}},[a,c,d,u]);const w=_.useCallback(h=>{if(!r&&!n||u.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(b&&v){const x=h.currentTarget,[k,S]=fh(x);k&&S?!h.shiftKey&&v===S?(h.preventDefault(),r&&vt(k,{select:!0})):h.shiftKey&&v===k&&(h.preventDefault(),r&&vt(S,{select:!0})):v===x&&h.preventDefault()}},[r,n,u.paused]);return p.jsx(Se.div,{tabIndex:-1,...s,ref:m,onKeyDown:w})});Eo.displayName=dh;function uh(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(vt(n,{select:t}),document.activeElement!==r)return}function fh(e){const t=qs(e),r=Js(t,e),n=Js(t.reverse(),e);return[r,n]}function qs(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Js(e,t){for(const r of e)if(!hh(r,{upTo:t}))return r}function hh(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ph(e){return e instanceof HTMLInputElement&&"select"in e}function vt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ph(e)&&t&&e.select()}}var Qs=mh();function mh(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ea(e,t),e.unshift(t)},remove(t){var r;e=ea(e,t),(r=e[0])==null||r.resume()}}}function ea(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function gh(e){return e.filter(t=>t.tagName!=="A")}var Pe=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},bh=_[" useId ".trim().toString()]||(()=>{}),vh=0;function kr(e){const[t,r]=_.useState(bh());return Pe(()=>{r(n=>n??String(vh++))},[e]),t?`radix-${t}`:""}const wh=["top","right","bottom","left"],wt=Math.min,Le=Math.max,un=Math.round,fn=Math.floor,Qe=e=>({x:e,y:e}),xh={left:"right",right:"left",bottom:"top",top:"bottom"},yh={start:"end",end:"start"};function Ao(e,t,r){return Le(e,wt(t,r))}function ct(e,t){return typeof e=="function"?e(t):e}function dt(e){return e.split("-")[0]}function Ht(e){return e.split("-")[1]}function No(e){return e==="x"?"y":"x"}function zo(e){return e==="y"?"height":"width"}const kh=new Set(["top","bottom"]);function et(e){return kh.has(dt(e))?"y":"x"}function jo(e){return No(et(e))}function Sh(e,t,r){r===void 0&&(r=!1);const n=Ht(e),o=jo(e),i=zo(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=hn(s)),[s,hn(s)]}function _h(e){const t=hn(e);return[To(e),t,To(t)]}function To(e){return e.replace(/start|end/g,t=>yh[t])}const ta=["left","right"],ra=["right","left"],Ch=["top","bottom"],Eh=["bottom","top"];function Ah(e,t,r){switch(e){case"top":case"bottom":return r?t?ra:ta:t?ta:ra;case"left":case"right":return t?Ch:Eh;default:return[]}}function Nh(e,t,r,n){const o=Ht(e);let i=Ah(dt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(To)))),i}function hn(e){return e.replace(/left|right|bottom|top/g,t=>xh[t])}function zh(e){return{top:0,right:0,bottom:0,left:0,...e}}function na(e){return typeof e!="number"?zh(e):{top:e,right:e,bottom:e,left:e}}function pn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function oa(e,t,r){let{reference:n,floating:o}=e;const i=et(t),s=jo(t),a=zo(s),l=dt(t),c=i==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,m=n[a]/2-o[a]/2;let u;switch(l){case"top":u={x:d,y:n.y-o.height};break;case"bottom":u={x:d,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:f};break;case"left":u={x:n.x-o.width,y:f};break;default:u={x:n.x,y:n.y}}switch(Ht(t)){case"start":u[s]-=m*(r&&c?-1:1);break;case"end":u[s]+=m*(r&&c?-1:1);break}return u}async function jh(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:u=0}=ct(t,e),w=na(u),b=a[m?f==="floating"?"reference":"floating":f],v=pn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),x=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},C=pn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:k,strategy:l}):x);return{top:(v.top-C.top+w.top)/S.y,bottom:(C.bottom-v.bottom+w.bottom)/S.y,left:(v.left-C.left+w.left)/S.x,right:(C.right-v.right+w.right)/S.x}}const Th=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=oa(c,n,l),m=n,u={},w=0;for(let b=0;b<a.length;b++){var h;const{name:v,fn:x}=a[b],{x:k,y:S,data:C,reset:O}=await x({x:d,y:f,initialPlacement:n,placement:m,strategy:o,middlewareData:u,rects:c,platform:{...s,detectOverflow:(h=s.detectOverflow)!=null?h:jh},elements:{reference:e,floating:t}});d=k??d,f=S??f,u={...u,[v]:{...u[v],...C}},O&&w<=50&&(w++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(c=O.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:d,y:f}=oa(c,m,l)),b=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:u}},Oh=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=ct(e,t)||{};if(c==null)return{};const f=na(d),m={x:r,y:n},u=jo(o),w=zo(u),h=await s.getDimensions(c),b=u==="y",v=b?"top":"left",x=b?"bottom":"right",k=b?"clientHeight":"clientWidth",S=i.reference[w]+i.reference[u]-m[u]-i.floating[w],C=m[u]-i.reference[u],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let N=O?O[k]:0;(!N||!await(s.isElement==null?void 0:s.isElement(O)))&&(N=a.floating[k]||i.floating[w]);const P=S/2-C/2,D=N/2-h[w]/2-1,W=wt(f[v],D),G=wt(f[x],D),z=W,L=N-h[w]-G,y=N/2-h[w]/2+P,$=Ao(z,y,L),X=!l.arrow&&Ht(o)!=null&&y!==$&&i.reference[w]/2-(y<z?W:G)-h[w]/2<0,H=X?y<z?y-z:y-L:0;return{[u]:m[u]+H,data:{[u]:$,centerOffset:y-$-H,...X&&{alignmentOffset:H}},reset:X}}}),Ph=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:h=!0,...b}=ct(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=dt(o),x=et(a),k=dt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=m||(k||!h?[hn(a)]:_h(a)),O=w!=="none";!m&&O&&C.push(...Nh(a,h,w,S));const N=[a,...C],P=await l.detectOverflow(t,b),D=[];let W=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&D.push(P[v]),f){const y=Sh(o,s,S);D.push(P[y[0]],P[y[1]])}if(W=[...W,{placement:o,overflows:D}],!D.every(y=>y<=0)){var G,z;const y=(((G=i.flip)==null?void 0:G.index)||0)+1,$=N[y];if($&&(!(f==="alignment"?x!==et($):!1)||W.every(V=>et(V.placement)===x?V.overflows[0]>0:!0)))return{data:{index:y,overflows:W},reset:{placement:$}};let X=(z=W.filter(H=>H.overflows[0]<=0).sort((H,V)=>H.overflows[1]-V.overflows[1])[0])==null?void 0:z.placement;if(!X)switch(u){case"bestFit":{var L;const H=(L=W.filter(V=>{if(O){const Y=et(V.placement);return Y===x||Y==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(Y=>Y>0).reduce((Y,Q)=>Y+Q,0)]).sort((V,Y)=>V[1]-Y[1])[0])==null?void 0:L[0];H&&(X=H);break}case"initialPlacement":X=a;break}if(o!==X)return{reset:{placement:X}}}return{}}}};function ia(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sa(e){return wh.some(t=>e[t]>=0)}const Ih=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=ct(e,t);switch(o){case"referenceHidden":{const s=await n.detectOverflow(t,{...i,elementContext:"reference"}),a=ia(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:sa(a)}}}case"escaped":{const s=await n.detectOverflow(t,{...i,altBoundary:!0}),a=ia(s,r.floating);return{data:{escapedOffsets:a,escaped:sa(a)}}}default:return{}}}}},aa=new Set(["left","top"]);async function Dh(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=dt(r),a=Ht(r),l=et(r)==="y",c=aa.has(s)?-1:1,d=i&&l?-1:1,f=ct(t,e);let{mainAxis:m,crossAxis:u,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(u=a==="end"?w*-1:w),l?{x:u*d,y:m*c}:{x:m*c,y:u*d}}const Rh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Dh(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Mh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x,y:k}=v;return{x,y:k}}},...c}=ct(e,t),d={x:r,y:n},f=await i.detectOverflow(t,c),m=et(dt(o)),u=No(m);let w=d[u],h=d[m];if(s){const v=u==="y"?"top":"left",x=u==="y"?"bottom":"right",k=w+f[v],S=w-f[x];w=Ao(k,w,S)}if(a){const v=m==="y"?"top":"left",x=m==="y"?"bottom":"right",k=h+f[v],S=h-f[x];h=Ao(k,h,S)}const b=l.fn({...t,[u]:w,[m]:h});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[u]:s,[m]:a}}}}}},Lh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ct(e,t),d={x:r,y:n},f=et(o),m=No(f);let u=d[m],w=d[f];const h=ct(a,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const k=m==="y"?"height":"width",S=i.reference[m]-i.floating[k]+b.mainAxis,C=i.reference[m]+i.reference[k]-b.mainAxis;u<S?u=S:u>C&&(u=C)}if(c){var v,x;const k=m==="y"?"width":"height",S=aa.has(dt(o)),C=i.reference[f]-i.floating[k]+(S&&((v=s.offset)==null?void 0:v[f])||0)+(S?0:b.crossAxis),O=i.reference[f]+i.reference[k]+(S?0:((x=s.offset)==null?void 0:x[f])||0)-(S?b.crossAxis:0);w<C?w=C:w>O&&(w=O)}return{[m]:u,[f]:w}}}},Fh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=ct(e,t),d=await s.detectOverflow(t,c),f=dt(o),m=Ht(o),u=et(o)==="y",{width:w,height:h}=i.floating;let b,v;f==="top"||f==="bottom"?(b=f,v=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,b=m==="end"?"top":"bottom");const x=h-d.top-d.bottom,k=w-d.left-d.right,S=wt(h-d[b],x),C=wt(w-d[v],k),O=!t.middlewareData.shift;let N=S,P=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=x),O&&!m){const W=Le(d.left,0),G=Le(d.right,0),z=Le(d.top,0),L=Le(d.bottom,0);u?P=w-2*(W!==0||G!==0?W+G:Le(d.left,d.right)):N=h-2*(z!==0||L!==0?z+L:Le(d.top,d.bottom))}await l({...t,availableWidth:P,availableHeight:N});const D=await s.getDimensions(a.floating);return w!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function mn(){return typeof window<"u"}function Vt(e){return la(e)?(e.nodeName||"").toLowerCase():"#document"}function Fe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tt(e){var t;return(t=(la(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function la(e){return mn()?e instanceof Node||e instanceof Fe(e).Node:!1}function Xe(e){return mn()?e instanceof Element||e instanceof Fe(e).Element:!1}function rt(e){return mn()?e instanceof HTMLElement||e instanceof Fe(e).HTMLElement:!1}function ca(e){return!mn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fe(e).ShadowRoot}const Bh=new Set(["inline","contents"]);function Sr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Bh.has(o)}const Uh=new Set(["table","td","th"]);function Wh(e){return Uh.has(Vt(e))}const $h=[":popover-open",":modal"];function gn(e){return $h.some(t=>{try{return e.matches(t)}catch{return!1}})}const Hh=["transform","translate","scale","rotate","perspective"],Vh=["transform","translate","scale","rotate","perspective","filter"],Yh=["paint","layout","strict","content"];function Oo(e){const t=Po(),r=Xe(e)?qe(e):e;return Hh.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Vh.some(n=>(r.willChange||"").includes(n))||Yh.some(n=>(r.contain||"").includes(n))}function Kh(e){let t=xt(e);for(;rt(t)&&!Yt(t);){if(Oo(t))return t;if(gn(t))return null;t=xt(t)}return null}function Po(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Gh=new Set(["html","body","#document"]);function Yt(e){return Gh.has(Vt(e))}function qe(e){return Fe(e).getComputedStyle(e)}function bn(e){return Xe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xt(e){if(Vt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ca(e)&&e.host||tt(e);return ca(t)?t.host:t}function da(e){const t=xt(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:rt(t)&&Sr(t)?t:da(t)}function _r(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=da(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=Fe(o);if(i){const a=Io(s);return t.concat(s,s.visualViewport||[],Sr(o)?o:[],a&&r?_r(a):[])}return t.concat(o,_r(o,[],r))}function Io(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ua(e){const t=qe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=rt(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=un(r)!==i||un(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Do(e){return Xe(e)?e:e.contextElement}function Kt(e){const t=Do(e);if(!rt(t))return Qe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=ua(t);let s=(i?un(r.width):r.width)/n,a=(i?un(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Zh=Qe(0);function fa(e){const t=Fe(e);return!Po()||!t.visualViewport?Zh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Fe(e)?!1:t}function jt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Do(e);let s=Qe(1);t&&(n?Xe(n)&&(s=Kt(n)):s=Kt(e));const a=Xh(i,r,n)?fa(i):Qe(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=Fe(i),u=n&&Xe(n)?Fe(n):n;let w=m,h=Io(w);for(;h&&n&&u!==w;){const b=Kt(h),v=h.getBoundingClientRect(),x=qe(h),k=v.left+(h.clientLeft+parseFloat(x.paddingLeft))*b.x,S=v.top+(h.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,f*=b.y,l+=k,c+=S,w=Fe(h),h=Io(w)}}return pn({width:d,height:f,x:l,y:c})}function vn(e,t){const r=bn(e).scrollLeft;return t?t.left+r:jt(tt(e)).left+r}function ha(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-vn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function qh(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=tt(n),a=t?gn(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Qe(1);const d=Qe(0),f=rt(n);if((f||!f&&!i)&&((Vt(n)!=="body"||Sr(s))&&(l=bn(n)),rt(n))){const u=jt(n);c=Kt(n),d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}const m=s&&!f&&!i?ha(s,l):Qe(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-l.scrollTop*c.y+d.y+m.y}}function Jh(e){return Array.from(e.getClientRects())}function Qh(e){const t=tt(e),r=bn(e),n=e.ownerDocument.body,o=Le(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Le(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+vn(e);const a=-r.scrollTop;return qe(n).direction==="rtl"&&(s+=Le(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const pa=25;function ep(e,t){const r=Fe(e),n=tt(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=Po();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=vn(n);if(c<=0){const d=n.ownerDocument,f=d.body,m=getComputedStyle(f),u=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(n.clientWidth-f.clientWidth-u);w<=pa&&(i-=w)}else c<=pa&&(i+=c);return{width:i,height:s,x:a,y:l}}const tp=new Set(["absolute","fixed"]);function rp(e,t){const r=jt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=rt(e)?Kt(e):Qe(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function ma(e,t,r){let n;if(t==="viewport")n=ep(e,r);else if(t==="document")n=Qh(tt(e));else if(Xe(t))n=rp(t,r);else{const o=fa(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return pn(n)}function ga(e,t){const r=xt(e);return r===t||!Xe(r)||Yt(r)?!1:qe(r).position==="fixed"||ga(r,t)}function np(e,t){const r=t.get(e);if(r)return r;let n=_r(e,[],!1).filter(a=>Xe(a)&&Vt(a)!=="body"),o=null;const i=qe(e).position==="fixed";let s=i?xt(e):e;for(;Xe(s)&&!Yt(s);){const a=qe(s),l=Oo(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&tp.has(o.position)||Sr(s)&&!l&&ga(e,s))?n=n.filter(d=>d!==s):o=a,s=xt(s)}return t.set(e,n),n}function op(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?gn(t)?[]:np(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((c,d)=>{const f=ma(t,d,o);return c.top=Le(f.top,c.top),c.right=wt(f.right,c.right),c.bottom=wt(f.bottom,c.bottom),c.left=Le(f.left,c.left),c},ma(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ip(e){const{width:t,height:r}=ua(e);return{width:t,height:r}}function sp(e,t,r){const n=rt(t),o=tt(t),i=r==="fixed",s=jt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Qe(0);function c(){l.x=vn(o)}if(n||!n&&!i)if((Vt(t)!=="body"||Sr(o))&&(a=bn(t)),n){const u=jt(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=o&&!n&&!i?ha(o,a):Qe(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function Ro(e){return qe(e).position==="static"}function ba(e,t){if(!rt(e)||qe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return tt(e)===r&&(r=r.ownerDocument.body),r}function va(e,t){const r=Fe(e);if(gn(e))return r;if(!rt(e)){let o=xt(e);for(;o&&!Yt(o);){if(Xe(o)&&!Ro(o))return o;o=xt(o)}return r}let n=ba(e,t);for(;n&&Wh(n)&&Ro(n);)n=ba(n,t);return n&&Yt(n)&&Ro(n)&&!Oo(n)?r:n||Kh(e)||r}const ap=async function(e){const t=this.getOffsetParent||va,r=this.getDimensions,n=await r(e.floating);return{reference:sp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function lp(e){return qe(e).direction==="rtl"}const cp={convertOffsetParentRelativeRectToViewportRelativeRect:qh,getDocumentElement:tt,getClippingRect:op,getOffsetParent:va,getElementRects:ap,getClientRects:Jh,getDimensions:ip,getScale:Kt,isElement:Xe,isRTL:lp};function wa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dp(e,t){let r=null,n;const o=tt(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:f,width:m,height:u}=c;if(a||t(),!m||!u)return;const w=fn(f),h=fn(o.clientWidth-(d+m)),b=fn(o.clientHeight-(f+u)),v=fn(d),k={rootMargin:-w+"px "+-h+"px "+-b+"px "+-v+"px",threshold:Le(0,wt(1,l))||1};let S=!0;function C(O){const N=O[0].intersectionRatio;if(N!==l){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!wa(c,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(C,{...k,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,k)}r.observe(e)}return s(!0),i}function up(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Do(e),d=o||i?[...c?_r(c):[],..._r(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const f=c&&a?dp(c,r):null;let m=-1,u=null;s&&(u=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=u)==null||k.observe(t)})),r()}),c&&!l&&u.observe(c),u.observe(t));let w,h=l?jt(e):null;l&&b();function b(){const v=jt(e);h&&!wa(h,v)&&r(),h=v,w=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),f==null||f(),(v=u)==null||v.disconnect(),u=null,l&&cancelAnimationFrame(w)}}const fp=Rh,hp=Mh,pp=Ph,mp=Fh,gp=Ih,xa=Oh,bp=Lh,vp=(e,t,r)=>{const n=new Map,o={platform:cp,...r},i={...o.platform,_c:n};return Th(e,t,{...o,platform:i})};var wp=typeof document<"u",xp=function(){},wn=wp?T.useLayoutEffect:xp;function xn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!xn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!xn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ya(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ka(e,t){const r=ya(e);return Math.round(t*r)/r}function Mo(e){const t=_.useRef(e);return wn(()=>{t.current=e}),t}function yp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=_.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,u]=_.useState(n);xn(m,n)||u(n);const[w,h]=_.useState(null),[b,v]=_.useState(null),x=_.useCallback(V=>{V!==O.current&&(O.current=V,h(V))},[]),k=_.useCallback(V=>{V!==N.current&&(N.current=V,v(V))},[]),S=i||w,C=s||b,O=_.useRef(null),N=_.useRef(null),P=_.useRef(d),D=l!=null,W=Mo(l),G=Mo(o),z=Mo(c),L=_.useCallback(()=>{if(!O.current||!N.current)return;const V={placement:t,strategy:r,middleware:m};G.current&&(V.platform=G.current),vp(O.current,N.current,V).then(Y=>{const Q={...Y,isPositioned:z.current!==!1};y.current&&!xn(P.current,Q)&&(P.current=Q,Rr.flushSync(()=>{f(Q)}))})},[m,t,r,G,z]);wn(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[c]);const y=_.useRef(!1);wn(()=>(y.current=!0,()=>{y.current=!1}),[]),wn(()=>{if(S&&(O.current=S),C&&(N.current=C),S&&C){if(W.current)return W.current(S,C,L);L()}},[S,C,L,W,D]);const $=_.useMemo(()=>({reference:O,floating:N,setReference:x,setFloating:k}),[x,k]),X=_.useMemo(()=>({reference:S,floating:C}),[S,C]),H=_.useMemo(()=>{const V={position:r,left:0,top:0};if(!X.floating)return V;const Y=ka(X.floating,d.x),Q=ka(X.floating,d.y);return a?{...V,transform:"translate("+Y+"px, "+Q+"px)",...ya(X.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Y,top:Q}},[r,a,X.floating,d.x,d.y]);return _.useMemo(()=>({...d,update:L,refs:$,elements:X,floatingStyles:H}),[d,L,$,X,H])}const kp=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?xa({element:n.current,padding:o}).fn(r):{}:n?xa({element:n,padding:o}).fn(r):{}}}},Sp=(e,t)=>({...fp(e),options:[e,t]}),_p=(e,t)=>({...hp(e),options:[e,t]}),Cp=(e,t)=>({...bp(e),options:[e,t]}),Ep=(e,t)=>({...pp(e),options:[e,t]}),Ap=(e,t)=>({...mp(e),options:[e,t]}),Np=(e,t)=>({...gp(e),options:[e,t]}),zp=(e,t)=>({...kp(e),options:[e,t]});var jp="Arrow",Sa=_.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return p.jsx(Se.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sa.displayName=jp;var Tp=Sa;function Op(e){const[t,r]=_.useState(void 0);return Pe(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;r({width:s,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Lo="Popper",[_a,Gt]=Wt(Lo),[Pp,Ca]=_a(Lo),Ea=e=>{const{__scopePopper:t,children:r}=e,[n,o]=_.useState(null);return p.jsx(Pp,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ea.displayName=Lo;var Aa="PopperAnchor",Na=_.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Ca(Aa,r),s=_.useRef(null),a=_e(t,s),l=_.useRef(null);return _.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||s.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:p.jsx(Se.div,{...o,ref:a})});Na.displayName=Aa;var Fo="PopperContent",[Ip,Dp]=_a(Fo),za=_.forwardRef((e,t)=>{var ee,ie,se,oe,le,fe;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:u="optimized",onPlaced:w,...h}=e,b=Ca(Fo,r),[v,x]=_.useState(null),k=_e(t,we=>x(we)),[S,C]=_.useState(null),O=Op(S),N=(O==null?void 0:O.width)??0,P=(O==null?void 0:O.height)??0,D=n+(i!=="center"?"-"+i:""),W=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(c)?c:[c],z=G.length>0,L={padding:W,boundary:G.filter(Mp),altBoundary:z},{refs:y,floatingStyles:$,placement:X,isPositioned:H,middlewareData:V}=yp({strategy:"fixed",placement:D,whileElementsMounted:(...we)=>up(...we,{animationFrame:u==="always"}),elements:{reference:b.anchor},middleware:[Sp({mainAxis:o+P,alignmentAxis:s}),l&&_p({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Cp():void 0,...L}),l&&Ep({...L}),Ap({...L,apply:({elements:we,rects:g,availableWidth:F,availableHeight:U})=>{const{width:E,height:A}=g.reference,R=we.floating.style;R.setProperty("--radix-popper-available-width",`${F}px`),R.setProperty("--radix-popper-available-height",`${U}px`),R.setProperty("--radix-popper-anchor-width",`${E}px`),R.setProperty("--radix-popper-anchor-height",`${A}px`)}}),S&&zp({element:S,padding:a}),Lp({arrowWidth:N,arrowHeight:P}),m&&Np({strategy:"referenceHidden",...L})]}),[Y,Q]=Oa(X),j=Me(w);Pe(()=>{H&&(j==null||j())},[H,j]);const I=(ee=V.arrow)==null?void 0:ee.x,K=(ie=V.arrow)==null?void 0:ie.y,Z=((se=V.arrow)==null?void 0:se.centerOffset)!==0,[te,ue]=_.useState();return Pe(()=>{v&&ue(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:y.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:H?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(oe=V.transformOrigin)==null?void 0:oe.x,(le=V.transformOrigin)==null?void 0:le.y].join(" "),...((fe=V.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Ip,{scope:r,placedSide:Y,onArrowChange:C,arrowX:I,arrowY:K,shouldHideArrow:Z,children:p.jsx(Se.div,{"data-side":Y,"data-align":Q,...h,ref:k,style:{...h.style,animation:H?void 0:"none"}})})})});za.displayName=Fo;var ja="PopperArrow",Rp={top:"bottom",right:"left",bottom:"top",left:"right"},Ta=_.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Dp(ja,n),s=Rp[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Tp,{...o,ref:r,style:{...o.style,display:"block"}})})});Ta.displayName=ja;function Mp(e){return e!==null}var Lp=e=>({name:"transformOrigin",options:e,fn(t){var b,v,x;const{placement:r,rects:n,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=Oa(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,u=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let w="",h="";return c==="bottom"?(w=s?f:`${m}px`,h=`${-l}px`):c==="top"?(w=s?f:`${m}px`,h=`${n.floating.height+l}px`):c==="right"?(w=`${-l}px`,h=s?f:`${u}px`):c==="left"&&(w=`${n.floating.width+l}px`,h=s?f:`${u}px`),{data:{x:w,y:h}}}});function Oa(e){const[t,r="center"]=e.split("-");return[t,r]}var Bo=Ea,yn=Na,Uo=za,Wo=Ta,Fp="Portal",kn=_.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,i]=_.useState(!1);Pe(()=>i(!0),[]);const s=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?ht.createPortal(p.jsx(Se.div,{...n,ref:t}),s):null});kn.displayName=Fp;var Bp=_[" useInsertionEffect ".trim().toString()]||Pe;function Sn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,s]=Up({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:o;{const d=_.useRef(e!==void 0);_.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,n])}const c=_.useCallback(d=>{var f;if(a){const m=Wp(d)?d(e):d;m!==e&&((f=s.current)==null||f.call(s,m))}else i(d)},[a,e,i,s]);return[l,c]}function Up({defaultProp:e,onChange:t}){const[r,n]=_.useState(e),o=_.useRef(r),i=_.useRef(t);return Bp(()=>{i.current=t},[t]),_.useEffect(()=>{var s;o.current!==r&&((s=i.current)==null||s.call(i,r),o.current=r)},[r,o]),[r,n,i]}function Wp(e){return typeof e=="function"}function $p(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Pa=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Hp="VisuallyHidden",Ia=_.forwardRef((e,t)=>p.jsx(Se.span,{...e,ref:t,style:{...Pa,...e.style}}));Ia.displayName=Hp;var Vp=Ia,Yp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zt=new WeakMap,_n=new WeakMap,Cn={},$o=0,Da=function(e){return e&&(e.host||Da(e.parentNode))},Kp=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Da(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Gp=function(e,t,r,n){var o=Kp(t,Array.isArray(e)?e:[e]);Cn[r]||(Cn[r]=new WeakMap);var i=Cn[r],s=[],a=new Set,l=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var u=m.getAttribute(n),w=u!==null&&u!=="false",h=(Zt.get(m)||0)+1,b=(i.get(m)||0)+1;Zt.set(m,h),i.set(m,b),s.push(m),h===1&&w&&_n.set(m,!0),b===1&&m.setAttribute(r,"true"),w||m.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return d(t),a.clear(),$o++,function(){s.forEach(function(f){var m=Zt.get(f)-1,u=i.get(f)-1;Zt.set(f,m),i.set(f,u),m||(_n.has(f)||f.removeAttribute(n),_n.delete(f)),u||f.removeAttribute(r)}),$o--,$o||(Zt=new WeakMap,Zt=new WeakMap,_n=new WeakMap,Cn={})}},Ra=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Yp(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Gp(n,o,r,"aria-hidden")):function(){return null}},nt=function(){return nt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},nt.apply(this,arguments)};function Ma(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Zp(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var En="right-scroll-bar-position",An="width-before-scroll-bar",Xp="with-scroll-bars-hidden",qp="--removed-body-scroll-bar-size";function Ho(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jp(e,t){var r=T.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Qp=typeof window<"u"?_.useLayoutEffect:_.useEffect,La=new WeakMap;function em(e,t){var r=Jp(null,function(n){return e.forEach(function(o){return Ho(o,n)})});return Qp(function(){var n=La.get(r);if(n){var o=new Set(n),i=new Set(e),s=r.current;o.forEach(function(a){i.has(a)||Ho(a,null)}),i.forEach(function(a){o.has(a)||Ho(a,s)})}La.set(r,e)},[e]),r}function tm(e){return e}function rm(e,t){t===void 0&&(t=tm);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(i),s=r}var l=function(){var d=s;s=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){s.push(d),c()},filter:function(d){return s=s.filter(d),r}}}};return o}function nm(e){e===void 0&&(e={});var t=rm(null);return t.options=nt({async:!0,ssr:!1},e),t}var Fa=function(e){var t=e.sideCar,r=Ma(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return _.createElement(n,nt({},r))};Fa.isSideCarExport=!0;function om(e,t){return e.useMedium(t),Fa}var Ba=nm(),Vo=function(){},Nn=_.forwardRef(function(e,t){var r=_.useRef(null),n=_.useState({onScrollCapture:Vo,onWheelCapture:Vo,onTouchMoveCapture:Vo}),o=n[0],i=n[1],s=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,u=e.noRelative,w=e.noIsolation,h=e.inert,b=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,k=e.gapMode,S=Ma(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,O=em([r,t]),N=nt(nt({},S),o);return _.createElement(_.Fragment,null,d&&_.createElement(C,{sideCar:Ba,removeScrollBar:c,shards:f,noRelative:u,noIsolation:w,inert:h,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:k}),s?_.cloneElement(_.Children.only(a),nt(nt({},N),{ref:O})):_.createElement(x,nt({},N,{className:l,ref:O}),a))});Nn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Nn.classNames={fullWidth:An,zeroRight:En};var im=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=im();return t&&e.setAttribute("nonce",t),e}function am(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cm=function(){var e=0,t=null;return{add:function(r){e==0&&(t=sm())&&(am(t,r),lm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dm=function(){var e=cm();return function(t,r){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Ua=function(){var e=dm(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},um={left:0,top:0,right:0,gap:0},Yo=function(e){return parseInt(e||"",10)||0},fm=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Yo(r),Yo(n),Yo(o)]},hm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return um;var t=fm(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},pm=Ua(),Xt="data-scroll-locked",mm=function(e,t,r,n){var o=e.left,i=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
213
|
-
.`.concat(
|
|
212
|
+
`},pu={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function mu(e){let{announcements:t=pu,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=hu}=e;const{announce:i,announcement:s}=du(),a=gr("DndLiveRegion"),[l,c]=j.useState(!1);if(j.useEffect(()=>{c(!0)},[]),uu(j.useMemo(()=>({onDragStart(u){let{active:m}=u;i(t.onDragStart({active:m}))},onDragMove(u){let{active:m,over:f}=u;t.onDragMove&&i(t.onDragMove({active:m,over:f}))},onDragOver(u){let{active:m,over:f}=u;i(t.onDragOver({active:m,over:f}))},onDragEnd(u){let{active:m,over:f}=u;i(t.onDragEnd({active:m,over:f}))},onDragCancel(u){let{active:m,over:f}=u;i(t.onDragCancel({active:m,over:f}))}}),[i,t])),!l)return null;const d=j.createElement(j.Fragment,null,j.createElement(lu,{id:n,value:o.draggable}),j.createElement(cu,{id:a,announcement:s}));return r?ht.createPortal(d,r):d}var Oe;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Oe||(Oe={}));function en(){}function lo(e,t){return j.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function gu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return j.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Xe=Object.freeze({x:0,y:0});function os(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function bu(e,t){const r=Qr(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function is(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function vu(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function ss(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function as(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function ls(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const wu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ls(t,t.left,t.top),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=os(ls(l),o);i.push({id:a,data:{droppableContainer:s,value:c}})}}return i.sort(is)},xu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ss(t),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=ss(l),d=o.reduce((m,f,v)=>m+os(c[v],f),0),u=Number((d/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:u}})}}return i.sort(is)};function yu(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-n,a=i-r;if(n<o&&r<i){const l=t.width*t.height,c=e.width*e.height,d=s*a,u=d/(l+c-d);return Number(u.toFixed(4))}return 0}const ku=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const i of n){const{id:s}=i,a=r.get(s);if(a){const l=yu(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort(vu)};function _u(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function cs(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Xe}function Su(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...r})}}const Cu=Su(1);function ds(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Eu(e,t,r){const n=ds(t);if(!n)return e;const{scaleX:o,scaleY:i,x:s,y:a}=n,l=e.left-s-(1-o)*parseFloat(r),c=e.top-a-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),d=o?e.width/o:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}const Nu={ignoreTransform:!1};function Ut(e,t){t===void 0&&(t=Nu);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Le(e).getComputedStyle(e);c&&(r=Eu(r,c,d))}const{top:n,left:o,width:i,height:s,bottom:a,right:l}=r;return{top:n,left:o,width:i,height:s,bottom:a,right:l}}function us(e){return Ut(e,{ignoreTransform:!0})}function Au(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function zu(e,t){return t===void 0&&(t=Le(e).getComputedStyle(e)),t.position==="fixed"}function ju(e,t){t===void 0&&(t=Le(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?r.test(i):!1})}function tn(e,t){const r=[];function n(o){if(t!=null&&r.length>=t||!o)return r;if(so(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!hr(o)||es(o)||r.includes(o))return r;const i=Le(e).getComputedStyle(o);return o!==e&&ju(o,i)&&r.push(o),zu(o,i)?r:n(o.parentNode)}return e?n(e):r}function fs(e){const[t]=tn(e,1);return t??null}function co(e){return!Gr||!e?null:Mt(e)?e:io(e)?so(e)||e===Ft(e).scrollingElement?window:hr(e)?e:null:null}function hs(e){return Mt(e)?e.scrollX:e.scrollLeft}function ps(e){return Mt(e)?e.scrollY:e.scrollTop}function uo(e){return{x:hs(e),y:ps(e)}}var Pe;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Pe||(Pe={}));function ms(e){return!Gr||!e?!1:e===document.scrollingElement}function gs(e){const t={x:0,y:0},r=ms(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:n,minScroll:t}}const Tu={x:.2,y:.2};function Ou(e,t,r,n,o){let{top:i,left:s,right:a,bottom:l}=r;n===void 0&&(n=10),o===void 0&&(o=Tu);const{isTop:c,isBottom:d,isLeft:u,isRight:m}=gs(e),f={x:0,y:0},v={x:0,y:0},h={height:t.height*o.y,width:t.width*o.x};return!c&&i<=t.top+h.height?(f.y=Pe.Backward,v.y=n*Math.abs((t.top+h.height-i)/h.height)):!d&&l>=t.bottom-h.height&&(f.y=Pe.Forward,v.y=n*Math.abs((t.bottom-h.height-l)/h.height)),!m&&a>=t.right-h.width?(f.x=Pe.Forward,v.x=n*Math.abs((t.right-h.width-a)/h.width)):!u&&s<=t.left+h.width&&(f.x=Pe.Backward,v.x=n*Math.abs((t.left+h.width-s)/h.width)),{direction:f,speed:v}}function Pu(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:r,right:n,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:o,width:e.clientWidth,height:e.clientHeight}}function bs(e){return e.reduce((t,r)=>Bt(t,uo(r)),Xe)}function Iu(e){return e.reduce((t,r)=>t+hs(r),0)}function Du(e){return e.reduce((t,r)=>t+ps(r),0)}function vs(e,t){if(t===void 0&&(t=Ut),!e)return;const{top:r,left:n,bottom:o,right:i}=t(e);fs(e)&&(o<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ru=[["x",["left","right"],Iu],["y",["top","bottom"],Du]];class fo{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=tn(r),o=bs(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of Ru)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(n),d=o[i]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function Lu(e){const{EventTarget:t}=Le(e);return e instanceof t?e:Ft(e)}function ho(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Ve;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ve||(Ve={}));function ws(e){e.preventDefault()}function Mu(e){e.stopPropagation()}var we;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(we||(we={}));const xs={start:[we.Space,we.Enter],cancel:[we.Esc],end:[we.Space,we.Enter,we.Tab]},Fu=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case we.Right:return{...r,x:r.x+25};case we.Left:return{...r,x:r.x-25};case we.Down:return{...r,y:r.y+25};case we.Up:return{...r,y:r.y-25}}};class po{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new vr(Ft(r)),this.windowListeners=new vr(Le(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ve.Resize,this.handleCancel),this.windowListeners.add(Ve.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ve.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&vs(n),r(Xe)}handleKeyDown(t){if(Jr(t)){const{active:r,context:n,options:o}=this.props,{keyboardCodes:i=xs,coordinateGetter:s=Fu,scrollBehavior:a="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:Xe;this.referenceCoordinates||(this.referenceCoordinates=d);const u=s(t,{active:r,context:n.current,currentCoordinates:d});if(u){const m=br(u,d),f={x:0,y:0},{scrollableAncestors:v}=n.current;for(const h of v){const b=t.code,{isTop:g,isRight:x,isLeft:k,isBottom:_,maxScroll:C,minScroll:I}=gs(h),A=Pu(h),D={x:Math.min(b===we.Right?A.right-A.width/2:A.right,Math.max(b===we.Right?A.left:A.left+A.width/2,u.x)),y:Math.min(b===we.Down?A.bottom-A.height/2:A.bottom,Math.max(b===we.Down?A.top:A.top+A.height/2,u.y))},R=b===we.Right&&!x||b===we.Left&&!k,F=b===we.Down&&!_||b===we.Up&&!g;if(R&&D.x!==u.x){const Y=h.scrollLeft+m.x,N=b===we.Right&&Y<=C.x||b===we.Left&&Y>=I.x;if(N&&!m.y){h.scrollTo({left:Y,behavior:a});return}N?f.x=h.scrollLeft-Y:f.x=b===we.Right?h.scrollLeft-C.x:h.scrollLeft-I.x,f.x&&h.scrollBy({left:-f.x,behavior:a});break}else if(F&&D.y!==u.y){const Y=h.scrollTop+m.y,N=b===we.Down&&Y<=C.y||b===we.Up&&Y>=I.y;if(N&&!m.x){h.scrollTo({top:Y,behavior:a});return}N?f.y=h.scrollTop-Y:f.y=b===we.Down?h.scrollTop-C.y:h.scrollTop-I.y,f.y&&h.scrollBy({top:-f.y,behavior:a});break}}this.handleMove(t,Bt(br(u,this.referenceCoordinates),f))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}po.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=xs,onActivation:o}=t,{active:i}=r;const{code:s}=e.nativeEvent;if(n.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function ys(e){return!!(e&&"distance"in e)}function ks(e){return!!(e&&"delay"in e)}class mo{constructor(t,r,n){var o;n===void 0&&(n=Lu(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:i}=t,{target:s}=i;this.props=t,this.events=r,this.document=Ft(s),this.documentListeners=new vr(this.document),this.listeners=new vr(n),this.windowListeners=new vr(Le(s)),this.initialCoordinates=(o=Qr(i))!=null?o:Xe,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Ve.Resize,this.handleCancel),this.windowListeners.add(Ve.DragStart,ws),this.windowListeners.add(Ve.VisibilityChange,this.handleCancel),this.windowListeners.add(Ve.ContextMenu,ws),this.documentListeners.add(Ve.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ks(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(ys(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ve.Click,Mu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ve.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const l=(r=Qr(t))!=null?r:Xe,c=br(o,l);if(!n&&a){if(ys(a)){if(a.tolerance!=null&&ho(c,a.tolerance))return this.handleCancel();if(ho(c,a.distance))return this.handleStart()}if(ks(a)&&ho(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===we.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Bu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class go extends mo{constructor(t){const{event:r}=t,n=Ft(r.target);super(t,Bu,n)}}go.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const Uu={move:{name:"mousemove"},end:{name:"mouseup"}};var bo;(function(e){e[e.RightClick=2]="RightClick"})(bo||(bo={}));class Wu extends mo{constructor(t){super(t,Uu,Ft(t.event.target))}}Wu.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===bo.RightClick?!1:(n==null||n({event:r}),!0)}}];const vo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class _s extends mo{constructor(t){super(t,vo)}static setup(){return window.addEventListener(vo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(vo.move.name,t)};function t(){}}}_s.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:o}=r;return o.length>1?!1:(n==null||n({event:r}),!0)}}];var wr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(wr||(wr={}));var rn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(rn||(rn={}));function $u(e){let{acceleration:t,activator:r=wr.Pointer,canScroll:n,draggingRect:o,enabled:i,interval:s=5,order:a=rn.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:m}=e;const f=Vu({delta:u,disabled:!i}),[v,h]=nu(),b=j.useRef({x:0,y:0}),g=j.useRef({x:0,y:0}),x=j.useMemo(()=>{switch(r){case wr.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case wr.DraggableRect:return o}},[r,o,l]),k=j.useRef(null),_=j.useCallback(()=>{const I=k.current;if(!I)return;const A=b.current.x*g.current.x,D=b.current.y*g.current.y;I.scrollBy(A,D)},[]),C=j.useMemo(()=>a===rn.TreeOrder?[...c].reverse():c,[a,c]);j.useEffect(()=>{if(!i||!c.length||!x){h();return}for(const I of C){if((n==null?void 0:n(I))===!1)continue;const A=c.indexOf(I),D=d[A];if(!D)continue;const{direction:R,speed:F}=Ou(I,D,x,t,m);for(const Y of["x","y"])f[Y][R[Y]]||(F[Y]=0,R[Y]=0);if(F.x>0||F.y>0){h(),k.current=I,v(_,s),b.current=F,g.current=R;return}}b.current={x:0,y:0},g.current={x:0,y:0},h()},[t,_,n,h,i,s,JSON.stringify(x),JSON.stringify(f),v,c,C,d,JSON.stringify(m)])}const Hu={x:{[Pe.Backward]:!1,[Pe.Forward]:!1},y:{[Pe.Backward]:!1,[Pe.Forward]:!1}};function Vu(e){let{delta:t,disabled:r}=e;const n=qr(t);return mr(o=>{if(r||!n||!o)return Hu;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Pe.Backward]:o.x[Pe.Backward]||i.x===-1,[Pe.Forward]:o.x[Pe.Forward]||i.x===1},y:{[Pe.Backward]:o.y[Pe.Backward]||i.y===-1,[Pe.Forward]:o.y[Pe.Forward]||i.y===1}}},[r,t,n])}function Yu(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return mr(o=>{var i;return t==null?null:(i=n??o)!=null?i:null},[n,t])}function Zu(e,t){return j.useMemo(()=>e.reduce((r,n)=>{const{sensor:o}=n,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,n)}));return[...r,...i]},[]),[e,t])}var xr;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(xr||(xr={}));var wo;(function(e){e.Optimized="optimized"})(wo||(wo={}));const Ss=new Map;function Gu(e,t){let{dragging:r,dependencies:n,config:o}=t;const[i,s]=j.useState(null),{frequency:a,measure:l,strategy:c}=o,d=j.useRef(e),u=b(),m=pr(u),f=j.useCallback(function(g){g===void 0&&(g=[]),!m.current&&s(x=>x===null?g:x.concat(g.filter(k=>!x.includes(k))))},[m]),v=j.useRef(null),h=mr(g=>{if(u&&!r)return Ss;if(!g||g===Ss||d.current!==e||i!=null){const x=new Map;for(let k of e){if(!k)continue;if(i&&i.length>0&&!i.includes(k.id)&&k.rect.current){x.set(k.id,k.rect.current);continue}const _=k.node.current,C=_?new fo(l(_),_):null;k.rect.current=C,C&&x.set(k.id,C)}return x}return g},[e,i,r,u,l]);return j.useEffect(()=>{d.current=e},[e]),j.useEffect(()=>{u||f()},[r,u]),j.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),j.useEffect(()=>{u||typeof a!="number"||v.current!==null||(v.current=setTimeout(()=>{f(),v.current=null},a))},[a,u,f,...n]),{droppableRects:h,measureDroppableContainers:f,measuringScheduled:i!=null};function b(){switch(c){case xr.Always:return!1;case xr.BeforeDragging:return r;default:return!r}}}function xo(e,t){return mr(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Ku(e,t){return xo(e,t)}function Xu(e){let{callback:t,disabled:r}=e;const n=Kr(t),o=j.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return j.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function nn(e){let{callback:t,disabled:r}=e;const n=Kr(t),o=j.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return j.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function qu(e){return new fo(Ut(e),e)}function Cs(e,t,r){t===void 0&&(t=qu);const[n,o]=j.useState(null);function i(){o(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??r)!=null?c:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const s=Xu({callback(l){if(e)for(const c of l){const{type:d,target:u}=c;if(d==="childList"&&u instanceof HTMLElement&&u.contains(e)){i();break}}}}),a=nn({callback:i});return Ke(()=>{i(),e?(a==null||a.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),s==null||s.disconnect())},[e]),n}function Ju(e){const t=xo(e);return cs(e,t)}const Es=[];function Qu(e){const t=j.useRef(e),r=mr(n=>e?n&&n!==Es&&e&&t.current&&e.parentNode===t.current.parentNode?n:tn(e):Es,[e]);return j.useEffect(()=>{t.current=e},[e]),r}function ef(e){const[t,r]=j.useState(null),n=j.useRef(e),o=j.useCallback(i=>{const s=co(i.target);s&&r(a=>a?(a.set(s,uo(s)),new Map(a)):null)},[]);return j.useEffect(()=>{const i=n.current;if(e!==i){s(i);const a=e.map(l=>{const c=co(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,uo(c)]):null}).filter(l=>l!=null);r(a.length?new Map(a):null),n.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const c=co(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),j.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>Bt(i,s),Xe):bs(e):Xe,[e,t])}function Ns(e,t){t===void 0&&(t=[]);const r=j.useRef(null);return j.useEffect(()=>{r.current=null},t),j.useEffect(()=>{const n=e!==Xe;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?br(e,r.current):Xe}function tf(e){j.useEffect(()=>{if(!Gr)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function rf(e,t){return j.useMemo(()=>e.reduce((r,n)=>{let{eventName:o,handler:i}=n;return r[o]=s=>{i(s,t)},r},{}),[e,t])}function As(e){return j.useMemo(()=>e?Au(e):null,[e])}const zs=[];function nf(e,t){t===void 0&&(t=Ut);const[r]=e,n=As(r?Le(r):null),[o,i]=j.useState(zs);function s(){i(()=>e.length?e.map(l=>ms(l)?n:new fo(t(l),l)):zs)}const a=nn({callback:s});return Ke(()=>{a==null||a.disconnect(),s(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),o}function js(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return hr(t)?t:e}function of(e){let{measure:t}=e;const[r,n]=j.useState(null),o=j.useCallback(c=>{for(const{target:d}of c)if(hr(d)){n(u=>{const m=t(d);return u?{...u,width:m.width,height:m.height}:m});break}},[t]),i=nn({callback:o}),s=j.useCallback(c=>{const d=js(c);i==null||i.disconnect(),d&&(i==null||i.observe(d)),n(d?t(d):null)},[t,i]),[a,l]=Xr(s);return j.useMemo(()=>({nodeRef:a,rect:r,setRef:l}),[r,a,l])}const sf=[{sensor:go,options:{}},{sensor:po,options:{}}],af={current:{}},on={draggable:{measure:us},droppable:{measure:us,strategy:xr.WhileDragging,frequency:wo.Optimized},dragOverlay:{measure:Ut}};class yr extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const lf={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new yr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:en},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:on,measureDroppableContainers:en,windowRect:null,measuringScheduled:!1},Ts={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:en,draggableNodes:new Map,over:null,measureDroppableContainers:en},kr=j.createContext(Ts),Os=j.createContext(lf);function cf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new yr}}}function df(e,t){switch(t.type){case Oe.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Oe.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Oe.DragEnd:case Oe.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Oe.RegisterDroppable:{const{element:r}=t,{id:n}=r,o=new yr(e.droppable.containers);return o.set(n,r),{...e,droppable:{...e.droppable,containers:o}}}case Oe.SetDroppableDisabled:{const{id:r,key:n,disabled:o}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const s=new yr(e.droppable.containers);return s.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case Oe.UnregisterDroppable:{const{id:r,key:n}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const i=new yr(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function uf(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:o}=j.useContext(kr),i=qr(n),s=qr(r==null?void 0:r.id);return j.useEffect(()=>{if(!t&&!n&&i&&s!=null){if(!Jr(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const u=su(d);if(u){u.focus();break}}})}},[n,t,o,s,i]),null}function Ps(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...n}),r):r}function ff(e){return j.useMemo(()=>({draggable:{...on.draggable,...e==null?void 0:e.draggable},droppable:{...on.droppable,...e==null?void 0:e.droppable},dragOverlay:{...on.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function hf(e){let{activeNode:t,measure:r,initialRect:n,config:o=!0}=e;const i=j.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Ke(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!n)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=r(c),u=cs(d,n);if(s||(u.x=0),a||(u.y=0),i.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const m=fs(c);m&&m.scrollBy({top:u.y,left:u.x})}},[t,s,a,n,r])}const sn=j.createContext({...Xe,scaleX:1,scaleY:1});var bt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(bt||(bt={}));const pf=j.memo(function(t){var r,n,o,i;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:d=sf,collisionDetection:u=ku,measuring:m,modifiers:f,...v}=t;const h=j.useReducer(df,void 0,cf),[b,g]=h,[x,k]=fu(),[_,C]=j.useState(bt.Uninitialized),I=_===bt.Initialized,{draggable:{active:A,nodes:D,translate:R},droppable:{containers:F}}=b,Y=A!=null?D.get(A):null,N=j.useRef({initial:null,translated:null}),M=j.useMemo(()=>{var Ne;return A!=null?{id:A,data:(Ne=Y==null?void 0:Y.data)!=null?Ne:af,rect:N}:null},[A,Y]),y=j.useRef(null),[B,te]=j.useState(null),[U,$]=j.useState(null),Z=pr(v,Object.values(v)),ne=gr("DndDescribedBy",s),z=j.useMemo(()=>F.getEnabled(),[F]),L=ff(m),{droppableRects:K,measureDroppableContainers:q,measuringScheduled:ee}=Gu(z,{dragging:I,dependencies:[R.x,R.y],config:L.droppable}),ue=Yu(D,A),re=j.useMemo(()=>U?Qr(U):null,[U]),ie=Gn(),ae=Ku(ue,L.draggable.measure);hf({activeNode:A!=null?D.get(A):null,config:ie.layoutShiftCompensation,initialRect:ae,measure:L.draggable.measure});const oe=Cs(ue,L.draggable.measure,ae),le=Cs(ue?ue.parentElement:null),fe=j.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:K,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ve=F.getNodeFor((r=fe.current.over)==null?void 0:r.id),w=of({measure:L.dragOverlay.measure}),X=(n=w.nodeRef.current)!=null?n:ue,H=I?(o=w.rect)!=null?o:oe:null,T=!!(w.nodeRef.current&&w.rect),S=Ju(T?null:oe),P=As(X?Le(X):null),W=Qu(I?ve??ue:null),G=nf(W),O=Ps(f,{transform:{x:R.x-S.x,y:R.y-S.y,scaleX:1,scaleY:1},activatorEvent:U,active:M,activeNodeRect:oe,containerNodeRect:le,draggingNodeRect:H,over:fe.current.over,overlayNodeRect:w.rect,scrollableAncestors:W,scrollableAncestorRects:G,windowRect:P}),V=re?Bt(re,R):null,J=ef(W),Q=Ns(J),se=Ns(J,[oe]),pe=Bt(O,Q),he=H?Cu(H,O):null,Ae=M&&he?u({active:M,collisionRect:he,droppableRects:K,droppableContainers:z,pointerCoordinates:V}):null,Se=as(Ae,"id"),[ze,St]=j.useState(null),Ee=T?O:Bt(O,se),sr=_u(Ee,(i=ze==null?void 0:ze.rect)!=null?i:null,oe),Pt=j.useRef(null),Ze=j.useCallback((Ne,Ie)=>{let{sensor:We,options:Ct}=Ie;if(y.current==null)return;const Ge=D.get(y.current);if(!Ge)return;const $e=Ne.nativeEvent,st=new We({active:y.current,activeNode:Ge,event:$e,options:Ct,context:fe,onAbort(Re){if(!D.get(Re))return;const{onDragAbort:at}=Z.current,ft={id:Re};at==null||at(ft),x({type:"onDragAbort",event:ft})},onPending(Re,Et,at,ft){if(!D.get(Re))return;const{onDragPending:Ir}=Z.current,Nt={id:Re,constraint:Et,initialCoordinates:at,offset:ft};Ir==null||Ir(Nt),x({type:"onDragPending",event:Nt})},onStart(Re){const Et=y.current;if(Et==null)return;const at=D.get(Et);if(!at)return;const{onDragStart:ft}=Z.current,Pr={activatorEvent:$e,active:{id:Et,data:at.data,rect:N}};ht.unstable_batchedUpdates(()=>{ft==null||ft(Pr),C(bt.Initializing),g({type:Oe.DragStart,initialCoordinates:Re,active:Et}),x({type:"onDragStart",event:Pr}),te(Pt.current),$($e)})},onMove(Re){g({type:Oe.DragMove,coordinates:Re})},onEnd:ar(Oe.DragEnd),onCancel:ar(Oe.DragCancel)});Pt.current=st;function ar(Re){return async function(){const{active:at,collisions:ft,over:Pr,scrollAdjustedTranslate:Ir}=fe.current;let Nt=null;if(at&&Ir){const{cancelDrop:Dr}=Z.current;Nt={activatorEvent:$e,active:at,collisions:ft,delta:Ir,over:Pr},Re===Oe.DragEnd&&typeof Dr=="function"&&await Promise.resolve(Dr(Nt))&&(Re=Oe.DragCancel)}y.current=null,ht.unstable_batchedUpdates(()=>{g({type:Re}),C(bt.Uninitialized),St(null),te(null),$(null),Pt.current=null;const Dr=Re===Oe.DragEnd?"onDragEnd":"onDragCancel";if(Nt){const bi=Z.current[Dr];bi==null||bi(Nt),x({type:Dr,event:Nt})}})}}},[D]),Yn=j.useCallback((Ne,Ie)=>(We,Ct)=>{const Ge=We.nativeEvent,$e=D.get(Ct);if(y.current!==null||!$e||Ge.dndKit||Ge.defaultPrevented)return;const st={active:$e};Ne(We,Ie.options,st)===!0&&(Ge.dndKit={capturedBy:Ie.sensor},y.current=Ct,Ze(We,Ie))},[D,Ze]),Zn=Zu(d,Yn);tf(d),Ke(()=>{oe&&_===bt.Initializing&&C(bt.Initialized)},[oe,_]),j.useEffect(()=>{const{onDragMove:Ne}=Z.current,{active:Ie,activatorEvent:We,collisions:Ct,over:Ge}=fe.current;if(!Ie||!We)return;const $e={active:Ie,activatorEvent:We,collisions:Ct,delta:{x:pe.x,y:pe.y},over:Ge};ht.unstable_batchedUpdates(()=>{Ne==null||Ne($e),x({type:"onDragMove",event:$e})})},[pe.x,pe.y]),j.useEffect(()=>{const{active:Ne,activatorEvent:Ie,collisions:We,droppableContainers:Ct,scrollAdjustedTranslate:Ge}=fe.current;if(!Ne||y.current==null||!Ie||!Ge)return;const{onDragOver:$e}=Z.current,st=Ct.get(Se),ar=st&&st.rect.current?{id:st.id,rect:st.rect.current,data:st.data,disabled:st.disabled}:null,Re={active:Ne,activatorEvent:Ie,collisions:We,delta:{x:Ge.x,y:Ge.y},over:ar};ht.unstable_batchedUpdates(()=>{St(ar),$e==null||$e(Re),x({type:"onDragOver",event:Re})})},[Se]),Ke(()=>{fe.current={activatorEvent:U,active:M,activeNode:ue,collisionRect:he,collisions:Ae,droppableRects:K,draggableNodes:D,draggingNode:X,draggingNodeRect:H,droppableContainers:F,over:ze,scrollableAncestors:W,scrollAdjustedTranslate:pe},N.current={initial:H,translated:he}},[M,ue,Ae,he,D,X,H,K,F,ze,W,pe]),$u({...ie,delta:R,draggingRect:he,pointerCoordinates:V,scrollableAncestors:W,scrollableAncestorRects:G});const mi=j.useMemo(()=>({active:M,activeNode:ue,activeNodeRect:oe,activatorEvent:U,collisions:Ae,containerNodeRect:le,dragOverlay:w,draggableNodes:D,droppableContainers:F,droppableRects:K,over:ze,measureDroppableContainers:q,scrollableAncestors:W,scrollableAncestorRects:G,measuringConfiguration:L,measuringScheduled:ee,windowRect:P}),[M,ue,oe,U,Ae,le,w,D,F,K,ze,q,W,G,L,ee,P]),gi=j.useMemo(()=>({activatorEvent:U,activators:Zn,active:M,activeNodeRect:oe,ariaDescribedById:{draggable:ne},dispatch:g,draggableNodes:D,over:ze,measureDroppableContainers:q}),[U,Zn,M,oe,g,ne,D,ze,q]);return j.createElement(ns.Provider,{value:k},j.createElement(kr.Provider,{value:gi},j.createElement(Os.Provider,{value:mi},j.createElement(sn.Provider,{value:sr},c)),j.createElement(uf,{disabled:(a==null?void 0:a.restoreFocus)===!1})),j.createElement(mu,{...a,hiddenTextDescribedById:ne}));function Gn(){const Ne=(B==null?void 0:B.autoScrollEnabled)===!1,Ie=typeof l=="object"?l.enabled===!1:l===!1,We=I&&!Ne&&!Ie;return typeof l=="object"?{...l,enabled:We}:{enabled:We}}}),mf=j.createContext(null),Is="button",gf="Draggable";function bf(e){let{id:t,data:r,disabled:n=!1,attributes:o}=e;const i=gr(gf),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:m}=j.useContext(kr),{role:f=Is,roleDescription:v="draggable",tabIndex:h=0}=o??{},b=(l==null?void 0:l.id)===t,g=j.useContext(b?sn:mf),[x,k]=Xr(),[_,C]=Xr(),I=rf(s,t),A=pr(r);Ke(()=>(u.set(t,{id:t,key:i,node:x,activatorNode:_,data:A}),()=>{const R=u.get(t);R&&R.key===i&&u.delete(t)}),[u,t]);const D=j.useMemo(()=>({role:f,tabIndex:h,"aria-disabled":n,"aria-pressed":b&&f===Is?!0:void 0,"aria-roledescription":v,"aria-describedby":d.draggable}),[n,f,h,b,v,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:D,isDragging:b,listeners:n?void 0:I,node:x,over:m,setNodeRef:k,setActivatorNodeRef:C,transform:g}}function Ds(){return j.useContext(Os)}const vf="Droppable",wf={timeout:25};function xf(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e;const i=gr(vf),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=j.useContext(kr),d=j.useRef({disabled:r}),u=j.useRef(!1),m=j.useRef(null),f=j.useRef(null),{disabled:v,updateMeasurementsFor:h,timeout:b}={...wf,...o},g=pr(h??n),x=j.useCallback(()=>{if(!u.current){u.current=!0;return}f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{c(Array.isArray(g.current)?g.current:[g.current]),f.current=null},b)},[b]),k=nn({callback:x,disabled:v||!s}),_=j.useCallback((D,R)=>{k&&(R&&(k.unobserve(R),u.current=!1),D&&k.observe(D))},[k]),[C,I]=Xr(_),A=pr(t);return j.useEffect(()=>{!k||!C.current||(k.disconnect(),u.current=!1,k.observe(C.current))},[C,k]),j.useEffect(()=>(a({type:Oe.RegisterDroppable,element:{id:n,key:i,disabled:r,node:C,rect:m,data:A}}),()=>a({type:Oe.UnregisterDroppable,key:i,id:n})),[n]),j.useEffect(()=>{r!==d.current.disabled&&(a({type:Oe.SetDroppableDisabled,id:n,key:i,disabled:r}),d.current.disabled=r)},[n,i,r,a]),{active:s,rect:m,isOver:(l==null?void 0:l.id)===n,node:C,over:l,setNodeRef:I}}function yf(e){let{animation:t,children:r}=e;const[n,o]=j.useState(null),[i,s]=j.useState(null),a=qr(r);return!r&&!n&&a&&o(a),Ke(()=>{if(!i)return;const l=n==null?void 0:n.key,c=n==null?void 0:n.props.id;if(l==null||c==null){o(null);return}Promise.resolve(t(c,i)).then(()=>{o(null)})},[t,n,i]),j.createElement(j.Fragment,null,r,n?j.cloneElement(n,{ref:s}):null)}const kf={x:0,y:0,scaleX:1,scaleY:1};function _f(e){let{children:t}=e;return j.createElement(kr.Provider,{value:Ts},j.createElement(sn.Provider,{value:kf},t))}const Sf={position:"fixed",touchAction:"none"},Cf=e=>Jr(e)?"transform 250ms ease":void 0,Ef=j.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:o,children:i,className:s,rect:a,style:l,transform:c,transition:d=Cf}=e;if(!a)return null;const u=o?c:{...c,scaleX:1,scaleY:1},m={...Sf,width:a.width,height:a.height,top:a.top,left:a.left,transform:gt.Transform.toString(u),transformOrigin:o&&n?bu(n,a):void 0,transition:typeof d=="function"?d(n):d,...l};return j.createElement(r,{className:s,style:m,ref:t},i)}),Nf={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:r}}=e;return[{transform:gt.Transform.toString(t)},{transform:gt.Transform.toString(r)}]},sideEffects:(e=>t=>{let{active:r,dragOverlay:n}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(o[a]=r.node.style.getPropertyValue(a),r.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&n.node.style.setProperty(a,l);return s!=null&&s.active&&r.node.classList.add(s.active),s!=null&&s.dragOverlay&&n.node.classList.add(s.dragOverlay),function(){for(const[l,c]of Object.entries(o))r.node.style.setProperty(l,c);s!=null&&s.active&&r.node.classList.remove(s.active)}})({styles:{active:{opacity:"0"}}})};function Af(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:o}=e;return Kr((i,s)=>{if(t===null)return;const a=r.get(i);if(!a)return;const l=a.node.current;if(!l)return;const c=js(s);if(!c)return;const{transform:d}=Le(s).getComputedStyle(s),u=ds(d);if(!u)return;const m=typeof t=="function"?t:zf(t);return vs(l,o.draggable.measure),m({active:{id:i,data:a.data,node:l,rect:o.draggable.measure(l)},draggableNodes:r,dragOverlay:{node:s,rect:o.dragOverlay.measure(c)},droppableContainers:n,measuringConfiguration:o,transform:u})})}function zf(e){const{duration:t,easing:r,sideEffects:n,keyframes:o}={...Nf,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...c}=i;if(!t)return;const d={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},u={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},m={x:l.x-d.x,y:l.y-d.y,...u},f=o({...c,active:s,dragOverlay:a,transform:{initial:l,final:m}}),[v]=f,h=f[f.length-1];if(JSON.stringify(v)===JSON.stringify(h))return;const b=n==null?void 0:n({active:s,dragOverlay:a,...c}),g=a.node.animate(f,{duration:t,easing:r,fill:"forwards"});return new Promise(x=>{g.onfinish=()=>{b==null||b(),x()}})}}let Rs=0;function jf(e){return j.useMemo(()=>{if(e!=null)return Rs++,Rs},[e])}const Tf=j.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:c=999}=e;const{activatorEvent:d,active:u,activeNodeRect:m,containerNodeRect:f,draggableNodes:v,droppableContainers:h,dragOverlay:b,over:g,measuringConfiguration:x,scrollableAncestors:k,scrollableAncestorRects:_,windowRect:C}=Ds(),I=j.useContext(sn),A=jf(u==null?void 0:u.id),D=Ps(s,{activatorEvent:d,active:u,activeNodeRect:m,containerNodeRect:f,draggingNodeRect:b.rect,over:g,overlayNodeRect:b.rect,scrollableAncestors:k,scrollableAncestorRects:_,transform:I,windowRect:C}),R=xo(m),F=Af({config:n,draggableNodes:v,droppableContainers:h,measuringConfiguration:x}),Y=R?b.setRef:void 0;return j.createElement(_f,null,j.createElement(yf,{animation:F},u&&A?j.createElement(Ef,{key:A,id:u.id,ref:Y,as:a,activatorEvent:d,adjustScale:t,className:l,transition:i,rect:R,style:{zIndex:c,...o},transform:D},r):null))}),Of=e=>{let{transform:t}=e;return{...t,x:0}};function Ls(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Pf(e,t){return e.reduce((r,n,o)=>{const i=t.get(n);return i&&(r[o]=i),r},Array(e.length))}function an(e){return e!==null&&e>=0}function If(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Df(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Ms=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const i=Ls(t,n,r),s=t[o],a=i[o];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},ln={scaleX:1,scaleY:1},Rf=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:o,rects:i,overIndex:s}=e;const a=(t=i[r])!=null?t:n;if(!a)return null;if(o===r){const c=i[s];return c?{x:0,y:r<s?c.top+c.height-(a.top+a.height):c.top-a.top,...ln}:null}const l=Lf(i,o,r);return o>r&&o<=s?{x:0,y:-a.height-l,...ln}:o<r&&o>=s?{x:0,y:a.height+l,...ln}:{x:0,y:0,...ln}};function Lf(e,t,r){const n=e[t],o=e[t-1],i=e[t+1];return n?r<t?o?n.top-(o.top+o.height):i?i.top-(n.top+n.height):0:i?i.top-(n.top+n.height):o?n.top-(o.top+o.height):0:0}const Fs="Sortable",Bs=j.createContext({activeIndex:-1,containerId:Fs,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ms,disabled:{draggable:!1,droppable:!1}});function Mf(e){let{children:t,id:r,items:n,strategy:o=Ms,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:d}=Ds(),u=gr(Fs,r),m=a.rect!==null,f=j.useMemo(()=>n.map(I=>typeof I=="object"&&"id"in I?I.id:I),[n]),v=s!=null,h=s?f.indexOf(s.id):-1,b=c?f.indexOf(c.id):-1,g=j.useRef(f),x=!If(f,g.current),k=b!==-1&&h===-1||x,_=Df(i);Ke(()=>{x&&v&&d(f)},[x,f,v,d]),j.useEffect(()=>{g.current=f},[f]);const C=j.useMemo(()=>({activeIndex:h,containerId:u,disabled:_,disableTransforms:k,items:f,overIndex:b,useDragOverlay:m,sortedRects:Pf(f,l),strategy:o}),[h,u,_.draggable,_.droppable,k,f,b,l,m,o]);return j.createElement(Bs.Provider,{value:C},t)}const Ff=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return Ls(r,n,o).indexOf(t)},Bf=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!n||a!==i&&o===s?!1:r?!0:s!==o&&t===l},Uf={duration:200,easing:"ease"},Us="transform",Wf=gt.Transition.toString({property:Us,duration:0,easing:"linear"}),$f={roleDescription:"sortable"};function Hf(e){let{disabled:t,index:r,node:n,rect:o}=e;const[i,s]=j.useState(null),a=j.useRef(r);return Ke(()=>{if(!t&&r!==a.current&&n.current){const l=o.current;if(l){const c=Ut(n.current,{ignoreTransform:!0}),d={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(d.x||d.y)&&s(d)}}r!==a.current&&(a.current=r)},[t,r,n,o]),j.useEffect(()=>{i&&s(null)},[i]),i}function Vf(e){let{animateLayoutChanges:t=Bf,attributes:r,disabled:n,data:o,getNewIndex:i=Ff,id:s,strategy:a,resizeObserverConfig:l,transition:c=Uf}=e;const{items:d,containerId:u,activeIndex:m,disabled:f,disableTransforms:v,sortedRects:h,overIndex:b,useDragOverlay:g,strategy:x}=j.useContext(Bs),k=Yf(n,f),_=d.indexOf(s),C=j.useMemo(()=>({sortable:{containerId:u,index:_,items:d},...o}),[u,o,_,d]),I=j.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:A,node:D,isOver:R,setNodeRef:F}=xf({id:s,data:C,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...l}}),{active:Y,activatorEvent:N,activeNodeRect:M,attributes:y,setNodeRef:B,listeners:te,isDragging:U,over:$,setActivatorNodeRef:Z,transform:ne}=bf({id:s,data:C,attributes:{...$f,...r},disabled:k.draggable}),z=ru(F,B),L=!!Y,K=L&&!v&&an(m)&&an(b),q=!g&&U,ee=q&&K?ne:null,re=K?ee??(a??x)({rects:h,activeNodeRect:M,activeIndex:m,overIndex:b,index:_}):null,ie=an(m)&&an(b)?i({id:s,items:d,activeIndex:m,overIndex:b}):_,ae=Y==null?void 0:Y.id,oe=j.useRef({activeId:ae,items:d,newIndex:ie,containerId:u}),le=d!==oe.current.items,fe=t({active:Y,containerId:u,isDragging:U,isSorting:L,id:s,index:_,items:d,newIndex:oe.current.newIndex,previousItems:oe.current.items,previousContainerId:oe.current.containerId,transition:c,wasDragging:oe.current.activeId!=null}),ve=Hf({disabled:!fe,index:_,node:D,rect:A});return j.useEffect(()=>{L&&oe.current.newIndex!==ie&&(oe.current.newIndex=ie),u!==oe.current.containerId&&(oe.current.containerId=u),d!==oe.current.items&&(oe.current.items=d)},[L,ie,u,d]),j.useEffect(()=>{if(ae===oe.current.activeId)return;if(ae!=null&&oe.current.activeId==null){oe.current.activeId=ae;return}const X=setTimeout(()=>{oe.current.activeId=ae},50);return()=>clearTimeout(X)},[ae]),{active:Y,activeIndex:m,attributes:y,data:C,rect:A,index:_,newIndex:ie,items:d,isOver:R,isSorting:L,isDragging:U,listeners:te,node:D,overIndex:b,over:$,setNodeRef:z,setActivatorNodeRef:Z,setDroppableNodeRef:F,setDraggableNodeRef:B,transform:ve??re,transition:w()};function w(){if(ve||le&&oe.current.newIndex===_)return Wf;if(!(q&&!Jr(N)||!c)&&(L||fe))return gt.Transition.toString({...c,property:Us})}}function Yf(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function cn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Zf=[we.Down,we.Right,we.Up,we.Left],Gf=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:a}}=t;if(Zf.includes(e.code)){if(e.preventDefault(),!r||!n)return;const l=[];i.getEnabled().forEach(u=>{if(!u||u!=null&&u.disabled)return;const m=o.get(u.id);if(m)switch(e.code){case we.Down:n.top<m.top&&l.push(u);break;case we.Up:n.top>m.top&&l.push(u);break;case we.Left:n.left>m.left&&l.push(u);break;case we.Right:n.left<m.left&&l.push(u);break}});const c=xu({collisionRect:n,droppableRects:o,droppableContainers:l});let d=as(c,"id");if(d===(s==null?void 0:s.id)&&c.length>1&&(d=c[1].id),d!=null){const u=i.get(r.id),m=i.get(d),f=m?o.get(m.id):null,v=m==null?void 0:m.node.current;if(v&&f&&u&&m){const b=tn(v).some((I,A)=>a[A]!==I),g=Ws(u,m),x=Kf(u,m),k=b||!g?{x:0,y:0}:{x:x?n.width-f.width:0,y:x?n.height-f.height:0},_={x:f.left,y:f.top};return k.x&&k.y?_:br(_,k)}}}};function Ws(e,t){return!cn(e)||!cn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Kf(e,t){return!cn(e)||!cn(t)||!Ws(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function yo({className:e,type:t,...r}){return p.jsx("input",{type:t,className:me("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 Xf({className:e,...t}){return p.jsx("textarea",{className:me("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),...t})}function qf({className:e,checked:t,onCheckedChange:r,...n}){return p.jsx("input",{type:"checkbox",checked:t,onChange:o=>r==null?void 0:r(o.target.checked),className:me("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...n})}function zt({className:e,...t}){return p.jsx("label",{className:me("text-sm font-medium leading-none select-none",e),...t})}function ko(e,[t,r]){return Math.min(r,Math.max(t,e))}function be(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Wt(e,t=[]){let r=[];function n(i,s){const a=E.createContext(s),l=r.length;r=[...r,s];const c=u=>{var g;const{scope:m,children:f,...v}=u,h=((g=m==null?void 0:m[e])==null?void 0:g[l])||a,b=E.useMemo(()=>v,Object.values(v));return p.jsx(h.Provider,{value:b,children:f})};c.displayName=i+"Provider";function d(u,m){var h;const f=((h=m==null?void 0:m[e])==null?void 0:h[l])||a,v=E.useContext(f);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=r.map(s=>E.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return E.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,Jf(o,...t)]}function Jf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function $s(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hs(...e){return t=>{let r=!1;const n=e.map(o=>{const i=$s(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():$s(e[o],null)}}}}function _e(...e){return E.useCallback(Hs(...e),e)}function $t(e){const t=eh(e),r=E.forwardRef((n,o)=>{const{children:i,...s}=n,a=E.Children.toArray(i),l=a.find(rh);if(l){const c=l.props.children,d=a.map(u=>u===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:u);return p.jsx(t,{...s,ref:o,children:E.isValidElement(c)?E.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var Qf=$t("Slot");function eh(e){const t=E.forwardRef((r,n)=>{const{children:o,...i}=r;if(E.isValidElement(o)){const s=oh(o),a=nh(i,o.props);return o.type!==E.Fragment&&(a.ref=n?Hs(n,s):s),E.cloneElement(o,a)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vs=Symbol("radix.slottable");function th(e){const t=({children:r})=>p.jsx(p.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Vs,t}function rh(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vs}function nh(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function oh(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ih(e){const t=e+"CollectionProvider",[r,n]=Wt(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:b,children:g}=h,x=j.useRef(null),k=j.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:k,collectionRef:x,children:g})};s.displayName=t;const a=e+"CollectionSlot",l=$t(a),c=j.forwardRef((h,b)=>{const{scope:g,children:x}=h,k=i(a,g),_=_e(b,k.collectionRef);return p.jsx(l,{ref:_,children:x})});c.displayName=a;const d=e+"CollectionItemSlot",u="data-radix-collection-item",m=$t(d),f=j.forwardRef((h,b)=>{const{scope:g,children:x,...k}=h,_=j.useRef(null),C=_e(b,_),I=i(d,g);return j.useEffect(()=>(I.itemMap.set(_,{ref:_,...k}),()=>void I.itemMap.delete(_))),p.jsx(m,{[u]:"",ref:C,children:x})});f.displayName=d;function v(h){const b=i(e+"CollectionConsumer",h);return j.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const k=Array.from(x.querySelectorAll(`[${u}]`));return Array.from(b.itemMap.values()).sort((I,A)=>k.indexOf(I.ref.current)-k.indexOf(A.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:c,ItemSlot:f},v,n]}var sh=E.createContext(void 0);function Ys(e){const t=E.useContext(sh);return e||t||"ltr"}var ah=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=ah.reduce((e,t)=>{const r=$t(`Primitive.${t}`),n=E.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lh(e,t){e&&Rr.flushSync(()=>e.dispatchEvent(t))}function Me(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function ch(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e);E.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var dh="DismissableLayer",_o="dismissableLayer.update",uh="dismissableLayer.pointerDownOutside",fh="dismissableLayer.focusOutside",Zs,Gs=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dn=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=E.useContext(Gs),[d,u]=E.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=E.useState({}),v=_e(t,A=>u(A)),h=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(b),x=d?h.indexOf(d):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,_=x>=g,C=mh(A=>{const D=A.target,R=[...c.branches].some(F=>F.contains(D));!_||R||(o==null||o(A),s==null||s(A),A.defaultPrevented||a==null||a())},m),I=gh(A=>{const D=A.target;[...c.branches].some(F=>F.contains(D))||(i==null||i(A),s==null||s(A),A.defaultPrevented||a==null||a())},m);return ch(A=>{x===c.layers.size-1&&(n==null||n(A),!A.defaultPrevented&&a&&(A.preventDefault(),a()))},m),E.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Zs=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ks(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Zs)}},[d,m,r,c]),E.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ks())},[d,c]),E.useEffect(()=>{const A=()=>f({});return document.addEventListener(_o,A),()=>document.removeEventListener(_o,A)},[]),p.jsx(ke.div,{...l,ref:v,style:{pointerEvents:k?_?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,I.onFocusCapture),onBlurCapture:be(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,C.onPointerDownCapture)})});dn.displayName=dh;var hh="DismissableLayerBranch",ph=E.forwardRef((e,t)=>{const r=E.useContext(Gs),n=E.useRef(null),o=_e(t,n);return E.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),p.jsx(ke.div,{...e,ref:o})});ph.displayName=hh;function mh(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e),n=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Xs(uh,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function gh(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e),n=E.useRef(!1);return E.useEffect(()=>{const o=i=>{i.target&&!n.current&&Xs(fh,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ks(){const e=new CustomEvent(_o);document.dispatchEvent(e)}function Xs(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?lh(o,i):o.dispatchEvent(i)}var So=0;function qs(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Js()),document.body.insertAdjacentElement("beforeend",e[1]??Js()),So++,()=>{So===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),So--}},[])}function Js(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Co="focusScope.autoFocusOnMount",Eo="focusScope.autoFocusOnUnmount",Qs={bubbles:!1,cancelable:!0},bh="FocusScope",No=E.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=E.useState(null),c=Me(o),d=Me(i),u=E.useRef(null),m=_e(t,h=>l(h)),f=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(n){let h=function(k){if(f.paused||!a)return;const _=k.target;a.contains(_)?u.current=_:vt(u.current,{select:!0})},b=function(k){if(f.paused||!a)return;const _=k.relatedTarget;_!==null&&(a.contains(_)||vt(u.current,{select:!0}))},g=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&vt(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const x=new MutationObserver(g);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),x.disconnect()}}},[n,a,f.paused]),E.useEffect(()=>{if(a){ra.add(f);const h=document.activeElement;if(!a.contains(h)){const g=new CustomEvent(Co,Qs);a.addEventListener(Co,c),a.dispatchEvent(g),g.defaultPrevented||(vh(_h(ea(a)),{select:!0}),document.activeElement===h&&vt(a))}return()=>{a.removeEventListener(Co,c),setTimeout(()=>{const g=new CustomEvent(Eo,Qs);a.addEventListener(Eo,d),a.dispatchEvent(g),g.defaultPrevented||vt(h??document.body,{select:!0}),a.removeEventListener(Eo,d),ra.remove(f)},0)}}},[a,c,d,f]);const v=E.useCallback(h=>{if(!r&&!n||f.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(b&&g){const x=h.currentTarget,[k,_]=wh(x);k&&_?!h.shiftKey&&g===_?(h.preventDefault(),r&&vt(k,{select:!0})):h.shiftKey&&g===k&&(h.preventDefault(),r&&vt(_,{select:!0})):g===x&&h.preventDefault()}},[r,n,f.paused]);return p.jsx(ke.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})});No.displayName=bh;function vh(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(vt(n,{select:t}),document.activeElement!==r)return}function wh(e){const t=ea(e),r=ta(t,e),n=ta(t.reverse(),e);return[r,n]}function ea(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ta(e,t){for(const r of e)if(!xh(r,{upTo:t}))return r}function xh(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function yh(e){return e instanceof HTMLInputElement&&"select"in e}function vt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&yh(e)&&t&&e.select()}}var ra=kh();function kh(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=na(e,t),e.unshift(t)},remove(t){var r;e=na(e,t),(r=e[0])==null||r.resume()}}}function na(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function _h(e){return e.filter(t=>t.tagName!=="A")}var De=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},Sh=E[" useId ".trim().toString()]||(()=>{}),Ch=0;function _r(e){const[t,r]=E.useState(Sh());return De(()=>{r(n=>n??String(Ch++))},[e]),t?`radix-${t}`:""}const Eh=["top","right","bottom","left"],wt=Math.min,Fe=Math.max,un=Math.round,fn=Math.floor,et=e=>({x:e,y:e}),Nh={left:"right",right:"left",bottom:"top",top:"bottom"},Ah={start:"end",end:"start"};function Ao(e,t,r){return Fe(e,wt(t,r))}function ct(e,t){return typeof e=="function"?e(t):e}function dt(e){return e.split("-")[0]}function Ht(e){return e.split("-")[1]}function zo(e){return e==="x"?"y":"x"}function jo(e){return e==="y"?"height":"width"}const zh=new Set(["top","bottom"]);function tt(e){return zh.has(dt(e))?"y":"x"}function To(e){return zo(tt(e))}function jh(e,t,r){r===void 0&&(r=!1);const n=Ht(e),o=To(e),i=jo(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=hn(s)),[s,hn(s)]}function Th(e){const t=hn(e);return[Oo(e),t,Oo(t)]}function Oo(e){return e.replace(/start|end/g,t=>Ah[t])}const oa=["left","right"],ia=["right","left"],Oh=["top","bottom"],Ph=["bottom","top"];function Ih(e,t,r){switch(e){case"top":case"bottom":return r?t?ia:oa:t?oa:ia;case"left":case"right":return t?Oh:Ph;default:return[]}}function Dh(e,t,r,n){const o=Ht(e);let i=Ih(dt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Oo)))),i}function hn(e){return e.replace(/left|right|bottom|top/g,t=>Nh[t])}function Rh(e){return{top:0,right:0,bottom:0,left:0,...e}}function sa(e){return typeof e!="number"?Rh(e):{top:e,right:e,bottom:e,left:e}}function pn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function aa(e,t,r){let{reference:n,floating:o}=e;const i=tt(t),s=To(t),a=jo(s),l=dt(t),c=i==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,m=n[a]/2-o[a]/2;let f;switch(l){case"top":f={x:d,y:n.y-o.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-o.width,y:u};break;default:f={x:n.x,y:n.y}}switch(Ht(t)){case"start":f[s]-=m*(r&&c?-1:1);break;case"end":f[s]+=m*(r&&c?-1:1);break}return f}async function Lh(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=ct(t,e),v=sa(f),b=a[m?u==="floating"?"reference":"floating":u],g=pn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},C=pn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:k,strategy:l}):x);return{top:(g.top-C.top+v.top)/_.y,bottom:(C.bottom-g.bottom+v.bottom)/_.y,left:(g.left-C.left+v.left)/_.x,right:(C.right-g.right+v.right)/_.x}}const Mh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=aa(c,n,l),m=n,f={},v=0;for(let b=0;b<a.length;b++){var h;const{name:g,fn:x}=a[b],{x:k,y:_,data:C,reset:I}=await x({x:d,y:u,initialPlacement:n,placement:m,strategy:o,middlewareData:f,rects:c,platform:{...s,detectOverflow:(h=s.detectOverflow)!=null?h:Lh},elements:{reference:e,floating:t}});d=k??d,u=_??u,f={...f,[g]:{...f[g],...C}},I&&v<=50&&(v++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:d,y:u}=aa(c,m,l)),b=-1)}return{x:d,y:u,placement:m,strategy:o,middlewareData:f}},Fh=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=ct(e,t)||{};if(c==null)return{};const u=sa(d),m={x:r,y:n},f=To(o),v=jo(f),h=await s.getDimensions(c),b=f==="y",g=b?"top":"left",x=b?"bottom":"right",k=b?"clientHeight":"clientWidth",_=i.reference[v]+i.reference[f]-m[f]-i.floating[v],C=m[f]-i.reference[f],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let A=I?I[k]:0;(!A||!await(s.isElement==null?void 0:s.isElement(I)))&&(A=a.floating[k]||i.floating[v]);const D=_/2-C/2,R=A/2-h[v]/2-1,F=wt(u[g],R),Y=wt(u[x],R),N=F,M=A-h[v]-Y,y=A/2-h[v]/2+D,B=Ao(N,y,M),te=!l.arrow&&Ht(o)!=null&&y!==B&&i.reference[v]/2-(y<N?F:Y)-h[v]/2<0,U=te?y<N?y-N:y-M:0;return{[f]:m[f]+U,data:{[f]:B,centerOffset:y-B-U,...te&&{alignmentOffset:U}},reset:te}}}),Bh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...b}=ct(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=dt(o),x=tt(a),k=dt(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=m||(k||!h?[hn(a)]:Th(a)),I=v!=="none";!m&&I&&C.push(...Dh(a,h,v,_));const A=[a,...C],D=await l.detectOverflow(t,b),R=[];let F=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&R.push(D[g]),u){const y=jh(o,s,_);R.push(D[y[0]],D[y[1]])}if(F=[...F,{placement:o,overflows:R}],!R.every(y=>y<=0)){var Y,N;const y=(((Y=i.flip)==null?void 0:Y.index)||0)+1,B=A[y];if(B&&(!(u==="alignment"?x!==tt(B):!1)||F.every($=>tt($.placement)===x?$.overflows[0]>0:!0)))return{data:{index:y,overflows:F},reset:{placement:B}};let te=(N=F.filter(U=>U.overflows[0]<=0).sort((U,$)=>U.overflows[1]-$.overflows[1])[0])==null?void 0:N.placement;if(!te)switch(f){case"bestFit":{var M;const U=(M=F.filter($=>{if(I){const Z=tt($.placement);return Z===x||Z==="y"}return!0}).map($=>[$.placement,$.overflows.filter(Z=>Z>0).reduce((Z,ne)=>Z+ne,0)]).sort(($,Z)=>$[1]-Z[1])[0])==null?void 0:M[0];U&&(te=U);break}case"initialPlacement":te=a;break}if(o!==te)return{reset:{placement:te}}}return{}}}};function la(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ca(e){return Eh.some(t=>e[t]>=0)}const Uh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=ct(e,t);switch(o){case"referenceHidden":{const s=await n.detectOverflow(t,{...i,elementContext:"reference"}),a=la(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ca(a)}}}case"escaped":{const s=await n.detectOverflow(t,{...i,altBoundary:!0}),a=la(s,r.floating);return{data:{escapedOffsets:a,escaped:ca(a)}}}default:return{}}}}},da=new Set(["left","top"]);async function Wh(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=dt(r),a=Ht(r),l=tt(r)==="y",c=da.has(s)?-1:1,d=i&&l?-1:1,u=ct(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof v=="number"&&(f=a==="end"?v*-1:v),l?{x:f*d,y:m*c}:{x:m*c,y:f*d}}const $h=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Wh(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Hh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x,y:k}=g;return{x,y:k}}},...c}=ct(e,t),d={x:r,y:n},u=await i.detectOverflow(t,c),m=tt(dt(o)),f=zo(m);let v=d[f],h=d[m];if(s){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",k=v+u[g],_=v-u[x];v=Ao(k,v,_)}if(a){const g=m==="y"?"top":"left",x=m==="y"?"bottom":"right",k=h+u[g],_=h-u[x];h=Ao(k,h,_)}const b=l.fn({...t,[f]:v,[m]:h});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[f]:s,[m]:a}}}}}},Vh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ct(e,t),d={x:r,y:n},u=tt(o),m=zo(u);let f=d[m],v=d[u];const h=ct(a,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const k=m==="y"?"height":"width",_=i.reference[m]-i.floating[k]+b.mainAxis,C=i.reference[m]+i.reference[k]-b.mainAxis;f<_?f=_:f>C&&(f=C)}if(c){var g,x;const k=m==="y"?"width":"height",_=da.has(dt(o)),C=i.reference[u]-i.floating[k]+(_&&((g=s.offset)==null?void 0:g[u])||0)+(_?0:b.crossAxis),I=i.reference[u]+i.reference[k]+(_?0:((x=s.offset)==null?void 0:x[u])||0)-(_?b.crossAxis:0);v<C?v=C:v>I&&(v=I)}return{[m]:f,[u]:v}}}},Yh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=ct(e,t),d=await s.detectOverflow(t,c),u=dt(o),m=Ht(o),f=tt(o)==="y",{width:v,height:h}=i.floating;let b,g;u==="top"||u==="bottom"?(b=u,g=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=u,b=m==="end"?"top":"bottom");const x=h-d.top-d.bottom,k=v-d.left-d.right,_=wt(h-d[b],x),C=wt(v-d[g],k),I=!t.middlewareData.shift;let A=_,D=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(D=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(A=x),I&&!m){const F=Fe(d.left,0),Y=Fe(d.right,0),N=Fe(d.top,0),M=Fe(d.bottom,0);f?D=v-2*(F!==0||Y!==0?F+Y:Fe(d.left,d.right)):A=h-2*(N!==0||M!==0?N+M:Fe(d.top,d.bottom))}await l({...t,availableWidth:D,availableHeight:A});const R=await s.getDimensions(a.floating);return v!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function mn(){return typeof window<"u"}function Vt(e){return ua(e)?(e.nodeName||"").toLowerCase():"#document"}function Be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(ua(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ua(e){return mn()?e instanceof Node||e instanceof Be(e).Node:!1}function qe(e){return mn()?e instanceof Element||e instanceof Be(e).Element:!1}function nt(e){return mn()?e instanceof HTMLElement||e instanceof Be(e).HTMLElement:!1}function fa(e){return!mn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Be(e).ShadowRoot}const Zh=new Set(["inline","contents"]);function Sr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Je(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Zh.has(o)}const Gh=new Set(["table","td","th"]);function Kh(e){return Gh.has(Vt(e))}const Xh=[":popover-open",":modal"];function gn(e){return Xh.some(t=>{try{return e.matches(t)}catch{return!1}})}const qh=["transform","translate","scale","rotate","perspective"],Jh=["transform","translate","scale","rotate","perspective","filter"],Qh=["paint","layout","strict","content"];function Po(e){const t=Io(),r=qe(e)?Je(e):e;return qh.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Jh.some(n=>(r.willChange||"").includes(n))||Qh.some(n=>(r.contain||"").includes(n))}function ep(e){let t=xt(e);for(;nt(t)&&!Yt(t);){if(Po(t))return t;if(gn(t))return null;t=xt(t)}return null}function Io(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tp=new Set(["html","body","#document"]);function Yt(e){return tp.has(Vt(e))}function Je(e){return Be(e).getComputedStyle(e)}function bn(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xt(e){if(Vt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fa(e)&&e.host||rt(e);return fa(t)?t.host:t}function ha(e){const t=xt(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:nt(t)&&Sr(t)?t:ha(t)}function Cr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ha(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=Be(o);if(i){const a=Do(s);return t.concat(s,s.visualViewport||[],Sr(o)?o:[],a&&r?Cr(a):[])}return t.concat(o,Cr(o,[],r))}function Do(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pa(e){const t=Je(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=nt(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=un(r)!==i||un(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ro(e){return qe(e)?e:e.contextElement}function Zt(e){const t=Ro(e);if(!nt(t))return et(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=pa(t);let s=(i?un(r.width):r.width)/n,a=(i?un(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const rp=et(0);function ma(e){const t=Be(e);return!Io()||!t.visualViewport?rp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function np(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Be(e)?!1:t}function jt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ro(e);let s=et(1);t&&(n?qe(n)&&(s=Zt(n)):s=Zt(e));const a=np(i,r,n)?ma(i):et(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const m=Be(i),f=n&&qe(n)?Be(n):n;let v=m,h=Do(v);for(;h&&n&&f!==v;){const b=Zt(h),g=h.getBoundingClientRect(),x=Je(h),k=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*b.x,_=g.top+(h.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=k,c+=_,v=Be(h),h=Do(v)}}return pn({width:d,height:u,x:l,y:c})}function vn(e,t){const r=bn(e).scrollLeft;return t?t.left+r:jt(rt(e)).left+r}function ga(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-vn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function op(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=rt(n),a=t?gn(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=et(1);const d=et(0),u=nt(n);if((u||!u&&!i)&&((Vt(n)!=="body"||Sr(s))&&(l=bn(n)),nt(n))){const f=jt(n);c=Zt(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const m=s&&!u&&!i?ga(s,l):et(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-l.scrollTop*c.y+d.y+m.y}}function ip(e){return Array.from(e.getClientRects())}function sp(e){const t=rt(e),r=bn(e),n=e.ownerDocument.body,o=Fe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Fe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+vn(e);const a=-r.scrollTop;return Je(n).direction==="rtl"&&(s+=Fe(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const ba=25;function ap(e,t){const r=Be(e),n=rt(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=Io();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=vn(n);if(c<=0){const d=n.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(n.clientWidth-u.clientWidth-f);v<=ba&&(i-=v)}else c<=ba&&(i+=c);return{width:i,height:s,x:a,y:l}}const lp=new Set(["absolute","fixed"]);function cp(e,t){const r=jt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=nt(e)?Zt(e):et(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function va(e,t,r){let n;if(t==="viewport")n=ap(e,r);else if(t==="document")n=sp(rt(e));else if(qe(t))n=cp(t,r);else{const o=ma(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return pn(n)}function wa(e,t){const r=xt(e);return r===t||!qe(r)||Yt(r)?!1:Je(r).position==="fixed"||wa(r,t)}function dp(e,t){const r=t.get(e);if(r)return r;let n=Cr(e,[],!1).filter(a=>qe(a)&&Vt(a)!=="body"),o=null;const i=Je(e).position==="fixed";let s=i?xt(e):e;for(;qe(s)&&!Yt(s);){const a=Je(s),l=Po(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&lp.has(o.position)||Sr(s)&&!l&&wa(e,s))?n=n.filter(d=>d!==s):o=a,s=xt(s)}return t.set(e,n),n}function up(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?gn(t)?[]:dp(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((c,d)=>{const u=va(t,d,o);return c.top=Fe(u.top,c.top),c.right=wt(u.right,c.right),c.bottom=wt(u.bottom,c.bottom),c.left=Fe(u.left,c.left),c},va(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function fp(e){const{width:t,height:r}=pa(e);return{width:t,height:r}}function hp(e,t,r){const n=nt(t),o=rt(t),i=r==="fixed",s=jt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=et(0);function c(){l.x=vn(o)}if(n||!n&&!i)if((Vt(t)!=="body"||Sr(o))&&(a=bn(t)),n){const f=jt(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=o&&!n&&!i?ga(o,a):et(0),u=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function Lo(e){return Je(e).position==="static"}function xa(e,t){if(!nt(e)||Je(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rt(e)===r&&(r=r.ownerDocument.body),r}function ya(e,t){const r=Be(e);if(gn(e))return r;if(!nt(e)){let o=xt(e);for(;o&&!Yt(o);){if(qe(o)&&!Lo(o))return o;o=xt(o)}return r}let n=xa(e,t);for(;n&&Kh(n)&&Lo(n);)n=xa(n,t);return n&&Yt(n)&&Lo(n)&&!Po(n)?r:n||ep(e)||r}const pp=async function(e){const t=this.getOffsetParent||ya,r=this.getDimensions,n=await r(e.floating);return{reference:hp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function mp(e){return Je(e).direction==="rtl"}const gp={convertOffsetParentRelativeRectToViewportRelativeRect:op,getDocumentElement:rt,getClippingRect:up,getOffsetParent:ya,getElementRects:pp,getClientRects:ip,getDimensions:fp,getScale:Zt,isElement:qe,isRTL:mp};function ka(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bp(e,t){let r=null,n;const o=rt(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=c;if(a||t(),!m||!f)return;const v=fn(u),h=fn(o.clientWidth-(d+m)),b=fn(o.clientHeight-(u+f)),g=fn(d),k={rootMargin:-v+"px "+-h+"px "+-b+"px "+-g+"px",threshold:Fe(0,wt(1,l))||1};let _=!0;function C(I){const A=I[0].intersectionRatio;if(A!==l){if(!_)return s();A?s(!1,A):n=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!ka(c,e.getBoundingClientRect())&&s(),_=!1}try{r=new IntersectionObserver(C,{...k,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,k)}r.observe(e)}return s(!0),i}function vp(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ro(e),d=o||i?[...c?Cr(c):[],...Cr(t)]:[];d.forEach(g=>{o&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const u=c&&a?bp(c,r):null;let m=-1,f=null;s&&(f=new ResizeObserver(g=>{let[x]=g;x&&x.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(t)})),r()}),c&&!l&&f.observe(c),f.observe(t));let v,h=l?jt(e):null;l&&b();function b(){const g=jt(e);h&&!ka(h,g)&&r(),h=g,v=requestAnimationFrame(b)}return r(),()=>{var g;d.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),u==null||u(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(v)}}const wp=$h,xp=Hh,yp=Bh,kp=Yh,_p=Uh,_a=Fh,Sp=Vh,Cp=(e,t,r)=>{const n=new Map,o={platform:gp,...r},i={...o.platform,_c:n};return Mh(e,t,{...o,platform:i})};var Ep=typeof document<"u",Np=function(){},wn=Ep?j.useLayoutEffect:Np;function xn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!xn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!xn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Sa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ca(e,t){const r=Sa(e);return Math.round(t*r)/r}function Mo(e){const t=E.useRef(e);return wn(()=>{t.current=e}),t}function Ap(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,u]=E.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=E.useState(n);xn(m,n)||f(n);const[v,h]=E.useState(null),[b,g]=E.useState(null),x=E.useCallback($=>{$!==I.current&&(I.current=$,h($))},[]),k=E.useCallback($=>{$!==A.current&&(A.current=$,g($))},[]),_=i||v,C=s||b,I=E.useRef(null),A=E.useRef(null),D=E.useRef(d),R=l!=null,F=Mo(l),Y=Mo(o),N=Mo(c),M=E.useCallback(()=>{if(!I.current||!A.current)return;const $={placement:t,strategy:r,middleware:m};Y.current&&($.platform=Y.current),Cp(I.current,A.current,$).then(Z=>{const ne={...Z,isPositioned:N.current!==!1};y.current&&!xn(D.current,ne)&&(D.current=ne,Rr.flushSync(()=>{u(ne)}))})},[m,t,r,Y,N]);wn(()=>{c===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u($=>({...$,isPositioned:!1})))},[c]);const y=E.useRef(!1);wn(()=>(y.current=!0,()=>{y.current=!1}),[]),wn(()=>{if(_&&(I.current=_),C&&(A.current=C),_&&C){if(F.current)return F.current(_,C,M);M()}},[_,C,M,F,R]);const B=E.useMemo(()=>({reference:I,floating:A,setReference:x,setFloating:k}),[x,k]),te=E.useMemo(()=>({reference:_,floating:C}),[_,C]),U=E.useMemo(()=>{const $={position:r,left:0,top:0};if(!te.floating)return $;const Z=Ca(te.floating,d.x),ne=Ca(te.floating,d.y);return a?{...$,transform:"translate("+Z+"px, "+ne+"px)",...Sa(te.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:ne}},[r,a,te.floating,d.x,d.y]);return E.useMemo(()=>({...d,update:M,refs:B,elements:te,floatingStyles:U}),[d,M,B,te,U])}const zp=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?_a({element:n.current,padding:o}).fn(r):{}:n?_a({element:n,padding:o}).fn(r):{}}}},jp=(e,t)=>({...wp(e),options:[e,t]}),Tp=(e,t)=>({...xp(e),options:[e,t]}),Op=(e,t)=>({...Sp(e),options:[e,t]}),Pp=(e,t)=>({...yp(e),options:[e,t]}),Ip=(e,t)=>({...kp(e),options:[e,t]}),Dp=(e,t)=>({..._p(e),options:[e,t]}),Rp=(e,t)=>({...zp(e),options:[e,t]});var Lp="Arrow",Ea=E.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return p.jsx(ke.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ea.displayName=Lp;var Mp=Ea;function Fp(e){const[t,r]=E.useState(void 0);return De(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;r({width:s,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Fo="Popper",[Na,Gt]=Wt(Fo),[Bp,Aa]=Na(Fo),za=e=>{const{__scopePopper:t,children:r}=e,[n,o]=E.useState(null);return p.jsx(Bp,{scope:t,anchor:n,onAnchorChange:o,children:r})};za.displayName=Fo;var ja="PopperAnchor",Ta=E.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Aa(ja,r),s=E.useRef(null),a=_e(t,s),l=E.useRef(null);return E.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||s.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:p.jsx(ke.div,{...o,ref:a})});Ta.displayName=ja;var Bo="PopperContent",[Up,Wp]=Na(Bo),Oa=E.forwardRef((e,t)=>{var re,ie,ae,oe,le,fe;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:f="optimized",onPlaced:v,...h}=e,b=Aa(Bo,r),[g,x]=E.useState(null),k=_e(t,ve=>x(ve)),[_,C]=E.useState(null),I=Fp(_),A=(I==null?void 0:I.width)??0,D=(I==null?void 0:I.height)??0,R=n+(i!=="center"?"-"+i:""),F=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Y=Array.isArray(c)?c:[c],N=Y.length>0,M={padding:F,boundary:Y.filter(Hp),altBoundary:N},{refs:y,floatingStyles:B,placement:te,isPositioned:U,middlewareData:$}=Ap({strategy:"fixed",placement:R,whileElementsMounted:(...ve)=>vp(...ve,{animationFrame:f==="always"}),elements:{reference:b.anchor},middleware:[jp({mainAxis:o+D,alignmentAxis:s}),l&&Tp({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Op():void 0,...M}),l&&Pp({...M}),Ip({...M,apply:({elements:ve,rects:w,availableWidth:X,availableHeight:H})=>{const{width:T,height:S}=w.reference,P=ve.floating.style;P.setProperty("--radix-popper-available-width",`${X}px`),P.setProperty("--radix-popper-available-height",`${H}px`),P.setProperty("--radix-popper-anchor-width",`${T}px`),P.setProperty("--radix-popper-anchor-height",`${S}px`)}}),_&&Rp({element:_,padding:a}),Vp({arrowWidth:A,arrowHeight:D}),m&&Dp({strategy:"referenceHidden",...M})]}),[Z,ne]=Da(te),z=Me(v);De(()=>{U&&(z==null||z())},[U,z]);const L=(re=$.arrow)==null?void 0:re.x,K=(ie=$.arrow)==null?void 0:ie.y,q=((ae=$.arrow)==null?void 0:ae.centerOffset)!==0,[ee,ue]=E.useState();return De(()=>{g&&ue(window.getComputedStyle(g).zIndex)},[g]),p.jsx("div",{ref:y.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:U?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(oe=$.transformOrigin)==null?void 0:oe.x,(le=$.transformOrigin)==null?void 0:le.y].join(" "),...((fe=$.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Up,{scope:r,placedSide:Z,onArrowChange:C,arrowX:L,arrowY:K,shouldHideArrow:q,children:p.jsx(ke.div,{"data-side":Z,"data-align":ne,...h,ref:k,style:{...h.style,animation:U?void 0:"none"}})})})});Oa.displayName=Bo;var Pa="PopperArrow",$p={top:"bottom",right:"left",bottom:"top",left:"right"},Ia=E.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Wp(Pa,n),s=$p[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Mp,{...o,ref:r,style:{...o.style,display:"block"}})})});Ia.displayName=Pa;function Hp(e){return e!==null}var Vp=e=>({name:"transformOrigin",options:e,fn(t){var b,g,x;const{placement:r,rects:n,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=Da(r),u={start:"0%",center:"50%",end:"100%"}[d],m=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,f=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let v="",h="";return c==="bottom"?(v=s?u:`${m}px`,h=`${-l}px`):c==="top"?(v=s?u:`${m}px`,h=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,h=s?u:`${f}px`):c==="left"&&(v=`${n.floating.width+l}px`,h=s?u:`${f}px`),{data:{x:v,y:h}}}});function Da(e){const[t,r="center"]=e.split("-");return[t,r]}var Uo=za,yn=Ta,Wo=Oa,$o=Ia,Yp="Portal",kn=E.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,i]=E.useState(!1);De(()=>i(!0),[]);const s=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?ht.createPortal(p.jsx(ke.div,{...n,ref:t}),s):null});kn.displayName=Yp;var Zp=E[" useInsertionEffect ".trim().toString()]||De;function _n({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,s]=Gp({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:o;{const d=E.useRef(e!==void 0);E.useEffect(()=>{const u=d.current;u!==a&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,n])}const c=E.useCallback(d=>{var u;if(a){const m=Kp(d)?d(e):d;m!==e&&((u=s.current)==null||u.call(s,m))}else i(d)},[a,e,i,s]);return[l,c]}function Gp({defaultProp:e,onChange:t}){const[r,n]=E.useState(e),o=E.useRef(r),i=E.useRef(t);return Zp(()=>{i.current=t},[t]),E.useEffect(()=>{var s;o.current!==r&&((s=i.current)==null||s.call(i,r),o.current=r)},[r,o]),[r,n,i]}function Kp(e){return typeof e=="function"}function Xp(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ra=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qp="VisuallyHidden",La=E.forwardRef((e,t)=>p.jsx(ke.span,{...e,ref:t,style:{...Ra,...e.style}}));La.displayName=qp;var Jp=La,Qp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kt=new WeakMap,Sn=new WeakMap,Cn={},Ho=0,Ma=function(e){return e&&(e.host||Ma(e.parentNode))},em=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ma(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},tm=function(e,t,r,n){var o=em(t,Array.isArray(e)?e:[e]);Cn[r]||(Cn[r]=new WeakMap);var i=Cn[r],s=[],a=new Set,l=new Set(o),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};o.forEach(c);var d=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(m){if(a.has(m))d(m);else try{var f=m.getAttribute(n),v=f!==null&&f!=="false",h=(Kt.get(m)||0)+1,b=(i.get(m)||0)+1;Kt.set(m,h),i.set(m,b),s.push(m),h===1&&v&&Sn.set(m,!0),b===1&&m.setAttribute(r,"true"),v||m.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return d(t),a.clear(),Ho++,function(){s.forEach(function(u){var m=Kt.get(u)-1,f=i.get(u)-1;Kt.set(u,m),i.set(u,f),m||(Sn.has(u)||u.removeAttribute(n),Sn.delete(u)),f||u.removeAttribute(r)}),Ho--,Ho||(Kt=new WeakMap,Kt=new WeakMap,Sn=new WeakMap,Cn={})}},Fa=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Qp(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),tm(n,o,r,"aria-hidden")):function(){return null}},ot=function(){return ot=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ot.apply(this,arguments)};function Ba(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function rm(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var En="right-scroll-bar-position",Nn="width-before-scroll-bar",nm="with-scroll-bars-hidden",om="--removed-body-scroll-bar-size";function Vo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function im(e,t){var r=j.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var sm=typeof window<"u"?E.useLayoutEffect:E.useEffect,Ua=new WeakMap;function am(e,t){var r=im(null,function(n){return e.forEach(function(o){return Vo(o,n)})});return sm(function(){var n=Ua.get(r);if(n){var o=new Set(n),i=new Set(e),s=r.current;o.forEach(function(a){i.has(a)||Vo(a,null)}),i.forEach(function(a){o.has(a)||Vo(a,s)})}Ua.set(r,e)},[e]),r}function lm(e){return e}function cm(e,t){t===void 0&&(t=lm);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(i),s=r}var l=function(){var d=s;s=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){s.push(d),c()},filter:function(d){return s=s.filter(d),r}}}};return o}function dm(e){e===void 0&&(e={});var t=cm(null);return t.options=ot({async:!0,ssr:!1},e),t}var Wa=function(e){var t=e.sideCar,r=Ba(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return E.createElement(n,ot({},r))};Wa.isSideCarExport=!0;function um(e,t){return e.useMedium(t),Wa}var $a=dm(),Yo=function(){},An=E.forwardRef(function(e,t){var r=E.useRef(null),n=E.useState({onScrollCapture:Yo,onWheelCapture:Yo,onTouchMoveCapture:Yo}),o=n[0],i=n[1],s=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,m=e.sideCar,f=e.noRelative,v=e.noIsolation,h=e.inert,b=e.allowPinchZoom,g=e.as,x=g===void 0?"div":g,k=e.gapMode,_=Ba(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,I=am([r,t]),A=ot(ot({},_),o);return E.createElement(E.Fragment,null,d&&E.createElement(C,{sideCar:$a,removeScrollBar:c,shards:u,noRelative:f,noIsolation:v,inert:h,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:k}),s?E.cloneElement(E.Children.only(a),ot(ot({},A),{ref:I})):E.createElement(x,ot({},A,{className:l,ref:I}),a))});An.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},An.classNames={fullWidth:Nn,zeroRight:En};var fm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fm();return t&&e.setAttribute("nonce",t),e}function pm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gm=function(){var e=0,t=null;return{add:function(r){e==0&&(t=hm())&&(pm(t,r),mm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bm=function(){var e=gm();return function(t,r){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Ha=function(){var e=bm(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},vm={left:0,top:0,right:0,gap:0},Zo=function(e){return parseInt(e||"",10)||0},wm=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Zo(r),Zo(n),Zo(o)]},xm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vm;var t=wm(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ym=Ha(),Xt="data-scroll-locked",km=function(e,t,r,n){var o=e.left,i=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
213
|
+
.`.concat(nm,` {
|
|
214
214
|
overflow: hidden `).concat(n,`;
|
|
215
215
|
padding-right: `).concat(a,"px ").concat(n,`;
|
|
216
216
|
}
|
|
@@ -231,7 +231,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
231
231
|
right: `).concat(a,"px ").concat(n,`;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.`).concat(
|
|
234
|
+
.`).concat(Nn,` {
|
|
235
235
|
margin-right: `).concat(a,"px ").concat(n,`;
|
|
236
236
|
}
|
|
237
237
|
|
|
@@ -239,14 +239,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
239
239
|
right: 0 `).concat(n,`;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
.`).concat(
|
|
242
|
+
.`).concat(Nn," .").concat(Nn,` {
|
|
243
243
|
margin-right: 0 `).concat(n,`;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
body[`).concat(Xt,`] {
|
|
247
|
-
`).concat(
|
|
247
|
+
`).concat(om,": ").concat(a,`px;
|
|
248
248
|
}
|
|
249
|
-
`)},
|
|
249
|
+
`)},Va=function(){var e=parseInt(document.body.getAttribute(Xt)||"0",10);return isFinite(e)?e:0},_m=function(){E.useEffect(function(){return document.body.setAttribute(Xt,(Va()+1).toString()),function(){var e=Va()-1;e<=0?document.body.removeAttribute(Xt):document.body.setAttribute(Xt,e.toString())}},[])},Sm=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;_m();var i=E.useMemo(function(){return xm(o)},[o]);return E.createElement(ym,{styles:km(i,!t,o,r?"":"!important")})},Go=!1;if(typeof window<"u")try{var zn=Object.defineProperty({},"passive",{get:function(){return Go=!0,!0}});window.addEventListener("test",zn,zn),window.removeEventListener("test",zn,zn)}catch{Go=!1}var qt=Go?{passive:!1}:!1,Cm=function(e){return e.tagName==="TEXTAREA"},Ya=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Cm(e)&&r[t]==="visible")},Em=function(e){return Ya(e,"overflowY")},Nm=function(e){return Ya(e,"overflowX")},Za=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Ga(e,n);if(o){var i=Ka(e,n),s=i[1],a=i[2];if(s>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Am=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},zm=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Ga=function(e,t){return e==="v"?Em(t):Nm(t)},Ka=function(e,t){return e==="v"?Am(t):zm(t)},jm=function(e,t){return e==="h"&&t==="rtl"?-1:1},Tm=function(e,t,r,n,o){var i=jm(e,window.getComputedStyle(t).direction),s=i*n,a=r.target,l=t.contains(a),c=!1,d=s>0,u=0,m=0;do{if(!a)break;var f=Ka(e,a),v=f[0],h=f[1],b=f[2],g=h-b-i*v;(v||g)&&Ga(e,a)&&(u+=g,m+=v);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(u)<1||!d&&Math.abs(m)<1)&&(c=!0),c},jn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xa=function(e){return[e.deltaX,e.deltaY]},qa=function(e){return e&&"current"in e?e.current:e},Om=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pm=function(e){return`
|
|
250
250
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
251
251
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
252
|
-
`)},Am=0,Jt=[];function Nm(e){var t=_.useRef([]),r=_.useRef([0,0]),n=_.useRef(),o=_.useState(Am++)[0],i=_.useState(Ua)[0],s=_.useRef(e);_.useEffect(function(){s.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Zp([e.lockRef.current],(e.shards||[]).map(Ga),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=_.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!s.current.allowPinchZoom;var v=jn(h),x=r.current,k="deltaX"in h?h.deltaX:x[0]-v[0],S="deltaY"in h?h.deltaY:x[1]-v[1],C,O=h.target,N=Math.abs(k)>Math.abs(S)?"h":"v";if("touches"in h&&N==="h"&&O.type==="range")return!1;var P=window.getSelection(),D=P&&P.anchorNode,W=D?D===O||D.contains(O):!1;if(W)return!1;var G=Ha(N,O);if(!G)return!0;if(G?C=N:(C=N==="v"?"h":"v",G=Ha(N,O)),!G)return!1;if(!n.current&&"changedTouches"in h&&(k||S)&&(n.current=C),!C)return!0;var z=n.current||C;return _m(z,b,h,z==="h"?k:S)},[]),l=_.useCallback(function(h){var b=h;if(!(!Jt.length||Jt[Jt.length-1]!==i)){var v="deltaY"in b?Ka(b):jn(b),x=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&Cm(C.delta,v)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var k=(s.current.shards||[]).map(Ga).filter(Boolean).filter(function(C){return C.contains(b.target)}),S=k.length>0?a(b,k[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),c=_.useCallback(function(h,b,v,x){var k={name:h,delta:b,target:v,should:x,shadowParent:zm(v)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(S){return S!==k})},1)},[]),d=_.useCallback(function(h){r.current=jn(h),n.current=void 0},[]),f=_.useCallback(function(h){c(h.type,Ka(h),h.target,a(h,e.lockRef.current))},[]),m=_.useCallback(function(h){c(h.type,jn(h),h.target,a(h,e.lockRef.current))},[]);_.useEffect(function(){return Jt.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,qt),document.addEventListener("touchmove",l,qt),document.addEventListener("touchstart",d,qt),function(){Jt=Jt.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,qt),document.removeEventListener("touchmove",l,qt),document.removeEventListener("touchstart",d,qt)}},[]);var u=e.removeScrollBar,w=e.inert;return _.createElement(_.Fragment,null,w?_.createElement(i,{styles:Em(o)}):null,u?_.createElement(bm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jm=om(Ba,Nm);var Go=_.forwardRef(function(e,t){return _.createElement(Nn,nt({},e,{ref:t,sideCar:jm}))});Go.classNames=Nn.classNames;var Tm=[" ","Enter","ArrowUp","ArrowDown"],Om=[" ","Enter"],Tt="Select",[Tn,On,Pm]=Jf(Tt),[Qt]=Wt(Tt,[Pm,Gt]),Pn=Gt(),[Im,yt]=Qt(Tt),[Dm,Rm]=Qt(Tt),Za=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:m,required:u,form:w}=e,h=Pn(t),[b,v]=_.useState(null),[x,k]=_.useState(null),[S,C]=_.useState(!1),O=$s(c),[N,P]=Sn({prop:n,defaultProp:o??!1,onChange:i,caller:Tt}),[D,W]=Sn({prop:s,defaultProp:a,onChange:l,caller:Tt}),G=_.useRef(null),z=b?w||!!b.closest("form"):!0,[L,y]=_.useState(new Set),$=Array.from(L).map(X=>X.props.value).join(";");return p.jsx(Bo,{...h,children:p.jsxs(Im,{required:u,scope:t,trigger:b,onTriggerChange:v,valueNode:x,onValueNodeChange:k,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:kr(),value:D,onValueChange:W,open:N,onOpenChange:P,dir:O,triggerPointerDownPosRef:G,disabled:m,children:[p.jsx(Tn.Provider,{scope:t,children:p.jsx(Dm,{scope:e.__scopeSelect,onNativeOptionAdd:_.useCallback(X=>{y(H=>new Set(H).add(X))},[]),onNativeOptionRemove:_.useCallback(X=>{y(H=>{const V=new Set(H);return V.delete(X),V})},[]),children:r})}),z?p.jsxs(ml,{"aria-hidden":!0,required:u,tabIndex:-1,name:d,autoComplete:f,value:D,onChange:X=>W(X.target.value),disabled:m,form:w,children:[D===void 0?p.jsx("option",{value:""}):null,Array.from(L)]},$):null]})})};Za.displayName=Tt;var Xa="SelectTrigger",qa=_.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Pn(r),s=yt(Xa,r),a=s.disabled||n,l=_e(t,s.onTriggerChange),c=On(r),d=_.useRef("touch"),[f,m,u]=bl(h=>{const b=c().filter(k=>!k.disabled),v=b.find(k=>k.value===s.value),x=vl(b,h,v);x!==void 0&&s.onValueChange(x.value)}),w=h=>{a||(s.onOpenChange(!0),u()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return p.jsx(yn,{asChild:!0,...i,children:p.jsx(Se.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":gl(s.value)?"":void 0,...o,ref:l,onClick:be(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&w(h)}),onPointerDown:be(o.onPointerDown,h=>{d.current=h.pointerType;const b=h.target;b.hasPointerCapture(h.pointerId)&&b.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(w(h),h.preventDefault())}),onKeyDown:be(o.onKeyDown,h=>{const b=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(b&&h.key===" ")&&Tm.includes(h.key)&&(w(),h.preventDefault())})})})});qa.displayName=Xa;var Ja="SelectValue",Qa=_.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:s="",...a}=e,l=yt(Ja,r),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,f=_e(t,l.onValueNodeChange);return Pe(()=>{c(d)},[c,d]),p.jsx(Se.span,{...a,ref:f,style:{pointerEvents:"none"},children:gl(l.value)?p.jsx(p.Fragment,{children:s}):i})});Qa.displayName=Ja;var Mm="SelectIcon",el=_.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return p.jsx(Se.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});el.displayName=Mm;var Lm="SelectPortal",tl=e=>p.jsx(kn,{asChild:!0,...e});tl.displayName=Lm;var Ot="SelectContent",rl=_.forwardRef((e,t)=>{const r=yt(Ot,e.__scopeSelect),[n,o]=_.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?Rr.createPortal(p.jsx(nl,{scope:e.__scopeSelect,children:p.jsx(Tn.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),i):null}return p.jsx(ol,{...e,ref:t})});rl.displayName=Ot;var Je=10,[nl,kt]=Qt(Ot),Fm="SelectContentImpl",Bm=$t("SelectContent.RemoveScroll"),ol=_.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:u,sticky:w,hideWhenDetached:h,avoidCollisions:b,...v}=e,x=yt(Ot,r),[k,S]=_.useState(null),[C,O]=_.useState(null),N=_e(t,ee=>S(ee)),[P,D]=_.useState(null),[W,G]=_.useState(null),z=On(r),[L,y]=_.useState(!1),$=_.useRef(!1);_.useEffect(()=>{if(k)return Ra(k)},[k]),Gs();const X=_.useCallback(ee=>{const[ie,...se]=z().map(fe=>fe.ref.current),[oe]=se.slice(-1),le=document.activeElement;for(const fe of ee)if(fe===le||(fe==null||fe.scrollIntoView({block:"nearest"}),fe===ie&&C&&(C.scrollTop=0),fe===oe&&C&&(C.scrollTop=C.scrollHeight),fe==null||fe.focus(),document.activeElement!==le))return},[z,C]),H=_.useCallback(()=>X([P,k]),[X,P,k]);_.useEffect(()=>{L&&H()},[L,H]);const{onOpenChange:V,triggerPointerDownPosRef:Y}=x;_.useEffect(()=>{if(k){let ee={x:0,y:0};const ie=oe=>{var le,fe;ee={x:Math.abs(Math.round(oe.pageX)-(((le=Y.current)==null?void 0:le.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((fe=Y.current)==null?void 0:fe.y)??0))}},se=oe=>{ee.x<=10&&ee.y<=10?oe.preventDefault():k.contains(oe.target)||V(!1),document.removeEventListener("pointermove",ie),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",se,{capture:!0})}}},[k,V,Y]),_.useEffect(()=>{const ee=()=>V(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[V]);const[Q,j]=bl(ee=>{const ie=z().filter(le=>!le.disabled),se=ie.find(le=>le.ref.current===document.activeElement),oe=vl(ie,ee,se);oe&&setTimeout(()=>oe.ref.current.focus())}),I=_.useCallback((ee,ie,se)=>{const oe=!$.current&&!se;(x.value!==void 0&&x.value===ie||oe)&&(D(ee),oe&&($.current=!0))},[x.value]),K=_.useCallback(()=>k==null?void 0:k.focus(),[k]),Z=_.useCallback((ee,ie,se)=>{const oe=!$.current&&!se;(x.value!==void 0&&x.value===ie||oe)&&G(ee)},[x.value]),te=n==="popper"?Zo:il,ue=te===Zo?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:u,sticky:w,hideWhenDetached:h,avoidCollisions:b}:{};return p.jsx(nl,{scope:r,content:k,viewport:C,onViewportChange:O,itemRefCallback:I,selectedItem:P,onItemLeave:K,itemTextRefCallback:Z,focusSelectedItem:H,selectedItemText:W,position:n,isPositioned:L,searchRef:Q,children:p.jsx(Go,{as:Bm,allowPinchZoom:!0,children:p.jsx(Eo,{asChild:!0,trapped:x.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:be(o,ee=>{var ie;(ie=x.trigger)==null||ie.focus({preventScroll:!0}),ee.preventDefault()}),children:p.jsx(dn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:p.jsx(te,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ee=>ee.preventDefault(),...v,...ue,onPlaced:()=>y(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:be(v.onKeyDown,ee=>{const ie=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ie&&ee.key.length===1&&j(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let oe=z().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const le=ee.target,fe=oe.indexOf(le);oe=oe.slice(fe+1)}setTimeout(()=>X(oe)),ee.preventDefault()}})})})})})})});ol.displayName=Fm;var Um="SelectItemAlignedPosition",il=_.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=yt(Ot,r),s=kt(Ot,r),[a,l]=_.useState(null),[c,d]=_.useState(null),f=_e(t,N=>d(N)),m=On(r),u=_.useRef(!1),w=_.useRef(!0),{viewport:h,selectedItem:b,selectedItemText:v,focusSelectedItem:x}=s,k=_.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&h&&b&&v){const N=i.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),W=v.getBoundingClientRect();if(i.dir!=="rtl"){const le=W.left-P.left,fe=D.left-le,we=N.left-fe,g=N.width+we,F=Math.max(g,P.width),U=window.innerWidth-Je,E=yo(fe,[Je,Math.max(Je,U-F)]);a.style.minWidth=g+"px",a.style.left=E+"px"}else{const le=P.right-W.right,fe=window.innerWidth-D.right-le,we=window.innerWidth-N.right-fe,g=N.width+we,F=Math.max(g,P.width),U=window.innerWidth-Je,E=yo(fe,[Je,Math.max(Je,U-F)]);a.style.minWidth=g+"px",a.style.right=E+"px"}const G=m(),z=window.innerHeight-Je*2,L=h.scrollHeight,y=window.getComputedStyle(c),$=parseInt(y.borderTopWidth,10),X=parseInt(y.paddingTop,10),H=parseInt(y.borderBottomWidth,10),V=parseInt(y.paddingBottom,10),Y=$+X+L+V+H,Q=Math.min(b.offsetHeight*5,Y),j=window.getComputedStyle(h),I=parseInt(j.paddingTop,10),K=parseInt(j.paddingBottom,10),Z=N.top+N.height/2-Je,te=z-Z,ue=b.offsetHeight/2,ee=b.offsetTop+ue,ie=$+X+ee,se=Y-ie;if(ie<=Z){const le=G.length>0&&b===G[G.length-1].ref.current;a.style.bottom="0px";const fe=c.clientHeight-h.offsetTop-h.offsetHeight,we=Math.max(te,ue+(le?K:0)+fe+H),g=ie+we;a.style.height=g+"px"}else{const le=G.length>0&&b===G[0].ref.current;a.style.top="0px";const we=Math.max(Z,$+h.offsetTop+(le?I:0)+ue)+se;a.style.height=we+"px",h.scrollTop=ie-Z+h.offsetTop}a.style.margin=`${Je}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=z+"px",n==null||n(),requestAnimationFrame(()=>u.current=!0)}},[m,i.trigger,i.valueNode,a,c,h,b,v,i.dir,n]);Pe(()=>k(),[k]);const[S,C]=_.useState();Pe(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const O=_.useCallback(N=>{N&&w.current===!0&&(k(),x==null||x(),w.current=!1)},[k,x]);return p.jsx($m,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:u,onScrollButtonChange:O,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(Se.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});il.displayName=Um;var Wm="SelectPopperPosition",Zo=_.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Je,...i}=e,s=Pn(r);return p.jsx(Uo,{...s,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Zo.displayName=Wm;var[$m,Xo]=Qt(Ot,{}),qo="SelectViewport",sl=_.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=kt(qo,r),s=Xo(qo,r),a=_e(t,i.onViewportChange),l=_.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),p.jsx(Tn.Slot,{scope:r,children:p.jsx(Se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:be(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=s;if(m!=null&&m.current&&f){const u=Math.abs(l.current-d.scrollTop);if(u>0){const w=window.innerHeight-Je*2,h=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),v=Math.max(h,b);if(v<w){const x=v+u,k=Math.min(w,x),S=x-k;f.style.height=k+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});sl.displayName=qo;var al="SelectGroup",[Hm,Vm]=Qt(al),Ym=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=kr();return p.jsx(Hm,{scope:r,id:o,children:p.jsx(Se.div,{role:"group","aria-labelledby":o,...n,ref:t})})});Ym.displayName=al;var ll="SelectLabel",Km=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Vm(ll,r);return p.jsx(Se.div,{id:o.id,...n,ref:t})});Km.displayName=ll;var In="SelectItem",[Gm,cl]=Qt(In),dl=_.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...s}=e,a=yt(In,r),l=kt(In,r),c=a.value===n,[d,f]=_.useState(i??""),[m,u]=_.useState(!1),w=_e(t,x=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,x,n,o)}),h=kr(),b=_.useRef("touch"),v=()=>{o||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Gm,{scope:r,value:n,disabled:o,textId:h,isSelected:c,onItemTextChange:_.useCallback(x=>{f(k=>k||((x==null?void 0:x.textContent)??"").trim())},[]),children:p.jsx(Tn.ItemSlot,{scope:r,value:n,disabled:o,textValue:d,children:p.jsx(Se.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:w,onFocus:be(s.onFocus,()=>u(!0)),onBlur:be(s.onBlur,()=>u(!1)),onClick:be(s.onClick,()=>{b.current!=="mouse"&&v()}),onPointerUp:be(s.onPointerUp,()=>{b.current==="mouse"&&v()}),onPointerDown:be(s.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:be(s.onPointerMove,x=>{var k;b.current=x.pointerType,o?(k=l.onItemLeave)==null||k.call(l):b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(s.onPointerLeave,x=>{var k;x.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:be(s.onKeyDown,x=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(Om.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})});dl.displayName=In;var Cr="SelectItemText",ul=_.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,s=yt(Cr,r),a=kt(Cr,r),l=cl(Cr,r),c=Rm(Cr,r),[d,f]=_.useState(null),m=_e(t,v=>f(v),l.onItemTextChange,v=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,v,l.value,l.disabled)}),u=d==null?void 0:d.textContent,w=_.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:u},l.value),[l.disabled,l.value,u]),{onNativeOptionAdd:h,onNativeOptionRemove:b}=c;return Pe(()=>(h(w),()=>b(w)),[h,b,w]),p.jsxs(p.Fragment,{children:[p.jsx(Se.span,{id:l.textId,...i,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Rr.createPortal(i.children,s.valueNode):null]})});ul.displayName=Cr;var fl="SelectItemIndicator",hl=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return cl(fl,r).isSelected?p.jsx(Se.span,{"aria-hidden":!0,...n,ref:t}):null});hl.displayName=fl;var Jo="SelectScrollUpButton",Zm=_.forwardRef((e,t)=>{const r=kt(Jo,e.__scopeSelect),n=Xo(Jo,e.__scopeSelect),[o,i]=_.useState(!1),s=_e(t,n.onScrollButtonChange);return Pe(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?p.jsx(pl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Zm.displayName=Jo;var Qo="SelectScrollDownButton",Xm=_.forwardRef((e,t)=>{const r=kt(Qo,e.__scopeSelect),n=Xo(Qo,e.__scopeSelect),[o,i]=_.useState(!1),s=_e(t,n.onScrollButtonChange);return Pe(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;i(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?p.jsx(pl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Xm.displayName=Qo;var pl=_.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=kt("SelectScrollButton",r),s=_.useRef(null),a=On(r),l=_.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return _.useEffect(()=>()=>l(),[l]),Pe(()=>{var d;const c=a().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),p.jsx(Se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:be(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:be(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:be(o.onPointerLeave,()=>{l()})})}),qm="SelectSeparator",Jm=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return p.jsx(Se.div,{"aria-hidden":!0,...n,ref:t})});Jm.displayName=qm;var ei="SelectArrow",Qm=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Pn(r),i=yt(ei,r),s=kt(ei,r);return i.open&&s.position==="popper"?p.jsx(Wo,{...o,...n,ref:t}):null});Qm.displayName=ei;var eg="SelectBubbleInput",ml=_.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=_.useRef(null),i=_e(n,o),s=$p(t);return _.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&d){const f=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[s,t]),p.jsx(Se.select,{...r,style:{...Pa,...r.style},ref:i,defaultValue:t})});ml.displayName=eg;function gl(e){return e===""||e===void 0}function bl(e){const t=Me(e),r=_.useRef(""),n=_.useRef(0),o=_.useCallback(s=>{const a=r.current+s;t(a),(function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(a)},[t]),i=_.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function vl(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let s=tg(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==r));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function tg(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var rg=Za,wl=qa,ng=Qa,og=el,ig=tl,xl=rl,sg=sl,yl=dl,ag=ul,lg=hl;const cg=rg,dg=ng,kl=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(wl,{ref:n,className:pe("flex h-8 w-full items-center justify-between gap-2 rounded-md border border-zinc-800 bg-black px-3 py-1.5 text-left text-xs font-medium text-white outline-none","hover:bg-zinc-900 focus-visible:ring-2 focus-visible:ring-blue-500/80 focus-visible:ring-inset focus-visible:border-zinc-600","disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:flex [&>span]:items-center [&>span]:gap-2",e),style:{boxShadow:"none",WebkitBoxShadow:"none",MozBoxShadow:"none"},...r,children:[t,p.jsx(og,{asChild:!0,children:p.jsx(Hr,{className:"h-3 w-3 shrink-0 text-zinc-400",strokeWidth:2})})]}));kl.displayName=wl.displayName;const Sl=_.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>p.jsx(ig,{children:p.jsx(xl,{ref:o,className:pe("relative z-[9999] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-zinc-800 bg-zinc-950 text-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:p.jsx(sg,{className:pe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Sl.displayName=xl.displayName;const _l=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(yl,{ref:n,className:pe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-xs outline-none","focus:bg-zinc-800 focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(lg,{children:p.jsx(Qn,{className:"h-3 w-3",strokeWidth:2})})}),p.jsx(ag,{children:t})]}));_l.displayName=yl.displayName;const Cl=_.createContext(null);function El(){const e=_.useContext(Cl);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function Al({open:e,onOpenChange:t,children:r}){const[n,o]=_.useState(!1),i=e!==void 0,s=i?e:n,a=_.useCallback(c=>{i||o(c),t==null||t(c)},[i,t]),l=_.useMemo(()=>({open:s,onOpenChange:a}),[s,a]);return p.jsx(Cl.Provider,{value:l,children:r})}function ug({asChild:e,children:t}){const{onOpenChange:r}=El(),n=_.Children.only(t);return e&&_.isValidElement(n)?_.cloneElement(n,{onClick:o=>{var i,s;(s=(i=n.props).onClick)==null||s.call(i,o),r(!0)}}):p.jsx("button",{type:"button",onClick:()=>r(!0),children:t})}function Nl({className:e,children:t,preventCloseOnBackdropClick:r,...n}){const{open:o,onOpenChange:i}=El();if(_.useEffect(()=>{const a=l=>{l.key==="Escape"&&i(!1)};return o&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[o,i]),!o)return null;const s=a=>{a.preventDefault(),a.stopPropagation()};return ht.createPortal(p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:s,onDrop:s}),p.jsx("div",{role:"dialog","aria-modal":!0,className:pe("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:a=>a.stopPropagation(),...n,children:t})]}),document.body)}function zl({className:e,...t}){return p.jsx("div",{className:pe("flex flex-col gap-1.5 pb-4",e),...t})}function fg({className:e,...t}){return p.jsx("div",{className:pe("flex justify-end gap-2 pt-4",e),...t})}function jl({className:e,...t}){return p.jsx("h2",{className:pe("text-sm font-semibold text-white",e),...t})}function Tl({className:e,...t}){return p.jsx("p",{className:pe("text-xs text-zinc-400",e),...t})}const Be=_.forwardRef(({className:e,variant:t="default",size:r="default",asChild:n=!1,...o},i)=>{const s="inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0 cursor-pointer",a={default:"bg-primary text-primary-foreground shadow-lg shadow-primary/20 hover:bg-primary/90",outline:"border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",ghost:"text-zinc-500 hover:text-zinc-200 hover:bg-zinc-800",destructive:"bg-destructive/15 text-destructive hover:bg-destructive/25"},l={sm:"h-7 px-2.5 text-[11px]",default:"h-8 px-3 py-1.5 text-xs",lg:"h-9 px-5 text-sm",icon:"h-8 w-8","icon-sm":"h-7 w-7","icon-xs":"h-6 w-6"},c=n?Yf:"button";return p.jsx(c,{ref:i,type:"button",className:pe(s,a[t],l[r],e),...o})});Be.displayName="Button";const hg=["library","upload","url"];function pg({library:e,selectedId:t,onSelect:r}){const[n,o]=T.useState(""),[i,s]=T.useState("all"),a=["all",...new Set(e.flatMap(c=>c.tags??[]))],l=e.filter(c=>{const d=i==="all"||(c.tags??[]).includes(i),f=!n||(c.alt??"").toLowerCase().includes(n.toLowerCase());return d&&f});return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"relative",children:[p.jsx(Ld,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),p.jsx(xo,{value:n,onChange:c=>o(c.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(c=>p.jsx("button",{type:"button",onClick:()=>s(c),className:pe("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===c?"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:c==="all"?"Tutte":c},c))}),l.length>0?p.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(c=>{const d=t===c.id;return p.jsxs("button",{type:"button",onClick:()=>r(d?null:c.id),className:pe("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",d?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[p.jsx("img",{src:c.url,alt:c.alt,loading:"lazy",className:pe("w-full h-full object-cover transition-[filter] duration-150",d?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),p.jsx("div",{className:pe("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",d&&"opacity-100"),children:p.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:c.alt})}),d&&p.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:p.jsx(Qn,{size:14,className:"text-white"})})]},c.id)})}):p.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 mg({preview:e,onPreviewChange:t,onAssetUpload:r}){const[n,o]=T.useState(!1),i=T.useRef(null),s=T.useCallback(async d=>{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:d.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!d.type.startsWith("image/"))return;if(r){try{const m=await r(d);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:m==null?void 0:m.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),t({name:d.name,size:d.size,dataUrl:m})}catch{const m=new FileReader;m.onload=u=>{var w;t({name:d.name,size:d.size,dataUrl:(w=u.target)==null?void 0:w.result})},m.readAsDataURL(d)}return}const f=new FileReader;f.onload=m=>{var u;t({name:d.name,size:d.size,dataUrl:(u=m.target)==null?void 0:u.result})},f.readAsDataURL(d)},[t,r]),a=T.useCallback(d=>{var m,u;d.preventDefault(),d.stopPropagation(),o(!1);const f=(u=(m=d.dataTransfer)==null?void 0:m.files)==null?void 0:u[0];f&&s(f)},[s]),l=T.useCallback(d=>{d.preventDefault(),d.stopPropagation(),o(!0)},[]),c=T.useCallback(d=>{var m;const f=(m=d.target.files)==null?void 0:m[0];f&&s(f)},[s]);return p.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:d=>{d.preventDefault(),d.stopPropagation(),o(!1)},onDrop:a,onClick:()=>{var d;return!e&&((d=i.current)==null?void 0:d.click())},className:pe("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",n?"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?p.jsxs(p.Fragment,{children:[p.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),p.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:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),p.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),p.jsx(Be,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:d=>{d.stopPropagation(),t(null)},children:p.jsx(Yr,{size:14})})]})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:p.jsx(Xi,{size:22})}),p.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),p.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),p.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),p.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:c})]})}function gg({urlPreview:e,onUrlPreviewChange:t}){const[r,n]=T.useState(""),[o,i]=T.useState(!1),s=()=>{if(r.trim())try{new URL(r),t(r),i(!1)}catch{i(!0),t(null)}};return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx(zt,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(xo,{value:r,onChange:a=>{n(a.target.value),i(!1)},onKeyDown:a=>a.key==="Enter"&&s(),placeholder:"https://images.unsplash.com/photo-...",className:pe("h-8 text-xs bg-zinc-900/50 border-zinc-800",o&&"border-red-500/50")}),p.jsx(Be,{type:"button",variant:"outline",onClick:s,className:"shrink-0 h-8",children:"Anteprima"})]}),o&&p.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?p.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[p.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),t(null)}}),p.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[p.jsx(Qn,{size:14,className:"text-emerald-400"}),p.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):o?null:p.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[p.jsx(Zi,{size:32,className:"mb-3 opacity-40"}),p.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const bg=({open:e,onOpenChange:t,onSelect:r})=>{const{assets:n}=dr(),o=(n==null?void 0:n.assetsManifest)??[],[i,s]=T.useState("library"),[a,l]=T.useState(null),[c,d]=T.useState(null),[f,m]=T.useState(null);T.useEffect(()=>{e&&(s("library"),l(null),d(null),m(null))},[e]),T.useEffect(()=>{if(!e||i!=="upload")return;const v=()=>{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",v),()=>window.removeEventListener("beforeunload",v)},[e,i]),T.useEffect(()=>{if(!e||i!=="upload")return;const v=k=>{k.preventDefault()},x={capture:!0};return document.addEventListener("dragover",v,x),document.addEventListener("drop",v,x),window.addEventListener("dragover",v,x),window.addEventListener("drop",v,x),()=>{document.removeEventListener("dragover",v,x),document.removeEventListener("drop",v,x),window.removeEventListener("dragover",v,x),window.removeEventListener("drop",v,x)}},[e,i]);const u=i==="library"&&a!=null||i==="upload"&&c!=null||i==="url"&&f!=null,w=()=>{if(i==="library"&&a){const v=o.find(x=>x.id===a);v&&r({url:v.url,alt:v.alt})}else i==="upload"&&c?r({url:c.dataUrl,alt:c.name}):i==="url"&&f&&r({url:f,alt:""});setTimeout(()=>t(!1),0)},h=i==="library"&&a?"1 immagine selezionata":i==="upload"&&c?c.name:i==="url"&&f?"URL pronto":"Nessuna selezione",b=v=>{v.preventDefault(),v.stopPropagation()};return p.jsx(Al,{open:e,onOpenChange:t,children:p.jsxs(Nl,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[p.jsxs(zl,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:p.jsx(Vr,{size:18})}),p.jsxs("div",{children:[p.jsx(jl,{children:"Image Picker"}),p.jsx(Tl,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),p.jsx("button",{type:"button",onClick:()=>t(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:p.jsx(Mt,{size:18})})]}),p.jsx("div",{className:"flex border-b border-zinc-800",children:hg.map(v=>p.jsxs("button",{type:"button",onClick:()=>s(v),className:pe("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===v?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[v==="library"&&p.jsx(Vr,{size:14}),v==="upload"&&p.jsx(Xi,{size:14}),v==="url"&&p.jsx(Zi,{size:14}),v==="library"?"Libreria":v==="upload"?"Upload":"URL"]},v))}),p.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&p.jsx(pg,{library:o,selectedId:a,onSelect:l}),i==="upload"&&p.jsx(mg,{preview:c,onPreviewChange:d,onAssetUpload:n==null?void 0:n.onAssetUpload}),i==="url"&&p.jsx(gg,{urlPreview:f,onUrlPreviewChange:m})]}),p.jsxs(fg,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[p.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:h}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Be,{type:"button",variant:"outline",size:"sm",onClick:()=>t(!1),children:"Annulla"}),p.jsx(Be,{type:"button",size:"sm",disabled:!u,onClick:w,className:pe(!u&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},Ol=(e,t="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 n=e.replace(/^\//,"");return`/assets/${t}/${n}`},vg=({value:e,onChange:t,label:r="IMAGE",className:n})=>{const{tenantId:o="default"}=dr(),[i,s]=T.useState(!1),[a,l]=T.useState(!1),c=!!(e!=null&&e.url),d=e!=null&&e.url?Ol(e.url,o):"",f=u=>{t(u),s(!1)},m=u=>{u.stopPropagation(),t({url:"",alt:""})};return p.jsxs("div",{className:pe("space-y-1.5",n),children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),c?p.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s(!0),onKeyDown:u=>u.key==="Enter"&&s(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:pe("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",a&&"ring-blue-500/40"),children:[p.jsx("img",{src:d,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:u=>{u.target.style.display="none"}}),p.jsx("div",{className:pe("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",a?"bg-black/50":"bg-black/0"),children:a&&p.jsxs(p.Fragment,{children:[p.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:[p.jsx(Rd,{size:13}),p.jsx("span",{children:"Cambia"})]}),p.jsx(Be,{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:m,children:p.jsx(Yr,{size:13})})]})}),p.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)??""})]}):p.jsxs("button",{type:"button",onClick:()=>s(!0),className:pe("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:[p.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:p.jsx(Vr,{size:18})}),p.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),p.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),p.jsx(bg,{open:i,onOpenChange:s,onSelect:f})]})},Pl=[{name:"layers",Icon:to},{name:"github",Icon:Id},{name:"arrow-right",Icon:Ad},{name:"box",Icon:zd},{name:"terminal",Icon:Wd},{name:"chevron-right",Icon:jd},{name:"menu",Icon:Dd},{name:"x",Icon:Mt},{name:"sparkles",Icon:Bd},{name:"zap",Icon:Hd}],Er={"ui:text":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsx(xo,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:textarea":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsx($f,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:select":({label:e,value:t,onChange:r,options:n=[]})=>p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsxs(cg,{value:t||"",onValueChange:r,children:[p.jsx(kl,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:p.jsx(dg,{placeholder:"Select..."})}),p.jsx(Sl,{className:"dark",children:n.map(o=>p.jsx(_l,{value:o,className:"text-[11px]",children:o},o))})]})]}),"ui:checkbox":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[p.jsx(Hf,{id:e,checked:!!t,onCheckedChange:n=>r(n===!0)}),p.jsx(zt,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:t,onChange:r})=>{const n=t!=null&&typeof t=="object"&&"url"in t?{url:String(t.url??""),alt:String(t.alt??"")}:{url:typeof t=="string"?t:"",alt:""},o=i=>{r(i)};return p.jsx("div",{className:"mb-4",children:p.jsx(vg,{label:e,value:n,onChange:o})})},"ui:icon-picker":({label:e,value:t,onChange:r})=>{const[n,o]=T.useState(!1),i=Pl.find(s=>s.name===(t||""));return p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsxs(Al,{open:n,onOpenChange:o,children:[p.jsx(ug,{asChild:!0,children:p.jsx(Be,{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?p.jsxs(p.Fragment,{children:[p.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),p.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):p.jsxs(p.Fragment,{children:[p.jsx(Vr,{size:16,className:"text-zinc-500 shrink-0"}),p.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),p.jsxs(Nl,{className:"sm:max-w-[280px] p-4",children:[p.jsxs(zl,{children:[p.jsx(jl,{className:"text-sm",children:"Choose icon"}),p.jsx(Tl,{className:"text-xs",children:"Click an icon to select it."})]}),p.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:Pl.map(({name:s,Icon:a})=>p.jsx("button",{type:"button",onClick:()=>{r(s),o(!1)},className:pe("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",t===s?"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:s,children:p.jsx(a,{size:20})},s))})]})]})]})}},ti=e=>{if(e instanceof De.z.ZodOptional||e instanceof De.z.ZodDefault)return ti(e._def.innerType);if(e instanceof De.z.ZodObject){const t={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(t[r]=ti(e.shape[r]));return t}return e instanceof De.z.ZodArray?[]:e instanceof De.z.ZodString?"":e instanceof De.z.ZodNumber?0:e instanceof De.z.ZodBoolean?!1:e instanceof De.z.ZodEnum?e._def.values[0]:null},ri=e=>e instanceof De.z.ZodOptional||e instanceof De.z.ZodDefault?ri(e._def.innerType):e,Dn=(e,t)=>e&&!t?"opacity-10":"opacity-100",er=(e,t)=>e!=null&&t.toLowerCase()===e.toLowerCase(),wg=(e,t)=>{if(!e)return;const r=t.toLowerCase(),n=Object.entries(e).find(([o])=>o.toLowerCase()===r);return n==null?void 0:n[1]},Ar=({schema:e,data:t,onChange:r,keys:n,expandedItemPath:o,expandedItemIdByField:i,focusedFieldKey:s,onSidebarExpandedItemChange:a})=>{const l=e.shape,c=n!=null?Object.keys(l).filter(w=>n.includes(w)):Object.keys(l),d=o==null?void 0:o[0],f=(d==null?void 0:d.itemId)!=null?{[d.fieldKey]:d.itemId}:i,m=(d==null?void 0:d.fieldKey)??s??null,u=m!=null;return p.jsx("div",{className:"space-y-4",children:c.map(w=>{const h=l[w];if(!h)return null;const b=ri(h),v=h.description||"ui:text",x=t[w];if(v==="ui:image-picker"&&b instanceof De.z.ZodObject){const O=er(m,w),N=Er["ui:image-picker"]||Er["ui:text"];return p.jsx("div",{className:`transition-opacity duration-200 ${Dn(u,O)}`,...O?{"data-jp-focused-field":w}:{},children:p.jsx(N,{label:w,value:x,onChange:P=>r({...t,[w]:P})})},w)}if(b instanceof De.z.ZodObject){const O=x||{},N=er(m,w);return p.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 ${Dn(u,N)}`,...N?{"data-jp-focused-field":w}:{},children:[p.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[p.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),p.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:w})]}),p.jsx(Ar,{schema:b,data:O,onChange:P=>r({...t,[w]:P}),expandedItemPath:o&&er(d==null?void 0:d.fieldKey,w)?o.slice(1):void 0,expandedItemIdByField:f,focusedFieldKey:m})]},w)}if(b instanceof De.z.ZodArray){const O=Array.isArray(x)?x:[],N=ri(b.element),P=(z,L)=>{if(L<0||L>=O.length)return;const y=[...O],[$]=y.splice(z,1);y.splice(L,0,$),r({...t,[w]:y})},D=er(m,w),W=er(d==null?void 0:d.fieldKey,w)?d==null?void 0:d.itemId:void 0,G=wg(f,w)??W;return p.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${Dn(u,D)}`,...D?{"data-jp-focused-field":w}:{},children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[w," (",O.length,")"]}),p.jsxs("button",{type:"button",onClick:()=>{const z=ti(N);r({...t,[w]:[...O,z]})},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:[p.jsx(ro,{size:12})," Add Item"]})]}),p.jsx("div",{className:"space-y-2",children:O.map((z,L)=>{const y=z,$=y.id||`legacy-${L}`,X=(typeof y.title=="string"?y.title:null)||(typeof y.label=="string"?y.label:null)||(typeof y.name=="string"?y.name:null)||(typeof y.content=="string"?y.content:null)||(typeof y.text=="string"?y.text:null)||`${w} #${L+1}`,H=G,V=String(y.id??$),Y=H!=null&&String(H)===V,Q=Y&&o&&o.length>1?o.slice(1):void 0,j=u&&D&&H!=null&&!Y;return p.jsx(xg,{itemId:V,openItemId:H!=null?String(H):void 0,isFaded:j,index:L,isFirst:L===0,isLast:L===O.length-1,label:X,onExpandedChange:a?I=>a(I?{fieldKey:w,itemId:V}:null):void 0,onRemove:()=>{const I=O.filter((K,Z)=>Z!==L);r({...t,[w]:I})},onMoveUp:()=>P(L,L-1),onMoveDown:()=>P(L,L+1),children:N instanceof De.z.ZodObject?p.jsx(Ar,{schema:N,data:y||{},expandedItemPath:Q,onChange:I=>{const K=[...O];K[L]=I,r({...t,[w]:K})}}):p.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},$)})})]},w)}const k=Er[v]||Er["ui:text"],S=b instanceof De.z.ZodEnum?b._def.values:void 0,C=er(m,w);return p.jsx("div",{className:`transition-opacity duration-200 ${Dn(u,C)}`,...C?{"data-jp-focused-field":w}:{},children:p.jsx(k,{label:w,value:x,options:S,onChange:O=>r({...t,[w]:O})})},w)})})},xg=({itemId:e,openItemId:t,isFaded:r=!1,label:n,onExpandedChange:o,onRemove:i,onMoveUp:s,onMoveDown:a,isFirst:l,isLast:c,children:d})=>{const f=t!=null&&String(t)===String(e),[m,u]=T.useState(f);T.useEffect(()=>{f&&!m&&u(!0),!f&&m&&u(!1)},[f,m]);const w=()=>{const b=!m;u(b),o==null||o(b)},h=f&&m;return p.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...h?{"data-jp-expanded-item":e}:{},children:[p.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[p.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:p.jsxs("button",{type:"button",onClick:w,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[m?p.jsx(eo,{size:12,className:"shrink-0"}):p.jsx(Hr,{size:12,className:"shrink-0"}),p.jsx("span",{className:"truncate",children:n})]})}),p.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[p.jsx("button",{type:"button",disabled:l,onClick:s,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:p.jsx(Nd,{size:12})}),p.jsx("button",{type:"button",disabled:c,onClick:a,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:p.jsx(Ed,{size:12})}),p.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),p.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:p.jsx(Yr,{size:12})})]})]}),m&&p.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:d})]})};function yg(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var ut=e=>{const{present:t,children:r}=e,n=kg(t),o=typeof r=="function"?r({present:n.isPresent}):_.Children.only(r),i=_e(n.ref,Sg(o));return typeof r=="function"||n.isPresent?_.cloneElement(o,{ref:i}):null};ut.displayName="Presence";function kg(e){const[t,r]=_.useState(),n=_.useRef(null),o=_.useRef(e),i=_.useRef("none"),s=e?"mounted":"unmounted",[a,l]=yg(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=Rn(n.current);i.current=a==="mounted"?c:"none"},[a]),Pe(()=>{const c=n.current,d=o.current;if(d!==e){const m=i.current,u=Rn(c);e?l("MOUNT"):u==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==u?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pe(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=u=>{const h=Rn(n.current).includes(CSS.escape(u.animationName));if(u.target===t&&h&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=u=>{u.target===t&&(i.current=Rn(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:_.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Rn(e){return(e==null?void 0:e.animationName)||"none"}function Sg(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var[Mn]=Wt("Tooltip",[Gt]),Ln=Gt(),Il="TooltipProvider",_g=700,ni="tooltip.open",[Cg,oi]=Mn(Il),Dl=e=>{const{__scopeTooltip:t,delayDuration:r=_g,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,s=_.useRef(!0),a=_.useRef(!1),l=_.useRef(0);return _.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(Cg,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:_.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:_.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:i})};Dl.displayName=Il;var Nr="Tooltip",[Eg,zr]=Mn(Nr),Rl=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=oi(Nr,e.__scopeTooltip),c=Ln(t),[d,f]=_.useState(null),m=kr(),u=_.useRef(0),w=s??l.disableHoverableContent,h=a??l.delayDuration,b=_.useRef(!1),[v,x]=Sn({prop:n,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(ni))):l.onClose(),i==null||i(N)},caller:Nr}),k=_.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),S=_.useCallback(()=>{window.clearTimeout(u.current),u.current=0,b.current=!1,x(!0)},[x]),C=_.useCallback(()=>{window.clearTimeout(u.current),u.current=0,x(!1)},[x]),O=_.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{b.current=!0,x(!0),u.current=0},h)},[h,x]);return _.useEffect(()=>()=>{u.current&&(window.clearTimeout(u.current),u.current=0)},[]),p.jsx(Bo,{...c,children:p.jsx(Eg,{scope:t,contentId:m,open:v,stateAttribute:k,trigger:d,onTriggerChange:f,onTriggerEnter:_.useCallback(()=>{l.isOpenDelayedRef.current?O():S()},[l.isOpenDelayedRef,O,S]),onTriggerLeave:_.useCallback(()=>{w?C():(window.clearTimeout(u.current),u.current=0)},[C,w]),onOpen:S,onClose:C,disableHoverableContent:w,children:r})})};Rl.displayName=Nr;var ii="TooltipTrigger",Ml=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=zr(ii,r),i=oi(ii,r),s=Ln(r),a=_.useRef(null),l=_e(t,a,o.onTriggerChange),c=_.useRef(!1),d=_.useRef(!1),f=_.useCallback(()=>c.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(yn,{asChild:!0,...s,children:p.jsx(Se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:be(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:be(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:be(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:be(e.onBlur,o.onClose),onClick:be(e.onClick,o.onClose)})})});Ml.displayName=ii;var si="TooltipPortal",[Ag,Ng]=Mn(si,{forceMount:void 0}),Ll=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=zr(si,t);return p.jsx(Ag,{scope:t,forceMount:r,children:p.jsx(ut,{present:r||i.open,children:p.jsx(kn,{asChild:!0,container:o,children:n})})})};Ll.displayName=si;var tr="TooltipContent",Fl=_.forwardRef((e,t)=>{const r=Ng(tr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,s=zr(tr,e.__scopeTooltip);return p.jsx(ut,{present:n||s.open,children:s.disableHoverableContent?p.jsx(Bl,{side:o,...i,ref:t}):p.jsx(zg,{side:o,...i,ref:t})})}),zg=_.forwardRef((e,t)=>{const r=zr(tr,e.__scopeTooltip),n=oi(tr,e.__scopeTooltip),o=_.useRef(null),i=_e(t,o),[s,a]=_.useState(null),{trigger:l,onClose:c}=r,d=o.current,{onPointerInTransitChange:f}=n,m=_.useCallback(()=>{a(null),f(!1)},[f]),u=_.useCallback((w,h)=>{const b=w.currentTarget,v={x:w.clientX,y:w.clientY},x=Ig(v,b.getBoundingClientRect()),k=Dg(v,x),S=Rg(h.getBoundingClientRect()),C=Lg([...k,...S]);a(C),f(!0)},[f]);return _.useEffect(()=>()=>m(),[m]),_.useEffect(()=>{if(l&&d){const w=b=>u(b,d),h=b=>u(b,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",h)}}},[l,d,u,m]),_.useEffect(()=>{if(s){const w=h=>{const b=h.target,v={x:h.clientX,y:h.clientY},x=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),k=!Mg(v,s);x?m():k&&(m(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,s,c,m]),p.jsx(Bl,{...e,ref:i})}),[jg,Tg]=Mn(Nr,{isInside:!1}),Og=Gf("TooltipContent"),Bl=_.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=zr(tr,r),c=Ln(r),{onClose:d}=l;return _.useEffect(()=>(document.addEventListener(ni,d),()=>document.removeEventListener(ni,d)),[d]),_.useEffect(()=>{if(l.trigger){const f=m=>{const u=m.target;u!=null&&u.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),p.jsx(dn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(Uo,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Og,{children:n}),p.jsx(jg,{scope:r,isInside:!0,children:p.jsx(Vp,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Fl.displayName=tr;var Ul="TooltipArrow",Pg=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ln(r);return Tg(Ul,r).isInside?null:p.jsx(Wo,{...o,...n,ref:t})});Pg.displayName=Ul;function Ig(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Dg(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Rg(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Mg(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],c=a.x,d=a.y,f=l.x,m=l.y;d>n!=m>n&&r<(f-c)*(n-d)/(m-d)+c&&(o=!o)}return o}function Lg(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Fg(t)}function Fg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Bg=Dl,Ug=Rl,Wg=Ml,$g=Ll,Wl=Fl;const Hg=Bg,jr=Ug,Tr=Wg,rr=_.forwardRef(({className:e,sideOffset:t=4,...r},n)=>p.jsx($g,{children:p.jsx(Wl,{ref:n,sideOffset:t,className:pe("z-50 rounded-md bg-zinc-800 px-2.5 py-1.5 text-[11px] text-zinc-200 shadow-md","animate-in fade-in-0 zoom-in-95",e),...r})}));rr.displayName=Wl.displayName;var Fn="Popover",[$l]=Wt(Fn,[Gt]),Or=Gt(),[Vg,St]=$l(Fn),Hl=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=Or(t),l=_.useRef(null),[c,d]=_.useState(!1),[f,m]=Sn({prop:n,defaultProp:o??!1,onChange:i,caller:Fn});return p.jsx(Bo,{...a,children:p.jsx(Vg,{scope:t,contentId:kr(),triggerRef:l,open:f,onOpenChange:m,onOpenToggle:_.useCallback(()=>m(u=>!u),[m]),hasCustomAnchor:c,onCustomAnchorAdd:_.useCallback(()=>d(!0),[]),onCustomAnchorRemove:_.useCallback(()=>d(!1),[]),modal:s,children:r})})};Hl.displayName=Fn;var Vl="PopoverAnchor",Yg=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=St(Vl,r),i=Or(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return _.useEffect(()=>(s(),()=>a()),[s,a]),p.jsx(yn,{...i,...n,ref:t})});Yg.displayName=Vl;var Yl="PopoverTrigger",Kl=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=St(Yl,r),i=Or(r),s=_e(t,o.triggerRef),a=p.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jl(o.open),...n,ref:s,onClick:be(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(yn,{asChild:!0,...i,children:a})});Kl.displayName=Yl;var ai="PopoverPortal",[Kg,Gg]=$l(ai,{forceMount:void 0}),Gl=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=St(ai,t);return p.jsx(Kg,{scope:t,forceMount:r,children:p.jsx(ut,{present:r||i.open,children:p.jsx(kn,{asChild:!0,container:o,children:n})})})};Gl.displayName=ai;var nr="PopoverContent",Zl=_.forwardRef((e,t)=>{const r=Gg(nr,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=St(nr,e.__scopePopover);return p.jsx(ut,{present:n||i.open,children:i.modal?p.jsx(Xg,{...o,ref:t}):p.jsx(qg,{...o,ref:t})})});Zl.displayName=nr;var Zg=$t("PopoverContent.RemoveScroll"),Xg=_.forwardRef((e,t)=>{const r=St(nr,e.__scopePopover),n=_.useRef(null),o=_e(t,n),i=_.useRef(!1);return _.useEffect(()=>{const s=n.current;if(s)return Ra(s)},[]),p.jsx(Go,{as:Zg,allowPinchZoom:!0,children:p.jsx(Xl,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:be(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),qg=_.forwardRef((e,t)=>{const r=St(nr,e.__scopePopover),n=_.useRef(!1),o=_.useRef(!1);return p.jsx(Xl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Xl=_.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...f}=e,m=St(nr,r),u=Or(r);return Gs(),p.jsx(Eo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(dn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>m.onOpenChange(!1),children:p.jsx(Uo,{"data-state":Jl(m.open),role:"dialog",id:m.contentId,...u,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ql="PopoverClose",Jg=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=St(ql,r);return p.jsx(Se.button,{type:"button",...n,ref:t,onClick:be(e.onClick,()=>o.onOpenChange(!1))})});Jg.displayName=ql;var Qg="PopoverArrow",e0=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Or(r);return p.jsx(Wo,{...o,...n,ref:t})});e0.displayName=Qg;function Jl(e){return e?"open":"closed"}var t0=Hl,r0=Kl,n0=Gl,Ql=Zl;const o0=t0,i0=r0,ec=_.forwardRef(({className:e,align:t="start",sideOffset:r=6,...n},o)=>p.jsx(n0,{children:p.jsx(Ql,{ref:o,align:t,sideOffset:r,className:pe("z-50 w-[var(--radix-popover-trigger-width)] rounded-lg border border-zinc-700/80 bg-zinc-950 p-1 text-white shadow-xl shadow-black/30","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2",e),...n})}));ec.displayName=Ql.displayName;const tc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"Select page",s0=({pageSlugs:e,currentSlug:t,onPageChange:r,sectionCount:n,onNewPage:o,className:i,currentPageLabel:s})=>{const[a,l]=T.useState(!1),c=s??tc(t),d=f=>{r(f),l(!1)};return p.jsx("div",{className:pe("mx-3 mt-2 mb-2",i),children:p.jsxs(o0,{open:a,onOpenChange:l,children:[p.jsx(i0,{asChild:!0,children:p.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-label":`Select page, current: ${c}`,className:pe("flex items-center gap-2 w-full pl-3 pr-4 py-2 rounded-lg border text-left transition-all duration-150 cursor-pointer","bg-transparent border-zinc-800 text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800/50 hover:border-zinc-700","data-[state=open]:bg-zinc-950 data-[state=open]:border-zinc-800 data-[state=open]:text-zinc-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950"),children:[p.jsx(Pd,{size:14,className:"shrink-0 text-zinc-500","aria-hidden":!0}),p.jsx("span",{className:"text-xs font-medium flex-1 truncate",children:c}),p.jsx(Hr,{size:13,className:"shrink-0 text-zinc-500","aria-hidden":!0})]})}),p.jsxs(ec,{align:"start",sideOffset:4,className:"min-w-[var(--radix-popover-trigger-width)] bg-zinc-950 border-zinc-800 p-1",role:"listbox","aria-label":"Page list",children:[e.map(f=>{const m=f===t,u=tc(f);return p.jsxs("button",{type:"button",role:"option","aria-selected":m,onClick:()=>d(f),className:pe("flex items-center justify-between w-full px-2.5 py-2 rounded-md text-xs transition-colors cursor-pointer",m?"bg-primary/10 text-primary font-semibold":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"),children:[p.jsx("span",{children:u}),n!=null&&p.jsxs("span",{className:"text-[10px] text-zinc-600 tabular-nums","aria-hidden":!0,children:[n,"s"]})]},f)}),o!=null&&p.jsx("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:p.jsxs("button",{type:"button",onClick:()=>{o(),l(!1)},className:"flex items-center gap-1.5 w-full px-2.5 py-2 rounded-md text-[11px] text-zinc-600 hover:text-zinc-300 hover:bg-zinc-800 transition-colors cursor-pointer","aria-label":"New page",children:[p.jsx(ro,{size:12,"aria-hidden":!0}),p.jsx("span",{children:"New page"})]})})]})]})})};function a0(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var li="ScrollArea",[rc]=Wt(li),[l0,He]=rc(li),nc=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,l]=_.useState(null),[c,d]=_.useState(null),[f,m]=_.useState(null),[u,w]=_.useState(null),[h,b]=_.useState(null),[v,x]=_.useState(0),[k,S]=_.useState(0),[C,O]=_.useState(!1),[N,P]=_.useState(!1),D=_e(t,G=>l(G)),W=$s(o);return p.jsx(l0,{scope:r,type:n,dir:W,scrollHideDelay:i,scrollArea:a,viewport:c,onViewportChange:d,content:f,onContentChange:m,scrollbarX:u,onScrollbarXChange:w,scrollbarXEnabled:C,onScrollbarXEnabledChange:O,scrollbarY:h,onScrollbarYChange:b,scrollbarYEnabled:N,onScrollbarYEnabledChange:P,onCornerWidthChange:x,onCornerHeightChange:S,children:p.jsx(Se.div,{dir:W,...s,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});nc.displayName=li;var oc="ScrollAreaViewport",ic=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...i}=e,s=He(oc,r),a=_.useRef(null),l=_e(t,a,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(Se.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});ic.displayName=oc;var ot="ScrollAreaScrollbar",sc=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=He(ot,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return _.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?p.jsx(c0,{...n,ref:t,forceMount:r}):o.type==="scroll"?p.jsx(d0,{...n,ref:t,forceMount:r}):o.type==="auto"?p.jsx(ac,{...n,ref:t,forceMount:r}):o.type==="always"?p.jsx(ci,{...n,ref:t}):null});sc.displayName=ot;var c0=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=He(ot,e.__scopeScrollArea),[i,s]=_.useState(!1);return _.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},d=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(ut,{present:r||i,children:p.jsx(ac,{"data-state":i?"visible":"hidden",...n,ref:t})})}),d0=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=He(ot,e.__scopeScrollArea),i=e.orientation==="horizontal",s=$n(()=>l("SCROLL_END"),100),[a,l]=a0("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return _.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay,l]),_.useEffect(()=>{const c=o.viewport,d=i?"scrollLeft":"scrollTop";if(c){let f=c[d];const m=()=>{const u=c[d];f!==u&&(l("SCROLL"),s()),f=u};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[o.viewport,i,l,s]),p.jsx(ut,{present:r||a!=="hidden",children:p.jsx(ci,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:be(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:be(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ac=_.forwardRef((e,t)=>{const r=He(ot,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,s]=_.useState(!1),a=e.orientation==="horizontal",l=$n(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;s(a?c:d)}},10);return or(r.viewport,l),or(r.content,l),p.jsx(ut,{present:n||i,children:p.jsx(ci,{"data-state":i?"visible":"hidden",...o,ref:t})})}),ci=_.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=He(ot,e.__scopeScrollArea),i=_.useRef(null),s=_.useRef(0),[a,l]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=fc(a.viewport,a.content),d={...n,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>i.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function f(m,u){return g0(m,s.current,a,u)}return r==="horizontal"?p.jsx(u0,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollLeft,u=hc(m,a,o.dir);i.current.style.transform=`translate3d(${u}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=f(m,o.dir))}}):r==="vertical"?p.jsx(f0,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollTop,u=hc(m,a);i.current.style.transform=`translate3d(0, ${u}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=f(m))}}):null}),u0=_.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=He(ot,e.__scopeScrollArea),[s,a]=_.useState(),l=_.useRef(null),c=_e(t,l,i.onScrollbarXChange);return _.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(cc,{"data-orientation":"horizontal",...o,ref:c,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Wn(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),mc(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Un(s.paddingLeft),paddingEnd:Un(s.paddingRight)}})}})}),f0=_.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=He(ot,e.__scopeScrollArea),[s,a]=_.useState(),l=_.useRef(null),c=_e(t,l,i.onScrollbarYChange);return _.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(cc,{"data-orientation":"vertical",...o,ref:c,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Wn(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),mc(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Un(s.paddingTop),paddingEnd:Un(s.paddingBottom)}})}})}),[h0,lc]=rc(ot),cc=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:f,...m}=e,u=He(ot,r),[w,h]=_.useState(null),b=_e(t,D=>h(D)),v=_.useRef(null),x=_.useRef(""),k=u.viewport,S=n.content-n.viewport,C=Me(d),O=Me(l),N=$n(f,10);function P(D){if(v.current){const W=D.clientX-v.current.left,G=D.clientY-v.current.top;c({x:W,y:G})}}return _.useEffect(()=>{const D=W=>{const G=W.target;(w==null?void 0:w.contains(G))&&C(W,S)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[k,w,S,C]),_.useEffect(O,[n,O]),or(w,N),or(u.content,N),p.jsx(h0,{scope:r,scrollbar:w,hasThumb:o,onThumbChange:Me(i),onThumbPointerUp:Me(s),onThumbPositionChange:O,onThumbPointerDown:Me(a),children:p.jsx(Se.div,{...m,ref:b,style:{position:"absolute",...m.style},onPointerDown:be(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),v.current=w.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",u.viewport&&(u.viewport.style.scrollBehavior="auto"),P(D))}),onPointerMove:be(e.onPointerMove,P),onPointerUp:be(e.onPointerUp,D=>{const W=D.target;W.hasPointerCapture(D.pointerId)&&W.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=x.current,u.viewport&&(u.viewport.style.scrollBehavior=""),v.current=null})})})}),Bn="ScrollAreaThumb",dc=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=lc(Bn,e.__scopeScrollArea);return p.jsx(ut,{present:r||o.hasThumb,children:p.jsx(p0,{ref:t,...n})})}),p0=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=He(Bn,r),s=lc(Bn,r),{onThumbPositionChange:a}=s,l=_e(t,f=>s.onThumbChange(f)),c=_.useRef(void 0),d=$n(()=>{c.current&&(c.current(),c.current=void 0)},100);return _.useEffect(()=>{const f=i.viewport;if(f){const m=()=>{if(d(),!c.current){const u=b0(f,a);c.current=u,a()}};return a(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[i.viewport,d,a]),p.jsx(Se.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:be(e.onPointerDownCapture,f=>{const u=f.target.getBoundingClientRect(),w=f.clientX-u.left,h=f.clientY-u.top;s.onThumbPointerDown({x:w,y:h})}),onPointerUp:be(e.onPointerUp,s.onThumbPointerUp)})});dc.displayName=Bn;var di="ScrollAreaCorner",uc=_.forwardRef((e,t)=>{const r=He(di,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.jsx(m0,{...e,ref:t}):null});uc.displayName=di;var m0=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=He(di,r),[i,s]=_.useState(0),[a,l]=_.useState(0),c=!!(i&&a);return or(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),or(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),s(d)}),c?p.jsx(Se.div,{...n,ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Un(e){return e?parseInt(e,10):0}function fc(e,t){const r=e/t;return isNaN(r)?0:r}function Wn(e){const t=fc(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function g0(e,t,r,n="ltr"){const o=Wn(r),i=o/2,s=t||i,a=o-s,l=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return pc([l,c],f)(e)}function hc(e,t,r="ltr"){const n=Wn(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,s]:[s*-1,0],c=yo(e,l);return pc([0,s],[0,a])(c)}function pc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function mc(e,t){return e>0&&e<t}var b0=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=r.left!==i.left,a=r.top!==i.top;(s||a)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)};function $n(e,t){const r=Me(e),n=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(n.current),[]),_.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function or(e,t){const r=Me(t);Pe(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var gc=nc,v0=ic,w0=sc,x0=dc,y0=uc;const bc=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(gc,{ref:n,className:pe("relative overflow-hidden",e),...r,children:[p.jsx(v0,{className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(w0,{orientation:"vertical",className:"flex touch-none select-none transition-colors h-full w-1.5 border-l border-l-transparent p-px",children:p.jsx(x0,{className:"relative flex-1 rounded-full bg-zinc-700 hover:bg-zinc-600"})}),p.jsx(y0,{})]}));bc.displayName=gc.displayName;const vc=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),k0={activationConstraint:{distance:8}},S0={activationConstraint:{delay:200,tolerance:5}};function ui({layer:e,opts:t,dragHandleProps:r}){const{isSelected:n,isActive:o,isDragging:i,canDelete:s,onSelect:a,onOpenSettings:l,onDelete:c}=t,d=!!r;return p.jsxs("div",{className:pe("group flex items-center gap-2 pl-1 pr-2 py-2.5 rounded-lg text-left transition-all duration-200 cursor-pointer border-l-2",n?"bg-primary/[0.08] border-primary":o?"bg-zinc-800/30 border-emerald-500/60":"border-transparent hover:bg-zinc-800/40",i&&"opacity-50 shadow-lg",d?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[d?p.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-150 cursor-grab touch-none","aria-label":"Trascina per riordinare",...r,children:p.jsx(Gi,{size:12,className:"text-zinc-600"})}):p.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 pointer-events-none",children:p.jsx(Gi,{size:12,className:"text-zinc-600/50"})}),p.jsxs("button",{type:"button",onClick:a,className:"flex-1 min-w-0 text-left",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:pe("text-xs font-bold uppercase tracking-[0.06em] truncate",n?"text-primary":"text-zinc-500"),children:e.type}),o&&p.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),p.jsx("span",{className:"text-[11px] text-zinc-600 block truncate leading-snug mt-0.5",children:e.title??`${e.type} section`})]}),p.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsx(Be,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-zinc-300",onClick:f=>{f.stopPropagation(),l(f)},children:p.jsx(Fd,{size:12})})}),p.jsx(rr,{children:"Settings"})]}),s&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsx(Be,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-destructive",onClick:f=>{f.stopPropagation(),c()},children:p.jsx(Yr,{size:12})})}),p.jsx(rr,{children:"Delete section"})]})]})]})}function _0({layer:e,opts:t}){const{attributes:r,listeners:n,setNodeRef:o,transform:i,transition:s,isDragging:a}=Lf({id:e.id,disabled:!t.canReorder}),l={transform:gt.Transform.toString(i),transition:s};return p.jsx("div",{ref:o,style:l,className:pe(a&&"z-10"),children:p.jsx(ui,{layer:e,opts:{...t,isDragging:a},dragHandleProps:t.canReorder?{...r,...n,"aria-roledescription":"elemento trascinabile"}:void 0})})}const wc=({selectedSection:e,pageData:t,allSectionsData:r=[],onUpdate:n,onUpdateSection:o,onClose:i,expandedItemPath:s=null,onReorderSection:a,allLayers:l=[],activeSectionId:c,onRequestScrollToSection:d,onDeleteSection:f,onAddSection:m,hasChanges:u=!1,onExportHTML:w,onSaveToFile:h,saveSuccessFeedback:b=!1,onResetToFile:v,showResetToFile:x=!1,pageSlugs:k=[],currentSlug:S="home",onPageChange:C})=>{const{schemas:O}=dr(),[N,P]=T.useState(!0),[D,W]=T.useState(null),[G,z]=T.useState(null),[L,y]=T.useState(null),[$,X]=T.useState(null),H=T.useRef(null),V=T.useRef(null),Y=cu(ao(mo,k0),ao(xs,S0),ao(ho,{coordinateGetter:Uf})),Q=T.useDeferredValue(e),j=e!=null&&(Q==null?void 0:Q.id)!==e.id,I=s&&s.length>0?s:L?[L]:null,K=I!=null&&I.length?{fieldKey:I[I.length-1].fieldKey,itemId:I[I.length-1].itemId}:null,Z=T.useRef(s);T.useEffect(()=>{Z.current!=null&&s==null&&y(null),Z.current=s},[s]),T.useEffect(()=>{(e==null?void 0:e.id)!=null&&P(!1)},[e==null?void 0:e.id]);const te=()=>{const B=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const M=H.current;M&&M.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(B)},ue=T.useRef(N);T.useEffect(()=>{if(N&&!ue.current){const B=te();return ue.current=N,B}ue.current=N},[N]),T.useEffect(()=>{if(!K)return;const B=H.current;if(!B)return;const M=requestAnimationFrame(()=>{const J=B.querySelector("[data-jp-expanded-item]")??B.querySelector("[data-jp-focused-field]");J&&J.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(M)},[K]);const ee=B=>{P(!1),d==null||d(B)},ie=()=>{P(B=>{const M=!B;return M&&te(),M})},se=(B,M)=>{M.stopPropagation(),r.length>0&&o?X(B):(P(!1),d==null||d(B))};T.useEffect(()=>{if($==null)return;const B=M=>{M.key==="Escape"&&X(null)};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[$]);const oe=B=>{D===B?(f==null||f(B),W(null)):(W(B),setTimeout(()=>W(null),3e3))},le=T.useMemo(()=>l.filter(B=>B.scope==="local").map(B=>B.id),[l]),fe=!!a&&le.length>0,we=B=>{z(B.active.id)},g=B=>{z(null);const{active:M,over:J}=B;if(!J||M.id===J.id||!a)return;const ne=l.findIndex(he=>he.id===M.id),re=l.findIndex(he=>he.id===J.id);if(ne===-1||re===-1)return;const ae=ne<re?re:re-1;a(M.id,ae)},F=e?t.sections.find(B=>B.id===e.id):void 0,U=Q?t.sections.find(B=>B.id===Q.id):void 0,E=Q?O[Q.type]:void 0,A=l.length>0&&(N||!e),R=S?S.charAt(0).toUpperCase()+S.slice(1):"Select page",q=T.useMemo(()=>{const B=[];let M=null;for(const J of l){const ne=J.type.toUpperCase(),re=M!==null&&(M==="HEADER"&&ne!=="HEADER"||M!=="HEADER"&&M!=="FOOTER"&&ne==="FOOTER");B.push({layer:J,showSeparatorAbove:re}),M=ne}return B},[l]);return p.jsx(Hg,{children:p.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:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("h2",{className:"text-sm font-bold text-white",children:"Inspector"}),p.jsx("p",{className:"text-[10px] tracking-[0.06em] text-zinc-600 mt-0.5",children:e?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-primary font-bold",children:e.type}),p.jsx("span",{className:"text-zinc-700 mx-1.5",children:"|"}),p.jsx("span",{className:"uppercase",children:e.scope})]}):p.jsxs("span",{className:"text-zinc-600",children:[R," · ",l.length," sections"]})})]}),p.jsx(Be,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"Close Inspector",children:p.jsx(Mt,{size:14})})]}),k.length>0&&C&&p.jsx(s0,{pageSlugs:k,currentSlug:S,onPageChange:C,sectionCount:l.length,currentPageLabel:R}),l.length>0&&p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-t border-zinc-800/50",children:[p.jsxs("button",{type:"button",onClick:ie,className:"flex items-center gap-2 flex-1 cursor-pointer min-w-0 text-left","aria-expanded":A,"aria-label":A?"Collapse Page Layers":"Expand Page Layers",children:[p.jsx(to,{size:14,className:"text-zinc-500 shrink-0"}),p.jsx("span",{className:"text-[11px] font-semibold tracking-[0.04em] text-zinc-400",children:"Page Layers"}),p.jsxs("span",{className:"text-[10px] text-zinc-600",children:["(",l.length,")"]}),p.jsx(eo,{size:13,className:pe("ml-auto text-zinc-600 transition-transform duration-200 shrink-0",!N&&"rotate-180")})]}),m!=null&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsx(Be,{variant:"ghost",size:"icon-sm",className:"text-zinc-500 hover:text-primary",onClick:m,children:p.jsx(ro,{size:14})})}),p.jsx(rr,{children:"Add section"})]})]}),p.jsxs(bc,{className:"flex-1 min-h-0 flex flex-col",children:[p.jsx("div",{ref:H,className:"flex flex-col min-h-0",children:A&&p.jsxs("div",{className:"py-1",children:[p.jsxs(af,{sensors:Y,collisionDetection:fu,modifiers:[Cf],onDragStart:we,onDragEnd:g,accessibility:{announcements:{onDragStart:()=>"Sezione presa in carico. Usa i tasti freccia per spostare, Spazio per rilasciare.",onDragOver:({over:B})=>B?`Posizione ${le.indexOf(String(B.id))+1} di ${le.length}.`:void 0,onDragEnd:({over:B})=>B?"Sezione rilasciata in nuova posizione.":"Riposizionamento annullato.",onDragCancel:()=>"Riposizionamento annullato."}},children:[p.jsx(Tf,{items:le,strategy:zf,children:p.jsx("div",{className:"px-2 space-y-0.5",children:q.map(({layer:B,showSeparatorAbove:M})=>p.jsxs(T.Fragment,{children:[M&&p.jsx("div",{className:"mx-3 border-t border-zinc-800/60 my-1"}),B.scope==="local"&&fe?p.jsx(_0,{layer:B,opts:{isSelected:(e==null?void 0:e.id)===B.id,isActive:c===B.id,isDragging:!1,canReorder:!0,canDelete:!!f,deleteConfirm:D===B.id,onSelect:()=>ee(B.id),onDelete:()=>oe(B.id),onOpenSettings:J=>se(B.id,J)}}):p.jsx("div",{children:p.jsx(ui,{layer:B,opts:{isSelected:(e==null?void 0:e.id)===B.id,isActive:c===B.id,isDragging:!1,canDelete:B.scope==="local"&&!!f,deleteConfirm:D===B.id,onSelect:()=>ee(B.id),onDelete:()=>oe(B.id),onOpenSettings:J=>se(B.id,J)}})})]},B.id))})}),p.jsx(_f,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:G?(()=>{const B=l.find(M=>M.id===G);return B?p.jsx("div",{className:"px-2 w-full max-w-[var(--inspector-width,280px)]",children:p.jsx(ui,{layer:B,opts:{isSelected:!1,isActive:!1,isDragging:!0,canDelete:!1,deleteConfirm:!1,onSelect:()=>{},onDelete:()=>{},onOpenSettings:()=>{}},dragHandleProps:{"aria-hidden":!0}})}):null})():null})]}),D&&p.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 mx-2 rounded-md bg-amber-500/10 border border-amber-500/30",children:[p.jsx(Td,{size:12,className:"text-amber-500 shrink-0"}),p.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]})}),K&&F&&(()=>{const B=F.data||{};let M;if(I&&I.length>0){let J=B;for(const ae of I){const he=J==null?void 0:J[ae.fieldKey];ae.itemId!=null&&Array.isArray(he)?J=he.find(ve=>String(ve==null?void 0:ve.id)===String(ae.itemId))??null:J=he}const ne=J||{},re=K.fieldKey;M=(typeof ne.name=="string"?ne.name:null)??(typeof ne.title=="string"?ne.title:null)??(typeof ne.label=="string"?ne.label:null)??re.charAt(0).toUpperCase()+re.slice(1).replace(/([A-Z])/g," $1").trim()}else{const J=K.fieldKey;if(K.itemId!=null){const ae=(Array.isArray(B[J])?B[J]:[]).find(he=>String(he==null?void 0:he.id)===String(K.itemId))||{};M=(typeof ae.name=="string"?ae.name:null)??(typeof ae.title=="string"?ae.title:null)??(typeof ae.label=="string"?ae.label:null)??J}else M=J.charAt(0).toUpperCase()+J.slice(1).replace(/([A-Z])/g," $1").trim()}return p.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[p.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),p.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:M})]})})(),p.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&P(!1),children:e?j?p.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[p.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):E?(()=>{const M=Object.keys(E.shape).filter(he=>!vc.has(he)),J=(U==null?void 0:U.data)||{};if(M.length===0)return p.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const ne=I==null?void 0:I[0],re=(ne==null?void 0:ne.itemId)!=null?{[ne.fieldKey]:ne.itemId}:(K==null?void 0:K.itemId)!=null?{[K.fieldKey]:K.itemId}:void 0,ae=(ne==null?void 0:ne.fieldKey)??(K==null?void 0:K.fieldKey)??null;return p.jsx(Ar,{schema:E,data:J,onChange:he=>n(he),keys:M,expandedItemPath:I,expandedItemIdByField:re,focusedFieldKey:ae,onSidebarExpandedItemChange:y})})():p.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 ",(Q==null?void 0:Q.type)??e.type]}):p.jsx("p",{className:"text-xs text-zinc-600 text-center py-10",children:"Select a layer above or on the stage to edit."})})]}),p.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 shrink-0",children:(w!=null||h!=null||v!=null)&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:pe("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",u?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),p.jsx("span",{className:pe("text-xs font-medium transition-colors duration-300 shrink-0",b?"text-emerald-400":u?"text-amber-500":"text-zinc-500"),children:b?"Salvato":u?"Unsaved Changes":"All Changes Saved"}),w!=null&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsxs(Be,{variant:"outline",size:"sm",className:"gap-1.5",onClick:w,children:[p.jsx(Ki,{size:12}),p.jsx("span",{children:"Bake HTML"})]})}),p.jsx(rr,{children:"Generate static HTML output"})]}),h!=null&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsxs(Be,{size:"sm",disabled:!u,className:"gap-1.5",onClick:B=>{B.preventDefault(),B.stopPropagation(),h()},children:[p.jsx(Md,{size:12}),p.jsx("span",{children:"Save"})]})}),p.jsx(rr,{children:"Save (export JSON)"})]}),v!=null&&x&&p.jsx("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-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:p.jsx("span",{children:"Ripristina da file"})})]})}),$!=null&&r.length>0&&o!=null&&(()=>{const B=r.find(ve=>ve.id===$),M=l.find(ve=>ve.id===$);if(!B)return null;const J=(M==null?void 0:M.scope)==="global"?"global":"local",ne=B.type,re=O[ne],he=(re?Object.keys(re.shape):[]).filter(ve=>vc.has(ve)),me=B.data??{};return he.length===0?p.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:()=>X(null),children:p.jsxs("div",{ref:V,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:ve=>ve.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[p.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",ne]}),p.jsx("button",{type:"button",onClick:()=>X(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:p.jsx(Mt,{size:18})})]}),p.jsx("div",{className:"p-4",children:p.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):p.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:ve=>ve.target===ve.currentTarget&&X(null),children:p.jsxs("div",{ref:V,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:ve=>ve.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[p.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",ne]}),p.jsx("button",{type:"button",onClick:()=>X(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:p.jsx(Mt,{size:18})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:p.jsx(Ar,{schema:re,data:me,onChange:ve=>{const it={...B.data,...ve};o($,J,ne,it)},keys:he})})]})})})()]})})},xc=({draft:e,globalDraft:t,themeConfig:r,slug:n,selectedId:o,scrollToSectionId:i,onScrollRequested:s})=>{const a=T.useRef(null),l=T.useCallback(()=>{var c;(c=a.current)!=null&&c.contentWindow&&a.current.contentWindow.postMessage({type:Ce.UPDATE_DRAFTS,draft:e,globalDraft:t,themeConfig:r},"*")},[e,t,r]);return T.useEffect(()=>{l()},[l]),T.useEffect(()=>{const c=d=>{d.data.type===Ce.STAGE_READY&&l()};return window.addEventListener("message",c),()=>window.removeEventListener("message",c)},[l]),T.useEffect(()=>{var c;(c=a.current)!=null&&c.contentWindow&&a.current.contentWindow.postMessage({type:Ce.SYNC_SELECTION,selectedId:o},"*")},[o]),T.useEffect(()=>{var c;!i||!((c=a.current)!=null&&c.contentWindow)||(a.current.contentWindow.postMessage({type:Ce.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),s==null||s())},[i,s]),p.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:p.jsx("iframe",{ref:a,src:`/admin/preview/${n}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},Hn={setTheme:e=>{const t=document.documentElement,{tokens:r}=e,n={"--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(n).forEach(([o,i])=>{t.style.setProperty(o,i)})}},yc=()=>{var u;const[e,t]=T.useState(null),[r,n]=T.useState(null),[o,i]=T.useState(null),[s,a]=T.useState(null),[l,c]=T.useState(!1);if(T.useEffect(()=>{const w=h=>{h.data.type===Ce.UPDATE_DRAFTS&&(t(h.data.draft),n(h.data.globalDraft),h.data.themeConfig&&Hn.setTheme(h.data.themeConfig)),h.data.type===Ce.SYNC_SELECTION&&i(h.data.selectedId),h.data.type===Ce.REQUEST_SCROLL_TO_SECTION&&a(h.data.sectionId??null),h.data.type===Ce.REQUEST_CLEAN_HTML&&(c(!0),setTimeout(()=>{const b=document.documentElement.outerHTML;window.parent.postMessage({type:Ce.SEND_CLEAN_HTML,html:b},"*"),c(!1)},50))};return window.addEventListener("message",w),window.parent.postMessage({type:Ce.STAGE_READY},"*"),()=>window.removeEventListener("message",w)},[]),T.useEffect(()=>{const w=h=>{var z,L,y,$,X,H,V,Y;const b=h.target,v=h.clientX,x=h.clientY;let k=null,S=b;for(;S&&S!==document.body;){const Q=(z=S.getAttribute)==null?void 0:z.call(S,"data-section-id"),j=(L=S.getAttribute)==null?void 0:L.call(S,"data-section-type"),I=(y=S.getAttribute)==null?void 0:y.call(S,"data-section-scope");if(Q&&j&&I){k=S;break}S=S.parentElement}if(!k)return;h.preventDefault(),h.stopPropagation();const C=k.getAttribute("data-section-id"),O=k.getAttribute("data-section-type"),N=k.getAttribute("data-section-scope");if(!C||!O||!N)return;const P={id:C,type:O,scope:N};if(b===k){window.parent.postMessage({type:Ce.SECTION_SELECT,section:P},"*");return}const D=document.elementFromPoint(v,x)??b;if(!D||!k.contains(D)){window.parent.postMessage({type:Ce.SECTION_SELECT,section:P},"*");return}if(D===k){window.parent.postMessage({type:Ce.SECTION_SELECT,section:P},"*");return}const W=[];for(S=D;S&&S!==k;){const Q=($=S.getAttribute)==null?void 0:$.call(S,"data-jp-item-id"),j=(X=S.getAttribute)==null?void 0:X.call(S,"data-jp-item-field");Q&&j&&W.push({fieldKey:j||"items",itemId:Q}),S=S.parentElement}if(W.reverse(),W.length===0)for(S=D;S&&S!==k;){const Q=(H=S.getAttribute)==null?void 0:H.call(S,"data-jp-field");if(Q){W.push({fieldKey:Q});break}S=S.parentElement}if(W.length===0&&D){let Q=null;const j=I=>{var Z,te;const K=I.getBoundingClientRect();if(K.left<=v&&v<=K.right&&K.top<=x&&x<=K.bottom){for(let ue=0;ue<I.children.length;ue++)j(I.children[ue]);((Z=I.getAttribute)!=null&&Z.call(I,"data-jp-item-id")||(te=I.getAttribute)!=null&&te.call(I,"data-jp-field"))&&(Q=I)}};if(j(D),Q){const I=Q,K=(V=I.getAttribute)==null?void 0:V.call(I,"data-jp-item-id"),Z=(Y=I.getAttribute)==null?void 0:Y.call(I,"data-jp-field");K&&Z?W.push({fieldKey:Z||"items",itemId:K}):Z&&W.push({fieldKey:Z})}}const G={type:Ce.SECTION_SELECT,section:P};if(W.length>0){G.itemPath=W;const Q=W[0];Q.itemId!=null?(G.itemField=Q.fieldKey,G.itemId=Q.itemId):G.itemField=Q.fieldKey}window.parent.postMessage(G,"*")};return document.addEventListener("click",w,!0),()=>document.removeEventListener("click",w,!0)},[]),T.useEffect(()=>{if(!s)return;const w=setTimeout(()=>a(null),600);return()=>clearTimeout(w)},[s]),!e||!r)return p.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 d=(u=r.header)==null?void 0:u.data,f={main:(d==null?void 0:d.links)??[]},m=w=>{window.parent.postMessage({type:Ce.ACTIVE_SECTION_CHANGED,activeSectionId:w},"*")};return p.jsx($r,{mode:l?"visitor":"studio",children:p.jsx("div",{className:l?"":"jp-ice-active",children:p.jsx(no,{pageConfig:e,siteConfig:r,menuConfig:f,selectedId:l?null:o,scrollToSectionId:s,onActiveSectionChange:m})})})};function C0(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const kc=({open:e,onClose:t,sectionTypes:r,sectionTypeLabels:n,onSelect:o})=>{if(T.useEffect(()=>{if(!e)return;const s=a=>{a.key==="Escape"&&t()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t]),!e)return null;const i=s=>(n==null?void 0:n[s])??C0(s);return p.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:[p.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),p.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:[p.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:p.jsx(to,{size:18})}),p.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),p.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:p.jsx(Mt,{size:18})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?p.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):p.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(s=>p.jsx("li",{role:"option",children:p.jsxs("button",{type:"button",onClick:()=>{o(s),t()},className:pe("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:[p.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:s}),p.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(s)})]})},s))})}),p.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:p.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},Sc=()=>p.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:[p.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),p.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),p.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"})]}),E0='/*! 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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--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-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction: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-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-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-snug:1.375;--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);--color-primary-foreground:var(--primary-foreground);--color-destructive:var(--destructive);--color-ring:var(--ring)}}@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-2{left:calc(var(--spacing)*2)}.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)}.mx-1\\.5{margin-inline:calc(var(--spacing)*1.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.my-1{margin-block: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)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.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)}.ml-auto{margin-left:auto}.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-3\\.5{height:calc(var(--spacing)*3.5)}.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-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:calc(var(--spacing)*96)}.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\\.5{width:calc(var(--spacing)*3.5)}.w-3\\/4{width:75%}.w-5{width:calc(var(--spacing)*5)}.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-\\[var\\(--radix-popover-trigger-width\\)\\]{width:var(--radix-popover-trigger-width)}.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-\\[var\\(--inspector-width\\,280px\\)\\]{max-width:var(--inspector-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-\\[8rem\\]{min-width:8rem}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[var\\(--radix-popover-trigger-width\\)\\]{min-width:var(--radix-popover-trigger-width)}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.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)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-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}.touch-none{touch-action:none}.resize-none{resize: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-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}: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-\\[inherit\\]{border-radius:inherit}.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-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.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-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-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.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-emerald-500\\/60{border-color:#00bb7f99}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\\/60{border-color:color-mix(in oklab,var(--color-emerald-500)60%,transparent)}}.border-primary{border-color:var(--color-primary)}.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\\/60{border-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/60{border-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.border-l-transparent{border-left-color:#0000}.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{background-color:var(--color-black)}.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-destructive\\/15{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\\/15{background-color:color-mix(in oklab,var(--color-destructive)15%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary,.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-primary\\/\\[0\\.08\\]{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/\\[0\\.08\\]{background-color:color-mix(in oklab,var(--color-primary)8%,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-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\\/30{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/30{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.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))}.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)}.p-px{padding:1px}.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-10{padding-block:calc(var(--spacing)*10)}.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-4{padding-right:calc(var(--spacing)*4)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-8{padding-left:calc(var(--spacing)*8)}.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-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-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.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\\.04em\\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.06em\\]{--tw-tracking:.06em;letter-spacing:.06em}.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)}.whitespace-nowrap{white-space:nowrap}.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-destructive{color:var(--color-destructive)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.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)}.text-zinc-600\\/50{color:#52525c80}@supports (color:color-mix(in lab,red,red)){.text-zinc-600\\/50{color:color-mix(in oklab,var(--color-zinc-600)50%,transparent)}}.text-zinc-700{color:var(--color-zinc-700)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.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-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px 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-black\\/30{--tw-shadow-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.shadow-black\\/30{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)30%,transparent)var(--tw-shadow-alpha),transparent)}}.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)}}.shadow-primary\\/20{--tw-shadow-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.shadow-primary\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-primary)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-destructive\\/25:hover{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/25:hover{background-color:color-mix(in oklab,var(--color-destructive)25%,transparent)}}.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-primary\\/90:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary)90%,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-600:hover{background-color:var(--color-zinc-600)}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.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\\:bg-zinc-900:hover{background-color:var(--color-zinc-900)}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-destructive:hover{color:var(--color-destructive)}.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\\:bg-zinc-800:focus{background-color:var(--color-zinc-800)}.focus\\:text-white:focus{color:var(--color-white)}.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\\:border-zinc-600:focus-visible{border-color:var(--color-zinc-600)}.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-500\\/80:focus-visible{--tw-ring-color:#3080ffcc}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)80%,transparent)}}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.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\\:ring-offset-zinc-950:focus-visible{--tw-ring-offset-color:var(--color-zinc-950)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.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}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=open\\]\\:border-zinc-800[data-state=open]{border-color:var(--color-zinc-800)}.data-\\[state\\=open\\]\\:bg-zinc-950[data-state=open]{background-color:var(--color-zinc-950)}.data-\\[state\\=open\\]\\:text-zinc-100[data-state=open]{color:var(--color-zinc-100)}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\\[\\&\\>span\\]\\:flex>span{display:flex}.\\[\\&\\>span\\]\\:items-center>span{align-items:center}.\\[\\&\\>span\\]\\:gap-2>span{gap:calc(var(--spacing)*2)}}: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-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@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-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{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 A0 extends T.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[JsonPages Engine]",t,r)}render(){return this.state.hasError&&this.state.error?p.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:[p.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),p.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}}const _c=({pageRegistry:e,siteConfig:t,menuConfig:r,tenantCss:n,adminCss:o,NotFoundComponent:i})=>{const{slug:s="home"}=Ke.useParams(),[a,l]=T.useState(null);T.useEffect(()=>{const m=document.getElementById("jp-baked-state");if(m!=null&&m.textContent)try{const u=JSON.parse(m.textContent);l(u),Hn.setTheme(u.theme)}catch(u){console.error("Failed to parse baked state",u)}},[]);const c=a?a.page:e[s],d=a?a.site:t,f=a?a.menu:r;return c?p.jsx(Kr,{mode:"tenant",tenantCss:n,adminCss:o,children:p.jsx($r,{mode:"visitor",children:p.jsx(no,{pageConfig:c,siteConfig:d,menuConfig:f})})}):p.jsx(i,{})},Cc=({pageRegistry:e,siteConfig:t,menuConfig:r,themeConfig:n,tenantCss:o,adminCss:i,addSectionConfig:s,addableSectionTypes:a,saveToFile:l,exportHTML:c})=>{const{slug:d="home"}=Ke.useParams(),f=Ke.useNavigate(),m=Object.keys(e).sort((g,F)=>g==="home"?-1:F==="home"?1:g.localeCompare(F)),[u,w]=T.useState(null),[h,b]=T.useState(!1),[v,x]=T.useState(!1),[k,S]=T.useState(()=>{var g;try{const F=JSON.parse(JSON.stringify(t??{}));F.identity||(F.identity={title:"Site"}),F.pages||(F.pages=[]);const U=(g=F.header)==null?void 0:g.data;return U&&(r!=null&&r.main)&&(U.links=JSON.parse(JSON.stringify(r.main))),F}catch{return{identity:{title:"Site"},pages:[]}}}),[C,O]=T.useState(null),[N,P]=T.useState(null),[D,W]=T.useState(null),[G,z]=T.useState(null),[L,y]=T.useState(!1),[$,X]=T.useState(400),H=360,V=920,Y=T.useCallback(g=>{g.preventDefault();const F=g.currentTarget;F.setPointerCapture(g.pointerId);const U=g.clientX,E=$,A=q=>{const B=U-q.clientX,M=Math.min(V,Math.max(H,E+B));X(M)},R=()=>{F.releasePointerCapture(g.pointerId),F.removeEventListener("pointermove",A),F.removeEventListener("pointerup",R),F.removeEventListener("pointercancel",R),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",F.addEventListener("pointermove",A),F.addEventListener("pointerup",R),F.addEventListener("pointercancel",R)},[$]),Q=u?[...k.header?[{id:k.header.id,type:k.header.type,scope:"global",title:"Header"}]:[],...u.sections.map(g=>{var F,U;return{id:g.id,type:g.type,scope:"local",title:((F=g.data)==null?void 0:F.title)??((U=g.data)==null?void 0:U.titleHighlight)}}),...k.footer?[{id:k.footer.id,type:k.footer.type,scope:"global",title:"Footer"}]:[]]:[];T.useEffect(()=>{const g=e[d];g&&w(JSON.parse(JSON.stringify(g))),O(null),P(null),b(!1)},[d,e]);const j=T.useCallback(()=>{const g=e[d];g&&w(JSON.parse(JSON.stringify(g))),O(null),P(null),b(!1)},[d,e]),I=T.useCallback((g,F,U)=>{const E=[...U.sections],A=E.findIndex(B=>B.id===g);if(A===-1||F<0||F>=E.length)return;const[R]=E.splice(A,1),q=F>A?F-1:F;E.splice(Math.min(q,E.length),0,R),w({...U,sections:E}),b(!0)},[]),K=T.useCallback(g=>{var F;if(g.origin===window.location.origin){if(g.data.type===Ce.SECTION_SELECT){O(g.data.section);const U=g.data.itemPath;if(Array.isArray(U)&&U.length>0)P(U.map(E=>({fieldKey:E.fieldKey,...E.itemId!=null?{itemId:String(E.itemId)}:{}})));else{const E=g.data.itemField,A=g.data.itemId;P(typeof E=="string"?[{fieldKey:E,...A!=null?{itemId:String(A)}:{}}]:null)}}if(g.data.type===Ce.ACTIVE_SECTION_CHANGED&&W(g.data.activeSectionId??null),g.data.type==="jsonpages:section-reorder"&&u){const{sectionId:U,newIndex:E}=g.data;typeof U=="string"&&typeof E=="number"&&E>=0&&I(U,E,u)}if(g.data.type===Ce.SEND_CLEAN_HTML){if(!u)return;const U=(F=k.header)==null?void 0:F.data,E={page:u,site:k,menu:{main:(U==null?void 0:U.links)??[]},theme:n};c(E,d,g.data.html),b(!1)}}},[u,k,d,n,I,c]);T.useEffect(()=>(window.addEventListener("message",K),()=>window.removeEventListener("message",K)),[K]);const Z=T.useCallback(g=>{const F=Q.find(U=>U.id===g);F&&O({id:F.id,type:F.type,scope:F.scope}),P(null),z(g)},[Q]),te=T.useCallback(()=>{z(null)},[]),ue=T.useCallback(g=>{w(F=>F&&{...F,sections:F.sections.filter(U=>U.id!==g)}),b(!0),O(F=>(F==null?void 0:F.id)===g?null:F)},[]),ee=g=>{if(!(!C||!u))if(b(!0),C.scope==="global")C.type==="header"&&k.header!=null?S({...k,header:{...k.header,data:g}}):C.type==="footer"&&k.footer!=null&&S({...k,footer:{...k.footer,data:g}});else{const F=u.sections.map(U=>U.id===C.id?{...U,data:g}:U);w({...u,sections:F})}},ie=T.useCallback((g,F,U,E)=>{var A,R;if(b(!0),F==="global")((A=k.header)==null?void 0:A.id)===g?S({...k,header:{...k.header,data:E}}):((R=k.footer)==null?void 0:R.id)===g&&S({...k,footer:{...k.footer,data:E}});else if(u){const q=u.sections.map(B=>B.id===g?{...B,data:E}:B);w({...u,sections:q})}},[u,k]),se=()=>{var F;const g=document.querySelector("iframe");(F=g==null?void 0:g.contentWindow)==null||F.postMessage({type:Ce.REQUEST_CLEAN_HTML},"*")},oe=()=>{var U;if(!u||!l)return;const g=(U=k.header)==null?void 0:U.data,F={page:u,site:k,menu:{main:(g==null?void 0:g.links)??[]},theme:n};l(F,d).then(()=>{b(!1),x(!0)}).catch(E=>{console.error("[JsonPages] saveToFile failed",E);const A=E instanceof Error?E.message:String(E);alert(`Save to file failed: ${A}`)})},le=g=>{var E;if(!u)return;const F=((E=s==null?void 0:s.getDefaultSectionData)==null?void 0:E.call(s,g))??{},U={id:crypto.randomUUID(),type:g,data:F,settings:void 0};w({...u,sections:[...u.sections,U]}),b(!0),O({id:U.id,type:g,scope:"local"})};if(!u)return p.jsx("div",{children:"Loading Studio..."});const fe=(C==null?void 0:C.scope)==="global"?{sections:[k.header,k.footer].filter(g=>g!=null)}:u,we=[...k.header?[k.header]:[],...u.sections,...k.footer?[k.footer]:[]];return p.jsx(Kr,{mode:"admin",tenantCss:o,adminCss:i,children:p.jsx($r,{mode:"studio",children:p.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[p.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[p.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:p.jsx(xc,{draft:u,globalDraft:k,themeConfig:n,slug:d,selectedId:C==null?void 0:C.id,scrollToSectionId:G,onScrollRequested:te})}),p.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:$,minWidth:H,maxWidth:V},children:[p.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:Y}),p.jsx(wc,{selectedSection:C,pageData:fe,allSectionsData:we,onUpdate:ee,onUpdateSection:ie,onClose:()=>{O(null),P(null)},expandedItemPath:N,onReorderSection:u?(g,F)=>I(g,F,u):void 0,allLayers:Q,activeSectionId:D,onRequestScrollToSection:Z,onDeleteSection:u?ue:void 0,onAddSection:a.length>0?()=>y(!0):void 0,hasChanges:h,onExportHTML:se,onSaveToFile:l!=null?oe:void 0,saveSuccessFeedback:v,onResetToFile:j,pageSlugs:m,currentSlug:d,onPageChange:m.length>1?g=>f(`/admin/${g}`):void 0})]})]}),p.jsx(kc,{open:L,onClose:()=>y(!1),sectionTypes:a,sectionTypeLabels:s==null?void 0:s.sectionTypeLabels,onSelect:le})]})})})},N0=({tenantCss:e,adminCss:t})=>p.jsx(Kr,{mode:"tenant",tenantCss:e,adminCss:t,children:p.jsx(yc,{})});function z0({config:e}){var b,v,x;const{registry:t={},schemas:r={},pages:n={},siteConfig:o,themeConfig:i,menuConfig:s,themeCss:a,addSection:l,NotFoundComponent:c=Sc}=e,d=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(k=>k!=="header"&&k!=="footer"),f={exportJSON:((b=e.persistence)==null?void 0:b.exportJSON)??wi,exportHTML:((v=e.persistence)==null?void 0:v.exportHTML)??xi,saveToFile:(x=e.persistence)==null?void 0:x.saveToFile},m=typeof(a==null?void 0:a.tenant)=="string"?a.tenant:"",u=typeof(a==null?void 0:a.admin)=="string"?a.admin:E0,[w,h]=T.useState(!1);return T.useEffect(()=>{try{i!=null&&i.tokens&&Hn.setTheme(i)}catch(k){console.warn("[JsonPages] setTheme failed",k)}h(!0)},[i]),w?p.jsx(A0,{children:p.jsx($i,{config:{registry:t,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:p.jsx(Ke.BrowserRouter,{children:p.jsxs(Ke.Routes,{children:[p.jsx(Ke.Route,{path:"/",element:p.jsx(_c,{pageRegistry:n,siteConfig:o,menuConfig:s,tenantCss:m,adminCss:u,NotFoundComponent:c})}),p.jsx(Ke.Route,{path:"/:slug",element:p.jsx(_c,{pageRegistry:n,siteConfig:o,menuConfig:s,tenantCss:m,adminCss:u,NotFoundComponent:c})}),p.jsx(Ke.Route,{path:"/admin",element:p.jsx(Cc,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:i,tenantCss:m,adminCss:u,addSectionConfig:l,addableSectionTypes:d,saveToFile:f.saveToFile,exportHTML:f.exportHTML})}),p.jsx(Ke.Route,{path:"/admin/:slug",element:p.jsx(Cc,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:i,tenantCss:m,adminCss:u,addSectionConfig:l,addableSectionTypes:d,saveToFile:f.saveToFile,exportHTML:f.exportHTML})}),p.jsx(Ke.Route,{path:"/admin/preview/:slug",element:p.jsx(N0,{tenantCss:m,adminCss:u})}),p.jsx(Ke.Route,{path:"*",element:p.jsx(c,{})})]})})})}):p.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 j0=({hasChanges:e,onExportJSON:t,onExportHTML:r,onAddSection:n})=>p.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:[p.jsx("div",{className:"flex items-center gap-3",children:n!=null&&p.jsxs("button",{type:"button",onClick:n,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:[p.jsx(Ud,{size:14}),p.jsx("span",{children:"Add section"})]})}),p.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:p.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.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:[p.jsx(Ki,{size:14}),p.jsx("span",{children:"Bake HTML"})]}),p.jsxs("button",{onClick:t,disabled:!e,className:pe("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:[p.jsx(Od,{size:14}),p.jsx("span",{children:"Export JSON"})]})]})]});ye.AddSectionLibrary=kc,ye.AdminSidebar=wc,ye.ConfigProvider=$i,ye.ControlBar=j0,ye.DefaultNotFound=Sc,ye.FormFactory=Ar,ye.InputWidgets=Er,ye.JsonPagesEngine=z0,ye.PageRenderer=no,ye.PreviewEntry=yc,ye.STUDIO_EVENTS=Ce,ye.SectionRenderer=ur,ye.StudioProvider=$r,ye.StudioStage=xc,ye.ThemeLoader=Kr,ye.cn=pe,ye.exportBakedHTML=xi,ye.exportProjectJSON=wi,ye.resolveAssetUrl=Ol,ye.themeManager=Hn,ye.useConfig=dr,ye.useStudio=Vi,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})}));
|
|
252
|
+
`)},Im=0,Jt=[];function Dm(e){var t=E.useRef([]),r=E.useRef([0,0]),n=E.useRef(),o=E.useState(Im++)[0],i=E.useState(Ha)[0],s=E.useRef(e);E.useEffect(function(){s.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=rm([e.lockRef.current],(e.shards||[]).map(qa),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=E.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!s.current.allowPinchZoom;var g=jn(h),x=r.current,k="deltaX"in h?h.deltaX:x[0]-g[0],_="deltaY"in h?h.deltaY:x[1]-g[1],C,I=h.target,A=Math.abs(k)>Math.abs(_)?"h":"v";if("touches"in h&&A==="h"&&I.type==="range")return!1;var D=window.getSelection(),R=D&&D.anchorNode,F=R?R===I||R.contains(I):!1;if(F)return!1;var Y=Za(A,I);if(!Y)return!0;if(Y?C=A:(C=A==="v"?"h":"v",Y=Za(A,I)),!Y)return!1;if(!n.current&&"changedTouches"in h&&(k||_)&&(n.current=C),!C)return!0;var N=n.current||C;return Tm(N,b,h,N==="h"?k:_)},[]),l=E.useCallback(function(h){var b=h;if(!(!Jt.length||Jt[Jt.length-1]!==i)){var g="deltaY"in b?Xa(b):jn(b),x=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&Om(C.delta,g)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var k=(s.current.shards||[]).map(qa).filter(Boolean).filter(function(C){return C.contains(b.target)}),_=k.length>0?a(b,k[0]):!s.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),c=E.useCallback(function(h,b,g,x){var k={name:h,delta:b,target:g,should:x,shadowParent:Rm(g)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(_){return _!==k})},1)},[]),d=E.useCallback(function(h){r.current=jn(h),n.current=void 0},[]),u=E.useCallback(function(h){c(h.type,Xa(h),h.target,a(h,e.lockRef.current))},[]),m=E.useCallback(function(h){c(h.type,jn(h),h.target,a(h,e.lockRef.current))},[]);E.useEffect(function(){return Jt.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",l,qt),document.addEventListener("touchmove",l,qt),document.addEventListener("touchstart",d,qt),function(){Jt=Jt.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,qt),document.removeEventListener("touchmove",l,qt),document.removeEventListener("touchstart",d,qt)}},[]);var f=e.removeScrollBar,v=e.inert;return E.createElement(E.Fragment,null,v?E.createElement(i,{styles:Pm(o)}):null,f?E.createElement(Sm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Rm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Lm=um($a,Dm);var Ko=E.forwardRef(function(e,t){return E.createElement(An,ot({},e,{ref:t,sideCar:Lm}))});Ko.classNames=An.classNames;var Mm=[" ","Enter","ArrowUp","ArrowDown"],Fm=[" ","Enter"],Tt="Select",[Tn,On,Bm]=ih(Tt),[Qt]=Wt(Tt,[Bm,Gt]),Pn=Gt(),[Um,yt]=Qt(Tt),[Wm,$m]=Qt(Tt),Ja=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:u,disabled:m,required:f,form:v}=e,h=Pn(t),[b,g]=E.useState(null),[x,k]=E.useState(null),[_,C]=E.useState(!1),I=Ys(c),[A,D]=_n({prop:n,defaultProp:o??!1,onChange:i,caller:Tt}),[R,F]=_n({prop:s,defaultProp:a,onChange:l,caller:Tt}),Y=E.useRef(null),N=b?v||!!b.closest("form"):!0,[M,y]=E.useState(new Set),B=Array.from(M).map(te=>te.props.value).join(";");return p.jsx(Uo,{...h,children:p.jsxs(Um,{required:f,scope:t,trigger:b,onTriggerChange:g,valueNode:x,onValueNodeChange:k,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:_r(),value:R,onValueChange:F,open:A,onOpenChange:D,dir:I,triggerPointerDownPosRef:Y,disabled:m,children:[p.jsx(Tn.Provider,{scope:t,children:p.jsx(Wm,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(te=>{y(U=>new Set(U).add(te))},[]),onNativeOptionRemove:E.useCallback(te=>{y(U=>{const $=new Set(U);return $.delete(te),$})},[]),children:r})}),N?p.jsxs(vl,{"aria-hidden":!0,required:f,tabIndex:-1,name:d,autoComplete:u,value:R,onChange:te=>F(te.target.value),disabled:m,form:v,children:[R===void 0?p.jsx("option",{value:""}):null,Array.from(M)]},B):null]})})};Ja.displayName=Tt;var Qa="SelectTrigger",el=E.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Pn(r),s=yt(Qa,r),a=s.disabled||n,l=_e(t,s.onTriggerChange),c=On(r),d=E.useRef("touch"),[u,m,f]=xl(h=>{const b=c().filter(k=>!k.disabled),g=b.find(k=>k.value===s.value),x=yl(b,h,g);x!==void 0&&s.onValueChange(x.value)}),v=h=>{a||(s.onOpenChange(!0),f()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return p.jsx(yn,{asChild:!0,...i,children:p.jsx(ke.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":wl(s.value)?"":void 0,...o,ref:l,onClick:be(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&v(h)}),onPointerDown:be(o.onPointerDown,h=>{d.current=h.pointerType;const b=h.target;b.hasPointerCapture(h.pointerId)&&b.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(v(h),h.preventDefault())}),onKeyDown:be(o.onKeyDown,h=>{const b=u.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(b&&h.key===" ")&&Mm.includes(h.key)&&(v(),h.preventDefault())})})})});el.displayName=Qa;var tl="SelectValue",rl=E.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:s="",...a}=e,l=yt(tl,r),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,u=_e(t,l.onValueNodeChange);return De(()=>{c(d)},[c,d]),p.jsx(ke.span,{...a,ref:u,style:{pointerEvents:"none"},children:wl(l.value)?p.jsx(p.Fragment,{children:s}):i})});rl.displayName=tl;var Hm="SelectIcon",nl=E.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return p.jsx(ke.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});nl.displayName=Hm;var Vm="SelectPortal",ol=e=>p.jsx(kn,{asChild:!0,...e});ol.displayName=Vm;var Ot="SelectContent",il=E.forwardRef((e,t)=>{const r=yt(Ot,e.__scopeSelect),[n,o]=E.useState();if(De(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?Rr.createPortal(p.jsx(sl,{scope:e.__scopeSelect,children:p.jsx(Tn.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),i):null}return p.jsx(al,{...e,ref:t})});il.displayName=Ot;var Qe=10,[sl,kt]=Qt(Ot),Ym="SelectContentImpl",Zm=$t("SelectContent.RemoveScroll"),al=E.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:f,sticky:v,hideWhenDetached:h,avoidCollisions:b,...g}=e,x=yt(Ot,r),[k,_]=E.useState(null),[C,I]=E.useState(null),A=_e(t,re=>_(re)),[D,R]=E.useState(null),[F,Y]=E.useState(null),N=On(r),[M,y]=E.useState(!1),B=E.useRef(!1);E.useEffect(()=>{if(k)return Fa(k)},[k]),qs();const te=E.useCallback(re=>{const[ie,...ae]=N().map(fe=>fe.ref.current),[oe]=ae.slice(-1),le=document.activeElement;for(const fe of re)if(fe===le||(fe==null||fe.scrollIntoView({block:"nearest"}),fe===ie&&C&&(C.scrollTop=0),fe===oe&&C&&(C.scrollTop=C.scrollHeight),fe==null||fe.focus(),document.activeElement!==le))return},[N,C]),U=E.useCallback(()=>te([D,k]),[te,D,k]);E.useEffect(()=>{M&&U()},[M,U]);const{onOpenChange:$,triggerPointerDownPosRef:Z}=x;E.useEffect(()=>{if(k){let re={x:0,y:0};const ie=oe=>{var le,fe;re={x:Math.abs(Math.round(oe.pageX)-(((le=Z.current)==null?void 0:le.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((fe=Z.current)==null?void 0:fe.y)??0))}},ae=oe=>{re.x<=10&&re.y<=10?oe.preventDefault():k.contains(oe.target)||$(!1),document.removeEventListener("pointermove",ie),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",ae,{capture:!0})}}},[k,$,Z]),E.useEffect(()=>{const re=()=>$(!1);return window.addEventListener("blur",re),window.addEventListener("resize",re),()=>{window.removeEventListener("blur",re),window.removeEventListener("resize",re)}},[$]);const[ne,z]=xl(re=>{const ie=N().filter(le=>!le.disabled),ae=ie.find(le=>le.ref.current===document.activeElement),oe=yl(ie,re,ae);oe&&setTimeout(()=>oe.ref.current.focus())}),L=E.useCallback((re,ie,ae)=>{const oe=!B.current&&!ae;(x.value!==void 0&&x.value===ie||oe)&&(R(re),oe&&(B.current=!0))},[x.value]),K=E.useCallback(()=>k==null?void 0:k.focus(),[k]),q=E.useCallback((re,ie,ae)=>{const oe=!B.current&&!ae;(x.value!==void 0&&x.value===ie||oe)&&Y(re)},[x.value]),ee=n==="popper"?Xo:ll,ue=ee===Xo?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:f,sticky:v,hideWhenDetached:h,avoidCollisions:b}:{};return p.jsx(sl,{scope:r,content:k,viewport:C,onViewportChange:I,itemRefCallback:L,selectedItem:D,onItemLeave:K,itemTextRefCallback:q,focusSelectedItem:U,selectedItemText:F,position:n,isPositioned:M,searchRef:ne,children:p.jsx(Ko,{as:Zm,allowPinchZoom:!0,children:p.jsx(No,{asChild:!0,trapped:x.open,onMountAutoFocus:re=>{re.preventDefault()},onUnmountAutoFocus:be(o,re=>{var ie;(ie=x.trigger)==null||ie.focus({preventScroll:!0}),re.preventDefault()}),children:p.jsx(dn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:re=>re.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:p.jsx(ee,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:re=>re.preventDefault(),...g,...ue,onPlaced:()=>y(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:be(g.onKeyDown,re=>{const ie=re.ctrlKey||re.altKey||re.metaKey;if(re.key==="Tab"&&re.preventDefault(),!ie&&re.key.length===1&&z(re.key),["ArrowUp","ArrowDown","Home","End"].includes(re.key)){let oe=N().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(re.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(re.key)){const le=re.target,fe=oe.indexOf(le);oe=oe.slice(fe+1)}setTimeout(()=>te(oe)),re.preventDefault()}})})})})})})});al.displayName=Ym;var Gm="SelectItemAlignedPosition",ll=E.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=yt(Ot,r),s=kt(Ot,r),[a,l]=E.useState(null),[c,d]=E.useState(null),u=_e(t,A=>d(A)),m=On(r),f=E.useRef(!1),v=E.useRef(!0),{viewport:h,selectedItem:b,selectedItemText:g,focusSelectedItem:x}=s,k=E.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&h&&b&&g){const A=i.trigger.getBoundingClientRect(),D=c.getBoundingClientRect(),R=i.valueNode.getBoundingClientRect(),F=g.getBoundingClientRect();if(i.dir!=="rtl"){const le=F.left-D.left,fe=R.left-le,ve=A.left-fe,w=A.width+ve,X=Math.max(w,D.width),H=window.innerWidth-Qe,T=ko(fe,[Qe,Math.max(Qe,H-X)]);a.style.minWidth=w+"px",a.style.left=T+"px"}else{const le=D.right-F.right,fe=window.innerWidth-R.right-le,ve=window.innerWidth-A.right-fe,w=A.width+ve,X=Math.max(w,D.width),H=window.innerWidth-Qe,T=ko(fe,[Qe,Math.max(Qe,H-X)]);a.style.minWidth=w+"px",a.style.right=T+"px"}const Y=m(),N=window.innerHeight-Qe*2,M=h.scrollHeight,y=window.getComputedStyle(c),B=parseInt(y.borderTopWidth,10),te=parseInt(y.paddingTop,10),U=parseInt(y.borderBottomWidth,10),$=parseInt(y.paddingBottom,10),Z=B+te+M+$+U,ne=Math.min(b.offsetHeight*5,Z),z=window.getComputedStyle(h),L=parseInt(z.paddingTop,10),K=parseInt(z.paddingBottom,10),q=A.top+A.height/2-Qe,ee=N-q,ue=b.offsetHeight/2,re=b.offsetTop+ue,ie=B+te+re,ae=Z-ie;if(ie<=q){const le=Y.length>0&&b===Y[Y.length-1].ref.current;a.style.bottom="0px";const fe=c.clientHeight-h.offsetTop-h.offsetHeight,ve=Math.max(ee,ue+(le?K:0)+fe+U),w=ie+ve;a.style.height=w+"px"}else{const le=Y.length>0&&b===Y[0].ref.current;a.style.top="0px";const ve=Math.max(q,B+h.offsetTop+(le?L:0)+ue)+ae;a.style.height=ve+"px",h.scrollTop=ie-q+h.offsetTop}a.style.margin=`${Qe}px 0`,a.style.minHeight=ne+"px",a.style.maxHeight=N+"px",n==null||n(),requestAnimationFrame(()=>f.current=!0)}},[m,i.trigger,i.valueNode,a,c,h,b,g,i.dir,n]);De(()=>k(),[k]);const[_,C]=E.useState();De(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const I=E.useCallback(A=>{A&&v.current===!0&&(k(),x==null||x(),v.current=!1)},[k,x]);return p.jsx(Xm,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:f,onScrollButtonChange:I,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:p.jsx(ke.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ll.displayName=Gm;var Km="SelectPopperPosition",Xo=E.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Qe,...i}=e,s=Pn(r);return p.jsx(Wo,{...s,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Xo.displayName=Km;var[Xm,qo]=Qt(Ot,{}),Jo="SelectViewport",cl=E.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=kt(Jo,r),s=qo(Jo,r),a=_e(t,i.onViewportChange),l=E.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),p.jsx(Tn.Slot,{scope:r,children:p.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:be(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:m}=s;if(m!=null&&m.current&&u){const f=Math.abs(l.current-d.scrollTop);if(f>0){const v=window.innerHeight-Qe*2,h=parseFloat(u.style.minHeight),b=parseFloat(u.style.height),g=Math.max(h,b);if(g<v){const x=g+f,k=Math.min(v,x),_=x-k;u.style.height=k+"px",u.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,u.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});cl.displayName=Jo;var dl="SelectGroup",[qm,Jm]=Qt(dl),Qm=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=_r();return p.jsx(qm,{scope:r,id:o,children:p.jsx(ke.div,{role:"group","aria-labelledby":o,...n,ref:t})})});Qm.displayName=dl;var ul="SelectLabel",eg=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Jm(ul,r);return p.jsx(ke.div,{id:o.id,...n,ref:t})});eg.displayName=ul;var In="SelectItem",[tg,fl]=Qt(In),hl=E.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...s}=e,a=yt(In,r),l=kt(In,r),c=a.value===n,[d,u]=E.useState(i??""),[m,f]=E.useState(!1),v=_e(t,x=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,x,n,o)}),h=_r(),b=E.useRef("touch"),g=()=>{o||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(tg,{scope:r,value:n,disabled:o,textId:h,isSelected:c,onItemTextChange:E.useCallback(x=>{u(k=>k||((x==null?void 0:x.textContent)??"").trim())},[]),children:p.jsx(Tn.ItemSlot,{scope:r,value:n,disabled:o,textValue:d,children:p.jsx(ke.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:be(s.onFocus,()=>f(!0)),onBlur:be(s.onBlur,()=>f(!1)),onClick:be(s.onClick,()=>{b.current!=="mouse"&&g()}),onPointerUp:be(s.onPointerUp,()=>{b.current==="mouse"&&g()}),onPointerDown:be(s.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:be(s.onPointerMove,x=>{var k;b.current=x.pointerType,o?(k=l.onItemLeave)==null||k.call(l):b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(s.onPointerLeave,x=>{var k;x.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:be(s.onKeyDown,x=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&x.key===" "||(Fm.includes(x.key)&&g(),x.key===" "&&x.preventDefault())})})})})});hl.displayName=In;var Er="SelectItemText",pl=E.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,s=yt(Er,r),a=kt(Er,r),l=fl(Er,r),c=$m(Er,r),[d,u]=E.useState(null),m=_e(t,g=>u(g),l.onItemTextChange,g=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,g,l.value,l.disabled)}),f=d==null?void 0:d.textContent,v=E.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value),[l.disabled,l.value,f]),{onNativeOptionAdd:h,onNativeOptionRemove:b}=c;return De(()=>(h(v),()=>b(v)),[h,b,v]),p.jsxs(p.Fragment,{children:[p.jsx(ke.span,{id:l.textId,...i,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Rr.createPortal(i.children,s.valueNode):null]})});pl.displayName=Er;var ml="SelectItemIndicator",gl=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return fl(ml,r).isSelected?p.jsx(ke.span,{"aria-hidden":!0,...n,ref:t}):null});gl.displayName=ml;var Qo="SelectScrollUpButton",rg=E.forwardRef((e,t)=>{const r=kt(Qo,e.__scopeSelect),n=qo(Qo,e.__scopeSelect),[o,i]=E.useState(!1),s=_e(t,n.onScrollButtonChange);return De(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?p.jsx(bl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});rg.displayName=Qo;var ei="SelectScrollDownButton",ng=E.forwardRef((e,t)=>{const r=kt(ei,e.__scopeSelect),n=qo(ei,e.__scopeSelect),[o,i]=E.useState(!1),s=_e(t,n.onScrollButtonChange);return De(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;i(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?p.jsx(bl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});ng.displayName=ei;var bl=E.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=kt("SelectScrollButton",r),s=E.useRef(null),a=On(r),l=E.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return E.useEffect(()=>()=>l(),[l]),De(()=>{var d;const c=a().find(u=>u.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),p.jsx(ke.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:be(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:be(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:be(o.onPointerLeave,()=>{l()})})}),og="SelectSeparator",ig=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return p.jsx(ke.div,{"aria-hidden":!0,...n,ref:t})});ig.displayName=og;var ti="SelectArrow",sg=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Pn(r),i=yt(ti,r),s=kt(ti,r);return i.open&&s.position==="popper"?p.jsx($o,{...o,...n,ref:t}):null});sg.displayName=ti;var ag="SelectBubbleInput",vl=E.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=E.useRef(null),i=_e(n,o),s=Xp(t);return E.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&d){const u=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(u)}},[s,t]),p.jsx(ke.select,{...r,style:{...Ra,...r.style},ref:i,defaultValue:t})});vl.displayName=ag;function wl(e){return e===""||e===void 0}function xl(e){const t=Me(e),r=E.useRef(""),n=E.useRef(0),o=E.useCallback(s=>{const a=r.current+s;t(a),(function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(a)},[t]),i=E.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function yl(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let s=lg(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==r));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function lg(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var cg=Ja,kl=el,dg=rl,ug=nl,fg=ol,_l=il,hg=cl,Sl=hl,pg=pl,mg=gl;const gg=cg,bg=dg,Cl=E.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(kl,{ref:n,className:me("flex h-8 w-full items-center justify-between gap-2 rounded-md border border-zinc-800 bg-black px-3 py-1.5 text-left text-xs font-medium text-white outline-none","hover:bg-zinc-900 focus-visible:ring-2 focus-visible:ring-blue-500/80 focus-visible:ring-inset focus-visible:border-zinc-600","disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:flex [&>span]:items-center [&>span]:gap-2",e),style:{boxShadow:"none",WebkitBoxShadow:"none",MozBoxShadow:"none"},...r,children:[t,p.jsx(ug,{asChild:!0,children:p.jsx(Hr,{className:"h-3 w-3 shrink-0 text-zinc-400",strokeWidth:2})})]}));Cl.displayName=kl.displayName;const El=E.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>p.jsx(fg,{children:p.jsx(_l,{ref:o,className:me("relative z-[9999] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-zinc-800 bg-zinc-950 text-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:p.jsx(hg,{className:me("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));El.displayName=_l.displayName;const Nl=E.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(Sl,{ref:n,className:me("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-xs outline-none","focus:bg-zinc-800 focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(mg,{children:p.jsx(eo,{className:"h-3 w-3",strokeWidth:2})})}),p.jsx(pg,{children:t})]}));Nl.displayName=Sl.displayName;const Al=E.createContext(null);function zl(){const e=E.useContext(Al);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function jl({open:e,onOpenChange:t,children:r}){const[n,o]=E.useState(!1),i=e!==void 0,s=i?e:n,a=E.useCallback(c=>{i||o(c),t==null||t(c)},[i,t]),l=E.useMemo(()=>({open:s,onOpenChange:a}),[s,a]);return p.jsx(Al.Provider,{value:l,children:r})}function vg({asChild:e,children:t}){const{onOpenChange:r}=zl(),n=E.Children.only(t);return e&&E.isValidElement(n)?E.cloneElement(n,{onClick:o=>{var i,s;(s=(i=n.props).onClick)==null||s.call(i,o),r(!0)}}):p.jsx("button",{type:"button",onClick:()=>r(!0),children:t})}function Tl({className:e,children:t,preventCloseOnBackdropClick:r,...n}){const{open:o,onOpenChange:i}=zl();if(E.useEffect(()=>{const a=l=>{l.key==="Escape"&&i(!1)};return o&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[o,i]),!o)return null;const s=a=>{a.preventDefault(),a.stopPropagation()};return ht.createPortal(p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:s,onDrop:s}),p.jsx("div",{role:"dialog","aria-modal":!0,className:me("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:a=>a.stopPropagation(),...n,children:t})]}),document.body)}function Ol({className:e,...t}){return p.jsx("div",{className:me("flex flex-col gap-1.5 pb-4",e),...t})}function wg({className:e,...t}){return p.jsx("div",{className:me("flex justify-end gap-2 pt-4",e),...t})}function Pl({className:e,...t}){return p.jsx("h2",{className:me("text-sm font-semibold text-white",e),...t})}function Il({className:e,...t}){return p.jsx("p",{className:me("text-xs text-zinc-400",e),...t})}const Ue=E.forwardRef(({className:e,variant:t="default",size:r="default",asChild:n=!1,...o},i)=>{const s="inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0 cursor-pointer",a={default:"bg-primary text-primary-foreground shadow-lg shadow-primary/20 hover:bg-primary/90",outline:"border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",ghost:"text-zinc-500 hover:text-zinc-200 hover:bg-zinc-800",destructive:"bg-destructive/15 text-destructive hover:bg-destructive/25"},l={sm:"h-7 px-2.5 text-[11px]",default:"h-8 px-3 py-1.5 text-xs",lg:"h-9 px-5 text-sm",icon:"h-8 w-8","icon-sm":"h-7 w-7","icon-xs":"h-6 w-6"},c=n?Qf:"button";return p.jsx(c,{ref:i,type:"button",className:me(s,a[t],l[r],e),...o})});Ue.displayName="Button";const xg=["library","upload","url"];function yg({library:e,selectedId:t,onSelect:r}){const[n,o]=j.useState(""),[i,s]=j.useState("all"),a=["all",...new Set(e.flatMap(c=>c.tags??[]))],l=e.filter(c=>{const d=i==="all"||(c.tags??[]).includes(i),u=!n||(c.alt??"").toLowerCase().includes(n.toLowerCase());return d&&u});return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"relative",children:[p.jsx(Vd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),p.jsx(yo,{value:n,onChange:c=>o(c.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(c=>p.jsx("button",{type:"button",onClick:()=>s(c),className:me("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===c?"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:c==="all"?"Tutte":c},c))}),l.length>0?p.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(c=>{const d=t===c.id;return p.jsxs("button",{type:"button",onClick:()=>r(d?null:c.id),className:me("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",d?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[p.jsx("img",{src:c.url,alt:c.alt,loading:"lazy",className:me("w-full h-full object-cover transition-[filter] duration-150",d?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),p.jsx("div",{className:me("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",d&&"opacity-100"),children:p.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:c.alt})}),d&&p.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:p.jsx(eo,{size:14,className:"text-white"})})]},c.id)})}):p.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 kg({preview:e,onPreviewChange:t,onAssetUpload:r}){const[n,o]=j.useState(!1),i=j.useRef(null),s=j.useCallback(async d=>{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:d.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!d.type.startsWith("image/"))return;if(r){try{const m=await r(d);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:m==null?void 0:m.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),t({name:d.name,size:d.size,dataUrl:m})}catch{const m=new FileReader;m.onload=f=>{var v;t({name:d.name,size:d.size,dataUrl:(v=f.target)==null?void 0:v.result})},m.readAsDataURL(d)}return}const u=new FileReader;u.onload=m=>{var f;t({name:d.name,size:d.size,dataUrl:(f=m.target)==null?void 0:f.result})},u.readAsDataURL(d)},[t,r]),a=j.useCallback(d=>{var m,f;d.preventDefault(),d.stopPropagation(),o(!1);const u=(f=(m=d.dataTransfer)==null?void 0:m.files)==null?void 0:f[0];u&&s(u)},[s]),l=j.useCallback(d=>{d.preventDefault(),d.stopPropagation(),o(!0)},[]),c=j.useCallback(d=>{var m;const u=(m=d.target.files)==null?void 0:m[0];u&&s(u)},[s]);return p.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:d=>{d.preventDefault(),d.stopPropagation(),o(!1)},onDrop:a,onClick:()=>{var d;return!e&&((d=i.current)==null?void 0:d.click())},className:me("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",n?"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?p.jsxs(p.Fragment,{children:[p.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),p.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:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),p.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),p.jsx(Ue,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:d=>{d.stopPropagation(),t(null)},children:p.jsx(Yr,{size:14})})]})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:p.jsx(Qi,{size:22})}),p.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),p.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),p.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),p.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:c})]})}function _g({urlPreview:e,onUrlPreviewChange:t}){const[r,n]=j.useState(""),[o,i]=j.useState(!1),s=()=>{if(r.trim())try{new URL(r),t(r),i(!1)}catch{i(!0),t(null)}};return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx(zt,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(yo,{value:r,onChange:a=>{n(a.target.value),i(!1)},onKeyDown:a=>a.key==="Enter"&&s(),placeholder:"https://images.unsplash.com/photo-...",className:me("h-8 text-xs bg-zinc-900/50 border-zinc-800",o&&"border-red-500/50")}),p.jsx(Ue,{type:"button",variant:"outline",onClick:s,className:"shrink-0 h-8",children:"Anteprima"})]}),o&&p.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?p.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[p.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),t(null)}}),p.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[p.jsx(eo,{size:14,className:"text-emerald-400"}),p.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):o?null:p.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[p.jsx(Ji,{size:32,className:"mb-3 opacity-40"}),p.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const Sg=({open:e,onOpenChange:t,onSelect:r})=>{const{assets:n}=ur(),o=(n==null?void 0:n.assetsManifest)??[],[i,s]=j.useState("library"),[a,l]=j.useState(null),[c,d]=j.useState(null),[u,m]=j.useState(null);j.useEffect(()=>{e&&(s("library"),l(null),d(null),m(null))},[e]),j.useEffect(()=>{if(!e||i!=="upload")return;const g=()=>{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",g),()=>window.removeEventListener("beforeunload",g)},[e,i]),j.useEffect(()=>{if(!e||i!=="upload")return;const g=k=>{k.preventDefault()},x={capture:!0};return document.addEventListener("dragover",g,x),document.addEventListener("drop",g,x),window.addEventListener("dragover",g,x),window.addEventListener("drop",g,x),()=>{document.removeEventListener("dragover",g,x),document.removeEventListener("drop",g,x),window.removeEventListener("dragover",g,x),window.removeEventListener("drop",g,x)}},[e,i]);const f=i==="library"&&a!=null||i==="upload"&&c!=null||i==="url"&&u!=null,v=()=>{if(i==="library"&&a){const g=o.find(x=>x.id===a);g&&r({url:g.url,alt:g.alt})}else i==="upload"&&c?r({url:c.dataUrl,alt:c.name}):i==="url"&&u&&r({url:u,alt:""});setTimeout(()=>t(!1),0)},h=i==="library"&&a?"1 immagine selezionata":i==="upload"&&c?c.name:i==="url"&&u?"URL pronto":"Nessuna selezione",b=g=>{g.preventDefault(),g.stopPropagation()};return p.jsx(jl,{open:e,onOpenChange:t,children:p.jsxs(Tl,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[p.jsxs(Ol,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:p.jsx(Vr,{size:18})}),p.jsxs("div",{children:[p.jsx(Pl,{children:"Image Picker"}),p.jsx(Il,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),p.jsx("button",{type:"button",onClick:()=>t(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:p.jsx(Lt,{size:18})})]}),p.jsx("div",{className:"flex border-b border-zinc-800",children:xg.map(g=>p.jsxs("button",{type:"button",onClick:()=>s(g),className:me("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===g?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[g==="library"&&p.jsx(Vr,{size:14}),g==="upload"&&p.jsx(Qi,{size:14}),g==="url"&&p.jsx(Ji,{size:14}),g==="library"?"Libreria":g==="upload"?"Upload":"URL"]},g))}),p.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&p.jsx(yg,{library:o,selectedId:a,onSelect:l}),i==="upload"&&p.jsx(kg,{preview:c,onPreviewChange:d,onAssetUpload:n==null?void 0:n.onAssetUpload}),i==="url"&&p.jsx(_g,{urlPreview:u,onUrlPreviewChange:m})]}),p.jsxs(wg,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[p.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:h}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Ue,{type:"button",variant:"outline",size:"sm",onClick:()=>t(!1),children:"Annulla"}),p.jsx(Ue,{type:"button",size:"sm",disabled:!f,onClick:v,className:me(!f&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},Dl=(e,t="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 n=e.replace(/^\//,"");return`/assets/${t}/${n}`},Cg=({value:e,onChange:t,label:r="IMAGE",className:n})=>{const{tenantId:o="default"}=ur(),[i,s]=j.useState(!1),[a,l]=j.useState(!1),c=!!(e!=null&&e.url),d=e!=null&&e.url?Dl(e.url,o):"",u=f=>{t(f),s(!1)},m=f=>{f.stopPropagation(),t({url:"",alt:""})};return p.jsxs("div",{className:me("space-y-1.5",n),children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),c?p.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s(!0),onKeyDown:f=>f.key==="Enter"&&s(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:me("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",a&&"ring-blue-500/40"),children:[p.jsx("img",{src:d,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:f=>{f.target.style.display="none"}}),p.jsx("div",{className:me("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",a?"bg-black/50":"bg-black/0"),children:a&&p.jsxs(p.Fragment,{children:[p.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:[p.jsx($d,{size:13}),p.jsx("span",{children:"Cambia"})]}),p.jsx(Ue,{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:m,children:p.jsx(Yr,{size:13})})]})}),p.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)??""})]}):p.jsxs("button",{type:"button",onClick:()=>s(!0),className:me("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:[p.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:p.jsx(Vr,{size:18})}),p.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),p.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),p.jsx(Sg,{open:i,onOpenChange:s,onSelect:u})]})},Rl=[{name:"layers",Icon:ro},{name:"github",Icon:Ud},{name:"arrow-right",Icon:Id},{name:"box",Icon:Rd},{name:"terminal",Icon:Kd},{name:"chevron-right",Icon:Ld},{name:"menu",Icon:Wd},{name:"x",Icon:Lt},{name:"sparkles",Icon:Zd},{name:"zap",Icon:qd}],er={"ui:text":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsx(yo,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:textarea":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsx(Xf,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:select":({label:e,value:t,onChange:r,options:n=[]})=>p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsxs(gg,{value:t||"",onValueChange:r,children:[p.jsx(Cl,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:p.jsx(bg,{placeholder:"Select..."})}),p.jsx(El,{className:"dark",children:n.map(o=>p.jsx(Nl,{value:o,className:"text-[11px]",children:o},o))})]})]}),"ui:checkbox":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[p.jsx(qf,{id:e,checked:!!t,onCheckedChange:n=>r(n===!0)}),p.jsx(zt,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:t,onChange:r})=>{const n=t!=null&&typeof t=="object"&&"url"in t?{url:String(t.url??""),alt:String(t.alt??"")}:{url:typeof t=="string"?t:"",alt:""},o=i=>{r(i)};return p.jsx("div",{className:"mb-4",children:p.jsx(Cg,{label:e,value:n,onChange:o})})},"ui:icon-picker":({label:e,value:t,onChange:r})=>{const[n,o]=j.useState(!1),i=Rl.find(s=>s.name===(t||""));return p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsxs(jl,{open:n,onOpenChange:o,children:[p.jsx(vg,{asChild:!0,children:p.jsx(Ue,{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?p.jsxs(p.Fragment,{children:[p.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),p.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):p.jsxs(p.Fragment,{children:[p.jsx(Vr,{size:16,className:"text-zinc-500 shrink-0"}),p.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),p.jsxs(Tl,{className:"sm:max-w-[280px] p-4",children:[p.jsxs(Ol,{children:[p.jsx(Pl,{className:"text-sm",children:"Choose icon"}),p.jsx(Il,{className:"text-xs",children:"Click an icon to select it."})]}),p.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:Rl.map(({name:s,Icon:a})=>p.jsx("button",{type:"button",onClick:()=>{r(s),o(!1)},className:me("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",t===s?"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:s,children:p.jsx(a,{size:20})},s))})]})]})]})}},ri=e=>{if(e instanceof je.z.ZodOptional||e instanceof je.z.ZodDefault)return ri(e._def.innerType);if(e instanceof je.z.ZodObject){const t={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(t[r]=ri(e.shape[r]));return t}return e instanceof je.z.ZodArray?[]:e instanceof je.z.ZodString?"":e instanceof je.z.ZodNumber?0:e instanceof je.z.ZodBoolean?!1:e instanceof je.z.ZodEnum?e._def.values[0]:null},Dn=e=>e instanceof je.z.ZodOptional||e instanceof je.z.ZodDefault||e instanceof je.z.ZodNullable?Dn(e._def.innerType):e,Ll=e=>{var n;const t=e;if(typeof e.description=="string"&&e.description.length>0)return e.description;if(typeof((n=t._def)==null?void 0:n.description)=="string"&&t._def.description.length>0)return t._def.description;const r=Dn(e);return r!==e?Ll(r):null},Rn=(e,t)=>e&&!t?"opacity-10":"opacity-100",tr=(e,t)=>e!=null&&t.toLowerCase()===e.toLowerCase(),Nr=({schema:e,data:t,onChange:r,keys:n,expandedItemPath:o,onSidebarExpandedItemChange:i})=>{const s=e.shape,a=n!=null?Object.keys(s).filter(u=>n.includes(u)):Object.keys(s),l=o==null?void 0:o[0],c=(l==null?void 0:l.fieldKey)??null,d=c!=null;return p.jsx("div",{className:"space-y-4",children:a.map(u=>{const m=s[u];if(!m)return null;const f=Dn(m),v=Ll(m)||"ui:text",h=t[u];if(v==="ui:editorial-markdown")return null;if(v==="ui:image-picker"&&f instanceof je.z.ZodObject){const _=tr(c,u),C=er["ui:image-picker"]||er["ui:text"];return p.jsx("div",{className:`transition-opacity duration-200 ${Rn(d,_)}`,..._?{"data-jp-focused-field":u}:{},children:p.jsx(C,{label:u,value:h,onChange:I=>r({...t,[u]:I})})},u)}if(f instanceof je.z.ZodObject){const _=h||{},C=tr(c,u);return p.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 ${Rn(d,C)}`,...C?{"data-jp-focused-field":u}:{},children:[p.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[p.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),p.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:u})]}),p.jsx(Nr,{schema:f,data:_,onChange:I=>r({...t,[u]:I}),expandedItemPath:o&&tr(l==null?void 0:l.fieldKey,u)?o.slice(1):void 0})]},u)}if(f instanceof je.z.ZodArray){const _=Array.isArray(h)?h:[],C=Dn(f.element),I=(F,Y)=>{if(Y<0||Y>=_.length)return;const N=[..._],[M]=N.splice(F,1);N.splice(Y,0,M),r({...t,[u]:N})},A=tr(c,u),R=tr(l==null?void 0:l.fieldKey,u)?l==null?void 0:l.itemId:void 0;return p.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${Rn(d,A)}`,...A?{"data-jp-focused-field":u}:{},children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[u," (",_.length,")"]}),p.jsxs("button",{type:"button",onClick:()=>{const F=ri(C);r({...t,[u]:[..._,F]})},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:[p.jsx(no,{size:12})," Add Item"]})]}),p.jsx("div",{className:"space-y-2",children:_.map((F,Y)=>{const N=F,M=N.id||`legacy-${Y}`,y=(typeof N.title=="string"?N.title:null)||(typeof N.label=="string"?N.label:null)||(typeof N.name=="string"?N.name:null)||(typeof N.content=="string"?N.content:null)||(typeof N.text=="string"?N.text:null)||`${u} #${Y+1}`,B=R,te=String(N.id??M),U=B!=null&&String(B)===te,$=U&&o&&o.length>1?o.slice(1):void 0,Z=d&&A&&B!=null&&!U;return p.jsx(Eg,{itemId:te,openItemId:B!=null?String(B):void 0,isFaded:Z,index:Y,isFirst:Y===0,isLast:Y===_.length-1,label:y,onExpandedChange:i?ne=>i(ne?{fieldKey:u,itemId:te}:null):void 0,onRemove:()=>{const ne=_.filter((z,L)=>L!==Y);r({...t,[u]:ne})},onMoveUp:()=>I(Y,Y-1),onMoveDown:()=>I(Y,Y+1),children:C instanceof je.z.ZodObject?p.jsx(Nr,{schema:C,data:N||{},expandedItemPath:$,onChange:ne=>{const z=[..._];z[Y]=ne,r({...t,[u]:z})}}):p.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},M)})})]},u)}const b=v in er?v:"ui:text",g=er[b]||er["ui:text"],x=f instanceof je.z.ZodEnum?f._def.values:void 0,k=tr(c,u);return p.jsx("div",{className:`transition-opacity duration-200 ${Rn(d,k)}`,...k?{"data-jp-focused-field":u}:{},children:p.jsx(g,{label:u,value:h,options:x,onChange:_=>r({...t,[u]:_})})},u)})})},Eg=({itemId:e,openItemId:t,isFaded:r=!1,label:n,onExpandedChange:o,onRemove:i,onMoveUp:s,onMoveDown:a,isFirst:l,isLast:c,children:d})=>{const u=t!=null&&String(t)===String(e),[m,f]=j.useState(u);j.useEffect(()=>{u&&!m&&f(!0),!u&&m&&f(!1)},[u,m]);const v=()=>{const b=!m;f(b),o==null||o(b)},h=u&&m;return p.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...h?{"data-jp-expanded-item":e}:{},children:[p.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[p.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:p.jsxs("button",{type:"button",onClick:v,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[m?p.jsx(to,{size:12,className:"shrink-0"}):p.jsx(Hr,{size:12,className:"shrink-0"}),p.jsx("span",{className:"truncate",children:n})]})}),p.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[p.jsx("button",{type:"button",disabled:l,onClick:s,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:p.jsx(Dd,{size:12})}),p.jsx("button",{type:"button",disabled:c,onClick:a,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:p.jsx(Pd,{size:12})}),p.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),p.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:p.jsx(Yr,{size:12})})]})]}),m&&p.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:d})]})};function Ng(e,t){return E.useReducer((r,n)=>t[r][n]??r,e)}var ut=e=>{const{present:t,children:r}=e,n=Ag(t),o=typeof r=="function"?r({present:n.isPresent}):E.Children.only(r),i=_e(n.ref,zg(o));return typeof r=="function"||n.isPresent?E.cloneElement(o,{ref:i}):null};ut.displayName="Presence";function Ag(e){const[t,r]=E.useState(),n=E.useRef(null),o=E.useRef(e),i=E.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Ng(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=Ln(n.current);i.current=a==="mounted"?c:"none"},[a]),De(()=>{const c=n.current,d=o.current;if(d!==e){const m=i.current,f=Ln(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),De(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,u=f=>{const h=Ln(n.current).includes(CSS.escape(f.animationName));if(f.target===t&&h&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=f=>{f.target===t&&(i.current=Ln(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Ln(e){return(e==null?void 0:e.animationName)||"none"}function zg(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var[Mn]=Wt("Tooltip",[Gt]),Fn=Gt(),Ml="TooltipProvider",jg=700,ni="tooltip.open",[Tg,oi]=Mn(Ml),Fl=e=>{const{__scopeTooltip:t,delayDuration:r=jg,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,s=E.useRef(!0),a=E.useRef(!1),l=E.useRef(0);return E.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(Tg,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:E.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:E.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:E.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:i})};Fl.displayName=Ml;var Ar="Tooltip",[Og,zr]=Mn(Ar),Bl=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=oi(Ar,e.__scopeTooltip),c=Fn(t),[d,u]=E.useState(null),m=_r(),f=E.useRef(0),v=s??l.disableHoverableContent,h=a??l.delayDuration,b=E.useRef(!1),[g,x]=_n({prop:n,defaultProp:o??!1,onChange:A=>{A?(l.onOpen(),document.dispatchEvent(new CustomEvent(ni))):l.onClose(),i==null||i(A)},caller:Ar}),k=E.useMemo(()=>g?b.current?"delayed-open":"instant-open":"closed",[g]),_=E.useCallback(()=>{window.clearTimeout(f.current),f.current=0,b.current=!1,x(!0)},[x]),C=E.useCallback(()=>{window.clearTimeout(f.current),f.current=0,x(!1)},[x]),I=E.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{b.current=!0,x(!0),f.current=0},h)},[h,x]);return E.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),p.jsx(Uo,{...c,children:p.jsx(Og,{scope:t,contentId:m,open:g,stateAttribute:k,trigger:d,onTriggerChange:u,onTriggerEnter:E.useCallback(()=>{l.isOpenDelayedRef.current?I():_()},[l.isOpenDelayedRef,I,_]),onTriggerLeave:E.useCallback(()=>{v?C():(window.clearTimeout(f.current),f.current=0)},[C,v]),onOpen:_,onClose:C,disableHoverableContent:v,children:r})})};Bl.displayName=Ar;var ii="TooltipTrigger",Ul=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=zr(ii,r),i=oi(ii,r),s=Fn(r),a=E.useRef(null),l=_e(t,a,o.onTriggerChange),c=E.useRef(!1),d=E.useRef(!1),u=E.useCallback(()=>c.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),p.jsx(yn,{asChild:!0,...s,children:p.jsx(ke.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:be(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:be(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:be(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:be(e.onBlur,o.onClose),onClick:be(e.onClick,o.onClose)})})});Ul.displayName=ii;var si="TooltipPortal",[Pg,Ig]=Mn(si,{forceMount:void 0}),Wl=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=zr(si,t);return p.jsx(Pg,{scope:t,forceMount:r,children:p.jsx(ut,{present:r||i.open,children:p.jsx(kn,{asChild:!0,container:o,children:n})})})};Wl.displayName=si;var rr="TooltipContent",$l=E.forwardRef((e,t)=>{const r=Ig(rr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,s=zr(rr,e.__scopeTooltip);return p.jsx(ut,{present:n||s.open,children:s.disableHoverableContent?p.jsx(Hl,{side:o,...i,ref:t}):p.jsx(Dg,{side:o,...i,ref:t})})}),Dg=E.forwardRef((e,t)=>{const r=zr(rr,e.__scopeTooltip),n=oi(rr,e.__scopeTooltip),o=E.useRef(null),i=_e(t,o),[s,a]=E.useState(null),{trigger:l,onClose:c}=r,d=o.current,{onPointerInTransitChange:u}=n,m=E.useCallback(()=>{a(null),u(!1)},[u]),f=E.useCallback((v,h)=>{const b=v.currentTarget,g={x:v.clientX,y:v.clientY},x=Bg(g,b.getBoundingClientRect()),k=Ug(g,x),_=Wg(h.getBoundingClientRect()),C=Hg([...k,..._]);a(C),u(!0)},[u]);return E.useEffect(()=>()=>m(),[m]),E.useEffect(()=>{if(l&&d){const v=b=>f(b,d),h=b=>f(b,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",h)}}},[l,d,f,m]),E.useEffect(()=>{if(s){const v=h=>{const b=h.target,g={x:h.clientX,y:h.clientY},x=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),k=!$g(g,s);x?m():k&&(m(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,s,c,m]),p.jsx(Hl,{...e,ref:i})}),[Rg,Lg]=Mn(Ar,{isInside:!1}),Mg=th("TooltipContent"),Hl=E.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=zr(rr,r),c=Fn(r),{onClose:d}=l;return E.useEffect(()=>(document.addEventListener(ni,d),()=>document.removeEventListener(ni,d)),[d]),E.useEffect(()=>{if(l.trigger){const u=m=>{const f=m.target;f!=null&&f.contains(l.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,d]),p.jsx(dn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:p.jsxs(Wo,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Mg,{children:n}),p.jsx(Rg,{scope:r,isInside:!0,children:p.jsx(Jp,{id:l.contentId,role:"tooltip",children:o||n})})]})})});$l.displayName=rr;var Vl="TooltipArrow",Fg=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Fn(r);return Lg(Vl,r).isInside?null:p.jsx($o,{...o,...n,ref:t})});Fg.displayName=Vl;function Bg(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Ug(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Wg(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function $g(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],c=a.x,d=a.y,u=l.x,m=l.y;d>n!=m>n&&r<(u-c)*(n-d)/(m-d)+c&&(o=!o)}return o}function Hg(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Vg(t)}function Vg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Yg=Fl,Zg=Bl,Gg=Ul,Kg=Wl,Yl=$l;const Xg=Yg,jr=Zg,Tr=Gg,nr=E.forwardRef(({className:e,sideOffset:t=4,...r},n)=>p.jsx(Kg,{children:p.jsx(Yl,{ref:n,sideOffset:t,className:me("z-50 rounded-md bg-zinc-800 px-2.5 py-1.5 text-[11px] text-zinc-200 shadow-md","animate-in fade-in-0 zoom-in-95",e),...r})}));nr.displayName=Yl.displayName;var Bn="Popover",[Zl]=Wt(Bn,[Gt]),Or=Gt(),[qg,_t]=Zl(Bn),Gl=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=Or(t),l=E.useRef(null),[c,d]=E.useState(!1),[u,m]=_n({prop:n,defaultProp:o??!1,onChange:i,caller:Bn});return p.jsx(Uo,{...a,children:p.jsx(qg,{scope:t,contentId:_r(),triggerRef:l,open:u,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(f=>!f),[m]),hasCustomAnchor:c,onCustomAnchorAdd:E.useCallback(()=>d(!0),[]),onCustomAnchorRemove:E.useCallback(()=>d(!1),[]),modal:s,children:r})})};Gl.displayName=Bn;var Kl="PopoverAnchor",Jg=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_t(Kl,r),i=Or(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return E.useEffect(()=>(s(),()=>a()),[s,a]),p.jsx(yn,{...i,...n,ref:t})});Jg.displayName=Kl;var Xl="PopoverTrigger",ql=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_t(Xl,r),i=Or(r),s=_e(t,o.triggerRef),a=p.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":rc(o.open),...n,ref:s,onClick:be(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(yn,{asChild:!0,...i,children:a})});ql.displayName=Xl;var ai="PopoverPortal",[Qg,e0]=Zl(ai,{forceMount:void 0}),Jl=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=_t(ai,t);return p.jsx(Qg,{scope:t,forceMount:r,children:p.jsx(ut,{present:r||i.open,children:p.jsx(kn,{asChild:!0,container:o,children:n})})})};Jl.displayName=ai;var or="PopoverContent",Ql=E.forwardRef((e,t)=>{const r=e0(or,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=_t(or,e.__scopePopover);return p.jsx(ut,{present:n||i.open,children:i.modal?p.jsx(r0,{...o,ref:t}):p.jsx(n0,{...o,ref:t})})});Ql.displayName=or;var t0=$t("PopoverContent.RemoveScroll"),r0=E.forwardRef((e,t)=>{const r=_t(or,e.__scopePopover),n=E.useRef(null),o=_e(t,n),i=E.useRef(!1);return E.useEffect(()=>{const s=n.current;if(s)return Fa(s)},[]),p.jsx(Ko,{as:t0,allowPinchZoom:!0,children:p.jsx(ec,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:be(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),n0=E.forwardRef((e,t)=>{const r=_t(or,e.__scopePopover),n=E.useRef(!1),o=E.useRef(!1);return p.jsx(ec,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),ec=E.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...u}=e,m=_t(or,r),f=Or(r);return qs(),p.jsx(No,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(dn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>m.onOpenChange(!1),children:p.jsx(Wo,{"data-state":rc(m.open),role:"dialog",id:m.contentId,...f,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),tc="PopoverClose",o0=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_t(tc,r);return p.jsx(ke.button,{type:"button",...n,ref:t,onClick:be(e.onClick,()=>o.onOpenChange(!1))})});o0.displayName=tc;var i0="PopoverArrow",s0=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Or(r);return p.jsx($o,{...o,...n,ref:t})});s0.displayName=i0;function rc(e){return e?"open":"closed"}var a0=Gl,l0=ql,c0=Jl,nc=Ql;const d0=a0,u0=l0,oc=E.forwardRef(({className:e,align:t="start",sideOffset:r=6,...n},o)=>p.jsx(c0,{children:p.jsx(nc,{ref:o,align:t,sideOffset:r,className:me("z-50 w-[var(--radix-popover-trigger-width)] rounded-lg border border-zinc-700/80 bg-zinc-950 p-1 text-white shadow-xl shadow-black/30","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2",e),...n})}));oc.displayName=nc.displayName;const ic=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"Select page",f0=({pageSlugs:e,currentSlug:t,onPageChange:r,sectionCount:n,onNewPage:o,className:i,currentPageLabel:s})=>{const[a,l]=j.useState(!1),c=s??ic(t),d=u=>{r(u),l(!1)};return p.jsx("div",{className:me("mx-3 mt-2 mb-2",i),children:p.jsxs(d0,{open:a,onOpenChange:l,children:[p.jsx(u0,{asChild:!0,children:p.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-label":`Select page, current: ${c}`,className:me("flex items-center gap-2 w-full pl-3 pr-4 py-2 rounded-lg border text-left transition-all duration-150 cursor-pointer","bg-transparent border-zinc-800 text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800/50 hover:border-zinc-700","data-[state=open]:bg-zinc-950 data-[state=open]:border-zinc-800 data-[state=open]:text-zinc-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950"),children:[p.jsx(Bd,{size:14,className:"shrink-0 text-zinc-500","aria-hidden":!0}),p.jsx("span",{className:"text-xs font-medium flex-1 truncate",children:c}),p.jsx(Hr,{size:13,className:"shrink-0 text-zinc-500","aria-hidden":!0})]})}),p.jsxs(oc,{align:"start",sideOffset:4,className:"min-w-[var(--radix-popover-trigger-width)] bg-zinc-950 border-zinc-800 p-1",role:"listbox","aria-label":"Page list",children:[e.map(u=>{const m=u===t,f=ic(u);return p.jsxs("button",{type:"button",role:"option","aria-selected":m,onClick:()=>d(u),className:me("flex items-center justify-between w-full px-2.5 py-2 rounded-md text-xs transition-colors cursor-pointer",m?"bg-primary/10 text-primary font-semibold":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"),children:[p.jsx("span",{children:f}),n!=null&&p.jsxs("span",{className:"text-[10px] text-zinc-600 tabular-nums","aria-hidden":!0,children:[n,"s"]})]},u)}),o!=null&&p.jsx("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:p.jsxs("button",{type:"button",onClick:()=>{o(),l(!1)},className:"flex items-center gap-1.5 w-full px-2.5 py-2 rounded-md text-[11px] text-zinc-600 hover:text-zinc-300 hover:bg-zinc-800 transition-colors cursor-pointer","aria-label":"New page",children:[p.jsx(no,{size:12,"aria-hidden":!0}),p.jsx("span",{children:"New page"})]})})]})]})})};function h0(e,t){return E.useReducer((r,n)=>t[r][n]??r,e)}var li="ScrollArea",[sc]=Wt(li),[p0,Ye]=sc(li),ac=E.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,l]=E.useState(null),[c,d]=E.useState(null),[u,m]=E.useState(null),[f,v]=E.useState(null),[h,b]=E.useState(null),[g,x]=E.useState(0),[k,_]=E.useState(0),[C,I]=E.useState(!1),[A,D]=E.useState(!1),R=_e(t,Y=>l(Y)),F=Ys(o);return p.jsx(p0,{scope:r,type:n,dir:F,scrollHideDelay:i,scrollArea:a,viewport:c,onViewportChange:d,content:u,onContentChange:m,scrollbarX:f,onScrollbarXChange:v,scrollbarXEnabled:C,onScrollbarXEnabledChange:I,scrollbarY:h,onScrollbarYChange:b,scrollbarYEnabled:A,onScrollbarYEnabledChange:D,onCornerWidthChange:x,onCornerHeightChange:_,children:p.jsx(ke.div,{dir:F,...s,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});ac.displayName=li;var lc="ScrollAreaViewport",cc=E.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...i}=e,s=Ye(lc,r),a=E.useRef(null),l=_e(t,a,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(ke.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});cc.displayName=lc;var it="ScrollAreaScrollbar",dc=E.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ye(it,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return E.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?p.jsx(m0,{...n,ref:t,forceMount:r}):o.type==="scroll"?p.jsx(g0,{...n,ref:t,forceMount:r}):o.type==="auto"?p.jsx(uc,{...n,ref:t,forceMount:r}):o.type==="always"?p.jsx(ci,{...n,ref:t}):null});dc.displayName=it;var m0=E.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ye(it,e.__scopeScrollArea),[i,s]=E.useState(!1);return E.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},d=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(ut,{present:r||i,children:p.jsx(uc,{"data-state":i?"visible":"hidden",...n,ref:t})})}),g0=E.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ye(it,e.__scopeScrollArea),i=e.orientation==="horizontal",s=Hn(()=>l("SCROLL_END"),100),[a,l]=h0("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return E.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay,l]),E.useEffect(()=>{const c=o.viewport,d=i?"scrollLeft":"scrollTop";if(c){let u=c[d];const m=()=>{const f=c[d];u!==f&&(l("SCROLL"),s()),u=f};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[o.viewport,i,l,s]),p.jsx(ut,{present:r||a!=="hidden",children:p.jsx(ci,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:be(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:be(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),uc=E.forwardRef((e,t)=>{const r=Ye(it,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,s]=E.useState(!1),a=e.orientation==="horizontal",l=Hn(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;s(a?c:d)}},10);return ir(r.viewport,l),ir(r.content,l),p.jsx(ut,{present:n||i,children:p.jsx(ci,{"data-state":i?"visible":"hidden",...o,ref:t})})}),ci=E.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=Ye(it,e.__scopeScrollArea),i=E.useRef(null),s=E.useRef(0),[a,l]=E.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=gc(a.viewport,a.content),d={...n,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>i.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function u(m,f){return k0(m,s.current,a,f)}return r==="horizontal"?p.jsx(b0,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollLeft,f=bc(m,a,o.dir);i.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=u(m,o.dir))}}):r==="vertical"?p.jsx(v0,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollTop,f=bc(m,a);i.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=u(m))}}):null}),b0=E.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=Ye(it,e.__scopeScrollArea),[s,a]=E.useState(),l=E.useRef(null),c=_e(t,l,i.onScrollbarXChange);return E.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(hc,{"data-orientation":"horizontal",...o,ref:c,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":$n(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,u)=>{if(i.viewport){const m=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),wc(m,u)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Wn(s.paddingLeft),paddingEnd:Wn(s.paddingRight)}})}})}),v0=E.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=Ye(it,e.__scopeScrollArea),[s,a]=E.useState(),l=E.useRef(null),c=_e(t,l,i.onScrollbarYChange);return E.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(hc,{"data-orientation":"vertical",...o,ref:c,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":$n(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,u)=>{if(i.viewport){const m=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),wc(m,u)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Wn(s.paddingTop),paddingEnd:Wn(s.paddingBottom)}})}})}),[w0,fc]=sc(it),hc=E.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:u,...m}=e,f=Ye(it,r),[v,h]=E.useState(null),b=_e(t,R=>h(R)),g=E.useRef(null),x=E.useRef(""),k=f.viewport,_=n.content-n.viewport,C=Me(d),I=Me(l),A=Hn(u,10);function D(R){if(g.current){const F=R.clientX-g.current.left,Y=R.clientY-g.current.top;c({x:F,y:Y})}}return E.useEffect(()=>{const R=F=>{const Y=F.target;(v==null?void 0:v.contains(Y))&&C(F,_)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[k,v,_,C]),E.useEffect(I,[n,I]),ir(v,A),ir(f.content,A),p.jsx(w0,{scope:r,scrollbar:v,hasThumb:o,onThumbChange:Me(i),onThumbPointerUp:Me(s),onThumbPositionChange:I,onThumbPointerDown:Me(a),children:p.jsx(ke.div,{...m,ref:b,style:{position:"absolute",...m.style},onPointerDown:be(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),g.current=v.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),D(R))}),onPointerMove:be(e.onPointerMove,D),onPointerUp:be(e.onPointerUp,R=>{const F=R.target;F.hasPointerCapture(R.pointerId)&&F.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=x.current,f.viewport&&(f.viewport.style.scrollBehavior=""),g.current=null})})})}),Un="ScrollAreaThumb",pc=E.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=fc(Un,e.__scopeScrollArea);return p.jsx(ut,{present:r||o.hasThumb,children:p.jsx(x0,{ref:t,...n})})}),x0=E.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=Ye(Un,r),s=fc(Un,r),{onThumbPositionChange:a}=s,l=_e(t,u=>s.onThumbChange(u)),c=E.useRef(void 0),d=Hn(()=>{c.current&&(c.current(),c.current=void 0)},100);return E.useEffect(()=>{const u=i.viewport;if(u){const m=()=>{if(d(),!c.current){const f=_0(u,a);c.current=f,a()}};return a(),u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[i.viewport,d,a]),p.jsx(ke.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:be(e.onPointerDownCapture,u=>{const f=u.target.getBoundingClientRect(),v=u.clientX-f.left,h=u.clientY-f.top;s.onThumbPointerDown({x:v,y:h})}),onPointerUp:be(e.onPointerUp,s.onThumbPointerUp)})});pc.displayName=Un;var di="ScrollAreaCorner",mc=E.forwardRef((e,t)=>{const r=Ye(di,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.jsx(y0,{...e,ref:t}):null});mc.displayName=di;var y0=E.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=Ye(di,r),[i,s]=E.useState(0),[a,l]=E.useState(0),c=!!(i&&a);return ir(o.scrollbarX,()=>{var u;const d=((u=o.scrollbarX)==null?void 0:u.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),ir(o.scrollbarY,()=>{var u;const d=((u=o.scrollbarY)==null?void 0:u.offsetWidth)||0;o.onCornerWidthChange(d),s(d)}),c?p.jsx(ke.div,{...n,ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Wn(e){return e?parseInt(e,10):0}function gc(e,t){const r=e/t;return isNaN(r)?0:r}function $n(e){const t=gc(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function k0(e,t,r,n="ltr"){const o=$n(r),i=o/2,s=t||i,a=o-s,l=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,u=n==="ltr"?[0,d]:[d*-1,0];return vc([l,c],u)(e)}function bc(e,t,r="ltr"){const n=$n(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,s]:[s*-1,0],c=ko(e,l);return vc([0,s],[0,a])(c)}function vc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function wc(e,t){return e>0&&e<t}var _0=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=r.left!==i.left,a=r.top!==i.top;(s||a)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)};function Hn(e,t){const r=Me(e),n=E.useRef(0);return E.useEffect(()=>()=>window.clearTimeout(n.current),[]),E.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ir(e,t){const r=Me(t);De(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var xc=ac,S0=cc,C0=dc,E0=pc,N0=mc;const yc=E.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(xc,{ref:n,className:me("relative overflow-hidden",e),...r,children:[p.jsx(S0,{className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(C0,{orientation:"vertical",className:"flex touch-none select-none transition-colors h-full w-1.5 border-l border-l-transparent p-px",children:p.jsx(E0,{className:"relative flex-1 rounded-full bg-zinc-700 hover:bg-zinc-600"})}),p.jsx(N0,{})]}));yc.displayName=xc.displayName;const ui=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),kc=new Set(["ui:editorial-markdown"]),_c=e=>e instanceof je.z.ZodOptional||e instanceof je.z.ZodDefault||e instanceof je.z.ZodNullable?_c(e._def.innerType):e,fi=e=>{var i;if(!e)return"";const t=e,r=typeof e.description=="string"?e.description:null;if(r)return r;const n=typeof((i=t._def)==null?void 0:i.description)=="string"?t._def.description:null;if(n)return n;const o=_c(e);return o!==e?fi(o):""},A0={activationConstraint:{distance:8}},z0={activationConstraint:{delay:200,tolerance:5}};function hi({layer:e,opts:t,dragHandleProps:r}){const{isSelected:n,isActive:o,isDragging:i,canDelete:s,onSelect:a,onOpenSettings:l,onDelete:c}=t,d=!!r;return p.jsxs("div",{className:me("group flex items-center gap-2 pl-1 pr-2 py-2.5 rounded-lg text-left transition-all duration-200 cursor-pointer border-l-2",n?"bg-primary/[0.08] border-primary":o?"bg-zinc-800/30 border-emerald-500/60":"border-transparent hover:bg-zinc-800/40",i&&"opacity-50 shadow-lg",d?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[d?p.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-150 cursor-grab touch-none","aria-label":"Trascina per riordinare",...r,children:p.jsx(qi,{size:12,className:"text-zinc-600"})}):p.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 pointer-events-none",children:p.jsx(qi,{size:12,className:"text-zinc-600/50"})}),p.jsxs("button",{type:"button",onClick:a,className:"flex-1 min-w-0 text-left",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:me("text-xs font-bold uppercase tracking-[0.06em] truncate",n?"text-primary":"text-zinc-500"),children:e.type}),o&&p.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),p.jsx("span",{className:"text-[11px] text-zinc-600 block truncate leading-snug mt-0.5",children:e.title??`${e.type} section`})]}),p.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsx(Ue,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-zinc-300",onClick:u=>{u.stopPropagation(),l(u)},children:p.jsx(Yd,{size:12})})}),p.jsx(nr,{children:"Settings"})]}),s&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsx(Ue,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-destructive",onClick:u=>{u.stopPropagation(),c()},children:p.jsx(Yr,{size:12})})}),p.jsx(nr,{children:"Delete section"})]})]})]})}function j0({layer:e,opts:t}){const{attributes:r,listeners:n,setNodeRef:o,transform:i,transition:s,isDragging:a}=Vf({id:e.id,disabled:!t.canReorder}),l={transform:gt.Transform.toString(i),transition:s};return p.jsx("div",{ref:o,style:l,className:me(a&&"z-10"),children:p.jsx(hi,{layer:e,opts:{...t,isDragging:a},dragHandleProps:t.canReorder?{...r,...n,"aria-roledescription":"elemento trascinabile"}:void 0})})}const Sc=({selectedSection:e,pageData:t,allSectionsData:r=[],onUpdate:n,onUpdateSection:o,onClose:i,expandedItemPath:s=null,onReorderSection:a,allLayers:l=[],activeSectionId:c,onRequestScrollToSection:d,onDeleteSection:u,onAddSection:m,hasChanges:f=!1,onExportHTML:v,onSaveToFile:h,saveSuccessFeedback:b=!1,onResetToFile:g,showResetToFile:x=!1,pageSlugs:k=[],currentSlug:_="home",onPageChange:C})=>{const{schemas:I}=ur(),[A,D]=j.useState(!0),[R,F]=j.useState(null),[Y,N]=j.useState(null),[M,y]=j.useState(null),[B,te]=j.useState(null),U=j.useRef(null),$=j.useRef(null),Z=gu(lo(go,A0),lo(_s,z0),lo(po,{coordinateGetter:Gf})),ne=j.useDeferredValue(e),z=e!=null&&(ne==null?void 0:ne.id)!==e.id,L=s&&s.length>0?s:M?[M]:null,K=L!=null&&L.length?{fieldKey:L[L.length-1].fieldKey,itemId:L[L.length-1].itemId}:null,q=j.useRef(s);j.useEffect(()=>{q.current!=null&&s==null&&y(null),q.current=s},[s]),j.useEffect(()=>{(e==null?void 0:e.id)!=null&&D(!1)},[e==null?void 0:e.id]);const ee=()=>{const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const V=U.current;V&&V.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(O)},ue=j.useRef(A);j.useEffect(()=>{if(A&&!ue.current){const O=ee();return ue.current=A,O}ue.current=A},[A]),j.useEffect(()=>{if(!K)return;const O=U.current;if(!O)return;const V=requestAnimationFrame(()=>{const J=O.querySelector("[data-jp-expanded-item]")??O.querySelector("[data-jp-focused-field]");J&&J.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(V)},[K]);const re=O=>{D(!1),d==null||d(O)},ie=()=>{D(O=>{const V=!O;return V&&ee(),V})},ae=(O,V)=>{V.stopPropagation(),r.length>0&&o?te(O):(D(!1),d==null||d(O))};j.useEffect(()=>{if(B==null)return;const O=V=>{V.key==="Escape"&&te(null)};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[B]);const oe=O=>{R===O?(u==null||u(O),F(null)):(F(O),setTimeout(()=>F(null),3e3))},le=j.useMemo(()=>l.filter(O=>O.scope==="local").map(O=>O.id),[l]),fe=!!a&&le.length>0,ve=O=>{N(O.active.id)},w=O=>{N(null);const{active:V,over:J}=O;if(!J||V.id===J.id||!a)return;const Q=l.findIndex(he=>he.id===V.id),se=l.findIndex(he=>he.id===J.id);if(Q===-1||se===-1)return;const pe=Q<se?se:se-1;a(V.id,pe)},X=e?t.sections.find(O=>O.id===e.id):void 0,H=ne?t.sections.find(O=>O.id===ne.id):void 0,T=ne?I[ne.type]:void 0,S=j.useMemo(()=>{if(!T)return!1;const O=T.shape,V=Object.keys(O).filter(J=>!ui.has(J));return V.length===0?!1:V.every(J=>kc.has(fi(O[J])))},[T]);j.useEffect(()=>{(e==null?void 0:e.id)!=null&&S&&D(!0)},[e==null?void 0:e.id,S]);const P=l.length>0&&(A||!e),W=_?_.charAt(0).toUpperCase()+_.slice(1):"Select page",G=j.useMemo(()=>{const O=[];let V=null;for(const J of l){const Q=J.type.toUpperCase(),se=V!==null&&(V==="HEADER"&&Q!=="HEADER"||V!=="HEADER"&&V!=="FOOTER"&&Q==="FOOTER");O.push({layer:J,showSeparatorAbove:se}),V=Q}return O},[l]);return p.jsx(Xg,{children:p.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:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("h2",{className:"text-sm font-bold text-white",children:"Inspector"}),p.jsx("p",{className:"text-[10px] tracking-[0.06em] text-zinc-600 mt-0.5",children:e?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-primary font-bold",children:e.type}),p.jsx("span",{className:"text-zinc-700 mx-1.5",children:"|"}),p.jsx("span",{className:"uppercase",children:e.scope})]}):p.jsxs("span",{className:"text-zinc-600",children:[W," · ",l.length," sections"]})})]}),p.jsx(Ue,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"Close Inspector",children:p.jsx(Lt,{size:14})})]}),k.length>0&&C&&p.jsx(f0,{pageSlugs:k,currentSlug:_,onPageChange:C,sectionCount:l.length,currentPageLabel:W}),l.length>0&&p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-t border-zinc-800/50",children:[p.jsxs("button",{type:"button",onClick:ie,className:"flex items-center gap-2 flex-1 cursor-pointer min-w-0 text-left","aria-expanded":P,"aria-label":P?"Collapse Page Layers":"Expand Page Layers",children:[p.jsx(ro,{size:14,className:"text-zinc-500 shrink-0"}),p.jsx("span",{className:"text-[11px] font-semibold tracking-[0.04em] text-zinc-400",children:"Page Layers"}),p.jsxs("span",{className:"text-[10px] text-zinc-600",children:["(",l.length,")"]}),p.jsx(to,{size:13,className:me("ml-auto text-zinc-600 transition-transform duration-200 shrink-0",!A&&"rotate-180")})]}),m!=null&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsx(Ue,{variant:"ghost",size:"icon-sm",className:"text-zinc-500 hover:text-primary",onClick:m,children:p.jsx(no,{size:14})})}),p.jsx(nr,{children:"Add section"})]})]}),p.jsxs(yc,{className:"flex-1 min-h-0 flex flex-col",children:[p.jsx("div",{ref:U,className:"flex flex-col min-h-0",children:P&&p.jsxs("div",{className:"py-1",children:[p.jsxs(pf,{sensors:Z,collisionDetection:wu,modifiers:[Of],onDragStart:ve,onDragEnd:w,accessibility:{announcements:{onDragStart:()=>"Sezione presa in carico. Usa i tasti freccia per spostare, Spazio per rilasciare.",onDragOver:({over:O})=>O?`Posizione ${le.indexOf(String(O.id))+1} di ${le.length}.`:void 0,onDragEnd:({over:O})=>O?"Sezione rilasciata in nuova posizione.":"Riposizionamento annullato.",onDragCancel:()=>"Riposizionamento annullato."}},children:[p.jsx(Mf,{items:le,strategy:Rf,children:p.jsx("div",{className:"px-2 space-y-0.5",children:G.map(({layer:O,showSeparatorAbove:V})=>p.jsxs(j.Fragment,{children:[V&&p.jsx("div",{className:"mx-3 border-t border-zinc-800/60 my-1"}),O.scope==="local"&&fe?p.jsx(j0,{layer:O,opts:{isSelected:(e==null?void 0:e.id)===O.id,isActive:c===O.id,isDragging:!1,canReorder:!0,canDelete:!!u,deleteConfirm:R===O.id,onSelect:()=>re(O.id),onDelete:()=>oe(O.id),onOpenSettings:J=>ae(O.id,J)}}):p.jsx("div",{children:p.jsx(hi,{layer:O,opts:{isSelected:(e==null?void 0:e.id)===O.id,isActive:c===O.id,isDragging:!1,canDelete:O.scope==="local"&&!!u,deleteConfirm:R===O.id,onSelect:()=>re(O.id),onDelete:()=>oe(O.id),onOpenSettings:J=>ae(O.id,J)}})})]},O.id))})}),p.jsx(Tf,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:Y?(()=>{const O=l.find(V=>V.id===Y);return O?p.jsx("div",{className:"px-2 w-full max-w-[var(--inspector-width,280px)]",children:p.jsx(hi,{layer:O,opts:{isSelected:!1,isActive:!1,isDragging:!0,canDelete:!1,deleteConfirm:!1,onSelect:()=>{},onDelete:()=>{},onOpenSettings:()=>{}},dragHandleProps:{"aria-hidden":!0}})}):null})():null})]}),R&&p.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 mx-2 rounded-md bg-amber-500/10 border border-amber-500/30",children:[p.jsx(Md,{size:12,className:"text-amber-500 shrink-0"}),p.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]})}),K&&X&&(()=>{const O=X.data||{};let V;if(L&&L.length>0){let J=O;for(const pe of L){const he=J==null?void 0:J[pe.fieldKey];pe.itemId!=null&&Array.isArray(he)?J=he.find(Se=>String(Se==null?void 0:Se.id)===String(pe.itemId))??null:J=he}const Q=J||{},se=K.fieldKey;V=(typeof Q.name=="string"?Q.name:null)??(typeof Q.title=="string"?Q.title:null)??(typeof Q.label=="string"?Q.label:null)??se.charAt(0).toUpperCase()+se.slice(1).replace(/([A-Z])/g," $1").trim()}else{const J=K.fieldKey;if(K.itemId!=null){const pe=(Array.isArray(O[J])?O[J]:[]).find(he=>String(he==null?void 0:he.id)===String(K.itemId))||{};V=(typeof pe.name=="string"?pe.name:null)??(typeof pe.title=="string"?pe.title:null)??(typeof pe.label=="string"?pe.label:null)??J}else V=J.charAt(0).toUpperCase()+J.slice(1).replace(/([A-Z])/g," $1").trim()}return p.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[p.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),p.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:V})]})})(),p.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&D(!1),children:e?z?p.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[p.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):T?(()=>{const V=Object.keys(T.shape).filter(Q=>!ui.has(Q)&&!kc.has(fi(T.shape[Q]))),J=(H==null?void 0:H.data)||{};return V.length===0?p.jsx("p",{className:"text-xs text-zinc-500",children:"Inline editorial section: edit content directly on the canvas."}):p.jsx(Nr,{schema:T,data:J,onChange:Q=>n(Q),keys:V,expandedItemPath:L,onSidebarExpandedItemChange:y})})():p.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 ",(ne==null?void 0:ne.type)??e.type]}):p.jsx("p",{className:"text-xs text-zinc-600 text-center py-10",children:"Select a layer above or on the stage to edit."})})]}),p.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 shrink-0",children:(v!=null||h!=null||g!=null)&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:me("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",f?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),p.jsx("span",{className:me("text-xs font-medium transition-colors duration-300 shrink-0",b?"text-emerald-400":f?"text-amber-500":"text-zinc-500"),children:b?"Salvato":f?"Unsaved Changes":"All Changes Saved"}),v!=null&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsxs(Ue,{variant:"outline",size:"sm",className:"gap-1.5",onClick:v,children:[p.jsx(Xi,{size:12}),p.jsx("span",{children:"Bake HTML"})]})}),p.jsx(nr,{children:"Generate static HTML output"})]}),h!=null&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsxs(Ue,{size:"sm",disabled:!f,className:"gap-1.5",onClick:O=>{O.preventDefault(),O.stopPropagation(),h()},children:[p.jsx(Hd,{size:12}),p.jsx("span",{children:"Save"})]})}),p.jsx(nr,{children:"Save (export JSON)"})]}),g!=null&&x&&p.jsx("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-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:p.jsx("span",{children:"Ripristina da file"})})]})}),B!=null&&r.length>0&&o!=null&&(()=>{const O=r.find(Se=>Se.id===B),V=l.find(Se=>Se.id===B);if(!O)return null;const J=(V==null?void 0:V.scope)==="global"?"global":"local",Q=O.type,se=I[Q],he=(se?Object.keys(se.shape):[]).filter(Se=>ui.has(Se)),Ae=O.data??{};return he.length===0?p.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:()=>te(null),children:p.jsxs("div",{ref:$,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:Se=>Se.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[p.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",Q]}),p.jsx("button",{type:"button",onClick:()=>te(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:p.jsx(Lt,{size:18})})]}),p.jsx("div",{className:"p-4",children:p.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):p.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:Se=>Se.target===Se.currentTarget&&te(null),children:p.jsxs("div",{ref:$,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:Se=>Se.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[p.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",Q]}),p.jsx("button",{type:"button",onClick:()=>te(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:p.jsx(Lt,{size:18})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:p.jsx(Nr,{schema:se,data:Ae,onChange:Se=>{const ze={...O.data,...Se};o(B,J,Q,ze)},keys:he})})]})})})()]})})},Cc=({draft:e,globalDraft:t,themeConfig:r,slug:n,selectedId:o,scrollToSectionId:i,onScrollRequested:s})=>{const a=j.useRef(null),l=j.useCallback(()=>{var c;(c=a.current)!=null&&c.contentWindow&&a.current.contentWindow.postMessage({type:Ce.UPDATE_DRAFTS,draft:e,globalDraft:t,themeConfig:r},"*")},[e,t,r]);return j.useEffect(()=>{l()},[l]),j.useEffect(()=>{const c=d=>{d.data.type===Ce.STAGE_READY&&l()};return window.addEventListener("message",c),()=>window.removeEventListener("message",c)},[l]),j.useEffect(()=>{var c;(c=a.current)!=null&&c.contentWindow&&a.current.contentWindow.postMessage({type:Ce.SYNC_SELECTION,selectedId:o},"*")},[o]),j.useEffect(()=>{var c;!i||!((c=a.current)!=null&&c.contentWindow)||(a.current.contentWindow.postMessage({type:Ce.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),s==null||s())},[i,s]),p.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:p.jsx("iframe",{ref:a,src:`/admin/preview/${n}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},Vn={setTheme:e=>{const t=document.documentElement,{tokens:r}=e,n={"--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(n).forEach(([o,i])=>{t.style.setProperty(o,i)})}},T0='[data-jp-ignore-select="true"],[data-jp-interactive="true"],.ProseMirror,[contenteditable="true"],button,input,textarea,select,[role="button"],[role="menuitem"]',Ec=()=>{var f;const[e,t]=j.useState(null),[r,n]=j.useState(null),[o,i]=j.useState(null),[s,a]=j.useState(null),[l,c]=j.useState(!1);if(j.useEffect(()=>{const v=h=>{if(!(h.origin!==window.location.origin||h.source!==window.parent)){if(h.data.type===Ce.UPDATE_DRAFTS&&(t(h.data.draft),n(h.data.globalDraft),h.data.themeConfig&&Vn.setTheme(h.data.themeConfig)),h.data.type===Ce.SYNC_SELECTION&&i(h.data.selectedId),h.data.type===Ce.REQUEST_SCROLL_TO_SECTION&&a(h.data.sectionId??null),h.data.type===Ce.REQUEST_INLINE_FLUSH){const b=typeof h.data.requestId=="string"?h.data.requestId:null;window.dispatchEvent(new CustomEvent(Ce.REQUEST_INLINE_FLUSH,{detail:{requestId:b}})),setTimeout(()=>{window.parent.postMessage({type:Ce.INLINE_FLUSHED,requestId:b},window.location.origin)},0)}h.data.type===Ce.REQUEST_CLEAN_HTML&&(c(!0),setTimeout(()=>{const b=document.documentElement.outerHTML;window.parent.postMessage({type:Ce.SEND_CLEAN_HTML,html:b},"*"),c(!1)},50))}};return window.addEventListener("message",v),window.parent.postMessage({type:Ce.STAGE_READY},"*"),()=>window.removeEventListener("message",v)},[]),j.useEffect(()=>{const v=b=>!!(b.closest(T0)||b.closest("a[href]")),h=b=>{var M,y,B,te,U,$,Z,ne;const g=b.target;if(v(g)){g.closest("a[href]")&&b.preventDefault();return}const x=b.clientX,k=b.clientY;let _=null,C=g;for(;C&&C!==document.body;){const z=(M=C.getAttribute)==null?void 0:M.call(C,"data-section-id"),L=(y=C.getAttribute)==null?void 0:y.call(C,"data-section-type"),K=(B=C.getAttribute)==null?void 0:B.call(C,"data-section-scope");if(z&&L&&K){_=C;break}C=C.parentElement}if(!_)return;b.preventDefault(),b.stopPropagation();const I=_.getAttribute("data-section-id"),A=_.getAttribute("data-section-type"),D=_.getAttribute("data-section-scope");if(!I||!A||!D)return;const R={id:I,type:A,scope:D};if(g===_){window.parent.postMessage({type:Ce.SECTION_SELECT,section:R},"*");return}const F=document.elementFromPoint(x,k)??g;if(!F||!_.contains(F)){window.parent.postMessage({type:Ce.SECTION_SELECT,section:R},"*");return}if(F===_){window.parent.postMessage({type:Ce.SECTION_SELECT,section:R},"*");return}const Y=[];for(C=F;C&&C!==_;){const z=(te=C.getAttribute)==null?void 0:te.call(C,"data-jp-item-id"),L=(U=C.getAttribute)==null?void 0:U.call(C,"data-jp-item-field");z&&L&&Y.push({fieldKey:L||"items",itemId:z}),C=C.parentElement}if(Y.reverse(),Y.length===0)for(C=F;C&&C!==_;){const z=($=C.getAttribute)==null?void 0:$.call(C,"data-jp-field");if(z){Y.push({fieldKey:z});break}C=C.parentElement}if(Y.length===0&&F){let z=null;const L=K=>{var ee,ue;const q=K.getBoundingClientRect();if(q.left<=x&&x<=q.right&&q.top<=k&&k<=q.bottom){for(let re=0;re<K.children.length;re++)L(K.children[re]);((ee=K.getAttribute)!=null&&ee.call(K,"data-jp-item-id")||(ue=K.getAttribute)!=null&&ue.call(K,"data-jp-field"))&&(z=K)}};if(L(F),z){const K=z,q=(Z=K.getAttribute)==null?void 0:Z.call(K,"data-jp-item-id"),ee=(ne=K.getAttribute)==null?void 0:ne.call(K,"data-jp-field");q&&ee?Y.push({fieldKey:ee||"items",itemId:q}):ee&&Y.push({fieldKey:ee})}}const N={type:Ce.SECTION_SELECT,section:R};Y.length>0&&(N.itemPath=Y),window.parent.postMessage(N,"*")};return document.addEventListener("click",h,!0),()=>document.removeEventListener("click",h,!0)},[]),j.useEffect(()=>{if(!s)return;const v=setTimeout(()=>a(null),600);return()=>clearTimeout(v)},[s]),!e||!r)return p.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 d=(f=r.header)==null?void 0:f.data,u={main:(d==null?void 0:d.links)??[]},m=v=>{window.parent.postMessage({type:Ce.ACTIVE_SECTION_CHANGED,activeSectionId:v},"*")};return p.jsx($r,{mode:l?"visitor":"studio",children:p.jsx("div",{className:l?"":"jp-ice-active",children:p.jsx(oo,{pageConfig:e,siteConfig:r,menuConfig:u,selectedId:l?null:o,scrollToSectionId:s,onActiveSectionChange:m})})})};function O0(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const Nc=({open:e,onClose:t,sectionTypes:r,sectionTypeLabels:n,onSelect:o})=>{if(j.useEffect(()=>{if(!e)return;const s=a=>{a.key==="Escape"&&t()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t]),!e)return null;const i=s=>(n==null?void 0:n[s])??O0(s);return p.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:[p.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),p.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:[p.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:p.jsx(ro,{size:18})}),p.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),p.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:p.jsx(Lt,{size:18})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?p.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):p.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(s=>p.jsx("li",{role:"option",children:p.jsxs("button",{type:"button",onClick:()=>{o(s),t()},className:me("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:[p.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:s}),p.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(s)})]})},s))})}),p.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:p.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},Ac=()=>p.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:[p.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),p.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),p.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"})]}),P0='/*! 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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--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-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction: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-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-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-snug:1.375;--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);--color-primary-foreground:var(--primary-foreground);--color-destructive:var(--destructive);--color-ring:var(--ring)}}@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-2{left:calc(var(--spacing)*2)}.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)}.mx-1\\.5{margin-inline:calc(var(--spacing)*1.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.my-1{margin-block: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)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.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)}.ml-auto{margin-left:auto}.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-3\\.5{height:calc(var(--spacing)*3.5)}.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-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:calc(var(--spacing)*96)}.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\\.5{width:calc(var(--spacing)*3.5)}.w-3\\/4{width:75%}.w-5{width:calc(var(--spacing)*5)}.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-\\[var\\(--radix-popover-trigger-width\\)\\]{width:var(--radix-popover-trigger-width)}.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-\\[var\\(--inspector-width\\,280px\\)\\]{max-width:var(--inspector-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-\\[8rem\\]{min-width:8rem}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[var\\(--radix-popover-trigger-width\\)\\]{min-width:var(--radix-popover-trigger-width)}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.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)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-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}.touch-none{touch-action:none}.resize-none{resize: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-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}: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-\\[inherit\\]{border-radius:inherit}.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-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.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-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-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.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-emerald-500\\/60{border-color:#00bb7f99}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\\/60{border-color:color-mix(in oklab,var(--color-emerald-500)60%,transparent)}}.border-primary{border-color:var(--color-primary)}.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\\/60{border-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/60{border-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.border-l-transparent{border-left-color:#0000}.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{background-color:var(--color-black)}.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-destructive\\/15{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\\/15{background-color:color-mix(in oklab,var(--color-destructive)15%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary,.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-primary\\/\\[0\\.08\\]{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/\\[0\\.08\\]{background-color:color-mix(in oklab,var(--color-primary)8%,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-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\\/30{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/30{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.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))}.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)}.p-px{padding:1px}.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-10{padding-block:calc(var(--spacing)*10)}.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-4{padding-right:calc(var(--spacing)*4)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-8{padding-left:calc(var(--spacing)*8)}.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-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-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.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\\.04em\\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.06em\\]{--tw-tracking:.06em;letter-spacing:.06em}.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)}.whitespace-nowrap{white-space:nowrap}.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-destructive{color:var(--color-destructive)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.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)}.text-zinc-600\\/50{color:#52525c80}@supports (color:color-mix(in lab,red,red)){.text-zinc-600\\/50{color:color-mix(in oklab,var(--color-zinc-600)50%,transparent)}}.text-zinc-700{color:var(--color-zinc-700)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.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-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px 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-black\\/30{--tw-shadow-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.shadow-black\\/30{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)30%,transparent)var(--tw-shadow-alpha),transparent)}}.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)}}.shadow-primary\\/20{--tw-shadow-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.shadow-primary\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-primary)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-destructive\\/25:hover{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/25:hover{background-color:color-mix(in oklab,var(--color-destructive)25%,transparent)}}.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-primary\\/90:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary)90%,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-600:hover{background-color:var(--color-zinc-600)}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.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\\:bg-zinc-900:hover{background-color:var(--color-zinc-900)}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-destructive:hover{color:var(--color-destructive)}.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\\:bg-zinc-800:focus{background-color:var(--color-zinc-800)}.focus\\:text-white:focus{color:var(--color-white)}.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\\:border-zinc-600:focus-visible{border-color:var(--color-zinc-600)}.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-500\\/80:focus-visible{--tw-ring-color:#3080ffcc}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)80%,transparent)}}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.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\\:ring-offset-zinc-950:focus-visible{--tw-ring-offset-color:var(--color-zinc-950)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.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}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=open\\]\\:border-zinc-800[data-state=open]{border-color:var(--color-zinc-800)}.data-\\[state\\=open\\]\\:bg-zinc-950[data-state=open]{background-color:var(--color-zinc-950)}.data-\\[state\\=open\\]\\:text-zinc-100[data-state=open]{color:var(--color-zinc-100)}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\\[\\&\\>span\\]\\:flex>span{display:flex}.\\[\\&\\>span\\]\\:items-center>span{align-items:center}.\\[\\&\\>span\\]\\:gap-2>span{gap:calc(var(--spacing)*2)}}: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-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@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-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{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 I0 extends j.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[JsonPages Engine]",t,r)}render(){return this.state.hasError&&this.state.error?p.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:[p.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),p.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 pi(e){return e.split("/").map(t=>t.trim()).filter(Boolean).join("/")}function zc(e,t=""){const r=pi(t);let o=e.replace(/\/+/g,"/");if(r){const s=`/${r}`;o===s?o="/":o.startsWith(`${s}/`)&&(o=o.slice(s.length))}return pi(o)||"home"}const jc=({pageRegistry:e,siteConfig:t,menuConfig:r,tenantCss:n,adminCss:o,NotFoundComponent:i})=>{const s=He.useLocation(),a=zc(s.pathname),[l,c]=j.useState(null);j.useEffect(()=>{const f=document.getElementById("jp-baked-state");if(f!=null&&f.textContent)try{const v=JSON.parse(f.textContent);c(v),Vn.setTheme(v.theme)}catch(v){console.error("Failed to parse baked state",v)}},[]);const d=l?l.page:e[a],u=l?l.site:t,m=l?l.menu:r;return d?p.jsx(Zr,{mode:"tenant",tenantCss:n,adminCss:o,children:p.jsx($r,{mode:"visitor",children:p.jsx(oo,{pageConfig:d,siteConfig:u,menuConfig:m})})}):p.jsx(i,{})},Tc=({pageRegistry:e,siteConfig:t,menuConfig:r,themeConfig:n,tenantCss:o,adminCss:i,addSectionConfig:s,addableSectionTypes:a,saveToFile:l,exportHTML:c})=>{const d=He.useLocation(),u=zc(d.pathname,"admin"),m=He.useNavigate(),f=Object.keys(e).sort((S,P)=>S==="home"?-1:P==="home"?1:S.localeCompare(P)),[v,h]=j.useState(null),[b,g]=j.useState(!1),[x,k]=j.useState(!1),[_,C]=j.useState(()=>{var S;try{const P=JSON.parse(JSON.stringify(t??{}));P.identity||(P.identity={title:"Site"}),P.pages||(P.pages=[]);const W=(S=P.header)==null?void 0:S.data;return W&&(r!=null&&r.main)&&(W.links=JSON.parse(JSON.stringify(r.main))),P}catch{return{identity:{title:"Site"},pages:[]}}}),[I,A]=j.useState(null),[D,R]=j.useState(null),[F,Y]=j.useState(null),[N,M]=j.useState(null),[y,B]=j.useState(!1),[te,U]=j.useState(400),$=j.useRef(v),Z=j.useRef(_),ne=360,z=920;j.useEffect(()=>{$.current=v},[v]),j.useEffect(()=>{Z.current=_},[_]);const L=j.useCallback(S=>{S.preventDefault();const P=S.currentTarget;P.setPointerCapture(S.pointerId);const W=S.clientX,G=te,O=J=>{const Q=W-J.clientX,se=Math.min(z,Math.max(ne,G+Q));U(se)},V=()=>{P.releasePointerCapture(S.pointerId),P.removeEventListener("pointermove",O),P.removeEventListener("pointerup",V),P.removeEventListener("pointercancel",V),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",P.addEventListener("pointermove",O),P.addEventListener("pointerup",V),P.addEventListener("pointercancel",V)},[te]),K=v?[..._.header?[{id:_.header.id,type:_.header.type,scope:"global",title:"Header"}]:[],...v.sections.map(S=>{var P,W;return{id:S.id,type:S.type,scope:"local",title:((P=S.data)==null?void 0:P.title)??((W=S.data)==null?void 0:W.titleHighlight)}}),..._.footer?[{id:_.footer.id,type:_.footer.type,scope:"global",title:"Footer"}]:[]]:[];j.useEffect(()=>{const S=e[u];S&&h(JSON.parse(JSON.stringify(S))),A(null),R(null),g(!1)},[u,e]);const q=j.useCallback(()=>{const S=e[u];S&&h(JSON.parse(JSON.stringify(S))),A(null),R(null),g(!1)},[u,e]),ee=j.useCallback((S,P,W)=>{const G=[...W.sections],O=G.findIndex(Q=>Q.id===S);if(O===-1||P<0||P>=G.length)return;const[V]=G.splice(O,1),J=P>O?P-1:P;G.splice(Math.min(J,G.length),0,V),h({...W,sections:G}),g(!0)},[]),ue=j.useCallback(S=>{var P;if(S.origin===window.location.origin){if(S.data.type===Ce.SECTION_SELECT){A(S.data.section);const W=S.data.itemPath;Array.isArray(W)&&W.length>0?R(W.map(G=>({fieldKey:G.fieldKey,...G.itemId!=null?{itemId:String(G.itemId)}:{}}))):R(null)}if(S.data.type===Ce.INLINE_FIELD_UPDATE){const W=typeof S.data.sectionId=="string"?S.data.sectionId:null,G=typeof S.data.fieldKey=="string"?S.data.fieldKey:null;W&&G&&(h(O=>{if(!O)return O;const V={...O,sections:O.sections.map(J=>J.id===W?{...J,data:{...J.data,[G]:S.data.value}}:J)};return $.current=V,V}),g(!0))}if(S.data.type===Ce.ACTIVE_SECTION_CHANGED&&Y(S.data.activeSectionId??null),S.data.type==="jsonpages:section-reorder"&&$.current){const{sectionId:W,newIndex:G}=S.data;typeof W=="string"&&typeof G=="number"&&G>=0&&ee(W,G,$.current)}if(S.data.type===Ce.SEND_CLEAN_HTML){if(!$.current)return;const W=(P=Z.current.header)==null?void 0:P.data,G={page:$.current,site:Z.current,menu:{main:(W==null?void 0:W.links)??[]},theme:n};c(G,u,S.data.html),g(!1)}}},[u,n,ee,c]);j.useEffect(()=>(window.addEventListener("message",ue),()=>window.removeEventListener("message",ue)),[ue]);const re=j.useCallback(S=>{const P=K.find(W=>W.id===S);P&&A({id:P.id,type:P.type,scope:P.scope}),R(null),M(S)},[K]),ie=j.useCallback(()=>{M(null)},[]),ae=j.useCallback(S=>{h(P=>P&&{...P,sections:P.sections.filter(W=>W.id!==S)}),g(!0),A(P=>(P==null?void 0:P.id)===S?null:P)},[]),oe=S=>{if(!(!I||!v))if(g(!0),I.scope==="global")I.type==="header"&&_.header!=null?C({..._,header:{..._.header,data:S}}):I.type==="footer"&&_.footer!=null&&C({..._,footer:{..._.footer,data:S}});else{const P=v.sections.map(W=>W.id===I.id?{...W,data:S}:W);h({...v,sections:P})}},le=j.useCallback((S,P,W,G)=>{var O,V;if(g(!0),P==="global")((O=_.header)==null?void 0:O.id)===S?C({..._,header:{..._.header,data:G}}):((V=_.footer)==null?void 0:V.id)===S&&C({..._,footer:{..._.footer,data:G}});else if(v){const J=v.sections.map(Q=>Q.id===S?{...Q,data:G}:Q);h({...v,sections:J})}},[v,_]),fe=()=>{var P;const S=document.querySelector("iframe");(P=S==null?void 0:S.contentWindow)==null||P.postMessage({type:Ce.REQUEST_CLEAN_HTML},"*")},ve=j.useCallback(async()=>{const S=document.querySelector("iframe");if(!(S!=null&&S.contentWindow))return;const P=crypto.randomUUID();await new Promise(W=>{var V;let G=!1;const O=J=>{var Q,se;J.origin===window.location.origin&&((Q=J.data)==null?void 0:Q.type)===Ce.INLINE_FLUSHED&&((se=J.data)==null?void 0:se.requestId)===P&&(G=!0,window.removeEventListener("message",O),W())};window.addEventListener("message",O),(V=S.contentWindow)==null||V.postMessage({type:Ce.REQUEST_INLINE_FLUSH,requestId:P},"*"),window.setTimeout(()=>{G||(window.removeEventListener("message",O),W())},400)})},[]),w=async()=>{var O;if(!l)return;await ve();const S=$.current,P=Z.current;if(!S)return;const W=(O=P.header)==null?void 0:O.data,G={page:S,site:P,menu:{main:(W==null?void 0:W.links)??[]},theme:n};l(G,u).then(()=>{g(!1),k(!0)}).catch(V=>{console.error("[JsonPages] saveToFile failed",V);const J=V instanceof Error?V.message:String(V);alert(`Save to file failed: ${J}`)})},X=S=>{var G;if(!v)return;const P=((G=s==null?void 0:s.getDefaultSectionData)==null?void 0:G.call(s,S))??{},W={id:crypto.randomUUID(),type:S,data:P,settings:void 0};h({...v,sections:[...v.sections,W]}),g(!0),A({id:W.id,type:S,scope:"local"})};if(!v)return p.jsx("div",{children:"Loading Studio..."});const H=(I==null?void 0:I.scope)==="global"?{sections:[_.header,_.footer].filter(S=>S!=null)}:v,T=[..._.header?[_.header]:[],...v.sections,..._.footer?[_.footer]:[]];return p.jsx(Zr,{mode:"admin",tenantCss:o,adminCss:i,children:p.jsx($r,{mode:"studio",children:p.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[p.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[p.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:p.jsx(Cc,{draft:v,globalDraft:_,themeConfig:n,slug:u,selectedId:I==null?void 0:I.id,scrollToSectionId:N,onScrollRequested:ie})}),p.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:te,minWidth:ne,maxWidth:z},children:[p.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:L}),p.jsx(Sc,{selectedSection:I,pageData:H,allSectionsData:T,onUpdate:oe,onUpdateSection:le,onClose:()=>{A(null),R(null)},expandedItemPath:D,onReorderSection:v?(S,P)=>ee(S,P,v):void 0,allLayers:K,activeSectionId:F,onRequestScrollToSection:re,onDeleteSection:v?ae:void 0,onAddSection:a.length>0?()=>B(!0):void 0,hasChanges:b,onExportHTML:fe,onSaveToFile:l!=null?w:void 0,saveSuccessFeedback:x,onResetToFile:q,pageSlugs:f,currentSlug:u,onPageChange:f.length>1?S=>{const P=pi(S);m(P==="home"?"/admin":`/admin/${P}`)}:void 0})]})]}),p.jsx(Nc,{open:y,onClose:()=>B(!1),sectionTypes:a,sectionTypeLabels:s==null?void 0:s.sectionTypeLabels,onSelect:X})]})})})},Oc=({tenantCss:e,adminCss:t})=>p.jsx(Zr,{mode:"tenant",tenantCss:e,adminCss:t,children:p.jsx(Ec,{})});function D0({config:e}){var b,g,x;const{registry:t={},schemas:r={},pages:n={},siteConfig:o,themeConfig:i,menuConfig:s,themeCss:a,addSection:l,NotFoundComponent:c=Ac}=e,d=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(k=>k!=="header"&&k!=="footer"),u={exportJSON:((b=e.persistence)==null?void 0:b.exportJSON)??ki,exportHTML:((g=e.persistence)==null?void 0:g.exportHTML)??_i,saveToFile:(x=e.persistence)==null?void 0:x.saveToFile},m=typeof(a==null?void 0:a.tenant)=="string"?a.tenant:"",f=typeof(a==null?void 0:a.admin)=="string"?a.admin:P0,[v,h]=j.useState(!1);return j.useEffect(()=>{try{i!=null&&i.tokens&&Vn.setTheme(i)}catch(k){console.warn("[JsonPages] setTheme failed",k)}h(!0)},[i]),v?p.jsx(I0,{children:p.jsx(Yi,{config:{registry:t,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:p.jsx(He.BrowserRouter,{children:p.jsxs(He.Routes,{children:[p.jsx(He.Route,{path:"/",element:p.jsx(jc,{pageRegistry:n,siteConfig:o,menuConfig:s,tenantCss:m,adminCss:f,NotFoundComponent:c})}),p.jsx(He.Route,{path:"/*",element:p.jsx(jc,{pageRegistry:n,siteConfig:o,menuConfig:s,tenantCss:m,adminCss:f,NotFoundComponent:c})}),p.jsx(He.Route,{path:"/admin",element:p.jsx(Tc,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:i,tenantCss:m,adminCss:f,addSectionConfig:l,addableSectionTypes:d,saveToFile:u.saveToFile,exportHTML:u.exportHTML})}),p.jsx(He.Route,{path:"/admin/*",element:p.jsx(Tc,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:i,tenantCss:m,adminCss:f,addSectionConfig:l,addableSectionTypes:d,saveToFile:u.saveToFile,exportHTML:u.exportHTML})}),p.jsx(He.Route,{path:"/admin/preview",element:p.jsx(Oc,{tenantCss:m,adminCss:f})}),p.jsx(He.Route,{path:"/admin/preview/*",element:p.jsx(Oc,{tenantCss:m,adminCss:f})}),p.jsx(He.Route,{path:"*",element:p.jsx(c,{})})]})})})}):p.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 R0=({hasChanges:e,onExportJSON:t,onExportHTML:r,onAddSection:n})=>p.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:[p.jsx("div",{className:"flex items-center gap-3",children:n!=null&&p.jsxs("button",{type:"button",onClick:n,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:[p.jsx(Gd,{size:14}),p.jsx("span",{children:"Add section"})]})}),p.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:p.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.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:[p.jsx(Xi,{size:14}),p.jsx("span",{children:"Bake HTML"})]}),p.jsxs("button",{onClick:t,disabled:!e,className:me("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:[p.jsx(Fd,{size:14}),p.jsx("span",{children:"Export JSON"})]})]})]});xe.AddSectionLibrary=Nc,xe.AdminSidebar=Sc,xe.ConfigProvider=Yi,xe.ControlBar=R0,xe.DefaultNotFound=Ac,xe.FormFactory=Nr,xe.InputWidgets=er,xe.JsonPagesEngine=D0,xe.PageRenderer=oo,xe.PreviewEntry=Ec,xe.STUDIO_EVENTS=Ce,xe.SectionRenderer=fr,xe.StudioProvider=$r,xe.StudioStage=Cc,xe.ThemeLoader=Zr,xe.cn=me,xe.exportBakedHTML=_i,xe.exportProjectJSON=ki,xe.resolveAssetUrl=Dl,xe.themeManager=Vn,xe.useConfig=ur,xe.useStudio=Gi,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})}));
|