@syncify/cli 0.2.4-beta → 0.3.0-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,236 @@
1
1
  'use strict';
2
2
 
3
- var Ds = require('process');
4
- var pl = require('axios');
3
+ var util = require('util');
4
+ var es = require('process');
5
+ var child_process = require('child_process');
6
+ var pathe = require('pathe');
7
+ var url = require('url');
8
+ var Kl = require('axios');
5
9
  var events = require('events');
6
10
  var module$1 = require('module');
7
- var gl = require('zlib');
11
+ var sc = require('zlib');
8
12
  var stream = require('stream');
9
13
  var console$1 = require('console');
10
14
  var perf_hooks = require('perf_hooks');
11
- var xl = require('os');
12
- var Zo = require('readline');
13
- var child_process = require('child_process');
14
- var path = require('path');
15
- var url = require('url');
16
- var Bu = require('node-notifier');
17
- var Ga = require('fast-glob');
15
+ var ic = require('os');
16
+ var mu = require('readline');
17
+ var ks = require('node-notifier');
18
+ var cl = require('fast-glob');
18
19
  var fsExtra = require('fs-extra');
19
- require('prompts');
20
- var Wa = require('anymatch');
20
+ var path = require('path');
21
+ var Ys = require('prompts');
22
+ var utils = require('markdown-it/lib/common/utils');
23
+ var pl = require('anymatch');
21
24
  var htmlMinifierTerser = require('html-minifier-terser');
22
- var _p = require('gray-matter');
23
- require('turndown');
24
- require('turndown-plugin-gfm');
25
- var kp = require('markdown-it');
26
- var ws = require('ws');
27
- var Xp = require('serve-static');
28
- var Zp = require('finalhandler');
29
- var ef = require('http');
25
+ var Zf = require('gray-matter');
26
+ var tm = require('turndown');
27
+ var rm = require('markdown-it');
28
+ var sm = require('@liquify/highlight');
29
+ var ws$1 = require('ws');
30
+ var pm = require('serve-static');
31
+ var fm = require('finalhandler');
32
+ var mm = require('http');
30
33
  var chokidar = require('chokidar');
31
- var jf = require('dotenv');
32
- var uf = require('cross-spawn');
33
34
  var loadTsconfig = require('load-tsconfig');
34
35
  var esbuild = require('esbuild');
36
+ var Om = require('dotenv');
37
+ var Mm = require('cross-spawn');
38
+ var qm = require('tree-kill');
35
39
 
36
40
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
37
41
 
38
- var Ds__default = /*#__PURE__*/_interopDefault(Ds);
42
+ var es__default = /*#__PURE__*/_interopDefault(es);
43
+ var Kl__default = /*#__PURE__*/_interopDefault(Kl);
44
+ var sc__default = /*#__PURE__*/_interopDefault(sc);
45
+ var ic__default = /*#__PURE__*/_interopDefault(ic);
46
+ var mu__default = /*#__PURE__*/_interopDefault(mu);
47
+ var ks__default = /*#__PURE__*/_interopDefault(ks);
48
+ var cl__default = /*#__PURE__*/_interopDefault(cl);
49
+ var Ys__default = /*#__PURE__*/_interopDefault(Ys);
39
50
  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);
45
- var Wa__default = /*#__PURE__*/_interopDefault(Wa);
46
- var _p__default = /*#__PURE__*/_interopDefault(_p);
47
- var kp__default = /*#__PURE__*/_interopDefault(kp);
48
- var Xp__default = /*#__PURE__*/_interopDefault(Xp);
49
- var Zp__default = /*#__PURE__*/_interopDefault(Zp);
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,`
51
+ var Zf__default = /*#__PURE__*/_interopDefault(Zf);
52
+ var tm__default = /*#__PURE__*/_interopDefault(tm);
53
+ var rm__default = /*#__PURE__*/_interopDefault(rm);
54
+ var sm__default = /*#__PURE__*/_interopDefault(sm);
55
+ var pm__default = /*#__PURE__*/_interopDefault(pm);
56
+ var fm__default = /*#__PURE__*/_interopDefault(fm);
57
+ var mm__default = /*#__PURE__*/_interopDefault(mm);
58
+ var Om__default = /*#__PURE__*/_interopDefault(Om);
59
+ var Mm__default = /*#__PURE__*/_interopDefault(Mm);
60
+ var qm__default = /*#__PURE__*/_interopDefault(qm);
61
+
62
+ var kl=Object.create;var tn=Object.defineProperty;var Pl=Object.getOwnPropertyDescriptor;var Ol=Object.getOwnPropertyNames;var jl=Object.getPrototypeOf,Nl=Object.prototype.hasOwnProperty;var rn=(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 Ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gr=(e,t)=>{for(var s in t)tn(e,s,{get:t[s],enumerable:!0});},Il=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ol(t))!Nl.call(e,n)&&n!==s&&tn(e,n,{get:()=>t[n],enumerable:!(r=Pl(t,n))||r.enumerable});return e};var zt=(e,t,s)=>(s=e!=null?kl(jl(e)):{},Il(t||!e||!e.__esModule?tn(s,"default",{value:e,enumerable:!0}):s,e));var Fo=Ze((vD,hn)=>{var Yl=Object.prototype.hasOwnProperty,Ee="~";function Cr(){}Object.create&&(Cr.prototype=Object.create(null),new Cr().__proto__||(Ee=!1));function Ql(e,t,s){this.fn=e,this.context=t,this.once=s||!1;}function wo(e,t,s,r,n){if(typeof s!="function")throw new TypeError("The listener must be a function");var i=new Ql(s,r||e,n),o=Ee?Ee+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 ns(e,t){--e._eventsCount===0?e._events=new Cr:delete e._events[t];}function xe(){this._events=new Cr,this._eventsCount=0;}xe.prototype.eventNames=function(){var t=[],s,r;if(this._eventsCount===0)return t;for(r in s=this._events)Yl.call(s,r)&&t.push(Ee?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t};xe.prototype.listeners=function(t){var s=Ee?Ee+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=Ee?Ee+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=Ee?Ee+t:t;if(!this._events[a])return !1;var c=this._events[a],h=arguments.length,p,l;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,s),!0;case 3:return c.fn.call(c.context,s,r),!0;case 4:return c.fn.call(c.context,s,r,n),!0;case 5:return c.fn.call(c.context,s,r,n,i),!0;case 6:return c.fn.call(c.context,s,r,n,i,o),!0}for(l=1,p=new Array(h-1);l<h;l++)p[l-1]=arguments[l];c.fn.apply(c.context,p);}else {var m=c.length,D;for(l=0;l<m;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,s);break;case 3:c[l].fn.call(c[l].context,s,r);break;case 4:c[l].fn.call(c[l].context,s,r,n);break;default:if(!p)for(D=1,p=new Array(h-1);D<h;D++)p[D-1]=arguments[D];c[l].fn.apply(c[l].context,p);}}return !0};xe.prototype.on=function(t,s,r){return wo(this,t,s,r,!1)};xe.prototype.once=function(t,s,r){return wo(this,t,s,r,!0)};xe.prototype.removeListener=function(t,s,r,n){var i=Ee?Ee+t:t;if(!this._events[i])return this;if(!s)return ns(this,i),this;var o=this._events[i];if(o.fn)o.fn===s&&(!n||o.once)&&(!r||o.context===r)&&ns(this,i);else {for(var a=0,c=[],h=o.length;a<h;a++)(o[a].fn!==s||n&&!o[a].once||r&&o[a].context!==r)&&c.push(o[a]);c.length?this._events[i]=c.length===1?c[0]:c:ns(this,i);}return this};xe.prototype.removeAllListeners=function(t){var s;return t?(s=Ee?Ee+t:t,this._events[s]&&ns(this,s)):(this._events=new Cr,this._eventsCount=0),this};xe.prototype.off=xe.prototype.removeListener;xe.prototype.addListener=xe.prototype.on;xe.prefixed=Ee;xe.EventEmitter=xe;typeof hn<"u"&&(hn.exports=xe);});var Uo=Ze((ah,Pn)=>{var Dt={};typeof Pn>"u"?window.eastasianwidth=Dt:Pn.exports=Dt;Dt.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"};Dt.characterLength=function(e){var t=this.eastAsianWidth(e);return t=="F"||t=="W"||t=="A"?2:1};function zo(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}Dt.length=function(e){for(var t=zo(e),s=0,r=0;r<t.length;r++)s=s+this.characterLength(t[r]);return s};Dt.slice=function(e,t,s){textLen=Dt.length(e),t=t||0,s=s||1,t<0&&(t=textLen+t),s<0&&(s=textLen+s);for(var r="",n=0,i=zo(e),o=0;o<i.length;o++){var a=i[o],c=Dt.length(a);if(n>=t-(c==2?1:0))if(n+c<=s)r+=a;else break;n+=c;}return r};});var Ho=Ze((lh,Vo)=>{Vo.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 lu=Ze(ys=>{Object.defineProperty(ys,"__esModule",{value:!0});var In=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]},gt=(e,t,s)=>t>e?t:e>s?s:e,gc=(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)},iu={open:"",close:""},T=(e=>{let t=D=>!!o.find(C=>D.test(C)),s=e||(typeof process<"u"?process:{}),{stdout:r,platform:n}=s,i=s.env||{},o=s.argv||[],a="FORCE_COLOR"in i,c=i.FORCE_COLOR,h=c==="true"||parseInt(c)>0,p="NO_COLOR"in i||a&&!h||t(/^-{1,2}(no-color|color=false|color=never)$/),l=a&&h||t(/^-{1,2}(color|color=true|color=always)$/),m=r&&"isTTY"in r&&/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM);return !p&&(l||m||n==="win32"||"CI"in i)})()?(e,t)=>({open:`\x1B[${e}m`,close:`\x1B[${t}m`}):()=>iu,Ln=(e,t,s)=>T(`38;2;${e};${t};${s}`,39),su=(e,t,s)=>T(`48;2;${e};${t};${s}`,49),yc={visible:iu,reset:T(0,0),inverse:T(7,27),hidden:T(8,28),bold:T(1,22),dim:T(2,22),faint:T(2,22),italic:T(3,23),underline:T(4,24),doubleUnderline:T(21,24),strikethrough:T(9,29),strike:T(9,29),frame:T(51,54),encircle:T(52,54),overline:T(53,55),black:T(30,39),red:T(31,39),green:T(32,39),yellow:T(33,39),blue:T(34,39),magenta:T(35,39),cyan:T(36,39),white:T(37,39),grey:T(90,39),gray:T(90,39),blackBright:T(90,39),redBright:T(91,39),greenBright:T(92,39),yellowBright:T(93,39),blueBright:T(94,39),magentaBright:T(95,39),cyanBright:T(96,39),whiteBright:T(97,39),bgBlack:T(40,49),bgRed:T(41,49),bgGreen:T(42,49),bgYellow:T(43,49),bgBlue:T(44,49),bgMagenta:T(45,49),bgCyan:T(46,49),bgWhite:T(47,49),bgBlackBright:T(100,49),bgRedBright:T(101,49),bgGreenBright:T(102,49),bgYellowBright:T(103,49),bgBlueBright:T(104,49),bgMagentaBright:T(105,49),bgCyanBright:T(106,49),bgWhiteBright:T(107,49)},{defineProperty:xc,defineProperties:wc,setPrototypeOf:ou}=Object,Fc=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,Cc=/(\r*\n)/g,uu=function(){let e=t=>t;return e.strip=t=>t.replace(Fc,""),e.extend=t=>{for(let s in t){let r=t[s],n=r.open!=null?r:Ln(...In(r));it[s]={get(){let i=au(this,n);return xc(this,s,{value:i}),i}};}Mn=wc(()=>{},it),ou(e,Mn);},e.extend(yc),e},au=({props:e},{open:t,close:s})=>{let r=(o,...a)=>Ec(o,a,r.props),n=t,i=s;return e!==void 0&&(n=e.openStack+t,i=s+e.closeStack),ou(r,Mn),r.props={open:t,close:s,openStack:n,closeStack:i,parent:e},r.open=n,r.close=i,r},Ec=(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=gc(i,s.close,s.open),s=s.parent;return ~i.indexOf(`
63
+ `)&&(i=i.replace(Cc,n+"$1"+r)),r+i+n},nu={ansi:e=>(t=>T(`38;5;${t}`,39))(gt(e,0,255)),bgAnsi:e=>(t=>T(`48;5;${t}`,49))(gt(e,0,255)),hex:e=>Ln(...In(e)),bgHex:e=>su(...In(e)),rgb:(e,t,s)=>Ln(gt(e,0,255),gt(t,0,255),gt(s,0,255)),bgRgb:(e,t,s)=>su(gt(e,0,255),gt(t,0,255),gt(s,0,255))},it={},Mn;for(let e in nu)it[e]={get(){return (...t)=>au(this,nu[e](...t))}};it.ansi256=it.fg=it.ansi,it.bgAnsi256=it.bg=it.bgAnsi;var bc=new uu;ys.Ansis=uu,ys.default=bc;});var pu=Ze((wh,qn)=>{var cu=lu();qn.exports=cu.default;qn.exports.Ansis=cu.Ansis;});var gu=Ze((Nh,ni)=>{var hu=(e,t)=>{for(let s of Reflect.ownKeys(t))Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s));return e};ni.exports=hu;ni.exports.default=hu;});var xu=Ze((Ih,bs)=>{var Jc=gu(),Es=new WeakMap,yu=(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(Es.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 Jc(i,e),Es.set(i,r),i};bs.exports=yu;bs.exports.default=yu;bs.exports.callCount=e=>{if(!Es.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Es.get(e)};});var wu=Ze((Lh,Ss)=>{Ss.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Ss.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ss.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");});var Su=Ze((Mh,Zt)=>{var ne=global.process,Nt=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"};Nt(ne)?(Fu=rn("assert"),Kt=wu(),Cu=/^win/i.test(ne.platform),Nr=rn("events"),typeof Nr!="function"&&(Nr=Nr.EventEmitter),ne.__signal_exit_emitter__?he=ne.__signal_exit_emitter__:(he=ne.__signal_exit_emitter__=new Nr,he.count=0,he.emitted={}),he.infinite||(he.setMaxListeners(1/0),he.infinite=!0),Zt.exports=function(e,t){if(!Nt(global.process))return function(){};Fu.equal(typeof e,"function","a callback must be provided for exit handler"),Xt===!1&&ii();var s="exit";t&&t.alwaysLast&&(s="afterexit");var r=function(){he.removeListener(s,e),he.listeners("exit").length===0&&he.listeners("afterexit").length===0&&$s();};return he.on(s,e),r},$s=function(){!Xt||!Nt(global.process)||(Xt=!1,Kt.forEach(function(t){try{ne.removeListener(t,vs[t]);}catch{}}),ne.emit=Bs,ne.reallyExit=oi,he.count-=1);},Zt.exports.unload=$s,It=function(t,s,r){he.emitted[t]||(he.emitted[t]=!0,he.emit(t,s,r));},vs={},Kt.forEach(function(e){vs[e]=function(){if(Nt(global.process)){var s=ne.listeners(e);s.length===he.count&&($s(),It("exit",null,e),It("afterexit",null,e),Cu&&e==="SIGHUP"&&(e="SIGINT"),ne.kill(ne.pid,e));}};}),Zt.exports.signals=function(){return Kt},Xt=!1,ii=function(){Xt||!Nt(global.process)||(Xt=!0,he.count+=1,Kt=Kt.filter(function(t){try{return ne.on(t,vs[t]),!0}catch{return !1}}),ne.emit=bu,ne.reallyExit=Eu);},Zt.exports.load=ii,oi=ne.reallyExit,Eu=function(t){Nt(global.process)&&(ne.exitCode=t||0,It("exit",ne.exitCode,null),It("afterexit",ne.exitCode,null),oi.call(ne,ne.exitCode));},Bs=ne.emit,bu=function(t,s){if(t==="exit"&&Nt(global.process)){s!==void 0&&(ne.exitCode=s);var r=Bs.apply(this,arguments);return It("exit",ne.exitCode,null),It("afterexit",ne.exitCode,null),r}else return Bs.apply(this,arguments)}):Zt.exports=function(){return function(){}};var Fu,Kt,Cu,Nr,he,$s,It,vs,Xt,ii,oi,Eu,Bs,bu;});function ae(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:Ue}=Array;function Ut(e){return Ue(e)?e.length>0:ae(e)==="Object"?Object.keys(e).length>0:!!e}function Me(...e){let t=0;for(;t<e.length;){let s=e[t];if(ae(s)==="Function"){if(Ut(s()))return !1}else if(Ut(s))return !1;t++;}return !0}function sn(e){return Ue(e)?e.length===0:ae(e)==="Object"?Object.keys(e).length===0:!e}function Yi(...e){let t=0;for(;t<e.length;){let s=e[t];if(ae(s)==="Function"){if(sn(s()))return !1}else if(sn(s))return !1;t++;}return !0}function ge(...e){let t=0;for(;t<e.length;){let s=e[t];if(ae(s)==="Function"){if(Ut(s()))return !0}else if(Ut(s))return !0;t++;}return !1}function Vr(e,t="."){return typeof e=="string"?e.split(t):e}function Ll(e,t){let s=t,r=0,n=Vr(e);for(;r<n.length;){if(s==null||s[n[r]]===null)return;s=s[n[r]],r++;}return s}function nn(e,t){if(arguments.length===1)return s=>nn(e,s);if(t!=null)return Ll(e,t)}function yr(e,t){if(!Ue(t))throw new Error(`Cannot read property 'indexOf' of ${t}`);let s=ae(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;)Hr(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 Ml(e,t){if(e.size!==t.size)return !1;let s=Qi(e.values()),r=Qi(t.values());return s.filter(i=>yr(i,r)===-1).length===0}function Ki(e){let t=e.__proto__.toString();return ["Error","TypeError"].includes(t)?[t,e.message]:[]}function Xi(e){return e.toDateString?[!0,e.getTime()]:[!1]}function Zi(e){return e.constructor!==RegExp?[!1]:[!0,e.toString()]}function Hr(e,t){if(arguments.length===1)return h=>Hr(e,h);let s=ae(e);if(s!==ae(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 l=!0;return h.forEach((m,D)=>{l&&m!==p[D]&&!Hr(m,p[D])&&(l=!1);}),l}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=Xi(e),o=Xi(t);if(i[0])return o[0]?i[1]===o[1]:!1;if(o[0])return !1;let a=Ki(e),c=Ki(t);if(a[0])return c[0]?a[0]===c[0]&&a[1]===c[1]:!1;if(s==="Set")return Ml(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(l=>{if(p){let m=e[l],D=t[l];m!==D&&!Hr(m,D)&&(p=!1);}}),p}return !1}var ql="RAMBDAX_DELAY";function on(e){return new Promise(t=>{setTimeout(()=>{t(ql);},e);})}function un(e,t){if(arguments.length===1)return s=>un(e,s);if(typeof t=="string")return t.includes(e);if(!t)throw new TypeError(`Cannot read property 'indexOf' of ${t}`);return Ue(t)?yr(e,t)>-1:!1}async function eo(e,t){if(Ue(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 et(e,t){return arguments.length===1?async s=>eo(e,s):new Promise((s,r)=>{eo(e,t).then(s).catch(r);})}function me(e,t){return arguments.length===1?s=>me(e,s):ae(t)===e}async function to(e,t){let s=t.map((r,n)=>e(r,n));return Promise.all(s)}function ro(e,t){return arguments.length===1?async s=>to(e,s):new Promise((s,r)=>{to(e,t).then(s).catch(r);})}function an(e,t){if(arguments.length===1)return n=>an(e,n);if(t==null)return;let s=Vr(e,","),r={};for(let n in t)s.includes(n)||(r[n]=t[n]);return r}var Jr=class{constructor(){this.set=new Set,this.items={};}checkUniqueness(t){let s=ae(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?yr(t,this.items[s])===-1?(this.items[s].push(t),!0):!1:(this.items[s]=[t],!0)}};function Yr(e){let t=new Jr,s=[];return e.forEach(r=>{t.checkUniqueness(r)&&s.push(r);}),s}function d(e,t){return arguments.length===1?s=>d(e,s):t?t.hasOwnProperty(e):!1}function Ve(e,t){return arguments.length===1?s=>Ve(e,s):nn(e,t)!==void 0}function J(e){let t=ae(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 j(e){return e==null}function Qr(e,t){return arguments.length===1?s=>Qr(e,s):t.join(e)}function so(e){return typeof e=="string"?e[e.length-1]||"":e[e.length-1]}var {error:te,log:B,warn:no}=console,A="",ye=" ",w=`
64
+ `,He=e=>ye.repeat(e),P=e=>w.repeat(e);Qr(w);var Te=Qr(A),Je=Object.create,U=Object.assign,Vt=Object.defineProperty,Re=Object.keys,Kr=Object.values,at=Array.from;Buffer.from;var S=Array.isArray,_e=Buffer.isBuffer,X=me("Undefined"),I=me("Object"),oe=me("Boolean"),Bt=me("RegExp"),Xr=me("Number"),L=me("String"),Se=me("Function");me("Async");var f={};gr(f,{build:()=>lp,changed:()=>gp,clear:()=>ot,configChanges:()=>Op,console:()=>ap,deleted:()=>Bp,err:()=>cp,exported:()=>Ep,external:()=>fp,failed:()=>Pp,hline:()=>Xn,hook:()=>mp,hot:()=>yp,ignored:()=>_p,importer:()=>bp,invalid:()=>kp,minified:()=>Ap,newGroup:()=>Dp,nwl:()=>Ae,out:()=>B,process:()=>qu,progress:()=>Lu,prompt:()=>Fp,reloaded:()=>Tp,resource:()=>xp,retrying:()=>vp,skipped:()=>Rp,spawn:()=>Np,spinner:()=>pi,start:()=>Iu,syncing:()=>Cp,throws:()=>jp,transform:()=>Sp,unhook:()=>dp,update:()=>Lt,updated:()=>hp,upload:()=>wp,warn:()=>$p,write:()=>pp});var Gl=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(s=>e[s]=t[s]),e)),ln=(e,t,s)=>{let r=typeof s;if(s&&r==="object")if(Array.isArray(s))for(let n of s)t=ln(e,t,n);else for(let n of Object.keys(s)){let i=s[n];typeof i=="function"?t[n]=i(t[n],Zr):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:Zr(t[n],i):t[n]=ln(!1,{},i);}else r==="function"&&(t=s(t,Zr));return t},Zr=(e,...t)=>{let s=Array.isArray(e);return ln(s,s?e.slice():Gl({},e),t)},de=Zr;var io=()=>({json:{assets:!0,config:!0,locales:!0,metafields:!0,metaobject:!0,groups:!0,templates:!0,exclude:[]},script:{minifySyntax:!0,minifyIdentifiers:!0,minifyWhitespace:!0,mangleProps:void 0,legalComments:"none",mangleQuoted:!1,keepNames:!1,exclude:[]},liquid:{minifyJavascript:!1,minifyStylesheet:!1,minifyStyle:!0,minifySchema:!0,removeComments:!0,collapseInner:!1,collapseWhitespace:!0,stripDashes:!0,exclude:[]},style:{exclude:[],format:!1,inline:!1,purgeUnusedCSS:!1,obfuscateAlphabet:"abcefghijklmnopqrstuvwxyz0123456789",obfuscateClassNames:!1,obfuscateWhitelist:[]},markup:{caseSensitive:!1,collapseBooleanAttributes:!1,collapseInlineTagWhitespace:!1,conservativeCollapse:!1,keepClosingSlash:!1,noNewlinesBeforeTagClose:!1,preventAttributesEscaping:!1,removeEmptyAttributes:!1,removeEmptyElements:!1,removeOptionalTags:!1,removeRedundantAttributes:!1,removeScriptTypeAttributes:!0,removeStyleLinkTypeAttributes:!0,useShortDoctype:!1,collapseWhitespace:!0,continueOnParseError:!0,removeComments:!0,minifyCSS:!0,minifyJS:!0,trimCustomFragments:!1,ignoreCustomFragments:[/(?<=\bstyle\b=["']\s?)[\s\S]*?(?="[\s\n>]?)/,/<style[\s\S]*?<\/style>/,/<script[\s\S]*?<\/script>/,/{%[\s\S]*?%}/]}});var oo=()=>({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",metaobject:"templates/customers/*.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:"",safeSync:!0,importLanguage:"html",suffixDir:!1,global:[]}},transforms:{svg:null,style:null,script:null},terser:{json:!1,markup:!1,liquid:!1,script:!1}});var uo=()=>({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"]}}});var ao=()=>({onBuild:[],onChange:[],onReload:[],onTransform:[],onWatch:[]});function ts(e,t,s){return child_process.execFileSync(e,t,{encoding:"utf8",shell:s,stdio:["ignore","pipe","ignore"]}).trim()}function lo(e,t){let s=pathe.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 ts(pathe.join(s,e),[],t).split(/\r?\n/)}function lt(e,t){return {cols:Number.parseInt(e,10),rows:Number.parseInt(t,10)}}function rs(){let{env:e,stdout:t,stderr:s}=es__default.default;if(t&&t.columns&&t.rows)return lt(t.columns,t.rows);if(s&&s.columns&&s.rows)return lt(s.columns,s.rows);if(e.COLUMNS&&e.LINES)return lt(e.COLUMNS,e.LINES);if(es__default.default.platform==="win32")try{let r=lo("vendor/windows/term-size.exe",!1);if(r.length===2)return lt(r[0],r[1])}catch{}else {if(es__default.default.platform==="darwin")try{let r=lo("vendor/macos/term-size",!0);if(r.length===2)return lt(r[0],r[1])}catch{}try{let r=ts("resize",["-u"]).match(/\d+/g);if(r.length===2)return lt(r[0],r[1])}catch{}if(es__default.default.env.TERM)try{let r=ts("tput",["cols"]),n=ts("tput",["lines"]);if(r&&n)return lt(r,n)}catch{}}return lt(80,24)}var cn=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];var co=["caches","sourcemaps","sourcemaps/style","sourcemaps/script"],po=[["input","source"],["output","theme"],["export","export"],["import","import"],["config","."]],At=["assets","config","layout","customers","locales","sections","snippets","templates","metaobject","metafields","pages","redirects"],wr=["templates","templates/customers","templates/metaobject","assets","config","layout","locales","sections","snippets"];var pn=["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."],fn="__injected_dirname__",mn="__injected_filename__",dn="__injected_import_meta_url__",Fr=/([|,])/g,ss=/\.(mjs|cjs|ts|js|tsx|jsx)$/,mo=/(\()(line\s[0-9]+)(\))(:)/g,Do=/('[\w\s.-]*?'|"[\w\s.-]*?")/g,ho=/({{2}-?)([a-zA-Z0-9_\-.'"[\]]+)(-?}{2})/g,go=/((?:www|http:|https:)+[^\s]+[\w])/g,yo=/(?<=Filename\s)([\w._-]+)(?=\salready)/,xo=/(\/)(.*?)(\/)/g,Dn={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 De={current:null,count:0,process:{}};function Jl(){let e=Je(null);for(let t of At)e[t]=Je(null),e[t].input=null,e[t].match=null;return e.transforms=new Map,e}var u=new class Ce{static defaults=oo();static plugins=ao();static terser=io();static processor=uo();static package=Je(null);static cache=Je(null);static watch=new Set;process;restart=!1;cli=Je(null);wss=null;filters=Je(null);commands=Je(null);version=null;cwd=null;argv=es.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",strategy:"hydrate",scroll:"preserved",layouts:["theme.liquid"],label:"visible",snippet:null,output:null,alive:{},renderer:"{% render 'hot.js'"+["","server: 3000","socket: 8089",'strategy: "hydrate"','scroll: "preserved"','label: "visible"',"history: false",'method: "hot"'].join(", ")+" %}"};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};files=new Map;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,baseDir:new Set};snippet={prefixDir:!1,separator:"-",global:null,baseDir:new Set};paths=Jl();page={safeSync:!0,author:"",global:null,suffixDir:!1,importLanguage:"html",export:{quotes:"\u201C\u201D\u2018\u2019",html:!0,linkify:!1,typographer:!1,xhtmlOut:!1,breaks:!0,langPrefix:"language-"},import:{codeBlockStyle:"fenced",emDelimiter:"_",fence:"```",headingStyle:"atx",hr:"---",linkReferenceStyle:"full",linkStyle:"inlined",strongDelimiter:"**",bulletListMarker:"-"}};script=[];style=[];svg=[];image;terse={json:!1,liquid:!1,markup:!1,style:!1,script:!1};get watch(){return Ce.watch}set watch(t){Ce.watch=t;}get cache(){return Ce.cache}set cache(t){Ce.cache=t;}get terser(){return Ce.terser}set terser(t){Ce.terser=de(Ce.terser,t);}get processor(){return Ce.processor}set config(t){Ce.defaults=de(Ce.defaults,t);}get config(){return Ce.defaults}set pkg(t){Ce.package=t;}get pkg(){return Ce.package}get plugins(){return Ce.plugins}get terminal(){return rs()}};var gn=zt(Fo(),1);var Er=class extends Error{constructor(t){super(t),this.name="TimeoutError";}},yn=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},Co=e=>globalThis.DOMException===void 0?new yn(e):new DOMException(e),Eo=e=>{let t=e.reason===void 0?Co("This operation was aborted."):e.reason;return t instanceof Error?t:Co(t)};function xn(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:c}=r;c.aborted&&a(Eo(c)),c.addEventListener("abort",()=>{a(Eo(c));});}n=r.customTimers.setTimeout.call(void 0,()=>{if(typeof s=="function"){try{o(s());}catch(p){a(p);}return}let c=typeof s=="string"?s:`Promise timed out after ${t} milliseconds`,h=s instanceof Error?s:new Er(c);typeof e.cancel=="function"&&e.cancel(),a(h);},t),(async()=>{try{o(await e);}catch(c){a(c);}finally{r.customTimers.clearTimeout.call(void 0,n);}})();});return i.clear=()=>{clearTimeout(n),n=void 0;},i}function wn(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 Tt=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)},tt,Fn=class{constructor(){tt.set(this,[]);}enqueue(t,s){s={priority:0,...s};let r={priority:s.priority,run:t};if(this.size&&Tt(this,tt,"f")[this.size-1].priority>=s.priority){Tt(this,tt,"f").push(r);return}let n=wn(Tt(this,tt,"f"),r,(i,o)=>o.priority-i.priority);Tt(this,tt,"f").splice(n,0,r);}dequeue(){let t=Tt(this,tt,"f").shift();return t?.run}filter(t){return Tt(this,tt,"f").filter(s=>s.priority===t.priority).map(s=>s.run)}get size(){return Tt(this,tt,"f").length}};tt=new WeakMap;var bo=Fn;var ue=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},$=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)},pe,Sr,$r,pt,ps,vr,os,qe,br,ke,us,Pe,Br,ct,as,So,$o,Ao,vo,Bo,ls,Cn,En,fs,To,cs,ms=class extends Error{},bn=class extends gn.default{constructor(t){var s,r,n,i;if(super(),pe.add(this),Sr.set(this,void 0),$r.set(this,void 0),pt.set(this,0),ps.set(this,void 0),vr.set(this,void 0),os.set(this,0),qe.set(this,void 0),br.set(this,void 0),ke.set(this,void 0),us.set(this,void 0),Pe.set(this,0),Br.set(this,void 0),ct.set(this,void 0),as.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:bo,...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})`);ue(this,Sr,t.carryoverConcurrencyCount,"f"),ue(this,$r,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),ue(this,ps,t.intervalCap,"f"),ue(this,vr,t.interval,"f"),ue(this,ke,new t.queueClass,"f"),ue(this,us,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,ue(this,as,t.throwOnTimeout===!0,"f"),ue(this,ct,t.autoStart===!1,"f");}get concurrency(){return $(this,Br,"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})`);ue(this,Br,t,"f"),$(this,pe,"m",fs).call(this);}async add(t,s={}){return s={timeout:this.timeout,throwOnTimeout:$(this,as,"f"),...s},new Promise((r,n)=>{$(this,ke,"f").enqueue(async()=>{var i,o,a;ue(this,Pe,(o=$(this,Pe,"f"),o++,o),"f"),ue(this,pt,(a=$(this,pt,"f"),a++,a),"f");try{if(!((i=s.signal)===null||i===void 0)&&i.aborted)throw new ms("The task was aborted.");let c=t({signal:s.signal});s.timeout&&(c=xn(Promise.resolve(c),s.timeout)),s.signal&&(c=Promise.race([c,$(this,pe,"m",To).call(this,s.signal)]));let h=await c;r(h),this.emit("completed",h);}catch(c){if(c instanceof Er&&!s.throwOnTimeout){r();return}n(c),this.emit("error",c);}finally{$(this,pe,"m",Ao).call(this);}},s),this.emit("add"),$(this,pe,"m",ls).call(this);})}async addAll(t,s){return Promise.all(t.map(async r=>this.add(r,s)))}start(){return $(this,ct,"f")?(ue(this,ct,!1,"f"),$(this,pe,"m",fs).call(this),this):this}pause(){ue(this,ct,!0,"f");}clear(){ue(this,ke,new($(this,us,"f")),"f");}async onEmpty(){$(this,ke,"f").size!==0&&await $(this,pe,"m",cs).call(this,"empty");}async onSizeLessThan(t){$(this,ke,"f").size<t||await $(this,pe,"m",cs).call(this,"next",()=>$(this,ke,"f").size<t);}async onIdle(){$(this,Pe,"f")===0&&$(this,ke,"f").size===0||await $(this,pe,"m",cs).call(this,"idle");}get size(){return $(this,ke,"f").size}sizeBy(t){return $(this,ke,"f").filter(t).length}get pending(){return $(this,Pe,"f")}get isPaused(){return $(this,ct,"f")}};Sr=new WeakMap,$r=new WeakMap,pt=new WeakMap,ps=new WeakMap,vr=new WeakMap,os=new WeakMap,qe=new WeakMap,br=new WeakMap,ke=new WeakMap,us=new WeakMap,Pe=new WeakMap,Br=new WeakMap,ct=new WeakMap,as=new WeakMap,pe=new WeakSet,So=function(){return $(this,$r,"f")||$(this,pt,"f")<$(this,ps,"f")},$o=function(){return $(this,Pe,"f")<$(this,Br,"f")},Ao=function(){var t;ue(this,Pe,(t=$(this,Pe,"f"),t--,t),"f"),$(this,pe,"m",ls).call(this),this.emit("next");},vo=function(){$(this,pe,"m",En).call(this),$(this,pe,"m",Cn).call(this),ue(this,br,void 0,"f");},Bo=function(){let t=Date.now();if($(this,qe,"f")===void 0){let s=$(this,os,"f")-t;if(s<0)ue(this,pt,$(this,Sr,"f")?$(this,Pe,"f"):0,"f");else return $(this,br,"f")===void 0&&ue(this,br,setTimeout(()=>{$(this,pe,"m",vo).call(this);},s),"f"),!0}return !1},ls=function(){if($(this,ke,"f").size===0)return $(this,qe,"f")&&clearInterval($(this,qe,"f")),ue(this,qe,void 0,"f"),this.emit("empty"),$(this,Pe,"f")===0&&this.emit("idle"),!1;if(!$(this,ct,"f")){let t=!$(this,pe,"a",Bo);if($(this,pe,"a",So)&&$(this,pe,"a",$o)){let s=$(this,ke,"f").dequeue();return s?(this.emit("active"),s(),t&&$(this,pe,"m",Cn).call(this),!0):!1}}return !1},Cn=function(){$(this,$r,"f")||$(this,qe,"f")!==void 0||(ue(this,qe,setInterval(()=>{$(this,pe,"m",En).call(this);},$(this,vr,"f")),"f"),ue(this,os,Date.now()+$(this,vr,"f"),"f"));},En=function(){$(this,pt,"f")===0&&$(this,Pe,"f")===0&&$(this,qe,"f")&&(clearInterval($(this,qe,"f")),ue(this,qe,void 0,"f")),ue(this,pt,$(this,Sr,"f")?$(this,Pe,"f"):0,"f"),$(this,pe,"m",fs).call(this);},fs=function(){for(;$(this,pe,"m",ls).call(this););},To=async function(t){return new Promise((s,r)=>{t.addEventListener("abort",()=>{r(new ms("The task was aborted."));},{once:!0});})},cs=async function(t,s){return new Promise(r=>{let n=()=>{s&&!s()||(this.off(t,n),r());};this.on(t,n);})};var Ro=bn;var $e=Kl__default.default.create({responseType:"json",headers:{}}),G=new Ro({concurrency:5,interval:250,intervalCap:2});function ft(e){return e===429||e===500?!0:(G.isPaused||G.pause(),!1)}var Sn=Symbol("singleComment"),_o=Symbol("multiComment"),Xl=()=>"",Zl=(e,t,s)=>e.slice(t,s).replace(/\S/g," "),ec=(e,t)=>{let s=t-1,r=0;for(;e[s]==="\\";)s-=1,r+=1;return !!(r%2)};function ds(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?Zl:Xl,n=!1,i=!1,o=0,a="",c="",h=-1;for(let p=0;p<e.length;p++){let l=e[p],m=e[p+1];if(!i&&l==='"'&&(ec(e,p)||(n=!n)),!n)if(!i&&l+m==="//")a+=e.slice(o,p),o=p,i=Sn,p++;else if(i===Sn&&l+m===`\r
65
+ `){p++,i=!1,a+=r(e,o,p),o=p;continue}else if(i===Sn&&l===`
66
+ `)i=!1,a+=r(e,o,p),o=p;else if(!i&&l+m==="/*"){a+=e.slice(o,p),o=p,i=_o,p++;continue}else if(i===_o&&l+m==="*/"){p++,i=!1,a+=r(e,o,p+1),o=p+1;continue}else s&&!i&&(h!==-1?l==="}"||l==="]"?(a+=e.slice(o,p),c+=r(a,0,1)+a.slice(1),a="",o=p,h=-1):l!==" "&&l!==" "&&l!=="\r"&&l!==`
67
+ `&&(a+=e.slice(o,p),o=p,h=-1):l===","&&(c+=a+e.slice(o,p),a="",o=p,h=p));}return c+a+(i?r(e.slice(o)):e.slice(o))}var Ie=new events.EventEmitter;function ko(e){try{return JSON.parse(ds(e).trim())}catch(t){throw new Error(t)}}function Po(e){return /\[(?:file|dir|ext)\]/.test(e)}function Oo(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")}function st(e,t,s=!1){return t>1?`${e}s`:e}function mt(e){return _e(e)?e.toString():I(e)||S(e)?JSON.stringify(e):String(e)}async function jo(e,{format:t}){return t==="esm"?s=>import(s):vn(e)}function No(e){return e===".mjs"||e===".cjs"?"js":e.slice(1)}function Rt(e){return e.charAt(0).toUpperCase()+e.slice(1)}function nt(e){return rt(ve(e))}function ve(e){return L(e)?Buffer.from(e).toString().length:e.toString().length}function rt(e){if(e===0)return "0b";let t=parseInt(`${Math.floor(Math.log(e)/Math.log(1024))}`,10);return t===0?`${F(String(e))}${pn[t]}`:`${F((e/1024**t).toFixed(1))}${pn[t]}`}function Oe(e,t){let s=ve(e),r=rt(sc__default.default.gzipSync(e).length),n=rt(t),i=rt(s),o=rt(t-s);return {isSmaller:s>t||s===t,gzip:r,before:n,after:i,saved:o}}function Ar(){let e=new Date,t=e.getHours(),s=e.getMinutes(),r=e.getSeconds(),n=g(":");return (t<10?`0${t}`:t)+n+(s<10?`0${s}`:s)+n+(r<10?`0${r}`:r)}function $n(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 vn(e){return Se(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 Ye(){return Math.random().toString(36).slice(2)}function Bn(){return new Promise(e=>{typeof setImmediate=="function"?setImmediate(e):setTimeout(e);})}var An=new Map,Lo=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];function Mo(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 Lo)An.set(n,console[n]),console[n]=r[n];return ()=>{for(let n of Lo)console[n]=An.get(n);An.clear();}}var Ds=[],hs={},dt=e=>Y(e||!0),W=e=>{e?hs[e]=perf_hooks.performance.now():Ds.push(perf_hooks.performance.now());};function Y(e=!1,t=!1){let s;typeof e=="boolean"?s=e?Ds[Ds.length-1]:Ds.pop():e&&(t?(s=hs[e],delete hs[e]):s=hs[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 q={};gr(q,{errors:()=>Yt,esbuild:()=>Vc,postcss:()=>Hc,request:()=>Wc,sass:()=>Uc,spawn:()=>ri,write:()=>zc});function Rn(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var oc=()=>ic__default.default.homedir().replace(/\\/g,"/"),qo=oc;var Go=/\s+at.*[(\s](.*)\)?/,Wo=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function _n(e,{pretty:t=!1,basePath:s,pathFilter:r}={}){let n=s&&new RegExp(`(file://)?${Rn(s.replace(/\\/g,"/"))}/?`,"g"),i=t?qo():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
68
+ `).filter(o=>{let a=o.match(Go);if(a===null||!a[1])return !0;let c=a[1];return c.includes(".app/Contents/Resources/electron.asar")||c.includes(".app/Contents/Resources/default_app.asar")||c.includes("node_modules/electron/dist/resources/electron.asar")||c.includes("node_modules/electron/dist/resources/default_app.asar")?!1:r?!Wo.test(c)&&r(c):!Wo.test(c)}).filter(o=>o.trim()!=="").map(o=>(n&&(o=o.replace(n,"")),t&&(o=o.replace(Go,(a,c)=>a.replace(c,c.replace(i,"~")))),o)).join(`
69
+ `)}function kn({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 uc=kn();function _t(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(uc,"")}var Jo=zt(Uo(),1),Yo=zt(Ho(),1);function kt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=_t(e),e.length===0))return 0;e=e.replace((0, Yo.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(Jo.default.eastAsianWidth(n)){case"F":case"W":r+=2;break;case"A":r+=s;break;default:r+=1;}}return r}var Qo=(e=0)=>t=>`\x1B[${t+e}m`,Ko=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Xo=(e=0)=>(t,s,r)=>`\x1B[${38+e};2;${t};${s};${r}m`,re={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(re.modifier);var ac=Object.keys(re.color),lc=Object.keys(re.bgColor);[...ac,...lc];function cc(){let e=new Map;for(let[t,s]of Object.entries(re)){for(let[r,n]of Object.entries(s))re[r]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[r]=re[r],e.set(n[0],n[1]);Object.defineProperty(re,t,{value:s,enumerable:!1});}return Object.defineProperty(re,"codes",{value:e,enumerable:!1}),re.color.close="\x1B[39m",re.bgColor.close="\x1B[49m",re.color.ansi=Qo(),re.color.ansi256=Ko(),re.color.ansi16m=Xo(),re.bgColor.ansi=Qo(10),re.bgColor.ansi256=Ko(10),re.bgColor.ansi16m=Xo(10),Object.defineProperties(re,{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=>re.rgbToAnsi256(...re.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)=>re.ansi256ToAnsi(re.rgbToAnsi256(t,s,r)),enumerable:!1},hexToAnsi:{value:t=>re.ansi256ToAnsi(re.hexToAnsi256(t)),enumerable:!1}}),re}var pc=cc(),Tr=pc;var gs=new Set(["\x1B","\x9B"]),fc=39,jn="\x07",tu="[",mc="]",ru="m",Nn=`${mc}8;;`,Zo=e=>`${gs.values().next().value}${tu}${e}${ru}`,eu=e=>`${gs.values().next().value}${Nn}${e}${jn}`,dc=e=>e.split(" ").map(t=>kt(t)),On=(e,t,s)=>{let r=[...t],n=!1,i=!1,o=kt(_t(e[e.length-1]));for(let[a,c]of r.entries()){let h=kt(c);if(o+h<=s?e[e.length-1]+=c:(e.push(c),o=0),gs.has(c)&&(n=!0,i=r.slice(a+1).join("").startsWith(Nn)),n){i?c===jn&&(n=!1,i=!1):c===ru&&(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());},Dc=e=>{let t=e.split(" "),s=t.length;for(;s>0&&!(kt(t[s-1])>0);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},hc=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return "";let r="",n,i,o=dc(e),a=[""];for(let[h,p]of e.split(" ").entries()){s.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let l=kt(a[a.length-1]);if(h!==0&&(l>=t&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),l=0),(l>0||s.trim===!1)&&(a[a.length-1]+=" ",l++)),s.hard&&o[h]>t){let m=t-l,D=1+Math.floor((o[h]-m-1)/t);Math.floor((o[h]-1)/t)<D&&a.push(""),On(a,p,t);continue}if(l+o[h]>t&&l>0&&o[h]>0){if(s.wordWrap===!1&&l<t){On(a,p,t);continue}a.push("");}if(l+o[h]>t&&s.wordWrap===!1){On(a,p,t);continue}a[a.length-1]+=p;}s.trim!==!1&&(a=a.map(h=>Dc(h)));let c=[...a.join(`
70
+ `)];for(let[h,p]of c.entries()){if(r+=p,gs.has(p)){let{groups:m}=new RegExp(`(?:\\${tu}(?<code>\\d+)m|\\${Nn}(?<uri>.*)${jn})`).exec(c.slice(h).join(""))||{groups:{}};if(m.code!==void 0){let D=Number.parseFloat(m.code);n=D===fc?void 0:D;}else m.uri!==void 0&&(i=m.uri.length===0?void 0:m.uri);}let l=Tr.codes.get(Number(n));c[h+1]===`
71
+ `?(i&&(r+=eu("")),n&&l&&(r+=Zo(l))):p===`
72
+ `&&(n&&l&&(r+=Zo(n)),i&&(r+=eu(i)));}return r};function ht(e,t,s){return String(e).normalize().replace(/\r\n/g,`
65
73
  `).split(`
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
- `):s)}
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
- `):n)}
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
- $ ${E.bold("pnpm add "+e+" -D")}
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),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
- `+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&&(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
-
118
- ${F("Watching"+R)}
119
-
120
- ${d("Targeting 1 store and 1 theme")}:
121
- $ sync your-store${d("=")}theme-1 --watch
122
-
123
- ${d("Targeting 1 store and 2 themes with hot reloading")}:
124
- $ sync your-store${d("=")}theme-1,theme-2 --watch --hot
125
-
126
- ${d("Targeting 2 stores and 1 theme")}:
127
- $ sync --your-store${d("=")}theme-1 --another-store${d("=")}some-theme --watch
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
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
134
-
135
- ${d("Targeting 1 store with 2 themes in production mode")}:
136
- $ sync your-store${d("=")}theme-1,theme-2 --prod --watch
137
-
138
- `;var Ba=`
139
- ${d("-----------------------------------------------------------------------------")}
140
- ${F("Syncify")} <!version!> ${d("by Panoply")}
141
- ${d("-----------------------------------------------------------------------------")}
74
+ `).map(r=>hc(r,t,s)).join(`
75
+ `)}var R={};gr(R,{clear:()=>ot,closer:()=>Ot,context:()=>Ge,hline:()=>Xn,indent:()=>Ct,message:()=>ei,multiline:()=>ti,opener:()=>Pt,sample:()=>jt,shopify:()=>Fs,stack:()=>du,suffix:()=>V,tree:()=>Zn});var y={};gr(y,{ARL:()=>xs,ARR:()=>be,BAD:()=>Lc,CHK:()=>Ic,CHV:()=>Jn,COL:()=>N,DSH:()=>Jt,LCB:()=>Qn,LPR:()=>Mc,RCB:()=>Kn,RPR:()=>qc,TLD:()=>Yn,blue:()=>v,blueBright:()=>Gn,bold:()=>F,bottom:()=>Un,clear:()=>Sc,close:()=>Vn,cyan:()=>M,cyanBright:()=>vc,dash:()=>Wn,dim:()=>kc,error:()=>Gc,gray:()=>g,green:()=>Bc,greenBright:()=>Ac,hr:()=>Or,hrs:()=>Hn,italic:()=>Rc,lavender:()=>Oc,lightGray:()=>Ke,line:()=>x,magenta:()=>Ht,magentaBright:()=>Tc,neonCyan:()=>Xe,neonGreen:()=>fu,neonMagenta:()=>Nc,neonRouge:()=>jc,newline:()=>wt,open:()=>Pr,orange:()=>Pc,pink:()=>kr,purge:()=>$c,red:()=>O,redBright:()=>se,reset:()=>_r,strike:()=>_c,time:()=>Ft,top:()=>zn,underline:()=>Rr,warning:()=>ws,white:()=>b,whiteBright:()=>xt,yellow:()=>yt,yellowBright:()=>le});var Qe=zt(pu());var Sc="\x1B[H\x1B[2J",$c="\x1B[2J\x1B[3J\x1B[H\x1Bc",{cyan:M,cyanBright:vc,red:O,redBright:se,green:Bc,greenBright:Ac,yellow:yt,yellowBright:le,magenta:Ht,magentaBright:Tc,blue:v,blueBright:Gn,white:b,whiteBright:xt,gray:g,underline:Rr,bold:F,reset:_r,italic:Rc,strike:_c,dim:kc}=Qe.default,Ke=Qe.default.hex("#2a2a2e"),kr=Qe.default.hex("#ff75d1"),Pc=Qe.default.hex("#FFAB40"),Oc=Qe.default.hex("#8080FF"),fu=Qe.default.hex("#56ef83"),Xe=Qe.default.hex("#69d5fd"),jc=Qe.default.hex("#FF8095"),Nc=Qe.default.hex("#B319FF"),Pr=Ke("\u250C\u2500 "),x={gray:Ke("\u2502 "),red:O.dim("\u2502 "),yellow:yt.dim("\u2502 ")},wt=Ke(`${w}\u2502${w}`),Wn=Ke("\u2502 \u251C\u2500 "),zn=Ke("\u251C\u2500 "),Un=Ke("\u2502 \u2514\u2500 "),Vn=Ke("\u2514\u2500 "),Hn=e=>Ke(`${"\u2500".repeat(e)}`),Or=e=>Ke(`\u2502${w}\u251C${"\u2500".repeat(rs().cols-e)}${w}\u2502`),Ic=fu("\u2713 "),Lc=se("\u{10102}"),N=g(":"),be=g("\u2192"),Jn=g("\u2023"),xs=g("\u2942"),Yn=g("~"),Jt=g("\u2014"),Mc=g("("),qc=g(")"),Qn=g("{"),Kn=g("}"),ws=le(` ~ Type ${F("w")} and press ${F("enter")} to view`),Gc=se(` ~ Type ${F("v")} and press ${F("enter")} to view`),Ft=e=>e?_r.gray(` ~ ${e}`):A;var du=A;function ot(){let e=process.stdout.rows-2,t=e>0?P(e):A;B(t),mu__default.default.cursorTo(process.stdout,0,0),mu__default.default.clearScreenDown(process.stdout);}function Xn(e=15){B(Or(e));}function V(e,t,s){let r=u.mode.build?Wn:t==="invalid"||t==="failed"?x.red:t==="warning"?x.yellow:x.gray,n=10-t.length;return n<0&&(n=0),r+y[e](t)+He(n)+be+ye+y[e](s)}function Pt(e){return w+Pr+g(`${e} ~ ${Ar()}`)}function Zn(e,t){return e==="top"?zn+t:Un+t}function Ot(e){return x.gray+w+Vn+g(`${e} ~ ${Ar()}`)}function ei(e,t){return x.gray+y[e](t)}function Fs(e){if(S(e))return Te(e.map(Fs));let t=e;return t=t.replace(mo,g("$1")+b("$2")+g("$3")+b("$4")+P(2)),t=t.replace(Do,yt.bold("$1")),t=t.replace(ho,M("$1")+xt("$2")+M("$3")),t=t.replace(go,Rr("$1")),t=t.replace(xo,Ht("$1")+M("$2")+Ht("$3")),t=t.replace(yo,Xe.bold("$1")),Ct(se(ht(t,u.terminal.wrap)),{line:x.red})}function jt(e,t={}){let s=d("line",t)?t.line:x.gray;if(Ve("span.start",t)){let r=d("end",t.span)?t.span.end:t.span.start+1;return s+w+Te([`${s}${v(`${t.span.start-1}`)}${N+w}${s}${v(`${t.span.start}`)}${N} ${e+w}${s}${v(`${r}`)}${N+w}`])}return s+w+s+e}function Ct(e,t={}){let s=S(e)?e:e.split(w).filter(Boolean),r=d("line",t)?t.line:x.gray,n=d("nwl",t)?`${r+w}`:A;for(;s.length!==0;){let i=s.shift();i.trim().length>0?i.trim().startsWith(r)?n+=(d("text",t)?t.text(i):i)+w:n+=r+(d("text",t)?t.text(i.trimStart()):i.trimStart())+w:n+=r+w;}return n}function Ge(e){let t=0,s=x.red+w;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+=Te([x.red,b(r),N+ye,He(t-r.length),g(`${e.entries[r]}`)+w]));return e.stack&&(du=e.stack,s+=Te([x.red,b("stack"),N+ye,He(t-5),g(`Type ${F("s")} and press ${F("enter")} to view stack trace`),w+x.gray])),s.trimEnd()}function ti(e,t){let s=x.gray,r=b;e==="error"?(s=x.red,r=O):e==="warning"&&(s=x.yellow,r=le);let n=[],i=t.trim(),o=ht(i,u.terminal.wrap).split(w);for(;o.length!==0;){let a=o.shift();a.trim().length>0&&n.push(s+r(a));}return s+w+n.join(w)+w}var Yt={};function ri(e){let t=[],s=[x.red],r=e.search(/(?:\n {4}at .*)/),n=[];if(/\berror\b:?/i.test(e)&&r>0){n=e.slice(0,r).split(w);let i=_n(e.slice(r),{pretty:!0,basePath:u.cwd}),o=ht(i,u.terminal.wrap).split(w);for(s.push(w);o.length!==0;){let a=o.shift();a.trim().length>0&&s.push(_r(x.red+a));}}for(n.length===0&&(n=e.split(w));n.length!==0;){let i=n.shift();i.trim().length>0&&t.push(_r(x.gray)+i);}te(`${t.join(w)}${s.length>1?s.join(w):A}`);}function Wc(e,t,s=!0){let r=Ve("error.asset",t.data)?t.data.error.asset:Ve("errors.asset",t.data)?t.data.errors.asset:null;if(t.status===422){let n=Te([x.red,w,Fs(r),Ge({stack:!1,entries:{status:t.status,message:t.statusText,source:Rr(`${e}`)}})]);return s?te(n):n}else if(t.status in Dn){let n=Te([x.red,w,ti("error",Dn[t.status])+Ge({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?te(n):n}else {let n=Te([x.red,w,O("Unknown error has occured")+Ge({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?te(n):n}}var zc=(e,t)=>s=>{te(Ct(s.message,{nwl:!0,line:x.red,text:O.bold})+Ge({stack:s.stack,entries:{...t,code:s.code,name:s.name,details:e}}));};function Uc(e,t){te(Ct(t.message,{nwl:!0,line:x.red,text:O})+Ge({stack:t.sassStack,entries:{input:e.relative,message:t.sassMessage}}));}function Vc(e){te(Ct(e.text,{nwl:!0,line:x.red,text:O})+jt(e.location.lineText,{line:x.red,span:{start:e.location.line,end:e.location.line+1}})+Ge({stack:!1,entries:{file:e.location.file,line:e.location.line,column:e.location.column,plugin:e.pluginName}}));}function Hc(e){}var Q="\x1B[",jr="\x1B]",Qt="\x07",Cs=";",Du=process.env.TERM_PROGRAM==="Apple_Terminal",z={};z.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?Q+(e+1)+"G":Q+(t+1)+";"+(e+1)+"H"};z.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let s="";return e<0?s+=Q+-e+"D":e>0&&(s+=Q+e+"C"),t<0?s+=Q+-t+"A":t>0&&(s+=Q+t+"B"),s};z.cursorUp=(e=1)=>Q+e+"A";z.cursorDown=(e=1)=>Q+e+"B";z.cursorForward=(e=1)=>Q+e+"C";z.cursorBackward=(e=1)=>Q+e+"D";z.cursorLeft=Q+"G";z.cursorSavePosition=Du?"\x1B7":Q+"s";z.cursorRestorePosition=Du?"\x1B8":Q+"u";z.cursorGetPosition=Q+"6n";z.cursorNextLine=Q+"E";z.cursorPrevLine=Q+"F";z.cursorHide=Q+"?25l";z.cursorShow=Q+"?25h";z.eraseLines=e=>{let t="";for(let s=0;s<e;s++)t+=z.eraseLine+(s<e-1?z.cursorUp():"");return e&&(t+=z.cursorLeft),t};z.eraseEndLine=Q+"K";z.eraseStartLine=Q+"1K";z.eraseLine=Q+"2K";z.eraseDown=Q+"J";z.eraseUp=Q+"1J";z.eraseScreen=Q+"2J";z.scrollUp=Q+"S";z.scrollDown=Q+"T";z.clearScreen="\x1Bc";z.clearTerminal=process.platform==="win32"?`${z.eraseScreen}${Q}0f`:`${z.eraseScreen}${Q}3J${Q}H`;z.beep=Qt;z.link=(e,t)=>[jr,"8",Cs,Cs,t,Qt,e,jr,"8",Cs,Cs,Qt].join("");z.image=(e,t={})=>{let s=`${jr}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")+Qt};z.iTerm={setCwd:(e=process.cwd())=>`${jr}50;CurrentDir=${e}${Qt}`,annotation:(e,t={})=>{let s=`${jr}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+Qt}};var si=z;var $u=zt(xu(),1),vu=zt(Su(),1);var Qc=(0, $u.default)(()=>{(0, vu.default)(()=>{es__default.default.stderr.write("\x1B[?25h");},{alwaysLast:!0});}),Bu=Qc;var As=!1,er={};er.show=(e=es__default.default.stderr)=>{e.isTTY&&(As=!1,e.write("\x1B[?25h"));};er.hide=(e=es__default.default.stderr)=>{e.isTTY&&(Bu(),As=!0,e.write("\x1B[?25l"));};er.toggle=(e,t)=>{e!==void 0&&(As=e),As?er.show(t):er.hide(t);};var ui=er;function ai(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 Kc=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,Ru=["\x1B","\x9B"],Ts=e=>`${Ru[0]}[${e}m`,Tu=(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=Tr.codes.get(Number.parseInt(n,10));if(o){let a=e.indexOf(o.toString());a===-1?r.push(Ts(t?o:i)):e.splice(a,1);}else if(t){r.push(Ts(0));break}else r.push(Ts(i));}if(t&&(r=r.filter((n,i)=>r.indexOf(n)===i),s!==void 0)){let n=Ts(Tr.codes.get(Number.parseInt(s,10)));r=r.reduce((i,o)=>o===n?[o,...i]:[...i,o],[]);}return r.join("")};function li(e,t,s){let r=[...e],n=[],i=typeof s=="number"?s:r.length,o=!1,a,c=0,h="";for(let[p,l]of r.entries()){let m=!1;if(Ru.includes(l)){let D=/\d[^m]*/.exec(e.slice(p,p+18));a=D&&D.length>0?D[0]:void 0,c<i&&(o=!0,a!==void 0&&n.push(a));}else o&&l==="m"&&(o=!1,m=!0);if(!o&&!m&&c++,!Kc.test(l)&&ai(l.codePointAt())&&(c++,typeof s!="number"&&i++),c>t&&c<=i)h+=l;else if(c===t&&!o&&a!==void 0)h=Tu(n);else if(c>=i){h+=Tu(n,!0,a);break}}return h}var Xc=24,Rs=e=>{let{columns:t}=e;return t||80},Zc=(e,t)=>{let s=e.rows||Xc,r=t.split(`
76
+ `),n=r.length-s;return n<=0?t:li(t,_t(r.slice(0,n).join(`
77
+ `)).length+1)};function ku(e,{showCursor:t=!1}={}){let s=0,r=Rs(e),n="",i=(...o)=>{t||ui.hide();let a=o.join(" ")+`
78
+ `;a=Zc(e,a);let c=Rs(e);a===n&&r===c||(n=a,r=c,a=ht(a,c,{trim:!1,hard:!0,wordWrap:!1}),e.write(si.eraseLines(s)+a),s=a.split(`
79
+ `).length);};return i.clear=()=>{e.write(si.eraseLines(s)),n="",r=Rs(e),s=0;},i.done=()=>{n="",r=Rs(e),s=0,t||ui.show();},i}var ep=ku(es__default.default.stdout),Lt=ep;ku(es__default.default.stderr);var Mt={};function Be(e){return d(e,Mt)||(Mt[e]=[]),(t,s)=>{X(s)?Mt[e].push(x.yellow+le(t)):Mt[e].push(x.yellow+le(t+N+ye+F(s)));}}function k({option:e,name:t,provided:s,expects:r}){te(P(2),O(`${F(`Invalid ${M(e)} type value provided`)}`)+P(2),O(`The ${M(t)} option has an incorrect type value`)+P(2),O(`provided${N} ${le(ae(s).toLowerCase())}`)+w,O(`expected${N} ${v(r.replace(/([|,])/g,g("$1")))}`)+P(2),O(`in${N} ${g.underline(u.file.base)}`)+P(2),b.bold("How to fix?")+w,`
80
+ ${g("You need to change the option value to use the")} ${v("expected")} ${g("type.")}
81
+ ${g(`Use the ${M("defineConfig")} named export for type checking`)}
82
+ `),process.exit(0);}function Et({message:e,expected:t,fix:s}){let r=es.argv.slice(2).join(" ");t=b("syncify "+r+" ")+v(t.replace(/([|,])/g,g("$1"))),te(P(2),O(`${F("Invalid or incomplete command passed")}`)+P(2),O(S(e)?e.join(`
83
+ `):e)+P(2),O(`provided${N} ${b("$")} ${b("syncify "+r)}`)+w,O(`expected${N} ${b("$")} ${t}`)+P(2),b.bold("How to fix?")+w,g(S(s)?s.join(w):s)),process.exit(0);}function Pu({type:e,message:t,provided:s,expected:r,fix:n}){Fr.test(s)&&(s=s.replace(Fr,g("$1"))),Fr.test(r)&&(r=r.replace(Fr,g("$1"))),S(t)&&(t=t.join(`
84
+ `)),te(P(2),O(F(`Invalid ${M(e)} target provided`))+P(2),O(t)+P(2),O(`provided${N} ${le(r)}`)+w,O(`expected${N} ${v(s)}`)+P(2),b.bold("How to fix?")+w,g(S(n)?n.join(w):n)),process.exit(0);}function Le(e){L(e)?te(P(2),O(`${F(`Missing ${M(e)} dependency`)}`)+P(2),O(`You need to install ${M(e)} to use it as a processor`)+P(2),b.bold("How to fix?")+w+w,`$ ${v.bold("pnpm add "+e+" -D")}`+P(2),g("If you are using a different package manager (i.e: Yarn or NPM) then"),g("please consider adopting pnpm. Pnpm is dope and does dope shit.")):te(P(2),O(`${F(`Missing ${M(`${e.length}`)} dependencies`)}`)+P(2),O("You are attempting to use processors which are not yet installed!")+P(2),xt(g("-")+ye+e.join(w+g(" -")+ye))+P(2),b.bold("How to fix?")+w,`
85
+ $ ${Gn("pnpm add "+e.join(ye)+" -D")}
86
+
87
+ ${g("If you are using a different package manager (i.e: Yarn or NPM) then")}
88
+ ${g("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
89
+ `),process.exit(0);}function Ou(e,t,s,r){e.indexOf(".")>-1&&(e=e.split(".").filter(Boolean).join(g(" \u2192 "))),te(P(2),O(`${F(`Missing ${Qn} ${M(e)} ${Kn} configuration option`)}`)+P(2),O(`The ${M(t)} option needs to be defined`)+P(2),O(`expects${N} ${v(s.replace(/([|,])/g,g("$1")))}`)+P(2),O(`at${N} ${g.underline(u.file.base)}`)+P(2),b.bold("Why?")+w+w+g(S(r)?` ${r.join(`
90
+ `)}`:` ${r}`)+w+w),process.exit(0);}function fe(e,t,s,r){te(P(2),se.bold("ERROR (!)"),P(2),O(`${F(`Invalid ${M(e)} configuration`)}`)+P(2),O(`The ${M(t)} option has an invalid or missing value`)+P(2),O(`provided${N} ${le(s)}`)+w,O(`expected${N} ${v(r.replace(/([|,])/g,g("$1")))}`)+P(2),b.bold("How to fix?")+w,`
91
+ ${g("You need to update the option and use one of the expected values.")}
92
+ ${g(`Use the ${M("defineConfig")} named export for type checking`)}
93
+ `),process.exit(0);}function ju(e){te(P(2),se.bold("ERROR (!)"),P(2),O(`${F(`Missing ${M("syncify.config.js")} configuration`)}`)+P(2),O("Unable to resolve a configuration file within the workspace")+P(2),O(`at${N} ${g.underline(e)}`)+P(2),b.bold("How to fix?")+w,`
94
+ ${g("You need to add one the following files to your project")}
95
+
96
+ ${g("-")} ${b("syncify.config.ts")}
97
+ ${g("-")} ${b("syncify.config.js")}
98
+ ${g("-")} ${b("syncify.config.mjs")}
99
+ ${g("-")} ${b("syncify.config.cjs")}
100
+ ${g("-")} ${b("syncify.config.json")}
101
+
102
+ ${g("You can also provide configuration in your")} ${b("package.json")}
103
+ ${g("file using on a")} ${le('"syncify": {}')} ${g("property.")}
104
+ `),process.exit(0);}function ce(e,t){te(P(2),se.bold("(!) ERROR"),P(2),O.bold(e)+P(2),b.bold("How to fix?")+w,g(S(t)?t.join(w).trimStart():t),P(2)),process.exit(0);}function bt(e,t){e.indexOf(".")>-1&&(e=g.bold("{ ")+e.split(".").filter(Boolean).join(g(" \u2192 "))+g(" \u2192 ")+se.bold(t)+g.bold(" }"));let s=u.file.base==="package.json"?`${v("syncify")} config in the ${v("package.json")} file.`:`${v(u.file.base)} file.`;te(P(2),se.bold("ERROR (!)"),P(2),se(`Unknown ${e} option provided.`)+P(2),b.bold("How to fix?")+w,`
105
+ ${g(`The ${v(t)} option is invalid or unsupported.`)}
106
+ ${g(`You need to remove it from the ${s}`)}
107
+ `),process.exit(0);}function Iu(e){let t=[];if(e.mode.metafields)return A;t.push(`${Pr}${g("Syncify")} ${g("~")} ${g(Ar())}`,`${x.gray}`),np(t,e.terminal.cols),t.push(`${x.gray}${xt.bold(`v${e.version}`)}`,`${x.gray}`);let s=e.sync.stores.length,r=Re(e.sync.themes).length,n=Re(e.spawn.commands).length,{mode:i,spawn:o,sync:a}=e,c=M.bold(String(s))+(s>1?" stores":" store"),h=M.bold(String(r))+(r>1?" themes":" theme"),p=M.bold(`${e.env.dev?"development":"production"}`);i.build?t.push(`${x.gray}Running ${M.bold("build")} in ${p}`):i.watch?t.push(`${x.gray}Running ${M.bold("watch")} in ${p}`):i.upload?t.push(`${x.gray}Running ${M.bold("upload")} mode`):i.download?t.push(`${x.gray}Running ${M.bold("download")} mode`):i.vsc?t.push(`${x.gray}Generate ${M.bold("vscode")} schema`):i.clean?t.push(`${x.gray}Running ${M.bold("clean")} mode`):i.export&&t.push(`${x.gray}Running ${M.bold("export")} mode`),t.push(`${x.gray}${s>0&&r>0?`Syncing ${h} to ${c}`:A}`),J(e.filters)||t.push(x.gray,`${x.gray}${xt.bold("--filters")}`,`${x.gray}`+sp(e.cwd,e.filters)),e.logger.warnings&&ip(e,t),ge(i.build,i.watch)&&n>0?t.push(`${x.gray}Spawned ${M.bold(`${n}`)} child ${n>1?"processes":"process"}`,`${x.gray}`):t.push(x.gray),Me(i.upload,i.download,i.build,i.clean,i.vsc)&&(n>0&&t.push(`${x.gray}${F("Child Processes:")}`,`${x.gray}${op(at(o.streams))}`,`${x.gray}`),r>0&&t.push(`${x.gray}${F("Theme Editors:")}`,`${x.gray}${Nu(a.themes,"editor")}`,`${x.gray}`)),ge(i.upload,i.download,i.watch)&&r>0&&t.push(`${x.gray}${F(i.upload||i.download?"Theme Targets:":"Theme Previews:")}`,`${x.gray}${Nu(a.themes,"preview")}`),e.mode.hot&&t.push(`${x.gray}`),B(t.join(w));}function sp(e,t){return Kr(t).flat().reduce((s,r,n,i)=>(s+=(n>0?w+x.gray:"")+ye+ye+b(pathe.relative(e,r)),s),A)}function np(e,t){t>=100||e.push(`${x.gray}${O.bold("TERMINAL WIDTH WARNING")}`,`${x.gray}`,`${x.gray}${O(`Your terminal width is below ${F("100")} columns (currently ${F(`${t}`)})`)}`,`${x.gray}${O("This is not recommended for usage with Syncify (size matters).")}`,`${x.gray}${O("Expand your terminal wider for an optimal logging experience.")}`,`${x.gray}`);}function ip(e,t){let s=!1;for(let r in Mt){let n=Mt[r];n.length>0&&(s===!1&&(s=!0,t.push(`${x.gray}`,`${x.yellow}${le(`${F("Warnings")} in ${F(e.file.base)}`)}`)),t.push(x.yellow,x.yellow+yt.bold(`${n.length} ${r} ${st("warning",n.length)}`),x.yellow,n.join(w)));}}function op(e){let t=e.reduce((s,[r])=>r.length>s?r.length:s,0);return e.reduce((s,[r,n])=>(s+=w+x.gray+He(t-r.length)+Xe(Rt(r))+`${N} `+g("PID")+" \u2192 "+g("#")+kr(`${n.pid}`),s),A)}function Nu(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(".")),c=t==="editor"?`https://${i}/admin/themes/${o}/editor`:`https://${i}?preview_theme_id=${o}`;return r+=w+x.gray+kr(a)+He(s.store-a.length)+b(" \u2192 ")+kr.bold(n)+He(s.theme-n.length)+b(" \u2192 ")+g.underline(c),r},A)}var ci,_s=!1,pi=function(t,s="pink"){_s=!0;let r=0,n=cn.length;ci=setInterval(()=>{_s&&Lt(`${x.gray} ${y[s](`${cn[r=++r%n]}`)}${t?` ${t}`:A}`);},50);};pi.stop=e=>{_s&&(_s=!1,e?(Lt(x.gray+e),Lt.done()):Lt.clear(),clearInterval(ci),ci=void 0);};function Lu(e,t={}){let s=U({showPercentage:!0,barColor:"neonGreen",percentColor:"whiteBright",barSize:40,clearOnComplete:!1},t),r=0;function n(p){return y.line.gray+p+" ".repeat(Math.max(0,s.barSize-p.length))}function i(p,l=!1){return (l?"\u25B1":"\u25B0").repeat(p)}function o(){s.clearOnComplete&&console.clear();}function a(p=1){let l=r+p;r=Math.min(l,e),r===e&&o();}function c(p=1){let l=r-p;r=Math.max(l,0);}function h(){let p=Math.round(r/e*s.barSize),l=i(p),m=i(s.barSize-p,!0),D=y[s.barColor](l)+y.lightGray(m);return s.showPercentage&&(D+=` ${String(Math.round(r/e*100))}%`),n(D)}return {stop:o,increment:a,decrement:c,render:h,get percent(){return r}}}function ap(...e){B(util.inspect(e,{colors:!0,showHidden:!0}));}var tr=new Set,fi=null,rr=!1,we="Syncify",sr=A,Mu=A;function lp(e,t,s){let r=sr!==e;W(),r&&B(Ot(we)),we==="Syncify"&&ot(),r&&(B(Pt(we)),Ae(),B(x.gray+F(`${t} ${Rt(e)}`)),Ae(),we=e,sr=e),Ae(),B(Zn("top",Xe(typeof s=="string"?s:s.relative)));}function Ae(e="gray"){J(e)?B(w):B(x[e]);}function cp(e){S(e)?te(O(e.map(t=>x.red+mt(t)).join(w))):te(x.red+mt(e));}function pp(e){S(e)?B(e.map(t=>x.gray+mt(t)).join(w)):B(x.gray+mt(e));}function fp(e){B(V("cyan","external",e));}function mp(e){De.current!==e&&(De.current=e),d(e,De.process)||(De.current=e,De.process[e]=new Set),fi=Mo((t,s)=>{if(s.charCodeAt(0)===9474)qu[t].write(s);else {De.count+=1;let r=s.split(`
108
+ `);for(;r.length!==0;)De.process[e].add(`${le(r.shift().trimStart())}`);}});}function dp(){fi(),fi=null;}function Dp(e,t=!1){B(Ot(we)),t&&ot(),B(Pt(e)),we=e,Ae();}function hp(e,t){B(V("greenBright","updated",`${e.relative} ${t?g(`~ ${t}`):A}`));}function gp(e){let t=sr!==e.namespace;W(),t&&B(Ot(we)),we!=="Syncify"&&t&&ot(),we=`${e.kind} ${Rt(e.namespace)}`,t&&(ot(),B(Pt(we)),sr=e.namespace),d(e.relative,De)||(De[e.relative]=new Set),Mu!==e.relative&&(Mu=e.relative),u.mode.watch&&(Ae(),B(V("neonCyan","changed",e.relative)));}function yp(){B(V("neonRouge","reloaded",`${F("HOT RELOAD")}${Ft(dt())}`));}function xp(e,t){if(u.mode.watch){if(tr.add([e,t.domain,Y()]),rr)return;rr=!0,G.onIdle().then(()=>{for(let[s,r,n]of tr)B(V("neonGreen","uploaded",`${F(s)} \u2192 ${r}`+Ft(n)));tr.clear(),rr=!1;});}else B(V("neonGreen","uploaded",`${F(e)} \u2192 ${t.domain}`+Ft(Y())));}function wp(e){if(u.mode.watch){if(tr.add([e.target,e.store,Y()]),rr)return;rr=!0,G.onIdle().then(()=>{for(let[t,s,r]of tr)B(V("neonGreen","uploaded",`${F(t)} \u2192 ${s}`+Ft(r)));tr.clear(),rr=!1;});}else B(V("neonGreen","uploaded",`${F(e.target)} \u2192 ${e.store}`+Ft(Y())));}function Fp(e,t){return B(V("orange","prompt",e)),B(Ot(we)+w),I(t)&&ks__default.default.notify(t).notify(),()=>{B(Pt(we)),Ae();}}function Cp(e,t=!1){De.count>0&&V("yellowBright","warning",`${De.count} ${st("warning",De.count)}`),t?(B(V("magentaBright","syncing",e)),G.pending>2&&B(V("orange","queued",`${e} ~ ${F($n(G.pending))} in queue`))):(B(V("magentaBright","syncing",e)),G.pending>0&&B(V("orange","queued",`${e} ~ ${F($n(G.pending))} in queue`)));}function qu(e,...t){let s=t[0],r=A;t.length===2&&(r=` ${Jn} ${t[0]}`,s=t[1]),B(V("whiteBright","process",F(e)+r+Ft(s)));}function Ep(e){B(V("whiteBright","exports",e));}function bp(e){u.mode.build||B(V("lavender","importer",e));}function Sp(e){B(V("whiteBright","transform",e));}function $p(e,t){B(V("yellowBright","warning",`${e}${t?g(` ~ ${t}`):""}`));}function vp(e,t){B(V("orange","retrying",`${e} \u2192 ${t.target} ${g(`~ ${t.store}`)}`));}function Bp(e,t){B(V("blueBright","deleted",`${e} \u2192 ${t.target} ${g(`~ ${t.store}`)}`));}function Ap(e,t,s,r){let n=e?`${F(e)} ${be} ${t} ${xs} ${s} ${g(`~ saved ${r}`)}`:`${t} ${xs} ${s} ${g(`~ saved ${r}`)}`;B(V("whiteBright","minified",n));}function Tp(e,t){B(V("whiteBright","reloaded",e+t));}function Rp(e,t){B(V("gray","skipped",`${typeof e=="string"?e:e.key} ~ ${t}`));}function _p(e){B(V("gray","ignored",e));}function kp(e,t){B(V("red","invalid",e)),ks__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Invalid error"}).notify(),t&&(Ae(),S(t)?te(O(t.map(r=>x.red+mt(r)).join(w))):te(x.red+mt(t)));}function Pp(e){B(V("red","failed",e)),ks__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Request failed"}).notify();}function Op(){Ae("yellow"),B(x.yellow+F.yellow(`WARNING ${Yn} RESTART IS REQUIRED`)),Ae("yellow"),B(x.yellow+F.yellow(`Changes to ${Xe(u.file.base)} require you restart watch mode.`)+w+x.yellow+F.yellow("Failure to restart watch mode will prevent changes from being reflected.")),Ae("yellow"),ks__default.default.notify({title:"WARNING",sound:"Pop",wait:!0,message:`Changes in ${u.file.base} will not reflect until you to restart watch mode.`}).notify();}function jp(e){throw new Error(e)}function Np(e){return (...t)=>{u.spawn.invoked||(u.spawn.invoked=!0),we!=="Spawn"&&(B(Ot(we)),we!=="Syncify"&&ot(),B(Pt("Spawn")),we="Spawn"),sr!==e&&(B(ei("pink",e)),sr=e),ri(mt(t.shift()));}}var nr={};gr(nr,{esbuild:()=>Gu,postcss:()=>Lp,sass:()=>Ip,warnings:()=>We});var We={},Ip=e=>(t,s)=>{let r=A;d(e.input,We)?We[e.input].has("sass")||We[e.input].set("sass",new Set):We[e.input]=new Map([["sass",new Set]]);let n=We[e.input].get("sass");if(r+=Ct(t,{nwl:!0,line:x.yellow,text:le.bold}),d("span",s)){let i=d("start",s.span)&&d("end",s.span)?{start:s.span.start.line,end:s.span.end.line}:null,o=d("context",s.span)?s.span.context:d("text",s.span)?s.span.text:null;o!==null&&(i!==null?r+=jt(o,{line:x.yellow,span:i}):r+=jt(o));}r+=Ge({stack:s.stack,entries:{file:e.relative,deprecated:s.deprecation?"Yes":"No"}}),n.has(r)?B(V("yellowBright","warning",`${n.size} ${st("warning",n.size)+ws}`)):(n.add(r),B(V("yellowBright","warning",`${n.size} ${st("warning",n.size)+ws}`)));};function Gu(e){}function Lp(e,t){let s=A;d(e.input,We)?We[e.input].has("postcss")||We[e.input].set("postcss",new Set):We[e.input]=new Map([["postcss",new Set]]);let r=We[e.input].get("postcss");s+=jt(t.node.toString(),{line:x.yellow,span:Xr(t.endLine)?{start:t.line,end:t.endLine}:{start:t.line,end:t.endLine}}),s+=Ge({stack:!1,entries:{column:t.column,file:e.relative,plugin:t.plugin}}),r.has(s)||(r.add(s),no(s));}function Wu(){f.nwl(""),f.out(g("SIGINT")),process.exit();}function zu(e,t){f.nwl(),f.err(`Unhandled Promise Rejection at: ${t}`),f.nwl("red"),f.out(e?g(e):"Unkown Reason");}var mi=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},Uu=e=>globalThis.DOMException===void 0?new mi(e):new DOMException(e),Vu=e=>{let t=e.reason===void 0?Uu("This operation was aborted."):e.reason;return t instanceof Error?t:Uu(t)};async function Os(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=[],c=[],h=new Map,p=!1,l=!1,m=!1,D=0,C=0,E=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),_=K=>{p=!0,l=!0,o(K);};n&&(n.aborted&&_(Vu(n)),n.addEventListener("abort",()=>{_(Vu(n));}));let H=async()=>{if(l)return;let K=await E.next(),ee=C;if(C++,K.done){if(m=!0,D===0&&!l){if(!r&&c.length>0){_(new AggregateError(c));return}if(l=!0,h.size===0){i(a);return}let Ne=[];for(let[ie,en]of a.entries())h.get(ie)!==Ps&&Ne.push(en);i(Ne);}return}D++,(async()=>{try{let Ne=await K.value;if(l)return;let ie=await t(Ne,ee);ie===Ps&&h.set(ee,ie),a[ee]=ie,D--,await H();}catch(Ne){if(r)_(Ne);else {c.push(Ne),D--;try{await H();}catch(ie){_(ie);}}}})();};(async()=>{for(let K=0;K<s;K++){try{await H();}catch(ee){_(ee);break}if(m||p)break}})();})}var Ps=Symbol("skip");function St(e){return S(e)?e.filter(t=>/\*/.test(t)):/\*/.test(e)?e:null}function Fe(e){if(S(e))return e.map(Fe);if(e.indexOf("/")===-1)return e;let t=path.dirname(e),s=t.lastIndexOf("/")+1;return t.slice(s)}function di(e){if(S(e))return e.map(di);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 ir(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&&ce(`Invalid path defined at: ${N} ${le(`"${r}"`)}`,"Paths must be relative to source"),(n?"!":"")+path.join(e,r))}}var Ju=e=>t=>{if(t.indexOf("*")!==-1&&ce(`Base directory path cannot contain glob${N} ${le(`"${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):ce(`Directory path is invalid at${N} ${le(`"${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),so(t).charCodeAt(0)===47?t:t+"/";ce(`Directory path is invalid at${N} ${le(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");};function Qu(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 X(t)||Vt(e,"data",{get(){return t}}),e}function Ir(e){let t=u.style.find(s=>s.watch(e.input));return X(t)||(Vt(e,"data",{get(){return t}}),t.snippet?(e.namespace="snippets",e.key=pathe.join("snippets",t.rename)):e.key=pathe.join("assets",t.rename),e.output?e.data.rename!==pathe.basename(e.output)&&(t.snippet?e.output=pathe.join(u.dirs.output,e.key):e.output=pathe.join(di(e.output),e.data.rename)):e.output=pathe.join(u.dirs.output,e.key)),e}function Lr(e){let t=u.script.filter(s=>s.watch.has(e.input));return t.length===0||Vt(e,"data",{get(){return t}}),e}function Di(e){if(u.section.prefixDir){if(e.base.endsWith("-group.json")||Bt(u.section.global)&&u.section.global.test(e.input))return e;let t=Fe(e.input);if(u.section.baseDir.has(t))return e;let s=Fe(e.input)+u.section.separator+e.base;e.name=s,e.key=pathe.join(e.namespace,s),e.output=pathe.join(pathe.dirname(e.output),s);}return e}function Ku(e){if(u.snippet.prefixDir){if(Bt(u.snippet.global)&&u.snippet.global.test(e.input))return e;let t=Fe(e.input);if(u.snippet.baseDir.has(t))return e;let s=t+u.snippet.separator+e.base;e.name=s,e.key=pathe.join(e.namespace,s),e.output=pathe.join(pathe.dirname(e.output),s);}return e}function Mr({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 Zu(e,t,s){let r=e;return (n,i,o)=>{let a;return i===14||i===15?(a=pathe.join(Fe(r.dir),r.base),s=null):(a=pathe.join(n,r.base),s=pathe.join(s,a)),o===-1&&(t=u.cache.maps[t]),U({},r,{uuid:Ye(),type:i,input:t,output:s,key:a,namespace:n,kind:o,relative:pathe.relative(u.cwd,t),size:NaN,data:void 0})}}function js(e,t){return s=>{let r=pathe.parse(s),n=Zu(r,s,t);if(r.ext===".liquid"){if(e.sections.match(s))return Di(n("sections",4,"Liquid"));if(e.snippets.match(s))return Ku(n("snippets",3,"Liquid"));if(e.layout.match(s))return n("layout",2,"Liquid");if(e.templates.match(s))return n("templates",1,"Liquid");if(e.customers.match(s))return n("templates/customers",1,"Liquid");if(e.metaobject.match(s))return n("templates/metaobject",1,"Liquid");if(e.transforms.has(s)&&e.transforms.get(s)===8)return Ir(n("snippets",8,"CSS"))}else if(e.assets.match(s)){if(u.spawn.invoked)return n("assets",16);if(r.ext===".jpg"||r.ext===".png"||r.ext===".gif"||r.ext===".pjpg")return n("assets",13,"Image");if(r.ext===".mov"||r.ext===".mp4"||r.ext===".webm"||r.ext===".ogg")return n("assets",13,"Video");if(r.ext===".pdf")return n("assets",13,"PDF");if(r.ext===".eot"||r.ext===".ttf"||r.ext===".woff"||r.ext===".woff2")return n("assets",13,"Font");if(r.ext===".js"||r.ext===".mjs")return n("assets",13,"JavaScript");if(r.ext===".json")return n("assets",13,"JSON");if(r.ext===".svg")return n("assets",13,"SVG");if(r.ext===".css")return n("assets",13,"CSS")}else {if(r.ext===".md"||r.ext===".html")return r.ext===".html"?n("pages",15,"HTML"):n("pages",15,"Markdown");if(r.ext===".json"){if(e.metafields.match(s))return n("metafields",14,"JSON");if(e.sections.match(s))return Di(n("sections",4,"JSON"));if(e.templates.match(s))return n("templates",1,"JSON");if(e.config.match(s))return n("config",6,"JSON");if(e.locales.match(s))return n("locales",7,"JSON");if(e.customers.match(s))return n("templates/customers",1,"JSON");if(e.metaobject.match(s))return n("templates/metaobject",1,"JSON")}else {if(r.ext===".svg")return Qu(n("assets",10,"SVG"));if(r.ext===".css")return Ir(n("assets",8,"CSS"));if(r.ext===".scss")return Ir(n("assets",8,"SCSS"));if(r.ext===".sass")return Ir(n("assets",8,"SASS"));if(r.ext===".js"||r.ext===".mjs")return Lr(n("assets",9,"JavaScript"));if(r.ext===".ts")return Lr(n("assets",9,"TypeScript"));if(r.ext===".jsx")return Lr(n("assets",9,"JSX"));if(r.ext===".tsx")return Lr(n("assets",9,"TSK"))}}}}function ea(e){return e.startsWith("sections/")?U({key:e,namspace:"sections"}):e.startsWith("snippets/")?U({key:e,namspace:"snippets"}):e.startsWith("layout/")?U({key:e,namspace:"layout"}):e.startsWith("customers/",10)?U({key:e,namspace:"templates/customers"}):e.startsWith("metaobject/",10)?U({key:e,namspace:"templates/metaobject"}):e.startsWith("templates/")?U({key:e,namspace:"templates"}):e.startsWith("config/")?U({key:e,namspace:"config"}):e.startsWith("locales/")?U({key:e,namspace:"locales"}):e.startsWith("assets/")?U({key:e,namspace:"assets"}):U({key:e,namspace:"assets"})}var ta=e=>t=>{let s=pathe.parse(t),r=Zu(s,t,e);switch(pathe.basename(s.dir)){case"sections":return r("sections",4,-1);case"snippets":return r("snippets",3,-1);case"layout":return r("layout",2);case"templates":return r("templates",1,-1);case"customers":return r("templates/customers",1,-1);case"metaobject":return r("templates/metaobject",1,-1);case"config":return r("config",6,-1);case"locales":return r("locales",7,-1);case"assets":return r("assets",13,-1)}};async function ra(e,t){return $e({...u.sync.stores[t.sidx].client,method:"get",url:t.url,params:{"asset[key]":e}}).then(({data:s})=>s.asset).catch(()=>!1)}async function gi(e,t){let s=de(u.sync.stores[t.theme.sidx].client,{method:"put",url:t.theme.url,data:{asset:{key:t.key,value:e}}});return $e(s).then(()=>!0).catch(r=>(f.failed(t.key),q.request(t.key,r.response),!1))}async function yi(e,t){let s=typeof e=="string"?e:e.url;return $e.get(s,t).then(({data:r})=>r).catch(r=>{if(r.response&&(r.response.status===429||r.response.status===500))t.params["asset[key]"]&&(f.retrying(t.params["asset[key]"],e),G.add(()=>yi(e,t)));else {if(u.mode.upload)throw r.response;t.params["asset[key]"]&&(f.failed(t.params["asset[key]"]),q.request(t.params["asset[key]"],r.response));}})}var Ns;async function xi(e,t,s){if(G.isPaused)return;let{mode:r}=u;return G.concurrency>2?(Ns>=20&&G.concurrency--,Ns>=35&&G.concurrency--):G.concurrency<3&&Ns<30&&G.concurrency++,!r.upload&&!r.download&&W(),await $e(s).then(({headers:i,data:o})=>{if(r.download===!1&&s.method==="get")return o;if(s.method==="delete")f.deleted(t.relative,e);else if(r.watch)t.type!==9&&t.type!==8&&f.hot(),f.upload(e);else if(r.upload){let a="";"asset"in s.data&&(a=nt(s.data.asset.value)),Ie.emit("upload","uploaded",e,{key:t.key,namespace:t.namespace,fileSize:a});}else r.download&&Ie.emit("download","downloads",e,{key:t.key,namespace:t.namespace,data:o});Ns=parseInt(i["x-shopify-shop-api-call-limit"].slice(0,2),10);}).catch(i=>{if(i.response&&(i.response.status===429||i.response.status===500))!r.upload&&!r.download&&f.retrying(t.key,e),G.add(()=>xi(e,t,s)),r.download&&Ie.emit("download","retry",e,{key:t.key,namespace:t.namespace,get file(){return t}});else if(r.upload){let o="";"asset"in s.data&&(o=nt(s.data.asset.value)),Ie.emit("upload","failed",e,{key:t.key,namespace:t.namespace,fileSize:o,get file(){return t},get error(){return i.response}});}else r.download?Ie.emit("download","failed",e,{key:t.key,namespace:t.namespace,get file(){return t},get error(){return i.response}}):(f.failed(t.key),i.isAxiosError&&q.request(t.relative,i.response));return Ps})}var wi=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=mu__default.default.createInterface({input:this.stream,escapeCodeTimeout:50}),mu__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;}},ia=wi;new ia;var oa=globalThis.process?.env||{},ua=globalThis.process?.argv||[],aa=!("NO_COLOR"in oa)&&oa.TERM!=="dumb"&&!ua.includes("--no-color")&&!ua.includes("--no-colors")&&(!globalThis.process?.stdout||globalThis.process?.stdout?.isTTY===!0);var ca=e=>new Proxy(e,{get(t,s){return s in la?ca(r=>e(la[s](r))):t[s]}}),Z=(e,t)=>ca(s=>aa?`\x1B[${e}m${s}\x1B[${t}m`:s),la={reset:Z(0,0),bold:Z(1,22),dim:Z(2,22),italic:Z(3,23),underline:Z(4,24),overline:Z(53,55),inverse:Z(7,27),hidden:Z(8,28),strikethrough:Z(9,29),black:Z(30,39),red:Z(31,39),green:Z(32,39),yellow:Z(33,39),blue:Z(34,39),magenta:Z(35,39),cyan:Z(36,39),white:Z(37,39),gray:Z(90,39),bgBlack:Z(40,49),bgRed:Z(41,49),bgGreen:Z(42,49),bgYellow:Z(43,49),bgBlue:Z(44,49),bgMagenta:Z(45,49),bgCyan:Z(46,49),bgWhite:Z(47,49),bgGray:Z(100,49)};var fa=es__default.default.platform==="linux",ma=es__default.default.platform==="win32";var Fi=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];ma||Fi.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");fa&&Fi.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var da=Fi;var Ci=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(let s of this.callbacks)s();t&&es__default.default.kill(es__default.default.pid,t);}},this.hook=()=>{es__default.default.once("exit",()=>this.exit());for(let t of da)es__default.default.once(t,()=>this.exit(t));},this.register=t=>(this.callbacks.add(t),()=>{this.callbacks.delete(t);}),this.hook();}},Da=new Ci;var Up=Da.register,ha=Up;var Ei=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,ha(this.show);}},ga=Ei;new ga;async function ya(e,t){if(is(arguments.length,1))return s=>ya(e,s);if(Me(d("namespace",t),d("key",t))){f.error("invalid fields");return}return $e.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 bi(e,t){return is(arguments.length,1)?s=>bi(e,s):(t.type="json",t.namespace="email",t.value_type="json_string",t.key="eng",$e.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 q(t.namespace,s.response);if(ft(s.response.status)){G.add(()=>bi(e,t));return}else return q(e.store,s.response)}))}async function Si(e,t,s){return is(arguments.length,1)?(r,n)=>Si(e,r,n):$e.put(`metafields/${t}.json`,{metafield:s},e.client).then(r=>(console.log("created"),r.data.metafield)).catch(r=>{if(!e.queue)return q(s.namespace,r.response);if(ft(r.response.status))G.add(()=>Si(e,t,s));else return q(e.store,r.response)})}async function Ls(e,t){if(is(arguments.length,1))return r=>Ls(e,r);let s=await ya(e,t);return s?Si(e,s.id,U(t,{id:s.id,type:"json"})).catch(r=>{if(!e.queue)return q(t.namespace,r.response);if(ft(r.response.status))G.add(()=>Ls(e,t));else return q(e.store,r.response)}):bi(e,t)}function ur({stores:e,themes:t}){return {assets:async(s,r,n)=>{let i=X(n)?{method:s,params:{"asset[key]":r.key}}:{method:s,data:{asset:{key:r.key,value:n}}};await G.add(()=>Os(t,async o=>{(u.mode.upload||u.mode.download)&&W(),await xi(o,r,utils.assign({url:o.url},e[o.sidx].client,i));}));},pages:async(s,r,n)=>{await G.add(()=>Os(e,async i=>{u.mode.upload&&W(),console.log(n);}));},metafields:s=>G.add(function(){return ro(async function(r){await Ls(r,s);},e)})}}var Ms=/{%-?\s*render\s+['"]hot\.js['"]/;async function wa(){let e="snippets/hot.js.liquid",[t]=u.sync.themes,s=await fsExtra.readFile(u.hot.snippet),r=await gi(s.toString(),{theme:t,key:e});return f.update(R.message("gray",`${e} uploaded snippet injection`)),r}function ar(e){return Ms.test(e)}function Fa(e){if(!ar(e))return Ca(e)}function qr(e){let t=e.search(Ms);if(t>-1){let s=e.slice(0,t),r=e.slice(e.indexOf("%}")+2);return s+r}return e}function Ca(e){let t=e.indexOf("<head>")+6;return e.slice(0,t)+w+u.hot.renderer+w+e.slice(t)}async function Ea(e){if(!await fsExtra.pathExists(e))return null;let r=(await fsExtra.readFile(e)).toString();Ms.test(r)||(r=Ca(r),await fsExtra.writeFile(e,r),f.update(R.message("gray","injected render tag in output layout")));let[n]=u.sync.themes,i=pathe.basename(e),o=`layout/${i}`,a=await ra(`layout/${i}`,n);return Ms.test(a)&&(r=qr(r)),await gi(r,{theme:n,key:o})?(f.update(R.message("gray","uploaded and inject render tag")),!0):!1}function rf(e){e===0&&ce("Empty output directory",[`There are no files within ${v(pathe.relative(u.cwd,u.dirs.output)+"/**")}`,`You may need to run the ${v("syncify build")} command and try again.`]);let t={local:[],remote:{}},s={},r=0;for(let{store:n,target:i}of u.sync.themes)i.length>r&&(r=i.length),d(n,s)||(s[n]={}),d(n,t.remote)||(t.remote[n]=new Map),s[n][i]={theme:i,uploaded:0,failed:0,progress:f.progress(e),errors:[]};return {sync:s,errors:t,size:e}}function sf(e,t){let s=0;for(let r in e)t.remote[r].size>0?s=s+1:delete t.remote[r];return s}async function ba(e){u.cache.lastResource="upload",f.newGroup("Upload",!0),f.spinner("Preparing"),W("upload");let t=ur(u.sync),s=Se(e),r=ta(u.dirs.output),n=cl__default.default.sync(`${u.dirs.output}/templates/*`).sort(),{sync:i,errors:o,size:a}=rf(n.length);await on(250),Ie.on("upload",function(h,{target:p,store:l},m){f.spinner.stop();let D=h==="failed",C=[R.message("whiteBright",F(m.namespace)),wt,R.message(D?"redBright":"neonGreen",m.key),wt,R.suffix("white","size ",` ${m.fileSize}`),w,R.suffix("white","duration ",` ${Y()}`),w,R.suffix("white","elapsed ",` ${dt("upload")}`),wt];i[l][p][h]+=1,i[l][p].progress.increment(1);for(let E in i)for(let _ in i[E]){let H=i[E][_],K=` ${F(`${H.uploaded}`)} ${b("of")} ${F(`${a}`)}`,ee=` ${F(`${H.failed}`)}`;C.push(R.message("neonCyan",`${F(_.toUpperCase())} ${be} ${E}`),wt,R.suffix("whiteBright","uploaded ",K),w,R.suffix(H.failed>0?"redBright":"white","failed ",ee),wt,H.progress.render(),wt);}D&&(i[l][p].errors.push(m.file.key),o.remote[l].has(m.file.output)?o.remote[l].get(m.file.output).push({store:l,theme:p,file:m.file,attempts:0,response:m.error}):o.remote[l].set(m.file.output,[{store:l,theme:p,file:m.file,attempts:0,response:m.error}])),f.update(Te(C));}),await on(500);for(let h of n){let p=r(h),l;try{if(l=(await fsExtra.readFile(p.output)).toString(),p.namespace==="layout"&&ar(l)&&(l=qr(l)),!s)await t.assets("put",p,l);else {let D=e.apply({...p},l);X(D)||D===!1?await t.assets("put",p,l):L(D)?await t.assets("put",p,D):_e(D)?await t.assets("put",p,D.toString()):await t.assets("put",p,l);}}catch(m){o.local.push({file:p,attempts:0,response:m.message});}}f.update.clear();for(let h in i)for(let p in i[h]){let l=i[h][p];if(l.failed===0)continue;let m=F(`${p.toUpperCase()} THEME`),D=` ${F(`${l.failed}`)}`,C=` ${F(`${l.uploaded}`)} ${b("of")} ${F(`${a}`)}`;f.out(R.message("whiteBright",`${F(m)} ${be} ${h}`)),f.nwl(),f.out(R.suffix("whiteBright","uploaded ",C)),f.out(R.suffix("whiteBright","failed ",D)),f.nwl(),f.write([g("Syncify is now watching all rejected files. Changes will be resynced if successful."),g("In some cases, you may need to perform more detailed adjustments and then resync.")]);let E=1;for(let[_,H]of o.remote[h].entries()){let K=H.find(({theme:ee})=>ee===p);if(K){let ee=`${(E<10?"0":"")+E++}`;f.nwl(),f.write(se.bold(`ERROR ${ee}`)),q.request(_,K.response);}}f.out(Or(20));}sf(i,o)>0&&(f.write([b("Syncify is now watching file for changes."),b("The file failed to sync with 2 on. Below are the errors:")]),f.nwl(),f.write(Ht("Waiting for changes..."))),f.nwl(),f.update(`${x.gray}Upload Completed`),f.nwl(),process.exit(0);}async function uf(){let e={local:[],remote:{},retry:{}},t={},s=0;for(let r of u.sync.themes){let n=u.sync.stores[r.sidx],{assets:i}=await yi(r,n.client);r.target.length>s&&(s=r.target.length),d(r.store,t)||(t[r.store]={}),d(r.store,e.remote)||(e.remote[r.store]={}),d(r.target,e.remote[r.store])||(e.remote[r.store][r.target]=new Map),d(r.store,e.retry)||(e.retry[r.store]={}),d(r.target,e.retry[r.store])||(e.retry[r.store][r.target]=new Map),t[r.store][r.target]={get files(){return i},theme:r.target,data:[],downloads:0,failed:0,retry:0,previous:{key:"",size:""},progress:f.progress(i.length),errors:[]};}return {sync:t,errors:e}}async function Sa(e){u.cache.lastResource="download",W("download"),f.newGroup("Download",!0);Se(e);let s=ur(u.sync),{sync:r,errors:n}=await uf();Ie.on("download",function(i,{target:o,store:a},c){f.spinner.stop();let h=i!=="failed"&&i!=="retry",p=[R.message("whiteBright",y.bold(c.namespace)),y.newline];if(r[a][o][i]+=1,r[a][o].progress.increment(1),h){let l=d("attachment",c.data.asset)?Buffer.from(c.data.asset.attachment,"base64"):Buffer.from(c.data.asset.value||null,"utf8");n.retry[a][o].has(c.key)&&(n.retry[a][o].delete(c.key),r[a][o].retry=n.retry[a][o].size),p.push(R.suffix("white","duration ",` ${Y()}`),w,R.suffix("white","elapsed ",` ${dt("download")}`),y.newline);for(let m in r)for(let D in r[m]){let C=r[m][D],E=` ${y.bold(`${C.downloads}`)} ${y.white("of")} ${y.bold(`${C.files.length}`)}`,_=` ${y.bold(`${C.failed}`)}`,H=` ${y.bold(`${C.retry}`)} ${y.white("of")} ${y.bold(`${C.files.length}`)}`;o===D&&m===a?(C.previous.key=c.key,C.previous.size=nt(l.toString()),p.push(R.message("neonCyan",`${y.bold(D.toUpperCase())} ${y.ARR} ${m}`),y.newline,R.message(h?"neonGreen":"redBright",c.key),w,R.message("whiteBright",C.previous.size),y.newline,R.suffix("whiteBright","download ",E),w,R.suffix(C.retry>0?"orange":"white","retrying ",H),w,R.suffix(C.failed>0?"redBright":"white","failed ",_),y.newline,C.progress.render(),y.newline)):p.push(R.message("neonCyan",`${y.bold(D.toUpperCase())} ${y.ARR} ${m}`),y.newline,R.message(h?"neonGreen":"redBright",C.previous.key),w,R.message("whiteBright",C.previous.size),y.newline,R.suffix("whiteBright","download ",E),w,R.suffix(C.retry>0?"orange":"white","retrying ",H),w,R.suffix(C.failed>0?"redBright":"white","failed ",_),y.newline,C.progress.render(),y.newline);}fsExtra.writeFileSync(path.join(u.dirs.import,a,o,c.key),l),f.update(Te(p));}else if(i==="retry")if(r[a][o].previous.key=y.orange(c.key),r[a][o].previous.size="",r[a][o].retry=r[a][o].retry+1,n.retry[a][o].has(c.key)){let l=n.retry[a][o].get(c.key);n.retry[a][o].set(c.key,{file:c.file,attempts:l.attempts+1});}else n.retry[a][o].set(c.key,{file:c.file,attempts:0});else r[a][o].errors.push(c.key),r[a][o].previous.key=c.key,r[a][o].previous.size="",n.remote[a][o].has(c.key)?n.remote[a][o].get(c.key).push({store:a,theme:o,file:c.file,attempts:0,response:c.error}):n.remote[a][o].set(c.key,[{store:a,theme:o,file:c.file,attempts:0,response:c.error}]);});for(let i in r)for(let o in r[i])for(let a of r[i][o].files)await s.assets("get",ea(a.key));}function cf(e,t){let{wss:s,mode:r,watch:n,env:i}=u,{type:o,relative:a,kind:c,key:h,output:p}=e;return async l=>{if(o!==16&&(r.watch&&n.unwatch(p),await fsExtra.writeFile(p,l).catch(q.write("Error writing asset to output",{file:a,source:a}))),r.hot&&(f.syncing(h,!0),c==="JavaScript"?s.script(h):c==="CSS"&&s.stylesheet(h)),i.sync!==0)return t("put",e,l)}}async function qs(e,t,s){let r=cf(e,t),n=await fsExtra.readFile(e.input).catch(q.write("Error reading asset file",{file:e.relative,source:e.relative}));if(n){let i=n.toString();if(J(i))return u.mode.watch&&f.skipped(e,"empty file"),null;if(!Se(s))return r(i);let o=s.apply({...e},i);return X(o)||o===!1?r(i):me(o)?r(o):_e(o)?r(o.toString()):r(i)}return null}var Df=/{%-?\s*#[\s\S]+?%}/g,hf=/{%-?\s*comment\s*-?%}[\s\S]+?{%-?\s*endcomment\s*-?%}/g,gf=/{%-?\s*liquid[\s\S]+?%}/g,yf=/[^,:'"a-zA-Z0-9=] +[^'"a-zA-Z0-9=}{]/g;function Gs(e){return u.terser.liquid.removeComments?e.replace(hf,A).replace(Df,A):e}function xf(e){return e.replace(gf,t=>`
109
+ `+t.replace(/#.*?$/gm,A)+`
110
+ `)}function wf(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),c=t.slice(0,r)+a+t.slice(i);return Gs(c)}f.invalid(e.relative);}return Gs(t)}function Ff(e){return u.terser.liquid.stripDashes,e}async function Cf(e,t){try{return await htmlMinifierTerser.minify(t,u.terser.markup)}catch(s){return f.invalid(e.relative),console.error(s),null}}var Ef=e=>async t=>{if(e.type===2&&u.mode.hot&&ar(t)===!1&&(t=Fa(t)),!u.mode.terse)return await fsExtra.writeFile(e.output,t),f.transform(`${e.namespace} \u2192 ${rt(e.size)}`),t;let s;if(e.base.endsWith(".js.liquid"))s=t.replace(yf,A).replace(/(?<=[:,]) +(?=['"{[])/g,A).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?wf(e,t):Gs(t),o=await Cf(e,i);s=xf(o);}if(f.process("HTML Terser",dt()),j(s))return await fsExtra.writeFile(e.output,t),t;let r=Ff(s).replace(/^\s+/gm,A);await fsExtra.writeFile(e.output,r);let n=Oe(t,e.size);return n.isSmaller?f.transform(`${e.namespace} ${n.before} \u2192 gzip ${n.gzip}`):f.minified("Liquid",n.before,n.after,n.saved),r};async function bf(e){let s=(await fsExtra.readFile(e)).toString(),r=s.search(/{%-?\s*schema/);if(r<0)return;let n=s.indexOf("%}",r+2)+2,i=s.slice(n),o=n+i.search(/{%-?\s*endschema/);return o<0&&f.throws(e),JSON.parse(s.slice(n,o))}async function Sf(e,t){let s=t.search(/{%-?\s*schema/);if(s<0)return t;let r=t.indexOf("%}",s+2)+2,n=t.slice(r),i=r+n.search(/{%-?\s*endschema/);i<0&&f.throws(e.relative);let o=JSON.parse(t.slice(r,i));if(!d("use",o))return t;if(!S(o.use))throw new Error("Invalid type passed on schema");let a={},c=await cl__default.default(pathe.join(u.dirs.output,"sections")+"/**");for(let l of o.use)for(let m of c)if(pathe.basename(m,".liquid").endsWith(l)){let C=await bf(m);a[l]=C;}let h=[];for(let l=0;l<o.settings.length;l++)if(d("ref",o.settings[l])){let[m,D]=o.settings[l].ref.split(".").filter(Boolean),C=a[m].settings.find(E=>E.id===D);C&&(o.settings[l]=C,h.push(C));}for(let l=0;l<o.blocks.length;l++)for(let m=0;m<o.blocks[l].settings.length;m++){let D=o.blocks[l].settings[m];if(d("ref",D)){let[C,E,_]=D.ref.split(".").filter(Boolean),H=a[C].blocks.find(K=>K.type===E);if(H){let K=H.settings.find(ee=>ee.id===_);K&&(o.blocks[l].settings[m]=K,h.push(K));}}}return delete o.use,t.slice(0,r)+`
111
+ `+JSON.stringify(o,null,2)+`
112
+ `+t.slice(i)}async function qt(e,t){u.mode.watch&&W();let r=(await fsExtra.readFile(e.input)).toString();u.mode.build&&e.namespace==="layout"&&ar(r)&&(r=qr(r)),e.type===4&&(r=await Sf(e,r)),e.size=ve(r);let n=Ef(e);if(!me("Function",t))return n(r);let i=t.apply({...e},r);return me("Undefined",i)||i===!1?n(r):me("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 Bf(e,t=0){try{return JSON.stringify(e,null,t)}catch(s){return console.log(s),null}}async function lr(e,t,s=0){let r=Bf(t,s);if(j(r))return u.mode.watch&&Y(),t;if(s===0){let n=Oe(r,e.size);f.minified("JSON",n.before,n.after,n.saved);}else f.transform(`${e.namespace} \u2192 ${rt(e.size)}`);return e.type===14||fsExtra.writeFile(e.output,r).catch(q.write("Error writing JSON",{file:e.relative})),r}async function $t(e,t){u.mode.watch&&W();let s=await fsExtra.readFile(e.input).catch(q.write("Error reading JSON file",{file:e.relative}));if(_e(s)){let r=s.toString();if(e.size=ve(r),r.trim().length===0)return f.skipped(e,"empty file"),null;let n=Bi(r);if(J(n))return f.skipped(e,"empty file"),null;let i=u.processor.json.indent,{mode:o,terser:a}=u;if(o.terse&&(e.type===13?a.json.assets&&(i=0):e.type===7?a.json.locales&&(i=0):e.type===1?a.json.templates&&(i=0):e.type===14?a.json.metafields&&(i=0):e.type===5?a.json.metaobject&&(i=0):e.type===4?a.json.groups&&(i=0):e.type===6&&a.json.config&&(i=0)),!Se(t))return lr(e,n,i);let c=t.apply({...e},n);return X(c)?lr(e,n,i):S(c)||I(c)?lr(e,c,i):L(c)?lr(e,Bi(c),i):_e(c)?lr(e,Bi(c.toString()),i):lr(e,n,i)}}var Gr=null;function Aa(){return Gr=vn("esbuild"),j(Gr)?(Gr=null,!1):!0}async function Ta(e){u.processor.esbuild.loaded&&e.watch.clear();let t=await Gr.build(e.esbuild);u.mode.terse&&u.mode.build&&(e.size=ve(t.outputFiles[0].text)),u.mode.watch?Ra(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 Ra(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=pathe.join(r,o);e.watch.has(a)||e.watch.add(a),n.has(a)||n.add(a),i.watch&&s.push(a);}i.watch&&u.processor.esbuild.loaded&&await Bn().then(()=>{for(let o of e.watch)o.indexOf("/node_modules/")>-1||e.watchCustom!==null&&e.watchCustom(o)||d(o.slice(r.length+1),t)||(e.watch.delete(o),n.unwatch(o));});}function Af(e){return "<script>"+e+"</script>"}function Tf(e){return me("Function",e)?function(t,s){let r=e.apply({...t},s);return r===!1?(f.external("cancelled"),null):me("String",r)?(f.external("augment"),r):_e(r)?(f.external("augment"),r.toString()):s}:!1}async function Ws(e,t,s){if(!e.data)return;u.mode.watch&&W();let r=Tf(s),{errors:n,wss:i,mode:o,cwd:a}=u,c=e.data.length,h=[];for(let p of e.data){let{key:l,input:m,output:D,snippet:C,esbuild:{format:E}}=p;try{let{metafile:_,outputFiles:H,warnings:K}=await Gr.build(p.esbuild);c>1&&(f.nwl(),f.importer(pathe.relative(a,m))),o.watch&&await Ra(p,_.inputs),K.length>0&&void 0;for(let{text:ee,path:Ne}of H)if(Ne.endsWith(".map")){let ie=pathe.join(u.cache.sourcemaps.script,e.base+".map");fsExtra.writeFile(ie,ee).catch(q.write("Error writing JavaScript Source Map to cache",{file:pathe.relative(a,ie),source:e.relative}));}else {if(o.terse){let{before:en,after:Rl,saved:_l}=Oe(ee,p.size);f.transform(`${F(E.toUpperCase())} bundle`),f.minified(null,en,Rl,_l);}else f.transform(`${F(E.toUpperCase())} bundle \u2192 ${F(nt(ee))}`);let ie;if(C){if(ie=Af(ee),r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(D,ie).catch(q.write("Error writing inline <script> snippet",{file:e.relative})),f.transform(`exported as ${F("snippet")}`);}else {if(ie=ee,r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(D,ie).catch(q.write("Error writing JavaScript asset",{file:e.relative}));}o.hot?(f.syncing(l,!0),i.script(l),h.push(t("put",p,ie))):o.build||(f.syncing(l),h.push(t("put",p,ie)));}}catch(_){d("errors",_)&&(f.invalid(e.relative),n.add(m),_.errors.forEach(q.esbuild));}}c>1&&f.nwl(),await Promise.all(h);}var zs=null,Ti=null;async function Ri(e){if(e==="postcss")return zs=(await import('postcss')).default,j(zs)===!1;if(e==="sass")return Ti=rn("sass"),j(Ti)===!1}function kf(e,t){let s=Se(t)?{...e}:!1;return async function(r){if(j(r))return null;let n;if(s!==!1){let o=t.apply({...e},Buffer.from(r));X(o)||o===!1?n=r:(L(o)||_e(o))&&(n=o);}else n=r;fsExtra.writeFile(e.output,n).catch(q.write("Error writing stylesheet to output",{input:e.relative,output:pathe.relative(u.cwd,e.output)}));let i=Oe(r,e.size);return i.isSmaller?f.transform(`${F("CSS")} ${i.before} \u2192 gzip ${i.gzip}`):f.minified("CSS",i.before,i.after,i.saved),u.mode.hot&&u.wss.stylesheet(e.key),n}}async function Pf(e){let{data:t}=e,s=t.sass===!0?u.processor.sass.config:t.sass;if(e.ext===".scss"||e.ext===".sass"){u.mode.watch&&W();try{let{css:r,sourceMap:n}=Ti.compile(t.input,{loadPaths:s.include,sourceMapIncludeSources:!1,sourceMap:s.sourcemap,style:s.style,logger:{debug:i=>console.log("DEBUG",i),warn:nr.sass(e)}});if(s.sourcemap){let i=pathe.join(u.cache.sourcemaps.style,e.base+".map");fsExtra.writeFile(i,JSON.stringify(n)).catch(q.write("Error writing SASS Source Map file to the cache directory",{file:pathe.relative(u.cwd,i),source:e.relative}));}return f.process("SASS Dart",Y()),e.size=ve(r),{css:r,map:n}}catch(r){return f.invalid(e.relative),q.sass(e,r),null}}try{let r=await fsExtra.readFile(e.input);return e.size=ve(r),{css:r.toString(),map:null}}catch(r){return f.invalid(e.relative),f.throws(r),null}}async function Of(e,t,s){let{data:r}=e;try{u.mode.watch&&W();let n=await zs(u.processor.postcss.config).process(t,{from:r.rename,to:r.rename,map:s?{prev:s,inline:!1}:null});u.mode.watch&&f.process("PostCSS",Y());let i=n.warnings();if(i.length>0)for(let o of i)nr.postcss(e,o);return n.toString()}catch(n){return f.invalid(e.relative),console.log(n),null}}function _a(e){return `<style>${w+He(2)+e}</style>`}async function Us(e,t){u.mode.watch&&W();let s=kf(e,t);try{let r=await Pf(e);if(r===null)return null;if(j(zs)||!e.data.postcss&&!e.data.snippet)return s(r.css);if(e.data.postcss){let n=await Of(e,r.css,r.map);if(n===null)return null;if(e.data.snippet)return s(_a(n))}return e.data.snippet?s(_a(r.css)):s(r.css)}catch(r){return console.log(r),null}}var _i=null,ki=null;async function Pi(e){if(e==="svg-sprite")return ki=(await import('svg-sprite')).default,j(ki)===!1;if(e==="svgo")return _i=(await import('svgo')).default,j(_i)===!1}async function Nf(e){let t=await fsExtra.readFile(e);return [e,t.toString(),ve(t)]}function If(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 Lf(e,t,s){async function r(n){let i=U({},e);u.mode.watch&&W(),i.kind="SVG Sprite",n.snippet?(i.namespace="snippets",i.key=pathe.join("snippets",Mr(i,n.rename)),i.output=pathe.join(u.dirs.output,i.key)):(i.key=pathe.join("assets",Mr(i,n.rename)),i.output=pathe.join(u.dirs.output,i.key));let o=n.sprite===!0?u.processor.sprite.config:n.sprite,a=new ki(o),c=await et(Nf,at(n.input)).catch(q.write("Error reading an SVG file",{file:i.base,source:i.relative}));if(c){let h=c.filter(([D,C])=>Na(C)?(f.skipped(pathe.relative(u.cwd,D),"Liquid Detected"),!1):!0);i.size=0;for(let[D,C,E]of h)a.add(D,null,C),i.size=i.size+E;let p=await If(a),l=h.length;f.process("SVG Sprite",`${l} ${st("SVG",l)}`,Y()),await fsExtra.writeFile(i.output,p).catch(q.write("Error writing SVG Sprite",{file:i.key,caller:e.relative}));let m=Oe(p,i.size);m.isSmaller?f.transform(`${i.kind} ${m.before} \u2192 gzip ${m.gzip}`):f.minified(i.kind,m.before,m.after,m.saved),t&&(f.syncing(i.key),await t("put",i,p));}}return r}function Na(e){return /^(?:{{[\s\S]+?}}|{%[\s\S]+?%})|[^"'](?:{{[\s\S]+?}}|{%[\s\S]+?%})[^'"]/m.test(e)}function Mf(e){if(/<path[^>]*[a-zA-Z"'\s](>)(?!\s*<\/path>)/g.test(e)){let s=`${y.gray(`<${y.white("path")}>`)}`,r=`${y.neonGreen(`<${y.white("path")} />`)}`;return f.transform(`${s} ${y.ARR} ${r} ${y.TLD} ${y.gray("patched solidus")}`),e.replace(/(<path[^>]*[a-zA-Z"'\s])(>)(?!\s*<\/path>)/g,"$1 /$2")}return e}function qf(e,t,s){let r=U({},e);async function n(i){u.mode.watch&&W(),i.snippet?(r.namespace="snippets",r.key=pathe.join("snippets",Mr(r,i.rename)),r.output=pathe.join(u.dirs.output,r.key)):(r.key=pathe.join("assets",Mr(r,i.rename)),r.output=pathe.join(u.dirs.output,r.key));let o=i.svgo===!0?u.processor.svgo:i.svgo,c=(await fsExtra.readFile(r.input)).toString();if(Na(c))return f.skipped(r,"Liquid Detected"),null;let h=Mf(c);r.size=ve(h);let p;try{p=_i.optimize(h,o);}catch(D){return f.err(D.toString()),null}f.process("SVGO",Y());let{data:l}=p,m=Oe(l,r.size);m.isSmaller?f.transform(`${r.kind} ${m.before} \u2192 gzip ${m.gzip}`):f.minified(r.kind,m.before,m.after,m.saved),await fsExtra.writeFile(r.output,l).catch(q.write("Error writing SVG",{file:r.key,caller:e.relative})),t&&(f.syncing(r.key),await t("put",r,l));}return n}async function Vs(e,t,s){u.mode.watch&&W();let r=Lf(e,t),n=qf(e,t),i=e.data.length;for(let o=0;o<i;o++){let a=e.data[o];o>0&&u.mode.watch&&f.changed(e),a.format==="sprite"&&await r(a),a.format==="file"&&await n(a);}}async function cr(e,t){return d(e,u.cache.pages)?t.id in u.cache.pages[e]?(u.cache.pages[e][t.id]=t,await Gt(),2):(u.cache.pages[e][t.id]=t,await Gt(),1):(u.cache.pages[e]={[t.id]:t},await Gt(),1)}async function Gt(){u.cache.updated=Date.now();try{await fsExtra.writeJson(u.cache.uri,u.cache,{spaces:0});}catch(e){throw console.error(e)}}async function Ia(e){u.cache.lastResource="build",W();let{paths:t,dirs:s,watch:r,filters:n,mode:i}=u,o=J(n)===!1,a=js(t,s.output),c=pl__default.default(at(r.values())),h=await cl__default.default("**",{absolute:!0,cwd:s.input}),p={},l=h.filter(c).reduce((D,C)=>{let E=a(C);if(X(E))return D;switch(E.type){case 8:D.styles.files.push(E);break;case 9:D.scripts.files.push(E);break;case 4:D.sections.files.push(E);break;case 2:D.layouts.files.push(E);break;case 3:D.snippets.files.push(E);break;case 7:D.locales.files.push(E);break;case 6:D.configs.files.push(E);break;case 1:D.templates.files.push(E);break;case 15:D.pages.files.push(E);break;case 13:D.assets.files.push(E);break;case 14:D.metafields.files.push(E);break;case 10:{for(let{uuid:_,format:H,input:K}of E.data)if(!d(_,p))if(p[_]=!0,H==="sprite")D.svgs.files.push(E);else for(let ee of K)D.svgs.files.push(a(ee));break}}return D},{styles:{time:A,files:[],report:null},scripts:{time:A,files:[],report:null},svgs:{time:A,files:[],report:null},sections:{time:A,files:[],report:null},layouts:{time:A,files:[],report:null},metaobject:{time:A,files:[],report:null},templates:{time:A,files:[],report:null},snippets:{time:A,files:[],report:null},locales:{time:A,files:[],report:null},configs:{time:A,files:[],report:null},pages:{time:A,files:[],report:null},metafields:{time:A,files:[],report:null},assets:{time:A,files:[],report:null}}),m=(D,C,E)=>async _=>{W();try{f.build(D,C,_);let H=await(_.ext===".json"?$t(_,e):E(_,e));return u.cache.maps[_.output]=_.input,f.out(R.tree("bottom",y.neonGreen(_.key))),H===null||isNaN(_.size)?{name:_.base,input:_.relative,time:Y(),output:_.key,error:"Skipped File"}:{name:_.base,input:_.relative,output:_.key,error:null,time:"",size:Oe(H,_.size)}}catch(H){return f.out(R.tree("bottom",y.redBright(_.key))),{name:_.base,input:_.relative,output:_.key,time:Y(),error:H.message}}};for(let D in l){W();let C=l[D].files,E=C.length;if(D==="styles"&&i.style){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,Us),C),l[D].time=Y();}else if(D==="scripts"&&i.script){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,Ws),C),l[D].time=Y();}else if(D==="layouts"||D==="snippets"||D==="sections"||D==="templates"){if(i.views){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,qt),C),l[D].time=Y();}}else if(D==="locales"||D==="configs"||D==="metafields"){if(i.views){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,$t),C),l[D].time=Y();}}else if(!(D==="pages"&&i.views)){if(D==="assets"&&i.views){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,qs),C),l[D].time=Y();}else if(D==="svgs"&&i.svg){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,Vs),C),l[D].time=Y();}}}u.cache.lastBuild=Date.now(),await Gt(),f.nwl(),f.update(`${x.gray}Build Completed ${g(`~ ${Y()}`)}`),f.nwl(),process.exit(0);}function Uf(e){e.addRule("taskListItems",{filter:function(t){return t.type==="checkbox"&&t.parentNode.nodeName==="LI"},replacement:function(t,s){return (s.checked?"[x]":"[ ]")+" "}});}function Vf(e){let t=/highlight-(?:text|source)-([a-z0-9]+)/;e.addRule("highlightedCodeBlock",{filter:function(s){let r=s.firstChild;return s.nodeName==="DIV"&&t.test(s.className)&&r&&r.nodeName==="PRE"},replacement:function(s,r,n){let o=((r.className||"").match(t)||[null,""])[1];return `
113
+
114
+ `+n.fence+o+`
115
+ `+r.firstChild.textContent+`
116
+ `+n.fence+`
117
+
118
+ `}});}function Hf(e){e.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(t){return "~"+t+"~"}});}function Jf(e){let{indexOf:t,every:s}=Array.prototype;function r(l){let m=l.parentNode;return m.nodeName==="THEAD"||m.firstChild===l&&(m.nodeName==="TABLE"||n(m))&&s.call(l.childNodes,function(D){return D.nodeName==="TH"})}function n(l){let m=l.previousSibling;return l.nodeName==="TBODY"&&(!m||m.nodeName==="THEAD"&&/^\s*$/i.test(m.textContent))}function i(l,m=null,D=null){D===null&&(D=t.call(m.parentNode.childNodes,m));let C=" ";D===0&&(C="| ");let E=l.trim().replace(/\n\r/g,"<br>").replace(/\n/g,"<br>");for(E=E.replace(/\|+/g,"\\|");E.length<3;)E+=" ";return m&&(E=h(E,m," ")),C+E+" |"}function o(l){if(!l.childNodes)return !1;for(let m=0;m<l.childNodes.length;m++){let D=l.childNodes[m];if(D.nodeName==="TABLE"||o(D))return !0}return !1}function a(l){return !!(!l||!l.rows||l.rows.length===1&&l.rows[0].childNodes.length<=1||o(l))}function c(l){let m=l.parentNode;for(;m.nodeName!=="TABLE";)if(m=m.parentNode,!m)return null;return m}function h(l,m,D){let C=Number(m.getAttribute("colspan"))||1;for(let E=1;E<C;E++)l+=" | "+D.repeat(3);return l}function p(l){let m=0;for(let D=0;D<l.rows.length;D++){let E=l.rows[D].childNodes.length;E>m&&(m=E);}return m}e.keep(function(l){return l.nodeName==="TABLE"}),e.addRule("tableCell",{filter:["th","td"],replacement:function(l,m){return a(c(m))?l:i(l,m)}}),e.addRule("tableRow",{filter:"tr",replacement:function(l,m){let D=c(m);if(a(D))return l;let C="",E={left:":--",right:"--:",center:":-:"};if(r(m)){let _=p(D);for(let H=0;H<_;H++){let K=_>=m.childNodes.length?null:m.childNodes[H],ee="---",Ne=K?(K.getAttribute("align")||"").toLowerCase():"";Ne&&(ee=E[Ne]||ee),K?C+=i(ee,m.childNodes[H]):C+=i(ee,null,H);}}return `
119
+ `+l+(C?`
120
+ `+C:"")}}),e.addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(l){return l}}),e.addRule("table",{filter:function(l){return l.nodeName==="TABLE"},replacement:function(l,m){if(a(m))return l;l=l.replace(/\n+/g,`
121
+ `);let D=l.trim().split(`
122
+ `);D.length>=2&&(D=D[1]);let C=D.indexOf("| ---")===0,E=p(m),_="";return E&&!C&&(_="|"+" |".repeat(E)+`
123
+ |`+" --- |".repeat(E)),`
124
+
125
+ `+_+l+`
126
+
127
+ `}});}function La(e){e.use([Vf,Hf,Jf,Uf]);}function Yf(e){return e==="boolean"||e==="color"||e==="date"||e==="date_time"||e==="dimension"||e==="json"||e==="money"||e==="multi_line_text_field"||e==="number_decimal"||e==="number_integer"||e==="rating"||e==="rich_text_field"||e==="single_line_text_field"||e==="url"||e==="volume"||e==="weight"}function Ma(e,t){for(let s of t)for(let r of ["key","type","value","namespace","description"]){if(r!=="description"&&!d(r,s))return f.invalid(e.relative,[`Missing ${y.blue.bold(r)} property key value in a ${y.yellowBright.bold("metafields")}`,"value of page frontmatter. Frontmatter metafields require you provide the following keys:","",`${y.gray("-")} ${y.white("key")}`,`${y.gray("-")} ${y.white("type")}`,`${y.gray("-")} ${y.white("value")}`,`${y.gray("-")} ${y.white("namespace")}`,"",`${y.gray("Update the metafield entry to include")} ${y.white(r)}`]),!1;if(r==="type"){let n=s[r];if(!Yf(n))return f.invalid(e.relative,[`Invalid type ${y.blue.bold(n)} provided in a page frontmatter ${y.yellowBright.bold("metafields")}`,`value. Frontmatter metafields ${y.bold("must")} be one of following types:`,"",`${y.gray("-")} ${y.white("boolean")}`,`${y.gray("-")} ${y.white("color")}`,`${y.gray("-")} ${y.white("date")}`,`${y.gray("-")} ${y.white("date_time")}`,`${y.gray("-")} ${y.white("dimension")}`,`${y.gray("-")} ${y.white("json")}`,`${y.gray("-")} ${y.white("money")}`,`${y.gray("-")} ${y.white("multi_line_text_field")}`,`${y.gray("-")} ${y.white("number_decimal")}`,`${y.gray("-")} ${y.white("number_integer")}`,`${y.gray("-")} ${y.white("rating")}`,`${y.gray("-")} ${y.white("rich_text_field")}`,`${y.gray("-")} ${y.white("single_line_text_field")}`,`${y.gray("-")} ${y.white("url")}`,`${y.gray("-")} ${y.white("volume")}`,`${y.gray("-")} ${y.white("weigh")}`,"",`${y.gray("Update the metafield entry to an accepted")} ${y.white("type")}`]),!1}}return !0}async function Oi(e){return $e.get("pages.json",e.client).then(({data:t})=>t.pages).catch(t=>{ft(t.response.status)?G.add(()=>Oi(e)):console.error(t);})}async function qa(e,t){if(Me(d("handle",t),d("title",t))){console.log("invalid fields");return}return $e.get("pages.json",e.client).then(({data:s})=>d("handle",t)&&d("title",t)?s.pages.find(r=>t.title===r.title&&t.handle===r.handle):d("handle",t)?s.pages.find(r=>t.handle===r.handle):d("title",t)?s.pages.find(r=>t.title===r.title):void 0).catch(s=>{console.log(s);})}async function Js(e,t){u.mode.upload||W();let s=await $e.post("/pages.json",{page:t},e.client).then(({data:r})=>(f.resource("page",e),r.page)).catch(r=>{ft(r.response.status)?G.add(()=>Js(e,t)):Ve("response.data",r.response)&&q.request(t.title,r.response);});if(s)return await cr(e.domain,s),s}async function ji(e,t,s){let{mode:r}=u;r.upload||W();let n=`pages/${s.id}.json`,i=await $e.put(n,{page:s},e.client).then(({data:o})=>(r.watch?f.resource("page",e):r.upload&&Ie.emit("upload","uploaded",s,{key:t.key,namespace:t.namespace,fileSize:nt(s.body_html)}),o.page)).catch(o=>{ft(o.response.status)?G.add(()=>ji(e,t,s)):console.log(o);});if(i)return i}function nm(e){let t=new tm__default.default(u.page.import);return t.use(La),t.turndown(e)}async function im(e){let t=f.prompt("No matching pages, select an option",{title:"No matching pages",message:"Open CLI and select an option"}),s=await Ys__default.default({type:"select",name:"action",message:"Page Resources",hint:" ",instructions:!1,choices:[{title:"Create Page",description:`Create a new page on ${e.domain}`,value:1},{title:"Select Page",description:`Select a page to overwrite on ${e.domain}`,value:2},{title:"Cancel",description:"Cancel, and skip this sync operation",value:4}]});return {resume:t,action:s.action}}async function om(e){let t=await Oi(e);if(!t)return;let s=t.map(n=>({title:n.title,description:`https://admin.shopify.com/store/${e.store.toLowerCase()}/pages/${n.id}`,value:n.id}));return s.push({title:Hn(20),disabled:!0,selected:!1},{title:"Create New Page",description:`Create a new page on ${e.domain}`,value:1},{title:"Cancel",description:"Cancel, and skip this sync operation",value:4}),(await Ys__default.default({type:"select",name:"action",message:"Choose Page",hint:" ",instructions:!1,choices:s})).action}async function um(e){let t=[{title:"View Source",description:"Prints the page source in the CLI",value:5},{title:"Update Local",description:"Update the local source with remote version",value:3},{title:"Overwrite Remote",description:"Overwrite the remote version with local source",value:6},{title:"Cancel",description:"Cancel, and skip this sync operation",value:4}],s=f.prompt("Remote version is newer than local version",{title:"Remote \u2192 Local",message:"Remote version has changed"}),r=await Ys__default.default({type:"select",name:"action",message:"Page Resources",hint:" ",instructions:!1,choices:t});if(r.action===5){Ae(""),f.out(sm__default.default(e.body_html)),Ae("");let n=await Ys__default.default({type:"select",name:"action",message:"Page Resources",hint:" ",instructions:!1,choices:t.slice(1)});return {resume:s,action:n.action}}else return {resume:s,action:r.action}}function am(e,t){let s={};if(d("title",t)?s.title=`${t.title}`:s.title=Rt(e.name.replace(/[._-]/g," ")),d("handle",t)){let r,n=t.handle;/^[./]{1,2}/.test(n)&&(r=n,n=n.replace(/^[./]{1,2}/,A),f.warn(`handle ${y.CHV} ${r} ${y.ARR} ${n}`,"fixed start")),/^pages\//.test(n)&&(r=n,n=n.replace(/^pages\//,A),f.warn(`handle ${y.CHV} ${r} ${y.ARR} ${n}`,"fixed sub-path")),/[_/]/.test(t.handle)&&(r=n,n=n.replace(/[_/]/g,"-"),f.warn(`handle ${y.CHV} ${r} ${y.ARR} ${n}`,"fixed invalid characters")),s.handle=n;}else d("title",t)?s.handle=Oo(t.title):s.handle=e.name.toLowerCase();if(d("author",t)&&u.page.author!==""){let r,n=t.author;/\//.test(t.author)&&(r=t.author,n=r.replace(/\//g," "),f.warn(`author ${y.CHV} ${r} ${y.ARR} ${n}`,"fixed invalid characters")),s.author=n;}else t.author=u.page.author;return d("published",t)?oe(t.published)?s.published=t.published:(f.warn(`published ${y.CHV} expected boolean, got ${typeof t.published}`,"defaulted to false"),s.published=!1):s.published=!0,d("template_suffix",t)&&(d("template",t)?(f.warn("duplicate template_suffix references","using template"),delete t.template_suffix):(t.template=t.template_suffix,delete t.template_suffix)),d("template",t)?s.template_suffix=t.template:u.page.suffixDir&&Bt(u.page.global)&&u.page.global.test(e.input)!==!1&&(s.template_suffix=Fe(e.input)),d("metafield",t)&&(f.warn("use metafields instead of metafield","sync will still process"),t.metafields=t.metafield,delete t.metafield),d("metafields",t)?I(t.metafields)&&(s.metafields=[t.metafields]):s.metafields=void 0,s}async function Ga(e,t){if(u.sync.stores.length>1)return f.skipped(e,"pages do not support multistore sync"),null;let s=await fsExtra.readFile(e.input);if(J(s.toString()))return u.mode.watch&&f.skipped(e,"empty file"),null;let r=Zf__default.default(s),{data:n,content:i}={...r},o=am(e,n);if(S(o.metafields)&&!Ma(e,o.metafields))return null;e.kind==="Markdown"?(W(),o.body_html=rm__default.default(u.page.export).render(i),f.transform(`${y.bold("Markdown")} ${y.ARR} ${y.bold("HTML")} ${y.TLD} ${Y()}`)):(f.process("HTML"),o.body_html=i);let a=u.sync.stores[0],c=await qa(a,{handle:o.handle});if(S(c))return f.invalid(e.relative,[`Multiple pages returned when matching on handle ${y.blue.bold(o.handle)}`,"Syncify is unsure of to handle this request and has cancelled the sync. Please","check the provided handle in your webshop."]),null;let h;if(I(c)&&(o.id=c.id,c.id in u.cache.pages?.[a.domain]?h=u.cache.pages[a.domain][c.id]:(await cr(a.domain,c),h=c)),X(c)&&u.page.safeSync){let l=await im(a);if(l.action===2){let m=await om(a);if(m===4)return l.resume();if(m===1)return l.resume(),f.syncing(`/pages/${o.handle} ${y.ARR} ${o.title} ${y.gray(`${y.TLD} ${e.relative}`)}`),Js(a,o);o.id=m,l.resume();}else return l.action===1?(l.resume(),f.syncing(`/pages/${o.handle} ${y.ARR} ${o.title} ${y.gray(`${y.TLD} ${e.relative}`)}`),Js(a,o)):l.resume()}if(u.page.safeSync&&I(c)){let l=new Date(c.updated_at).getTime(),m=new Date(h.updated_at).getTime();if(l>m&&c.body_html!==o.body_html){let D=await um(c);if(D.action===3){D.resume(),f.updated(e,"local source aligned with remote");let C=c.body_html;if(u.page.importLanguage==="markdown"){let E=nm(C);f.transform(`${e.name}.html ${be} ${e.base}`),C=Zf.stringify(`
128
+ `+E,r.data);}u.watch.unwatch(e.input),await fsExtra.writeFile(e.input,C),await cr(a.domain,c),u.watch.add(e.input);}else {if(D.action===4)return D.resume();D.action===6&&D.resume();}}}if(u.mode.build)return o.body_html;f.syncing(`/pages/${o.handle} ${y.ARR} ${o.title} ${y.gray(`${y.TLD} ${e.relative}`)}`);let p=await ji(a,e,o);p&&await cr(a.domain,p);}function Wa(e){u.cache.lastResource="watch";let{sync:t,watch:s,mode:r,paths:n,wss:i,dirs:o}=u,a=ur(t),c=js(n,o.output);r.hot&&u.wss.connected(),s.on("all",function(p,l){let m=c(l);if(!X(m)){if(m.base===u.file.base)return f.configChanges();if(m.type!==16&&f.changed(m),p==="change"||p==="add")h(m);else if(p==="unlink")return m.type===15?a.pages("delete",m):a.assets("delete",m)}});async function h(p){try{let l=null;if(p.type===9)return Ws(p,a.assets,e);if(p.type===15)return Ga(p,e);if(p.type===10)return Vs(p,a.assets,e);if(p.type===13||p.type===16)return qs(p,a.assets,e);if(p.type===8?l=await Us(p,e):p.type===4&&p.kind==="Liquid"&&(l=await qt(p,e)),p.type===4&&p.kind==="JSON")l=await $t(p,e);else if(p.type===2)l=await qt(p,e);else if(p.type===3)l=await qt(p,e);else if(p.type===7||p.type===6)l=await $t(p,e);else {if(p.type===14)return l=await $t(p,e),a.metafields({value:l,namespace:p.namespace,key:p.key});p.type===1&&p.kind==="JSON"?l=await $t(p,e):p.type===1&&p.kind==="Liquid"&&(l=await qt(p,e));}j(l)||(f.syncing(p.key),await a.assets("put",p,l),r.hot&&(p.type===4?i.section(p.name):p.type!==9&&p.type!==8&&await G.onIdle().then(()=>i.replace())));}catch(l){console.error(l),f.err(l);}}}var za=!1,Ua=!1,Ni=new Set;function Qs(e,t){if(!za){za=!0;for(let s of Ni)s();e&&process.exit(128+t);}}function Ks(e){return Ni.add(e),Ua||(Ua=!0,process.once("exit",Qs),process.once("SIGINT",Qs.bind(void 0,!0,2)),process.once("SIGTERM",Qs.bind(void 0,!0,15)),process.on("message",t=>{t==="shutdown"&&Qs(!0,-128);})),()=>Ni.delete(e)}var Wt={enable:!0,output:[]};async function ym(){if(f.update(R.message("gray","validating snippet injection")),await wa()){f.update(R.message("gray","validating layouts"));for(let t in u.hot.alive){if(!await fsExtra.pathExists(t)){f.update(R.message("gray","layout has not yet been bundled, building now..."));let n=cl__default.default.sync(u.config.paths.layout,{cwd:u.dirs.input,absolute:!0});for(let i of n)if(pathe.basename(i)===pathe.basename(t)){let o=await fsExtra.readFile(i);await fsExtra.writeFile(t,o);}f.update(R.message("gray","layout was bundled from source, injecting hot snippet"));}await Ea(t)||(f.update.clear(),f.err("Failed to inject hot reload render tag"));}f.update.clear();}else f.update.clear(),f.err("Failed to upload snippet");}async function Va(){if(!Wt.enable)return Wt.output.push(x.red,x.red+se("Change the socket port address or kill the session occupying it."),x.red+se("This error typically occurs when multiple Syncify instances are active.")),f.err(se(`${F("ERROR")} on ${F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reload:`)}`)),f.out(Wt.output.join(w)),null;f.out(R.message("whiteBright",F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reloading:`))),f.nwl(),f.update(R.message("gray","configuring HOT Reload")),await ym();function e(a){a.setHeader("Access-Control-Allow-Origin","*"),a.setHeader("Cache-Control","public, max-age=0");}let t=pm__default.default(pathe.join(u.dirs.output,"assets"),{setHeaders:e}),s=mm__default.default.createServer((a,c)=>t(a,c,fm__default.default(a,c))),r=`http://localhost:${u.hot.server}`,n=a=>{if(a.code==="EADDRINUSE")return Wt.output.push(x.red+se(`${F("EADDRINUSE")} ${be} ${r}`),x.red,x.red+se.bold(`Server Port ${u.hot.server} address already in use`),x.red,x.red+se("Change the server port address or kill the session occupying it."),x.red+se("This error typically occurs when multiple Syncify instances are active.")),f.update.clear(),f.out(Wt.output.join(w)),u.wss.http.close(),null},i=()=>{f.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=Xe("PORT")+N+g(`${u.hot.server}`);f.update(R.message("pink",`server ${be} ${F("localhost")} ${be} ${o}`));}function Ha(){if(u.mode.hot===!1)return;let e=new ws$1.Server({port:u.hot.socket,path:"/ws",skipUTF8Validation:!0});Ks(()=>{e.emit("disconnect"),e.close();});let t=n=>{n.code==="EADDRINUSE"&&(e.close(),Wt.enable=!1,Wt.output.push(x.red+se(`${F("EADDRINUSE")} ${be} ws://localhost:${u.hot.server}`),x.red,x.red+se.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",pathe.basename(n)),stylesheet:n=>e.emit("stylesheet",pathe.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 Ja(e){let t=e.toString().trim().toLowerCase();if(t==="v"){let s=Re(Yt);for(let r=0,n=s.length;r<n;r++){let i=s[r];if(Yt[i].size!==0){r>0&&f.hline(10),f.write(y.bold.whiteBright(i));for(let o of Yt[i].values())typeof o=="string"&&o.length>0&&te(o);Yt[i].clear();}}u.mode.upload&&(B(R.closer("Upload"),w),process.exit(0));}else if(t==="w"){for(let s in De.process)if(De.process[s].size!==0){f.nwl(),f.write(y.bold.yellow(s)),f.nwl();for(let r of De.process[s].values())typeof r=="string"&&r.length>0&&f.write(R.multiline("warning",r));De.process[s].clear();}De.count=0;}}`
129
+ ${g("-----------------------------------------------------------------------------")}
130
+ ${F("Syncify CLI Examples")} ${g("by Panoply")}
131
+ ${g("-----------------------------------------------------------------------------")}
132
+
133
+ ${F("Watching"+N)}
134
+
135
+ ${g("Targeting 1 store and 1 theme")}:
136
+ $ sync your-store${g("=")}theme-1 --watch
137
+
138
+ ${g("Targeting 1 store and 2 themes with hot reloading")}:
139
+ $ sync your-store${g("=")}theme-1,theme-2 --watch --hot
140
+
141
+ ${g("Targeting 2 stores and 1 theme")}:
142
+ $ sync --your-store${g("=")}theme-1 --another-store${g("=")}some-theme --watch
143
+
144
+ ${g("Targeting 2 stores and 2 themes")}:
145
+ $ sync --your-store${g("=")}theme-1,theme-2 --another-store${g("=")}some-theme,test-theme --watch
146
+
147
+ ${g("Targeting 1 store with 2 themes and clean mode with hot live reloads")}:
148
+ $ sync your-store${g("=")}theme-1,theme-2 --watch --clean --hot
149
+
150
+ ${g("Targeting 1 store with 2 themes in production mode")}:
151
+ $ sync your-store${g("=")}theme-1,theme-2 --prod --watch
152
+
153
+ `;var Ya=`
154
+ ${g("-----------------------------------------------------------------------------")}
155
+ ${F("Syncify")} <!version!> ${g("by Panoply")}
156
+ ${g("-----------------------------------------------------------------------------")}
142
157
 
143
158
  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.
159
+ you have defined stores, themes and setup credentials within a ${g(".env")} file.
145
160
 
146
- ${F("Aliases"+R)}
161
+ ${F("Aliases"+N)}
147
162
 
148
163
  $ sync
149
164
 
150
- ${F("Commands"+R)}
165
+ ${F("Commands"+N)}
151
166
 
152
- $ syncify ${d.italic("Interactive prompt")}
153
- $ syncify {store} [theme] ${d.italic("Prints list of connected stores")}
167
+ $ syncify ${g.italic("Interactive prompt")}
168
+ $ syncify {store} [theme] ${g.italic("Prints list of connected stores")}
154
169
 
155
- ${F("Themes"+R)}
170
+ ${F("Themes"+N)}
156
171
 
157
- --<store> [theme] ${d.italic("A store reference command (run examples)")}
158
- -t, --theme [theme] ${d.italic("A comma seprated list of themes")}
172
+ --<store> [theme] ${g.italic("A store reference command (run examples)")}
173
+ -t, --theme [theme] ${g.italic("A comma seprated list of themes")}
159
174
 
160
- ${F("Paths"+R)}
175
+ ${F("Paths"+N)}
161
176
 
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")}
177
+ -c, --config <path> ${g.italic("Set configs path")}
178
+ -i, --input <path> ${g.italic("Set input path")}
179
+ -o, --output <path> ${g.italic("Set output path")}
165
180
 
166
- ${F("Utility"+R)}
181
+ ${F("Utility"+N)}
167
182
 
168
- -f, --filter <path> ${d.italic("Glob path, use with pull or push triggers")}
183
+ -f, --filter <path> ${g.italic("Glob path, use with pull or push triggers")}
169
184
 
170
- ${F("Environment"+R)}
185
+ ${F("Environment"+N)}
171
186
 
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")}
187
+ --dev ${g.italic("Build in development mode (default)")}
188
+ --prod ${g.italic("Build in production mode")}
189
+ --hot ${g.italic("Run watch with hot-reloads")}
175
190
 
176
- ${F("Modes"+R)}
191
+ ${F("Modes"+N)}
177
192
 
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")}
193
+ -w, --watch ${g.italic("Run watch mode")}
194
+ -b, --build ${g.italic("Run build mode from input")}
195
+ -u, --upload ${g.italic("Run upload mode theme to stores")}
196
+ -d, --download ${g.italic("Run download mode from theme and stores")}
197
+ -m, --metafields ${g.italic("Run metafields resource mode")}
198
+ -p, --pages ${g.italic("Run pages resource mode")}
199
+ -r, --redirects ${g.italic("Run redirects resource mode")}
185
200
 
186
- ${F("Resource"+R)}
201
+ ${F("Resource"+N)}
187
202
 
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")}
203
+ --pull ${g.italic("Pull a resource from a shop or theme")}
204
+ --push ${g.italic("Push a resource to a shop or theme")}
205
+ --silent ${g.italic("Silent logs, only warnings or errors are printed")}
191
206
 
192
- ${F("Trigger"+R)}
207
+ ${F("Trigger"+N)}
193
208
 
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")}
209
+ --spawn [list] ${g.italic("Invoke a defined spawn child process/s")}
210
+ --delete [list] ${g.italic("Delete a remote and local file")}
211
+ --minify [list] ${g.italic("invoke minify mode, accepts resource/s")}
197
212
 
198
- ${F("Other"+R)}
213
+ ${F("Other"+N)}
199
214
 
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")}
215
+ --strap ${g.italic("Import a strap into the project")}
216
+ --vsc ${g.italic("Generate vscode specific settings")}
217
+ --help ${g.italic("Show the screen")}
203
218
 
204
- ${F("Help"+R)}
219
+ ${F("Help"+N)}
205
220
 
206
- -h, --help ${d.italic("Print this screen")}
207
- -h, --help {examples} ${d.italic("Print a list of command examples")}
221
+ -h, --help ${g.italic("Print this screen")}
222
+ -h, --help {examples} ${g.italic("Print a list of command examples")}
208
223
 
209
- ${d("-----------------------------------------------------------------------------")}
224
+ ${g("-----------------------------------------------------------------------------")}
210
225
 
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
- 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 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;
226
+ `;function $m(e,t){return e.replace(ss,`.bundled_${Ye()}.${t==="esm"?"mjs":"cjs"}`)}function vm(e){if(typeof jest>"u")return "cjs";let t=pathe.extname(e);return t===".js"?u.pkg.type==="module"?"esm":"cjs":t===".ts"||t===".mjs"?"esm":"cjs"}function Bm(e){return Re(e||{}).map(t=>new RegExp(`^${t.replace(/\*/,".*")}$`))}function Qa(e,t){return t?t.some(s=>s instanceof RegExp?s.test(e):e===s||e.startsWith(s+"/")):!1}function Am({external:e,notExternal:t}={}){return {name:"bundle-require:external",setup({onResolve:s}){s({filter:/.*/},async r=>{if(!(r.path.charCodeAt(0)===46||pathe.isAbsolute(r.path))){if(Qa(r.path,e))return {external:!0};if(!Qa(r.path,t))return {external:!0}}});}}}function Tm(){return {name:"bundle-require:inject-file-scope",setup(e){e.initialOptions.define={...e.initialOptions.define,__dirname:fn,__filename:mn,"import.meta.url":dn},e.onLoad({filter:ss},async t=>{let s=await fsExtra.readFile(t.path,"utf-8");return {contents:[`const ${mn} = ${JSON.stringify(t.path)};`,`const ${fn} = ${JSON.stringify(pathe.dirname(t.path))};`,`const ${dn} = ${JSON.stringify(url.pathToFileURL(t.path).href)};`].join("")+s,loader:No(pathe.extname(t.path))}});}}}async function Wr(e){if(!ss.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??vm(e.filepath),n=loadTsconfig.loadTsConfig(s,e.tsconfig),i=Bm(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],m=(e.getOutputFile||$m)(e.filepath,r);await fsExtra.writeFile(m,p,"utf8");let D,C=e.require||jo;try{D=await C(r==="esm"?url.pathToFileURL(m).href:m,{format:r});}finally{t||await fsExtra.unlink(m);}return {mod:D,dependencies:h.metafile?Re(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||[],Am({external:e.external,notExternal:i}),Tm()]});return await o(a)}async function rl(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=pathe.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=pathe.relative(e,t),u.file.base=pathe.basename(t);let s=await fsExtra.readFile(t);return ko(s.toString())}else {u.file.path=t,u.file.relative=pathe.relative(e,t),u.file.base=pathe.basename(t);let s=await Wr({filepath:t});return s.mod.syncify||s.mod.default||s.mod}}catch(s){console.log(s);let r=pathe.join(e,"syncify.config.json");return await fsExtra.pathExists(r)?fsExtra.readJson(r):null}}async function sl(e){let t=pathe.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 qi(e,t={purge:!1}){if(await fsExtra.remove(e),u.cache={uri:pathe.join(e,"build.map"),version:u.version,maps:{},pages:{},metafields:{},sourcemaps:{script:null,style:null}},!await fsExtra.pathExists(e))try{await fsExtra.mkdir(e);}catch(r){throw new Error(r)}for(let r of co){let n=pathe.join(e,r,"/");if(r==="sourcemaps/script"?u.cache.sourcemaps.script=n:r==="sourcemaps/style"&&(u.cache.sourcemaps.style=n),await fsExtra.pathExists(n))t.purge&&await fsExtra.emptyDir(n);else try{await fsExtra.mkdir(n);}catch(o){throw new Error(o)}}await Gt();}async function Gi(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 wr){let r=pathe.join(e,s);if(!await fsExtra.pathExists(r))try{await fsExtra.mkdir(r);}catch(i){throw new Error(i)}}}function nl(e){let{config:t,cwd:s,mode:r,dirs:n}=u,i=Ju(s);for(let[o,a]of po){let c;if(o==="import"){r.download?d("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?d("output",e)?u.dirs[o]=i(e.output):u.dirs[o]=i(t.export):u.dirs[o]=i(t.export);continue}else if(d(o,e)&&e[o]===a)if(t[o]===a){u.dirs[o]=i(e[o]);continue}else c=t[o];else L(e[o])?c=e[o]:c=t[o];if(S(c)){let h=Yr(c.map(i));n[o]=h.length===1?h[0]:h;}else L(c)?n[o]=i(c):k({option:"config",name:o,provided:c,expects:"string"});}u.watch.add(u.file.path);}async function il(){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=pathe.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 Gi(pathe.join(a,o));}}function ol(e){if(!d("json",e.processors))return;let{json:t}=e.processors;if(!j(t)&&!(I(t)&&J(t))){I(t)||k({option:"processors",name:"json",expects:"{}",provided:typeof t});for(let s in t){if(s==="indent")if(Xr(t[s])){u.processor.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"number"});if(s==="useTab")if(oe(t[s])){u.processor.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"boolean"});if(s==="exclude"){let r=L(t[s])?[t[s]]:t[s];if(S(r)){u.processor.json[s]=pl__default.default(r);continue}else k({option:"json",name:s,provided:r[s],expects:"string | string[]"});}}}}function ul(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=U(u.mode,{watch:r,hot:Yi(e.watch,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 Me(...Kr(n))&&Et({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:","",`${b("$")} ${b(`syncify ${u.argv} ${v("--watch")}`)}`,`${b("$")} ${b(`syncify ${u.argv} ${v("--build")}`)}`,`${b("$")} ${b(`syncify ${u.argv} ${v("--upload")}`)}`,"",`Run ${v("syncify --help")} for more information, or pass an execution`,`operation mode as per the ${v("expected")} value and ensure to replace ${v("--<cmd>")}`,"with one the examples provided or a supported mode."]}),n.build&&Me(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 al(e){if(!d("snippets",e.views))return;let{snippets:t}=e.views;if(!j(t)&&!(I(t)&&J(t))){I(t)||k({option:"views",name:"snippets",expects:"{}",provided:typeof t});for(let s in u.snippet){if(s==="prefixDir")if(oe(t[s])){u.snippet[s]=t[s];continue}else k({option:"views.snippets",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(L(t[s]))if(/[.@:_-]/.test(t[s])){u.section[s]=t[s];continue}else fe("snippets",s,t[s],"@ | _ | : | - | .");else k({option:"views.snippets",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=L(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 ll(e){if(!d("sections",e.views))return;let{sections:t}=e.views;if(!j(e.views.sections)&&!(I(t)&&J(t))){I(t)||k({option:"views",name:"sections",expects:"{}",provided:typeof t});for(let s in u.section){if(s==="prefixDir")if(oe(t[s])){u.section[s]=t[s];continue}else k({option:"views.sections",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(L(t[s]))if(/[@:_-]/.test(t[s])){u.section[s]=t[s];continue}else fe("view.sections",s,t[s],"@ | _ | : | -");else k({option:"views.sections",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=L(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 Wi(e,t,s){let r=e+"_api_token";if(d(r,t)||(r=r.toUpperCase()),d(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(d(n,t)||(n=n.toUpperCase()),d(i,t)||(i=i.toUpperCase()),d(n,t)&&d(i,t))return {baseURL:`https://${e}.myshopify.com/admin`,auth:{username:t[n],password:t[i]}};s===1?ce(`Invalid or missing ${M(e+".myshopify.com")} credentials`,[`Your shop credentials in the ${M.bold(".env")} file could`,"not be read correctly or are missing."]):s===2&&ce(`Missing credentials for: ${M(e+".myshopify.com")}`,`
227
+ You need to provide shop credentials within a ${M.bold(".env")} file.
228
+ Please check you project setup and ensure you have correctly provided authorization.`);}function ze(e,t){let{cwd:s}=u,r=Se(t)?[]:!1,n=Be("Path Resolver"),i=ir(u.dirs.input);if(S(e)){let o=[];for(let a of e){let c=i(a),h=cl__default.default.sync(c,{cwd:s,absolute:!0});if(r){let p=t(c);L(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:pl__default.default(r)}:o}if(L(e)){let o=i(e),a=cl__default.default.sync(o,{cwd:s});if(a.length===0&&n("No files can be resolved in",e),r){let c=t(o);L(c)?r.push(c):S(c)&&r.push(...c);}return r?{paths:a,match:pl__default.default(r)}:a}k({option:"uri",name:"uri/path",provided:e,expects:"string | string[]"});}function dr(e,t){if(d("assertSnippet",t)||(t.assertSnippet=!0),L(e)){let{paths:s,match:r}=ze(e,n=>(t.addWatch&&u.watch.add(n),St(n)));if(s){if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:pathe.basename(n),snippet:!1}:{input:n,rename:pathe.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(L)){let{paths:s,match:r}=ze(e,n=>(t.addWatch&&u.watch.add(n),St(n)));if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:pathe.basename(n),snippet:!1}:{input:n,rename:pathe.basename(n)});{let n={input:s,rename:"[name].[ext]",match:r};return t.assertSnippet&&(n.snippet=!1),n}}else if(e.every(I))return e.map(s=>{d("input",s)||fe("tranform","input",s,"{ input: string | string[] }");let{paths:r,match:n}=ze(e,i=>(t.addWatch&&u.watch.add(i),St(i)));return s.match=n,s.input=r,t.assertSnippet&&!d("snippet",s)&&(s.snippet=!1),d("rename",s)||(s.rename=s.snippet?"[name].liquid":"[name].[ext]"),s})}else if(I(e)){let s=[];if(d("input",e)){let{paths:r,match:n}=ze(e.input,i=>(t.addWatch&&u.watch.add(i),St(i)));if(t.assertSnippet&&!d("snippet",e)&&(e.snippet=!1),d("rename",e)||(e.rename=e.snippet?"[name].liquid":"[name].[ext]"),t.flatten)for(let i of r)s.push(U(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(L(o)){a&&(n.rename=i?r.slice(7):r.slice(9));let{paths:c,match:h}=ze(o,p=>(t.addWatch&&u.watch.add(p),St(p)));if(c)if(t.flatten)for(let p of c)s.push(U({},n,{input:p}));else s.push(U({},n,{input:c,match:h}));}else if(I(o)){d("input",o)||fe("tranform",r,o,"{ input: string | string[] }");let{paths:c,match:h}=ze(o.input,p=>(t.addWatch&&u.watch.add(p),St(p)));if(c){let p=a?U({},o,n,{rename:i?r.slice(7):r.slice(9)}):U({},n,o);if(t.flatten)for(let l of c)s.push(U({},p,{input:l}));else s.push(U(p,{input:c,match:h}));}}else if(S(o))if(o.every(L)){let{paths:c,match:h}=ze(o,p=>(t.addWatch&&u.watch.add(p),St(p)));if(Po(r)&&(n.rename=pathe.basename(r)),c)if(t.flatten)for(let p of c)s.push(U({},n,{input:p}));else s.push(U({},n,{input:c,match:h}));}else k({option:"transform",name:r,provided:o,expects:"string[]"});}return s}}function zi(e){let{pkg:t}=u;return ge(d("devDependencies",t)&&d(e,t.devDependencies),d("dependencies",t)&&d(e,t.dependencies),d("peerDependencies",t)&&d(e,t.peerDependencies),d("optionalDependencies",t)&&d(e,t.peerDependencies))}function fl(e,t){let s=t,r=Fe(e),n=pathe.extname(e),i=pathe.basename(e,n);return X(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 ml(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&&Et({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=Om__default.default.config({path:pathe.join(u.cwd,".env")}),o=S(t.stores)?t.stores:[t.stores],a=o.filter(({domain:h})=>un(h,n)),c=a.length>1;for(let h of a){let p=`${h.domain}.myshopify.com`.toLowerCase(),l=i.error?Wi(h.domain,process.env,2):Wi(h.domain,i.parsed,1),m=u.sync.stores.push({store:h.domain,domain:p,client:l,queue:c})-1;if(u.mode.metafields||u.mode.pages)return;let D=d("theme",e)?e.theme.split(","):d(h.domain,e)?e[h.domain].split(","):Re(h.themes);for(let C of D)d(C,h.themes)||Pu({type:"theme",expected:Re(h.themes).join(","),provided:C,message:[`Unknown theme target (${v(C)}) provided to ${v(h.domain)} store`,`Your ${v(u.file.base)} file contains no such theme using this name.`],fix:[`Provide an ${v("expected")} theme target or update/add an existing target.`,`You have ${v(`${D.length}`)} theme targets defined for ${v(h.domain)}:`,"",`${Jt} ${D.join(`
229
+ ${Jt} `)}`,""]}),u.sync.themes.push({target:C,sidx:m,store:p,id:h.themes[C],url:`/themes/${h.themes[C]}/assets.json`});}if(s&&u.sync.stores.length===0)return Et({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:","",`${Jt} ${b("$")} syncify ${o.join(`
230
+ ${Jt} ${b("$")} syncify `)}`,""]});if(u.sync.themes.length===0&&r)return Et({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 ${v("-t")} or ${v("--theme")} flag.`,"Theme targets should be passed as the 2nd argument, the 1st argument should be store name/s."]});u.sync.stores.length===0&&ce("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 hl(e){let t=ir(u.dirs.input),s=Be("path resolution");for(let r of At){let n;if(r==="customers")n=d(r,e.paths)?S(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/customers")];else if(r==="metaobject")n=d(r,e.paths)?S(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/metaobject")];else if(d(r,e.paths))if(n=S(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])],r==="snippets")for(let i of n)u.snippet.baseDir.add(Fe(pathe.dirname(i)));else if(r==="sections")for(let i of n)u.section.baseDir.add(Fe(pathe.dirname(i)));else r==="assets"&&n.push(pathe.join(u.dirs.output,"assets/*"));else r==="redirects"&&d(r,e.paths)?n=[pathe.join(u.cwd,e.paths[r])]:n=[t(r)];for(let i of n){if(r!=="metafields"&&r!=="redirects"){let o=await cl__default.default(i,{cwd:u.cwd});if(o.length===0)s("No files could be resolved in",pathe.relative(u.cwd,i));else {if(u.paths[r].input===null)u.paths[r].input=new Set(o);else for(let a of o)u.paths[r].input.add(a);u.watch.add(i);}}u.paths[r].match=pl__default.default(n);}}}function Ui(e,t,s){let r=Mm__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 gl(e){let{mode:t,spawn:s}=u;if(!d("spawn",e)||j(e.spawn))return;I(e.spawn)||k({option:"config",name:"spawn",provided:e.spawn,expects:"{ build: {}, watch: {} }"});let r=null;if(t.build&&d("build",e.spawn)&&(r="build"),t.watch&&d("watch",e.spawn)&&(r="watch"),!(j(t)||j(e.spawn[r])||(I(e.spawn[r])||k({option:"spawn",name:r,provided:e.spawn[r],expects:"{ build: {}, watch: {} }"}),Re(e.spawn[r]).length===0))){for(let i in e.spawn[r]){let o=e.spawn[r][i];if(L(o)){u.spawn.commands[i]={cmd:A,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,Ui(i,u.spawn.commands[i],f.spawn(i));}else if(S(o)){let a=o.shift();u.spawn.commands[i]=Je(null),u.spawn.commands[i].cmd=a,u.spawn.commands[i].args=o,u.spawn.commands[i].pid=NaN,Ui(i,u.spawn.commands[i],f.spawn(i));}else k({option:"spawn",name:r,provided:e.spawn[r],expects:"string | string[]"});}Ks(()=>{G.pause(),G.clear(),f.nwl(A),s.streams.forEach((i,o)=>{f.out(`- ${g(`pid: #${i.pid} (${o}) process exited`)}`),qm__default.default(i.pid);}),f.nwl(A),s.streams.clear(),process.exit(0);});}}function Ur(e,t){return !!(d("devDependencies",e)&&d(t,e.devDependencies)&&d(t,e.devDependencies)||d("dependencies",e)&&d(t,e.dependencies)||d("peerDependencies",e)&&d(t,e.peerDependencies)||d("optionalDependencies",e)&&d(t,e.peerDependencies))}async function Um(e){for(let t of ["js","cjs","mjs"]){let s=`${e}.${t}`;if(await fsExtra.pathExists(`${s}.${t}`))return s}return null}async function Zs(e){try{let t=await Um(e);if(t!==null){let s=await Wr({filepath:t});return {path:t,config:s.mod.syncify||s.mod.default||s.mod}}return null}catch{return null}}function Vi(e,t){let s=t,r=Fe(e),n=path.extname(e),i=path.basename(e,n);return X(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 xl(e){if(!d("script",e.transforms)||e.transforms.script===!1)return;let t=Be("script transform option"),{esbuild:s}=u.processor,{script:r}=e.transforms;if(s.installed=Ur(u.pkg,"esbuild"),s.installed){Aa()||ce("failed to import ESBuild","Ensure you have installed esbuild");let a=await Zs("esbuild.config");a!==null&&(s.file=a.path,s.config=de(s.config,a.config));}else Le("esbuild");d("entryPoints",s.config)&&(t("processor option is not allowed and was omitted","entryPoints"),delete s.config.entryPoints);let n=dr(r,{addWatch:!1,flatten:!0}),i=an(["input","watch","rename","snippet"]);d("absWorkingDir",s.config)||(s.config.absWorkingDir=u.cwd);for(let o of n){let{snippet:a}=o,c=a?"snippets":"assets",{name:h}=fl(o.input,o.rename),p;!h.endsWith(".js")&&!h.endsWith(".mjs")?p=h+".js":h.endsWith(".cjs")?fe("rename","file extension",h,".js | .mjs"):p=h,a&&!/\.liquid$/.test(p)&&(p=p+".liquid");let l={uuid:Ye(),snippet:a,input:o.input,output:pathe.join(u.dirs.output,c,p),key:pathe.join(c,p),namespace:o.snippet?"snippets":"assets",size:NaN,watch:null,watchCustom:null,esbuild:null};if(s.config.outfile=l.output,u.mode.watch&&u.watch.unwatch(l.output),d("esbuild",o))if(oe(o.esbuild)||j(o.esbuild))J(i)?l.esbuild=de(s.config):l.esbuild=de(s.config,i);else if(typeof o.esbuild=="object"){for(let m in ["entryPoints","outdir","watch","absWorkingDir","watch","write","logLevel","incremental"])m==="entryPoints"&&d(m,o.esbuild)?t('Option is not allowed, use Syncify "input" instead',m):m==="outdir"&&d(m,o.esbuild)?t("Option is not allowed, Syncify will handle output",m):m==="watch"&&d(m,o.esbuild)?t("Option is not allowed, declare watch using Syncify",m):d(m,o.esbuild)&&t("Option is not allowed and will be ignored",m);d("plugins",o.esbuild)&&d("plugins",s.config)&&o.esbuild.plugins.unshift(...s.config.plugins),J(i)?l.esbuild=de(s.config,o.esbuild):l.esbuild=de(s.config,o.esbuild,i);}else k({option:"script",name:"esbuild",provided:typeof o.esbuild,expects:"boolean | null | {}"});else J(i)?l.esbuild=s.config:l.esbuild=de(s.config,i);if(l.esbuild.entryPoints=[l.input],u.mode.watch)if(!d("watch",o))l.watch=new Set;else {S(o.watch)||k({option:"script",name:"watch",provided:o.watch,expects:"string[]"});let m=ze(o.watch);l.watchCustom=pl__default.default(m),l.watch=new Set(m);}else l.watch=new Set;try{await Ta(l);}catch(m){throw new Error(m)}u.mode.terse&&(l.esbuild=de(l.esbuild,u.terser.script,{exclude:void 0})),u.script.push(l);}s.loaded=!0;}async function Fl(e){if(!d("style",e.transforms))return;let{postcss:t,sass:s}=u.processor,r=Be("style transform option");if(s.installed=Ur(u.pkg,"sass"),s.installed&&(await Ri("sass")||ce("Unable to dynamically import SASS","Ensure you have installed sass")),t.installed=Ur(u.pkg,"postcss"),t.installed){await Ri("postcss")||ce("Unable to dynamically import PostCSS","Ensure you have installed postcss");let a=await Zs("postcss.config");a!==null&&(t.file=a.path,t.config=a.config);}let n=dr(e.transforms.style,{addWatch:!1,flatten:!0}),i=ir(e.input);for(let o of n){let a={uuid:Ye(),input:o.input,watch:null,postcss:!1,sass:!1};if(d("postcss",o))if(t.installed||Le("postcss"),S(o.postcss))a.postcss=o.postcss;else {let p=I(o.postcss);(oe(o.postcss)||p)&&!j(o.postcss)?o.postcss!==!1&&(t.installed||Le("postcss"),a.postcss=p?de(t.config,o.postcss):!0):k({option:"style",name:"postcss",provided:a.postcss,expects:"boolean | {}"});}if(d("sass",o)&&o.sass!==!1&&s.installed===!0){let p=I(o.sass);if((oe(o.sass)||p)&&!j(o.sass))if(s.installed||Le("sass"),!p)Vt(a,"sass",{get(){return o.sass}});else {a.sass=de(s.config,o.sass);for(let l in o.sass)l==="sourcemap"||l==="warnings"?oe(o.sass[l])?a.sass[l]=o.sass[l]:k({option:"sass",name:l,provided:o.sass[l],expects:"boolean"}):l==="style"?(L(o.sass[l])||k({option:"sass",name:l,provided:o.sass[l],expects:"string"}),o.sass[l]==="expanded"||o.sass[l]==="compressed"?a.sass[l]=o.sass[l]:fe("sass",l,o.sass[l],"expanded | compressed")):l==="includePaths"&&(S(o.sass[l])?a.sass[l]=Yr(o.sass[l]).map(m=>path.join(u.cwd,m)):k({option:"sass",name:l,provided:o.sass[l],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 c=Vi(o.rename);d("rename",o)&&!j(o)&&(L(o.rename)||k({option:"styles",name:"rename",provided:o.rename,expects:"string"}),c=Vi(a.input,o.rename),/[a-zA-Z0-9_.-]+/.test(c.name)||k({option:"sass",name:"rename",provided:c,expects:"Characters: [a-zA-Z0-9_.-]"}),c.name.endsWith(".css")?a.rename=c.name:c.name.endsWith(".scss")?c.name=c.name.replace(".scss",".css"):c.name.endsWith(".sass")?c.name=c.name.replace(".sass",".css"):c.name.endsWith(".liquid")||(c.name=c.name+".css"));let h=[];if(u.mode.watch&&d("watch",o)){S(o.watch)||k({option:"styles",name:"watch",provided:o.watch,expects:"string[]"});for(let p of o.watch){let l=await cl__default.default(path.join(u.cwd,i(p)));l.length===0&&p[0]!=="!"&&r("Cannot resolve watch glob/path uri",p);for(let m of l)fsExtra.existsSync(m)?h.push(m):r("No file exists in path",m);}h.push(a.input),h.forEach(p=>u.watch.add(p)),a.watch=pl__default.default(h);}else a.watch=pl__default.default([a.input]),u.watch.add(a.input);typeof a.sass=="object"&&(a.sass.include.unshift(u.cwd,path.join(u.cwd,c.dir)),Ve("sass.include",o)&&(a.sass.include=o.sass.include.map(p=>path.join(u.cwd,p)))),d("snippet",o)&&(oe(o.snippet)||k({option:"styles",name:"snippet",provided:o.snippet,expects:"boolean"}),a.snippet=o.snippet),a.snippet?(d("rename",a)||(a.rename=c.name),(!c.name.endsWith(".liquid")||!a.rename.endsWith(".liquid"))&&(a.rename=c.name+".liquid"),u.paths.transforms.set(a.input,8),u.mode.watch&&u.watch.unwatch(path.join(u.cwd,e.output,"snippets",a.rename))):(a.rename=c.name,u.mode.watch&&u.watch.unwatch(path.join(u.cwd,e.output,"assets",c.name))),u.style.push(a);}}async function Cl(e){if(!d("svg",e.transforms))return;let{sprite:t,svgo:s}=u.processor,r=Be("svg transform");s.installed=zi("svgo"),s.installed&&(await Pi("svgo")||ce("Unable to dynamically import SVGO","Ensure you have installed svgo")),t.installed=zi("svg-sprite"),t.installed&&(await Pi("svg-sprite")||ce("Unable to dynamically import SVG Sprite","Ensure you have installed svg-sprite")),!t.installed&&!s.installed&&Le(["svgo","svg-sprite"]);let n=dr(e.transforms.svg,{addWatch:!0,flatten:!1});for(let i of n){let o=i.input.filter(c=>pathe.extname(c)!==".svg"?(r("Excluded file which is not an SVG type",pathe.relative(u.cwd,c)),!1):!0);if(o.length===0){r("No SVG file paths were resolved");continue}let a={uuid:Ye(),input:new Set(o),match:i.match,format:null,rename:i.rename,snippet:i.snippet};d("svgo",i)&&d("sprite",i)&&fe("transform","svg","svgo AND sprite","svgo OR sprite"),d("format",i)?i.format==="file"||i.format==="sprite"?(a.format=i.format,i.format==="file"?(a.svgo=!0,s.installed||Le("svgo")):(a.sprite=!0,t.installed||Le("svg-sprite"))):fe("transform > svg","format",i.format,'"sprite" | "file"'):d("svgo",i)?(s.installed||Le("svgo"),a.format="file",a.svgo=I(i.svgo)?de(s.config,i.svgo):!0):d("sprite",i)?(t.installed||Le("svg-sprite"),a.format="sprite",a.sprite=I(i.sprite)?de(t.config,i.sprite):!0):s.installed&&t.installed?Ou("transform.svg","format","sprite | file",[`SVG transforms require you to define ${M("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):bt("transform > svg","Cannot resolve processor, try defining a format."),u.svg.push(a);}}async function El(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=Be("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}Me(I(e.hot),oe(e.hot),j(e.hot))&&k({option:"config",name:"hot",provided:e.hot,expects:"boolean | {}"});let{hot:s}=u;if(I(e.hot)&&J(e.hot)===!1)for(let r in e.hot)d(r,u.hot)||bt(`hot.${r}`,e.hot[r]),r==="label"?e.hot[r]==="visible"||e.hot[r]==="hidden"?s[r]=e.hot[r]:fe("hot",r,e.hot[r],"visible | hidden"):r==="strategy"?e.hot[r]==="hydrate"||e.hot[r]==="replace"?s[r]=e.hot[r]:fe("hot",r,e.hot[r],"hydrate | replace"):r==="method"?e.hot[r]==="hot"||e.hot[r]==="refresh"?s[r]=e.hot[r]:fe("hot",r,e.hot[r],"hot | refresh"):r==="scroll"?e.hot[r]==="preserved"||e.hot[r]==="top"?s[r]=e.hot[r]:fe("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=pathe.join(u.cwd,"node_modules","@syncify/cli","hot.js.liquid"),s.output=pathe.join(u.dirs.output,"snippets","hot.js.liquid");for(let r of s.layouts)s.alive[pathe.join(u.dirs.output,"layout",r)]=!1;s.renderer="{% render 'hot.js'"+["",`server: ${s.server}`,`socket: ${s.socket}`,`strategy: "${s.strategy}"`,`scroll: "${s.scroll}"`,`label: "${s.label}"`,`history: "${s.history}`,`method: "${s.method}"`].join(", ")+" %}",u.wss=Ha();}function Ji(e,t){let s=[],r={};u.mode.upload?(r.base="output",r.from="output",r.dirs=wr.map(n=>`${b("-")} ${v(n)}`),r.fix=[`The ${v("--filter")} (or ${v("-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:","",`${b("$")} ${b(`syncify --filter ${v("sections/file.liquid")}`)}`,`${b("$")} ${b(`syncify --filter ${v("snippets/*")}`)}`,`${b("$")} ${b(`syncify --filter ${v("templates/*.json")}`)}`,`${b("$")} ${b(`syncify --filter ${v("!assets/some-file.ext")}`)}`,"",`Syncify will automatically resolve files from within your defined ${F(r.base)} directory`,"based on the starting point directory name. You can pass glob star matches following the",`directory namespace or starting point ignores (${v("!")}) as long the directory can match.`]):(r.base="input",r.from="paths",r.dirs=At.map(n=>`${b("-")} ${v(n)}`),r.fix=[`The ${v("--filter")} (or ${v("-f")}) flag command argument expects you`,`provide a ${yt.bold("paths")} key name as the starting point. Filtering begins with`,"a Shopify output directory name, for example:","",`${b("$")} ${b(`syncify --filter ${v("sections/file.liquid")}`)}`,`${b("$")} ${b(`syncify --filter ${v("snippets/*")}`)}`,`${b("$")} ${b(`syncify --filter ${v("templates/*.json")}`)}`,`${b("$")} ${b(`syncify --filter ${v("!assets/some-file.ext")}`)}`,"",`Syncify will automatically resolve files from within your defined ${F(r.base)} directory`,`based on the starting point ${F("paths")} name. You can pass glob star matches following the`,`starting point or ignores (${v("!")}) as long the reference can match.`]),e==="pattern"?(s.push(`Invalid ${v("--filter")} pattern provided. You cannot pass starting point`),t[0]==="*"?s.push(`glob (${v("*")}) stars as filters, Syncify does not support this.`):t[0]==="/"?s.push(`path (${v("/")}) roots as filters, Syncify does not support this.`):t[0]==="."&&s.push(`dot paths (${v(".")}) as filters, Syncify does not support this.`),s.push(`Use a starting point reference name based on the ${v(r.from)} key property`,`in your ${v(u.file.base)} file.`)):s.push(`Invalid directory provided. The ${v("--filter")} pattern expects the starting point`,"directory path be one of the following:","",...r.dirs,""),Et({message:s,expected:"--filter <dir>",fix:r.fix});}function bl(e,t,s){if((t[0]==="*"||t[0]==="/"||t[0]===".")&&Ji("pattern",t),t[0]==="!"){s.test(t.slice(1))||Ji("dir",t);return}s.test(t)||Ji("dir",t);let r=t.slice(0,t.indexOf("/"));S(u.filters[r])||(u.filters[r]=[]),u.filters[r].push(pathe.join(e,t));}async function Sl(e){if(!d("filter",e))return;let t=u.mode.upload?u.dirs.output:u.dirs.input,s=e.filter.replace(/\s+/g," ").trim(),r=u.mode.upload?new RegExp(`^(${wr.join("|")})`):new RegExp(`^(${At.join("|")})`);if(s.indexOf(",")>-1){let n=s.split(",").filter(Boolean).map(i=>i.trim());for(let i of n)bl(t,i,r);}else bl(t,s,r);f.out(u.filters);}function $l(e){let{terser:t,mode:s}=u;if(oe(e.terser)){if(s.terse===!1&&e.terser===!1)return;s.terse===!1&&e.terser===!0&&(s.terse=!0);}let r=Be("terser configuration");if(typeof e.terser=="object")for(let n in e.terser){if(e.terser[n]===!1||j(e.terser[n])){u.mode.terse===!0&&(u.terse[n]=!0);continue}if(n==="script"&&u.processor.esbuild.installed===!1&&(I(e.terser[n])&&J(e.terser[n])===!1||oe(e.terser[n])&&e.terser[n]===!0)&&ce("esbuild is not installed",fo),oe(e.terser[n]))u.terser[n]=e.terser[n];else if(I(t[n])){if(J(t[n]))continue;for(let i in e.terser[n]){if(i==="exclude"){J(e.terser[n][i])||(t[n][i]=ze(e.terser[n][i]));continue}d(i,t[n])||bt(`terser.${n}`,i),i==="mangleProps"?!j(e.terser[n][i])&&!Bt(t[n][i])&&k({option:`terser.${n}`,name:i,provided:`${typeof e.terser[n][i]} (${e.terser[n][i]})`,expects:"Regex | string | undefined"}):!j(e.terser[n][i])&&typeof t[n][i]!=typeof e.terser[n][i]&&k({option:`terser.${n}`,name:i,provided:typeof e.terser[n][i],expects:typeof t[n][i]}),i==="collapseWhitespace"?t.markup.collapseWhitespace=e.terser[n][i]:t[n][i]=e.terser[n][i];}}else r("unkown option provided",n);}}function vl(e){if(!d("pages",e.views))return;let{pages:t}=e.views;if(!I(t)&&!j(t)&&k({option:"views",name:"pages",provided:typeof t,expects:"{}"}),J(t))return;let s=u.config.views.pages;for(let r in t)if(d(r,s)||bt("pages",r),r==="importLanguage")L(t[r])?t[r]==="markdown"||t[r]==="html"?u.page[r]=t[r]:fe("views.pages",r,t[r],"markdown | html"):k({option:"views.pages",name:r,provided:t[r],expects:"markdown | html"});else if(r==="author"){if(j(t[r]))continue;L(t[r])?u.page[r]=t[r]:k({option:"views.pages",name:r,provided:t[r],expects:"string"});}else if(r==="suffixDir"||r==="safeSync"){if(j(t[r]))continue;oe(t[r])?u.page[r]=t[r]:k({option:"views.pages",name:r,provided:t[r],expects:"object"});}else if(r==="global"){if(j(t[r]))continue;if(S(t[r])){if(t[r].length>0){u.page[r]=new RegExp(`${t[r].join("|")}`);continue}}else k({option:"views.pages",name:r,provided:t[r],expects:"string | string[]"});}}async function Tl(e,t){f.clear(),await sl(e.cwd),await od(e),u.version="0.3.0-beta",u.restart=!1,u.cli=e,u.mode=ul(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,u.terminal.wrap=Math.round(u.terminal.cols-u.terminal.cols/3),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([rd(e.watch||e.upload,r),nl(e),id(r),Gi(u.dirs.output),il(),ml(e,s),hl(s),Sl(e),sd(s),ll(s),al(s),vl(s),ol(s),xl(s),Fl(s),Cl(s),$l(s),gl(s),nd(s),El(s)]).catch(i=>{console.log(i);});return f.start(u),n}function rd(e,t){e&&(u.watch=new chokidar.FSWatcher({persistent:!0,ignoreInitial:!0,usePolling:!0,interval:75,binaryInterval:100,ignored:["**/*.map"],ignorePermissionErrors:!0}),u.watch=Object.defineProperties(u.watch,{has:{value(s,r=t){return u.watch._watched.get(r).items.has(s)}},paths:{get(){return at(u.watch.values())}},watching:{get(){return u.watch._watched}}}));}function sd(e){for(let t in e.processors)u.processor[t].config=S(e.processors[t])?e.processors[t]:U(u.processor[t].config,e.processors[t]);}function nd(e){if(d("plugins",e)&&S(e.plugins))for(let t of e.plugins)d("onInit",t)&&t.onInit.call({...u},e),d("onChange",t)&&u.plugins.onChange.push([t.name,t.onChange]),d("onTransform",t)&&u.plugins.onTransform.push([t.name,t.onTransform]),u.mode.watch&&(d("onWatch",t)&&u.plugins.onWatch.push([t.name,t.onWatch]),d("onReload",t)&&u.plugins.onReload.push([t.name,t.onReload])),u.mode.build&&d("onBuild",t)&&u.plugins.onBuild.push([t.name,t.onBuild]);}async function id(e){u.dirs.cache=pathe.join(e,"node_modules/.syncify");let t=pathe.join(u.dirs.cache,"build.map");if(!await fsExtra.pathExists(t))return qi(u.dirs.cache);if(u.cache=await fsExtra.readJSON(t),u.cache.version!==u.version&&u.version==="0.3.0-beta"&&await fsExtra.pathExists(u.dirs.cache))return await fsExtra.remove(u.dirs.cache),qi(u.dirs.cache)}async function od(e){let t=await rl(e.cwd);t!==null?u.config=t:d("syncify",u.pkg)?u.config=u.pkg.syncify:ju(e.cwd);}var eS={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 hr(e,t,s){if(process.stdin.on("data",Ja),d("_",e)&&(e._=e._.slice(1)),e.help)return console.info(Ya);await Tl(e),process.on("SIGINT",Wu),process.on("rejectionHandled",zu),u.mode.hot&&await Va();try{if(u.mode.build)return Ia(s);if(u.mode.watch)return Wa(s);if(u.mode.upload)return ba(s);if(u.mode.download)return Sa(s);if(u.mode.export)return console.log("TODO")}catch(r){console.log(r),f.throws(r);}}var iS=e=>e;function ud(e,t){if(L(e)){if(/watch|build|download|upload/.test(e))return s=>hr({cli:!1,[e]:!0},t,s)}else if(I(e)){if(!X(t))throw new Error("You cannot provide options when running instance");return {watch:s=>hr({cli:!1,watch:!0},t,s),build:s=>hr({cli:!1,build:!0},t,s),download:s=>hr({cli:!1,download:!0},t,s),upload:s=>hr({cli:!1,upload:!0},t,s)}}}var oS=ud;
216
231
 
217
- exports.a = D;
218
- exports.b = Mw;
219
- exports.c = qw;
220
- exports.d = Pw;
221
- exports.e = lr;
232
+ exports.a = f;
233
+ exports.b = iS;
234
+ exports.c = oS;
235
+ exports.d = eS;
236
+ exports.e = hr;