Sindbad~EG File Manager
{"version":3,"file":"admin-bar.js","mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,YAAY;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA,uBAAuB,cAAc,IAAI,MAAM;AAC/C;AACA;AACA,uBAAuB,cAAc,EAAE,MAAM;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,IAAI;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB,IAAI,uBAAuB;AACnE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,EAAE;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,wBAAwB,qBAAqB;AAC7C;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC5QuB;AACgB;AACD;AAyBtC,SAASG,WAAWA,CAAEC,OAAqB,EAAgB;EAC1D,MAAMC,SAAS,GAAGC,QAAQ,CAACC,aAAa,CAAE,KAAM,CAAC;EACjD,MAAMC,WAAW,GAAGJ,OAAO,CAACK,OAAO,GAChC;AACJ;AACA,KACIL,OAAO,CAACK,OAAO,CAACC,OAAO,GACpB;AACP;AACA,OAAQN,OAAO,CAACK,OAAO,CAACC,OAAO,CAACC,IAAI;AACpC;AACA,IAAI,GACG,EAAE;AACT,KAEIP,OAAO,CAACK,OAAO,CAACG,SAAS,GACtB;AACP;AACA,OAAQR,OAAO,CAACK,OAAO,CAACG,SAAS,CAACD,IAAI;AACtC;AACA,IAAI,GACG,EAAE;AACT;AACA,EACE,GACE,EAAE;EAELN,SAAS,CAACQ,SAAS,GAAG;AACvB;AACA;AACA;AACA,UAAWT,OAAO,CAACU,KAAK;AACxB;AACA;AACA,wCACMV,OAAO,CAACW,SAAS,IAAId,qDAAE,CAAE,OAAO,EAAE,aAAc,CAAC;AACvD;AACA;AACA;AACA,MACOG,OAAO,CAACY,OAAO;AACtB,MAAOR,WAAW;AAClB;AACA;AACA,QAAQ;EAEPF,QAAQ,CAACW,IAAI,CAACC,WAAW,CAAEb,SAAU,CAAC;;EAEtC;EACA,MAAMc,KAAK,GAAGA,CAAA,KAAM;IACnB;IACAnB,6CAAC,CAAEM,QAAS,CAAC,CAACc,GA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,CAAE,CAAC,C","sources":["webpack://popup-maker/core/./node_modules/@medv/finder/finder.js?","webpack://popup-maker/core/./packages/admin-bar/src/AdminBar.ts?","webpack://popup-maker/core/./packages/admin-bar/src/styles.scss?1029","webpack://popup-maker/core/external window [\"popupMaker\",\"i18n\"]?","webpack://popup-maker/core/external window \"jQuery\"?","webpack://popup-maker/core/webpack/bootstrap?","webpack://popup-maker/core/webpack/runtime/compat get default export?","webpack://popup-maker/core/webpack/runtime/define property getters?","webpack://popup-maker/core/webpack/runtime/hasOwnProperty shorthand?","webpack://popup-maker/core/webpack/runtime/make namespace object?","webpack://popup-maker/core/./packages/admin-bar/src/index.ts?"],"sourcesContent":["// License: MIT\n// Author: Anton Medvedev <anton@medv.io>\n// Source: https://github.com/antonmedv/finder\nlet config;\nlet rootDocument;\nlet start;\nexport function finder(input, options) {\n start = new Date();\n if (input.nodeType !== Node.ELEMENT_NODE) {\n throw new Error(`Can't generate CSS selector for non-element node type.`);\n }\n if ('html' === input.tagName.toLowerCase()) {\n return 'html';\n }\n const defaults = {\n root: document.body,\n idName: (name) => true,\n className: (name) => true,\n tagName: (name) => true,\n attr: (name, value) => false,\n seedMinLength: 1,\n optimizedMinLength: 2,\n threshold: 1000,\n maxNumberOfTries: 10000,\n timeoutMs: undefined,\n };\n config = { ...defaults, ...options };\n rootDocument = findRootDocument(config.root, defaults);\n let path = bottomUpSearch(input, 'all', () => bottomUpSearch(input, 'two', () => bottomUpSearch(input, 'one', () => bottomUpSearch(input, 'none'))));\n if (path) {\n const optimized = sort(optimize(path, input));\n if (optimized.length > 0) {\n path = optimized[0];\n }\n return selector(path);\n }\n else {\n throw new Error(`Selector was not found.`);\n }\n}\nfunction findRootDocument(rootNode, defaults) {\n if (rootNode.nodeType === Node.DOCUMENT_NODE) {\n return rootNode;\n }\n if (rootNode === defaults.root) {\n return rootNode.ownerDocument;\n }\n return rootNode;\n}\nfunction bottomUpSearch(input, limit, fallback) {\n let path = null;\n let stack = [];\n let current = input;\n let i = 0;\n while (current) {\n const elapsedTime = new Date().getTime() - start.getTime();\n if (config.timeoutMs !== undefined && elapsedTime > config.timeoutMs) {\n throw new Error(`Timeout: Can't find a unique selector after ${elapsedTime}ms`);\n }\n let level = maybe(id(current)) ||\n maybe(...attr(current)) ||\n maybe(...classNames(current)) ||\n maybe(tagName(current)) || [any()];\n const nth = index(current);\n if (limit == 'all') {\n if (nth) {\n level = level.concat(level.filter(dispensableNth).map((node) => nthChild(node, nth)));\n }\n }\n else if (limit == 'two') {\n level = level.slice(0, 1);\n if (nth) {\n level = level.concat(level.filter(dispensableNth).map((node) => nthChild(node, nth)));\n }\n }\n else if (limit == 'one') {\n const [node] = (level = level.slice(0, 1));\n if (nth && dispensableNth(node)) {\n level = [nthChild(node, nth)];\n }\n }\n else if (limit == 'none') {\n level = [any()];\n if (nth) {\n level = [nthChild(level[0], nth)];\n }\n }\n for (let node of level) {\n node.level = i;\n }\n stack.push(level);\n if (stack.length >= config.seedMinLength) {\n path = findUniquePath(stack, fallback);\n if (path) {\n break;\n }\n }\n current = current.parentElement;\n i++;\n }\n if (!path) {\n path = findUniquePath(stack, fallback);\n }\n if (!path && fallback) {\n return fallback();\n }\n return path;\n}\nfunction findUniquePath(stack, fallback) {\n const paths = sort(combinations(stack));\n if (paths.length > config.threshold) {\n return fallback ? fallback() : null;\n }\n for (let candidate of paths) {\n if (unique(candidate)) {\n return candidate;\n }\n }\n return null;\n}\nfunction selector(path) {\n let node = path[0];\n let query = node.name;\n for (let i = 1; i < path.length; i++) {\n const level = path[i].level || 0;\n if (node.level === level - 1) {\n query = `${path[i].name} > ${query}`;\n }\n else {\n query = `${path[i].name} ${query}`;\n }\n node = path[i];\n }\n return query;\n}\nfunction penalty(path) {\n return path.map((node) => node.penalty).reduce((acc, i) => acc + i, 0);\n}\nfunction unique(path) {\n const css = selector(path);\n switch (rootDocument.querySelectorAll(css).length) {\n case 0:\n throw new Error(`Can't select any node with this selector: ${css}`);\n case 1:\n return true;\n default:\n return false;\n }\n}\nfunction id(input) {\n const elementId = input.getAttribute('id');\n if (elementId && config.idName(elementId)) {\n return {\n name: '#' + CSS.escape(elementId),\n penalty: 0,\n };\n }\n return null;\n}\nfunction attr(input) {\n const attrs = Array.from(input.attributes).filter((attr) => config.attr(attr.name, attr.value));\n return attrs.map((attr) => ({\n name: `[${CSS.escape(attr.name)}=\"${CSS.escape(attr.value)}\"]`,\n penalty: 0.5,\n }));\n}\nfunction classNames(input) {\n const names = Array.from(input.classList).filter(config.className);\n return names.map((name) => ({\n name: '.' + CSS.escape(name),\n penalty: 1,\n }));\n}\nfunction tagName(input) {\n const name = input.tagName.toLowerCase();\n if (config.tagName(name)) {\n return {\n name,\n penalty: 2,\n };\n }\n return null;\n}\nfunction any() {\n return {\n name: '*',\n penalty: 3,\n };\n}\nfunction index(input) {\n const parent = input.parentNode;\n if (!parent) {\n return null;\n }\n let child = parent.firstChild;\n if (!child) {\n return null;\n }\n let i = 0;\n while (child) {\n if (child.nodeType === Node.ELEMENT_NODE) {\n i++;\n }\n if (child === input) {\n break;\n }\n child = child.nextSibling;\n }\n return i;\n}\nfunction nthChild(node, i) {\n return {\n name: node.name + `:nth-child(${i})`,\n penalty: node.penalty + 1,\n };\n}\nfunction dispensableNth(node) {\n return node.name !== 'html' && !node.name.startsWith('#');\n}\nfunction maybe(...level) {\n const list = level.filter(notEmpty);\n if (list.length > 0) {\n return list;\n }\n return null;\n}\nfunction notEmpty(value) {\n return value !== null && value !== undefined;\n}\nfunction* combinations(stack, path = []) {\n if (stack.length > 0) {\n for (let node of stack[0]) {\n yield* combinations(stack.slice(1, stack.length), path.concat(node));\n }\n }\n else {\n yield path;\n }\n}\nfunction sort(paths) {\n return [...paths].sort((a, b) => penalty(a) - penalty(b));\n}\nfunction* optimize(path, input, scope = {\n counter: 0,\n visited: new Map(),\n}) {\n if (path.length > 2 && path.length > config.optimizedMinLength) {\n for (let i = 1; i < path.length - 1; i++) {\n if (scope.counter > config.maxNumberOfTries) {\n return; // Okay At least I tried!\n }\n scope.counter += 1;\n const newPath = [...path];\n newPath.splice(i, 1);\n const newPathKey = selector(newPath);\n if (scope.visited.has(newPathKey)) {\n return;\n }\n if (unique(newPath) && same(newPath, input)) {\n yield newPath;\n scope.visited.set(newPathKey, true);\n yield* optimize(newPath, input, scope);\n }\n }\n }\n}\nfunction same(path, input) {\n return rootDocument.querySelector(selector(path)) === input;\n}\n","import $ from 'jquery';\nimport { __ } from '@popup-maker/i18n';\nimport { finder } from '@medv/finder';\nimport { AdminBarText } from './types';\n\ndeclare const popupMakerAdminBar:\n\t| {\n\t\t\ti18n: AdminBarText;\n\t }\n\t| undefined;\n\ninterface ModalOptions {\n\ttitle: string;\n\tcontent: string;\n\tcloseText?: string;\n\tactions?: {\n\t\tprimary?: {\n\t\t\ttext: string;\n\t\t\tonClick: () => void;\n\t\t};\n\t\tsecondary?: {\n\t\t\ttext: string;\n\t\t\tonClick: () => void;\n\t\t};\n\t};\n}\n\nfunction createModal( options: ModalOptions ): HTMLElement {\n\tconst container = document.createElement( 'div' );\n\tconst actionsHtml = options.actions\n\t\t? `\n\t\t<div class=\"pum-modal-actions\">\n\t\t\t${\n\t\t\t\toptions.actions.primary\n\t\t\t\t\t? `\n\t\t\t\t<button class=\"button button-primary pum-modal-proceed\">\n\t\t\t\t\t${ options.actions.primary.text }\n\t\t\t\t</button>\n\t\t\t`\n\t\t\t\t\t: ''\n\t\t\t}\n\t\t\t${\n\t\t\t\toptions.actions.secondary\n\t\t\t\t\t? `\n\t\t\t\t<button class=\"button button-secondary pum-modal-cancel\">\n\t\t\t\t\t${ options.actions.secondary.text }\n\t\t\t\t</button>\n\t\t\t`\n\t\t\t\t\t: ''\n\t\t\t}\n\t\t</div>\n\t`\n\t\t: '';\n\n\tcontainer.innerHTML = `<div class=\"pum-modal pum-modal-overlay\">\n\t\t<div class=\"pum-modal-content\">\n\t\t\t<div class=\"pum-modal-header\">\n\t\t\t\t<div class=\"pum-logo\"></div>\n\t\t\t\t<h4>${ options.title }</h4>\n\t\t\t\t<button class=\"pum-modal-close\">\n\t\t\t\t\t<span class=\"dashicons dashicons-no-alt\"></span>\n\t\t\t\t\t<span class=\"screen-reader-text\">${\n\t\t\t\t\t\toptions.closeText || __( 'Close', 'popup-maker' )\n\t\t\t\t\t}</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"pum-modal-body\">\n\t\t\t\t${ options.content }\n\t\t\t\t${ actionsHtml }\n\t\t\t</div>\n\t\t</div>\n\t</div>`;\n\n\tdocument.body.appendChild( container );\n\n\t// Setup close handlers\n\tconst close = () => {\n\t\t// Remove all event listeners\n\t\t$( document ).off( 'keydown', handleEscKey );\n\t\t$( document ).off( 'mousedown', handleClickOutside );\n\t\t$( '.pum-modal-close, .pum-modal-cancel', container ).off(\n\t\t\t'click',\n\t\t\tclose\n\t\t);\n\t\t$( '.pum-modal-proceed', container ).off(\n\t\t\t'click',\n\t\t\thandlePrimaryAction\n\t\t);\n\t\t$( '.pum-modal-cancel', container ).off(\n\t\t\t'click',\n\t\t\thandleSecondaryAction\n\t\t);\n\n\t\t// Fade out and remove\n\t\t$( container ).fadeOut( 200, () => {\n\t\t\tcontainer.remove();\n\t\t} );\n\t};\n\n\t// Handle ESC key\n\tconst handleEscKey = ( event: JQuery.KeyDownEvent ) => {\n\t\tif ( event.key === 'Escape' ) {\n\t\t\tclose();\n\t\t}\n\t};\n\n\t// Handle click outside\n\tconst handleClickOutside = ( event: JQuery.MouseDownEvent ) => {\n\t\tconst $target = $( event.target );\n\t\tif ( $target.hasClass( 'pum-modal-overlay' ) ) {\n\t\t\tclose();\n\t\t}\n\t};\n\n\t// Handle primary action\n\tconst handlePrimaryAction = () => {\n\t\tif ( options.actions?.primary?.onClick ) {\n\t\t\toptions.actions.primary.onClick();\n\t\t}\n\t\tclose();\n\t};\n\n\t// Handle secondary action\n\tconst handleSecondaryAction = () => {\n\t\tif ( options.actions?.secondary?.onClick ) {\n\t\t\toptions.actions.secondary.onClick();\n\t\t}\n\t\tclose();\n\t};\n\n\t// Bind all event handlers\n\t$( document ).on( 'keydown', handleEscKey );\n\t$( document ).on( 'mousedown', handleClickOutside );\n\t$( '.pum-modal-close, .pum-modal-cancel', container ).on( 'click', close );\n\n\tif ( options.actions?.primary ) {\n\t\t$( '.pum-modal-proceed', container ).on( 'click', handlePrimaryAction );\n\t}\n\n\tif ( options.actions?.secondary ) {\n\t\t$( '.pum-modal-cancel', container ).on(\n\t\t\t'click',\n\t\t\thandleSecondaryAction\n\t\t);\n\t}\n\n\treturn container;\n}\n\nexport class AdminBar {\n\tprivate readonly text: AdminBarText;\n\tprivate readonly defaultText: AdminBarText = {\n\t\tinstructions: __(\n\t\t\t'After clicking ok, click the element you want a selector for.',\n\t\t\t'popup-maker'\n\t\t),\n\t\tresults: __( 'Selector', 'popup-maker' ),\n\t\tcopy: __( 'Copy', 'popup-maker' ),\n\t\tclose: __( 'Close', 'popup-maker' ),\n\t\tcopied: __( 'Copied to clipboard', 'popup-maker' ),\n\t};\n\n\tconstructor() {\n\t\tthis.text = popupMakerAdminBar?.i18n || this.defaultText;\n\t\tthis.initialize();\n\t}\n\n\tprivate async copyToClipboard( text: string ): Promise< boolean > {\n\t\ttry {\n\t\t\tif ( navigator.clipboard && window.isSecureContext ) {\n\t\t\t\tawait navigator.clipboard.writeText( text );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn this.fallbackCopyToClipboard( text );\n\t\t} catch ( error ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error( 'Failed to copy text:', error );\n\t\t\treturn this.fallbackCopyToClipboard( text );\n\t\t}\n\t}\n\n\tprivate fallbackCopyToClipboard( text: string ): boolean {\n\t\tconst textarea = document.createElement( 'textarea' );\n\t\ttry {\n\t\t\ttextarea.value = text;\n\t\t\ttextarea.style.position = 'fixed';\n\t\t\ttextarea.style.opacity = '0';\n\t\t\tdocument.body.appendChild( textarea );\n\t\t\ttextarea.select();\n\t\t\tconst success = document.execCommand( 'copy' );\n\t\t\treturn success;\n\t\t} catch ( error ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error( 'Fallback copy failed:', error );\n\t\t\treturn false;\n\t\t} finally {\n\t\t\tdocument.body.removeChild( textarea );\n\t\t}\n\t}\n\n\tprivate showCopiedNotice( modalBody: JQuery ): void {\n\t\tconst notice = document.createElement( 'div' );\n\t\tnotice.classList.add( 'notice', 'notice-success' );\n\t\tnotice.innerHTML = `<p>${ this.text.copied }</p>`;\n\t\tmodalBody.append( notice );\n\n\t\tsetTimeout( () => {\n\t\t\t$( notice ).fadeOut( 200, () => {\n\t\t\t\t$( notice ).remove();\n\t\t\t} );\n\t\t}, 3000 );\n\t}\n\n\tprivate handleSelectorClick = async (\n\t\tevent: JQuery.ClickEvent\n\t): Promise< void > => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst selector = finder( event.target, {\n\t\t\tseedMinLength: 3,\n\t\t\t// optimizedMinLength: 2,\n\t\t} );\n\t\tconst container = createModal( {\n\t\t\ttitle: this.text.results,\n\t\t\tcontent: `\n\t\t\t\t<div class=\"pum-modal-copy\">\n\t\t\t\t\t<p>${ selector }</p>\n\t\t\t\t\t<button class=\"copy-clipboard button button-secondary\">\n\t\t\t\t\t\t<span class=\"dashicons dashicons-clipboard\"></span>\n\t\t\t\t\t\t<span class=\"screen-reader-text\">${ this.text.copy }</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t`,\n\t\t\tcloseText: this.text.close,\n\t\t} );\n\n\t\t// Setup copy handler\n\t\t$( '.copy-clipboard', container ).on( 'click', async () => {\n\t\t\tconst success = await this.copyToClipboard( selector );\n\t\t\tif ( success ) {\n\t\t\t\tthis.showCopiedNotice( $( '.pum-modal-body', container ) );\n\t\t\t}\n\t\t} );\n\t};\n\n\tprivate initialize(): void {\n\t\tconst { PUM } = window;\n\n\t\t$( document ).on(\n\t\t\t'click',\n\t\t\t'#wp-admin-bar-pum-get-selector',\n\t\t\t( event: JQuery.ClickEvent ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\n\t\t\t\tcreateModal( {\n\t\t\t\t\ttitle: __( 'Get Element Selector', 'popup-maker' ),\n\t\t\t\t\tcontent: this.text.instructions,\n\t\t\t\t\tcloseText: this.text.close,\n\t\t\t\t\tactions: {\n\t\t\t\t\t\tprimary: {\n\t\t\t\t\t\t\ttext: __( 'Start Selection', 'popup-maker' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t// Add small delay to prevent immediate trigger\n\t\t\t\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\t\t\t\t$( document ).one(\n\t\t\t\t\t\t\t\t\t\t'click',\n\t\t\t\t\t\t\t\t\t\tthis.handleSelectorClick\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}, 250 );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsecondary: {\n\t\t\t\t\t\t\ttext: __( 'Cancel', 'popup-maker' ),\n\t\t\t\t\t\t\tonClick: () => {}, // No-op since close is handled automatically\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\t\t);\n\n\t\t$( document ).on(\n\t\t\t'click',\n\t\t\t'.pum-toolbar-action',\n\t\t\t( event: JQuery.ClickEvent ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\n\t\t\t\tconst href = $( event.target ).attr( 'href' );\n\n\t\t\t\tif ( ! href ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst [ action, popupId ] = href\n\t\t\t\t\t.split( '__' )[ 1 ]\n\t\t\t\t\t.split( '--' );\n\n\t\t\t\tswitch ( action ) {\n\t\t\t\t\tcase 'open':\n\t\t\t\t\t\tPUM.open( popupId );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'close':\n\t\t\t\t\t\tPUM.close( popupId );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'check-conditions':\n\t\t\t\t\t\tcreateModal( {\n\t\t\t\t\t\t\ttitle: __( 'Conditions Check', 'popup-maker' ),\n\t\t\t\t\t\t\tcontent: PUM.checkConditions( popupId )\n\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t'The conditions were met.',\n\t\t\t\t\t\t\t\t\t\t'popup-maker'\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t'The conditions were not met.',\n\t\t\t\t\t\t\t\t\t\t'popup-maker'\n\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'reset-cookies':\n\t\t\t\t\t\tPUM.clearCookies( popupId );\n\t\t\t\t\t\tcreateModal( {\n\t\t\t\t\t\t\ttitle: __( 'Cookies Reset', 'popup-maker' ),\n\t\t\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t\t\t'The cookies were reset successfully.',\n\t\t\t\t\t\t\t\t'popup-maker'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n}\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"popupMaker\"][\"i18n\"];","module.exports = window[\"jQuery\"];","// 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 = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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};","import './styles.scss';\n\nimport $ from 'jquery';\nimport { AdminBar } from './AdminBar';\n\n// Initialize the admin bar when the document is ready\n$( () => {\n\tnew AdminBar();\n} );\n"],"names":["$","__","finder","createModal","options","container","document","createElement","actionsHtml","actions","primary","text","secondary","innerHTML","title","closeText","content","body","appendChild","close","off","handleEscKey","handleClickOutside","handlePrimaryAction","handleSecondaryAction","fadeOut","remove","event","key","$target","target","hasClass","onClick","on","AdminBar","defaultText","instructions","results","copy","copied","constructor","popupMakerAdminBar","i18n","initialize","copyToClipboard","navigator","clipboard","window","isSecureContext","writeText","fallbackCopyToClipboard","error","console","textarea","value","style","position","opacity","select","success","execCommand","removeChild","showCopiedNotice","modalBody","notice","classList","add","append","setTimeout","handleSelectorClick","preventDefault","stopPropagation","selector","seedMinLength","PUM","one","href","attr","action","popupId","split","open","checkConditions","clearCookies"],"sourceRoot":""}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists