{"version":3,"sources":["webpack:///resources/js/src/app/components/category/StepByStepNavigation.vue","webpack:///./node_modules/core-js/modules/es.promise.finally.js","webpack:///./resources/js/src/app/components/category/StepByStepNavigation.vue?9623","webpack:///./resources/js/src/app/components/category/StepByStepNavigation.vue","webpack:///./resources/js/src/app/components/category/StepByStepNavigation.vue?4c6a","webpack:///./resources/js/src/app/components/category/StepByStepNavigation.vue?8e89"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AAEA;AACA;AACA,gBACA;AACA,kBADA;AAEA;AAFA,KAFA;AAMA,eACA;AACA,kBADA;AAEA;AAFA,KAPA;AAWA,iBACA;AACA,kBADA;AAEA;AAFA,KAZA;AAgBA,aACA;AACA,kBADA;AAEA;AAFA,KAjBA;AAqBA,gBACA;AACA,kBADA;AAEA;AAFA,KAtBA;AA0BA,mBACA;AACA,kBADA;AAEA;AAFA;AA3BA,GADA;AAkCA,MAlCA,kBAmCA;AACA;AACA,sBADA;AAEA;AAFA;AAIA,GAxCA;AA0CA;AAEA,iBAFA,2BAGA;AACA;AACA;AALA,KAOA;AACA;AAAA;AAAA;AADA,IAPA,CA1CA;AAsDA,aAtDA,yBAuDA;AACA;AACA,GAzDA;AA2DA,WACA;AACA,aADA,uBAEA;AAAA;;AACA,2BACA;AACA;AAEA,0DACA;AAAA;AAAA;AAAA,SADA,EAEA,OAFA,CAEA,YACA;AACA;AACA;AACA,SANA;AAOA;AACA,KAfA;AAiBA,kBAjBA,0BAiBA,GAjBA,EAkBA;AACA;AACA;AAEA;AACA;AAvBA;AA5DA,G;;;;;;;;;;;;AC5Ba;AACb,QAAQ,mBAAO,CAAC,uEAAqB;AACrC,cAAc,mBAAO,CAAC,yEAAsB;AAC5C,oBAAoB,mBAAO,CAAC,+GAAyC;AACrE,YAAY,mBAAO,CAAC,qEAAoB;AACxC,iBAAiB,mBAAO,CAAC,mFAA2B;AACpD,yBAAyB,mBAAO,CAAC,iGAAkC;AACnE,qBAAqB,mBAAO,CAAC,yFAA8B;AAC3D,eAAe,mBAAO,CAAC,2EAAuB;;AAE9C;AACA;AACA,2CAA2C,oBAAoB,cAAc,EAAE,eAAe,cAAc;AAC5G,CAAC;;AAED;AACA;AACA,GAAG,kEAAkE;AACrE;AACA;AACA;AACA;AACA;AACA,gEAAgE,UAAU,EAAE;AAC5E,OAAO;AACP;AACA,gEAAgE,SAAS,EAAE;AAC3E,OAAO;AACP;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;;;;;;;;;;;;ACnCA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,uBAAuB;AACvB;AACA;AACA,uCAAuC,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kDAAkD;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,yBAAyB,8BAA8B;AACvD;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC7HA;AAAA;AAAA;AAAA;AAAmG;AAC3B;AACL;;;AAGnE;AACsG;AACtG,gBAAgB,2GAAU;AAC1B,EAAE,0FAAM;AACR,EAAE,+FAAM;AACR,EAAE,wGAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;ACtCf;AAAA;AAAA,wCAA4M,CAAgB,wPAAG,EAAC,C;;;;;;;;;;;;ACAhO;AAAA;AAAA;AAAA;AAAA;AAAA","file":"chunks/ceres-20.js","sourcesContent":["<template>\n    <div>\n        <slot v-if=\"!isInitiallyLoaded\"></slot>\n        <div class=\"row\">\n            <div class=\"mb-3 col-6\" :class=\"'col-md-' + columnDivider\" v-for=\"category in categoryChildren\">\n                <a :href=\"getCategoryUrl(category.url)\" :title=\"category.details[0].metaTitle || category.details[0].name\">\n                    <div class=\"nav-item border d-flex\" :class=\"{ 'no-img': imageSource === 'none' }\">\n                        <div v-if=\"category.details[0][imageSource]\" class=\"prop-1-1\">\n                            <img v-if=\"imageSource !== 'none'\" :src=\"'/documents/' + category.details[0][imageSource]\" :alt=\"category.details[0].metaTitle || category.details[0].name\">\n                        </div>\n                        <div class=\"nav-text d-flex align-center p-2\"><span class=\"text-appearance mx-auto text-truncate\">{{ category.details[0].name }}</span></div>\n                    </div>\n                </a>\n            </div>\n\n            <div class=\"mb-3 mx-auto\" v-if=\"categoryChildren.length && categoryChildren.length < childrenCount\">\n                <button type=\"button\" class=\"btn btn-appearance px-4 py-3\" @click=\"loadChunk()\" :class=\"{ 'disabled': isWaiting }\">\n                    <span>{{ $translate(\"Ceres::Template.stepByStepNavigationShowMore\") }}</span>\n                    <icon icon=\"plus-circle\" class=\"fa-fw\" class-loading=\"fa-repeat\" :loading=\"isWaiting\"></icon>\n                </button>\n            </div>\n        </div>\n    </div>\n</template>\n\n<script>\nimport { mapState } from \"vuex\";\n\nexport default {\n    props: {\n        categoryId:\n        {\n            type: Number,\n            required: true\n        },\n        chunkSize:\n        {\n            type: Number,\n            default: 8\n        },\n        imageSource:\n        {\n            type: String,\n            default: \"imagePath\"\n        },\n        columns:\n        {\n            type: Number,\n            default: 4\n        },\n        columnsMax:\n        {\n            type: Number,\n            default: 12\n        },\n        childrenCount:\n        {\n            type: Number,\n            required: true\n        }\n    },\n\n    data()\n    {\n        return {\n            isWaiting: false,\n            isInitiallyLoaded: false\n        };\n    },\n\n    computed:\n        {\n            columnDivider()\n            {\n                return this.columnsMax / this.columns;\n            },\n\n            ...mapState({\n                categoryChildren: state => state.navigation.categoryChildren\n            })\n        },\n\n    beforeMount()\n    {\n        this.loadChunk();\n    },\n\n    methods:\n    {\n        loadChunk()\n        {\n            if (!this.isWaiting)\n            {\n                this.isWaiting = true;\n\n                this.$store.dispatch(\"loadCategoryChildrenChunk\",\n                    { categoryId: this.categoryId, size: this.chunkSize })\n                    .finally(() =>\n                    {\n                        this.isWaiting = false;\n                        this.isInitiallyLoaded = true;\n                    });\n            }\n        },\n\n        getCategoryUrl(url)\n        {\n            const trailingSlash = url[0] === \"/\" ? \"\" : \"/\";\n            const prefix = App.urls.includeLanguage ? `/${ App.language }${ trailingSlash }` : \"\";\n\n            return prefix + url;\n        }\n    }\n}\n</script>\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar redefine = require('../internals/redefine');\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n  NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n  'finally': function (onFinally) {\n    var C = speciesConstructor(this, getBuiltIn('Promise'));\n    var isFunction = typeof onFinally == 'function';\n    return this.then(\n      isFunction ? function (x) {\n        return promiseResolve(C, onFinally()).then(function () { return x; });\n      } : onFinally,\n      isFunction ? function (e) {\n        return promiseResolve(C, onFinally()).then(function () { throw e; });\n      } : onFinally\n    );\n  }\n});\n\n// patch native Promise.prototype for native async functions\nif (!IS_PURE && typeof NativePromise == 'function' && !NativePromise.prototype['finally']) {\n  redefine(NativePromise.prototype, 'finally', getBuiltIn('Promise').prototype['finally']);\n}\n","var render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    \"div\",\n    [\n      !_vm.isInitiallyLoaded ? _vm._t(\"default\") : _vm._e(),\n      _vm._v(\" \"),\n      _c(\n        \"div\",\n        { staticClass: \"row\" },\n        [\n          _vm._l(_vm.categoryChildren, function(category) {\n            return _c(\n              \"div\",\n              {\n                staticClass: \"mb-3 col-6\",\n                class: \"col-md-\" + _vm.columnDivider\n              },\n              [\n                _c(\n                  \"a\",\n                  {\n                    attrs: {\n                      href: _vm.getCategoryUrl(category.url),\n                      title:\n                        category.details[0].metaTitle ||\n                        category.details[0].name\n                    }\n                  },\n                  [\n                    _c(\n                      \"div\",\n                      {\n                        staticClass: \"nav-item border d-flex\",\n                        class: { \"no-img\": _vm.imageSource === \"none\" }\n                      },\n                      [\n                        category.details[0][_vm.imageSource]\n                          ? _c(\"div\", { staticClass: \"prop-1-1\" }, [\n                              _vm.imageSource !== \"none\"\n                                ? _c(\"img\", {\n                                    attrs: {\n                                      src:\n                                        \"/documents/\" +\n                                        category.details[0][_vm.imageSource],\n                                      alt:\n                                        category.details[0].metaTitle ||\n                                        category.details[0].name\n                                    }\n                                  })\n                                : _vm._e()\n                            ])\n                          : _vm._e(),\n                        _vm._v(\" \"),\n                        _c(\n                          \"div\",\n                          { staticClass: \"nav-text d-flex align-center p-2\" },\n                          [\n                            _c(\n                              \"span\",\n                              {\n                                staticClass:\n                                  \"text-appearance mx-auto text-truncate\"\n                              },\n                              [_vm._v(_vm._s(category.details[0].name))]\n                            )\n                          ]\n                        )\n                      ]\n                    )\n                  ]\n                )\n              ]\n            )\n          }),\n          _vm._v(\" \"),\n          _vm.categoryChildren.length &&\n          _vm.categoryChildren.length < _vm.childrenCount\n            ? _c(\"div\", { staticClass: \"mb-3 mx-auto\" }, [\n                _c(\n                  \"button\",\n                  {\n                    staticClass: \"btn btn-appearance px-4 py-3\",\n                    class: { disabled: _vm.isWaiting },\n                    attrs: { type: \"button\" },\n                    on: {\n                      click: function($event) {\n                        return _vm.loadChunk()\n                      }\n                    }\n                  },\n                  [\n                    _c(\"span\", [\n                      _vm._v(\n                        _vm._s(\n                          _vm.$translate(\n                            \"Ceres::Template.stepByStepNavigationShowMore\"\n                          )\n                        )\n                      )\n                    ]),\n                    _vm._v(\" \"),\n                    _c(\"icon\", {\n                      staticClass: \"fa-fw\",\n                      attrs: {\n                        icon: \"plus-circle\",\n                        \"class-loading\": \"fa-repeat\",\n                        loading: _vm.isWaiting\n                      }\n                    })\n                  ],\n                  1\n                )\n              ])\n            : _vm._e()\n        ],\n        2\n      )\n    ],\n    2\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./StepByStepNavigation.vue?vue&type=template&id=1c90b572&\"\nimport script from \"./StepByStepNavigation.vue?vue&type=script&lang=js&\"\nexport * from \"./StepByStepNavigation.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (module.hot) {\n  var api = require(\"/home/runner/work/plugin-ceres/plugin-ceres/node_modules/vue-hot-reload-api/dist/index.js\")\n  api.install(require('vue'))\n  if (api.compatible) {\n    module.hot.accept()\n    if (!api.isRecorded('1c90b572')) {\n      api.createRecord('1c90b572', component.options)\n    } else {\n      api.reload('1c90b572', component.options)\n    }\n    module.hot.accept(\"./StepByStepNavigation.vue?vue&type=template&id=1c90b572&\", function () {\n      api.rerender('1c90b572', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"resources/js/src/app/components/category/StepByStepNavigation.vue\"\nexport default component.exports","import mod from \"-!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StepByStepNavigation.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StepByStepNavigation.vue?vue&type=script&lang=js&\"","export * from \"-!../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StepByStepNavigation.vue?vue&type=template&id=1c90b572&\""],"sourceRoot":""}