{"version":3,"sources":["vendor/ember-cli/app-prefix.js","client-cma/app.js","client-cma/authenticators/custom.js","client-cma/components/dashmenu.js","client-cma/components/datatable.js","client-cma/components/datetimepicker.js","client-cma/components/modal-dialog.js","client-cma/components/sweet-alert.js","client-cma/controllers/application.js","client-cma/helpers/and.js","client-cma/helpers/app-version.js","client-cma/helpers/concatHelper.js","client-cma/helpers/containHelper.js","client-cma/helpers/customSkuDisplay.js","client-cma/helpers/eq.js","client-cma/helpers/gt.js","client-cma/helpers/gte.js","client-cma/helpers/is-array.js","client-cma/helpers/is-empty.js","client-cma/helpers/is-equal.js","client-cma/helpers/lt.js","client-cma/helpers/lte.js","client-cma/helpers/not-eq.js","client-cma/helpers/not.js","client-cma/helpers/or.js","client-cma/helpers/pluralize.js","client-cma/helpers/singularize.js","client-cma/helpers/xor.js","client-cma/initializers/app-version.js","client-cma/initializers/container-debug-adapter.js","client-cma/initializers/ember-data.js","client-cma/initializers/ember-simple-auth.js","client-cma/initializers/export-application-global.js","client-cma/instance-initializers/ember-data.js","client-cma/instance-initializers/ember-simple-auth.js","client-cma/resolver.js","client-cma/router.js","client-cma/routes/application.js","client-cma/services/auth.js","client-cma/services/cookies.js","client-cma/services/order.js","client-cma/services/session.js","client-cma/services/swal.js","client-cma/services/toast.js","client-cma/session-stores/application.js","client-cma/src/asteroom/route.js","client-cma/src/asteroom/template.js","client-cma/src/counselling/route.js","client-cma/src/counselling/template.js","client-cma/src/index/route.js","client-cma/src/index/template.js","client-cma/src/login/route.js","client-cma/src/login/template.js","client-cma/src/order/address/controller.js","client-cma/src/order/address/route.js","client-cma/src/order/address/template.js","client-cma/src/order/amazonfbatosap/controller.js","client-cma/src/order/amazonfbatosap/route.js","client-cma/src/order/amazonfbatosap/template.js","client-cma/src/order/complete/controller.js","client-cma/src/order/complete/route.js","client-cma/src/order/complete/template.js","client-cma/src/order/freehw/controller.js","client-cma/src/order/freehw/route.js","client-cma/src/order/freehw/template.js","client-cma/src/order/invoicetosap/controller.js","client-cma/src/order/invoicetosap/route.js","client-cma/src/order/invoicetosap/template.js","client-cma/src/order/list/controller.js","client-cma/src/order/list/route.js","client-cma/src/order/list/template.js","client-cma/src/order/process/controller.js","client-cma/src/order/process/route.js","client-cma/src/order/process/template.js","client-cma/src/order/return/controller.js","client-cma/src/order/return/route.js","client-cma/src/order/return/template.js","client-cma/src/order/route.js","client-cma/src/order/rptosap/controller.js","client-cma/src/order/rptosap/route.js","client-cma/src/order/rptosap/template.js","client-cma/src/order/stripe/controller.js","client-cma/src/order/stripe/route.js","client-cma/src/order/stripe/template.js","client-cma/src/order/template.js","client-cma/src/order/tosaparinvoice/controller.js","client-cma/src/order/tosaparinvoice/route.js","client-cma/src/order/tosaparinvoice/template.js","client-cma/src/pphk/route.js","client-cma/src/pphk/template.js","client-cma/src/ppinc/route.js","client-cma/src/ppinc/template.js","client-cma/src/pptw/route.js","client-cma/src/pptw/template.js","client-cma/templates/application.js","client-cma/templates/components/dashmenu.js","client-cma/templates/components/datatable.js","client-cma/templates/components/datetimepicker.js","client-cma/templates/components/modal-dialog.js","client-cma/templates/spinner.js","client-cma/templates/state.js","client-cma/utils/Data.js","vendor/ember-cli/app-suffix.js","vendor/ember-cli/app-config.js","vendor/ember-cli/app-boot.js"],"sourcesContent":["'use strict';\n\n\n","define(\"client-cma/app\", [\"exports\", \"client-cma/resolver\", \"ember-load-initializers\", \"client-cma/config/environment\"], function (_exports, _resolver, _emberLoadInitializers, _environment) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const App = Ember.Application.extend({\n    modulePrefix: _environment.default.modulePrefix,\n    podModulePrefix: _environment.default.podModulePrefix,\n    Resolver: _resolver.default\n  });\n  (0, _emberLoadInitializers.default)(App, _environment.default.modulePrefix);\n  var _default = App;\n  _exports.default = _default;\n});","define(\"client-cma/authenticators/custom\", [\"exports\", \"ember-simple-auth/authenticators/base\"], function (_exports, _base) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = _base.default.extend({\n    auth: Ember.inject.service(),\n\n    restore(data) {\n      return new Ember.RSVP.Promise(function (resolve, reject) {\n        if (Ember.isEmpty(data.token)) reject();else resolve(data);\n      });\n    },\n\n    async authenticate({\n      email,\n      password\n    }) {\n      const response = await this.auth.login(email, password);\n\n      if (response.ok) {\n        return response.data;\n      } else {\n        throw response;\n      }\n    },\n\n    invalidate(data) {\n      return new Ember.RSVP.Promise(function (resolve) {\n        resolve();\n      });\n    }\n\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/components/dashmenu\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Component.extend({\n    router: Ember.inject.service(),\n    tagName: 'button',\n    classNameBindings: ['isDisabled:disabled:'],\n    classNames: ['menu'],\n    isDisabled: false,\n\n    click() {\n      let {\n        route,\n        router,\n        isDisabled\n      } = this;\n      if (!isDisabled) router.transitionTo(route);\n      return false;\n    }\n\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/components/datatable\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Component.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    router: Ember.inject.service(),\n    toast: Ember.inject.service(),\n    swal: Ember.inject.service(),\n    tagName: 'table',\n    classNames: ['table', 'table-striped', 'table-bordered', 'nowrap', 'collapsed'],\n    attributeBindings: ['width'],\n    width: '100%',\n    isWritable: Ember.computed.alias('session.data.authenticated.writable'),\n    token: Ember.computed.alias('session.data.authenticated.token'),\n\n    init() {\n      this._super(...arguments);\n    },\n\n    didInsertElement() {\n      const {\n        dataSrc,\n        columns,\n        detailSrc,\n        detailCols\n      } = this;\n      const {\n        elementId,\n        options,\n        dblClick,\n        btnClick,\n        select,\n        deSelect,\n        mail,\n        edit,\n        cancel,\n        proceed,\n        isWritable,\n        token\n      } = this;\n      let table = $(`#${elementId}`).DataTable({\n        initComplete: function () {\n          this.api().buttons().enable(false);\n\n          if (isWritable && options.defaultSelect) {\n            this.api().row({\n              order: 'current'\n            }, 0).select();\n            this.api().buttons().enable(true);\n          }\n        },\n        dom: options.dom || \"rti<'row'<'col-md-12 text-center mt-3'B>>\",\n        data: options.data || [],\n        columns: options.columns || [],\n        columnDefs: options.columnDefs || [],\n        select: options.select || {\n          style: 'single'\n        },\n        order: options.order || [],\n        buttons: options.buttons || [],\n        paging: false,\n        scrollX: true,\n        createdRow: (row, data, dataIndex) => {\n          try {\n            if (Number(data.riskScore) > 0) {\n              $(row).css('background', '#f46e6e');\n            }\n          } catch (e) {\n            console.log(e);\n          }\n        }\n      });\n      table.on('click', 'td.details-control', e => {\n        const row = table.row(e.currentTarget);\n        const trackingCom = row.data().trackingCompany.toLowerCase();\n        const SN = row.data().shopifySN;\n\n        if (row.child.isShown()) {\n          $(row.node()).find('.details-control [data-fa-i2svg]').replaceWith('<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>');\n          row.nodes().to$().removeClass('shown');\n          row.child.hide();\n          $(`#${SN}`).DataTable().destroy(true);\n        } else {\n          $(row.node()).find('.details-control [data-fa-i2svg]').replaceWith('<i class=\"fa fa-minus\" aria-hidden=\"true\"></i>');\n          row.nodes().to$().addClass('shown');\n          row.child(this.tableFormat(SN)).show();\n          this.buildTable(token, SN, trackingCom);\n        }\n      }).on('click', '#send-email', e => {\n        const row = table.row($(e.currentTarget).parent());\n\n        if (mail && Ember.typeOf(mail) === 'function') {\n          mail(table, row.data());\n        }\n      }).on('click', '#credit-note', e => {\n        const row = table.row($(e.currentTarget).parent());\n\n        if (proceed && Ember.typeOf(proceed) === 'function') {\n          proceed(table, row.data());\n        }\n      }).on('click', '#delete-order', e => {\n        const row = table.row($(e.currentTarget).parent());\n\n        if (cancel && Ember.typeOf(cancel) === 'function') {\n          this.swal.open({\n            title: 'Are you sure?',\n            showCancelButton: true\n          }).then(({\n            value\n          }) => {\n            if (value) cancel(table, row.data());\n          });\n        }\n      }).on('click', '#edit-number', e => {\n        const row = table.row($(e.currentTarget).parent());\n\n        if (edit && Ember.typeOf(edit) === 'function') {\n          edit(table, row.data());\n        }\n      }).on('click', '.fa-sticky-note-wrapper', e => {\n        alert(`備註：${e.target.dataset.tooltip}`);\n      }).on('select', (e, dt, type, index) => {\n        dt.rows('.non-select').nodes().to$().removeClass('selected');\n        const count = dt.rows('.selected').count();\n        this.buttonsEnabled(dt, count > 0);\n        this.infoSelected(count);\n\n        if (select && Ember.typeOf(select) === 'function') {\n          select(dt, index);\n        }\n\n        if (window.getShopifyStore() === 'PpHk' && count > 0) {\n          let sapId = dt.rows('.selected').data()[0].sapId;\n\n          if (sapId) {\n            $('.sap-or-mail > span').text('出貨(寄信)');\n          } else {\n            $('.sap-or-mail > span').text('匯入SAP');\n          }\n        }\n      }).on('deselect', (e, dt, type, index) => {\n        const count = dt.rows('.selected').count();\n        this.buttonsEnabled(dt, count > 0);\n        this.selectAllChecked(count > 0);\n        this.infoSelected(count);\n\n        if (deSelect && Ember.typeOf(deSelect) === 'function') {\n          deSelect(dt);\n        }\n\n        if (window.getShopifyStore() === 'PpHk') {\n          $('.sap-or-mail > span').text('匯入SAP/出貨(寄信)');\n        }\n      }).on('dblclick', 'tr', function (e) {\n        if (dblClick && Ember.typeOf(dblClick) === 'function') {\n          table.rows('.selected').nodes().to$().removeClass('selected');\n          table.rows(e.currentTarget).nodes().to$().addClass('selected');\n          dblClick(table.rows(e.currentTarget).data().toArray());\n        }\n      }.bind(this));\n      table.buttons().container().removeClass('btn-group');\n      table.buttons().each(button => {\n        $(button.node).removeClass('btn-secondary');\n      });\n      table.buttons().action(function (e, dt, node, config) {\n        if (btnClick && Ember.typeOf(btnClick) === 'function') {\n          this.swal.open({\n            title: 'Are you sure?',\n            showCancelButton: true\n          }).then(({\n            value\n          }) => {\n            if (value) btnClick(dt, config);\n          });\n        }\n      }.bind(this));\n      Ember.run.later(table, () => {\n        table.columns.adjust();\n        $('table thead .details-control').css('width', '15px');\n      }, 2);\n    },\n\n    buttonsEnabled(dt, isEnabled) {\n      if (this.isWritable) dt.buttons().enable(isEnabled);\n    },\n\n    selectAllChecked(isSelected) {\n      $('.dt-checkboxes-select-all input[type=\"checkbox\"]').prop('checked', isSelected);\n    },\n\n    infoSelected(num) {\n      const infoString = num > 1 ? `${num} rows selected` : num == 1 ? `1 row selected` : '';\n      const $infoStatus = $('div.dataTables_info');\n      const existing = $infoStatus.children($('span.select-info'));\n\n      if (existing.length) {\n        $('span.select-info').text(infoString);\n      } else {\n        let output = $('<span class=\"select-info\"/>').append($('<span class=\"select-item\"/>')).append(infoString);\n        if (infoString.length !== 0) $infoStatus.append(output);\n      }\n    },\n\n    tableFormat(id) {\n      return `<table id='${id}' class='table table-striped table-bordered' cellpadding='5' cellspacing='1' border='1' style='border-top:1px solid #dee2e6;'></table>`;\n    },\n\n    async packageListByOrder(token, SN) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.packageListByOrder(token, SN);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.router.transitionTo('/');\n        } else if (error.code === 403) {\n          this.router.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n\n      return dataSource;\n    },\n\n    async buildTable(token, SN, trackingCom) {\n      const {\n        options\n      } = this;\n      let dataSrc = []; // if(trackingCom.indexOf('fedex') !== -1) dataSrc = await this.packageListByOrder(token, SN);\n\n      dataSrc = await this.packageListByOrder(token, SN);\n      console.log('test');\n      let detail = $(`#${SN}`).DataTable({\n        // dom: \"<'row'<'col-md-12 mb-2'B>>t\",\n        dom: 't',\n        data: dataSrc,\n        columns: this.detailCols,\n        scrollX: '1000px',\n        scrollY: '200px',\n        select: false // buttons: options.detailButtons || [],\n\n      });\n      $(detail.table().header()).find('tr').addClass('bg-white'); // detail.buttons().nodes().removeClass('btn-secondary');\n      // if(detail.row().data()) detail.buttons().disable();\n      // detail.buttons().action(function(e, dt, node, config) {\n      //     if(childBtnClick && typeOf(childBtnClick) === 'function') {\n      //         childBtnClick(dt, config);\n      //     }\n      // }.bind(this));\n    },\n\n    dataSrc: [{\n      \"shopifySN\": \"2528919945379\",\n      \"idDisplay\": \"#1009\",\n      \"dueDate\": \"2020-06-19T05:49:07Z\",\n      \"email\": \"henry.yu@penpower.com.tw\",\n      \"shippedAddress\": \"7383 Swann Street San Jose CA US 95123\",\n      \"trackingCompany\": \"Fedex\",\n      \"sapId\": 1201797,\n      \"isShipped\": true,\n      \"note\": null,\n      \"isDownloaded\": true,\n      \"mailStatus\": \"Failed\",\n      \"cancelStatus\": 'Waiting for Return',\n      \"isReturnInSap\": true,\n      \"trackingNumber\": null\n    }, {\n      \"shopifySN\": \"2528919945380\",\n      \"idDisplay\": \"#1010\",\n      \"dueDate\": \"2020-06-19T05:49:07Z\",\n      \"email\": \"henry.yu@penpower.com.tw\",\n      \"shippedAddress\": \"7383 Swann Street San Jose CA US 95123\",\n      \"trackingCompany\": \"Fedex\",\n      \"sapId\": 1201798,\n      \"isShipped\": false,\n      \"note\": null,\n      \"isDownloaded\": false,\n      \"mailStatus\": \"Failed\",\n      \"cancelStatus\": 'Waiting for Return',\n      \"isReturnInSap\": false,\n      \"trackingNumber\": '794619806773'\n    }, {\n      \"shopifySN\": \"2528919945383\",\n      \"idDisplay\": \"#1013\",\n      \"dueDate\": \"2020-06-19T05:49:07Z\",\n      \"email\": \"henry.yu@penpower.com.tw\",\n      \"shippedAddress\": \"7383 Swann Street San Jose CA US 95123\",\n      \"trackingCompany\": \"Fedex\",\n      \"sapId\": 1201798,\n      \"isShipped\": false,\n      \"note\": null,\n      \"isDownloaded\": false,\n      \"mailStatus\": \"Failed\",\n      \"cancelStatus\": 'Returned',\n      \"isReturnInSap\": false,\n      \"trackingNumber\": '794619806772'\n    }, {\n      \"shopifySN\": \"2528919945383\",\n      \"idDisplay\": \"#1012\",\n      \"dueDate\": \"2020-06-19T05:49:07Z\",\n      \"email\": \"henry.yu@penpower.com.tw\",\n      \"shippedAddress\": \"7383 Swann Street San Jose CA US 95123\",\n      \"trackingCompany\": \"Fedex\",\n      \"sapId\": 1201799,\n      \"isShipped\": true,\n      \"note\": null,\n      \"isDownloaded\": true,\n      \"mailStatus\": \"Failed\",\n      \"cancelStatus\": 'Returned',\n      \"isReturnInSap\": true,\n      \"trackingNumber\": '794619806771'\n    }, {\n      \"shopifySN\": \"2528919945381\",\n      \"idDisplay\": \"#1011\",\n      \"dueDate\": \"2020-06-19T05:49:07Z\",\n      \"email\": \"henry.yu@penpower.com.tw\",\n      \"shippedAddress\": \"7383 Swann Street San Jose CA US 95123\",\n      \"trackingCompany\": \"Fedex\",\n      \"sapId\": 1201799,\n      \"isShipped\": true,\n      \"note\": null,\n      \"isDownloaded\": true,\n      \"mailStatus\": \"Failed\",\n      \"cancelStatus\": 'Returned',\n      \"isReturnInSap\": true,\n      \"trackingNumber\": '794619806770'\n    }],\n    columns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, {\n      data: null,\n      orderable: false,\n      checkboxes: {\n        selectRow: true,\n        selectAll: true,\n        selectAllRender: '<input type=\"checkbox\" class=\"dt-checkboxes\">'\n      }\n    }, {\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: 'ID NO'\n    }, {\n      data: 'dueDate',\n      title: 'Due Date',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('America/Los_Angeles').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'email',\n      title: 'Email'\n    }, {\n      data: 'shippedAddress',\n      title: 'Shipping Address'\n    }, {\n      data: 'sapId',\n      title: 'Sap Id',\n      defaultContent: '-'\n    }, {\n      data: 'trackingCompany',\n      title: 'Tracking<br>Company',\n      defaultContent: 'Fedex',\n      className: 'text-center'\n    }, {\n      data: 'isShipped',\n      title: 'Ship<br/>Status',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        if (data) {\n          return '<i class=\"fa fa-check-circle fa-lg text-success\" aria-hidden=\"true\"></i>';\n        } else {\n          return '<i class=\"fa fa-times-circle fa-lg text-danger\" aria-hidden=\"true\"></i>';\n        }\n      }\n    }, {\n      data: 'isDownloaded',\n      title: 'Download<br/>Status',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        if (data) {\n          return `<span class=\"badge badge-success\">${data}</span>`;\n        } else {\n          return `<span class=\"badge badge-danger\">${data}</span>`;\n        }\n      }\n    }, {\n      data: 'mailStatus',\n      title: 'Mail<br/>Status',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        if (data === 'Failed') {\n          return `<span class=\"badge badge-danger\">${data}</span>`;\n        } else {\n          return data;\n        }\n      }\n    }, {\n      data: 'cancelStatus',\n      title: 'Cancel<br/>Status',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        return `<span class=\"badge\">${data ? data : '-'}</span>`;\n      }\n    }, {\n      data: 'note',\n      title: 'Note',\n      defaultContent: '-',\n      className: 'text-center'\n    }],\n    detailSrc: [{\n      \"details\": [{\n        \"sku\": \"sdfsdfsd\",\n        \"quantity\": 2\n      }, {\n        \"sku\": \"sdfsdfsd\",\n        \"quantity\": 2\n      }, {\n        \"sku\": \"sdfsdfsd\",\n        \"quantity\": 2\n      }],\n      \"description\": \"組合包\",\n      \"trackingNumber\": \"794613310454\"\n    }, {\n      \"details\": [{\n        \"sku\": \"sdfsdfsd\",\n        \"quantity\": 1\n      }, {\n        \"sku\": \"sdfsdfsd\",\n        \"quantity\": 2\n      }, {\n        \"sku\": \"sdfsdfsd\",\n        \"quantity\": 3\n      }],\n      \"description\": \"組合包\",\n      \"trackingNumber\": \"794613310455\"\n    }, {\n      \"details\": [{\n        \"sku\": \"sdfsdfsd\",\n        \"quantity\": 1\n      }, {\n        \"sku\": \"sdfsdfsd\",\n        \"quantity\": 2\n      }, {\n        \"sku\": \"sdfsdfsd\",\n        \"quantity\": 1\n      }],\n      \"description\": \"組合包\",\n      \"trackingNumber\": \"794613310456\"\n    }],\n    detailCols: [{\n      data: 'trackingNumber',\n      title: 'Tracking number',\n      width: '150px',\n      defaultContent: '-',\n      className: 'editable'\n    }, {\n      data: 'detail',\n      title: 'Description',\n      width: '300px',\n      defaultContent: '-',\n      className: 'description',\n      render: data => {\n        let details = '';\n\n        if (data) {\n          JSON.parse(data).forEach(item => {\n            details += `${item.Sku} x ${item.Quantity} - ${item.Description}<br>`;\n          });\n          return `<span class=\"font-weight-bold\">${details}</span>`;\n        }\n      }\n    }, {\n      data: 'note',\n      title: 'Note',\n      defaultContent: '-',\n      className: '',\n      render: data => {\n        if (data) {\n          try {\n            const d = JSON.parse(data);\n            const info = d.Info;\n            const capacity = d.Capacity;\n\n            if (d.Others == null) {\n              return `${info.Length} x ${info.Width} x ${info.Height} (IN), ${info.Weight} (LB), Capacity: ${capacity}`;\n            }\n\n            const others = JSON.parse(d.Others);\n            const charge = others.Charge;\n            const shipmentDetail = others.ShipmentDetail;\n            return `<span class='note-title'>Estimated shipping charges:</span> ${charge}<br>` + `<span class='note-title'>Is One Rate:</span> ${shipmentDetail.IsOneRate}<br>` + `<span class='note-title'>PackagingType:</span> ${shipmentDetail.PackagingType}<br>` + `<span class='note-title'>ServiceType:</span> ${shipmentDetail.ServiceType}<br>` + `<span class='note-title'>(Length, Width, Height, Weight):</span> (${info.Length}, ${info.Width}, ${info.Height}, ${info.Weight})`;\n          } catch (e) {\n            return data;\n          }\n        }\n      }\n    }]\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/components/datetimepicker\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Component.extend({\n    didInsertElement() {\n      const {\n        options,\n        dpChange\n      } = this;\n      console.log(options);\n      const dp = $('#datetimepicker').datetimepicker({\n        defaultDate: new moment().tz('Asia/Taipei'),\n        format: options.format || 'YYYY-MM',\n        viewMode: options.viewMode || 'years',\n        useCurrent: true,\n        icons: {\n          time: \"fa fa-clock-o\",\n          date: \"fa fa-calendar\",\n          up: \"fa fa-arrow-up\",\n          down: \"fa fa-arrow-down\",\n          previous: \"fa fa-chevron-left\",\n          next: \"fa fa-chevron-right\",\n          today: \"fa fa-clock-o\",\n          clear: \"fa fa-trash-o\"\n        }\n      });\n      dp.on('dp.change', e => {\n        if (dpChange && Ember.typeOf(dpChange) === 'function') {\n          dpChange(e.date, this.options.viewMode.slice(0, -1));\n        }\n      });\n    }\n\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/components/modal-dialog\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Component.extend({\n    tagName: 'div',\n    classNames: ['modal', 'fade'],\n    attributeBindings: ['tabindex', 'role', 'aria-hidden=\"true'],\n    tabindex: '-1',\n    role: 'dialog',\n    'aria-hidden': true,\n    btnConfirmTitie: 'Confirm',\n    btnCancelTitle: 'Cancel',\n\n    didInsertElement() {\n      $('.modal').on('show.bs.modal', e => {\n        $('.wrapper').css('position', 'absolute');\n      }).on('shown.bs.modal', e => {}).on('hide.bs.modal', e => {\n        $('.wrapper').css('position', 'fixed');\n      }).on('hidden.bs.modal', e => {});\n    }\n\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/components/sweet-alert\", [\"exports\", \"ember-sweetalert/components/sweet-alert\"], function (_exports, _sweetAlert) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _sweetAlert.default;\n    }\n  });\n});","define(\"client-cma/controllers/application\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({});\n\n  _exports.default = _default;\n});","define(\"client-cma/helpers/and\", [\"exports\", \"ember-truth-helpers/helpers/and\"], function (_exports, _and) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _and.default;\n    }\n  });\n  Object.defineProperty(_exports, \"and\", {\n    enumerable: true,\n    get: function () {\n      return _and.and;\n    }\n  });\n});","define(\"client-cma/helpers/app-version\", [\"exports\", \"client-cma/config/environment\", \"ember-cli-app-version/utils/regexp\"], function (_exports, _environment, _regexp) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.appVersion = appVersion;\n  _exports.default = void 0;\n\n  function appVersion(_, hash = {}) {\n    const version = _environment.default.APP.version; // e.g. 1.0.0-alpha.1+4jds75hf\n    // Allow use of 'hideSha' and 'hideVersion' For backwards compatibility\n\n    let versionOnly = hash.versionOnly || hash.hideSha;\n    let shaOnly = hash.shaOnly || hash.hideVersion;\n    let match = null;\n\n    if (versionOnly) {\n      if (hash.showExtended) {\n        match = version.match(_regexp.versionExtendedRegExp); // 1.0.0-alpha.1\n      } // Fallback to just version\n\n\n      if (!match) {\n        match = version.match(_regexp.versionRegExp); // 1.0.0\n      }\n    }\n\n    if (shaOnly) {\n      match = version.match(_regexp.shaRegExp); // 4jds75hf\n    }\n\n    return match ? match[0] : version;\n  }\n\n  var _default = Ember.Helper.helper(appVersion);\n\n  _exports.default = _default;\n});","define(\"client-cma/helpers/concatHelper\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.concatHelper = concatHelper;\n  _exports.default = void 0;\n\n  function concatHelper(params) {\n    return params[0] + \"-\" + params[1];\n  }\n\n  ;\n\n  var _default = Ember.Helper.helper(concatHelper);\n\n  _exports.default = _default;\n});","define(\"client-cma/helpers/containHelper\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.containHelper = containHelper;\n  _exports.default = void 0;\n\n  function containHelper(params) {\n    if (!params[0]) return false;\n    return params[0].indexOf(params[1]) !== -1;\n  }\n\n  ;\n\n  var _default = Ember.Helper.helper(containHelper);\n\n  _exports.default = _default;\n});","define(\"client-cma/helpers/customSkuDisplay\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.customSkuDisplay = customSkuDisplay;\n  _exports.default = void 0;\n\n  function customSkuDisplay(params) {\n    if (params[0] === 'no') {\n      return 'No';\n    }\n\n    return `${params[0]} - ${params[1]}`;\n  }\n\n  ;\n\n  var _default = Ember.Helper.helper(customSkuDisplay);\n\n  _exports.default = _default;\n});","define(\"client-cma/helpers/eq\", [\"exports\", \"ember-truth-helpers/helpers/equal\"], function (_exports, _equal) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _equal.default;\n    }\n  });\n  Object.defineProperty(_exports, \"equal\", {\n    enumerable: true,\n    get: function () {\n      return _equal.equal;\n    }\n  });\n});","define(\"client-cma/helpers/gt\", [\"exports\", \"ember-truth-helpers/helpers/gt\"], function (_exports, _gt) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _gt.default;\n    }\n  });\n  Object.defineProperty(_exports, \"gt\", {\n    enumerable: true,\n    get: function () {\n      return _gt.gt;\n    }\n  });\n});","define(\"client-cma/helpers/gte\", [\"exports\", \"ember-truth-helpers/helpers/gte\"], function (_exports, _gte) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _gte.default;\n    }\n  });\n  Object.defineProperty(_exports, \"gte\", {\n    enumerable: true,\n    get: function () {\n      return _gte.gte;\n    }\n  });\n});","define(\"client-cma/helpers/is-array\", [\"exports\", \"ember-truth-helpers/helpers/is-array\"], function (_exports, _isArray) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _isArray.default;\n    }\n  });\n  Object.defineProperty(_exports, \"isArray\", {\n    enumerable: true,\n    get: function () {\n      return _isArray.isArray;\n    }\n  });\n});","define(\"client-cma/helpers/is-empty\", [\"exports\", \"ember-truth-helpers/helpers/is-empty\"], function (_exports, _isEmpty) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _isEmpty.default;\n    }\n  });\n});","define(\"client-cma/helpers/is-equal\", [\"exports\", \"ember-truth-helpers/helpers/is-equal\"], function (_exports, _isEqual) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _isEqual.default;\n    }\n  });\n  Object.defineProperty(_exports, \"isEqual\", {\n    enumerable: true,\n    get: function () {\n      return _isEqual.isEqual;\n    }\n  });\n});","define(\"client-cma/helpers/lt\", [\"exports\", \"ember-truth-helpers/helpers/lt\"], function (_exports, _lt) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _lt.default;\n    }\n  });\n  Object.defineProperty(_exports, \"lt\", {\n    enumerable: true,\n    get: function () {\n      return _lt.lt;\n    }\n  });\n});","define(\"client-cma/helpers/lte\", [\"exports\", \"ember-truth-helpers/helpers/lte\"], function (_exports, _lte) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _lte.default;\n    }\n  });\n  Object.defineProperty(_exports, \"lte\", {\n    enumerable: true,\n    get: function () {\n      return _lte.lte;\n    }\n  });\n});","define(\"client-cma/helpers/not-eq\", [\"exports\", \"ember-truth-helpers/helpers/not-equal\"], function (_exports, _notEqual) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _notEqual.default;\n    }\n  });\n  Object.defineProperty(_exports, \"notEq\", {\n    enumerable: true,\n    get: function () {\n      return _notEqual.notEq;\n    }\n  });\n});","define(\"client-cma/helpers/not\", [\"exports\", \"ember-truth-helpers/helpers/not\"], function (_exports, _not) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _not.default;\n    }\n  });\n  Object.defineProperty(_exports, \"not\", {\n    enumerable: true,\n    get: function () {\n      return _not.not;\n    }\n  });\n});","define(\"client-cma/helpers/or\", [\"exports\", \"ember-truth-helpers/helpers/or\"], function (_exports, _or) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _or.default;\n    }\n  });\n  Object.defineProperty(_exports, \"or\", {\n    enumerable: true,\n    get: function () {\n      return _or.or;\n    }\n  });\n});","define(\"client-cma/helpers/pluralize\", [\"exports\", \"ember-inflector/lib/helpers/pluralize\"], function (_exports, _pluralize) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _pluralize.default;\n  _exports.default = _default;\n});","define(\"client-cma/helpers/singularize\", [\"exports\", \"ember-inflector/lib/helpers/singularize\"], function (_exports, _singularize) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _singularize.default;\n  _exports.default = _default;\n});","define(\"client-cma/helpers/xor\", [\"exports\", \"ember-truth-helpers/helpers/xor\"], function (_exports, _xor) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _xor.default;\n    }\n  });\n  Object.defineProperty(_exports, \"xor\", {\n    enumerable: true,\n    get: function () {\n      return _xor.xor;\n    }\n  });\n});","define(\"client-cma/initializers/app-version\", [\"exports\", \"ember-cli-app-version/initializer-factory\", \"client-cma/config/environment\"], function (_exports, _initializerFactory, _environment) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  let name, version;\n\n  if (_environment.default.APP) {\n    name = _environment.default.APP.name;\n    version = _environment.default.APP.version;\n  }\n\n  var _default = {\n    name: 'App Version',\n    initialize: (0, _initializerFactory.default)(name, version)\n  };\n  _exports.default = _default;\n});","define(\"client-cma/initializers/container-debug-adapter\", [\"exports\", \"ember-resolver/resolvers/classic/container-debug-adapter\"], function (_exports, _containerDebugAdapter) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = {\n    name: 'container-debug-adapter',\n\n    initialize() {\n      let app = arguments[1] || arguments[0];\n      app.register('container-debug-adapter:main', _containerDebugAdapter.default);\n      app.inject('container-debug-adapter:main', 'namespace', 'application:main');\n    }\n\n  };\n  _exports.default = _default;\n});","define(\"client-cma/initializers/ember-data\", [\"exports\", \"ember-data/setup-container\", \"ember-data\"], function (_exports, _setupContainer, _emberData) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  /*\n  \n    This code initializes Ember-Data onto an Ember application.\n  \n    If an Ember.js developer defines a subclass of DS.Store on their application,\n    as `App.StoreService` (or via a module system that resolves to `service:store`)\n    this code will automatically instantiate it and make it available on the\n    router.\n  \n    Additionally, after an application's controllers have been injected, they will\n    each have the store made available to them.\n  \n    For example, imagine an Ember.js application with the following classes:\n  \n    ```app/services/store.js\n    import DS from 'ember-data';\n  \n    export default DS.Store.extend({\n      adapter: 'custom'\n    });\n    ```\n  \n    ```app/controllers/posts.js\n    import { Controller } from '@ember/controller';\n  \n    export default Controller.extend({\n      // ...\n    });\n  \n    When the application is initialized, `ApplicationStore` will automatically be\n    instantiated, and the instance of `PostsController` will have its `store`\n    property set to that instance.\n  \n    Note that this code will only be run if the `ember-application` package is\n    loaded. If Ember Data is being used in an environment other than a\n    typical application (e.g., node.js where only `ember-runtime` is available),\n    this code will be ignored.\n  */\n  var _default = {\n    name: 'ember-data',\n    initialize: _setupContainer.default\n  };\n  _exports.default = _default;\n});","define(\"client-cma/initializers/ember-simple-auth\", [\"exports\", \"client-cma/config/environment\", \"ember-simple-auth/configuration\", \"ember-simple-auth/initializers/setup-session\", \"ember-simple-auth/initializers/setup-session-service\", \"ember-simple-auth/initializers/setup-session-restoration\"], function (_exports, _environment, _configuration, _setupSession, _setupSessionService, _setupSessionRestoration) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = {\n    name: 'ember-simple-auth',\n\n    initialize(registry) {\n      const config = _environment.default['ember-simple-auth'] || {};\n      config.rootURL = _environment.default.rootURL || _environment.default.baseURL;\n\n      _configuration.default.load(config);\n\n      (0, _setupSession.default)(registry);\n      (0, _setupSessionService.default)(registry);\n      (0, _setupSessionRestoration.default)(registry);\n    }\n\n  };\n  _exports.default = _default;\n});","define(\"client-cma/initializers/export-application-global\", [\"exports\", \"client-cma/config/environment\"], function (_exports, _environment) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.initialize = initialize;\n  _exports.default = void 0;\n\n  function initialize() {\n    var application = arguments[1] || arguments[0];\n\n    if (_environment.default.exportApplicationGlobal !== false) {\n      var theGlobal;\n\n      if (typeof window !== 'undefined') {\n        theGlobal = window;\n      } else if (typeof global !== 'undefined') {\n        theGlobal = global;\n      } else if (typeof self !== 'undefined') {\n        theGlobal = self;\n      } else {\n        // no reasonable global, just bail\n        return;\n      }\n\n      var value = _environment.default.exportApplicationGlobal;\n      var globalName;\n\n      if (typeof value === 'string') {\n        globalName = value;\n      } else {\n        globalName = Ember.String.classify(_environment.default.modulePrefix);\n      }\n\n      if (!theGlobal[globalName]) {\n        theGlobal[globalName] = application;\n        application.reopen({\n          willDestroy: function () {\n            this._super.apply(this, arguments);\n\n            delete theGlobal[globalName];\n          }\n        });\n      }\n    }\n  }\n\n  var _default = {\n    name: 'export-application-global',\n    initialize: initialize\n  };\n  _exports.default = _default;\n});","define(\"client-cma/instance-initializers/ember-data\", [\"exports\", \"ember-data/initialize-store-service\"], function (_exports, _initializeStoreService) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = {\n    name: 'ember-data',\n    initialize: _initializeStoreService.default\n  };\n  _exports.default = _default;\n});","define(\"client-cma/instance-initializers/ember-simple-auth\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  // This is only needed for backwards compatibility and will be removed in the\n  // next major release of ember-simple-auth. Unfortunately, there is no way to\n  // deprecate this without hooking into Ember's internals…\n  var _default = {\n    name: 'ember-simple-auth',\n\n    initialize() {}\n\n  };\n  _exports.default = _default;\n});","define(\"client-cma/resolver\", [\"exports\", \"ember-resolver\"], function (_exports, _emberResolver) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _emberResolver.default;\n  _exports.default = _default;\n});","define(\"client-cma/router\", [\"exports\", \"client-cma/config/environment\"], function (_exports, _environment) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const Router = Ember.Router.extend({\n    location: _environment.default.locationType,\n    rootURL: _environment.default.rootURL\n  });\n  Router.map(function () {\n    this.route('login');\n    this.route('asteroom');\n    this.route('ppinc');\n    this.route('pphk');\n    this.route('pptw');\n    this.route('counselling');\n    this.route('order', {\n      path: '/:shopifyStore/order'\n    }, function () {\n      this.route('list');\n      this.route('process');\n      this.route('complete');\n      this.route('return');\n      this.route('address');\n      this.route('rptosap');\n      this.route('amazonfbatosap');\n      this.route('freehw');\n      this.route('invoicetosap');\n      this.route('stripe');\n      this.route('tosaparinvoice');\n    }); // this.route('asteroom', function(){\n    //   this.route('order', function() {\n    //     this.route('list');\n    //     this.route('process');\n    //     this.route('complete');\n    //     this.route('return');\n    //     this.route('address');\n    //   });\n    // }, );\n    // this.route('order', function() {\n    //   this.route('list');\n    //   this.route('process');\n    //   this.route('complete');\n    //   this.route('return');\n    //   this.route('address');\n    // });\n  });\n  var _default = Router;\n  _exports.default = _default;\n});","define(\"client-cma/routes/application\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    redirect(model, transition) {\n      window.getShopifyStore = function () {\n        var store = location.pathname.split(\"/\")[1];\n\n        if (store === 'asteroom') {\n          return \"Asteroom\";\n        } else if (store === 'pptw') {\n          return \"PpTw\";\n        } else if (store === 'pphk') {\n          return \"PpHk\";\n        } else if (store === 'ppinc') {\n          return \"PpInc\";\n        } else if (store === 'counselling') {\n          return \"Counselling\";\n        }\n\n        return null;\n      };\n\n      window.isChinesePage = function () {\n        var store = location.pathname.split(\"/\")[1];\n        return store !== 'asteroom' && store !== 'ppinc';\n      };\n\n      window.getStoreTitle = function () {\n        var store = location.pathname.split(\"/\")[1];\n\n        if (store === 'asteroom') {\n          return \"Asteroom(時間為UTC-7)\";\n        } else if (store === 'pptw') {\n          return \"台灣蒙恬(時間為UTC+8)\";\n        } else if (store === 'pphk') {\n          return \"香港蒙恬(時間為UTC+8)\";\n        } else if (store === 'ppinc') {\n          return \"PpInc(時間為UTC-7)\";\n        } else if (store === 'counselling') {\n          return \"心理諮商\";\n        }\n      };\n\n      if (this.session.isAuthenticated) {\n        this.transitionTo(transition.targetName);\n      } else {\n        this.transitionTo('login');\n      }\n    },\n\n    actions: {\n      error(error) {\n        this.toast.error(error);\n        this.send('signOut');\n      },\n\n      loading(transition, route) {\n        transition.send('startSpinner');\n        transition.finally(() => {\n          transition.send('stopSpinner');\n        });\n      },\n\n      signOut() {\n        if (this.session.isAuthenticated) {\n          this.session.invalidate();\n        }\n\n        this.transitionTo('login');\n      },\n\n      startSpinner() {\n        this.controllerFor('application').set('enableSpinner', true);\n      },\n\n      stopSpinner() {\n        this.controllerFor('application').set('enableSpinner', false);\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/services/auth\", [\"exports\", \"client-cma/config/environment\", \"fetch\"], function (_exports, _environment, _fetch) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Service.extend({\n    async login(email, password) {\n      try {\n        const response = await (0, _fetch.default)(`${_environment.default.APP.rootURL}auth/login`, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json'\n          },\n          body: JSON.stringify({\n            email: email,\n            password: password\n          })\n        });\n\n        if (response.ok) {\n          const data = await response.json();\n          const authentication = {\n            id: data.id,\n            token: data.token,\n            email: data.email,\n            writable: data.readWrite,\n            canUseAsteroom: data.canUseAsteroom,\n            canUsePpHk: data.canUsePpHk,\n            canUsePpInc: data.canUsePpInc,\n            canUsePpTw: data.canUsePpTw,\n            canUseCounselling: data.canUseCounselling,\n            canImportSapRpOrAp: data.canImportSapRpOrAp,\n            canImportAsteroomDynamicCustomer: data.canImportAsteroomDynamicCustomer,\n            canImportAsteroomFixedCustomer: data.canImportAsteroomFixedCustomer\n          };\n          return {\n            ok: response.ok,\n            data: authentication,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async isAuthenticated(token) {\n      try {\n        const response = await (0, _fetch.default)(`${_environment.default.APP.rootURL}auth/check`, {\n          method: 'post',\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          const data = await response.json();\n          const authentication = {\n            id: data.accountLoginInfo.id,\n            token: data.accountLoginInfo.token,\n            email: data.accountLoginInfo.email,\n            writable: data.readWrite\n          };\n          return {\n            ok: response.ok,\n            data: authentication,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    }\n\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/services/cookies\", [\"exports\", \"ember-cookies/services/cookies\"], function (_exports, _cookies) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _cookies.default;\n  _exports.default = _default;\n});","define(\"client-cma/services/order\", [\"exports\", \"client-cma/config/environment\", \"fetch\"], function (_exports, _environment, _fetch) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Service.extend({\n    async orderList4Sap(token) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_can_transfer_to_sap_orders?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async transfer2Sap(token, poNumbers) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}transfer_order_to_sap?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(poNumbers)\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async orderList4Picking(token) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_can_transfer_to_picking_orders?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async transfer2picking(token, poNumbers) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}transfer_order_to_picking?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(poNumbers)\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async addressList4Calibrated(token) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_need_to_be_calibrated_orders?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async addressDetail(token, SNS) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_address?shopifySN=${SNS}&shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async calibrateAddress(token, address) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}calibrate_order?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(address)\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async pickingListByPeriod(token, year, month) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_picking_list?year=${year}&month=${month}&shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async pickingDetailById(token, id) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_orders_by_picking_id?pickingId=${id}&shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async download(token, pickingId) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}download_all?pickingId=${pickingId}&shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          const name = response.headers.get('content-disposition').split(';').find(n => n.includes('filename=')).replace('filename=', '').trim();\n          let blob = await response.blob();\n          return {\n            ok: response.ok,\n            data: {\n              blob: blob,\n              fileName: name\n            },\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async shipAndEmail(token, poNumbers) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}shipped_and_email?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(poNumbers)\n        });\n\n        if (response.ok) {\n          return {\n            ok: response.ok,\n            data: [],\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async importOrder(token, data) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}import_orders?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Auth-Token': token\n          },\n          body: data,\n          contentType: false,\n          processData: false\n        });\n\n        if (response.ok) {\n          return {\n            ok: response.ok,\n            data: [],\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async orderList4Shipment(token) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_waiting_for_shipment_orders?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async orderList4Return(token, startOfMonth, endOfMonth) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_waiting_for_return_orders?startDate=${startOfMonth}&endDate=${endOfMonth}&shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    orderList4ReturnByStatus(token, data) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_waiting_for_return_orders?shopifyStore=${window.getShopifyStore()}`;\n      return new Ember.RSVP.Promise(function (resolve, reject) {\n        $.ajax({\n          url: url,\n          type: 'GET',\n          data: data,\n          dataType: 'JSON',\n          beforeSend: function (xhr) {\n            xhr.setRequestHeader(\"Auth-Token\", token);\n            xhr.setRequestHeader('Cache-Control', 'no-cache, no-store, must-revalidate');\n            xhr.setRequestHeader('Pragma', 'no-cache');\n            xhr.setRequestHeader('Expires', '0');\n          }\n        }).then((result, status, xhr) => {\n          resolve({\n            ok: true,\n            data: result,\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        }, xhr => {\n          reject({\n            ok: false,\n            data: [],\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        });\n      });\n    },\n\n    orderList4All(token, data) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_all_orders?shopifyStore=${window.getShopifyStore()}`;\n      return new Ember.RSVP.Promise(function (resolve, reject) {\n        $.ajax({\n          url: url,\n          type: 'GET',\n          data: data,\n          dataType: 'JSON',\n          beforeSend: function (xhr) {\n            xhr.setRequestHeader(\"Auth-Token\", token);\n            xhr.setRequestHeader('Cache-Control', 'no-cache, no-store, must-revalidate');\n            xhr.setRequestHeader('Pragma', 'no-cache');\n            xhr.setRequestHeader('Expires', '0');\n          }\n        }).then((result, status, xhr) => {\n          resolve({\n            ok: true,\n            data: result,\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        }, xhr => {\n          reject({\n            ok: false,\n            data: [],\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        });\n      });\n    },\n\n    getStripeOrderList(token, data) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_stripe_orders`;\n      return new Ember.RSVP.Promise(function (resolve, reject) {\n        $.ajax({\n          url: url,\n          type: 'GET',\n          data: data,\n          dataType: 'JSON',\n          beforeSend: function (xhr) {\n            xhr.setRequestHeader(\"Auth-Token\", token);\n            xhr.setRequestHeader('Cache-Control', 'no-cache, no-store, must-revalidate');\n            xhr.setRequestHeader('Pragma', 'no-cache');\n            xhr.setRequestHeader('Expires', '0');\n          }\n        }).then((result, status, xhr) => {\n          resolve({\n            ok: true,\n            data: result,\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        }, xhr => {\n          reject({\n            ok: false,\n            data: [],\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        });\n      });\n    },\n\n    products(token, data) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}shopify_product?shopifyStore=${window.getShopifyStore()}`;\n      return new Ember.RSVP.Promise(function (resolve, reject) {\n        $.ajax({\n          url: url,\n          type: 'GET',\n          data: data,\n          dataType: 'JSON',\n          beforeSend: function (xhr) {\n            xhr.setRequestHeader(\"Auth-Token\", token);\n            xhr.setRequestHeader('Cache-Control', 'no-cache, no-store, must-revalidate');\n            xhr.setRequestHeader('Pragma', 'no-cache');\n            xhr.setRequestHeader('Expires', '0');\n          }\n        }).then((result, status, xhr) => {\n          resolve({\n            ok: true,\n            data: result,\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        }, xhr => {\n          reject({\n            ok: false,\n            data: [],\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        });\n      });\n    },\n\n    orderList4Shipped(token, data) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_shipped_orders?shopifyStore=${window.getShopifyStore()}`;\n      return new Ember.RSVP.Promise(function (resolve, reject) {\n        $.ajax({\n          url: url,\n          type: 'GET',\n          data: data,\n          dataType: 'JSON',\n          beforeSend: function (xhr) {\n            xhr.setRequestHeader(\"Auth-Token\", token);\n            xhr.setRequestHeader('Cache-Control', 'no-cache, no-store, must-revalidate');\n            xhr.setRequestHeader('Pragma', 'no-cache');\n            xhr.setRequestHeader('Expires', '0');\n          }\n        }).then((result, status, xhr) => {\n          resolve({\n            ok: true,\n            data: result,\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        }, xhr => {\n          reject({\n            ok: false,\n            data: [],\n            code: xhr.status,\n            message: xhr.statusText\n          });\n        });\n      });\n    },\n\n    async checkRequestPaymentType(token, file) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}request_payment_type_check`;\n      const formData = new FormData();\n      formData.append(\"file\", file);\n      const response = await (0, _fetch.default)(url, {\n        method: 'POST',\n        body: formData,\n        headers: {\n          'Auth-Token': token\n        }\n      });\n\n      if (response.ok) {\n        let data = await response.json();\n        return {\n          ok: response.ok,\n          data\n        };\n      }\n    },\n\n    async importAsteroomRequestPaymentToSap(token, file) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}import_asteroom_request_payment?isAP=false`;\n      const formData = new FormData();\n      formData.append(\"file\", file);\n      const response = await (0, _fetch.default)(url, {\n        method: 'POST',\n        body: formData,\n        headers: {\n          'Auth-Token': token\n        }\n      });\n\n      if (response.ok) {\n        let data = await response.json();\n        return {\n          ok: response.ok,\n          data\n        };\n      }\n    },\n\n    async importAsteroomRequestPaymentToSapAP(token, file) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}import_asteroom_request_payment?isAP=true`;\n      const formData = new FormData();\n      formData.append(\"file\", file);\n      const response = await (0, _fetch.default)(url, {\n        method: 'POST',\n        body: formData,\n        headers: {\n          'Auth-Token': token\n        }\n      });\n\n      if (response.ok) {\n        let data = await response.json();\n        return {\n          ok: response.ok,\n          data\n        };\n      }\n    },\n\n    async importCounsellingToArInvoice(token, file) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}import_counselling_ar_invoice`;\n      const formData = new FormData();\n      formData.append(\"file\", file);\n      const response = await (0, _fetch.default)(url, {\n        method: 'POST',\n        body: formData,\n        headers: {\n          'Auth-Token': token\n        }\n      });\n\n      if (response.ok) {\n        let data = await response.json();\n        return {\n          ok: response.ok,\n          data\n        };\n      }\n    },\n\n    async importAsteroomOrderToSapAP(token, file, postingDate) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}import_asteroom_order?postingDate=${postingDate}`;\n      const formData = new FormData();\n      formData.append(\"file\", file);\n      const response = await (0, _fetch.default)(url, {\n        method: 'POST',\n        body: formData,\n        headers: {\n          'Auth-Token': token\n        }\n      });\n\n      if (response.ok) {\n        let data = await response.json();\n        return {\n          ok: response.ok,\n          data\n        };\n      }\n    },\n\n    async importAsteroomOrderToSapAr(token, file, postingDate) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}import_asteroom_order?postingDate=${postingDate}&isAr=true`;\n      const formData = new FormData();\n      formData.append(\"file\", file);\n      const response = await (0, _fetch.default)(url, {\n        method: 'POST',\n        body: formData,\n        headers: {\n          'Auth-Token': token\n        }\n      });\n\n      if (response.ok) {\n        let data = await response.json();\n        return {\n          ok: response.ok,\n          data\n        };\n      }\n    },\n\n    async importAsteroomOrderToSapRWC008(token, file) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}import_asteroom_order_rwc008`;\n      const formData = new FormData();\n      formData.append(\"file\", file);\n      const response = await (0, _fetch.default)(url, {\n        method: 'POST',\n        body: formData,\n        headers: {\n          'Auth-Token': token\n        }\n      });\n\n      if (response.ok) {\n        let data = await response.json();\n        return {\n          ok: response.ok,\n          data\n        };\n      }\n    },\n\n    async importAmazonFBAOrderToSapAP(token, file, isAsteroom) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}import_amazon_fba?isAsteroom=${isAsteroom ? 'true' : 'false'}`;\n      const formData = new FormData();\n      formData.append(\"file\", file);\n      const response = await (0, _fetch.default)(url, {\n        method: 'POST',\n        body: formData,\n        headers: {\n          'Auth-Token': token\n        }\n      });\n\n      if (response.ok) {\n        let data = await response.json();\n        return {\n          ok: response.ok,\n          data\n        };\n      }\n    },\n\n    async importInvoiceToSapAr(token, file, isAsteroom) {\n      const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}import_invoice_to_sap_ar`;\n      const formData = new FormData();\n      formData.append(\"file\", file);\n      const response = await (0, _fetch.default)(url, {\n        method: 'POST',\n        body: formData,\n        headers: {\n          'Auth-Token': token\n        }\n      });\n\n      if (response.ok) {\n        let data = await response.json();\n        return {\n          ok: response.ok,\n          data\n        };\n      } else {\n        let data = await response.json();\n        return {\n          ok: false,\n          data\n        };\n      }\n    },\n\n    async downloadPickingList(token, SNS) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}download_picking_list?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(SNS)\n        });\n\n        if (response.ok) {\n          const name = response.headers.get('content-disposition').split(';').find(n => n.includes('filename=')).replace('filename=', '').trim();\n          let blob = await response.blob();\n          return {\n            ok: response.ok,\n            data: {\n              blob: blob,\n              fileName: name\n            },\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async mailAndExport2Sap(token, SNS) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}send_thank_you_letter_and_export_to_sap?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(SNS)\n        });\n\n        if (response.ok) {\n          return {\n            ok: response.ok,\n            data: [],\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async freehardwareToSap(token, body) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}free_hardware_to_asteroom`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(body)\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async freehardwareToProcessingOrders(token, body) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}free_hardware_to_processing_orders`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(body)\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async adjustInventory(token, body) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}adjust_inventory?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(body)\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async setReturnOrders(token, SNS) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}set_to_waiting_for_return?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(SNS)\n        });\n\n        if (response.ok) {\n          return {\n            ok: response.ok,\n            data: [],\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async sendEmail(token, data) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}mail?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(data)\n        });\n\n        if (response.ok) {\n          return {\n            ok: response.ok,\n            data: [],\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        console.log(response);\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async confirmReturnedOrders(token, SNS) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}received_products_return?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(SNS)\n        });\n\n        if (response.ok) {\n          return {\n            ok: response.ok,\n            data: [],\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async packageListByOrder(token, SN) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}get_packages?shopifySN=${SN}&shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          headers: {\n            'Auth-Token': token\n          }\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async deleteOrder(token, SN) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}cancel?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify({\n            shopifySN: SN\n          })\n        });\n\n        if (response.ok) {\n          return {\n            ok: response.ok,\n            data: [],\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async proceedCreditNote(token, SN) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}set_to_return_in_sap?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify({\n            shopifySN: SN\n          })\n        });\n\n        if (response.ok) {\n          let data = await response.json();\n          return {\n            ok: response.ok,\n            data: data,\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    },\n\n    async editOrder(token, data) {\n      try {\n        const url = `${_environment.default.APP.rootURL}${_environment.default.APP.APINAMESPACE}add_tracking_number?shopifyStore=${window.getShopifyStore()}`;\n        const response = await (0, _fetch.default)(url, {\n          method: 'post',\n          headers: {\n            'Content-Type': 'application/json',\n            'Auth-Token': token\n          },\n          body: JSON.stringify(data)\n        });\n\n        if (response.ok) {\n          return {\n            ok: response.ok,\n            data: [],\n            code: response.status,\n            message: response.statusText\n          };\n        }\n\n        throw {\n          ok: response.ok,\n          data: [],\n          code: response.status,\n          message: response.statusText\n        };\n      } catch (error) {\n        return error;\n      }\n    }\n\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/services/session\", [\"exports\", \"ember-simple-auth/services/session\"], function (_exports, _session) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _session.default;\n  _exports.default = _default;\n});","define(\"client-cma/services/swal\", [\"exports\", \"ember-sweetalert/services/swal\"], function (_exports, _swal) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  Object.defineProperty(_exports, \"default\", {\n    enumerable: true,\n    get: function () {\n      return _swal.default;\n    }\n  });\n});","define(\"client-cma/services/toast\", [\"exports\", \"client-cma/config/environment\", \"ember-toastr/services/toast\"], function (_exports, _environment, _toast) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const toastrOptions = {\n    closeButton: true,\n    debug: false,\n    newestOnTop: true,\n    progressBar: true,\n    positionClass: 'toast-top-right',\n    preventDuplicates: true,\n    onclick: null,\n    showDuration: '300',\n    hideDuration: '1000',\n    timeOut: '4000',\n    extendedTimeOut: '1000',\n    showEasing: 'swing',\n    hideEasing: 'linear',\n    showMethod: 'fadeIn',\n    hideMethod: 'fadeOut'\n  };\n  const config = _environment.default['ember-toastr'] || {\n    toastrOptions: toastrOptions\n  };\n\n  var _default = _toast.default.extend({\n    defaultToastrOptions: toastrOptions,\n    config: config\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/session-stores/application\", [\"exports\", \"ember-simple-auth/session-stores/cookie\"], function (_exports, _cookie) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = _cookie.default.extend({\n    cookieExpirationTime: null,\n    cookieName: 'ember_simple_auth:session'\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/asteroom/route\", [\"exports\", \"client-cma/config/environment\"], function (_exports, _environment) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    auth: Ember.inject.service(),\n    session: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async model() {\n      try {\n        const token = this.session.data.authenticated.token;\n        const response = await this.auth.isAuthenticated(token);\n\n        if (response.ok) {\n          if (this.session.data.authenticated.canUseAsteroom === false) {\n            alert(\"你沒有權限，請洽管理員\");\n            this.transitionTo('/');\n          }\n\n          const account = response.data.email;\n          console.log(this.session.data.authenticated);\n          const {\n            canUseAsteroom,\n            canImportAsteroomDynamicCustomer,\n            canUsePpInc\n          } = this.session.data.authenticated;\n          let options = [{\n            content: 'Processing Orders',\n            route: '/asteroom/order/process'\n          }, {\n            content: 'Shipped Orders',\n            route: '/asteroom/order/complete'\n          }, {\n            content: 'All Orders',\n            route: '/asteroom/order/list'\n          }, {\n            content: 'Return Orders',\n            route: '/asteroom/order/return'\n          }, {\n            content: 'Calibrate Address',\n            route: '/asteroom/order/address'\n          }, {\n            content: 'RP TO SAP',\n            route: '/asteroom/order/rptosap'\n          }, {\n            content: 'Amazon FBA orders to sap',\n            route: '/asteroom/order/amazonfbatosap'\n          }, {\n            content: 'Free hardware',\n            route: '/asteroom/order/freehw'\n          }];\n\n          if (canUseAsteroom && !canUsePpInc && canImportAsteroomDynamicCustomer) {\n            options = options.filter(o => o.route === '/asteroom/order/rptosap');\n          }\n\n          return {\n            options: options,\n            account: account\n          };\n        } else {\n          throw response;\n        }\n      } catch (error) {\n        this.toast.error('AUTHENTICATE_FAIL');\n        await this.session.invalidate();\n        this.transitionTo('login');\n      }\n    },\n\n    setupController(controller, model) {\n      controller.set('filter', '');\n      controller.set('model', model);\n\n      if (_environment.default.environment !== 'production') {\n        document.documentElement.dataset.isTest = 'true';\n      }\n    },\n\n    actions: {\n      homePage() {\n        this.transitionTo('/');\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/asteroom/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"E1+BrWqc\",\n    \"block\": \"{\\\"symbols\\\":[\\\"option\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashborad-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"top\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[12,\\\"style\\\",\\\"border-radius: 50%;\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"homePage\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fas fa-home fa-1x\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"signOut\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"icon icon-sign-out-white\\\"],[8],[9],[0,\\\"\\\\n            \\\"],[7,\\\"span\\\",true],[8],[1,[24,[\\\"model\\\",\\\"account\\\"]],false],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"h1\\\",true],[8],[0,\\\"Asteroom\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashboard\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"model\\\",\\\"options\\\"]]],null,{\\\"statements\\\":[[0,\\\"            \\\"],[5,\\\"dashmenu\\\",[],[[\\\"@route\\\",\\\"@content\\\"],[[23,1,[\\\"route\\\"]],[23,1,[\\\"content\\\"]]]]],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[1]},null],[0,\\\"    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/asteroom/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/counselling/route\", [\"exports\", \"client-cma/config/environment\"], function (_exports, _environment) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    auth: Ember.inject.service(),\n    session: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async model() {\n      try {\n        const token = this.session.data.authenticated.token;\n        const response = await this.auth.isAuthenticated(token);\n\n        if (response.ok) {\n          if (this.session.data.authenticated.canUseCounselling === false) {\n            alert(\"你沒有權限，請洽管理員\");\n            this.transitionTo('/');\n          }\n\n          const account = response.data.email;\n          const options = [{\n            content: 'Excel匯入AR發票',\n            route: '/counselling/order/tosaparinvoice'\n          }];\n          return {\n            options: options,\n            account: account\n          };\n        } else {\n          throw response;\n        }\n      } catch (error) {\n        this.toast.error('AUTHENTICATE_FAIL');\n        await this.session.invalidate();\n        this.transitionTo('login');\n      }\n    },\n\n    setupController(controller, model) {\n      controller.set('filter', '');\n      controller.set('model', model);\n\n      if (_environment.default.environment !== 'production') {\n        document.documentElement.dataset.isTest = 'true';\n      }\n    },\n\n    actions: {\n      homePage() {\n        this.transitionTo('/');\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/counselling/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"uCwAoJav\",\n    \"block\": \"{\\\"symbols\\\":[\\\"option\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashborad-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"top\\\"],[8],[0,\\\"\\\\n        \\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[12,\\\"style\\\",\\\"border-radius: 50%;\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"homePage\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fas fa-home fa-1x\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"signOut\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"icon icon-sign-out-white\\\"],[8],[9],[0,\\\"\\\\n            \\\"],[7,\\\"span\\\",true],[8],[1,[24,[\\\"model\\\",\\\"account\\\"]],false],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"h1\\\",true],[8],[0,\\\"逍遙心理\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashboard\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"model\\\",\\\"options\\\"]]],null,{\\\"statements\\\":[[0,\\\"            \\\"],[5,\\\"dashmenu\\\",[],[[\\\"@route\\\",\\\"@content\\\"],[[23,1,[\\\"route\\\"]],[23,1,[\\\"content\\\"]]]]],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[1]},null],[0,\\\"    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/counselling/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/index/route\", [\"exports\", \"client-cma/config/environment\"], function (_exports, _environment) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    auth: Ember.inject.service(),\n    session: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    setupController(controller, model) {\n      controller.set('filter', '');\n      controller.set('model', model);\n\n      if (_environment.default.environment !== 'production') {\n        document.documentElement.dataset.isTest = 'true';\n      }\n    },\n\n    async model() {\n      try {\n        const token = this.session.data.authenticated.token;\n        const response = await this.auth.isAuthenticated(token);\n\n        if (response.ok) {\n          const account = response.data.email;\n          const options = [{\n            content: 'Asteroom',\n            route: '/asteroom',\n            shopifyStore: 'asteroom',\n            isDisabled: true\n          }, {\n            content: 'PPInc',\n            route: '/ppinc',\n            shopifyStore: 'ppinc',\n            isDisabled: true\n          }, {\n            content: '香港蒙恬',\n            route: '/pphk',\n            shopifyStore: 'pphk',\n            isDisabled: true\n          }, {\n            content: '台灣蒙恬',\n            route: '/pptw',\n            shopifyStore: 'pptw',\n            isDisabled: true\n          }, {\n            content: '逍遙心理',\n            route: '/counselling',\n            shopifyStore: 'counselling',\n            isDisabled: true\n          } // {\n          //     content: 'Processing Orders',\n          //     route: '/order/process'\n          // },\n          // {\n          //     content: 'Shipped Orders',\n          //     route: '/order/complete'\n          // },\n          // {\n          //     content: 'All Orders',\n          //     route: '/order/list'\n          // },\n          // {\n          //     content: 'Return Orders',\n          //     route: '/order/return'\n          // },\n          // {\n          //     content: 'Calibrate Address',\n          //     route: '/order/address'\n          // }\n          ];\n          console.log(options);\n\n          if (this.session.data.authenticated.canUseAsteroom) {\n            options.find(i => i.shopifyStore === 'asteroom').isDisabled = false;\n          }\n\n          if (this.session.data.authenticated.canUsePpHk) {\n            options.find(i => i.shopifyStore === 'pphk').isDisabled = false;\n          }\n\n          if (this.session.data.authenticated.canUsePpInc) {\n            options.find(i => i.shopifyStore === 'ppinc').isDisabled = false;\n          }\n\n          if (this.session.data.authenticated.canUsePpTw) {\n            options.find(i => i.shopifyStore === 'pptw').isDisabled = false;\n          }\n\n          if (this.session.data.authenticated.canUseCounselling) {\n            options.find(i => i.shopifyStore === 'counselling').isDisabled = false;\n          }\n\n          return {\n            options: options,\n            account: account\n          };\n        } else {\n          throw response;\n        }\n      } catch (error) {\n        this.toast.error('AUTHENTICATE_FAIL');\n        await this.session.invalidate();\n        this.transitionTo('login');\n      }\n    }\n\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/index/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"hptZc/P7\",\n    \"block\": \"{\\\"symbols\\\":[\\\"option\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashborad-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"top\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[12,\\\"style\\\",\\\"border-radius: 50%;visibility:hidden\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"homePage\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fas fa-home fa-1x\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"signOut\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"icon icon-sign-out-white\\\"],[8],[9],[0,\\\"\\\\n            \\\"],[7,\\\"span\\\",true],[8],[1,[24,[\\\"model\\\",\\\"account\\\"]],false],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashboard\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"model\\\",\\\"options\\\"]]],null,{\\\"statements\\\":[[0,\\\"            \\\"],[5,\\\"dashmenu\\\",[],[[\\\"@route\\\",\\\"@content\\\",\\\"@isDisabled\\\"],[[23,1,[\\\"route\\\"]],[23,1,[\\\"content\\\"]],[23,1,[\\\"isDisabled\\\"]]]]],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[1]},null],[0,\\\"    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/index/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/login/route\", [\"exports\", \"client-cma/utils/Data\", \"client-cma/config/environment\"], function (_exports, _Data, _environment) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    beforeModal() {\n      if (this.session.isAuthenticated) {\n        this.transitionTo('/');\n      }\n    },\n\n    actions: {\n      async authenticate() {\n        try {\n          this.send('startSpinner');\n          let account = {\n            email: this.controller.email,\n            password: this.controller.password\n          };\n\n          const message = _Data.default.validateObject(account);\n\n          if (_Data.default.isEmptyArray(message)) {\n            await this.session.authenticate(_environment.default.APP.AUTHENTICATOR, account);\n          } else {\n            throw new Error(message);\n          }\n\n          if (this.session.isAuthenticated) this.transitionTo('/');\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n\n        return false;\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/login/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"MD008Ynw\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"login-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"form\\\",true],[10,\\\"class\\\",\\\"login\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"h2\\\",true],[10,\\\"class\\\",\\\"title\\\"],[8],[0,\\\"CMA\\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"email\\\"],[8],[0,\\\"Email\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"email\\\",\\\"text\\\",\\\"form-control\\\",[24,[\\\"email\\\"]]]]],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"password\\\"],[8],[0,\\\"Password\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"value\\\",\\\"autocomplete\\\"],[\\\"password\\\",\\\"password\\\",\\\"form-control\\\",[24,[\\\"password\\\"]],\\\"on\\\"]]],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"btn-login\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary btn-block\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"authenticate\\\"]],[8],[0,\\\"Login\\\"],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/login/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/address/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    actions: {\n      dblClick(data) {\n        if (data.length === 0) return false;\n        this.send('displayAddress', data);\n      },\n\n      btnConfirm() {\n        const dt = $('.dataTable').DataTable();\n        const {\n          street,\n          street2,\n          company,\n          city,\n          zip,\n          shopifySN,\n          ignoreSecondAddressCheck\n        } = this.address;\n        const state = $('#state option:selected').val();\n        const country = $('#country option:selected').val();\n        this.send('calibrateAddress', dt, {\n          shopifySN: shopifySN,\n          street: street,\n          street2: street2,\n          company: company,\n          city: city,\n          state: state,\n          country: country,\n          zip: zip,\n          ignoreSecondAddressCheck: ignoreSecondAddressCheck\n        });\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/address/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async addressList4Calibrated(token) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.addressList4Calibrated(token);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    modalShow(state) {\n      $('#state option').removeAttr('selected').filter(`[value=${state}]`).attr('selected', true);\n      $(`#${this.controller.model.mDialog.id}`).modal({\n        backdrop: 'static'\n      });\n    },\n\n    modalHide() {\n      $(`#${this.controller.model.mDialog.id}`).modal('hide');\n    },\n\n    async model() {\n      const {\n        columns\n      } = this;\n      const token = this.session.data.authenticated.token;\n      const dataSource = await this.addressList4Calibrated(token);\n      return {\n        options: {\n          data: dataSource,\n          columns: columns,\n          order: [[0, 'asc']]\n        },\n        mDialog: {\n          title: 'Edit',\n          id: 'addressModal'\n        },\n        storeTitle: window.getStoreTitle()\n      };\n    },\n\n    actions: {\n      async displayAddress(data) {\n        const token = this.session.data.authenticated.token;\n        const shopifySN = data.firstObject.shopifySN;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.addressDetail(token, shopifySN);\n\n          if (response.ok) {\n            const address = response.data;\n            this.controller.set('address', address);\n            this.controller.set('display', data.firstObject.idDisplay);\n            this.modalShow(address.state);\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async calibrateAddress(dt, address) {\n        const token = this.session.data.authenticated.token;\n\n        const message = _Data.default.validateObject(address);\n\n        try {\n          if (_Data.default.isEmptyArray(message)) {\n            this.modalHide();\n            this.send('startSpinner');\n\n            if (address.ignoreSecondAddressCheck == null) {\n              address.ignoreSecondAddressCheck = false;\n            }\n\n            const response = await this.order.calibrateAddress(token, address);\n\n            if (response.ok) {\n              const dataSource = await this.addressList4Calibrated(token);\n              dt.clear().rows.add(dataSource).draw();\n              this.toast.success('Calibrate address successful');\n            } else {\n              throw response;\n            }\n          } else {\n            throw new Error(message);\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      }\n\n    },\n    columns: [{\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: 'ID NO'\n    }, {\n      data: 'dueDate',\n      title: 'Due Date',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('America/Los_Angeles').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'email',\n      title: 'Email'\n    }, {\n      data: 'shippedAddress',\n      title: 'Shipping Address'\n    }, // { data: 'sapId', title: 'Sap Id', defaultContent: '-'},\n    {\n      data: 'trackingCompany',\n      title: 'Tracking Company',\n      defaultContent: 'Fedex',\n      className: 'text-center'\n    }, // { \n    //     data: 'isShipped', \n    //     title: 'Ship<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data) {\n    //             return '<i class=\"fa fa-check-circle fa-lg text-success\" aria-hidden=\"true\"></i>';\n    //         } else {\n    //             return '<i class=\"fa fa-times-circle fa-lg text-danger\" aria-hidden=\"true\"></i>';\n    //         }\n    //     },\n    // },\n    // { \n    //     data: 'isDownloaded', \n    //     title: 'Download<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         if(data) {\n    //             return `<span class=\"badge badge-success\">${data}</span>`;\n    //         } else {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         }\n    //     },\n    // },\n    // { \n    //     data: 'mailStatus', \n    //     title: 'Mail<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data === 'Failed') {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         } else {\n    //             return data;\n    //         }\n    //     } \n    // },\n    // { \n    //     data: 'cancelStatus', \n    //     title: 'Cancel<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         return `<span class=\"badge\">${data ? data : '-'}</span>`;\n    //     } \n    // },\n    {\n      data: 'note',\n      title: 'Note',\n      defaultContent: '-',\n      className: 'text-center'\n    }]\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/address/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"YNwMq9jM\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"h1\\\",true],[8],[1,[24,[\\\"model\\\",\\\"storeTitle\\\"]],false],[9],[0,\\\"\\\\n\\\"],[7,\\\"h1\\\",true],[8],[0,\\\"Calibrate Address\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"h4\\\",true],[8],[0,\\\"(High-risk orders will be highlighted in red)\\\"],[9],[0,\\\"\\\\n\\\"],[5,\\\"datatable\\\",[],[[\\\"@options\\\",\\\"@dblClick\\\"],[[24,[\\\"model\\\",\\\"options\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"dblClick\\\"],null]]]],[0,\\\"\\\\n\\\"],[5,\\\"modal-dialog\\\",[],[[\\\"@modalTitle\\\",\\\"@elementId\\\",\\\"@comfirm\\\"],[[24,[\\\"model\\\",\\\"mDialog\\\",\\\"title\\\"]],[24,[\\\"model\\\",\\\"mDialog\\\",\\\"id\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"btnConfirm\\\"],null]]],{\\\"statements\\\":[[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"container form-inline\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"h4\\\",true],[10,\\\"class\\\",\\\"title\\\"],[8],[1,[22,\\\"display\\\"],false],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-3\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"company\\\"],[10,\\\"class\\\",\\\"col-sm-2\\\"],[8],[0,\\\"Company\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"company\\\",\\\"text\\\",\\\"form-control col-sm-10\\\",[24,[\\\"address\\\",\\\"company\\\"]]]]],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-3\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"street\\\"],[10,\\\"class\\\",\\\"col-sm-2\\\"],[8],[0,\\\"Street\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"street\\\",\\\"text\\\",\\\"form-control col-sm-10\\\",[24,[\\\"address\\\",\\\"street\\\"]]]]],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-3\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"street2\\\"],[10,\\\"class\\\",\\\"col-sm-2\\\"],[8],[0,\\\"Street2\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"street2\\\",\\\"text\\\",\\\"form-control col-sm-10\\\",[24,[\\\"address\\\",\\\"street2\\\"]]]]],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-3\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"city\\\"],[10,\\\"class\\\",\\\"col-sm-2\\\"],[8],[0,\\\"City\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"city\\\",\\\"text\\\",\\\"form-control col-sm-10\\\",[24,[\\\"address\\\",\\\"city\\\"]]]]],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-3\\\"],[8],[0,\\\"\\\\n            \\\"],[15,\\\"state\\\",[]],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-3\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"country\\\"],[10,\\\"class\\\",\\\"col-sm-2\\\"],[8],[0,\\\"Country\\\"],[9],[0,\\\"\\\\n            \\\"],[7,\\\"select\\\",true],[10,\\\"name\\\",\\\"country\\\"],[10,\\\"size\\\",\\\"1\\\"],[10,\\\"id\\\",\\\"country\\\"],[10,\\\"class\\\",\\\"form-control form-control-lg col-sm-10\\\"],[8],[0,\\\"\\\\n                \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"US\\\"],[8],[0,\\\"US\\\"],[9],[0,\\\"\\\\n            \\\"],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-3\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"zip\\\"],[10,\\\"class\\\",\\\"col-sm-2\\\"],[8],[0,\\\"Postal Code\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"zip\\\",\\\"text\\\",\\\"form-control col-sm-10\\\",[24,[\\\"address\\\",\\\"zip\\\"]]]]],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-3\\\"],[8],[0,\\\"\\\\n             \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"ignoreAddress2Failed\\\"],[10,\\\"style\\\",\\\"margin-right: 15px;\\\"],[8],[0,\\\"忽略「需要第二地址錯誤檢查」\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"checked\\\"],[\\\"ignoreAddress2Failed\\\",\\\"checkbox\\\",\\\"form-control\\\",[24,[\\\"address\\\",\\\"ignoreSecondAddressCheck\\\"]]]]],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\\n    \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]}]],\\\"hasEval\\\":true}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/address/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/amazonfbatosap/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    requestPaymentType: '',\n    toast: Ember.inject.service(),\n    actions: {\n      toPenpowerIncSap() {\n        const excelData = document.querySelector('#exceldata');\n\n        if (excelData == null || excelData.files[0] == null) {\n          this.toast.error(\"No file selected\");\n          return;\n        }\n\n        const yes = confirm('你確定嗎？');\n\n        if (!yes) {\n          return;\n        }\n\n        this.send('importToPenpowerIncSap', excelData.files[0]);\n      },\n\n      toAsteroomSap() {\n        const excelData = document.querySelector('#exceldata');\n\n        if (excelData == null || excelData.files[0] == null) {\n          this.toast.error(\"No file selected\");\n          return;\n        }\n\n        const yes = confirm('你確定嗎？');\n\n        if (!yes) {\n          return;\n        }\n\n        this.send('importToAsteroomSap', excelData.files[0]);\n      },\n\n      inputOnChange(e) {\n        this.send('checkRequestPaymentType', e.target.files[0]);\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/amazonfbatosap/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async orderList4Shipped(token, queryParams) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.orderList4Shipped(token, queryParams);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    download(data) {\n      let elm = document.createElement('a');\n      elm.href = URL.createObjectURL(data.blob);\n      elm.setAttribute('download', data.fileName);\n      elm.click();\n    },\n\n    actions: {\n      async setReturnOrders(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows({\n          selected: true\n        }).data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.setReturnOrders(token, selectedSNS);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Succcessful');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"沒有操作權限\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async checkRequestPaymentType(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.checkRequestPaymentType(token, file);\n\n          if (response.ok) {\n            this.controller.set('requestPaymentType', response.data);\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importToPenpowerIncSap(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAmazonFBAOrderToSapAP(token, file, false);\n\n          if (response.ok) {\n            this.toast.success(`成功 amazon訂單數:${response.data.count}`);\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importToAsteroomSap(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAmazonFBAOrderToSapAP(token, file, true);\n\n          if (response.ok) {\n            this.toast.success(`成功 AU:${response.data.AU}, UK:${response.data.UK}, EU:${response.data.EU}`);\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async LetterOfThanks(data, dt) {\n        const token = this.session.data.authenticated.token;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.sendEmail(token, data);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Send the Letter of Thanks Succcessfully');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"請至Shopify後台操作\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async orderList4Shipped(data, dt) {\n        const token = this.session.data.authenticated.token;\n      },\n\n      test() {\n        return \"hk\";\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/amazonfbatosap/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"jylKKP94\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"upload-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n    \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"exceldata\\\"],[8],[0,\\\"Choose a file\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"input\\\",true],[10,\\\"id\\\",\\\"exceldata\\\"],[10,\\\"name\\\",\\\"avatar\\\"],[10,\\\"accept\\\",\\\".csv\\\"],[10,\\\"type\\\",\\\"file\\\"],[8],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\\n    \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[10,\\\"style\\\",\\\"max-width: 250px\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"toPenpowerIncSap\\\"],null]],[8],[0,\\\"匯入PenPower Inc Sap\\\"],[9],[0,\\\" \\\\n    \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[10,\\\"style\\\",\\\"max-width: 250px\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"toAsteroomSap\\\"],null]],[8],[0,\\\"匯入Asteroom Sap\\\"],[9],[0,\\\" \\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/amazonfbatosap/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/complete/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    actions: {\n      btnClick(dt, config) {\n        this.send(config.key, dt, config);\n      },\n\n      pickTheDate(date, mode) {\n        //切換時間時不搜尋keyword\n        const dt = $('.dataTable').DataTable(); // const filter = this.filter;\n\n        this.set('filter', '');\n        this.send('orderList4Shipped', {\n          date: date,\n          mode: mode,\n          filter: ''\n        }, dt);\n      },\n\n      filterData(dt) {\n        const filter = this.filter;\n        const oTable = Ember.typeOf(dt) !== 'undefined' ? dt : $('.dataTable').DataTable();\n        const date = moment($(\"#datetimepicker\").data().date);\n        const mode = $('#datetimepicker').data(\"DateTimePicker\").options().viewMode.slice(0, -1);\n        this.send('orderList4Shipped', {\n          date: date,\n          mode: mode,\n          filter: filter\n        }, oTable);\n      },\n\n      mail(dt, data) {\n        this.send('LetterOfThanks', {\n          shopifySN: data.shopifySN,\n          mailSubject: 'ThankYouLetter'\n        }, dt);\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/complete/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async orderList4Shipped(token, queryParams) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.orderList4Shipped(token, queryParams);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    download(data) {\n      let elm = document.createElement('a');\n      elm.href = URL.createObjectURL(data.blob);\n      elm.setAttribute('download', data.fileName);\n      elm.click();\n    },\n\n    async model() {\n      const token = this.session.data.authenticated.token;\n      const {\n        buttons,\n        columns,\n        chineseColumns,\n        chinesebuttons\n      } = this;\n      const isChinesePage = window.isChinesePage();\n\n      var startDateAndEndDate = _Data.default.getStartDateAndEndDate(isChinesePage);\n\n      let queryParams = {\n        startDate: startDateAndEndDate.startDate,\n        endDate: startDateAndEndDate.endDate\n      }; // if(isChinesePage){\n      //     queryParams = {\n      //         startDate: Data.startOfTaipeiTimeZone('month'),\n      //         endDate: Data.endOfTaipeiTimeZone('month')\n      //     }\n      // }\n\n      const dataSource = await this.orderList4Shipped(token, queryParams);\n      let selectedColumns = columns;\n      let selectedButtons = buttons;\n\n      if (isChinesePage) {\n        selectedColumns = chineseColumns;\n        selectedButtons = chinesebuttons;\n      }\n\n      return {\n        options: {\n          data: dataSource,\n          buttons: selectedButtons,\n          columns: selectedColumns,\n          select: {\n            style: 'multi',\n            selector: 'td:not(:first-child :last-child)'\n          }\n        },\n        datetimeOptions: {\n          format: 'YYYY-MM',\n          viewMode: 'months',\n          timezone: isChinesePage ? 'Asia/Taipei' : 'America/Los_Angeles'\n        },\n        storeTitle: window.getStoreTitle()\n      };\n    },\n\n    setupController(controller, model) {\n      controller.set('filter', '');\n      controller.set('model', model);\n    },\n\n    actions: {\n      async setReturnOrders(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows({\n          selected: true\n        }).data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.setReturnOrders(token, selectedSNS);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Succcessful');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"沒有操作權限\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async downloadPackingList(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows('.selected').data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.downloadPickingList(token, selectedSNS);\n\n          if (response.ok) {\n            this.download(response.data);\n\n            if (dt) {\n              this.controller.send('filterData', dt);\n            } else {\n              this.controller.send('selectTheStatus', null);\n            }\n\n            this.toast.success('Completed');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async LetterOfThanks(data, dt) {\n        const token = this.session.data.authenticated.token;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.sendEmail(token, data);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Send the Letter of Thanks Succcessfully');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"請至Shopify後台操作\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async orderList4Shipped(data, dt) {\n        const token = this.session.data.authenticated.token;\n        const isChinesePage = window.isChinesePage(); // const time = data.date\n        // const localtz = moment.tz.guess()\n        // const date = time.clone().tz(localtz)\n        // console.log(date.utc().format());\n        // console.log(\"yes\");\n\n        var startDateAndEndDate = _Data.default.getStartDateAndEndDate(isChinesePage, data.date);\n\n        let queryParams = {\n          startDate: startDateAndEndDate.startDate,\n          endDate: startDateAndEndDate.endDate\n        }; // if(isChinesePage){\n        //     console.log(\"yes\");\n        //     console.log(data.mode);\n        //     console.log(data.date);\n        //     queryParams = {\n        //         startDate: Data.startOfTaipeiTimeZone(data.mode, data.date),\n        //         endDate: Data.endOfTaipeiTimeZone(data.mode, data.date)\n        //     }\n        // }\n\n        if (!_Data.default.isEmptyString(data.filter)) {\n          queryParams = {};\n          queryParams.keyword = data.filter;\n        }\n\n        const dataSource = await this.orderList4Shipped(token, queryParams);\n        console.log(dataSource);\n        dt.clear().rows.add(dataSource).draw();\n        dt.rows().deselect();\n        dt.columns.adjust();\n        $('table thead .details-control').css('width', '15px');\n      },\n\n      test() {\n        return \"hk\";\n      }\n\n    },\n    buttons: [{\n      key: 'downloadPackingList',\n      text: 'Download Packing List',\n      className: 'btn-primary'\n    }, {\n      key: 'setReturnOrders',\n      text: 'Cancel & Return Orders',\n      className: 'btn-primary'\n    } // {\n    //     key: 'LetterOfThanks',\n    //     text: 'Send the Thank you letter',\n    //     className: 'btn-primary',\n    // },\n    ],\n    chinesebuttons: [{\n      key: 'downloadPackingList',\n      text: 'Download Packing List',\n      className: 'btn-primary'\n    }, {\n      key: 'setReturnOrders',\n      text: '退貨',\n      className: 'btn-primary'\n    } // {\n    //     key: 'LetterOfThanks',\n    //     text: 'Send the Thank you letter',\n    //     className: 'btn-primary',\n    // },\n    ],\n    columns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, {\n      data: null,\n      orderable: false,\n      checkboxes: {\n        selectRow: true,\n        selectAll: true,\n        selectAllRender: '<input type=\"checkbox\" class=\"dt-checkboxes\">'\n      }\n    }, {\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: 'ID NO'\n    }, {\n      data: 'dueDate',\n      title: 'Due Date',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('America/Los_Angeles').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'email',\n      title: 'Email'\n    }, {\n      data: 'shippedAddress',\n      title: 'Shipping Address'\n    }, {\n      data: 'sapId',\n      title: 'Sap Id',\n      defaultContent: '-'\n    }, {\n      data: 'trackingCompany',\n      title: 'Tracking Company',\n      defaultContent: 'Fedex',\n      className: 'text-center'\n    }, {\n      data: 'isShipped',\n      title: 'Ship<br/>Status',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        if (data) {\n          return '<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>';\n        } else {\n          return '<i class=\"fa fa-times-circle fa-lg\" aria-hidden=\"true\"></i>';\n        }\n      }\n    }, // { \n    //     data: 'isDownloaded', \n    //     title: 'Download<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         if(data) {\n    //             return `<span class=\"badge badge-success\">${data}</span>`;\n    //         } else {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         }\n    //     },\n    // },\n    {\n      data: 'shipMailStatus',\n      title: 'Mail<br/>Status',\n      defaultContent: '-',\n      className: 'send-email text-center',\n      render: data => {\n        return `<span class=\"badge\">${data}</span><button id=\"send-email\" class=\"btn btn-sm btn-link\"><i class=\"fa fa-envelope\" aria-hidden=\"true\"></i> send mail</button>`;\n      }\n    } // { \n    //     data: 'cancelStatus', \n    //     title: 'Cancel<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         return `<span class=\"badge\">${data ? data : '-'}</span>`;\n    //     } \n    // },\n    // { data: 'note', title: 'Note', defaultContent: '-',className: 'text-center' },\n    ],\n    chineseColumns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, {\n      data: null,\n      orderable: false,\n      checkboxes: {\n        selectRow: true,\n        selectAll: true,\n        selectAllRender: '<input type=\"checkbox\" class=\"dt-checkboxes\">'\n      }\n    }, {\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: '訂單號碼'\n    }, {\n      data: 'dueDate',\n      title: 'Due Date',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('Asia/Taipei').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'email',\n      title: '信箱'\n    }, {\n      data: 'shippedAddress',\n      title: '運送地址'\n    }, {\n      data: 'sapId',\n      title: 'Sap Id',\n      defaultContent: '-'\n    }, // { \n    //     data: 'trackingCompany', \n    //     title: '物流公司', \n    //     defaultContent: 'Fedex', \n    //     className: 'text-center' \n    // },\n    {\n      data: 'trackingNumber',\n      title: 'trackingNumber',\n      orderable: false,\n      render: data => {\n        if (data) return data;else return '';\n      }\n    }, {\n      data: 'isShipped',\n      title: '是否出貨',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        if (data) {\n          return '<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>';\n        } else {\n          return '<i class=\"fa fa-times-circle fa-lg\" aria-hidden=\"true\"></i>';\n        }\n      }\n    }, // { \n    //     data: 'isDownloaded', \n    //     title: 'Download<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         if(data) {\n    //             return `<span class=\"badge badge-success\">${data}</span>`;\n    //         } else {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         }\n    //     },\n    // },\n    {\n      data: 'shipMailStatus',\n      title: '是否寄信成功',\n      defaultContent: '-',\n      className: 'send-email text-center',\n      render: data => {\n        return `<span class=\"badge\">${data}</span><button id=\"send-email\" class=\"btn btn-sm btn-link\"><i class=\"fa fa-envelope\" aria-hidden=\"true\"></i> send mail</button>`;\n      }\n    } // { \n    //     data: 'cancelStatus', \n    //     title: 'Cancel<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         return `<span class=\"badge\">${data ? data : '-'}</span>`;\n    //     } \n    // },\n    // { data: 'note', title: 'Note', defaultContent: '-',className: 'text-center' },\n    ]\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/complete/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"7SUQDkDP\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"h1\\\",true],[8],[1,[24,[\\\"model\\\",\\\"storeTitle\\\"]],false],[9],[0,\\\"\\\\n\\\"],[7,\\\"h1\\\",true],[8],[0,\\\"Shipped Orders\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"h4\\\",true],[8],[0,\\\"(High-risk orders will be highlighted in red)\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"card-tool\\\"],[8],[0,\\\"\\\\n    \\\"],[5,\\\"datetimepicker\\\",[],[[\\\"@options\\\",\\\"@dpChange\\\"],[[24,[\\\"model\\\",\\\"datetimeOptions\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"pickTheDate\\\"],null]]]],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-1\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"input-group search\\\"],[8],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"text\\\",\\\"form-control\\\",[24,[\\\"filter\\\"]]]]],false],[0,\\\"\\\\n            \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"input-group-append\\\"],[8],[0,\\\"\\\\n                \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"filterData\\\"]],[8],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fa fa-search\\\"],[10,\\\"aria-hidden\\\",\\\"true\\\"],[8],[9],[9],[0,\\\"\\\\n            \\\"],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"],[9],[0,\\\"\\\\n\\\"],[5,\\\"datatable\\\",[],[[\\\"@options\\\",\\\"@btnClick\\\",\\\"@mail\\\"],[[24,[\\\"model\\\",\\\"options\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"btnClick\\\"],null],[28,\\\"action\\\",[[23,0,[]],\\\"mail\\\"],null]]]]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/complete/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/freehw/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    requestPaymentType: '',\n    toast: Ember.inject.service(),\n    datas: [{\n      id: '001',\n      skus: []\n    }],\n    sapSkus: [{\n      \"name\": \"EN-Asteroom 3D Tour Kit II\",\n      \"sku\": \"S360TK02EN\"\n    }, {\n      \"name\": \"Asteroom fisheye lens\",\n      \"sku\": \"RLENSIBK100\"\n    }, {\n      \"name\": \"asteroom 360 rotating platform - large size\",\n      \"sku\": \"RPXWCRTW200\"\n    }, {\n      \"name\": \"Asteroom Tripod\",\n      \"sku\": \"RTRDWFK0100\"\n    }, {\n      \"name\": \"Lens Clip only\",\n      \"sku\": \"Misc\"\n    }],\n    iphoneCases: [{\n      \"name\": \"no\",\n      \"sku\": \"no\"\n    }, {\n      \"name\": \"Case-iPhone 7 Plus & iPhone 8 Plus\",\n      \"sku\": \"SCSI78P1UN\"\n    }, {\n      \"name\": \"Case-iPhone X & iPhone XS\",\n      \"sku\": \"SCSIXXS1UN\"\n    }, {\n      \"name\": \"Case-iPhone XR\",\n      \"sku\": \"SCSIXR01UN\"\n    }, {\n      \"name\": \"Case-iPhone XS Max\",\n      \"sku\": \"SCSIXSM1UN\"\n    }, {\n      \"name\": \"Case-iPhone 11\",\n      \"sku\": \"SCSI1101UN\"\n    }, {\n      \"name\": \"Case-iPhone 11 Pro\",\n      \"sku\": \"SCSI11P1UN\"\n    }, {\n      \"name\": \"Case-iPhone 11 Pro Max\",\n      \"sku\": \"SCSI11M1UN\"\n    }, {\n      \"name\": \"Case-iPhone 12 Pro\",\n      \"sku\": \"SCSI12P1UN\"\n    }, {\n      \"name\": \"Case-iPhone 12 Pro Max\",\n      \"sku\": \"SCSI12PMUN\"\n    }, {\n      \"name\": \"Case-iPhone 12 mini\",\n      \"sku\": \"SCSI12MNUN\"\n    }, {\n      \"name\": \"Case-iPhone 12\",\n      \"sku\": \"SCSI1201UN\"\n    }, {\n      \"name\": \"Case-iPhone 13\",\n      \"sku\": \"SCSI1301UN\"\n    }, {\n      \"name\": \"Case-iPhone 13 Pro\",\n      \"sku\": \"SCSI13P1UN\"\n    }, {\n      \"name\": \"Case-iPhone 13 Pro Max\",\n      \"sku\": \"SCSI13PMUN\"\n    }, {\n      \"name\": \"Case-iPhone 13 Mini\",\n      \"sku\": \"SCSI13MNUN\"\n    }, {\n      \"name\": \"Case-iPhone 7 & iPhone 8 & iPhone SE 2020\",\n      \"sku\": \"SCSI7I81UN\"\n    }, {\n      \"name\": \"Case-iPhone 14\",\n      \"sku\": \"SCSI1401UN\"\n    }, {\n      \"name\": \"Case-iPhone 14 Plus\",\n      \"sku\": \"SCSI14PLUN\"\n    }, {\n      \"name\": \"Case-iPhone 14 Pro\",\n      \"sku\": \"SCSI14PRUN\"\n    }, {\n      \"name\": \"Case-iPhone 14 Pro Max\",\n      \"sku\": \"SCSI14PMUN\"\n    }, {\n      \"name\": \"Case-iPhone 15\",\n      \"sku\": \"SCSI1501UN\"\n    }, {\n      \"name\": \"Case-iPhone 15 Plus\",\n      \"sku\": \"SCSI15PLUN\"\n    }, {\n      \"name\": \"Case-iPhone 15 Pro\",\n      \"sku\": \"SCSI15PRUN\"\n    }, {\n      \"name\": \"Case-iPhone 15 Pro Max\",\n      \"sku\": \"SCSI15PMUN\"\n    }],\n    samsungCases: [{\n      \"name\": \"no\",\n      \"sku\": \"no\"\n    }, {\n      \"name\": \"Case-Samsung S8\",\n      \"sku\": \"SCSSSS81UN\"\n    }, {\n      \"name\": \"Case-Samsung S8 Plus\",\n      \"sku\": \"SCSSS8P1UN\"\n    }, {\n      \"name\": \"Case-Samsung S9\",\n      \"sku\": \"SCSSSS91UN\"\n    }, {\n      \"name\": \"Case-Samsung S9 Plus\",\n      \"sku\": \"SCSSS9P1UN\"\n    }, {\n      \"name\": \"Case-Samsung S10 Plus\",\n      \"sku\": \"SCSSSSXP1UN\"\n    }, {\n      \"name\": \"Case-Samsung NOTE10\",\n      \"sku\": \"SCSSSNTX1UN\"\n    }, {\n      \"name\": \"Case-Samsung NOTE10 Plus\",\n      \"sku\": \"SCSSSNXP1UN\"\n    }, {\n      \"name\": \"Case-Samsung S20\",\n      \"sku\": \"SCSSSS20UN\"\n    }, {\n      \"name\": \"Case-Samsung S20 Plus\",\n      \"sku\": \"SCSSSS20PUN\"\n    }, {\n      \"name\": \"Case-Samsung S21\",\n      \"sku\": \"SCSSSS21UN\"\n    }, {\n      \"name\": \"Case-Samsung S21 Ultra\",\n      \"sku\": \"SCSSS21UUN\"\n    }, {\n      \"name\": \"Case-Samsung S20 Ultra\",\n      \"sku\": \"SCSSSS20UUN\"\n    }, {\n      \"name\": \"Case-Samsung Note20 Ultra\",\n      \"sku\": \"SCSSSN2XUUN\"\n    }, {\n      \"name\": \"Case-Samsung S21 Plus\",\n      \"sku\": \"SCSSSS21PUN\"\n    }, {\n      \"name\": \"Case-Samsung S22 Ultra\",\n      \"sku\": \"SCSSS22UUN\"\n    }, {\n      \"name\": \"Case-Samsung S22\",\n      \"sku\": \"SCSSSS22UN\"\n    }, {\n      \"name\": \"Case-Samsung S22 Plus\",\n      \"sku\": \"SCSSS22PUN\"\n    }, {\n      \"name\": \"Case-Samsung S23\",\n      \"sku\": \"SCSSSS23UN\"\n    }, {\n      \"name\": \"Case-Samsung S23 Plus\",\n      \"sku\": \"SCSSS23PUN\"\n    }, {\n      \"name\": \"Case-Samsung S23 Ultra\",\n      \"sku\": \"SCSSS23UUN\"\n    }],\n    title: \"\",\n    mailData: null,\n    isAddressSplitFormat: false,\n    selectedColor: null,\n    actions: {\n      insertOneToContainer() {\n        const oldDatas = this.get('datas');\n        this.set('datas', [...oldDatas, {\n          skus: [],\n          id: ('00' + (oldDatas.length + 1)).slice(-3)\n        }]);\n      },\n\n      titleOnInput(e) {\n        this.set('title', e.target.value);\n      },\n\n      removeOneFormContainer(id) {\n        const oldDatas = this.get('datas');\n\n        if (oldDatas.length === 1) {\n          return alert('at least one item');\n        }\n\n        const newDatas = oldDatas.filter(d => d.id !== id);\n        const newDatasWithCorrectId = [];\n        newDatas.forEach((n, idx) => {\n          const nWithNewId = { ...n,\n            id: ('00' + (idx + 1)).slice(-3)\n          };\n          newDatasWithCorrectId.push(nWithNewId);\n        });\n        this.set('datas', newDatasWithCorrectId);\n      },\n\n      onNameInput(e) {\n        const oldDatas = this.get('datas');\n        const idx = Number(e.target.closest('.freehw-id').dataset.idx);\n        const newDatas = oldDatas.map((oldData, idxInside) => {\n          if (idxInside === idx) {\n            return { ...oldData,\n              name: e.target.value\n            };\n          }\n\n          return oldData;\n        });\n        console.log(JSON.stringify(newDatas));\n        this.set('datas', newDatas);\n      },\n\n      onAddressInput(e) {\n        console.log(e);\n        const oldDatas = this.get('datas');\n        const idx = Number(e.target.closest('.freehw-id').dataset.idx);\n        const newDatas = oldDatas.map((oldData, idxInside) => {\n          if (idxInside === idx) {\n            return { ...oldData,\n              address: e.target.value\n            };\n          }\n\n          return oldData;\n        });\n        console.log(JSON.stringify(newDatas));\n        this.set('datas', newDatas);\n      },\n\n      onPhoneInput(e) {\n        const oldDatas = this.get('datas');\n        const idx = Number(e.target.closest('.freehw-id').dataset.idx);\n        const newDatas = oldDatas.map((oldData, idxInside) => {\n          if (idxInside === idx) {\n            return { ...oldData,\n              phone: e.target.value\n            };\n          }\n\n          return oldData;\n        });\n        console.log(JSON.stringify(newDatas));\n        this.set('datas', newDatas);\n      },\n\n      onSaumsungCaseChange(target) {\n        const oldDatas = this.get('datas');\n        const idx = Number(target.closest('.freehw-id').dataset.idx);\n        const newDatas = oldDatas.map((oldData, idxInside) => {\n          if (idxInside === idx) {\n            if (target.value === 'no') {\n              return { ...oldData,\n                samsungCase: null\n              };\n            }\n\n            return { ...oldData,\n              samsungCase: target.value\n            };\n          }\n\n          return oldData;\n        });\n        console.log(JSON.stringify(newDatas));\n        this.set('datas', newDatas);\n      },\n\n      onIphoneCaseChange(target) {\n        const oldDatas = this.get('datas');\n        const idx = Number(target.closest('.freehw-id').dataset.idx);\n        const newDatas = oldDatas.map((oldData, idxInside) => {\n          if (idxInside === idx) {\n            if (target.value === 'no') {\n              return { ...oldData,\n                iphoneCase: null\n              };\n            }\n\n            return { ...oldData,\n              iphoneCase: target.value\n            };\n          }\n\n          return oldData;\n        });\n        console.log(JSON.stringify(newDatas));\n        this.set('datas', newDatas);\n      },\n\n      onMailDataInput(e) {\n        let val = e.target.value;\n        const isSplitByTab = val.indexOf('Name\\t') !== -1;\n        const isSplitByLine = val.indexOf('Name\\n') !== -1;\n        const isAddressSplit = val.indexOf('City') !== -1 && val.indexOf('State') !== -1 && val.indexOf('Postal') !== -1;\n        console.log(\"isAdressSplit=\" + isAddressSplit);\n        let arr = [];\n        let newDatas = [];\n\n        if (isAddressSplit) {\n          if (isSplitByTab) {\n            val = val.replaceAll('\\n\\t', '\\t');\n            val = val.replaceAll('\\n', '\\t');\n            arr = val.split('\\t');\n            arr = arr.filter(a => a.indexOf('-') !== 0 && a !== '' && !['Name', 'Notes', 'Address-StreetLines', 'City', 'State', 'Postal Code', 'Phone #', 'Email', 'Reason'].includes(a));\n          } else if (isSplitByLine) {\n            val = val.replaceAll('\\n\\n', '\\n');\n            arr = val.split('\\n');\n            arr = arr.filter(a => a.indexOf('-') !== 0 && a !== '' && !['Name', 'Notes', 'Address-StreetLines', 'City', 'State', 'Postal Code', 'Phone #', 'Email', 'Reason'].includes(a));\n          } else {\n            this.set('datas', [{\n              id: '001',\n              skus: []\n            }]);\n            return;\n          }\n        } else {\n          if (isSplitByTab) {\n            val = val.replaceAll('\\n\\t', '\\t');\n            val = val.replaceAll('\\n', '\\t');\n            arr = val.split('\\t');\n            arr = arr.filter(a => a.indexOf('-') !== 0 && a !== '' && !['Name', 'Notes', 'Address', 'Phone #', 'Email', 'Reason'].includes(a));\n          } else if (isSplitByLine) {\n            val = val.replaceAll('\\n\\n', '\\n');\n            arr = val.split('\\n');\n            arr = arr.filter(a => a.indexOf('-') !== 0 && a !== '' && !['Name', 'Notes', 'Address', 'Phone #', 'Email', 'Reason'].includes(a));\n          } else {\n            this.set('datas', [{\n              id: '001',\n              skus: []\n            }]);\n            return;\n          }\n        }\n\n        if (isAddressSplit) {\n          let idx = 1;\n\n          for (let i = 0; i < arr.length - 7; i += 8) {\n            console.log(arr[i + 1]);\n            let data = {\n              name: arr[i],\n              address: {\n                street: arr[i + 1],\n                city: arr[i + 2],\n                state: arr[i + 3],\n                zip: arr[i + 4]\n              },\n              phone: arr[i + 5],\n              email: arr[i + 6],\n              reason: arr[i + 7],\n              id: ('00' + idx).slice(-3),\n              skus: []\n            };\n            newDatas.push(data);\n            idx++;\n          }\n\n          this.set('datas', newDatas);\n        } else {\n          let idx = 1;\n\n          for (let i = 0; i < arr.length - 4; i += 5) {\n            console.log(arr[i + 1]);\n            let data = {\n              name: arr[i],\n              address: {\n                full: arr[i + 1]\n              },\n              phone: arr[i + 2],\n              email: arr[i + 3],\n              reason: arr[i + 4],\n              id: ('00' + idx).slice(-3),\n              skus: []\n            };\n            newDatas.push(data);\n            idx++;\n          }\n\n          this.set('datas', newDatas);\n        } // console.log(newDatas)\n\n\n        this.set('isAddressSplitFormat', isAddressSplit);\n        this.set('mailData', e.target.value);\n      },\n\n      onCheckboxChecked(e) {\n        const oldDatas = this.get('datas');\n        const idx = Number(e.target.closest('.freehw-id').dataset.idx);\n        const checked = e.target.checked;\n        const sku = e.target.id.split('-')[1];\n        const newDatas = oldDatas.map((oldData, idxInside) => {\n          if (idxInside === idx) {\n            if (checked) {\n              return { ...oldData,\n                skus: [...oldData.skus, sku]\n              };\n            } else {\n              return { ...oldData,\n                skus: oldData.skus.filter(v => v !== sku)\n              };\n            }\n          }\n\n          return oldData;\n        });\n        console.log(JSON.stringify(newDatas));\n        this.set('datas', newDatas); // const oldDatas = this.get('datas')\n        // const idx = Number(e.target.dataset.freehwidx)\n        // // document.querySelector(`.freehw-content[]`).querySelectorAll('input[type]:checked')\n        // const checkes = [...e.target.closest('.freehw-content').querySelectorAll('input[type]:checked')].map(ch => ch.name)\n        // const newDatas = oldDatas.map((oldData, idxInside) => {\n        //     if(idxInside === idx){\n        //         const obj = {}\n        //         checkes.forEach(c => {\n        //             obj[c] = true\n        //         })\n        //         return {...oldData, items: obj}\n        //     }\n        //     return oldData\n        // })\n        // console.log(JSON.stringify(newDatas))\n        // this.set('datas', newDatas)\n      },\n\n      toSap() {\n        const self = this;\n        const requestDatas = [];\n        const title = this.get('title');\n\n        if (!title || title.trim() === '') {\n          return alert('請輸入客戶參考prefix');\n        } else {}\n\n        const datas = this.get('datas');\n        let somethingBlank = [];\n        datas.forEach(d => {\n          const idCombine = title + d.id;\n\n          if (!d.name || !d.address || !d.phone || d.name.trim() === '' || d.address.full.trim() === '' || d.phone.trim() === '') {\n            somethingBlank.push(idCombine);\n          } else if (!d.iphoneCase && !d.samsungCase && d.skus.length === 0) {\n            somethingBlank.push(idCombine);\n          } else {\n            requestDatas.push({ ...d,\n              id: idCombine\n            });\n          }\n        });\n\n        if (somethingBlank.length > 0) {\n          return alert(`資料有缺: ${somethingBlank.join(', ')}`);\n        }\n\n        console.log(JSON.stringify(requestDatas));\n        this.send('toFreeHardwareSap', {\n          items: requestDatas\n        }); // this.set('datas', [{id: '001'}])\n      },\n\n      toProcessingOrders() {\n        const title = this.get('title');\n\n        if (!title || title.trim() === '') {\n          return alert('請輸入客戶參考prefix');\n        } else {}\n\n        const datas = this.get('datas');\n        const dataWithDescription = datas.map(d => {\n          const skuDescription = {};\n          d.skus.forEach(s => {\n            skuDescription[s] = this.get('sapSkus').find(c => c.sku === s).name;\n          });\n\n          if (d.iphoneCase && d.iphoneCase !== '' && d.iphoneCase !== 'no') {\n            skuDescription[d.iphoneCase] = this.get('iphoneCases').find(c => c.sku === d.iphoneCase).name;\n          }\n\n          if (d.samsungCase && d.samsungCase !== '' && d.samsungCase !== 'no') {\n            skuDescription[d.samsungCase] = this.get('samsungCases').find(c => c.sku === d.samsungCase).name;\n          }\n\n          return { ...d,\n            skuDescription,\n            id: title + d.id\n          };\n        });\n        console.log(dataWithDescription);\n        this.send('transferToProcessingOrders', {\n          items: dataWithDescription\n        });\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/freehw/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n    actions: {\n      async toFreeHardwareSap(data) {\n        const token = this.session.data.authenticated.token;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.freehardwareToSap(token, data);\n\n          if (response.ok) {\n            this.toast.success(\"success\");\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"沒有操作權限\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async transferToProcessingOrders(data) {\n        const token = this.session.data.authenticated.token;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.freehardwareToProcessingOrders(token, data);\n\n          if (response.ok) {\n            this.toast.success(\"success\");\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"沒有操作權限\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/freehw/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"YcoP+x6k\",\n    \"block\": \"{\\\"symbols\\\":[\\\"data\\\",\\\"idx\\\",\\\"samsungCase\\\",\\\"iphoneCase\\\",\\\"sapSku\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[8],[0,\\\"\\\\n    \\\\n    複製mail的表格(含header: 'Name', 'Notes', 'Address', 'Phone #', 'Email', 'Reason')\\\\n    \\\"],[1,[28,\\\"textarea\\\",null,[[\\\"value\\\",\\\"placeholder\\\",\\\"class\\\",\\\"input\\\"],[[24,[\\\"mailData\\\"]],\\\"Mail data\\\",\\\"mail-data\\\",[28,\\\"action\\\",[[23,0,[]],\\\"onMailDataInput\\\"],null]]]],false],[0,\\\"\\\\n\\\\n    \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n        客戶參考號碼Prefix (通常為日期)\\\"],[7,\\\"input\\\",true],[10,\\\"placeholder\\\",\\\"ex. Mail20240509\\\"],[10,\\\"style\\\",\\\"margin-left: 5px;\\\"],[11,\\\"oninput\\\",[28,\\\"action\\\",[[23,0,[]],\\\"titleOnInput\\\"],null]],[8],[9],[0,\\\"\\\\n\\\"],[4,\\\"if\\\",[[24,[\\\"isAddressSplitFormat\\\"]]],null,{\\\"statements\\\":[[0,\\\"            \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"toProcessingOrders\\\"],null]],[8],[0,\\\"轉processing orders: (會同時產生fedex)\\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]},{\\\"statements\\\":[[0,\\\"            \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"toSap\\\"],null]],[8],[0,\\\"直接進 Sap\\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]}],[0,\\\"    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n        訂單數: \\\"],[1,[24,[\\\"datas\\\",\\\"length\\\"]],false],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"freehw-form-container\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"datas\\\"]]],null,{\\\"statements\\\":[[0,\\\"            \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"freehw-order\\\"],[8],[0,\\\"\\\\n\\\"],[0,\\\"                \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"freehw-id\\\"],[11,\\\"data-idx\\\",[23,2,[]]],[8],[0,\\\"\\\\n                    \\\"],[7,\\\"div\\\",true],[11,\\\"data-id\\\",[23,1,[\\\"id\\\"]]],[10,\\\"style\\\",\\\"word-break: break-word;\\\"],[8],[0,\\\"\\\\n                        \\\"],[7,\\\"div\\\",true],[8],[0,\\\"客戶參考號碼: \\\"],[7,\\\"span\\\",true],[10,\\\"style\\\",\\\"color:red;\\\"],[8],[1,[22,\\\"title\\\"],false],[1,[23,1,[\\\"id\\\"]],false],[9],[0,\\\"\\\\n                        \\\"],[9],[0,\\\"\\\\n\\\\n                    \\\"],[9],[0,\\\"\\\\n                    \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: 150px 1fr;align-items: center;\\\"],[8],[0,\\\"\\\\n                        \\\"],[7,\\\"span\\\",true],[8],[0,\\\"Name: \\\"],[9],[1,[28,\\\"textarea\\\",null,[[\\\"readonly\\\",\\\"value\\\"],[\\\"true\\\",[23,1,[\\\"name\\\"]]]]],false],[0,\\\"\\\\n                    \\\"],[9],[0,\\\"\\\\n                    \\\\n                    \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: repeat(2, 1fr);column-gap: 15px;row-gap:15px\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"if\\\",[[23,1,[\\\"address\\\",\\\"full\\\"]]],null,{\\\"statements\\\":[[0,\\\"                        \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: 150px 1fr;grid-column:1/-1;align-items: center;\\\"],[8],[7,\\\"span\\\",true],[8],[0,\\\"Full Address: \\\"],[9],[1,[28,\\\"textarea\\\",null,[[\\\"readonly\\\",\\\"value\\\"],[\\\"true\\\",[23,1,[\\\"address\\\",\\\"full\\\"]]]]],false],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]},{\\\"statements\\\":[[0,\\\"                        \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: 150px 1fr;align-items: center;\\\"],[8],[7,\\\"span\\\",true],[8],[0,\\\"Street: \\\"],[9],[1,[28,\\\"textarea\\\",null,[[\\\"readonly\\\",\\\"value\\\"],[\\\"true\\\",[23,1,[\\\"address\\\",\\\"street\\\"]]]]],false],[9],[0,\\\"\\\\n                        \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: 150px 1fr;align-items: center;\\\"],[8],[7,\\\"span\\\",true],[8],[0,\\\"City: \\\"],[9],[1,[28,\\\"textarea\\\",null,[[\\\"readonly\\\",\\\"value\\\"],[\\\"true\\\",[23,1,[\\\"address\\\",\\\"city\\\"]]]]],false],[9],[0,\\\"\\\\n                        \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: 150px 1fr;align-items: center;\\\"],[8],[7,\\\"span\\\",true],[8],[0,\\\"State: \\\"],[9],[1,[28,\\\"textarea\\\",null,[[\\\"readonly\\\",\\\"value\\\"],[\\\"true\\\",[23,1,[\\\"address\\\",\\\"state\\\"]]]]],false],[9],[0,\\\"\\\\n                        \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: 150px 1fr;align-items: center;\\\"],[8],[7,\\\"span\\\",true],[8],[0,\\\"Postal Code: \\\"],[9],[1,[28,\\\"textarea\\\",null,[[\\\"readonly\\\",\\\"value\\\"],[\\\"true\\\",[23,1,[\\\"address\\\",\\\"zip\\\"]]]]],false],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]}],[0,\\\"                        \\\\n                        \\\\n                    \\\"],[9],[0,\\\"\\\\n                    \\\\n                    \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: 150px 1fr;align-items: center;\\\"],[8],[0,\\\"\\\\n                        \\\"],[7,\\\"span\\\",true],[8],[0,\\\"Phone: \\\"],[9],[1,[28,\\\"textarea\\\",null,[[\\\"readonly\\\",\\\"value\\\"],[\\\"true\\\",[23,1,[\\\"phone\\\"]]]]],false],[0,\\\"\\\\n                    \\\"],[9],[0,\\\"\\\\n                    \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: 150px 1fr;align-items: center;\\\"],[8],[0,\\\"\\\\n                        \\\"],[7,\\\"span\\\",true],[8],[0,\\\"Email: \\\"],[9],[1,[28,\\\"textarea\\\",null,[[\\\"readonly\\\",\\\"value\\\"],[\\\"true\\\",[23,1,[\\\"email\\\"]]]]],false],[0,\\\"\\\\n                    \\\"],[9],[0,\\\"\\\\n                    \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display: grid; grid-template-columns: 1fr; column-gap: 25px\\\"],[8],[0,\\\"\\\\n                        \\\"],[7,\\\"hr\\\",true],[8],[9],[0,\\\"\\\\n                        \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n                            \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"margin-top: 10px; font-weight:bold; font-size: 20px;\\\"],[8],[0,\\\"\\\\n                                Others\\\\n                            \\\"],[9],[0,\\\"\\\\n                            \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:grid; grid-template-columns: 1fr;font-size: 17px\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"sapSkus\\\"]]],null,{\\\"statements\\\":[[0,\\\"                                    \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display: flex;  line-height:20px; column-gap: 5px;\\\"],[8],[0,\\\"\\\\n                                        \\\"],[1,[28,\\\"input\\\",null,[[\\\"type\\\",\\\"change\\\",\\\"id\\\",\\\"name\\\",\\\"checked\\\"],[\\\"checkbox\\\",[28,\\\"action\\\",[[23,0,[]],\\\"onCheckboxChecked\\\"],null],[28,\\\"concatHelper\\\",[[23,2,[]],[23,5,[\\\"sku\\\"]]],null],[28,\\\"concatHelper\\\",[[23,2,[]],[23,5,[\\\"sku\\\"]]],null],[28,\\\"containHelper\\\",[[23,1,[\\\"skus\\\"]],[23,5,[\\\"sku\\\"]]],null]]]],false],[0,\\\"\\\\n                                        \\\"],[7,\\\"label\\\",true],[11,\\\"for\\\",[28,\\\"concatHelper\\\",[[23,2,[]],[23,5,[\\\"sku\\\"]]],null]],[8],[1,[28,\\\"customSkuDisplay\\\",[[23,5,[\\\"sku\\\"]],[23,5,[\\\"name\\\"]]],null],false],[9],[0,\\\"\\\\n                                    \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[5]},null],[0,\\\"                            \\\"],[9],[0,\\\"\\\\n                        \\\"],[9],[0,\\\"\\\\n                        \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"margin-top: 10px; font-weight:bold; font-size: 20px;\\\"],[8],[0,\\\"\\\\n                            Iphone Case\\\\n                        \\\"],[9],[0,\\\"\\\\n                        \\\"],[7,\\\"select\\\",true],[11,\\\"onchange\\\",[28,\\\"action\\\",[[23,0,[]],\\\"onIphoneCaseChange\\\"],[[\\\"value\\\"],[\\\"target\\\"]]]],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"iphoneCases\\\"]]],null,{\\\"statements\\\":[[0,\\\"                                \\\"],[7,\\\"option\\\",true],[11,\\\"value\\\",[23,4,[\\\"sku\\\"]]],[11,\\\"selected\\\",[28,\\\"eq\\\",[[23,4,[\\\"sku\\\"]],[23,1,[\\\"iphoneCase\\\"]]],null]],[8],[1,[28,\\\"customSkuDisplay\\\",[[23,4,[\\\"sku\\\"]],[23,4,[\\\"name\\\"]]],null],false],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[4]},null],[0,\\\"                        \\\"],[9],[0,\\\"\\\\n                        \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"margin-top: 10px; font-weight:bold; font-size: 20px;\\\"],[8],[0,\\\"\\\\n                            Samsung Case\\\\n                        \\\"],[9],[0,\\\"\\\\n                        \\\"],[7,\\\"select\\\",true],[11,\\\"onchange\\\",[28,\\\"action\\\",[[23,0,[]],\\\"onSaumsungCaseChange\\\"],[[\\\"value\\\"],[\\\"target\\\"]]]],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"samsungCases\\\"]]],null,{\\\"statements\\\":[[0,\\\"                                \\\"],[7,\\\"option\\\",true],[11,\\\"value\\\",[23,3,[\\\"sku\\\"]]],[11,\\\"selected\\\",[28,\\\"eq\\\",[[23,3,[\\\"sku\\\"]],[23,1,[\\\"samsungCase\\\"]]],null]],[8],[1,[28,\\\"customSkuDisplay\\\",[[23,3,[\\\"sku\\\"]],[23,3,[\\\"name\\\"]]],null],false],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[3]},null],[0,\\\"                        \\\"],[9],[0,\\\"\\\\n                    \\\"],[9],[0,\\\"\\\\n                \\\"],[9],[0,\\\"\\\\n               \\\\n            \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[1,2]},null],[0,\\\"    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/freehw/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/invoicetosap/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    requestPaymentType: '',\n    toast: Ember.inject.service(),\n    actions: {\n      invoiceToSap() {\n        const excelData = document.querySelector('#exceldata');\n\n        if (excelData == null || excelData.files[0] == null) {\n          this.toast.error(\"No file selected\");\n          return;\n        }\n\n        const yes = confirm('你確定嗎？');\n\n        if (!yes) {\n          return;\n        }\n\n        this.send('invoiceNumberToSap', excelData.files[0]);\n      },\n\n      inputOnChange(e) {\n        this.send('checkRequestPaymentType', e.target.files[0]);\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/invoicetosap/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async orderList4Shipped(token, queryParams) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.orderList4Shipped(token, queryParams);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    download(data) {\n      let elm = document.createElement('a');\n      elm.href = URL.createObjectURL(data.blob);\n      elm.setAttribute('download', data.fileName);\n      elm.click();\n    },\n\n    actions: {\n      async setReturnOrders(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows({\n          selected: true\n        }).data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.setReturnOrders(token, selectedSNS);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Succcessful');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"沒有操作權限\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async checkRequestPaymentType(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.checkRequestPaymentType(token, file);\n\n          if (response.ok) {\n            this.controller.set('requestPaymentType', response.data);\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async invoiceNumberToSap(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importInvoiceToSapAr(token, file, false);\n          console.log(response.data.length);\n          this.send('stopSpinner');\n\n          if (response.ok) {\n            if (response.data.length === 0) {\n              this.toast.success(`匯入成功`);\n            } else {\n              alert(`匯入成功\\n但包含不可匯入的自訂編號：\\n` + response.data.join('\\r\\n'));\n            } // this.toast.success(`成功`);\n\n          } else {\n            throw error;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          // this.send('stopSpinner');\n          this.send('stopSpinner');\n        }\n      },\n\n      async LetterOfThanks(data, dt) {\n        const token = this.session.data.authenticated.token;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.sendEmail(token, data);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Send the Letter of Thanks Succcessfully');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"請至Shopify後台操作\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async orderList4Shipped(data, dt) {\n        const token = this.session.data.authenticated.token;\n      },\n\n      test() {\n        return \"hk\";\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/invoicetosap/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"15ckxjaH\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"upload-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n    \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"exceldata\\\"],[8],[0,\\\"Choose a file (.xlsx)\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"br\\\",true],[8],[9],[0,\\\"\\\\n    \\\"],[7,\\\"input\\\",true],[10,\\\"id\\\",\\\"exceldata\\\"],[10,\\\"name\\\",\\\"avatar\\\"],[10,\\\"accept\\\",\\\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\\\"],[10,\\\"type\\\",\\\"file\\\"],[8],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\\n    \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[10,\\\"style\\\",\\\"max-width: 250px\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"invoiceToSap\\\"],null]],[8],[0,\\\"發票號碼回填AR發票\\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/invoicetosap/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/list/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    actions: {\n      pickTheDate(date, mode) {\n        const dt = $('.dataTable').DataTable(); // const filter = this.filter;\n\n        this.set('filter', '');\n        this.send('orderList4All', {\n          date: date,\n          mode: mode,\n          filter: ''\n        }, dt);\n      },\n\n      filterData(dt) {\n        const filter = this.filter;\n        const oTable = Ember.typeOf(dt) !== 'undefined' ? dt : $('.dataTable').DataTable();\n        const date = moment($(\"#datetimepicker\").data().date);\n        const mode = $('#datetimepicker').data(\"DateTimePicker\").options().viewMode.slice(0, -1);\n        this.send('orderList4All', {\n          date: date,\n          mode: mode,\n          filter: filter\n        }, oTable);\n      },\n\n      packageListByOrder() {}\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/list/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async orderList4All(token, queryParams) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.orderList4All(token, queryParams);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    async model() {\n      const token = this.session.data.authenticated.token;\n      const {\n        columns,\n        chineseColumns,\n        twColumns\n      } = this;\n      let isChinesePage = window.isChinesePage();\n\n      var startDateAndEndDate = _Data.default.getStartDateAndEndDate(isChinesePage);\n\n      let queryParams = {\n        startDate: startDateAndEndDate.startDate,\n        endDate: startDateAndEndDate.endDate\n      }; // if(isChinesePage){\n      //     queryParams = {\n      //         startDate: Data.startOfTaipeiTimeZone('month'),\n      //         endDate: Data.endOfTaipeiTimeZone('month')\n      //     }\n      // }\n\n      const dataSource = await this.orderList4All(token, queryParams);\n      let selectedColumns = columns;\n\n      if (isChinesePage) {\n        selectedColumns = chineseColumns;\n      }\n\n      if (window.getShopifyStore() === 'PpTw') {\n        selectedColumns = twColumns;\n      }\n\n      return {\n        options: {\n          data: dataSource,\n          columns: selectedColumns,\n          select: {\n            style: 'single',\n            selector: 'td:not(:first-child)'\n          }\n        },\n        datetimeOptions: {\n          format: 'YYYY-MM',\n          viewMode: 'months',\n          timezone: isChinesePage ? 'Asia/Taipei' : 'America/Los_Angeles'\n        },\n        storeTitle: window.getStoreTitle()\n      };\n    },\n\n    setupController(controller, model) {\n      controller.set('filter', '');\n      controller.set('model', model);\n    },\n\n    actions: {\n      async orderList4All(data, dt) {\n        const token = this.session.data.authenticated.token;\n        const isChinesePage = window.isChinesePage();\n\n        var startDateAndEndDate = _Data.default.getStartDateAndEndDate(isChinesePage, data.date);\n\n        let queryParams = {\n          startDate: startDateAndEndDate.startDate,\n          endDate: startDateAndEndDate.endDate\n        };\n\n        if (!_Data.default.isEmptyString(data.filter)) {\n          queryParams = {};\n          queryParams.keyword = data.filter;\n        }\n\n        const dataSource = await this.orderList4All(token, queryParams);\n        dt.clear().rows.add(dataSource).draw();\n        dt.rows().deselect();\n        dt.columns.adjust();\n        $('table thead .details-control').css('width', '15px');\n      }\n\n    },\n    columns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, // { \n    //     data: null,\n    //     orderable: false,\n    //     checkboxes: {\n    //         selectRow : true,\n    //         selectAll: true,\n    //         selectAllRender: '<input type=\"checkbox\" class=\"dt-checkboxes\">'\n    //     } \n    // },\n    {\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: 'ID NO'\n    }, {\n      data: 'dueDate',\n      title: 'Due Date',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('America/Los_Angeles').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'email',\n      title: 'Email'\n    }, {\n      data: 'shippedAddress',\n      title: 'Shipping Address'\n    }, {\n      data: 'sapId',\n      title: 'Sap Id',\n      defaultContent: '-'\n    }, {\n      data: 'trackingCompany',\n      title: 'Tracking Company',\n      defaultContent: 'Fedex',\n      className: 'text-center'\n    }, // { \n    //     data: 'isShipped', \n    //     title: 'Ship<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data) {\n    //             return '<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>';\n    //         } else {\n    //             return '<i class=\"fa fa-times-circle fa-lg\" aria-hidden=\"true\"></i>';\n    //         }\n    //     },\n    // },\n    // { \n    //     data: 'isDownloaded', \n    //     title: 'Download<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         if(data) {\n    //             return `<span class=\"badge badge-success\">${data}</span>`;\n    //         } else {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         }\n    //     },\n    // },\n    // { \n    //     data: 'shipMailStatus', \n    //     title: 'Mail<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         return `<span class=\"badge\">${data}</span>`;\n    //     } \n    // },\n    {\n      data: 'cancelStatus',\n      title: 'Cancel<br/>Status',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        return `<span class=\"badge\">${data ? data : '-'}</span>`;\n      }\n    } // { data: 'note', title: 'Note', defaultContent: '-',className: 'text-center' },\n    ],\n    chineseColumns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, // { \n    //     data: null,\n    //     orderable: false,\n    //     checkboxes: {\n    //         selectRow : true,\n    //         selectAll: true,\n    //         selectAllRender: '<input type=\"checkbox\" class=\"dt-checkboxes\">'\n    //     } \n    // },\n    {\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: '訂單號碼'\n    }, {\n      data: 'dueDate',\n      title: 'Due Date',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('Asia/Taipei').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'email',\n      title: '信箱'\n    }, {\n      data: 'shippedAddress',\n      title: '運送地址'\n    }, {\n      data: 'sapId',\n      title: 'Sap Id',\n      defaultContent: '-'\n    }, {\n      data: 'trackingNumber',\n      title: 'trackingNumber',\n      orderable: false,\n      render: data => {\n        if (data) return data;else return '';\n      }\n    }, // { \n    //     data: 'trackingCompany', \n    //     title: 'Tracking Company', \n    //     defaultContent: 'Fedex', \n    //     className: 'text-center' \n    // },\n    // { \n    //     data: 'isShipped', \n    //     title: 'Ship<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data) {\n    //             return '<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>';\n    //         } else {\n    //             return '<i class=\"fa fa-times-circle fa-lg\" aria-hidden=\"true\"></i>';\n    //         }\n    //     },\n    // },\n    // { \n    //     data: 'isDownloaded', \n    //     title: 'Download<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         if(data) {\n    //             return `<span class=\"badge badge-success\">${data}</span>`;\n    //         } else {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         }\n    //     },\n    // },\n    // { \n    //     data: 'shipMailStatus', \n    //     title: 'Mail<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         return `<span class=\"badge\">${data}</span>`;\n    //     } \n    // },\n    {\n      data: 'cancelStatus',\n      title: '取消狀態',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        return `<span class=\"badge\">${data ? data : '-'}</span>`;\n      }\n    } // { data: 'note', title: 'Note', defaultContent: '-',className: 'text-center' },\n    ],\n    twColumns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, {\n      data: 'idDisplay',\n      title: '訂單號碼',\n      render: (data, type, row, meta) => {\n        return `${row.idDisplay}<br>${row.email}<br>${moment(row.dueDate).tz('Asia/Taipei').format('YYYY-MM-DD HH:mm:ss')}`;\n      }\n    }, {\n      data: 'sapId',\n      title: 'Sap Id',\n      defaultContent: '-'\n    }, {\n      data: 'shippedAddress',\n      title: '運送地址'\n    }, {\n      data: 'detail',\n      orderable: false,\n      title: '發票內容',\n      render: (data, type, row, meta) => {\n        const d = JSON.parse(data);\n        let content = '';\n\n        if (d.InvoiceType === 'e-invoice' || !d.InvoiceType) {\n          content += `<div>載具類別：綠界電子發票載具</div>`;\n        } else if (d.InvoiceType === 'carrier') {\n          content += `<div>載具類別：手機條碼</div>`;\n          content += `<div>手機條碼：${d.CarrierNum}</div>`;\n        } else if (d.InvoiceType === 'donate') {\n          content += `<div>載具類別：無載具(捐贈)</div>`;\n          content += `<div>捐贈代碼：${d.DonateCode}</div>`;\n        } else if (d.InvoiceType === 'company') {\n          content += `<div>載具類別：無載具(公司行號)</div>`;\n          if (d.CompanyName) content += `<div>公司名稱：${d.CompanyName}</div>`;\n          if (d.CompanyUniformNumber) content += `<div>統一編號：${d.CompanyUniformNumber}</div>`;\n        } // const d = JSON.parse(data)\n        // if(d.Currency.toUpperCase() === 'TWD' && d.CarrierType === -1){\n        //     d.CarrierType = 1\n        // }\n        // let content = ''\n        // for(let i = 0 ; i < d.PurchaseItems.length ; i++){\n        //     const purchaseItem = d.PurchaseItems[i]\n        //     content += `<div class='stripe-sub-detail'>`\n        //     content += `<div class='stripe-sub-detail-header'>購買商品</div>`\n        //     content += `<div>SKU：${purchaseItem.SAPItemCode.toUpperCase()}</div>`\n        //     content += `<div>商品名：${purchaseItem.ProductName}</div>`\n        //     content += `<div>數量：${purchaseItem.Quantity}</div>`\n        //     content += `<div>單價：${purchaseItem.UnitPrice} ${d.Currency.toUpperCase()}</div>`\n        //     content += `<div>總價：${d.Amount} ${d.Currency.toUpperCase()}</div>`\n        //     content += `</div>`\n        // }\n        // if(d.CarrierType !== -1){\n        //     content += `<div class='stripe-sub-detail'>`\n        //     content += `<div class='stripe-sub-detail-header'>發票</div>`\n        //     if(d.CarrierType === 5){\n        //         content += `<div>載具類別：無載具(捐贈)</div>`\n        //         content += `<div>捐贈代碼：${d.DonateToUnitCode}</div>`\n        //     }else if(d.CarrierType === 1){\n        //         content += `<div>載具類別：綠界電子發票載具</div>`\n        //     }else if(d.CarrierType === 2){\n        //         content += `<div>載具類別：自然人憑證</div>`\n        //         content += `<div>自然人憑證號碼：${d.NationalPersonNumber}</div>`\n        //     }else if(d.CarrierType === 3){\n        //         content += `<div>載具類別：手機條碼</div>`\n        //         content += `<div>手機條碼：${d.MobileBarcodeCarrier}</div>`\n        //     }else if(d.CarrierType === 0){\n        //         content += `<div>載具類別：無載具(列印電子發票)</div>`\n        //         if(d.CompanyName) content += `<div>姓名：${d.CompanyName}</div>`\n        //         if(d.CompanyPhone) content += `<div>電話：${d.CompanyPhone}</div>`\n        //         if(d.CompanyAddress) content += `<div>地址：${d.CompanyAddress}</div>`\n        //     }else if(d.CarrierType === 4){\n        //         content += `<div>載具類別：無載具(公司行號)</div>`\n        //         if(d.CompanyName) content += `<div>公司名稱：${d.CompanyName}</div>`\n        //         if(d.CompanyPhone) content += `<div>公司電話：${d.CompanyPhone}</div>`\n        //         if(d.CompanyAddress) content += `<div>公司地址：${d.CompanyAddress}</div>`\n        //         if(d.CompanyIdentifier) content += `<div>統一編號：${d.CompanyIdentifier}</div>`\n        //     }\n        //     if(d.Note){\n        //         content += `<div>備註：${Note}</div>`\n        //     }\n        //     content += `</div>`\n        // }\n\n\n        let html = `<div class=''>${content}</div>`;\n        return html;\n      }\n    }]\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/list/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"43CuGmM5\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"h1\\\",true],[8],[1,[24,[\\\"model\\\",\\\"storeTitle\\\"]],false],[9],[0,\\\"\\\\n\\\"],[7,\\\"h1\\\",true],[8],[0,\\\"All Orders\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"h4\\\",true],[8],[0,\\\"(High-risk orders will be highlighted in red)\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"card-tool\\\"],[8],[0,\\\"\\\\n    \\\"],[5,\\\"datetimepicker\\\",[],[[\\\"@options\\\",\\\"@dpChange\\\"],[[24,[\\\"model\\\",\\\"datetimeOptions\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"pickTheDate\\\"],null]]]],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-1\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"input-group search\\\"],[8],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"text\\\",\\\"form-control\\\",[24,[\\\"filter\\\"]]]]],false],[0,\\\"\\\\n            \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"input-group-append\\\"],[8],[0,\\\"\\\\n                \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"filterData\\\"]],[8],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fa fa-search\\\"],[10,\\\"aria-hidden\\\",\\\"true\\\"],[8],[9],[9],[0,\\\"\\\\n            \\\"],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"],[9],[0,\\\"\\\\n\\\"],[5,\\\"datatable\\\",[],[[\\\"@options\\\"],[[24,[\\\"model\\\",\\\"options\\\"]]]]]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/list/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/process/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    actions: {\n      btnClick(dt, config) {\n        this.send(config.key, dt, config);\n      },\n\n      cancel(dt, data) {\n        this.send('deleteOrder', dt, data);\n      },\n\n      edit(dt, data) {\n        this.set('dt', dt);\n        this.set('data', data);\n        this.set('trackingNumber', null);\n        $(`#${this.model.mDialog.id}`).modal({\n          backdrop: 'static'\n        });\n      },\n\n      btnConfirm() {\n        this.send('editOrder', this.dt, this.data, this.trackingNumber);\n      },\n\n      inventoryAdjustQuantityBtnConfirm() {\n        let addAmount = this.targetInventoryQuantity - this.originInventoryQuantity;\n\n        if (addAmount === 0) {\n          return;\n        }\n\n        this.send('adjustInventoryQuantity', this.inventoryItemId, addAmount, this.variant);\n      },\n\n      inventoryAdjustQuantity(variant) {\n        let inventoryQuantity = variant.inventoryQuantity;\n\n        if (isNaN(inventoryQuantity)) {\n          alert(\"請輸入數字\");\n          return;\n        }\n\n        this.set('variant', variant);\n        this.set('sku', variant.sku);\n        this.set('inventoryItemId', variant.inventoryItemId);\n        this.set('originInventoryQuantity', inventoryQuantity);\n        this.set('targetInventoryQuantity', inventoryQuantity);\n        $(`#${this.model.mDialogProductInventory.id}`).modal({\n          backdrop: 'static'\n        });\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/process/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async orderList4Shipment(token) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.orderList4Shipment(token);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    async products(token) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.products(token);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    download(data) {\n      let elm = document.createElement('a');\n      elm.href = URL.createObjectURL(data.blob);\n      elm.setAttribute('download', data.fileName);\n      elm.click();\n    },\n\n    setupController: async function (controller, model) {\n      // const token = this.session.data.authenticated.token;\n      // model.products = await this.products(model.token)\n      this._super(controller, model);\n\n      if (model.showProduct) {\n        controller.set('products', await this.products(model.token));\n      }\n\n      console.log(model); // controller.set('model', model);\n      // console.log(model)\n    },\n\n    async model() {\n      const token = this.session.data.authenticated.token;\n      const {\n        buttons,\n        columns,\n        chineseColumns,\n        chinesebuttons,\n        pphkButtons\n      } = this;\n      const dataSource = await this.orderList4Shipment(token);\n      const showProduct = !(window.getShopifyStore() === 'Asteroom');\n      let products = [];\n\n      if (showProduct) {// products = await this.products(token);\n        // setTimeout(async() => {\n        //     products = await this.products(token);\n        //     // this.set('model', products)\n        //     // this.currentModel.setProducts('model.products', products)\n        //     // this.context.products = products\n        // }, 1);\n      }\n\n      let selectedColumns = columns;\n      let selectedButtons = buttons;\n\n      if (window.isChinesePage()) {\n        selectedColumns = chineseColumns;\n        selectedButtons = chinesebuttons;\n      }\n\n      if (window.getShopifyStore() === 'PpHk') {\n        selectedButtons = pphkButtons;\n      }\n\n      return {\n        options: {\n          data: dataSource,\n          order: [[3, 'desc']],\n          buttons: selectedButtons,\n          // select: { style: 'multi', selector: 'td:not(:first-child, .operations)', },\n          columns: selectedColumns\n        },\n        showProduct: showProduct,\n        products: products,\n        datetimeOptions: {\n          format: 'YYYY-MM-DD',\n          viewMode: 'days',\n          timezone: window.isChinesePage() ? 'Asia/Taipei' : 'America/Los_Angeles'\n        },\n        storeTitle: window.getStoreTitle(),\n        mDialog: {\n          title: 'Edit the Tracking Number',\n          id: 'trackModal'\n        },\n        mDialogProductInventory: {\n          title: '修改庫存',\n          id: 'inventoryAdjustQuantity'\n        },\n        token\n      };\n    },\n\n    actions: {\n      async downloadPackingList(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows({\n          selected: true\n        }).data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.downloadPickingList(token, selectedSNS);\n\n          if (response.ok) {\n            this.download(response.data);\n            this.send('orderList4Shipment', dt);\n            this.toast.success('Completed');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n            this.transitionTo('/');\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async mailAndExport2Sap(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows({\n          selected: true\n        }).data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.mailAndExport2Sap(token, selectedSNS);\n\n          if (response.ok) {\n            this.send('orderList4Shipment', dt);\n            this.toast.success('Completed');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async deleteOrder(dt, data) {\n        const token = this.session.data.authenticated.token;\n        const SN = data.shopifySN;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.deleteOrder(token, SN);\n\n          if (response.ok) {\n            this.send('orderList4Shipment', dt);\n            this.toast.success('Completed');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async editOrder(dt, data, trackingNumber) {\n        const token = this.session.data.authenticated.token;\n\n        if (_Data.default.isEmptyString(trackingNumber)) {\n          this.toast.error(`Tracking Number is empty`);\n          return false;\n        }\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.editOrder(token, {\n            shopifySN: data.shopifySN,\n            trackingNumber: trackingNumber\n          });\n\n          if (response.ok) {\n            this.send('orderList4Shipment', dt);\n            this.toast.success('Completed');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n          $(`#${this.controller.model.mDialog.id}`).modal('hide');\n        }\n      },\n\n      async orderList4Shipment(dt) {\n        const token = this.session.data.authenticated.token;\n        const dataSource = await this.orderList4Shipment(token);\n        dt.clear().rows.add(dataSource).draw();\n        dt.rows().deselect();\n        dt.columns.adjust();\n        $('table thead .details-control').css('width', '15px');\n      },\n\n      async products() {\n        const token = this.session.data.authenticated.token;\n        const dataSource = await this.products(token);\n      },\n\n      async adjustInventoryQuantity(inventoryItemId, addAmount, variant) {\n        const token = this.session.data.authenticated.token;\n        let body = {\n          locationId: \"\",\n          inventoryItemId: inventoryItemId.toString(),\n          availableAdjustment: addAmount\n        };\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.adjustInventory(token, body);\n\n          if (response.ok) {\n            // document.getElementById(inventoryItemId.toString()).innerHTML=response.data;\n            this.send('stopSpinner');\n            $(`#${this.controller.model.mDialogProductInventory.id}`).modal('hide');\n            this.toast.success(\"修改成功為: \" + response.data + \"(資料不會即時更新)\"); // let newProducts = JSON.parse(JSON.stringify(this.modelFor(this.routeName).products));\n            // newProducts.forEach( p => {\n            //     p.variants.forEach(v => {\n            //         if(v.inventoryItemId === inventoryItemId){\n            //             v.inventoryQuantity = response.data;\n            //         }\n            //     });\n            // });\n            // Ember.set(this.modelFor(this.routeName), 'products', newProducts);\n            // this.modelFor(this.routeName).products = [];\n            // Ember.set('model', 'showProduct', true)\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        }\n      }\n\n    },\n    buttons: [{\n      key: 'downloadPackingList',\n      text: 'Download Packing List',\n      className: 'btn-primary'\n    }, {\n      key: 'mailAndExport2Sap',\n      text: 'Email and Export to Sap',\n      className: 'btn-primary'\n    }],\n    chinesebuttons: [{\n      key: 'downloadPackingList',\n      text: '下載文件',\n      className: 'btn-primary'\n    }, {\n      key: 'mailAndExport2Sap',\n      text: '出貨完成(寄信並匯入SAP)',\n      className: 'btn-primary'\n    }],\n    pphkButtons: [{\n      key: 'downloadPackingList',\n      text: '下載文件',\n      className: 'btn-primary'\n    }, {\n      key: 'mailAndExport2Sap',\n      text: '匯入SAP/出貨(寄信)',\n      className: 'btn-primary sap-or-mail'\n    }],\n    columns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, {\n      data: null,\n      orderable: false,\n      checkboxes: {\n        selectRow: true,\n        selectAll: true,\n        selectAllRender: '<input type=\"checkbox\" class=\"dt-checkboxes\">'\n      }\n    }, {\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: 'ID NO'\n    }, {\n      data: 'dueDate',\n      title: 'Due Date',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('America/Los_Angeles').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'email',\n      title: 'Email'\n    }, {\n      data: 'shippedAddress',\n      title: 'Shipping Address'\n    }, // { data: 'sapId', title: 'Sap Id', defaultContent: '-'},\n    {\n      data: 'trackingCompany',\n      title: 'Tracking Company',\n      defaultContent: 'Fedex',\n      className: 'text-center'\n    }, // { \n    //     data: 'isShipped', \n    //     title: 'Ship<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data) {\n    //             return '<i class=\"fa fa-check-circle fa-lg text-success\" aria-hidden=\"true\"></i>';\n    //         } else {\n    //             return '<i class=\"fa fa-times-circle fa-lg text-danger\" aria-hidden=\"true\"></i>';\n    //         }\n    //     },\n    // },\n    {\n      data: 'isDownloaded',\n      title: 'Download<br>Status',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        if (data) {\n          return `<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>`;\n        } else {\n          return `<i class=\"fa fa-info-circle fa-lg\" aria-hidden=\"true\"></i>`;\n        }\n      }\n    }, // { \n    //     data: 'shipMailStatus', \n    //     title: 'Mail<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data === 'Failed') {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         } else {\n    //             return data;\n    //         }\n    //     } \n    // },\n    {\n      data: null,\n      title: 'Operations',\n      defaultContent: '-',\n      orderable: false,\n      className: 'text-center operations',\n      render: (data, type, row, meta) => {\n        let disabled = row.trackingNumber !== null;\n        const trash = `<button id=\"delete-order\" title=\"Delete\" class=\"btn btn-sm btn-info rounded-circle\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></button>`;\n        const edit = `<button id=\"edit-number\" ${disabled ? 'disabled' : ''} title=\"Edit tracking number\" class=\"btn btn-sm btn-info rounded-circle\"><i class=\"fa fa-edit fa-1x\" aria-hidden=\"true\"></i></button>`;\n        return `${edit} ${trash}`;\n      }\n    }, {\n      data: 'trackingNumber',\n      title: 'Note',\n      orderable: false,\n      render: data => {\n        if (data) return '-';else return 'Must fill in the tracking number';\n      }\n    }],\n    chineseColumns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, {\n      data: null,\n      orderable: false,\n      checkboxes: {\n        selectRow: true,\n        selectAll: false,\n        selectAllRender: '<input type=\"checkbox\" class=\"dt-checkboxes\">'\n      }\n    }, {\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: '訂單號碼',\n      render: (data, type, row, meta) => {\n        const info = row.note ? `<div data-tooltip='${row.note}' class=\"fa-sticky-note-wrapper\"><i class=\"fa fa-sticky-note fa-lg\" aria-hidden=\"true\"></i></div>` : '';\n        return `<div style='display:flex;column-gap:10px;'>${data}${info}</div>`;\n      }\n    }, {\n      data: 'sapId',\n      title: 'sapId'\n    }, {\n      data: 'dueDate',\n      title: '日期',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('Asia/Taipei').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'email',\n      title: '信箱'\n    }, {\n      data: 'shippedAddress',\n      title: '運送地址'\n    }, {\n      data: 'trackingNumber',\n      title: 'trackingNumber',\n      orderable: false,\n      render: data => {\n        if (data) return data;else return '';\n      }\n    }, // { data: 'sapId', title: 'Sap Id', defaultContent: '-'},\n    // { \n    //     data: 'trackingCompany', \n    //     title: '物流公司', \n    //     defaultContent: 'Fedex', \n    //     className: 'text-center' \n    // },\n    // { \n    //     data: 'isShipped', \n    //     title: 'Ship<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data) {\n    //             return '<i class=\"fa fa-check-circle fa-lg text-success\" aria-hidden=\"true\"></i>';\n    //         } else {\n    //             return '<i class=\"fa fa-times-circle fa-lg text-danger\" aria-hidden=\"true\"></i>';\n    //         }\n    //     },\n    // },\n    {\n      data: 'isDownloaded',\n      title: '是否下載',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        if (data) {\n          return `<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>`;\n        } else {\n          return `<i class=\"fa fa-info-circle fa-lg\" aria-hidden=\"true\"></i>`;\n        }\n      }\n    }, // { \n    //     data: 'shipMailStatus', \n    //     title: 'Mail<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data === 'Failed') {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         } else {\n    //             return data;\n    //         }\n    //     } \n    // },\n    {\n      data: null,\n      title: '操作',\n      defaultContent: '-',\n      orderable: false,\n      className: 'text-center operations',\n      render: (data, type, row, meta) => {\n        // let disabled = (row.trackingNumber !== null);\n        let disabled = false;\n        const trash = `<button id=\"delete-order\" title=\"Delete\" class=\"btn btn-sm btn-info rounded-circle\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></button>`;\n        const edit = `<button id=\"edit-number\" ${disabled ? 'disabled' : ''} title=\"Edit tracking number\" class=\"btn btn-sm btn-info rounded-circle\"><i class=\"fa fa-edit fa-1x\" aria-hidden=\"true\"></i></button>`;\n        return `${edit} ${trash}`;\n      }\n    }] // detailButtons: [\n    //     {\n    //         key: 'edit',\n    //         autoClose: true,\n    //         text: '<i class=\"fa fa-edit fa-1x\" aria-hidden=\"true\"></i>',\n    //         className: 'btn btn-primary rounded-circle',\n    //         titleAttr: 'Edit the Tracking number',\n    //     }\n    // ],\n\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/process/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"nOZKkzWj\",\n    \"block\": \"{\\\"symbols\\\":[\\\"product\\\",\\\"variant\\\"],\\\"statements\\\":[[7,\\\"h1\\\",true],[8],[1,[24,[\\\"model\\\",\\\"storeTitle\\\"]],false],[9],[0,\\\"\\\\n\\\"],[7,\\\"h1\\\",true],[8],[0,\\\"Processing Orders\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"h4\\\",true],[8],[0,\\\"(High-risk orders will be highlighted in red)\\\"],[9],[0,\\\"\\\\n\\\\n\\\"],[5,\\\"datatable\\\",[],[[\\\"@options\\\",\\\"@btnClick\\\",\\\"@cancel\\\",\\\"@edit\\\"],[[24,[\\\"model\\\",\\\"options\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"btnClick\\\"],null],[28,\\\"action\\\",[[23,0,[]],\\\"cancel\\\"],null],[28,\\\"action\\\",[[23,0,[]],\\\"edit\\\"],null]]]],[0,\\\"\\\\n\\\"],[5,\\\"modal-dialog\\\",[],[[\\\"@modalTitle\\\",\\\"@elementId\\\",\\\"@comfirm\\\"],[[24,[\\\"model\\\",\\\"mDialog\\\",\\\"title\\\"]],[24,[\\\"model\\\",\\\"mDialog\\\",\\\"id\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"btnConfirm\\\"],null]]],{\\\"statements\\\":[[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"container form-inline\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"h4\\\",true],[10,\\\"class\\\",\\\"title\\\"],[8],[1,[24,[\\\"data\\\",\\\"idDisplay\\\"]],false],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-0\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"trackingNumber\\\"],[10,\\\"class\\\",\\\"col-sm-3\\\"],[8],[0,\\\"Tracking Number\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"trackingNumber\\\",\\\"text\\\",\\\"form-control col-sm-9\\\",[24,[\\\"trackingNumber\\\"]]]]],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]}],[0,\\\"\\\\n\\\"],[5,\\\"modal-dialog\\\",[],[[\\\"@modalTitle\\\",\\\"@elementId\\\",\\\"@comfirm\\\"],[[24,[\\\"model\\\",\\\"mDialogProductInventory\\\",\\\"title\\\"]],[24,[\\\"model\\\",\\\"mDialogProductInventory\\\",\\\"id\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"inventoryAdjustQuantityBtnConfirm\\\"],null]]],{\\\"statements\\\":[[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"container form-inline\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"h4\\\",true],[10,\\\"class\\\",\\\"title\\\"],[8],[1,[22,\\\"sku\\\"],false],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-0\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"inventoryQuantity\\\"],[10,\\\"class\\\",\\\"col-sm-3\\\"],[8],[0,\\\"設定庫存為\\\"],[9],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"id\\\",\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"inventoryQuantity\\\",\\\"number\\\",\\\"form-control col-sm-9\\\",[24,[\\\"targetInventoryQuantity\\\"]]]]],false],[0,\\\"\\\\n        \\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]}],[0,\\\"\\\\n\\\\n\\\\n\\\"],[4,\\\"if\\\",[[24,[\\\"model\\\",\\\"showProduct\\\"]]],null,{\\\"statements\\\":[[0,\\\"    \\\"],[7,\\\"h4\\\",true],[8],[0,\\\"庫存資訊\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"table\\\",true],[10,\\\"style\\\",\\\"width:80%;text-align: center;\\\"],[10,\\\"border\\\",\\\"1\\\"],[10,\\\"cellpadding\\\",\\\"8\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"th\\\",true],[10,\\\"width\\\",\\\"25%\\\"],[8],[0,\\\"產品\\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"th\\\",true],[10,\\\"width\\\",\\\"10%\\\"],[8],[0,\\\"狀態\\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"th\\\",true],[10,\\\"width\\\",\\\"15%\\\"],[8],[0,\\\"存貨單位(SKU)\\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"th\\\",true],[10,\\\"width\\\",\\\"10%\\\"],[8],[0,\\\"庫存\\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"th\\\",true],[10,\\\"width\\\",\\\"20%\\\"],[8],[0,\\\"類型\\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"th\\\",true],[10,\\\"width\\\",\\\"20%\\\"],[8],[0,\\\"修改庫存\\\"],[9],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"products\\\"]]],null,{\\\"statements\\\":[[0,\\\"        \\\\n\\\"],[4,\\\"each\\\",[[23,1,[\\\"variants\\\"]]],null,{\\\"statements\\\":[[0,\\\"            \\\"],[7,\\\"tr\\\",true],[8],[0,\\\"\\\\n                \\\"],[7,\\\"td\\\",true],[10,\\\"style\\\",\\\"padding:8px;\\\"],[8],[1,[23,1,[\\\"title\\\"]],false],[9],[0,\\\"\\\\n                \\\"],[7,\\\"td\\\",true],[8],[1,[23,1,[\\\"status\\\"]],false],[9],[0,\\\"\\\\n                \\\"],[7,\\\"td\\\",true],[8],[1,[23,2,[\\\"sku\\\"]],false],[9],[0,\\\"\\\\n                \\\"],[7,\\\"td\\\",true],[11,\\\"id\\\",[23,2,[\\\"inventoryItemId\\\"]]],[8],[1,[23,2,[\\\"inventoryQuantity\\\"]],false],[9],[0,\\\"\\\\n                \\\"],[7,\\\"td\\\",true],[8],[1,[23,1,[\\\"productType\\\"]],false],[9],[0,\\\"\\\\n                \\\"],[7,\\\"td\\\",true],[8],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[12,\\\"type\\\",\\\"button\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"inventoryAdjustQuantity\\\",[23,2,[]]]],[8],[0,\\\"修改\\\"],[9],[9],[0,\\\"\\\\n\\\"],[0,\\\"            \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[2]},null]],\\\"parameters\\\":[1]},null],[0,\\\"    \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]},null]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/process/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/return/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    isChecked: true,\n    actions: {\n      btnClick(dt, config) {\n        this.send(config.key, dt, config);\n      },\n\n      pickTheDate(date, mode) {\n        const dt = $('.dataTable').DataTable();\n        this.send('orderList4Return', {\n          date: date,\n          mode: mode\n        }, dt);\n      },\n\n      filterData(dt) {\n        if ($(\"#datetimepicker\").data()) {\n          const date = moment($(\"#datetimepicker\").data().date);\n          const mode = $('#datetimepicker').data(\"DateTimePicker\").options().viewMode.slice(0, -1);\n          this.send('orderList4Return', {\n            date: date,\n            mode: mode\n          }, dt);\n        } else {\n          const dt = $('.dataTable').DataTable();\n          this.send('orderList4ReturnByStatus', status, dt);\n        }\n      },\n\n      mail(dt, data) {\n        this.send('LetterOfReturn', {\n          shopifySN: data.shopifySN,\n          mailSubject: 'ReturnLetter'\n        }, dt);\n      },\n\n      proceed(dt, data) {\n        this.send('proceedCreditNote', data.shopifySN, dt);\n      },\n\n      change(isByDate) {\n        this.set('isChecked', isByDate);\n\n        if (isByDate) {\n          this.send('pickTheDate', new moment(), 'month');\n        } else {\n          this.send('selectTheStatus');\n        }\n      },\n\n      selectTheStatus(status) {\n        const dt = $('.dataTable').DataTable();\n        this.send('orderList4ReturnByStatus', status, dt);\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/return/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async orderList4Return(token, startOfDate, endOfDate) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.orderList4Return(token, startOfDate, endOfDate);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    async orderList4ReturnByStatus(token, data) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.orderList4ReturnByStatus(token, data);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    download(data) {\n      let elm = document.createElement('a');\n      elm.href = URL.createObjectURL(data.blob);\n      elm.setAttribute('download', data.fileName);\n      elm.click();\n    },\n\n    async model() {\n      const token = this.session.data.authenticated.token;\n      const {\n        buttons,\n        columns,\n        chineseColumns,\n        chinesebuttons\n      } = this;\n      const dataSource = await this.orderList4ReturnByStatus(token, null);\n      let selectedColumns = columns;\n      let selectedButtons = buttons;\n\n      if (window.isChinesePage()) {\n        selectedColumns = chineseColumns;\n        selectedButtons = chinesebuttons;\n      }\n\n      return {\n        options: {\n          data: dataSource,\n          buttons: selectedButtons,\n          columns: selectedColumns,\n          select: {\n            selector: 'tr:not(.non-select) td:not(:first-child, .send-email, .credit-note)'\n          }\n        },\n        datetimeOptions: {\n          format: 'YYYY-MM',\n          viewMode: 'months',\n          timezone: window.isChinesePage() ? 'Asia/Taipei' : 'America/Los_Angeles'\n        },\n        storeTitle: window.getStoreTitle()\n      };\n    },\n\n    setupController(controller, model) {\n      controller.set('isChecked', false);\n      controller.set('model', model);\n    },\n\n    actions: {\n      async confirmReturnedOrders(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows('.selected').data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.confirmReturnedOrders(token, selectedSNS);\n\n          if (response.ok) {\n            // this.controller.send('filterData', dt);\n            if (dt) {\n              this.controller.send('filterData', dt);\n            } else {\n              this.controller.send('selectTheStatus', null);\n            }\n\n            this.toast.success('Confirm the Returned Orders Succcessfully');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async downloadPackingList(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows('.selected').data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.downloadPickingList(token, selectedSNS);\n\n          if (response.ok) {\n            this.download(response.data);\n\n            if (dt) {\n              this.controller.send('filterData', dt);\n            } else {\n              this.controller.send('selectTheStatus', null);\n            }\n\n            this.toast.success('Completed');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async LetterOfReturn(data, dt) {\n        const token = this.session.data.authenticated.token;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.sendEmail(token, data);\n\n          if (response.ok) {\n            if (dt) {\n              this.controller.send('filterData', dt);\n            } else {\n              this.controller.send('selectTheStatus', null);\n            } // // this.controller.send('filterData', dt);\n            // this.controller.send('selectTheStatus', null);\n\n\n            this.toast.success('Send the Letter of Return Order Succcessfully');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"請至Shopify後台操作\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async proceedCreditNote(SN, dt) {\n        const token = this.session.data.authenticated.token;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.proceedCreditNote(token, SN);\n\n          if (response.ok) {\n            if (dt) {\n              this.controller.send('filterData', dt);\n            } else {\n              this.controller.send('selectTheStatus', null);\n            }\n\n            this.toast.success('Complete');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async orderList4Return(data, dt) {\n        const token = this.session.data.authenticated.token;\n        const isChinesePage = window.isChinesePage();\n\n        var startDateAndEndDate = _Data.default.getStartDateAndEndDate(isChinesePage, data.date);\n\n        let start = startDateAndEndDate.startDate;\n        let end = startDateAndEndDate.endDate; // if(window.isChinesePage()){\n        //     start = Data.startOfTaipeiTimeZone(data.mode, data.date);\n        //     end = Data.endOfTaipeiTimeZone(data.mode, data.date);\n        // }\n\n        const dataSource = await this.orderList4Return(token, start, end);\n        dt.clear().rows.add(dataSource).draw();\n        dt.rows().deselect();\n        dt.columns.adjust();\n        $('table thead .details-control').css('width', '15px');\n      },\n\n      async orderList4ReturnByStatus(status, dt) {\n        const token = this.session.data.authenticated.token;\n        const data = _Data.default.isEmptyString(status) ? {} : {\n          cancelStatus: status\n        };\n\n        try {\n          const response = await this.order.orderList4ReturnByStatus(token, data);\n\n          if (response.ok) {\n            const dataSource = response.data;\n            dt.clear().rows.add(dataSource).draw();\n            dt.rows().deselect();\n            dt.columns.adjust();\n            $('table thead .details-control').css('width', '15px');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            this.transitionTo('/');\n          } else {\n            this.toast.error(error.message);\n          }\n        }\n      }\n\n    },\n    buttons: [{\n      key: 'downloadPackingList',\n      text: 'Download Packing List',\n      className: 'btn-primary'\n    }, {\n      key: 'confirmReturnedOrders',\n      text: 'Complete Return Orders',\n      className: 'btn-primary'\n    }],\n    chinesebuttons: [{\n      key: 'downloadPackingList',\n      text: '下載文件',\n      className: 'btn-primary'\n    }, {\n      key: 'confirmReturnedOrders',\n      text: '已收到退貨',\n      className: 'btn-primary'\n    }],\n    columns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, {\n      data: null,\n      orderable: false,\n      render: (data, type, row, meta) => {\n        let disabled = data.cancelStatus === 'Returned';\n        return `<input type=\"checkbox\" class=\"dt-checkboxes\" ${disabled ? 'disabled' : ''}>`;\n      },\n      createdCell: (td, cellData, rowData, row, col) => {\n        if (cellData.cancelStatus === 'Returned') {\n          $(td).parent().addClass('non-select');\n          $(td).children().attr('disabled', true);\n        }\n      },\n      checkboxes: {\n        selectRow: true,\n        selectCallback: (nodes, selected) => {},\n        selectAllCallback: (nodes, selected, indeterminate) => {},\n        selectAll: false // selectAllRender: '<input type=\"checkbox\" class=\"dt-checkboxes\">'\n\n      }\n    }, {\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: 'ID NO'\n    }, {\n      data: 'dueDate',\n      title: 'Due Date',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('America/Los_Angeles').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'sapId',\n      title: 'Sap Id',\n      defaultContent: '-'\n    }, {\n      data: 'cancelStatus',\n      title: 'Cancel<br/>Status',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        return `<span class=\"badge\">${data ? data : '-'}</span>`;\n      }\n    }, {\n      data: 'isReturnInSap',\n      title: 'Credit Note',\n      defaultContent: '-',\n      className: 'credit-note text-center',\n      render: (data, type, row, meta) => {\n        console.log(row.cancelStatus);\n        const action = `</span><button id=\"credit-note\" class=\"btn btn-sm btn-link\"><i class=\"fa fa-file\" aria-hidden=\"true\"></i> proceed</button>`;\n        const check = '<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>';\n        const info = '<i class=\"fa fa-info-circle fa-lg\" aria-hidden=\"true\"></i>';\n        return `${row.cancelStatus === 'Returned' ? data ? check : action : info}`;\n      }\n    }, {\n      data: 'email',\n      title: 'Email'\n    }, {\n      data: 'shippedAddress',\n      title: 'Shipping Address'\n    } // { \n    //     data: 'trackingCompany', \n    //     title: 'Tracking Company', \n    //     defaultContent: 'Fedex', \n    //     className: 'text-center' \n    // },\n    // { \n    //     data: 'isShipped', \n    //     title: 'Ship<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data) {\n    //             return '<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>';\n    //         } else {\n    //             return '<i class=\"fa fa-times-circle fa-lg\" aria-hidden=\"true\"></i>';\n    //         }\n    //     },\n    // },\n    // { \n    //     data: 'isDownloaded', \n    //     title: 'Download<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         if(data) {\n    //             return `<span class=\"badge badge-success\">${data}</span>`;\n    //         } else {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         }\n    //     },\n    // },\n    // { \n    //     data: 'returnMailStatus', \n    //     title: 'Mail<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'send-email text-center',\n    //     render: (data) => {\n    //         return `<span class=\"badge\">${data ? data : 'Failure'}</span><button id=\"send-email\" class=\"btn btn-sm btn-link\"><i class=\"fa fa-envelope\" aria-hidden=\"true\"></i> send mail</button>`;\n    //     } \n    // },\n    // { data: 'note', title: 'Note', defaultContent: '-',className: 'text-center' },\n    ],\n    chineseColumns: [{\n      data: null,\n      orderable: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, {\n      data: null,\n      orderable: false,\n      render: (data, type, row, meta) => {\n        let disabled = data.cancelStatus === 'Returned';\n        return `<input type=\"checkbox\" class=\"dt-checkboxes\" ${disabled ? 'disabled' : ''}>`;\n      },\n      createdCell: (td, cellData, rowData, row, col) => {\n        if (cellData.cancelStatus === 'Returned') {\n          $(td).parent().addClass('non-select');\n          $(td).children().attr('disabled', true);\n        }\n      },\n      checkboxes: {\n        selectRow: true,\n        selectCallback: (nodes, selected) => {},\n        selectAllCallback: (nodes, selected, indeterminate) => {},\n        selectAll: false // selectAllRender: '<input type=\"checkbox\" class=\"dt-checkboxes\">'\n\n      }\n    }, {\n      data: 'shopifySN',\n      title: 'Shopify SN',\n      visible: false\n    }, {\n      data: 'idDisplay',\n      title: '訂單號碼'\n    }, {\n      data: 'dueDate',\n      title: 'Due Date',\n      render: (data, type, row, meta) => {\n        return moment(data).tz('Asia/Taipei').format('YYYY-MM-DD HH:mm:ss');\n      }\n    }, {\n      data: 'email',\n      title: '信箱'\n    }, {\n      data: 'shippedAddress',\n      title: '運送地址'\n    }, {\n      data: 'sapId',\n      title: 'Sap Id',\n      defaultContent: '-'\n    }, {\n      data: 'trackingNumber',\n      title: 'trackingNumber',\n      orderable: false,\n      render: data => {\n        if (data) return data;else return '';\n      }\n    }, // { \n    //     data: 'trackingCompany', \n    //     title: 'Tracking Company', \n    //     defaultContent: 'Fedex', \n    //     className: 'text-center' \n    // },\n    // { \n    //     data: 'isShipped', \n    //     title: 'Ship<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center',\n    //     render: (data) => {\n    //         if(data) {\n    //             return '<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>';\n    //         } else {\n    //             return '<i class=\"fa fa-times-circle fa-lg\" aria-hidden=\"true\"></i>';\n    //         }\n    //     },\n    // },\n    // { \n    //     data: 'isDownloaded', \n    //     title: 'Download<br/>Status', \n    //     defaultContent: '-', \n    //     className: 'text-center', \n    //     render: (data) => {\n    //         if(data) {\n    //             return `<span class=\"badge badge-success\">${data}</span>`;\n    //         } else {\n    //             return `<span class=\"badge badge-danger\">${data}</span>`;\n    //         }\n    //     },\n    // },\n    {\n      data: 'returnMailStatus',\n      title: '是否寄信成功',\n      defaultContent: '-',\n      className: 'send-email text-center',\n      render: data => {\n        return `<span class=\"badge\">${data ? data : 'Failure'}</span><button id=\"send-email\" class=\"btn btn-sm btn-link\"><i class=\"fa fa-envelope\" aria-hidden=\"true\"></i> send mail</button>`;\n      }\n    }, {\n      data: 'cancelStatus',\n      title: '退貨狀態',\n      defaultContent: '-',\n      className: 'text-center',\n      render: data => {\n        return `<span class=\"badge\">${data ? data : '-'}</span>`;\n      }\n    }, {\n      data: 'isReturnInSap',\n      title: 'SAP是否銷帳',\n      defaultContent: '-',\n      className: 'credit-note text-center',\n      render: (data, type, row, meta) => {\n        console.log(row.cancelStatus);\n        const action = `</span><button id=\"credit-note\" class=\"btn btn-sm btn-link\"><i class=\"fa fa-file\" aria-hidden=\"true\"></i> proceed</button>`;\n        const check = '<i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i>';\n        const info = '<i class=\"fa fa-info-circle fa-lg\" aria-hidden=\"true\"></i>';\n        return `${row.cancelStatus === 'Returned' ? data ? check : action : info}`;\n      }\n    } // { data: 'note', title: 'Note', defaultContent: '-',className: 'text-center' },\n    ]\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/return/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"BCVR8tiu\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"h1\\\",true],[8],[1,[24,[\\\"model\\\",\\\"storeTitle\\\"]],false],[9],[0,\\\"\\\\n\\\"],[7,\\\"h1\\\",true],[8],[0,\\\"Return Orders\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"h4\\\",true],[8],[0,\\\"(High-risk orders will be highlighted in red)\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"card-option\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-check form-check-inline\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"input\\\",true],[10,\\\"class\\\",\\\"form-check-input\\\"],[10,\\\"name\\\",\\\"filterBy\\\"],[10,\\\"id\\\",\\\"status\\\"],[11,\\\"checked\\\",[28,\\\"not\\\",[[24,[\\\"isChecked\\\"]]],null]],[11,\\\"onChange\\\",[28,\\\"action\\\",[[23,0,[]],\\\"change\\\",false],null]],[10,\\\"type\\\",\\\"radio\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[7,\\\"label\\\",true],[10,\\\"class\\\",\\\"form-check-label\\\"],[10,\\\"for\\\",\\\"status\\\"],[8],[0,\\\"\\\\n            Filter by Status\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-check form-check-inline\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"input\\\",true],[10,\\\"class\\\",\\\"form-check-input\\\"],[10,\\\"name\\\",\\\"filterBy\\\"],[10,\\\"id\\\",\\\"date\\\"],[11,\\\"checked\\\",[22,\\\"isChecked\\\"]],[11,\\\"onChange\\\",[28,\\\"action\\\",[[23,0,[]],\\\"change\\\",true],null]],[10,\\\"type\\\",\\\"radio\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[7,\\\"label\\\",true],[10,\\\"class\\\",\\\"form-check-label\\\"],[10,\\\"for\\\",\\\"date\\\"],[8],[0,\\\"\\\\n            Filter by Date\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"card-tool\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"if\\\",[[24,[\\\"isChecked\\\"]]],null,{\\\"statements\\\":[[0,\\\"    \\\"],[5,\\\"datetimepicker\\\",[],[[\\\"@options\\\",\\\"@dpChange\\\"],[[24,[\\\"model\\\",\\\"datetimeOptions\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"pickTheDate\\\"],null]]]],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]},{\\\"statements\\\":[[0,\\\"    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-1\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"select\\\",true],[10,\\\"class\\\",\\\"form-control\\\"],[10,\\\"id\\\",\\\"selectTheStatus\\\"],[11,\\\"onchange\\\",[28,\\\"action\\\",[[23,0,[]],\\\"selectTheStatus\\\"],[[\\\"value\\\"],[\\\"target.value\\\"]]]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"\\\"],[8],[0,\\\"All\\\"],[9],[0,\\\"\\\\n            \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"WaitingForReturn\\\"],[8],[0,\\\"Waiting for Return\\\"],[9],[0,\\\"\\\\n            \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"Returned\\\"],[8],[0,\\\"Returned\\\"],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]}],[9],[0,\\\"\\\\n\\\"],[5,\\\"datatable\\\",[],[[\\\"@options\\\",\\\"@btnClick\\\",\\\"@mail\\\",\\\"@proceed\\\"],[[24,[\\\"model\\\",\\\"options\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"btnClick\\\"],null],[28,\\\"action\\\",[[23,0,[]],\\\"mail\\\"],null],[28,\\\"action\\\",[[23,0,[]],\\\"proceed\\\"],null]]]]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/return/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/route\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n\n    beforeModal() {\n      if (this.session.isAuthenticated) {\n        this.transitionTo('/');\n      }\n    },\n\n    actions: {\n      homePage() {\n        console.log(this.currentModel.shopifyStore);\n        this.transitionTo('/' + this.currentModel.shopifyStore);\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/rptosap/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    requestPaymentType: '',\n    toast: Ember.inject.service(),\n    actions: {\n      toSap() {\n        const excelData = document.querySelector('#exceldata');\n\n        if (excelData == null || excelData.files[0] == null) {\n          this.toast.error(\"No file selected\");\n          return;\n        }\n\n        if (this.get('requestPaymentType') === 'Error') {\n          this.toast.error(\"Wrong File Format\");\n          return;\n        }\n\n        this.send('importRequestPaymentToSap', excelData.files[0]);\n      },\n\n      toSapAP() {\n        const excelData = document.querySelector('#exceldata');\n\n        if (excelData == null || excelData.files[0] == null) {\n          this.toast.error(\"No file selected\");\n          return;\n        }\n\n        if (this.get('requestPaymentType') === 'Error') {\n          this.toast.error(\"Wrong File Format\");\n          return;\n        }\n\n        this.send('importRequestPaymentToSapAP', excelData.files[0]);\n      },\n\n      asteroomToSap() {\n        const excelData = document.querySelector('#exceldata');\n\n        if (excelData == null || excelData.files[0] == null) {\n          this.toast.error(\"No file selected\");\n          return;\n        }\n\n        const postingDate = document.querySelector('#postingDate').value;\n\n        if (postingDate === '') {\n          this.toast.error(\"請選擇過帳日\");\n          return;\n        }\n\n        this.send('importAsteroomOrderToSap', excelData.files[0], postingDate);\n      },\n\n      asteroomToSapAr() {\n        const excelData = document.querySelector('#exceldata');\n\n        if (excelData == null || excelData.files[0] == null) {\n          this.toast.error(\"No file selected\");\n          return;\n        }\n\n        const postingDate = document.querySelector('#postingDateAr').value;\n\n        if (postingDate === '') {\n          this.toast.error(\"請選擇過帳日\");\n          return;\n        }\n\n        this.send('importAsteroomOrderToSapAr', excelData.files[0], postingDate);\n      },\n\n      asteroomToSapRWC008() {\n        const excelData = document.querySelector('#exceldata');\n\n        if (excelData == null || excelData.files[0] == null) {\n          this.toast.error(\"No file selected\");\n          return;\n        }\n\n        this.send('importAsteroomOrderToSapRWC008', excelData.files[0]);\n      },\n\n      inputOnChange(e) {\n        this.send('checkRequestPaymentType', e.target.files[0]);\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/rptosap/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    setupController(controller, model) {\n      console.log(this.session.data.authenticated); // this.session.data.authenticated.canImportSap\n      // this.session.data.authenticated.canImportSapRpOrAp = true\n      // this.session.data.authenticated.canImportAsteroomDynamicCustomer = true\n      // this.session.data.authenticated.canImportAsteroomFixedCustomer = true\n\n      const {\n        canImportSapRpOrAp,\n        canImportAsteroomDynamicCustomer,\n        canImportAsteroomFixedCustomer\n      } = this.session.data.authenticated;\n      controller.set('canImportSapRpOrAp', canImportSapRpOrAp);\n      controller.set('canImportAsteroomDynamicCustomer', canImportAsteroomDynamicCustomer);\n      controller.set('canImportAsteroomFixedCustomer', canImportAsteroomFixedCustomer);\n      controller.set('filter', '');\n      controller.set('model', model);\n    },\n\n    async orderList4Shipped(token, queryParams) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.orderList4Shipped(token, queryParams);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    download(data) {\n      let elm = document.createElement('a');\n      elm.href = URL.createObjectURL(data.blob);\n      elm.setAttribute('download', data.fileName);\n      elm.click();\n    },\n\n    actions: {\n      async setReturnOrders(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows({\n          selected: true\n        }).data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.setReturnOrders(token, selectedSNS);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Succcessful');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"沒有操作權限\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async checkRequestPaymentType(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.checkRequestPaymentType(token, file);\n\n          if (response.ok) {\n            this.controller.set('requestPaymentType', response.data);\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importRequestPaymentToSap(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAsteroomRequestPaymentToSap(token, file);\n\n          if (response.ok) {\n            this.toast.success('Import To Sap Purchase order Succcessfully');\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importRequestPaymentToSapAP(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAsteroomRequestPaymentToSapAP(token, file);\n\n          if (response.ok) {\n            this.toast.success('Import To Sap AP Succcessfully');\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importAsteroomOrderToSap(file, postingDate) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAsteroomOrderToSapAP(token, file, postingDate);\n\n          if (response.ok) {\n            this.toast.success('Import To Sap AP Succcessfully');\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importAsteroomOrderToSapAr(file, postingDate) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAsteroomOrderToSapAr(token, file, postingDate);\n\n          if (response.ok) {\n            this.toast.success('Import To Sap AP Succcessfully');\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importAsteroomOrderToSapRWC008(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAsteroomOrderToSapRWC008(token, file);\n\n          if (response.ok) {\n            this.toast.success('Import To Sap AP Succcessfully');\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async LetterOfThanks(data, dt) {\n        const token = this.session.data.authenticated.token;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.sendEmail(token, data);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Send the Letter of Thanks Succcessfully');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"請至Shopify後台操作\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async orderList4Shipped(data, dt) {\n        const token = this.session.data.authenticated.token;\n      },\n\n      test() {\n        return \"hk\";\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/rptosap/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"feZXqJlg\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"upload-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n    \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"exceldata\\\"],[8],[0,\\\"Choose a file\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"input\\\",true],[10,\\\"id\\\",\\\"exceldata\\\"],[10,\\\"name\\\",\\\"avatar\\\"],[11,\\\"onchange\\\",[28,\\\"action\\\",[[23,0,[]],\\\"inputOnChange\\\"],null]],[10,\\\"accept\\\",\\\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\\\"],[10,\\\"type\\\",\\\"file\\\"],[8],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\\n\\\"],[4,\\\"if\\\",[[24,[\\\"canImportSapRpOrAp\\\"]]],null,{\\\"statements\\\":[[0,\\\"        \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n            RequestPaymentType: \\\"],[1,[22,\\\"requestPaymentType\\\"],false],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[10,\\\"style\\\",\\\"max-width: 250px\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"toSap\\\"],null]],[8],[0,\\\"匯入SAP採購單\\\"],[9],[0,\\\" \\\\n        \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[10,\\\"style\\\",\\\"max-width: 250px\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"toSapAP\\\"],null]],[8],[0,\\\"匯入SAP A/P發票\\\"],[9],[0,\\\" \\\\n\\\"]],\\\"parameters\\\":[]},null],[0,\\\"    \\\\n\\\"],[4,\\\"if\\\",[[24,[\\\"canImportAsteroomDynamicCustomer\\\"]]],null,{\\\"statements\\\":[[0,\\\"        \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"display:none;\\\"],[8],[0,\\\"\\\\n            過帳日:\\\"],[7,\\\"input\\\",true],[10,\\\"id\\\",\\\"postingDate\\\"],[10,\\\"type\\\",\\\"date\\\"],[8],[9],[0,\\\"\\\\n            \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[10,\\\"style\\\",\\\"max-width: 250px\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"asteroomToSap\\\"],null]],[8],[0,\\\"匯入SAP Asteroom訂單\\\"],[9],[0,\\\" \\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n            過帳日:\\\"],[7,\\\"input\\\",true],[10,\\\"id\\\",\\\"postingDateAr\\\"],[10,\\\"type\\\",\\\"date\\\"],[8],[9],[0,\\\"\\\\n            \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[10,\\\"style\\\",\\\"max-width: 250px\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"asteroomToSapAr\\\"],null]],[8],[0,\\\"匯入SAP Asteroom AR發票\\\"],[9],[0,\\\" \\\\n        \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]},null],[4,\\\"if\\\",[[24,[\\\"canImportAsteroomFixedCustomer\\\"]]],null,{\\\"statements\\\":[[0,\\\"        \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n            \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[10,\\\"style\\\",\\\"max-width: 250px\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"asteroomToSapRWC008\\\"],null]],[8],[0,\\\"匯入SAP Asteroom訂單 RWC008\\\"],[9],[0,\\\" \\\\n            \\\"],[7,\\\"span\\\",true],[8],[0,\\\"(會抓取xlsx的E, H, J欄位, E: SapItemCode, H: Quantity, J: TotalAmount)\\\"],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]},null],[0,\\\"    \\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/rptosap/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/stripe/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    actions: {\n      pickTheDate(date, mode) {\n        const dt = $('.dataTable').DataTable(); // const filter = this.filter;\n\n        this.set('filter', '');\n        this.send('getStripeOrderList', {\n          date: date,\n          mode: mode,\n          filter: ''\n        }, dt);\n      },\n\n      filterData(dt) {\n        const filter = this.filter;\n        const oTable = Ember.typeOf(dt) !== 'undefined' ? dt : $('.dataTable').DataTable();\n        const date = moment($(\"#datetimepicker\").data().date);\n        const mode = $('#datetimepicker').data(\"DateTimePicker\").options().viewMode.slice(0, -1);\n        this.send('getStripeOrderList', {\n          date: date,\n          mode: mode,\n          filter: filter\n        }, oTable);\n      },\n\n      packageListByOrder() {}\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/stripe/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async getStripeOrderList(token, queryParams) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.getStripeOrderList(token, queryParams);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    async model() {\n      const token = this.session.data.authenticated.token;\n      const {\n        columns,\n        chineseColumns\n      } = this;\n      let isChinesePage = window.isChinesePage();\n\n      var startDateAndEndDate = _Data.default.getStartDateAndEndDate(isChinesePage, moment(new Date()));\n\n      let queryParams = {\n        startDate: startDateAndEndDate.startDate,\n        endDate: startDateAndEndDate.endDate\n      }; // if(isChinesePage){\n      //     queryParams = {\n      //         startDate: Data.startOfTaipeiTimeZone('month'),\n      //         endDate: Data.endOfTaipeiTimeZone('month')\n      //     }\n      // }\n\n      const dataSource = await this.getStripeOrderList(token, queryParams);\n      return {\n        options: {\n          data: dataSource,\n          columns: chineseColumns,\n          order: [] // select: { style: 'single', selector: 'td:not(:first-child)', }\n\n        },\n        datetimeOptions: {\n          format: 'YYYY-MM',\n          viewMode: 'months',\n          timezone: isChinesePage ? 'Asia/Taipei' : 'America/Los_Angeles'\n        },\n        storeTitle: window.getStoreTitle()\n      };\n    },\n\n    setupController(controller, model) {\n      controller.set('filter', '');\n      controller.set('model', model);\n      setTimeout(() => {\n        // const colors = ['#7f58af', 'blue', 'green']\n        const colors = [\"#ac48a3\", \"#67bd3f\", \"#8c54c8\", \"#a1ba3c\", \"#d177e2\", \"#3b8e35\", \"#db47a6\", \"#5cc477\", \"#e03b6a\", \"#5ac1a1\", \"#d94a34\", \"#3abbcc\", \"#e18c30\", \"#6070d2\", \"#c7a73a\", \"#6495d2\", \"#bc5b2a\", \"#33815b\", \"#b6457b\", \"#678429\", \"#cd8ecb\", \"#5e874a\", \"#7e5692\", \"#b0b16b\", \"#a0485d\", \"#7b712b\", \"#e5828b\", \"#99662e\", \"#b44f46\", \"#de9a6c\"];\n        const stripeSummaryList = [...document.querySelectorAll('.stripe-summary')];\n        const idToDom = {};\n        stripeSummaryList.forEach(s => {\n          const sapId = s.dataset.sapid;\n\n          if (idToDom[sapId]) {\n            idToDom[sapId] = [...idToDom[sapId], s];\n          } else {\n            idToDom[sapId] = [s];\n          }\n        });\n        Object.values(idToDom).forEach(arr => {\n          const color = colors.pop();\n          arr.forEach(a => {\n            a.style.color = 'white';\n            a.style['font-size'] = '2rem';\n            a.parentElement.style['background-color'] = color;\n          });\n        }); // console.log(idToDom)\n      }, 1);\n    },\n\n    actions: {\n      async getStripeOrderList(data, dt) {\n        const token = this.session.data.authenticated.token;\n        const isChinesePage = window.isChinesePage();\n\n        var startDateAndEndDate = _Data.default.getStartDateAndEndDate(isChinesePage, data.date);\n\n        let queryParams = {\n          startDate: startDateAndEndDate.startDate,\n          endDate: startDateAndEndDate.endDate\n        };\n\n        if (!_Data.default.isEmptyString(data.filter)) {\n          queryParams = {};\n          queryParams.keyword = data.filter;\n        }\n\n        const dataSource = await this.getStripeOrderList(token, queryParams);\n        dt.clear().rows.add(dataSource).draw();\n        dt.rows().deselect();\n        dt.columns.adjust();\n        $('table thead .details-control').css('width', '15px');\n      }\n\n    },\n    columns: [],\n    chineseColumns: [{\n      data: null,\n      orderable: false,\n      visible: false,\n      className: 'details-control',\n      render: () => '<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>'\n    }, {\n      data: 'orderId',\n      title: '訂單號碼',\n      render: (data, type, row, meta) => {\n        return `${row.orderId}<br>${row.email}<br>時間：${moment(row.purchaseDate).tz('Asia/Taipei').format('YYYY-MM-DD HH:mm:ss')}`;\n      }\n    }, {\n      data: 'sapId',\n      title: 'Sap Id',\n      render: (data, type, row, meta) => {\n        if (data == null && row.currency !== 'TWD') {\n          return `<div style='color:red'>每星期一早上9:00彙整匯入</div>`;\n        } else if (data && row.currency !== 'TWD') {\n          return `<div class='stripe-summary' data-sapid='${data}'>${data}</div>`;\n        } else {\n          return data;\n        }\n      }\n    }, {\n      data: 'detail',\n      orderable: false,\n      title: '內容',\n      render: (data, type, row, meta) => {\n        const d = JSON.parse(data);\n\n        if (d.Currency.toUpperCase() === 'TWD' && d.CarrierType === -1) {\n          d.CarrierType = 1;\n        }\n\n        let content = '';\n\n        for (let i = 0; i < d.PurchaseItems.length; i++) {\n          const purchaseItem = d.PurchaseItems[i];\n          content += `<div class='stripe-sub-detail'>`;\n          content += `<div class='stripe-sub-detail-header'>購買商品</div>`;\n          content += `<div>SKU：${purchaseItem.SAPItemCode.toUpperCase()}</div>`;\n          content += `<div>商品名：${purchaseItem.ProductName}</div>`;\n          content += `<div>數量：${purchaseItem.Quantity}</div>`;\n          content += `<div>單價：${purchaseItem.UnitPrice} ${d.Currency.toUpperCase()}</div>`;\n          content += `<div>總價：${d.Amount} ${d.Currency.toUpperCase()}</div>`;\n          content += `</div>`;\n        }\n\n        if (d.CarrierType !== -1) {\n          content += `<div class='stripe-sub-detail'>`;\n          content += `<div class='stripe-sub-detail-header'>發票</div>`;\n\n          if (d.CarrierType === 5) {\n            content += `<div>載具類別：無載具(捐贈)</div>`;\n            content += `<div>捐贈代碼：${d.DonateToUnitCode}</div>`;\n          } else if (d.CarrierType === 1) {\n            content += `<div>載具類別：綠界電子發票載具</div>`;\n          } else if (d.CarrierType === 2) {\n            content += `<div>載具類別：自然人憑證</div>`;\n            content += `<div>自然人憑證號碼：${d.NationalPersonNumber}</div>`;\n          } else if (d.CarrierType === 3) {\n            content += `<div>載具類別：手機條碼</div>`;\n            content += `<div>手機條碼：${d.MobileBarcodeCarrier}</div>`;\n          } else if (d.CarrierType === 0) {\n            content += `<div>載具類別：無載具(列印電子發票)</div>`;\n            if (d.CompanyName) content += `<div>姓名：${d.CompanyName}</div>`;\n            if (d.CompanyPhone) content += `<div>電話：${d.CompanyPhone}</div>`;\n            if (d.CompanyAddress) content += `<div>地址：${d.CompanyAddress}</div>`;\n          } else if (d.CarrierType === 4) {\n            content += `<div>載具類別：無載具(公司行號)</div>`;\n            if (d.CompanyName) content += `<div>公司名稱：${d.CompanyName}</div>`;\n            if (d.CompanyPhone) content += `<div>公司電話：${d.CompanyPhone}</div>`;\n            if (d.CompanyAddress) content += `<div>公司地址：${d.CompanyAddress}</div>`;\n            if (d.CompanyIdentifier) content += `<div>統一編號：${d.CompanyIdentifier}</div>`;\n          }\n\n          if (d.Note) {\n            content += `<div>備註：${d.Note}</div>`;\n          }\n\n          content += `</div>`;\n        }\n\n        let html = `<div class='stripe-detail'>${content}</div>`;\n        return html;\n      }\n    }]\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/stripe/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"76xr5/+1\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"h1\\\",true],[8],[1,[24,[\\\"model\\\",\\\"storeTitle\\\"]],false],[9],[0,\\\"\\\\n\\\"],[7,\\\"h1\\\",true],[8],[0,\\\"Stripe訂單\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"card-tool\\\"],[8],[0,\\\"\\\\n    \\\"],[5,\\\"datetimepicker\\\",[],[[\\\"@options\\\",\\\"@dpChange\\\"],[[24,[\\\"model\\\",\\\"datetimeOptions\\\"]],[28,\\\"action\\\",[[23,0,[]],\\\"pickTheDate\\\"],null]]]],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-1\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"input-group search\\\"],[8],[0,\\\"\\\\n            \\\"],[1,[28,\\\"input\\\",null,[[\\\"type\\\",\\\"class\\\",\\\"value\\\"],[\\\"text\\\",\\\"form-control\\\",[24,[\\\"filter\\\"]]]]],false],[0,\\\"\\\\n            \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"input-group-append\\\"],[8],[0,\\\"\\\\n                \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"filterData\\\"]],[8],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fa fa-search\\\"],[10,\\\"aria-hidden\\\",\\\"true\\\"],[8],[9],[9],[0,\\\"\\\\n            \\\"],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"],[9],[0,\\\"\\\\n\\\"],[5,\\\"datatable\\\",[],[[\\\"@options\\\"],[[24,[\\\"model\\\",\\\"options\\\"]]]]]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/stripe/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"8XPnGvcE\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"card\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"card-header\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"homePage\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fas fa-home fa-1x\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"card-body\\\"],[8],[0,\\\"\\\\n        \\\"],[1,[22,\\\"outlet\\\"],false],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/tosaparinvoice/controller\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Controller.extend({\n    requestPaymentType: '',\n    counsellingErrorDatails: [],\n    toast: Ember.inject.service(),\n    actions: {\n      toSapArInvoice() {\n        const excelData = document.querySelector('#exceldata');\n\n        if (excelData == null || excelData.files[0] == null) {\n          this.toast.error(\"No file selected\");\n          return;\n        }\n\n        this.send('importCounsellingToArInvoice', excelData.files[0]);\n      },\n\n      inputOnChange(e) {// this.send('checkRequestPaymentType', e.target.files[0])\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/tosaparinvoice/route\", [\"exports\", \"client-cma/utils/Data\"], function (_exports, _Data) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    session: Ember.inject.service(),\n    order: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    setupController(controller, model) {\n      console.log(this.session.data.authenticated); // this.session.data.authenticated.canImportSap\n      // this.session.data.authenticated.canImportSapRpOrAp = true\n      // this.session.data.authenticated.canImportAsteroomDynamicCustomer = true\n      // this.session.data.authenticated.canImportAsteroomFixedCustomer = true\n\n      const {\n        canImportSapRpOrAp,\n        canImportAsteroomDynamicCustomer,\n        canImportAsteroomFixedCustomer\n      } = this.session.data.authenticated;\n      controller.set('canImportSapRpOrAp', canImportSapRpOrAp);\n      controller.set('canImportAsteroomDynamicCustomer', canImportAsteroomDynamicCustomer);\n      controller.set('canImportAsteroomFixedCustomer', canImportAsteroomFixedCustomer);\n      controller.set('filter', '');\n      controller.set('model', model);\n    },\n\n    async orderList4Shipped(token, queryParams) {\n      let dataSource = [];\n\n      try {\n        const response = await this.order.orderList4Shipped(token, queryParams);\n\n        if (response.ok) {\n          dataSource = response.data;\n        } else {\n          throw response;\n        }\n\n        return dataSource;\n      } catch (error) {\n        if (error.code === 401) {\n          await this.session.invalidate();\n          this.transitionTo('/');\n        } else if (error.code === 403) {\n          this.transitionTo('/');\n        } else {\n          this.toast.error(error.message);\n        }\n      }\n    },\n\n    download(data) {\n      let elm = document.createElement('a');\n      elm.href = URL.createObjectURL(data.blob);\n      elm.setAttribute('download', data.fileName);\n      elm.click();\n    },\n\n    actions: {\n      async setReturnOrders(dt) {\n        const token = this.session.data.authenticated.token;\n        let selectedSNS = dt.rows({\n          selected: true\n        }).data().toArray().map(data => data.shopifySN);\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.setReturnOrders(token, selectedSNS);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Succcessful');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"沒有操作權限\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async checkRequestPaymentType(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.checkRequestPaymentType(token, file);\n\n          if (response.ok) {\n            this.controller.set('requestPaymentType', response.data);\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importRequestPaymentToSap(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAsteroomRequestPaymentToSap(token, file);\n\n          if (response.ok) {\n            this.toast.success('Import To Sap Purchase order Succcessfully');\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importRequestPaymentToSapAP(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAsteroomRequestPaymentToSapAP(token, file);\n\n          if (response.ok) {\n            this.toast.success('Import To Sap AP Succcessfully');\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importAsteroomOrderToSap(file, postingDate) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAsteroomOrderToSapAP(token, file, postingDate);\n\n          if (response.ok) {\n            this.toast.success('Import To Sap AP Succcessfully');\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importCounsellingToArInvoice(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importCounsellingToArInvoice(token, file);\n\n          if (response.ok) {\n            const datas = Object.entries(response.data);\n\n            if (datas.length > 0) {\n              //有錯誤\n              this.toast.error(\"匯入失敗\");\n              this.controller.set('counsellingErrorDatails', datas);\n            } else {\n              this.toast.success('匯入成功');\n              this.controller.set('counsellingErrorDatails', []);\n            }\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async importAsteroomOrderToSapRWC008(file) {\n        const token = this.session.data.authenticated.token;\n        this.send('startSpinner');\n\n        try {\n          const response = await this.order.importAsteroomOrderToSapRWC008(token, file);\n\n          if (response.ok) {\n            this.toast.success('Import To Sap AP Succcessfully');\n          } else {\n            this.toast.error(\"error\");\n            throw response;\n          }\n        } catch (error) {\n          this.toast.error(error.message);\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async LetterOfThanks(data, dt) {\n        const token = this.session.data.authenticated.token;\n\n        try {\n          this.send('startSpinner');\n          const response = await this.order.sendEmail(token, data);\n\n          if (response.ok) {\n            this.controller.send('filterData', dt);\n            this.toast.success('Send the Letter of Thanks Succcessfully');\n          } else {\n            throw response;\n          }\n        } catch (error) {\n          if (error.code === 401) {\n            await this.session.invalidate();\n            this.transitionTo('/');\n          } else if (error.code === 403) {\n            alert(\"請至Shopify後台操作\");\n          } else {\n            this.toast.error(error.message);\n          }\n        } finally {\n          this.send('stopSpinner');\n        }\n      },\n\n      async orderList4Shipped(data, dt) {\n        const token = this.session.data.authenticated.token;\n      },\n\n      test() {\n        return \"hk\";\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/order/tosaparinvoice/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"Xl/DgNqj\",\n    \"block\": \"{\\\"symbols\\\":[\\\"detail\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"upload-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n    \\\"],[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"exceldata\\\"],[8],[0,\\\"Choose a file\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"input\\\",true],[10,\\\"id\\\",\\\"exceldata\\\"],[10,\\\"name\\\",\\\"avatar\\\"],[11,\\\"onchange\\\",[28,\\\"action\\\",[[23,0,[]],\\\"inputOnChange\\\"],null]],[10,\\\"accept\\\",\\\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\\\"],[10,\\\"type\\\",\\\"file\\\"],[8],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\\n    \\\\n    \\\"],[7,\\\"div\\\",true],[8],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-primary\\\"],[10,\\\"style\\\",\\\"max-width: 250px\\\"],[11,\\\"onclick\\\",[28,\\\"action\\\",[[23,0,[]],\\\"toSapArInvoice\\\"],null]],[8],[0,\\\"匯入AR發票\\\"],[9],[0,\\\" \\\\n        \\\"],[7,\\\"span\\\",true],[8],[0,\\\"(全部匯入成功才成功)\\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[23,0,[\\\"counsellingErrorDatails\\\"]]],null,{\\\"statements\\\":[[0,\\\"        \\\"],[7,\\\"div\\\",true],[10,\\\"style\\\",\\\"border: 1px solid #494949; padding: 5px;\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"div\\\",true],[8],[0,\\\"缺乏項目主檔：\\\"],[1,[28,\\\"get\\\",[[23,1,[]],\\\"0\\\"],null],false],[9],[0,\\\"\\\\n            \\\"],[7,\\\"div\\\",true],[8],[0,\\\"行數：\\\"],[1,[28,\\\"get\\\",[[23,1,[]],\\\"1\\\"],null],false],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[1]},null],[0,\\\"    \\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/order/tosaparinvoice/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/pphk/route\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    auth: Ember.inject.service(),\n    session: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async model() {\n      try {\n        const token = this.session.data.authenticated.token;\n        const response = await this.auth.isAuthenticated(token);\n\n        if (response.ok) {\n          if (this.session.data.authenticated.canUsePpHk === false) {\n            alert(\"你沒有權限，請洽管理員\");\n            this.transitionTo('/');\n          }\n\n          const account = response.data.email;\n          const options = [{\n            content: '待出貨',\n            route: '/pphk/order/process'\n          }, {\n            content: '已出貨',\n            route: '/pphk/order/complete'\n          }, {\n            content: '所有訂單',\n            route: '/pphk/order/list'\n          }, {\n            content: '退貨訂單',\n            route: '/pphk/order/return'\n          } // {\n          //     content: 'Calibrate Address',\n          //     route: '/pphk/order/address'\n          // }\n          ];\n          return {\n            options: options,\n            account: account\n          };\n        } else {\n          throw response;\n        }\n      } catch (error) {\n        this.toast.error('AUTHENTICATE_FAIL');\n        await this.session.invalidate();\n        this.transitionTo('login');\n      }\n    },\n\n    actions: {\n      homePage() {\n        this.transitionTo('/');\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/pphk/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"pYtasTrh\",\n    \"block\": \"{\\\"symbols\\\":[\\\"option\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashborad-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"top\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[12,\\\"style\\\",\\\"border-radius: 50%;\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"homePage\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fas fa-home fa-1x\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"signOut\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"icon icon-sign-out-white\\\"],[8],[9],[0,\\\"\\\\n            \\\"],[7,\\\"span\\\",true],[8],[1,[24,[\\\"model\\\",\\\"account\\\"]],false],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"h1\\\",true],[8],[0,\\\"香港蒙恬\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashboard\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"model\\\",\\\"options\\\"]]],null,{\\\"statements\\\":[[0,\\\"            \\\"],[5,\\\"dashmenu\\\",[],[[\\\"@route\\\",\\\"@content\\\"],[[23,1,[\\\"route\\\"]],[23,1,[\\\"content\\\"]]]]],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[1]},null],[0,\\\"    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/pphk/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/ppinc/route\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    auth: Ember.inject.service(),\n    session: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async model() {\n      try {\n        const token = this.session.data.authenticated.token;\n        const response = await this.auth.isAuthenticated(token);\n\n        if (response.ok) {\n          if (this.session.data.authenticated.canUsePpInc === false) {\n            alert(\"你沒有權限，請洽管理員\");\n            this.transitionTo('/');\n          }\n\n          const account = response.data.email;\n          const options = [{\n            content: 'Processing Orders',\n            route: '/ppinc/order/process'\n          }, {\n            content: 'Shipped Orders',\n            route: '/ppinc/order/complete'\n          }, {\n            content: 'All Orders',\n            route: '/ppinc/order/list'\n          }, {\n            content: 'Return Orders',\n            route: '/ppinc/order/return'\n          }, {\n            content: 'Calibrate Address',\n            route: '/ppinc/order/address'\n          }];\n          return {\n            options: options,\n            account: account\n          };\n        } else {\n          throw response;\n        }\n      } catch (error) {\n        this.toast.error('AUTHENTICATE_FAIL');\n        await this.session.invalidate();\n        this.transitionTo('login');\n      }\n    },\n\n    actions: {\n      homePage() {\n        this.transitionTo('/');\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/ppinc/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"NR9Dnhlv\",\n    \"block\": \"{\\\"symbols\\\":[\\\"option\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashborad-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"top\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[12,\\\"style\\\",\\\"border-radius: 50%;\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"homePage\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fas fa-home fa-1x\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"signOut\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"icon icon-sign-out-white\\\"],[8],[9],[0,\\\"\\\\n            \\\"],[7,\\\"span\\\",true],[8],[1,[24,[\\\"model\\\",\\\"account\\\"]],false],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"h1\\\",true],[8],[0,\\\"Penpower Inc.\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashboard\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"model\\\",\\\"options\\\"]]],null,{\\\"statements\\\":[[0,\\\"            \\\"],[5,\\\"dashmenu\\\",[],[[\\\"@route\\\",\\\"@content\\\"],[[23,1,[\\\"route\\\"]],[23,1,[\\\"content\\\"]]]]],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[1]},null],[0,\\\"    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/ppinc/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/pptw/route\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.Route.extend({\n    auth: Ember.inject.service(),\n    session: Ember.inject.service(),\n    toast: Ember.inject.service(),\n\n    async model() {\n      try {\n        const token = this.session.data.authenticated.token;\n        const response = await this.auth.isAuthenticated(token);\n\n        if (response.ok) {\n          if (this.session.data.authenticated.canUsePpTw === false) {\n            alert(\"你沒有權限，請洽管理員\");\n            this.transitionTo('/');\n          }\n\n          const account = response.data.email;\n          const options = [{\n            content: '易購網訂單',\n            route: '/pptw/order/list'\n          }, {\n            content: 'Stripe訂單',\n            route: '/pptw/order/stripe'\n          }, {\n            content: '發票號碼回填AR發票',\n            route: '/pptw/order/invoicetosap'\n          }];\n          return {\n            options: options,\n            account: account\n          };\n        } else {\n          throw response;\n        }\n      } catch (error) {\n        this.toast.error('AUTHENTICATE_FAIL');\n        await this.session.invalidate();\n        this.transitionTo('login');\n      }\n    },\n\n    actions: {\n      homePage() {\n        this.transitionTo('/');\n      }\n\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/src/pptw/template\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"OMa2dcpU\",\n    \"block\": \"{\\\"symbols\\\":[\\\"option\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashborad-container\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"top\\\"],[8],[0,\\\"\\\\n        \\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[12,\\\"style\\\",\\\"border-radius: 50%;\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"homePage\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"fas fa-home fa-1x\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[3,\\\"action\\\",[[23,0,[]],\\\"signOut\\\"]],[8],[0,\\\"\\\\n            \\\"],[7,\\\"i\\\",true],[10,\\\"class\\\",\\\"icon icon-sign-out-white\\\"],[8],[9],[0,\\\"\\\\n            \\\"],[7,\\\"span\\\",true],[8],[1,[24,[\\\"model\\\",\\\"account\\\"]],false],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"h1\\\",true],[8],[0,\\\"台灣蒙恬\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"dashboard\\\"],[8],[0,\\\"\\\\n\\\"],[4,\\\"each\\\",[[24,[\\\"model\\\",\\\"options\\\"]]],null,{\\\"statements\\\":[[0,\\\"            \\\"],[5,\\\"dashmenu\\\",[],[[\\\"@route\\\",\\\"@content\\\"],[[23,1,[\\\"route\\\"]],[23,1,[\\\"content\\\"]]]]],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[1]},null],[0,\\\"    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/src/pptw/template.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/templates/application\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"/2Rt7SjJ\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"wrapper\\\"],[8],[0,\\\"\\\\n    \\\"],[1,[22,\\\"outlet\\\"],false],[0,\\\"\\\\n    \\\"],[15,\\\"spinner\\\",[]],[0,\\\"\\\\n\\\"],[9],[0,\\\"\\\\n\\\\n\\\"]],\\\"hasEval\\\":true}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/templates/application.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/templates/components/dashmenu\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"wYx4+DRC\",\n    \"block\": \"{\\\"symbols\\\":[\\\"@isDisabled\\\",\\\"@content\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[11,\\\"class\\\",[28,\\\"if\\\",[[23,1,[]],\\\"disabled\\\"],null]],[8],[1,[23,2,[]],false],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/templates/components/dashmenu.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/templates/components/datatable\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"/1B3G7Aa\",\n    \"block\": \"{\\\"symbols\\\":[\\\"&default\\\"],\\\"statements\\\":[[14,1]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/templates/components/datatable.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/templates/components/datetimepicker\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"8FZh7bxu\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"form-group mb-1\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"input-group date\\\"],[10,\\\"id\\\",\\\"datetimepicker\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"input\\\",true],[10,\\\"class\\\",\\\"form-control\\\"],[10,\\\"type\\\",\\\"text\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[7,\\\"span\\\",true],[10,\\\"class\\\",\\\"input-group-addon\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"span\\\",true],[10,\\\"class\\\",\\\"fas fa-calendar\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/templates/components/datetimepicker.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/templates/components/modal-dialog\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"H036kzDs\",\n    \"block\": \"{\\\"symbols\\\":[\\\"&default\\\",\\\"@comfirm\\\"],\\\"statements\\\":[[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"modal-dialog modal-dialog-centered modal-lg\\\"],[10,\\\"role\\\",\\\"document\\\"],[8],[0,\\\"\\\\n    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"modal-content\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"modal-header\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"h3\\\",true],[10,\\\"class\\\",\\\"modal-title\\\"],[8],[1,[22,\\\"modalTitle\\\"],false],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"modal-body\\\"],[8],[0,\\\"\\\\n            \\\"],[14,1],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"modal-footer\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"button\\\",false],[12,\\\"class\\\",\\\"btn btn-primary\\\"],[12,\\\"type\\\",\\\"button\\\"],[3,\\\"action\\\",[[23,0,[]],[23,2,[]]]],[8],[1,[22,\\\"btnConfirmTitie\\\"],false],[9],[0,\\\"\\\\n            \\\"],[7,\\\"button\\\",true],[10,\\\"class\\\",\\\"btn btn-outline-secondary\\\"],[10,\\\"data-dismiss\\\",\\\"modal\\\"],[10,\\\"type\\\",\\\"button\\\"],[8],[1,[22,\\\"btnCancelTitle\\\"],false],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/templates/components/modal-dialog.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/templates/spinner\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"+zkyfZyf\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[4,\\\"if\\\",[[24,[\\\"enableSpinner\\\"]]],null,{\\\"statements\\\":[[0,\\\"    \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"spinner\\\"],[8],[0,\\\"\\\\n        \\\"],[7,\\\"div\\\",true],[10,\\\"class\\\",\\\"spinner-dialog\\\"],[8],[0,\\\"\\\\n            \\\"],[7,\\\"span\\\",true],[10,\\\"class\\\",\\\"fa fa-spinner fa-spin fa-4x\\\"],[8],[9],[0,\\\"\\\\n        \\\"],[9],[0,\\\"\\\\n    \\\"],[9],[0,\\\"\\\\n\\\"]],\\\"parameters\\\":[]},null]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/templates/spinner.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/templates/state\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n\n  var _default = Ember.HTMLBars.template({\n    \"id\": \"5C4y8yBy\",\n    \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"label\\\",true],[10,\\\"for\\\",\\\"state\\\"],[10,\\\"class\\\",\\\"col-sm-2\\\"],[8],[0,\\\"State\\\"],[9],[0,\\\"\\\\n\\\"],[7,\\\"select\\\",true],[10,\\\"name\\\",\\\"stateProvinceCode\\\"],[10,\\\"size\\\",\\\"1\\\"],[10,\\\"id\\\",\\\"state\\\"],[10,\\\"class\\\",\\\"form-control form-control-lg col-sm-10\\\"],[8],[0,\\\"\\\\n\\\"],[0,\\\"    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"AL\\\"],[8],[0,\\\"Alabama\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"AK\\\"],[10,\\\"selected\\\",\\\"selected\\\"],[8],[0,\\\"Alaska\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"AZ\\\"],[8],[0,\\\"Arizona\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"AR\\\"],[8],[0,\\\"Arkansas\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"CA\\\"],[8],[0,\\\"California\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"CO\\\"],[8],[0,\\\"Colorado\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"CT\\\"],[8],[0,\\\"Connecticut\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"DE\\\"],[8],[0,\\\"Delaware\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"DC\\\"],[8],[0,\\\"District of Columbia\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"FL\\\"],[8],[0,\\\"Florida\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"GA\\\"],[8],[0,\\\"Georgia\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"HI\\\"],[8],[0,\\\"Hawaii\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"ID\\\"],[8],[0,\\\"Idaho\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"IL\\\"],[8],[0,\\\"Illinois\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"IN\\\"],[8],[0,\\\"Indiana\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"IA\\\"],[8],[0,\\\"Iowa\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"KS\\\"],[8],[0,\\\"Kansas\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"KY\\\"],[8],[0,\\\"Kentucky\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"LA\\\"],[8],[0,\\\"Louisiana\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"ME\\\"],[8],[0,\\\"Maine\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"MD\\\"],[8],[0,\\\"Maryland\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"MA\\\"],[8],[0,\\\"Massachusetts\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"MI\\\"],[8],[0,\\\"Michigan\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"MN\\\"],[8],[0,\\\"Minnesota\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"MS\\\"],[8],[0,\\\"Mississippi\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"MO\\\"],[8],[0,\\\"Missouri\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"MT\\\"],[8],[0,\\\"Montana\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"NE\\\"],[8],[0,\\\"Nebraska\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"NV\\\"],[8],[0,\\\"Nevada\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"NH\\\"],[8],[0,\\\"New Hampshire\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"NJ\\\"],[8],[0,\\\"New Jersey\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"NM\\\"],[8],[0,\\\"New Mexico\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"NY\\\"],[8],[0,\\\"New York\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"NC\\\"],[8],[0,\\\"North Carolina\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"ND\\\"],[8],[0,\\\"North Dakota\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"OH\\\"],[8],[0,\\\"Ohio\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"OK\\\"],[8],[0,\\\"Oklahoma\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"OR\\\"],[8],[0,\\\"Oregon\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"PA\\\"],[8],[0,\\\"Pennsylvania\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"RI\\\"],[8],[0,\\\"Rhode Island\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"SC\\\"],[8],[0,\\\"South Carolina\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"SD\\\"],[8],[0,\\\"South Dakota\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"TN\\\"],[8],[0,\\\"Tennessee\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"TX\\\"],[8],[0,\\\"Texas\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"UT\\\"],[8],[0,\\\"Utah\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"VT\\\"],[8],[0,\\\"Vermont\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"VA\\\"],[8],[0,\\\"Virginia\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"WA\\\"],[8],[0,\\\"Washington\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"WV\\\"],[8],[0,\\\"West Virginia\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"WI\\\"],[8],[0,\\\"Wisconsin\\\"],[9],[0,\\\"\\\\n    \\\"],[7,\\\"option\\\",true],[10,\\\"value\\\",\\\"WY\\\"],[8],[0,\\\"Wyoming\\\"],[9],[0,\\\"\\\\n\\\"],[9]],\\\"hasEval\\\":false}\",\n    \"meta\": {\n      \"moduleName\": \"client-cma/templates/state.hbs\"\n    }\n  });\n\n  _exports.default = _default;\n});","define(\"client-cma/utils/Data\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.getStartDateAndEndDate = _exports.endOfTaipeiTimeZone = _exports.startOfTaipeiTimeZone = _exports.endOf = _exports.startOf = _exports.validateObject = _exports.isEmptyString = _exports.isEmptyArray = _exports.isEmptyObject = void 0;\n\n  const isEmptyObject = object => {\n    return Ember.typeOf(object) === 'object' && Object.keys(object).length === 0;\n  };\n\n  _exports.isEmptyObject = isEmptyObject;\n\n  const isEmptyArray = array => {\n    return Ember.typeOf(array) === 'array' && Ember.isBlank(array);\n  };\n\n  _exports.isEmptyArray = isEmptyArray;\n\n  const isEmptyString = string => {\n    return Ember.isEmpty(string);\n  };\n\n  _exports.isEmptyString = isEmptyString;\n\n  const validateObject = object => {\n    let message = [];\n\n    if (Ember.typeOf(object) === 'object') {\n      for (const [key, value] of Object.entries(object)) {\n        if (key === 'street2' || key === 'company' || key === 'ignoreSecondAddressCheck') {\n          continue;\n        }\n\n        if (Ember.isBlank(value)) {\n          message.push(`${key} is empty.`);\n        }\n      }\n    }\n\n    if (!isEmptyArray(message)) {\n      return message.join('<br>');\n    } else {\n      return message;\n    }\n  };\n\n  _exports.validateObject = validateObject;\n\n  const startOf = (mode = 'day', day = new moment().tz('America/Los_Angeles')) => {\n    if (day) return day.startOf(mode).add(7, 'hour').format('YYYY-MM-DD[T]HH:mm:ss[Z]');\n  };\n\n  _exports.startOf = startOf;\n\n  const endOf = (mode = 'day', day = new moment().tz('America/Los_Angeles')) => {\n    if (day) return day.endOf(mode).add(7, 'hour').format('YYYY-MM-DD[T]HH:mm:ss[Z]');\n  };\n\n  _exports.endOf = endOf;\n\n  const startOfTaipeiTimeZone = (mode = 'day', day = new moment().tz('Asia/Taipei')) => {\n    if (day) return day.startOf(mode).subtract(8, 'hour').format('YYYY-MM-DD[T]HH:mm:ss[Z]');\n  };\n\n  _exports.startOfTaipeiTimeZone = startOfTaipeiTimeZone;\n\n  const endOfTaipeiTimeZone = (mode = 'day', day = new moment().tz('Asia/Taipei')) => {\n    if (day) return day.endOf(mode).subtract(8, 'hour').format('YYYY-MM-DD[T]HH:mm:ss[Z]');\n  };\n\n  _exports.endOfTaipeiTimeZone = endOfTaipeiTimeZone;\n\n  const getStartDateAndEndDate = (isTaipeiZone, day = new moment().startOf('month')) => {\n    day = day.startOf('month');\n    var isoTimeStartDate;\n    isTaipeiZone = false;\n\n    if (isTaipeiZone) {\n      isoTimeStartDate = day.parseZone().tz(\"Asia/Taipei\", true).toISOString(true);\n    } else {\n      isoTimeStartDate = day.parseZone().tz(\"America/Los_Angeles\", true).toISOString(true);\n    }\n\n    console.log(moment(JSON.parse(JSON.stringify(isoTimeStartDate))));\n    var isoEndDate = moment(JSON.parse(JSON.stringify(isoTimeStartDate))).endOf('month').toISOString(true);\n    var utcStart = moment(isoTimeStartDate).utc().format();\n\n    if (!isTaipeiZone) {\n      utcStart = moment(isoTimeStartDate).utc().subtract('1', 'd').add('9', 'h').format();\n    }\n\n    var utcEnd = moment(isoEndDate).utc().format();\n    console.log({\n      utcStart,\n      utcEnd\n    });\n    return {\n      startDate: utcStart,\n      endDate: utcEnd\n    };\n  };\n\n  _exports.getStartDateAndEndDate = getStartDateAndEndDate;\n});","\n","define('client-cma/config/environment', [], function() {\n  var prefix = 'client-cma';\ntry {\n  var metaName = prefix + '/config/environment';\n  var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n  var config = JSON.parse(decodeURIComponent(rawConfig));\n\n  var exports = { 'default': config };\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n  return exports;\n}\ncatch(err) {\n  throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n});\n","\n          if (!runningTests) {\n            require(\"client-cma/app\")[\"default\"].create({\"AUTHENTICATOR\":\"authenticator:custom\",\"APINAMESPACE\":\"api/order/\",\"rootURL\":\"https://cma-test.penpower.com.tw/\",\"name\":\"client-cma\",\"version\":\"0.0.0+4f79afc0\"});\n          }\n        \n"],"names":[],"mappings":"AAAA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;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;;ACtCA;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;;AC3BA;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;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;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;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;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;;AC1gBA;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;;ACxCA;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;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;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;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;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;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;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;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;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;;AClDA;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;;AC3FA;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;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;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;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;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;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;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;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;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;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;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;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;AACA;;ACjrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;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;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;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;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AC5CA;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;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;;AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;ACrDA;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;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;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AChDA;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;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;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;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;;AC1bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;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;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;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;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;;AC1fA;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;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;ACpCA;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;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;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;ACtCA;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;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;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;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;;ACzYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AC9DA;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;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;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;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;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;;ACxjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AClEA;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;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;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;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;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;;AChiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AC1BA;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;;AClGA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;ACtCA;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;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;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AC9BA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;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;;ACxGA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;","file":"client-cma.js"}