{"version":3,"file":"main.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACO;;AAEP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;;AAEP;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,qBAAqB,UAAU,GAAG,YAAY;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA,8CAA8C,UAAU;AACxD;;AAEA;AACA;AACA;AACO;AACP;;AAEA,mCAAmC,YAAY;AAC/C,8CAA8C,UAAU;AACxD;;AAEA;AACA;AACA;AACO;AACP;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,EAAE;AAC7B;AACA;;AAEA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACO;;AAEP;AACA;AACA;AACA;AACA;AACA,6CAA6C,IAAI;AACjD;AACA;;AAEA;AACA;AACA;AACA,GAAG,IAAI,YAAY;;AAEnB;;;AChVmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,iBAAiB;;AAE7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA,YAAY,WAAW;AACvB,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,qCAAqC;AACjE,GAAG;;AAEH;;AAEA,YAAY,OAAO;;AAEnB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA,YAAY,UAAU;;AAEtB;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA,iDAAe,UAAU,EAAC;;;ACjH1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,6CAAe,MAAM,EAAC;;;ACpBtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,uBAAQ;AACjB;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA,iBAAiB,uBAAQ;AACzB,YAAY,uBAAQ;AACpB;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,YAAY;AACZ,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,2BAA2B;AAC3B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB;AACrB,8BAA8B;AAC9B;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,SAAS,0BAAW;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,0BAA0B;AAC1B,uBAAuB;AACvB,gBAAgB;AAChB,kBAAkB;AAClB,KAAK;AACL;AACA;AACA,KAAK;AACL,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,eAAe;AACf,cAAc;AACd,cAAc;AACd,oBAAoB;AACpB,sBAAsB;AACtB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,SAAS,wBAAS;AAClB;AACA;AACA;AACA;;AAEkE;;;ACnJlE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoD;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;;AAEA;AACA;;AAEA,SAAS,UAAC;AACV,iBAAiB,wBAAS;AAC1B,mBAAmB,0BAAW;AAC9B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,kCAAkC;AACxD;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA,UAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;;AAEA,4CAA4C,IAAI;;AAEhD;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA,IAAI;AACJ,oBAAoB,0BAA0B;AAC9C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uDAAuD,sDAAsD;AAC7G;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,+BAA+B;AACrD;AACA;;AAEA;AACA;;AAEA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC,yEAAyE,SAAS;AAClF;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,QAAQ,UAAC,+DAA+D;AACxE,sBAAsB,UAAC,oBAAoB;;AAE3C,sBAAsB,oBAAoB;AAC1C,YAAY,UAAC;AACb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;;AAEA,oBAAoB,iBAAiB;AACrC;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,0CAA0C,QAAQ;AAClD;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,wBAAS;AAC1B;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,SAAS,mBAAU;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,SAAS,oBAAW;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,wBAAS;AAC5B,qBAAqB,0BAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,wBAAS;AAC1B;AACA;AACA;;AAEA;AACA,iBAAiB,wBAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,gBAAgB,gBAAgB;AAChC,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,SAAS,UAAC;AACV;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA,SAAS,aAAI;AACb;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,wBAAS;AAC1B,mBAAmB,0BAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,UAAC;;AAEnB,gBAAgB,wBAAwB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB,wBAAwB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAW;;AAEX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAW,UAAC;AACZ;;AAEA;AACA;AACA,gCAAgC,UAAC;AACjC,WAAW,UAAC;AACZ;;AAEA,SAAS,UAAC;AACV;;AAEA;AACA;AACA,mBAAmB,0BAAW;;AAE9B,kBAAkB,gBAAgB;AAClC;;AAEA,oBAAoB,iBAAiB;AACrC;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,wBAAwB,qBAAqB;AAC7C;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE,UAAC;AACH;AACA;;AAEA;AACA,mBAAmB,0BAAW;AAC9B;AACA;;AAEA,cAAc,iBAAiB;AAC/B;AACA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;AACA,MAAM;AACN,kBAAkB,qBAAqB;AACvC;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE,UAAC;AACH;AACA;;AAEA;AACA,iBAAiB,UAAC;;AAElB,kBAAkB,iBAAiB;AACnC;AACA;AACA,MAAM;AACN,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,UAAC;;AAEjB,kBAAkB,iBAAiB;AACnC;AACA;AACA,MAAM;AACN,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,UAAC;AACzC,eAAe,UAAC;AAChB;;AAEA,aAAa,UAAC;AACd;;AAEA,2CAA2C,UAAC;AAC5C,WAAW,UAAC;AACZ;;AAEA,SAAS,UAAC;AACV;;AAEA;AACA;AACA;AACA,kBAAkB,UAAC;;AAEnB;AACA,wCAAwC;;AAExC;AACA,UAAU,UAAC;AACX,MAAM;;AAEN;AACA;;AAEA,SAAS,UAAC;AACV;;AAEA;AACA;AACA;;AAEA;AACA,uCAAuC,UAAC;AACxC,eAAe,UAAC;AAChB;;AAEA,aAAa,UAAC;AACd;;AAEA,0CAA0C,UAAC;AAC3C,WAAW,UAAC;AACZ;;AAEA,SAAS,UAAC;AACV;;AAEA;AACA;AACA;AACA,kBAAkB,UAAC;;AAEnB;AACA,4CAA4C;;AAE5C;AACA,UAAU,UAAC;AACX,MAAM;;AAEN;AACA;;AAEA,SAAS,UAAC;AACV;;AAEA;AACA;AACA;;AAEA,SAAS,eAAM;AACf,sBAAsB;;AAEtB,kBAAkB,iBAAiB;AACnC;AACA;AACA,YAAY,UAAC;AACb,QAAQ;AACR;AACA;AACA;AACA;;AAEA,SAAS,UAAC;AACV;;AAEA;AACA,sBAAsB;;AAEtB,kBAAkB,iBAAiB;AACnC,qCAAqC;;AAErC;AACA;AACA,YAAY,UAAC;AACb,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA,SAAS,UAAC;AACV;;AAEA;AACA,sBAAsB;;AAEtB;AACA,WAAW,UAAC;AACZ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA,oBAAoB,kBAAkB;AACtC;AACA;AACA;;AAEA,SAAS,UAAC;AACV;;AAEA;AACA,uBAAuB;;AAEvB,kBAAkB,iBAAiB;AACnC;;AAEA,oBAAoB,uBAAuB;AAC3C,uBAAuB,UAAC;AACxB;AACA;AACA;AACA;;AAEA,SAAS,UAAC;AACV;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAc,gBAAgB;AAC9B,kBAAkB,UAAC;;AAEnB,gBAAgB,kBAAkB;AAClC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB,oBAAoB;;AAEpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH,EAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX,SAAS;AACT,0BAA0B;;AAE1B;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,kBAAkB,uBAAuB;AACzC;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA,+CAA+C;AAC/C,YAAY,UAAC;AACb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,MAAM,aAAI;AACV,MAAM,cAAK;AACX;AACA;AACA;AACA;AACA;AACA,MAAM,eAAM;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,eAAM;;AAEZ,+CAAe,0DAAC,IAAC;AACquB;;;ACz9C7a;AACzU;AACA,UAAU;AACV,aAAa;AACb,UAAU;AACV,aAAa;AACb,MAAM;AACN,YAAY;AACZ,WAAW;AACX,YAAY;AACZ,IAAI;AACJ,KAAK;AACL,SAAS;AACT,eAAe;AACf,YAAY;AACZ,aAAa;AACb,QAAQ;AACR,QAAQ;AACR,KAAK;AACL,MAAM;AACN,MAAM;AACN,MAAM;AACN,IAAI;AACJ,OAAO;AACP,IAAI;AACJ,QAAQ;AACR,SAAS;AACT,MAAM;AACN,SAAS;AACT,MAAM;AACN,SAAS;AACT,QAAQ;AACR,SAAS;AACT,SAAS;AACT,MAAM;AACN,UAAU;AACV,QAAQ;AACR,QAAQ;AACR;AACA;AACA,wBAAwB,UAAC;AACzB;AACA;AACA,GAAG;AACH,CAAC;AACD,0CAAe,UAAC;;AC7CuB;;AAEvC;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW;AACjB;;AAEA;AACA;AACA,MAAM,WAAW;AACjB;AACA,GAAG;AACH;;AAEA,SAAS,cAAQ;AACjB;AACA;;AAEA,SAAS,SAAG;AACZ;AACA;;AAEA,SAAS,sBAAgB;AACzB,iBAAiB,wBAAS;AAC1B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,SAAS,kBAAY;AACrB,iBAAiB,wBAAS;AAC1B;AACA;AACA;AACA,mBAAmB,sBAAgB;;AAEnC;AACA;;AAEA;AACA;AACA,MAAM,4DAA4D;AAClE;;;AAGA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,oEAAoE;AACpE,0EAA0E;AAC1E;AACA;;AAEA;AACA;AACA,oEAAoE;AACpE,0EAA0E;AAC1E;AACA;;AAEA;AACA;;AAEA,SAAS,cAAQ;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAAS,YAAM;AACf;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;;AAEA,sDAAsD,iBAAiB;AACvE;AACA;;AAEA;AACA,cAAc,cAAQ,iBAAiB,cAAQ;AAC/C;AACA;AACA,cAAc;AACd,cAAc,YAAM;AACpB;AACA,YAAY,UAAU,cAAQ,iBAAiB,cAAQ;AACvD;;AAEA;AACA;AACA,cAAc;AACd,cAAc,YAAM;AACpB;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAAS,oBAAc;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,wBAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;AClMoD;AACpD;;AAEA;AACA,iBAAiB,wBAAS;AAC1B,mBAAmB,0BAAW;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA,QAAQ,WAAW;AACnB;;AAEA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;ACtCuC;AACO;AAC9C;;AAEA;AACA;AACA,EAAE,IAAI;AACN,kBAAkB,UAAU;AAC5B,iBAAiB,wBAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;;AAE3D;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;;AAEA,gEAAgE,YAAY,GAAG,aAAa;AAC5F;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA,iCAAiC;AACjC;AACA;AACA;;AAEA;AACA;;;;ACtDuC;AACvC;;AAEA;AACA,iBAAiB,wBAAS;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;ACvBuC;AACxB;AACf;AACA;AACA;AACA,CAAC;AACD,iBAAiB,wBAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;ACnEuC;AACxB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iBAAiB,wBAAS;;AAE1B,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sBAAsB,6BAA6B;AACnD;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AC1EA;AACA,qDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA,CAAC;;AC3Gc;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AChCuD;AACxC;AACf;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,yCAAyC,yBAAyB;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA,GAAG,EAAE;AACL;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA,IAAI,oBAAc;AAClB,IAAI,oBAAc;AAClB;;AAEA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA,GAAG;;AAEH,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA,mDAAmD;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;;AAEA;AACA,yDAAyD,UAAU;AACnE;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,gBAAgB,yCAAyC;AACzD,KAAK;AACL;;AAEA;AACA;AACA,uCAAuC,yCAAyC;AAChF,KAAK;AACL;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL,gBAAgB,aAAa;AAC7B,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,IAAI,oBAAc,yDAAyD,aAAa;AACxF,IAAI,oBAAc,wDAAwD,kEAAkE;AAC5I;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;ACpTe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN,kBAAkB,4CAA4C;AAC9D;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;;AAGJ,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA,IAAI;;;AAGJ,uEAAuE,UAAU;AACjF;;AChDe;AACf;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;;ACPoC;AACrB;AACf;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB,GAAC;AAC1B;;AC3Ce;AACf;;AAEA;AACA,qDAAqD;;AAErD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;ACjDe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,wBAAwB,yBAAyB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,kCAAkC,EAAE,gCAAgC,EAAE,+BAA+B;AAC1M;;AAEA;AACA,6CAA6C,kBAAkB,4BAA4B,YAAY;AACvG,IAAI;AACJ;AACA,IAAI;;;AAGJ;;AAEA;AACA;AACA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,UAAU;AAC1H,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,UAAU;AACpH;AACA,IAAI;;;AAGJ,0CAA0C,kBAAkB;;AAE5D;AACA;AACA;AACA,IAAI;;;AAGJ,0CAA0C,kBAAkB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,0CAA0C;AAC1J,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,0CAA0C;AACpJ;;AAEA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,0CAA0C;AAC1J,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,0CAA0C;AACpJ;AACA;;AAEA;AACA;;AC/De;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;ACrEoC;AACrB;AACf;AACA;AACA,gBAAgB,GAAC,gBAAgB,kBAAkB;AACnD;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qCAAqC,GAAC;AACtC,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;ACnCyC;AACI;AACQ;AACI;AACI;AACZ;AACU;AACJ;AACE;AACzD,6CAAe;AACf,YAAY;AACZ,cAAc;AACd,kBAAkB;AAClB,oBAAoB;AACpB,sBAAsB;AACtB,gBAAgB;AAChB,qBAAqB;AACrB,mBAAmB;AACnB,oBAAoB;AACpB,CAAC;;ACnBoD;AACtC;AACf;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB,kBAAY;AACrC;AACA;AACA;;ACrBe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,wCAAwC,EAAE,MAAM,EAAE,MAAM,EAAE;AAC1D;;AAEA;AACA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AC/Ce;AACf;AACA;;ACFe;AACf;AACA;;ACF6D;AAC9C;AACf;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA,+EAA+E,kFAAkF,+BAA+B;;AAEhM;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,QAAQ,oBAAoB;AAC5B;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;ACpF6C;AACA;AACA;AACA;AACF;AAC3C,gDAAe;AACf,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,aAAa;AACb,CAAC;;ACXc;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;ACRe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,kDAAkD,mDAAmD;AACrG;;AAEA,2BAA2B,KAAK;;AAEhC;AACA;AACA,yCAAyC,KAAK;AAC9C;AACA;;AAEA,wCAAwC,KAAK;;AAE7C;AACA,wCAAwC,KAAK;AAC7C,MAAM;AACN,wCAAwC,KAAK;AAC7C;AACA;AACA;;AChCiD;AAClC,SAAS,+BAAe;AACvC;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA,EAAE,cAAc;AAChB;AACA;AACA;AACA;AACA,GAAG;AACH;;AClBiD;AAClC,SAAS,2BAAa;AACrC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,EAAE,cAAc;AAChB;AACA;AACA;AACA;AACA,GAAG;AACH;;ACf+C;AACI;AACJ;AAC/C,sDAAe;AACf,eAAe;AACf,iBAAiB;AACjB,eAAe;AACf,CAAC;;ACP4D;AAC9C;AACf;AACA,+FAA+F,aAAa;AAC5G;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;AAEA;AACA,4FAA4F,MAAM;AAClG,MAAM;AACN;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C;;AAE1C,oCAAoC;;AAEpC;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD,sDAAsD,0BAA0B;;AAEnI;AACA,0CAA0C;;AAE1C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA,QAAQ,oBAAoB;AAC5B;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;ACpLe;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;ACTA;AACe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAsB;;AAEtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AC7BA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,sBAAsB;;AAEtB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AC9DA;AACe;AACf;AACA;AACA;;ACJA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AC/BoC;AACa;AAClC;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,GAAC;;AAE1B;AACA;AACA;AACA,+CAA+C,kBAAkB,4BAA4B,UAAU,UAAU,2BAA2B;AAC5I,QAAQ,cAAQ;AAChB;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,6CAA6C,kBAAkB,4BAA4B,UAAU,UAAU,2BAA2B;AAC1I,MAAM,cAAQ;AACd;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;ACtCmC;AACQ;AACJ;AACA;AACE;AACQ;AACU;AAC3D,4CAAe;AACf,SAAS;AACT,aAAa;AACb,WAAW;AACX,WAAW;AACX,YAAY;AACZ,gBAAgB;AAChB,qBAAqB;AACrB,CAAC;;ACfwC;AACL;AACrB;AACf;AACA,mBAAmB,0BAAW;AAC9B;AACA;AACA;AACA,IAAI,UAAU;;AAEd,uDAAuD,GAAC;AACxD,yBAAyB,kBAAkB,GAAG,2BAA2B;AACzE,sCAAsC,kBAAkB;;AAExD;AACA;;AAEA;AACA,sBAAsB,oBAAoB;AAC1C,0BAA0B,GAAC,4CAA4C,mBAAmB,EAAE,uBAAuB;AACnH;AACA;;AAEA,sCAAsC,kBAAkB;AACxD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,GAAC;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH,kBAAkB,yBAAyB;AAC3C,qBAAqB,GAAC;AACtB;;AAEA,yCAAyC,QAAQ;AACjD,sBAAsB,GAAC;AACvB;AACA;;AC1De;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;ACxCe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,0BAA0B,kBAAkB,GAAG,2BAA2B,IAAI,kBAAkB,GAAG,uBAAuB;AAC1H;AACA;;ACTyC;AACN;AACQ;AAC3C,2CAAe;AACf,YAAY;AACZ,SAAS;AACT,aAAa;AACb,CAAC;;ACPc;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;ACR+C;AACI;AACnD,kDAAe;AACf,eAAe;AACf,iBAAiB;AACjB,CAAC;;ACLmD;AAChB;AACQ,CAAC;;AAE7C;AACA;AACA,sBAAsB,0BAAW,aAAa,wBAAS;AACvD;AACA;AACA;AACA;;AAEA;AACA;;AAEe;AACf;AACA,mBAAmB,0BAAW;AAC9B,iBAAiB,wBAAS;AAC1B;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,GAAC;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;AACA,8CAA8C;;AAE9C;;AAEA;AACA,gBAAgB,GAAC;AACjB;;AAEA,sFAAsF,sBAAsB;AAC5G,8DAA8D;;AAE9D;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wBAAwB,SAAG;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,GAAC;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;ACjHyC;AACL;AACQ;AAC7B;AACf,mBAAmB,0BAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,4BAA4B,SAAG;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,+CAA+C,GAAC;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,sDAAsD;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ,gDAAgD;;AAEhD;AACA;;AC7NsD;AACvC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;;;AAGJ,uBAAuB,SAAG;AAC1B,uDAAuD;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,SAAG;AAC1B,EAAE,cAAQ;AACV;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;;;AAGJ;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iFAAiF;AACjF;;AAEA;AACA,oFAAoF;AACpF;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AC/Ie;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ,0CAA0C;;AAE1C;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA,IAAI,UAAU;;AAEd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;;AC1Ce;AACf;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;ACZe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AClCyC;AACI;AACF;AACF;AACJ;AACF;AACE;AACrC;;AAEA;;AAEA;AACA,mBAAmB,0BAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA,6HAA6H,QAAQ;AACrI,IAAI;AACJ,2CAA2C,QAAQ;AACnD;AACA;;AAEA;AACA;AACA,mBAAmB,0BAAW;AAC9B;AACA;AACA;AACA,IAAI;AACJ,wBAAwB,YAAY;AACpC,uBAAuB,WAAW;AAClC,sBAAsB,UAAU;;AAEhC;AACA,sBAAsB,QAAQ;AAC9B;;AAEA,mBAAmB,OAAO;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kDAAe;AACf;AACA;AACA,CAAC;;AChG8C;;AAE/C;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,oFAAoF;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,8BAA8B,OAAO,8BAA8B;AAC1F;AACA,IAAI;AACJ,oBAAoB,8BAA8B;;AAElD;AACA,sBAAsB,8BAA8B;AACpD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,EAAE,YAAM;AACR;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;ACvEuC;AACxB;AACf;AACA;AACA,iBAAiB,wBAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA,MAAM;;AAEN;AACA,2CAA2C,MAAM;AACjD;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;ACvC+C;AACA;AAC/C,kDAAe;AACf,eAAe;AACf,eAAe;AACf,CAAC;;ACLD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU;;AAEd;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;;ACnDe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;ACRyC;AACM;AAC/C,8CAAe;AACf,YAAY;AACZ,eAAe;AACf,CAAC;;ACLsC;AACH;AACrB;AACf,iBAAiB,wBAAS;AAC1B;;AAEA;AACA;AACA;;AAEA,oBAAoB,GAAC;;AAErB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;ACpCe;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;;AClBuC;AACQ;AAC/C,kDAAe;AACf,WAAW;AACX,eAAe;AACf,CAAC;;ACLD;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAe;AACf;AACA,CAAC;;ACrCD,+CAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;ACzH2C;AAC7B;AACf,uCAAuC;AACvC;AACA;;AAEA;AACA,MAAM,YAAM;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,YAAM;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,YAAM;AACV;AACA;;ACrCA;AACyC;AACR;AAC6B;AACR;AACF;AACE;AACN;AACM;AACN;AACT;AACM;AACE;AACV;AACF;AACa;AACT;AACU;AACR;AACF;AACe;AACjB;AACoB;AACzD;AACA,eAAe;AACf,QAAQ;AACR,WAAW;AACX,YAAY;AACZ,OAAO;AACP,MAAM;AACN,YAAY;AACZ,QAAQ;AACR,aAAa;AACb,eAAe;AACf,SAAS;AACT,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,aAAa,YAAM,GAAG;AACtB;;AAEA,qBAAqB,GAAC;AACtB;AACA,MAAM,GAAC;AACP,0BAA0B,YAAM,GAAG;AACnC;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA;AACA,qBAAqB,UAAU;AAC/B,oBAAoB,SAAS;AAC7B;AACA,KAAK;AACL,qBAAqB,UAAU;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK,GAAG;;AAER,yBAAyB,YAAM,GAAG,EAAE,QAAQ,qBAAqB;;AAEjE,oBAAoB,YAAM,GAAG;AAC7B,4BAA4B,YAAM,GAAG;AACrC,0BAA0B,YAAM,GAAG,WAAW;;AAE9C;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,MAAM;;;AAGN,eAAe,GAAC,EAAE;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,GAAC;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL,4BAA4B;;AAE5B;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sCAAsC,mBAAmB;AACzD;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,sCAAsC,QAAQ;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B,qCAAqC,EAAE,iBAAiB,eAAe,qCAAqC,EAAE,aAAa;AACzJ;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC;;AAErC,gBAAgB,GAAC;AACjB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,iBAAiB,+DAA+D;AAChF;;AAEA;AACA;AACA,oBAAoB,GAAC,qDAAqD;;AAE1E;;AAEA;AACA;;AAEA;AACA,OAAO;;;AAGP;;AAEA;AACA,uBAAuB,0BAAW;AAClC;AACA,mBAAmB,GAAC;AACpB;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA,MAAM;;;AAGN,yBAAyB;;AAEzB;AACA;AACA,MAAM;;;AAGN,yBAAyB;;AAEzB;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,MAAM;AACN;AACA,MAAM;;;AAGN,2BAA2B;;AAE3B,+BAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA,kCAAkC;;AAElC,gCAAgC;;AAEhC,2BAA2B;;AAE3B;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA;AACA,KAAK;;AAEL;AACA;AACA,MAAM,WAAW;AACjB;;AAEA;AACA;AACA;;AAEA;AACA,IAAI,YAAM;AACV;;AAEA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD,YAAY,MAAM,EAAE,QAAQ;AAC5B,2CAAe,MAAM;;ACjmBe;AACmB;AACxC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,8GAA8G,yBAAyB,6BAA6B,MAAM,IAAI,MAAM;AACpL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,OAAO;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,SAAS;AACtC;AACA;;AAEA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iCAAiC,yBAAyB;AAC1D,MAAM;AACN,iCAAiC,iBAAiB;AAClD;AACA,qCAAqC,yBAAyB,4BAA4B,EAAE;AAC5F;AACA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,mEAAmE,OAAO;AAC1E;AACA;;AAEA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,mBAAmB;AACzC;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6CAA6C,QAAQ;AACrD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,qCAAqC;AACnE;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,mEAAmE,mBAAmB;AACtF;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AClSA;AACoD;AAChB;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B;;AAE1B,iCAAiC,yBAAyB,wCAAwC,+BAA+B;AACjI;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,wBAAwB;AAC9C;;AAEA;AACA,0DAA0D;;AAE1D;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA;AACA,MAAM;AACN;AACA,iDAAiD;AACjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AClIA;AACuC;AACH;AACkB;AACvC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;;AAGA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;;;AAGN,kDAAkD;;AAElD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,8CAA8C;;AAE9C;AACA;AACA;;AAEA;AACA;AACA,4FAA4F;AAC5F,QAAQ,6EAA6E;AACrF,MAAM;AACN;AACA;;AAEA;AACA,uCAAuC;;AAEvC;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,mCAAmC;AACnC;;AAEA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;;AAGA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,MAAM,aAAa;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU;;;AAGV,mDAAmD;;AAEnD,0GAA0G;;AAE1G;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;ACrayC;AAC1B,SAAS,uDAAyB;AACjD,mBAAmB,0BAAW;;AAE9B;AACA;AACA;AACA,8CAA8C,gBAAgB;;AAE9D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;ACtBsF;AAClD;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,GAAC;;AAEb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B,uDAAyB;AACxD;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,iDAAiD,GAAC,2BAA2B,GAAC;AAC9E;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;ACxLe,SAAS,qCAAiB;AACzC,aAAa;AACb,sBAAsB;AACtB;;ACHoC;AACgC;AACkB;AACvE;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,IAAI;AAC1B,4BAA4B,IAAI;AAChC,wBAAwB,IAAI;AAC5B,uBAAuB,IAAI;AAC3B,qBAAqB,IAAI;AACzB,sBAAsB,IAAI;AAC1B,+BAA+B,IAAI;AACnC,mCAAmC,IAAI;AACvC,yBAAyB,IAAI;AAC7B,oBAAoB,IAAI;AACxB,0BAA0B,IAAI;AAC9B,wBAAwB,IAAI;AAC5B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN,sCAAsC,kBAAkB,GAAG,SAAS,2BAA2B,kBAAkB,GAAG,SAAS,GAAG,SAAS;AACzI;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+DAA+D,6CAA6C;;AAE5G;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uGAAuG,yBAAyB,EAAE,OAAO;;AAEzI;AACA;AACA,0BAA0B,GAAC;AAC3B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,yBAAyB;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,gBAAgB;AACnD,sCAAsC,yBAAyB;AAC/D;;AAEA;AACA;AACA,sDAAsD,QAAQ;AAC9D,2DAA2D,yBAAyB;AACpF;;AAEA,qFAAqF,yBAAyB;AAC9G,cAAc;AACd;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mEAAmE,cAAc;AACjF;AACA;;AAEA;AACA,eAAe,qCAAiB;AAChC,eAAe,qCAAiB;AAChC;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,eAAe,qCAAiB,sEAAsE,OAAO,WAAW,OAAO;AAC/H;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,qBAAqB;AAC3C;AACA;AACA,UAAU;AACV,gCAAgC,sBAAsB,SAAS,mBAAmB,MAAM,qBAAqB;AAC7G;AACA;;AAEA;AACA,2CAA2C,qCAAiB;AAC5D;;AAEA;AACA;AACA;AACA,QAAQ;AACR,yCAAyC,oBAAoB,qCAAqC,kBAAkB;AACpH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,yCAAyC,4BAA4B;AACrE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,uDAAyB;AACxD;AACA,KAAK;AACL;AACA;AACA,cAAc,GAAC;AACf;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA,cAAc,GAAC;AACf;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,qBAAqB,EAAE,YAAY;AACzD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,qCAAiB;AACvC;AACA,oBAAoB,GAAC;AACrB;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,qCAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;AAEN,kGAAkG,GAAC;AACnG;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;ACzZyC;AACL;AACa;AACqC;AACvE;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,uCAAuC,OAAO;AAC9C,kCAAkC,QAAQ;AAC1C,MAAM;AACN,4CAA4C,OAAO;AACnD,mCAAmC,QAAQ;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,kCAAkC,SAAS;AAC3C,MAAM;AACN,mCAAmC,SAAS;AAC5C;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,kCAAkC;;AAEjE;AACA,iCAAiC,kCAAkC;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;ACxWoC;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,MAAM;AACN,aAAa,yBAAyB;AACtC;;AAEA;AACA,aAAa,2BAA2B;AACxC,MAAM;AACN,aAAa,aAAa;AAC1B;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,EAAE,IAAI,EAAE;AAC3C,MAAM;AACN;AACA,mCAAmC,EAAE,IAAI,EAAE,eAAe,aAAa;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;ACjHuC;AACH;AACiB;AACtC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iDAAiD,yBAAyB;AAC1E;AACA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2DAA2D,WAAW;AACtE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2FAA2F,WAAW;AACtG;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,eAAe,MAAM,eAAe;AACtF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,eAAe,MAAM,eAAe;AACnH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mDAAmD,yBAAyB;AAC5E;;AAEA;AACA;AACA,4DAA4D,+BAA+B;AAC3F,UAAU;AACV;AACA;AACA;;AAEA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,wBAAwB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,kEAAkE,WAAW,MAAM,WAAW;AAC9F,2EAA2E,WAAW;AACtF;;AAEA;AACA;AACA;;AAEA;AACA;AACA,0DAA0D,+BAA+B;AACzF,QAAQ;AACR;AACA;;AAEA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wBAAwB;AAC5D;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,yBAAyB;AACxC;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,8CAA8C;;AAE9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN,sDAAsD,kCAAkC;AACxF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,8CAA8C;;AAE9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN,uDAAuD,kCAAkC;AACzF;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;ACnmBuC;AACH;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gEAAgE,yBAAyB,4BAA4B,MAAM;AAC3H,sCAAsC,oBAAoB,QAAQ,mBAAmB,SAAS,oBAAoB;;AAElH;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,GAAC;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD,WAAW;AAC9D;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B,GAAC;;AAE/B;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,sBAAsB;;AAEhD;AACA;;AAEA;AACA,0FAA0F,mBAAmB,UAAU,kCAAkC;AACzJ;AACA,YAAY;AACZ,mEAAmE,kCAAkC,4BAA4B,mBAAmB;AACpJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,wBAAwB,4BAA4B,MAAM;AAC9F;AACA;AACA,QAAQ;;AAER;AACA;;AAEA;AACA;AACA,eAAe,GAAC;AAChB;;AAEA,aAAa,GAAC;AACd;;AAEA;;AAEA;AACA,8BAA8B,+BAA+B;AAC7D,kCAAkC,GAAC,4CAA4C,GAAC;AAChF;AACA,OAAO;AACP,MAAM;AACN,gCAAgC,iCAAiC;AACjE;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2EAA2E;;AAE3E,kDAAkD,cAAc;AAChE;AACA,UAAU;;;AAGV,+BAA+B,iBAAiB;AAChD;AACA;AACA,QAAQ;AACR,kDAAkD,4BAA4B;AAC9E;AACA,kDAAkD,4BAA4B;AAC9E;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,wBAAS;AAC5B;AACA,iEAAiE,GAAC,wCAAwC,GAAC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,oBAAoB,wBAAwB;AAC5C;;AAEA;AACA,wDAAwD;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AC1RA,kCAAkC,iBAAiB;AACF;AAClC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,mCAAmC;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB;;AAEzB;AACA,mBAAmB;AACnB;;AAEA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AC9LoE;AAChC;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD,4BAA4B,QAAQ,IAAI,cAAc;AACtD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0EAA0E,EAAE,OAAO,EAAE;AACrF;AACA;;AAEA,2BAA2B,2CAA2C;AACtE;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;;AAEnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,iEAAiE,oBAAoB;AACrF;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mEAAmE,EAAE,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE;AAC9H;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,qCAAqC;AACxE,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;ACrSuC;AACxB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,KAAK,GAAG,IAAI,GAAG,MAAM;AACtC,MAAM;AACN,iBAAiB,IAAI,GAAG,MAAM;AAC9B;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,qDAAqD,YAAY;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;ACrJoD;AAChB;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA,sDAAsD,yBAAyB,cAAc,QAAQ;AACrG;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kDAAkD,uDAAuD;AACzG;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qDAAqD,YAAY;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;AC/FA;;AAEA;AACyC;AACQ;AAClC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAc,cAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;;AAEA,kEAAkE;AAClE;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,qBAAqB,0BAAW;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,0BAAW;AAClC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,0BAAW;AAChC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AC7NiD;AACb;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA,0BAA0B;;AAE1B;AACA;AACA;;AAEA,4FAA4F,aAAa;AACzG,4FAA4F,aAAa;AACzG,qEAAqE,oEAAoE,uFAAuF;AAChO;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN,iDAAiD;AACjD;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA,UAAU;;;AAGV,gHAAgH,iBAAiB;AACjI,gHAAgH,iBAAiB;;AAEjI;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU,2FAA2F;AACrG;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,sBAAsB;AAC5C,sEAAsE,qBAAqB;AAC3F;AACA,MAAM;AACN,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AC3M4C;AAC7B;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;;AAEA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;;AAGR;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;ACpPoC;AACiB;AACtC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC,SAAS;AACT,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAmC,+BAA+B,eAAe,8BAA8B,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG;;AAEvJ;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,8DAA8D,8BAA8B;AAC5F;AACA;;AAEA;AACA,6DAA6D,kCAAkC;AAC/F;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,eAAe;AAC7D,sCAAsC,eAAe;AACrD,KAAK;;AAEL;AACA;AACA,oDAAoD,sCAAsC,MAAM,iBAAiB,yCAAyC,mBAAmB;AAC7K,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO,OAAO,OAAO,qBAAqB,0BAA0B,MAAM,2BAA2B;AAChJ;AACA;;AAEA;AACA,8CAA8C,QAAQ,cAAc,0CAA0C,eAAe,2CAA2C;AACxK;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;ACnLyB;AACV,SAAS,0BAAY;AACpC,4CAA4C,WAAW,KAAK,OAAO;AACnE;AACA,gDAAgD,YAAY;;AAE5D;AACA,oDAAoD,WAAW,KAAK,OAAO;AAC3E;AACA;;AAEA;AACA;;ACZyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uCAAuC,GAAG,MAAM,GAAG,mBAAmB,QAAQ,eAAe,QAAQ;AACrG;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;ACrGyD;AACJ;AACI;AAC1C;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC,4CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA,kEAAkE;;AAElE;AACA,oCAAoC;;AAEpC;AACA;AACA;;AAEA;AACA;AACA,uEAAuE;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW,KAAK,WAAW,KAAK,WAAW,eAAe,QAAQ,eAAe,QAAQ,aAAa,MAAM;AACxJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;ACtGyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,cAAc,MAAM;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,oDAAoD,OAAO;AAC3D;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;;;AAGR;AACA,2BAA2B,MAAM,QAAQ,0CAA0C,IAAI,gCAAgC;AACvH,OAAO,GAAG;;AAEV;AACA;AACA,OAAO;AACP;AACA;AACA,sCAAsC,KAAK,eAAe,KAAK,eAAe,KAAK;AACnF,0DAA0D,qDAAqD,cAAc,qDAAqD;AAClL;AACA,uCAAuC,gBAAgB,IAAI,cAAc,EAAE,YAAY,GAAG;;AAE1F;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;ACzJyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA,kDAAkD,sBAAsB;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;;AAEA;AACA;AACA,qBAAqB,GAAG,QAAQ,2BAA2B;AAC3D,QAAQ;AACR;AACA,qBAAqB,GAAG,SAAS,2BAA2B;AAC5D,QAAQ;AACR,gBAAgB,GAAG;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,2BAA2B,OAAO,2BAA2B;AACzG;AACA,sBAAsB,GAAG,IAAI,GAAG,IAAI,GAAG;AACvC,kBAAkB,OAAO;AACzB,gBAAgB,YAAY;AAC5B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE4D;AACM;AACG;AACM;AACA;AACA;AACH;AACH;AACZ;AACA;AACkB;AAClB;AACS;AACuB;AACpB;AACN;AACQ;AACd;AACwB;AACJ;AACA;AACA;AACe;AACH;;;ACnClF;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;;AAEA,KAAK;AACL;;AAEO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEO,MAAM,qBAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEO,MAAM,uBAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;ACnGoG;AACF;;AAElG,IAAM,MAAM,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,wCAAa,EAAE,sCAAW;;AAE9E;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA,kCAAkC,IAAM;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;;AAEjC;;AAEA;;AAEA,kBAAkB;AAClB,oBAAoB,YAAY;;AAEhC;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA,gBAAgB,aAAa;;AAE7B;;AAEA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,IAAM;AAClC;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA,kBAAkB;AAClB,oBAAoB,YAAY;AAChC;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,gBAAgB,aAAa;;AAE7B;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB,YAAY;AAC5B,aAAa;;AAEb;AACA;AACA;AACA;;AAEA,gBAAgB,aAAa;AAC7B,aAAa;;AAEb;AACA;AACA;AACA;;AAEA,gBAAgB,aAAa;AAC7B,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAO;AACvC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,oCAAoC,qBAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,uBAAS;AACrD,yCAAyC;AACzC;AACA,iCAAiC;AACjC;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;;AAEb,2BAA2B;AAC3B;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA,YAAY;AACZ,QAAQ;;AAER;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS,IAAI,YAAY;AACzB;AACA,KAAK;AACL;;AAEA,mDAAe,eAAe,EAAC;;;ACtR4B;;AAE3D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,YAAY,2BAA2B;;AAEvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;;AAGL,IAAI,YAAe;AACnB,GAAG;AACH;;AAEA,6CAAe,MAAM,EAAC;;;AC/CtB;;AAEA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA,4CAAe,KAAK,EAAC;;;AC5BoC;;AAEzD;AACA;AACA,qBAAqB,cAAc;AACnC;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,WAAW;AACX;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;;AAEV;;AAEA,wEAAwE,gBAAgB;AACxF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;;AAEX;;AAEA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA,GAAG;AACH;AACA,qBAAqB,cAAc;AACnC;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,gEAAgE;AAChE,WAAW;AACX;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,2FAA2F,gBAAgB;AAC3G;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA,KAAK;;AAEL,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,OAAO;;AAEP;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA,+CAAe,QAAQ,EAAC;;;AC/MsB;AACE;;AAEhD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,gEAAgE;AAChE,WAAW;AACX;AACA,SAAS;;AAET;;AAEA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX,SAAS;;AAET;;AAEA;AACA;AACA,YAAY,UAAU;AACtB;AACA,UAAU;AACV;AACA,YAAY,UAAU;AACtB;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb,GAAG;AACH;AACA;;AAEA;AACA;AACA,MAAM;AACN,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP,MAAM,UAAU;;AAEhB;AACA;AACA,UAAU,UAAU;AACpB,UAAU;AACV;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA,UAAU,UAAU;AACpB,UAAU;AACV;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,4CAAe,KAAK,EAAC;;;AC7LrB;AACA;AAC4B;AAC0B;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wDAAwD,UAAU;;AAElE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B,aAAa;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,MAAM;AAC1C;;AAEA;AACA;AACA;AACA,kBAAkB,MAAM;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,WAAW;;AAEX;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,yEAAyE,MAAM,kBAAkB,MAAM;AACvG;AACA;AACA;AACA;AACA,+CAA+C,MAAM;AACrD;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA,wDAAwD,UAAU;;AAElE;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB,yBAAyB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,2DAA2D,UAAU,mBAAmB;AACxF;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,4DAA4D,UAAU;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;;AAE1B,+CAA+C;AAC/C,+CAA+C;AAC/C,+CAA+C;;AAE/C;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA,uEAAuE,UAAU;AACjF;AACA,WAAW;;AAEX;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR,gDAAgD,mBAAmB;AACnE;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA,6CAA6C,WAAW;;AAExD;AACA,+DAA+D,WAAW;AAC1E,2DAA2D,WAAW;AACtE;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,8BAA8B,KAAK;AACnC;;AAEA;AACA,UAAU,KAAK;AACf,UAAU;AACV;AACA,UAAU,KAAK;AACf;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,iGAAiG;;AAE7G;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;;AAEX;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;;AAEX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;AACP,GAAG;AACH;;AAEA,sDAAe,eAAe,EAAC;;;AC5oBQ;;AAEvC;AACA;AACA;AACO;AACP;AACA;AACA;;AAEA;;AAEA,YAAY,iBAAiB;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,cAAc,WAAW;AACzB,MAAM,QAAQ;AACd,MAAM,QAAQ;AACd;AACA,GAAG;;AAEH;AACA,YAAY,iBAAiB;;AAE7B;;AAEA;AACA;AACA;AACA,KAAK,IAAI,YAAY;AACrB;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,WAAW;AACvB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;;AAEH;AACA,YAAY,WAAW;AACvB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;;AAEA;AACA,GAAG;;AAEH;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,YAAY,WAAW;AACvB;AACA,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,GAAG;;AAEH;AACA,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;;AAEH;;AAEA,YAAY,qBAAqB;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACO;AACP;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA,KAAK,IAAI,gBAAgB;;AAEzB;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC,gCAAgC;AACpE;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;AACH;AACA,YAAY,iCAAiC;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1YA,IAAI,8BAAQ;;AAEZ;AACA,IAAI,8BAAQ;AACZ,EAAE;AACF,IAAI,8BAAQ;AACZ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,yEAAyE,0BAA0B;;AAEnG;AACA;;AAEA,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA,4DAAe,aAAa,EAAC;;;ACrIgB;AACR;AACA;AACrC;AACuC;AACE;AACkB;AAMnB;AACc;AACW;;AAEjE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB,oCAAoC,kBAAkB;AAC1F;;AAEA;AACA,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,KAAK;AACP,EAAE,eAAe;AACjB,EAAE,QAAQ;AACV,EAAE,mBAAmB;AACrB,EAAE,cAAc;AAChB,EAAE,cAAc;AAChB,EAAE,gBAAgB;AAClB;;AAEA,EAAE,qBAAa;AACf,CAAC","sources":["webpack://build/webpack/bootstrap","webpack://build/webpack/runtime/define property getters","webpack://build/webpack/runtime/hasOwnProperty shorthand","webpack://build/webpack/runtime/make namespace object","webpack://build/../lovinwinev2/assets/javascripts/components/utilities.js","webpack://build/../lovinwinev2/assets/javascripts/common/cartDrawer.js","webpack://build/../lovinwinev2/assets/javascripts/common/footer.js","webpack://build/../lovinwinev2/node_modules/ssr-window/ssr-window.esm.js","webpack://build/../lovinwinev2/node_modules/dom7/dom7.esm.js","webpack://build/../lovinwinev2/node_modules/swiper/shared/dom.js","webpack://build/../lovinwinev2/node_modules/swiper/shared/utils.js","webpack://build/../lovinwinev2/node_modules/swiper/shared/get-support.js","webpack://build/../lovinwinev2/node_modules/swiper/shared/get-device.js","webpack://build/../lovinwinev2/node_modules/swiper/shared/get-browser.js","webpack://build/../lovinwinev2/node_modules/swiper/core/modules/resize/resize.js","webpack://build/../lovinwinev2/node_modules/swiper/core/modules/observer/observer.js","webpack://build/../lovinwinev2/node_modules/swiper/core/events-emitter.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/updateSize.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/updateSlides.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/updateAutoHeight.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/updateSlidesOffset.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/updateSlidesProgress.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/updateProgress.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/updateSlidesClasses.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/updateActiveIndex.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/updateClickedSlide.js","webpack://build/../lovinwinev2/node_modules/swiper/core/update/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/translate/getTranslate.js","webpack://build/../lovinwinev2/node_modules/swiper/core/translate/setTranslate.js","webpack://build/../lovinwinev2/node_modules/swiper/core/translate/minTranslate.js","webpack://build/../lovinwinev2/node_modules/swiper/core/translate/maxTranslate.js","webpack://build/../lovinwinev2/node_modules/swiper/core/translate/translateTo.js","webpack://build/../lovinwinev2/node_modules/swiper/core/translate/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/transition/setTransition.js","webpack://build/../lovinwinev2/node_modules/swiper/core/transition/transitionEmit.js","webpack://build/../lovinwinev2/node_modules/swiper/core/transition/transitionStart.js","webpack://build/../lovinwinev2/node_modules/swiper/core/transition/transitionEnd.js","webpack://build/../lovinwinev2/node_modules/swiper/core/transition/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/slide/slideTo.js","webpack://build/../lovinwinev2/node_modules/swiper/core/slide/slideToLoop.js","webpack://build/../lovinwinev2/node_modules/swiper/core/slide/slideNext.js","webpack://build/../lovinwinev2/node_modules/swiper/core/slide/slidePrev.js","webpack://build/../lovinwinev2/node_modules/swiper/core/slide/slideReset.js","webpack://build/../lovinwinev2/node_modules/swiper/core/slide/slideToClosest.js","webpack://build/../lovinwinev2/node_modules/swiper/core/slide/slideToClickedSlide.js","webpack://build/../lovinwinev2/node_modules/swiper/core/slide/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/loop/loopCreate.js","webpack://build/../lovinwinev2/node_modules/swiper/core/loop/loopFix.js","webpack://build/../lovinwinev2/node_modules/swiper/core/loop/loopDestroy.js","webpack://build/../lovinwinev2/node_modules/swiper/core/loop/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/grab-cursor/setGrabCursor.js","webpack://build/../lovinwinev2/node_modules/swiper/core/grab-cursor/unsetGrabCursor.js","webpack://build/../lovinwinev2/node_modules/swiper/core/grab-cursor/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/events/onTouchStart.js","webpack://build/../lovinwinev2/node_modules/swiper/core/events/onTouchMove.js","webpack://build/../lovinwinev2/node_modules/swiper/core/events/onTouchEnd.js","webpack://build/../lovinwinev2/node_modules/swiper/core/events/onResize.js","webpack://build/../lovinwinev2/node_modules/swiper/core/events/onClick.js","webpack://build/../lovinwinev2/node_modules/swiper/core/events/onScroll.js","webpack://build/../lovinwinev2/node_modules/swiper/core/events/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/breakpoints/setBreakpoint.js","webpack://build/../lovinwinev2/node_modules/swiper/core/breakpoints/getBreakpoint.js","webpack://build/../lovinwinev2/node_modules/swiper/core/breakpoints/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/classes/addClasses.js","webpack://build/../lovinwinev2/node_modules/swiper/core/classes/removeClasses.js","webpack://build/../lovinwinev2/node_modules/swiper/core/classes/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/images/loadImage.js","webpack://build/../lovinwinev2/node_modules/swiper/core/images/preloadImages.js","webpack://build/../lovinwinev2/node_modules/swiper/core/images/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/check-overflow/index.js","webpack://build/../lovinwinev2/node_modules/swiper/core/defaults.js","webpack://build/../lovinwinev2/node_modules/swiper/core/moduleExtendParams.js","webpack://build/../lovinwinev2/node_modules/swiper/core/core.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/virtual/virtual.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/keyboard/keyboard.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/mousewheel/mousewheel.js","webpack://build/../lovinwinev2/node_modules/swiper/shared/create-element-if-not-defined.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/navigation/navigation.js","webpack://build/../lovinwinev2/node_modules/swiper/shared/classes-to-selector.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/pagination/pagination.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/scrollbar/scrollbar.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/parallax/parallax.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/zoom/zoom.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/lazy/lazy.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/controller/controller.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/a11y/a11y.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/history/history.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/hash-navigation/hash-navigation.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/autoplay/autoplay.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/thumbs/thumbs.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/free-mode/free-mode.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/effect-cube/effect-cube.js","webpack://build/../lovinwinev2/node_modules/swiper/shared/create-shadow.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/effect-flip/effect-flip.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/effect-coverflow/effect-coverflow.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/effect-creative/effect-creative.js","webpack://build/../lovinwinev2/node_modules/swiper/modules/effect-cards/effect-cards.js","webpack://build/../lovinwinev2/node_modules/swiper/swiper.esm.js","webpack://build/../lovinwinev2/assets/javascripts/serie-design/serie-effects.js","webpack://build/../lovinwinev2/assets/javascripts/serie-design/serie-header.js","webpack://build/../lovinwinev2/assets/javascripts/common/header.js","webpack://build/../lovinwinev2/assets/javascripts/components/popup.js","webpack://build/../lovinwinev2/assets/javascripts/common/webforms.js","webpack://build/../lovinwinev2/assets/javascripts/components/store.js","webpack://build/../lovinwinev2/assets/javascripts/components/productPurchase.js","webpack://build/../lovinwinev2/assets/javascripts/components/vndaComponents.js","webpack://build/../lovinwinev2/assets/javascripts/serie-design/serie-spots-functions.js","webpack://build/../lovinwinev2/assets/javascripts/main.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// ===============================================================\n// ADIÇÃO MANUAL DE ASSET\n// ===============================================================\n// Usado para incluir assets no código de forma manual, conforme a necessidade\nexport function addAsset(source, onloadCallback) {\n\n if (!source || source === '') return console.error(`addAsset: caminho não definido.`)\n\n if (source.includes('.js')) {\n const scriptTag = document.createElement('script')\n scriptTag.setAttribute('src', source);\n\n if (onloadCallback && typeof onloadCallback === 'function') {\n scriptTag.onload = onloadCallback\n }\n\n return document.body.appendChild(scriptTag)\n\n } else if (source.includes('.css')) {\n const linkTag = document.createElement('link')\n linkTag.setAttribute('rel', 'stylesheet')\n linkTag.setAttribute('type', 'text/css')\n linkTag.setAttribute('href', source)\n return document.head.appendChild(linkTag)\n\n } else {\n const error = `addAsset: Erro ao criar o asset. Tipo de script não definido, ou não possui tratamento para este tipo de asset.`\n return console.error(error, source)\n }\n}\n\n// ===============================================================\n// BUSCA O CARRINHO ATIVO\n// ===============================================================\nexport async function getCart() {\n try {\n const response = await fetch('/carrinho');\n const cart = await response.json();\n return cart;\n } catch (error) {\n console.error('Erro ao buscar os dados do carrinho');\n console.error(error);\n }\n}\n\n// ===============================================================\n// SERIALIZE ARRAY\n// ===============================================================\nexport function serializeArray(form) {\n\n const formData = new FormData(form);\n const data = {};\n\n for (const [name, value] of formData) {\n data[name] = value\n }\n\n let formBody = [];\n\n for (const key in data) {\n const encodeKey = encodeURIComponent(key)\n const encodeValue = encodeURIComponent(data[key])\n formBody.push(`${encodeKey}=${encodeValue}`)\n }\n\n return formBody = formBody.join('&')\n \n}\n\n// ===============================================================\n// URL ENCODE FORM DATA\n// ===============================================================\nexport function urlencodeFormData(formData) {\n let string = '';\n\n function encode(s) {\n return encodeURIComponent(s).replace(/%20/g, '+');\n }\n\n for (const pair of formData.entries()) {\n if (typeof pair[1] == 'string') {\n string += (string ? '&' : '') + encode(pair[0]) + '=' + encode(pair[1]);\n }\n }\n return string;\n}\n\n// ===============================================================\n// SLIDE TOGGLE\n// ===============================================================\nexport function slideToggle(contentWrapper, content, duration = 500) {\n let initialHeight = window.getComputedStyle(contentWrapper).height;\n\n if (initialHeight == '0px') {\n return slideDown(contentWrapper, content, duration);\n } else {\n return slideUp(contentWrapper, duration);\n }\n}\n\n// ===============================================================\n// SLIDE UP\n// ===============================================================\nexport function slideUp(contentWrapper, duration = 500) {\n contentWrapper.style.height = '0px';\n contentWrapper.style.transition = `height ${duration} ease`;\n}\n\n// ===============================================================\n// SLIDE DOWN\n// ===============================================================\nexport function slideDown(contentWrapper, content, duration = 500) {\n let innerHeight = content.clientHeight;\n\n contentWrapper.style.height = `${innerHeight}px`;\n contentWrapper.style.transition = `height ${duration} ease`;\n}\n\n// ===============================================================\n// UPDATE DISCOUNT IN PRODUCT BLOCK\n// ===============================================================\nexport function updatePriceBlock() {\n const priceEls = document.querySelectorAll('[data-init-price]');\n\n if (priceEls == null) return;\n\n priceEls.forEach((priceEl) => {\n const discount = priceEl.dataset.discountPercent;\n\n priceEl.dispatchEvent(new Event('change'));\n\n // discount\n if (discount != '0') {\n priceEl.style.setProperty('--discount', `'-${discount}%'`);\n }\n });\n}\n\n// ===============================================================\n// PREÇO POR AJAX\n// ===============================================================\nexport function getPriceProd() {\n var selectors = document.querySelectorAll('[data-update-price]');\n var attr = 'update-price';\n\n if (selectors.length() > 0) {\n selectors.forEach((selector) => {\n var prodId = selector.dataset(attr);\n var url = '/produto/preco/' + prodId;\n\n if (prodId != '' && prodId != null) {\n $.ajax({\n url: url,\n type: 'GET',\n })\n .done((resp) => {\n selector.innerHTML = resp;\n })\n .fail((resp) => {\n console.error(resp);\n });\n }\n });\n }\n}\n\n// ===============================================================\n// DEBOUNCE\n// ===============================================================\n/*\n Debounce retorna uma função que enquanto continuar sendo chamada não é executada\n A função só será executada quando para de ser chamada por N milisegundos\n Útil para melhorar a performance de códigos que são executados muitas vezes por segundo, como o $(window).resize()\n\n Ex:\n \n $(window).resize(debounce(function() {\n // código a ser executado\n }, 500))\n \n No exemplo acima a função só será executada 500ms depois do último resize\n Abra o link abaixo e redimensione a janela branca e acompanhe o output do console\n Exemplo codepen: https://codepen.io/valkervieira/pen/oNgqyWY\n\n Um caso comum de uso é em lojas onde a seleção de um filtro na página de tag recarrega automáticamente a página\n Com o debounce o usuário pode escolher vários filtros rapidamente e a página só recarrega quando parar de escolher\n*/\n\nexport function debounce(func, wait, immediate) {\n var timeout;\n immediate || (immediate = true);\n\n return function () {\n var context = this,\n args = arguments;\n\n var later = function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n\n var callNow = immediate && !timeout;\n\n clearTimeout(timeout);\n\n timeout = setTimeout(later, wait);\n\n if (callNow) func.apply(context, args);\n };\n}\n\n// ===============================================================\n// THROTTLE\n// ===============================================================\n/*\n Throttle diminui a frequencia que uma função é executada\n Enquanto no debounce a função só é executada quando para de ser chamada, no throttle ela\n continua sendo executada só que em um intervalo mínimo de N milisegundos (default = 250)\n\n Ex:\n\n $(window).resize(throttle() {\n // código a ser executado\n }, 500)\n\n No exemplo acima a função resize é chamada várias vezes por segundo mas só é executada 1 vez a cada 500ms\n Abra o link abaixo, redimensione a janela branca e acompanhe o console\n Exemplo codepen: https://codepen.io/valkervieira/pen/yLyKEPW\n\n Um caso comum de uso é checar se o scroll passou de um determinado ponto, para fixar um header ou alterar algum elemento do DOM\n*/\nexport function throttle(fn, threshhold, scope) {\n threshhold || (threshhold = 250);\n var last, deferTimer;\n return function () {\n var context = scope || this;\n\n var now = +new Date(),\n args = arguments;\n if (last && now < last + threshhold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshhold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\n// ===============================================================\n// FORMAT MONEY\n// ===============================================================\nexport function formatMoney(value) {\n // FORMATA UM VALOR\n return (\n 'R$ ' +\n value\n .toFixed(2)\n .replace('.', ',')\n .replace(/(\\d)(?=(\\d{3})+\\,)/g, '$1.')\n );\n}\n\n// ===============================================================\n// FORMAT VALUE\n// ===============================================================\n\nexport const formatValue = function (value = '') {\n let parsedValue = value;\n if (typeof value === 'number') {\n parsedValue = value.toFixed(2).toString();\n }\n return parsedValue.replace('.', ',');\n};\n\n// ===============================================================\n// VALIDA QUANTIDADE\n// ===============================================================\nexport function validateQuantity(_val) {\n // VALIDA SE A QUANTIDADE INFORMADA É UM NÚMERO\n if (!isNaN(_val)) {\n if (parseInt(_val) > 0) {\n return true;\n }\n }\n\n return false;\n}\n\n// ===============================================================\n// CLEAR NUMBER\n// ===============================================================\nexport function getClearNumber(_val) {\n // RETORNA UM NÚMERO LIMPO COMO INT\n if (!isNaN(_val)) {\n var clearNumber = parseInt(_val);\n\n return clearNumber;\n }\n\n return false;\n}\n\n// ===============================================================\n// LOADING MODAL\n// ===============================================================\nexport function modalLoading () {\n window.addEventListener('load', () => {\n document.body.classList.remove('-loading');\n document.querySelector('.modal__loading').style.display = 'none';\n });\n}\n\n// ===============================================================\n// LAZY IMAGE BACKGROUND\n// ===============================================================\nexport function setWhoBackground() {\n\n const setStyle = function () {\n window.hasWhoBackground = true;\n const element = document.querySelector('[data-who-bg]');\n if (element) {\n let img = element.getAttribute('data-who-bg');\n element.style.backgroundImage = `url(${img})`;\n }\n }\n\n const eventType = (window.innerWidth <= 1024) ? 'scroll' : 'mousemove'\n window.addEventListener(eventType, () => {\n setStyle()\n }, { once: true })\n\n}\n","import { addAsset } from \"../components/utilities\";\n\nconst CartDrawer = {\n root: document.querySelector('#component-cart-drawer-root'),\n buttons: document.querySelectorAll('[data-toggle-cart]'),\n countWrapper: document.querySelector('[data-cart-count]'),\n settings: window.cartDrawerSettings || false,\n instance: false,\n\n setCartDrawer: function() {\n const { settings, root } = CartDrawer;\n\n if (!root || !settings) return;\n \n // Define frete grátis\n const freeShipping = (settings.freeShippingValue > 1) ? settings.freeShippingValue : 0\n\n // Inicia o componente\n const componentCartDrawer = new Vnda.Component.CartDrawer({\n anchor: 'right',\n display: 'list',\n startOpen: false,\n titleCart: 'Carrinho de compras',\n disableShippingCalculation: false,\n freeShipping,\n suggestedProductsTag: 'relacionado-mini-cart',\n widthItemSuggested: 25,\n });\n\n // Renderiza o componente\n componentCartDrawer.render(root);\n\n // Salva instância em propriedade local\n CartDrawer.instance = componentCartDrawer;\n\n // dispara evento de carregamento, escutado por CartDrawer.show()\n root.dispatchEvent(new Event('vnda:cart-drawer-loaded'))\n },\n\n loadComponent: function() {\n const { settings } = CartDrawer;\n addAsset(settings.script, CartDrawer.setCartDrawer);\n addAsset(settings.styles);\n },\n\n handleCartButton: function(button) {\n // Evita múltiplos cliques caso o carrinho precisa ser instanciado primeiro\n if (button.classList.contains('-loading')) {\n return;\n }\n\n // Abre o cart drawer\n button.classList.add('-loading');\n CartDrawer.show(() => { button.classList.remove('-loading') })\n },\n\n show: function (callback) {\n\n const { root } = CartDrawer;\n\n // No mobile, fecha o menu primeiro\n if (window.mmenu) window.mmenu.close()\n\n // Instancia o componente, caso ainda não exista\n if (!CartDrawer.instance) CartDrawer.loadComponent();\n\n // Observa criação da instância inicial, caso não tenha\n if (CartDrawer.instance === false) {\n root.addEventListener('vnda:cart-drawer-loaded', () => {\n CartDrawer.instance.open()\n if (typeof callback === 'function') callback()\n })\n } else {\n // Já possui cart drawer instanciado, retorna abertura\n CartDrawer.instance.open();\n if (typeof callback === 'function') callback()\n }\n },\n\n getCartItens: async function () {\n try {\n const response = await fetch('/carrinho/itens');\n const itens = await response.json()\n return itens;\n\n } catch (error) {\n console.error('Erro ao buscar a quantidade de produtos do carrinho');\n console.error(error);\n }\n },\n\n updateCartCount: async function (_itemsCount = null) {\n let items = _itemsCount;\n if (_itemsCount == null) items = await CartDrawer.getCartItens();\n\n this.countWrapper.innerHTML = items;\n },\n\n init: function () {\n const _this = this;\n const { buttons } = _this;\n\n // Atualiza o contador de itens do carrinho\n _this.updateCartCount();\n\n if (buttons.length > 0) buttons.forEach(button => {\n button.addEventListener('click', () => {\n _this.handleCartButton(button)\n })\n })\n },\n};\n\nexport default CartDrawer;\n","const Footer = {\n handleSubmenu: function () {\n // toggle menu footer nivel 1\n const menus = document.querySelectorAll(\n '[data-action=\"toggle-menu-footer\"]'\n );\n\n menus.forEach((menu) => {\n menu.addEventListener('click', () => {\n menu.classList.toggle('open');\n });\n });\n },\n init: function () {\n const _this = this;\n\n _this.handleSubmenu();\n },\n};\n\nexport default Footer;\n","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return (obj !== null &&\n typeof obj === 'object' &&\n 'constructor' in obj &&\n obj.constructor === Object);\n}\nfunction extend(target = {}, src = {}) {\n Object.keys(src).forEach((key) => {\n if (typeof target[key] === 'undefined')\n target[key] = src[key];\n else if (isObject(src[key]) &&\n isObject(target[key]) &&\n Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\n\nconst ssrDocument = {\n body: {},\n addEventListener() { },\n removeEventListener() { },\n activeElement: {\n blur() { },\n nodeName: '',\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() { },\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() { },\n getElementsByTagName() {\n return [];\n },\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\n\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: '',\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n history: {\n replaceState() { },\n pushState() { },\n go() { },\n back() { },\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() { },\n removeEventListener() { },\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n },\n };\n },\n Image() { },\n Date() { },\n screen: {},\n setTimeout() { },\n clearTimeout() { },\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n },\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { extend, getDocument, getWindow, ssrDocument, ssrWindow };\n","/**\n * Dom7 4.0.6\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * https://framework7.io/docs/dom7.html\n *\n * Copyright 2023, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: February 2, 2023\n */\nimport { getWindow, getDocument } from 'ssr-window';\n\n/* eslint-disable no-proto */\nfunction makeReactive(obj) {\n const proto = obj.__proto__;\n Object.defineProperty(obj, '__proto__', {\n get() {\n return proto;\n },\n\n set(value) {\n proto.__proto__ = value;\n }\n\n });\n}\n\nclass Dom7 extends Array {\n constructor(items) {\n if (typeof items === 'number') {\n super(items);\n } else {\n super(...(items || []));\n makeReactive(this);\n }\n }\n\n}\n\nfunction arrayFlat(arr = []) {\n const res = [];\n arr.forEach(el => {\n if (Array.isArray(el)) {\n res.push(...arrayFlat(el));\n } else {\n res.push(el);\n }\n });\n return res;\n}\nfunction arrayFilter(arr, callback) {\n return Array.prototype.filter.call(arr, callback);\n}\nfunction arrayUnique(arr) {\n const uniqueArray = [];\n\n for (let i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);\n }\n\n return uniqueArray;\n}\nfunction toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase());\n}\n\n// eslint-disable-next-line\n\nfunction qsa(selector, context) {\n if (typeof selector !== 'string') {\n return [selector];\n }\n\n const a = [];\n const res = context.querySelectorAll(selector);\n\n for (let i = 0; i < res.length; i += 1) {\n a.push(res[i]);\n }\n\n return a;\n}\n\nfunction $(selector, context) {\n const window = getWindow();\n const document = getDocument();\n let arr = [];\n\n if (!context && selector instanceof Dom7) {\n return selector;\n }\n\n if (!selector) {\n return new Dom7(arr);\n }\n\n if (typeof selector === 'string') {\n const html = selector.trim();\n\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n let toCreate = 'div';\n if (html.indexOf(' c.split(' ')));\n this.forEach(el => {\n el.classList.add(...classNames);\n });\n return this;\n}\n\nfunction removeClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n el.classList.remove(...classNames);\n });\n return this;\n}\n\nfunction toggleClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n classNames.forEach(className => {\n el.classList.toggle(className);\n });\n });\n}\n\nfunction hasClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n return arrayFilter(this, el => {\n return classNames.filter(className => el.classList.contains(className)).length > 0;\n }).length > 0;\n}\n\nfunction attr(attrs, value) {\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) return this[0].getAttribute(attrs);\n return undefined;\n } // Set attrs\n\n\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i].setAttribute(attrs, value);\n } else {\n // Object\n for (const attrName in attrs) {\n this[i][attrName] = attrs[attrName];\n this[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n\n return this;\n}\n\nfunction removeAttr(attr) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].removeAttribute(attr);\n }\n\n return this;\n}\n\nfunction prop(props, value) {\n if (arguments.length === 1 && typeof props === 'string') {\n // Get prop\n if (this[0]) return this[0][props];\n } else {\n // Set props\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i][props] = value;\n } else {\n // Object\n for (const propName in props) {\n this[i][propName] = props[propName];\n }\n }\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction data(key, value) {\n let el;\n\n if (typeof value === 'undefined') {\n el = this[0];\n if (!el) return undefined; // Get value\n\n if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) {\n return el.dom7ElementDataStorage[key];\n }\n\n const dataKey = el.getAttribute(`data-${key}`);\n\n if (dataKey) {\n return dataKey;\n }\n\n return undefined;\n } // Set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n el = this[i];\n if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n el.dom7ElementDataStorage[key] = value;\n }\n\n return this;\n}\n\nfunction removeData(key) {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n el.dom7ElementDataStorage[key] = null;\n delete el.dom7ElementDataStorage[key];\n }\n }\n}\n\nfunction dataset() {\n const el = this[0];\n if (!el) return undefined;\n const dataset = {}; // eslint-disable-line\n\n if (el.dataset) {\n for (const dataKey in el.dataset) {\n dataset[dataKey] = el.dataset[dataKey];\n }\n } else {\n for (let i = 0; i < el.attributes.length; i += 1) {\n const attr = el.attributes[i];\n\n if (attr.name.indexOf('data-') >= 0) {\n dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value;\n }\n }\n }\n\n for (const key in dataset) {\n if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1;\n }\n\n return dataset;\n}\n\nfunction val(value) {\n if (typeof value === 'undefined') {\n // get value\n const el = this[0];\n if (!el) return undefined;\n\n if (el.multiple && el.nodeName.toLowerCase() === 'select') {\n const values = [];\n\n for (let i = 0; i < el.selectedOptions.length; i += 1) {\n values.push(el.selectedOptions[i].value);\n }\n\n return values;\n }\n\n return el.value;\n } // set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') {\n for (let j = 0; j < el.options.length; j += 1) {\n el.options[j].selected = value.indexOf(el.options[j].value) >= 0;\n }\n } else {\n el.value = value;\n }\n }\n\n return this;\n}\n\nfunction value(value) {\n return this.val(value);\n}\n\nfunction transform(transform) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transform = transform;\n }\n\n return this;\n}\n\nfunction transition(duration) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration;\n }\n\n return this;\n}\n\nfunction on(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n\n function handleLiveEvent(e) {\n const target = e.target;\n if (!target) return;\n const eventData = e.target.dom7EventData || [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n if ($(target).is(targetSelector)) listener.apply(target, eventData);else {\n const parents = $(target).parents(); // eslint-disable-line\n\n for (let k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData);\n }\n }\n }\n\n function handleEvent(e) {\n const eventData = e && e.target ? e.target.dom7EventData || [] : [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n listener.apply(this, eventData);\n }\n\n const events = eventType.split(' ');\n let j;\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7Listeners) el.dom7Listeners = {};\n if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];\n el.dom7Listeners[event].push({\n listener,\n proxyListener: handleEvent\n });\n el.addEventListener(event, handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7LiveListeners) el.dom7LiveListeners = {};\n if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = [];\n el.dom7LiveListeners[event].push({\n listener,\n proxyListener: handleLiveEvent\n });\n el.addEventListener(event, handleLiveEvent, capture);\n }\n }\n }\n\n return this;\n}\n\nfunction off(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n const events = eventType.split(' ');\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n let handlers;\n\n if (!targetSelector && el.dom7Listeners) {\n handlers = el.dom7Listeners[event];\n } else if (targetSelector && el.dom7LiveListeners) {\n handlers = el.dom7LiveListeners[event];\n }\n\n if (handlers && handlers.length) {\n for (let k = handlers.length - 1; k >= 0; k -= 1) {\n const handler = handlers[k];\n\n if (listener && handler.listener === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (!listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n }\n }\n }\n }\n }\n\n return this;\n}\n\nfunction once(...args) {\n const dom = this;\n let [eventName, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventName, listener, capture] = args;\n targetSelector = undefined;\n }\n\n function onceHandler(...eventArgs) {\n listener.apply(this, eventArgs);\n dom.off(eventName, targetSelector, onceHandler, capture);\n\n if (onceHandler.dom7proxy) {\n delete onceHandler.dom7proxy;\n }\n }\n\n onceHandler.dom7proxy = listener;\n return dom.on(eventName, targetSelector, onceHandler, capture);\n}\n\nfunction trigger(...args) {\n const window = getWindow();\n const events = args[0].split(' ');\n const eventData = args[1];\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n\n if (window.CustomEvent) {\n const evt = new window.CustomEvent(event, {\n detail: eventData,\n bubbles: true,\n cancelable: true\n });\n el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0);\n el.dispatchEvent(evt);\n el.dom7EventData = [];\n delete el.dom7EventData;\n }\n }\n }\n\n return this;\n}\n\nfunction transitionStart(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionstart', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionstart', fireCallBack);\n }\n\n return this;\n}\n\nfunction transitionEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionend', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionend', fireCallBack);\n }\n\n return this;\n}\n\nfunction animationEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('animationend', fireCallBack);\n }\n\n if (callback) {\n dom.on('animationend', fireCallBack);\n }\n\n return this;\n}\n\nfunction width() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerWidth;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('width'));\n }\n\n return null;\n}\n\nfunction outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n\n return this[0].offsetWidth;\n }\n\n return null;\n}\n\nfunction height() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerHeight;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('height'));\n }\n\n return null;\n}\n\nfunction outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n\n return this[0].offsetHeight;\n }\n\n return null;\n}\n\nfunction offset() {\n if (this.length > 0) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n }\n\n return null;\n}\n\nfunction hide() {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.display = 'none';\n }\n\n return this;\n}\n\nfunction show() {\n const window = getWindow();\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.style.display === 'none') {\n el.style.display = '';\n }\n\n if (window.getComputedStyle(el, null).getPropertyValue('display') === 'none') {\n // Still not visible\n el.style.display = 'block';\n }\n }\n\n return this;\n}\n\nfunction styles() {\n const window = getWindow();\n if (this[0]) return window.getComputedStyle(this[0], null);\n return {};\n}\n\nfunction css(props, value) {\n const window = getWindow();\n let i;\n\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n // .css('width')\n if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);\n } else {\n // .css({ width: '100px' })\n for (i = 0; i < this.length; i += 1) {\n for (const prop in props) {\n this[i].style[prop] = props[prop];\n }\n }\n\n return this;\n }\n }\n\n if (arguments.length === 2 && typeof props === 'string') {\n // .css('width', '100px')\n for (i = 0; i < this.length; i += 1) {\n this[i].style[props] = value;\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction each(callback) {\n if (!callback) return this;\n this.forEach((el, index) => {\n callback.apply(el, [el, index]);\n });\n return this;\n}\n\nfunction filter(callback) {\n const result = arrayFilter(this, callback);\n return $(result);\n}\n\nfunction html(html) {\n if (typeof html === 'undefined') {\n return this[0] ? this[0].innerHTML : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].innerHTML = html;\n }\n\n return this;\n}\n\nfunction text(text) {\n if (typeof text === 'undefined') {\n return this[0] ? this[0].textContent.trim() : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].textContent = text;\n }\n\n return this;\n}\n\nfunction is(selector) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n let compareWith;\n let i;\n if (!el || typeof selector === 'undefined') return false;\n\n if (typeof selector === 'string') {\n if (el.matches) return el.matches(selector);\n if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n compareWith = $(selector);\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n if (selector === document) {\n return el === document;\n }\n\n if (selector === window) {\n return el === window;\n }\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n return false;\n}\n\nfunction index() {\n let child = this[0];\n let i;\n\n if (child) {\n i = 0; // eslint-disable-next-line\n\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n\n return i;\n }\n\n return undefined;\n}\n\nfunction eq(index) {\n if (typeof index === 'undefined') return this;\n const length = this.length;\n\n if (index > length - 1) {\n return $([]);\n }\n\n if (index < 0) {\n const returnIndex = length + index;\n if (returnIndex < 0) return $([]);\n return $([this[returnIndex]]);\n }\n\n return $([this[index]]);\n}\n\nfunction append(...els) {\n let newChild;\n const document = getDocument();\n\n for (let k = 0; k < els.length; k += 1) {\n newChild = els[k];\n\n for (let i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n while (tempDiv.firstChild) {\n this[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (let j = 0; j < newChild.length; j += 1) {\n this[i].appendChild(newChild[j]);\n }\n } else {\n this[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n}\n\nfunction appendTo(parent) {\n $(parent).append(this);\n return this;\n}\n\nfunction prepend(newChild) {\n const document = getDocument();\n let i;\n let j;\n\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n }\n } else {\n this[i].insertBefore(newChild, this[i].childNodes[0]);\n }\n }\n\n return this;\n}\n\nfunction prependTo(parent) {\n $(parent).prepend(this);\n return this;\n}\n\nfunction insertBefore(selector) {\n const before = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (before.length === 1) {\n before[0].parentNode.insertBefore(this[i], before[0]);\n } else if (before.length > 1) {\n for (let j = 0; j < before.length; j += 1) {\n before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);\n }\n }\n }\n}\n\nfunction insertAfter(selector) {\n const after = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (after.length === 1) {\n after[0].parentNode.insertBefore(this[i], after[0].nextSibling);\n } else if (after.length > 1) {\n for (let j = 0; j < after.length; j += 1) {\n after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);\n }\n }\n }\n}\n\nfunction next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {\n return $([this[0].nextElementSibling]);\n }\n\n return $([]);\n }\n\n if (this[0].nextElementSibling) return $([this[0].nextElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction nextAll(selector) {\n const nextEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(next).is(selector)) nextEls.push(next);\n } else nextEls.push(next);\n\n el = next;\n }\n\n return $(nextEls);\n}\n\nfunction prev(selector) {\n if (this.length > 0) {\n const el = this[0];\n\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {\n return $([el.previousElementSibling]);\n }\n\n return $([]);\n }\n\n if (el.previousElementSibling) return $([el.previousElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction prevAll(selector) {\n const prevEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(prev).is(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n\n el = prev;\n }\n\n return $(prevEls);\n}\n\nfunction siblings(selector) {\n return this.nextAll(selector).add(this.prevAll(selector));\n}\n\nfunction parent(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode !== null) {\n if (selector) {\n if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n } else {\n parents.push(this[i].parentNode);\n }\n }\n }\n\n return $(parents);\n}\n\nfunction parents(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n let parent = this[i].parentNode; // eslint-disable-line\n\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n\n parent = parent.parentNode;\n }\n }\n\n return $(parents);\n}\n\nfunction closest(selector) {\n let closest = this; // eslint-disable-line\n\n if (typeof selector === 'undefined') {\n return $([]);\n }\n\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n\n return closest;\n}\n\nfunction find(selector) {\n const foundElements = [];\n\n for (let i = 0; i < this.length; i += 1) {\n const found = this[i].querySelectorAll(selector);\n\n for (let j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n\n return $(foundElements);\n}\n\nfunction children(selector) {\n const children = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n const childNodes = this[i].children;\n\n for (let j = 0; j < childNodes.length; j += 1) {\n if (!selector || $(childNodes[j]).is(selector)) {\n children.push(childNodes[j]);\n }\n }\n }\n\n return $(children);\n}\n\nfunction remove() {\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n }\n\n return this;\n}\n\nfunction detach() {\n return this.remove();\n}\n\nfunction add(...els) {\n const dom = this;\n let i;\n let j;\n\n for (i = 0; i < els.length; i += 1) {\n const toAdd = $(els[i]);\n\n for (j = 0; j < toAdd.length; j += 1) {\n dom.push(toAdd[j]);\n }\n }\n\n return dom;\n}\n\nfunction empty() {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.nodeType === 1) {\n for (let j = 0; j < el.childNodes.length; j += 1) {\n if (el.childNodes[j].parentNode) {\n el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n }\n }\n\n el.textContent = '';\n }\n }\n\n return this;\n}\n\n// eslint-disable-next-line\n\nfunction scrollTo(...args) {\n const window = getWindow();\n let [left, top, duration, easing, callback] = args;\n\n if (args.length === 4 && typeof easing === 'function') {\n callback = easing;\n [left, top, duration, callback, easing] = args;\n }\n\n if (typeof easing === 'undefined') easing = 'swing';\n return this.each(function animate() {\n const el = this;\n let currentTop;\n let currentLeft;\n let maxTop;\n let maxLeft;\n let newTop;\n let newLeft;\n let scrollTop; // eslint-disable-line\n\n let scrollLeft; // eslint-disable-line\n\n let animateTop = top > 0 || top === 0;\n let animateLeft = left > 0 || left === 0;\n\n if (typeof easing === 'undefined') {\n easing = 'swing';\n }\n\n if (animateTop) {\n currentTop = el.scrollTop;\n\n if (!duration) {\n el.scrollTop = top;\n }\n }\n\n if (animateLeft) {\n currentLeft = el.scrollLeft;\n\n if (!duration) {\n el.scrollLeft = left;\n }\n }\n\n if (!duration) return;\n\n if (animateTop) {\n maxTop = el.scrollHeight - el.offsetHeight;\n newTop = Math.max(Math.min(top, maxTop), 0);\n }\n\n if (animateLeft) {\n maxLeft = el.scrollWidth - el.offsetWidth;\n newLeft = Math.max(Math.min(left, maxLeft), 0);\n }\n\n let startTime = null;\n if (animateTop && newTop === currentTop) animateTop = false;\n if (animateLeft && newLeft === currentLeft) animateLeft = false;\n\n function render(time = new Date().getTime()) {\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;\n let done;\n if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop);\n if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft);\n\n if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (done) {\n if (callback) callback();\n return;\n }\n\n if (animateTop) el.scrollTop = scrollTop;\n if (animateLeft) el.scrollLeft = scrollLeft;\n window.requestAnimationFrame(render);\n }\n\n window.requestAnimationFrame(render);\n });\n} // scrollTop(top, duration, easing, callback) {\n\n\nfunction scrollTop(...args) {\n let [top, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [top, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof top === 'undefined') {\n if (dom.length > 0) return dom[0].scrollTop;\n return null;\n }\n\n return dom.scrollTo(undefined, top, duration, easing, callback);\n}\n\nfunction scrollLeft(...args) {\n let [left, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [left, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof left === 'undefined') {\n if (dom.length > 0) return dom[0].scrollLeft;\n return null;\n }\n\n return dom.scrollTo(left, undefined, duration, easing, callback);\n}\n\n// eslint-disable-next-line\n\nfunction animate(initialProps, initialParams) {\n const window = getWindow();\n const els = this;\n const a = {\n props: Object.assign({}, initialProps),\n params: Object.assign({\n duration: 300,\n easing: 'swing' // or 'linear'\n\n /* Callbacks\n begin(elements)\n complete(elements)\n progress(elements, complete, remaining, start, tweenValue)\n */\n\n }, initialParams),\n elements: els,\n animating: false,\n que: [],\n\n easingProgress(easing, progress) {\n if (easing === 'swing') {\n return 0.5 - Math.cos(progress * Math.PI) / 2;\n }\n\n if (typeof easing === 'function') {\n return easing(progress);\n }\n\n return progress;\n },\n\n stop() {\n if (a.frameId) {\n window.cancelAnimationFrame(a.frameId);\n }\n\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n a.que = [];\n },\n\n done(complete) {\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n if (complete) complete(els);\n\n if (a.que.length > 0) {\n const que = a.que.shift();\n a.animate(que[0], que[1]);\n }\n },\n\n animate(props, params) {\n if (a.animating) {\n a.que.push([props, params]);\n return a;\n }\n\n const elements = []; // Define & Cache Initials & Units\n\n a.elements.each((el, index) => {\n let initialFullValue;\n let initialValue;\n let unit;\n let finalValue;\n let finalFullValue;\n if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a;\n elements[index] = {\n container: el\n };\n Object.keys(props).forEach(prop => {\n initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n initialValue = parseFloat(initialFullValue);\n unit = initialFullValue.replace(initialValue, '');\n finalValue = parseFloat(props[prop]);\n finalFullValue = props[prop] + unit;\n elements[index][prop] = {\n initialFullValue,\n initialValue,\n unit,\n finalValue,\n finalFullValue,\n currentValue: initialValue\n };\n });\n });\n let startTime = null;\n let time;\n let elementsDone = 0;\n let propsDone = 0;\n let done;\n let began = false;\n a.animating = true;\n\n function render() {\n time = new Date().getTime();\n let progress;\n let easeProgress; // let el;\n\n if (!began) {\n began = true;\n if (params.begin) params.begin(els);\n }\n\n if (startTime === null) {\n startTime = time;\n }\n\n if (params.progress) {\n // eslint-disable-next-line\n params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime);\n }\n\n elements.forEach(element => {\n const el = element;\n if (done || el.done) return;\n Object.keys(props).forEach(prop => {\n if (done || el.done) return;\n progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n easeProgress = a.easingProgress(params.easing, progress);\n const {\n initialValue,\n finalValue,\n unit\n } = el[prop];\n el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue);\n const currentValue = el[prop].currentValue;\n\n if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) {\n el.container.style[prop] = finalValue + unit;\n propsDone += 1;\n\n if (propsDone === Object.keys(props).length) {\n el.done = true;\n elementsDone += 1;\n }\n\n if (elementsDone === elements.length) {\n done = true;\n }\n }\n\n if (done) {\n a.done(params.complete);\n return;\n }\n\n el.container.style[prop] = currentValue + unit;\n });\n });\n if (done) return; // Then call\n\n a.frameId = window.requestAnimationFrame(render);\n }\n\n a.frameId = window.requestAnimationFrame(render);\n return a;\n }\n\n };\n\n if (a.elements.length === 0) {\n return els;\n }\n\n let animateInstance;\n\n for (let i = 0; i < a.elements.length; i += 1) {\n if (a.elements[i].dom7AnimateInstance) {\n animateInstance = a.elements[i].dom7AnimateInstance;\n } else a.elements[i].dom7AnimateInstance = a;\n }\n\n if (!animateInstance) {\n animateInstance = a;\n }\n\n if (initialProps === 'stop') {\n animateInstance.stop();\n } else {\n animateInstance.animate(a.props, a.params);\n }\n\n return els;\n}\n\nfunction stop() {\n const els = this;\n\n for (let i = 0; i < els.length; i += 1) {\n if (els[i].dom7AnimateInstance) {\n els[i].dom7AnimateInstance.stop();\n }\n }\n}\n\nconst noTrigger = 'resize scroll'.split(' ');\n\nfunction shortcut(name) {\n function eventHandler(...args) {\n if (typeof args[0] === 'undefined') {\n for (let i = 0; i < this.length; i += 1) {\n if (noTrigger.indexOf(name) < 0) {\n if (name in this[i]) this[i][name]();else {\n $(this[i]).trigger(name);\n }\n }\n }\n\n return this;\n }\n\n return this.on(name, ...args);\n }\n\n return eventHandler;\n}\n\nconst click = shortcut('click');\nconst blur = shortcut('blur');\nconst focus = shortcut('focus');\nconst focusin = shortcut('focusin');\nconst focusout = shortcut('focusout');\nconst keyup = shortcut('keyup');\nconst keydown = shortcut('keydown');\nconst keypress = shortcut('keypress');\nconst submit = shortcut('submit');\nconst change = shortcut('change');\nconst mousedown = shortcut('mousedown');\nconst mousemove = shortcut('mousemove');\nconst mouseup = shortcut('mouseup');\nconst mouseenter = shortcut('mouseenter');\nconst mouseleave = shortcut('mouseleave');\nconst mouseout = shortcut('mouseout');\nconst mouseover = shortcut('mouseover');\nconst touchstart = shortcut('touchstart');\nconst touchend = shortcut('touchend');\nconst touchmove = shortcut('touchmove');\nconst resize = shortcut('resize');\nconst scroll = shortcut('scroll');\n\nexport default $;\nexport { $, add, addClass, animate, animationEnd, append, appendTo, attr, blur, change, children, click, closest, css, data, dataset, detach, each, empty, eq, filter, find, focus, focusin, focusout, hasClass, height, hide, html, index, insertAfter, insertBefore, is, keydown, keypress, keyup, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, next, nextAll, off, offset, on, once, outerHeight, outerWidth, parent, parents, prepend, prependTo, prev, prevAll, prop, remove, removeAttr, removeClass, removeData, resize, scroll, scrollLeft, scrollTo, scrollTop, show, siblings, stop, styles, submit, text, toggleClass, touchend, touchmove, touchstart, transform, transition, transitionEnd, transitionStart, trigger, val, value, width };\n","import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, transform, transition, on, off, trigger, transitionEnd, outerWidth, outerHeight, styles, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, filter, remove } from 'dom7';\nconst Methods = {\n addClass,\n removeClass,\n hasClass,\n toggleClass,\n attr,\n removeAttr,\n transform,\n transition,\n on,\n off,\n trigger,\n transitionEnd,\n outerWidth,\n outerHeight,\n styles,\n offset,\n css,\n each,\n html,\n text,\n is,\n index,\n eq,\n append,\n prepend,\n next,\n nextAll,\n prev,\n prevAll,\n parent,\n parents,\n closest,\n find,\n children,\n filter,\n remove\n};\nObject.keys(Methods).forEach(methodName => {\n Object.defineProperty($.fn, methodName, {\n value: Methods[methodName],\n writable: true\n });\n});\nexport default $;","import { getWindow } from 'ssr-window';\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {// no getter for object\n }\n\n try {\n delete object[key];\n } catch (e) {// something got wrong\n }\n });\n}\n\nfunction nextTick(callback, delay = 0) {\n return setTimeout(callback, delay);\n}\n\nfunction now() {\n return Date.now();\n}\n\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n\n if (!style) {\n style = el.style;\n }\n\n return style;\n}\n\nfunction getTranslate(el, axis = 'x') {\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el, null);\n\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n } // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n\n\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n\n return curTransform || 0;\n}\n\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\n\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\n\nfunction extend(...args) {\n const to = Object(args[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n\n for (let i = 1; i < args.length; i += 1) {\n const nextSource = args[i];\n\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n\n return to;\n}\n\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\n\nfunction animateCSSModeScroll({\n swiper,\n targetPosition,\n side\n}) {\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n\n const animate = () => {\n time = new Date().getTime();\n\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n\n animate();\n}\n\nexport { animateCSSModeScroll, deleteProps, nextTick, now, getTranslate, isObject, extend, getComputedStyle, setCSSProperty };","import { getWindow, getDocument } from 'ssr-window';\nlet support;\n\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch),\n passiveListener: function checkPassiveListener() {\n let supportsPassive = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line\n get() {\n supportsPassive = true;\n }\n\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {// No support\n }\n\n return supportsPassive;\n }(),\n gestures: function checkGestures() {\n return 'ongesturestart' in window;\n }()\n };\n}\n\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n\n return support;\n}\n\nexport { getSupport };","import { getWindow } from 'ssr-window';\nimport { getSupport } from './get-support.js';\nlet deviceCached;\n\nfunction calcDevice({\n userAgent\n} = {}) {\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel'; // iPadOs 13 fix\n\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n } // Android\n\n\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n } // Export object\n\n\n return device;\n}\n\nfunction getDevice(overrides = {}) {\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n\n return deviceCached;\n}\n\nexport { getDevice };","import { getWindow } from 'ssr-window';\nlet browser;\n\nfunction calcBrowser() {\n const window = getWindow();\n\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n\n return {\n isSafari: isSafari(),\n isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)\n };\n}\n\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n\n return browser;\n}\n\nexport { getBrowser };","import { getWindow } from 'ssr-window';\nexport default function Resize({\n swiper,\n on,\n emit\n}) {\n const window = getWindow();\n let observer = null;\n\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(({\n contentBoxSize,\n contentRect,\n target\n }) => {\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n observer.observe(swiper.el);\n };\n\n const removeObserver = () => {\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}","import { getWindow } from 'ssr-window';\nexport default function Observer({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const observers = [];\n const window = getWindow();\n\n const attach = (target, options = {}) => {\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n\n const init = () => {\n if (!swiper.params.observer) return;\n\n if (swiper.params.observeParents) {\n const containerParents = swiper.$el.parents();\n\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n } // Observe container\n\n\n attach(swiper.$el[0], {\n childList: swiper.params.observeSlideChildren\n }); // Observe wrapper\n\n attach(swiper.$wrapperEl[0], {\n attributes: false\n });\n };\n\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}","/* eslint-disable no-underscore-dangle */\nexport default {\n on(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n\n once(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n\n function onceHandler(...args) {\n self.off(events, onceHandler);\n\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n\n handler.apply(self, args);\n }\n\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n\n onAny(handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n\n return self;\n },\n\n offAny(handler) {\n const self = this;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n\n return self;\n },\n\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n\n emit(...args) {\n const self = this;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n\n};","export default function updateSize() {\n const swiper = this;\n let width;\n let height;\n const $el = swiper.$el;\n\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = $el[0].clientWidth;\n }\n\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = $el[0].clientHeight;\n }\n\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n } // Subtract paddings\n\n\n width = width - parseInt($el.css('padding-left') || 0, 10) - parseInt($el.css('padding-right') || 0, 10);\n height = height - parseInt($el.css('padding-top') || 0, 10) - parseInt($el.css('padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}","import { setCSSProperty } from '../../shared/utils.js';\nexport default function updateSlides() {\n const swiper = this;\n\n function getDirectionLabel(property) {\n if (swiper.isHorizontal()) {\n return property;\n } // prettier-ignore\n\n\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0);\n }\n\n const params = swiper.params;\n const {\n $wrapperEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n\n let offsetAfter = params.slidesOffsetAfter;\n\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n\n if (typeof swiperSize === 'undefined') {\n return;\n }\n\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n }\n\n swiper.virtualSize = -spaceBetween; // reset margins\n\n if (rtl) slides.css({\n marginLeft: '',\n marginBottom: '',\n marginTop: ''\n });else slides.css({\n marginRight: '',\n marginBottom: '',\n marginTop: ''\n }); // reset cssMode offsets\n\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', '');\n }\n\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n\n if (gridEnabled) {\n swiper.grid.initSlides(slidesLength);\n } // Calc slides\n\n\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n const slide = slides.eq(i);\n\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel);\n }\n\n if (slide.css('display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[getDirectionLabel('width')] = ``;\n }\n\n const slideStyles = getComputedStyle(slide[0]);\n const currentTransform = slide[0].style.transform;\n const currentWebKitTransform = slide[0].style.webkitTransform;\n\n if (currentTransform) {\n slide[0].style.transform = 'none';\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = 'none';\n }\n\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide[0];\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n\n if (currentTransform) {\n slide[0].style.transform = currentTransform;\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = currentWebKitTransform;\n }\n\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n\n if (slides[i]) {\n slides[i].style[getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n\n slidesSizesGrid.push(slideSize);\n\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n $wrapperEl.css({\n width: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (params.setWrapperSize) {\n $wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);\n } // Remove last grid elements depending on width\n\n\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n\n snapGrid = newSlidesGrid;\n\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n\n if (snapGrid.length === 0) snapGrid = [0];\n\n if (params.spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode) return true;\n\n if (slideIndex === slides.length - 1) {\n return false;\n }\n\n return true;\n }).css({\n [key]: `${spaceBetween}px`\n });\n }\n\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap < 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n}","export default function updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0];\n }\n\n return swiper.slides.eq(index)[0];\n }; // Find slides currently in view\n\n\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n swiper.visibleSlides.each(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n } // Find new height from highest slide in view\n\n\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n } // Update Height\n\n\n if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`);\n}","export default function updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;\n }\n}","import $ from '../../shared/dom.js';\nexport default function updateSlidesProgress(translate = this && this.translate || 0) {\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate; // Visible Slides\n\n slides.removeClass(params.slideVisibleClass);\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides.eq(i).addClass(params.slideVisibleClass);\n }\n\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n\n swiper.visibleSlides = $(swiper.visibleSlides);\n}","export default function updateProgress(translate) {\n const swiper = this;\n\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1; // eslint-disable-next-line\n\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n isBeginning = progress <= 0;\n isEnd = progress >= 1;\n }\n\n Object.assign(swiper, {\n progress,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n\n swiper.emit('progress', progress);\n}","export default function updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n $wrapperEl,\n activeIndex,\n realIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);\n let activeSlide;\n\n if (isVirtual) {\n activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index=\"${activeIndex}\"]`);\n } else {\n activeSlide = slides.eq(activeIndex);\n } // Active classes\n\n\n activeSlide.addClass(params.slideActiveClass);\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n }\n } // Next Slide\n\n\n let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);\n\n if (params.loop && nextSlide.length === 0) {\n nextSlide = slides.eq(0);\n nextSlide.addClass(params.slideNextClass);\n } // Prev Slide\n\n\n let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);\n\n if (params.loop && prevSlide.length === 0) {\n prevSlide = slides.eq(-1);\n prevSlide.addClass(params.slidePrevClass);\n }\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n }\n\n if (prevSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n }\n }\n\n swiper.emitSlidesClasses();\n}","export default function updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n slidesGrid,\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n\n if (typeof activeIndex === 'undefined') {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n } // Normalize slideIndex\n\n\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n }\n\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if (activeIndex === previousIndex) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n\n return;\n } // Get real index\n\n\n const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);\n Object.assign(swiper, {\n snapIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n swiper.emit('slideChange');\n }\n}","import $ from '../../shared/dom.js';\nexport default function updateClickedSlide(e) {\n const swiper = this;\n const params = swiper.params;\n const slide = $(e).closest(`.${params.slideClass}`)[0];\n let slideFound = false;\n let slideIndex;\n\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}","import updateSize from './updateSize.js';\nimport updateSlides from './updateSlides.js';\nimport updateAutoHeight from './updateAutoHeight.js';\nimport updateSlidesOffset from './updateSlidesOffset.js';\nimport updateSlidesProgress from './updateSlidesProgress.js';\nimport updateProgress from './updateProgress.js';\nimport updateSlidesClasses from './updateSlidesClasses.js';\nimport updateActiveIndex from './updateActiveIndex.js';\nimport updateClickedSlide from './updateClickedSlide.js';\nexport default {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};","import { getTranslate } from '../../shared/utils.js';\nexport default function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') {\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n $wrapperEl\n } = swiper;\n\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n\n if (params.cssMode) {\n return translate;\n }\n\n let currentTranslate = getTranslate($wrapperEl[0], axis);\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}","export default function setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n $wrapperEl,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);\n }\n\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y; // Check if we need to update progress\n\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, byController);\n}","export default function minTranslate() {\n return -this.snapGrid[0];\n}","export default function maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; // Update progress\n\n swiper.updateProgress(newTranslate);\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n\n if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n\n return true;\n}","import getTranslate from './getTranslate.js';\nimport setTranslate from './setTranslate.js';\nimport minTranslate from './minTranslate.js';\nimport maxTranslate from './maxTranslate.js';\nimport translateTo from './translateTo.js';\nexport default {\n getTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};","export default function setTransition(duration, byController) {\n const swiper = this;\n\n if (!swiper.params.cssMode) {\n swiper.$wrapperEl.transition(duration);\n }\n\n swiper.emit('setTransition', duration, byController);\n}","export default function transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step\n}) {\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n\n swiper.emit(`transition${step}`);\n\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n\n swiper.emit(`slideChangeTransition${step}`);\n\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionStart(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionEnd(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}","import setTransition from './setTransition.js';\nimport transitionStart from './transitionStart.js';\nimport transitionEnd from './transitionEnd.js';\nexport default {\n setTransition,\n transitionStart,\n transitionEnd\n};","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, internal, initial) {\n if (typeof index !== 'number' && typeof index !== 'string') {\n throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`);\n }\n\n if (typeof index === 'string') {\n /**\n * The `index` argument converted from `string` to `number`.\n * @type {number}\n */\n const indexAsNumber = parseInt(index, 10);\n /**\n * Determines whether the `index` argument is a valid `number`\n * after being converted from the `string` type.\n * @type {boolean}\n */\n\n const isValidNumber = isFinite(indexAsNumber);\n\n if (!isValidNumber) {\n throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`);\n } // Knowing that the converted `index` is a valid number,\n // we can update the original argument's value.\n\n\n index = indexAsNumber;\n }\n\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) {\n return false;\n }\n\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n const translate = -snapGrid[snapIndex]; // Update progress\n\n swiper.updateProgress(translate); // Normalize slideIndex\n\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n } // Directions locks\n\n\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) return false;\n }\n }\n\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index\n\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex); // Update Height\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n swiper.updateSlidesClasses();\n\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n\n return false;\n }\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._swiperImmediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n }\n\n return true;\n}","export default function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n let newIndex = index;\n\n if (swiper.params.loop) {\n newIndex += swiper.loopedSlides;\n }\n\n return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideNext(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n animating,\n enabled,\n params\n } = swiper;\n if (!enabled) return swiper;\n let perGroup = params.slidesPerGroup;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slidePrev(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n params,\n animating,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return swiper;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n\n let prevIndex = 0;\n\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n\n if (params.rewind && swiper.isBeginning) {\n return swiper.slideTo(swiper.slides.length - 1, speed, runCallbacks, internal);\n }\n\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideReset(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideToClosest(speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) {\n const swiper = this;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}","import $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\nexport default function slideToClickedSlide() {\n const swiper = this;\n const {\n params,\n $wrapperEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}","import slideTo from './slideTo.js';\nimport slideToLoop from './slideToLoop.js';\nimport slideNext from './slideNext.js';\nimport slidePrev from './slidePrev.js';\nimport slideReset from './slideReset.js';\nimport slideToClosest from './slideToClosest.js';\nimport slideToClickedSlide from './slideToClickedSlide.js';\nexport default {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loopCreate() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n $wrapperEl\n } = swiper; // Remove duplicated slides\n\n const $selector = $wrapperEl.children().length > 0 ? $($wrapperEl.children()[0].parentNode) : $wrapperEl;\n $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();\n let slides = $selector.children(`.${params.slideClass}`);\n\n if (params.loopFillGroupWithBlank) {\n const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup;\n\n if (blankSlidesNum !== params.slidesPerGroup) {\n for (let i = 0; i < blankSlidesNum; i += 1) {\n const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);\n $selector.append(blankNode);\n }\n\n slides = $selector.children(`.${params.slideClass}`);\n }\n }\n\n if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;\n swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));\n swiper.loopedSlides += params.loopAdditionalSlides;\n\n if (swiper.loopedSlides > slides.length) {\n swiper.loopedSlides = slides.length;\n }\n\n const prependSlides = [];\n const appendSlides = [];\n slides.each((el, index) => {\n const slide = $(el);\n\n if (index < swiper.loopedSlides) {\n appendSlides.push(el);\n }\n\n if (index < slides.length && index >= slides.length - swiper.loopedSlides) {\n prependSlides.push(el);\n }\n\n slide.attr('data-swiper-slide-index', index);\n });\n\n for (let i = 0; i < appendSlides.length; i += 1) {\n $selector.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n\n for (let i = prependSlides.length - 1; i >= 0; i -= 1) {\n $selector.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n}","export default function loopFix() {\n const swiper = this;\n swiper.emit('beforeLoopFix');\n const {\n activeIndex,\n slides,\n loopedSlides,\n allowSlidePrev,\n allowSlideNext,\n snapGrid,\n rtlTranslate: rtl\n } = swiper;\n let newIndex;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n const snapTranslate = -snapGrid[activeIndex];\n const diff = snapTranslate - swiper.getTranslate(); // Fix For Negative Oversliding\n\n if (activeIndex < loopedSlides) {\n newIndex = slides.length - loopedSlides * 3 + activeIndex;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n } else if (activeIndex >= slides.length - loopedSlides) {\n // Fix For Positive Oversliding\n newIndex = -slides.length + activeIndex + loopedSlides;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n }\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n}","export default function loopDestroy() {\n const swiper = this;\n const {\n $wrapperEl,\n params,\n slides\n } = swiper;\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();\n slides.removeAttr('data-swiper-slide-index');\n}","import loopCreate from './loopCreate.js';\nimport loopFix from './loopFix.js';\nimport loopDestroy from './loopDestroy.js';\nexport default {\n loopCreate,\n loopFix,\n loopDestroy\n};","export default function setGrabCursor(moving) {\n const swiper = this;\n if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n el.style.cursor = 'move';\n el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n}","export default function unsetGrabCursor() {\n const swiper = this;\n\n if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n}","import setGrabCursor from './setGrabCursor.js';\nimport unsetGrabCursor from './unsetGrabCursor.js';\nexport default {\n setGrabCursor,\n unsetGrabCursor\n};","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js'; // Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\n\nfunction closestElement(selector, base = this) {\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n return found || __closestFrom(el.getRootNode().host);\n }\n\n return __closestFrom(base);\n}\n\nexport default function onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n const window = getWindow();\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let $targetEl = $(e.target);\n\n if (params.touchEventsTarget === 'wrapper') {\n if (!$targetEl.closest(swiper.wrapperEl).length) return;\n }\n\n data.isTouchEvent = e.type === 'touchstart';\n if (!data.isTouchEvent && 'which' in e && e.which === 3) return;\n if (!data.isTouchEvent && 'button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return; // change target el for shadow root component\n\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n\n if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) {\n $targetEl = $(event.path[0]);\n }\n\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element\n\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, e.target) : $targetEl.closest(noSwipingSelector)[0])) {\n swiper.allowClick = true;\n return;\n }\n\n if (params.swipeHandler) {\n if (!$targetEl.closest(params.swipeHandler)[0]) return;\n }\n\n touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n } else {\n return;\n }\n }\n\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n\n if (e.type !== 'touchstart') {\n let preventDefault = true;\n if ($targetEl.is(data.focusableElements)) preventDefault = false;\n\n if (document.activeElement && $(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) {\n document.activeElement.blur();\n }\n\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) {\n e.preventDefault();\n }\n }\n\n swiper.emit('touchStart', e);\n}","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js';\nexport default function onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n return;\n }\n\n if (data.isTouchEvent && e.type !== 'touchmove') return;\n const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);\n const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;\n const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;\n\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n\n if (!swiper.allowTouchMove) {\n // isMoved = true;\n swiper.allowClick = false;\n\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n\n return;\n }\n\n if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n\n if (data.isTouchEvent && document.activeElement) {\n if (e.target === document.activeElement && $(e.target).is(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n\n if (e.targetTouches && e.targetTouches.length > 1) return;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n\n if (!data.startMoving) {\n return;\n }\n\n swiper.allowClick = false;\n\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n\n if (!data.isMoved) {\n if (params.loop && !params.cssMode) {\n swiper.loopFix();\n }\n\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n\n if (swiper.animating) {\n swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');\n }\n\n data.allowMomentumBounce = false; // Grab Cursor\n\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n\n swiper.emit('sliderFirstMove', e);\n }\n\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n let diff = swiper.isHorizontal() ? diffX : diffY;\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) diff = -diff;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n\n if (diff > 0 && data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n } // Directions locks\n\n\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n } // Threshold\n\n\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n\n if (!params.followFinger || params.cssMode) return; // Update active index in free mode\n\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n } // Update progress\n\n\n swiper.updateProgress(data.currentTranslate); // Update translate\n\n swiper.setTranslate(data.currentTranslate);\n}","import { now, nextTick } from '../../shared/utils.js';\nexport default function onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n\n data.allowTouchCallbacks = false;\n\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n\n data.isMoved = false;\n data.startMoving = false;\n return;\n } // Return Grab Cursor\n\n\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n } // Time diff\n\n\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click\n\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target);\n swiper.emit('tap click', e);\n\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n\n if (params.cssMode) {\n return;\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n } // Find current slide\n\n\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n } // Find current slide size\n\n\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(stopIndex + increment);\n }\n\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}","export default function onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n } // Save locks\n\n\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper; // Disable locks on resize\n\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.run();\n } // Return locks after resize\n\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}","export default function onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}","export default function onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n } // eslint-disable-next-line\n\n\n if (swiper.translate === -0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, false);\n}","import { getDocument } from 'ssr-window';\nimport onTouchStart from './onTouchStart.js';\nimport onTouchMove from './onTouchMove.js';\nimport onTouchEnd from './onTouchEnd.js';\nimport onResize from './onResize.js';\nimport onClick from './onClick.js';\nimport onScroll from './onScroll.js';\nlet dummyEventAttached = false;\n\nfunction dummyEventListener() {}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n touchEvents,\n el,\n wrapperEl,\n device,\n support\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method; // Touch Events\n\n if (!support.touch) {\n el[domMethod](touchEvents.start, swiper.onTouchStart, false);\n document[domMethod](touchEvents.move, swiper.onTouchMove, capture);\n document[domMethod](touchEvents.end, swiper.onTouchEnd, false);\n } else {\n const passiveListener = touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener);\n el[domMethod](touchEvents.move, swiper.onTouchMove, support.passiveListener ? {\n passive: false,\n capture\n } : capture);\n el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener);\n\n if (touchEvents.cancel) {\n el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n }\n } // Prevent Links Clicks\n\n\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n } // Resize handler\n\n\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n};\n\nfunction attachEvents() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n support\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n\n swiper.onClick = onClick.bind(swiper);\n\n if (support.touch && !dummyEventAttached) {\n document.addEventListener('touchstart', dummyEventListener);\n dummyEventAttached = true;\n }\n\n events(swiper, 'on');\n}\n\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\n\nexport default {\n attachEvents,\n detachEvents\n};","import { extend } from '../../shared/utils.js';\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\n\nexport default function setBreakpoint() {\n const swiper = this;\n const {\n activeIndex,\n initialized,\n loopedSlides = 0,\n params,\n $el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; // Get breakpoint for window width and update parameters\n\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n\n if (wasMultiRow && !isMultiRow) {\n $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n $el.addClass(`${params.containerModifierClass}grid`);\n\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n $el.addClass(`${params.containerModifierClass}grid-column`);\n }\n\n swiper.emitContainerClasses();\n }\n\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n\n if (needsReLoop && initialized) {\n swiper.loopDestroy();\n swiper.loopCreate();\n swiper.updateSlides();\n swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false);\n }\n\n swiper.emit('breakpoint', breakpointParams);\n}","import { getWindow } from 'ssr-window';\nexport default function getBreakpoint(breakpoints, base = 'window', containerEl) {\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n\n return breakpoint || 'max';\n}","import setBreakpoint from './setBreakpoint.js';\nimport getBreakpoint from './getBreakpoint.js';\nexport default {\n setBreakpoint,\n getBreakpoint\n};","function prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\n\nexport default function addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n $el,\n device,\n support\n } = swiper; // prettier-ignore\n\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'pointer-events': !support.touch\n }, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n $el.addClass([...classNames].join(' '));\n swiper.emitContainerClasses();\n}","export default function removeClasses() {\n const swiper = this;\n const {\n $el,\n classNames\n } = swiper;\n $el.removeClass(classNames.join(' '));\n swiper.emitContainerClasses();\n}","import addClasses from './addClasses.js';\nimport removeClasses from './removeClasses.js';\nexport default {\n addClasses,\n removeClasses\n};","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) {\n const window = getWindow();\n let image;\n\n function onReady() {\n if (callback) callback();\n }\n\n const isPicture = $(imageEl).parent('picture')[0];\n\n if (!isPicture && (!imageEl.complete || !checkForComplete)) {\n if (src) {\n image = new window.Image();\n image.onload = onReady;\n image.onerror = onReady;\n\n if (sizes) {\n image.sizes = sizes;\n }\n\n if (srcset) {\n image.srcset = srcset;\n }\n\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n } else {\n // image already loaded...\n onReady();\n }\n}","export default function preloadImages() {\n const swiper = this;\n swiper.imagesToLoad = swiper.$el.find('img');\n\n function onReady() {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;\n if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;\n\n if (swiper.imagesLoaded === swiper.imagesToLoad.length) {\n if (swiper.params.updateOnImagesReady) swiper.update();\n swiper.emit('imagesReady');\n }\n }\n\n for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {\n const imageEl = swiper.imagesToLoad[i];\n swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady);\n }\n}","import loadImage from './loadImage.js';\nimport preloadImages from './preloadImages.js';\nexport default {\n loadImage,\n preloadImages\n};","function checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\n\nexport default {\n checkOverflow\n};","export default {\n init: true,\n direction: 'horizontal',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 0,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n loopFillGroupWithBlank: false,\n loopPreventsSlide: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-invisible-blank',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};","import { extend } from '../shared/utils.js';\nexport default function moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj = {}) {\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) {\n params[moduleParamName] = {\n auto: true\n };\n }\n\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}","/* eslint no-param-reassign: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport $ from '../shared/dom.js';\nimport { extend, now, deleteProps } from '../shared/utils.js';\nimport { getSupport } from '../shared/get-support.js';\nimport { getDevice } from '../shared/get-device.js';\nimport { getBrowser } from '../shared/get-browser.js';\nimport Resize from './modules/resize/resize.js';\nimport Observer from './modules/observer/observer.js';\nimport eventsEmitter from './events-emitter.js';\nimport update from './update/index.js';\nimport translate from './translate/index.js';\nimport transition from './transition/index.js';\nimport slide from './slide/index.js';\nimport loop from './loop/index.js';\nimport grabCursor from './grab-cursor/index.js';\nimport events from './events/index.js';\nimport breakpoints from './breakpoints/index.js';\nimport classes from './classes/index.js';\nimport images from './images/index.js';\nimport checkOverflow from './check-overflow/index.js';\nimport defaults from './defaults.js';\nimport moduleExtendParams from './moduleExtendParams.js';\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events,\n breakpoints,\n checkOverflow,\n classes,\n images\n};\nconst extendedDefaults = {};\n\nclass Swiper {\n constructor(...args) {\n let el;\n let params;\n\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n\n if (params.el && $(params.el).length > 1) {\n const swipers = [];\n $(params.el).each(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n return swipers;\n } // Swiper Instance\n\n\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n }); // Extend defaults with modules params\n\n const swiperParams = extend({}, defaults, allModulesParams); // Extend defaults with passed params\n\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params); // add event listeners\n\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n } // Save Dom lib\n\n\n swiper.$ = $; // Extend Swiper\n\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: $(),\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEvents: function touchEvents() {\n const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];\n const desktop = ['pointerdown', 'pointermove', 'pointerup'];\n swiper.touchEventsTouch = {\n start: touch[0],\n move: touch[1],\n end: touch[2],\n cancel: touch[3]\n };\n swiper.touchEventsDesktop = {\n start: desktop[0],\n move: desktop[1],\n end: desktop[2]\n };\n return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;\n }(),\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: now(),\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n isTouchEvent: undefined,\n startMoving: undefined\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper'); // Init\n\n if (swiper.params.init) {\n swiper.init();\n } // Return app instance\n\n\n return swiper;\n }\n\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n\n swiper.emit('enable');\n }\n\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n\n swiper.emit('disable');\n }\n\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n\n getSlideClasses(slideEl) {\n const swiper = this;\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.each(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n\n slidesPerViewDynamic(view = 'current', exact = false) {\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex].swiperSlideSize;\n let breakLoop;\n\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n\n return spv;\n }\n\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n let translated;\n\n if (swiper.params.freeMode && swiper.params.freeMode.enabled) {\n setTranslate();\n\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {\n translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (!translated) {\n setTranslate();\n }\n }\n\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n\n swiper.emit('update');\n }\n\n changeDirection(newDirection, needUpdate = true) {\n const swiper = this;\n const currentDirection = swiper.params.direction;\n\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n\n swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.each(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n\n mount(el) {\n const swiper = this;\n if (swiper.mounted) return true; // Find el\n\n const $el = $(el || swiper.params.el);\n el = $el[0];\n\n if (!el) {\n return false;\n }\n\n el.swiper = swiper;\n\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = $(el.shadowRoot.querySelector(getWrapperSelector())); // Children needs to return slot items\n\n res.children = options => $el.children(options);\n\n return res;\n }\n\n return $el.children(getWrapperSelector());\n }; // Find Wrapper\n\n\n let $wrapperEl = getWrapper();\n\n if ($wrapperEl.length === 0 && swiper.params.createElements) {\n const document = getDocument();\n const wrapper = document.createElement('div');\n $wrapperEl = $(wrapper);\n wrapper.className = swiper.params.wrapperClass;\n $el.append(wrapper);\n $el.children(`.${swiper.params.slideClass}`).each(slideEl => {\n $wrapperEl.append(slideEl);\n });\n }\n\n Object.assign(swiper, {\n $el,\n el,\n $wrapperEl,\n wrapperEl: $wrapperEl[0],\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),\n wrongRTL: $wrapperEl.css('display') === '-webkit-box'\n });\n return true;\n }\n\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit'); // Set breakpoint\n\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n } // Add Classes\n\n\n swiper.addClasses(); // Create loop\n\n if (swiper.params.loop) {\n swiper.loopCreate();\n } // Update size\n\n\n swiper.updateSize(); // Update slides\n\n swiper.updateSlides();\n\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n } // Set Grab Cursor\n\n\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n if (swiper.params.preloadImages) {\n swiper.preloadImages();\n } // Slide To Initial Slide\n\n\n if (swiper.params.loop) {\n swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n } // Attach events\n\n\n swiper.attachEvents(); // Init Flag\n\n swiper.initialized = true; // Emit\n\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n\n destroy(deleteInstance = true, cleanStyles = true) {\n const swiper = this;\n const {\n params,\n $el,\n $wrapperEl,\n slides\n } = swiper;\n\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n\n swiper.emit('beforeDestroy'); // Init Flag\n\n swiper.initialized = false; // Detach events\n\n swiper.detachEvents(); // Destroy loop\n\n if (params.loop) {\n swiper.loopDestroy();\n } // Cleanup styles\n\n\n if (cleanStyles) {\n swiper.removeClasses();\n $el.removeAttr('style');\n $wrapperEl.removeAttr('style');\n\n if (slides && slides.length) {\n slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index');\n }\n }\n\n swiper.emit('destroy'); // Detach emitter events\n\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n\n if (deleteInstance !== false) {\n swiper.$el[0].swiper = null;\n deleteProps(swiper);\n }\n\n swiper.destroyed = true;\n return null;\n }\n\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n\n static get extendedDefaults() {\n return extendedDefaults;\n }\n\n static get defaults() {\n return defaults;\n }\n\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n\n Swiper.installModule(module);\n return Swiper;\n }\n\n}\n\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\nexport default Swiper;","import $ from '../../shared/dom.js';\nimport { setCSSProperty } from '../../shared/utils.js';\nexport default function Virtual({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n virtual: {\n enabled: false,\n slides: [],\n cache: true,\n renderSlide: null,\n renderExternal: null,\n renderExternalUpdate: true,\n addSlidesBefore: 0,\n addSlidesAfter: 0\n }\n });\n let cssModeTimeout;\n swiper.virtual = {\n cache: {},\n from: undefined,\n to: undefined,\n slides: [],\n offset: 0,\n slidesGrid: []\n };\n\n function renderSlide(slide, index) {\n const params = swiper.params.virtual;\n\n if (params.cache && swiper.virtual.cache[index]) {\n return swiper.virtual.cache[index];\n }\n\n const $slideEl = params.renderSlide ? $(params.renderSlide.call(swiper, slide, index)) : $(`
${slide}
`);\n if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index);\n if (params.cache) swiper.virtual.cache[index] = $slideEl;\n return $slideEl;\n }\n\n function update(force) {\n const {\n slidesPerView,\n slidesPerGroup,\n centeredSlides\n } = swiper.params;\n const {\n addSlidesBefore,\n addSlidesAfter\n } = swiper.params.virtual;\n const {\n from: previousFrom,\n to: previousTo,\n slides,\n slidesGrid: previousSlidesGrid,\n offset: previousOffset\n } = swiper.virtual;\n\n if (!swiper.params.cssMode) {\n swiper.updateActiveIndex();\n }\n\n const activeIndex = swiper.activeIndex || 0;\n let offsetProp;\n if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top';\n let slidesAfter;\n let slidesBefore;\n\n if (centeredSlides) {\n slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;\n slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;\n } else {\n slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter;\n slidesBefore = slidesPerGroup + addSlidesBefore;\n }\n\n const from = Math.max((activeIndex || 0) - slidesBefore, 0);\n const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);\n const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);\n Object.assign(swiper.virtual, {\n from,\n to,\n offset,\n slidesGrid: swiper.slidesGrid\n });\n\n function onRendered() {\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n if (swiper.lazy && swiper.params.lazy.enabled) {\n swiper.lazy.load();\n }\n }\n\n if (previousFrom === from && previousTo === to && !force) {\n if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {\n swiper.slides.css(offsetProp, `${offset}px`);\n }\n\n swiper.updateProgress();\n return;\n }\n\n if (swiper.params.virtual.renderExternal) {\n swiper.params.virtual.renderExternal.call(swiper, {\n offset,\n from,\n to,\n slides: function getSlides() {\n const slidesToRender = [];\n\n for (let i = from; i <= to; i += 1) {\n slidesToRender.push(slides[i]);\n }\n\n return slidesToRender;\n }()\n });\n\n if (swiper.params.virtual.renderExternalUpdate) {\n onRendered();\n }\n\n return;\n }\n\n const prependIndexes = [];\n const appendIndexes = [];\n\n if (force) {\n swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();\n } else {\n for (let i = previousFrom; i <= previousTo; i += 1) {\n if (i < from || i > to) {\n swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index=\"${i}\"]`).remove();\n }\n }\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n if (i >= from && i <= to) {\n if (typeof previousTo === 'undefined' || force) {\n appendIndexes.push(i);\n } else {\n if (i > previousTo) appendIndexes.push(i);\n if (i < previousFrom) prependIndexes.push(i);\n }\n }\n }\n\n appendIndexes.forEach(index => {\n swiper.$wrapperEl.append(renderSlide(slides[index], index));\n });\n prependIndexes.sort((a, b) => b - a).forEach(index => {\n swiper.$wrapperEl.prepend(renderSlide(slides[index], index));\n });\n swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`);\n onRendered();\n }\n\n function appendSlide(slides) {\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.push(slides[i]);\n }\n } else {\n swiper.virtual.slides.push(slides);\n }\n\n update(true);\n }\n\n function prependSlide(slides) {\n const activeIndex = swiper.activeIndex;\n let newActiveIndex = activeIndex + 1;\n let numberOfNewSlides = 1;\n\n if (Array.isArray(slides)) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.unshift(slides[i]);\n }\n\n newActiveIndex = activeIndex + slides.length;\n numberOfNewSlides = slides.length;\n } else {\n swiper.virtual.slides.unshift(slides);\n }\n\n if (swiper.params.virtual.cache) {\n const cache = swiper.virtual.cache;\n const newCache = {};\n Object.keys(cache).forEach(cachedIndex => {\n const $cachedEl = cache[cachedIndex];\n const cachedElIndex = $cachedEl.attr('data-swiper-slide-index');\n\n if (cachedElIndex) {\n $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides);\n }\n\n newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl;\n });\n swiper.virtual.cache = newCache;\n }\n\n update(true);\n swiper.slideTo(newActiveIndex, 0);\n }\n\n function removeSlide(slidesIndexes) {\n if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return;\n let activeIndex = swiper.activeIndex;\n\n if (Array.isArray(slidesIndexes)) {\n for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) {\n swiper.virtual.slides.splice(slidesIndexes[i], 1);\n\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes[i]];\n }\n\n if (slidesIndexes[i] < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n } else {\n swiper.virtual.slides.splice(slidesIndexes, 1);\n\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes];\n }\n\n if (slidesIndexes < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n\n update(true);\n swiper.slideTo(activeIndex, 0);\n }\n\n function removeAllSlides() {\n swiper.virtual.slides = [];\n\n if (swiper.params.virtual.cache) {\n swiper.virtual.cache = {};\n }\n\n update(true);\n swiper.slideTo(0, 0);\n }\n\n on('beforeInit', () => {\n if (!swiper.params.virtual.enabled) return;\n swiper.virtual.slides = swiper.params.virtual.slides;\n swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n\n if (!swiper.params.initialSlide) {\n update();\n }\n });\n on('setTranslate', () => {\n if (!swiper.params.virtual.enabled) return;\n\n if (swiper.params.cssMode && !swiper._immediateVirtual) {\n clearTimeout(cssModeTimeout);\n cssModeTimeout = setTimeout(() => {\n update();\n }, 100);\n } else {\n update();\n }\n });\n on('init update resize', () => {\n if (!swiper.params.virtual.enabled) return;\n\n if (swiper.params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`);\n }\n });\n Object.assign(swiper.virtual, {\n appendSlide,\n prependSlide,\n removeSlide,\n removeAllSlides,\n update\n });\n}","/* eslint-disable consistent-return */\nimport { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function Keyboard({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n const window = getWindow();\n swiper.keyboard = {\n enabled: false\n };\n extendParams({\n keyboard: {\n enabled: false,\n onlyInViewport: true,\n pageUpDown: true\n }\n });\n\n function handle(event) {\n if (!swiper.enabled) return;\n const {\n rtlTranslate: rtl\n } = swiper;\n let e = event;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n\n const kc = e.keyCode || e.charCode;\n const pageUpDown = swiper.params.keyboard.pageUpDown;\n const isPageUp = pageUpDown && kc === 33;\n const isPageDown = pageUpDown && kc === 34;\n const isArrowLeft = kc === 37;\n const isArrowRight = kc === 39;\n const isArrowUp = kc === 38;\n const isArrowDown = kc === 40; // Directions locks\n\n if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) {\n return false;\n }\n\n if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n return undefined;\n }\n\n if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {\n return undefined;\n }\n\n if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {\n let inView = false; // Check that swiper should be inside of visible area of window\n\n if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {\n return undefined;\n }\n\n const $el = swiper.$el;\n const swiperWidth = $el[0].clientWidth;\n const swiperHeight = $el[0].clientHeight;\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const swiperOffset = swiper.$el.offset();\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]];\n\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n\n if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n\n inView = true;\n }\n }\n\n if (!inView) return undefined;\n }\n\n if (swiper.isHorizontal()) {\n if (isPageUp || isPageDown || isArrowLeft || isArrowRight) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext();\n if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev();\n } else {\n if (isPageUp || isPageDown || isArrowUp || isArrowDown) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if (isPageDown || isArrowDown) swiper.slideNext();\n if (isPageUp || isArrowUp) swiper.slidePrev();\n }\n\n emit('keyPress', kc);\n return undefined;\n }\n\n function enable() {\n if (swiper.keyboard.enabled) return;\n $(document).on('keydown', handle);\n swiper.keyboard.enabled = true;\n }\n\n function disable() {\n if (!swiper.keyboard.enabled) return;\n $(document).off('keydown', handle);\n swiper.keyboard.enabled = false;\n }\n\n on('init', () => {\n if (swiper.params.keyboard.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n if (swiper.keyboard.enabled) {\n disable();\n }\n });\n Object.assign(swiper.keyboard, {\n enable,\n disable\n });\n}","/* eslint-disable consistent-return */\nimport { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now, nextTick } from '../../shared/utils.js';\nexport default function Mousewheel({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const window = getWindow();\n extendParams({\n mousewheel: {\n enabled: false,\n releaseOnEdges: false,\n invert: false,\n forceToAxis: false,\n sensitivity: 1,\n eventsTarget: 'container',\n thresholdDelta: null,\n thresholdTime: null\n }\n });\n swiper.mousewheel = {\n enabled: false\n };\n let timeout;\n let lastScrollTime = now();\n let lastEventBeforeSnap;\n const recentWheelEvents = [];\n\n function normalize(e) {\n // Reasonable defaults\n const PIXEL_STEP = 10;\n const LINE_HEIGHT = 40;\n const PAGE_HEIGHT = 800;\n let sX = 0;\n let sY = 0; // spinX, spinY\n\n let pX = 0;\n let pY = 0; // pixelX, pixelY\n // Legacy\n\n if ('detail' in e) {\n sY = e.detail;\n }\n\n if ('wheelDelta' in e) {\n sY = -e.wheelDelta / 120;\n }\n\n if ('wheelDeltaY' in e) {\n sY = -e.wheelDeltaY / 120;\n }\n\n if ('wheelDeltaX' in e) {\n sX = -e.wheelDeltaX / 120;\n } // side scrolling on FF with DOMMouseScroll\n\n\n if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in e) {\n pY = e.deltaY;\n }\n\n if ('deltaX' in e) {\n pX = e.deltaX;\n }\n\n if (e.shiftKey && !pX) {\n // if user scrolls with shift he wants horizontal scroll\n pX = pY;\n pY = 0;\n }\n\n if ((pX || pY) && e.deltaMode) {\n if (e.deltaMode === 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n } // Fall-back if spin cannot be determined\n\n\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }\n\n function handleMouseEnter() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = true;\n }\n\n function handleMouseLeave() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = false;\n }\n\n function animateSlider(newEvent) {\n if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) {\n // Prevent if delta of wheel scroll delta is below configured threshold\n return false;\n }\n\n if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) {\n // Prevent if time between scrolls is below configured threshold\n return false;\n } // If the movement is NOT big enough and\n // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):\n // Don't go any further (avoid insignificant scroll movement).\n\n\n if (newEvent.delta >= 6 && now() - lastScrollTime < 60) {\n // Return false as a default\n return true;\n } // If user is scrolling towards the end:\n // If the slider hasn't hit the latest slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to next slide and\n // emit a scroll event.\n // Else (the user is scrolling towards the beginning) and\n // if the slider hasn't hit the first slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to prev slide and\n // emit a scroll event.\n\n\n if (newEvent.direction < 0) {\n if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {\n swiper.slideNext();\n emit('scroll', newEvent.raw);\n }\n } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {\n swiper.slidePrev();\n emit('scroll', newEvent.raw);\n } // If you got here is because an animation has been triggered so store the current time\n\n\n lastScrollTime = new window.Date().getTime(); // Return false as a default\n\n return false;\n }\n\n function releaseScroll(newEvent) {\n const params = swiper.params.mousewheel;\n\n if (newEvent.direction < 0) {\n if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n\n return false;\n }\n\n function handle(event) {\n let e = event;\n let disableParentSwiper = true;\n if (!swiper.enabled) return;\n const params = swiper.params.mousewheel;\n\n if (swiper.params.cssMode) {\n e.preventDefault();\n }\n\n let target = swiper.$el;\n\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n\n if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n\n let delta = 0;\n const rtlFactor = swiper.rtlTranslate ? -1 : 1;\n const data = normalize(e);\n\n if (params.forceToAxis) {\n if (swiper.isHorizontal()) {\n if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true;\n } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true;\n } else {\n delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;\n }\n\n if (delta === 0) return true;\n if (params.invert) delta = -delta; // Get the scroll positions\n\n let positions = swiper.getTranslate() + delta * params.sensitivity;\n if (positions >= swiper.minTranslate()) positions = swiper.minTranslate();\n if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); // When loop is true:\n // the disableParentSwiper will be true.\n // When loop is false:\n // if the scroll positions is not on edge,\n // then the disableParentSwiper will be true.\n // if the scroll on edge positions,\n // then the disableParentSwiper will be false.\n\n disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate());\n if (disableParentSwiper && swiper.params.nested) e.stopPropagation();\n\n if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) {\n // Register the new event in a variable which stores the relevant data\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta),\n raw: event\n }; // Keep the most recent events\n\n if (recentWheelEvents.length >= 2) {\n recentWheelEvents.shift(); // only store the last N events\n }\n\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n recentWheelEvents.push(newEvent); // If there is at least one previous recorded event:\n // If direction has changed or\n // if the scroll is quicker than the previous one:\n // Animate the slider.\n // Else (this is the first time the wheel is moved):\n // Animate the slider.\n\n if (prevEvent) {\n if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {\n animateSlider(newEvent);\n }\n } else {\n animateSlider(newEvent);\n } // If it's time to release the scroll:\n // Return now so you don't hit the preventDefault.\n\n\n if (releaseScroll(newEvent)) {\n return true;\n }\n } else {\n // Freemode or scrollContainer:\n // If we recently snapped after a momentum scroll, then ignore wheel events\n // to give time for the deceleration to finish. Stop ignoring after 500 msecs\n // or if it's a new scroll (larger delta or inverse sign as last event before\n // an end-of-momentum snap).\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta)\n };\n const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction;\n\n if (!ignoreWheelEvents) {\n lastEventBeforeSnap = undefined;\n\n if (swiper.params.loop) {\n swiper.loopFix();\n }\n\n let position = swiper.getTranslate() + delta * params.sensitivity;\n const wasBeginning = swiper.isBeginning;\n const wasEnd = swiper.isEnd;\n if (position >= swiper.minTranslate()) position = swiper.minTranslate();\n if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();\n swiper.setTransition(0);\n swiper.setTranslate(position);\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n\n if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) {\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode.sticky) {\n // When wheel scrolling starts with sticky (aka snap) enabled, then detect\n // the end of a momentum scroll by storing recent (N=15?) wheel events.\n // 1. do all N events have decreasing or same (absolute value) delta?\n // 2. did all N events arrive in the last M (M=500?) msecs?\n // 3. does the earliest event have an (absolute value) delta that's\n // at least P (P=1?) larger than the most recent event's delta?\n // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels?\n // If 1-4 are \"yes\" then we're near the end of a momentum scroll deceleration.\n // Snap immediately and ignore remaining wheel events in this scroll.\n // See comment above for \"remaining wheel events in this scroll\" determination.\n // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event.\n clearTimeout(timeout);\n timeout = undefined;\n\n if (recentWheelEvents.length >= 15) {\n recentWheelEvents.shift(); // only store the last N events\n }\n\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n const firstEvent = recentWheelEvents[0];\n recentWheelEvents.push(newEvent);\n\n if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) {\n // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log.\n recentWheelEvents.splice(0);\n } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) {\n // We're at the end of the deceleration of a momentum scroll, so there's no need\n // to wait for more events. Snap ASAP on the next tick.\n // Also, because there's some remaining momentum we'll bias the snap in the\n // direction of the ongoing scroll because it's better UX for the scroll to snap\n // in the same direction as the scroll instead of reversing to snap. Therefore,\n // if it's already scrolled more than 20% in the current direction, keep going.\n const snapToThreshold = delta > 0 ? 0.8 : 0.2;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n timeout = nextTick(() => {\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 0); // no delay; move on next tick\n }\n\n if (!timeout) {\n // if we get here, then we haven't detected the end of a momentum scroll, so\n // we'll consider a scroll \"complete\" when there haven't been any wheel events\n // for 500ms.\n timeout = nextTick(() => {\n const snapToThreshold = 0.5;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 500);\n }\n } // Emit event\n\n\n if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay\n\n if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); // Return page scroll on edge positions\n\n if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;\n }\n }\n\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n return false;\n }\n\n function events(method) {\n let target = swiper.$el;\n\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n\n target[method]('mouseenter', handleMouseEnter);\n target[method]('mouseleave', handleMouseLeave);\n target[method]('wheel', handle);\n }\n\n function enable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.removeEventListener('wheel', handle);\n return true;\n }\n\n if (swiper.mousewheel.enabled) return false;\n events('on');\n swiper.mousewheel.enabled = true;\n return true;\n }\n\n function disable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.addEventListener(event, handle);\n return true;\n }\n\n if (!swiper.mousewheel.enabled) return false;\n events('off');\n swiper.mousewheel.enabled = false;\n return true;\n }\n\n on('init', () => {\n if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) {\n disable();\n }\n\n if (swiper.params.mousewheel.enabled) enable();\n });\n on('destroy', () => {\n if (swiper.params.cssMode) {\n enable();\n }\n\n if (swiper.mousewheel.enabled) disable();\n });\n Object.assign(swiper.mousewheel, {\n enable,\n disable\n });\n}","import { getDocument } from 'ssr-window';\nexport default function createElementIfNotDefined(swiper, originalParams, params, checkProps) {\n const document = getDocument();\n\n if (swiper.params.createElements) {\n Object.keys(checkProps).forEach(key => {\n if (!params[key] && params.auto === true) {\n let element = swiper.$el.children(`.${checkProps[key]}`)[0];\n\n if (!element) {\n element = document.createElement('div');\n element.className = checkProps[key];\n swiper.$el.append(element);\n }\n\n params[key] = element;\n originalParams[key] = element;\n }\n });\n }\n\n return params;\n}","import createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nimport $ from '../../shared/dom.js';\nexport default function Navigation({\n swiper,\n extendParams,\n on,\n emit\n}) {\n extendParams({\n navigation: {\n nextEl: null,\n prevEl: null,\n hideOnClick: false,\n disabledClass: 'swiper-button-disabled',\n hiddenClass: 'swiper-button-hidden',\n lockClass: 'swiper-button-lock'\n }\n });\n swiper.navigation = {\n nextEl: null,\n $nextEl: null,\n prevEl: null,\n $prevEl: null\n };\n\n function getEl(el) {\n let $el;\n\n if (el) {\n $el = $(el);\n\n if (swiper.params.uniqueNavElements && typeof el === 'string' && $el.length > 1 && swiper.$el.find(el).length === 1) {\n $el = swiper.$el.find(el);\n }\n }\n\n return $el;\n }\n\n function toggleEl($el, disabled) {\n const params = swiper.params.navigation;\n\n if ($el && $el.length > 0) {\n $el[disabled ? 'addClass' : 'removeClass'](params.disabledClass);\n if ($el[0] && $el[0].tagName === 'BUTTON') $el[0].disabled = disabled;\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n }\n\n function update() {\n // Update Navigation Buttons\n if (swiper.params.loop) return;\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind);\n toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind);\n }\n\n function onPrevClick(e) {\n e.preventDefault();\n if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slidePrev();\n }\n\n function onNextClick(e) {\n e.preventDefault();\n if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slideNext();\n }\n\n function init() {\n const params = swiper.params.navigation;\n swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, {\n nextEl: 'swiper-button-next',\n prevEl: 'swiper-button-prev'\n });\n if (!(params.nextEl || params.prevEl)) return;\n const $nextEl = getEl(params.nextEl);\n const $prevEl = getEl(params.prevEl);\n\n if ($nextEl && $nextEl.length > 0) {\n $nextEl.on('click', onNextClick);\n }\n\n if ($prevEl && $prevEl.length > 0) {\n $prevEl.on('click', onPrevClick);\n }\n\n Object.assign(swiper.navigation, {\n $nextEl,\n nextEl: $nextEl && $nextEl[0],\n $prevEl,\n prevEl: $prevEl && $prevEl[0]\n });\n\n if (!swiper.enabled) {\n if ($nextEl) $nextEl.addClass(params.lockClass);\n if ($prevEl) $prevEl.addClass(params.lockClass);\n }\n }\n\n function destroy() {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($nextEl && $nextEl.length) {\n $nextEl.off('click', onNextClick);\n $nextEl.removeClass(swiper.params.navigation.disabledClass);\n }\n\n if ($prevEl && $prevEl.length) {\n $prevEl.off('click', onPrevClick);\n $prevEl.removeClass(swiper.params.navigation.disabledClass);\n }\n }\n\n on('init', () => {\n init();\n update();\n });\n on('toEdge fromEdge lock unlock', () => {\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($nextEl) {\n $nextEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n\n if ($prevEl) {\n $prevEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n });\n on('click', (_s, e) => {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n const targetEl = e.target;\n\n if (swiper.params.navigation.hideOnClick && !$(targetEl).is($prevEl) && !$(targetEl).is($nextEl)) {\n if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return;\n let isHidden;\n\n if ($nextEl) {\n isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass);\n } else if ($prevEl) {\n isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass);\n }\n\n if (isHidden === true) {\n emit('navigationShow');\n } else {\n emit('navigationHide');\n }\n\n if ($nextEl) {\n $nextEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n\n if ($prevEl) {\n $prevEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n }\n });\n Object.assign(swiper.navigation, {\n update,\n init,\n destroy\n });\n}","export default function classesToSelector(classes = '') {\n return `.${classes.trim().replace(/([\\.:!\\/])/g, '\\\\$1') // eslint-disable-line\n .replace(/ /g, '.')}`;\n}","import $ from '../../shared/dom.js';\nimport classesToSelector from '../../shared/classes-to-selector.js';\nimport createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nexport default function Pagination({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const pfx = 'swiper-pagination';\n extendParams({\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets',\n // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: number => number,\n formatFractionTotal: number => number,\n bulletClass: `${pfx}-bullet`,\n bulletActiveClass: `${pfx}-bullet-active`,\n modifierClass: `${pfx}-`,\n currentClass: `${pfx}-current`,\n totalClass: `${pfx}-total`,\n hiddenClass: `${pfx}-hidden`,\n progressbarFillClass: `${pfx}-progressbar-fill`,\n progressbarOppositeClass: `${pfx}-progressbar-opposite`,\n clickableClass: `${pfx}-clickable`,\n lockClass: `${pfx}-lock`,\n horizontalClass: `${pfx}-horizontal`,\n verticalClass: `${pfx}-vertical`\n }\n });\n swiper.pagination = {\n el: null,\n $el: null,\n bullets: []\n };\n let bulletSize;\n let dynamicBulletIndex = 0;\n\n function isPaginationDisabled() {\n return !swiper.params.pagination.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0;\n }\n\n function setSideBullets($bulletEl, position) {\n const {\n bulletActiveClass\n } = swiper.params.pagination;\n $bulletEl[position]().addClass(`${bulletActiveClass}-${position}`)[position]().addClass(`${bulletActiveClass}-${position}-${position}`);\n }\n\n function update() {\n // Render || Update Pagination bullets/items\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const $el = swiper.pagination.$el; // Current/Total\n\n let current;\n const total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n\n if (swiper.params.loop) {\n current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);\n\n if (current > slidesLength - 1 - swiper.loopedSlides * 2) {\n current -= slidesLength - swiper.loopedSlides * 2;\n }\n\n if (current > total - 1) current -= total;\n if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n } else {\n current = swiper.activeIndex || 0;\n } // Types\n\n\n if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n\n if (params.dynamicBullets) {\n bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);\n $el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`);\n\n if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {\n dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0);\n\n if (dynamicBulletIndex > params.dynamicMainBullets - 1) {\n dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (dynamicBulletIndex < 0) {\n dynamicBulletIndex = 0;\n }\n }\n\n firstIndex = Math.max(current - dynamicBulletIndex, 0);\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n\n bullets.removeClass(['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`).join(' '));\n\n if ($el.length > 1) {\n bullets.each(bullet => {\n const $bullet = $(bullet);\n const bulletIndex = $bullet.index();\n\n if (bulletIndex === current) {\n $bullet.addClass(params.bulletActiveClass);\n }\n\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n $bullet.addClass(`${params.bulletActiveClass}-main`);\n }\n\n if (bulletIndex === firstIndex) {\n setSideBullets($bullet, 'prev');\n }\n\n if (bulletIndex === lastIndex) {\n setSideBullets($bullet, 'next');\n }\n }\n });\n } else {\n const $bullet = bullets.eq(current);\n const bulletIndex = $bullet.index();\n $bullet.addClass(params.bulletActiveClass);\n\n if (params.dynamicBullets) {\n const $firstDisplayedBullet = bullets.eq(firstIndex);\n const $lastDisplayedBullet = bullets.eq(lastIndex);\n\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);\n }\n\n if (swiper.params.loop) {\n if (bulletIndex >= bullets.length) {\n for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {\n bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);\n }\n\n bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`);\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n }\n }\n\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;\n const offsetProp = rtl ? 'right' : 'left';\n bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);\n }\n }\n\n if (params.type === 'fraction') {\n $el.find(classesToSelector(params.currentClass)).text(params.formatFractionCurrent(current + 1));\n $el.find(classesToSelector(params.totalClass)).text(params.formatFractionTotal(total));\n }\n\n if (params.type === 'progressbar') {\n let progressbarDirection;\n\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n\n $el.find(classesToSelector(params.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);\n }\n\n if (params.type === 'custom' && params.renderCustom) {\n $el.html(params.renderCustom(swiper, current + 1, total));\n emit('paginationRender', $el[0]);\n } else {\n emit('paginationUpdate', $el[0]);\n }\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n\n function render() {\n // Render Container\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const $el = swiper.pagination.$el;\n let paginationHTML = '';\n\n if (params.type === 'bullets') {\n let numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.loop && numberOfBullets > slidesLength) {\n numberOfBullets = slidesLength;\n }\n\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n paginationHTML += `<${params.bulletElement} class=\"${params.bulletClass}\">`;\n }\n }\n\n $el.html(paginationHTML);\n swiper.pagination.bullets = $el.find(classesToSelector(params.bulletClass));\n }\n\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML = `` + ' / ' + ``;\n }\n\n $el.html(paginationHTML);\n }\n\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = ``;\n }\n\n $el.html(paginationHTML);\n }\n\n if (params.type !== 'custom') {\n emit('paginationRender', swiper.pagination.$el[0]);\n }\n }\n\n function init() {\n swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {\n el: 'swiper-pagination'\n });\n const params = swiper.params.pagination;\n if (!params.el) return;\n let $el = $(params.el);\n if ($el.length === 0) return;\n\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) {\n $el = swiper.$el.find(params.el); // check if it belongs to another nested Swiper\n\n if ($el.length > 1) {\n $el = $el.filter(el => {\n if ($(el).parents('.swiper')[0] !== swiper.el) return false;\n return true;\n });\n }\n }\n\n if (params.type === 'bullets' && params.clickable) {\n $el.addClass(params.clickableClass);\n }\n\n $el.addClass(params.modifierClass + params.type);\n $el.addClass(params.modifierClass + swiper.params.direction);\n\n if (params.type === 'bullets' && params.dynamicBullets) {\n $el.addClass(`${params.modifierClass}${params.type}-dynamic`);\n dynamicBulletIndex = 0;\n\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n $el.addClass(params.progressbarOppositeClass);\n }\n\n if (params.clickable) {\n $el.on('click', classesToSelector(params.bulletClass), function onClick(e) {\n e.preventDefault();\n let index = $(this).index() * swiper.params.slidesPerGroup;\n if (swiper.params.loop) index += swiper.loopedSlides;\n swiper.slideTo(index);\n });\n }\n\n Object.assign(swiper.pagination, {\n $el,\n el: $el[0]\n });\n\n if (!swiper.enabled) {\n $el.addClass(params.lockClass);\n }\n }\n\n function destroy() {\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const $el = swiper.pagination.$el;\n $el.removeClass(params.hiddenClass);\n $el.removeClass(params.modifierClass + params.type);\n $el.removeClass(params.modifierClass + swiper.params.direction);\n if (swiper.pagination.bullets && swiper.pagination.bullets.removeClass) swiper.pagination.bullets.removeClass(params.bulletActiveClass);\n\n if (params.clickable) {\n $el.off('click', classesToSelector(params.bulletClass));\n }\n }\n\n on('init', () => {\n init();\n render();\n update();\n });\n on('activeIndexChange', () => {\n if (swiper.params.loop) {\n update();\n } else if (typeof swiper.snapIndex === 'undefined') {\n update();\n }\n });\n on('snapIndexChange', () => {\n if (!swiper.params.loop) {\n update();\n }\n });\n on('slidesLengthChange', () => {\n if (swiper.params.loop) {\n render();\n update();\n }\n });\n on('snapGridLengthChange', () => {\n if (!swiper.params.loop) {\n render();\n update();\n }\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const {\n $el\n } = swiper.pagination;\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.pagination.lockClass);\n }\n });\n on('lock unlock', () => {\n update();\n });\n on('click', (_s, e) => {\n const targetEl = e.target;\n const {\n $el\n } = swiper.pagination;\n\n if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && $el.length > 0 && !$(targetEl).hasClass(swiper.params.pagination.bulletClass)) {\n if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;\n const isHidden = $el.hasClass(swiper.params.pagination.hiddenClass);\n\n if (isHidden === true) {\n emit('paginationShow');\n } else {\n emit('paginationHide');\n }\n\n $el.toggleClass(swiper.params.pagination.hiddenClass);\n }\n });\n Object.assign(swiper.pagination, {\n render,\n update,\n init,\n destroy\n });\n}","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\nimport createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nexport default function Scrollbar({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n let isTouched = false;\n let timeout = null;\n let dragTimeout = null;\n let dragStartPos;\n let dragSize;\n let trackSize;\n let divider;\n extendParams({\n scrollbar: {\n el: null,\n dragSize: 'auto',\n hide: false,\n draggable: false,\n snapOnRelease: true,\n lockClass: 'swiper-scrollbar-lock',\n dragClass: 'swiper-scrollbar-drag'\n }\n });\n swiper.scrollbar = {\n el: null,\n dragEl: null,\n $el: null,\n $dragEl: null\n };\n\n function setTranslate() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar,\n rtlTranslate: rtl,\n progress\n } = swiper;\n const {\n $dragEl,\n $el\n } = scrollbar;\n const params = swiper.params.scrollbar;\n let newSize = dragSize;\n let newPos = (trackSize - dragSize) * progress;\n\n if (rtl) {\n newPos = -newPos;\n\n if (newPos > 0) {\n newSize = dragSize - newPos;\n newPos = 0;\n } else if (-newPos + dragSize > trackSize) {\n newSize = trackSize + newPos;\n }\n } else if (newPos < 0) {\n newSize = dragSize + newPos;\n newPos = 0;\n } else if (newPos + dragSize > trackSize) {\n newSize = trackSize - newPos;\n }\n\n if (swiper.isHorizontal()) {\n $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);\n $dragEl[0].style.width = `${newSize}px`;\n } else {\n $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);\n $dragEl[0].style.height = `${newSize}px`;\n }\n\n if (params.hide) {\n clearTimeout(timeout);\n $el[0].style.opacity = 1;\n timeout = setTimeout(() => {\n $el[0].style.opacity = 0;\n $el.transition(400);\n }, 1000);\n }\n }\n\n function setTransition(duration) {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n swiper.scrollbar.$dragEl.transition(duration);\n }\n\n function updateSize() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar\n } = swiper;\n const {\n $dragEl,\n $el\n } = scrollbar;\n $dragEl[0].style.width = '';\n $dragEl[0].style.height = '';\n trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;\n divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0));\n\n if (swiper.params.scrollbar.dragSize === 'auto') {\n dragSize = trackSize * divider;\n } else {\n dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);\n }\n\n if (swiper.isHorizontal()) {\n $dragEl[0].style.width = `${dragSize}px`;\n } else {\n $dragEl[0].style.height = `${dragSize}px`;\n }\n\n if (divider >= 1) {\n $el[0].style.display = 'none';\n } else {\n $el[0].style.display = '';\n }\n\n if (swiper.params.scrollbar.hide) {\n $el[0].style.opacity = 0;\n }\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n scrollbar.$el[swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);\n }\n }\n\n function getPointerPosition(e) {\n if (swiper.isHorizontal()) {\n return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX;\n }\n\n return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY;\n }\n\n function setDragPosition(e) {\n const {\n scrollbar,\n rtlTranslate: rtl\n } = swiper;\n const {\n $el\n } = scrollbar;\n let positionRatio;\n positionRatio = (getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);\n positionRatio = Math.max(Math.min(positionRatio, 1), 0);\n\n if (rtl) {\n positionRatio = 1 - positionRatio;\n }\n\n const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio;\n swiper.updateProgress(position);\n swiper.setTranslate(position);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n function onDragStart(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el,\n $dragEl\n } = scrollbar;\n isTouched = true;\n dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;\n e.preventDefault();\n e.stopPropagation();\n $wrapperEl.transition(100);\n $dragEl.transition(100);\n setDragPosition(e);\n clearTimeout(dragTimeout);\n $el.transition(0);\n\n if (params.hide) {\n $el.css('opacity', 1);\n }\n\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', 'none');\n }\n\n emit('scrollbarDragStart', e);\n }\n\n function onDragMove(e) {\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el,\n $dragEl\n } = scrollbar;\n if (!isTouched) return;\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n setDragPosition(e);\n $wrapperEl.transition(0);\n $el.transition(0);\n $dragEl.transition(0);\n emit('scrollbarDragMove', e);\n }\n\n function onDragEnd(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el\n } = scrollbar;\n if (!isTouched) return;\n isTouched = false;\n\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', '');\n $wrapperEl.transition('');\n }\n\n if (params.hide) {\n clearTimeout(dragTimeout);\n dragTimeout = nextTick(() => {\n $el.css('opacity', 0);\n $el.transition(400);\n }, 1000);\n }\n\n emit('scrollbarDragEnd', e);\n\n if (params.snapOnRelease) {\n swiper.slideToClosest();\n }\n }\n\n function events(method) {\n const {\n scrollbar,\n touchEventsTouch,\n touchEventsDesktop,\n params,\n support\n } = swiper;\n const $el = scrollbar.$el;\n const target = $el[0];\n const activeListener = support.passiveListener && params.passiveListeners ? {\n passive: false,\n capture: false\n } : false;\n const passiveListener = support.passiveListener && params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n if (!target) return;\n const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n\n if (!support.touch) {\n target[eventMethod](touchEventsDesktop.start, onDragStart, activeListener);\n document[eventMethod](touchEventsDesktop.move, onDragMove, activeListener);\n document[eventMethod](touchEventsDesktop.end, onDragEnd, passiveListener);\n } else {\n target[eventMethod](touchEventsTouch.start, onDragStart, activeListener);\n target[eventMethod](touchEventsTouch.move, onDragMove, activeListener);\n target[eventMethod](touchEventsTouch.end, onDragEnd, passiveListener);\n }\n }\n\n function enableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('on');\n }\n\n function disableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('off');\n }\n\n function init() {\n const {\n scrollbar,\n $el: $swiperEl\n } = swiper;\n swiper.params.scrollbar = createElementIfNotDefined(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, {\n el: 'swiper-scrollbar'\n });\n const params = swiper.params.scrollbar;\n if (!params.el) return;\n let $el = $(params.el);\n\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {\n $el = $swiperEl.find(params.el);\n }\n\n let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);\n\n if ($dragEl.length === 0) {\n $dragEl = $(`
`);\n $el.append($dragEl);\n }\n\n Object.assign(scrollbar, {\n $el,\n el: $el[0],\n $dragEl,\n dragEl: $dragEl[0]\n });\n\n if (params.draggable) {\n enableDraggable();\n }\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n }\n\n function destroy() {\n disableDraggable();\n }\n\n on('init', () => {\n init();\n updateSize();\n setTranslate();\n });\n on('update resize observerUpdate lock unlock', () => {\n updateSize();\n });\n on('setTranslate', () => {\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n setTransition(duration);\n });\n on('enable disable', () => {\n const {\n $el\n } = swiper.scrollbar;\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n });\n on('destroy', () => {\n destroy();\n });\n Object.assign(swiper.scrollbar, {\n updateSize,\n setTranslate,\n init,\n destroy\n });\n}","import $ from '../../shared/dom.js';\nexport default function Parallax({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n parallax: {\n enabled: false\n }\n });\n\n const setTransform = (el, progress) => {\n const {\n rtl\n } = swiper;\n const $el = $(el);\n const rtlFactor = rtl ? -1 : 1;\n const p = $el.attr('data-swiper-parallax') || '0';\n let x = $el.attr('data-swiper-parallax-x');\n let y = $el.attr('data-swiper-parallax-y');\n const scale = $el.attr('data-swiper-parallax-scale');\n const opacity = $el.attr('data-swiper-parallax-opacity');\n\n if (x || y) {\n x = x || '0';\n y = y || '0';\n } else if (swiper.isHorizontal()) {\n x = p;\n y = '0';\n } else {\n y = p;\n x = '0';\n }\n\n if (x.indexOf('%') >= 0) {\n x = `${parseInt(x, 10) * progress * rtlFactor}%`;\n } else {\n x = `${x * progress * rtlFactor}px`;\n }\n\n if (y.indexOf('%') >= 0) {\n y = `${parseInt(y, 10) * progress}%`;\n } else {\n y = `${y * progress}px`;\n }\n\n if (typeof opacity !== 'undefined' && opacity !== null) {\n const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress));\n $el[0].style.opacity = currentOpacity;\n }\n\n if (typeof scale === 'undefined' || scale === null) {\n $el.transform(`translate3d(${x}, ${y}, 0px)`);\n } else {\n const currentScale = scale - (scale - 1) * (1 - Math.abs(progress));\n $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);\n }\n };\n\n const setTranslate = () => {\n const {\n $el,\n slides,\n progress,\n snapGrid\n } = swiper;\n $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => {\n setTransform(el, progress);\n });\n slides.each((slideEl, slideIndex) => {\n let slideProgress = slideEl.progress;\n\n if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {\n slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1);\n }\n\n slideProgress = Math.min(Math.max(slideProgress, -1), 1);\n $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => {\n setTransform(el, slideProgress);\n });\n });\n };\n\n const setTransition = (duration = swiper.params.speed) => {\n const {\n $el\n } = swiper;\n $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(parallaxEl => {\n const $parallaxEl = $(parallaxEl);\n let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;\n if (duration === 0) parallaxDuration = 0;\n $parallaxEl.transition(parallaxDuration);\n });\n };\n\n on('beforeInit', () => {\n if (!swiper.params.parallax.enabled) return;\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n });\n on('init', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTranslate', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTransition', (_swiper, duration) => {\n if (!swiper.params.parallax.enabled) return;\n setTransition(duration);\n });\n}","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { getTranslate } from '../../shared/utils.js';\nexport default function Zoom({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const window = getWindow();\n extendParams({\n zoom: {\n enabled: false,\n maxRatio: 3,\n minRatio: 1,\n toggle: true,\n containerClass: 'swiper-zoom-container',\n zoomedSlideClass: 'swiper-slide-zoomed'\n }\n });\n swiper.zoom = {\n enabled: false\n };\n let currentScale = 1;\n let isScaling = false;\n let gesturesEnabled;\n let fakeGestureTouched;\n let fakeGestureMoved;\n const gesture = {\n $slideEl: undefined,\n slideWidth: undefined,\n slideHeight: undefined,\n $imageEl: undefined,\n $imageWrapEl: undefined,\n maxRatio: 3\n };\n const image = {\n isTouched: undefined,\n isMoved: undefined,\n currentX: undefined,\n currentY: undefined,\n minX: undefined,\n minY: undefined,\n maxX: undefined,\n maxY: undefined,\n width: undefined,\n height: undefined,\n startX: undefined,\n startY: undefined,\n touchesStart: {},\n touchesCurrent: {}\n };\n const velocity = {\n x: undefined,\n y: undefined,\n prevPositionX: undefined,\n prevPositionY: undefined,\n prevTime: undefined\n };\n let scale = 1;\n Object.defineProperty(swiper.zoom, 'scale', {\n get() {\n return scale;\n },\n\n set(value) {\n if (scale !== value) {\n const imageEl = gesture.$imageEl ? gesture.$imageEl[0] : undefined;\n const slideEl = gesture.$slideEl ? gesture.$slideEl[0] : undefined;\n emit('zoomChange', value, imageEl, slideEl);\n }\n\n scale = value;\n }\n\n });\n\n function getDistanceBetweenTouches(e) {\n if (e.targetTouches.length < 2) return 1;\n const x1 = e.targetTouches[0].pageX;\n const y1 = e.targetTouches[0].pageY;\n const x2 = e.targetTouches[1].pageX;\n const y2 = e.targetTouches[1].pageY;\n const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2);\n return distance;\n } // Events\n\n\n function onGestureStart(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n\n if (!support.gestures) {\n if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {\n return;\n }\n\n fakeGestureTouched = true;\n gesture.scaleStart = getDistanceBetweenTouches(e);\n }\n\n if (!gesture.$slideEl || !gesture.$slideEl.length) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n\n if (gesture.$imageWrapEl.length === 0) {\n gesture.$imageEl = undefined;\n return;\n }\n }\n\n if (gesture.$imageEl) {\n gesture.$imageEl.transition(0);\n }\n\n isScaling = true;\n }\n\n function onGestureChange(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n\n if (!support.gestures) {\n if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {\n return;\n }\n\n fakeGestureMoved = true;\n gesture.scaleMove = getDistanceBetweenTouches(e);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) {\n if (e.type === 'gesturechange') onGestureStart(e);\n return;\n }\n\n if (support.gestures) {\n zoom.scale = e.scale * currentScale;\n } else {\n zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale;\n }\n\n if (zoom.scale > gesture.maxRatio) {\n zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5;\n }\n\n if (zoom.scale < params.minRatio) {\n zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5;\n }\n\n gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n\n function onGestureEnd(e) {\n const device = swiper.device;\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n\n if (!support.gestures) {\n if (!fakeGestureTouched || !fakeGestureMoved) {\n return;\n }\n\n if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !device.android) {\n return;\n }\n\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);\n gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n currentScale = zoom.scale;\n isScaling = false;\n if (zoom.scale === 1) gesture.$slideEl = undefined;\n }\n\n function onTouchStart(e) {\n const device = swiper.device;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n if (image.isTouched) return;\n if (device.android && e.cancelable) e.preventDefault();\n image.isTouched = true;\n image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n }\n\n function onTouchMove(e) {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n swiper.allowClick = false;\n if (!image.isTouched || !gesture.$slideEl) return;\n\n if (!image.isMoved) {\n image.width = gesture.$imageEl[0].offsetWidth;\n image.height = gesture.$imageEl[0].offsetHeight;\n image.startX = getTranslate(gesture.$imageWrapEl[0], 'x') || 0;\n image.startY = getTranslate(gesture.$imageWrapEl[0], 'y') || 0;\n gesture.slideWidth = gesture.$slideEl[0].offsetWidth;\n gesture.slideHeight = gesture.$slideEl[0].offsetHeight;\n gesture.$imageWrapEl.transition(0);\n } // Define if we need image drag\n\n\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n\n if (!image.isMoved && !isScaling) {\n if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) {\n image.isTouched = false;\n return;\n }\n\n if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) {\n image.isTouched = false;\n return;\n }\n }\n\n if (e.cancelable) {\n e.preventDefault();\n }\n\n e.stopPropagation();\n image.isMoved = true;\n image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX;\n image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY;\n\n if (image.currentX < image.minX) {\n image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8;\n }\n\n if (image.currentX > image.maxX) {\n image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8;\n }\n\n if (image.currentY < image.minY) {\n image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8;\n }\n\n if (image.currentY > image.maxY) {\n image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8;\n } // Velocity\n\n\n if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;\n if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;\n if (!velocity.prevTime) velocity.prevTime = Date.now();\n velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;\n velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;\n if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;\n if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;\n velocity.prevPositionX = image.touchesCurrent.x;\n velocity.prevPositionY = image.touchesCurrent.y;\n velocity.prevTime = Date.now();\n gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n\n function onTouchEnd() {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n\n if (!image.isTouched || !image.isMoved) {\n image.isTouched = false;\n image.isMoved = false;\n return;\n }\n\n image.isTouched = false;\n image.isMoved = false;\n let momentumDurationX = 300;\n let momentumDurationY = 300;\n const momentumDistanceX = velocity.x * momentumDurationX;\n const newPositionX = image.currentX + momentumDistanceX;\n const momentumDistanceY = velocity.y * momentumDurationY;\n const newPositionY = image.currentY + momentumDistanceY; // Fix duration\n\n if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);\n if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);\n const momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n image.currentX = newPositionX;\n image.currentY = newPositionY; // Define if we need image drag\n\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);\n image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);\n gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n\n function onTransitionEnd() {\n const zoom = swiper.zoom;\n\n if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {\n if (gesture.$imageEl) {\n gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');\n }\n\n if (gesture.$imageWrapEl) {\n gesture.$imageWrapEl.transform('translate3d(0,0,0)');\n }\n\n zoom.scale = 1;\n currentScale = 1;\n gesture.$slideEl = undefined;\n gesture.$imageEl = undefined;\n gesture.$imageWrapEl = undefined;\n }\n }\n\n function zoomIn(e) {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (e && e.target) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n }\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n }\n\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return;\n\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.touchAction = 'none';\n }\n\n gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);\n let touchX;\n let touchY;\n let offsetX;\n let offsetY;\n let diffX;\n let diffY;\n let translateX;\n let translateY;\n let imageWidth;\n let imageHeight;\n let scaledWidth;\n let scaledHeight;\n let translateMinX;\n let translateMinY;\n let translateMaxX;\n let translateMaxY;\n let slideWidth;\n let slideHeight;\n\n if (typeof image.touchesStart.x === 'undefined' && e) {\n touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n } else {\n touchX = image.touchesStart.x;\n touchY = image.touchesStart.y;\n }\n\n zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n\n if (e) {\n slideWidth = gesture.$slideEl[0].offsetWidth;\n slideHeight = gesture.$slideEl[0].offsetHeight;\n offsetX = gesture.$slideEl.offset().left + window.scrollX;\n offsetY = gesture.$slideEl.offset().top + window.scrollY;\n diffX = offsetX + slideWidth / 2 - touchX;\n diffY = offsetY + slideHeight / 2 - touchY;\n imageWidth = gesture.$imageEl[0].offsetWidth;\n imageHeight = gesture.$imageEl[0].offsetHeight;\n scaledWidth = imageWidth * zoom.scale;\n scaledHeight = imageHeight * zoom.scale;\n translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0);\n translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);\n translateMaxX = -translateMinX;\n translateMaxY = -translateMinY;\n translateX = diffX * zoom.scale;\n translateY = diffY * zoom.scale;\n\n if (translateX < translateMinX) {\n translateX = translateMinX;\n }\n\n if (translateX > translateMaxX) {\n translateX = translateMaxX;\n }\n\n if (translateY < translateMinY) {\n translateY = translateMinY;\n }\n\n if (translateY > translateMaxY) {\n translateY = translateMaxY;\n }\n } else {\n translateX = 0;\n translateY = 0;\n }\n\n gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);\n gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n\n function zoomOut() {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return;\n\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.style.touchAction = '';\n }\n\n zoom.scale = 1;\n currentScale = 1;\n gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');\n gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');\n gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);\n gesture.$slideEl = undefined;\n } // Toggle Zoom\n\n\n function zoomToggle(e) {\n const zoom = swiper.zoom;\n\n if (zoom.scale && zoom.scale !== 1) {\n // Zoom Out\n zoomOut();\n } else {\n // Zoom In\n zoomIn(e);\n }\n }\n\n function getListeners() {\n const support = swiper.support;\n const passiveListener = swiper.touchEvents.start === 'touchstart' && support.passiveListener && swiper.params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n const activeListenerWithCapture = support.passiveListener ? {\n passive: false,\n capture: true\n } : true;\n return {\n passiveListener,\n activeListenerWithCapture\n };\n }\n\n function getSlideSelector() {\n return `.${swiper.params.slideClass}`;\n }\n\n function toggleGestures(method) {\n const {\n passiveListener\n } = getListeners();\n const slideSelector = getSlideSelector();\n swiper.$wrapperEl[method]('gesturestart', slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl[method]('gesturechange', slideSelector, onGestureChange, passiveListener);\n swiper.$wrapperEl[method]('gestureend', slideSelector, onGestureEnd, passiveListener);\n }\n\n function enableGestures() {\n if (gesturesEnabled) return;\n gesturesEnabled = true;\n toggleGestures('on');\n }\n\n function disableGestures() {\n if (!gesturesEnabled) return;\n gesturesEnabled = false;\n toggleGestures('off');\n } // Attach/Detach Events\n\n\n function enable() {\n const zoom = swiper.zoom;\n if (zoom.enabled) return;\n zoom.enabled = true;\n const support = swiper.support;\n const {\n passiveListener,\n activeListenerWithCapture\n } = getListeners();\n const slideSelector = getSlideSelector(); // Scale image\n\n if (support.gestures) {\n swiper.$wrapperEl.on(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener);\n }\n } // Move image\n\n\n swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture);\n }\n\n function disable() {\n const zoom = swiper.zoom;\n if (!zoom.enabled) return;\n const support = swiper.support;\n zoom.enabled = false;\n const {\n passiveListener,\n activeListenerWithCapture\n } = getListeners();\n const slideSelector = getSlideSelector(); // Scale image\n\n if (support.gestures) {\n swiper.$wrapperEl.off(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener);\n }\n } // Move image\n\n\n swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture);\n }\n\n on('init', () => {\n if (swiper.params.zoom.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n disable();\n });\n on('touchStart', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchStart(e);\n });\n on('touchEnd', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchEnd(e);\n });\n on('doubleTap', (_s, e) => {\n if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {\n zoomToggle(e);\n }\n });\n on('transitionEnd', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled) {\n onTransitionEnd();\n }\n });\n on('slideChange', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {\n onTransitionEnd();\n }\n });\n Object.assign(swiper.zoom, {\n enable,\n disable,\n in: zoomIn,\n out: zoomOut,\n toggle: zoomToggle\n });\n}","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function Lazy({\n swiper,\n extendParams,\n on,\n emit\n}) {\n extendParams({\n lazy: {\n checkInView: false,\n enabled: false,\n loadPrevNext: false,\n loadPrevNextAmount: 1,\n loadOnTransitionStart: false,\n scrollingElement: '',\n elementClass: 'swiper-lazy',\n loadingClass: 'swiper-lazy-loading',\n loadedClass: 'swiper-lazy-loaded',\n preloaderClass: 'swiper-lazy-preloader'\n }\n });\n swiper.lazy = {};\n let scrollHandlerAttached = false;\n let initialImageLoaded = false;\n\n function loadInSlide(index, loadInDuplicate = true) {\n const params = swiper.params.lazy;\n if (typeof index === 'undefined') return;\n if (swiper.slides.length === 0) return;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n const $slideEl = isVirtual ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index=\"${index}\"]`) : swiper.slides.eq(index);\n const $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);\n\n if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {\n $images.push($slideEl[0]);\n }\n\n if ($images.length === 0) return;\n $images.each(imageEl => {\n const $imageEl = $(imageEl);\n $imageEl.addClass(params.loadingClass);\n const background = $imageEl.attr('data-background');\n const src = $imageEl.attr('data-src');\n const srcset = $imageEl.attr('data-srcset');\n const sizes = $imageEl.attr('data-sizes');\n const $pictureEl = $imageEl.parent('picture');\n swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, () => {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return;\n\n if (background) {\n $imageEl.css('background-image', `url(\"${background}\")`);\n $imageEl.removeAttr('data-background');\n } else {\n if (srcset) {\n $imageEl.attr('srcset', srcset);\n $imageEl.removeAttr('data-srcset');\n }\n\n if (sizes) {\n $imageEl.attr('sizes', sizes);\n $imageEl.removeAttr('data-sizes');\n }\n\n if ($pictureEl.length) {\n $pictureEl.children('source').each(sourceEl => {\n const $source = $(sourceEl);\n\n if ($source.attr('data-srcset')) {\n $source.attr('srcset', $source.attr('data-srcset'));\n $source.removeAttr('data-srcset');\n }\n });\n }\n\n if (src) {\n $imageEl.attr('src', src);\n $imageEl.removeAttr('data-src');\n }\n }\n\n $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);\n $slideEl.find(`.${params.preloaderClass}`).remove();\n\n if (swiper.params.loop && loadInDuplicate) {\n const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');\n\n if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {\n const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index=\"${slideOriginalIndex}\"]:not(.${swiper.params.slideDuplicateClass})`);\n loadInSlide(originalSlide.index(), false);\n } else {\n const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index=\"${slideOriginalIndex}\"]`);\n loadInSlide(duplicatedSlide.index(), false);\n }\n }\n\n emit('lazyImageReady', $slideEl[0], $imageEl[0]);\n\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n });\n emit('lazyImageLoad', $slideEl[0], $imageEl[0]);\n });\n }\n\n function load() {\n const {\n $wrapperEl,\n params: swiperParams,\n slides,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && swiperParams.virtual.enabled;\n const params = swiperParams.lazy;\n let slidesPerView = swiperParams.slidesPerView;\n\n if (slidesPerView === 'auto') {\n slidesPerView = 0;\n }\n\n function slideExist(index) {\n if (isVirtual) {\n if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index=\"${index}\"]`).length) {\n return true;\n }\n } else if (slides[index]) return true;\n\n return false;\n }\n\n function slideIndex(slideEl) {\n if (isVirtual) {\n return $(slideEl).attr('data-swiper-slide-index');\n }\n\n return $(slideEl).index();\n }\n\n if (!initialImageLoaded) initialImageLoaded = true;\n\n if (swiper.params.watchSlidesProgress) {\n $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each(slideEl => {\n const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();\n loadInSlide(index);\n });\n } else if (slidesPerView > 1) {\n for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n loadInSlide(activeIndex);\n }\n\n if (params.loadPrevNext) {\n if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) {\n const amount = params.loadPrevNextAmount;\n const spv = slidesPerView;\n const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);\n const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); // Next Slides\n\n for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n } // Prev Slides\n\n\n for (let i = minIndex; i < activeIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);\n if (nextSlide.length > 0) loadInSlide(slideIndex(nextSlide));\n const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);\n if (prevSlide.length > 0) loadInSlide(slideIndex(prevSlide));\n }\n }\n }\n\n function checkInViewOnLoad() {\n const window = getWindow();\n if (!swiper || swiper.destroyed) return;\n const $scrollElement = swiper.params.lazy.scrollingElement ? $(swiper.params.lazy.scrollingElement) : $(window);\n const isWindow = $scrollElement[0] === window;\n const scrollElementWidth = isWindow ? window.innerWidth : $scrollElement[0].offsetWidth;\n const scrollElementHeight = isWindow ? window.innerHeight : $scrollElement[0].offsetHeight;\n const swiperOffset = swiper.$el.offset();\n const {\n rtlTranslate: rtl\n } = swiper;\n let inView = false;\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]];\n\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n\n if (point[0] >= 0 && point[0] <= scrollElementWidth && point[1] >= 0 && point[1] <= scrollElementHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n\n inView = true;\n }\n }\n\n const passiveListener = swiper.touchEvents.start === 'touchstart' && swiper.support.passiveListener && swiper.params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n\n if (inView) {\n load();\n $scrollElement.off('scroll', checkInViewOnLoad, passiveListener);\n } else if (!scrollHandlerAttached) {\n scrollHandlerAttached = true;\n $scrollElement.on('scroll', checkInViewOnLoad, passiveListener);\n }\n }\n\n on('beforeInit', () => {\n if (swiper.params.lazy.enabled && swiper.params.preloadImages) {\n swiper.params.preloadImages = false;\n }\n });\n on('init', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('scroll', () => {\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.freeMode.sticky) {\n load();\n }\n });\n on('scrollbarDragMove resize _freeModeNoMomentumRelease', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('transitionStart', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !initialImageLoaded) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n }\n });\n on('transitionEnd', () => {\n if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('slideChange', () => {\n const {\n lazy,\n cssMode,\n watchSlidesProgress,\n touchReleaseOnEdges,\n resistanceRatio\n } = swiper.params;\n\n if (lazy.enabled && (cssMode || watchSlidesProgress && (touchReleaseOnEdges || resistanceRatio === 0))) {\n load();\n }\n });\n Object.assign(swiper.lazy, {\n load,\n loadInSlide\n });\n}","/* eslint no-bitwise: [\"error\", { \"allow\": [\">>\"] }] */\nimport { nextTick } from '../../shared/utils.js';\nexport default function Controller({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n controller: {\n control: undefined,\n inverse: false,\n by: 'slide' // or 'container'\n\n }\n });\n swiper.controller = {\n control: undefined\n };\n\n function LinearSpline(x, y) {\n const binarySearch = function search() {\n let maxIndex;\n let minIndex;\n let guess;\n return (array, val) => {\n minIndex = -1;\n maxIndex = array.length;\n\n while (maxIndex - minIndex > 1) {\n guess = maxIndex + minIndex >> 1;\n\n if (array[guess] <= val) {\n minIndex = guess;\n } else {\n maxIndex = guess;\n }\n }\n\n return maxIndex;\n };\n }();\n\n this.x = x;\n this.y = y;\n this.lastIndex = x.length - 1; // Given an x value (x2), return the expected y2 value:\n // (x1,y1) is the known point before given value,\n // (x3,y3) is the known point after given value.\n\n let i1;\n let i3;\n\n this.interpolate = function interpolate(x2) {\n if (!x2) return 0; // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n\n i3 = binarySearch(this.x, x2);\n i1 = i3 - 1; // We have our indexes i1 & i3, so we can calculate already:\n // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n\n return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1];\n };\n\n return this;\n } // xxx: for now i will just save one spline function to to\n\n\n function getInterpolateFunction(c) {\n if (!swiper.controller.spline) {\n swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid);\n }\n }\n\n function setTranslate(_t, byController) {\n const controlled = swiper.controller.control;\n let multiplier;\n let controlledTranslate;\n const Swiper = swiper.constructor;\n\n function setControlledTranslate(c) {\n // this will create an Interpolate function based on the snapGrids\n // x is the Grid of the scrolled scroller and y will be the controlled scroller\n // it makes sense to create this only once and recall it for the interpolation\n // the function does a lot of value caching for performance\n const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;\n\n if (swiper.params.controller.by === 'slide') {\n getInterpolateFunction(c); // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n // but it did not work out\n\n controlledTranslate = -swiper.controller.spline.interpolate(-translate);\n }\n\n if (!controlledTranslate || swiper.params.controller.by === 'container') {\n multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());\n controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate();\n }\n\n if (swiper.params.controller.inverse) {\n controlledTranslate = c.maxTranslate() - controlledTranslate;\n }\n\n c.updateProgress(controlledTranslate);\n c.setTranslate(controlledTranslate, swiper);\n c.updateActiveIndex();\n c.updateSlidesClasses();\n }\n\n if (Array.isArray(controlled)) {\n for (let i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTranslate(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTranslate(controlled);\n }\n }\n\n function setTransition(duration, byController) {\n const Swiper = swiper.constructor;\n const controlled = swiper.controller.control;\n let i;\n\n function setControlledTransition(c) {\n c.setTransition(duration, swiper);\n\n if (duration !== 0) {\n c.transitionStart();\n\n if (c.params.autoHeight) {\n nextTick(() => {\n c.updateAutoHeight();\n });\n }\n\n c.$wrapperEl.transitionEnd(() => {\n if (!controlled) return;\n\n if (c.params.loop && swiper.params.controller.by === 'slide') {\n c.loopFix();\n }\n\n c.transitionEnd();\n });\n }\n }\n\n if (Array.isArray(controlled)) {\n for (i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTransition(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTransition(controlled);\n }\n }\n\n function removeSpline() {\n if (!swiper.controller.control) return;\n\n if (swiper.controller.spline) {\n swiper.controller.spline = undefined;\n delete swiper.controller.spline;\n }\n }\n\n on('beforeInit', () => {\n swiper.controller.control = swiper.params.controller.control;\n });\n on('update', () => {\n removeSpline();\n });\n on('resize', () => {\n removeSpline();\n });\n on('observerUpdate', () => {\n removeSpline();\n });\n on('setTranslate', (_s, translate, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTranslate(translate, byController);\n });\n on('setTransition', (_s, duration, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTransition(duration, byController);\n });\n Object.assign(swiper.controller, {\n setTranslate,\n setTransition\n });\n}","import classesToSelector from '../../shared/classes-to-selector.js';\nimport $ from '../../shared/dom.js';\nexport default function A11y({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n a11y: {\n enabled: true,\n notificationClass: 'swiper-notification',\n prevSlideMessage: 'Previous slide',\n nextSlideMessage: 'Next slide',\n firstSlideMessage: 'This is the first slide',\n lastSlideMessage: 'This is the last slide',\n paginationBulletMessage: 'Go to slide {{index}}',\n slideLabelMessage: '{{index}} / {{slidesLength}}',\n containerMessage: null,\n containerRoleDescriptionMessage: null,\n itemRoleDescriptionMessage: null,\n slideRole: 'group'\n }\n });\n let liveRegion = null;\n\n function notify(message) {\n const notification = liveRegion;\n if (notification.length === 0) return;\n notification.html('');\n notification.html(message);\n }\n\n function getRandomNumber(size = 16) {\n const randomChar = () => Math.round(16 * Math.random()).toString(16);\n\n return 'x'.repeat(size).replace(/x/g, randomChar);\n }\n\n function makeElFocusable($el) {\n $el.attr('tabIndex', '0');\n }\n\n function makeElNotFocusable($el) {\n $el.attr('tabIndex', '-1');\n }\n\n function addElRole($el, role) {\n $el.attr('role', role);\n }\n\n function addElRoleDescription($el, description) {\n $el.attr('aria-roledescription', description);\n }\n\n function addElControls($el, controls) {\n $el.attr('aria-controls', controls);\n }\n\n function addElLabel($el, label) {\n $el.attr('aria-label', label);\n }\n\n function addElId($el, id) {\n $el.attr('id', id);\n }\n\n function addElLive($el, live) {\n $el.attr('aria-live', live);\n }\n\n function disableEl($el) {\n $el.attr('aria-disabled', true);\n }\n\n function enableEl($el) {\n $el.attr('aria-disabled', false);\n }\n\n function onEnterOrSpaceKey(e) {\n if (e.keyCode !== 13 && e.keyCode !== 32) return;\n const params = swiper.params.a11y;\n const $targetEl = $(e.target);\n\n if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {\n if (!(swiper.isEnd && !swiper.params.loop)) {\n swiper.slideNext();\n }\n\n if (swiper.isEnd) {\n notify(params.lastSlideMessage);\n } else {\n notify(params.nextSlideMessage);\n }\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {\n if (!(swiper.isBeginning && !swiper.params.loop)) {\n swiper.slidePrev();\n }\n\n if (swiper.isBeginning) {\n notify(params.firstSlideMessage);\n } else {\n notify(params.prevSlideMessage);\n }\n }\n\n if (swiper.pagination && $targetEl.is(classesToSelector(swiper.params.pagination.bulletClass))) {\n $targetEl[0].click();\n }\n }\n\n function updateNavigation() {\n if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($prevEl && $prevEl.length > 0) {\n if (swiper.isBeginning) {\n disableEl($prevEl);\n makeElNotFocusable($prevEl);\n } else {\n enableEl($prevEl);\n makeElFocusable($prevEl);\n }\n }\n\n if ($nextEl && $nextEl.length > 0) {\n if (swiper.isEnd) {\n disableEl($nextEl);\n makeElNotFocusable($nextEl);\n } else {\n enableEl($nextEl);\n makeElFocusable($nextEl);\n }\n }\n }\n\n function hasPagination() {\n return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;\n }\n\n function hasClickablePagination() {\n return hasPagination() && swiper.params.pagination.clickable;\n }\n\n function updatePagination() {\n const params = swiper.params.a11y;\n if (!hasPagination()) return;\n swiper.pagination.bullets.each(bulletEl => {\n const $bulletEl = $(bulletEl);\n\n if (swiper.params.pagination.clickable) {\n makeElFocusable($bulletEl);\n\n if (!swiper.params.pagination.renderBullet) {\n addElRole($bulletEl, 'button');\n addElLabel($bulletEl, params.paginationBulletMessage.replace(/\\{\\{index\\}\\}/, $bulletEl.index() + 1));\n }\n }\n\n if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) {\n $bulletEl.attr('aria-current', 'true');\n } else {\n $bulletEl.removeAttr('aria-current');\n }\n });\n }\n\n const initNavEl = ($el, wrapperId, message) => {\n makeElFocusable($el);\n\n if ($el[0].tagName !== 'BUTTON') {\n addElRole($el, 'button');\n $el.on('keydown', onEnterOrSpaceKey);\n }\n\n addElLabel($el, message);\n addElControls($el, wrapperId);\n };\n\n function init() {\n const params = swiper.params.a11y;\n swiper.$el.append(liveRegion); // Container\n\n const $containerEl = swiper.$el;\n\n if (params.containerRoleDescriptionMessage) {\n addElRoleDescription($containerEl, params.containerRoleDescriptionMessage);\n }\n\n if (params.containerMessage) {\n addElLabel($containerEl, params.containerMessage);\n } // Wrapper\n\n\n const $wrapperEl = swiper.$wrapperEl;\n const wrapperId = $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`;\n const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';\n addElId($wrapperEl, wrapperId);\n addElLive($wrapperEl, live); // Slide\n\n if (params.itemRoleDescriptionMessage) {\n addElRoleDescription($(swiper.slides), params.itemRoleDescriptionMessage);\n }\n\n addElRole($(swiper.slides), params.slideRole);\n const slidesLength = swiper.params.loop ? swiper.slides.filter(el => !el.classList.contains(swiper.params.slideDuplicateClass)).length : swiper.slides.length;\n swiper.slides.each((slideEl, index) => {\n const $slideEl = $(slideEl);\n const slideIndex = swiper.params.loop ? parseInt($slideEl.attr('data-swiper-slide-index'), 10) : index;\n const ariaLabelMessage = params.slideLabelMessage.replace(/\\{\\{index\\}\\}/, slideIndex + 1).replace(/\\{\\{slidesLength\\}\\}/, slidesLength);\n addElLabel($slideEl, ariaLabelMessage);\n }); // Navigation\n\n let $nextEl;\n let $prevEl;\n\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n\n if ($nextEl && $nextEl.length) {\n initNavEl($nextEl, wrapperId, params.nextSlideMessage);\n }\n\n if ($prevEl && $prevEl.length) {\n initNavEl($prevEl, wrapperId, params.prevSlideMessage);\n } // Pagination\n\n\n if (hasClickablePagination()) {\n swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);\n }\n }\n\n function destroy() {\n if (liveRegion && liveRegion.length > 0) liveRegion.remove();\n let $nextEl;\n let $prevEl;\n\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n\n if ($nextEl) {\n $nextEl.off('keydown', onEnterOrSpaceKey);\n }\n\n if ($prevEl) {\n $prevEl.off('keydown', onEnterOrSpaceKey);\n } // Pagination\n\n\n if (hasClickablePagination()) {\n swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);\n }\n }\n\n on('beforeInit', () => {\n liveRegion = $(``);\n });\n on('afterInit', () => {\n if (!swiper.params.a11y.enabled) return;\n init();\n updateNavigation();\n });\n on('toEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('fromEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('paginationUpdate', () => {\n if (!swiper.params.a11y.enabled) return;\n updatePagination();\n });\n on('destroy', () => {\n if (!swiper.params.a11y.enabled) return;\n destroy();\n });\n}","import { getWindow } from 'ssr-window';\nexport default function History({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n history: {\n enabled: false,\n root: '',\n replaceState: false,\n key: 'slides'\n }\n });\n let initialized = false;\n let paths = {};\n\n const slugify = text => {\n return text.toString().replace(/\\s+/g, '-').replace(/[^\\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, '');\n };\n\n const getPathValues = urlOverride => {\n const window = getWindow();\n let location;\n\n if (urlOverride) {\n location = new URL(urlOverride);\n } else {\n location = window.location;\n }\n\n const pathArray = location.pathname.slice(1).split('/').filter(part => part !== '');\n const total = pathArray.length;\n const key = pathArray[total - 2];\n const value = pathArray[total - 1];\n return {\n key,\n value\n };\n };\n\n const setHistory = (key, index) => {\n const window = getWindow();\n if (!initialized || !swiper.params.history.enabled) return;\n let location;\n\n if (swiper.params.url) {\n location = new URL(swiper.params.url);\n } else {\n location = window.location;\n }\n\n const slide = swiper.slides.eq(index);\n let value = slugify(slide.attr('data-history'));\n\n if (swiper.params.history.root.length > 0) {\n let root = swiper.params.history.root;\n if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1);\n value = `${root}/${key}/${value}`;\n } else if (!location.pathname.includes(key)) {\n value = `${key}/${value}`;\n }\n\n const currentState = window.history.state;\n\n if (currentState && currentState.value === value) {\n return;\n }\n\n if (swiper.params.history.replaceState) {\n window.history.replaceState({\n value\n }, null, value);\n } else {\n window.history.pushState({\n value\n }, null, value);\n }\n };\n\n const scrollToSlide = (speed, value, runCallbacks) => {\n if (value) {\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHistory = slugify(slide.attr('data-history'));\n\n if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, runCallbacks);\n }\n }\n } else {\n swiper.slideTo(0, speed, runCallbacks);\n }\n };\n\n const setHistoryPopState = () => {\n paths = getPathValues(swiper.params.url);\n scrollToSlide(swiper.params.speed, swiper.paths.value, false);\n };\n\n const init = () => {\n const window = getWindow();\n if (!swiper.params.history) return;\n\n if (!window.history || !window.history.pushState) {\n swiper.params.history.enabled = false;\n swiper.params.hashNavigation.enabled = true;\n return;\n }\n\n initialized = true;\n paths = getPathValues(swiper.params.url);\n if (!paths.key && !paths.value) return;\n scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit);\n\n if (!swiper.params.history.replaceState) {\n window.addEventListener('popstate', setHistoryPopState);\n }\n };\n\n const destroy = () => {\n const window = getWindow();\n\n if (!swiper.params.history.replaceState) {\n window.removeEventListener('popstate', setHistoryPopState);\n }\n };\n\n on('init', () => {\n if (swiper.params.history.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.history.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n}","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function HashNavigation({\n swiper,\n extendParams,\n emit,\n on\n}) {\n let initialized = false;\n const document = getDocument();\n const window = getWindow();\n extendParams({\n hashNavigation: {\n enabled: false,\n replaceState: false,\n watchState: false\n }\n });\n\n const onHashChange = () => {\n emit('hashChange');\n const newHash = document.location.hash.replace('#', '');\n const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');\n\n if (newHash !== activeSlideHash) {\n const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash=\"${newHash}\"]`).index();\n if (typeof newIndex === 'undefined') return;\n swiper.slideTo(newIndex);\n }\n };\n\n const setHash = () => {\n if (!initialized || !swiper.params.hashNavigation.enabled) return;\n\n if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {\n window.history.replaceState(null, null, `#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || '');\n emit('hashSet');\n } else {\n const slide = swiper.slides.eq(swiper.activeIndex);\n const hash = slide.attr('data-hash') || slide.attr('data-history');\n document.location.hash = hash || '';\n emit('hashSet');\n }\n };\n\n const init = () => {\n if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return;\n initialized = true;\n const hash = document.location.hash.replace('#', '');\n\n if (hash) {\n const speed = 0;\n\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHash = slide.attr('data-hash') || slide.attr('data-history');\n\n if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);\n }\n }\n }\n\n if (swiper.params.hashNavigation.watchState) {\n $(window).on('hashchange', onHashChange);\n }\n };\n\n const destroy = () => {\n if (swiper.params.hashNavigation.watchState) {\n $(window).off('hashchange', onHashChange);\n }\n };\n\n on('init', () => {\n if (swiper.params.hashNavigation.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.hashNavigation.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHash();\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHash();\n }\n });\n}","/* eslint no-underscore-dangle: \"off\" */\n\n/* eslint no-use-before-define: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport { nextTick } from '../../shared/utils.js';\nexport default function Autoplay({\n swiper,\n extendParams,\n on,\n emit\n}) {\n let timeout;\n swiper.autoplay = {\n running: false,\n paused: false\n };\n extendParams({\n autoplay: {\n enabled: false,\n delay: 3000,\n waitForTransition: true,\n disableOnInteraction: true,\n stopOnLastSlide: false,\n reverseDirection: false,\n pauseOnMouseEnter: false\n }\n });\n\n function run() {\n const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);\n let delay = swiper.params.autoplay.delay;\n\n if ($activeSlideEl.attr('data-swiper-autoplay')) {\n delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;\n }\n\n clearTimeout(timeout);\n timeout = nextTick(() => {\n let autoplayResult;\n\n if (swiper.params.autoplay.reverseDirection) {\n if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isBeginning) {\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);\n emit('autoplay');\n } else {\n stop();\n }\n } else if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isEnd) {\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(0, swiper.params.speed, true, true);\n emit('autoplay');\n } else {\n stop();\n }\n\n if (swiper.params.cssMode && swiper.autoplay.running) run();else if (autoplayResult === false) {\n run();\n }\n }, delay);\n }\n\n function start() {\n if (typeof timeout !== 'undefined') return false;\n if (swiper.autoplay.running) return false;\n swiper.autoplay.running = true;\n emit('autoplayStart');\n run();\n return true;\n }\n\n function stop() {\n if (!swiper.autoplay.running) return false;\n if (typeof timeout === 'undefined') return false;\n\n if (timeout) {\n clearTimeout(timeout);\n timeout = undefined;\n }\n\n swiper.autoplay.running = false;\n emit('autoplayStop');\n return true;\n }\n\n function pause(speed) {\n if (!swiper.autoplay.running) return;\n if (swiper.autoplay.paused) return;\n if (timeout) clearTimeout(timeout);\n swiper.autoplay.paused = true;\n\n if (speed === 0 || !swiper.params.autoplay.waitForTransition) {\n swiper.autoplay.paused = false;\n run();\n } else {\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].addEventListener(event, onTransitionEnd);\n });\n }\n }\n\n function onVisibilityChange() {\n const document = getDocument();\n\n if (document.visibilityState === 'hidden' && swiper.autoplay.running) {\n pause();\n }\n\n if (document.visibilityState === 'visible' && swiper.autoplay.paused) {\n run();\n swiper.autoplay.paused = false;\n }\n }\n\n function onTransitionEnd(e) {\n if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;\n if (e.target !== swiper.$wrapperEl[0]) return;\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n swiper.autoplay.paused = false;\n\n if (!swiper.autoplay.running) {\n stop();\n } else {\n run();\n }\n }\n\n function onMouseEnter() {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n }\n\n function onMouseLeave() {\n if (swiper.params.autoplay.disableOnInteraction) {\n return;\n }\n\n swiper.autoplay.paused = false;\n run();\n }\n\n function attachMouseEvents() {\n if (swiper.params.autoplay.pauseOnMouseEnter) {\n swiper.$el.on('mouseenter', onMouseEnter);\n swiper.$el.on('mouseleave', onMouseLeave);\n }\n }\n\n function detachMouseEvents() {\n swiper.$el.off('mouseenter', onMouseEnter);\n swiper.$el.off('mouseleave', onMouseLeave);\n }\n\n on('init', () => {\n if (swiper.params.autoplay.enabled) {\n start();\n const document = getDocument();\n document.addEventListener('visibilitychange', onVisibilityChange);\n attachMouseEvents();\n }\n });\n on('beforeTransitionStart', (_s, speed, internal) => {\n if (swiper.autoplay.running) {\n if (internal || !swiper.params.autoplay.disableOnInteraction) {\n swiper.autoplay.pause(speed);\n } else {\n stop();\n }\n }\n });\n on('sliderFirstMove', () => {\n if (swiper.autoplay.running) {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n }\n });\n on('touchEnd', () => {\n if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) {\n run();\n }\n });\n on('destroy', () => {\n detachMouseEvents();\n\n if (swiper.autoplay.running) {\n stop();\n }\n\n const document = getDocument();\n document.removeEventListener('visibilitychange', onVisibilityChange);\n });\n Object.assign(swiper.autoplay, {\n pause,\n run,\n start,\n stop\n });\n}","import { isObject } from '../../shared/utils.js';\nimport $ from '../../shared/dom.js';\nexport default function Thumb({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n thumbs: {\n swiper: null,\n multipleActiveThumbs: true,\n autoScrollOffset: 0,\n slideThumbActiveClass: 'swiper-slide-thumb-active',\n thumbsContainerClass: 'swiper-thumbs'\n }\n });\n let initialized = false;\n let swiperCreated = false;\n swiper.thumbs = {\n swiper: null\n };\n\n function onThumbClick() {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n const clickedIndex = thumbsSwiper.clickedIndex;\n const clickedSlide = thumbsSwiper.clickedSlide;\n if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return;\n if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;\n let slideToIndex;\n\n if (thumbsSwiper.params.loop) {\n slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n } else {\n slideToIndex = clickedIndex;\n }\n\n if (swiper.params.loop) {\n let currentIndex = swiper.activeIndex;\n\n if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n currentIndex = swiper.activeIndex;\n }\n\n const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`).eq(0).index();\n const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`).eq(0).index();\n if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex;\n }\n\n swiper.slideTo(slideToIndex);\n }\n\n function init() {\n const {\n thumbs: thumbsParams\n } = swiper.params;\n if (initialized) return false;\n initialized = true;\n const SwiperClass = swiper.constructor;\n\n if (thumbsParams.swiper instanceof SwiperClass) {\n swiper.thumbs.swiper = thumbsParams.swiper;\n Object.assign(swiper.thumbs.swiper.originalParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n Object.assign(swiper.thumbs.swiper.params, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n } else if (isObject(thumbsParams.swiper)) {\n const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper);\n Object.assign(thumbsSwiperParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams);\n swiperCreated = true;\n }\n\n swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);\n swiper.thumbs.swiper.on('tap', onThumbClick);\n return true;\n }\n\n function update(initial) {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;\n const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;\n const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;\n\n if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {\n let currentThumbsIndex = thumbsSwiper.activeIndex;\n let newThumbsIndex;\n let direction;\n\n if (thumbsSwiper.params.loop) {\n if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {\n thumbsSwiper.loopFix(); // eslint-disable-next-line\n\n thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;\n currentThumbsIndex = thumbsSwiper.activeIndex;\n } // Find actual thumbs index to slide to\n\n\n const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`).eq(0).index();\n const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`).eq(0).index();\n\n if (typeof prevThumbsIndex === 'undefined') {\n newThumbsIndex = nextThumbsIndex;\n } else if (typeof nextThumbsIndex === 'undefined') {\n newThumbsIndex = prevThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex = thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex = nextThumbsIndex;\n } else {\n newThumbsIndex = prevThumbsIndex;\n }\n\n direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';\n } else {\n newThumbsIndex = swiper.realIndex;\n direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev';\n }\n\n if (useOffset) {\n newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset;\n }\n\n if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {\n if (thumbsSwiper.params.centeredSlides) {\n if (newThumbsIndex > currentThumbsIndex) {\n newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;\n } else {\n newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;\n }\n } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {// newThumbsIndex = newThumbsIndex - slidesPerView + 1;\n }\n\n thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);\n }\n } // Activate thumbs\n\n\n let thumbsToActivate = 1;\n const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;\n\n if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {\n thumbsToActivate = swiper.params.slidesPerView;\n }\n\n if (!swiper.params.thumbs.multipleActiveThumbs) {\n thumbsToActivate = 1;\n }\n\n thumbsToActivate = Math.floor(thumbsToActivate);\n thumbsSwiper.slides.removeClass(thumbActiveClass);\n\n if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index=\"${swiper.realIndex + i}\"]`).addClass(thumbActiveClass);\n }\n } else {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass);\n }\n }\n }\n\n on('beforeInit', () => {\n const {\n thumbs\n } = swiper.params;\n if (!thumbs || !thumbs.swiper) return;\n init();\n update(true);\n });\n on('slideChange update resize observerUpdate', () => {\n if (!swiper.thumbs.swiper) return;\n update();\n });\n on('setTransition', (_s, duration) => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n thumbsSwiper.setTransition(duration);\n });\n on('beforeDestroy', () => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n\n if (swiperCreated && thumbsSwiper) {\n thumbsSwiper.destroy();\n }\n });\n Object.assign(swiper.thumbs, {\n init,\n update\n });\n}","import { now } from '../../shared/utils.js';\nexport default function freeMode({\n swiper,\n extendParams,\n emit,\n once\n}) {\n extendParams({\n freeMode: {\n enabled: false,\n momentum: true,\n momentumRatio: 1,\n momentumBounce: true,\n momentumBounceRatio: 1,\n momentumVelocityRatio: 1,\n sticky: false,\n minimumVelocity: 0.02\n }\n });\n\n function onTouchMove() {\n const {\n touchEventsData: data,\n touches\n } = swiper; // Velocity\n\n if (data.velocities.length === 0) {\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],\n time: data.touchStartTime\n });\n }\n\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],\n time: now()\n });\n }\n\n function onTouchEnd({\n currentPos\n }) {\n const {\n params,\n $wrapperEl,\n rtlTranslate: rtl,\n snapGrid,\n touchEventsData: data\n } = swiper; // Time diff\n\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n if (currentPos < -swiper.minTranslate()) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n if (currentPos > -swiper.maxTranslate()) {\n if (swiper.slides.length < snapGrid.length) {\n swiper.slideTo(snapGrid.length - 1);\n } else {\n swiper.slideTo(swiper.slides.length - 1);\n }\n\n return;\n }\n\n if (params.freeMode.momentum) {\n if (data.velocities.length > 1) {\n const lastMoveEvent = data.velocities.pop();\n const velocityEvent = data.velocities.pop();\n const distance = lastMoveEvent.position - velocityEvent.position;\n const time = lastMoveEvent.time - velocityEvent.time;\n swiper.velocity = distance / time;\n swiper.velocity /= 2;\n\n if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) {\n swiper.velocity = 0;\n } // this implies that the user stopped moving a finger then released.\n // There would be no events with distance zero, so the last event is stale.\n\n\n if (time > 150 || now() - lastMoveEvent.time > 300) {\n swiper.velocity = 0;\n }\n } else {\n swiper.velocity = 0;\n }\n\n swiper.velocity *= params.freeMode.momentumVelocityRatio;\n data.velocities.length = 0;\n let momentumDuration = 1000 * params.freeMode.momentumRatio;\n const momentumDistance = swiper.velocity * momentumDuration;\n let newPosition = swiper.translate + momentumDistance;\n if (rtl) newPosition = -newPosition;\n let doBounce = false;\n let afterBouncePosition;\n const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio;\n let needsLoopFix;\n\n if (newPosition < swiper.maxTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition + swiper.maxTranslate() < -bounceAmount) {\n newPosition = swiper.maxTranslate() - bounceAmount;\n }\n\n afterBouncePosition = swiper.maxTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.maxTranslate();\n }\n\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (newPosition > swiper.minTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition - swiper.minTranslate() > bounceAmount) {\n newPosition = swiper.minTranslate() + bounceAmount;\n }\n\n afterBouncePosition = swiper.minTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.minTranslate();\n }\n\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (params.freeMode.sticky) {\n let nextSlide;\n\n for (let j = 0; j < snapGrid.length; j += 1) {\n if (snapGrid[j] > -newPosition) {\n nextSlide = j;\n break;\n }\n }\n\n if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {\n newPosition = snapGrid[nextSlide];\n } else {\n newPosition = snapGrid[nextSlide - 1];\n }\n\n newPosition = -newPosition;\n }\n\n if (needsLoopFix) {\n once('transitionEnd', () => {\n swiper.loopFix();\n });\n } // Fix duration\n\n\n if (swiper.velocity !== 0) {\n if (rtl) {\n momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);\n } else {\n momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);\n }\n\n if (params.freeMode.sticky) {\n // If freeMode.sticky is active and the user ends a swipe with a slow-velocity\n // event, then durations can be 20+ seconds to slide one (or zero!) slides.\n // It's easy to see this when simulating touch with mouse events. To fix this,\n // limit single-slide swipes to the default slide duration. This also has the\n // nice side effect of matching slide speed if the user stopped moving before\n // lifting finger or mouse vs. moving slowly before lifting the finger/mouse.\n // For faster swipes, also apply limits (albeit higher ones).\n const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);\n const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];\n\n if (moveDistance < currentSlideSize) {\n momentumDuration = params.speed;\n } else if (moveDistance < 2 * currentSlideSize) {\n momentumDuration = params.speed * 1.5;\n } else {\n momentumDuration = params.speed * 2.5;\n }\n }\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n }\n\n if (params.freeMode.momentumBounce && doBounce) {\n swiper.updateProgress(afterBouncePosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;\n emit('momentumBounce');\n swiper.setTransition(params.speed);\n setTimeout(() => {\n swiper.setTranslate(afterBouncePosition);\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }, 0);\n });\n } else if (swiper.velocity) {\n emit('_freeModeNoMomentumRelease');\n swiper.updateProgress(newPosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n\n if (!swiper.animating) {\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }\n } else {\n swiper.updateProgress(newPosition);\n }\n\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n } else if (params.freeMode) {\n emit('_freeModeNoMomentumRelease');\n }\n\n if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) {\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n }\n\n Object.assign(swiper, {\n freeMode: {\n onTouchMove,\n onTouchEnd\n }\n });\n}","import $ from '../../shared/dom.js';\nimport effectInit from '../../shared/effect-init.js';\nexport default function EffectCube({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n cubeEffect: {\n slideShadows: true,\n shadow: true,\n shadowOffset: 20,\n shadowScale: 0.94\n }\n });\n\n const setTranslate = () => {\n const {\n $el,\n $wrapperEl,\n slides,\n width: swiperWidth,\n height: swiperHeight,\n rtlTranslate: rtl,\n size: swiperSize,\n browser\n } = swiper;\n const params = swiper.params.cubeEffect;\n const isHorizontal = swiper.isHorizontal();\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let wrapperRotate = 0;\n let $cubeShadowEl;\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');\n\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $wrapperEl.append($cubeShadowEl);\n }\n\n $cubeShadowEl.css({\n height: `${swiperWidth}px`\n });\n } else {\n $cubeShadowEl = $el.find('.swiper-cube-shadow');\n\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $el.append($cubeShadowEl);\n }\n }\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let slideIndex = i;\n\n if (isVirtual) {\n slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);\n }\n\n let slideAngle = slideIndex * 90;\n let round = Math.floor(slideAngle / 360);\n\n if (rtl) {\n slideAngle = -slideAngle;\n round = Math.floor(-slideAngle / 360);\n }\n\n const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n let tx = 0;\n let ty = 0;\n let tz = 0;\n\n if (slideIndex % 4 === 0) {\n tx = -round * 4 * swiperSize;\n tz = 0;\n } else if ((slideIndex - 1) % 4 === 0) {\n tx = 0;\n tz = -round * 4 * swiperSize;\n } else if ((slideIndex - 2) % 4 === 0) {\n tx = swiperSize + round * 4 * swiperSize;\n tz = swiperSize;\n } else if ((slideIndex - 3) % 4 === 0) {\n tx = -swiperSize;\n tz = 3 * swiperSize + swiperSize * 4 * round;\n }\n\n if (rtl) {\n tx = -tx;\n }\n\n if (!isHorizontal) {\n ty = tx;\n tx = 0;\n }\n\n const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;\n\n if (progress <= 1 && progress > -1) {\n wrapperRotate = slideIndex * 90 + progress * 90;\n if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90;\n }\n\n $slideEl.transform(transform);\n\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if (shadowBefore.length === 0) {\n shadowBefore = $(`
`);\n $slideEl.append(shadowBefore);\n }\n\n if (shadowAfter.length === 0) {\n shadowAfter = $(`
`);\n $slideEl.append(shadowAfter);\n }\n\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n }\n\n $wrapperEl.css({\n '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,\n 'transform-origin': `50% 50% -${swiperSize / 2}px`\n });\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl.transform(`translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);\n } else {\n const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n const scale1 = params.shadowScale;\n const scale2 = params.shadowScale / multiplier;\n const offset = params.shadowOffset;\n $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);\n }\n }\n\n const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0;\n $wrapperEl.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);\n };\n\n const setTransition = duration => {\n const {\n $el,\n slides\n } = swiper;\n slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n\n if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {\n $el.find('.swiper-cube-shadow').transition(duration);\n }\n };\n\n effectInit({\n effect: 'cube',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n resistanceRatio: 0,\n spaceBetween: 0,\n centeredSlides: false,\n virtualTranslate: true\n })\n });\n}","import $ from './dom.js';\nexport default function createShadow(params, $slideEl, side) {\n const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}`;\n const $shadowContainer = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl;\n let $shadowEl = $shadowContainer.children(`.${shadowClass}`);\n\n if (!$shadowEl.length) {\n $shadowEl = $(`
`);\n $shadowContainer.append($shadowEl);\n }\n\n return $shadowEl;\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectFlip({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n flipEffect: {\n slideShadows: true,\n limitRotation: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides,\n rtlTranslate: rtl\n } = swiper;\n const params = swiper.params.flipEffect;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let progress = $slideEl[0].progress;\n\n if (swiper.params.flipEffect.limitRotation) {\n progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n }\n\n const offset = $slideEl[0].swiperSlideOffset;\n const rotate = -180 * progress;\n let rotateY = rotate;\n let rotateX = 0;\n let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset;\n let ty = 0;\n\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n rotateX = -rotateY;\n rotateY = 0;\n } else if (rtl) {\n rotateY = -rotateY;\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;\n\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if (shadowBefore.length === 0) {\n shadowBefore = createShadow(params, $slideEl, swiper.isHorizontal() ? 'left' : 'top');\n }\n\n if (shadowAfter.length === 0) {\n shadowAfter = createShadow(params, $slideEl, swiper.isHorizontal() ? 'right' : 'bottom');\n }\n\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n\n const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.flipEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl\n });\n };\n\n effectInit({\n effect: 'flip',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nexport default function EffectCoverflow({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n coverflowEffect: {\n rotate: 50,\n stretch: 0,\n depth: 100,\n scale: 1,\n modifier: 1,\n slideShadows: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n width: swiperWidth,\n height: swiperHeight,\n slides,\n slidesSizesGrid\n } = swiper;\n const params = swiper.params.coverflowEffect;\n const isHorizontal = swiper.isHorizontal();\n const transform = swiper.translate;\n const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;\n const rotate = isHorizontal ? params.rotate : -params.rotate;\n const translate = params.depth; // Each slide offset from center\n\n for (let i = 0, length = slides.length; i < length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideSize = slidesSizesGrid[i];\n const slideOffset = $slideEl[0].swiperSlideOffset;\n const offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * params.modifier;\n let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;\n let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; // var rotateZ = 0\n\n let translateZ = -translate * Math.abs(offsetMultiplier);\n let stretch = params.stretch; // Allow percentage to make a relative stretch for responsive sliders\n\n if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {\n stretch = parseFloat(params.stretch) / 100 * slideSize;\n }\n\n let translateY = isHorizontal ? 0 : stretch * offsetMultiplier;\n let translateX = isHorizontal ? stretch * offsetMultiplier : 0;\n let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); // Fix for ultra small values\n\n if (Math.abs(translateX) < 0.001) translateX = 0;\n if (Math.abs(translateY) < 0.001) translateY = 0;\n if (Math.abs(translateZ) < 0.001) translateZ = 0;\n if (Math.abs(rotateY) < 0.001) rotateY = 0;\n if (Math.abs(rotateX) < 0.001) rotateX = 0;\n if (Math.abs(scale) < 0.001) scale = 0;\n const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(slideTransform);\n $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n\n if (params.slideShadows) {\n // Set shadows\n let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if ($shadowBeforeEl.length === 0) {\n $shadowBeforeEl = createShadow(params, $slideEl, isHorizontal ? 'left' : 'top');\n }\n\n if ($shadowAfterEl.length === 0) {\n $shadowAfterEl = createShadow(params, $slideEl, isHorizontal ? 'right' : 'bottom');\n }\n\n if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0;\n }\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.coverflowEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n };\n\n effectInit({\n effect: 'coverflow',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n watchSlidesProgress: true\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectCreative({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n creativeEffect: {\n transformEl: null,\n limitProgress: 1,\n shadowPerProgress: false,\n progressMultiplier: 1,\n perspective: true,\n prev: {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n opacity: 1,\n scale: 1\n },\n next: {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n opacity: 1,\n scale: 1\n }\n }\n });\n\n const getTranslateValue = value => {\n if (typeof value === 'string') return value;\n return `${value}px`;\n };\n\n const setTranslate = () => {\n const {\n slides,\n $wrapperEl,\n slidesSizesGrid\n } = swiper;\n const params = swiper.params.creativeEffect;\n const {\n progressMultiplier: multiplier\n } = params;\n const isCenteredSlides = swiper.params.centeredSlides;\n\n if (isCenteredSlides) {\n const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0;\n $wrapperEl.transform(`translateX(calc(50% - ${margin}px))`);\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideProgress = $slideEl[0].progress;\n const progress = Math.min(Math.max($slideEl[0].progress, -params.limitProgress), params.limitProgress);\n let originalProgress = progress;\n\n if (!isCenteredSlides) {\n originalProgress = Math.min(Math.max($slideEl[0].originalProgress, -params.limitProgress), params.limitProgress);\n }\n\n const offset = $slideEl[0].swiperSlideOffset;\n const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0];\n const r = [0, 0, 0];\n let custom = false;\n\n if (!swiper.isHorizontal()) {\n t[1] = t[0];\n t[0] = 0;\n }\n\n let data = {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n scale: 1,\n opacity: 1\n };\n\n if (progress < 0) {\n data = params.next;\n custom = true;\n } else if (progress > 0) {\n data = params.prev;\n custom = true;\n } // set translate\n\n\n t.forEach((value, index) => {\n t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`;\n }); // set rotates\n\n r.forEach((value, index) => {\n r[index] = data.rotate[index] * Math.abs(progress * multiplier);\n });\n $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;\n const translateString = t.join(', ');\n const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`;\n const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`;\n const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier;\n const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; // Set shadows\n\n if (custom && data.shadow || !custom) {\n let $shadowEl = $slideEl.children('.swiper-slide-shadow');\n\n if ($shadowEl.length === 0 && data.shadow) {\n $shadowEl = createShadow(params, $slideEl);\n }\n\n if ($shadowEl.length) {\n const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress;\n $shadowEl[0].style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1);\n }\n }\n\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform).css({\n opacity: opacityString\n });\n\n if (data.origin) {\n $targetEl.css('transform-origin', data.origin);\n }\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.creativeEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides: true\n });\n };\n\n effectInit({\n effect: 'creative',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => swiper.params.creativeEffect.perspective,\n overwriteParams: () => ({\n watchSlidesProgress: true,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectCards({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n cardsEffect: {\n slideShadows: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides,\n activeIndex\n } = swiper;\n const params = swiper.params.cardsEffect;\n const {\n startTranslate,\n isTouched\n } = swiper.touchEventsData;\n const currentTranslate = swiper.translate;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideProgress = $slideEl[0].progress;\n const progress = Math.min(Math.max(slideProgress, -4), 4);\n let offset = $slideEl[0].swiperSlideOffset;\n\n if (swiper.params.centeredSlides && !swiper.params.cssMode) {\n swiper.$wrapperEl.transform(`translateX(${swiper.minTranslate()}px)`);\n }\n\n if (swiper.params.centeredSlides && swiper.params.cssMode) {\n offset -= slides[0].swiperSlideOffset;\n }\n\n let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset;\n let tY = 0;\n const tZ = -100 * Math.abs(progress);\n let scale = 1;\n let rotate = -2 * progress;\n let tXAdd = 8 - Math.abs(progress) * 0.75;\n const isSwipeToNext = (i === activeIndex || i === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate;\n const isSwipeToPrev = (i === activeIndex || i === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate;\n\n if (isSwipeToNext || isSwipeToPrev) {\n const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5;\n rotate += -28 * progress * subProgress;\n scale += -0.5 * subProgress;\n tXAdd += 96 * subProgress;\n tY = `${-25 * subProgress * Math.abs(progress)}%`;\n }\n\n if (progress < 0) {\n // next\n tX = `calc(${tX}px + (${tXAdd * Math.abs(progress)}%))`;\n } else if (progress > 0) {\n // prev\n tX = `calc(${tX}px + (-${tXAdd * Math.abs(progress)}%))`;\n } else {\n tX = `${tX}px`;\n }\n\n if (!swiper.isHorizontal()) {\n const prevY = tY;\n tY = tX;\n tX = prevY;\n }\n\n const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`;\n const transform = `\n translate3d(${tX}, ${tY}, ${tZ}px)\n rotateZ(${rotate}deg)\n scale(${scaleString})\n `;\n\n if (params.slideShadows) {\n // Set shadows\n let $shadowEl = $slideEl.find('.swiper-slide-shadow');\n\n if ($shadowEl.length === 0) {\n $shadowEl = createShadow(params, $slideEl);\n }\n\n if ($shadowEl.length) $shadowEl[0].style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1);\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.cardsEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl\n });\n };\n\n effectInit({\n effect: 'cards',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n watchSlidesProgress: true,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","/**\n * Swiper 7.4.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2021 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: December 24, 2021\n */\n\nexport { default as Swiper, default } from './core/core.js';\nexport { default as Virtual } from './modules/virtual/virtual.js';\nexport { default as Keyboard } from './modules/keyboard/keyboard.js';\nexport { default as Mousewheel } from './modules/mousewheel/mousewheel.js';\nexport { default as Navigation } from './modules/navigation/navigation.js';\nexport { default as Pagination } from './modules/pagination/pagination.js';\nexport { default as Scrollbar } from './modules/scrollbar/scrollbar.js';\nexport { default as Parallax } from './modules/parallax/parallax.js';\nexport { default as Zoom } from './modules/zoom/zoom.js';\nexport { default as Lazy } from './modules/lazy/lazy.js';\nexport { default as Controller } from './modules/controller/controller.js';\nexport { default as A11y } from './modules/a11y/a11y.js';\nexport { default as History } from './modules/history/history.js';\nexport { default as HashNavigation } from './modules/hash-navigation/hash-navigation.js';\nexport { default as Autoplay } from './modules/autoplay/autoplay.js';\nexport { default as Thumbs } from './modules/thumbs/thumbs.js';\nexport { default as FreeMode } from './modules/free-mode/free-mode.js';\nexport { default as Grid } from './modules/grid/grid.js';\nexport { default as Manipulation } from './modules/manipulation/manipulation.js';\nexport { default as EffectFade } from './modules/effect-fade/effect-fade.js';\nexport { default as EffectCube } from './modules/effect-cube/effect-cube.js';\nexport { default as EffectFlip } from './modules/effect-flip/effect-flip.js';\nexport { default as EffectCoverflow } from './modules/effect-coverflow/effect-coverflow.js';\nexport { default as EffectCreative } from './modules/effect-creative/effect-creative.js';\nexport { default as EffectCards } from './modules/effect-cards/effect-cards.js';","export const simulateClick = function (elem) {\n // Create our event (with options)\n var evt = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window\n });\n // If cancelled, don't dispatch our event\n var canceled = !elem.dispatchEvent(evt);\n};\n\nexport const fadeOutEffect = (elem) => {\n elem.style.opacity = 1;\n \n (function fade() {\n if ((elem.style.opacity -= .1) < 0) {\n elem.style.display = \"none\";\n\n } else {\n requestAnimationFrame(fade);\n }\n\n })();\n};\n\nexport const fadeInEffect = (elem, display) =>{\n elem.style.opacity = 0;\n elem.style.display = display || \"block\";\n\n (function fade() {\n var val = parseFloat(elem.style.opacity);\n\n if (!((val += .1) > 1)) {\n elem.style.opacity = val;\n requestAnimationFrame(fade);\n }\n })();\n};\n\nexport const slideUp = (target, duration=500) => {\n target.style.transitionProperty = 'height, margin, padding';\n target.style.transitionDuration = duration + 'ms';\n target.style.boxSizing = 'border-box';\n target.style.height = target.offsetHeight + 'px';\n target.offsetHeight;\n target.style.overflow = 'hidden';\n target.style.height = 0;\n target.style.paddingTop = 0;\n target.style.paddingBottom = 0;\n target.style.marginTop = 0;\n target.style.marginBottom = 0;\n\n window.setTimeout( () => {\n target.style.display = 'none';\n target.style.removeProperty('height');\n target.style.removeProperty('padding-top');\n target.style.removeProperty('padding-bottom');\n target.style.removeProperty('margin-top');\n target.style.removeProperty('margin-bottom');\n target.style.removeProperty('overflow');\n target.style.removeProperty('transition-duration');\n target.style.removeProperty('transition-property');\n //alert(\"!\");\n }, duration);\n}\n\nexport const slideDown = (target, duration=500) => {\n target.style.removeProperty('display');\n \n let display = window.getComputedStyle(target).display;\n \n if (display === 'none') display = 'block';\n \n target.style.display = display;\n \n let height = target.offsetHeight;\n \n target.style.overflow = 'hidden';\n target.style.height = 0;\n target.style.paddingTop = 0;\n target.style.paddingBottom = 0;\n target.style.marginTop = 0;\n target.style.marginBottom = 0;\n target.offsetHeight;\n target.style.boxSizing = 'border-box';\n target.style.transitionProperty = \"height, margin, padding\";\n target.style.transitionDuration = duration + 'ms';\n target.style.height = height + 'px';\n target.style.removeProperty('padding-top');\n target.style.removeProperty('padding-bottom');\n target.style.removeProperty('margin-top');\n target.style.removeProperty('margin-bottom');\n\n window.setTimeout( () => {\n target.style.removeProperty('height');\n target.style.removeProperty('overflow');\n target.style.removeProperty('transition-duration');\n target.style.removeProperty('transition-property');\n }, duration);\n}","import Swiper, { Navigation, Pagination, Lazy, Autoplay, startAutoplay, loopDestroy } from 'swiper';\nimport {fadeOutEffect, fadeInEffect, slideUp, slideDown, simulateClick} from './serie-effects.js';\n\nSwiper.use([Navigation, Pagination, Lazy, Autoplay, startAutoplay, loopDestroy]);\n\nlet isMobile = false;\n\nif(window.screen.width >= 1023){\n isMobile = false;\n} else {\n isMobile = true;\n}\n\nconst headerFunctions = {\n topMessageSwiper: function(){\n const messageSwiper = new Swiper('[data-swiper-top-message]', {\n // Optional parameters\n loop: true,\n slidesPerView: 1,\n autoplay: {\n delay: 5000,\n disableOnInteraction: false,\n },\n });\n },\n\n loginModal: function(){\n if(isMobile == false){\n let loginBlock = document.querySelector('.header__desktop .header__client .client__login');\n let loginModal = document.querySelector('.header__desktop .header__client .login__modal');\n let headerHome = document.querySelector('.header__home');\n\n document.querySelector('.header__desktop .header__client .login__icon').addEventListener('click', (event) => {\n let target = event.target;\n \n if(loginBlock.classList.contains('active')){\n fadeOutEffect( loginModal );\n\n headerHome ? headerHome.classList.remove('login__active') : null\n\n loginBlock.classList.remove('active');\n\n } else {\n fadeInEffect( loginModal );\n\n headerHome ? headerHome.classList.add('login__active') : null\n\n loginBlock.classList.add('active');\n }\n });\n\n // Reset the effects\n window.addEventListener('scroll', () => {\n fadeOutEffect( loginModal );\n\n headerHome ? headerHome.classList.remove('login__active') : null\n\n loginBlock.classList.remove('active');\n });\n }\n },\n\n headerSubmenuSwiper: function(){\n if(isMobile == false){\n const submenusSwiper = document.querySelectorAll('[data-swiper-header-submenu]');\n\n if(submenusSwiper){\n submenusSwiper.forEach((submenu) => {\n const carousel = submenu;\n const next = submenu.parentNode.querySelector('.swiper-button-next');\n const prev = submenu.parentNode.querySelector('.swiper-button-prev');\n \n if (carousel) {\n new Swiper(carousel, {\n slidesPerView: 6,\n loop: false,\n navigation: {\n nextEl: next,\n prevEl: prev,\n },\n });\n }\n });\n }\n }\n },\n\n logoCloneToMobile: function(){\n if(isMobile == true){\n let logoNode = document.querySelector('.header__desktop .header__logo').innerHTML;\n \n document.querySelector('.header__mobile .header__logo').innerHTML = logoNode;\n }\n },\n\n searchShowAndHideMobile: function(){\n if(isMobile == true){\n let searchForm = document.querySelector('.header__mobile .client__search form');\n let searchButton = document.querySelector('.header__mobile .client__search .search__icon');\n\n searchButton.addEventListener('click', () => {\n if(searchButton.classList.contains('active')){\n fadeOutEffect( searchForm );\n \n searchButton.classList.remove('active');\n \n } else {\n fadeInEffect( searchForm );\n \n searchButton.classList.add('active');\n }\n });\n\n // Reset the effects\n window.addEventListener('scroll', () => {\n fadeOutEffect( searchForm );\n\n searchButton.classList.remove('active');\n });\n }\n },\n\n openHeaderMenuOfHeader: function(){\n if(isMobile == true){\n let tabsIcon = document.querySelector('.header__mobile .header__tabs .tabs__inner');\n let tabsIconClose = document.querySelector('.header__mobile .header__menu .menu__close');\n let target = document.querySelector('.header__mobile .header__menu');\n let duration = 500;\n\n // Show login modal when click on login icon\n tabsIcon.addEventListener('click', function(){\n target.style.left = 0;\n target.style.transitionDuration = duration + 'ms';\n\n fadeInEffect( document.querySelector('.header__mobile .header__mask') );\n });\n\n // Hide login modal when click on login close\n tabsIconClose.addEventListener('click', function(){\n target.style.left = '-100%';\n target.style.transitionDuration = duration + 'ms';\n\n fadeOutEffect( document.querySelector('.header__mobile .header__mask') );\n });\n\n // Hide login modal when click on mask div\n document.querySelector('.header__mobile .header__mask').addEventListener('click', function(){\n target.style.left = '-100%';\n target.style.transitionDuration = duration + 'ms';\n\n fadeOutEffect( document.querySelector('.header__mobile .header__mask') );\n });\n }\n },\n\n openSubmenuMobile: function(){\n if(isMobile == true){\n const sublevelOne = () =>{\n let items = Array.from( document.querySelectorAll('.header__mobile .header__menu .menu-list .menu-list-item') );\n let itemsSubLevelList = Array.from( document.querySelectorAll('.header__mobile .header__menu .menu-list .submenu-wrapper') );\n let itemsSubLevelArrowDown = Array.from( document.querySelectorAll('.header__mobile .header__menu .menu-arrow-level-one') );\n \n items.forEach(item => {\n if(item.querySelector('.menu-arrow-level-one')){\n let currentArrowDown = item.querySelector('.menu-arrow-level-one');\n\n currentArrowDown.addEventListener('click', (event) => {\n let thisIcon = event.currentTarget;\n let counter = 0;\n \n if(thisIcon.classList.contains('active')){\n slideUp( thisIcon.parentNode.querySelector('.submenu-wrapper'), 500 );\n \n thisIcon.classList.remove('active');\n \n } else {\n // Remove all itens which has active class\n itemsSubLevelArrowDown.forEach(item => {\n item.classList.remove('active');\n });\n \n // Slide up all itens which are open\n itemsSubLevelList.forEach(item => {\n slideUp( item, 500 );\n \n // Slide down clicked item when loop is finished\n counter++; \n \n if (counter === itemsSubLevelList.length) {\n setTimeout(() =>{\n slideDown( thisIcon.parentNode.querySelector('.submenu-wrapper'), 500 );\n }, 500);\n }\n });\n \n thisIcon.classList.add('active');\n }\n });\n }\n });\n }\n sublevelOne();\n }\n },\n\n cartCountUpdate: async function(_itemsCount = null){\n if(isMobile == true){\n let cartCountMobile = document.querySelector('.header__mobile .client__cart [data-cart-count]');\n let cartCountDesktop = document.querySelector('.header__desktop .client__cart [data-cart-count]');\n let target = document.querySelector('.header__desktop .client__cart [data-cart-count]');\n\n let observer = new MutationObserver((mutations) => {\n cartCountMobile.textContent = cartCountDesktop.textContent;\n });\n\n let config = { attributes: true, childList: true, characterData: true };\n observer.observe(target, config);\n }\n },\n\n popupAgeConfirm: function(){\n let buttons = document.querySelectorAll('.popup__age .popup__wrapper button');\n let ageLocalStorage = localStorage.getItem('popupAge');\n\n if(ageLocalStorage == 'yes'){\n document.querySelector('.popup__age .popup__wrapper').style.display = 'none';\n document.querySelector('.popup__age .popup__mask').style.display = 'none';\n\n } else {\n document.querySelector('.popup__age .popup__wrapper').style.display = 'flex';\n document.querySelector('.popup__age .popup__mask').style.display = 'block';\n }\n\n buttons.forEach(button => {\n button.addEventListener('click', (event) => {\n let _this = event.currentTarget;\n let value = _this.value;\n\n if(value == 'yes'){\n localStorage.setItem('popupAge', 'yes');\n \n document.querySelector('.popup__age .popup__wrapper').style.display = 'none';\n document.querySelector('.popup__age .popup__mask').style.display = 'none';\n \n } else {\n localStorage.setItem('popupAge', 'no');\n window.location.replace('https://www.google.com.br/');\n }\n })\n })\n },\n\n // modalLoading: function(){\n // window.addEventListener('load', ()=> {\n // document.querySelector('.modal__loading').style.display = 'none';\n // });\n // },\n\n init: function(){\n const _this = this;\n\n _this.topMessageSwiper();\n _this.loginModal();\n _this.headerSubmenuSwiper();\n _this.logoCloneToMobile();\n _this.searchShowAndHideMobile();\n _this.openHeaderMenuOfHeader();\n _this.openSubmenuMobile();\n _this.cartCountUpdate();\n\n const eventType = (window.innerWidth <= 1024) ? 'scroll' : 'mousemove';\n window.addEventListener(eventType, () => {\n _this.popupAgeConfirm();\n }, { once: true })\n \n },\n}\n\nexport default headerFunctions;\n","import headerFunctions from '../serie-design/serie-header';\n\nconst Header = {\n lastScrollTop: -1,\n scrollTop: window.pageYOffset,\n header: document.querySelector('#header'),\n\n setScroll: function (scrollTop, lastScrollTop) {\n const _this = this;\n\n if (scrollTop <= 0) {\n _this.header.classList.add('scroll-up');\n _this.header.classList.remove('scroll-down');\n _this.header.classList.add('on-top');\n } else {\n if (_this.header.classList.contains('on-top')) {\n _this.header.classList.remove('on-top');\n }\n if (scrollTop > lastScrollTop) {\n _this.header.classList.add('scroll-down');\n _this.header.classList.remove('scroll-up');\n } else {\n _this.header.classList.add('scroll-up');\n _this.header.classList.remove('scroll-down');\n }\n }\n },\n\n init: function () {\n const _this = this;\n const { lastScrollTop, scrollTop } = _this;\n\n _this.setScroll(scrollTop, lastScrollTop);\n\n // cuida quando a página scrolla pra atualizar o header\n window.addEventListener('scroll', function () {\n const newSt = window.pageYOffset;\n\n _this.setScroll(newSt, lastScrollTop);\n _this.lastScrollTop = newSt;\n });\n\n\n headerFunctions.init();\n },\n};\n\nexport default Header;\n","// Javascript genérico para qualquer popup que precise ser criado na loja\n\nconst Popup = {\n togglePopup: function (popupType) {\n document\n .querySelector(`[data-popup=\"${popupType}\"].popup`)\n .classList.toggle('-open');\n },\n init: function () {\n var _this = this;\n\n var toggleButtons = document.querySelectorAll(\n '[data-action=\"toggle-popup\"]'\n );\n\n // toggle popup\n toggleButtons.forEach((button) => {\n button.addEventListener('click', (e) => {\n e.preventDefault();\n\n let popupType = button.dataset.popup;\n\n _this.togglePopup(popupType);\n });\n });\n },\n};\n\nexport default Popup;\n","import { serializeArray } from '../components/utilities';\n\nconst Webforms = {\n submitWebForm: async function (form, email) {\n const formData = serializeArray(form);\n const textBtnDefault = form.querySelector('.action').innerHTML;\n\n if (typeof email == 'undefined' || email == '') {\n email = form.querySelector('[name=\"email\"]').value;\n }\n\n form.querySelector('[name=\"reply_to\"]').value = email;\n\n if (!form.classList.contains('sending')) {\n\n form.classList.add('sending');\n form.classList.remove('error');\n form.querySelector('.action').innerHTML = 'Enviando';\n\n try {\n const response = await fetch('/webform', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n },\n body: formData\n })\n\n if (response.ok) {\n console.info('Formulário enviado com sucesso');\n form.classList.add('sent');\n form.querySelector('.msg-success').classList.add('-visible');\n form.querySelector('.action').innerHTML = 'Enviado';\n form.reset();\n\n setTimeout(function () {\n form.classList.remove('sent');\n form.querySelector('.msg-success').classList.remove('-visible');\n form.querySelector('.action').innerHTML = textBtnDefault;\n }, 3500);\n } else {\n\n const text = await response.text();\n\n console.error(`Ocorreu um erro no envio do formulário. Erro ${response.status}`);\n console.error(text);\n\n form.classList.add('error');\n form.querySelector('.msg-error').classList.add('-visible');\n form.querySelector('.action').innerHTML = 'Falha ao enviar';\n\n setTimeout(function () {\n form.classList.remove('error');\n form.querySelector('.msg-error').classList.remove('-visible');\n form.querySelector('.action').innerHTML = textBtnDefault;\n }, 3500);\n\n }\n\n } catch (error) {\n console.error('Erro ao enviar o webform');\n console.error(error);\n\n form.classList.add('error');\n form.querySelector('.msg-error').classList.add('-visible');\n form.querySelector('.action').innerHTML = 'Falha ao enviar';\n\n setTimeout(function () {\n form.classList.remove('error');\n form.querySelector('.msg-error').classList.remove('-visible');\n form.querySelector('.action').innerHTML = textBtnDefault;\n }, 3500);\n }\n\n form.classList.remove('sending');\n }\n },\n submitNotify: async function (form) {\n const formData = serializeArray(form);\n const btnTextDefault = form.querySelector('.action').innerHTML;\n\n if (!form.classList.contains('sending')) {\n\n form.classList.remove('error');\n form.classList.add('sending');\n form.querySelector('.action').innerHTML = 'Enviando';\n\n try {\n\n const response = await fetch('/lista_de_espera', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n },\n body: formData\n })\n\n if (response.ok) {\n // Envia um webform de aviso de cadastro\n console.log('Lista de espera enviada com sucesso');\n form.classList.remove('sending');\n Webforms.submitWebForm(form);\n\n } else {\n const text = await response.text();\n console.error(`Ocorreu um erro ao enviar o formulário de Lista de Espera. Erro ${response.status}`)\n console.error(text);\n\n form.classList.add('error');\n form.querySelector('.msg-error').classList.add('-visible');\n form.querySelector('.action').innerHTML = 'Falha ao enviar';\n\n setTimeout(() => {\n form.classList.remove('error');\n form.querySelector('.msg-error').classList.remove('-visible');\n form.querySelector('.action').innerHTML = btnTextDefault;\n }, 3500);\n }\n\n } catch (error) {\n console.error('Falha ao enviar lista de espera. Verificar integração.');\n console.error(error);\n\n form.classList.add('error');\n form.querySelector('.msg-error').classList.add('-visible');\n form.querySelector('.action').innerHTML = 'Falha ao enviar';\n\n setTimeout(() => {\n form.classList.remove('error');\n form.querySelector('.msg-error').classList.remove('-visible');\n form.querySelector('.action').innerHTML = btnTextDefault;\n }, 3500);\n }\n\n form.classList.remove('sending');\n }\n },\n showMessage: function (input, form) {\n const alertMessage = form.querySelector('[data-msg]');\n\n alertMessage.classList.add('-visible');\n alertMessage.innerText = 'Preencha os campos obrigatórios';\n\n input.classList.add('-emphasis')\n\n setTimeout(() => {\n\n alertMessage.classList.remove('-visible');\n alertMessage.innerText = '';\n\n input.classList.remove('-emphasis')\n\n }, 2000)\n\n },\n validateForm: function (vndaInput, form) {\n let submitAllowed = true;\n\n // Permite o envio se o input vnda estiver vazio\n if (vndaInput.value == '') {\n vndaInput.setAttribute('required', false);\n\n // Valida se os campos obrigatórios estão preenchidos\n const requiredFields = form.querySelectorAll('[required]:not([required=false])');\n requiredFields.forEach(input => {\n\n if (input.value == '') {\n submitAllowed = false;\n Webforms.showMessage(input, form);\n }\n\n if (input.type == 'checkbox' && input.checked == false) {\n submitAllowed = false;\n Webforms.showMessage(input, form);\n }\n\n })\n\n if (submitAllowed) form.id == 'form-notify' ? Webforms.submitNotify(form) : Webforms.submitWebForm(form)\n }\n },\n setWebForms: function () {\n const webForms = document.querySelectorAll('[data-webform]');\n\n webForms.length > 0 && webForms.forEach(form => {\n\n const button = form.querySelector('button');\n const fieldset = form.querySelector('fieldset');\n\n // Desabilita os campos do formulário, através do fieldset, quando o input vnda recebe algum valor \n let vndaInput = form.querySelector('input[name=\"vnda\"]');\n vndaInput.addEventListener('input', () => fieldset.setAttribute('disabled', true))\n\n // Realiza o envio através do clique e da tecla enter sobre o botão do formulário\n button && button.addEventListener('click', () => Webforms.validateForm(vndaInput, form));\n button && button.addEventListener('keypress', (e) => {\n if (e.key === 'Enter') Webforms.validateForm(vndaInput, form);\n })\n\n })\n },\n init: function () {\n const _this = this;\n _this.setWebForms();\n },\n};\n\nexport default Webforms;\n","import CartDrawer from '../common/cartDrawer';\nimport { urlencodeFormData } from './utilities';\n\nconst Store = {\n openCartDrawer: true,\n openCartDrawerMobile: true,\n\n addItem: async function (form, parent, callback) {\n const _this = this;\n const btnComprar = parent.querySelector('[data-action=\"add-cart\"]');\n const urlAdd = '/carrinho/adicionar';\n const formData = urlencodeFormData(new FormData(form));\n const boxResponse = parent.querySelector(\n '[data-form-product] .msg-response:not(.resp-validate)'\n );\n\n // console.info('addItem');\n // console.info(formData);\n\n if (!btnComprar.classList.contains('-adding')) {\n btnComprar.classList.add('-adding');\n\n try {\n const response = await fetch(urlAdd, {\n method: 'POST',\n headers: {\n 'Accept': 'application/json, text/javascript, */*; q=0.0',\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n },\n body: formData,\n });\n\n const html = await response.text();\n\n console.log('success');\n\n if (typeof callback == 'function') {\n callback('produto-adicionado', html, boxResponse, form);\n } else {\n _this.addItemResult('produto-adicionado', html, boxResponse, form);\n }\n } catch (error) {\n console.log('error');\n console.error(error);\n\n if (typeof callback == 'function') {\n callback('erro-adicionar', error, boxResponse, form);\n } else {\n _this.addItemResult('erro-adicionar', error, boxResponse, form);\n }\n }\n\n btnComprar.classList.remove('-adding');\n }\n },\n deleteItem: async function (itemId, item, removeItemResult) {\n const _this = this;\n\n if (!item.classList.contains('-removing')) {\n item.classList.add('-removing');\n\n try {\n const response = await fetch('/carrinho', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n _method: 'delete',\n item_id: itemId,\n }),\n });\n\n console.log('success');\n\n if (window.innerWidth > 768) {\n if (_this.openCartDrawer) {\n CartDrawer.updateCartCount();\n }\n } else {\n if (_this.openCartDrawerMobile) {\n CartDrawer.updateCartCount();\n }\n }\n\n if (typeof removeItemResult == 'function') {\n removeItemResult(item);\n }\n } catch (error) {\n console.log('Erro ao remover item do carrinho');\n console.log(error);\n }\n\n item.classList.remove('-removing');\n }\n },\n validateFormProduct: function (form) {\n // VALIDA O FORM DE PRODUTO PARA VER SE O PRODUTO PODE SER ADICIONADO\n var btnComprar = form.querySelector('[data-action=\"add-cart\"]');\n var validated = true;\n var errors = [];\n\n if (btnComprar.dataset.available == 'false') {\n validated = false;\n errors.push('');\n } else {\n // verifica se o sku foi selecionado\n if (form.querySelector('[name=\"sku\"]').value == '') {\n validated = false;\n errors.push('Selecione um atributo para o produto');\n }\n\n // verifica se a quantidade é válida\n if (form.querySelector('input[name=\"quantity\"]').value <= 0) {\n validated = false;\n errors.push('Quantidade indisponível');\n }\n }\n\n return { validated, errors };\n },\n setRespValidateProduct: function (resp, form, boxResponse) {\n let htmlErrors = '';\n\n if (resp.validated) {\n boxResponse.innerHTML = '';\n } else {\n for (var i = resp.errors.length - 1; i >= 0; i--) {\n htmlErrors += '' + resp.errors[i] + '';\n }\n boxResponse.innerHTML = htmlErrors;\n }\n },\n addItemResult: function (typeResult, result, boxResponse, form) {\n const _this = this;\n\n if (typeResult == 'produto-adicionado') {\n const btnComprar = form.querySelector('[data-action=\"add-cart\"]');\n\n if (btnComprar) btnComprar.classList.add('success');\n\n setTimeout(function () {\n if (btnComprar) btnComprar.classList.remove('success');\n if (btnComprar) btnComprar.innerHTML = btnComprar.dataset.textAvailable;\n }, 3500);\n\n CartDrawer.updateCartCount();\n\n if (window.innerWidth > 768) {\n if (_this.openCartDrawer) {\n CartDrawer.show();\n } else {\n setTimeout(() => {\n window.location.href = urlCart;\n }, 150);\n }\n } else {\n if (_this.openCartDrawerMobile) {\n CartDrawer.show();\n } else {\n setTimeout(() => {\n window.location.href = urlCart;\n }, 150);\n }\n }\n\n // Verifica se há popup de compra rápida ativo. Se tiver, fecha ele, retirar ou comentar se não for utilizado\n const popupPurchase = document.querySelector('[data-popup-purchase]');\n if (popupPurchase != null) {\n if (popupPurchase.classList.contains('-active')) {\n popupPurchase.querySelector('[data-close-popup-purchase]').click();\n }\n }\n } else if (typeResult == 'erro-adicionar') {\n if (typeof boxResponse != 'undefined' && boxResponse.length > 0) {\n window.scrollTo({\n top: boxResponse.offsetTop,\n behavior: 'smooth',\n });\n\n boxResponse.classList.add('error');\n boxResponse.classList.remove('success');\n boxResponse.querySelector('span').innerHTML =\n 'Ocorreu um erro, tente novamente.';\n }\n }\n },\n};\n\nexport default Store;\n","// \"productVariants\" é inicializado em layout.liquid, e todos os arquivos liquid que montam\n// product_block populam este objeto com as variantes dos produtos em tela\nimport Store from './store';\nimport { formatMoney } from '../components/utilities';\n\nconst ProductPurchase = {\n productVariants,\n products: document.querySelectorAll('[data-product-purchase]'),\n\n // Verifica as combinações possíveis entre os atributos, com base no atributo que foi clicado\n checkCombinations: function (currentProduct, selectedAttribute) {\n const productId = currentProduct.getAttribute('data-product-id');\n const selectedAttr = Number(selectedAttribute.getAttribute('data-attribute-index'));\n const variants = ProductPurchase.productVariants[`${productId}`];\n\n // Busca todos os atributos do produto\n const attributes = {\n attr1: [...currentProduct.querySelectorAll('[data-attribute-index=\"1\"]')],\n attr2: [...currentProduct.querySelectorAll('[data-attribute-index=\"2\"]')],\n attr3: [...currentProduct.querySelectorAll('[data-attribute-index=\"3\"]')],\n };\n\n // Busca os atuais atributos selecionados\n const selectedAttributes = {\n attr1: currentProduct.querySelector('[data-attribute=\"1\"] input:checked + label'),\n attr2: currentProduct.querySelector('[data-attribute=\"2\"] input:checked + label'),\n attr3: currentProduct.querySelector('[data-attribute=\"3\"] input:checked + label'),\n };\n\n // Altera o selected para o atributo que foi clicado\n selectedAttributes[`attr${selectedAttr}`] = selectedAttribute;\n\n // Atualiza as classes dos atributos disponíveis/indisponíveis\n // Ao clicar em uma opção de attr1, atualiza os attrs 2 e 3\n switch (selectedAttr) {\n case 1:\n ProductPurchase.markAttributes([...attributes.attr2], 2, variants, selectedAttributes, currentProduct);\n ProductPurchase.markAttributes([...attributes.attr3], 3, variants, selectedAttributes, currentProduct);\n break;\n\n case 2:\n ProductPurchase.markAttributes([...attributes.attr3], 3, variants, selectedAttributes, currentProduct);\n break;\n\n case 3:\n break;\n }\n },\n\n // Marca os atributos como disponiveis/indisponiveis com base nas combinações do checkCombinations\n markAttributes: function (attributes, index, variants, selectedAttributes, currentProduct) {\n if (attributes != null && attributes.length > 0) {\n // Remove os atributos já selecionados que não devem ser analizados,\n // com base no index do atributo que está sendo analizado. Usado para filtrar\n // as variantes e diminuir o número de possíveis combinações que definem como disponível/indisponível\n switch (index) {\n case 1:\n selectedAttributes.attr2 = null;\n selectedAttributes.attr3 = null;\n break;\n\n case 2:\n selectedAttributes.attr3 = null;\n break;\n\n case 3:\n break;\n }\n\n attributes.forEach((attr) => {\n const value = attr.getAttribute('data-attribute-value');\n const property = `property${index}`;\n let available = false;\n\n // Adiciona o atributo iterado nos atributos usados para buscar variantes válidas\n const attrsToCheck = {\n ...selectedAttributes,\n [`attr${index}`]: attr,\n };\n\n // Filtra as variantes para somente as que possuem a combinação de atributos válida\n const validVariants = variants.filter((variant) => {\n const properties = variant.properties;\n let validAttr1 = false;\n let validAttr2 = false;\n let validAttr3 = false;\n\n if (attrsToCheck.attr1 == null) validAttr1 = true;\n if (attrsToCheck.attr2 == null) validAttr2 = true;\n if (attrsToCheck.attr3 == null) validAttr3 = true;\n\n if (properties.property1 == null) validAttr1 = true;\n if (properties.property2 == null) validAttr2 = true;\n if (properties.property3 == null) validAttr3 = true;\n\n if (validAttr1 == false) {\n const valueToCheck = attrsToCheck.attr1.getAttribute('data-attribute-value');\n if (properties.property1.value == valueToCheck) validAttr1 = true;\n }\n\n if (validAttr2 == false) {\n const valueToCheck = attrsToCheck.attr2.getAttribute('data-attribute-value');\n if (properties.property2.value == valueToCheck) validAttr2 = true;\n }\n\n if (validAttr3 == false) {\n const valueToCheck = attrsToCheck.attr3.getAttribute('data-attribute-value');\n if (properties.property3.value == valueToCheck) validAttr3 = true;\n }\n\n if (validAttr1 && validAttr2 && validAttr3) return variant;\n });\n\n attr.classList.remove('-available');\n attr.classList.remove('-unavailable');\n attr.classList.remove('-disabled');\n\n if (validVariants.length > 0) {\n // Encontrou variantes, marca como disponível/indisponível com base nas variantes\n validVariants.forEach((variant) => {\n if (variant.properties[property]) {\n if (variant.properties[property].value == value) {\n variant.available == false ? (available = false) : (available = true);\n }\n } else {\n available = false;\n }\n });\n\n available ? attr.classList.add('-available') : attr.classList.add('-unavailable');\n } else if (validVariants.length === 0) {\n // Não encontrou nenhuma variante, então desabilita a opção.\n // Se esta opção estava selecionada, clica na primeira opção disponível entre os demais\n attr.classList.add('-disabled');\n const value = attr.getAttribute('data-attribute-value');\n const input = currentProduct.querySelector(`[data-attribute=\"${index}\"] input[value=\"${value}\"]`);\n if (input.checked) {\n input.checked = false;\n setTimeout(() => {\n const firstAvailable = currentProduct.querySelector(\n `label[data-attribute-index=\"${index}\"]:not(.-disabled)`\n );\n if (firstAvailable) firstAvailable.click();\n }, 50);\n }\n }\n });\n }\n },\n\n // Procura por SKU válido dentre os atributos escolhidos\n checkSelection: function (currentProduct) {\n const productId = currentProduct.getAttribute('data-product-id');\n const variants = ProductPurchase.productVariants[`${productId}`];\n\n const selectedAttrs = {\n attr1: currentProduct.querySelector('[data-attribute=\"1\"] input:checked'),\n attr2: currentProduct.querySelector('[data-attribute=\"2\"] input:checked'),\n attr3: currentProduct.querySelector('[data-attribute=\"3\"] input:checked'),\n };\n\n let available = false;\n\n for (let index = 0; index < variants.length; index++) {\n const variant = variants[index];\n let attr1 = false;\n let attr2 = false;\n let attr3 = false;\n let attr1Value = null;\n let attr2Value = null;\n let attr3Value = null;\n\n // Verifica se algum dos atributos é inexistente no cadastro\n if (variant.properties.property1 == null) attr1 = true;\n if (variant.properties.property2 == null) attr2 = true;\n if (variant.properties.property3 == null) attr3 = true;\n\n //Salva o valor de cada um dos atributos/propriedes da própria variante em questão\n if (variant.properties.property1) attr1Value = variant.properties.property1.value;\n if (variant.properties.property2) attr2Value = variant.properties.property2.value;\n if (variant.properties.property3) attr3Value = variant.properties.property3.value;\n\n // Verifica se a variante possui os atributos selecionados\n if (!attr1 && attr1Value != null && selectedAttrs.attr1 != null) {\n if (attr1Value == selectedAttrs.attr1.value) attr1 = true;\n }\n\n if (!attr2 && attr2Value != null && selectedAttrs.attr2 != null) {\n if (attr2Value == selectedAttrs.attr2.value) attr2 = true;\n }\n\n if (!attr3 && attr3Value != null && selectedAttrs.attr3 != null) {\n if (attr3Value == selectedAttrs.attr3.value) attr3 = true;\n }\n\n // Se achou variante compatível com os atributos selecionados, atualiza\n if (attr1 && attr2 && attr3) {\n available = true;\n const event = new CustomEvent('vnda:sku-change', { detail: { sku: variant.sku }})\n const productContainer = currentProduct.closest('[data-product-box]');\n\n currentProduct.querySelector('[name=\"sku\"]').value = variant.sku;\n currentProduct.dispatchEvent(event);\n if (productContainer) productContainer.dispatchEvent(event);\n\n // Reinicializa o input de quantidade para 1\n currentProduct.querySelector('[name=\"quantity\"]').value = 1;\n\n // Remove a mensagem de quantidade máxima quando altera a variante\n if (currentProduct.querySelector('.msg-response .msg-error').classList.contains('-visible')) {\n currentProduct.querySelector('.msg-response .msg-error').innerHTML = '';\n currentProduct.querySelector('.msg-response .msg-error').classList.remove('-visible');\n }\n\n // Configura a quantidade máxima do input conforme a variante selecionada\n currentProduct.querySelector('[name=\"quantity\"]').setAttribute('data-available-quantity', variant.quantity);\n // Configura produto disponível/indisponível\n if (variant.available) {\n ProductPurchase.setAvailable(currentProduct);\n } else {\n ProductPurchase.setUnavailable(currentProduct, true, variant.sku);\n }\n\n // Atualiza as últimas quantidades disponíveis\n ProductPurchase.setLastUnits(currentProduct, variant);\n\n // Atualiza o preço do componente\n ProductPurchase.updatePrice(currentProduct, variant);\n break;\n }\n }\n\n // Quando não encontra variante\n if (!available) ProductPurchase.setUnavailable(currentProduct, false);\n },\n\n // Define produto como disponível pra compra\n setAvailable: function (currentProduct) {\n const addButton = currentProduct.querySelector('[data-action=\"add-cart\"]');\n const currentProductWrapper = currentProduct.closest('[data-product-box]');\n let formNotify = null;\n\n if (currentProductWrapper) {\n formNotify = currentProductWrapper.querySelector('[data-form-notify]');\n }\n\n if (addButton) {\n // addButton.setAttribute('data-available', true);\n addButton.classList.add('-available');\n addButton.classList.remove('-unavailable');\n addButton.innerHTML = addButton.getAttribute('data-text-available');\n }\n\n if (formNotify) formNotify.classList.remove('-active');\n },\n\n // Define produto como indisponível pra compra\n setUnavailable: function (currentProduct, showNotify, sku) {\n const addButton = currentProduct.querySelector('[data-action=\"add-cart\"]');\n const currentProductWrapper = currentProduct.closest('[data-product-box]');\n const showFormNotify = showNotify || false;\n let formNotify = null;\n\n if (currentProductWrapper) {\n formNotify = currentProductWrapper.querySelector('[data-form-notify]');\n }\n\n if (addButton) {\n // addButton.setAttribute('data-available', false);\n addButton.classList.remove('-available');\n addButton.classList.add('-unavailable');\n addButton.innerHTML = addButton.getAttribute('data-text-unavailable');\n }\n\n if (formNotify) {\n if (showFormNotify && sku != undefined && sku != null) {\n formNotify.classList.add('-active');\n formNotify.querySelector('[name=\"sku\"]').value = sku;\n } else {\n formNotify.classList.remove('-active');\n }\n }\n },\n\n // Atualiza o componente de preço do produto\n updatePrice: function (currentProduct, variant) {\n const productMainContainer = currentProduct.closest('[data-product-box]');\n let productID = currentProduct.getAttribute('data-product-id');\n // console.log('updateprice', currentProduct, productID)\n if (productMainContainer == null) return;\n\n const priceEl = productMainContainer.querySelector('[data-init-price]');\n\n if (priceEl == null) return;\n\n const groupShop = productMainContainer.getAttribute('data-prod-group-shop');\n // console.log(variant)\n priceEl.setAttribute('data-sku', variant.sku);\n priceEl.setAttribute('data-price', variant.price);\n priceEl.dispatchEvent(new Event('change'));\n\n const discount = priceEl.dataset.discountPercent;\n window.price[productID] = variant.price\n // Coloca a porcentagem de desconto no produto\n if (discount != '0') {\n priceEl.style.setProperty('--discount', `'-${discount}%'`);\n }\n\n // atualiza preço final do compre junto se existir\n if (groupShop != null) {\n productMainContainer.setAttribute('data-price', variant.price);\n productMainContainer.setAttribute('data-sale-price', variant.sale_price);\n productMainContainer.setAttribute('data-available', variant.available);\n productMainContainer.dispatchEvent(new Event('vnda:group-shop-price-update'));\n }\n },\n\n // Marca o primeiro atributo como disponível/indisponível, e seleciona os atributos\n // da primeira variante disponível\n markFirstVariant: function (currentProduct) {\n const productId = currentProduct.getAttribute('data-product-id');\n const variants = [...ProductPurchase.productVariants[`${productId}`]];\n\n if (variants.length === 1) {\n // possui somente uma variante e não possui atributos,\n // define como disponível/indisponível com base na variante em si\n if (currentProduct.querySelectorAll('.prod-option').length === 0) {\n return variants[0].available\n ? ProductPurchase.setAvailable(currentProduct)\n : ProductPurchase.setUnavailable(currentProduct, true, variants[0].sku);\n }\n } else if (variants.length === 0) {\n // Produto não possui variantes, define como indisponível\n return ProductPurchase.setUnavailable(currentProduct);\n }\n\n if (variants.length > 0) {\n const allAttr1 = [...currentProduct.querySelectorAll('[data-attribute=\"1\"] [data-attribute-value]')];\n const allAttr2 = [...currentProduct.querySelectorAll('[data-attribute=\"2\"] [data-attribute-value]')];\n const allAttr3 = [...currentProduct.querySelectorAll('[data-attribute=\"3\"] [data-attribute-value]')];\n\n // Prepara para caso o atributo 1 não esteja em uso, scout por outros\n let attrToCheck = { index: false, options: [] };\n\n if (allAttr3.length > 0) attrToCheck = { index: 'property3', options: allAttr3 };\n if (allAttr2.length > 0) attrToCheck = { index: 'property2', options: allAttr2 };\n if (allAttr1.length > 0) attrToCheck = { index: 'property1', options: allAttr1 };\n\n // Baseado na ordem dos atributos, busca por variantes válidas\n if (attrToCheck.options.length > 0) {\n for (let index = 0; index < attrToCheck.options.length; index++) {\n const attribute = attrToCheck.options[index];\n const value = attribute.getAttribute('data-attribute-value');\n const availableVariants = ProductPurchase.productVariants[`${productId}`].filter((variant) => {\n if (variant.properties[attrToCheck.index].value == value && variant.available) return variant;\n });\n\n if (availableVariants.length > 0) {\n attribute.classList.add('-available');\n } else {\n // O produto não tem variantes disponíveis\n attribute.classList.add('-unavailable');\n }\n }\n\n // Marca os atributos da primeira variante disponível,\n //com base na ordem que os atributos se apresentam na tela\n let hasFirstAvailable = false;\n\n for (const attribute of attrToCheck.options) {\n if (attribute.classList.contains('-available')) {\n attribute.click();\n hasFirstAvailable = true;\n\n if (attrToCheck.index == 'property1') {\n for (const attr2 of allAttr2) {\n if (attr2.classList.contains('-available')) {\n attr2.click();\n break;\n }\n }\n\n for (const attr3 of allAttr3) {\n if (attr3.classList.contains('-available')) {\n attr3.click();\n break;\n }\n }\n }\n\n if (attrToCheck.index == 'property2') {\n for (const attr3 of allAttr3) {\n if (attr3.classList.contains('-available')) {\n attr3.click();\n break;\n }\n }\n }\n\n break;\n }\n }\n\n // Quando não há nenhuma first variant com estoque, marca a primeira\n //opção indisponível, para exibir como indisponível\n if (!hasFirstAvailable) {\n attrToCheck.options[0].click();\n if (attrToCheck.index == 'property1') {\n if (allAttr2.length > 0) allAttr2[0].click();\n if (allAttr3.length > 0) allAttr3[0].click();\n }\n\n if (attrToCheck.index == 'property2') {\n if (allAttr3.length > 0) allAttr3[0].click();\n }\n }\n }\n }\n },\n\n // Configura a mesagem de ultimas unidades disponíveis\n setLastUnits: function (currentProduct, variant) {\n var lastUnitsWrapper = currentProduct.querySelector('.last-units');\n var availableQuantity = variant.quantity;\n\n if (availableQuantity <= 5) {\n if (!availableQuantity) {\n lastUnitsWrapper.innerHTML = '';\n lastUnitsWrapper.classList.remove('-visible');\n } else if (availableQuantity > 1) {\n lastUnitsWrapper.innerHTML = `Últimas ${availableQuantity} unidades disponíveis`;\n lastUnitsWrapper.classList.add('-visible');\n } else {\n lastUnitsWrapper.innerHTML = 'Última unidade disponível';\n lastUnitsWrapper.classList.add('-visible');\n }\n } else {\n lastUnitsWrapper.innerHTML = '';\n lastUnitsWrapper.classList.remove('-visible');\n }\n },\n\n // Configura o seletor de quantidade e suas mensagens\n setQuantitySelector: function (currentProduct) {\n const error = currentProduct.querySelector('.msg-response .msg-error');\n const buttonPlus = currentProduct.querySelector('[data-qtd-plus]');\n const buttonMinus = currentProduct.querySelector('[data-qtd-minus]');\n const input = currentProduct.querySelector('[name=\"quantity\"]');\n const label = currentProduct.querySelector('.quantity .label');\n const labelText = label.dataset.label;\n\n if (buttonPlus != null && buttonMinus != null) {\n buttonPlus.addEventListener('click', () => {\n const current = Number(input.value) + 1;\n const availableQuantity = Number(input.dataset.availableQuantity);\n\n if (!availableQuantity) {\n error.innerHTML = 'Produto em falta no estoque';\n error.classList.add('-visible');\n } else if (current > availableQuantity) {\n // Se o produto atingiu a quantidade máxima em estoque mostra uma mensagem\n error.innerHTML = 'Quantidade máxima em estoque.';\n error.classList.add('-visible');\n } else {\n input.value = current;\n input.setAttribute('value', current);\n if (current > 1) label.innerHTML = labelText + 's'\n else label.innerHTML = labelText\n\n ProductPurchase.setUpdatePriceQuantity(currentProduct, current);\n }\n\n });\n\n buttonMinus.addEventListener('click', () => {\n const current = Number(input.value) - 1;\n\n if (current > 0) {\n input.value = current;\n input.setAttribute('value', current);\n\n if (current > 1) label.innerHTML = labelText + 's'\n else label.innerHTML = labelText\n \n ProductPurchase.setUpdatePriceQuantity(currentProduct, current);\n\n // Se está mostrando a mensagem de quantidade máxima, remove ela\n if (error.classList.contains('-visible')) {\n error.classList.remove('-visible');\n }\n }\n });\n }\n },\n\n setUpdatePriceQuantity: function (currentProduct, quantity){\n // console.log(currentProduct, $(currentProduct).closest('[data-product-box]'))\n const priceEl = $(currentProduct).closest('[data-product-box]').find('[data-price]').first();\n let productID = currentProduct.getAttribute('data-product-id');\n const priceValue = window.price[productID];\n const discountPercent = $(priceEl).data('discount-percent');\n\n $(priceEl).find('.cmp-price-price').html(formatMoney(priceValue*quantity));\n\n if (discountPercent){\n $(priceEl).find('.cmp-price-original-price .price').html(formatMoney(priceValue*quantity));\n $(priceEl).find('.cmp-price-sale-price .price').html(formatMoney((priceValue*(1-discountPercent/100))*quantity));\n }\n },\n\n // Envia o formulário de compra\n submitForm: function (currentProduct) {\n currentProduct.addEventListener('submit', (event) => {\n event.preventDefault();\n\n const groupShop = currentProduct.closest('[data-product-box]').getAttribute('data-prod-group-shop');\n\n if (groupShop == null) {\n // Adição normal de produto - Compre Junto é controlado em outro componente\n const form = currentProduct;\n const parent = form.closest('[data-product-box]');\n\n const respValidated = Store.validateFormProduct(form);\n const boxResponse = parent.querySelector('.msg-response');\n\n if (respValidated.validated) {\n Store.addItem(form, parent);\n } else {\n //console.info('não foi');\n Store.setRespValidateProduct(respValidated, form, boxResponse);\n }\n }\n });\n },\n\n // Lida com popup de compra rápida, retirar ou comentar caso não for utilizado\n popupPurchase: {\n popupEl: document.querySelector('[data-popup-purchase]'),\n currentOpenProduct: false,\n\n open: function (productBox) {\n // Salva o produto atual para referência futura\n ProductPurchase.popupPurchase.currentOpenProduct = productBox;\n\n // Clona elementos do produto e referencia o form de compra dele\n const clonedImages = productBox.querySelector('.images').cloneNode(true);\n const clonedName = productBox.querySelector('.name').cloneNode(true);\n const clonedPrice = productBox.querySelector('.price').cloneNode();\n const purchaseForm = productBox.querySelector('[data-product-purchase]');\n\n // Joga os elementos do produto dentro do popup\n const contentBox = this.popupEl.querySelector('.product');\n const leftBox = document.createElement('div');\n const rightBox = document.createElement('div');\n let priceWrapper = document.createElement('div');\n priceWrapper.classList.add('price-wrapper');\n priceWrapper.appendChild(clonedPrice);\n\n leftBox.appendChild(clonedImages);\n leftBox.appendChild(priceWrapper);\n rightBox.appendChild(clonedName);\n rightBox.appendChild(purchaseForm);\n\n contentBox.appendChild(leftBox);\n contentBox.appendChild(rightBox);\n\n // Atualiza o componente de preço dentro do popup e exibe\n clonedPrice.setAttribute('data-was-processed', false);\n window.Vnda.Component.Price.update();\n\n this.popupEl.classList.add('-active');\n },\n\n close: function () {\n // CHAMAR UMA ÚNICA VEZ\n // Instancia funcionamento ao clicar no botão de fechar o popup\n const popup = this.popupEl;\n const closeButtons = popup.querySelectorAll('[data-close-popup-purchase]');\n\n closeButtons.forEach((button) => {\n if (button.getAttribute('data-processed') == 'false') {\n button.addEventListener('click', () => {\n popup.classList.remove('-active');\n\n setTimeout(() => {\n // Retorna o formulário para o produto correspondente\n const purchaseForm = popup.querySelector('[data-product-purchase]');\n ProductPurchase.popupPurchase.currentOpenProduct.appendChild(purchaseForm);\n ProductPurchase.popupPurchase.currentOpenProduct = false;\n\n // Limpa os dados do produto do popup\n const popupProductEl = popup.querySelector('.product');\n while (popupProductEl.firstChild) {\n popupProductEl.removeChild(popupProductEl.firstChild);\n }\n }, 300);\n });\n button.setAttribute('data-processed', true);\n }\n });\n },\n },\n\n init: function (update) {\n const triggerUpdate = update || false;\n if (triggerUpdate) {\n this.products = document.querySelectorAll('[data-product-purchase]');\n this.productVariants = productVariants;\n }\n\n const { products, checkCombinations, checkSelection, markFirstVariant, submitForm, setQuantitySelector } = this;\n\n // Instancia funcionamento de fechar o popup de compra rápida, retirar ou comentar caso não for utilizado\n ProductPurchase.popupPurchase.close();\n\n if (products.length > 0)\n products.forEach((product) => {\n if (product.getAttribute('data-processed') == 'false') {\n const attrOptions = product.querySelectorAll('[data-attribute-value]');\n const attrInputs = product.querySelectorAll('input');\n\n // Remarca demais atributos ao clicar em uma opção\n attrOptions.forEach((attr) => {\n attr.addEventListener('click', () => {\n checkCombinations(product, attr);\n });\n });\n\n // Verifica variante para combinação de atributos selecionados\n attrInputs.forEach((input) => {\n input.addEventListener('change', () => {\n checkSelection(product);\n });\n });\n\n setQuantitySelector(product);\n markFirstVariant(product);\n submitForm(product);\n product.setAttribute('data-processed', true);\n\n // Abre o popup de compra rápida, retirar ou comentar caso não for utilizado\n const openPopupPurchaseButton = product.parentElement.querySelector('[data-open-popup-purchase]');\n if (openPopupPurchaseButton != null) {\n openPopupPurchaseButton.addEventListener('click', () => {\n ProductPurchase.popupPurchase.open(product.parentElement);\n });\n }\n }\n });\n },\n};\n\nexport default ProductPurchase;\n","import { addAsset } from \"./utilities\";\n\n// ===============================================================\n// NEWSLETTER POPUP\n// ===============================================================\nexport const NewsletterComponent = {\n root: document.querySelector('#component-popup-newsletter-root'),\n settings: window.popupNewsletterSettings || false,\n loaded: false,\n\n setPopupNewsletter: function() {\n\n const { settings, root } = NewsletterComponent\n\n // Define propriedades do componente\n let maxWidth = settings.maxWidth;\n let imageUrl = settings.imageUrl;\n let title = settings.title;\n let description = settings.description;\n let subdomain = settings.subdomain;\n let successMessage = settings.success;\n\n // Inicia o componente\n const componentNewsletterPopup = new Vnda.Component.NewsletterPopup({\n maxWidth: maxWidth,\n maxHeight: 500,\n imageUrl: imageUrl,\n imagePosition: 'left',\n popupPosition: 'center',\n title: title,\n description: description,\n textBtnSubmit: 'Enviar',\n classBtnSubmit: 'btn-newsletter',\n formKey: `${subdomain}-newsletter`,\n hasNameField: false,\n hasLastNameField: false,\n hasDateOfBirthField: false,\n hasPhoneField: false,\n successMessage: successMessage,\n delay: 500,\n frequency: '7',\n language: 'pt-BR',\n });\n\n // Renderiza o componente e marca como carregado\n componentNewsletterPopup.render(root);\n NewsletterComponent.loaded = true\n },\n\n loadPopupNewsletter: function() {\n if (!NewsletterComponent.loaded) {\n const { settings } = NewsletterComponent;\n addAsset(settings.script, NewsletterComponent.setPopupNewsletter)\n addAsset(settings.styles)\n }\n },\n\n init: function() {\n const { root, settings } = this;\n\n if (!root || !settings) return;\n\n const eventType = (window.innerWidth <= 1024) ? 'scroll' : 'mousemove'\n window.addEventListener(eventType, () => {\n NewsletterComponent.loadPopupNewsletter()\n }, { once: true })\n }\n}\n// ===============================================================\n// FILTROS\n// ===============================================================\nexport const FilterComponent = {\n root: document.querySelector('#component-products-filter-root'),\n mobileButton: document.querySelector('#open-filter-mobile'),\n settings: window.filterSettings || false,\n showPriceSlider: false,\n instance: false,\n\n setTagTypes: function() {\n const { settings } = FilterComponent;\n const tags = [];\n\n if (settings.aggregations) {\n const aggregations = settings.aggregations\n\n // Filtro de categoria\n if (aggregations.types.categoria) tags.push({\n title: 'Categoria',\n type: 'categoria',\n style: 'list',\n options: aggregations.types.categoria\n })\n }\n\n return tags\n },\n\n setPropeties: function() {\n const { settings } = FilterComponent;\n const properties = [];\n\n if (settings.aggregations) {\n const aggregations = settings.aggregations\n\n // Filtros Atributo 1\n if (aggregations.properties.property1.length > 0) properties.push({\n title: 'Cor',\n property: 'property1',\n style: 'colors',\n colorsProps: {\n showTitle: true,\n showColor: true,\n },\n options: aggregations.properties.property1,\n })\n\n // Filtros Atributo 2\n if (aggregations.properties.property2.length > 0) properties.push({\n title: 'Tamanho',\n property: 'property2',\n style: 'grid',\n options: aggregations.properties.property2,\n });\n\n // Filtros Atributo 3\n if (aggregations.properties.property3.length > 0) properties.push({\n title: 'Tecido',\n property: 'property3',\n style: 'list',\n options: aggregations.properties.property3,\n });\n\n }\n\n return properties\n },\n\n setPricesRanges: function() {\n const { settings, showPriceSlider } = FilterComponent\n let priceSettings = {\n price: false,\n priceProps: false\n }\n\n // Exibe o slider de preço. Caso tenha faixas de preço,\n // preferência fica para as faixas (abaixo)\n if (showPriceSlider) {\n priceSettings.price = [\n settings.aggregations.min_price,\n settings.aggregations.max_price\n ]\n }\n\n // Exibe as opções de faixa de preço\n if (settings.prices_range.length > 0) {\n priceSettings.priceProps = {\n mode: 'options',\n options: settings.prices_range\n }\n priceSettings.price = [\n settings.aggregations.min_price,\n settings.aggregations.max_price\n ]\n }\n\n return priceSettings\n },\n\n setFilters: function() {\n const { root } = FilterComponent;\n const tags = FilterComponent.setTagTypes()\n const properties = FilterComponent.setPropeties()\n const priceSettings = FilterComponent.setPricesRanges()\n const mode = (window.innerWidth <= 1024) ? 'horizontal' : 'vertical'\n\n const componentFilters = new Vnda.Component.ProductsFilter({\n mode,\n hasSort: true,\n filterOnClick: false,\n resetMode: 'all',\n tags,\n properties,\n price: priceSettings.price,\n priceProps: priceSettings.priceProps\n });\n\n // Renderiza o componente\n componentFilters.render(root);\n FilterComponent.instance = componentFilters\n root.dispatchEvent(new Event('vnda:filter-component-loaded'))\n },\n\n loadFilters: function() {\n const { settings } = FilterComponent;\n if (!settings) return;\n addAsset(settings.script, FilterComponent.setFilters)\n addAsset(settings.styles)\n },\n\n show: function() {\n const { root } = FilterComponent;\n\n if (!FilterComponent.instance) {\n FilterComponent.loadFilters()\n root.addEventListener('vnda:filter-component-loaded', () => {\n FilterComponent.instance.toggle()\n })\n } else {\n FilterComponent.instance.toggle()\n }\n },\n\n init: function() {\n\n const { root, mobileButton } = FilterComponent\n\n if (!root) return\n\n // mobile: monta ao clicar no botão\n // desktop: monta ao carregar a página\n if (window.innerWidth <= 1024) {\n if (mobileButton) mobileButton.addEventListener('click', () => {\n FilterComponent.show()\n })\n\n } else {\n FilterComponent.loadFilters()\n }\n }\n}\n\n// ===============================================================\n// LOGIN\n// ===============================================================\nexport function setLogin() {\n // Seleciona o elemento\n const root = document.querySelector('#component-login-static-root');\n\n // Define link para o Facebook\n let facebook_connect_url = root.getAttribute('data-facebook');\n\n // Inicia o componente\n window.componentLogin = {};\n window.componentLogin['static'] = new Vnda.Component.Login({\n mode: 'static',\n formProps: {\n login: {\n buttons: {\n facebook: {\n link: facebook_connect_url,\n },\n },\n hasFacebook: false,\n },\n register: {\n buttons: {\n facebook: {\n link: facebook_connect_url,\n },\n },\n hasFacebook: false,\n },\n },\n });\n\n // Renderiza o componente\n componentLogin['static'].render(root);\n}\n\n// ===============================================================\n// PREÇO\n// ===============================================================\n// Carrega o componente de preço quando um product-block ou product-infos entra em tela\nexport const PriceComponent = {\n script: window.priceComponent || false,\n loaded: false,\n\n init: function() {\n\n if (!PriceComponent.script) return;\n\n const productContainers = document.querySelectorAll('[data-product-box]');\n\n if (productContainers.length === 0) return;\n\n const observer = new IntersectionObserver(entries => {\n if (entries[0].isIntersecting) {\n if (!PriceComponent.loaded) {\n addAsset(PriceComponent.script)\n PriceComponent.loaded = true\n } \n observer.disconnect()\n }\n }, { threshold: 0.1 });\n\n productContainers.forEach(product => {\n observer.observe(product)\n })\n }\n\n}\n\n// ===============================================================\n// POPUP MAILCHIMP\n// ===============================================================\nexport const PopupMailChimp = {\n popup: document.querySelector('[data-popup]'),\n popup_close: document.querySelectorAll('[data-popup-close]'),\n\n formSubmit: function (popup) {\n const form = document.querySelector('[data-form-mailchimp]');\n if (form) form.addEventListener('submit', (e) => {\n e.preventDefault();\n\n \n $.ajax({\n type: \"POST\",\n url: \"https://mc.us14.list-manage.com/subscribe/post-json?u=7326bcee062f27e993f2e82b8&id=40a4cb2904&c=?\",\n data: $(form).serialize(),\n cache: false,\n dataType: 'json',\n contentType: \"application/json; charset=utf-8\",\n beforeSend: function () { form.classList.add('-sending') },\n error: (error) => {\n console.log('error', error);\n form.querySelector('[data-msg-retorno] [data-msg-success]').classList.remove('visible');\n form.querySelector('[data-msg-retorno] [data-msg-error]').classList.add('visible');\n form.classList.remove('-sending');\n },\n success: (success) => {\n console.log('success', success);\n form.querySelector('[data-msg-retorno] [data-msg-error]').classList.remove('visible');\n form.querySelector('[data-msg-retorno] [data-msg-success]').classList.add('visible');\n setTimeout(() => {\n popup.classList.remove('-active');\n localStorage.setItem('popup-closed', true);\n }, 3000);\n }\n })\n \n });\n },\n init: function () {\n const { popup, popup_close, formSubmit } = this;\n\n if (popup && popup_close) {\n if (!localStorage.getItem('popup-closed') || window.location.href.includes('popup=true')) {\n formSubmit(popup);\n let scrollCount = 0\n // show popup\n document.addEventListener('scroll', () => {\n scrollCount += 1;\n if (scrollCount >= 100){\n if (!popup.hasAttribute('data-active')) {\n popup.classList.add('-active');\n popup.setAttribute('data-active', true);\n }\n }\n });\n \n // handle close\n if (popup_close.length > 0) popup_close.forEach(close => {\n close.addEventListener('click', () => { \n popup.classList.remove('-active');\n localStorage.setItem('popup-closed', true);\n });\n });\n }\n }\n }\n}\n\n// ===============================================================\n// LAZY INVITE WIDGET\n// ===============================================================\nexport function lazyInviteWidget() {\n const setInvite = () => {\n window.removeEventListener('mousemove', setInvite);\n window.removeEventListener('scroll', setInvite);\n\n // Adiciona estilos do componente\n let newLink = document.createElement('link');\n newLink.setAttribute('href', 'https://cdn.vnda.com.br/referrals/invite-widget.css?v=16.1');\n newLink.setAttribute('type', `text/css`);\n newLink.setAttribute('rel', `stylesheet`);\n document.body.appendChild(newLink);\n\n // Adiciona script do componente\n let newScript = document.createElement('script');\n newScript.setAttribute('src', 'https://cdn.vnda.com.br/referrals/invite-widget.js?v=16.1');\n document.body.appendChild(newScript);\n }\n window.addEventListener('mousemove', setInvite);\n window.addEventListener('scroll', setInvite);\n};\n","let isMobile = false;\n\nif(window.screen.width >= 1023){\n isMobile = false;\n} else {\n isMobile = true;\n}\n\nconst spotFunctions = {\n spotInputQuantity: function(){\n let spots = Array.from( document.querySelectorAll('.product-block') );\n\n if(spots.length){\n spots.forEach(spot => {\n let fakeInputField = spot.querySelector('.button-input .input-field');\n\n if(fakeInputField){\n let fakeInputPlusButton = spot.querySelector('.button-input .input-plus');\n let fakeInputMinusButton = spot.querySelector('.button-input .input-minus');\n\n fakeInputField.addEventListener('change', (event) => {\n let _this = event.target;\n let value = _this.value.match(/\\d+/g);\n \n value == 0 ? _this.value = 1 : _this.value = value;\n \n _this.value = value;\n \n let getVal = _this.value;\n\n _this.value = getVal;\n });\n\n fakeInputMinusButton.addEventListener('click', (event) => {\n event.preventDefault();\n \n let form = event.target.closest('.input-inner');\n let currentVal = parseInt( form.querySelector('.input-field').value );\n \n // If it isn't undefined or its greater than 0\n if ( !isNaN(currentVal) && currentVal > 1 ) {\n form.querySelector('.input-field').value = currentVal - 1;\n \n } else {\n form.querySelector('.input-field').value = 1;\n }\n \n form.querySelector('.input-field').dispatchEvent( new Event('change') );\n });\n \n fakeInputPlusButton.addEventListener('click', (event) => {\n event.preventDefault();\n \n let form = event.target.closest('.input-inner');\n let currentVal = parseInt( form.querySelector('.input-field').value );\n \n // If it isn't undefined or its greater than 0\n if ( !isNaN(currentVal) ) {\n form.querySelector('.input-field').value = currentVal + 1;\n \n } else {\n form.querySelector('.input-field').value = 1;\n }\n \n form.querySelector('.input-field').dispatchEvent( new Event('change') );\n });\n }\n });\n }\n },\n\n spotInputQuantityModal: function(){\n let spots = Array.from( document.querySelectorAll('.product-block') );\n\n if(spots.length){\n spots.forEach(spot => {\n let buttonBuy = spot.querySelector('.button-default');\n\n if(buttonBuy){\n buttonBuy.addEventListener('click', (event) => {\n let _this = event.currentTarget;\n let productId = spot.querySelector('.add-to-cart').getAttribute('data-product-id');\n let currentValue = spot.querySelector('.input-field').value;\n\n let stopInterval = setInterval(() => {\n let modal = document.querySelector('.popup-purchase');\n \n if(modal.classList.contains('-active')){\n modal.querySelector('.quantity-selector .input').value = 1;\n modal.querySelector('.quantity-selector .input').value = currentValue;\n\n clearInterval(stopInterval);\n }\n }, 500);\n })\n }\n });\n }\n },\n\n spotDiscountPrice: function(){\n const productVariants = window.productVariants;\n const productBlocks = document.querySelectorAll('[data-product-block-id]');\n \n productBlocks.length > 0 && productBlocks.forEach(prodBlock => {\n const prodId = prodBlock.getAttribute('data-product-block-id');\n const variants = productVariants[prodId].filter(variant => variant.available);\n\n let price = variants.length > 0 ? variants[0].sale_price : 0;\n let priceOffer = variants.length > 0 ? variants[0].price : 0;\n\n if(price != priceOffer){\n price = parseFloat(price);;\n priceOffer = parseFloat(priceOffer);\n let discountOffer = 100 - ( price / priceOffer ) * 100;\n\n let discountOfferNode = `
${Math.round(discountOffer)}% OFF
`;\n\n prodBlock.querySelector('.product-block-flags').insertAdjacentHTML('afterbegin', discountOfferNode);\n }\n\n })\n },\n\n init: function(){\n const _this = this;\n\n //_this.spotInputQuantity();\n //_this.spotInputQuantityModal();\n _this.spotDiscountPrice();\n },\n}\n\nexport default spotFunctions;\n","import CartDrawer from './common/cartDrawer';\nimport Footer from './common/footer';\nimport Header from './common/header';\n//import MenuMobile from './common/menuMobile';\nimport Popup from './components/popup';\nimport Webforms from './common/webforms';\nimport ProductPurchase from './components/productPurchase';\nimport {\n NewsletterComponent,\n PopupMailChimp,\n PriceComponent,\n lazyInviteWidget,\n} from './components/vndaComponents.js';\nimport { modalLoading } from './components/utilities';\nimport spotFunctions from './serie-design/serie-spots-functions';\n\nconsole.log('Deploy 25/02/2025');\n\nlet threshold = 200;\nif (window.innerWidth < 768) threshold = 100;\n\nwindow.lazyLoadOptions = {\n elements_selector: '.lazy',\n threshold,\n // callback_loaded: (el) => {\n // const element = el.closest('.MagicZoom');\n // if (element && element.id) {\n // MagicZoom && MagicZoom.refresh(element.id);\n // }\n // },\n};\n\nwindow.addEventListener(\n 'LazyLoad::Initialized',\n (event) => {\n window.lazyLoadInstance = event.detail.instance;\n },\n { passive: true }\n);\n\n// ==========================================\n// Inicialização\n// ==========================================\nconsole.log(\n '%cVnda - Tecnologia em Ecommerce',\n 'color: #f88d5b; font-size: 15px; font-family: \"Verdana\", sans-serif; font-weight: bold;'\n);\n\nwindow.addEventListener('DOMContentLoaded', () => {\n modalLoading();\n CartDrawer.init();\n Header.init();\n Footer.init();\n Popup.init();\n ProductPurchase.init();\n Webforms.init();\n NewsletterComponent.init();\n PriceComponent.init();\n PopupMailChimp.init();\n lazyInviteWidget();\n //if (window.innerWidth < 992) MenuMobile.init()\n\n spotFunctions.init();\n});\n"],"names":[],"sourceRoot":""}