frame_event_publisher.js000064400000016611150213606400011454 0ustar00(function(g,f){'use strict';var h=function(e){if("object"!==typeof e.document)throw Error("Cookies.js requires a `window` with a `document` object");var b=function(a,d,c){return 1===arguments.length?b.get(a):b.set(a,d,c)};b._document=e.document;b._cacheKeyPrefix="cookey.";b._maxExpireDate=new Date("Fri, 31 Dec 9999 23:59:59 UTC");b.defaults={path:"/",secure:!1};b.get=function(a){b._cachedDocumentCookie!==b._document.cookie&&b._renewCache();a=b._cache[b._cacheKeyPrefix+a];return a===f?f:decodeURIComponent(a)}; b.set=function(a,d,c){c=b._getExtendedOptions(c);c.expires=b._getExpiresDate(d===f?-1:c.expires);b._document.cookie=b._generateCookieString(a,d,c);return b};b.expire=function(a,d){return b.set(a,f,d)};b._getExtendedOptions=function(a){return{path:a&&a.path||b.defaults.path,domain:a&&a.domain||b.defaults.domain,expires:a&&a.expires||b.defaults.expires,secure:a&&a.secure!==f?a.secure:b.defaults.secure}};b._isValidDate=function(a){return"[object Date]"===Object.prototype.toString.call(a)&&!isNaN(a.getTime())}; b._getExpiresDate=function(a,d){d=d||new Date;"number"===typeof a?a=Infinity===a?b._maxExpireDate:new Date(d.getTime()+1E3*a):"string"===typeof a&&(a=new Date(a));if(a&&!b._isValidDate(a))throw Error("`expires` parameter cannot be converted to a valid Date instance");return a};b._generateCookieString=function(a,b,c){a=a.replace(/[^#$&+\^`|]/g,encodeURIComponent);a=a.replace(/\(/g,"%28").replace(/\)/g,"%29");b=(b+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent);c=c||{};a=a+"="+b+(c.path?";path="+ c.path:"");a+=c.domain?";domain="+c.domain:"";a+=c.expires?";expires="+c.expires.toUTCString():"";return a+=c.secure?";secure":""};b._getCacheFromString=function(a){var d={};a=a?a.split("; "):[];for(var c=0;cb?a.length:b,c=a.substr(0,b),e;try{e=decodeURIComponent(c)}catch(f){console&&"function"=== typeof console.error&&console.error('Could not decode cookie with key "'+c+'"',f)}return{key:e,value:a.substr(b+1)}};b._renewCache=function(){b._cache=b._getCacheFromString(b._document.cookie);b._cachedDocumentCookie=b._document.cookie};b._areEnabled=function(){var a="1"===b.set("cookies.js",1).get("cookies.js");b.expire("cookies.js");return a};b.enabled=b._areEnabled();return b},e="object"===typeof g.document?h(g):h;"function"===typeof define&&define.amd?define(function(){return e}):"object"===typeof exports? ("object"===typeof module&&"object"===typeof module.exports&&(exports=module.exports=e),exports.Cookies=e):g.Cookies=e})("undefined"===typeof window?this:window); window.Frame_Event_Publisher = { id: window.name, cookie_name: 'X-Frame-Events', received: [], initialized: false, children: {}, window: false, ajax_handlers_setup: false, is_parent: function() { return window.parent.document === window.document; }, is_child: function(){ return !this.is_parent(); }, setup_ajax_handlers: function() { if (!this.ajax_handlers_setup) { var publisher = this; jQuery(document).ajaxComplete(function(e, xhr, settings) { setTimeout(function() { publisher.ajax_handler(); }, 0); }); } }, ajax_handler: function() { this.broadcast(this.get_events(document.cookie)); }, initialize: function(){ this.setup_ajax_handlers(); // Provided by wp_localize_script() this lets us delete cookies set by the server if (typeof window.frame_event_publisher_domain !== 'undefined') { Cookies.defaults.domain = window.frame_event_publisher_domain; } this.window = window; if (typeof(this.window.id) != 'undefined' && this.window.id.length != null && this.window.id.length > 0) this.id = this.window.id; else this.id == 'Unknown'; this.received = this.get_events(document.cookie); this.initialized = true; if (this.is_parent()) this.emit(this.received, true); return this.received; }, register_child: function(child) { this.children[child.id] = child; }, broadcast: function(events, child){ if (!this.initialized) events = this.initialize(); if (this.id == "Unknown") { this.initialized = false; setTimeout(function(){ this.broadcast(events, child); }, 100); } // Broad cast events else { if (this.is_child()) { if (arguments.length <= 1) child = window; this.find_parent(child).register_child(child.Frame_Event_Publisher); this.notify_parent(events, child); } else { if (arguments.length == 0) events = this.received; this.notify_children(events); } } }, /** * Notifies the parent with a list of events to broadcast */ notify_parent: function(events, child){ this.find_parent(child).broadcast(events, child); }, /** * Notifies (broadcasts) to children the list of available events */ notify_children: function(events){ this.emit(events); for (var index in this.children) { var child = this.children[index]; try { child.emit(events); } catch (ex) { if (typeof(console) != "undefined") console.log(ex); delete this.children.index; } } }, /** * Finds the parent window for the current child window */ find_parent: function(child){ var retval = child; try { while (retval.document !== retval.parent.document) retval = retval.parent; } catch (ex){ if (typeof(console) != "undefined") console.log(ex); } return retval.Frame_Event_Publisher; }, /** * Emits all known events to all children */ emit: function(events, forced){ if (typeof(forced) == "undefined") forced = false; for (var event_id in events) { var event = events[event_id]; if (!forced && !this.has_received_event(event_id)) { if (typeof(console) != "undefined") console.log("Emitting "+event_id+":"+event.event+" to "+this.id); this.trigger_event(event_id, events[event_id]); } } }, has_received_event: function(id){ return this.received[id] != undefined; }, trigger_event: function(id, event){ var signal = event.context+':'+event.event; event.id = id; if (typeof(window) != "undefined") jQuery(window).trigger(signal, event); this.received[id] = event; }, /** * Parses the events found in the cookie */ get_events: function(cookie){ var frame_events = {}; var cookies = unescape(cookie).split(' '); for (var i=0; i.editor-block-list__block-edit:before, div[data-type="imagely/nextgen-gallery"].is-hovered>.editor-block-list__block-edit:before { outline: none !important; } div[data-type="imagely/nextgen-gallery"] .editor-block-list__breadcrumb { display: none !important; } div[data-type="imagely/nextgen-gallery"]:focus::after { box-shadow: none !important; } /* Popup modal when IGW is open */ #add-ngg-gallery-modal { background: white; position: fixed; top: 50px; bottom: 50px; right: 35px; left: 35px; z-index: 99999; } #add-ngg-gallery-modal-background { background: black; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 99988; opacity: 70%; } #add-ngg-gallery-modal p { color: white; } #add-ngg-gallery-modal iframe { height: 100%; width: 100%; } #add-ngg-gallery-modal-close { position: absolute; top: 10px; right: 25px; background-color: #9fbb1a; border-radius: 50%; color: white; padding: 1px; } #add-ngg-gallery-modal-spinner { position: absolute; top: 0; left: 0; bottom: 0; right: 0; display: flex; justify-content: center; align-items: center; z-index: 2; background: white; opacity: 1; transition: visibility 0.5s linear 0.6s, opacity 0.4s linear, font-size 0.3s linear; visibility: visible; font-size: 15vh; } #add-ngg-gallery-modal-spinner.add-ngg-gallery-modal-spinner-hidden { opacity: 0; visibility: hidden; transition-delay: 0s; font-size: .5vh; } #add-ngg-gallery-modal-spinner i.fa.fa-spin { } /* Customize the NextGEN Gallery placeholder */ div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-parent { outline: none !important; } div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-block { background-color: #ffffff; border-radius: 2px; box-shadow: 0 0 4px 2px rgba(0,0,0,.05); box-sizing: border-box; border-top: 5px solid #b8d330; color: #fff; font-family: sans-serif; font-size: 20px; outline: none !important; min-height: 210px; padding: 60px 60px 70px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; } div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-block h3 { color: black !important; font-family: "Lato", sans-serif !important; font-size: 21px; font-weight: 700 !important; letter-spacing: 3px !important; margin-bottom: 15px; margin-top: 0; text-align: center; text-transform: uppercase; width: 100%; } /* Styling for Add NextGEN Gallery buttons */ div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-button { font-size: 14px; letter-spacing: 1.2px; line-height: 20px; font-family: "Lato", sans-serif; font-weight: 900; color: #fff; background-color: black; border: none; box-shadow: none; padding: 12px 24px; text-transform: uppercase; text-align: center; cursor: pointer; flex: 1; flex-grow: 0; margin: 0 0 0 15px; } div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-button:only-of-type { flex-grow: 1; width: 300px; max-width: 300px; } div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-button:first-of-type { margin-left: 0; } div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-button:hover { background: #383838; }Block/editor.min.css000064400000005322150213606400010357 0ustar00@font-face{font-family:Lato;src:url(../../nextgen_admin/static/Lato-Regular.ttf) format('truetype')}div[data-type="imagely/nextgen-gallery"]{z-index:30}div[data-type="imagely/nextgen-gallery"].is-hovered>.editor-block-list__block-edit:before,div[data-type="imagely/nextgen-gallery"].is-selected>.editor-block-list__block-edit:before{outline:0!important}div[data-type="imagely/nextgen-gallery"] .editor-block-list__breadcrumb{display:none!important}div[data-type="imagely/nextgen-gallery"]:focus::after{box-shadow:none!important}#add-ngg-gallery-modal{background:#fff;position:fixed;top:50px;bottom:50px;right:35px;left:35px;z-index:99999}#add-ngg-gallery-modal-background{background:#000;position:fixed;top:0;left:0;right:0;bottom:0;z-index:99988;opacity:70%}#add-ngg-gallery-modal p{color:#fff}#add-ngg-gallery-modal iframe{height:100%;width:100%}#add-ngg-gallery-modal-close{position:absolute;top:10px;right:25px;background-color:#9fbb1a;border-radius:50%;color:#fff;padding:1px}#add-ngg-gallery-modal-spinner{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:center;align-items:center;z-index:2;background:#fff;opacity:1;transition:visibility .5s linear .6s,opacity .4s linear,font-size .3s linear;visibility:visible;font-size:15vh}#add-ngg-gallery-modal-spinner.add-ngg-gallery-modal-spinner-hidden{opacity:0;visibility:hidden;transition-delay:0s;font-size:.5vh}div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-parent{outline:0!important}div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-block{background-color:#fff;border-radius:2px;box-shadow:0 0 4px 2px rgba(0,0,0,.05);box-sizing:border-box;border-top:5px solid #b8d330;color:#fff;font-family:sans-serif;font-size:20px;outline:0!important;min-height:210px;padding:60px 60px 70px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap}div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-block h3{color:#000!important;font-family:Lato,sans-serif!important;font-size:21px;font-weight:700!important;letter-spacing:3px!important;margin-bottom:15px;margin-top:0;text-align:center;text-transform:uppercase;width:100%}div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-button{font-size:14px;letter-spacing:1.2px;line-height:20px;font-family:Lato,sans-serif;font-weight:900;color:#fff;background-color:#000;border:none;box-shadow:none;padding:12px 24px;text-transform:uppercase;text-align:center;cursor:pointer;flex:1;flex-grow:0;margin:0 0 0 15px}div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-button:only-of-type{flex-grow:1;width:300px;max-width:300px}div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-button:first-of-type{margin-left:0}div[data-type="imagely/nextgen-gallery"] .add-ngg-gallery-button:hover{background:#383838}Block/build/block.min.js000064400000022073150213606400011110 0ustar00(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n