function ftg_getURLParameter(name){return decodeURIComponent((new RegExp('[?|&]'+name+'='+'([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g,'%20'))||null} var qualifyURL=function(url){var img=document.createElement('img');img.src=url;url=img.src;img.src=null;return url;};(function($,window,document,undefined){$.fn.visible=function(partial){if(!$(this).offset()) return true;var $t=$(this),$w=$(window),viewTop=$w.scrollTop(),viewBottom=viewTop+$w.height(),_top=$t.offset().top,_bottom=_top+$t.height(),compareTop=partial===true?_bottom:_top,compareBottom=partial===true?_top:_bottom;return((compareBottom<=viewBottom)&&(compareTop>=viewTop));};var pluginName="finalTilesGallery",defaults={layout:'final',columns:[[4000,5],[1024,4],[800,3],[480,2],[320,1]],rowHeight:200,margin:10,minTileWidth:200,ignoreImageAttributes:true,imageSizeFactor:[[4000,.9],[1024,.8],[800,.7],[600,.6],[480,.5],[320,.3]],gridSize:10,disableGridSizeBelow:800,allowEnlargement:true,autoLoadURL:null,selectedFilter:'',loadMethod:'sequential',onComplete:function(){},onUpdate:function(){},onLoading:function(){},debug:false};function Plugin(element,options){ /*! properties */ this.element=element;this.$element=$(element);this.settings=$.extend({},defaults,options);this._columnSize=0;this.columns;this._defaults=defaults;this._name=pluginName;this.tiles=[];this._loadedImages=0;this._rows=[[]];this._currentRow=0;this._currentRowTile=0;this.edges=[];this.imagesData={};this.currentWidth=0;this.currentImageSizeFactor=1;this.currentColumnsCount=0;this.currentGridSize=0;this.ajaxComplete=false;this.isLoading=false;this.currentPage=1;this.init();} $.extend(Plugin.prototype,{print:function(text){if(this.settings.debug) console.log(text);},setCurrentImageSizeFactor:function(){this.currentImageSizeFactor=1;var ww=$(window).width();for(var i=0;i=ww) this.currentImageSizeFactor=this.settings.imageSizeFactor[i][1];} if(!this.currentImageSizeFactor) this.currentImageSizeFactor=1;this.print("current image size factor: "+this.currentImageSizeFactor+" ("+ww+")");},setCurrentColumnSize:function(){var ww=$(window).width();for(var i=0;i=ww){this.currentColumnsCount=this.settings.columns[i][1];this.print("columns count: "+this.currentColumnsCount);this.columns=[];for(var j=0;j=0) {hash_class=hash_class.substring(1);instance.$element.find(".ftg-filters a").each(function(){if($(this).attr('href')!=ft){instance.$element.find('.item').each(function(){var img=$(this).parent().parent();if(img.hasClass(hash_class)==false) {img.addClass('ftg-filter-hidden-tile');}}) $(this).removeClass('selected');};});$('a[href="'+ft+'"]').addClass('selected');}} this.tiles=this.$element.find('.tile').not('.ftg-hidden-tile').not('.ftg-filter-hidden-tile');this.currentWidth=this.$element.width();this.print("this.currentWidth: "+this.currentWidth);if(this.settings.layout!='columns'&&this.settings.layout!='rows'&&this.settings.layout!='final'){console.log("WARNING: unknown layout, falling back to 'final'.")} if(this.settings.layout=='columns'){this.setCurrentColumnSize();} var _resizeTo=0;this.setCurrentImageSizeFactor();this.setCurrentGridSize();$(window).resize(function(){_resizeTo=setTimeout(function(){if(instance.currentWidth!=instance.$element.width()){clearTimeout(_resizeTo);instance.print("this.currentWidth",this.currentWidth);instance.currentWidth=instance.$element.width();instance.setCurrentColumnSize();instance.setCurrentImageSizeFactor();instance.setCurrentGridSize();instance.refresh();}},500);});instance.isLoading=true;if(instance.settings.autoLoadURL){$(window).scroll(function(){if(!instance.ajaxComplete&&!instance.isLoading){if(instance.tiles.last().visible()){instance.isLoading=true;if(instance.settings.onLoading) instance.settings.onLoading();$.post(instance.settings.autoLoadURL,{page:++instance.currentPage,action:'load_chunk',pageSize:instance.settings.pageSize,finaltilesgallery:instance.settings.nonce,gallery:instance.settings.galleryId},function(html){if($.trim(html).length==0){instance.ajaxComplete=true;}else{instance.$element.find(".ftg-items").append(html);instance.tiles=instance.$element.find('.tile') instance.loadImage();}});}}});} this.edges.push({left:0,top:0,width:this.currentWidth,index:0});this.isImageLoading=false;if(this.settings.loadMethod=='lazy'){$(window).scroll(function(event){instance.loadImage();});} this.loadImage();},addElements:function(html){this.$element.find(".ftg-items").append(html);this.tiles=this.$element.find('.tile') this.loadImage();},removeAt:function(index){this.tiles[index].remove();this.refresh();},clear:function(){this.$element.find(".ftg-items").height(0).empty();this.refresh();},printEdges:function(){this.$element.find(".edge").remove();for(i=0;i");$e.append("top: "+this.edges[i].top+"
");$e.append("left: "+this.edges[i].left+"
");$e.append("width: "+this.edges[i].width+"
");$e.css({left:this.edges[i].left,top:this.edges[i].top,marginTop:-25,marginLeft:20});this.$element.append($e);}},printEdge:function(edge){var $e=$("
");$e.append(""+edge.index+" "+edge.case+"
");$e.append("t: "+Math.round(edge.top)+" l: "+edge.left+"
");$e.append("width: "+edge.width+"
");$e.append("idx: "+edge.tileIndex+"
");$e.css({left:edge.left,top:edge.top,marginTop:-25,marginLeft:20});this.$element.append($e);},refresh:function(){this.setCurrentColumnSize();this.$element.find(".edge").remove();this.edges=[{left:0,top:0,width:this.currentWidth}];this.tiles.removeClass("ftg-loaded ftg-enlarged");this.tiles=this.$element.find('.tile').not('.ftg-hidden-tile').not('.ftg-filter-hidden-tile');this._loadedImages=0;this.loadImage();},getAvailableRowSpace:function(){return this.currentWidth-this.getBusyRowSpace();},getBusyRowSpace:function(){var space=0;for(var i=0;i0){var $last=instance.tiles.filter(".ftg-loaded").last();if(instance.settings.loadMethod=='lazy'&&!$last.visible(true)){instance.isImageLoading=false;return;}} if($tile.find("iframe").length) $tile.find("iframe").addClass("item");var $item=$tile.find('.item');switch($item.get(0).tagName.toLowerCase()){case"img":var img=new Image();img.onload=function(){var iFactor=instance.currentImageSizeFactor;if($tile.data("ftg-ignore-size-factor")) iFactor=1;var size={};var addImage=true;if(instance.settings.layout=="final"){var w=$item.attr("width")?parseInt($item.attr("width")):img.width;var h=$item.attr("height")?parseInt($item.attr("height")):img.height;size.width=w*iFactor;size.height=h*iFactor;} if(instance.settings.layout=="columns"){size.width=instance._columnSize;size.height=(size.width*img.height)/img.width;} if(instance.settings.layout=="rows"){size.width=(instance.settings.rowHeight*img.width)/img.height;size.height=instance.settings.rowHeight;addImage=false;if(instance.getAvailableRowSpace()>size.width){instance.addImageToRow($item);}else{instance.fitImagesInRow();instance._currentRow++;instance._rows.push([]);instance.addImageToRow($item);}} $item.attr("src",this.src);instance.imagesData["tile"+instance._loadedImages]={width:size.width,height:size.height,owidth:img.width,oheight:img.height,src:img.src};instance.nextTile(addImage);} img.onerror=function(){console.error("Final Tiles Gallery: Error loading image: "+img.src);instance.nextTile(false);} img.src=$item.data("ftg-source");$tile.data("ftg-type","image");break;case"iframe":var w=$item.attr("width")?parseInt($item.attr("width")):$item.data("width");var h=$item.attr("height")?parseInt($item.attr("height")):$item.data("height");var size={width:w,height:h,owidth:w,oheight:h};if(instance.settings.layout=="columns"){size.width=instance._columnSize;size.height=(size.width*size.oheight)/size.owidth;} instance.imagesData["tile"+instance._loadedImages]=size;$tile.data("ftg-type","iframe");instance.nextTile(true);break;default:instance.imagesData["tile"+instance._loadedImages]={width:parseInt($item.data("width")),height:parseInt($item.data("height")),owidth:parseInt($item.data("width")),oheight:parseInt($item.data("height"))};instance.nextTile(true);break;}},higherEdge:function(){var left=0;var _top=100000;var _left=0;var found=0;for(var i=0;imin){min=this.edges[i].top;}} return min;},alignEdge:function(edge,index){for(var i=0;ih) h=this.columns[i][j];}} return h;},get_shortest_col:function(){for(var i=0;i=0;i--){var col=this.columns[i];var last=col[col.length-1];if(last<=ret.top){ret.top=last;ret.col=i;}} if(ret.top==0) console.warn("col ret 0");return ret;},add:function(tileIndex){if(this.settings.layout=="columns"){this.add_to_column(tileIndex);}else{this.add_to_final(tileIndex);}},add_to_column:function(tileIndex){var $t=this.tiles.eq(tileIndex);var $item=$t.find('.item');var key="tile"+tileIndex;var w=this.imagesData[key].width;var h=this.imagesData[key].height;var slot=this.get_shortest_col();var ratio=h/w;var t_w=this._columnSize;var t_h=t_w*ratio;var t_h_b=t_w*ratio;if(this.currentGridSize){var n=Math.floor(t_h/this.currentGridSize);if(n>0){t_h=this.currentGridSize*n;}} $t.css({position:'absolute',width:t_w,height:t_h,top:slot.top+this.settings.margin,left:(slot.col*this._columnSize)+(this.settings.margin*slot.col)});var hdiff=t_h_b-t_h;if($t.data("ftg-type")!="iframe") $item.css({height:"auto"});if(hdiff>0){$item.css({top:0-(hdiff/2)});} var transition=$t.css('transition');setTimeout(function(){$t.css({display:'block',transform:'scale(1)'});},1);$t.addClass("ftg-loaded");this.columns[slot.col].push(slot.top+t_h+this.settings.margin);this.$element.find(".ftg-items").css({height:this.get_highest_col()+"px"});},add_to_final:function(tileIndex){var outside=false;if($('.final-tiles-gallery').hasClass('caption-outside')){outside=true;} var $t=this.tiles.eq(tileIndex);var $item=$t.find('.item');var key="tile"+tileIndex;var w=this.imagesData[key].width;var h=this.imagesData[key].height;var hEdge=this.higherEdge();this.print(hEdge);hEdge.tileIndex=tileIndex;this.print(tileIndex+" ["+$t.data("ftg-type")+"] ("+w+"x"+h+")");this.print("hEdge.width: "+hEdge.width);if(hEdge.top>0){hEdge.top+=this.settings.margin;} if(outside===true){h+=30;} $t.css({left:hEdge.left,top:hEdge.top,position:'absolute'});hEdge.enlarged=false;if(hEdge.width-w=w){this.print('tE');if(this.settings.layout=='columns'||hEdge.width-w>=this.settings.minTileWidth){hEdge.case='tE';this.print('tE1',hEdge.width,hEdge.left,this.currentWidth);var newEdge={left:hEdge.left+w+this.settings.margin,top:hEdge.top-(hEdge.top>0?this.settings.margin:0),width:hEdge.width-w-this.settings.margin,marginLeft:true,case:'NEW',index:hEdge.index+1} this.edges.push(newEdge);}else{hEdge.case='tE2';this.print('tE2');this.print("enlargement",hEdge.width,hEdge.left,this.currentWidth);var m=hEdge.left+hEdge.width==this.currentWidth?0:this.settings.margin;var w2=hEdge.width;var h2=this.settings.allowEnlargement&&this.settings.layout!='rows'?(h/w)*w2:h;if(this.settings.allowEnlargement){$t.addClass("ftg-enlarged");hEdge.enlarged=true;}else{if(this.settings.layout!='rows') $t.find(".item").css({width:w,height:h});} w=w2;h=h2;}} hEdge.top+=h;if(this.currentGridSize){var diff=hEdge.top%this.currentGridSize;hEdge.top-=diff;h-=diff;} hEdge.left=hEdge.left;hEdge.width=w;var printEdge=true;var aligned=this.alignEdge(hEdge,tileIndex);if(aligned){if(aligned.side=='left'){this.removeEdge(hEdge);aligned.edge.width+=w+this.settings.margin;h=h-(hEdge.top-aligned.edge.top);hEdge.top-=h;printEdge=false;}else{this.removeEdge(aligned.edge);hEdge.width+=this.settings.margin+aligned.edge.width;printEdge=false;} $t.height(h);} if(this.$element.find(".ftg-items").height()0){$item.css({top:0-(hdiff/2)});} setTimeout(function(){$t.css({display:'block',transform:'scale(1)'});},1);$t.addClass("ftg-loaded");}});$.fn[pluginName]=function(options){this.each(function(){if(!$.data(this,pluginName)){$.data(this,pluginName,new Plugin(this,options));}});return this;};$(window).on('load',function(){$('.loading-bar i').css({width:'100%'});});$(function(){$(".ftg-social a").on('click',function(e){e.preventDefault();var social=$(this).data("social");var $tile=$(this).parents(".tile").first();var image=$tile.data("big");if(!image) image=$tile.find(".item").attr("src");var text=$.trim($tile.find(".subtitle").text());if(!text.length) text=document.title;var desc=$.trim($tile.find(".title").text());if(!desc.length) desc=document.title;if(social=="facebook"){var url="https://www.facebook.com/dialog/feed?app_id=1447224948871585&"+"link="+encodeURIComponent(location.href)+"&"+"display=popup&"+"name="+encodeURIComponent(desc)+"&"+"caption=&"+"description="+encodeURIComponent(text)+"&"+"picture="+encodeURIComponent(qualifyURL(image))+"&"+"ref=share&"+"actions={%22name%22:%22View%20the%20gallery%22,%20%22link%22:%22"+encodeURIComponent(location.href)+"%22}&"+"redirect_uri=http://www.final-tiles-gallery.com/facebook_redirect.html";var w=window.open(url,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400");w.moveTo((screen.width/2)-(300),(screen.height/2)-(200));} if(social=="twitter"){var w=window.open("https://twitter.com/intent/tweet?url="+encodeURI(location.href.split('#')[0])+"&text="+encodeURI(desc+" "+text),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400");w.moveTo((screen.width/2)-(300),(screen.height/2)-(200));} if(social=="pinterest"){var url="http://pinterest.com/pin/create/button/?url="+encodeURIComponent(location.href)+"&description="+encodeURI(desc+" "+text);url+=("&media="+encodeURIComponent(qualifyURL(image)));var w=window.open(url,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400");w.moveTo((screen.width/2)-(300),(screen.height/2)-(200));}});});})(jQuery,window,document); ;var runtime=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o=(m="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",i=m.asyncIterator||"@@asyncIterator",a=m.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(e){c=function(t,r,e){return t[r]=e}}function u(t,e,n,o){var i,a,c,u;e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),o=new j(o||[]);return e._invoke=(i=t,a=n,c=o,u=l,function(t,e){if(u===s)throw new Error("Generator is already running");if(u===p){if("throw"===t)throw e;return k()}for(c.method=t,c.arg=e;;){var n=c.delegate;if(n&&(n=function t(e,n){var o=e.iterator[n.method];if(o===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=r,t(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}return"throw"===(o=h(o,e.iterator,n.arg)).type?(n.method="throw",n.arg=o.arg,n.delegate=null,y):(o=o.arg)?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=r),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}(n,c),n)){if(n===y)continue;return n}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===l)throw u=p,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(u=s,"normal"===(n=h(i,a,c)).type){if(u=c.done?p:f,n.arg!==y)return{value:n.arg,done:c.done}}else"throw"===n.type&&(u=p,c.method="throw",c.arg=n.arg)}}),e}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",f="suspendedYield",s="executing",p="completed",y={};function g(){}function d(){}function v(){}var m,w,L=((w=(w=(c(m={},o,(function(){return this})),Object.getPrototypeOf))&&w(w(O([]))))&&w!==e&&n.call(w,o)&&(m=w),v.prototype=g.prototype=Object.create(m));function x(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function b(t,r){var e;this._invoke=function(o,i){function a(){return new r((function(e,a){!function e(o,i,a,c){var u;if("throw"!==(o=h(t[o],t,i)).type)return(i=(u=o.arg).value)&&"object"==typeof i&&n.call(i,"__await")?r.resolve(i.__await).then((function(t){e("next",t,a,c)}),(function(t){e("throw",t,a,c)})):r.resolve(i).then((function(t){u.value=t,a(u)}),(function(t){return e("throw",t,a,c)}));c(o.arg)}(o,i,e,a)}))}return e=e?e.then(a,a):a()}}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e,i=t[o];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(i=function o(){for(;++ea;)o(e,r=n[a++])&&(~u(p,r)||f(p,r));return p}},function(t,n,r){var e=r(10),o=r(55),i=r(57);r=function(t){return function(n,r,u){var c,f=e(n),a=i(f),p=o(u,a);if(t&&r!=r){for(;p"+t+""}var u,c=e(42),f=e(64),a=e(59),p=e(48),s=e(66),l=e(39),y=(e=e(47),"prototype"),v="script",d=e("IE_PROTO"),b=function(){try{u=new ActiveXObject("htmlfile")}catch(t){}var t;b="undefined"==typeof document||document.domain&&u?function(t){t.write(i("")),t.close();var n=t.parentWindow.Object;return t=null,n}(u):((t=l("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(t=t.contentWindow.document).open(),t.write(i("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete b[y][a[n]];return b()};p[d]=!0,n.exports=Object.create||function(n,r){var e;return null!==n?(o[y]=c(n),e=new o,o[y]=null,e[d]=n):e=b(),r===t?e:f(e,r)}},function(t,n,r){var e=r(5),o=r(41),i=r(42),u=r(10),c=r(65);t.exports=e?Object.defineProperties:function(t,n){i(t);for(var r,e=u(n),f=c(n),a=f.length,p=0;p3&&void 0!==arguments[3]?arguments[3]:10;const u=n[t];if(!e(o))return;if(!r(i))return;if("function"!=typeof c)return void console.error("The hook callback must be a function.");if("number"!=typeof s)return void console.error("If specified, the hook priority must be a number.");const l={callback:c,priority:s,namespace:i};if(u[o]){const n=u[o].handlers;let t;for(t=n.length;t>0&&!(s>=n[t-1].priority);t--);t===n.length?n[t]=l:n.splice(t,0,l),u.__current.forEach((n=>{n.name===o&&n.currentIndex>=t&&n.currentIndex++}))}else u[o]={handlers:[l],runs:0};"hookAdded"!==o&&n.doAction("hookAdded",o,i,c,s)}};var i=function(n,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(i,c){const s=n[t];if(!e(i))return;if(!o&&!r(c))return;if(!s[i])return 0;let u=0;if(o)u=s[i].handlers.length,s[i]={runs:s[i].runs,handlers:[]};else{const n=s[i].handlers;for(let t=n.length-1;t>=0;t--)n[t].namespace===c&&(n.splice(t,1),u++,s.__current.forEach((n=>{n.name===i&&n.currentIndex>=t&&n.currentIndex--})))}return"hookRemoved"!==i&&n.doAction("hookRemoved",i,c),u}};var c=function(n,t){return function(r,e){const o=n[t];return void 0!==e?r in o&&o[r].handlers.some((n=>n.namespace===e)):r in o}};var s=function(n,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(e){const o=n[t];o[e]||(o[e]={handlers:[],runs:0}),o[e].runs++;const i=o[e].handlers;for(var c=arguments.length,s=new Array(c>1?c-1:0),u=1;u=0),s.type){case"b":e=parseInt(e,10).toString(2);break;case"c":e=String.fromCharCode(parseInt(e,10));break;case"d":case"i":e=parseInt(e,10);break;case"j":e=JSON.stringify(e,null,s.width?parseInt(s.width):0);break;case"e":e=s.precision?parseFloat(e).toExponential(s.precision):parseFloat(e).toExponential();break;case"f":e=s.precision?parseFloat(e).toFixed(s.precision):parseFloat(e);break;case"g":e=s.precision?String(Number(e.toPrecision(s.precision))):parseFloat(e);break;case"o":e=(parseInt(e,10)>>>0).toString(8);break;case"s":e=String(e),e=s.precision?e.substring(0,s.precision):e;break;case"t":e=String(!!e),e=s.precision?e.substring(0,s.precision):e;break;case"T":e=Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),e=s.precision?e.substring(0,s.precision):e;break;case"u":e=parseInt(e,10)>>>0;break;case"v":e=e.valueOf(),e=s.precision?e.substring(0,s.precision):e;break;case"x":e=(parseInt(e,10)>>>0).toString(16);break;case"X":e=(parseInt(e,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?g+=e:(!i.number.test(s.type)||p&&!s.sign?f="":(f=p?"+":"-",e=e.toString().replace(i.sign,"")),l=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",c=s.width-(f+e).length,u=s.width&&c>0?l.repeat(c):"",g+=s.align?f+e+u:"0"===l?f+u+e:u+f+e)}return g}var u=Object.create(null);function l(t){if(u[t])return u[t];for(var n,e=t,r=[],o=0;e;){if(null!==(n=i.text.exec(e)))r.push(n[0]);else if(null!==(n=i.modulo.exec(e)))r.push("%");else{if(null===(n=i.placeholder.exec(e)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){o|=1;var a=[],s=n[2],l=[];if(null===(l=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(l[1]);""!==(s=s.substring(l[0].length));)if(null!==(l=i.key_access.exec(s)))a.push(l[1]);else{if(null===(l=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(l[1])}n[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}e=e.substring(n[0].length)}return u[t]=r}n.sprintf=o,n.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(n,e,n,t))||(t.exports=r))}()}},n={};function e(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return t[r](o,o.exports,e),o.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};!function(){"use strict";e.r(r),e.d(r,{__:function(){return j},_n:function(){return T},_nx:function(){return D},_x:function(){return L},createI18n:function(){return y},defaultI18n:function(){return m},getLocaleData:function(){return w},hasTranslation:function(){return E},isRTL:function(){return O},resetLocaleData:function(){return F},setLocaleData:function(){return k},sprintf:function(){return s},subscribe:function(){return S}});var t=e(9756),n=e.n(t),i=e(124),o=e.n(i);const a=n()(console.error);function s(t){try{for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},l=["(","?"],c={")":["("],":":["?","?:"]},p=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var f={"!":function(t){return!t},"*":function(t,n){return t*n},"/":function(t,n){return t/n},"%":function(t,n){return t%n},"+":function(t,n){return t+n},"-":function(t,n){return t-n},"<":function(t,n){return t":function(t,n){return t>n},">=":function(t,n){return t>=n},"==":function(t,n){return t===n},"!=":function(t,n){return t!==n},"&&":function(t,n){return t&&n},"||":function(t,n){return t||n},"?:":function(t,n,e){if(t)throw n;return e}};function d(t){var n=function(t){for(var n,e,r,i,o=[],a=[];n=t.match(p);){for(e=n[0],(r=t.substr(0,n.index).trim())&&o.push(r);i=a.pop();){if(c[e]){if(c[e][0]===i){e=c[e][1]||e;break}}else if(l.indexOf(i)>=0||u[i]1===t?0:1},x=/^i18n\.(n?gettext|has_translation)(_|$)/,y=(t,n,e)=>{const r=new g({}),i=new Set,o=()=>{i.forEach((t=>t()))},a=function(t){var n;let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";r.data[e]={...r.data[e],...t},r.data[e][""]={...v,...null===(n=r.data[e])||void 0===n?void 0:n[""]},delete r.pluralForms[e]},s=(t,n)=>{a(t,n),o()},u=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return r.data[t]||a(void 0,t),r.dcnpgettext(t,n,e,i,o)},l=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},c=(t,n,r)=>{let i=u(r,n,t);return e?(i=e.applyFilters("i18n.gettext_with_context",i,t,n,r),e.applyFilters("i18n.gettext_with_context_"+l(r),i,t,n,r)):i};if(t&&s(t,n),e){const t=t=>{x.test(t)&&o()};e.addAction("hookAdded","core/i18n",t),e.addAction("hookRemoved","core/i18n",t)}return{getLocaleData:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[t]},setLocaleData:s,addLocaleData:function(t){var n;let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";r.data[e]={...r.data[e],...t,"":{...v,...null===(n=r.data[e])||void 0===n?void 0:n[""],...null==t?void 0:t[""]}},delete r.pluralForms[e],o()},resetLocaleData:(t,n)=>{r.data={},r.pluralForms={},s(t,n)},subscribe:t=>(i.add(t),()=>i.delete(t)),__:(t,n)=>{let r=u(n,void 0,t);return e?(r=e.applyFilters("i18n.gettext",r,t,n),e.applyFilters("i18n.gettext_"+l(n),r,t,n)):r},_x:c,_n:(t,n,r,i)=>{let o=u(i,void 0,t,n,r);return e?(o=e.applyFilters("i18n.ngettext",o,t,n,r,i),e.applyFilters("i18n.ngettext_"+l(i),o,t,n,r,i)):o},_nx:(t,n,r,i,o)=>{let a=u(o,i,t,n,r);return e?(a=e.applyFilters("i18n.ngettext_with_context",a,t,n,r,i,o),e.applyFilters("i18n.ngettext_with_context_"+l(o),a,t,n,r,i,o)):a},isRTL:()=>"rtl"===c("ltr","text direction"),hasTranslation:(t,n,i)=>{var o,a;const s=n?n+""+t:t;let u=!(null===(o=r.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[s]);return e&&(u=e.applyFilters("i18n.has_translation",u,t,n,i),u=e.applyFilters("i18n.has_translation_"+l(i),u,t,n,i)),u}}};var b=window.wp.hooks;const _=y(void 0,void 0,b.defaultHooks);var m=_;const w=_.getLocaleData.bind(_),k=_.setLocaleData.bind(_),F=_.resetLocaleData.bind(_),S=_.subscribe.bind(_),j=_.__.bind(_),L=_._x.bind(_),T=_._n.bind(_),D=_._nx.bind(_),O=_.isRTL.bind(_),E=_.hasTranslation.bind(_)}(),(window.wp=window.wp||{}).i18n=r}();