@syncify/cli 0.2.3-beta → 0.2.4-beta

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/cjs.js CHANGED
@@ -1,221 +1,221 @@
1
1
  'use strict';
2
2
 
3
3
  var Ds = require('process');
4
- var fl = require('axios');
4
+ var pl = require('axios');
5
5
  var events = require('events');
6
6
  var module$1 = require('module');
7
- var yl = require('zlib');
7
+ var gl = require('zlib');
8
8
  var stream = require('stream');
9
9
  var console$1 = require('console');
10
10
  var perf_hooks = require('perf_hooks');
11
- var Fl = require('os');
12
- var Xo = require('readline');
11
+ var xl = require('os');
12
+ var Zo = require('readline');
13
13
  var child_process = require('child_process');
14
14
  var path = require('path');
15
15
  var url = require('url');
16
- var vu = require('node-notifier');
17
- var Wa = require('fast-glob');
16
+ var Bu = require('node-notifier');
17
+ var Ga = require('fast-glob');
18
18
  var fsExtra = require('fs-extra');
19
19
  require('prompts');
20
- var za = require('anymatch');
20
+ var Wa = require('anymatch');
21
21
  var htmlMinifierTerser = require('html-minifier-terser');
22
22
  var _p = require('gray-matter');
23
23
  require('turndown');
24
24
  require('turndown-plugin-gfm');
25
25
  var kp = require('markdown-it');
26
26
  var ws = require('ws');
27
- var Kp = require('serve-static');
28
- var Xp = require('finalhandler');
29
- var Zp = require('http');
27
+ var Xp = require('serve-static');
28
+ var Zp = require('finalhandler');
29
+ var ef = require('http');
30
30
  var chokidar = require('chokidar');
31
- var Pf = require('dotenv');
32
- var nf = require('cross-spawn');
31
+ var jf = require('dotenv');
32
+ var uf = require('cross-spawn');
33
33
  var loadTsconfig = require('load-tsconfig');
34
34
  var esbuild = require('esbuild');
35
35
 
36
36
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
37
37
 
38
38
  var Ds__default = /*#__PURE__*/_interopDefault(Ds);
39
- var fl__default = /*#__PURE__*/_interopDefault(fl);
40
- var yl__default = /*#__PURE__*/_interopDefault(yl);
41
- var Fl__default = /*#__PURE__*/_interopDefault(Fl);
42
- var Xo__default = /*#__PURE__*/_interopDefault(Xo);
43
- var vu__default = /*#__PURE__*/_interopDefault(vu);
39
+ var pl__default = /*#__PURE__*/_interopDefault(pl);
40
+ var gl__default = /*#__PURE__*/_interopDefault(gl);
41
+ var xl__default = /*#__PURE__*/_interopDefault(xl);
42
+ var Zo__default = /*#__PURE__*/_interopDefault(Zo);
43
+ var Bu__default = /*#__PURE__*/_interopDefault(Bu);
44
+ var Ga__default = /*#__PURE__*/_interopDefault(Ga);
44
45
  var Wa__default = /*#__PURE__*/_interopDefault(Wa);
45
- var za__default = /*#__PURE__*/_interopDefault(za);
46
46
  var _p__default = /*#__PURE__*/_interopDefault(_p);
47
47
  var kp__default = /*#__PURE__*/_interopDefault(kp);
48
- var Kp__default = /*#__PURE__*/_interopDefault(Kp);
49
48
  var Xp__default = /*#__PURE__*/_interopDefault(Xp);
50
49
  var Zp__default = /*#__PURE__*/_interopDefault(Zp);
51
- var Pf__default = /*#__PURE__*/_interopDefault(Pf);
52
- var nf__default = /*#__PURE__*/_interopDefault(nf);
53
-
54
- var tl=Object.create;var Xs=Object.defineProperty;var rl=Object.getOwnPropertyDescriptor;var sl=Object.getOwnPropertyNames;var nl=Object.getPrototypeOf,il=Object.prototype.hasOwnProperty;var Zs=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ar=(e,t)=>{for(var s in t)Xs(e,s,{get:t[s],enumerable:!0});},ol=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of sl(t))!il.call(e,n)&&n!==s&&Xs(e,n,{get:()=>t[n],enumerable:!(r=rl(t,n))||r.enumerable});return e};var Ot=(e,t,s)=>(s=e!=null?tl(nl(e)):{},ol(t||!e||!e.__esModule?Xs(s,"default",{value:e,enumerable:!0}):s,e));var Yi=Je((JD,nn)=>{var cl=Object.prototype.hasOwnProperty,Ce="~";function pr(){}Object.create&&(pr.prototype=Object.create(null),new pr().__proto__||(Ce=!1));function pl(e,t,s){this.fn=e,this.context=t,this.once=s||!1;}function Ji(e,t,s,r,n){if(typeof s!="function")throw new TypeError("The listener must be a function");var i=new pl(s,r||e,n),o=Ce?Ce+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],i]:e._events[o].push(i):(e._events[o]=i,e._eventsCount++),e}function Yr(e,t){--e._eventsCount===0?e._events=new pr:delete e._events[t];}function xe(){this._events=new pr,this._eventsCount=0;}xe.prototype.eventNames=function(){var t=[],s,r;if(this._eventsCount===0)return t;for(r in s=this._events)cl.call(s,r)&&t.push(Ce?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t};xe.prototype.listeners=function(t){var s=Ce?Ce+t:t,r=this._events[s];if(!r)return [];if(r.fn)return [r.fn];for(var n=0,i=r.length,o=new Array(i);n<i;n++)o[n]=r[n].fn;return o};xe.prototype.listenerCount=function(t){var s=Ce?Ce+t:t,r=this._events[s];return r?r.fn?1:r.length:0};xe.prototype.emit=function(t,s,r,n,i,o){var a=Ce?Ce+t:t;if(!this._events[a])return !1;var l=this._events[a],h=arguments.length,p,c;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,s),!0;case 3:return l.fn.call(l.context,s,r),!0;case 4:return l.fn.call(l.context,s,r,n),!0;case 5:return l.fn.call(l.context,s,r,n,i),!0;case 6:return l.fn.call(l.context,s,r,n,i,o),!0}for(c=1,p=new Array(h-1);c<h;c++)p[c-1]=arguments[c];l.fn.apply(l.context,p);}else {var g=l.length,m;for(c=0;c<g;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,s);break;case 3:l[c].fn.call(l[c].context,s,r);break;case 4:l[c].fn.call(l[c].context,s,r,n);break;default:if(!p)for(m=1,p=new Array(h-1);m<h;m++)p[m-1]=arguments[m];l[c].fn.apply(l[c].context,p);}}return !0};xe.prototype.on=function(t,s,r){return Ji(this,t,s,r,!1)};xe.prototype.once=function(t,s,r){return Ji(this,t,s,r,!0)};xe.prototype.removeListener=function(t,s,r,n){var i=Ce?Ce+t:t;if(!this._events[i])return this;if(!s)return Yr(this,i),this;var o=this._events[i];if(o.fn)o.fn===s&&(!n||o.once)&&(!r||o.context===r)&&Yr(this,i);else {for(var a=0,l=[],h=o.length;a<h;a++)(o[a].fn!==s||n&&!o[a].once||r&&o[a].context!==r)&&l.push(o[a]);l.length?this._events[i]=l.length===1?l[0]:l:Yr(this,i);}return this};xe.prototype.removeAllListeners=function(t){var s;return t?(s=Ce?Ce+t:t,this._events[s]&&Yr(this,s)):(this._events=new pr,this._eventsCount=0),this};xe.prototype.off=xe.prototype.removeListener;xe.prototype.addListener=xe.prototype.on;xe.prefixed=Ce;xe.EventEmitter=xe;typeof nn<"u"&&(nn.exports=xe);});var Ao=Je(($d,vn)=>{var ct={};typeof vn>"u"?window.eastasianwidth=ct:vn.exports=ct;ct.eastAsianWidth=function(e){var t=e.charCodeAt(0),s=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=s&&s<=57343&&(t&=1023,s&=1023,r=t<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"};ct.characterLength=function(e){var t=this.eastAsianWidth(e);return t=="F"||t=="W"||t=="A"?2:1};function $o(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}ct.length=function(e){for(var t=$o(e),s=0,r=0;r<t.length;r++)s=s+this.characterLength(t[r]);return s};ct.slice=function(e,t,s){textLen=ct.length(e),t=t||0,s=s||1,t<0&&(t=textLen+t),s<0&&(s=textLen+s);for(var r="",n=0,i=$o(e),o=0;o<i.length;o++){var a=i[o],l=ct.length(a);if(n>=t-(l==2?1:0))if(n+l<=s)r+=a;else break;n+=l;}return r};});var Ro=Je((Ad,To)=>{To.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var Ho=Je(fs=>{Object.defineProperty(fs,"__esModule",{value:!0});var Tn=e=>{let[,t]=/([a-f\d]{3,6})/i.exec(e)||[],s=t?t.length:0;if(s===3)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(s!==6)return [0,0,0];let r=parseInt(t,16);return [r>>16&255,r>>8&255,255&r]},ft=(e,t,s)=>t>e?t:e>s?s:e,_l=(e,t,s)=>{if(t==="")return e;let r=e.indexOf(t);if(r<0)return e;let n=t.length,i=0,o="";for(;~r;)o+=e.slice(i,r)+s,i=r+n,r=e.indexOf(t,i);return o+e.slice(i)},Wo={open:"",close:""},b=(e=>{let t=m=>!!o.find(T=>m.test(T)),s=e||(typeof process<"u"?process:{}),{stdout:r,platform:n}=s,i=s.env||{},o=s.argv||[],a="FORCE_COLOR"in i,l=i.FORCE_COLOR,h=l==="true"||parseInt(l)>0,p="NO_COLOR"in i||a&&!h||t(/^-{1,2}(no-color|color=false|color=never)$/),c=a&&h||t(/^-{1,2}(color|color=true|color=always)$/),g=r&&"isTTY"in r&&/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM);return !p&&(c||g||n==="win32"||"CI"in i)})()?(e,t)=>({open:`\x1B[${e}m`,close:`\x1B[${t}m`}):()=>Wo,Rn=(e,t,s)=>b(`38;2;${e};${t};${s}`,39),qo=(e,t,s)=>b(`48;2;${e};${t};${s}`,49),kl={visible:Wo,reset:b(0,0),inverse:b(7,27),hidden:b(8,28),bold:b(1,22),dim:b(2,22),faint:b(2,22),italic:b(3,23),underline:b(4,24),doubleUnderline:b(21,24),strikethrough:b(9,29),strike:b(9,29),frame:b(51,54),encircle:b(52,54),overline:b(53,55),black:b(30,39),red:b(31,39),green:b(32,39),yellow:b(33,39),blue:b(34,39),magenta:b(35,39),cyan:b(36,39),white:b(37,39),grey:b(90,39),gray:b(90,39),blackBright:b(90,39),redBright:b(91,39),greenBright:b(92,39),yellowBright:b(93,39),blueBright:b(94,39),magentaBright:b(95,39),cyanBright:b(96,39),whiteBright:b(97,39),bgBlack:b(40,49),bgRed:b(41,49),bgGreen:b(42,49),bgYellow:b(43,49),bgBlue:b(44,49),bgMagenta:b(45,49),bgCyan:b(46,49),bgWhite:b(47,49),bgBlackBright:b(100,49),bgRedBright:b(101,49),bgGreenBright:b(102,49),bgYellowBright:b(103,49),bgBlueBright:b(104,49),bgMagentaBright:b(105,49),bgCyanBright:b(106,49),bgWhiteBright:b(107,49)},{defineProperty:Ol,defineProperties:Pl,setPrototypeOf:zo}=Object,Il=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,jl=/(\r*\n)/g,Uo=function(){let e=t=>t;return e.strip=t=>t.replace(Il,""),e.extend=t=>{for(let s in t){let r=t[s],n=r.open!=null?r:Rn(...Tn(r));Ze[s]={get(){let i=Vo(this,n);return Ol(this,s,{value:i}),i}};}_n=Pl(()=>{},Ze),zo(e,_n);},e.extend(kl),e},Vo=({props:e},{open:t,close:s})=>{let r=(o,...a)=>Nl(o,a,r.props),n=t,i=s;return e!==void 0&&(n=e.openStack+t,i=s+e.closeStack),zo(r,_n),r.props={open:t,close:s,openStack:n,closeStack:i,parent:e},r.open=n,r.close=i,r},Nl=(e,t,s)=>{if(!e)return "";let{openStack:r,closeStack:n}=s,i=e.raw!=null?String.raw(e,...t):e;if(~i.indexOf("\x1B"))for(;s!==void 0;)i=_l(i,s.close,s.open),s=s.parent;return ~i.indexOf(`
55
- `)&&(i=i.replace(jl,n+"$1"+r)),r+i+n},Go={ansi:e=>(t=>b(`38;5;${t}`,39))(ft(e,0,255)),bgAnsi:e=>(t=>b(`48;5;${t}`,49))(ft(e,0,255)),hex:e=>Rn(...Tn(e)),bgHex:e=>qo(...Tn(e)),rgb:(e,t,s)=>Rn(ft(e,0,255),ft(t,0,255),ft(s,0,255)),bgRgb:(e,t,s)=>qo(ft(e,0,255),ft(t,0,255),ft(s,0,255))},Ze={},_n;for(let e in Go)Ze[e]={get(){return (...t)=>Vo(this,Go[e](...t))}};Ze.ansi256=Ze.fg=Ze.ansi,Ze.bgAnsi256=Ze.bg=Ze.bgAnsi;var Ll=new Uo;fs.Ansis=Uo,fs.default=Ll;});var Yo=Je((Md,kn)=>{var Jo=Ho();kn.exports=Jo.default;kn.exports.Ansis=Jo.Ansis;});var ru=Je((lm,Qn)=>{var tu=(e,t)=>{for(let s of Reflect.ownKeys(t))Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s));return e};Qn.exports=tu;Qn.exports.default=tu;});var nu=Je((cm,Cs)=>{var dc=ru(),ws=new WeakMap,su=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let s,r=0,n=e.displayName||e.name||"<anonymous>",i=function(...o){if(ws.set(i,++r),r===1)s=e.apply(this,o),e=null;else if(t.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return s};return dc(i,e),ws.set(i,r),i};Cs.exports=su;Cs.exports.default=su;Cs.exports.callCount=e=>{if(!ws.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ws.get(e)};});var iu=Je((pm,Es)=>{Es.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Es.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Es.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");});var cu=Je((fm,Ht)=>{var te=global.process,Bt=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Bt(te)?(ou=Zs("assert"),Ut=iu(),uu=/^win/i.test(te.platform),Rr=Zs("events"),typeof Rr!="function"&&(Rr=Rr.EventEmitter),te.__signal_exit_emitter__?de=te.__signal_exit_emitter__:(de=te.__signal_exit_emitter__=new Rr,de.count=0,de.emitted={}),de.infinite||(de.setMaxListeners(1/0),de.infinite=!0),Ht.exports=function(e,t){if(!Bt(global.process))return function(){};ou.equal(typeof e,"function","a callback must be provided for exit handler"),Vt===!1&&Kn();var s="exit";t&&t.alwaysLast&&(s="afterexit");var r=function(){de.removeListener(s,e),de.listeners("exit").length===0&&de.listeners("afterexit").length===0&&bs();};return de.on(s,e),r},bs=function(){!Vt||!Bt(global.process)||(Vt=!1,Ut.forEach(function(t){try{te.removeListener(t,Ss[t]);}catch{}}),te.emit=vs,te.reallyExit=Xn,de.count-=1);},Ht.exports.unload=bs,$t=function(t,s,r){de.emitted[t]||(de.emitted[t]=!0,de.emit(t,s,r));},Ss={},Ut.forEach(function(e){Ss[e]=function(){if(Bt(global.process)){var s=te.listeners(e);s.length===de.count&&(bs(),$t("exit",null,e),$t("afterexit",null,e),uu&&e==="SIGHUP"&&(e="SIGINT"),te.kill(te.pid,e));}};}),Ht.exports.signals=function(){return Ut},Vt=!1,Kn=function(){Vt||!Bt(global.process)||(Vt=!0,de.count+=1,Ut=Ut.filter(function(t){try{return te.on(t,Ss[t]),!0}catch{return !1}}),te.emit=lu,te.reallyExit=au);},Ht.exports.load=Kn,Xn=te.reallyExit,au=function(t){Bt(global.process)&&(te.exitCode=t||0,$t("exit",te.exitCode,null),$t("afterexit",te.exitCode,null),Xn.call(te,te.exitCode));},vs=te.emit,lu=function(t,s){if(t==="exit"&&Bt(global.process)){s!==void 0&&(te.exitCode=s);var r=vs.apply(this,arguments);return $t("exit",te.exitCode,null),$t("afterexit",te.exitCode,null),r}else return vs.apply(this,arguments)}):Ht.exports=function(){return function(){}};var ou,Ut,uu,Rr,de,bs,$t,Ss,Vt,Kn,Xn,au,vs,lu;});function De(e){if(e===null)return "Null";if(e===void 0)return "Undefined";if(Number.isNaN(e))return "NaN";let t=Object.prototype.toString.call(e).slice(8,-1);return t==="AsyncFunction"?"Promise":t}var{isArray:nt}=Array;function Pt(e){return nt(e)?e.length>0:De(e)==="Object"?Object.keys(e).length>0:!!e}function it(...e){let t=0;for(;t<e.length;){let s=e[t];if(De(s)==="Function"){if(Pt(s()))return !1}else if(Pt(s))return !1;t++;}return !0}function ge(...e){let t=0;for(;t<e.length;){let s=e[t];if(De(s)==="Function"){if(Pt(s()))return !0}else if(Pt(s))return !0;t++;}return !1}function qr(e,t="."){return typeof e=="string"?e.split(t):e}function en(e,t){if(arguments.length===1)return i=>en(e,i);if(t==null)return;let s=t,r=0,n=qr(e);for(;r<n.length;){if(s==null||s[n[r]]===null)return;s=s[n[r]],r++;}return s}function lr(e,t){if(!nt(t))throw new Error(`Cannot read property 'indexOf' of ${t}`);let s=De(e);if(!["Object","Array","NaN","RegExp"].includes(s))return t.indexOf(e);let r=-1,n=-1,{length:i}=t;for(;++r<i&&n===-1;)Gr(t[r],e)&&(n=r);return n}function Mi(e){let t=[],s;for(;!(s=e.next()).done;)t.push(s.value);return t}function ul(e,t){if(e.size!==t.size)return !1;let s=Mi(e.values()),r=Mi(t.values());return s.filter(i=>lr(i,r)===-1).length===0}function qi(e){let t=e.__proto__.toString();return ["Error","TypeError"].includes(t)?[t,e.message]:[]}function Gi(e){return e.toDateString?[!0,e.getTime()]:[!1]}function Wi(e){return e.constructor!==RegExp?[!1]:[!0,e.toString()]}function Gr(e,t){if(arguments.length===1)return h=>Gr(e,h);let s=De(e);if(s!==De(t))return !1;if(s==="Function")return e.name===void 0?!1:e.name===t.name;if(["NaN","Undefined","Null"].includes(s))return !0;if(s==="Number")return Object.is(-0,e)!==Object.is(-0,t)?!1:e.toString()===t.toString();if(["String","Boolean"].includes(s))return e.toString()===t.toString();if(s==="Array"){let h=Array.from(e),p=Array.from(t);if(h.toString()!==p.toString())return !1;let c=!0;return h.forEach((g,m)=>{c&&g!==p[m]&&!Gr(g,p[m])&&(c=!1);}),c}let r=Wi(e),n=Wi(t);if(r[0])return n[0]?r[1]===n[1]:!1;if(n[0])return !1;let i=Gi(e),o=Gi(t);if(i[0])return o[0]?i[1]===o[1]:!1;if(o[0])return !1;let a=qi(e),l=qi(t);if(a[0])return l[0]?a[0]===l[0]&&a[1]===l[1]:!1;if(s==="Set")return ul(e,t);if(s==="Object"){let h=Object.keys(e);if(h.length!==Object.keys(t).length)return !1;let p=!0;return h.forEach(c=>{if(p){let g=e[c],m=t[c];g!==m&&!Gr(g,m)&&(p=!1);}}),p}return !1}function tn(e,t){if(arguments.length===1)return s=>tn(e,s);if(typeof t=="string")return t.includes(e);if(!t)throw new TypeError(`Cannot read property 'indexOf' of ${t}`);return nt(t)?lr(e,t)>-1:!1}async function zi(e,t){if(nt(t)){let r=[],n=0;for(let i of t)r.push(await e(i,n++));return r}let s={};for(let r in t)s[r]=await e(t[r],r);return s}function qe(e,t){return arguments.length===1?async s=>zi(e,s):new Promise((s,r)=>{zi(e,t).then(s).catch(r);})}function It(e,t){return arguments.length===1?s=>It(e,s):Object.assign({},e||{},t||{})}function ce(e,t){return arguments.length===1?s=>ce(e,s):De(t)===e}async function Ui(e,t){let s=t.map((r,n)=>e(r,n));return Promise.all(s)}function rn(e,t){return arguments.length===1?async s=>Ui(e,s):new Promise((s,r)=>{Ui(e,t).then(s).catch(r);})}function sn(e,t){if(arguments.length===1)return n=>sn(e,n);if(t==null)return;let s=qr(e,","),r={};for(let n in t)s.includes(n)||(r[n]=t[n]);return r}var Wr=class{constructor(){this.set=new Set,this.items={};}checkUniqueness(t){let s=De(t);if(["Null","Undefined","NaN"].includes(s))return s in this.items?!1:(this.items[s]=!0,!0);if(!["Object","Array"].includes(s)){let r=this.set.size;return this.set.add(t),this.set.size!==r}return s in this.items?lr(t,this.items[s])===-1?(this.items[s].push(t),!0):!1:(this.items[s]=[t],!0)}};function zr(e){let t=new Wr,s=[];return e.forEach(r=>{t.checkUniqueness(r)&&s.push(r);}),s}function f(e,t){return arguments.length===1?s=>f(e,s):t?t.hasOwnProperty(e):!1}function ot(e,t){return arguments.length===1?s=>ot(e,s):en(e,t)!==void 0}function Z(e){let t=De(e);return ["Undefined","NaN","Number","Null"].includes(t)?!1:e?t==="Object"?Object.keys(e).length===0:t==="Array"?e.length===0:!1:!0}function N(e){return e==null}function Ur(e,t){return arguments.length===1?s=>Ur(e,s):t.join(e)}function Vi(e){return typeof e=="string"?e[e.length-1]||"":e[e.length-1]}var {error:Q,log:v,warn:Hi}=console,$="",ye=" ",x=`
56
- `,Re=e=>ye.repeat(e),A=e=>x.repeat(e);Ur(x);var Oe=Ur($);var z=Object.assign,jt=Object.defineProperty,_e=Object.keys,Vr=Object.values,ut=Array.from;Buffer.from;var S=Array.isArray,we=Buffer.isBuffer,H=ce("Undefined"),G=ce("Object"),me=ce("Boolean"),cr=ce("RegExp"),Hr=ce("Number"),P=ce("String"),Ee=ce("Function");ce("Async");var d={};ar(d,{build:()=>vc,changed:()=>kc,clear:()=>rt,deleted:()=>Mc,err:()=>Bc,exported:()=>Ic,external:()=>Ac,failed:()=>Vc,hline:()=>zn,hook:()=>Tc,ignored:()=>zc,importer:()=>jc,invalid:()=>Uc,minified:()=>qc,newGroup:()=>_c,nwl:()=>Qt,out:()=>v,process:()=>Bu,progress:()=>bu,reloaded:()=>Gc,retrying:()=>Lc,skipped:()=>Wc,spawn:()=>Jc,spinner:()=>si,start:()=>Eu,syncing:()=>Pc,throws:()=>Hc,transform:()=>Nc,unhook:()=>Rc,update:()=>At,upload:()=>Oc,write:()=>$c});var be={},pe={current:null,count:0,process:{}},Pe={json:{assets:!0,config:!0,locales:!0,metafields:!0,sectionGroups:!0,templates:!0,exclude:[]},script:{minifySyntax:!0,minifyIdentifiers:!0,minifyWhitespace:!0,mangleProps:void 0,legalComments:"none",mangleQuoted:!1,keepNames:!1,exclude:[]},liquid:{minifyScript:!0,minifyStyle:!0,minifySchema:!0,removeComments:!0,stripDashes:!0,exclude:[]},style:{exclude:[],format:!1,inline:!1},html:{caseSensitive:!1,collapseBooleanAttributes:!1,collapseInlineTagWhitespace:!1,conservativeCollapse:!1,keepClosingSlash:!1,noNewlinesBeforeTagClose:!1,preventAttributesEscaping:!1,removeEmptyAttributes:!1,removeEmptyElements:!1,removeOptionalTags:!1,removeRedundantAttributes:!0,removeScriptTypeAttributes:!0,removeStyleLinkTypeAttributes:!0,useShortDoctype:!0,collapseWhitespace:!0,continueOnParseError:!0,removeComments:!0,trimCustomFragments:!0,ignoreCustomFragments:[/(?<=\bstyle\b=["']\s?)[\s\S]*?(?="[\s\n>]?)/,/<style[\s\S]*?<\/style>/,/<script[\s\S]*?<\/script>/,/{%-?\s*liquid[\s\S]*?%}/,/{%[\s\S]*?%}/]}},K={json:{indent:2,useTab:!1,crlf:!1,exclude:null},postcss:{installed:!1,loaded:!1,file:!1,config:[]},sass:{installed:!1,loaded:!1,file:!1,config:{warnings:!0,style:"compressed",sourcemap:!0,include:["node_modules"]}},esbuild:{installed:!1,loaded:!1,file:!1,config:{bundle:!0,format:"esm",globalName:void 0,target:"es2016",metafile:!0,external:[],platform:"browser",splitting:!1,sourcemap:"linked",write:!1,logLevel:"silent",plugins:[]}},sharp:{installed:!1,required:!1,loaded:!1,file:!1,config:{}},sprite:{installed:!1,loaded:!1,file:!1,config:{mode:{inline:!0,symbol:{example:!1}},shape:{transform:["svgo"],id:{generator:"svg-%s"}},svg:{xmlDeclaration:!1,doctypeDeclaration:!1,dimensionAttributes:!1,namespaceClassnames:!1,namespaceIDs:!1}}},svgo:{installed:!1,loaded:!1,file:!1,config:{multipass:!0,datauri:"enc",js2svg:{indent:2,pretty:!0},plugins:["preset-default",{name:"pluginName",fn:()=>({root:{enter:e=>{},exit:e=>{}},element:{enter:e=>{},exit:e=>{}},doctype:{enter:e=>{},exit:e=>{}},instruction:{enter:e=>{},exit:e=>{}},comment:{enter:e=>{},exit:e=>{}},cdata:{enter:e=>{},exit:e=>{}},text:{enter:e=>{},exit:e=>{}}})}]}}},ll={input:"source",output:"theme",import:"import",export:"export",config:".",hot:!1,stores:null,spawn:{build:null,watch:null},logger:{clear:!0,silent:!1,stats:!0,warnings:!0},paths:{assets:"assets/*",config:"config/*.json",layout:"layout/*.liquid",locales:"locales/*.json",snippets:"snippets/*.liquid",metafields:"metafields/**/*.json",redirects:"redirects.yaml",sections:["sections/**/*.json","sections/**/*.liquid"],pages:["pages/*.html","pages/*.md"],templates:["templates/customers/*.liquid","templates/customers/*.json"],customers:["templates/customers/*.liquid","templates/customers/*.json"]},views:{sections:{prefixDir:!1,separator:"-",global:[]},snippets:{prefixDir:!1,separator:"-",global:[]},pages:{author:"",language:"html"}},transforms:{svg:null,style:null,script:null},terser:{json:!1,views:!1,script:!1}},wt={onBuild:[],onChange:[],onReload:[],onTransform:[],onWatch:[]},u=new class Ge{static defaults=ll;static package={};static terser=Pe;wss=null;filters={};commands=null;version=null;cwd=null;argv=Ds.argv.slice(2).join(" ");errors=new Set;env={cli:!1,dev:!0,prod:!1,sync:0};hot={inject:!0,server:3e3,socket:8089,history:!1,method:"hot",scroll:"preserved",layouts:["theme.liquid"],label:"visible",renderer:"{% render 'hot.js', server: 3000, socket: 8089 %}",snippet:null,output:null,alive:{}};logger={clear:!0,silent:!1,stats:!0,warnings:!0};mode={build:!1,interactive:!1,watch:!1,clean:!1,upload:!1,download:!1,metafields:!1,terse:!1,hot:!1,pages:!1,pull:!1,force:!1,vsc:!1,views:!1,script:!1,image:!1,style:!1,svg:!1,redirects:!1,export:!1};file={base:null,path:null,relative:null};dirs={};cmd={config:null,delete:null,filter:null,input:null,output:null};sync={themes:[],stores:[]};spawn={paths:new Set,streams:new Map,invoked:!1,commands:{}};section={prefixDir:!1,separator:"-",global:null};snippet={prefixDir:!1,separator:"-",global:null};watch=new Set;paths={transforms:new Map};page={export:{quotes:"\u201C\u201D\u2018\u2019",html:!0,linkify:!1,typographer:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-"},import:{codeBlockStyle:"fenced",emDelimiter:"_",fence:"```",headingStyle:"atx",hr:"***",linkReferenceStyle:"full",linkStyle:"inlined",strongDelimiter:"**",bulletListMarker:"-"}};script=[];style=[];svg=[];image;terse={json:!1,views:!1,style:!1,script:!1};get terser(){return Ge.terser}set terser(t){Ge.terser=It(Ge.terser,t);}get processor(){return K}set config(t){Ge.defaults=It(Ge.defaults,t);}get config(){return Ge.defaults}set pkg(t){Ge.package=It(Ge.package,t);}get pkg(){return Ge.package}get plugins(){return wt}};var no=Ot(Yi(),1);var fr=class extends Error{constructor(t){super(t),this.name="TimeoutError";}},on=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},Qi=e=>globalThis.DOMException===void 0?new on(e):new DOMException(e),Ki=e=>{let t=e.reason===void 0?Qi("This operation was aborted."):e.reason;return t instanceof Error?t:Qi(t)};function un(e,t,s,r){let n,i=new Promise((o,a)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t===Number.POSITIVE_INFINITY){o(e);return}if(r={customTimers:{setTimeout,clearTimeout},...r},r.signal){let{signal:l}=r;l.aborted&&a(Ki(l)),l.addEventListener("abort",()=>{a(Ki(l));});}n=r.customTimers.setTimeout.call(void 0,()=>{if(typeof s=="function"){try{o(s());}catch(p){a(p);}return}let l=typeof s=="string"?s:`Promise timed out after ${t} milliseconds`,h=s instanceof Error?s:new fr(l);typeof e.cancel=="function"&&e.cancel(),a(h);},t),(async()=>{try{o(await e);}catch(l){a(l);}finally{r.customTimers.clearTimeout.call(void 0,n);}})();});return i.clear=()=>{clearTimeout(n),n=void 0;},i}function an(e,t,s){let r=0,n=e.length;for(;n>0;){let i=Math.trunc(n/2),o=r+i;s(e[o],t)<=0?(r=++o,n-=i+1):n=i;}return r}var Ct=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},Ye,Dr=class{constructor(){Ye.set(this,[]);}enqueue(t,s){s={priority:0,...s};let r={priority:s.priority,run:t};if(this.size&&Ct(this,Ye,"f")[this.size-1].priority>=s.priority){Ct(this,Ye,"f").push(r);return}let n=an(Ct(this,Ye,"f"),r,(i,o)=>o.priority-i.priority);Ct(this,Ye,"f").splice(n,0,r);}dequeue(){let t=Ct(this,Ye,"f").shift();return t?.run}filter(t){return Ct(this,Ye,"f").filter(s=>s.priority===t.priority).map(s=>s.run)}get size(){return Ct(this,Ye,"f").length}};Ye=new WeakMap;var re=function(e,t,s,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},w=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},oe,mr,hr,lt,ts,gr,Qr,Ie,dr,ve,Kr,Be,yr,at,Xr,Xi,Zi,ro,eo,to,Zr,ln,cn,rs,so,es,ss=class extends Error{},xr=class extends no.default{constructor(t){var s,r,n,i;if(super(),oe.add(this),mr.set(this,void 0),hr.set(this,void 0),lt.set(this,0),ts.set(this,void 0),gr.set(this,void 0),Qr.set(this,0),Ie.set(this,void 0),dr.set(this,void 0),ve.set(this,void 0),Kr.set(this,void 0),Be.set(this,0),yr.set(this,void 0),at.set(this,void 0),Xr.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:Dr,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(r=(s=t.intervalCap)===null||s===void 0?void 0:s.toString())!==null&&r!==void 0?r:""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i=(n=t.interval)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:""}\` (${typeof t.interval})`);re(this,mr,t.carryoverConcurrencyCount,"f"),re(this,hr,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),re(this,ts,t.intervalCap,"f"),re(this,gr,t.interval,"f"),re(this,ve,new t.queueClass,"f"),re(this,Kr,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,re(this,Xr,t.throwOnTimeout===!0,"f"),re(this,at,t.autoStart===!1,"f");}get concurrency(){return w(this,yr,"f")}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);re(this,yr,t,"f"),w(this,oe,"m",rs).call(this);}async add(t,s={}){return s={timeout:this.timeout,throwOnTimeout:w(this,Xr,"f"),...s},new Promise((r,n)=>{w(this,ve,"f").enqueue(async()=>{var i,o,a;re(this,Be,(o=w(this,Be,"f"),o++,o),"f"),re(this,lt,(a=w(this,lt,"f"),a++,a),"f");try{if(!((i=s.signal)===null||i===void 0)&&i.aborted)throw new ss("The task was aborted.");let l=t({signal:s.signal});s.timeout&&(l=un(Promise.resolve(l),s.timeout)),s.signal&&(l=Promise.race([l,w(this,oe,"m",so).call(this,s.signal)]));let h=await l;r(h),this.emit("completed",h);}catch(l){if(l instanceof fr&&!s.throwOnTimeout){r();return}n(l),this.emit("error",l);}finally{w(this,oe,"m",ro).call(this);}},s),this.emit("add"),w(this,oe,"m",Zr).call(this);})}async addAll(t,s){return Promise.all(t.map(async r=>this.add(r,s)))}start(){return w(this,at,"f")?(re(this,at,!1,"f"),w(this,oe,"m",rs).call(this),this):this}pause(){re(this,at,!0,"f");}clear(){re(this,ve,new(w(this,Kr,"f")),"f");}async onEmpty(){w(this,ve,"f").size!==0&&await w(this,oe,"m",es).call(this,"empty");}async onSizeLessThan(t){w(this,ve,"f").size<t||await w(this,oe,"m",es).call(this,"next",()=>w(this,ve,"f").size<t);}async onIdle(){w(this,Be,"f")===0&&w(this,ve,"f").size===0||await w(this,oe,"m",es).call(this,"idle");}get size(){return w(this,ve,"f").size}sizeBy(t){return w(this,ve,"f").filter(t).length}get pending(){return w(this,Be,"f")}get isPaused(){return w(this,at,"f")}};mr=new WeakMap,hr=new WeakMap,lt=new WeakMap,ts=new WeakMap,gr=new WeakMap,Qr=new WeakMap,Ie=new WeakMap,dr=new WeakMap,ve=new WeakMap,Kr=new WeakMap,Be=new WeakMap,yr=new WeakMap,at=new WeakMap,Xr=new WeakMap,oe=new WeakSet,Xi=function(){return w(this,hr,"f")||w(this,lt,"f")<w(this,ts,"f")},Zi=function(){return w(this,Be,"f")<w(this,yr,"f")},ro=function(){var t;re(this,Be,(t=w(this,Be,"f"),t--,t),"f"),w(this,oe,"m",Zr).call(this),this.emit("next");},eo=function(){w(this,oe,"m",cn).call(this),w(this,oe,"m",ln).call(this),re(this,dr,void 0,"f");},to=function(){let t=Date.now();if(w(this,Ie,"f")===void 0){let s=w(this,Qr,"f")-t;if(s<0)re(this,lt,w(this,mr,"f")?w(this,Be,"f"):0,"f");else return w(this,dr,"f")===void 0&&re(this,dr,setTimeout(()=>{w(this,oe,"m",eo).call(this);},s),"f"),!0}return !1},Zr=function(){if(w(this,ve,"f").size===0)return w(this,Ie,"f")&&clearInterval(w(this,Ie,"f")),re(this,Ie,void 0,"f"),this.emit("empty"),w(this,Be,"f")===0&&this.emit("idle"),!1;if(!w(this,at,"f")){let t=!w(this,oe,"a",to);if(w(this,oe,"a",Xi)&&w(this,oe,"a",Zi)){let s=w(this,ve,"f").dequeue();return s?(this.emit("active"),s(),t&&w(this,oe,"m",ln).call(this),!0):!1}}return !1},ln=function(){w(this,hr,"f")||w(this,Ie,"f")!==void 0||(re(this,Ie,setInterval(()=>{w(this,oe,"m",cn).call(this);},w(this,gr,"f")),"f"),re(this,Qr,Date.now()+w(this,gr,"f"),"f"));},cn=function(){w(this,lt,"f")===0&&w(this,Be,"f")===0&&w(this,Ie,"f")&&(clearInterval(w(this,Ie,"f")),re(this,Ie,void 0,"f")),re(this,lt,w(this,mr,"f")?w(this,Be,"f"):0,"f"),w(this,oe,"m",rs).call(this);},rs=function(){for(;w(this,oe,"m",Zr).call(this););},so=async function(t){return new Promise((s,r)=>{t.addEventListener("abort",()=>{r(new ss("The task was aborted."));},{once:!0});})},es=async function(t,s){return new Promise(r=>{let n=()=>{s&&!s()||(this.off(t,n),r());};this.on(t,n);})};var Qe=fl__default.default.create({responseType:"json",headers:{}}),W=new xr({concurrency:5,interval:250,intervalCap:2});function ns(e){return e===429||e===500?!0:(W.isPaused||W.pause(),!1)}var pn=Symbol("singleComment"),io=Symbol("multiComment"),Dl=()=>"",dl=(e,t,s)=>e.slice(t,s).replace(/\S/g," "),ml=(e,t)=>{let s=t-1,r=0;for(;e[s]==="\\";)s-=1,r+=1;return !!(r%2)};function os(e,{whitespace:t=!0,trailingCommas:s=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let r=t?dl:Dl,n=!1,i=!1,o=0,a="",l="",h=-1;for(let p=0;p<e.length;p++){let c=e[p],g=e[p+1];if(!i&&c==='"'&&(ml(e,p)||(n=!n)),!n)if(!i&&c+g==="//")a+=e.slice(o,p),o=p,i=pn,p++;else if(i===pn&&c+g===`\r
57
- `){p++,i=!1,a+=r(e,o,p),o=p;continue}else if(i===pn&&c===`
58
- `)i=!1,a+=r(e,o,p),o=p;else if(!i&&c+g==="/*"){a+=e.slice(o,p),o=p,i=io,p++;continue}else if(i===io&&c+g==="*/"){p++,i=!1,a+=r(e,o,p+1),o=p+1;continue}else s&&!i&&(h!==-1?c==="}"||c==="]"?(a+=e.slice(o,p),l+=r(a,0,1)+a.slice(1),a="",o=p,h=-1):c!==" "&&c!==" "&&c!=="\r"&&c!==`
59
- `&&(a+=e.slice(o,p),o=p,h=-1):c===","&&(l+=a+e.slice(o,p),a="",o=p,h=p));}return l+a+(i?r(e.slice(o)):e.slice(o))}var Fr="hot.js.liquid",oo="hot.js",fn=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];var uo=["style","script","svg","metafields","pages","sections","redirects","vscode"],ao=[["input","source"],["output","theme"],["export","export"],["import","import"],["config","."]],lo=["assets","config","layout","customers","locales","sections","snippets","templates","metafields","pages","redirects"],co=["templates","templates/customers","assets","config","layout","locales","sections","snippets"];var Dn=["b","kb","mb","gb","tb"],po=["You cannot use script minification without esbuild installed","and configured as a processor. Install esbuild and configure Syncify","to apply transforms to leverage script minification."],dn="__injected_dirname__",mn="__injected_filename__",hn="__injected_import_meta_url__",wr=/([|,])/g,us=/\.(mjs|cjs|ts|js|tsx|jsx)$/,fo=/(\()(line\s[0-9]+)(\))(:)/g,Do=/('[\w\s.-]*?'|"[\w\s.-]*?")/g,mo=/({{2}-?)([a-zA-Z0-9_\-.'"[\]]+)(-?}{2})/g,ho=/((?:www|http:|https:)+[^\s]+[\w])/g,go=/(\/)(.*?)(\/)/g,gn={404:"The requested resource was not found.",400:"The request was not understood by the server, generally due to bad syntax or because the Content-Type header was not correctly set to application / json. This status is also returned when the request provides an invalid code parameter during the OAuth token exchange process.",303:"The response to the request can be found under a different URL in the Location header and can be retrieved using a GET method on that resource.",401:"The necessary authentication credentials are not present in the request or are incorrect",402:"The requested shop is currently frozen. The shop owner needs to log in to the shop's admin, and pay the outstanding balance to unfreeze the shop.",406:"The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.",423:"The requested shop is currently locked. Shops are locked if they repeatedly exceed their API request limit. or if there is an issue with the account, such as a detected compromise or fraud risk.",403:"The server is refusing to respond to the request. This is generally because you have not requested the appropriate scope for this action.",501:"The requested endpoint is not available on that particular shop, e.g. requesting access to a Shopify Plus\u2013only API on a non-Plus shop. This response may also indicate that this endpoint is reserved for future use.",503:"The server is currently unavailable. Check the Shopify status page for reported service outages. See https://www.shopifystatus.com"};var Cr=new events.EventEmitter;function yo(e){try{return JSON.parse(os(e).trim())}catch(t){throw new Error(t)}}function xo(e){return /\[(?:file|dir|ext)\]/.test(e)}function Xe(e,t,s=!1){return t>1?`${e}s`:e}function Nt(e){return we(e)?e.toString():G(e)||S(e)?JSON.stringify(e):String(e)}async function Fo(e,{format:t}){return t==="esm"?s=>import(s):xn(e)}function wo(e){return e===".mjs"||e===".cjs"?"js":e.slice(1)}function as(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Er(e){return Ke(Se(e))}function Se(e){return P(e)?Buffer.from(e).toString().length:e.toString().length}function Ke(e){if(e===0)return "0b";let t=parseInt(`${Math.floor(Math.log(e)/Math.log(1024))}`,10);return t===0?`${F(String(e))}${Dn[t]}`:`${F((e/1024**t).toFixed(1))}${Dn[t]}`}function $e(e,t){let s=Se(e),r=Ke(yl__default.default.gzipSync(e).length),n=Ke(t),i=Ke(s),o=Ke(t-s);return {isSmaller:s>t||s===t,gzip:r,before:n,after:i,saved:o}}function br(){let e=new Date,t=e.getHours(),s=e.getMinutes(),r=e.getSeconds(),n=D(":");return (t<10?`0${t}`:t)+n+(s<10?`0${s}`:s)+n+(r<10?`0${r}`:r)}function yn(e){let t=e%10,s=e%100;return e+(t===1&&s!==11?"st":t===2&&s!==12?"nd":t===3&&s!==13?"rd":"th")}function xn(e){return Ee(globalThis.require)?globalThis.require(e):module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href)))(e)}function We(){return Math.random().toString(36).slice(2)}function Fn(){return new Promise(e=>{typeof setImmediate=="function"?setImmediate(e):setTimeout(e);})}var wn=new Map,Eo=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];function bo(e){let t=new stream.PassThrough,s=new stream.PassThrough;t.write=n=>e("stdout",n),s.write=n=>e("stderr",n);let r=new console$1.Console(t,s);for(let n of Eo)wn.set(n,console[n]),console[n]=r[n];return ()=>{for(let n of Eo)console[n]=wn.get(n);wn.clear();}}var ls=[],cs={},Lt=e=>X(e||!0),U=e=>{e?cs[e]=perf_hooks.performance.now():ls.push(perf_hooks.performance.now());};function X(e=!1,t=!1){let s;typeof e=="boolean"?s=e?ls[ls.length-1]:ls.pop():e&&(t?(s=cs[e],delete cs[e]):s=cs[e]);let r=perf_hooks.performance.now()-s;if(r<1e3)return `${r.toFixed(0)}ms`;let n=r/1e3;if(n<60)return `${n.toFixed(0)}s ${+r.toFixed(0).slice(1,4)}ms`;let i=(n/60).toFixed(0);return `${i}m ${(n-60*Number(i)).toFixed(0)}s ${+r.toFixed(0).slice(1,4)}ms`}var I={};ar(I,{errors:()=>Wt,esbuild:()=>fc,postcss:()=>Dc,request:()=>lc,sass:()=>pc,spawn:()=>Jn,write:()=>cc});function En(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var wl=()=>Fl__default.default.homedir().replace(/\\/g,"/"),So=wl;var vo=/\s+at.*[(\s](.*)\)?/,Bo=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function bn(e,{pretty:t=!1,basePath:s,pathFilter:r}={}){let n=s&&new RegExp(`(file://)?${En(s.replace(/\\/g,"/"))}/?`,"g"),i=t?So():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
60
- `).filter(o=>{let a=o.match(vo);if(a===null||!a[1])return !0;let l=a[1];return l.includes(".app/Contents/Resources/electron.asar")||l.includes(".app/Contents/Resources/default_app.asar")||l.includes("node_modules/electron/dist/resources/electron.asar")||l.includes("node_modules/electron/dist/resources/default_app.asar")?!1:r?!Bo.test(l)&&r(l):!Bo.test(l)}).filter(o=>o.trim()!=="").map(o=>(n&&(o=o.replace(n,"")),t&&(o=o.replace(vo,(a,l)=>a.replace(l,l.replace(i,"~")))),o)).join(`
61
- `)}function Sn({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var Cl=Sn();function Et(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Cl,"")}var _o=Ot(Ao(),1),ko=Ot(Ro(),1);function bt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Et(e),e.length===0))return 0;e=e.replace((0, ko.default)()," ");let s=t.ambiguousIsNarrow?1:2,r=0;for(let n of e){let i=n.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(_o.default.eastAsianWidth(n)){case"F":case"W":r+=2;break;case"A":r+=s;break;default:r+=1;}}return r}var Oo=(e=0)=>t=>`\x1B[${t+e}m`,Po=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Io=(e=0)=>(t,s,r)=>`\x1B[${38+e};2;${t};${s};${r}m`,ee={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ee.modifier);var El=Object.keys(ee.color),bl=Object.keys(ee.bgColor);[...El,...bl];function Sl(){let e=new Map;for(let[t,s]of Object.entries(ee)){for(let[r,n]of Object.entries(s))ee[r]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[r]=ee[r],e.set(n[0],n[1]);Object.defineProperty(ee,t,{value:s,enumerable:!1});}return Object.defineProperty(ee,"codes",{value:e,enumerable:!1}),ee.color.close="\x1B[39m",ee.bgColor.close="\x1B[49m",ee.color.ansi=Oo(),ee.color.ansi256=Po(),ee.color.ansi16m=Io(),ee.bgColor.ansi=Oo(10),ee.bgColor.ansi256=Po(10),ee.bgColor.ansi16m=Io(10),Object.defineProperties(ee,{rgbToAnsi256:{value:(t,s,r)=>t===s&&s===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let s=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!s)return [0,0,0];let[r]=s;r.length===3&&(r=[...r].map(i=>i+i).join(""));let n=Number.parseInt(r,16);return [n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>ee.rgbToAnsi256(...ee.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let s,r,n;if(t>=232)s=((t-232)*10+8)/255,r=s,n=s;else {t-=16;let a=t%36;s=Math.floor(t/36)/5,r=Math.floor(a/6)/5,n=a%6/5;}let i=Math.max(s,r,n)*2;if(i===0)return 30;let o=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(s));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,s,r)=>ee.ansi256ToAnsi(ee.rgbToAnsi256(t,s,r)),enumerable:!1},hexToAnsi:{value:t=>ee.ansi256ToAnsi(ee.hexToAnsi256(t)),enumerable:!1}}),ee}var vl=Sl(),Sr=vl;var ps=new Set(["\x1B","\x9B"]),Bl=39,$n="\x07",Lo="[",$l="]",Mo="m",An=`${$l}8;;`,jo=e=>`${ps.values().next().value}${Lo}${e}${Mo}`,No=e=>`${ps.values().next().value}${An}${e}${$n}`,Al=e=>e.split(" ").map(t=>bt(t)),Bn=(e,t,s)=>{let r=[...t],n=!1,i=!1,o=bt(Et(e[e.length-1]));for(let[a,l]of r.entries()){let h=bt(l);if(o+h<=s?e[e.length-1]+=l:(e.push(l),o=0),ps.has(l)&&(n=!0,i=r.slice(a+1).join("").startsWith(An)),n){i?l===$n&&(n=!1,i=!1):l===Mo&&(n=!1);continue}o+=h,o===s&&a<r.length-1&&(e.push(""),o=0);}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop());},Tl=e=>{let t=e.split(" "),s=t.length;for(;s>0&&!(bt(t[s-1])>0);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},Rl=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return "";let r="",n,i,o=Al(e),a=[""];for(let[h,p]of e.split(" ").entries()){s.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let c=bt(a[a.length-1]);if(h!==0&&(c>=t&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),c=0),(c>0||s.trim===!1)&&(a[a.length-1]+=" ",c++)),s.hard&&o[h]>t){let g=t-c,m=1+Math.floor((o[h]-g-1)/t);Math.floor((o[h]-1)/t)<m&&a.push(""),Bn(a,p,t);continue}if(c+o[h]>t&&c>0&&o[h]>0){if(s.wordWrap===!1&&c<t){Bn(a,p,t);continue}a.push("");}if(c+o[h]>t&&s.wordWrap===!1){Bn(a,p,t);continue}a[a.length-1]+=p;}s.trim!==!1&&(a=a.map(h=>Tl(h)));let l=[...a.join(`
62
- `)];for(let[h,p]of l.entries()){if(r+=p,ps.has(p)){let{groups:g}=new RegExp(`(?:\\${Lo}(?<code>\\d+)m|\\${An}(?<uri>.*)${$n})`).exec(l.slice(h).join(""))||{groups:{}};if(g.code!==void 0){let m=Number.parseFloat(g.code);n=m===Bl?void 0:m;}else g.uri!==void 0&&(i=g.uri.length===0?void 0:g.uri);}let c=Sr.codes.get(Number(n));l[h+1]===`
63
- `?(i&&(r+=No("")),n&&c&&(r+=jo(c))):p===`
64
- `&&(n&&c&&(r+=jo(n)),i&&(r+=No(i)));}return r};function pt(e,t,s){return String(e).normalize().replace(/\r\n/g,`
50
+ var ef__default = /*#__PURE__*/_interopDefault(ef);
51
+ var jf__default = /*#__PURE__*/_interopDefault(jf);
52
+ var uf__default = /*#__PURE__*/_interopDefault(uf);
53
+
54
+ var el=Object.create;var Zs=Object.defineProperty;var tl=Object.getOwnPropertyDescriptor;var rl=Object.getOwnPropertyNames;var sl=Object.getPrototypeOf,nl=Object.prototype.hasOwnProperty;var en=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),cr=(e,t)=>{for(var s in t)Zs(e,s,{get:t[s],enumerable:!0});},il=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of rl(t))!nl.call(e,n)&&n!==s&&Zs(e,n,{get:()=>t[n],enumerable:!(r=tl(t,n))||r.enumerable});return e};var Pt=(e,t,s)=>(s=e!=null?el(sl(e)):{},il(t||!e||!e.__esModule?Zs(s,"default",{value:e,enumerable:!0}):s,e));var Qi=Ye((QD,on)=>{var ll=Object.prototype.hasOwnProperty,Ce="~";function Dr(){}Object.create&&(Dr.prototype=Object.create(null),new Dr().__proto__||(Ce=!1));function cl(e,t,s){this.fn=e,this.context=t,this.once=s||!1;}function Yi(e,t,s,r,n){if(typeof s!="function")throw new TypeError("The listener must be a function");var i=new cl(s,r||e,n),o=Ce?Ce+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],i]:e._events[o].push(i):(e._events[o]=i,e._eventsCount++),e}function Yr(e,t){--e._eventsCount===0?e._events=new Dr:delete e._events[t];}function xe(){this._events=new Dr,this._eventsCount=0;}xe.prototype.eventNames=function(){var t=[],s,r;if(this._eventsCount===0)return t;for(r in s=this._events)ll.call(s,r)&&t.push(Ce?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t};xe.prototype.listeners=function(t){var s=Ce?Ce+t:t,r=this._events[s];if(!r)return [];if(r.fn)return [r.fn];for(var n=0,i=r.length,o=new Array(i);n<i;n++)o[n]=r[n].fn;return o};xe.prototype.listenerCount=function(t){var s=Ce?Ce+t:t,r=this._events[s];return r?r.fn?1:r.length:0};xe.prototype.emit=function(t,s,r,n,i,o){var a=Ce?Ce+t:t;if(!this._events[a])return !1;var l=this._events[a],m=arguments.length,c,p;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),m){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,s),!0;case 3:return l.fn.call(l.context,s,r),!0;case 4:return l.fn.call(l.context,s,r,n),!0;case 5:return l.fn.call(l.context,s,r,n,i),!0;case 6:return l.fn.call(l.context,s,r,n,i,o),!0}for(p=1,c=new Array(m-1);p<m;p++)c[p-1]=arguments[p];l.fn.apply(l.context,c);}else {var g=l.length,h;for(p=0;p<g;p++)switch(l[p].once&&this.removeListener(t,l[p].fn,void 0,!0),m){case 1:l[p].fn.call(l[p].context);break;case 2:l[p].fn.call(l[p].context,s);break;case 3:l[p].fn.call(l[p].context,s,r);break;case 4:l[p].fn.call(l[p].context,s,r,n);break;default:if(!c)for(h=1,c=new Array(m-1);h<m;h++)c[h-1]=arguments[h];l[p].fn.apply(l[p].context,c);}}return !0};xe.prototype.on=function(t,s,r){return Yi(this,t,s,r,!1)};xe.prototype.once=function(t,s,r){return Yi(this,t,s,r,!0)};xe.prototype.removeListener=function(t,s,r,n){var i=Ce?Ce+t:t;if(!this._events[i])return this;if(!s)return Yr(this,i),this;var o=this._events[i];if(o.fn)o.fn===s&&(!n||o.once)&&(!r||o.context===r)&&Yr(this,i);else {for(var a=0,l=[],m=o.length;a<m;a++)(o[a].fn!==s||n&&!o[a].once||r&&o[a].context!==r)&&l.push(o[a]);l.length?this._events[i]=l.length===1?l[0]:l:Yr(this,i);}return this};xe.prototype.removeAllListeners=function(t){var s;return t?(s=Ce?Ce+t:t,this._events[s]&&Yr(this,s)):(this._events=new Dr,this._eventsCount=0),this};xe.prototype.off=xe.prototype.removeListener;xe.prototype.addListener=xe.prototype.on;xe.prefixed=Ce;xe.EventEmitter=xe;typeof on<"u"&&(on.exports=xe);});var To=Ye((Td,Bn)=>{var ct={};typeof Bn>"u"?window.eastasianwidth=ct:Bn.exports=ct;ct.eastAsianWidth=function(e){var t=e.charCodeAt(0),s=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=s&&s<=57343&&(t&=1023,s&=1023,r=t<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"};ct.characterLength=function(e){var t=this.eastAsianWidth(e);return t=="F"||t=="W"||t=="A"?2:1};function Ao(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}ct.length=function(e){for(var t=Ao(e),s=0,r=0;r<t.length;r++)s=s+this.characterLength(t[r]);return s};ct.slice=function(e,t,s){textLen=ct.length(e),t=t||0,s=s||1,t<0&&(t=textLen+t),s<0&&(s=textLen+s);for(var r="",n=0,i=Ao(e),o=0;o<i.length;o++){var a=i[o],l=ct.length(a);if(n>=t-(l==2?1:0))if(n+l<=s)r+=a;else break;n+=l;}return r};});var _o=Ye((Rd,Ro)=>{Ro.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var Jo=Ye(fs=>{Object.defineProperty(fs,"__esModule",{value:!0});var Rn=e=>{let[,t]=/([a-f\d]{3,6})/i.exec(e)||[],s=t?t.length:0;if(s===3)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(s!==6)return [0,0,0];let r=parseInt(t,16);return [r>>16&255,r>>8&255,255&r]},ft=(e,t,s)=>t>e?t:e>s?s:e,Rl=(e,t,s)=>{if(t==="")return e;let r=e.indexOf(t);if(r<0)return e;let n=t.length,i=0,o="";for(;~r;)o+=e.slice(i,r)+s,i=r+n,r=e.indexOf(t,i);return o+e.slice(i)},zo={open:"",close:""},b=(e=>{let t=h=>!!o.find(T=>h.test(T)),s=e||(typeof process<"u"?process:{}),{stdout:r,platform:n}=s,i=s.env||{},o=s.argv||[],a="FORCE_COLOR"in i,l=i.FORCE_COLOR,m=l==="true"||parseInt(l)>0,c="NO_COLOR"in i||a&&!m||t(/^-{1,2}(no-color|color=false|color=never)$/),p=a&&m||t(/^-{1,2}(color|color=true|color=always)$/),g=r&&"isTTY"in r&&/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM);return !c&&(p||g||n==="win32"||"CI"in i)})()?(e,t)=>({open:`\x1B[${e}m`,close:`\x1B[${t}m`}):()=>zo,_n=(e,t,s)=>b(`38;2;${e};${t};${s}`,39),Go=(e,t,s)=>b(`48;2;${e};${t};${s}`,49),_l={visible:zo,reset:b(0,0),inverse:b(7,27),hidden:b(8,28),bold:b(1,22),dim:b(2,22),faint:b(2,22),italic:b(3,23),underline:b(4,24),doubleUnderline:b(21,24),strikethrough:b(9,29),strike:b(9,29),frame:b(51,54),encircle:b(52,54),overline:b(53,55),black:b(30,39),red:b(31,39),green:b(32,39),yellow:b(33,39),blue:b(34,39),magenta:b(35,39),cyan:b(36,39),white:b(37,39),grey:b(90,39),gray:b(90,39),blackBright:b(90,39),redBright:b(91,39),greenBright:b(92,39),yellowBright:b(93,39),blueBright:b(94,39),magentaBright:b(95,39),cyanBright:b(96,39),whiteBright:b(97,39),bgBlack:b(40,49),bgRed:b(41,49),bgGreen:b(42,49),bgYellow:b(43,49),bgBlue:b(44,49),bgMagenta:b(45,49),bgCyan:b(46,49),bgWhite:b(47,49),bgBlackBright:b(100,49),bgRedBright:b(101,49),bgGreenBright:b(102,49),bgYellowBright:b(103,49),bgBlueBright:b(104,49),bgMagentaBright:b(105,49),bgCyanBright:b(106,49),bgWhiteBright:b(107,49)},{defineProperty:kl,defineProperties:Ol,setPrototypeOf:Uo}=Object,Pl=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,Il=/(\r*\n)/g,Vo=function(){let e=t=>t;return e.strip=t=>t.replace(Pl,""),e.extend=t=>{for(let s in t){let r=t[s],n=r.open!=null?r:_n(...Rn(r));et[s]={get(){let i=Ho(this,n);return kl(this,s,{value:i}),i}};}kn=Ol(()=>{},et),Uo(e,kn);},e.extend(_l),e},Ho=({props:e},{open:t,close:s})=>{let r=(o,...a)=>jl(o,a,r.props),n=t,i=s;return e!==void 0&&(n=e.openStack+t,i=s+e.closeStack),Uo(r,kn),r.props={open:t,close:s,openStack:n,closeStack:i,parent:e},r.open=n,r.close=i,r},jl=(e,t,s)=>{if(!e)return "";let{openStack:r,closeStack:n}=s,i=e.raw!=null?String.raw(e,...t):e;if(~i.indexOf("\x1B"))for(;s!==void 0;)i=Rl(i,s.close,s.open),s=s.parent;return ~i.indexOf(`
55
+ `)&&(i=i.replace(Il,n+"$1"+r)),r+i+n},Wo={ansi:e=>(t=>b(`38;5;${t}`,39))(ft(e,0,255)),bgAnsi:e=>(t=>b(`48;5;${t}`,49))(ft(e,0,255)),hex:e=>_n(...Rn(e)),bgHex:e=>Go(...Rn(e)),rgb:(e,t,s)=>_n(ft(e,0,255),ft(t,0,255),ft(s,0,255)),bgRgb:(e,t,s)=>Go(ft(e,0,255),ft(t,0,255),ft(s,0,255))},et={},kn;for(let e in Wo)et[e]={get(){return (...t)=>Ho(this,Wo[e](...t))}};et.ansi256=et.fg=et.ansi,et.bgAnsi256=et.bg=et.bgAnsi;var Nl=new Vo;fs.Ansis=Vo,fs.default=Nl;});var Qo=Ye((Gd,On)=>{var Yo=Jo();On.exports=Yo.default;On.exports.Ansis=Yo.Ansis;});var su=Ye((pm,Kn)=>{var ru=(e,t)=>{for(let s of Reflect.ownKeys(t))Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s));return e};Kn.exports=ru;Kn.exports.default=ru;});var iu=Ye((fm,Cs)=>{var Dc=su(),ws=new WeakMap,nu=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let s,r=0,n=e.displayName||e.name||"<anonymous>",i=function(...o){if(ws.set(i,++r),r===1)s=e.apply(this,o),e=null;else if(t.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return s};return Dc(i,e),ws.set(i,r),i};Cs.exports=nu;Cs.exports.default=nu;Cs.exports.callCount=e=>{if(!ws.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ws.get(e)};});var ou=Ye((Dm,Es)=>{Es.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Es.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Es.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");});var pu=Ye((dm,Jt)=>{var te=global.process,$t=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};$t(te)?(uu=en("assert"),Vt=ou(),au=/^win/i.test(te.platform),_r=en("events"),typeof _r!="function"&&(_r=_r.EventEmitter),te.__signal_exit_emitter__?de=te.__signal_exit_emitter__:(de=te.__signal_exit_emitter__=new _r,de.count=0,de.emitted={}),de.infinite||(de.setMaxListeners(1/0),de.infinite=!0),Jt.exports=function(e,t){if(!$t(global.process))return function(){};uu.equal(typeof e,"function","a callback must be provided for exit handler"),Ht===!1&&Xn();var s="exit";t&&t.alwaysLast&&(s="afterexit");var r=function(){de.removeListener(s,e),de.listeners("exit").length===0&&de.listeners("afterexit").length===0&&bs();};return de.on(s,e),r},bs=function(){!Ht||!$t(global.process)||(Ht=!1,Vt.forEach(function(t){try{te.removeListener(t,Ss[t]);}catch{}}),te.emit=vs,te.reallyExit=Zn,de.count-=1);},Jt.exports.unload=bs,At=function(t,s,r){de.emitted[t]||(de.emitted[t]=!0,de.emit(t,s,r));},Ss={},Vt.forEach(function(e){Ss[e]=function(){if($t(global.process)){var s=te.listeners(e);s.length===de.count&&(bs(),At("exit",null,e),At("afterexit",null,e),au&&e==="SIGHUP"&&(e="SIGINT"),te.kill(te.pid,e));}};}),Jt.exports.signals=function(){return Vt},Ht=!1,Xn=function(){Ht||!$t(global.process)||(Ht=!0,de.count+=1,Vt=Vt.filter(function(t){try{return te.on(t,Ss[t]),!0}catch{return !1}}),te.emit=cu,te.reallyExit=lu);},Jt.exports.load=Xn,Zn=te.reallyExit,lu=function(t){$t(global.process)&&(te.exitCode=t||0,At("exit",te.exitCode,null),At("afterexit",te.exitCode,null),Zn.call(te,te.exitCode));},vs=te.emit,cu=function(t,s){if(t==="exit"&&$t(global.process)){s!==void 0&&(te.exitCode=s);var r=vs.apply(this,arguments);return At("exit",te.exitCode,null),At("afterexit",te.exitCode,null),r}else return vs.apply(this,arguments)}):Jt.exports=function(){return function(){}};var uu,Vt,au,_r,de,bs,At,Ss,Ht,Xn,Zn,lu,vs,cu;});function De(e){if(e===null)return "Null";if(e===void 0)return "Undefined";if(Number.isNaN(e))return "NaN";let t=Object.prototype.toString.call(e).slice(8,-1);return t==="AsyncFunction"?"Promise":t}var{isArray:it}=Array;function It(e){return it(e)?e.length>0:De(e)==="Object"?Object.keys(e).length>0:!!e}function ot(...e){let t=0;for(;t<e.length;){let s=e[t];if(De(s)==="Function"){if(It(s()))return !1}else if(It(s))return !1;t++;}return !0}function ge(...e){let t=0;for(;t<e.length;){let s=e[t];if(De(s)==="Function"){if(It(s()))return !0}else if(It(s))return !0;t++;}return !1}function qr(e,t="."){return typeof e=="string"?e.split(t):e}function tn(e,t){if(arguments.length===1)return i=>tn(e,i);if(t==null)return;let s=t,r=0,n=qr(e);for(;r<n.length;){if(s==null||s[n[r]]===null)return;s=s[n[r]],r++;}return s}function pr(e,t){if(!it(t))throw new Error(`Cannot read property 'indexOf' of ${t}`);let s=De(e);if(!["Object","Array","NaN","RegExp"].includes(s))return t.indexOf(e);let r=-1,n=-1,{length:i}=t;for(;++r<i&&n===-1;)Gr(t[r],e)&&(n=r);return n}function qi(e){let t=[],s;for(;!(s=e.next()).done;)t.push(s.value);return t}function ol(e,t){if(e.size!==t.size)return !1;let s=qi(e.values()),r=qi(t.values());return s.filter(i=>pr(i,r)===-1).length===0}function Gi(e){let t=e.__proto__.toString();return ["Error","TypeError"].includes(t)?[t,e.message]:[]}function Wi(e){return e.toDateString?[!0,e.getTime()]:[!1]}function zi(e){return e.constructor!==RegExp?[!1]:[!0,e.toString()]}function Gr(e,t){if(arguments.length===1)return m=>Gr(e,m);let s=De(e);if(s!==De(t))return !1;if(s==="Function")return e.name===void 0?!1:e.name===t.name;if(["NaN","Undefined","Null"].includes(s))return !0;if(s==="Number")return Object.is(-0,e)!==Object.is(-0,t)?!1:e.toString()===t.toString();if(["String","Boolean"].includes(s))return e.toString()===t.toString();if(s==="Array"){let m=Array.from(e),c=Array.from(t);if(m.toString()!==c.toString())return !1;let p=!0;return m.forEach((g,h)=>{p&&g!==c[h]&&!Gr(g,c[h])&&(p=!1);}),p}let r=zi(e),n=zi(t);if(r[0])return n[0]?r[1]===n[1]:!1;if(n[0])return !1;let i=Wi(e),o=Wi(t);if(i[0])return o[0]?i[1]===o[1]:!1;if(o[0])return !1;let a=Gi(e),l=Gi(t);if(a[0])return l[0]?a[0]===l[0]&&a[1]===l[1]:!1;if(s==="Set")return ol(e,t);if(s==="Object"){let m=Object.keys(e);if(m.length!==Object.keys(t).length)return !1;let c=!0;return m.forEach(p=>{if(c){let g=e[p],h=t[p];g!==h&&!Gr(g,h)&&(c=!1);}}),c}return !1}function rn(e,t){if(arguments.length===1)return s=>rn(e,s);if(typeof t=="string")return t.includes(e);if(!t)throw new TypeError(`Cannot read property 'indexOf' of ${t}`);return it(t)?pr(e,t)>-1:!1}async function Ui(e,t){if(it(t)){let r=[],n=0;for(let i of t)r.push(await e(i,n++));return r}let s={};for(let r in t)s[r]=await e(t[r],r);return s}function Ge(e,t){return arguments.length===1?async s=>Ui(e,s):new Promise((s,r)=>{Ui(e,t).then(s).catch(r);})}function jt(e,t){return arguments.length===1?s=>jt(e,s):Object.assign({},e||{},t||{})}function ce(e,t){return arguments.length===1?s=>ce(e,s):De(t)===e}async function Vi(e,t){let s=t.map((r,n)=>e(r,n));return Promise.all(s)}function sn(e,t){return arguments.length===1?async s=>Vi(e,s):new Promise((s,r)=>{Vi(e,t).then(s).catch(r);})}function nn(e,t){if(arguments.length===1)return n=>nn(e,n);if(t==null)return;let s=qr(e,","),r={};for(let n in t)s.includes(n)||(r[n]=t[n]);return r}var Wr=class{constructor(){this.set=new Set,this.items={};}checkUniqueness(t){let s=De(t);if(["Null","Undefined","NaN"].includes(s))return s in this.items?!1:(this.items[s]=!0,!0);if(!["Object","Array"].includes(s)){let r=this.set.size;return this.set.add(t),this.set.size!==r}return s in this.items?pr(t,this.items[s])===-1?(this.items[s].push(t),!0):!1:(this.items[s]=[t],!0)}};function zr(e){let t=new Wr,s=[];return e.forEach(r=>{t.checkUniqueness(r)&&s.push(r);}),s}function f(e,t){return arguments.length===1?s=>f(e,s):t?t.hasOwnProperty(e):!1}function We(e,t){return arguments.length===1?s=>We(e,s):tn(e,t)!==void 0}function Z(e){let t=De(e);return ["Undefined","NaN","Number","Null"].includes(t)?!1:e?t==="Object"?Object.keys(e).length===0:t==="Array"?e.length===0:!1:!0}function N(e){return e==null}function Ur(e,t){return arguments.length===1?s=>Ur(e,s):t.join(e)}function Hi(e){return typeof e=="string"?e[e.length-1]||"":e[e.length-1]}var {error:Q,log:S,warn:Ji}=console,$="",ye=" ",x=`
56
+ `,Re=e=>ye.repeat(e),A=e=>x.repeat(e);Ur(x);var Pe=Ur($);var z=Object.assign,Nt=Object.defineProperty,_e=Object.keys,Vr=Object.values,ut=Array.from;Buffer.from;var v=Array.isArray,we=Buffer.isBuffer,H=ce("Undefined"),G=ce("Object"),me=ce("Boolean"),fr=ce("RegExp"),Hr=ce("Number"),P=ce("String"),Ee=ce("Function");ce("Async");var D={};cr(D,{build:()=>Sc,changed:()=>_c,clear:()=>st,deleted:()=>Mc,err:()=>vc,exported:()=>Ic,external:()=>$c,failed:()=>Vc,hline:()=>Un,hook:()=>Ac,hot:()=>kc,ignored:()=>zc,importer:()=>jc,invalid:()=>Uc,minified:()=>qc,newGroup:()=>Rc,nwl:()=>Kt,out:()=>S,process:()=>$u,progress:()=>Su,reloaded:()=>Gc,retrying:()=>Lc,skipped:()=>Wc,spawn:()=>Jc,spinner:()=>ni,start:()=>bu,syncing:()=>Pc,throws:()=>Hc,transform:()=>Nc,unhook:()=>Tc,update:()=>Tt,upload:()=>Oc,write:()=>Bc});var be={},pe={current:null,count:0,process:{}},Ie={json:{assets:!0,config:!0,locales:!0,metafields:!0,sectionGroups:!0,templates:!0,exclude:[]},script:{minifySyntax:!0,minifyIdentifiers:!0,minifyWhitespace:!0,mangleProps:void 0,legalComments:"none",mangleQuoted:!1,keepNames:!1,exclude:[]},liquid:{minifyScript:!0,minifyStyle:!0,minifySchema:!0,removeComments:!0,stripDashes:!0,exclude:[]},style:{exclude:[],format:!1,inline:!1},html:{caseSensitive:!1,collapseBooleanAttributes:!1,collapseInlineTagWhitespace:!1,conservativeCollapse:!1,keepClosingSlash:!1,noNewlinesBeforeTagClose:!1,preventAttributesEscaping:!1,removeEmptyAttributes:!1,removeEmptyElements:!1,removeOptionalTags:!1,removeRedundantAttributes:!0,removeScriptTypeAttributes:!0,removeStyleLinkTypeAttributes:!0,useShortDoctype:!0,collapseWhitespace:!0,continueOnParseError:!0,removeComments:!0,trimCustomFragments:!0,ignoreCustomFragments:[/(?<=\bstyle\b=["']\s?)[\s\S]*?(?="[\s\n>]?)/,/<style[\s\S]*?<\/style>/,/<script[\s\S]*?<\/script>/,/{%-?\s*liquid[\s\S]*?%}/,/{%[\s\S]*?%}/]}},K={json:{indent:2,useTab:!1,crlf:!1,exclude:null},postcss:{installed:!1,loaded:!1,file:!1,config:[]},sass:{installed:!1,loaded:!1,file:!1,config:{warnings:!0,style:"compressed",sourcemap:!0,include:["node_modules"]}},esbuild:{installed:!1,loaded:!1,file:!1,config:{bundle:!0,format:"esm",globalName:void 0,target:"es2016",metafile:!0,external:[],platform:"browser",splitting:!1,sourcemap:"linked",write:!1,logLevel:"silent",plugins:[]}},sharp:{installed:!1,required:!1,loaded:!1,file:!1,config:{}},sprite:{installed:!1,loaded:!1,file:!1,config:{mode:{inline:!0,symbol:{example:!1}},shape:{transform:["svgo"],id:{generator:"svg-%s"}},svg:{xmlDeclaration:!1,doctypeDeclaration:!1,dimensionAttributes:!1,namespaceClassnames:!1,namespaceIDs:!1}}},svgo:{installed:!1,loaded:!1,file:!1,config:{multipass:!0,datauri:"enc",js2svg:{indent:2,pretty:!0},plugins:["preset-default",{name:"pluginName",fn:()=>({root:{enter:e=>{},exit:e=>{}},element:{enter:e=>{},exit:e=>{}},doctype:{enter:e=>{},exit:e=>{}},instruction:{enter:e=>{},exit:e=>{}},comment:{enter:e=>{},exit:e=>{}},cdata:{enter:e=>{},exit:e=>{}},text:{enter:e=>{},exit:e=>{}}})}]}}},al={input:"source",output:"theme",import:"import",export:"export",config:".",hot:!1,stores:null,spawn:{build:null,watch:null},logger:{clear:!0,silent:!1,stats:!0,warnings:!0},paths:{assets:"assets/*",config:"config/*.json",layout:"layout/*.liquid",locales:"locales/*.json",snippets:"snippets/*.liquid",metafields:"metafields/**/*.json",redirects:"redirects.yaml",sections:["sections/**/*.json","sections/**/*.liquid"],pages:["pages/*.html","pages/*.md"],templates:["templates/customers/*.liquid","templates/customers/*.json"],customers:["templates/customers/*.liquid","templates/customers/*.json"]},views:{sections:{prefixDir:!1,separator:"-",global:[]},snippets:{prefixDir:!1,separator:"-",global:[]},pages:{author:"",language:"html"}},transforms:{svg:null,style:null,script:null},terser:{json:!1,views:!1,script:!1}},wt={onBuild:[],onChange:[],onReload:[],onTransform:[],onWatch:[]},u=new class ze{static defaults=al;static package={};static terser=Ie;wss=null;filters={};commands=null;version=null;cwd=null;argv=Ds.argv.slice(2).join(" ");errors=new Set;env={cli:!1,dev:!0,prod:!1,sync:0};hot={inject:!0,server:3e3,socket:8089,history:!1,method:"hot",scroll:"preserved",layouts:["theme.liquid"],label:"visible",renderer:"{% render 'hot.js', server: 3000, socket: 8089 %}",snippet:null,output:null,alive:{}};logger={clear:!0,silent:!1,stats:!0,warnings:!0};mode={build:!1,interactive:!1,watch:!1,clean:!1,upload:!1,download:!1,metafields:!1,terse:!1,hot:!1,pages:!1,pull:!1,force:!1,vsc:!1,views:!1,script:!1,image:!1,style:!1,svg:!1,redirects:!1,export:!1};file={base:null,path:null,relative:null};dirs={};cmd={config:null,delete:null,filter:null,input:null,output:null};sync={themes:[],stores:[]};spawn={paths:new Set,streams:new Map,invoked:!1,commands:{}};section={prefixDir:!1,separator:"-",global:null};snippet={prefixDir:!1,separator:"-",global:null};watch=new Set;paths={transforms:new Map};page={export:{quotes:"\u201C\u201D\u2018\u2019",html:!0,linkify:!1,typographer:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-"},import:{codeBlockStyle:"fenced",emDelimiter:"_",fence:"```",headingStyle:"atx",hr:"***",linkReferenceStyle:"full",linkStyle:"inlined",strongDelimiter:"**",bulletListMarker:"-"}};script=[];style=[];svg=[];image;terse={json:!1,views:!1,style:!1,script:!1};get terser(){return ze.terser}set terser(t){ze.terser=jt(ze.terser,t);}get processor(){return K}set config(t){ze.defaults=jt(ze.defaults,t);}get config(){return ze.defaults}set pkg(t){ze.package=jt(ze.package,t);}get pkg(){return ze.package}get plugins(){return wt}};var io=Pt(Qi(),1);var dr=class extends Error{constructor(t){super(t),this.name="TimeoutError";}},un=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},Ki=e=>globalThis.DOMException===void 0?new un(e):new DOMException(e),Xi=e=>{let t=e.reason===void 0?Ki("This operation was aborted."):e.reason;return t instanceof Error?t:Ki(t)};function an(e,t,s,r){let n,i=new Promise((o,a)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t===Number.POSITIVE_INFINITY){o(e);return}if(r={customTimers:{setTimeout,clearTimeout},...r},r.signal){let{signal:l}=r;l.aborted&&a(Xi(l)),l.addEventListener("abort",()=>{a(Xi(l));});}n=r.customTimers.setTimeout.call(void 0,()=>{if(typeof s=="function"){try{o(s());}catch(c){a(c);}return}let l=typeof s=="string"?s:`Promise timed out after ${t} milliseconds`,m=s instanceof Error?s:new dr(l);typeof e.cancel=="function"&&e.cancel(),a(m);},t),(async()=>{try{o(await e);}catch(l){a(l);}finally{r.customTimers.clearTimeout.call(void 0,n);}})();});return i.clear=()=>{clearTimeout(n),n=void 0;},i}function ln(e,t,s){let r=0,n=e.length;for(;n>0;){let i=Math.trunc(n/2),o=r+i;s(e[o],t)<=0?(r=++o,n-=i+1):n=i;}return r}var Ct=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},Qe,mr=class{constructor(){Qe.set(this,[]);}enqueue(t,s){s={priority:0,...s};let r={priority:s.priority,run:t};if(this.size&&Ct(this,Qe,"f")[this.size-1].priority>=s.priority){Ct(this,Qe,"f").push(r);return}let n=ln(Ct(this,Qe,"f"),r,(i,o)=>o.priority-i.priority);Ct(this,Qe,"f").splice(n,0,r);}dequeue(){let t=Ct(this,Qe,"f").shift();return t?.run}filter(t){return Ct(this,Qe,"f").filter(s=>s.priority===t.priority).map(s=>s.run)}get size(){return Ct(this,Qe,"f").length}};Qe=new WeakMap;var se=function(e,t,s,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},w=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},oe,gr,yr,lt,ts,xr,Qr,je,hr,ve,Kr,Be,Fr,at,Xr,Zi,eo,so,to,ro,Zr,cn,pn,rs,no,es,ss=class extends Error{},wr=class extends io.default{constructor(t){var s,r,n,i;if(super(),oe.add(this),gr.set(this,void 0),yr.set(this,void 0),lt.set(this,0),ts.set(this,void 0),xr.set(this,void 0),Qr.set(this,0),je.set(this,void 0),hr.set(this,void 0),ve.set(this,void 0),Kr.set(this,void 0),Be.set(this,0),Fr.set(this,void 0),at.set(this,void 0),Xr.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:mr,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(r=(s=t.intervalCap)===null||s===void 0?void 0:s.toString())!==null&&r!==void 0?r:""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i=(n=t.interval)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:""}\` (${typeof t.interval})`);se(this,gr,t.carryoverConcurrencyCount,"f"),se(this,yr,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),se(this,ts,t.intervalCap,"f"),se(this,xr,t.interval,"f"),se(this,ve,new t.queueClass,"f"),se(this,Kr,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,se(this,Xr,t.throwOnTimeout===!0,"f"),se(this,at,t.autoStart===!1,"f");}get concurrency(){return w(this,Fr,"f")}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);se(this,Fr,t,"f"),w(this,oe,"m",rs).call(this);}async add(t,s={}){return s={timeout:this.timeout,throwOnTimeout:w(this,Xr,"f"),...s},new Promise((r,n)=>{w(this,ve,"f").enqueue(async()=>{var i,o,a;se(this,Be,(o=w(this,Be,"f"),o++,o),"f"),se(this,lt,(a=w(this,lt,"f"),a++,a),"f");try{if(!((i=s.signal)===null||i===void 0)&&i.aborted)throw new ss("The task was aborted.");let l=t({signal:s.signal});s.timeout&&(l=an(Promise.resolve(l),s.timeout)),s.signal&&(l=Promise.race([l,w(this,oe,"m",no).call(this,s.signal)]));let m=await l;r(m),this.emit("completed",m);}catch(l){if(l instanceof dr&&!s.throwOnTimeout){r();return}n(l),this.emit("error",l);}finally{w(this,oe,"m",so).call(this);}},s),this.emit("add"),w(this,oe,"m",Zr).call(this);})}async addAll(t,s){return Promise.all(t.map(async r=>this.add(r,s)))}start(){return w(this,at,"f")?(se(this,at,!1,"f"),w(this,oe,"m",rs).call(this),this):this}pause(){se(this,at,!0,"f");}clear(){se(this,ve,new(w(this,Kr,"f")),"f");}async onEmpty(){w(this,ve,"f").size!==0&&await w(this,oe,"m",es).call(this,"empty");}async onSizeLessThan(t){w(this,ve,"f").size<t||await w(this,oe,"m",es).call(this,"next",()=>w(this,ve,"f").size<t);}async onIdle(){w(this,Be,"f")===0&&w(this,ve,"f").size===0||await w(this,oe,"m",es).call(this,"idle");}get size(){return w(this,ve,"f").size}sizeBy(t){return w(this,ve,"f").filter(t).length}get pending(){return w(this,Be,"f")}get isPaused(){return w(this,at,"f")}};gr=new WeakMap,yr=new WeakMap,lt=new WeakMap,ts=new WeakMap,xr=new WeakMap,Qr=new WeakMap,je=new WeakMap,hr=new WeakMap,ve=new WeakMap,Kr=new WeakMap,Be=new WeakMap,Fr=new WeakMap,at=new WeakMap,Xr=new WeakMap,oe=new WeakSet,Zi=function(){return w(this,yr,"f")||w(this,lt,"f")<w(this,ts,"f")},eo=function(){return w(this,Be,"f")<w(this,Fr,"f")},so=function(){var t;se(this,Be,(t=w(this,Be,"f"),t--,t),"f"),w(this,oe,"m",Zr).call(this),this.emit("next");},to=function(){w(this,oe,"m",pn).call(this),w(this,oe,"m",cn).call(this),se(this,hr,void 0,"f");},ro=function(){let t=Date.now();if(w(this,je,"f")===void 0){let s=w(this,Qr,"f")-t;if(s<0)se(this,lt,w(this,gr,"f")?w(this,Be,"f"):0,"f");else return w(this,hr,"f")===void 0&&se(this,hr,setTimeout(()=>{w(this,oe,"m",to).call(this);},s),"f"),!0}return !1},Zr=function(){if(w(this,ve,"f").size===0)return w(this,je,"f")&&clearInterval(w(this,je,"f")),se(this,je,void 0,"f"),this.emit("empty"),w(this,Be,"f")===0&&this.emit("idle"),!1;if(!w(this,at,"f")){let t=!w(this,oe,"a",ro);if(w(this,oe,"a",Zi)&&w(this,oe,"a",eo)){let s=w(this,ve,"f").dequeue();return s?(this.emit("active"),s(),t&&w(this,oe,"m",cn).call(this),!0):!1}}return !1},cn=function(){w(this,yr,"f")||w(this,je,"f")!==void 0||(se(this,je,setInterval(()=>{w(this,oe,"m",pn).call(this);},w(this,xr,"f")),"f"),se(this,Qr,Date.now()+w(this,xr,"f"),"f"));},pn=function(){w(this,lt,"f")===0&&w(this,Be,"f")===0&&w(this,je,"f")&&(clearInterval(w(this,je,"f")),se(this,je,void 0,"f")),se(this,lt,w(this,gr,"f")?w(this,Be,"f"):0,"f"),w(this,oe,"m",rs).call(this);},rs=function(){for(;w(this,oe,"m",Zr).call(this););},no=async function(t){return new Promise((s,r)=>{t.addEventListener("abort",()=>{r(new ss("The task was aborted."));},{once:!0});})},es=async function(t,s){return new Promise(r=>{let n=()=>{s&&!s()||(this.off(t,n),r());};this.on(t,n);})};var Ke=pl__default.default.create({responseType:"json",headers:{}}),W=new wr({concurrency:5,interval:250,intervalCap:2});function ns(e){return e===429||e===500?!0:(W.isPaused||W.pause(),!1)}var fn=Symbol("singleComment"),oo=Symbol("multiComment"),fl=()=>"",Dl=(e,t,s)=>e.slice(t,s).replace(/\S/g," "),dl=(e,t)=>{let s=t-1,r=0;for(;e[s]==="\\";)s-=1,r+=1;return !!(r%2)};function os(e,{whitespace:t=!0,trailingCommas:s=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let r=t?Dl:fl,n=!1,i=!1,o=0,a="",l="",m=-1;for(let c=0;c<e.length;c++){let p=e[c],g=e[c+1];if(!i&&p==='"'&&(dl(e,c)||(n=!n)),!n)if(!i&&p+g==="//")a+=e.slice(o,c),o=c,i=fn,c++;else if(i===fn&&p+g===`\r
57
+ `){c++,i=!1,a+=r(e,o,c),o=c;continue}else if(i===fn&&p===`
58
+ `)i=!1,a+=r(e,o,c),o=c;else if(!i&&p+g==="/*"){a+=e.slice(o,c),o=c,i=oo,c++;continue}else if(i===oo&&p+g==="*/"){c++,i=!1,a+=r(e,o,c+1),o=c+1;continue}else s&&!i&&(m!==-1?p==="}"||p==="]"?(a+=e.slice(o,c),l+=r(a,0,1)+a.slice(1),a="",o=c,m=-1):p!==" "&&p!==" "&&p!=="\r"&&p!==`
59
+ `&&(a+=e.slice(o,c),o=c,m=-1):p===","&&(l+=a+e.slice(o,c),a="",o=c,m=c));}return l+a+(i?r(e.slice(o)):e.slice(o))}var Cr="hot.js.liquid",uo="hot.js",Dn=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];var ao=["style","script","svg","metafields","pages","sections","redirects","vscode"],lo=[["input","source"],["output","theme"],["export","export"],["import","import"],["config","."]],co=["assets","config","layout","customers","locales","sections","snippets","templates","metafields","pages","redirects"],po=["templates","templates/customers","assets","config","layout","locales","sections","snippets"];var dn=["b","kb","mb","gb","tb"],fo=["You cannot use script minification without esbuild installed","and configured as a processor. Install esbuild and configure Syncify","to apply transforms to leverage script minification."],mn="__injected_dirname__",hn="__injected_filename__",gn="__injected_import_meta_url__",Er=/([|,])/g,us=/\.(mjs|cjs|ts|js|tsx|jsx)$/,Do=/(\()(line\s[0-9]+)(\))(:)/g,mo=/('[\w\s.-]*?'|"[\w\s.-]*?")/g,ho=/({{2}-?)([a-zA-Z0-9_\-.'"[\]]+)(-?}{2})/g,go=/((?:www|http:|https:)+[^\s]+[\w])/g,yo=/(\/)(.*?)(\/)/g,yn={404:"The requested resource was not found.",400:"The request was not understood by the server, generally due to bad syntax or because the Content-Type header was not correctly set to application / json. This status is also returned when the request provides an invalid code parameter during the OAuth token exchange process.",303:"The response to the request can be found under a different URL in the Location header and can be retrieved using a GET method on that resource.",401:"The necessary authentication credentials are not present in the request or are incorrect",402:"The requested shop is currently frozen. The shop owner needs to log in to the shop's admin, and pay the outstanding balance to unfreeze the shop.",406:"The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.",423:"The requested shop is currently locked. Shops are locked if they repeatedly exceed their API request limit. or if there is an issue with the account, such as a detected compromise or fraud risk.",403:"The server is refusing to respond to the request. This is generally because you have not requested the appropriate scope for this action.",501:"The requested endpoint is not available on that particular shop, e.g. requesting access to a Shopify Plus\u2013only API on a non-Plus shop. This response may also indicate that this endpoint is reserved for future use.",503:"The server is currently unavailable. Check the Shopify status page for reported service outages. See https://www.shopifystatus.com"};var br=new events.EventEmitter;function xo(e){try{return JSON.parse(os(e).trim())}catch(t){throw new Error(t)}}function Fo(e){return /\[(?:file|dir|ext)\]/.test(e)}function Ze(e,t,s=!1){return t>1?`${e}s`:e}function Lt(e){return we(e)?e.toString():G(e)||v(e)?JSON.stringify(e):String(e)}async function wo(e,{format:t}){return t==="esm"?s=>import(s):Fn(e)}function Co(e){return e===".mjs"||e===".cjs"?"js":e.slice(1)}function as(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Sr(e){return Xe(Se(e))}function Se(e){return P(e)?Buffer.from(e).toString().length:e.toString().length}function Xe(e){if(e===0)return "0b";let t=parseInt(`${Math.floor(Math.log(e)/Math.log(1024))}`,10);return t===0?`${F(String(e))}${dn[t]}`:`${F((e/1024**t).toFixed(1))}${dn[t]}`}function $e(e,t){let s=Se(e),r=Xe(gl__default.default.gzipSync(e).length),n=Xe(t),i=Xe(s),o=Xe(t-s);return {isSmaller:s>t||s===t,gzip:r,before:n,after:i,saved:o}}function vr(){let e=new Date,t=e.getHours(),s=e.getMinutes(),r=e.getSeconds(),n=d(":");return (t<10?`0${t}`:t)+n+(s<10?`0${s}`:s)+n+(r<10?`0${r}`:r)}function xn(e){let t=e%10,s=e%100;return e+(t===1&&s!==11?"st":t===2&&s!==12?"nd":t===3&&s!==13?"rd":"th")}function Fn(e){return Ee(globalThis.require)?globalThis.require(e):module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href)))(e)}function Ue(){return Math.random().toString(36).slice(2)}function wn(){return new Promise(e=>{typeof setImmediate=="function"?setImmediate(e):setTimeout(e);})}var Cn=new Map,bo=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];function So(e){let t=new stream.PassThrough,s=new stream.PassThrough;t.write=n=>e("stdout",n),s.write=n=>e("stderr",n);let r=new console$1.Console(t,s);for(let n of bo)Cn.set(n,console[n]),console[n]=r[n];return ()=>{for(let n of bo)console[n]=Cn.get(n);Cn.clear();}}var ls=[],cs={},Mt=e=>X(e||!0),U=e=>{e?cs[e]=perf_hooks.performance.now():ls.push(perf_hooks.performance.now());};function X(e=!1,t=!1){let s;typeof e=="boolean"?s=e?ls[ls.length-1]:ls.pop():e&&(t?(s=cs[e],delete cs[e]):s=cs[e]);let r=perf_hooks.performance.now()-s;if(r<1e3)return `${r.toFixed(0)}ms`;let n=r/1e3;if(n<60)return `${n.toFixed(0)}s ${+r.toFixed(0).slice(1,4)}ms`;let i=(n/60).toFixed(0);return `${i}m ${(n-60*Number(i)).toFixed(0)}s ${+r.toFixed(0).slice(1,4)}ms`}var I={};cr(I,{errors:()=>zt,esbuild:()=>pc,postcss:()=>fc,request:()=>ac,sass:()=>cc,spawn:()=>Yn,write:()=>lc});function bn(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Fl=()=>xl__default.default.homedir().replace(/\\/g,"/"),vo=Fl;var Bo=/\s+at.*[(\s](.*)\)?/,$o=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function Sn(e,{pretty:t=!1,basePath:s,pathFilter:r}={}){let n=s&&new RegExp(`(file://)?${bn(s.replace(/\\/g,"/"))}/?`,"g"),i=t?vo():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
60
+ `).filter(o=>{let a=o.match(Bo);if(a===null||!a[1])return !0;let l=a[1];return l.includes(".app/Contents/Resources/electron.asar")||l.includes(".app/Contents/Resources/default_app.asar")||l.includes("node_modules/electron/dist/resources/electron.asar")||l.includes("node_modules/electron/dist/resources/default_app.asar")?!1:r?!$o.test(l)&&r(l):!$o.test(l)}).filter(o=>o.trim()!=="").map(o=>(n&&(o=o.replace(n,"")),t&&(o=o.replace(Bo,(a,l)=>a.replace(l,l.replace(i,"~")))),o)).join(`
61
+ `)}function vn({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var wl=vn();function Et(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(wl,"")}var ko=Pt(To(),1),Oo=Pt(_o(),1);function bt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Et(e),e.length===0))return 0;e=e.replace((0, Oo.default)()," ");let s=t.ambiguousIsNarrow?1:2,r=0;for(let n of e){let i=n.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(ko.default.eastAsianWidth(n)){case"F":case"W":r+=2;break;case"A":r+=s;break;default:r+=1;}}return r}var Po=(e=0)=>t=>`\x1B[${t+e}m`,Io=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,jo=(e=0)=>(t,s,r)=>`\x1B[${38+e};2;${t};${s};${r}m`,ee={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ee.modifier);var Cl=Object.keys(ee.color),El=Object.keys(ee.bgColor);[...Cl,...El];function bl(){let e=new Map;for(let[t,s]of Object.entries(ee)){for(let[r,n]of Object.entries(s))ee[r]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[r]=ee[r],e.set(n[0],n[1]);Object.defineProperty(ee,t,{value:s,enumerable:!1});}return Object.defineProperty(ee,"codes",{value:e,enumerable:!1}),ee.color.close="\x1B[39m",ee.bgColor.close="\x1B[49m",ee.color.ansi=Po(),ee.color.ansi256=Io(),ee.color.ansi16m=jo(),ee.bgColor.ansi=Po(10),ee.bgColor.ansi256=Io(10),ee.bgColor.ansi16m=jo(10),Object.defineProperties(ee,{rgbToAnsi256:{value:(t,s,r)=>t===s&&s===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let s=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!s)return [0,0,0];let[r]=s;r.length===3&&(r=[...r].map(i=>i+i).join(""));let n=Number.parseInt(r,16);return [n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>ee.rgbToAnsi256(...ee.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let s,r,n;if(t>=232)s=((t-232)*10+8)/255,r=s,n=s;else {t-=16;let a=t%36;s=Math.floor(t/36)/5,r=Math.floor(a/6)/5,n=a%6/5;}let i=Math.max(s,r,n)*2;if(i===0)return 30;let o=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(s));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,s,r)=>ee.ansi256ToAnsi(ee.rgbToAnsi256(t,s,r)),enumerable:!1},hexToAnsi:{value:t=>ee.ansi256ToAnsi(ee.hexToAnsi256(t)),enumerable:!1}}),ee}var Sl=bl(),Br=Sl;var ps=new Set(["\x1B","\x9B"]),vl=39,An="\x07",Mo="[",Bl="]",qo="m",Tn=`${Bl}8;;`,No=e=>`${ps.values().next().value}${Mo}${e}${qo}`,Lo=e=>`${ps.values().next().value}${Tn}${e}${An}`,$l=e=>e.split(" ").map(t=>bt(t)),$n=(e,t,s)=>{let r=[...t],n=!1,i=!1,o=bt(Et(e[e.length-1]));for(let[a,l]of r.entries()){let m=bt(l);if(o+m<=s?e[e.length-1]+=l:(e.push(l),o=0),ps.has(l)&&(n=!0,i=r.slice(a+1).join("").startsWith(Tn)),n){i?l===An&&(n=!1,i=!1):l===qo&&(n=!1);continue}o+=m,o===s&&a<r.length-1&&(e.push(""),o=0);}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop());},Al=e=>{let t=e.split(" "),s=t.length;for(;s>0&&!(bt(t[s-1])>0);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},Tl=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return "";let r="",n,i,o=$l(e),a=[""];for(let[m,c]of e.split(" ").entries()){s.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=bt(a[a.length-1]);if(m!==0&&(p>=t&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),p=0),(p>0||s.trim===!1)&&(a[a.length-1]+=" ",p++)),s.hard&&o[m]>t){let g=t-p,h=1+Math.floor((o[m]-g-1)/t);Math.floor((o[m]-1)/t)<h&&a.push(""),$n(a,c,t);continue}if(p+o[m]>t&&p>0&&o[m]>0){if(s.wordWrap===!1&&p<t){$n(a,c,t);continue}a.push("");}if(p+o[m]>t&&s.wordWrap===!1){$n(a,c,t);continue}a[a.length-1]+=c;}s.trim!==!1&&(a=a.map(m=>Al(m)));let l=[...a.join(`
62
+ `)];for(let[m,c]of l.entries()){if(r+=c,ps.has(c)){let{groups:g}=new RegExp(`(?:\\${Mo}(?<code>\\d+)m|\\${Tn}(?<uri>.*)${An})`).exec(l.slice(m).join(""))||{groups:{}};if(g.code!==void 0){let h=Number.parseFloat(g.code);n=h===vl?void 0:h;}else g.uri!==void 0&&(i=g.uri.length===0?void 0:g.uri);}let p=Br.codes.get(Number(n));l[m+1]===`
63
+ `?(i&&(r+=Lo("")),n&&p&&(r+=No(p))):c===`
64
+ `&&(n&&p&&(r+=No(n)),i&&(r+=Lo(i)));}return r};function pt(e,t,s){return String(e).normalize().replace(/\r\n/g,`
65
65
  `).split(`
66
- `).map(r=>Rl(r,t,s)).join(`
67
- `)}var q={};ar(q,{clear:()=>rt,closer:()=>Gt,context:()=>Ne,hline:()=>zn,indent:()=>ht,message:()=>Vn,multiline:()=>Hn,opener:()=>qt,sample:()=>vt,shopify:()=>xs,stack:()=>Zo,suffix:()=>J,tree:()=>Un});var L={};ar(L,{ARL:()=>gs,ARR:()=>Ue,BAD:()=>nc,CHK:()=>sc,CHV:()=>qn,COL:()=>_,DSH:()=>mt,LCB:()=>Gn,LPR:()=>oc,RCB:()=>Wn,RPR:()=>uc,TLD:()=>ic,blue:()=>E,blueBright:()=>On,bold:()=>F,bottom:()=>Nn,clear:()=>zl,close:()=>Ln,cyan:()=>O,cyanBright:()=>Vl,dash:()=>In,dim:()=>Xl,error:()=>ac,gray:()=>D,green:()=>Hl,greenBright:()=>Jl,hr:()=>Mn,italic:()=>Ql,lavender:()=>ec,lightGray:()=>tt,line:()=>y,magenta:()=>hs,magentaBright:()=>Yl,neonCyan:()=>$r,neonGreen:()=>Ko,neonMagenta:()=>rc,neonRouge:()=>tc,newline:()=>dt,open:()=>Ar,orange:()=>Zl,pink:()=>Br,purge:()=>Ul,red:()=>B,redBright:()=>ue,reset:()=>vr,strike:()=>Kl,time:()=>Mt,top:()=>jn,underline:()=>Pn,warning:()=>ys,white:()=>C,whiteBright:()=>et,yellow:()=>ms,yellowBright:()=>se});var ze=Ot(Yo());function ds(e,t,s){return child_process.execFileSync(e,t,{encoding:"utf8",shell:s,stdio:["ignore","pipe","ignore"]}).trim()}function Qo(e,t){let s=path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href))));return ds(path.join(s,e),[],t).split(/\r?\n/)}function Dt(e,t){return {cols:Number.parseInt(e,10),rows:Number.parseInt(t,10)}}function St(){let{env:e,stdout:t,stderr:s}=Ds__default.default;if(t&&t.columns&&t.rows)return Dt(t.columns,t.rows);if(s&&s.columns&&s.rows)return Dt(s.columns,s.rows);if(e.COLUMNS&&e.LINES)return Dt(e.COLUMNS,e.LINES);if(Ds__default.default.platform==="win32")try{let r=Qo("vendor/windows/term-size.exe",!1);if(r.length===2)return Dt(r[0],r[1])}catch{}else {if(Ds__default.default.platform==="darwin")try{let r=Qo("vendor/macos/term-size",!0);if(r.length===2)return Dt(r[0],r[1])}catch{}try{let r=ds("resize",["-u"]).match(/\d+/g);if(r.length===2)return Dt(r[0],r[1])}catch{}if(Ds__default.default.env.TERM)try{let r=ds("tput",["cols"]),n=ds("tput",["lines"]);if(r&&n)return Dt(r,n)}catch{}}return Dt(80,24)}var zl="\x1B[H\x1B[2J",Ul="\x1B[2J\x1B[3J\x1B[H\x1Bc",{cyan:O,cyanBright:Vl,red:B,redBright:ue,green:Hl,greenBright:Jl,yellow:ms,yellowBright:se,magenta:hs,magentaBright:Yl,blue:E,blueBright:On,white:C,whiteBright:et,gray:D,underline:Pn,bold:F,reset:vr,italic:Ql,strike:Kl,dim:Xl}=ze.default,tt=ze.default.hex("#2a2a2e"),Br=ze.default.hex("#ff75d1"),Zl=ze.default.hex("#FFAB40"),ec=ze.default.hex("#8080FF"),Ko=ze.default.hex("#56ef83"),$r=ze.default.hex("#69d5fd"),tc=ze.default.hex("#FF8095"),rc=ze.default.hex("#B319FF"),Ar=tt("\u250C\u2500 "),y={gray:tt("\u2502 "),red:B.dim("\u2502 "),yellow:ms.dim("\u2502 ")},dt=tt(`${x}\u2502${x}`),In=tt("\u2502 \u251C\u2500 "),jn=tt("\u251C\u2500 "),Nn=tt("\u2502 \u2514\u2500 "),Ln=tt("\u2514\u2500 "),Mn=e=>tt(`\u2502${x}\u251C${"\u2500".repeat(St().cols-e)}${x}\u2502`),sc=Ko("\u2713 "),nc=ue("\u{10102}"),_=D(":"),Ue=D("\u2192"),qn=D("\u2023"),gs=D("\u2942"),ic=D("~"),mt=D("\u2014"),oc=D("("),uc=D(")"),Gn=D("{"),Wn=D("}"),ys=se(` ~ Type ${F("w")} and press ${F("enter")} to view`),ac=ue(` ~ Type ${F("v")} and press ${F("enter")} to view`),Mt=e=>e?vr.gray(` ~ ${e}`):$;var Zo=$;function rt(){let e=process.stdout.rows-2,t=e>0?A(e):$;v(t),Xo__default.default.cursorTo(process.stdout,0,0),Xo__default.default.clearScreenDown(process.stdout);}function zn(e=15){v(Mn(e));}function J(e,t,s){return (u.mode.build?In:t==="invalid"||t==="failed"?y.red:t==="warning"?y.yellow:y.gray)+L[e](t)+Re(10-t.length)+Ue+ye+L[e](s)}function qt(e){return x+Ar+D(`${e} ~ ${br()}`)}function Un(e,t){return e==="top"?jn+t:Nn+t}function Gt(e){return y.gray+x+Ln+D(`${e} ~ ${br()}`)}function Vn(e,t){return y.gray+L[e](t)}function xs(e){if(S(e))return Oe(e.map(xs));let t=e;return t=t.replace(fo,D("$1")+C("$2")+D("$3")+C("$4")+A(2)),t=t.replace(Do,se.bold("$1")),t=t.replace(mo,O("$1")+et("$2")+O("$3")),t=t.replace(ho,Pn("$1")),t=t.replace(go,hs("$1")+O("$2")+hs("$3")),ht(B(pt(t,St().columns-15)),{line:y.red})}function vt(e,t={}){let s=f("line",t)?t.line:y.gray;if(ot("span.start",t)){let r=f("end",t.span)?t.span.end:t.span.start+1;return s+x+Oe([`${s}${E(`${t.span.start-1}`)}${_+x}${s}${E(`${t.span.start}`)}${_} ${e+x}${s}${E(`${r}`)}${_+x}`])}return s+x+s+e}function ht(e,t={}){let s=S(e)?e:e.split(x).filter(Boolean),r=f("line",t)?t.line:y.gray,n=f("nwl",t)?`${r+x}`:$;for(;s.length!==0;){let i=s.shift();i.trim().length>0?i.trim().startsWith(r)?n+=(f("text",t)?t.text(i):i)+x:n+=r+(f("text",t)?t.text(i.trimStart()):i.trimStart())+x:n+=r+x;}return n}function Ne(e){let t=0,s=y.red+x;for(let r in e.entries)t<r.length&&e.entries[r]&&(t=r.length);for(let r in e.entries)e.entries[r]&&(s+=Oe([y.red,B(r),_+ye,Re(t-r.length),D(`${e.entries[r]}`)+x]));return e.stack&&(Zo=e.stack,s+=Oe([y.red,B("stack"),_+ye,Re(t-5),D(`Type ${F("s")} and press ${F("enter")} to view stack trace`),x+y.gray])),s.trimEnd()}function Hn(e,t){let s=y.gray,r=C;e==="error"?(s=y.red,r=B):e==="warning"&&(s=y.yellow,r=se);let n=[],i=t.trim(),o=pt(i,St().columns-15).split(x);for(;o.length!==0;){let a=o.shift();a.trim().length>0&&n.push(s+r(a));}return s+x+n.join(x)}var Wt={};function Jn(e){let t=[],s=[y.red],r=e.search(/(?:\n {4}at .*)/),n=process.stdout.columns-5,i=[];if(/\berror\b:?/i.test(e)&&r>0){i=e.slice(0,r).split(x);let o=bn(e.slice(r),{pretty:!0,basePath:u.cwd}),a=pt(o,n).split(x);for(s.push(x);a.length!==0;){let l=a.shift();l.trim().length>0&&s.push(vr(y.red+l));}}for(i.length===0&&(i=e.split(x));i.length!==0;){let o=i.shift();o.trim().length>0&&t.push(vr(y.gray)+o);}Q(`${t.join(x)}${s.length>1?s.join(x):$}`);}function lc(e,t,s=!0){let r=ot("error.asset",t.data)?t.data.error.asset:ot("errors.asset",t.data)?t.data.errors.asset:null;if(t.status===422){let n=Oe([y.red,x,xs(r),Ne({stack:!1,entries:{details:"File did not sync because Shopify rejected the request",status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}else if(t.status in gn){let n=Oe([y.red,x,Hn("error",gn[t.status])+Ne({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}else {let n=Oe([y.red,x,B("Unknown error has occured")+Ne({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}}var cc=(e,t)=>s=>{Q(ht(s.message,{nwl:!0,line:y.red,text:B.bold})+Ne({stack:s.stack,entries:{...t,code:s.code,name:s.name,details:e}}));};function pc(e,t){Q(ht(t.message,{nwl:!0,line:y.red,text:B})+Ne({stack:t.sassStack,entries:{input:e.relative,message:t.sassMessage}}));}function fc(e){Q(ht(e.text,{nwl:!0,line:y.red,text:B})+vt(e.location.lineText,{line:y.red,span:{start:e.location.line,end:e.location.line+1}})+Ne({stack:!1,entries:{file:e.location.file,line:e.location.line,column:e.location.column,plugin:e.pluginName}}));}function Dc(e){}var V="\x1B[",Tr="\x1B]",zt="\x07",Fs=";",eu=process.env.TERM_PROGRAM==="Apple_Terminal",M={};M.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?V+(e+1)+"G":V+(t+1)+";"+(e+1)+"H"};M.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let s="";return e<0?s+=V+-e+"D":e>0&&(s+=V+e+"C"),t<0?s+=V+-t+"A":t>0&&(s+=V+t+"B"),s};M.cursorUp=(e=1)=>V+e+"A";M.cursorDown=(e=1)=>V+e+"B";M.cursorForward=(e=1)=>V+e+"C";M.cursorBackward=(e=1)=>V+e+"D";M.cursorLeft=V+"G";M.cursorSavePosition=eu?"\x1B7":V+"s";M.cursorRestorePosition=eu?"\x1B8":V+"u";M.cursorGetPosition=V+"6n";M.cursorNextLine=V+"E";M.cursorPrevLine=V+"F";M.cursorHide=V+"?25l";M.cursorShow=V+"?25h";M.eraseLines=e=>{let t="";for(let s=0;s<e;s++)t+=M.eraseLine+(s<e-1?M.cursorUp():"");return e&&(t+=M.cursorLeft),t};M.eraseEndLine=V+"K";M.eraseStartLine=V+"1K";M.eraseLine=V+"2K";M.eraseDown=V+"J";M.eraseUp=V+"1J";M.eraseScreen=V+"2J";M.scrollUp=V+"S";M.scrollDown=V+"T";M.clearScreen="\x1Bc";M.clearTerminal=process.platform==="win32"?`${M.eraseScreen}${V}0f`:`${M.eraseScreen}${V}3J${V}H`;M.beep=zt;M.link=(e,t)=>[Tr,"8",Fs,Fs,t,zt,e,Tr,"8",Fs,Fs,zt].join("");M.image=(e,t={})=>{let s=`${Tr}1337;File=inline=1`;return t.width&&(s+=`;width=${t.width}`),t.height&&(s+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(s+=";preserveAspectRatio=0"),s+":"+e.toString("base64")+zt};M.iTerm={setCwd:(e=process.cwd())=>`${Tr}50;CurrentDir=${e}${zt}`,annotation:(e,t={})=>{let s=`${Tr}1337;`,r=typeof t.x<"u",n=typeof t.y<"u";if((r||n)&&!(r&&n&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),s+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?s+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):s+=e,s+zt}};var Yn=M;var pu=Ot(nu(),1),fu=Ot(cu(),1);var hc=(0, pu.default)(()=>{(0, fu.default)(()=>{Ds__default.default.stderr.write("\x1B[?25h");},{alwaysLast:!0});}),Du=hc;var Bs=!1,Jt={};Jt.show=(e=Ds__default.default.stderr)=>{e.isTTY&&(Bs=!1,e.write("\x1B[?25h"));};Jt.hide=(e=Ds__default.default.stderr)=>{e.isTTY&&(Du(),Bs=!0,e.write("\x1B[?25l"));};Jt.toggle=(e,t)=>{e!==void 0&&(Bs=e),Bs?Jt.show(t):Jt.hide(t);};var Zn=Jt;function ei(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var gc=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,hu=["\x1B","\x9B"],$s=e=>`${hu[0]}[${e}m`,mu=(e,t,s)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let o=Sr.codes.get(Number.parseInt(n,10));if(o){let a=e.indexOf(o.toString());a===-1?r.push($s(t?o:i)):e.splice(a,1);}else if(t){r.push($s(0));break}else r.push($s(i));}if(t&&(r=r.filter((n,i)=>r.indexOf(n)===i),s!==void 0)){let n=$s(Sr.codes.get(Number.parseInt(s,10)));r=r.reduce((i,o)=>o===n?[o,...i]:[...i,o],[]);}return r.join("")};function ti(e,t,s){let r=[...e],n=[],i=typeof s=="number"?s:r.length,o=!1,a,l=0,h="";for(let[p,c]of r.entries()){let g=!1;if(hu.includes(c)){let m=/\d[^m]*/.exec(e.slice(p,p+18));a=m&&m.length>0?m[0]:void 0,l<i&&(o=!0,a!==void 0&&n.push(a));}else o&&c==="m"&&(o=!1,g=!0);if(!o&&!g&&l++,!gc.test(c)&&ei(c.codePointAt())&&(l++,typeof s!="number"&&i++),l>t&&l<=i)h+=c;else if(l===t&&!o&&a!==void 0)h=mu(n);else if(l>=i){h+=mu(n,!0,a);break}}return h}var yc=24,As=e=>{let{columns:t}=e;return t||80},xc=(e,t)=>{let s=e.rows||yc,r=t.split(`
68
- `),n=r.length-s;return n<=0?t:ti(t,Et(r.slice(0,n).join(`
69
- `)).length+1)};function yu(e,{showCursor:t=!1}={}){let s=0,r=As(e),n="",i=(...o)=>{t||Zn.hide();let a=o.join(" ")+`
70
- `;a=xc(e,a);let l=As(e);a===n&&r===l||(n=a,r=l,a=pt(a,l,{trim:!1,hard:!0,wordWrap:!1}),e.write(Yn.eraseLines(s)+a),s=a.split(`
71
- `).length);};return i.clear=()=>{e.write(Yn.eraseLines(s)),n="",r=As(e),s=0;},i.done=()=>{n="",r=As(e),s=0,t||Zn.show();},i}var Fc=yu(Ds__default.default.stdout),At=Fc;yu(Ds__default.default.stderr);var Tt={};function Ae(e){return f(e,Tt)||(Tt[e]=[]),(t,s)=>{H(s)?Tt[e].push(y.yellow+se(t)):Tt[e].push(y.yellow+se(t+_+ye+F(s)));}}function k({option:e,name:t,provided:s,expects:r}){Q(A(2),B(`${F(`Invalid ${O(e)} type value provided`)}`)+A(2),B(`The ${O(t)} option has an incorrect type value`)+A(2),B(`provided${_} ${se(De(s).toLowerCase())}`)+x,B(`expected${_} ${E(r.replace(/([|,])/g,D("$1")))}`)+A(2),B(`in${_} ${D.underline(u.file.base)}`)+A(2),C.bold("How to fix?")+x,`
72
- ${D("You need to change the option value to use the")} ${E("expected")} ${D("type.")}
73
- ${D(`Use the ${O("defineConfig")} named export for type checking`)}
74
- `),process.exit(0);}function Yt({message:e,expected:t,fix:s}){let r=Ds.argv.slice(2).join(" ");t=C("syncify "+r+" ")+E(t.replace(/([|,])/g,D("$1"))),Q(A(2),B(`${F("Invalid or incomplete command passed")}`)+A(2),B(S(e)?e.join(`
75
- `):e)+A(2),B(`provided${_} ${C("$")} ${C("syncify "+r)}`)+x,B(`expected${_} ${C("$")} ${t}`)+A(2),C.bold("How to fix?")+x,`
76
- ${D(S(s)?s.join(`
66
+ `).map(r=>Tl(r,t,s)).join(`
67
+ `)}var q={};cr(q,{clear:()=>st,closer:()=>Wt,context:()=>Le,hline:()=>Un,indent:()=>ht,message:()=>Hn,multiline:()=>Jn,opener:()=>Gt,sample:()=>Bt,shopify:()=>xs,stack:()=>eu,suffix:()=>J,tree:()=>Vn});var L={};cr(L,{ARL:()=>gs,ARR:()=>ke,BAD:()=>sc,CHK:()=>rc,CHV:()=>Gn,COL:()=>R,DSH:()=>mt,LCB:()=>Wn,LPR:()=>ic,RCB:()=>zn,RPR:()=>oc,TLD:()=>nc,blue:()=>E,blueBright:()=>Pn,bold:()=>F,bottom:()=>Ln,clear:()=>Wl,close:()=>Mn,cyan:()=>O,cyanBright:()=>Ul,dash:()=>jn,dim:()=>Kl,error:()=>uc,gray:()=>d,green:()=>Vl,greenBright:()=>Hl,hr:()=>qn,italic:()=>Yl,lavender:()=>Zl,lightGray:()=>rt,line:()=>y,magenta:()=>hs,magentaBright:()=>Jl,neonCyan:()=>vt,neonGreen:()=>Xo,neonMagenta:()=>tc,neonRouge:()=>ec,newline:()=>dt,open:()=>Tr,orange:()=>Xl,pink:()=>Ar,purge:()=>zl,red:()=>B,redBright:()=>ue,reset:()=>$r,strike:()=>Ql,time:()=>qt,top:()=>Nn,underline:()=>In,warning:()=>ys,white:()=>C,whiteBright:()=>tt,yellow:()=>ms,yellowBright:()=>ne});var Ve=Pt(Qo());function ds(e,t,s){return child_process.execFileSync(e,t,{encoding:"utf8",shell:s,stdio:["ignore","pipe","ignore"]}).trim()}function Ko(e,t){let s=path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href))));return ds(path.join(s,e),[],t).split(/\r?\n/)}function Dt(e,t){return {cols:Number.parseInt(e,10),rows:Number.parseInt(t,10)}}function St(){let{env:e,stdout:t,stderr:s}=Ds__default.default;if(t&&t.columns&&t.rows)return Dt(t.columns,t.rows);if(s&&s.columns&&s.rows)return Dt(s.columns,s.rows);if(e.COLUMNS&&e.LINES)return Dt(e.COLUMNS,e.LINES);if(Ds__default.default.platform==="win32")try{let r=Ko("vendor/windows/term-size.exe",!1);if(r.length===2)return Dt(r[0],r[1])}catch{}else {if(Ds__default.default.platform==="darwin")try{let r=Ko("vendor/macos/term-size",!0);if(r.length===2)return Dt(r[0],r[1])}catch{}try{let r=ds("resize",["-u"]).match(/\d+/g);if(r.length===2)return Dt(r[0],r[1])}catch{}if(Ds__default.default.env.TERM)try{let r=ds("tput",["cols"]),n=ds("tput",["lines"]);if(r&&n)return Dt(r,n)}catch{}}return Dt(80,24)}var Wl="\x1B[H\x1B[2J",zl="\x1B[2J\x1B[3J\x1B[H\x1Bc",{cyan:O,cyanBright:Ul,red:B,redBright:ue,green:Vl,greenBright:Hl,yellow:ms,yellowBright:ne,magenta:hs,magentaBright:Jl,blue:E,blueBright:Pn,white:C,whiteBright:tt,gray:d,underline:In,bold:F,reset:$r,italic:Yl,strike:Ql,dim:Kl}=Ve.default,rt=Ve.default.hex("#2a2a2e"),Ar=Ve.default.hex("#ff75d1"),Xl=Ve.default.hex("#FFAB40"),Zl=Ve.default.hex("#8080FF"),Xo=Ve.default.hex("#56ef83"),vt=Ve.default.hex("#69d5fd"),ec=Ve.default.hex("#FF8095"),tc=Ve.default.hex("#B319FF"),Tr=rt("\u250C\u2500 "),y={gray:rt("\u2502 "),red:B.dim("\u2502 "),yellow:ms.dim("\u2502 ")},dt=rt(`${x}\u2502${x}`),jn=rt("\u2502 \u251C\u2500 "),Nn=rt("\u251C\u2500 "),Ln=rt("\u2502 \u2514\u2500 "),Mn=rt("\u2514\u2500 "),qn=e=>rt(`\u2502${x}\u251C${"\u2500".repeat(St().cols-e)}${x}\u2502`),rc=Xo("\u2713 "),sc=ue("\u{10102}"),R=d(":"),ke=d("\u2192"),Gn=d("\u2023"),gs=d("\u2942"),nc=d("~"),mt=d("\u2014"),ic=d("("),oc=d(")"),Wn=d("{"),zn=d("}"),ys=ne(` ~ Type ${F("w")} and press ${F("enter")} to view`),uc=ue(` ~ Type ${F("v")} and press ${F("enter")} to view`),qt=e=>e?$r.gray(` ~ ${e}`):$;var eu=$;function st(){let e=process.stdout.rows-2,t=e>0?A(e):$;S(t),Zo__default.default.cursorTo(process.stdout,0,0),Zo__default.default.clearScreenDown(process.stdout);}function Un(e=15){S(qn(e));}function J(e,t,s){return (u.mode.build?jn:t==="invalid"||t==="failed"?y.red:t==="warning"?y.yellow:y.gray)+L[e](t)+Re(10-t.length)+ke+ye+L[e](s)}function Gt(e){return x+Tr+d(`${e} ~ ${vr()}`)}function Vn(e,t){return e==="top"?Nn+t:Ln+t}function Wt(e){return y.gray+x+Mn+d(`${e} ~ ${vr()}`)}function Hn(e,t){return y.gray+L[e](t)}function xs(e){if(v(e))return Pe(e.map(xs));let t=e;return t=t.replace(Do,d("$1")+C("$2")+d("$3")+C("$4")+A(2)),t=t.replace(mo,ne.bold("$1")),t=t.replace(ho,O("$1")+tt("$2")+O("$3")),t=t.replace(go,In("$1")),t=t.replace(yo,hs("$1")+O("$2")+hs("$3")),ht(B(pt(t,St().columns-15)),{line:y.red})}function Bt(e,t={}){let s=f("line",t)?t.line:y.gray;if(We("span.start",t)){let r=f("end",t.span)?t.span.end:t.span.start+1;return s+x+Pe([`${s}${E(`${t.span.start-1}`)}${R+x}${s}${E(`${t.span.start}`)}${R} ${e+x}${s}${E(`${r}`)}${R+x}`])}return s+x+s+e}function ht(e,t={}){let s=v(e)?e:e.split(x).filter(Boolean),r=f("line",t)?t.line:y.gray,n=f("nwl",t)?`${r+x}`:$;for(;s.length!==0;){let i=s.shift();i.trim().length>0?i.trim().startsWith(r)?n+=(f("text",t)?t.text(i):i)+x:n+=r+(f("text",t)?t.text(i.trimStart()):i.trimStart())+x:n+=r+x;}return n}function Le(e){let t=0,s=y.red+x;for(let r in e.entries)t<r.length&&e.entries[r]&&(t=r.length);for(let r in e.entries)e.entries[r]&&(s+=Pe([y.red,B(r),R+ye,Re(t-r.length),d(`${e.entries[r]}`)+x]));return e.stack&&(eu=e.stack,s+=Pe([y.red,B("stack"),R+ye,Re(t-5),d(`Type ${F("s")} and press ${F("enter")} to view stack trace`),x+y.gray])),s.trimEnd()}function Jn(e,t){let s=y.gray,r=C;e==="error"?(s=y.red,r=B):e==="warning"&&(s=y.yellow,r=ne);let n=[],i=t.trim(),o=pt(i,St().columns-15).split(x);for(;o.length!==0;){let a=o.shift();a.trim().length>0&&n.push(s+r(a));}return s+x+n.join(x)}var zt={};function Yn(e){let t=[],s=[y.red],r=e.search(/(?:\n {4}at .*)/),n=process.stdout.columns-5,i=[];if(/\berror\b:?/i.test(e)&&r>0){i=e.slice(0,r).split(x);let o=Sn(e.slice(r),{pretty:!0,basePath:u.cwd}),a=pt(o,n).split(x);for(s.push(x);a.length!==0;){let l=a.shift();l.trim().length>0&&s.push($r(y.red+l));}}for(i.length===0&&(i=e.split(x));i.length!==0;){let o=i.shift();o.trim().length>0&&t.push($r(y.gray)+o);}Q(`${t.join(x)}${s.length>1?s.join(x):$}`);}function ac(e,t,s=!0){let r=We("error.asset",t.data)?t.data.error.asset:We("errors.asset",t.data)?t.data.errors.asset:null;if(t.status===422){let n=Pe([y.red,x,xs(r),Le({stack:!1,entries:{details:"File did not sync because Shopify rejected the request",status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}else if(t.status in yn){let n=Pe([y.red,x,Jn("error",yn[t.status])+Le({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}else {let n=Pe([y.red,x,B("Unknown error has occured")+Le({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}}var lc=(e,t)=>s=>{Q(ht(s.message,{nwl:!0,line:y.red,text:B.bold})+Le({stack:s.stack,entries:{...t,code:s.code,name:s.name,details:e}}));};function cc(e,t){Q(ht(t.message,{nwl:!0,line:y.red,text:B})+Le({stack:t.sassStack,entries:{input:e.relative,message:t.sassMessage}}));}function pc(e){Q(ht(e.text,{nwl:!0,line:y.red,text:B})+Bt(e.location.lineText,{line:y.red,span:{start:e.location.line,end:e.location.line+1}})+Le({stack:!1,entries:{file:e.location.file,line:e.location.line,column:e.location.column,plugin:e.pluginName}}));}function fc(e){}var V="\x1B[",Rr="\x1B]",Ut="\x07",Fs=";",tu=process.env.TERM_PROGRAM==="Apple_Terminal",M={};M.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?V+(e+1)+"G":V+(t+1)+";"+(e+1)+"H"};M.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let s="";return e<0?s+=V+-e+"D":e>0&&(s+=V+e+"C"),t<0?s+=V+-t+"A":t>0&&(s+=V+t+"B"),s};M.cursorUp=(e=1)=>V+e+"A";M.cursorDown=(e=1)=>V+e+"B";M.cursorForward=(e=1)=>V+e+"C";M.cursorBackward=(e=1)=>V+e+"D";M.cursorLeft=V+"G";M.cursorSavePosition=tu?"\x1B7":V+"s";M.cursorRestorePosition=tu?"\x1B8":V+"u";M.cursorGetPosition=V+"6n";M.cursorNextLine=V+"E";M.cursorPrevLine=V+"F";M.cursorHide=V+"?25l";M.cursorShow=V+"?25h";M.eraseLines=e=>{let t="";for(let s=0;s<e;s++)t+=M.eraseLine+(s<e-1?M.cursorUp():"");return e&&(t+=M.cursorLeft),t};M.eraseEndLine=V+"K";M.eraseStartLine=V+"1K";M.eraseLine=V+"2K";M.eraseDown=V+"J";M.eraseUp=V+"1J";M.eraseScreen=V+"2J";M.scrollUp=V+"S";M.scrollDown=V+"T";M.clearScreen="\x1Bc";M.clearTerminal=process.platform==="win32"?`${M.eraseScreen}${V}0f`:`${M.eraseScreen}${V}3J${V}H`;M.beep=Ut;M.link=(e,t)=>[Rr,"8",Fs,Fs,t,Ut,e,Rr,"8",Fs,Fs,Ut].join("");M.image=(e,t={})=>{let s=`${Rr}1337;File=inline=1`;return t.width&&(s+=`;width=${t.width}`),t.height&&(s+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(s+=";preserveAspectRatio=0"),s+":"+e.toString("base64")+Ut};M.iTerm={setCwd:(e=process.cwd())=>`${Rr}50;CurrentDir=${e}${Ut}`,annotation:(e,t={})=>{let s=`${Rr}1337;`,r=typeof t.x<"u",n=typeof t.y<"u";if((r||n)&&!(r&&n&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),s+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?s+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):s+=e,s+Ut}};var Qn=M;var fu=Pt(iu(),1),Du=Pt(pu(),1);var mc=(0, fu.default)(()=>{(0, Du.default)(()=>{Ds__default.default.stderr.write("\x1B[?25h");},{alwaysLast:!0});}),du=mc;var Bs=!1,Yt={};Yt.show=(e=Ds__default.default.stderr)=>{e.isTTY&&(Bs=!1,e.write("\x1B[?25h"));};Yt.hide=(e=Ds__default.default.stderr)=>{e.isTTY&&(du(),Bs=!0,e.write("\x1B[?25l"));};Yt.toggle=(e,t)=>{e!==void 0&&(Bs=e),Bs?Yt.show(t):Yt.hide(t);};var ei=Yt;function ti(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var hc=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,gu=["\x1B","\x9B"],$s=e=>`${gu[0]}[${e}m`,hu=(e,t,s)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let o=Br.codes.get(Number.parseInt(n,10));if(o){let a=e.indexOf(o.toString());a===-1?r.push($s(t?o:i)):e.splice(a,1);}else if(t){r.push($s(0));break}else r.push($s(i));}if(t&&(r=r.filter((n,i)=>r.indexOf(n)===i),s!==void 0)){let n=$s(Br.codes.get(Number.parseInt(s,10)));r=r.reduce((i,o)=>o===n?[o,...i]:[...i,o],[]);}return r.join("")};function ri(e,t,s){let r=[...e],n=[],i=typeof s=="number"?s:r.length,o=!1,a,l=0,m="";for(let[c,p]of r.entries()){let g=!1;if(gu.includes(p)){let h=/\d[^m]*/.exec(e.slice(c,c+18));a=h&&h.length>0?h[0]:void 0,l<i&&(o=!0,a!==void 0&&n.push(a));}else o&&p==="m"&&(o=!1,g=!0);if(!o&&!g&&l++,!hc.test(p)&&ti(p.codePointAt())&&(l++,typeof s!="number"&&i++),l>t&&l<=i)m+=p;else if(l===t&&!o&&a!==void 0)m=hu(n);else if(l>=i){m+=hu(n,!0,a);break}}return m}var gc=24,As=e=>{let{columns:t}=e;return t||80},yc=(e,t)=>{let s=e.rows||gc,r=t.split(`
68
+ `),n=r.length-s;return n<=0?t:ri(t,Et(r.slice(0,n).join(`
69
+ `)).length+1)};function xu(e,{showCursor:t=!1}={}){let s=0,r=As(e),n="",i=(...o)=>{t||ei.hide();let a=o.join(" ")+`
70
+ `;a=yc(e,a);let l=As(e);a===n&&r===l||(n=a,r=l,a=pt(a,l,{trim:!1,hard:!0,wordWrap:!1}),e.write(Qn.eraseLines(s)+a),s=a.split(`
71
+ `).length);};return i.clear=()=>{e.write(Qn.eraseLines(s)),n="",r=As(e),s=0;},i.done=()=>{n="",r=As(e),s=0,t||ei.show();},i}var xc=xu(Ds__default.default.stdout),Tt=xc;xu(Ds__default.default.stderr);var Rt={};function Ae(e){return f(e,Rt)||(Rt[e]=[]),(t,s)=>{H(s)?Rt[e].push(y.yellow+ne(t)):Rt[e].push(y.yellow+ne(t+R+ye+F(s)));}}function k({option:e,name:t,provided:s,expects:r}){Q(A(2),B(`${F(`Invalid ${O(e)} type value provided`)}`)+A(2),B(`The ${O(t)} option has an incorrect type value`)+A(2),B(`provided${R} ${ne(De(s).toLowerCase())}`)+x,B(`expected${R} ${E(r.replace(/([|,])/g,d("$1")))}`)+A(2),B(`in${R} ${d.underline(u.file.base)}`)+A(2),C.bold("How to fix?")+x,`
72
+ ${d("You need to change the option value to use the")} ${E("expected")} ${d("type.")}
73
+ ${d(`Use the ${O("defineConfig")} named export for type checking`)}
74
+ `),process.exit(0);}function Qt({message:e,expected:t,fix:s}){let r=Ds.argv.slice(2).join(" ");t=C("syncify "+r+" ")+E(t.replace(/([|,])/g,d("$1"))),Q(A(2),B(`${F("Invalid or incomplete command passed")}`)+A(2),B(v(e)?e.join(`
75
+ `):e)+A(2),B(`provided${R} ${C("$")} ${C("syncify "+r)}`)+x,B(`expected${R} ${C("$")} ${t}`)+A(2),C.bold("How to fix?")+x,`
76
+ ${d(v(s)?s.join(`
77
77
  `):s)}
78
- `),process.exit(0);}function xu({type:e,message:t,provided:s,expected:r,fix:n}){wr.test(s)&&(s=s.replace(wr,D("$1"))),wr.test(r)&&(r=r.replace(wr,D("$1"))),S(t)&&(t=t.join(`
79
- `)),Q(A(2),B(F(`Invalid ${O(e)} target provided`))+A(2),B(t)+A(2),B(`provided${_} ${se(r)}`)+x,B(`expected${_} ${E(s)}`)+A(2),C.bold("How to fix?")+x,`
80
- ${D(S(n)?n.join(`
78
+ `),process.exit(0);}function Fu({type:e,message:t,provided:s,expected:r,fix:n}){Er.test(s)&&(s=s.replace(Er,d("$1"))),Er.test(r)&&(r=r.replace(Er,d("$1"))),v(t)&&(t=t.join(`
79
+ `)),Q(A(2),B(F(`Invalid ${O(e)} target provided`))+A(2),B(t)+A(2),B(`provided${R} ${ne(r)}`)+x,B(`expected${R} ${E(s)}`)+A(2),C.bold("How to fix?")+x,`
80
+ ${d(v(n)?n.join(`
81
81
  `):n)}
82
- `),process.exit(0);}function ke(e){P(e)?Q(A(2),B(`${F(`Missing ${O(e)} dependency`)}`)+A(2),B(`You need to install ${O(e)} to use it as a processor`)+A(2),C.bold("How to fix?")+x,`
82
+ `),process.exit(0);}function Oe(e){P(e)?Q(A(2),B(`${F(`Missing ${O(e)} dependency`)}`)+A(2),B(`You need to install ${O(e)} to use it as a processor`)+A(2),C.bold("How to fix?")+x,`
83
83
  $ ${E.bold("pnpm add "+e+" -D")}
84
84
 
85
- ${D("If you are using a different package manager (i.e: Yarn or NPM) then")}
86
- ${D("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
87
- `):Q(A(2),B(`${F(`Missing ${O(`${e.length}`)} dependencies`)}`)+A(2),B("You are attempting to use processors which are not yet installed!")+A(2),et(D("-")+ye+e.join(x+D(" -")+ye))+A(2),C.bold("How to fix?")+x,`
88
- $ ${On("pnpm add "+e.join(ye)+" -D")}
89
-
90
- ${D("If you are using a different package manager (i.e: Yarn or NPM) then")}
91
- ${D("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
92
- `),process.exit(0);}function Fu(e,t,s,r){e.indexOf(".")>-1&&(e=e.split(".").filter(Boolean).join(D(" \u2192 "))),Q(A(2),B(`${F(`Missing ${Gn} ${O(e)} ${Wn} configuration option`)}`)+A(2),B(`The ${O(t)} option needs to be defined`)+A(2),B(`expects${_} ${E(s.replace(/([|,])/g,D("$1")))}`)+A(2),B(`at${_} ${D.underline(u.file.base)}`)+A(2),C.bold("Why?")+x+x+D(S(r)?` ${r.join(`
93
- `)}`:` ${r}`)+x+x),process.exit(0);}function he(e,t,s,r){Q(A(2),ue.bold("ERROR (!)"),A(2),B(`${F(`Invalid ${O(e)} configuration`)}`)+A(2),B(`The ${O(t)} option has an invalid or missing value`)+A(2),B(`provided${_} ${se(s)}`)+x,B(`expected${_} ${E(r.replace(/([|,])/g,D("$1")))}`)+A(2),C.bold("How to fix?")+x,`
94
- ${D("You need to update the option and use one of the expected values.")}
95
- ${D(`Use the ${O("defineConfig")} named export for type checking`)}
96
- `),process.exit(0);}function wu(e){Q(A(2),ue.bold("ERROR (!)"),A(2),B(`${F(`Missing ${O("syncify.config.js")} configuration`)}`)+A(2),B("Unable to resolve a configuration file within the workspace")+A(2),B(`at${_} ${D.underline(e)}`)+A(2),C.bold("How to fix?")+x,`
97
- ${D("You need to add one the following files to your project")}
98
-
99
- ${D("-")} ${C("syncify.config.ts")}
100
- ${D("-")} ${C("syncify.config.js")}
101
- ${D("-")} ${C("syncify.config.mjs")}
102
- ${D("-")} ${C("syncify.config.cjs")}
103
- ${D("-")} ${C("syncify.config.json")}
104
-
105
- ${D("You can also provide configuration in your")} ${C("package.json")}
106
- ${D("file using on a")} ${se('"syncify": {}')} ${D("property.")}
107
- `),process.exit(0);}function ae(e,t){Q(A(2),ue.bold("(!) ERROR"),A(2),B.bold(e)+A(2),C.bold("How to fix?")+x,D(S(t)?t.join(x).trimStart():t),A(2)),process.exit(0);}function Rt(e,t){e.indexOf(".")>-1&&(e=D.bold("{ ")+e.split(".").filter(Boolean).join(D(" \u2192 "))+D(" \u2192 ")+ue.bold(t)+D.bold(" }"));let s=u.file.base==="package.json"?`${E("syncify")} config in the ${E("package.json")} file.`:`${E(u.file.base)} file.`;Q(A(2),ue.bold("ERROR (!)"),A(2),ue(`Unknown ${e} option provided.`)+A(2),C.bold("How to fix?")+x,`
108
- ${D(`The ${E(t)} option is invalid or unsupported.`)}
109
- ${D(`You need to remove it from the ${s}`)}
110
- `),process.exit(0);}function Eu(e){let t=[];if(e.mode.metafields)return $;t.push(`${Ar}${D("Syncify")} ${D("~")} ${D(br())}`,`${y.gray}`),Ec(t),t.push(`${y.gray}${et.bold(`v${e.version}`)}`,`${y.gray}`);let s=e.sync.stores.length,r=_e(e.sync.themes).length,n=_e(e.spawn.commands).length,{mode:i,spawn:o}=e,a=O.bold(String(s))+(s>1?" stores":" store"),l=O.bold(String(r))+(r>1?" themes":" theme"),h=O.bold(`${e.env.dev?"development":"production"}`);i.build?t.push(`${y.gray}Running ${O.bold("build")} in ${h}`):i.watch?t.push(`${y.gray}Running ${O.bold("watch")} in ${h}`):i.upload?t.push(`${y.gray}Running ${O.bold("upload")} mode`):i.download?t.push(`${y.gray}Running ${O.bold("download")} mode`):i.vsc?t.push(`${y.gray}Generate ${O.bold("vscode")} schema`):i.clean?t.push(`${y.gray}Running ${O.bold("clean")} mode`):i.export&&t.push(`${y.gray}Running ${O.bold("export")} mode`),t.push(`${y.gray}${s>0&&r>0?`Syncing ${l} to ${a}`:$}`),Z(e.filters)||t.push(`${y.gray}${et.bold("Filters")}`,`${y.gray}`+Cc(e.filters)),e.logger.warnings&&bc(e,t),ge(i.build,i.watch)&&n>0?t.push(`${y.gray}Spawned ${O.bold(`${n}`)} child ${n>1?"processes":"process"}`,`${y.gray}`):t.push(y.gray),it(i.upload,i.download,i.build,i.clean,i.vsc)&&(n>0&&t.push(`${y.gray}${F("Child Processes:")}`,`${y.gray}${Sc(ut(o.streams))}`,`${y.gray}`),r>0&&t.push(`${y.gray}${F("Theme Editors:")}`,`${y.gray}${Cu(e.sync.themes,"editor")}`,`${y.gray}`)),ge(i.upload,i.download,i.watch)&&r>0&&t.push(`${y.gray}${F(i.upload||i.download?"Theme Targets:":"Theme Previews:")}`,`${y.gray}${Cu(e.sync.themes,"preview")}`),e.mode.hot&&t.push(`${y.gray}`),v(t.join(x));}function Cc(e){return Vr(e).flat().reduce((t,s)=>(t+=x+y.gray+mt+ye+et(s),t),$)}function Ec(e){let t=St().cols;t>=100||e.push(`${y.gray}${B.bold("TERMINAL WIDTH WARNING")}`,`${y.gray}`,`${y.gray}${B(`Your terminal width is below ${F("100")} columns (currently ${F(`${t}`)})`)}`,`${y.gray}${B("This is not recommended for usage with Syncify (size matters).")}`,`${y.gray}${B("Expand your terminal wider for an optimal logging experience.")}`,`${y.gray}`);}function bc(e,t){let s=!1;for(let r in Tt){let n=Tt[r];n.length>0&&(s===!1&&(s=!0,t.push(`${y.gray}`,`${y.yellow}${se(`${F("Warnings")} in ${F(e.file.base)}`)}`)),t.push(y.yellow,y.yellow+ms.bold(`${n.length} ${r} ${Xe("warning",n.length)}`),y.yellow,n.join(x)));}}function Sc(e){let t=e.reduce((s,[r])=>r.length>s?r.length:s,0);return e.reduce((s,[r,n])=>(s+=x+y.gray+Re(t-r.length)+$r(as(r))+`${_} `+D("PID")+" \u2192 "+D("#")+Br(`${n.pid}`),s),$)}function Cu(e,t){let s=e.reduce((r,{target:n,store:i})=>{let o=i.indexOf(".");return o>r.store&&(r.store=o),n.length>r.theme&&(r.theme=n.length),r},{store:0,theme:0});return e.reduce((r,{target:n,store:i,id:o})=>{let a=i.slice(0,i.indexOf(".")),l=t==="editor"?`https://${i}/admin/themes/${o}/editor`:`https://${i}?preview_theme_id=${o}`;return r+=x+y.gray+Br(a)+Re(s.store-a.length)+C(" \u2192 ")+Br.bold(n)+Re(s.theme-n.length)+C(" \u2192 ")+D.underline(l),r},$)}var ri,Ts=!1,si=function(t,s="pink"){Ts=!0;let r=0,n=fn.length;ri=setInterval(()=>{Ts&&At(`${y.gray} ${L[s](`${fn[r=++r%n]}`)}${t?` ${t}`:$}`);},50);};si.stop=e=>{Ts&&(Ts=!1,e?(At(y.gray+e),At.done()):At.clear(),clearInterval(ri),ri=void 0);};function bu(e,t={}){let s=z({showPercentage:!0,barColor:"neonGreen",percentColor:"whiteBright",barSize:40,clearOnComplete:!1},t),r=0;function n(p){return L.line.gray+p+" ".repeat(Math.max(0,s.barSize-p.length))}function i(p,c=!1){return (c?"\u25B1":"\u25B0").repeat(p)}function o(){s.clearOnComplete&&console.clear();}function a(p=1){let c=r+p;r=Math.min(c,e),r===e&&o();}function l(p=1){let c=r-p;r=Math.max(c,0);}function h(){let p=Math.round(r/e*s.barSize),c=i(p),g=i(s.barSize-p,!0),m=L[s.barColor](c)+L.lightGray(g);return s.showPercentage&&(m+=` ${String(Math.round(r/e*100))}%`),n(m)}return {stop:o,increment:a,decrement:l,render:h,get percent(){return r}}}var ni=new Set,oi=null,ii=!1,Te="Syncify",Kt=$,Su=$;function vc(e,t,s){let r=Kt!==e;U(),r&&v(Gt(Te)),Te==="Syncify"&&rt(),Te=e,r&&(v(qt(Te)),Qt(),v(y.gray+F(`${t} ${as(e)}`)),Qt(),Kt=e),Qt(),v(Un("top",$r(typeof s=="string"?s:s.relative)));}function Qt(e="gray"){Z(e)?v(x):v(y[e]);}function Bc(e){S(e)?Q(B(e.map(t=>y.red+Nt(t)).join(x))):Q(y.red+Nt(e));}function $c(e){S(e)?v(e.map(t=>y.gray+Nt(t)).join(x)):v(y.gray+Nt(e));}function Ac(e){v(J("cyan","external",e));}function Tc(e){pe.current!==e&&(pe.current=e),f(e,pe.process)||(pe.current=e,pe.process[e]=new Set),oi=bo((t,s)=>{if(s.charCodeAt(0)===9474)Bu[t].write(s);else {pe.count+=1;let r=s.split(`
111
- `);for(;r.length!==0;)pe.process[e].add(`${se(r.shift().trimStart())}`);}});}function Rc(){oi(),oi=null;}function _c(e,t=!1){v(Gt(Te)),t&&rt(),v(qt(e)),Te=e,Qt();}function kc(e){let t=Kt!==e.relative;U(),t&&v(Gt(Te)),Te!=="Syncify"&&t&&rt(),Te=e.namespace,t&&(rt(),v(qt(e.kind)),Kt=e.relative),f(e.relative,pe)||(pe[e.relative]=new Set),Su!==e.relative&&(Su=e.relative),u.mode.watch&&(Qt(),v(J("neonCyan","changed",e.relative)));}function Oc(e){if(u.mode.watch){if(ni.add([e.target,e.store,X()]),ii)return;ii=!0,W.onIdle().then(()=>{for(let[t,s,r]of ni)v(J("neonGreen","uploaded",`${F(t)} \u2192 ${s}`+Mt(r)));ni.clear(),ii=!1;});}else v(J("neonGreen","uploaded",`${F(e.target)} \u2192 ${e.store}`+Mt(X())));}function Pc(e){pe.count>0&&J("yellowBright","warning",`${pe.count} ${Xe("warning",pe.count)}`),u.mode.hot?(v(J("neonRouge","reloaded",`${F("HOT RELOAD")}${Mt(Lt())}`)),v(J("magentaBright","syncing",e)),W.pending>2&&v(J("orange","queued",`${e} ~ ${F(yn(W.pending))} in queue`))):(v(J("magentaBright","syncing",e)),W.pending>0&&v(J("orange","queued",`${e} ~ ${F(yn(W.pending))} in queue`)));}function Bu(e,...t){let s=t[0],r=$;t.length===2&&(r=` ${qn} ${t[0]}`,s=t[1]),v(J("whiteBright","process",F(e)+r+Mt(s)));}function Ic(e){v(J("whiteBright","exports",e));}function jc(e){u.mode.build||v(J("lavender","importer",e));}function Nc(e){v(J("whiteBright","transform",e));}function Lc(e,t){v(J("orange","retrying",`${e} \u2192 ${t.target} ${D(`~ ${t.store}`)}`));}function Mc(e,t){v(J("blueBright","deleted",`${e} \u2192 ${t.target} ${D(`~ ${t.store}`)}`));}function qc(e,t,s,r){let n=e?`${F(e)} ${Ue} ${t} ${gs} ${s} ${D(`~ saved ${r}`)}`:`${t} ${gs} ${s} ${D(`~ saved ${r}`)}`;v(J("whiteBright","minified",n));}function Gc(e,t){v(J("whiteBright","reloaded",e+t));}function Wc(e,t){v(J("gray","skipped",`${typeof e=="string"?e:e.key} ~ ${t}`));}function zc(e){v(J("gray","ignored",e));}function Uc(e){v(J("red","invalid",e)),vu__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Invalid error"}).notify();}function Vc(e){v(J("red","failed",e)),vu__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Request failed"}).notify();}function Hc(e){throw new Error(e)}function Jc(e){return (...t)=>{u.spawn.invoked||(u.spawn.invoked=!0),Te!=="Spawn"&&(v(Gt(Te)),Te!=="Syncify"&&rt(),v(qt("Spawn")),Te="Spawn"),Kt!==e&&(v(Vn("pink",e)),Kt=e),Jn(Nt(t.shift()));}}var Xt={};ar(Xt,{esbuild:()=>$u,postcss:()=>Qc,sass:()=>Yc,warnings:()=>Le});var Le={},Yc=e=>(t,s)=>{let r=$;f(e.input,Le)?Le[e.input].has("sass")||Le[e.input].set("sass",new Set):Le[e.input]=new Map([["sass",new Set]]);let n=Le[e.input].get("sass");if(r+=ht(t,{nwl:!0,line:y.yellow,text:se.bold}),f("span",s)){let i=f("start",s.span)&&f("end",s.span)?{start:s.span.start.line,end:s.span.end.line}:null,o=f("context",s.span)?s.span.context:f("text",s.span)?s.span.text:null;o!==null&&(i!==null?r+=vt(o,{line:y.yellow,span:i}):r+=vt(o));}r+=Ne({stack:s.stack,entries:{file:e.relative,deprecated:s.deprecation?"Yes":"No"}}),n.has(r)?v(J("yellowBright","warning",`${n.size} ${Xe("warning",n.size)+ys}`)):(n.add(r),v(J("yellowBright","warning",`${n.size} ${Xe("warning",n.size)+ys}`)));};function $u(e){}function Qc(e,t){let s=$;f(e.input,Le)?Le[e.input].has("postcss")||Le[e.input].set("postcss",new Set):Le[e.input]=new Map([["postcss",new Set]]);let r=Le[e.input].get("postcss");s+=vt(t.node.toString(),{line:y.yellow,span:Hr(t.endLine)?{start:t.line,end:t.endLine}:{start:t.line,end:t.endLine}}),s+=Ne({stack:!1,entries:{column:t.column,file:e.relative,plugin:t.plugin}}),r.has(s)||(r.add(s),Hi(s));}function Au(){d.nwl(""),d.out(D("SIGINT")),process.exit();}function Tu(e,t){d.nwl(),d.err(`Unhandled Promise Rejection at: ${t}`),d.nwl("red"),d.out(e?D(e):"Unkown Reason");}function Ru(e){d.nwl(),d.err(`Uncaught Exception: ${e.message}`),d.nwl("red"),d.err(`${e.stack}`);}var ui=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},_u=e=>globalThis.DOMException===void 0?new ui(e):new DOMException(e),ku=e=>{let t=e.reason===void 0?_u("This operation was aborted."):e.reason;return t instanceof Error?t:_u(t)};async function ai(e,t,{concurrency:s=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:n}={}){return new Promise((i,o)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(s)||s===Number.POSITIVE_INFINITY)&&s>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${s}\` (${typeof s})`);let a=[],l=[],h=new Map,p=!1,c=!1,g=!1,m=0,T=0,R=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),j=ne=>{p=!0,c=!0,o(ne);};n&&(n.aborted&&j(ku(n)),n.addEventListener("abort",()=>{j(ku(n));}));let le=async()=>{if(c)return;let ne=await R.next(),Fe=T;if(T++,ne.done){if(g=!0,m===0&&!c){if(!r&&l.length>0){j(new AggregateError(l));return}if(c=!0,h.size===0){i(a);return}let He=[];for(let[ie,Ks]of a.entries())h.get(ie)!==Rs&&He.push(Ks);i(He);}return}m++,(async()=>{try{let He=await ne.value;if(c)return;let ie=await t(He,Fe);ie===Rs&&h.set(Fe,ie),a[Fe]=ie,m--,await le();}catch(He){if(r)j(He);else {l.push(He),m--;try{await le();}catch(ie){j(ie);}}}})();};(async()=>{for(let ne=0;ne<s;ne++){try{await le();}catch(Fe){j(Fe);break}if(g||p)break}})();})}var Rs=Symbol("skip");var Kc=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(s=>e[s]=t[s]),e)),li=(e,t,s)=>{let r=typeof s;if(s&&r==="object")if(Array.isArray(s))for(let n of s)t=li(e,t,n);else for(let n of Object.keys(s)){let i=s[n];typeof i=="function"?t[n]=i(t[n],_s):i===void 0?e&&!isNaN(n)?t.splice(n,1):delete t[n]:i===null||typeof i!="object"||Array.isArray(i)?t[n]=i:typeof t[n]=="object"?t[n]=i===t[n]?i:_s(t[n],i):t[n]=li(!1,{},i);}else r==="function"&&(t=s(t,_s));return t},_s=(e,...t)=>{let s=Array.isArray(e);return li(s,s?e.slice():Kc({},e),t)},fe=_s;async function Ou(e,t){return Qe({...u.sync.stores[t.sidx].client,method:"get",url:t.url,params:{"asset[key]":e}}).then(({data:s})=>s.asset).catch(()=>!1)}async function ci(e,t){let s=fe(u.sync.stores[t.theme.sidx].client,{method:"put",url:t.theme.url,data:{asset:{key:t.key,value:e}}});return Qe(s).then(()=>!0).catch(r=>(d.failed(t.key),I.request(t.key,r.response),!1))}async function pi(e,t){return Qe.get(e,t).then(({data:s})=>s).catch(s=>{if(s.response&&(s.response.status===429||s.response.status===500))d.retrying(file.key,theme),W.add(()=>Os(theme,file,t));else {if(u.mode.upload)throw s.response;d.failed(file.key),I.request(file.relative,s.response);}d.failed(e),I.request(e,s.response);})}var ks;async function Os(e,t,s){if(W.isPaused)return;let{mode:r}=u;return W.concurrency>2?(ks>=20&&W.concurrency--,ks>=35&&W.concurrency--):W.concurrency<3&&ks<30&&W.concurrency++,r.upload||U(),await Qe(s).then(({headers:i,data:o})=>{if(s.method==="get")return o;s.method==="delete"?d.deleted(t.relative,e):r.watch?d.upload(e):r.upload&&Cr.emit("upload","uploaded",e,{key:t.key,namespace:t.namespace,fileSize:Er(s.data.asset.value)}),ks=parseInt(i["x-shopify-shop-api-call-limit"].slice(0,2),10);}).catch(i=>(i.response&&(i.response.status===429||i.response.status===500)?(r.upload||d.retrying(t.key,e),W.add(()=>Os(e,t,s))):r.upload?Cr.emit("upload","failed",e,{key:t.key,namespace:t.namespace,fileSize:Er(s.data.asset.value),get file(){return t},get error(){return i.response}}):(d.failed(t.key),I.request(t.relative,i.response)),Rs))}var Di=class{constructor(t=process.stdin){this.onKeypress=(s,r)=>{if(r.ctrl&&r.name==="c")return process.exit(0)},this.isBlocked=()=>this.blocked,this.block=()=>this.toggle(!0),this.unblock=()=>this.toggle(!1),this.toggle=(s=!this.blocked)=>{this.blocked=s,s?(this.stream.isTTY&&this.stream.setRawMode(!0),this.interface=Xo__default.default.createInterface({input:this.stream,escapeCodeTimeout:50}),Xo__default.default.emitKeypressEvents(this.stream,this.interface),this.stream.on("keypress",this.onKeypress)):(this.stream.isTTY&&this.stream.setRawMode(!1),this.interface&&this.interface.close(),this.stream.off("keypress",this.onKeypress));},this.stream=t,this.blocked=!1;}},Iu=Di;new Iu;var ju=globalThis.process?.env||{},Nu=globalThis.process?.argv||[];!("NO_COLOR"in ju)&&ju.TERM!=="dumb"&&!Nu.includes("--no-color")&&!Nu.includes("--no-colors");var qu=Ds__default.default.platform==="linux",Gu=Ds__default.default.platform==="win32";var di=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];Gu||di.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");qu&&di.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var Wu=di;var mi=class{constructor(){this.callbacks=new Set,this.exited=!1,this.hooked=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(let s of this.callbacks)s();t&&Ds__default.default.kill(Ds__default.default.pid,t);}},this.hook=()=>{if(!this.hooked){this.hooked=!0,Ds__default.default.once("exit",()=>this.exit());for(let t of Wu)Ds__default.default.once(t,()=>this.exit(t));}},this.register=t=>(this.hook(),this.callbacks.add(t),()=>{this.callbacks.delete(t);});}},zu=new mi;var Xc=zu.register,Uu=Xc;var hi=class{constructor(t=process.stdout){this.has=()=>this.visible,this.hide=()=>this.toggle(!1),this.show=()=>this.toggle(!0),this.toggle=(s=!this.visible)=>{if(!this.stream.isTTY)return;this.visible=s;let r=s?"\x1B[?25h":"\x1B[?25l";this.stream.write(r);},this.stream=t,this.visible=!0,Uu(this.show);}},Vu=hi;new Vu;async function Hu(e,t){if(is(arguments.length,1))return s=>Hu(e,s);if(it(f("namespace",t),f("key",t))){d.error("invalid fields");return}return Qe.get("metafields.json",e.client).then(({data:s})=>s.metafields.find(r=>t.namespace===r.namespace&&t.key===r.key)).catch(s=>{console.log(s);})}async function gi(e,t){return is(arguments.length,1)?s=>gi(e,s):(t.type="json",t.namespace="email",t.value_type="json_string",t.key="eng",Qe.post("metafields.json",{metafield:t},e.client).then(({data:s})=>(console.log("created",s),s.metafield)).catch(s=>{if(console.log(s),!e.queue)return I(t.namespace,s.response);if(ns(s.response.status)){W.add(()=>gi(e,t));return}else return I(e.store,s.response)}))}async function yi(e,t,s){return is(arguments.length,1)?(r,n)=>yi(e,r,n):Qe.put(`metafields/${t}.json`,{metafield:s},e.client).then(r=>(console.log("created"),r.data.metafield)).catch(r=>{if(!e.queue)return I(s.namespace,r.response);if(ns(r.response.status))W.add(()=>yi(e,t,s));else return I(e.store,r.response)})}async function Is(e,t){if(is(arguments.length,1))return r=>Is(e,r);let s=await Hu(e,t);return s?yi(e,s.id,z(t,{id:s.id,type:"json"})).catch(r=>{if(!e.queue)return I(t.namespace,r.response);if(ns(r.response.status))W.add(()=>Is(e,t));else return I(e.store,r.response)}):gi(e,t)}function js({stores:e,themes:t}){return {assets:async(s,r,n)=>{let i=H(n)?{method:s,params:{"asset[key]":r.key}}:{method:s,data:{asset:{key:r.key,value:n}}};await W.add(()=>ai(t,async o=>{u.mode.upload&&U(),await Os(o,r,fe({url:o.url},e[o.sidx].client,i));}));},pages:s=>W.add(function(){return rn(async function(r){},e)}),metafields:s=>W.add(function(){return rn(async function(r){await Is(r,s);},e)})}}function gt(e){return S(e)?e.filter(t=>/\*/.test(t)):/\*/.test(e)?e:null}function Ve(e){if(S(e))return e.map(Ve);if(e.indexOf("/")===-1)return e;let t=path.dirname(e),s=t.lastIndexOf("/")+1;return t.slice(s)}function xi(e){if(S(e))return e.map(xi);let t=e.lastIndexOf("/");if(t===-1)return e;let s=e.indexOf("*");return s===-1?e.slice(0,t):e.slice(0,s)}function Zt(e){let t=new RegExp(`^\\.?\\/?${e}\\/`);return function s(r){if(S(r))return r.map(s);let n=r.charCodeAt(0)===33;return n&&(r=r.slice(1)),t.test(r)?n?"!"+r:r:(r.charCodeAt(0)===46&&r.charCodeAt(1)===46&&r.charCodeAt(2)===47&&ae(`Invalid path defined at: ${_} ${se(`"${r}"`)}`,"Paths must be relative to source"),(n?"!":"")+path.join(e,r))}}var Yu=e=>t=>{if(t.indexOf("*")!==-1&&ae(`Base directory path cannot contain glob${_} ${se(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed"),t.charCodeAt(0)===46){if(t.length===1)return e+"/";t.charCodeAt(1)===47?t=t.slice(1):ae(`Directory path is invalid at${_} ${se(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");}if(t.charCodeAt(0)===47){if(t.length===1)return e+"/";t=t.slice(1);}if(/^[a-zA-Z0-9_-]+/.test(t))return t=path.join(e,t),Vi(t).charCodeAt(0)===47?t:t+"/";ae(`Directory path is invalid at${_} ${se(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");};function Ku(e){let t=u.svg.filter(s=>s.input.has(e.input)?!0:s.match(e.input)?(s.input.add(e.input),!0):!1);return H(t)||jt(e,"data",{get(){return t}}),e}function _r(e){let t=u.style.find(s=>s.watch(e.input));return H(t)||(jt(e,"data",{get(){return t}}),t.snippet?(e.namespace="snippets",e.key=path.join("snippets",t.rename)):e.key=path.join("assets",t.rename),e.output?e.data.rename!==path.basename(e.output)&&(t.snippet?e.output=path.join(u.dirs.output,e.key):e.output=path.join(xi(e.output),e.data.rename)):e.output=path.join(u.dirs.output,e.key)),e}function kr(e){let t=u.script.filter(s=>s.watch.has(e.input));return t.length===0||jt(e,"data",{get(){return t}}),e}function Fi(e){if(u.section.prefixDir){if(e.base.endsWith("-group.json")||cr(u.section.global)&&u.section.global.test(e.input))return e;let t=Ve(e.input)+u.section.separator+e.base;e.name=t,e.key=path.join(e.namespace,t),e.output=path.join(path.dirname(e.output),t);}return e}function Xu(e){if(u.snippet.prefixDir){if(cr(u.snippet.global)&&u.snippet.global.test(e.input))return e;let t=Ve(e.input)+u.snippet.separator+e.base;e.name=t,e.key=path.join(e.namespace,t),e.output=path.join(path.dirname(e.output),t);}return e}function Or({name:e,dir:t,ext:s,namespace:r},n){let i=n;return /\[dir\]/.test(i)&&(i=i.replace(/\[dir\]/g,t)),/\[file\]/.test(i)&&(i=i.replace(/\[file\]/g,e)),/\[ext\]/.test(i)&&(i=i.replace(/\[ext\]/g,s)),r==="snippets"&&n.endsWith(".liquid")===!1?i+".liquid":!n.endsWith(".[ext]")||!n.endsWith(s)?/\.[a-z]+$/.test(n)?i:i+s:i}function ea(e,t,s){let r=e;return (n,i,o)=>{let a;return i===13||i===14?(a=path.join(Ve(r.dir),r.base),s=null):(a=path.join(n,r.base),s=path.join(s,a)),z({},r,{uuid:We(),type:i,input:t,output:s,key:a,namespace:n,kind:o,relative:path.relative(u.cwd,t),size:NaN,data:void 0})}}function Ns(e,t){return s=>{let r=path.parse(s),n=ea(r,s,t);if(r.ext===".liquid"){if(e.sections(s))return Fi(n("sections",4,"Liquid"));if(e.snippets(s))return Xu(n("snippets",3,"Liquid"));if(e.layout(s))return n("layout",2,"Liquid");if(e.templates(s))return n("templates",1,"Liquid");if(e.customers(s))return n("templates/customers",1,"Liquid");if(e.transforms.has(s))switch(e.transforms.get(s)){case 7:return _r(n("snippets",7,"CSS"))}}else {if(r.ext===".md"||r.ext===".html")return n("pages",14,r.ext===".html"?"HTML":"Markdown");if(r.ext===".json"){if(e.metafields(s))return n("metafields",13,"JSON");if(e.sections(s))return Fi(n("sections",4,"JSON"));if(e.templates(s))return n("templates",1,"JSON");if(e.config(s))return n("config",5,"JSON");if(e.locales(s))return n("locales",6,"JSON");if(e.customers(s))return n("templates/customers",1,"JSON")}else {if(r.ext===".svg")return Ku(n("assets",9,"SVG"));if(r.ext===".css")return _r(n("assets",7,"CSS"));if(r.ext===".scss")return _r(n("assets",7,"SCSS"));if(r.ext===".sass")return _r(n("assets",7,"SASS"));if(r.ext===".js"||r.ext===".mjs")return kr(n("assets",8,"JavaScript"));if(r.ext===".ts")return kr(n("assets",8,"TypeScript"));if(r.ext===".jsx")return kr(n("assets",8,"JSX"));if(r.ext===".tsx")return kr(n("assets",8,"TSK"));if(e.assets(s)){if(u.spawn.invoked)return n("assets",15);if(r.ext===".jpg"||r.ext===".png"||r.ext===".gif"||r.ext===".pjpg")return n("assets",12,"Image");if(r.ext===".mov"||r.ext===".mp4"||r.ext===".webm"||r.ext===".ogg")return n("assets",12,"Video");if(r.ext===".pdf")return n("assets",12,"PDF");if(r.ext===".eot"||r.ext===".ttf"||r.ext===".woff"||r.ext===".woff2")return n("assets",12,"Font")}}}}}var ta=e=>t=>{let s=path.parse(t),r=ea(s,t,e);switch(path.basename(s.dir)){case"sections":return r("sections",4);case"snippets":return r("snippets",3);case"layout":return r("layout",2);case"templates":return r("templates",1);case"customers":return r("templates/customers",1);case"config":return r("config",5);case"locales":return r("locales",6);case"assets":return r("assets",12)}};var Ls=new RegExp(`{%-?\\s*render\\s+['"]${oo}['"][,\\slablsockvetr:0-9'"]+?-?%}\\s+`);async function sa(e=!1){let t=`snippets/${Fr}`,[s]=u.sync.themes,r=await fsExtra.readFile(u.hot.snippet),n=await ci(r.toString(),{theme:s,key:t});return d.update(q.message("gray",`${t} uploaded snippet injection`)),n}function er(e){return Ls.test(e)}function na(e){if(!er(e))return ia(e)}function Pr(e){let t=e.search(Ls);if(t>-1){let s=e.slice(0,t),r=e.slice(e.indexOf("%}")+2);return s+r}return e}function ia(e){let t=e.indexOf("<head>")+6;return e.slice(0,t)+x+u.hot.renderer+x+e.slice(t)}async function oa(e){if(!await fsExtra.pathExists(e))return null;let r=(await fsExtra.readFile(e)).toString();Ls.test(r)||(r=ia(r),await fsExtra.writeFile(e,r),d.update(q.message("gray","injected render tag in output layout")));let[n]=u.sync.themes,i=path.basename(e),o=`layout/${i}`,a=await Ou(`layout/${i}`,n);return Ls.test(a)&&(r=Pr(r)),await ci(r,{theme:n,key:o})?(d.update(q.message("gray","uploaded and inject render tag")),!0):!1}async function ua(e){d.newGroup("Upload"),d.spinner("Preparing"),U("upload");let t={files:[],sync:{}},s=ta(u.dirs.output),r=Wa__default.default.sync(`${u.dirs.output}/**`).sort(),n=js(u.sync),i=Ee(e),o=new Map,a=0,h=0,p=r.length;for(let{store:c,target:g}of u.sync.themes)g.length>h&&(h=g.length),f(c,t.sync)||(t.sync[c]=[]),t.sync[c].push({theme:g,uploaded:0,failed:0,progress:d.progress(p)});Cr.on("upload",function(c,{target:g,store:m},T){d.spinner.stop();let R=c==="failed",j=[q.message("whiteBright",F(T.namespace)),dt,q.message(c==="failed"?"redBright":"neonGreen",T.key),dt,q.suffix("white","size ",` ${T.fileSize}`),x,q.suffix("white","duration ",` ${X()}`),x,q.suffix("white","elapsed ",` ${Lt("upload")}`),dt];for(let le in t.sync)for(let ne of t.sync[le]){le===m&&g===ne.theme&&(ne[c]+=1,ne.progress.increment(1));let Fe=`${F(ne.theme.toUpperCase())+Re(h-g.length)} ${Ue} ${le}`;j.push(q.message("neonCyan",Fe),dt,q.suffix("whiteBright","uploaded ",` ${F(`${ne.uploaded}`)} ${C("of")} ${F(`${p}`)}`),x,q.suffix(ne.failed>0?"redBright":"white","failed ",` ${F(`${ne.failed}`)}`),dt,ne.progress.render(!1),dt),R&&(o.has([le,g])?o.get([le,g]).push([T.file,T.error]):o.set([le,g],[[T.file,T.error]]));}d.update(Oe(j));});for(let c of r){let g=s(c),m;try{if(m=(await fsExtra.readFile(g.input)).toString(),g.namespace==="layout"&&er(m)&&(m=Pr(m)),!i)await n.assets("put",g,m);else {let R=e.apply({...g},m);H(R)||R===!1?await n.assets("put",g,m):P(R)?await n.assets("put",g,R):we(R)?await n.assets("put",g,R.toString()):await n.assets("put",g,m);}a++;}catch(T){console.log(T);}}}async function aa(e){U();let t=Ee(e);for(let s of u.sync.themes){let r=u.sync.stores[s.sidx],{assets:n}=await pi(s.url,r.client);for(let{key:i}of n)try{let o=fe(r.client,{params:{"asset[key]":i}}),{asset:a}=await pi(s.url,o),l=path.join(u.dirs.import,r.domain,s.target,i),h=f("attachment",a)?Buffer.from(a.attachment,"base64"):Buffer.from(a.value||null,"utf8");if(d.write(`${L.neonCyan(i)}`),t){let p=e.apply({asset:a,output:l},h);H(p)||p===!1?await fsExtra.writeFile(l,h):P(p)||we(p)?await fsExtra.writeFile(l,p):await fsExtra.writeFile(l,h);}else await fsExtra.writeFile(l,h);}catch{d.failed(i);}}}var dp=e=>async t=>(e.type!==15&&await fsExtra.writeFile(e.output,t).catch(I.write("Error writing asset to output",{file:e.relative,source:e.relative})),t);async function qs(e,t){let s=dp(e),r=await fsExtra.readFile(e.input).catch(I.write("Error reading asset file",{file:e.relative,source:e.relative}));if(r){if(!Ee(t))return s(r);let n=t.apply({...e},r);return H(n)||n===!1?s(r):ce(n)?s(n):we(n)?s(n.toString()):s(r)}}var gp=/{%-?\s*#[\s\S]+?%}/g,yp=/{%-?\s*comment\s*-?%}[\s\S]+?{%-?\s*endcomment\s*-?%}/g,xp=/{%-?\s*liquid[\s\S]+?%}/g,Fp=/[^,:'"a-zA-Z0-9=] +[^'"a-zA-Z0-9=}{]/g;function Gs(e){return u.terser.liquid.removeComments?e.replace(yp,$).replace(gp,$):e}function wp(e){return e.replace(xp,t=>`
85
+ ${d("If you are using a different package manager (i.e: Yarn or NPM) then")}
86
+ ${d("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
87
+ `):Q(A(2),B(`${F(`Missing ${O(`${e.length}`)} dependencies`)}`)+A(2),B("You are attempting to use processors which are not yet installed!")+A(2),tt(d("-")+ye+e.join(x+d(" -")+ye))+A(2),C.bold("How to fix?")+x,`
88
+ $ ${Pn("pnpm add "+e.join(ye)+" -D")}
89
+
90
+ ${d("If you are using a different package manager (i.e: Yarn or NPM) then")}
91
+ ${d("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
92
+ `),process.exit(0);}function wu(e,t,s,r){e.indexOf(".")>-1&&(e=e.split(".").filter(Boolean).join(d(" \u2192 "))),Q(A(2),B(`${F(`Missing ${Wn} ${O(e)} ${zn} configuration option`)}`)+A(2),B(`The ${O(t)} option needs to be defined`)+A(2),B(`expects${R} ${E(s.replace(/([|,])/g,d("$1")))}`)+A(2),B(`at${R} ${d.underline(u.file.base)}`)+A(2),C.bold("Why?")+x+x+d(v(r)?` ${r.join(`
93
+ `)}`:` ${r}`)+x+x),process.exit(0);}function he(e,t,s,r){Q(A(2),ue.bold("ERROR (!)"),A(2),B(`${F(`Invalid ${O(e)} configuration`)}`)+A(2),B(`The ${O(t)} option has an invalid or missing value`)+A(2),B(`provided${R} ${ne(s)}`)+x,B(`expected${R} ${E(r.replace(/([|,])/g,d("$1")))}`)+A(2),C.bold("How to fix?")+x,`
94
+ ${d("You need to update the option and use one of the expected values.")}
95
+ ${d(`Use the ${O("defineConfig")} named export for type checking`)}
96
+ `),process.exit(0);}function Cu(e){Q(A(2),ue.bold("ERROR (!)"),A(2),B(`${F(`Missing ${O("syncify.config.js")} configuration`)}`)+A(2),B("Unable to resolve a configuration file within the workspace")+A(2),B(`at${R} ${d.underline(e)}`)+A(2),C.bold("How to fix?")+x,`
97
+ ${d("You need to add one the following files to your project")}
98
+
99
+ ${d("-")} ${C("syncify.config.ts")}
100
+ ${d("-")} ${C("syncify.config.js")}
101
+ ${d("-")} ${C("syncify.config.mjs")}
102
+ ${d("-")} ${C("syncify.config.cjs")}
103
+ ${d("-")} ${C("syncify.config.json")}
104
+
105
+ ${d("You can also provide configuration in your")} ${C("package.json")}
106
+ ${d("file using on a")} ${ne('"syncify": {}')} ${d("property.")}
107
+ `),process.exit(0);}function ae(e,t){Q(A(2),ue.bold("(!) ERROR"),A(2),B.bold(e)+A(2),C.bold("How to fix?")+x,d(v(t)?t.join(x).trimStart():t),A(2)),process.exit(0);}function _t(e,t){e.indexOf(".")>-1&&(e=d.bold("{ ")+e.split(".").filter(Boolean).join(d(" \u2192 "))+d(" \u2192 ")+ue.bold(t)+d.bold(" }"));let s=u.file.base==="package.json"?`${E("syncify")} config in the ${E("package.json")} file.`:`${E(u.file.base)} file.`;Q(A(2),ue.bold("ERROR (!)"),A(2),ue(`Unknown ${e} option provided.`)+A(2),C.bold("How to fix?")+x,`
108
+ ${d(`The ${E(t)} option is invalid or unsupported.`)}
109
+ ${d(`You need to remove it from the ${s}`)}
110
+ `),process.exit(0);}function bu(e){let t=[];if(e.mode.metafields)return $;t.push(`${Tr}${d("Syncify")} ${d("~")} ${d(vr())}`,`${y.gray}`),Cc(t),t.push(`${y.gray}${tt.bold(`v${e.version}`)}`,`${y.gray}`);let s=e.sync.stores.length,r=_e(e.sync.themes).length,n=_e(e.spawn.commands).length,{mode:i,spawn:o}=e,a=O.bold(String(s))+(s>1?" stores":" store"),l=O.bold(String(r))+(r>1?" themes":" theme"),m=O.bold(`${e.env.dev?"development":"production"}`);i.build?t.push(`${y.gray}Running ${O.bold("build")} in ${m}`):i.watch?t.push(`${y.gray}Running ${O.bold("watch")} in ${m}`):i.upload?t.push(`${y.gray}Running ${O.bold("upload")} mode`):i.download?t.push(`${y.gray}Running ${O.bold("download")} mode`):i.vsc?t.push(`${y.gray}Generate ${O.bold("vscode")} schema`):i.clean?t.push(`${y.gray}Running ${O.bold("clean")} mode`):i.export&&t.push(`${y.gray}Running ${O.bold("export")} mode`),t.push(`${y.gray}${s>0&&r>0?`Syncing ${l} to ${a}`:$}`),Z(e.filters)||t.push(`${y.gray}${tt.bold("Filters")}`,`${y.gray}`+wc(e.filters)),e.logger.warnings&&Ec(e,t),ge(i.build,i.watch)&&n>0?t.push(`${y.gray}Spawned ${O.bold(`${n}`)} child ${n>1?"processes":"process"}`,`${y.gray}`):t.push(y.gray),ot(i.upload,i.download,i.build,i.clean,i.vsc)&&(n>0&&t.push(`${y.gray}${F("Child Processes:")}`,`${y.gray}${bc(ut(o.streams))}`,`${y.gray}`),r>0&&t.push(`${y.gray}${F("Theme Editors:")}`,`${y.gray}${Eu(e.sync.themes,"editor")}`,`${y.gray}`)),ge(i.upload,i.download,i.watch)&&r>0&&t.push(`${y.gray}${F(i.upload||i.download?"Theme Targets:":"Theme Previews:")}`,`${y.gray}${Eu(e.sync.themes,"preview")}`),e.mode.hot&&t.push(`${y.gray}`),S(t.join(x));}function wc(e){return Vr(e).flat().reduce((t,s)=>(t+=x+y.gray+mt+ye+tt(s),t),$)}function Cc(e){let t=St().cols;t>=100||e.push(`${y.gray}${B.bold("TERMINAL WIDTH WARNING")}`,`${y.gray}`,`${y.gray}${B(`Your terminal width is below ${F("100")} columns (currently ${F(`${t}`)})`)}`,`${y.gray}${B("This is not recommended for usage with Syncify (size matters).")}`,`${y.gray}${B("Expand your terminal wider for an optimal logging experience.")}`,`${y.gray}`);}function Ec(e,t){let s=!1;for(let r in Rt){let n=Rt[r];n.length>0&&(s===!1&&(s=!0,t.push(`${y.gray}`,`${y.yellow}${ne(`${F("Warnings")} in ${F(e.file.base)}`)}`)),t.push(y.yellow,y.yellow+ms.bold(`${n.length} ${r} ${Ze("warning",n.length)}`),y.yellow,n.join(x)));}}function bc(e){let t=e.reduce((s,[r])=>r.length>s?r.length:s,0);return e.reduce((s,[r,n])=>(s+=x+y.gray+Re(t-r.length)+vt(as(r))+`${R} `+d("PID")+" \u2192 "+d("#")+Ar(`${n.pid}`),s),$)}function Eu(e,t){let s=e.reduce((r,{target:n,store:i})=>{let o=i.indexOf(".");return o>r.store&&(r.store=o),n.length>r.theme&&(r.theme=n.length),r},{store:0,theme:0});return e.reduce((r,{target:n,store:i,id:o})=>{let a=i.slice(0,i.indexOf(".")),l=t==="editor"?`https://${i}/admin/themes/${o}/editor`:`https://${i}?preview_theme_id=${o}`;return r+=x+y.gray+Ar(a)+Re(s.store-a.length)+C(" \u2192 ")+Ar.bold(n)+Re(s.theme-n.length)+C(" \u2192 ")+d.underline(l),r},$)}var si,Ts=!1,ni=function(t,s="pink"){Ts=!0;let r=0,n=Dn.length;si=setInterval(()=>{Ts&&Tt(`${y.gray} ${L[s](`${Dn[r=++r%n]}`)}${t?` ${t}`:$}`);},50);};ni.stop=e=>{Ts&&(Ts=!1,e?(Tt(y.gray+e),Tt.done()):Tt.clear(),clearInterval(si),si=void 0);};function Su(e,t={}){let s=z({showPercentage:!0,barColor:"neonGreen",percentColor:"whiteBright",barSize:40,clearOnComplete:!1},t),r=0;function n(c){return L.line.gray+c+" ".repeat(Math.max(0,s.barSize-c.length))}function i(c,p=!1){return (p?"\u25B1":"\u25B0").repeat(c)}function o(){s.clearOnComplete&&console.clear();}function a(c=1){let p=r+c;r=Math.min(p,e),r===e&&o();}function l(c=1){let p=r-c;r=Math.max(p,0);}function m(){let c=Math.round(r/e*s.barSize),p=i(c),g=i(s.barSize-c,!0),h=L[s.barColor](p)+L.lightGray(g);return s.showPercentage&&(h+=` ${String(Math.round(r/e*100))}%`),n(h)}return {stop:o,increment:a,decrement:l,render:m,get percent(){return r}}}var ii=new Set,ui=null,oi=!1,Te="Syncify",Xt=$,vu=$;function Sc(e,t,s){let r=Xt!==e;U(),r&&S(Wt(Te)),Te==="Syncify"&&st(),Te=e,r&&(S(Gt(Te)),Kt(),S(y.gray+F(`${t} ${as(e)}`)),Kt(),Xt=e),Kt(),S(Vn("top",vt(typeof s=="string"?s:s.relative)));}function Kt(e="gray"){Z(e)?S(x):S(y[e]);}function vc(e){v(e)?Q(B(e.map(t=>y.red+Lt(t)).join(x))):Q(y.red+Lt(e));}function Bc(e){v(e)?S(e.map(t=>y.gray+Lt(t)).join(x)):S(y.gray+Lt(e));}function $c(e){S(J("cyan","external",e));}function Ac(e){pe.current!==e&&(pe.current=e),f(e,pe.process)||(pe.current=e,pe.process[e]=new Set),ui=So((t,s)=>{if(s.charCodeAt(0)===9474)$u[t].write(s);else {pe.count+=1;let r=s.split(`
111
+ `);for(;r.length!==0;)pe.process[e].add(`${ne(r.shift().trimStart())}`);}});}function Tc(){ui(),ui=null;}function Rc(e,t=!1){S(Wt(Te)),t&&st(),S(Gt(e)),Te=e,Kt();}function _c(e){let t=Xt!==e.relative;U(),t&&S(Wt(Te)),Te!=="Syncify"&&t&&st(),Te=e.namespace,t&&(st(),S(Gt(e.kind)),Xt=e.relative),f(e.relative,pe)||(pe[e.relative]=new Set),vu!==e.relative&&(vu=e.relative),u.mode.watch&&(Kt(),S(J("neonCyan","changed",e.relative)));}function kc(){S(J("neonRouge","reloaded",`${F("HOT RELOAD")}${qt(Mt())}`));}function Oc(e){if(u.mode.watch){if(ii.add([e.target,e.store,X()]),oi)return;oi=!0,W.onIdle().then(()=>{for(let[t,s,r]of ii)S(J("neonGreen","uploaded",`${F(t)} \u2192 ${s}`+qt(r)));ii.clear(),oi=!1;});}else S(J("neonGreen","uploaded",`${F(e.target)} \u2192 ${e.store}`+qt(X())));}function Pc(e,t=!1){pe.count>0&&J("yellowBright","warning",`${pe.count} ${Ze("warning",pe.count)}`),t?(S(J("magentaBright","syncing",e)),W.pending>2&&S(J("orange","queued",`${e} ~ ${F(xn(W.pending))} in queue`))):(S(J("magentaBright","syncing",e)),W.pending>0&&S(J("orange","queued",`${e} ~ ${F(xn(W.pending))} in queue`)));}function $u(e,...t){let s=t[0],r=$;t.length===2&&(r=` ${Gn} ${t[0]}`,s=t[1]),S(J("whiteBright","process",F(e)+r+qt(s)));}function Ic(e){S(J("whiteBright","exports",e));}function jc(e){u.mode.build||S(J("lavender","importer",e));}function Nc(e){S(J("whiteBright","transform",e));}function Lc(e,t){S(J("orange","retrying",`${e} \u2192 ${t.target} ${d(`~ ${t.store}`)}`));}function Mc(e,t){S(J("blueBright","deleted",`${e} \u2192 ${t.target} ${d(`~ ${t.store}`)}`));}function qc(e,t,s,r){let n=e?`${F(e)} ${ke} ${t} ${gs} ${s} ${d(`~ saved ${r}`)}`:`${t} ${gs} ${s} ${d(`~ saved ${r}`)}`;S(J("whiteBright","minified",n));}function Gc(e,t){S(J("whiteBright","reloaded",e+t));}function Wc(e,t){S(J("gray","skipped",`${typeof e=="string"?e:e.key} ~ ${t}`));}function zc(e){S(J("gray","ignored",e));}function Uc(e){S(J("red","invalid",e)),Bu__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Invalid error"}).notify();}function Vc(e){S(J("red","failed",e)),Bu__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Request failed"}).notify();}function Hc(e){throw new Error(e)}function Jc(e){return (...t)=>{u.spawn.invoked||(u.spawn.invoked=!0),Te!=="Spawn"&&(S(Wt(Te)),Te!=="Syncify"&&st(),S(Gt("Spawn")),Te="Spawn"),Xt!==e&&(S(Hn("pink",e)),Xt=e),Yn(Lt(t.shift()));}}var Zt={};cr(Zt,{esbuild:()=>Au,postcss:()=>Qc,sass:()=>Yc,warnings:()=>Me});var Me={},Yc=e=>(t,s)=>{let r=$;f(e.input,Me)?Me[e.input].has("sass")||Me[e.input].set("sass",new Set):Me[e.input]=new Map([["sass",new Set]]);let n=Me[e.input].get("sass");if(r+=ht(t,{nwl:!0,line:y.yellow,text:ne.bold}),f("span",s)){let i=f("start",s.span)&&f("end",s.span)?{start:s.span.start.line,end:s.span.end.line}:null,o=f("context",s.span)?s.span.context:f("text",s.span)?s.span.text:null;o!==null&&(i!==null?r+=Bt(o,{line:y.yellow,span:i}):r+=Bt(o));}r+=Le({stack:s.stack,entries:{file:e.relative,deprecated:s.deprecation?"Yes":"No"}}),n.has(r)?S(J("yellowBright","warning",`${n.size} ${Ze("warning",n.size)+ys}`)):(n.add(r),S(J("yellowBright","warning",`${n.size} ${Ze("warning",n.size)+ys}`)));};function Au(e){}function Qc(e,t){let s=$;f(e.input,Me)?Me[e.input].has("postcss")||Me[e.input].set("postcss",new Set):Me[e.input]=new Map([["postcss",new Set]]);let r=Me[e.input].get("postcss");s+=Bt(t.node.toString(),{line:y.yellow,span:Hr(t.endLine)?{start:t.line,end:t.endLine}:{start:t.line,end:t.endLine}}),s+=Le({stack:!1,entries:{column:t.column,file:e.relative,plugin:t.plugin}}),r.has(s)||(r.add(s),Ji(s));}function Tu(){D.nwl(""),D.out(d("SIGINT")),process.exit();}function Ru(e,t){D.nwl(),D.err(`Unhandled Promise Rejection at: ${t}`),D.nwl("red"),D.out(e?d(e):"Unkown Reason");}function _u(e){D.nwl(),D.err(`Uncaught Exception: ${e.message}`),D.nwl("red"),D.err(`${e.stack}`);}var ai=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},ku=e=>globalThis.DOMException===void 0?new ai(e):new DOMException(e),Ou=e=>{let t=e.reason===void 0?ku("This operation was aborted."):e.reason;return t instanceof Error?t:ku(t)};async function li(e,t,{concurrency:s=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:n}={}){return new Promise((i,o)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(s)||s===Number.POSITIVE_INFINITY)&&s>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${s}\` (${typeof s})`);let a=[],l=[],m=new Map,c=!1,p=!1,g=!1,h=0,T=0,_=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),j=ie=>{c=!0,p=!0,o(ie);};n&&(n.aborted&&j(Ou(n)),n.addEventListener("abort",()=>{j(Ou(n));}));let le=async()=>{if(p)return;let ie=await _.next(),Fe=T;if(T++,ie.done){if(g=!0,h===0&&!p){if(!r&&l.length>0){j(new AggregateError(l));return}if(p=!0,m.size===0){i(a);return}let Je=[];for(let[re,Xs]of a.entries())m.get(re)!==Rs&&Je.push(Xs);i(Je);}return}h++,(async()=>{try{let Je=await ie.value;if(p)return;let re=await t(Je,Fe);re===Rs&&m.set(Fe,re),a[Fe]=re,h--,await le();}catch(Je){if(r)j(Je);else {l.push(Je),h--;try{await le();}catch(re){j(re);}}}})();};(async()=>{for(let ie=0;ie<s;ie++){try{await le();}catch(Fe){j(Fe);break}if(g||c)break}})();})}var Rs=Symbol("skip");function gt(e){return v(e)?e.filter(t=>/\*/.test(t)):/\*/.test(e)?e:null}function He(e){if(v(e))return e.map(He);if(e.indexOf("/")===-1)return e;let t=path.dirname(e),s=t.lastIndexOf("/")+1;return t.slice(s)}function ci(e){if(v(e))return e.map(ci);let t=e.lastIndexOf("/");if(t===-1)return e;let s=e.indexOf("*");return s===-1?e.slice(0,t):e.slice(0,s)}function er(e){let t=new RegExp(`^\\.?\\/?${e}\\/`);return function s(r){if(v(r))return r.map(s);let n=r.charCodeAt(0)===33;return n&&(r=r.slice(1)),t.test(r)?n?"!"+r:r:(r.charCodeAt(0)===46&&r.charCodeAt(1)===46&&r.charCodeAt(2)===47&&ae(`Invalid path defined at: ${R} ${ne(`"${r}"`)}`,"Paths must be relative to source"),(n?"!":"")+path.join(e,r))}}var Iu=e=>t=>{if(t.indexOf("*")!==-1&&ae(`Base directory path cannot contain glob${R} ${ne(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed"),t.charCodeAt(0)===46){if(t.length===1)return e+"/";t.charCodeAt(1)===47?t=t.slice(1):ae(`Directory path is invalid at${R} ${ne(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");}if(t.charCodeAt(0)===47){if(t.length===1)return e+"/";t=t.slice(1);}if(/^[a-zA-Z0-9_-]+/.test(t))return t=path.join(e,t),Hi(t).charCodeAt(0)===47?t:t+"/";ae(`Directory path is invalid at${R} ${ne(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");};function Nu(e){let t=u.svg.filter(s=>s.input.has(e.input)?!0:s.match(e.input)?(s.input.add(e.input),!0):!1);return H(t)||Nt(e,"data",{get(){return t}}),e}function kr(e){let t=u.style.find(s=>s.watch(e.input));return H(t)||(Nt(e,"data",{get(){return t}}),t.snippet?(e.namespace="snippets",e.key=path.join("snippets",t.rename)):e.key=path.join("assets",t.rename),e.output?e.data.rename!==path.basename(e.output)&&(t.snippet?e.output=path.join(u.dirs.output,e.key):e.output=path.join(ci(e.output),e.data.rename)):e.output=path.join(u.dirs.output,e.key)),e}function Or(e){let t=u.script.filter(s=>s.watch.has(e.input));return t.length===0||Nt(e,"data",{get(){return t}}),e}function pi(e){if(u.section.prefixDir){if(e.base.endsWith("-group.json")||fr(u.section.global)&&u.section.global.test(e.input))return e;let t=He(e.input)+u.section.separator+e.base;e.name=t,e.key=path.join(e.namespace,t),e.output=path.join(path.dirname(e.output),t);}return e}function Lu(e){if(u.snippet.prefixDir){if(fr(u.snippet.global)&&u.snippet.global.test(e.input))return e;let t=He(e.input)+u.snippet.separator+e.base;e.name=t,e.key=path.join(e.namespace,t),e.output=path.join(path.dirname(e.output),t);}return e}function Pr({name:e,dir:t,ext:s,namespace:r},n){let i=n;return /\[dir\]/.test(i)&&(i=i.replace(/\[dir\]/g,t)),/\[file\]/.test(i)&&(i=i.replace(/\[file\]/g,e)),/\[ext\]/.test(i)&&(i=i.replace(/\[ext\]/g,s)),r==="snippets"&&n.endsWith(".liquid")===!1?i+".liquid":!n.endsWith(".[ext]")||!n.endsWith(s)?/\.[a-z]+$/.test(n)?i:i+s:i}function qu(e,t,s){let r=e;return (n,i,o)=>{let a;return i===13||i===14?(a=path.join(He(r.dir),r.base),s=null):(a=path.join(n,r.base),s=path.join(s,a)),z({},r,{uuid:Ue(),type:i,input:t,output:s,key:a,namespace:n,kind:o,relative:path.relative(u.cwd,t),size:NaN,data:void 0})}}function _s(e,t){return s=>{let r=path.parse(s),n=qu(r,s,t);if(r.ext===".liquid"){if(e.sections(s))return pi(n("sections",4,"Liquid"));if(e.snippets(s))return Lu(n("snippets",3,"Liquid"));if(e.layout(s))return n("layout",2,"Liquid");if(e.templates(s))return n("templates",1,"Liquid");if(e.customers(s))return n("templates/customers",1,"Liquid");if(e.transforms.has(s))switch(e.transforms.get(s)){case 7:return kr(n("snippets",7,"CSS"))}}else {if(r.ext===".md"||r.ext===".html")return n("pages",14,r.ext===".html"?"HTML":"Markdown");if(r.ext===".json"){if(e.metafields(s))return n("metafields",13,"JSON");if(e.sections(s))return pi(n("sections",4,"JSON"));if(e.templates(s))return n("templates",1,"JSON");if(e.config(s))return n("config",5,"JSON");if(e.locales(s))return n("locales",6,"JSON");if(e.customers(s))return n("templates/customers",1,"JSON")}else {if(r.ext===".svg")return Nu(n("assets",9,"SVG"));if(r.ext===".css")return kr(n("assets",7,"CSS"));if(r.ext===".scss")return kr(n("assets",7,"SCSS"));if(r.ext===".sass")return kr(n("assets",7,"SASS"));if(r.ext===".js"||r.ext===".mjs")return Or(n("assets",8,"JavaScript"));if(r.ext===".ts")return Or(n("assets",8,"TypeScript"));if(r.ext===".jsx")return Or(n("assets",8,"JSX"));if(r.ext===".tsx")return Or(n("assets",8,"TSK"));if(e.assets(s)){if(u.spawn.invoked)return n("assets",15);if(r.ext===".jpg"||r.ext===".png"||r.ext===".gif"||r.ext===".pjpg")return n("assets",12,"Image");if(r.ext===".mov"||r.ext===".mp4"||r.ext===".webm"||r.ext===".ogg")return n("assets",12,"Video");if(r.ext===".pdf")return n("assets",12,"PDF");if(r.ext===".eot"||r.ext===".ttf"||r.ext===".woff"||r.ext===".woff2")return n("assets",12,"Font")}}}}}var Gu=e=>t=>{let s=path.parse(t),r=qu(s,t,e);switch(path.basename(s.dir)){case"sections":return r("sections",4);case"snippets":return r("snippets",3);case"layout":return r("layout",2);case"templates":return r("templates",1);case"customers":return r("templates/customers",1);case"config":return r("config",5);case"locales":return r("locales",6);case"assets":return r("assets",12)}};var rp=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(s=>e[s]=t[s]),e)),Di=(e,t,s)=>{let r=typeof s;if(s&&r==="object")if(Array.isArray(s))for(let n of s)t=Di(e,t,n);else for(let n of Object.keys(s)){let i=s[n];typeof i=="function"?t[n]=i(t[n],ks):i===void 0?e&&!isNaN(n)?t.splice(n,1):delete t[n]:i===null||typeof i!="object"||Array.isArray(i)?t[n]=i:typeof t[n]=="object"?t[n]=i===t[n]?i:ks(t[n],i):t[n]=Di(!1,{},i);}else r==="function"&&(t=s(t,ks));return t},ks=(e,...t)=>{let s=Array.isArray(e);return Di(s,s?e.slice():rp({},e),t)},fe=ks;async function Wu(e,t){return Ke({...u.sync.stores[t.sidx].client,method:"get",url:t.url,params:{"asset[key]":e}}).then(({data:s})=>s.asset).catch(()=>!1)}async function di(e,t){let s=fe(u.sync.stores[t.theme.sidx].client,{method:"put",url:t.theme.url,data:{asset:{key:t.key,value:e}}});return Ke(s).then(()=>!0).catch(r=>(D.failed(t.key),I.request(t.key,r.response),!1))}async function mi(e,t){return Ke.get(e,t).then(({data:s})=>s).catch(s=>{if(s.response&&(s.response.status===429||s.response.status===500))D.retrying(file.key,theme),W.add(()=>Ps(theme,file,t));else {if(u.mode.upload)throw s.response;D.failed(file.key),I.request(file.relative,s.response);}D.failed(e),I.request(e,s.response);})}var Os;async function Ps(e,t,s){if(W.isPaused)return;let{mode:r}=u;return W.concurrency>2?(Os>=20&&W.concurrency--,Os>=35&&W.concurrency--):W.concurrency<3&&Os<30&&W.concurrency++,r.upload||U(),await Ke(s).then(({headers:i,data:o})=>{if(s.method==="get")return o;s.method==="delete"?D.deleted(t.relative,e):r.watch?(t.type!==8&&t.type!==7&&D.hot(),D.upload(e)):r.upload&&br.emit("upload","uploaded",e,{key:t.key,namespace:t.namespace,fileSize:Sr(s.data.asset.value)}),Os=parseInt(i["x-shopify-shop-api-call-limit"].slice(0,2),10);}).catch(i=>(i.response&&(i.response.status===429||i.response.status===500)?(r.upload||D.retrying(t.key,e),W.add(()=>Ps(e,t,s))):r.upload?br.emit("upload","failed",e,{key:t.key,namespace:t.namespace,fileSize:Sr(s.data.asset.value),get file(){return t},get error(){return i.response}}):(D.failed(t.key),We("response.data",i.response)&&I.request(t.relative,i.response)),Rs))}var gi=class{constructor(t=process.stdin){this.onKeypress=(s,r)=>{if(r.ctrl&&r.name==="c")return process.exit(0)},this.isBlocked=()=>this.blocked,this.block=()=>this.toggle(!0),this.unblock=()=>this.toggle(!1),this.toggle=(s=!this.blocked)=>{this.blocked=s,s?(this.stream.isTTY&&this.stream.setRawMode(!0),this.interface=Zo__default.default.createInterface({input:this.stream,escapeCodeTimeout:50}),Zo__default.default.emitKeypressEvents(this.stream,this.interface),this.stream.on("keypress",this.onKeypress)):(this.stream.isTTY&&this.stream.setRawMode(!1),this.interface&&this.interface.close(),this.stream.off("keypress",this.onKeypress));},this.stream=t,this.blocked=!1;}},Uu=gi;new Uu;var Vu=globalThis.process?.env||{},Hu=globalThis.process?.argv||[];!("NO_COLOR"in Vu)&&Vu.TERM!=="dumb"&&!Hu.includes("--no-color")&&!Hu.includes("--no-colors");var Qu=Ds__default.default.platform==="linux",Ku=Ds__default.default.platform==="win32";var yi=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];Ku||yi.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");Qu&&yi.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var Xu=yi;var xi=class{constructor(){this.callbacks=new Set,this.exited=!1,this.hooked=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(let s of this.callbacks)s();t&&Ds__default.default.kill(Ds__default.default.pid,t);}},this.hook=()=>{if(!this.hooked){this.hooked=!0,Ds__default.default.once("exit",()=>this.exit());for(let t of Xu)Ds__default.default.once(t,()=>this.exit(t));}},this.register=t=>(this.hook(),this.callbacks.add(t),()=>{this.callbacks.delete(t);});}},Zu=new xi;var sp=Zu.register,ea=sp;var Fi=class{constructor(t=process.stdout){this.has=()=>this.visible,this.hide=()=>this.toggle(!1),this.show=()=>this.toggle(!0),this.toggle=(s=!this.visible)=>{if(!this.stream.isTTY)return;this.visible=s;let r=s?"\x1B[?25h":"\x1B[?25l";this.stream.write(r);},this.stream=t,this.visible=!0,ea(this.show);}},ta=Fi;new ta;async function ra(e,t){if(is(arguments.length,1))return s=>ra(e,s);if(ot(f("namespace",t),f("key",t))){D.error("invalid fields");return}return Ke.get("metafields.json",e.client).then(({data:s})=>s.metafields.find(r=>t.namespace===r.namespace&&t.key===r.key)).catch(s=>{console.log(s);})}async function wi(e,t){return is(arguments.length,1)?s=>wi(e,s):(t.type="json",t.namespace="email",t.value_type="json_string",t.key="eng",Ke.post("metafields.json",{metafield:t},e.client).then(({data:s})=>(console.log("created",s),s.metafield)).catch(s=>{if(console.log(s),!e.queue)return I(t.namespace,s.response);if(ns(s.response.status)){W.add(()=>wi(e,t));return}else return I(e.store,s.response)}))}async function Ci(e,t,s){return is(arguments.length,1)?(r,n)=>Ci(e,r,n):Ke.put(`metafields/${t}.json`,{metafield:s},e.client).then(r=>(console.log("created"),r.data.metafield)).catch(r=>{if(!e.queue)return I(s.namespace,r.response);if(ns(r.response.status))W.add(()=>Ci(e,t,s));else return I(e.store,r.response)})}async function js(e,t){if(is(arguments.length,1))return r=>js(e,r);let s=await ra(e,t);return s?Ci(e,s.id,z(t,{id:s.id,type:"json"})).catch(r=>{if(!e.queue)return I(t.namespace,r.response);if(ns(r.response.status))W.add(()=>js(e,t));else return I(e.store,r.response)}):wi(e,t)}function Ns({stores:e,themes:t}){return {assets:async(s,r,n)=>{let i=H(n)?{method:s,params:{"asset[key]":r.key}}:{method:s,data:{asset:{key:r.key,value:n}}};await W.add(()=>li(t,async o=>{u.mode.upload&&U(),await Ps(o,r,fe({url:o.url},e[o.sidx].client,i));}));},pages:s=>W.add(function(){return sn(async function(r){},e)}),metafields:s=>W.add(function(){return sn(async function(r){await js(r,s);},e)})}}var Ls=new RegExp(`{%-?\\s*render\\s+['"]${uo}['"][,\\slablsockvetr:0-9'"]+?-?%}\\s+`);async function na(){let e=`snippets/${Cr}`,[t]=u.sync.themes,s=await fsExtra.readFile(u.hot.snippet),r=await di(s.toString(),{theme:t,key:e});return D.update(q.message("gray",`${e} uploaded snippet injection`)),r}function rr(e){return Ls.test(e)}function ia(e){if(!rr(e))return oa(e)}function Ir(e){let t=e.search(Ls);if(t>-1){let s=e.slice(0,t),r=e.slice(e.indexOf("%}")+2);return s+r}return e}function oa(e){let t=e.indexOf("<head>")+6;return e.slice(0,t)+x+u.hot.renderer+x+e.slice(t)}async function ua(e){if(!await fsExtra.pathExists(e))return null;let r=(await fsExtra.readFile(e)).toString();Ls.test(r)||(r=oa(r),await fsExtra.writeFile(e,r),D.update(q.message("gray","injected render tag in output layout")));let[n]=u.sync.themes,i=path.basename(e),o=`layout/${i}`,a=await Wu(`layout/${i}`,n);return Ls.test(a)&&(r=Ir(r)),await di(r,{theme:n,key:o})?(D.update(q.message("gray","uploaded and inject render tag")),!0):!1}async function aa(e){D.newGroup("Upload"),D.spinner("Preparing"),U("upload");let t={files:[],sync:{}},s=Gu(u.dirs.output),r=Ga__default.default.sync(`${u.dirs.output}/**`).sort(),n=Ns(u.sync),i=Ee(e),o=new Map,a=0,m=0,c=r.length;for(let{store:p,target:g}of u.sync.themes)g.length>m&&(m=g.length),f(p,t.sync)||(t.sync[p]=[]),t.sync[p].push({theme:g,uploaded:0,failed:0,progress:D.progress(c)});br.on("upload",function(p,{target:g,store:h},T){D.spinner.stop();let _=p==="failed",j=[q.message("whiteBright",F(T.namespace)),dt,q.message(p==="failed"?"redBright":"neonGreen",T.key),dt,q.suffix("white","size ",` ${T.fileSize}`),x,q.suffix("white","duration ",` ${X()}`),x,q.suffix("white","elapsed ",` ${Mt("upload")}`),dt];for(let le in t.sync)for(let ie of t.sync[le]){le===h&&g===ie.theme&&(ie[p]+=1,ie.progress.increment(1));let Fe=`${F(ie.theme.toUpperCase())+Re(m-g.length)} ${ke} ${le}`;j.push(q.message("neonCyan",Fe),dt,q.suffix("whiteBright","uploaded ",` ${F(`${ie.uploaded}`)} ${C("of")} ${F(`${c}`)}`),x,q.suffix(ie.failed>0?"redBright":"white","failed ",` ${F(`${ie.failed}`)}`),dt,ie.progress.render(!1),dt),_&&(o.has([le,g])?o.get([le,g]).push([T.file,T.error]):o.set([le,g],[[T.file,T.error]]));}D.update(Pe(j));});for(let p of r){let g=s(p),h;try{if(h=(await fsExtra.readFile(g.input)).toString(),g.namespace==="layout"&&rr(h)&&(h=Ir(h)),!i)await n.assets("put",g,h);else {let _=e.apply({...g},h);H(_)||_===!1?await n.assets("put",g,h):P(_)?await n.assets("put",g,_):we(_)?await n.assets("put",g,_.toString()):await n.assets("put",g,h);}a++;}catch(T){console.log(T);}}}async function la(e){U();let t=Ee(e);for(let s of u.sync.themes){let r=u.sync.stores[s.sidx],{assets:n}=await mi(s.url,r.client);for(let{key:i}of n)try{let o=fe(r.client,{params:{"asset[key]":i}}),{asset:a}=await mi(s.url,o),l=path.join(u.dirs.import,r.domain,s.target,i),m=f("attachment",a)?Buffer.from(a.attachment,"base64"):Buffer.from(a.value||null,"utf8");if(D.write(`${L.neonCyan(i)}`),t){let c=e.apply({asset:a,output:l},m);H(c)||c===!1?await fsExtra.writeFile(l,m):P(c)||we(c)?await fsExtra.writeFile(l,c):await fsExtra.writeFile(l,m);}else await fsExtra.writeFile(l,m);}catch{D.failed(i);}}}var dp=e=>async t=>(e.type!==15&&await fsExtra.writeFile(e.output,t).catch(I.write("Error writing asset to output",{file:e.relative,source:e.relative})),t);async function qs(e,t){let s=dp(e),r=await fsExtra.readFile(e.input).catch(I.write("Error reading asset file",{file:e.relative,source:e.relative}));if(r){if(!Ee(t))return s(r);let n=t.apply({...e},r);return H(n)||n===!1?s(r):ce(n)?s(n):we(n)?s(n.toString()):s(r)}}var gp=/{%-?\s*#[\s\S]+?%}/g,yp=/{%-?\s*comment\s*-?%}[\s\S]+?{%-?\s*endcomment\s*-?%}/g,xp=/{%-?\s*liquid[\s\S]+?%}/g,Fp=/[^,:'"a-zA-Z0-9=] +[^'"a-zA-Z0-9=}{]/g;function Gs(e){return u.terser.liquid.removeComments?e.replace(yp,$).replace(gp,$):e}function wp(e){return e.replace(xp,t=>`
112
112
  `+t.replace(/#.*?$/gm,$)+`
113
- `)}function Cp(e,t){if(!u.terser.liquid.minifySchema)return Gs(t);let s=t.search(/{%-?\s*schema/);if(s>-1){let r=t.indexOf("%}",s+2)+2,n=t.slice(r),i=r+n.search(/{%-?\s*endschema/);if(i>-1){let o=JSON.parse(t.slice(r,i)),a=JSON.stringify(o,null,0),l=t.slice(0,r)+a+t.slice(i);return Gs(l)}d.invalid(e.relative);}return Gs(t)}function Ep(e){return u.terser.liquid.stripDashes,e}async function bp(e,t){try{return await htmlMinifierTerser.minify(t,u.terser.html)}catch(s){return d.invalid(e.relative),console.error(s),null}}var Sp=e=>async t=>{if(e.type===2&&u.mode.hot&&(er(t)||(t=na(t))),!u.mode.terse)return await fsExtra.writeFile(e.output,t),d.transform(`${e.namespace} \u2192 ${Ke(e.size)}`),t;let s;if(e.base.endsWith(".js.liquid"))s=t.replace(Fp,$).replace(/(?<=[:,]) +(?=['"{[])/g,$).replace(/{{%/g,"{ {%").replace(/%}}/g,"%} }").replace(/(?<=[%}]})\s+(?=[\]}])/g," ").replace(/>\s+(?=[{[])/,">").replace(/(?<=[}\]])\s<\//g,"</");else if(e.base.endsWith(".json.liquid"))s=JSON.stringify(JSON.parse(t),null,0);else {let i=e.type===4?Cp(e,t):Gs(t),o=await bp(e,i);s=wp(o);}if(d.process("HTML Terser",Lt()),N(s))return await fsExtra.writeFile(e.output,t),t;let r=Ep(s).replace(/^\s+/gm,$);await fsExtra.writeFile(e.output,r);let n=$e(t,e.size);return n.isSmaller?d.transform(`${e.namespace} ${n.before} \u2192 gzip ${n.gzip}`):d.minified("Liquid",n.before,n.after,n.saved),r};async function _t(e,t){u.mode.watch&&U();let r=(await fsExtra.readFile(e.input)).toString();u.mode.build&&e.namespace==="layout"&&er(r)&&(r=Pr(r)),e.size=Se(r);let n=Sp(e);if(!ce("Function",t))return n(r);let i=t.apply({...e},r);return ce("Undefined",i)||i===!1?n(r):ce("String",i)?n(i):Buffer.isBuffer(i)?n(i.toString()):n(r)}function Ei(e){try{return JSON.parse(e)}catch(t){return console.log(t),null}}function $p(e,t=0){try{return JSON.stringify(e,null,t)}catch(s){return console.log(s),null}}async function tr(e,t,s=0){let r=$p(t,s);if(N(r))return u.mode.watch&&X(),t;if(s===0){let n=$e(r,e.size);d.minified("JSON",n.before,n.after,n.saved);}else d.transform(`${e.namespace} \u2192 ${Ke(e.size)}`);return e.type===13||fsExtra.writeFile(e.output,r).catch(I.write("Error writing JSON",{file:e.relative})),r}async function yt(e,t){u.mode.watch&&U();let s=await fsExtra.readFile(e.input).catch(I.write("Error reading JSON file",{file:e.relative}));if(we(s)){let r=s.toString();if(e.size=Se(r),r.trim().length===0)return d.skipped(e,"empty file"),null;let n=Ei(r);if(Z(n))return d.skipped(e,"empty file"),null;let i=u.processor.json.indent,{mode:o,terser:a}=u;if(o.terse&&(e.type===12?a.json.assets&&(i=0):e.type===6?a.json.locales&&(i=0):e.type===1?a.json.templates&&(i=0):e.type===13?a.json.metafields&&(i=0):e.type===5&&a.json.config&&(i=0)),!Ee(t))return tr(e,n,i);let l=t.apply({...e},n);return H(l)?tr(e,n,i):S(l)||G(l)?tr(e,l,i):P(l)?tr(e,Ei(l),i):we(l)?tr(e,Ei(l.toString()),i):tr(e,n,i)}}async function Ws(e,t){let s=await fsExtra.readFile(e.input);if(Z(s.toString()))return u.mode.watch&&d.skipped(e,"empty file"),null;let{data:r,content:n}=_p__default.default(s);f("title",r)||(r.title=""),f("html",r)&&(u.page.export.html=r.html),f("linkify",r)&&(u.page.export.linkify=r.linkify),f("breaks",r)&&(u.page.export.breaks=r.breaks);let i=kp__default.default(u.page.export).render(n);return fsExtra.writeFile(path.join(be.pages.uri,e.base),i).catch(I.write("Error writing Page reference",{file:e.relative})),u.mode.build?i:{title:r.title,body_html:i}}var jr=null;function pa(){return jr=xn("esbuild"),N(jr)?(jr=null,!1):!0}async function fa(e){K.esbuild.loaded&&e.watch.clear();let t=await jr.build(e.esbuild);u.mode.terse&&u.mode.build&&(e.size=Se(t.outputFiles[0].text)),u.mode.watch?Da(e,t.metafile.inputs):(e.watch.has(e.input)||e.watch.add(e.input),u.watch.has(e.input)||u.watch.add(e.input));}async function Da(e,t){let s=[],{cwd:r,watch:n,mode:i}=u;for(let o in t){if(o.indexOf("/node_modules/")>-1)continue;let a=path.join(r,o);e.watch.has(a)||e.watch.add(a),n.has(a)||n.add(a),i.watch&&s.push(a);}i.watch&&K.esbuild.loaded&&await Fn().then(()=>{for(let o of e.watch)o.indexOf("/node_modules/")>-1||e.watchCustom!==null&&e.watchCustom(o)||f(o.slice(r.length+1),t)||(e.watch.delete(o),n.unwatch(o));});}function Op(e){return "<script>"+e+"</script>"}function Pp(e){return ce("Function",e)?function(t,s){let r=e.apply({...t},s);return r===!1?(d.external("cancelled"),null):ce("String",r)?(d.external("augment"),r):we(r)?(d.external("augment"),r.toString()):s}:!1}async function zs(e,t,s){if(!e.data)return;u.mode.watch&&U();let r=Pp(s),{errors:n,wss:i,mode:o,cwd:a}=u,l=e.data.length,h=[];for(let p of e.data){let{key:c,input:g,output:m,snippet:T,esbuild:{format:R}}=p;try{let{metafile:j,outputFiles:le,warnings:ne}=await jr.build(p.esbuild);l>1&&(d.nwl(),d.importer(path.relative(a,g))),o.watch&&await Da(p,j.inputs),ne.length>0&&void 0;for(let{text:Fe,path:He}of le)if(He.endsWith(".map")){let ie=path.join(be.script.uri,e.base+".map");fsExtra.writeFile(ie,Fe).catch(I.write("Error writing JavaScript Source Map to cache",{file:path.relative(a,ie),source:e.relative}));}else {if(o.terse){let{before:Ks,after:Za,saved:el}=$e(Fe,p.size);d.transform(`${F(R.toUpperCase())} bundle`),d.minified(null,Ks,Za,el);}else d.transform(`${F(R.toUpperCase())} bundle \u2192 ${F(Er(Fe))}`);let ie;if(T){if(ie=Op(Fe),r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(m,ie).catch(I.write("Error writing inline <script> snippet",{file:e.relative})),d.transform(`exported as ${F("snippet")}`);}else {if(ie=Fe,r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(m,ie).catch(I.write("Error writing JavaScript asset",{file:e.relative}));}o.hot?(d.syncing(c),i.script(c)):o.build||(d.syncing(c),h.push(t("put",p,ie)));}}catch(j){f("errors",j)&&(d.invalid(e.relative),n.add(g),j.errors.forEach(I.esbuild));}}l>1&&d.nwl(),await Promise.all(h);}var Us=null,Si=null;async function vi(e){if(e==="postcss")return Us=(await import('postcss')).default,N(Us)===!1;if(e==="sass")return Si=Zs("sass"),N(Si)===!1}function Np(e,t){let s=Ee(t)?{...e}:!1;return async function(r){if(N(r))return null;let n;if(s!==!1){let o=t.apply({...e},Buffer.from(r));H(o)||o===!1?n=r:(P(o)||we(o))&&(n=o);}else n=r;fsExtra.writeFile(e.output,n).catch(I.write("Error writing stylesheet to output",{input:e.relative,output:path.relative(u.cwd,e.output)}));let i=$e(r,e.size);return i.isSmaller?d.transform(`${F("CSS")} ${i.before} \u2192 gzip ${i.gzip}`):d.minified("CSS",i.before,i.after,i.saved),u.mode.hot&&u.wss.stylesheet(e.key),n}}async function Lp(e){let{data:t}=e,s=t.sass===!0?K.sass.config:t.sass;if(e.ext===".scss"||e.ext===".sass"){u.mode.watch&&U();try{let{css:r,sourceMap:n}=Si.compile(t.input,{loadPaths:s.include,sourceMapIncludeSources:!1,sourceMap:s.sourcemap,style:s.style,logger:{debug:i=>console.log("DEBUG",i),warn:Xt.sass(e)}});if(s.sourcemap){let i=path.join(be.style.uri,e.base+".map");fsExtra.writeFile(i,JSON.stringify(n)).catch(I.write("Error writing SASS Source Map file to the cache directory",{file:path.relative(u.cwd,i),source:e.relative}));}return d.process("SASS Dart",X()),e.size=Se(r),{css:r,map:n}}catch(r){return d.invalid(e.relative),I.sass(e,r),null}}try{let r=await fsExtra.readFile(e.input);return e.size=Se(r),{css:r.toString(),map:null}}catch(r){return d.invalid(e.relative),d.throws(r),null}}async function Mp(e,t,s){let{data:r}=e;try{u.mode.watch&&U();let n=await Us(K.postcss.config).process(t,{from:r.rename,to:r.rename,map:s?{prev:s,inline:!1}:null});u.mode.watch&&d.process("PostCSS",X());let i=n.warnings();if(i.length>0)for(let o of i)Xt.postcss(e,o);return n.toString()}catch(n){return d.invalid(e.relative),console.log(n),null}}function da(e){return `<style>${x+Re(2)+e}</style>`}async function Vs(e,t){u.mode.watch&&U();let s=Np(e,t);try{let r=await Lp(e);if(r===null)return null;if(N(Us)||!e.data.postcss&&!e.data.snippet)return s(r.css);if(e.data.postcss){let n=await Mp(e,r.css,r.map);if(n===null)return null;if(e.data.snippet)return s(da(n))}return e.data.snippet?s(da(r.css)):s(r.css)}catch(r){return console.log(r),null}}var Bi=null,$i=null;async function Ai(e){if(e==="svg-sprite")return $i=(await import('svg-sprite')).default,N($i)===!1;if(e==="svgo")return Bi=(await import('svgo')).default,N(Bi)===!1}async function Wp(e){let t=await fsExtra.readFile(e);return [e,t.toString(),Se(t)]}function zp(e){return new Promise(function(t,s){e.compile((r,n)=>{if(r)return s(r);for(let i in n)for(let o in n[i])t(n[i][o].contents.toString());});})}function Up(e,t,s){async function r(n){let i=z({},e);u.mode.watch&&U(),i.kind="SVG Sprite",n.snippet?(i.namespace="snippets",i.key=path.join("snippets",Or(i,n.rename)),i.output=path.join(u.dirs.output,i.key)):(i.key=path.join("assets",Or(i,n.rename)),i.output=path.join(u.dirs.output,i.key));let o=n.sprite===!0?K.sprite.config:n.sprite,a=new $i(o),l=await qe(Wp,ut(n.input)).catch(I.write("Error reading an SVG file",{file:i.base,source:i.relative}));if(l){let h=l.filter(([m,T])=>xa(T)?(d.skipped(path.relative(u.cwd,m),"Liquid Detected"),!1):!0);i.size=0;for(let[m,T,R]of h)a.add(m,null,T),i.size=i.size+R;let p=await zp(a),c=h.length;d.process("SVG Sprite",`${c} ${Xe("SVG",c)}`,X()),await fsExtra.writeFile(i.output,p).catch(I.write("Error writing SVG Sprite",{file:i.key,caller:e.relative}));let g=$e(p,i.size);g.isSmaller?d.transform(`${i.kind} ${g.before} \u2192 gzip ${g.gzip}`):d.minified(i.kind,g.before,g.after,g.saved),t&&(d.syncing(i.key),await t("put",i,p));}}return r}function xa(e){return /^(?:{{[\s\S]+?}}|{%[\s\S]+?%})|[^"'](?:{{[\s\S]+?}}|{%[\s\S]+?%})[^'"]/m.test(e)}function Vp(e){if(/<path[^>]*[a-zA-Z"'\s](>)(?!\s*<\/path>)/g.test(e)){let s=`${L.redBright(`<${L.white("path")}>`)}`,r=`${L.greenBright(`<${L.white("path")} />`)}`;return d.transform(`${s} ${L.ARR} ${r} ${L.TLD} ${L.gray("patched solidus")}`),e.replace(/(<path[^>]*[a-zA-Z"'\s])(>)(?!\s*<\/path>)/g,"$1 /$2")}return e}function Hp(e,t,s){let r=z({},e);async function n(i){u.mode.watch&&U(),i.snippet?(r.namespace="snippets",r.key=path.join("snippets",Or(r,i.rename)),r.output=path.join(u.dirs.output,r.key)):(r.key=path.join("assets",Or(r,i.rename)),r.output=path.join(u.dirs.output,r.key));let o=i.svgo===!0?K.svgo:i.svgo,l=(await fsExtra.readFile(r.input)).toString();if(xa(l))return d.skipped(r,"Liquid Detected"),null;let h=Vp(l);r.size=Se(h);let p;try{p=Bi.optimize(h,o);}catch(m){return d.err(m.toString()),null}d.process("SVGO",X());let{data:c}=p,g=$e(c,r.size);g.isSmaller?d.transform(`${r.kind} ${g.before} \u2192 gzip ${g.gzip}`):d.minified(r.kind,g.before,g.after,g.saved),await fsExtra.writeFile(r.output,c).catch(I.write("Error writing SVG",{file:r.key,caller:e.relative})),t&&(d.syncing(r.key),await t("put",r,c));}return n}async function Hs(e,t,s){u.mode.watch&&U();let r=Up(e,t),n=Hp(e,t),i=e.data.length;for(let o=0;o<i;o++){let a=e.data[o];o>0&&u.mode.watch&&d.changed(e),a.format==="sprite"&&await r(a),a.format==="file"&&await n(a);}}async function Fa(e){U();let{paths:t,dirs:s,watch:r,filters:n,mode:i}=u,o=Z(n)===!1,a=Ns(t,s.output),l=za__default.default(ut(r.values())),h=await Wa__default.default("**",{onlyFiles:!0,absolute:!0,cwd:s.input}),p={},c=h.filter(l).reduce((m,T)=>{let R=a(T);if(H(R))return m;switch(R.type){case 7:m.styles.files.push(R);break;case 8:m.scripts.files.push(R);break;case 4:m.sections.files.push(R);break;case 2:m.layouts.files.push(R);break;case 3:m.snippets.files.push(R);break;case 6:m.locales.files.push(R);break;case 5:m.configs.files.push(R);break;case 1:m.templates.files.push(R);break;case 14:m.pages.files.push(R);break;case 12:m.assets.files.push(R);break;case 13:m.metafields.files.push(R);break;case 9:{for(let{uuid:j,format:le,input:ne}of R.data)if(!f(j,p))if(p[j]=!0,le==="sprite")m.svgs.files.push(R);else for(let Fe of ne)m.svgs.files.push(a(Fe));break}}return m},{styles:{time:$,files:[],report:null},scripts:{time:$,files:[],report:null},svgs:{time:$,files:[],report:null},sections:{time:$,files:[],report:null},layouts:{time:$,files:[],report:null},templates:{time:$,files:[],report:null},snippets:{time:$,files:[],report:null},locales:{time:$,files:[],report:null},configs:{time:$,files:[],report:null},pages:{time:$,files:[],report:null},metafields:{time:$,files:[],report:null},assets:{time:$,files:[],report:null}}),g=(m,T,R)=>async j=>{U();try{d.build(m,T,j);let le=await(j.ext===".json"?yt(j,e):R(j,e));return d.out(q.tree("bottom",L.neonGreen(j.key))),le===null||isNaN(j.size)?{name:j.base,input:j.relative,time:X(),output:j.key,error:"Skipped File"}:{name:j.base,input:j.relative,output:j.key,error:null,time:"",size:$e(le,j.size)}}catch(le){return d.out(q.tree("bottom",L.redBright(j.key))),{name:j.base,input:j.relative,output:j.key,time:X(),error:le.message}}};for(let m in c){U();let T=c[m].files,R=T.length;if(m==="styles"&&i.style){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,Vs),T),c[m].time=X();}else if(m==="scripts"&&i.script){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,zs),T),c[m].time=X();}else if(m==="layouts"||m==="snippets"||m==="sections"||m==="templates"){if(i.views){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,_t),T),c[m].time=X();}}else if(m==="locales"||m==="configs"||m==="metafields"){if(i.views){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,yt),T),c[m].time=X();}}else if(m==="pages"&&i.views){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,Ws),T),c[m].time=X();}else if(m==="assets"&&i.views){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,qs),T),c[m].time=X();}else if(m==="svgs"&&i.svg){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,Hs),T),c[m].time=X();}}d.nwl(),d.update(`${y.gray}Build Completed ${D(`~ ${X()}`)}`),d.nwl(),process.exit(0);}function wa(e){let t=js(u.sync),s=Ns(u.paths,u.dirs.output);u.watch.on("all",async function(n,i){let o=s(i);if(!H(o)){if(o.type!==15&&d.changed(o),n==="change"||n==="add")r(o);else if(n==="unlink")return t.assets("delete",o)}});async function r(n){try{let i=null;if(n.type===8)return zs(n,t.assets,e);if(n.type===14)return Ws(n,e);if(n.type===9)return Hs(n,t.assets,e);if(n.type===7?i=await Vs(n,e):n.type===4&&n.kind==="Liquid"&&(i=await _t(n,e)),n.type===4&&n.kind==="JSON")i=await yt(n,e);else if(n.type===2)i=await _t(n,e);else if(n.type===3)i=await _t(n,e);else if(n.type===6||n.type===5)i=await yt(n,e);else {if(n.type===13)return i=await yt(n,e),t.metafields({value:i,namespace:n.namespace,key:n.key});n.type===1&&n.kind==="JSON"?i=await yt(n,e):n.type===1&&n.kind==="Liquid"?i=await _t(n,e):(n.type===12||n.type===15)&&(i=await qs(n,e));}N(i)||(d.syncing(n.key),await t.assets("put",n,i),u.mode.hot&&(n.type===4&&n.kind==="Liquid"?u.wss.section(n.name):n.type!==8&&n.type!==7&&await W.onEmpty().then(()=>u.wss.replace())));}catch(i){console.error(i),d.err(i);}}}var Ca=!1,Ea=!1,Ti=new Set;function Js(e,t){if(!Ca){Ca=!0;for(let s of Ti)s();e&&process.exit(128+t);}}function Ys(e){return Ti.add(e),Ea||(Ea=!0,process.once("exit",Js),process.once("SIGINT",Js.bind(void 0,!0,2)),process.once("SIGTERM",Js.bind(void 0,!0,15)),process.on("message",t=>{t==="shutdown"&&Js(!0,-128);})),()=>Ti.delete(e)}var kt={enable:!0,output:[]};async function sf(){if(d.update(q.message("gray","validating snippet injection")),await sa()){d.update(q.message("gray","validating layouts"));for(let t in u.hot.alive){if(!await fsExtra.pathExists(t)){d.update(q.message("gray","layout has not yet been bundled, building now..."));let n=S(u.config.paths.layout)?u.config.paths.layout:[u.config.paths.layout];for(let i of n){let o=path.join(u.dirs.input,i),a=await fsExtra.readFile(o);await fsExtra.writeFile(t,a);}d.update(q.message("gray","layout was bundled from source, injecting hot snippet"));}await oa(t)||(d.update.clear(),d.err("Failed to inject hot reload render tag"));}d.update.clear();}else d.update.clear(),d.err("Failed to upload snippet");}async function va(){if(!kt.enable)return kt.output.push(y.red,y.red+ue("Change the socket port address or kill the session occupying it."),y.red+ue("This error typically occurs when multiple Syncify instances are active.")),d.err(ue(`${F("ERROR")} on ${F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reload:`)}`)),d.out(kt.output.join(x)),null;d.out(q.message("whiteBright",F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reloading:`))),d.nwl(),d.update(q.message("gray","configuring HOT Reload")),await sf();function e(o){o.setHeader("Access-Control-Allow-Origin","*"),o.setHeader("Cache-Control","public, max-age=0");}let t=Kp__default.default(path.join(u.dirs.output,"assets"),{setHeaders:e}),s=Zp__default.default.createServer((o,a)=>t(o,a,Xp__default.default(o,a))),r=`http://localhost:${u.hot.server}`,n=o=>{if(o.code==="EADDRINUSE")return kt.output.push(y.red+ue(`${F("EADDRINUSE")} ${Ue} ${r}`),y.red,y.red+ue.bold(`Server Port ${u.hot.server} address already in use`),y.red,y.red+ue("Change the server port address or kill the session occupying it."),y.red+ue("This error typically occurs when multiple Syncify instances are active.")),d.update.clear(),d.out(kt.output.join(x)),u.wss.http.close(),null},i=()=>{d.update.done(),s.removeListener("error",n),s.removeListener("connect",i);};s.on("error",n),s.on("connect",i),s.listen(u.hot.server),d.update(q.message("pink",`server \u2192 ${F("assets")} \u2192 ${D.underline(r)}`));}function Ba(){if(u.mode.hot===!1)return;let e=new ws.Server({port:u.hot.socket,path:"/ws"});Ys(()=>e.close());let t=n=>{n.code==="EADDRINUSE"&&(e.close(),kt.enable=!1,kt.output.push(y.red+ue(`${F("EADDRINUSE")} ${Ue} ws://localhost:${u.hot.server}`),y.red,y.red+ue.bold(`Socket Port ${u.hot.server} address already in use`)));},s=()=>{e.removeAllListeners("script"),e.removeAllListeners("stylesheet"),e.removeAllListeners("section"),e.removeAllListeners("svg"),e.removeAllListeners("assets"),e.removeAllListeners("reload"),e.removeAllListeners("replace");},r=n=>{e.removeListener("error",t),e.on("script",i=>n.send(`script,${i}`)),e.on("stylesheet",i=>n.send(`stylesheet,${i}`)),e.on("section",i=>n.send(`section,${i}`)),e.on("svg",i=>n.send(`svg,${i}`)),e.on("assets",()=>n.send("assets")),e.on("reload",()=>n.send("reload")),e.on("replace",()=>n.send("replace"));};return e.on("close",s),e.on("error",t),e.on("connection",r),{get http(){return e},script:n=>e.emit("script",path.basename(n)),stylesheet:n=>e.emit("stylesheet",path.basename(n)),section:n=>e.emit("section",n),svg:n=>e.emit("svg",n),assets:()=>e.emit("assets"),reload:()=>e.emit("reload"),replace:()=>e.emit("replace")}}function Ri(e){let t=e.toString().trim().toLowerCase();if(t==="v"){let s=_e(Wt);for(let r=0,n=s.length;r<n;r++){let i=s[r];if(Wt[i].size!==0){r>0&&d.hline(10),d.write(L.bold.whiteBright(i));for(let o of Wt[i].values())typeof o=="string"&&o.length>0&&Q(o);Wt[i].clear();}}u.mode.upload&&(v(q.closer("Upload"),x),process.exit(0));}else if(t==="w"){for(let s in pe.process)if(pe.process[s].size!==0){d.nwl(),d.write(L.bold.yellow(s)),d.nwl();for(let r of pe.process[s].values())typeof r=="string"&&r.length>0&&d.write(q.multiline("warning",r));pe.process[s].clear();}pe.count=0;}}`
114
- ${D("-----------------------------------------------------------------------------")}
115
- ${F("Syncify CLI Examples")} ${D("by Panoply")}
116
- ${D("-----------------------------------------------------------------------------")}
113
+ `)}function Cp(e,t){if(!u.terser.liquid.minifySchema)return Gs(t);let s=t.search(/{%-?\s*schema/);if(s>-1){let r=t.indexOf("%}",s+2)+2,n=t.slice(r),i=r+n.search(/{%-?\s*endschema/);if(i>-1){let o=JSON.parse(t.slice(r,i)),a=JSON.stringify(o,null,0),l=t.slice(0,r)+a+t.slice(i);return Gs(l)}D.invalid(e.relative);}return Gs(t)}function Ep(e){return u.terser.liquid.stripDashes,e}async function bp(e,t){try{return await htmlMinifierTerser.minify(t,u.terser.html)}catch(s){return D.invalid(e.relative),console.error(s),null}}var Sp=e=>async t=>{if(e.type===2&&u.mode.hot&&(rr(t)||(t=ia(t))),!u.mode.terse)return await fsExtra.writeFile(e.output,t),D.transform(`${e.namespace} \u2192 ${Xe(e.size)}`),t;let s;if(e.base.endsWith(".js.liquid"))s=t.replace(Fp,$).replace(/(?<=[:,]) +(?=['"{[])/g,$).replace(/{{%/g,"{ {%").replace(/%}}/g,"%} }").replace(/(?<=[%}]})\s+(?=[\]}])/g," ").replace(/>\s+(?=[{[])/,">").replace(/(?<=[}\]])\s<\//g,"</");else if(e.base.endsWith(".json.liquid"))s=JSON.stringify(JSON.parse(t),null,0);else {let i=e.type===4?Cp(e,t):Gs(t),o=await bp(e,i);s=wp(o);}if(D.process("HTML Terser",Mt()),N(s))return await fsExtra.writeFile(e.output,t),t;let r=Ep(s).replace(/^\s+/gm,$);await fsExtra.writeFile(e.output,r);let n=$e(t,e.size);return n.isSmaller?D.transform(`${e.namespace} ${n.before} \u2192 gzip ${n.gzip}`):D.minified("Liquid",n.before,n.after,n.saved),r};async function kt(e,t){u.mode.watch&&U();let r=(await fsExtra.readFile(e.input)).toString();u.mode.build&&e.namespace==="layout"&&rr(r)&&(r=Ir(r)),e.size=Se(r);let n=Sp(e);if(!ce("Function",t))return n(r);let i=t.apply({...e},r);return ce("Undefined",i)||i===!1?n(r):ce("String",i)?n(i):Buffer.isBuffer(i)?n(i.toString()):n(r)}function bi(e){try{return JSON.parse(e)}catch(t){return console.log(t),null}}function $p(e,t=0){try{return JSON.stringify(e,null,t)}catch(s){return console.log(s),null}}async function sr(e,t,s=0){let r=$p(t,s);if(N(r))return u.mode.watch&&X(),t;if(s===0){let n=$e(r,e.size);D.minified("JSON",n.before,n.after,n.saved);}else D.transform(`${e.namespace} \u2192 ${Xe(e.size)}`);return e.type===13||fsExtra.writeFile(e.output,r).catch(I.write("Error writing JSON",{file:e.relative})),r}async function yt(e,t){u.mode.watch&&U();let s=await fsExtra.readFile(e.input).catch(I.write("Error reading JSON file",{file:e.relative}));if(we(s)){let r=s.toString();if(e.size=Se(r),r.trim().length===0)return D.skipped(e,"empty file"),null;let n=bi(r);if(Z(n))return D.skipped(e,"empty file"),null;let i=u.processor.json.indent,{mode:o,terser:a}=u;if(o.terse&&(e.type===12?a.json.assets&&(i=0):e.type===6?a.json.locales&&(i=0):e.type===1?a.json.templates&&(i=0):e.type===13?a.json.metafields&&(i=0):e.type===5&&a.json.config&&(i=0)),!Ee(t))return sr(e,n,i);let l=t.apply({...e},n);return H(l)?sr(e,n,i):v(l)||G(l)?sr(e,l,i):P(l)?sr(e,bi(l),i):we(l)?sr(e,bi(l.toString()),i):sr(e,n,i)}}async function Ws(e,t){let s=await fsExtra.readFile(e.input);if(Z(s.toString()))return u.mode.watch&&D.skipped(e,"empty file"),null;let{data:r,content:n}=_p__default.default(s);f("title",r)||(r.title=""),f("html",r)&&(u.page.export.html=r.html),f("linkify",r)&&(u.page.export.linkify=r.linkify),f("breaks",r)&&(u.page.export.breaks=r.breaks);let i=kp__default.default(u.page.export).render(n);return fsExtra.writeFile(path.join(be.pages.uri,e.base),i).catch(I.write("Error writing Page reference",{file:e.relative})),u.mode.build?i:{title:r.title,body_html:i}}var jr=null;function fa(){return jr=Fn("esbuild"),N(jr)?(jr=null,!1):!0}async function Da(e){K.esbuild.loaded&&e.watch.clear();let t=await jr.build(e.esbuild);u.mode.terse&&u.mode.build&&(e.size=Se(t.outputFiles[0].text)),u.mode.watch?da(e,t.metafile.inputs):(e.watch.has(e.input)||e.watch.add(e.input),u.watch.has(e.input)||u.watch.add(e.input));}async function da(e,t){let s=[],{cwd:r,watch:n,mode:i}=u;for(let o in t){if(o.indexOf("/node_modules/")>-1)continue;let a=path.join(r,o);e.watch.has(a)||e.watch.add(a),n.has(a)||n.add(a),i.watch&&s.push(a);}i.watch&&K.esbuild.loaded&&await wn().then(()=>{for(let o of e.watch)o.indexOf("/node_modules/")>-1||e.watchCustom!==null&&e.watchCustom(o)||f(o.slice(r.length+1),t)||(e.watch.delete(o),n.unwatch(o));});}function Op(e){return "<script>"+e+"</script>"}function Pp(e){return ce("Function",e)?function(t,s){let r=e.apply({...t},s);return r===!1?(D.external("cancelled"),null):ce("String",r)?(D.external("augment"),r):we(r)?(D.external("augment"),r.toString()):s}:!1}async function zs(e,t,s){if(!e.data)return;u.mode.watch&&U();let r=Pp(s),{errors:n,wss:i,mode:o,cwd:a}=u,l=e.data.length,m=[];for(let c of e.data){let{key:p,input:g,output:h,snippet:T,esbuild:{format:_}}=c;try{let{metafile:j,outputFiles:le,warnings:ie}=await jr.build(c.esbuild);l>1&&(D.nwl(),D.importer(path.relative(a,g))),o.watch&&await da(c,j.inputs),ie.length>0&&void 0;for(let{text:Fe,path:Je}of le)if(Je.endsWith(".map")){let re=path.join(be.script.uri,e.base+".map");fsExtra.writeFile(re,Fe).catch(I.write("Error writing JavaScript Source Map to cache",{file:path.relative(a,re),source:e.relative}));}else {if(o.terse){let{before:Xs,after:Xa,saved:Za}=$e(Fe,c.size);D.transform(`${F(_.toUpperCase())} bundle`),D.minified(null,Xs,Xa,Za);}else D.transform(`${F(_.toUpperCase())} bundle \u2192 ${F(Sr(Fe))}`);let re;if(T){if(re=Op(Fe),r&&(re=r(e,re),re===null))continue;await fsExtra.writeFile(h,re).catch(I.write("Error writing inline <script> snippet",{file:e.relative})),D.transform(`exported as ${F("snippet")}`);}else {if(re=Fe,r&&(re=r(e,re),re===null))continue;await fsExtra.writeFile(h,re).catch(I.write("Error writing JavaScript asset",{file:e.relative}));}o.hot?(D.syncing(p,!0),i.script(p),m.push(t("put",c,re))):o.build||(D.syncing(p),m.push(t("put",c,re)));}}catch(j){f("errors",j)&&(D.invalid(e.relative),n.add(g),j.errors.forEach(I.esbuild));}}l>1&&D.nwl(),await Promise.all(m);}var Us=null,vi=null;async function Bi(e){if(e==="postcss")return Us=(await import('postcss')).default,N(Us)===!1;if(e==="sass")return vi=en("sass"),N(vi)===!1}function Np(e,t){let s=Ee(t)?{...e}:!1;return async function(r){if(N(r))return null;let n;if(s!==!1){let o=t.apply({...e},Buffer.from(r));H(o)||o===!1?n=r:(P(o)||we(o))&&(n=o);}else n=r;fsExtra.writeFile(e.output,n).catch(I.write("Error writing stylesheet to output",{input:e.relative,output:path.relative(u.cwd,e.output)}));let i=$e(r,e.size);return i.isSmaller?D.transform(`${F("CSS")} ${i.before} \u2192 gzip ${i.gzip}`):D.minified("CSS",i.before,i.after,i.saved),u.mode.hot&&u.wss.stylesheet(e.key),n}}async function Lp(e){let{data:t}=e,s=t.sass===!0?K.sass.config:t.sass;if(e.ext===".scss"||e.ext===".sass"){u.mode.watch&&U();try{let{css:r,sourceMap:n}=vi.compile(t.input,{loadPaths:s.include,sourceMapIncludeSources:!1,sourceMap:s.sourcemap,style:s.style,logger:{debug:i=>console.log("DEBUG",i),warn:Zt.sass(e)}});if(s.sourcemap){let i=path.join(be.style.uri,e.base+".map");fsExtra.writeFile(i,JSON.stringify(n)).catch(I.write("Error writing SASS Source Map file to the cache directory",{file:path.relative(u.cwd,i),source:e.relative}));}return D.process("SASS Dart",X()),e.size=Se(r),{css:r,map:n}}catch(r){return D.invalid(e.relative),I.sass(e,r),null}}try{let r=await fsExtra.readFile(e.input);return e.size=Se(r),{css:r.toString(),map:null}}catch(r){return D.invalid(e.relative),D.throws(r),null}}async function Mp(e,t,s){let{data:r}=e;try{u.mode.watch&&U();let n=await Us(K.postcss.config).process(t,{from:r.rename,to:r.rename,map:s?{prev:s,inline:!1}:null});u.mode.watch&&D.process("PostCSS",X());let i=n.warnings();if(i.length>0)for(let o of i)Zt.postcss(e,o);return n.toString()}catch(n){return D.invalid(e.relative),console.log(n),null}}function ma(e){return `<style>${x+Re(2)+e}</style>`}async function Vs(e,t){u.mode.watch&&U();let s=Np(e,t);try{let r=await Lp(e);if(r===null)return null;if(N(Us)||!e.data.postcss&&!e.data.snippet)return s(r.css);if(e.data.postcss){let n=await Mp(e,r.css,r.map);if(n===null)return null;if(e.data.snippet)return s(ma(n))}return e.data.snippet?s(ma(r.css)):s(r.css)}catch(r){return console.log(r),null}}var $i=null,Ai=null;async function Ti(e){if(e==="svg-sprite")return Ai=(await import('svg-sprite')).default,N(Ai)===!1;if(e==="svgo")return $i=(await import('svgo')).default,N($i)===!1}async function Wp(e){let t=await fsExtra.readFile(e);return [e,t.toString(),Se(t)]}function zp(e){return new Promise(function(t,s){e.compile((r,n)=>{if(r)return s(r);for(let i in n)for(let o in n[i])t(n[i][o].contents.toString());});})}function Up(e,t,s){async function r(n){let i=z({},e);u.mode.watch&&U(),i.kind="SVG Sprite",n.snippet?(i.namespace="snippets",i.key=path.join("snippets",Pr(i,n.rename)),i.output=path.join(u.dirs.output,i.key)):(i.key=path.join("assets",Pr(i,n.rename)),i.output=path.join(u.dirs.output,i.key));let o=n.sprite===!0?K.sprite.config:n.sprite,a=new Ai(o),l=await Ge(Wp,ut(n.input)).catch(I.write("Error reading an SVG file",{file:i.base,source:i.relative}));if(l){let m=l.filter(([h,T])=>Fa(T)?(D.skipped(path.relative(u.cwd,h),"Liquid Detected"),!1):!0);i.size=0;for(let[h,T,_]of m)a.add(h,null,T),i.size=i.size+_;let c=await zp(a),p=m.length;D.process("SVG Sprite",`${p} ${Ze("SVG",p)}`,X()),await fsExtra.writeFile(i.output,c).catch(I.write("Error writing SVG Sprite",{file:i.key,caller:e.relative}));let g=$e(c,i.size);g.isSmaller?D.transform(`${i.kind} ${g.before} \u2192 gzip ${g.gzip}`):D.minified(i.kind,g.before,g.after,g.saved),t&&(D.syncing(i.key),await t("put",i,c));}}return r}function Fa(e){return /^(?:{{[\s\S]+?}}|{%[\s\S]+?%})|[^"'](?:{{[\s\S]+?}}|{%[\s\S]+?%})[^'"]/m.test(e)}function Vp(e){if(/<path[^>]*[a-zA-Z"'\s](>)(?!\s*<\/path>)/g.test(e)){let s=`${L.redBright(`<${L.white("path")}>`)}`,r=`${L.greenBright(`<${L.white("path")} />`)}`;return D.transform(`${s} ${L.ARR} ${r} ${L.TLD} ${L.gray("patched solidus")}`),e.replace(/(<path[^>]*[a-zA-Z"'\s])(>)(?!\s*<\/path>)/g,"$1 /$2")}return e}function Hp(e,t,s){let r=z({},e);async function n(i){u.mode.watch&&U(),i.snippet?(r.namespace="snippets",r.key=path.join("snippets",Pr(r,i.rename)),r.output=path.join(u.dirs.output,r.key)):(r.key=path.join("assets",Pr(r,i.rename)),r.output=path.join(u.dirs.output,r.key));let o=i.svgo===!0?K.svgo:i.svgo,l=(await fsExtra.readFile(r.input)).toString();if(Fa(l))return D.skipped(r,"Liquid Detected"),null;let m=Vp(l);r.size=Se(m);let c;try{c=$i.optimize(m,o);}catch(h){return D.err(h.toString()),null}D.process("SVGO",X());let{data:p}=c,g=$e(p,r.size);g.isSmaller?D.transform(`${r.kind} ${g.before} \u2192 gzip ${g.gzip}`):D.minified(r.kind,g.before,g.after,g.saved),await fsExtra.writeFile(r.output,p).catch(I.write("Error writing SVG",{file:r.key,caller:e.relative})),t&&(D.syncing(r.key),await t("put",r,p));}return n}async function Hs(e,t,s){u.mode.watch&&U();let r=Up(e,t),n=Hp(e,t),i=e.data.length;for(let o=0;o<i;o++){let a=e.data[o];o>0&&u.mode.watch&&D.changed(e),a.format==="sprite"&&await r(a),a.format==="file"&&await n(a);}}async function wa(e){U();let{paths:t,dirs:s,watch:r,filters:n,mode:i}=u,o=Z(n)===!1,a=_s(t,s.output),l=Wa__default.default(ut(r.values())),m=await Ga__default.default("**",{onlyFiles:!0,absolute:!0,cwd:s.input}),c={},p=m.filter(l).reduce((h,T)=>{let _=a(T);if(H(_))return h;switch(_.type){case 7:h.styles.files.push(_);break;case 8:h.scripts.files.push(_);break;case 4:h.sections.files.push(_);break;case 2:h.layouts.files.push(_);break;case 3:h.snippets.files.push(_);break;case 6:h.locales.files.push(_);break;case 5:h.configs.files.push(_);break;case 1:h.templates.files.push(_);break;case 14:h.pages.files.push(_);break;case 12:h.assets.files.push(_);break;case 13:h.metafields.files.push(_);break;case 9:{for(let{uuid:j,format:le,input:ie}of _.data)if(!f(j,c))if(c[j]=!0,le==="sprite")h.svgs.files.push(_);else for(let Fe of ie)h.svgs.files.push(a(Fe));break}}return h},{styles:{time:$,files:[],report:null},scripts:{time:$,files:[],report:null},svgs:{time:$,files:[],report:null},sections:{time:$,files:[],report:null},layouts:{time:$,files:[],report:null},templates:{time:$,files:[],report:null},snippets:{time:$,files:[],report:null},locales:{time:$,files:[],report:null},configs:{time:$,files:[],report:null},pages:{time:$,files:[],report:null},metafields:{time:$,files:[],report:null},assets:{time:$,files:[],report:null}}),g=(h,T,_)=>async j=>{U();try{D.build(h,T,j);let le=await(j.ext===".json"?yt(j,e):_(j,e));return D.out(q.tree("bottom",L.neonGreen(j.key))),le===null||isNaN(j.size)?{name:j.base,input:j.relative,time:X(),output:j.key,error:"Skipped File"}:{name:j.base,input:j.relative,output:j.key,error:null,time:"",size:$e(le,j.size)}}catch(le){return D.out(q.tree("bottom",L.redBright(j.key))),{name:j.base,input:j.relative,output:j.key,time:X(),error:le.message}}};for(let h in p){U();let T=p[h].files,_=T.length;if(h==="styles"&&i.style){if(o&&!(f(h,n)&&n[h].includes(h)))continue;p[h].report=await Ge(g(h,_,Vs),T),p[h].time=X();}else if(h==="scripts"&&i.script){if(o&&!(f(h,n)&&n[h].includes(h)))continue;p[h].report=await Ge(g(h,_,zs),T),p[h].time=X();}else if(h==="layouts"||h==="snippets"||h==="sections"||h==="templates"){if(i.views){if(o&&!(f(h,n)&&n[h].includes(h)))continue;p[h].report=await Ge(g(h,_,kt),T),p[h].time=X();}}else if(h==="locales"||h==="configs"||h==="metafields"){if(i.views){if(o&&!(f(h,n)&&n[h].includes(h)))continue;p[h].report=await Ge(g(h,_,yt),T),p[h].time=X();}}else if(h==="pages"&&i.views){if(o&&!(f(h,n)&&n[h].includes(h)))continue;p[h].report=await Ge(g(h,_,Ws),T),p[h].time=X();}else if(h==="assets"&&i.views){if(o&&!(f(h,n)&&n[h].includes(h)))continue;p[h].report=await Ge(g(h,_,qs),T),p[h].time=X();}else if(h==="svgs"&&i.svg){if(o&&!(f(h,n)&&n[h].includes(h)))continue;p[h].report=await Ge(g(h,_,Hs),T),p[h].time=X();}}D.nwl(),D.update(`${y.gray}Build Completed ${d(`~ ${X()}`)}`),D.nwl(),process.exit(0);}function Ca(e){let{sync:t,watch:s,mode:r,paths:n,wss:i,dirs:o}=u,a=Ns(t),l=_s(n,o.output);r.hot&&u.wss.connected(),s.on("all",async function(c,p){let g=l(p);if(!H(g)){if(g.type!==15&&D.changed(g),c==="change"||c==="add")m(g);else if(c==="unlink")return a.assets("delete",g)}});async function m(c){try{let p=null;if(c.type===8)return zs(c,a.assets,e);if(c.type===14)return Ws(c,e);if(c.type===9)return Hs(c,a.assets,e);if(c.type===7?p=await Vs(c,e):c.type===4&&c.kind==="Liquid"&&(p=await kt(c,e)),c.type===4&&c.kind==="JSON")p=await yt(c,e);else if(c.type===2)p=await kt(c,e);else if(c.type===3)p=await kt(c,e);else if(c.type===6||c.type===5)p=await yt(c,e);else {if(c.type===13)return p=await yt(c,e),a.metafields({value:p,namespace:c.namespace,key:c.key});c.type===1&&c.kind==="JSON"?p=await yt(c,e):c.type===1&&c.kind==="Liquid"?p=await kt(c,e):(c.type===12||c.type===15)&&(p=await qs(c,e));}N(p)||(D.syncing(c.key),await a.assets("put",c,p),r.hot&&(c.type===4?i.section(c.name):c.type!==8&&c.type!==7&&await W.onIdle().then(()=>i.replace())));}catch(p){console.error(p),D.err(p);}}}var Ea=!1,ba=!1,Ri=new Set;function Js(e,t){if(!Ea){Ea=!0;for(let s of Ri)s();e&&process.exit(128+t);}}function Ys(e){return Ri.add(e),ba||(ba=!0,process.once("exit",Js),process.once("SIGINT",Js.bind(void 0,!0,2)),process.once("SIGTERM",Js.bind(void 0,!0,15)),process.on("message",t=>{t==="shutdown"&&Js(!0,-128);})),()=>Ri.delete(e)}var Ot={enable:!0,output:[]};async function of(){if(D.update(q.message("gray","validating snippet injection")),await na()){D.update(q.message("gray","validating layouts"));for(let t in u.hot.alive){if(!await fsExtra.pathExists(t)){D.update(q.message("gray","layout has not yet been bundled, building now..."));let n=Ga__default.default.sync(u.config.paths.layout,{cwd:u.dirs.input,absolute:!0});for(let i of n)if(path.basename(i)===path.basename(t)){let o=await fsExtra.readFile(i);await fsExtra.writeFile(t,o);}D.update(q.message("gray","layout was bundled from source, injecting hot snippet"));}await ua(t)||(D.update.clear(),D.err("Failed to inject hot reload render tag"));}D.update.clear();}else D.update.clear(),D.err("Failed to upload snippet");}async function Sa(){if(!Ot.enable)return Ot.output.push(y.red,y.red+ue("Change the socket port address or kill the session occupying it."),y.red+ue("This error typically occurs when multiple Syncify instances are active.")),D.err(ue(`${F("ERROR")} on ${F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reload:`)}`)),D.out(Ot.output.join(x)),null;D.out(q.message("whiteBright",F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reloading:`))),D.nwl(),D.update(q.message("gray","configuring HOT Reload")),await of();function e(a){a.setHeader("Access-Control-Allow-Origin","*"),a.setHeader("Cache-Control","public, max-age=0");}let t=Xp__default.default(path.join(u.dirs.output,"assets"),{setHeaders:e}),s=ef__default.default.createServer((a,l)=>t(a,l,Zp__default.default(a,l))),r=`http://localhost:${u.hot.server}`,n=a=>{if(a.code==="EADDRINUSE")return Ot.output.push(y.red+ue(`${F("EADDRINUSE")} ${ke} ${r}`),y.red,y.red+ue.bold(`Server Port ${u.hot.server} address already in use`),y.red,y.red+ue("Change the server port address or kill the session occupying it."),y.red+ue("This error typically occurs when multiple Syncify instances are active.")),D.update.clear(),D.out(Ot.output.join(x)),u.wss.http.close(),null},i=()=>{D.update.done(),u.wss.connected(),s.removeListener("error",n),s.removeListener("connect",i);};s.on("error",n),s.on("connect",i),s.listen(u.hot.server);let o=vt("PORT")+R+d(`${u.hot.server}`);D.update(q.message("pink",`server ${ke} ${F("localhost")} ${ke} ${o}`));}function va(){if(u.mode.hot===!1)return;let e=new ws.Server({port:u.hot.socket,path:"/ws",skipUTF8Validation:!0});Ys(()=>{e.emit("disconnect"),e.close();});let t=n=>{n.code==="EADDRINUSE"&&(e.close(),Ot.enable=!1,Ot.output.push(y.red+ue(`${F("EADDRINUSE")} ${ke} ws://localhost:${u.hot.server}`),y.red,y.red+ue.bold(`Socket Port ${u.hot.server} address already in use`)));},s=()=>{e.removeAllListeners("script"),e.removeAllListeners("stylesheet"),e.removeAllListeners("section"),e.removeAllListeners("svg"),e.removeAllListeners("assets"),e.removeAllListeners("reload"),e.removeAllListeners("replace");},r=n=>{e.removeListener("error",t),e.prependListener("script",i=>n.send(`script,${i}`)),e.prependListener("stylesheet",i=>n.send(`stylesheet,${i}`)),e.prependListener("section",i=>n.send(`section,${i}`)),e.prependListener("svg",i=>n.send(`svg,${i}`)),e.prependListener("assets",()=>n.send("assets")),e.prependListener("reload",()=>n.send("reload")),e.prependListener("replace",()=>n.send("replace")),e.prependListener("connected",()=>n.send("connected")),e.prependListener("disconnect",()=>n.send("disconnect"));};return e.on("close",s),e.on("error",t),e.on("connection",r),{get http(){return e},script:n=>e.emit("script",path.basename(n)),stylesheet:n=>e.emit("stylesheet",path.basename(n)),section:n=>e.emit("section",n),svg:n=>e.emit("svg",n),assets:()=>e.emit("assets"),reload:()=>e.emit("reload"),replace:()=>e.emit("replace"),connected:()=>e.emit("connected"),disconnect:()=>e.emit("disconnected")}}function _i(e){let t=e.toString().trim().toLowerCase();if(t==="v"){let s=_e(zt);for(let r=0,n=s.length;r<n;r++){let i=s[r];if(zt[i].size!==0){r>0&&D.hline(10),D.write(L.bold.whiteBright(i));for(let o of zt[i].values())typeof o=="string"&&o.length>0&&Q(o);zt[i].clear();}}u.mode.upload&&(S(q.closer("Upload"),x),process.exit(0));}else if(t==="w"){for(let s in pe.process)if(pe.process[s].size!==0){D.nwl(),D.write(L.bold.yellow(s)),D.nwl();for(let r of pe.process[s].values())typeof r=="string"&&r.length>0&&D.write(q.multiline("warning",r));pe.process[s].clear();}pe.count=0;}}`
114
+ ${d("-----------------------------------------------------------------------------")}
115
+ ${F("Syncify CLI Examples")} ${d("by Panoply")}
116
+ ${d("-----------------------------------------------------------------------------")}
117
117
 
118
- ${F("Watching"+_)}
118
+ ${F("Watching"+R)}
119
119
 
120
- ${D("Targeting 1 store and 1 theme")}:
121
- $ sync your-store${D("=")}theme-1 --watch
120
+ ${d("Targeting 1 store and 1 theme")}:
121
+ $ sync your-store${d("=")}theme-1 --watch
122
122
 
123
- ${D("Targeting 1 store and 2 themes with hot reloading")}:
124
- $ sync your-store${D("=")}theme-1,theme-2 --watch --hot
123
+ ${d("Targeting 1 store and 2 themes with hot reloading")}:
124
+ $ sync your-store${d("=")}theme-1,theme-2 --watch --hot
125
125
 
126
- ${D("Targeting 2 stores and 1 theme")}:
127
- $ sync --your-store${D("=")}theme-1 --another-store${D("=")}some-theme --watch
126
+ ${d("Targeting 2 stores and 1 theme")}:
127
+ $ sync --your-store${d("=")}theme-1 --another-store${d("=")}some-theme --watch
128
128
 
129
- ${D("Targeting 2 stores and 2 themes")}:
130
- $ sync --your-store${D("=")}theme-1,theme-2 --another-store${D("=")}some-theme,test-theme --watch
129
+ ${d("Targeting 2 stores and 2 themes")}:
130
+ $ sync --your-store${d("=")}theme-1,theme-2 --another-store${d("=")}some-theme,test-theme --watch
131
131
 
132
- ${D("Targeting 1 store with 2 themes and clean mode with hot live reloads")}:
133
- $ sync your-store${D("=")}theme-1,theme-2 --watch --clean --hot
132
+ ${d("Targeting 1 store with 2 themes and clean mode with hot live reloads")}:
133
+ $ sync your-store${d("=")}theme-1,theme-2 --watch --clean --hot
134
134
 
135
- ${D("Targeting 1 store with 2 themes in production mode")}:
136
- $ sync your-store${D("=")}theme-1,theme-2 --prod --watch
135
+ ${d("Targeting 1 store with 2 themes in production mode")}:
136
+ $ sync your-store${d("=")}theme-1,theme-2 --prod --watch
137
137
 
138
- `;var $a=`
139
- ${D("-----------------------------------------------------------------------------")}
140
- ${F("Syncify")} <!version!> ${D("by Panoply")}
141
- ${D("-----------------------------------------------------------------------------")}
138
+ `;var Ba=`
139
+ ${d("-----------------------------------------------------------------------------")}
140
+ ${F("Syncify")} <!version!> ${d("by Panoply")}
141
+ ${d("-----------------------------------------------------------------------------")}
142
142
 
143
143
  Welcome to the Syncify CLI. The command line utility assumes that
144
- you have defined stores, themes and setup credentials within a ${D(".env")} file.
144
+ you have defined stores, themes and setup credentials within a ${d(".env")} file.
145
145
 
146
- ${F("Aliases"+_)}
146
+ ${F("Aliases"+R)}
147
147
 
148
148
  $ sync
149
149
 
150
- ${F("Commands"+_)}
150
+ ${F("Commands"+R)}
151
151
 
152
- $ syncify ${D.italic("Interactive prompt")}
153
- $ syncify {store} [theme] ${D.italic("Prints list of connected stores")}
152
+ $ syncify ${d.italic("Interactive prompt")}
153
+ $ syncify {store} [theme] ${d.italic("Prints list of connected stores")}
154
154
 
155
- ${F("Themes"+_)}
155
+ ${F("Themes"+R)}
156
156
 
157
- --<store> [theme] ${D.italic("A store reference command (run examples)")}
158
- -t, --theme [theme] ${D.italic("A comma seprated list of themes")}
157
+ --<store> [theme] ${d.italic("A store reference command (run examples)")}
158
+ -t, --theme [theme] ${d.italic("A comma seprated list of themes")}
159
159
 
160
- ${F("Paths"+_)}
160
+ ${F("Paths"+R)}
161
161
 
162
- -c, --config <path> ${D.italic("Set configs path")}
163
- -i, --input <path> ${D.italic("Set input path")}
164
- -o, --output <path> ${D.italic("Set output path")}
162
+ -c, --config <path> ${d.italic("Set configs path")}
163
+ -i, --input <path> ${d.italic("Set input path")}
164
+ -o, --output <path> ${d.italic("Set output path")}
165
165
 
166
- ${F("Utility"+_)}
166
+ ${F("Utility"+R)}
167
167
 
168
- -f, --filter <path> ${D.italic("Glob path, use with pull or push triggers")}
168
+ -f, --filter <path> ${d.italic("Glob path, use with pull or push triggers")}
169
169
 
170
- ${F("Environment"+_)}
170
+ ${F("Environment"+R)}
171
171
 
172
- --dev ${D.italic("Build in development mode (default)")}
173
- --prod ${D.italic("Build in production mode")}
174
- --hot ${D.italic("Run watch with hot-reloads")}
172
+ --dev ${d.italic("Build in development mode (default)")}
173
+ --prod ${d.italic("Build in production mode")}
174
+ --hot ${d.italic("Run watch with hot-reloads")}
175
175
 
176
- ${F("Modes"+_)}
176
+ ${F("Modes"+R)}
177
177
 
178
- -w, --watch ${D.italic("Run watch mode")}
179
- -b, --build ${D.italic("Run build mode from input")}
180
- -u, --upload ${D.italic("Run upload mode theme to stores")}
181
- -d, --download ${D.italic("Run download mode from theme and stores")}
182
- -m, --metafields ${D.italic("Run metafields resource mode")}
183
- -p, --pages ${D.italic("Run pages resource mode")}
184
- -r, --redirects ${D.italic("Run redirects resource mode")}
178
+ -w, --watch ${d.italic("Run watch mode")}
179
+ -b, --build ${d.italic("Run build mode from input")}
180
+ -u, --upload ${d.italic("Run upload mode theme to stores")}
181
+ -d, --download ${d.italic("Run download mode from theme and stores")}
182
+ -m, --metafields ${d.italic("Run metafields resource mode")}
183
+ -p, --pages ${d.italic("Run pages resource mode")}
184
+ -r, --redirects ${d.italic("Run redirects resource mode")}
185
185
 
186
- ${F("Resource"+_)}
186
+ ${F("Resource"+R)}
187
187
 
188
- --pull ${D.italic("Pull a resource from a shop or theme")}
189
- --push ${D.italic("Push a resource to a shop or theme")}
190
- --silent ${D.italic("Silent logs, only warnings or errors are printed")}
188
+ --pull ${d.italic("Pull a resource from a shop or theme")}
189
+ --push ${d.italic("Push a resource to a shop or theme")}
190
+ --silent ${d.italic("Silent logs, only warnings or errors are printed")}
191
191
 
192
- ${F("Trigger"+_)}
192
+ ${F("Trigger"+R)}
193
193
 
194
- --spawn [list] ${D.italic("Invoke a defined spawn child process/s")}
195
- --delete [list] ${D.italic("Delete a remote and local file")}
196
- --minify [list] ${D.italic("invoke minify mode, accepts resource/s")}
194
+ --spawn [list] ${d.italic("Invoke a defined spawn child process/s")}
195
+ --delete [list] ${d.italic("Delete a remote and local file")}
196
+ --minify [list] ${d.italic("invoke minify mode, accepts resource/s")}
197
197
 
198
- ${F("Other"+_)}
198
+ ${F("Other"+R)}
199
199
 
200
- --strap ${D.italic("Import a strap into the project")}
201
- --vsc ${D.italic("Generate vscode specific settings")}
202
- --help ${D.italic("Show the screen")}
200
+ --strap ${d.italic("Import a strap into the project")}
201
+ --vsc ${d.italic("Generate vscode specific settings")}
202
+ --help ${d.italic("Show the screen")}
203
203
 
204
- ${F("Help"+_)}
204
+ ${F("Help"+R)}
205
205
 
206
- -h, --help ${D.italic("Print this screen")}
207
- -h, --help {examples} ${D.italic("Print a list of command examples")}
206
+ -h, --help ${d.italic("Print this screen")}
207
+ -h, --help {examples} ${d.italic("Print a list of command examples")}
208
208
 
209
- ${D("-----------------------------------------------------------------------------")}
209
+ ${d("-----------------------------------------------------------------------------")}
210
210
 
211
- `;function _i(e,t,s){let r=nf__default.default(t.cmd,t.args,{stdio:"pipe"});r.stdio[0].on("data",s),r.stdio[1].on("data",s),r.stdio[2].on("data",s),t.pid=r.pid,u.spawn.streams.set(e,r);}function Df(e,t){return e.replace(us,`.bundled_${We()}.${t==="esm"?"mjs":"cjs"}`)}function df(e){if(typeof jest>"u")return "cjs";let t=path.extname(e);return t===".js"?u.pkg.type==="module"?"esm":"cjs":t===".ts"||t===".mjs"?"esm":"cjs"}function mf(e){return _e(e||{}).map(t=>new RegExp(`^${t.replace(/\*/,".*")}$`))}function Aa(e,t){return t?t.some(s=>s instanceof RegExp?s.test(e):e===s||e.startsWith(s+"/")):!1}function hf({external:e,notExternal:t}={}){return {name:"bundle-require:external",setup({onResolve:s}){s({filter:/.*/},async r=>{if(!(r.path.charCodeAt(0)===46||path.isAbsolute(r.path))){if(Aa(r.path,e))return {external:!0};if(!Aa(r.path,t))return {external:!0}}});}}}function gf(){return {name:"bundle-require:inject-file-scope",setup(e){e.initialOptions.define={...e.initialOptions.define,__dirname:dn,__filename:mn,"import.meta.url":hn},e.onLoad({filter:us},async t=>{let s=await fsExtra.readFile(t.path,"utf-8");return {contents:[`const ${mn} = ${JSON.stringify(t.path)};`,`const ${dn} = ${JSON.stringify(path.dirname(t.path))};`,`const ${hn} = ${JSON.stringify(url.pathToFileURL(t.path).href)};`].join("")+s,loader:wo(path.extname(t.path))}});}}}async function Nr(e){if(!us.test(e.filepath))throw new Error(`${e.filepath} is not a valid JS file`);let t=e.preserveTemporaryFile??!!process.env.BUNDLE_REQUIRE_PRESERVE,s=e.cwd||process.cwd(),r=e.format??df(e.filepath),n=loadTsconfig.loadTsConfig(s,e.tsconfig),i=mf(n?.data.compilerOptions?.paths||{});async function o(h){if(!h.outputFiles)throw new Error("[bundle-require] no output files");let{text:p}=h.outputFiles[0],g=(e.getOutputFile||Df)(e.filepath,r);await fsExtra.writeFile(g,p,"utf8");let m,T=e.require||Fo;try{m=await T(r==="esm"?url.pathToFileURL(g).href:g,{format:r});}finally{t||await fsExtra.unlink(g);}return {mod:m,dependencies:h.metafile?_e(h.metafile.inputs):[]}}let a=await esbuild.build({...e.esbuildOptions,entryPoints:[e.filepath],absWorkingDir:s,outfile:"out.js",format:r,write:!1,platform:"node",sourcemap:"inline",bundle:!0,metafile:!0,plugins:[...e.esbuildOptions?.plugins||[],hf({external:e.external,notExternal:i}),gf()]});return await o(a)}async function Pa(e){let t=null;for(let s of ["syncify.config.js","syncify.config.mjs","syncify.config.cjs","syncify.config.ts","syncify.config.json"]){if(t=path.join(e,s),await fsExtra.pathExists(t))break;t=null;}if(t===null)return null;try{if(t.endsWith(".json")){u.file.path=t,u.file.relative=path.relative(e,t),u.file.base=path.basename(t);let s=await fsExtra.readFile(t);return yo(s.toString())}else {u.file.path=t,u.file.relative=path.relative(e,t),u.file.base=path.basename(t);let s=await Nr({filepath:t});return s.mod.syncify||s.mod.default||s.mod}}catch(s){console.log(s);let r=path.join(e,"syncify.config.json");return await fsExtra.pathExists(r)?fsExtra.readJson(r):null}}async function Ia(e){let t=path.join(e,"package.json");if(!await fsExtra.pathExists(t))throw new Error('Missing "package.json" file');try{u.pkg=await fsExtra.readJson(t);}catch(r){throw new Error(r)}}async function ja(e,t={purge:!1}){if(u.dirs.cache=`${e}/`,!await fsExtra.pathExists(e))try{await fsExtra.mkdir(e);}catch(r){throw new Error(r)}for(let r of uo)if(r==="sections")be[r]=[];else {be[r]={};let n=path.join(e,r,"/");if(await fsExtra.pathExists(n))t.purge&&await fsExtra.emptyDir(n);else {try{await fsExtra.mkdir(n);}catch(o){throw new Error(o)}z(be[r],{uri:n,data:{}});}z(be[r],{uri:n,data:{}});}fsExtra.writeJson(path.join(e,"store.map"),be,{spaces:0},r=>{if(r)throw r});}async function Ii(e){if(await fsExtra.pathExists(e)){if(u.mode.clean)try{await fsExtra.emptyDir(e);}catch(s){console.error(s);}}else try{await fsExtra.mkdir(e);}catch(s){throw new Error(s)}for(let s of co){let r=path.join(e,s);if(!await fsExtra.pathExists(r))try{await fsExtra.mkdir(r);}catch(i){throw new Error(i)}}}function Na(e){let{config:t,cwd:s,mode:r,dirs:n}=u,i=Yu(s);for(let[o,a]of ao){let l;if(o==="import"){r.download?f("output",e)?u.dirs[o]=i(e.output):u.dirs[o]=i(t.import):u.dirs[o]=i(t.import);continue}else if(o==="export"){r.download?f("output",e)?u.dirs[o]=i(e.output):u.dirs[o]=i(t.export):u.dirs[o]=i(t.export);continue}else if(f(o,e)&&e[o]===a)if(t[o]===a){u.dirs[o]=i(e[o]);continue}else l=t[o];else P(e[o])?l=e[o]:l=t[o];if(S(l)){let h=zr(l.map(i));n[o]=h.length===1?h[0]:h;}else P(l)?n[o]=i(l):k({option:"config",name:o,provided:l,expects:"string"});}u.watch.add(u.file.path);}async function La(){let{dirs:e,sync:t,mode:s}=u;if(!s.download)return;if(!await fsExtra.pathExists(e.import))try{await fsExtra.mkdir(e.import);}catch(n){throw new Error(n)}for(let n in t.themes){let{store:i,target:o}=t.themes[n],a=path.join(e.import,i);if(await fsExtra.pathExists(a)){if(s.clean)try{await fsExtra.emptyDir(a);}catch(h){console.error(h);}}else try{await fsExtra.mkdir(a);}catch(h){throw new Error(h)}await Ii(path.join(a,o));}}function Ma(e){if(!f("sections",e.views))return;let{sections:t}=e.views;if(!N(e.views.sections)&&!(G(t)&&Z(t))){G(t)||k({option:"views",name:"sections",expects:"{}",provided:typeof t});for(let s in u.section){if(s==="prefixDir")if(me(t[s])){u.section[s]=t[s];continue}else k({option:"views.sections",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(P(t[s]))if(/[@:_-]/.test(t[s])){u.section[s]=t[s];continue}else he("view.sections",s,t[s],"@ | _ | : | -");else k({option:"views.sections",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=P(t[s])?[t[s]]:t[s];if(S(r)){if(r.length>0){u.section[s]=new RegExp(`${r.join("|")}`);continue}}else k({option:"views.sections",name:s,provided:t[s],expects:"string | string[]"});}}}}function qa(e){if(!f("snippets",e.views))return;let{snippets:t}=e.views;if(!N(t)&&!(G(t)&&Z(t))){G(t)||k({option:"views",name:"snippets",expects:"{}",provided:typeof t});for(let s in u.snippet){if(s==="prefixDir")if(me(t[s])){u.snippet[s]=t[s];continue}else k({option:"views.snippets",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(P(t[s]))if(/[.@:_-]/.test(t[s])){u.section[s]=t[s];continue}else he("sections",s,t[s],"@ | _ | : | - | .");else k({option:"views.snippets",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=P(t[s])?[t[s]]:t[s];if(S(r)){if(r.length>0){u.snippet[s]=new RegExp(`${r.join("|")}`);continue}}else k({option:"views.snippets",name:s,provided:t[s],expects:"string | string[]"});}}}}function Ga(e){if(!f("json",e.processors))return;let{json:t}=e.processors;if(!N(t)&&!(G(t)&&Z(t))){G(t)||k({option:"processors",name:"json",expects:"{}",provided:typeof t});for(let s in t){if(s==="indent")if(Hr(t[s])){K.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"number"});if(s==="useTab")if(me(t[s])){K.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"boolean"});if(s==="exclude"){let r=P(t[s])?[t[s]]:t[s];if(S(r)){K.json[s]=za__default.default(r);continue}else k({option:"json",name:s,provided:r[s],expects:"string | string[]"});}}}}function Mr(e,t){return !!(f("devDependencies",e)&&f(t,e.devDependencies)&&f(t,e.devDependencies)||f("dependencies",e)&&f(t,e.dependencies)||f("peerDependencies",e)&&f(t,e.peerDependencies)||f("optionalDependencies",e)&&f(t,e.peerDependencies))}async function bf(e){for(let t of ["js","cjs","mjs"]){let s=`${e}.${t}`;if(await fsExtra.pathExists(`${s}.${t}`))return s}return null}async function Qs(e){try{let t=await bf(e);if(t!==null){let s=await Nr({filepath:t});return {path:t,config:s.mod.syncify||s.mod.default||s.mod}}return null}catch{return null}}function ji(e,t){let s=t,r=Ve(e),n=path.extname(e),i=path.basename(e,n);return H(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\.?\[ext\])/.test(s)&&(s=s.replace(/\.?\[ext\]/,n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}function Ni(e,t,s){let r=e+"_api_token";if(f(r,t)||(r=r.toUpperCase()),f(r,t))return {baseURL:`https://${e}.myshopify.com/admin`,headers:{"X-Shopify-Access-Token":t[r]}};let n=e+"_api_key",i=e+"_api_secret";if(f(n,t)||(n=n.toUpperCase()),f(i,t)||(i=i.toUpperCase()),f(n,t)&&f(i,t))return {baseURL:`https://${e}.myshopify.com/admin`,auth:{username:t[n],password:t[i]}};s===1?ae(`Invalid or missing ${O(e+".myshopify.com")} credentials`,[`Your shop credentials in the ${O.bold(".env")} file could`,"not be read correctly or are missing."]):s===2&&ae(`Missing credentials for: ${O(e+".myshopify.com")}`,`
211
+ `;function ki(e,t,s){let r=uf__default.default(t.cmd,t.args,{stdio:"pipe"});r.stdio[0].on("data",s),r.stdio[1].on("data",s),r.stdio[2].on("data",s),t.pid=r.pid,u.spawn.streams.set(e,r);}function mf(e,t){return e.replace(us,`.bundled_${Ue()}.${t==="esm"?"mjs":"cjs"}`)}function hf(e){if(typeof jest>"u")return "cjs";let t=path.extname(e);return t===".js"?u.pkg.type==="module"?"esm":"cjs":t===".ts"||t===".mjs"?"esm":"cjs"}function gf(e){return _e(e||{}).map(t=>new RegExp(`^${t.replace(/\*/,".*")}$`))}function $a(e,t){return t?t.some(s=>s instanceof RegExp?s.test(e):e===s||e.startsWith(s+"/")):!1}function yf({external:e,notExternal:t}={}){return {name:"bundle-require:external",setup({onResolve:s}){s({filter:/.*/},async r=>{if(!(r.path.charCodeAt(0)===46||path.isAbsolute(r.path))){if($a(r.path,e))return {external:!0};if(!$a(r.path,t))return {external:!0}}});}}}function xf(){return {name:"bundle-require:inject-file-scope",setup(e){e.initialOptions.define={...e.initialOptions.define,__dirname:mn,__filename:hn,"import.meta.url":gn},e.onLoad({filter:us},async t=>{let s=await fsExtra.readFile(t.path,"utf-8");return {contents:[`const ${hn} = ${JSON.stringify(t.path)};`,`const ${mn} = ${JSON.stringify(path.dirname(t.path))};`,`const ${gn} = ${JSON.stringify(url.pathToFileURL(t.path).href)};`].join("")+s,loader:Co(path.extname(t.path))}});}}}async function Nr(e){if(!us.test(e.filepath))throw new Error(`${e.filepath} is not a valid JS file`);let t=e.preserveTemporaryFile??!!process.env.BUNDLE_REQUIRE_PRESERVE,s=e.cwd||process.cwd(),r=e.format??hf(e.filepath),n=loadTsconfig.loadTsConfig(s,e.tsconfig),i=gf(n?.data.compilerOptions?.paths||{});async function o(m){if(!m.outputFiles)throw new Error("[bundle-require] no output files");let{text:c}=m.outputFiles[0],g=(e.getOutputFile||mf)(e.filepath,r);await fsExtra.writeFile(g,c,"utf8");let h,T=e.require||wo;try{h=await T(r==="esm"?url.pathToFileURL(g).href:g,{format:r});}finally{t||await fsExtra.unlink(g);}return {mod:h,dependencies:m.metafile?_e(m.metafile.inputs):[]}}let a=await esbuild.build({...e.esbuildOptions,entryPoints:[e.filepath],absWorkingDir:s,outfile:"out.js",format:r,write:!1,platform:"node",sourcemap:"inline",bundle:!0,metafile:!0,plugins:[...e.esbuildOptions?.plugins||[],yf({external:e.external,notExternal:i}),xf()]});return await o(a)}async function Oa(e){let t=null;for(let s of ["syncify.config.js","syncify.config.mjs","syncify.config.cjs","syncify.config.ts","syncify.config.json"]){if(t=path.join(e,s),await fsExtra.pathExists(t))break;t=null;}if(t===null)return null;try{if(t.endsWith(".json")){u.file.path=t,u.file.relative=path.relative(e,t),u.file.base=path.basename(t);let s=await fsExtra.readFile(t);return xo(s.toString())}else {u.file.path=t,u.file.relative=path.relative(e,t),u.file.base=path.basename(t);let s=await Nr({filepath:t});return s.mod.syncify||s.mod.default||s.mod}}catch(s){console.log(s);let r=path.join(e,"syncify.config.json");return await fsExtra.pathExists(r)?fsExtra.readJson(r):null}}async function Pa(e){let t=path.join(e,"package.json");if(!await fsExtra.pathExists(t))throw new Error('Missing "package.json" file');try{u.pkg=await fsExtra.readJson(t);}catch(r){throw new Error(r)}}async function Ia(e,t={purge:!1}){if(u.dirs.cache=`${e}/`,!await fsExtra.pathExists(e))try{await fsExtra.mkdir(e);}catch(r){throw new Error(r)}for(let r of ao)if(r==="sections")be[r]=[];else {be[r]={};let n=path.join(e,r,"/");if(await fsExtra.pathExists(n))t.purge&&await fsExtra.emptyDir(n);else {try{await fsExtra.mkdir(n);}catch(o){throw new Error(o)}z(be[r],{uri:n,data:{}});}z(be[r],{uri:n,data:{}});}fsExtra.writeJson(path.join(e,"store.map"),be,{spaces:0},r=>{if(r)throw r});}async function ji(e){if(await fsExtra.pathExists(e)){if(u.mode.clean)try{await fsExtra.emptyDir(e);}catch(s){console.error(s);}}else try{await fsExtra.mkdir(e);}catch(s){throw new Error(s)}for(let s of po){let r=path.join(e,s);if(!await fsExtra.pathExists(r))try{await fsExtra.mkdir(r);}catch(i){throw new Error(i)}}}function ja(e){let{config:t,cwd:s,mode:r,dirs:n}=u,i=Iu(s);for(let[o,a]of lo){let l;if(o==="import"){r.download?f("output",e)?u.dirs[o]=i(e.output):u.dirs[o]=i(t.import):u.dirs[o]=i(t.import);continue}else if(o==="export"){r.download?f("output",e)?u.dirs[o]=i(e.output):u.dirs[o]=i(t.export):u.dirs[o]=i(t.export);continue}else if(f(o,e)&&e[o]===a)if(t[o]===a){u.dirs[o]=i(e[o]);continue}else l=t[o];else P(e[o])?l=e[o]:l=t[o];if(v(l)){let m=zr(l.map(i));n[o]=m.length===1?m[0]:m;}else P(l)?n[o]=i(l):k({option:"config",name:o,provided:l,expects:"string"});}u.watch.add(u.file.path);}async function Na(){let{dirs:e,sync:t,mode:s}=u;if(!s.download)return;if(!await fsExtra.pathExists(e.import))try{await fsExtra.mkdir(e.import);}catch(n){throw new Error(n)}for(let n in t.themes){let{store:i,target:o}=t.themes[n],a=path.join(e.import,i);if(await fsExtra.pathExists(a)){if(s.clean)try{await fsExtra.emptyDir(a);}catch(m){console.error(m);}}else try{await fsExtra.mkdir(a);}catch(m){throw new Error(m)}await ji(path.join(a,o));}}function La(e){if(!f("sections",e.views))return;let{sections:t}=e.views;if(!N(e.views.sections)&&!(G(t)&&Z(t))){G(t)||k({option:"views",name:"sections",expects:"{}",provided:typeof t});for(let s in u.section){if(s==="prefixDir")if(me(t[s])){u.section[s]=t[s];continue}else k({option:"views.sections",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(P(t[s]))if(/[@:_-]/.test(t[s])){u.section[s]=t[s];continue}else he("view.sections",s,t[s],"@ | _ | : | -");else k({option:"views.sections",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=P(t[s])?[t[s]]:t[s];if(v(r)){if(r.length>0){u.section[s]=new RegExp(`${r.join("|")}`);continue}}else k({option:"views.sections",name:s,provided:t[s],expects:"string | string[]"});}}}}function Ma(e){if(!f("snippets",e.views))return;let{snippets:t}=e.views;if(!N(t)&&!(G(t)&&Z(t))){G(t)||k({option:"views",name:"snippets",expects:"{}",provided:typeof t});for(let s in u.snippet){if(s==="prefixDir")if(me(t[s])){u.snippet[s]=t[s];continue}else k({option:"views.snippets",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(P(t[s]))if(/[.@:_-]/.test(t[s])){u.section[s]=t[s];continue}else he("sections",s,t[s],"@ | _ | : | - | .");else k({option:"views.snippets",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=P(t[s])?[t[s]]:t[s];if(v(r)){if(r.length>0){u.snippet[s]=new RegExp(`${r.join("|")}`);continue}}else k({option:"views.snippets",name:s,provided:t[s],expects:"string | string[]"});}}}}function qa(e){if(!f("json",e.processors))return;let{json:t}=e.processors;if(!N(t)&&!(G(t)&&Z(t))){G(t)||k({option:"processors",name:"json",expects:"{}",provided:typeof t});for(let s in t){if(s==="indent")if(Hr(t[s])){K.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"number"});if(s==="useTab")if(me(t[s])){K.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"boolean"});if(s==="exclude"){let r=P(t[s])?[t[s]]:t[s];if(v(r)){K.json[s]=Wa__default.default(r);continue}else k({option:"json",name:s,provided:r[s],expects:"string | string[]"});}}}}function Mr(e,t){return !!(f("devDependencies",e)&&f(t,e.devDependencies)&&f(t,e.devDependencies)||f("dependencies",e)&&f(t,e.dependencies)||f("peerDependencies",e)&&f(t,e.peerDependencies)||f("optionalDependencies",e)&&f(t,e.peerDependencies))}async function vf(e){for(let t of ["js","cjs","mjs"]){let s=`${e}.${t}`;if(await fsExtra.pathExists(`${s}.${t}`))return s}return null}async function Ks(e){try{let t=await vf(e);if(t!==null){let s=await Nr({filepath:t});return {path:t,config:s.mod.syncify||s.mod.default||s.mod}}return null}catch{return null}}function Ni(e,t){let s=t,r=He(e),n=path.extname(e),i=path.basename(e,n);return H(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\.?\[ext\])/.test(s)&&(s=s.replace(/\.?\[ext\]/,n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}function Li(e,t,s){let r=e+"_api_token";if(f(r,t)||(r=r.toUpperCase()),f(r,t))return {baseURL:`https://${e}.myshopify.com/admin`,headers:{"X-Shopify-Access-Token":t[r]}};let n=e+"_api_key",i=e+"_api_secret";if(f(n,t)||(n=n.toUpperCase()),f(i,t)||(i=i.toUpperCase()),f(n,t)&&f(i,t))return {baseURL:`https://${e}.myshopify.com/admin`,auth:{username:t[n],password:t[i]}};s===1?ae(`Invalid or missing ${O(e+".myshopify.com")} credentials`,[`Your shop credentials in the ${O.bold(".env")} file could`,"not be read correctly or are missing."]):s===2&&ae(`Missing credentials for: ${O(e+".myshopify.com")}`,`
212
212
  You need to provide shop credentials within a ${O.bold(".env")} file.
213
- Please check you project setup and ensure you have correctly provided authorization.`);}function Me(e,t){let{cwd:s}=u,r=Ee(t)?[]:!1,n=Ae("Path Resolver"),i=Zt(u.dirs.input);if(S(e)){let o=[];for(let a of e){let l=i(a),h=Wa__default.default.sync(l,{cwd:s,absolute:!0});if(r){let p=t(l);P(p)?r.push(p):S(p)&&r.push(...p);}h.length===0?n("No files can be resolved in",a):o.push(...h);}return r?{paths:o,match:za__default.default(r)}:o}if(P(e)){let o=i(e),a=Wa__default.default.sync(o,{cwd:s});if(a.length===0&&n("No files can be resolved in",e),r){let l=t(o);P(l)?r.push(l):S(l)&&r.push(...l);}return r?{paths:a,match:za__default.default(r)}:a}k({option:"uri",name:"uri/path",provided:e,expects:"string | string[]"});}function ir(e,t){if(f("assertSnippet",t)||(t.assertSnippet=!0),P(e)){let{paths:s,match:r}=Me(e,n=>(t.addWatch&&u.watch.add(n),gt(n)));if(s){if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:path.basename(n),snippet:!1}:{input:n,rename:path.basename(n)});{let n={input:s,rename:"[name].[ext]",match:r};return t.assertSnippet&&(n.snippet=!1),n}}}else if(S(e)){if(e.every(P)){let{paths:s,match:r}=Me(e,n=>(t.addWatch&&u.watch.add(n),gt(n)));if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:path.basename(n),snippet:!1}:{input:n,rename:path.basename(n)});{let n={input:s,rename:"[name].[ext]",match:r};return t.assertSnippet&&(n.snippet=!1),n}}else if(e.every(G))return e.map(s=>{f("input",s)||he("tranform","input",s,"{ input: string | string[] }");let{paths:r,match:n}=Me(e,i=>(t.addWatch&&u.watch.add(i),gt(i)));return s.match=n,s.input=r,t.assertSnippet&&!f("snippet",s)&&(s.snippet=!1),f("rename",s)||(s.rename=s.snippet?"[name].liquid":"[name].[ext]"),s})}else if(G(e)){let s=[];if(f("input",e)){let{paths:r,match:n}=Me(e.input,i=>(t.addWatch&&u.watch.add(i),gt(i)));if(t.assertSnippet&&!f("snippet",e)&&(e.snippet=!1),f("rename",e)||(e.rename=e.snippet?"[name].liquid":"[name].[ext]"),t.flatten)for(let i of r)s.push(z(e,{input:i}));else e.input=r,e.match=n,s.push(e);}else for(let r in e){let n={snippet:r.startsWith("snippets/")},i=r.startsWith("assets/"),o=e[r],a=i||n.snippet;if(P(o)){a&&(n.rename=i?r.slice(7):r.slice(9));let{paths:l,match:h}=Me(o,p=>(t.addWatch&&u.watch.add(p),gt(p)));if(l)if(t.flatten)for(let p of l)s.push(z({},n,{input:p}));else s.push(z({},n,{input:l,match:h}));}else if(G(o)){f("input",o)||he("tranform",r,o,"{ input: string | string[] }");let{paths:l,match:h}=Me(o.input,p=>(t.addWatch&&u.watch.add(p),gt(p)));if(l){let p=a?z({},o,n,{rename:i?r.slice(7):r.slice(9)}):z({},n,o);if(t.flatten)for(let c of l)s.push(z({},p,{input:c}));else s.push(z(p,{input:l,match:h}));}}else if(S(o))if(o.every(P)){let{paths:l,match:h}=Me(o,p=>(t.addWatch&&u.watch.add(p),gt(p)));if(xo(r)&&(n.rename=path.basename(r)),l)if(t.flatten)for(let p of l)s.push(z({},n,{input:p}));else s.push(z({},n,{input:l,match:h}));}else k({option:"transform",name:r,provided:o,expects:"string[]"});}return s}}function Li(e){let{pkg:t}=u;return ge(f("devDependencies",t)&&f(e,t.devDependencies),f("dependencies",t)&&f(e,t.dependencies),f("peerDependencies",t)&&f(e,t.peerDependencies),f("optionalDependencies",t)&&f(e,t.peerDependencies))}function Ua(e,t){let s=t,r=Ve(e),n=path.extname(e),i=path.basename(e,n);return H(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\.?\[ext\])/.test(s)&&(s=s.replace(/\.?\[ext\]/,n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}async function Ha(e){if(!f("script",e.transforms)||e.transforms.script===!1)return;let t=Ae("script transform option"),{esbuild:s}=K,{script:r}=e.transforms;if(s.installed=Mr(u.pkg,"esbuild"),s.installed){pa()||ae("failed to import ESBuild","Ensure you have installed esbuild");let a=await Qs("esbuild.config");a!==null&&(s.file=a.path,s.config=fe(s.config,a.config));}else ke("esbuild");f("entryPoints",s.config)&&(t("processor option is not allowed and was omitted","entryPoints"),delete s.config.entryPoints);let n=ir(r,{addWatch:!1,flatten:!0}),i=sn(["input","watch","rename","snippet"]);f("absWorkingDir",s.config)||(s.config.absWorkingDir=u.cwd);for(let o of n){let{snippet:a}=o,l=a?"snippets":"assets",{name:h}=Ua(o.input,o.rename),p;!h.endsWith(".js")&&!h.endsWith(".mjs")?p=h+".js":h.endsWith(".cjs")?he("rename","file extension",h,".js | .mjs"):p=h,a&&!/\.liquid$/.test(p)&&(p=p+".liquid");let c={uuid:We(),snippet:a,input:o.input,output:path.join(u.dirs.output,l,p),key:path.join(l,p),namespace:o.snippet?"snippets":"assets",size:NaN,watch:null,watchCustom:null,esbuild:null};if(s.config.outfile=c.output,u.mode.watch&&u.watch.unwatch(c.output),f("esbuild",o))if(me(o.esbuild)||N(o.esbuild))Z(i)?c.esbuild=fe(s.config):c.esbuild=fe(s.config,i);else if(typeof o.esbuild=="object"){for(let g in ["entryPoints","outdir","watch","absWorkingDir","watch","write","logLevel","incremental"])g==="entryPoints"&&f(g,o.esbuild)?t('Option is not allowed, use Syncify "input" instead',g):g==="outdir"&&f(g,o.esbuild)?t("Option is not allowed, Syncify will handle output",g):g==="watch"&&f(g,o.esbuild)?t("Option is not allowed, declare watch using Syncify",g):f(g,o.esbuild)&&t("Option is not allowed and will be ignored",g);f("plugins",o.esbuild)&&f("plugins",s.config)&&o.esbuild.plugins.unshift(...s.config.plugins),Z(i)?c.esbuild=fe(s.config,o.esbuild):c.esbuild=fe(s.config,o.esbuild,i);}else k({option:"script",name:"esbuild",provided:typeof o.esbuild,expects:"boolean | null | {}"});else Z(i)?c.esbuild=s.config:c.esbuild=fe(s.config,i);if(c.esbuild.entryPoints=[c.input],u.mode.watch)if(!f("watch",o))c.watch=new Set;else {S(o.watch)||k({option:"script",name:"watch",provided:o.watch,expects:"string[]"});let g=Me(o.watch);c.watchCustom=za__default.default(g),c.watch=new Set(g);}else c.watch=new Set;try{await fa(c);}catch(g){throw new Error(g)}u.mode.terse&&(c.esbuild=fe(c.esbuild,u.terser.script,{exclude:void 0})),u.script.push(c);}s.loaded=!0;}async function Ya(e){if(!f("style",e.transforms))return;let{postcss:t,sass:s}=K,r=Ae("style transform option");if(s.installed=Mr(u.pkg,"sass"),s.installed&&(await vi("sass")||ae("Unable to dynamically import SASS","Ensure you have installed sass")),t.installed=Mr(u.pkg,"postcss"),t.installed){await vi("postcss")||ae("Unable to dynamically import PostCSS","Ensure you have installed postcss");let a=await Qs("postcss.config");a!==null&&(t.file=a.path,t.config=a.config);}let n=ir(e.transforms.style,{addWatch:!1,flatten:!0}),i=Zt(e.input);for(let o of n){let a={uuid:We(),input:o.input,watch:null,postcss:!1,sass:!1};if(f("postcss",o))if(t.installed||ke("postcss"),S(o.postcss))a.postcss=o.postcss;else {let p=G(o.postcss);(me(o.postcss)||p)&&!N(o.postcss)?o.postcss!==!1&&(t.installed||ke("postcss"),a.postcss=p?fe(t.config,o.postcss):!0):k({option:"style",name:"postcss",provided:a.postcss,expects:"boolean | {}"});}if(f("sass",o)&&o.sass!==!1&&s.installed===!0){let p=G(o.sass);if((me(o.sass)||p)&&!N(o.sass))if(s.installed||ke("sass"),!p)jt(a,"sass",{get(){return o.sass}});else {a.sass=z(s.config,o.sass);for(let c in o.sass)c==="sourcemap"||c==="warnings"?me(o.sass[c])?a.sass[c]=o.sass[c]:k({option:"sass",name:c,provided:o.sass[c],expects:"boolean"}):c==="style"?(P(o.sass[c])||k({option:"sass",name:c,provided:o.sass[c],expects:"string"}),o.sass[c]==="expanded"||o.sass[c]==="compressed"?a.sass[c]=o.sass[c]:he("sass",c,o.sass[c],"expanded | compressed")):c==="includePaths"&&(S(o.sass[c])?a.sass[c]=zr(o.sass[c]).map(g=>path.join(u.cwd,g)):k({option:"sass",name:c,provided:o.sass[c],expects:"string[]"}));}else k({option:"style",name:"sass",provided:o.sass,expects:"boolean | {}"});!o.snippet&&!/\.s[ac]ss/.test(path.extname(a.input))&&r("Input is not a sass file",a.input);}let l=ji(o.rename);f("rename",o)&&!N(o)&&(P(o.rename)||k({option:"styles",name:"rename",provided:o.rename,expects:"string"}),l=ji(a.input,o.rename),/[a-zA-Z0-9_.-]+/.test(l.name)||k({option:"sass",name:"rename",provided:l,expects:"Characters: [a-zA-Z0-9_.-]"}),l.name.endsWith(".css")?a.rename=l.name:l.name.endsWith(".scss")?l.name=l.name.replace(".scss",".css"):l.name.endsWith(".sass")?l.name=l.name.replace(".sass",".css"):l.name.endsWith(".liquid")||(l.name=l.name+".css"));let h=[];if(u.mode.watch&&f("watch",o)){S(o.watch)||k({option:"styles",name:"watch",provided:o.watch,expects:"string[]"});for(let p of o.watch){let c=await Wa__default.default(path.join(u.cwd,i(p)));c.length===0&&p[0]!=="!"&&r("Cannot resolve watch glob/path uri",p);for(let g of c)fsExtra.existsSync(g)?h.push(g):r("No file exists in path",g);}h.push(a.input),h.forEach(p=>u.watch.add(p)),a.watch=za__default.default(h);}else a.watch=za__default.default([a.input]),u.watch.add(a.input);typeof a.sass=="object"&&(a.sass.include.unshift(u.cwd,path.join(u.cwd,l.dir)),ot("sass.include",o)&&(a.sass.include=o.sass.include.map(p=>path.join(u.cwd,p)))),f("snippet",o)&&(me(o.snippet)||k({option:"styles",name:"snippet",provided:o.snippet,expects:"boolean"}),a.snippet=o.snippet),a.snippet?(f("rename",a)||(a.rename=l.name),(!l.name.endsWith(".liquid")||!a.rename.endsWith(".liquid"))&&(a.rename=l.name+".liquid"),u.paths.transforms.set(a.input,7),u.mode.watch&&u.watch.unwatch(`${path.join(u.cwd,e.output,"snippets",a.rename)}`)):(a.rename=l.name,u.mode.watch&&u.watch.unwatch(`${path.join(u.cwd,e.output,"assets",l.name)}`)),u.style.push(a);}}async function Qa(e){if(!f("svg",e.transforms))return;let{sprite:t,svgo:s}=K,r=Ae("svg transform");s.installed=Li("svgo"),s.installed&&(await Ai("svgo")||ae("Unable to dynamically import SVGO","Ensure you have installed svgo")),t.installed=Li("svg-sprite"),t.installed&&(await Ai("svg-sprite")||ae("Unable to dynamically import SVG Sprite","Ensure you have installed svg-sprite")),!t.installed&&!s.installed&&ke(["svgo","svg-sprite"]);let n=ir(e.transforms.svg,{addWatch:!0,flatten:!1});for(let i of n){let o=i.input.filter(l=>path.extname(l)!==".svg"?(r("Excluded file which is not an SVG type",path.relative(u.cwd,l)),!1):!0);if(o.length===0){r("No SVG file paths were resolved");continue}let a={uuid:We(),input:new Set(o),match:i.match,format:null,rename:i.rename,snippet:i.snippet};f("svgo",i)&&f("sprite",i)&&he("transform","svg","svgo AND sprite","svgo OR sprite"),f("format",i)?i.format==="file"||i.format==="sprite"?(a.format=i.format,i.format==="file"?(a.svgo=!0,s.installed||ke("svgo")):(a.sprite=!0,t.installed||ke("svg-sprite"))):he("transform > svg","format",i.format,'"sprite" | "file"'):f("svgo",i)?(s.installed||ke("svgo"),a.format="file",a.svgo=G(i.svgo)?fe(s.config,i.svgo):!0):f("sprite",i)?(t.installed||ke("svg-sprite"),a.format="sprite",a.sprite=G(i.sprite)?fe(t.config,i.sprite):!0):s.installed&&t.installed?Fu("transform.svg","format","sprite | file",[`SVG transforms require you to define ${O("format")} when both SVGO and SVG Sprite`,"processors are installed. Syncify needs to knows how is should handle the input and","which processor to use for the transform."]):s.installed&&!t.installed?(a.format="file",a.svgo=!0):t.installed&&!s.installed?(a.format="sprite",a.sprite=!0):Rt("transform > svg","Cannot resolve processor, try defining a format."),u.svg.push(a);}}function Ka(e){if(me(e.terser)){if(u.mode.terse===!1&&e.terser===!1)return;u.mode.terse===!1&&e.terser===!0&&(u.mode.terse=!0);}let t=Ae("terser configuration");if(typeof e.terser=="object")for(let s in e.terser){if(e.terser[s]===!1||N(e.terser[s])){u.mode.terse===!0&&(u.terse[s]=!0);continue}if(s==="script"&&K.esbuild.installed===!1&&(G(e.terser[s])&&Z(e.terser[s])===!1||me(e.terser[s])&&e.terser[s]===!0)&&ae("esbuild is not installed",po),me(e.terser[s]))u.terser[s]=e.terser[s];else if(G(Pe[s])){if(Z(Pe[s]))continue;for(let r in e.terser[s]){let n=s==="views"?"liquid":s;f(r,Pe[n])||Rt(`terser.${s}`,r),r==="mangleProps"?!N(e.terser[s][r])&&!cr(Pe[n][r])&&k({option:`terser.${s}`,name:r,provided:`${typeof e.terser[s][r]} (${e.terser[s][r]})`,expects:"Regex | string | undefined"}):!N(e.terser[s][r])&&typeof Pe[n][r]!=typeof e.terser[s][r]&&k({option:`terser.${s}`,name:r,provided:typeof e.terser[s][r],expects:typeof Pe[n][r]}),r==="exclude"&&!Z(e.terser[s][r])?Pe[s][r]=Me(e.terser[s][r]):r==="collapseWhitespace"?Pe.html.collapseWhitespace=e.terser[s][r]:Pe[s][r]=e.terser[s][r];}}else t("unkown option provided",s);}}async function Xa(e,t){d.clear(),await Ia(e.cwd),await Hf(e),u.version="0.2.2-beta",u.mode=Lf(e),u.cwd=e.cwd,u.env.cli=e.cli,u.env.prod=e.prod,u.env.dev=e.dev&&!e.prod,u.logger.silent=e.silent,process.env.SYNCIFY_ENV=u.env.dev?"dev":"prod",process.env.SYNCIFY_WATCH=String(u.mode.watch);let{config:s,cwd:r}=u,n=await Promise.all([Mf(e.watch,r),Na(e),Vf(r),Ii(u.dirs.output),La(),Jf(e,s),Yf(s),Uf(e),Gf(s),Ma(s),qa(s),Ga(s),Ha(s),Ya(s),Qa(s),Ka(s),zf(s),Wf(s),qf(s)]).catch(i=>{console.log(i);});return d.start(u),n}function Lf(e){let t=ge(e.pages,e.metafields,e.redirects),s=ge(e.style,e.script,e.image,e.svg),r=ge(t,e.upload,e.download)?!1:e.watch,n=z(u.mode,{watch:r,hot:r&&e.hot,vsc:e.vsc,interactive:e.interactive,export:e.export,import:e.import,redirects:e.redirects,metafields:e.metafields,pages:e.pages,pull:e.pull,force:e.force,views:e.views,script:s?e.script:!1,style:s?e.style:!1,image:s?e.image:!1,svg:s?e.svg:!1,terse:ge(e.terse,e.prod),clean:ge(t,s,e.upload)?!1:e.clean,build:ge(e.export,e.watch,e.download)?!1:e.build,upload:ge(s,r)?!1:e.upload,download:ge(t,s,e.upload,e.watch,e.build)?!1:e.download});return it(...Vr(n))&&Yt({message:["Execution is unclear, you have not provided Syncify a operation mode to run."],expected:"--<cmd>",fix:["Syncify requires that you provide an operation. In most cases, this","error occurs when you have forgotten to pass the mode, for example:","",`${C("$")} ${C(`syncify ${u.argv} ${E("--watch")}`)}`,`${C("$")} ${C(`syncify ${u.argv} ${E("--build")}`)}`,`${C("$")} ${C(`syncify ${u.argv} ${E("--upload")}`)}`,"",`Run ${E("syncify --help")} for more information, or pass an execution`,`operation mode as per the ${E("expected")} value and ensure to replace ${E("--<cmd>")}`,"with one the examples provided or a supported mode."]}),n.build&&it(n.script,n.style,n.svg,n.pages,n.metafields,n.image)&&(n.script=!0,n.style=!0,n.svg=!0,n.image=!0,n.views=!0),n}function Mf(e,t){e?(u.watch=new chokidar.FSWatcher({persistent:!0,ignoreInitial:!0,usePolling:!0,interval:75,binaryInterval:100,ignored:["**/*.map"],ignorePermissionErrors:!0}),Object.defineProperties(u.watch,{has:{value(s,r=t){return u.watch._watched.get(r).items.has(s)}},paths:{get(){return ut(u.watch.values())}},watching:{get(){return u.watch._watched}}})):u.watch=new Set;}async function qf(e){if(u.mode.watch!==!0||u.mode.hot===!1&&e.hot===!1)return;u.mode.hot===!1&&e.hot===!0&&(u.mode.hot=!0);let t=Ae("HOT Reloads");if(u.env.sync>1){t("HOT Reloads can only be used on 1 store");return}else if(u.sync.themes.length>1){t("HOT Reloads can only be used on 1 theme");return}it(G(e.hot),me(e.hot),N(e.hot))&&k({option:"config",name:"hot",provided:e.hot,expects:"boolean | {}"});let{hot:s}=u;if(G(e.hot)&&Z(e.hot)===!1)for(let r in e.hot)f(r,u.hot)||Rt(`hot.${r}`,e.hot[r]),r==="label"?e.hot[r]==="visible"||e.hot[r]==="hidden"?s[r]=e.hot[r]:he("hot",r,e.hot[r],"visible | hidden"):r==="method"?e.hot[r]==="hot"||e.hot[r]==="refresh"?s[r]=e.hot[r]:he("hot",r,e.hot[r],"hot | refresh"):r==="scroll"?e.hot[r]==="preserved"||e.hot[r]==="top"?s[r]=e.hot[r]:he("hot",r,e.hot[r],"preserved | top"):typeof s[r]==typeof e.hot[r]?s[r]=e.hot[r]:k({option:"hot",name:r,provided:e.hot[r],expects:typeof s[r]});s.snippet=path.join(u.cwd,"node_modules","@syncify/cli",Fr),s.output=path.join(u.dirs.output,"snippets",Fr);for(let r of s.layouts)s.alive[path.join(u.dirs.output,"layout",r)]=!1;u.wss=Ba();}function Gf(e){for(let t in e.processors)K[t].config=S(e.processors[t])?e.processors[t]:z(K[t].config,e.processors[t]);}function Wf(e){if(f("plugins",e)&&S(e.plugins))for(let t of e.plugins)f("onInit",t)&&t.onInit.call({...u},e),f("onChange",t)&&wt.onChange.push([t.name,t.onChange]),f("onTransform",t)&&wt.onTransform.push([t.name,t.onTransform]),u.mode.watch&&(f("onWatch",t)&&wt.onWatch.push([t.name,t.onWatch]),f("onReload",t)&&wt.onReload.push([t.name,t.onReload])),u.mode.build&&f("onBuild",t)&&wt.onBuild.push([t.name,t.onBuild]);}function zf(e){let{mode:t,spawn:s}=u;if(!f("spawn",e)||N(e.spawn))return;G(e.spawn)||k({option:"config",name:"spawn",provided:e.spawn,expects:"{ build: {}, watch: {} }"});let r=null;if(t.build&&f("build",e.spawn)&&(r="build"),t.watch&&f("watch",e.spawn)&&(r="watch"),!(N(t)||N(e.spawn[r])||(G(e.spawn[r])||k({option:"spawn",name:r,provided:e.spawn[r],expects:"{ build: {}, watch: {} }"}),_e(e.spawn[r]).length===0))){for(let i in e.spawn[r]){let o=e.spawn[r][i];if(P(o)){u.spawn.commands[i]={cmd:$,args:[],pid:NaN};let a=o.trimStart().indexOf(ye)>-1?o.trimStart().split(ye):[o];u.spawn.commands[i].cmd=a.shift(),u.spawn.commands[i].args=a,_i(i,u.spawn.commands[i],d.spawn(i));}else if(S(o)){let a=o.shift();u.spawn.commands[i]={cmd:a,args:o,pid:NaN},_i(i,u.spawn.commands[i],d.spawn(i));}else k({option:"spawn",name:r,provided:e.spawn[r],expects:"string | string[]"});}Ys(()=>{W.pause(),W.clear(),d.nwl($),s.streams.forEach((i,o)=>{Q(`- ${D(`pid: #${i.pid} (${o}) process exited`)}`),i.kill();}),d.nwl($),s.streams.clear(),process.exit(0);});}}function Uf(e){if(!f("filter",e))return;let t=new RegExp(`^(${["assets","config","locales","metafields","layout","pages","customers","templates","snippets","sections"].join("|")})`),s=e.filter.replace(/\s+/g," ").trim();if(s.indexOf(",")>-1){let n=s.split(",").filter(Boolean).map(i=>i.trim());for(let i of n)i[0]==="!"?t.test(i.slice(1))||r("dir",i):i[0]==="*"||i[0]==="/"||i[0]==="."?r("pattern",s):(t.test(i)||r("dir",i),i.indexOf("/")>-1||(S(u.filters[i])||(u.filters[i]=[]),u.filters[i].push(i)));}else s[0]==="*"||s[0]==="/"||s[0]==="."?r("pattern",s):s.indexOf("/")>-1||(S(u.filters[s])||(u.filters[s]=[]),u.filters[s].push(s));function r(n,i){let o=[];n==="pattern"?(o.push(`Invalid ${E("--filter")} pattern provided. You cannot pass starting point`),i[0]==="*"?o.push(`glob (${E("*")}) stars as filters, Syncify does not support this.`):i[0]==="/"?o.push(`path (${E("/")}) roots as filters, Syncify does not support this.`):i[0]==="."&&o.push(`dot paths (${E(".")}) as filters, Syncify does not support this.`),o.push(`Use a starting point directory name based on the ${E("paths")} key property`,`in your ${E(u.file.base)} file.`)):o.push(`Invalid directory provided. The ${E("--filter")} pattern expects the starting point`,"directory path be one of the following:","",`${C("-")} ${E("assets")}`,`${C("-")} ${E("config")}`,`${C("-")} ${E("locales")}`,`${C("-")} ${E("metafields")}`,`${C("-")} ${E("layout")}`,`${C("-")} ${E("pages")}`,`${C("-")} ${E("customers")}`,`${C("-")} ${E("templates")}`,`${C("-")} ${E("snippets")}`,`${C("-")} ${E("sections`")}`,""),Yt({message:o,expected:"--filter <dir>",fix:[`The ${E("--filter")} (or ${E("-f")}) flag command argument expects you`,"provide a theme output directory as the starting point. Filtering begins with","a Shopify output directory name, for example:","",`${C("$")} ${C(`syncify --filter ${E("sections/file.liquid")}`)}`,`${C("$")} ${C(`syncify --filter ${E("snippets/*")}`)}`,`${C("$")} ${C(`syncify --filter ${E("templates/*.json")}`)}`,`${C("$")} ${C(`syncify --filter ${E("!assets/some-file.ext")}`)}`,"",`Syncify will automatically resolve files from within your defined ${F("input")} directory`,"based on the starting point directory name. You can pass glob star matches following the",`directory namespace or starting point ignores (${E("!")}) as long the directory can match.`]});}}async function Vf(e){let t=path.join(e,"node_modules/.syncify"),s=path.join(t,"store.map");if(!await fsExtra.pathExists(s))return ja(t);u.dirs.cache=`${t}/`;let n=await fsExtra.readJson(s);z(be,n);}async function Hf(e){let t=await Pa(e.cwd);t!==null?u.config=t:f("syncify",u.pkg)?u.config=u.pkg.syncify:wu(e.cwd);}function Jf(e,t){let s=ge(u.mode.metafields,u.mode.pages,u.mode.redirects),r=ge(u.mode.watch,u.mode.upload,u.mode.download);if(e._.length===0){s&&Yt({message:["You have not provided store to target, which is required","when running in a resource mode that syncs to a remote source"],expected:"syncify <store>",fix:["Provide the store target name as the first command argument","followed by themes target/s and other flags."]});return}let n=e._[0].split(","),i=Pf__default.default.config({path:path.join(u.cwd,".env")}),o=S(t.stores)?t.stores:[t.stores],a=o.filter(({domain:h})=>tn(h,n)),l=a.length>1;for(let h of a){let p=`${h.domain}.myshopify.com`.toLowerCase(),c=i.error?Ni(h.domain,process.env,2):Ni(h.domain,i.parsed,1),g=u.sync.stores.push({store:h.domain,domain:p,client:c,queue:l})-1;if(u.mode.metafields||u.mode.pages)return;let m=f("theme",e)?e.theme.split(","):f(h.domain,e)?e[h.domain].split(","):_e(h.themes);for(let T of m)f(T,h.themes)||xu({type:"theme",expected:_e(h.themes).join(","),provided:T,message:[`Unknown theme target (${E(T)}) provided to ${E(h.domain)} store`,`Your ${E(u.file.base)} file contains no such theme using this name.`],fix:[`Provide an ${E("expected")} theme target or update/add an existing target.`,`You have ${E(`${m.length}`)} theme targets defined for ${E(h.domain)}:`,"",`${mt} ${m.join(`
214
- ${mt} `)}`,""]}),u.sync.themes.push({target:T,sidx:g,store:p,id:h.themes[T],url:`/themes/${h.themes[T]}/assets.json`});}if(s&&u.sync.stores.length===0)return Yt({expected:"syncify <store>",message:["You have not provided store to target, which is required","when running in a resource mode that syncs to a remote source"],fix:["Provide the store target name as the first command argument followed by themes","target/s and other flags. Based on your current configuration:","",`${mt} ${C("$")} syncify ${o.join(`
215
- ${mt} ${C("$")} syncify `)}`,""]});if(u.sync.themes.length===0&&r)return Yt({expected:"-t <theme>",message:["You have not provided a theme to target, which is required","when running this resource mode."],fix:[`Provide a theme name to target following a ${E("-t")} or ${E("--theme")} flag.`,"Theme targets should be passed as the 2nd argument, the 1st argument should be store name/s."]});u.sync.stores.length===0&&ae("Unknown, missing or invalid store/theme targets","Check your store config"),u.sync.stores.length===1&&u.sync.themes.length===1?u.env.sync=1:(u.sync.stores.length>1||u.sync.themes.length>1)&&(u.env.sync=2);}async function Yf(e){let t=Zt(u.dirs.input),s=Ae("path resolution");for(let r of lo){let n;r==="customers"?n=f(r,e.paths)?S(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/customers")]:f(r,e.paths)?(n=S(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])],r==="assets"&&n.push(path.join(u.dirs.output,"assets/*"))):r==="redirects"&&f(r,e.paths)?n=[path.join(u.cwd,e.paths[r])]:n=[t(r)];for(let i of n){if(i.endsWith("metafields")||i.endsWith("pages")||i.endsWith("redirects"))continue;(await Wa__default.default(i)).length===0&&s("No files could be resolved in",path.relative(u.cwd,i)),u.watch.add(i);}u.paths[r]=za__default.default(n);}}var Tw={get dev(){return process.env.SYNCIFY_ENV==="dev"},get prod(){return process.env.SYNCIFY_ENV==="prod"},get watch(){return process.env.SYNCIFY_WATCH==="true"},get options(){return u.config}};async function ur(e,t,s){if(process.stdin.on("data",Ri),f("_",e)&&(e._=e._.slice(1)),e.help)return console.info($a);await Xa(e),process.on("SIGINT",Au),process.stdin.on("data",Ri),process.on("uncaughtException",Ru),process.on("unhandledRejection",Tu),u.mode.hot&&await va();try{if(u.mode.build)return Fa(s);if(u.mode.watch)return wa(s);if(u.mode.upload)return ua(s);if(u.mode.download)return aa(s);if(u.mode.export)return console.log("TODO")}catch(r){console.log(r),d.throws(r);}}var Pw=e=>e;function Qf(e,t){if(P(e)){if(/watch|build|download|upload/.test(e))return s=>ur({cli:!1,[e]:!0},t,s)}else if(G(e)){if(!H(t))throw new Error("You cannot provide options when running instance");return {watch:s=>ur({cli:!1,watch:!0},t,s),build:s=>ur({cli:!1,build:!0},t,s),download:s=>ur({cli:!1,download:!0},t,s),upload:s=>ur({cli:!1,upload:!0},t,s)}}}var Iw=Qf;
216
-
217
- exports.a = d;
218
- exports.b = Pw;
219
- exports.c = Iw;
220
- exports.d = Tw;
221
- exports.e = ur;
213
+ Please check you project setup and ensure you have correctly provided authorization.`);}function qe(e,t){let{cwd:s}=u,r=Ee(t)?[]:!1,n=Ae("Path Resolver"),i=er(u.dirs.input);if(v(e)){let o=[];for(let a of e){let l=i(a),m=Ga__default.default.sync(l,{cwd:s,absolute:!0});if(r){let c=t(l);P(c)?r.push(c):v(c)&&r.push(...c);}m.length===0?n("No files can be resolved in",a):o.push(...m);}return r?{paths:o,match:Wa__default.default(r)}:o}if(P(e)){let o=i(e),a=Ga__default.default.sync(o,{cwd:s});if(a.length===0&&n("No files can be resolved in",e),r){let l=t(o);P(l)?r.push(l):v(l)&&r.push(...l);}return r?{paths:a,match:Wa__default.default(r)}:a}k({option:"uri",name:"uri/path",provided:e,expects:"string | string[]"});}function ur(e,t){if(f("assertSnippet",t)||(t.assertSnippet=!0),P(e)){let{paths:s,match:r}=qe(e,n=>(t.addWatch&&u.watch.add(n),gt(n)));if(s){if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:path.basename(n),snippet:!1}:{input:n,rename:path.basename(n)});{let n={input:s,rename:"[name].[ext]",match:r};return t.assertSnippet&&(n.snippet=!1),n}}}else if(v(e)){if(e.every(P)){let{paths:s,match:r}=qe(e,n=>(t.addWatch&&u.watch.add(n),gt(n)));if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:path.basename(n),snippet:!1}:{input:n,rename:path.basename(n)});{let n={input:s,rename:"[name].[ext]",match:r};return t.assertSnippet&&(n.snippet=!1),n}}else if(e.every(G))return e.map(s=>{f("input",s)||he("tranform","input",s,"{ input: string | string[] }");let{paths:r,match:n}=qe(e,i=>(t.addWatch&&u.watch.add(i),gt(i)));return s.match=n,s.input=r,t.assertSnippet&&!f("snippet",s)&&(s.snippet=!1),f("rename",s)||(s.rename=s.snippet?"[name].liquid":"[name].[ext]"),s})}else if(G(e)){let s=[];if(f("input",e)){let{paths:r,match:n}=qe(e.input,i=>(t.addWatch&&u.watch.add(i),gt(i)));if(t.assertSnippet&&!f("snippet",e)&&(e.snippet=!1),f("rename",e)||(e.rename=e.snippet?"[name].liquid":"[name].[ext]"),t.flatten)for(let i of r)s.push(z(e,{input:i}));else e.input=r,e.match=n,s.push(e);}else for(let r in e){let n={snippet:r.startsWith("snippets/")},i=r.startsWith("assets/"),o=e[r],a=i||n.snippet;if(P(o)){a&&(n.rename=i?r.slice(7):r.slice(9));let{paths:l,match:m}=qe(o,c=>(t.addWatch&&u.watch.add(c),gt(c)));if(l)if(t.flatten)for(let c of l)s.push(z({},n,{input:c}));else s.push(z({},n,{input:l,match:m}));}else if(G(o)){f("input",o)||he("tranform",r,o,"{ input: string | string[] }");let{paths:l,match:m}=qe(o.input,c=>(t.addWatch&&u.watch.add(c),gt(c)));if(l){let c=a?z({},o,n,{rename:i?r.slice(7):r.slice(9)}):z({},n,o);if(t.flatten)for(let p of l)s.push(z({},c,{input:p}));else s.push(z(c,{input:l,match:m}));}}else if(v(o))if(o.every(P)){let{paths:l,match:m}=qe(o,c=>(t.addWatch&&u.watch.add(c),gt(c)));if(Fo(r)&&(n.rename=path.basename(r)),l)if(t.flatten)for(let c of l)s.push(z({},n,{input:c}));else s.push(z({},n,{input:l,match:m}));}else k({option:"transform",name:r,provided:o,expects:"string[]"});}return s}}function Mi(e){let{pkg:t}=u;return ge(f("devDependencies",t)&&f(e,t.devDependencies),f("dependencies",t)&&f(e,t.dependencies),f("peerDependencies",t)&&f(e,t.peerDependencies),f("optionalDependencies",t)&&f(e,t.peerDependencies))}function za(e,t){let s=t,r=He(e),n=path.extname(e),i=path.basename(e,n);return H(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\.?\[ext\])/.test(s)&&(s=s.replace(/\.?\[ext\]/,n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}async function Va(e){if(!f("script",e.transforms)||e.transforms.script===!1)return;let t=Ae("script transform option"),{esbuild:s}=K,{script:r}=e.transforms;if(s.installed=Mr(u.pkg,"esbuild"),s.installed){fa()||ae("failed to import ESBuild","Ensure you have installed esbuild");let a=await Ks("esbuild.config");a!==null&&(s.file=a.path,s.config=fe(s.config,a.config));}else Oe("esbuild");f("entryPoints",s.config)&&(t("processor option is not allowed and was omitted","entryPoints"),delete s.config.entryPoints);let n=ur(r,{addWatch:!1,flatten:!0}),i=nn(["input","watch","rename","snippet"]);f("absWorkingDir",s.config)||(s.config.absWorkingDir=u.cwd);for(let o of n){let{snippet:a}=o,l=a?"snippets":"assets",{name:m}=za(o.input,o.rename),c;!m.endsWith(".js")&&!m.endsWith(".mjs")?c=m+".js":m.endsWith(".cjs")?he("rename","file extension",m,".js | .mjs"):c=m,a&&!/\.liquid$/.test(c)&&(c=c+".liquid");let p={uuid:Ue(),snippet:a,input:o.input,output:path.join(u.dirs.output,l,c),key:path.join(l,c),namespace:o.snippet?"snippets":"assets",size:NaN,watch:null,watchCustom:null,esbuild:null};if(s.config.outfile=p.output,u.mode.watch&&u.watch.unwatch(p.output),f("esbuild",o))if(me(o.esbuild)||N(o.esbuild))Z(i)?p.esbuild=fe(s.config):p.esbuild=fe(s.config,i);else if(typeof o.esbuild=="object"){for(let g in ["entryPoints","outdir","watch","absWorkingDir","watch","write","logLevel","incremental"])g==="entryPoints"&&f(g,o.esbuild)?t('Option is not allowed, use Syncify "input" instead',g):g==="outdir"&&f(g,o.esbuild)?t("Option is not allowed, Syncify will handle output",g):g==="watch"&&f(g,o.esbuild)?t("Option is not allowed, declare watch using Syncify",g):f(g,o.esbuild)&&t("Option is not allowed and will be ignored",g);f("plugins",o.esbuild)&&f("plugins",s.config)&&o.esbuild.plugins.unshift(...s.config.plugins),Z(i)?p.esbuild=fe(s.config,o.esbuild):p.esbuild=fe(s.config,o.esbuild,i);}else k({option:"script",name:"esbuild",provided:typeof o.esbuild,expects:"boolean | null | {}"});else Z(i)?p.esbuild=s.config:p.esbuild=fe(s.config,i);if(p.esbuild.entryPoints=[p.input],u.mode.watch)if(!f("watch",o))p.watch=new Set;else {v(o.watch)||k({option:"script",name:"watch",provided:o.watch,expects:"string[]"});let g=qe(o.watch);p.watchCustom=Wa__default.default(g),p.watch=new Set(g);}else p.watch=new Set;try{await Da(p);}catch(g){throw new Error(g)}u.mode.terse&&(p.esbuild=fe(p.esbuild,u.terser.script,{exclude:void 0})),u.script.push(p);}s.loaded=!0;}async function Ja(e){if(!f("style",e.transforms))return;let{postcss:t,sass:s}=K,r=Ae("style transform option");if(s.installed=Mr(u.pkg,"sass"),s.installed&&(await Bi("sass")||ae("Unable to dynamically import SASS","Ensure you have installed sass")),t.installed=Mr(u.pkg,"postcss"),t.installed){await Bi("postcss")||ae("Unable to dynamically import PostCSS","Ensure you have installed postcss");let a=await Ks("postcss.config");a!==null&&(t.file=a.path,t.config=a.config);}let n=ur(e.transforms.style,{addWatch:!1,flatten:!0}),i=er(e.input);for(let o of n){let a={uuid:Ue(),input:o.input,watch:null,postcss:!1,sass:!1};if(f("postcss",o))if(t.installed||Oe("postcss"),v(o.postcss))a.postcss=o.postcss;else {let c=G(o.postcss);(me(o.postcss)||c)&&!N(o.postcss)?o.postcss!==!1&&(t.installed||Oe("postcss"),a.postcss=c?fe(t.config,o.postcss):!0):k({option:"style",name:"postcss",provided:a.postcss,expects:"boolean | {}"});}if(f("sass",o)&&o.sass!==!1&&s.installed===!0){let c=G(o.sass);if((me(o.sass)||c)&&!N(o.sass))if(s.installed||Oe("sass"),!c)Nt(a,"sass",{get(){return o.sass}});else {a.sass=z(s.config,o.sass);for(let p in o.sass)p==="sourcemap"||p==="warnings"?me(o.sass[p])?a.sass[p]=o.sass[p]:k({option:"sass",name:p,provided:o.sass[p],expects:"boolean"}):p==="style"?(P(o.sass[p])||k({option:"sass",name:p,provided:o.sass[p],expects:"string"}),o.sass[p]==="expanded"||o.sass[p]==="compressed"?a.sass[p]=o.sass[p]:he("sass",p,o.sass[p],"expanded | compressed")):p==="includePaths"&&(v(o.sass[p])?a.sass[p]=zr(o.sass[p]).map(g=>path.join(u.cwd,g)):k({option:"sass",name:p,provided:o.sass[p],expects:"string[]"}));}else k({option:"style",name:"sass",provided:o.sass,expects:"boolean | {}"});!o.snippet&&!/\.s[ac]ss/.test(path.extname(a.input))&&r("Input is not a sass file",a.input);}let l=Ni(o.rename);f("rename",o)&&!N(o)&&(P(o.rename)||k({option:"styles",name:"rename",provided:o.rename,expects:"string"}),l=Ni(a.input,o.rename),/[a-zA-Z0-9_.-]+/.test(l.name)||k({option:"sass",name:"rename",provided:l,expects:"Characters: [a-zA-Z0-9_.-]"}),l.name.endsWith(".css")?a.rename=l.name:l.name.endsWith(".scss")?l.name=l.name.replace(".scss",".css"):l.name.endsWith(".sass")?l.name=l.name.replace(".sass",".css"):l.name.endsWith(".liquid")||(l.name=l.name+".css"));let m=[];if(u.mode.watch&&f("watch",o)){v(o.watch)||k({option:"styles",name:"watch",provided:o.watch,expects:"string[]"});for(let c of o.watch){let p=await Ga__default.default(path.join(u.cwd,i(c)));p.length===0&&c[0]!=="!"&&r("Cannot resolve watch glob/path uri",c);for(let g of p)fsExtra.existsSync(g)?m.push(g):r("No file exists in path",g);}m.push(a.input),m.forEach(c=>u.watch.add(c)),a.watch=Wa__default.default(m);}else a.watch=Wa__default.default([a.input]),u.watch.add(a.input);typeof a.sass=="object"&&(a.sass.include.unshift(u.cwd,path.join(u.cwd,l.dir)),We("sass.include",o)&&(a.sass.include=o.sass.include.map(c=>path.join(u.cwd,c)))),f("snippet",o)&&(me(o.snippet)||k({option:"styles",name:"snippet",provided:o.snippet,expects:"boolean"}),a.snippet=o.snippet),a.snippet?(f("rename",a)||(a.rename=l.name),(!l.name.endsWith(".liquid")||!a.rename.endsWith(".liquid"))&&(a.rename=l.name+".liquid"),u.paths.transforms.set(a.input,7),u.mode.watch&&u.watch.unwatch(`${path.join(u.cwd,e.output,"snippets",a.rename)}`)):(a.rename=l.name,u.mode.watch&&u.watch.unwatch(`${path.join(u.cwd,e.output,"assets",l.name)}`)),u.style.push(a);}}async function Ya(e){if(!f("svg",e.transforms))return;let{sprite:t,svgo:s}=K,r=Ae("svg transform");s.installed=Mi("svgo"),s.installed&&(await Ti("svgo")||ae("Unable to dynamically import SVGO","Ensure you have installed svgo")),t.installed=Mi("svg-sprite"),t.installed&&(await Ti("svg-sprite")||ae("Unable to dynamically import SVG Sprite","Ensure you have installed svg-sprite")),!t.installed&&!s.installed&&Oe(["svgo","svg-sprite"]);let n=ur(e.transforms.svg,{addWatch:!0,flatten:!1});for(let i of n){let o=i.input.filter(l=>path.extname(l)!==".svg"?(r("Excluded file which is not an SVG type",path.relative(u.cwd,l)),!1):!0);if(o.length===0){r("No SVG file paths were resolved");continue}let a={uuid:Ue(),input:new Set(o),match:i.match,format:null,rename:i.rename,snippet:i.snippet};f("svgo",i)&&f("sprite",i)&&he("transform","svg","svgo AND sprite","svgo OR sprite"),f("format",i)?i.format==="file"||i.format==="sprite"?(a.format=i.format,i.format==="file"?(a.svgo=!0,s.installed||Oe("svgo")):(a.sprite=!0,t.installed||Oe("svg-sprite"))):he("transform > svg","format",i.format,'"sprite" | "file"'):f("svgo",i)?(s.installed||Oe("svgo"),a.format="file",a.svgo=G(i.svgo)?fe(s.config,i.svgo):!0):f("sprite",i)?(t.installed||Oe("svg-sprite"),a.format="sprite",a.sprite=G(i.sprite)?fe(t.config,i.sprite):!0):s.installed&&t.installed?wu("transform.svg","format","sprite | file",[`SVG transforms require you to define ${O("format")} when both SVGO and SVG Sprite`,"processors are installed. Syncify needs to knows how is should handle the input and","which processor to use for the transform."]):s.installed&&!t.installed?(a.format="file",a.svgo=!0):t.installed&&!s.installed?(a.format="sprite",a.sprite=!0):_t("transform > svg","Cannot resolve processor, try defining a format."),u.svg.push(a);}}function Qa(e){if(me(e.terser)){if(u.mode.terse===!1&&e.terser===!1)return;u.mode.terse===!1&&e.terser===!0&&(u.mode.terse=!0);}let t=Ae("terser configuration");if(typeof e.terser=="object")for(let s in e.terser){if(e.terser[s]===!1||N(e.terser[s])){u.mode.terse===!0&&(u.terse[s]=!0);continue}if(s==="script"&&K.esbuild.installed===!1&&(G(e.terser[s])&&Z(e.terser[s])===!1||me(e.terser[s])&&e.terser[s]===!0)&&ae("esbuild is not installed",fo),me(e.terser[s]))u.terser[s]=e.terser[s];else if(G(Ie[s])){if(Z(Ie[s]))continue;for(let r in e.terser[s]){let n=s==="views"?"liquid":s;f(r,Ie[n])||_t(`terser.${s}`,r),r==="mangleProps"?!N(e.terser[s][r])&&!fr(Ie[n][r])&&k({option:`terser.${s}`,name:r,provided:`${typeof e.terser[s][r]} (${e.terser[s][r]})`,expects:"Regex | string | undefined"}):!N(e.terser[s][r])&&typeof Ie[n][r]!=typeof e.terser[s][r]&&k({option:`terser.${s}`,name:r,provided:typeof e.terser[s][r],expects:typeof Ie[n][r]}),r==="exclude"&&!Z(e.terser[s][r])?Ie[s][r]=qe(e.terser[s][r]):r==="collapseWhitespace"?Ie.html.collapseWhitespace=e.terser[s][r]:Ie[s][r]=e.terser[s][r];}}else t("unkown option provided",s);}}async function Ka(e,t){D.clear(),await Pa(e.cwd),await Yf(e),u.version="0.2.4-beta",u.mode=qf(e),u.cwd=e.cwd,u.env.cli=e.cli,u.env.prod=e.prod,u.env.dev=e.dev&&!e.prod,u.logger.silent=e.silent,process.env.SYNCIFY_ENV=u.env.dev?"dev":"prod",process.env.SYNCIFY_WATCH=String(u.mode.watch);let{config:s,cwd:r}=u,n=await Promise.all([Gf(e.watch,r),ja(e),Jf(r),ji(u.dirs.output),Na(),Qf(e,s),Kf(s),Hf(e),zf(s),La(s),Ma(s),qa(s),Va(s),Ja(s),Ya(s),Qa(s),Vf(s),Uf(s),Wf(s)]).catch(i=>{console.log(i);});return D.start(u),n}function qf(e){let t=ge(e.pages,e.metafields,e.redirects),s=ge(e.style,e.script,e.image,e.svg),r=ge(t,e.upload,e.download)?!1:e.watch,n=z(u.mode,{watch:r,hot:r&&e.hot,vsc:e.vsc,interactive:e.interactive,export:e.export,import:e.import,redirects:e.redirects,metafields:e.metafields,pages:e.pages,pull:e.pull,force:e.force,views:e.views,script:s?e.script:!1,style:s?e.style:!1,image:s?e.image:!1,svg:s?e.svg:!1,terse:ge(e.terse,e.prod),clean:ge(t,s,e.upload)?!1:e.clean,build:ge(e.export,e.watch,e.download)?!1:e.build,upload:ge(s,r)?!1:e.upload,download:ge(t,s,e.upload,e.watch,e.build)?!1:e.download});return ot(...Vr(n))&&Qt({message:["Execution is unclear, you have not provided Syncify a operation mode to run."],expected:"--<cmd>",fix:["Syncify requires that you provide an operation. In most cases, this","error occurs when you have forgotten to pass the mode, for example:","",`${C("$")} ${C(`syncify ${u.argv} ${E("--watch")}`)}`,`${C("$")} ${C(`syncify ${u.argv} ${E("--build")}`)}`,`${C("$")} ${C(`syncify ${u.argv} ${E("--upload")}`)}`,"",`Run ${E("syncify --help")} for more information, or pass an execution`,`operation mode as per the ${E("expected")} value and ensure to replace ${E("--<cmd>")}`,"with one the examples provided or a supported mode."]}),n.build&&ot(n.script,n.style,n.svg,n.pages,n.metafields,n.image)&&(n.script=!0,n.style=!0,n.svg=!0,n.image=!0,n.views=!0),n}function Gf(e,t){e?(u.watch=new chokidar.FSWatcher({persistent:!0,ignoreInitial:!0,usePolling:!0,interval:75,binaryInterval:100,ignored:["**/*.map"],ignorePermissionErrors:!0}),Object.defineProperties(u.watch,{has:{value(s,r=t){return u.watch._watched.get(r).items.has(s)}},paths:{get(){return ut(u.watch.values())}},watching:{get(){return u.watch._watched}}})):u.watch=new Set;}async function Wf(e){if(u.mode.watch!==!0||u.mode.hot===!1&&e.hot===!1)return;u.mode.hot===!1&&e.hot===!0&&(u.mode.hot=!0);let t=Ae("HOT Reloads");if(u.env.sync>1){t("HOT Reloads can only be used on 1 store");return}else if(u.sync.themes.length>1){t("HOT Reloads can only be used on 1 theme");return}ot(G(e.hot),me(e.hot),N(e.hot))&&k({option:"config",name:"hot",provided:e.hot,expects:"boolean | {}"});let{hot:s}=u;if(G(e.hot)&&Z(e.hot)===!1)for(let r in e.hot)f(r,u.hot)||_t(`hot.${r}`,e.hot[r]),r==="label"?e.hot[r]==="visible"||e.hot[r]==="hidden"?s[r]=e.hot[r]:he("hot",r,e.hot[r],"visible | hidden"):r==="method"?e.hot[r]==="hot"||e.hot[r]==="refresh"?s[r]=e.hot[r]:he("hot",r,e.hot[r],"hot | refresh"):r==="scroll"?e.hot[r]==="preserved"||e.hot[r]==="top"?s[r]=e.hot[r]:he("hot",r,e.hot[r],"preserved | top"):typeof s[r]==typeof e.hot[r]?s[r]=e.hot[r]:k({option:"hot",name:r,provided:e.hot[r],expects:typeof s[r]});s.snippet=path.join(u.cwd,"node_modules","@syncify/cli",Cr),s.output=path.join(u.dirs.output,"snippets",Cr);for(let r of s.layouts)s.alive[path.join(u.dirs.output,"layout",r)]=!1;u.wss=va();}function zf(e){for(let t in e.processors)K[t].config=v(e.processors[t])?e.processors[t]:z(K[t].config,e.processors[t]);}function Uf(e){if(f("plugins",e)&&v(e.plugins))for(let t of e.plugins)f("onInit",t)&&t.onInit.call({...u},e),f("onChange",t)&&wt.onChange.push([t.name,t.onChange]),f("onTransform",t)&&wt.onTransform.push([t.name,t.onTransform]),u.mode.watch&&(f("onWatch",t)&&wt.onWatch.push([t.name,t.onWatch]),f("onReload",t)&&wt.onReload.push([t.name,t.onReload])),u.mode.build&&f("onBuild",t)&&wt.onBuild.push([t.name,t.onBuild]);}function Vf(e){let{mode:t,spawn:s}=u;if(!f("spawn",e)||N(e.spawn))return;G(e.spawn)||k({option:"config",name:"spawn",provided:e.spawn,expects:"{ build: {}, watch: {} }"});let r=null;if(t.build&&f("build",e.spawn)&&(r="build"),t.watch&&f("watch",e.spawn)&&(r="watch"),!(N(t)||N(e.spawn[r])||(G(e.spawn[r])||k({option:"spawn",name:r,provided:e.spawn[r],expects:"{ build: {}, watch: {} }"}),_e(e.spawn[r]).length===0))){for(let i in e.spawn[r]){let o=e.spawn[r][i];if(P(o)){u.spawn.commands[i]={cmd:$,args:[],pid:NaN};let a=o.trimStart().indexOf(ye)>-1?o.trimStart().split(ye):[o];u.spawn.commands[i].cmd=a.shift(),u.spawn.commands[i].args=a,ki(i,u.spawn.commands[i],D.spawn(i));}else if(v(o)){let a=o.shift();u.spawn.commands[i]={cmd:a,args:o,pid:NaN},ki(i,u.spawn.commands[i],D.spawn(i));}else k({option:"spawn",name:r,provided:e.spawn[r],expects:"string | string[]"});}Ys(()=>{W.pause(),W.clear(),D.nwl($),s.streams.forEach((i,o)=>{Q(`- ${d(`pid: #${i.pid} (${o}) process exited`)}`),i.kill();}),D.nwl($),s.streams.clear(),process.exit(0);});}}function Hf(e){if(!f("filter",e))return;let t=new RegExp(`^(${["assets","config","locales","metafields","layout","pages","customers","templates","snippets","sections"].join("|")})`),s=e.filter.replace(/\s+/g," ").trim();if(s.indexOf(",")>-1){let n=s.split(",").filter(Boolean).map(i=>i.trim());for(let i of n)i[0]==="!"?t.test(i.slice(1))||r("dir",i):i[0]==="*"||i[0]==="/"||i[0]==="."?r("pattern",s):(t.test(i)||r("dir",i),i.indexOf("/")>-1||(v(u.filters[i])||(u.filters[i]=[]),u.filters[i].push(i)));}else s[0]==="*"||s[0]==="/"||s[0]==="."?r("pattern",s):s.indexOf("/")>-1||(v(u.filters[s])||(u.filters[s]=[]),u.filters[s].push(s));function r(n,i){let o=[];n==="pattern"?(o.push(`Invalid ${E("--filter")} pattern provided. You cannot pass starting point`),i[0]==="*"?o.push(`glob (${E("*")}) stars as filters, Syncify does not support this.`):i[0]==="/"?o.push(`path (${E("/")}) roots as filters, Syncify does not support this.`):i[0]==="."&&o.push(`dot paths (${E(".")}) as filters, Syncify does not support this.`),o.push(`Use a starting point directory name based on the ${E("paths")} key property`,`in your ${E(u.file.base)} file.`)):o.push(`Invalid directory provided. The ${E("--filter")} pattern expects the starting point`,"directory path be one of the following:","",`${C("-")} ${E("assets")}`,`${C("-")} ${E("config")}`,`${C("-")} ${E("locales")}`,`${C("-")} ${E("metafields")}`,`${C("-")} ${E("layout")}`,`${C("-")} ${E("pages")}`,`${C("-")} ${E("customers")}`,`${C("-")} ${E("templates")}`,`${C("-")} ${E("snippets")}`,`${C("-")} ${E("sections`")}`,""),Qt({message:o,expected:"--filter <dir>",fix:[`The ${E("--filter")} (or ${E("-f")}) flag command argument expects you`,"provide a theme output directory as the starting point. Filtering begins with","a Shopify output directory name, for example:","",`${C("$")} ${C(`syncify --filter ${E("sections/file.liquid")}`)}`,`${C("$")} ${C(`syncify --filter ${E("snippets/*")}`)}`,`${C("$")} ${C(`syncify --filter ${E("templates/*.json")}`)}`,`${C("$")} ${C(`syncify --filter ${E("!assets/some-file.ext")}`)}`,"",`Syncify will automatically resolve files from within your defined ${F("input")} directory`,"based on the starting point directory name. You can pass glob star matches following the",`directory namespace or starting point ignores (${E("!")}) as long the directory can match.`]});}}async function Jf(e){let t=path.join(e,"node_modules/.syncify"),s=path.join(t,"store.map");if(!await fsExtra.pathExists(s))return Ia(t);u.dirs.cache=`${t}/`;let n=await fsExtra.readJson(s);z(be,n);}async function Yf(e){let t=await Oa(e.cwd);t!==null?u.config=t:f("syncify",u.pkg)?u.config=u.pkg.syncify:Cu(e.cwd);}function Qf(e,t){let s=ge(u.mode.metafields,u.mode.pages,u.mode.redirects),r=ge(u.mode.watch,u.mode.upload,u.mode.download);if(e._.length===0){s&&Qt({message:["You have not provided store to target, which is required","when running in a resource mode that syncs to a remote source"],expected:"syncify <store>",fix:["Provide the store target name as the first command argument","followed by themes target/s and other flags."]});return}let n=e._[0].split(","),i=jf__default.default.config({path:path.join(u.cwd,".env")}),o=v(t.stores)?t.stores:[t.stores],a=o.filter(({domain:m})=>rn(m,n)),l=a.length>1;for(let m of a){let c=`${m.domain}.myshopify.com`.toLowerCase(),p=i.error?Li(m.domain,process.env,2):Li(m.domain,i.parsed,1),g=u.sync.stores.push({store:m.domain,domain:c,client:p,queue:l})-1;if(u.mode.metafields||u.mode.pages)return;let h=f("theme",e)?e.theme.split(","):f(m.domain,e)?e[m.domain].split(","):_e(m.themes);for(let T of h)f(T,m.themes)||Fu({type:"theme",expected:_e(m.themes).join(","),provided:T,message:[`Unknown theme target (${E(T)}) provided to ${E(m.domain)} store`,`Your ${E(u.file.base)} file contains no such theme using this name.`],fix:[`Provide an ${E("expected")} theme target or update/add an existing target.`,`You have ${E(`${h.length}`)} theme targets defined for ${E(m.domain)}:`,"",`${mt} ${h.join(`
214
+ ${mt} `)}`,""]}),u.sync.themes.push({target:T,sidx:g,store:c,id:m.themes[T],url:`/themes/${m.themes[T]}/assets.json`});}if(s&&u.sync.stores.length===0)return Qt({expected:"syncify <store>",message:["You have not provided store to target, which is required","when running in a resource mode that syncs to a remote source"],fix:["Provide the store target name as the first command argument followed by themes","target/s and other flags. Based on your current configuration:","",`${mt} ${C("$")} syncify ${o.join(`
215
+ ${mt} ${C("$")} syncify `)}`,""]});if(u.sync.themes.length===0&&r)return Qt({expected:"-t <theme>",message:["You have not provided a theme to target, which is required","when running this resource mode."],fix:[`Provide a theme name to target following a ${E("-t")} or ${E("--theme")} flag.`,"Theme targets should be passed as the 2nd argument, the 1st argument should be store name/s."]});u.sync.stores.length===0&&ae("Unknown, missing or invalid store/theme targets","Check your store config"),u.sync.stores.length===1&&u.sync.themes.length===1?u.env.sync=1:(u.sync.stores.length>1||u.sync.themes.length>1)&&(u.env.sync=2);}async function Kf(e){let t=er(u.dirs.input),s=Ae("path resolution");for(let r of co){let n;r==="customers"?n=f(r,e.paths)?v(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/customers")]:f(r,e.paths)?(n=v(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])],r==="assets"&&n.push(path.join(u.dirs.output,"assets/*"))):r==="redirects"&&f(r,e.paths)?n=[path.join(u.cwd,e.paths[r])]:n=[t(r)];for(let i of n){if(i.endsWith("metafields")||i.endsWith("pages")||i.endsWith("redirects"))continue;(await Ga__default.default(i)).length===0&&s("No files could be resolved in",path.relative(u.cwd,i)),u.watch.add(i);}u.paths[r]=Wa__default.default(n);}}var Pw={get dev(){return process.env.SYNCIFY_ENV==="dev"},get prod(){return process.env.SYNCIFY_ENV==="prod"},get watch(){return process.env.SYNCIFY_WATCH==="true"},get options(){return u.config}};async function lr(e,t,s){if(process.stdin.on("data",_i),f("_",e)&&(e._=e._.slice(1)),e.help)return console.info(Ba);await Ka(e),process.on("SIGINT",Tu),process.stdin.on("data",_i),process.on("uncaughtException",_u),process.on("unhandledRejection",Ru),u.mode.hot&&await Sa();try{if(u.mode.build)return wa(s);if(u.mode.watch)return Ca(s);if(u.mode.upload)return aa(s);if(u.mode.download)return la(s);if(u.mode.export)return console.log("TODO")}catch(r){console.log(r),D.throws(r);}}var Mw=e=>e;function Xf(e,t){if(P(e)){if(/watch|build|download|upload/.test(e))return s=>lr({cli:!1,[e]:!0},t,s)}else if(G(e)){if(!H(t))throw new Error("You cannot provide options when running instance");return {watch:s=>lr({cli:!1,watch:!0},t,s),build:s=>lr({cli:!1,build:!0},t,s),download:s=>lr({cli:!1,download:!0},t,s),upload:s=>lr({cli:!1,upload:!0},t,s)}}}var qw=Xf;
216
+
217
+ exports.a = D;
218
+ exports.b = Mw;
219
+ exports.c = qw;
220
+ exports.d = Pw;
221
+ exports.e = lr;