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OC,OAAOD,KAAKV,EACpB,EACAC,EAAeW,QAAUR,EACzBS,EAAOC,QAAUb,EACjBA,EAAeE,GAAK,K,kPCtBhBY,EAA2B,CAAC,EAGhC,SAASV,EAAoBW,GAE5B,IAAIC,EAAeF,EAAyBC,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaH,QAGrB,IAAID,EAASE,EAAyBC,GAAY,CAGjDF,QAAS,CAAC,GAOX,OAHAK,EAAoBH,GAAUH,EAAQA,EAAOC,QAAST,GAG/CQ,EAAOC,OACf,CCtBAT,EAAoBC,EAAI,SAASc,EAAKC,GAAQ,OAAOV,OAAOW,UAAUC,eAAeC,KAAKJ,EAAKC,EAAO,ECAtGhB,EAAoBoB,EAAI,kB,0CCKxBC,EAAAA,M","sources":["webpack://app/./vendor/bundle/ruby/3.1.0/bundler/gems/decidim-6836a27ba935/decidim-initiatives/app/packs/src/decidim/initiatives/identity_selector_dialog.js","webpack://app/./vendor/bundle/ruby/3.1.0/bundler/gems/decidim-6836a27ba935/decidim-initiatives/app/packs/src/decidim/initiatives/scoped_type.js","webpack://app/./vendor/bundle/ruby/3.1.0/bundler/gems/decidim-6836a27ba935/decidim-initiatives/app/packs/images/ sync ^\\.\\/.*$","webpack://app/webpack/bootstrap","webpack://app/webpack/runtime/hasOwnProperty shorthand","webpack://app/webpack/runtime/publicPath","webpack://app/./vendor/bundle/ruby/3.1.0/bundler/gems/decidim-6836a27ba935/decidim-initiatives/app/packs/entrypoints/decidim_initiatives.js"],"sourcesContent":["$(() => {\n let button = $(\"#select-identity-button\"),\n userIdentitiesDialog = $(\"#user-identities\");\n\n if (userIdentitiesDialog.length) {\n let refreshUrl = userIdentitiesDialog.data(\"refresh-url\");\n\n button.click(function () {\n $.ajax(refreshUrl).done(function(response) {\n userIdentitiesDialog.html(response).foundation(\"open\");\n });\n });\n }\n})\n","/* eslint-disable camelcase */\nconst controlSelector = function (source, prefix, currentValueKey) {\n if (source.length) {\n let currentValue = source.data(currentValueKey),\n searchUrl = source.data(`${prefix}-search-url`),\n targetElement = $(`#${source.data(`${prefix}-selector`)}`);\n\n if (targetElement.length) {\n let refresh = function () {\n $.ajax({\n url: searchUrl,\n cache: false,\n dataType: \"html\",\n data: {\n type_id: source.val(),\n selected: currentValue\n },\n success: function (data) {\n targetElement.html(data);\n }\n });\n };\n\n source.change(refresh);\n refresh();\n }\n }\n};\n\n$(() => {\n let typeSelector = $(\"[data-scope-selector]\");\n controlSelector(typeSelector, \"scope\", \"scope-id\");\n controlSelector(typeSelector, \"signature-types\", \"signature-type\");\n});\n","var map = {\n\t\"./decidim/gamification/badges/decidim_gamification_badges_initiatives.svg\": 97434,\n\t\"./decidim/initiatives/decidim_initiatives.svg\": 3982\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 = 90605;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","__webpack_require__.p = \"/decidim-packs/\";","import \"src/decidim/initiatives/application\"\nimport \"src/decidim/initiatives/identity_selector_dialog\"\nimport \"src/decidim/initiatives/scoped_type\"\n\n// Images\nrequire.context(\"../images\", true)\n\n// CSS\nimport \"stylesheets/initiatives.scss\"\n"],"names":["$","button","userIdentitiesDialog","length","refreshUrl","data","click","ajax","done","response","html","foundation","controlSelector","source","prefix","currentValueKey","currentValue","searchUrl","concat","targetElement","refresh","url","cache","dataType","type_id","val","selected","success","change","typeSelector","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","__webpack_module_cache__","moduleId","cachedModule","undefined","__webpack_modules__","obj","prop","prototype","hasOwnProperty","call","p","require"],"sourceRoot":""}