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AACA,cAAIQ,KAAK,CAACJ,UAAN,CAAiBC,EAAjB,IAAuBe,OAA3B,EAAoC;AAEnCN,YAAAA,OAAO,CAACC,IAAR,CAAc;AAAS,mBAAK,EAAIK,OAAlB;AAA2B,sBAAQ;AAAnC,oBAAuCE,UAAvC,MAAd;AAEA,WAJD,MAIO;AAENR,YAAAA,OAAO,CAACC,IAAR,CAAc;AAAS,mBAAK,EAAIK;AAAlB,oBAA8BE,UAA9B,MAAd;AACA;AACD;AAED;AACD;;AAED,QAAIjB,EAAE,GAAGG,KAAK,CAACJ,UAAN,CAAiBC,EAA1B;;AAEA,aAASkB,qBAAT,CAA+BC,CAA/B,EAAkC;AAEjC,UAAIJ,OAAO,GAAGI,CAAC,CAACC,MAAF,CAASC,KAAvB;AACAlB,MAAAA,KAAK,CAACmB,aAAN,CAAqB;AAACtB,QAAAA,EAAE,EAAEe;AAAL,OAArB;AACA;;AAED,WACA;AAAK,WAAK,EAAExB;AAAZ,YAAmC;AAAK,WAAK,EAAEC;AAAZ,YAAuB;AAAK,WAAK,EAAEC,SAAZ;AAAuB,SAAG,EAAE;AAA5B,MAAvB,MAAnC,OAAyO,oFAAM;AAAQ,cAAQ,EAAEyB;AAAlB,YAA2CT,OAA3C,MAAN,MAAzO,MADA;AAIA,GA7EF;;AA8ECc,EAAAA,IAAI,CAAEpB,KAAF,EAAU;AACb,WAAO,IAAP;AACA;;AAhFF,CAFgB,CAAjB,C","sources":["webpack://gutenberg_shortcode_block/external window [\"wp\",\"element\"]","webpack://gutenberg_shortcode_block/webpack/bootstrap","webpack://gutenberg_shortcode_block/webpack/runtime/compat get default export","webpack://gutenberg_shortcode_block/webpack/runtime/define property getters","webpack://gutenberg_shortcode_block/webpack/runtime/hasOwnProperty shorthand","webpack://gutenberg_shortcode_block/webpack/runtime/make namespace object","webpack://gutenberg_shortcode_block/./src/index.js"],"sourcesContent":["module.exports = window[\"wp\"][\"element\"];","// 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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const { registerBlockType } = wp.blocks;\n\nvar wpep_block_container = {\n\t\"text-align\": 'center'\n};\n\nvar divStyle = {\n\t// \"margin-bottom\": \"40px\",\n\t\"margin-bottom\": \"20px\",\n};\n\nvar wpep_logo = {\n\n\t// filter: \"grayscale(100%)\",\n\twidth: \"100px\"\n}\n\n\nregisterBlockType(\n\t'mycred/submissions',\n\t{\n\n\t\ttitle: 'myCred Submissions',\n\t\tdescription: 'Block to add submissions shortcode to the page',\n\t\ticon: 'dashicons-before dashicons-mycred',\n\t\tcategory: 'mycred',\n\t\tattributes: {\n\t\t\tid: {\n\t\t\t\ttype: 'string',\n\n\t\t\t}\n\t\t},\n\t\tedit( props ) {\n\t\t\t\n\n\t\t\tvar badge = submission_forms.badge;\n\t\t\tvar rank \t= submission_forms.rank;\n\t\t\tvar field \t= submission_forms.check_fields\n\t\t\tvar options = [];\n\n\t\t\toptions.push( )\n\t\t\tfor (var key in badge) {\n\t\t\t\t\n\t\t\t\tvar badge_field = field[key].badge;\n\t\t\t\tvar rank_field = field[key].rank;\n\n\t\t\t\tif(badge_field == 'on' ){\n\t\t\t\t\tif (badge.hasOwnProperty( key )) {\n\t\t\t\t\t\tvar form_id = badge[key].ID;\n\t\t\t\t\t\tvar form_title = badge[key].title;\n\t\t\t\t\t\tif (props.attributes.id == form_id) {\n\n\t\t\t\t\t\t\toptions.push( < option value = {form_id} selected > {form_title} < / option > )\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\toptions.push( < option value = {form_id} > {form_title} < / option > )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\toptions.push( )\n\t\t\tfor (var key in rank) {\n\t\t\t\n\t\t\t\tvar badge_field = field[key].rank;\n\t\t\t\tvar rank_field = field[key].rank;\n\t\t\t\tif(rank_field == 'on'){\n\t\t\t\t\tif (rank.hasOwnProperty( key )) {\n\t\t\t\t\t\tvar form_id = rank[key].ID;\n\t\t\t\t\t\tvar form_title = rank[key].title;\n\t\t\t\t\t\tif (props.attributes.id == form_id) {\n\n\t\t\t\t\t\t\toptions.push( < option value = {form_id} selected > {form_title} < / option > )\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\toptions.push( < option value = {form_id} > {form_title} < / option > )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar id = props.attributes.id;\n\n\t\t\tfunction wpep_shortcode_change(e) {\n\n\t\t\t\tvar form_id = e.target.value;\n\t\t\t\tprops.setAttributes( {id: form_id} );\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t
\n\t\t);\n\n\t\t},\n\t\tsave( props ) {\n\t\t\treturn null;\n\t\t}\n\n\t}\n);\n"],"names":["registerBlockType","wp","blocks","wpep_block_container","divStyle","wpep_logo","width","title","description","icon","category","attributes","id","type","edit","props","badge","submission_forms","rank","field","check_fields","options","push","key","badge_field","rank_field","hasOwnProperty","form_id","ID","form_title","wpep_shortcode_change","e","target","value","setAttributes","save"],"sourceRoot":""}