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,OAAA,EAATA,EAAWuC,SAChBC,SAAU,OACVC,KAAM,CACLC,OAAQ,kBACRvC,YAAAA,EACAG,SAAAA,EACAC,QAAAA,EACAG,QAAAA,EACAC,MAAAA,EACAG,UAAAA,EACAC,UAAAA,EACAN,OAAAA,EACAG,cAAAA,EACAC,eAAAA,EACAO,QAASA,GAEVuB,WAAU,SAAAA,aACTlB,GACD,EACAmB,QAAO,SAAAA,QAACC,GACPlB,SAAAA,EAAUmB,OAAOD,GACjB5C,EAAcG,KAAK,aAAcgB,GAE7BE,KACHM,EAAMC,KAAKZ,EAEb,EACA8B,SAAQ,SAAAA,WACPtB,GACD,GA7DD,CA+DD,GACD,G,GC3FIuB,EAA2B,CAAC,EAGhC,SAASC,oBAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB7C,IAAjB8C,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,qBAG/CI,EAAOD,OACf,C","sources":["webpack://wp-shortcodes/./src/scripts/more-load.ts","webpack://wp-shortcodes/webpack/bootstrap"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\njQuery(document).ready(function ($) {\n\t\"use strict\";\n\n\tconst moreButton = $(\".more-btn\");\n\n\tmoreButton.on(\"click\", function () {\n\t\tconst currentButton = $(this),\n\t\t\titemsNumber = $(this).attr(\"data-items-number\") || undefined,\n\t\t\tpostType = $(this).attr(\"data-post-type\") || undefined,\n\t\t\tmetaKey = $(this).attr(\"data-meta-key\") || undefined,\n\t\t\tblockId = $(this).attr(\"data-block-id\") || undefined,\n\t\t\tpageId = $(this).attr(\"data-page-id\") || undefined,\n\t\t\torderBy = $(this).attr(\"data-order-by\") || undefined,\n\t\t\torder = $(this).attr(\"data-order\") || undefined,\n\t\t\tcolumnsNumber = $(this).attr(\"data-columns-number\") || undefined,\n\t\t\tisEnableSlider = $(this).attr(\"data-enable-slider\") || undefined,\n\t\t\texcludeId = $(this).attr(\"data-exclude-id\") || undefined,\n\t\t\textractId = $(this).attr(\"data-extract-id\") || undefined,\n\t\t\tmoreText = $(this).attr(\"data-more-text\") || undefined,\n\t\t\tlessText = $(this).attr(\"data-less-text\") || undefined,\n\t\t\twrapperBlock = $(`#shortcode-posts-${blockId}`);\n\n\t\tlet paged = Number($(this).attr(\"data-paged\")) || 1;\n\n\t\tif (!wrapperBlock) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isLastPage = () => {\n\t\t\treturn wrapperBlock.find(\"#is-all-pages\").length;\n\t\t};\n\n\t\tconst handleButtonActiveStatus = () => {\n\t\t\tcurrentButton.toggleClass(\"opacity-75\");\n\t\t\tcurrentButton.toggleClass(\"pointer-events-none\");\n\t\t};\n\n\t\tconst cardList = wrapperBlock.find(\".shortcode-cards\"),\n\t\t\tlabel = currentButton.find(\"span\");\n\n\t\tif (isLastPage()) {\n\t\t\tlabel.text(moreText);\n\n\t\t\tcardList.empty();\n\t\t\tpaged = 0;\n\n\t\t\t$(\"html, body\").animate(\n\t\t\t\t{\n\t\t\t\t\tscrollTop: wrapperBlock.offset().top - 100,\n\t\t\t\t},\n\t\t\t\t500\n\t\t\t);\n\t\t}\n\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t\t// @ts-ignore\n\t\t\turl: ajax_data?.ajax_url,\n\t\t\tdataType: \"html\",\n\t\t\tdata: {\n\t\t\t\taction: \"load_more_posts\",\n\t\t\t\titemsNumber,\n\t\t\t\tpostType,\n\t\t\t\tmetaKey,\n\t\t\t\torderBy,\n\t\t\t\torder,\n\t\t\t\texcludeId,\n\t\t\t\textractId,\n\t\t\t\tpageId,\n\t\t\t\tcolumnsNumber,\n\t\t\t\tisEnableSlider,\n\t\t\t\tpaged: ++paged,\n\t\t\t},\n\t\t\tbeforeSend() {\n\t\t\t\thandleButtonActiveStatus();\n\t\t\t},\n\t\t\tsuccess(res: string) {\n\t\t\t\tcardList?.append(res);\n\t\t\t\tcurrentButton.attr(\"data-paged\", paged);\n\n\t\t\t\tif (isLastPage()) {\n\t\t\t\t\tlabel.text(lessText);\n\t\t\t\t}\n\t\t\t},\n\t\t\tcomplete() {\n\t\t\t\thandleButtonActiveStatus();\n\t\t\t},\n\t\t});\n\t});\n});\n","// 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"],"names":["jQuery","document","ready","$","on","_ajax_data","currentButton","this","itemsNumber","attr","undefined","postType","metaKey","blockId","pageId","orderBy","order","columnsNumber","isEnableSlider","excludeId","extractId","moreText","lessText","wrapperBlock","concat","paged","Number","isLastPage","find","length","handleButtonActiveStatus","toggleClass","cardList","label","text","empty","animate","scrollTop","offset","top","ajax","type","url","ajax_data","ajax_url","dataType","data","action","beforeSend","success","res","append","complete","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}