@everymatrix/cashier-method-details 1.45.0 → 1.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/CashierConfirmModal-BsoB5fQM.cjs +4 -0
- package/components/{CashierConfirmModal-B-t1-wAt.js → CashierConfirmModal-Dw8BnUfp.js} +168 -168
- package/components/{CashierError-DaumM6Zr.js → CashierError-B_iMgTfr.js} +28 -27
- package/components/CashierError-ClzxZoH7.cjs +5 -0
- package/components/CashierHeader-BU_vM2lH.cjs +1 -0
- package/components/CashierHeader-VE5z702l.js +360 -0
- package/components/{CashierIframeRedirect-Bilctj-5.js → CashierIframeRedirect-CUdjcENK.js} +72 -73
- package/components/CashierIframeRedirect-DSYHz0IC.cjs +1 -0
- package/components/{CashierMethodDetails-CJU3RjOA.js → CashierMethodDetails-5wGvaaR0.js} +674 -675
- package/components/CashierMethodDetails-DPowLei9.cjs +18 -0
- package/components/CashierModal-BFlGJozz.js +221 -0
- package/components/CashierModal-DljNagOg.cjs +1 -0
- package/components/CashierNotifications-BhCyEcyg.js +136 -0
- package/components/CashierNotifications-FlAVIynI.cjs +1 -0
- package/components/{CashierReceiptPage-DT7FhfRz.js → CashierReceiptPage-CY8dJVSv.js} +242 -243
- package/components/CashierReceiptPage-gWSm3RqW.cjs +1 -0
- package/components/CashierSpinner-DREUPtXI.js +71 -0
- package/components/CashierSpinner-DUwdQyI3.cjs +1 -0
- package/es2015/cashier-method-details.cjs +1 -1
- package/es2015/cashier-method-details.js +1 -1
- package/package.json +2 -2
- package/components/CashierConfirmModal-O8Y6vOPF.cjs +0 -4
- package/components/CashierError-CnDiY61e.cjs +0 -5
- package/components/CashierHeader-4ARwc1sM.cjs +0 -1
- package/components/CashierHeader-CYcLko5g.js +0 -361
- package/components/CashierIframeRedirect-BOPLcueW.cjs +0 -1
- package/components/CashierMethodDetails-7O4DrJHq.cjs +0 -18
- package/components/CashierModal-CdNYc0Aj.js +0 -220
- package/components/CashierModal-DjXj2L6b.cjs +0 -1
- package/components/CashierNotifications-BVX2JvTh.cjs +0 -1
- package/components/CashierNotifications-DOgyzpyH.js +0 -136
- package/components/CashierReceiptPage-D9_BjYHP.cjs +0 -1
- package/components/CashierSpinner-BUe-mWNE.js +0 -71
- package/components/CashierSpinner-C7awkOxo.cjs +0 -1
| @@ -0,0 +1,221 @@ | |
| 1 | 
            +
            import { R as q, S as D, b as F, f as g, c as G, a as N, d as A, x as I, k as H, t as m, p, q as J, v as L, H as K, e as O, g as y, j as h, G as M, l as v, T as P, u as Q, m as V, o as X, U as k, B as Y, C as x } from "./CashierConfirmModal-Dw8BnUfp.js";
         | 
| 2 | 
            +
            function S(n, { delay: t = 0, duration: e = 400, easing: i = q } = {}) {
         | 
| 3 | 
            +
              const l = +getComputedStyle(n).opacity;
         | 
| 4 | 
            +
              return {
         | 
| 5 | 
            +
                delay: t,
         | 
| 6 | 
            +
                duration: e,
         | 
| 7 | 
            +
                easing: i,
         | 
| 8 | 
            +
                css: (o) => `opacity: ${o * l}`
         | 
| 9 | 
            +
              };
         | 
| 10 | 
            +
            }
         | 
| 11 | 
            +
            function Z(n) {
         | 
| 12 | 
            +
              A(n, "svelte-pil2bm", "*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.ModalWindow{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:4;top:0;left:0;background-color:var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));container-type:inline-size;container-name:modal-window;border-radius:6px}.ModalContainer{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);padding:var(--emw--spacing-large, 20px);width:400px}.ModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:10px;right:10px;padding:var(--emw--spacing-small-minus, 10px);border-radius:50%;color:var(--emw--color-white, #fff);background:var(--mmw--color-gray-transparency-85, rgba(255, 255, 255, 0.85));cursor:pointer;transition:all 150ms ease-in-out}.ModalCloseBtn svg{width:32px;height:32px}.ModalCloseBtn:hover{background:var(--emw--color-gray-transparency-20, rgba(255, 255, 255, 0.2))}@container modal-window (max-width:750px){.ModalWindow .ModalContainer{width:90%;max-width:400px}}");
         | 
| 13 | 
            +
            }
         | 
| 14 | 
            +
            const $ = (n) => ({}), z = (n) => ({});
         | 
| 15 | 
            +
            function E(n) {
         | 
| 16 | 
            +
              let t, e, i, l, o, d;
         | 
| 17 | 
            +
              const f = (
         | 
| 18 | 
            +
                /*#slots*/
         | 
| 19 | 
            +
                n[9].content
         | 
| 20 | 
            +
              ), r = O(
         | 
| 21 | 
            +
                f,
         | 
| 22 | 
            +
                n,
         | 
| 23 | 
            +
                /*$$scope*/
         | 
| 24 | 
            +
                n[8],
         | 
| 25 | 
            +
                z
         | 
| 26 | 
            +
              );
         | 
| 27 | 
            +
              return {
         | 
| 28 | 
            +
                c() {
         | 
| 29 | 
            +
                  t = y("div"), e = y("div"), i = y("div"), r && r.c(), h(i, "class", "ModalContainer"), h(i, "part", "ModalContainer"), h(e, "class", "ModalWindow"), h(e, "part", "ModalWindow"), h(e, "id", "Modal"), M(() => (
         | 
| 30 | 
            +
                    /*div1_elementresize_handler*/
         | 
| 31 | 
            +
                    n[11].call(e)
         | 
| 32 | 
            +
                  )), h(t, "part", "CustomStylingContainer");
         | 
| 33 | 
            +
                },
         | 
| 34 | 
            +
                m(a, c) {
         | 
| 35 | 
            +
                  H(a, t, c), v(t, e), v(e, i), r && r.m(i, null), n[10](e), l = P(
         | 
| 36 | 
            +
                    e,
         | 
| 37 | 
            +
                    /*div1_elementresize_handler*/
         | 
| 38 | 
            +
                    n[11].bind(e)
         | 
| 39 | 
            +
                  ), n[12](t), d = !0;
         | 
| 40 | 
            +
                },
         | 
| 41 | 
            +
                p(a, c) {
         | 
| 42 | 
            +
                  n = a, r && r.p && (!d || c & /*$$scope*/
         | 
| 43 | 
            +
                  256) && Q(
         | 
| 44 | 
            +
                    r,
         | 
| 45 | 
            +
                    f,
         | 
| 46 | 
            +
                    n,
         | 
| 47 | 
            +
                    /*$$scope*/
         | 
| 48 | 
            +
                    n[8],
         | 
| 49 | 
            +
                    d ? X(
         | 
| 50 | 
            +
                      f,
         | 
| 51 | 
            +
                      /*$$scope*/
         | 
| 52 | 
            +
                      n[8],
         | 
| 53 | 
            +
                      c,
         | 
| 54 | 
            +
                      $
         | 
| 55 | 
            +
                    ) : V(
         | 
| 56 | 
            +
                      /*$$scope*/
         | 
| 57 | 
            +
                      n[8]
         | 
| 58 | 
            +
                    ),
         | 
| 59 | 
            +
                    z
         | 
| 60 | 
            +
                  );
         | 
| 61 | 
            +
                },
         | 
| 62 | 
            +
                i(a) {
         | 
| 63 | 
            +
                  d || (m(r, a), a && M(() => {
         | 
| 64 | 
            +
                    d && (o || (o = k(e, S, { duration: (
         | 
| 65 | 
            +
                      /*duration*/
         | 
| 66 | 
            +
                      n[2]
         | 
| 67 | 
            +
                    ) }, !0)), o.run(1));
         | 
| 68 | 
            +
                  }), d = !0);
         | 
| 69 | 
            +
                },
         | 
| 70 | 
            +
                o(a) {
         | 
| 71 | 
            +
                  p(r, a), a && (o || (o = k(e, S, { duration: (
         | 
| 72 | 
            +
                    /*duration*/
         | 
| 73 | 
            +
                    n[2]
         | 
| 74 | 
            +
                  ) }, !1)), o.run(0)), d = !1;
         | 
| 75 | 
            +
                },
         | 
| 76 | 
            +
                d(a) {
         | 
| 77 | 
            +
                  a && L(t), r && r.d(a), n[10](null), l(), a && o && o.end(), n[12](null);
         | 
| 78 | 
            +
                }
         | 
| 79 | 
            +
              };
         | 
| 80 | 
            +
            }
         | 
| 81 | 
            +
            function tt(n) {
         | 
| 82 | 
            +
              let t, e, i = (
         | 
| 83 | 
            +
                /*show*/
         | 
| 84 | 
            +
                n[5] && E(n)
         | 
| 85 | 
            +
              );
         | 
| 86 | 
            +
              return {
         | 
| 87 | 
            +
                c() {
         | 
| 88 | 
            +
                  i && i.c(), t = I();
         | 
| 89 | 
            +
                },
         | 
| 90 | 
            +
                m(l, o) {
         | 
| 91 | 
            +
                  i && i.m(l, o), H(l, t, o), e = !0;
         | 
| 92 | 
            +
                },
         | 
| 93 | 
            +
                p(l, [o]) {
         | 
| 94 | 
            +
                  /*show*/
         | 
| 95 | 
            +
                  l[5] ? i ? (i.p(l, o), o & /*show*/
         | 
| 96 | 
            +
                  32 && m(i, 1)) : (i = E(l), i.c(), m(i, 1), i.m(t.parentNode, t)) : i && (Y(), p(i, 1, 1, () => {
         | 
| 97 | 
            +
                    i = null;
         | 
| 98 | 
            +
                  }), J());
         | 
| 99 | 
            +
                },
         | 
| 100 | 
            +
                i(l) {
         | 
| 101 | 
            +
                  e || (m(i), e = !0);
         | 
| 102 | 
            +
                },
         | 
| 103 | 
            +
                o(l) {
         | 
| 104 | 
            +
                  p(i), e = !1;
         | 
| 105 | 
            +
                },
         | 
| 106 | 
            +
                d(l) {
         | 
| 107 | 
            +
                  l && L(t), i && i.d(l);
         | 
| 108 | 
            +
                }
         | 
| 109 | 
            +
              };
         | 
| 110 | 
            +
            }
         | 
| 111 | 
            +
            function et(n, t, e) {
         | 
| 112 | 
            +
              let { $$slots: i = {}, $$scope: l } = t, { clientstyling: o = "" } = t, { clientstylingurl: d = "" } = t, { duration: f = 200 } = t, { width: r } = t, { height: a } = t, c, u, w = !1;
         | 
| 113 | 
            +
              const W = () => {
         | 
| 114 | 
            +
                e(5, w = !1), window.postMessage({ type: "ClosedCashierModal" }, window.location.href), window.postMessage({ type: "EnableScroll" }, window.location.href);
         | 
| 115 | 
            +
              }, b = (s) => {
         | 
| 116 | 
            +
                s.data.type == "ShowCashierModal" && (e(5, w = !0), window.postMessage({ type: "DisableScroll" }, window.location.href)), s.data.type == "HideCashierModal" && W();
         | 
| 117 | 
            +
              }, B = () => {
         | 
| 118 | 
            +
                let s = document.createElement("style");
         | 
| 119 | 
            +
                s.innerHTML = o, u.appendChild(s);
         | 
| 120 | 
            +
              }, T = () => {
         | 
| 121 | 
            +
                let s = new URL(d), C = document.createElement("style");
         | 
| 122 | 
            +
                fetch(s.href).then((_) => _.text()).then((_) => {
         | 
| 123 | 
            +
                  C.innerHTML = _, setTimeout(
         | 
| 124 | 
            +
                    () => {
         | 
| 125 | 
            +
                      u.appendChild(C);
         | 
| 126 | 
            +
                    },
         | 
| 127 | 
            +
                    1
         | 
| 128 | 
            +
                  );
         | 
| 129 | 
            +
                });
         | 
| 130 | 
            +
              };
         | 
| 131 | 
            +
              K(() => (window.addEventListener("message", b, !1), () => {
         | 
| 132 | 
            +
                window.removeEventListener("message", b);
         | 
| 133 | 
            +
              }));
         | 
| 134 | 
            +
              function j(s) {
         | 
| 135 | 
            +
                x[s ? "unshift" : "push"](() => {
         | 
| 136 | 
            +
                  c = s, e(4, c);
         | 
| 137 | 
            +
                });
         | 
| 138 | 
            +
              }
         | 
| 139 | 
            +
              function R() {
         | 
| 140 | 
            +
                r = this.clientWidth, a = this.clientHeight, e(0, r), e(1, a);
         | 
| 141 | 
            +
              }
         | 
| 142 | 
            +
              function U(s) {
         | 
| 143 | 
            +
                x[s ? "unshift" : "push"](() => {
         | 
| 144 | 
            +
                  u = s, e(3, u);
         | 
| 145 | 
            +
                });
         | 
| 146 | 
            +
              }
         | 
| 147 | 
            +
              return n.$$set = (s) => {
         | 
| 148 | 
            +
                "clientstyling" in s && e(6, o = s.clientstyling), "clientstylingurl" in s && e(7, d = s.clientstylingurl), "duration" in s && e(2, f = s.duration), "width" in s && e(0, r = s.width), "height" in s && e(1, a = s.height), "$$scope" in s && e(8, l = s.$$scope);
         | 
| 149 | 
            +
              }, n.$$.update = () => {
         | 
| 150 | 
            +
                n.$$.dirty & /*clientstyling, customStylingContainer*/
         | 
| 151 | 
            +
                72 && o && u && B(), n.$$.dirty & /*clientstylingurl, customStylingContainer*/
         | 
| 152 | 
            +
                136 && d && u && T();
         | 
| 153 | 
            +
              }, [
         | 
| 154 | 
            +
                r,
         | 
| 155 | 
            +
                a,
         | 
| 156 | 
            +
                f,
         | 
| 157 | 
            +
                u,
         | 
| 158 | 
            +
                c,
         | 
| 159 | 
            +
                w,
         | 
| 160 | 
            +
                o,
         | 
| 161 | 
            +
                d,
         | 
| 162 | 
            +
                l,
         | 
| 163 | 
            +
                i,
         | 
| 164 | 
            +
                j,
         | 
| 165 | 
            +
                R,
         | 
| 166 | 
            +
                U
         | 
| 167 | 
            +
              ];
         | 
| 168 | 
            +
            }
         | 
| 169 | 
            +
            class nt extends D {
         | 
| 170 | 
            +
              constructor(t) {
         | 
| 171 | 
            +
                super(), F(
         | 
| 172 | 
            +
                  this,
         | 
| 173 | 
            +
                  t,
         | 
| 174 | 
            +
                  et,
         | 
| 175 | 
            +
                  tt,
         | 
| 176 | 
            +
                  N,
         | 
| 177 | 
            +
                  {
         | 
| 178 | 
            +
                    clientstyling: 6,
         | 
| 179 | 
            +
                    clientstylingurl: 7,
         | 
| 180 | 
            +
                    duration: 2,
         | 
| 181 | 
            +
                    width: 0,
         | 
| 182 | 
            +
                    height: 1
         | 
| 183 | 
            +
                  },
         | 
| 184 | 
            +
                  Z
         | 
| 185 | 
            +
                );
         | 
| 186 | 
            +
              }
         | 
| 187 | 
            +
              get clientstyling() {
         | 
| 188 | 
            +
                return this.$$.ctx[6];
         | 
| 189 | 
            +
              }
         | 
| 190 | 
            +
              set clientstyling(t) {
         | 
| 191 | 
            +
                this.$$set({ clientstyling: t }), g();
         | 
| 192 | 
            +
              }
         | 
| 193 | 
            +
              get clientstylingurl() {
         | 
| 194 | 
            +
                return this.$$.ctx[7];
         | 
| 195 | 
            +
              }
         | 
| 196 | 
            +
              set clientstylingurl(t) {
         | 
| 197 | 
            +
                this.$$set({ clientstylingurl: t }), g();
         | 
| 198 | 
            +
              }
         | 
| 199 | 
            +
              get duration() {
         | 
| 200 | 
            +
                return this.$$.ctx[2];
         | 
| 201 | 
            +
              }
         | 
| 202 | 
            +
              set duration(t) {
         | 
| 203 | 
            +
                this.$$set({ duration: t }), g();
         | 
| 204 | 
            +
              }
         | 
| 205 | 
            +
              get width() {
         | 
| 206 | 
            +
                return this.$$.ctx[0];
         | 
| 207 | 
            +
              }
         | 
| 208 | 
            +
              set width(t) {
         | 
| 209 | 
            +
                this.$$set({ width: t }), g();
         | 
| 210 | 
            +
              }
         | 
| 211 | 
            +
              get height() {
         | 
| 212 | 
            +
                return this.$$.ctx[1];
         | 
| 213 | 
            +
              }
         | 
| 214 | 
            +
              set height(t) {
         | 
| 215 | 
            +
                this.$$set({ height: t }), g();
         | 
| 216 | 
            +
              }
         | 
| 217 | 
            +
            }
         | 
| 218 | 
            +
            G(nt, { clientstyling: {}, clientstylingurl: {}, duration: {}, width: {}, height: {} }, ["content"], [], !0);
         | 
| 219 | 
            +
            export {
         | 
| 220 | 
            +
              nt as default
         | 
| 221 | 
            +
            };
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CashierConfirmModal-BsoB5fQM.cjs");function y(i,{delay:e=0,duration:n=400,easing:o=t.identity}={}){const s=+getComputedStyle(i).opacity;return{delay:e,duration:n,easing:o,css:r=>`opacity: ${r*s}`}}function E(i){t.append_styles(i,"svelte-pil2bm","*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.ModalWindow{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:4;top:0;left:0;background-color:var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));container-type:inline-size;container-name:modal-window;border-radius:6px}.ModalContainer{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);padding:var(--emw--spacing-large, 20px);width:400px}.ModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:10px;right:10px;padding:var(--emw--spacing-small-minus, 10px);border-radius:50%;color:var(--emw--color-white, #fff);background:var(--mmw--color-gray-transparency-85, rgba(255, 255, 255, 0.85));cursor:pointer;transition:all 150ms ease-in-out}.ModalCloseBtn svg{width:32px;height:32px}.ModalCloseBtn:hover{background:var(--emw--color-gray-transparency-20, rgba(255, 255, 255, 0.2))}@container modal-window (max-width:750px){.ModalWindow .ModalContainer{width:90%;max-width:400px}}")}const L=i=>({}),p=i=>({});function b(i){let e,n,o,s,r,c;const h=i[9].content,d=t.create_slot(h,i,i[8],p);return{c(){e=t.element("div"),n=t.element("div"),o=t.element("div"),d&&d.c(),t.attr(o,"class","ModalContainer"),t.attr(o,"part","ModalContainer"),t.attr(n,"class","ModalWindow"),t.attr(n,"part","ModalWindow"),t.attr(n,"id","Modal"),t.add_render_callback(()=>i[11].call(n)),t.attr(e,"part","CustomStylingContainer")},m(a,u){t.insert(a,e,u),t.append(e,n),t.append(n,o),d&&d.m(o,null),i[10](n),s=t.add_iframe_resize_listener(n,i[11].bind(n)),i[12](e),c=!0},p(a,u){i=a,d&&d.p&&(!c||u&256)&&t.update_slot_base(d,h,i,i[8],c?t.get_slot_changes(h,i[8],u,L):t.get_all_dirty_from_scope(i[8]),p)},i(a){c||(t.transition_in(d,a),a&&t.add_render_callback(()=>{c&&(r||(r=t.create_bidirectional_transition(n,y,{duration:i[2]},!0)),r.run(1))}),c=!0)},o(a){t.transition_out(d,a),a&&(r||(r=t.create_bidirectional_transition(n,y,{duration:i[2]},!1)),r.run(0)),c=!1},d(a){a&&t.detach(e),d&&d.d(a),i[10](null),s(),a&&r&&r.end(),i[12](null)}}}function H(i){let e,n,o=i[5]&&b(i);return{c(){o&&o.c(),e=t.empty()},m(s,r){o&&o.m(s,r),t.insert(s,e,r),n=!0},p(s,[r]){s[5]?o?(o.p(s,r),r&32&&t.transition_in(o,1)):(o=b(s),o.c(),t.transition_in(o,1),o.m(e.parentNode,e)):o&&(t.group_outros(),t.transition_out(o,1,1,()=>{o=null}),t.check_outros())},i(s){n||(t.transition_in(o),n=!0)},o(s){t.transition_out(o),n=!1},d(s){s&&t.detach(e),o&&o.d(s)}}}function W(i,e,n){let{$$slots:o={},$$scope:s}=e,{clientstyling:r=""}=e,{clientstylingurl:c=""}=e,{duration:h=200}=e,{width:d}=e,{height:a}=e,u,f,g=!1;const C=()=>{n(5,g=!1),window.postMessage({type:"ClosedCashierModal"},window.location.href),window.postMessage({type:"EnableScroll"},window.location.href)},m=l=>{l.data.type=="ShowCashierModal"&&(n(5,g=!0),window.postMessage({type:"DisableScroll"},window.location.href)),l.data.type=="HideCashierModal"&&C()},v=()=>{let l=document.createElement("style");l.innerHTML=r,f.appendChild(l)},k=()=>{let l=new URL(c),w=document.createElement("style");fetch(l.href).then(_=>_.text()).then(_=>{w.innerHTML=_,setTimeout(()=>{f.appendChild(w)},1)})};t.onMount(()=>(window.addEventListener("message",m,!1),()=>{window.removeEventListener("message",m)}));function S(l){t.binding_callbacks[l?"unshift":"push"](()=>{u=l,n(4,u)})}function x(){d=this.clientWidth,a=this.clientHeight,n(0,d),n(1,a)}function z(l){t.binding_callbacks[l?"unshift":"push"](()=>{f=l,n(3,f)})}return i.$$set=l=>{"clientstyling"in l&&n(6,r=l.clientstyling),"clientstylingurl"in l&&n(7,c=l.clientstylingurl),"duration"in l&&n(2,h=l.duration),"width"in l&&n(0,d=l.width),"height"in l&&n(1,a=l.height),"$$scope"in l&&n(8,s=l.$$scope)},i.$$.update=()=>{i.$$.dirty&72&&r&&f&&v(),i.$$.dirty&136&&c&&f&&k()},[d,a,h,f,u,g,r,c,s,o,S,x,z]}class M extends t.SvelteComponent{constructor(e){super(),t.init(this,e,W,H,t.safe_not_equal,{clientstyling:6,clientstylingurl:7,duration:2,width:0,height:1},E)}get clientstyling(){return this.$$.ctx[6]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[7]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get duration(){return this.$$.ctx[2]}set duration(e){this.$$set({duration:e}),t.flush()}get width(){return this.$$.ctx[0]}set width(e){this.$$set({width:e}),t.flush()}get height(){return this.$$.ctx[1]}set height(e){this.$$set({height:e}),t.flush()}}t.create_custom_element(M,{clientstyling:{},clientstylingurl:{},duration:{},width:{},height:{}},["content"],[],!0);exports.default=M;
         | 
| @@ -0,0 +1,136 @@ | |
| 1 | 
            +
            import { S as w, b as v, f as d, c as _, a as k, d as N, g, y, h as z, j as E, k as S, l as f, A as L, z as p, n as x, v as T, C as H } from "./CashierConfirmModal-Dw8BnUfp.js";
         | 
| 2 | 
            +
            function M(n) {
         | 
| 3 | 
            +
              N(n, "svelte-1cfukt5", ".CashierNotifications{position:fixed;z-index:2;background-color:var(--emw--color-background, #111);color:var(--emw--color-white, #fff);display:flex;border-radius:var(--emw--border-radius-medium, 4px);align-items:center;gap:var(--emw--spacing-small, 12px);font-size:var(--emw--font-size-small, 14px);padding:var(--emw--spacing-small, 12px) var(--emw--spacing-medium, 15px);min-height:50px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.CashierNotifications span,.CashierNotifications button{font-family:inherit;border:none;font-variant:normal}.CashierNotifications span{line-height:normal}.CashierNotifications button{color:var(--emw--color-primary, #7EC51E);background-color:transparent;cursor:pointer;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-weight:var(--emw--font-weight-bold, 700);font-family:inherit}");
         | 
| 4 | 
            +
            }
         | 
| 5 | 
            +
            function R(n) {
         | 
| 6 | 
            +
              let t, s, r, u, l, a, i, m;
         | 
| 7 | 
            +
              return {
         | 
| 8 | 
            +
                c() {
         | 
| 9 | 
            +
                  t = g("div"), s = g("span"), r = y(
         | 
| 10 | 
            +
                    /*text*/
         | 
| 11 | 
            +
                    n[0]
         | 
| 12 | 
            +
                  ), u = z(), l = g("button"), a = y(
         | 
| 13 | 
            +
                    /*button*/
         | 
| 14 | 
            +
                    n[1]
         | 
| 15 | 
            +
                  ), E(t, "class", "CashierNotifications");
         | 
| 16 | 
            +
                },
         | 
| 17 | 
            +
                m(o, c) {
         | 
| 18 | 
            +
                  S(o, t, c), f(t, s), f(s, r), f(t, u), f(t, l), f(l, a), n[6](t), i || (m = L(
         | 
| 19 | 
            +
                    l,
         | 
| 20 | 
            +
                    "click",
         | 
| 21 | 
            +
                    /*notificationClick*/
         | 
| 22 | 
            +
                    n[3]
         | 
| 23 | 
            +
                  ), i = !0);
         | 
| 24 | 
            +
                },
         | 
| 25 | 
            +
                p(o, [c]) {
         | 
| 26 | 
            +
                  c & /*text*/
         | 
| 27 | 
            +
                  1 && p(
         | 
| 28 | 
            +
                    r,
         | 
| 29 | 
            +
                    /*text*/
         | 
| 30 | 
            +
                    o[0]
         | 
| 31 | 
            +
                  ), c & /*button*/
         | 
| 32 | 
            +
                  2 && p(
         | 
| 33 | 
            +
                    a,
         | 
| 34 | 
            +
                    /*button*/
         | 
| 35 | 
            +
                    o[1]
         | 
| 36 | 
            +
                  );
         | 
| 37 | 
            +
                },
         | 
| 38 | 
            +
                i: x,
         | 
| 39 | 
            +
                o: x,
         | 
| 40 | 
            +
                d(o) {
         | 
| 41 | 
            +
                  o && T(t), n[6](null), i = !1, m();
         | 
| 42 | 
            +
                }
         | 
| 43 | 
            +
              };
         | 
| 44 | 
            +
            }
         | 
| 45 | 
            +
            function U(n, t, s) {
         | 
| 46 | 
            +
              let { text: r } = t, { button: u } = t, { clientstyling: l = "" } = t, { clientstylingurl: a = "" } = t, i;
         | 
| 47 | 
            +
              const m = () => {
         | 
| 48 | 
            +
                dispatchEvent(new CustomEvent(
         | 
| 49 | 
            +
                  "notificationButtonClick",
         | 
| 50 | 
            +
                  {
         | 
| 51 | 
            +
                    bubbles: !0,
         | 
| 52 | 
            +
                    cancelable: !0,
         | 
| 53 | 
            +
                    composed: !0
         | 
| 54 | 
            +
                  }
         | 
| 55 | 
            +
                ));
         | 
| 56 | 
            +
              }, o = () => {
         | 
| 57 | 
            +
                let e = document.createElement("style");
         | 
| 58 | 
            +
                e.innerHTML = l, i.appendChild(e);
         | 
| 59 | 
            +
              }, c = () => {
         | 
| 60 | 
            +
                let e = new URL(a), b = document.createElement("style");
         | 
| 61 | 
            +
                fetch(e.href).then((h) => h.text()).then((h) => {
         | 
| 62 | 
            +
                  b.innerHTML = h, setTimeout(
         | 
| 63 | 
            +
                    () => {
         | 
| 64 | 
            +
                      i.appendChild(b);
         | 
| 65 | 
            +
                    },
         | 
| 66 | 
            +
                    1
         | 
| 67 | 
            +
                  );
         | 
| 68 | 
            +
                });
         | 
| 69 | 
            +
              };
         | 
| 70 | 
            +
              function C(e) {
         | 
| 71 | 
            +
                H[e ? "unshift" : "push"](() => {
         | 
| 72 | 
            +
                  i = e, s(2, i);
         | 
| 73 | 
            +
                });
         | 
| 74 | 
            +
              }
         | 
| 75 | 
            +
              return n.$$set = (e) => {
         | 
| 76 | 
            +
                "text" in e && s(0, r = e.text), "button" in e && s(1, u = e.button), "clientstyling" in e && s(4, l = e.clientstyling), "clientstylingurl" in e && s(5, a = e.clientstylingurl);
         | 
| 77 | 
            +
              }, n.$$.update = () => {
         | 
| 78 | 
            +
                n.$$.dirty & /*clientstyling, customStylingContainer*/
         | 
| 79 | 
            +
                20 && l && i && o(), n.$$.dirty & /*clientstylingurl, customStylingContainer*/
         | 
| 80 | 
            +
                36 && a && i && c();
         | 
| 81 | 
            +
              }, [
         | 
| 82 | 
            +
                r,
         | 
| 83 | 
            +
                u,
         | 
| 84 | 
            +
                i,
         | 
| 85 | 
            +
                m,
         | 
| 86 | 
            +
                l,
         | 
| 87 | 
            +
                a,
         | 
| 88 | 
            +
                C
         | 
| 89 | 
            +
              ];
         | 
| 90 | 
            +
            }
         | 
| 91 | 
            +
            class j extends w {
         | 
| 92 | 
            +
              constructor(t) {
         | 
| 93 | 
            +
                super(), v(
         | 
| 94 | 
            +
                  this,
         | 
| 95 | 
            +
                  t,
         | 
| 96 | 
            +
                  U,
         | 
| 97 | 
            +
                  R,
         | 
| 98 | 
            +
                  k,
         | 
| 99 | 
            +
                  {
         | 
| 100 | 
            +
                    text: 0,
         | 
| 101 | 
            +
                    button: 1,
         | 
| 102 | 
            +
                    clientstyling: 4,
         | 
| 103 | 
            +
                    clientstylingurl: 5
         | 
| 104 | 
            +
                  },
         | 
| 105 | 
            +
                  M
         | 
| 106 | 
            +
                );
         | 
| 107 | 
            +
              }
         | 
| 108 | 
            +
              get text() {
         | 
| 109 | 
            +
                return this.$$.ctx[0];
         | 
| 110 | 
            +
              }
         | 
| 111 | 
            +
              set text(t) {
         | 
| 112 | 
            +
                this.$$set({ text: t }), d();
         | 
| 113 | 
            +
              }
         | 
| 114 | 
            +
              get button() {
         | 
| 115 | 
            +
                return this.$$.ctx[1];
         | 
| 116 | 
            +
              }
         | 
| 117 | 
            +
              set button(t) {
         | 
| 118 | 
            +
                this.$$set({ button: t }), d();
         | 
| 119 | 
            +
              }
         | 
| 120 | 
            +
              get clientstyling() {
         | 
| 121 | 
            +
                return this.$$.ctx[4];
         | 
| 122 | 
            +
              }
         | 
| 123 | 
            +
              set clientstyling(t) {
         | 
| 124 | 
            +
                this.$$set({ clientstyling: t }), d();
         | 
| 125 | 
            +
              }
         | 
| 126 | 
            +
              get clientstylingurl() {
         | 
| 127 | 
            +
                return this.$$.ctx[5];
         | 
| 128 | 
            +
              }
         | 
| 129 | 
            +
              set clientstylingurl(t) {
         | 
| 130 | 
            +
                this.$$set({ clientstylingurl: t }), d();
         | 
| 131 | 
            +
              }
         | 
| 132 | 
            +
            }
         | 
| 133 | 
            +
            _(j, { text: {}, button: {}, clientstyling: {}, clientstylingurl: {} }, [], [], !0);
         | 
| 134 | 
            +
            export {
         | 
| 135 | 
            +
              j as default
         | 
| 136 | 
            +
            };
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CashierConfirmModal-BsoB5fQM.cjs");function b(i){t.append_styles(i,"svelte-1cfukt5",".CashierNotifications{position:fixed;z-index:2;background-color:var(--emw--color-background, #111);color:var(--emw--color-white, #fff);display:flex;border-radius:var(--emw--border-radius-medium, 4px);align-items:center;gap:var(--emw--spacing-small, 12px);font-size:var(--emw--font-size-small, 14px);padding:var(--emw--spacing-small, 12px) var(--emw--spacing-medium, 15px);min-height:50px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.CashierNotifications span,.CashierNotifications button{font-family:inherit;border:none;font-variant:normal}.CashierNotifications span{line-height:normal}.CashierNotifications button{color:var(--emw--color-primary, #7EC51E);background-color:transparent;cursor:pointer;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-weight:var(--emw--font-weight-bold, 700);font-family:inherit}")}function y(i){let e,s,c,f,o,r,l,d;return{c(){e=t.element("div"),s=t.element("span"),c=t.text(i[0]),f=t.space(),o=t.element("button"),r=t.text(i[1]),t.attr(e,"class","CashierNotifications")},m(a,u){t.insert(a,e,u),t.append(e,s),t.append(s,c),t.append(e,f),t.append(e,o),t.append(o,r),i[6](e),l||(d=t.listen(o,"click",i[3]),l=!0)},p(a,[u]){u&1&&t.set_data(c,a[0]),u&2&&t.set_data(r,a[1])},i:t.noop,o:t.noop,d(a){a&&t.detach(e),i[6](null),l=!1,d()}}}function x(i,e,s){let{text:c}=e,{button:f}=e,{clientstyling:o=""}=e,{clientstylingurl:r=""}=e,l;const d=()=>{dispatchEvent(new CustomEvent("notificationButtonClick",{bubbles:!0,cancelable:!0,composed:!0}))},a=()=>{let n=document.createElement("style");n.innerHTML=o,l.appendChild(n)},u=()=>{let n=new URL(r),h=document.createElement("style");fetch(n.href).then(m=>m.text()).then(m=>{h.innerHTML=m,setTimeout(()=>{l.appendChild(h)},1)})};function p(n){t.binding_callbacks[n?"unshift":"push"](()=>{l=n,s(2,l)})}return i.$$set=n=>{"text"in n&&s(0,c=n.text),"button"in n&&s(1,f=n.button),"clientstyling"in n&&s(4,o=n.clientstyling),"clientstylingurl"in n&&s(5,r=n.clientstylingurl)},i.$$.update=()=>{i.$$.dirty&20&&o&&l&&a(),i.$$.dirty&36&&r&&l&&u()},[c,f,l,d,o,r,p]}class g extends t.SvelteComponent{constructor(e){super(),t.init(this,e,x,y,t.safe_not_equal,{text:0,button:1,clientstyling:4,clientstylingurl:5},b)}get text(){return this.$$.ctx[0]}set text(e){this.$$set({text:e}),t.flush()}get button(){return this.$$.ctx[1]}set button(e){this.$$set({button:e}),t.flush()}get clientstyling(){return this.$$.ctx[4]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[5]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}}t.create_custom_element(g,{text:{},button:{},clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=g;
         |