{"version":3,"sources":["webpack:///./src/libs/i18n/locales sync [A-Za-z0-9-_,\\s]+\\.json$/","webpack:///./src/libs/i18n/index.js","webpack:///./src/libs/axios.js","webpack:///./src/libs/acl/routeProtection.js","webpack:///./src/libs/acl/index.js","webpack:///./src/libs/acl/ability.js","webpack:///./src/libs/acl/config.js"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","loadLocaleMessages","locales","require","messages","forEach","key","matched","match","length","locale","Vue","use","VueI18n","fallbackLocale","axiosIns","axios","create","baseURL","headers","prototype","$http","canNavigate","to","some","route","ability","can","meta","action","resource","abilitiesPlugin","userData","JSON","parse","localStorage","getItem","existingAbility","Ability","initialAbility","subject"],"mappings":"+0pBAAA,IAAIA,EAAM,CACT,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,QAId,SAASC,EAAeC,GACvB,IAAIC,EAAKC,EAAsBF,GAC/B,OAAOG,EAAoBF,GAE5B,SAASC,EAAsBF,GAC9B,IAAIG,EAAoBC,EAAEN,EAAKE,GAAM,CACpC,IAAIK,EAAI,IAAIC,MAAM,uBAAyBN,EAAM,KAEjD,MADAK,EAAEE,KAAO,mBACHF,EAEP,OAAOP,EAAIE,GAEZD,EAAeS,KAAO,WACrB,OAAOC,OAAOD,KAAKV,IAEpBC,EAAeW,QAAUR,EACzBS,EAAOC,QAAUb,EACjBA,EAAeE,GAAK,Q,gHCxBpB,SAASY,IACP,IAAMC,EAAUC,UAKVC,EAAW,GAQjB,OAPAF,EAAQN,OAAOS,SAAQ,SAACC,GACtB,IAAMC,EAAUD,EAAIE,MAAM,uBAC1B,GAAID,GAAWA,EAAQE,OAAS,EAAG,CACjC,IAAMC,EAASH,EAAQ,GACvBH,EAASM,GAAUR,EAAQI,OAGxBF,EAfTO,aAAIC,IAAIC,QAiBO,WAAIA,OAAQ,CACzBH,OAAQ,KACRI,eAAgB,KAChBV,SAAUH,O,oCCvBZ,qCAKMc,EAAWC,IAAMC,OAAO,CAI5BC,QAAS,8BAETC,QAAS,CAAE,eAAgB,sBAG7BR,aAAIS,UAAUC,MAAQN,EAEPA,U,8FCdFO,EAAc,SAACC,GAAE,OAC5BA,EAAGhB,QAAQiB,MAAK,SAACC,GACf,OAAOC,OAAQC,IAAIF,EAAMG,KAAKC,QAAU,OAAQJ,EAAMG,KAAKE,e,kCCJ/D,wCAIAnB,aAAIC,IAAImB,OAAiBL,S,wECGnBM,EAAWC,KAAKC,MAAMC,aAAaC,QAAQ,aAC3CC,EAAkBL,EAAWA,EAASN,QAAU,KAEvC,WAAIY,OAAQD,GAAmBE,S,k0dCV9C,kCAAO,IAAMA,EAAiB,CAC5B,CACEV,OAAQ,OACRW,QAAS","file":"js/app~562ce1b6.9a21cb77.js","sourcesContent":["var map = {\n\t\"./az.json\": \"2dd2\",\n\t\"./de.json\": \"db06\",\n\t\"./en.json\": \"d782\",\n\t\"./fr.json\": \"ff8f\",\n\t\"./pt.json\": \"415d\",\n\t\"./ru.json\": \"1a6d\",\n\t\"./tr.json\": \"111b\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"3e8d\";","import Vue from \"vue\";\nimport VueI18n from \"vue-i18n\";\n\nVue.use(VueI18n);\nfunction loadLocaleMessages() {\n const locales = require.context(\n \"./locales\",\n true,\n /[A-Za-z0-9-_,\\s]+\\.json$/i\n );\n const messages = {};\n locales.keys().forEach((key) => {\n const matched = key.match(/([A-Za-z0-9-_]+)\\./i);\n if (matched && matched.length > 1) {\n const locale = matched[1];\n messages[locale] = locales(key);\n }\n });\n return messages;\n}\nexport default new VueI18n({\n locale: \"tr\",\n fallbackLocale: \"tr\",\n messages: loadLocaleMessages(),\n});\n","import Vue from \"vue\";\n\n// axios\nimport axios from \"axios\";\n\nconst axiosIns = axios.create({\n // You can add your headers here\n // ================================\n // baseURL: \"https://api.optiformula.com\",\n baseURL: \"https://api.optiformula.com\",\n // timeout: 1000,\n headers: { \"Content-Type\": \"application/json\" },\n});\n\nVue.prototype.$http = axiosIns;\n\nexport default axiosIns;\n","import ability from \"./ability\";\n\nexport const canNavigate = (to) =>\n to.matched.some((route) => {\n return ability.can(route.meta.action || \"read\", route.meta.resource);\n });\n\nexport const _ = undefined;\n","import Vue from \"vue\";\nimport { abilitiesPlugin } from \"@casl/vue\";\nimport ability from \"./ability\";\n\nVue.use(abilitiesPlugin, ability);\n","import { Ability } from \"@casl/ability\";\nimport { initialAbility } from \"./config\";\n\n// Read ability from localStorage\n// * Handles auto fetching previous abilities if already logged in user\n// ? You can update this if you store user abilities to more secure place\n// ! Anyone can update localStorage so be careful and please update this\nconst userData = JSON.parse(localStorage.getItem(\"userData\"));\nconst existingAbility = userData ? userData.ability : null;\n\nexport default new Ability(existingAbility || initialAbility);\n","export const initialAbility = [\n {\n action: \"read\",\n subject: \"Auth\",\n },\n];\n\nexport const _ = undefined;\n"],"sourceRoot":""}