;
 !function(i){var a={};function n(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}n.m=i,n.c=a,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1027)}({1027:function(e,t){window.instagramZomato={cache:{},pageSize:9,get:function(e,t){var s,i="review_"+e.data("review_id");return t=t||!1,void 0!==this.cache[i]?this.cache[i]:(s={init:function(e,t){this.id="",this.token="",this.ready=!1;var i=parseInt($("#instagram_page_size").val());this.pageSize=i||instagramZomato.pageSize,this.tagPageSize=100,this.fetchTaggedImgs=!1,this.tag="zomato",this.apiURL="https://api.instagram.com/v1/users/",this.tagApiTimeout=10,this.tagApiBackgroundTimeout=1,this.tagApiURL=HOST+"php/instagram_tag_relay?timeout="+this.tagApiTimeout+"&csrf_token="+zomato.csrft,this.tagApiBackgroundURL=HOST+"php/instagram_tag_relay?timeout="+this.tagApiBackgroundTimeout+"&csrf_token="+zomato.csrft,this.loadedImgs=[],this.loadedImgIDs=[],this.prevURL=[],this.nextURL=[],this.previous_selected_insta_img_ids=[],this.offset=0,this.stash=[],this.stashedPrev=-1,this.selectedImgIDs=[],this.selectedImgURLs=[],this.numSelected=0,this.more=!1,this.prev=!1,this.ajaxData={data:[]},this.loadingTimeout=750,this.loadingTimedout=!1,this.imgsLoaded=!1,this.reviewed=!1,this.parent_obj=t||$(".review-photos").first(),this.responseCache={},this.setCounter(),this.setImgsFromResponse([],[]),this.id=s.parent_obj.find(".inst").data("instagram-id"),this.token=s.parent_obj.find(".inst").data("instagram-token"),this.ready=!!this.id&&!!this.token,this.tag=s.parent_obj.find(".inst-photo-tag-select").is(":checked")?"zomato":"all",this.tagApiURL+="&count="+this.pageSize+"&tag="+this.tag+"&callback=something",this.tagApiBackgroundURL+="&count="+this.pageSize+"&tag=zomato&callback=something",this.fetchTaggedImgs="all"!=this.tag,this.apiURL+=this.id+"/media/recent/?access_token="+this.token+"&count="+(this.fetchTaggedImgs?this.tagPageSize:this.pageSize),void 0!==s.parent_obj.find("#previous_selected_insta_img_ids").val()&&(this.previous_selected_insta_img_ids=s.parent_obj.find("#previous_selected_insta_img_ids").val().split(",")),this.ready&&(e?this.fetchImages():this.ready&&this.callTagApiInBackground())},callTagApiInBackground:function(){$.ajax({type:"POST",url:s.tagApiBackgroundURL,success:function(e){},error:function(e,t,i){},complete:function(){},dataType:"jsonp"})},addToAjaxData:function(e){if(!this.ajaxData)return!1;this.ajaxData.data||(this.ajaxData.data=[]),e.pagination&&(this.ajaxData.pagination=e.pagination),e.meta&&(this.ajaxData.meta=e.meta),$(e.data).each(function(e,t){s.ajaxData.data.push(t)})},cleanupAjaxData:function(){var i=[],a=($(this.ajaxData.data).each(function(e,t){t=t.id;-1==jQuery.inArray(t,s.selectedImgIDs)&&delete s.ajaxData.data[e],-1!=jQuery.inArray(t,i)&&delete s.ajaxData.data[e],i.push(t)}),[]);$(this.ajaxData.data).each(function(e,t){if(void 0===t)return!0;a.push(t)}),this.ajaxData.data=a},setCounter:function(){this.numSelected?(s.parent_obj.find("#inst-img-ctr").text(this.numSelected+" selected"),s.parent_obj.find("#inst-img-ctr").fadeIn()):s.parent_obj.find("#inst-img-ctr").fadeOut()},showLoading:function(){s.loadingTimedout=!1,s.parent_obj.addClass("loading"),this.loadingTimeoutID=setTimeout(function(){s.loadingTimedout=!0,s.imgsLoaded&&s.parent_obj.removeClass("loading")},s.loadingTimeout)},fetchImages:function(){if(s.showLoading(),s.imgsLoaded=!1,!this.ready)return"ERR:NOT_READY";var e=this.fetchTaggedImgs?this.tagApiURL:this.apiURL+"&callback=something";this.stash.push(e),this.stashedPrev++,$.ajax({type:"POST",url:e,success:function(e){e.pagination.next_url?(s.nextURL=e.pagination.next_url,s.more=!0):s.more=!1,s.parseImgJSON(e)},error:function(e,t,i){},complete:function(){s.setBrowseButtons()},dataType:"jsonp"})},parseImgJSON:function(e){0==e.data.length?(s.parent_obj.find("#inst-li-noimg").fadeIn(),s.parent_obj.find(".inst-li-noimg-loader").hide(),s.parent_obj.find(".select-photos").hide()):(s.parent_obj.removeClass("loading"),s.parent_obj.find("#inst-li-noimg").hide(),s.parent_obj.find(".inst-li-noimg-loader").hide()),s.imgsLoaded=!0,s.addToAjaxData(e),this.offset++;var i=[],a=[];$(e.data).each(function(e,t){i.push(t.images.thumbnail.url),a.push(t.id),-1==jQuery.inArray(t.images.thumbnail.url,s.loadedImgs)&&(s.loadedImgs.push(t.images.thumbnail.url),s.loadedImgIDs.push(t.id))}),this.setImgsFromResponse(i,a)},callAPI:function(e,t){s.imgsLoaded=!1,s.showLoading(),$.ajax({type:"POST",url:e,success:function(e){e.pagination.next_url?(s.nextURL=e.pagination.next_url,s.more=!0):(s.nextURL=null,s.more=!1),s.parseImgJSON(e)},complete:function(){s.setBrowseButtons()},dataType:"jsonp"}),1==t&&-1==jQuery.inArray(e,this.stash)&&this.stash.push(e),1==t&&(this.stashedPrev=Math.min(this.stash.length-1,this.stashedPrev+1)),-1==t&&(this.stashedPrev=Math.max(-1,this.stashedPrev-1))},setBrowseButtons:function(){s.prev?s.parent_obj.find("#instagram-selection-container .prev").removeClass("hidden"):s.parent_obj.find("#instagram-selection-container .prev").addClass("hidden"),s.more?s.parent_obj.find("#instagram-selection-container .next").removeClass("hidden"):s.parent_obj.find("#instagram-selection-container .next").addClass("hidden")},fetchNextImages:function(){0<s.loadedImgIDs.length&&s.loadedImgIDs[s.loadedImgIDs.length-1];var e=this.fetchTaggedImgs?this.tagApiURL:this.apiURL;if(!s.nextURL)return s.more=!1;e=s.nextURL,s.more=!0,this.setImgsFromResponse([],[]),s.prev=!0,this.callAPI(e,1)},fetchPrevImages:function(){var e=this.stashedPrev-1;s.prev=!(e<1),s.setBrowseButtons(),e<0||this.callAPI(this.stash[e],-1)},setImgs:function(){},setImgsFromResponse:function(e,t){s.parent_obj.find("#instagram-selection-container .choose-photos-ul img").css({opacity:0}).off("load.anim").attr("src",CDN+"images/pixel.gif"),0==e.length&&(s.parent_obj.find("#instagram-selection-container .prev").addClass("hidden"),s.parent_obj.find("#instagram-selection-container .next").addClass("hidden"));for(var i=0;i<s.pageSize;i++){var a="#inst-img-"+i,n=".inst-li-"+i;i<e.length?(s.parent_obj.find(n).show(),s.parent_obj.find(a).on("load.anim",function(){s.loadingTimedout&&s.parent_obj.removeClass("loading"),$(this).animate({opacity:1},500)}),s.parent_obj.find(a).attr("src",e[i]),s.parent_obj.find(n).data("id",t[i]),-1!=jQuery.inArray(t[i],this.selectedImgIDs)?(s.parent_obj.find(n).addClass("selected"),s.parent_obj.find(n+" a").removeClass("hidden")):(s.parent_obj.find(n).removeClass("selected"),s.parent_obj.find(n+" a").addClass("hidden")),-1<this.previous_selected_insta_img_ids.indexOf(t[i])?(s.parent_obj.find(n).addClass("previously_selected selected"),s.parent_obj.find(n).find("#insta-selected-tick").removeClass("hidden")):s.parent_obj.find(n).removeClass("previously_selected"),s.parent_obj.find(n).data("url",e[i])):s.parent_obj.find(n).hide()}},getElemIndex:function(e,t){var i=-1;if(Array.prototype.indexOf)i=e.indexOf(t);else for(;i<e.length&&t!=e[i];i++);return i==e.length?-1:i},toggleSelection:function(e){s.parent_obj.find(e).toggleClass("selected"),s.parent_obj.find(e).find(".sprite-tick").toggleClass("hidden");var t=s.parent_obj.find(e).data("id"),i=s.parent_obj.find(e).data("url");-1==jQuery.inArray(s.parent_obj.find(e).data("id"),s.selectedImgIDs)?(this.selectedImgIDs.push(t),this.selectedImgURLs.push(i),this.numSelected++):(delete this.selectedImgIDs[this.getElemIndex(this.selectedImgIDs,t)],delete this.selectedImgURLs[this.getElemIndex(this.selectedImgURLs,i)],this.numSelected--),this.setCounter(),this.numSelected?s.parent_obj.find(".photo-confirm-btn").fadeIn("fast"):s.parent_obj.find(".photo-confirm-btn").hide("fast"),s.numSelected?s.parent_obj.find("#review-submit").data("reviewed","false"):s.parent_obj.find("#review-submit").data("reviewed","true")},beginPhotoReview:function(){this.reviewed=!0,s.parent_obj.parents(".review-form-item").next(".review-form-item").find("#review-submit").data("reviewed","true"),s.numSelected&&(s.parent_obj.find("#selected-instagram").empty(),$(s.selectedImgURLs).each(function(e,t){if(void 0===t)return!0;t="<li class='left' style='padding:5px;' id='"+s.selectedImgIDs[e]+"'><img src='"+s.selectedImgURLs[e]+"' style='width:100px;' /></li>";s.parent_obj.find("#selected-instagram").append(t)}),s.parent_obj.find("#photo-review").fadeIn(),s.parent_obj.find("#instagram-selection-container .choose-photos").hide(),s.parent_obj.find(".edit-selected-inst").off("click"),s.parent_obj.find(".edit-selected-inst").on("click",function(e){e.preventDefault(),s.endPhotoReview()}),s.parent_obj.find("#instagram-selection-container").hide())},beginSimplePhotoReview:function(){this.reviewed=!0;var i=s.parent_obj.parents(".photo-upload-form-container");s.numSelected&&(i.find("#selected-instagram").empty(),$(s.selectedImgURLs).each(function(e,t){if(void 0===t)return!0;t="<li class='ui item' id='"+s.selectedImgIDs[e]+"'>                                             <div class='ui small image'>                                                 <img src='"+s.selectedImgURLs[e]+"' />                                             </div>                                             <div class='middle aligned content'>                                                 <div contenteditable='true' class='img_caption photo-form-caption-area' placeholder='Napiš popisek... Pro označení jídla použij #názevjídla...'></div>                                             </div>                                         </li>";i.find("#selected-instagram").append(t)}),i.find("#photo-review").fadeIn(),i.find("#instagram-selection-container .choose-photos").hide(),i.find(".edit-selected-inst").off("click"),i.find(".edit-selected-inst").on("click",function(e){e.preventDefault(),i.find("#photo-review").hide(),i.find("#selected-instagram").empty(),i.find(".uploaded_photo_details").addClass("hidden"),i.find(".upload_submit_btn").addClass("hidden"),s.endPhotoReview()}),i.find("#instagram-selection-container").hide(),i.find(".uploaded_photo_details").removeClass("hidden"),i.find(".upload_submit_btn").removeClass("hidden"))},endPhotoReview:function(){this.ready?(this.reviewed=!1,s.parent_obj.find("#review-submit").data("reviewed","false"),s.parent_obj.find("#photo-review").hide(),s.parent_obj.find("#instagram-selection-container .select-photos").show(),s.parent_obj.find("#instagram-selection-container .photo-confirm-btn").show(),s.parent_obj.find("#instagram-selection-container .choose-photos").fadeIn(),s.parent_obj.find("#instagram-selection-container .photo-confirm-btn").click(function(){s.beginPhotoReview()}),s.parent_obj.find("#instagram-selection-container").fadeIn()):(s.parent_obj.find("#photo-review").css("display","none"),zomato.reviews.promptForInstagramConnection(s.parent_obj))},getSubmissionData:function(e){this.cleanupAjaxData();var t=this.ajaxData;return t=e?JSON.stringify(t):t},getSimplePhotosSubmissionData:function(e){this.cleanupAjaxData();var i=this.ajaxData;return $.each(i.data,function(e,t){i.data[e].caption={text:$(".photo-upload-form-container #selected-instagram li#"+t.id+" .img_caption").text(),created_time:Date.now()}}),i=e?JSON.stringify(i):i}},(this.cache[i]=s).init(t,e),s)}}}});;
 if(!window.__twttrlr){(function(a,b){function s(a){for(var b=1,c;c=arguments[b];b++)for(var d in c)a[d]=c[d];return a}function t(a){return Array.prototype.slice.call(a)}function v(a,b){for(var c=0,d;d=a[c];c++)if(b==d)return c;return-1}function w(){var a=t(arguments),b=[];for(var c=0,d=a.length;c<d;c++)a[c].length>0&&b.push(a[c].replace(/\/$/,""));return b.join("/")}function x(a,b,c){var d=b.split("/"),e=a;while(d.length>1){var f=d.shift();e=e[f]=e[f]||{}}e[d[0]]=c}function y(){}function z(a,b){this.id=this.path=a,this.force=!!b}function A(a,b){this.id=a,this.body=b,typeof b=="undefined"&&(this.path=this.resolvePath(a))}function B(a,b){this.deps=a,this.collectResults=b,this.deps.length==0&&this.complete()}function C(a,b){this.deps=a,this.collectResults=b}function D(){for(var a in d)if(d[a].readyState=="interactive")return l[d[a].id]}function E(a,b){var d;return!a&&c&&(d=k||D()),d?(delete l[d.scriptId],d.body=b,d.execute()):(j=d=new A(a,b),i[d.id]=d),d}function F(){var a=t(arguments),b,c;return typeof a[0]=="string"&&(b=a.shift()),c=a.shift(),E(b,c)}function G(a,b){var c=b.id||"",d=c.split("/");d.pop();var e=d.join("/");return a.replace(/^\./,e)}function H(a,b){function d(a){return A.exports[G(a,b)]}var c=[];for(var e=0,f=a.length;e<f;e++){if(a[e]=="require"){c.push(d);continue}if(a[e]=="exports"){b.exports=b.exports||{},c.push(b.exports);continue}c.push(d(a[e]))}return c}function I(){var a=t(arguments),b=[],c,d;return typeof a[0]=="string"&&(c=a.shift()),u(a[0])&&(b=a.shift()),d=a.shift(),E(c,function(a){function f(){var e=H(t(b),c),f;typeof d=="function"?f=d.apply(c,e):f=d,typeof f=="undefined"&&(f=c.exports),a(f)}var c=this,e=[];for(var g=0,h=b.length;g<h;g++){var i=b[g];v(["require","exports"],i)==-1&&e.push(G(i,c))}e.length>0?J.apply(this,e.concat(f)):f()})}function J(){var a=t(arguments),b,c;typeof a[a.length-1]=="function"&&(b=a.pop()),typeof a[a.length-1]=="boolean"&&(c=a.pop());var d=new B(K(a,c),c);return b&&d.then(b),d}function K(a,b){var c=[];for(var d=0,e;e=a[d];d++)typeof e=="string"&&(e=L(e)),u(e)&&(e=new C(K(e,b),b)),c.push(e);return c}function L(a){var b,c;for(var d=0,e;e=J.matchers[d];d++){var f=e[0],g=e[1];if(b=a.match(f))return g(a)}throw new Error(a+" was not recognised by loader")}function N(){return a.using=m,a.provide=n,a.define=o,a.loadrunner=p,M}function O(a){for(var b=0;b<J.bundles.length;b++)for(var c in J.bundles[b])if(c!=a&&v(J.bundles[b][c],a)>-1)return c}var c=a.attachEvent&&!a.opera,d=b.getElementsByTagName("script"),e=0,f,g=b.createElement("script"),h={},i={},j,k,l={},m=a.using,n=a.provide,o=a.define,p=a.loadrunner;for(var q=0,r;r=d[q];q++)if(r.src.match(/loadrunner\.js(\?|#|$)/)){f=r;break}var u=Array.isArray||function(a){return a.constructor==Array};y.prototype.then=function(b){var c=this;return this.started||(this.started=!0,this.start()),this.completed?b.apply(a,this.results):(this.callbacks=this.callbacks||[],this.callbacks.push(b)),this},y.prototype.start=function(){},y.prototype.complete=function(){if(!this.completed){this.results=t(arguments),this.completed=!0;if(this.callbacks)for(var b=0,c;c=this.callbacks[b];b++)c.apply(a,this.results)}},z.loaded=[],z.prototype=new y,z.prototype.start=function(){var a=this,b,c,d;return(d=i[this.id])?(d.then(function(){a.complete()}),this):((b=h[this.id])?b.then(function(){a.loaded()}):!this.force&&v(z.loaded,this.id)>-1?this.loaded():(c=O(this.id))?J(c,function(){a.loaded()}):this.load(),this)},z.prototype.load=function(){var b=this;h[this.id]=b;var c=g.cloneNode(!1);this.scriptId=c.id="LR"+ ++e,c.type="text/javascript",c.async=!0,c.onerror=function(){throw new Error(b.path+" not loaded")},c.onreadystatechange=c.onload=function(c){c=a.event||c;if(c.type=="load"||v(["loaded","complete"],this.readyState)>-1)this.onreadystatechange=null,b.loaded()},c.src=this.path,k=this,d[0].parentNode.insertBefore(c,d[0]),k=null,l[c.id]=this},z.prototype.loaded=function(){this.complete()},z.prototype.complete=function(){v(z.loaded,this.id)==-1&&z.loaded.push(this.id),delete h[this.id],y.prototype.complete.apply(this,arguments)},A.exports={},A.prototype=new z,A.prototype.resolvePath=function(a){return w(J.path,a+".js")},A.prototype.start=function(){var a,b,c=this,d;this.body?this.execute():(a=A.exports[this.id])?this.exp(a):(b=i[this.id])?b.then(function(a){c.exp(a)}):(bundle=O(this.id))?J(bundle,function(){c.start()}):(i[this.id]=this,this.load())},A.prototype.loaded=function(){var a,b,d=this;c?(b=A.exports[this.id])?this.exp(b):(a=i[this.id])&&a.then(function(a){d.exp(a)}):(a=j,j=null,a.id=a.id||this.id,a.then(function(a){d.exp(a)}))},A.prototype.complete=function(){delete i[this.id],z.prototype.complete.apply(this,arguments)},A.prototype.execute=function(){var a=this;typeof this.body=="object"?this.exp(this.body):typeof this.body=="function"&&this.body.apply(window,[function(b){a.exp(b)}])},A.prototype.exp=function(a){this.complete(this.exports=A.exports[this.id]=a||{})},B.prototype=new y,B.prototype.start=function(){function b(){var b=[];a.collectResults&&(b[0]={});for(var c=0,d;d=a.deps[c];c++){if(!d.completed)return;d.results.length>0&&(a.collectResults?d instanceof C?s(b[0],d.results[0]):x(b[0],d.id,d.results[0]):b=b.concat(d.results))}a.complete.apply(a,b)}var a=this;for(var c=0,d;d=this.deps[c];c++)d.then(b);return this},C.prototype=new y,C.prototype.start=function(){var a=this,b=0,c=[];return a.collectResults&&(c[0]={}),function d(){var e=a.deps[b++];e?e.then(function(b){e.results.length>0&&(a.collectResults?e instanceof C?s(c[0],e.results[0]):x(c[0],e.id,e.results[0]):c.push(e.results[0])),d()}):a.complete.apply(a,c)}(),this},I.amd={};var M=function(a){return a(J,F,M,define)};M.Script=z,M.Module=A,M.Collection=B,M.Sequence=C,M.Dependency=y,M.noConflict=N,a.loadrunner=M,a.using=J,a.provide=F,a.define=I,J.path="",J.matchers=[],J.matchers.add=function(a,b){this.unshift([a,b])},J.matchers.add(/(^script!|\.js$)/,function(a){var b=new z(a.replace(/^\$/,J.path.replace(/\/$/,"")+"/").replace(/^script!/,""),!1);return b.id=a,b}),J.matchers.add(/^[a-zA-Z0-9_\-\/]+$/,function(a){return new A(a)}),J.bundles=[],f&&(J.path=f.getAttribute("data-path")||f.src.split(/loadrunner\.js/)[0]||"",(main=f.getAttribute("data-main"))&&J.apply(a,main.split(/\s*,\s*/)).then(function(){}))})(this,document);(window.__twttrlr = loadrunner.noConflict());}__twttrlr(function(using, provide, loadrunner, define) {provide("util/util",function(a){function b(a){var b=1,c,d;for(;c=arguments[b];b++)for(d in c)if(!c.hasOwnProperty||c.hasOwnProperty(d))a[d]=c[d];return a}function c(a){for(var b in a)a.hasOwnProperty(b)&&(k(a[b])&&(c(a[b]),l(a[b])&&delete a[b]),(a[b]===undefined||a[b]===null||a[b]==="")&&delete a[b]);return a}function d(a,b){var c=0,d;for(;d=a[c];c++)if(b==d)return c;return-1}function e(a,b){if(!a)return null;if(a.filter)return a.filter.apply(a,[b]);if(!b)return a;var c=[],d=0,e;for(;e=a[d];d++)b(e)&&c.push(e);return c}function f(a,b){if(!a)return null;if(a.map)return a.map.apply(a,[b]);if(!b)return a;var c=[],d=0,e;for(;e=a[d];d++)c.push(b(e));return c}function g(a){return a&&a.replace(/(^\s+|\s+$)/g,"")}function h(a){return{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function i(a){return a&&String(a).toLowerCase().indexOf("[native code]")>-1}function j(a,b){if(a.contains)return a.contains(b);var c=b.parentNode;while(c){if(c===a)return!0;c=c.parentNode}return!1}function k(a){return a===Object(a)}function l(a){if(!k(a))return!1;if(Object.keys)return!Object.keys(a).length;for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}a({aug:b,compact:c,containsElement:j,filter:e,map:f,trim:g,indexOf:d,isNative:i,isObject:k,isEmptyObject:l,toType:h})});
provide("util/events",function(a){using("util/util",function(b){function d(){this.completed=!1,this.callbacks=[]}var c={bind:function(a,b){return this._handlers=this._handlers||{},this._handlers[a]=this._handlers[a]||[],this._handlers[a].push(b)},unbind:function(a,c){if(!this._handlers[a])return;if(c){var d=b.indexOf(this._handlers[a],c);d>=0&&this._handlers[a].splice(d,1)}else this._handlers[a]=[]},trigger:function(a,b){var c=this._handlers&&this._handlers[a];b.type=a;if(c)for(var d=0,e;e=c[d];d++)e.call(this,b)}};d.prototype.addCallback=function(a){this.completed?a.apply(this,this.results):this.callbacks.push(a)},d.prototype.complete=function(){this.results=makeArray(arguments),this.completed=!0;for(var a=0,b;b=this.callbacks[a];a++)b.apply(this,this.results)},a({Emitter:c,Promise:d})})});
provide("tfw/util/globals",function(a){function c(){var a=document.getElementsByTagName("meta"),c,d,e=0;for(;c=a[e];e++){if(!/^twitter:/.test(c.name))continue;d=c.name.replace(/^twitter:/,""),b[d]=c.content}}function d(a){return b[a]}var b={};a({init:c,val:d})});
provide("util/querystring",function(a){function b(a){return encodeURIComponent(a).replace(/\+/g,"%2B")}function c(a){return decodeURIComponent(a)}function d(a){var c=[],d;for(d in a)a[d]!==null&&typeof a[d]!="undefined"&&c.push(b(d)+"="+b(a[d]));return c.sort().join("&")}function e(a){var b={},d,e,f,g;if(a){d=a.split("&");for(g=0;f=d[g];g++)e=f.split("="),e.length==2&&(b[c(e[0])]=c(e[1]))}return b}function f(a,b){var c=d(b);return c.length>0?a.indexOf("?")>=0?a+"&"+d(b):a+"?"+d(b):a}function g(a){var b=a&&a.split("?");return b.length==2?e(b[1]):{}}a({url:f,decodeURL:g,decode:e,encode:d,encodePart:b,decodePart:c})});
provide("util/twitter",function(a){using("util/querystring",function(b){function g(a){return typeof a=="string"&&c.test(a)&&RegExp.$1.length<=20}function h(a){if(g(a))return RegExp.$1}function i(a){var c=b.decodeURL(a);c.screen_name=h(a);if(c.screen_name)return b.url("https://twitter.com/intent/user",c)}function j(a){return typeof a=="string"&&f.test(a)}function k(a,b){b=b===undefined?!0:b;if(j(a))return(b?"#":"")+RegExp.$1}function l(a){return typeof a=="string"&&d.test(a)}function m(a){return l(a)&&RegExp.$1}function n(a){return e.test(a)}var c=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.com(?:\:\d+)?(?:\/intent\/(?:follow|user)\/?\?screen_name=|(?:\/#!)?\/))@?([\w]+)(?:\?|&|$)/i,d=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.com(?:\:\d+)?\/(?:#!\/)?[\w_]+\/status(?:es)?\/)(\d+)/i,e=/^http(s?):\/\/((www\.)?)twitter\.com\//,f=/^#?([^.,<>!\s\/#\-\(\)\'\"]+)$/;a({isHashTag:j,hashTag:k,isScreenName:g,screenName:h,isStatus:l,status:m,intentForProfileURL:i,isTwitterURL:n,regexen:{profile:c}})})});
provide("util/uri",function(a){using("util/querystring","util/util","util/twitter",function(b,c,d){function e(a,b){var c,d;return b=b||location,/^https?:\/\//.test(a)?a:/^\/\//.test(a)?b.protocol+a:(c=b.host+(b.port.length?":"+b.port:""),a.indexOf("/")!==0&&(d=b.pathname.split("/"),d.pop(),d.push(a),a="/"+d.join("/")),[b.protocol,"//",c,a].join(""))}function f(){var a=document.getElementsByTagName("link"),b=0,c;for(;c=a[b];b++)if(c.rel=="canonical")return e(c.href)}function g(){var a=document.getElementsByTagName("a"),b=document.getElementsByTagName("link"),c=[a,b],e,f,g=0,h=0,i=/\bme\b/,j;for(;e=c[g];g++)for(h=0;f=e[h];h++)if(i.test(f.rel)&&(j=d.screenName(f.href)))return j}a({absolutize:e,getCanonicalURL:f,getScreenNameFromPage:g})})});
provide("util/iframe",function(a){a(function(a){var b=(a.replace&&a.replace.ownerDocument||document).createElement("div"),c,d,e;b.innerHTML="<iframe allowtransparency='true' frameBorder='0' scrolling='no'></iframe>",c=b.firstChild,c.src=a.url,c.className=a.className||"";if(a.css)for(d in a.css)a.css.hasOwnProperty(d)&&(c.style[d]=a.css[d]);if(a.attributes)for(e in a.attributes)a.attributes.hasOwnProperty(e)&&c.setAttribute(e,a.attributes[e]);return a.replace?a.replace.parentNode.replaceChild(c,a.replace):a.insertTarget&&a.insertTarget.appendChild(c),c})});
provide("dom/get",function(a){using("util/util",function(b){function c(a,c,d,e){var f,g,h=[],i,j,k,l,m,n;c=c||document;if(b.isNative(c.getElementsByClassName))return h=b.filter(c.getElementsByClassName(a),function(a){return!d||a.tagName.toLowerCase()==d.toLowerCase()}),[].slice.call(h,0,e||h.length);i=a.split(" "),l=i.length,f=c.getElementsByTagName(d||"*"),n=f.length;for(k=0;k<l&&n>0;k++){h=[],j=i[k];for(m=0;m<n;m++){g=f[m],~b.indexOf(g.className.split(" "),j)&&h.push(g);if(k+1==l&&h.length===e)break}f=h,n=f.length}return h}function d(a,b,d){return c(a,b,d,1)[0]}function e(a,c,d){var f=c&&c.parentNode,g;if(!f||f===d)return;return f.tagName==a?f:(g=f.className.split(" "),0===a.indexOf(".")&&~b.indexOf(g,a.slice(1))?f:e(a,f,d))}a({all:c,one:d,ancestor:e})})});
provide("util/domready",function(a){function k(){b=1;for(var a=0,d=c.length;a<d;a++)c[a]()}var b=0,c=[],d,e,f=!1,g=document.createElement("a"),h="DOMContentLoaded",i="addEventListener",j="onreadystatechange";/^loade|c/.test(document.readyState)&&(b=1),document[i]&&document[i](h,e=function(){document.removeEventListener(h,e,f),k()},f),g.doScroll&&document.attachEvent(j,d=function(){/^c/.test(document.readyState)&&(document.detachEvent(j,d),k())});var l=g.doScroll?function(a){self!=top?b?a():c.push(a):!function(){try{g.doScroll("left")}catch(b){return setTimeout(function(){l(a)},50)}a()}()}:function(a){b?a():c.push(a)};a(l)});
provide("tfw/widget/base",function(a){using("util/util","util/domready","dom/get","util/querystring","util/iframe",function(b,c,d,e,f){function m(a){var b;if(!a)return;a.ownerDocument?(this.srcEl=a,this.classAttr=a.className.split(" ")):(this.srcOb=a,this.classAttr=[]),b=this.params(),this.id=o(),this.setLanguage(),this.related=b.related||this.dataAttr("related"),this.partner=b.partner||this.dataAttr("partner"),this.dnt=b.dnt||this.dataAttr("dnt")||"",this.styleAttr=[],this.targetEl=a.targetEl}function n(){var a=0,b;for(;b=k[a];a++)b.call()}function o(){return this.srcEl&&this.srcEl.id||"twitter-widget-"+g++}function p(a){if(!a)return;return a.lang?a.lang:p(a.parentNode)}var g=0,h,i,j={list:[],byId:{}},k=[],l={ar:{"%{followers_count} followers":"عدد المتابعين %{followers_count}","100K+":"+100 ألف","10k unit":"10 آلاف وحدة",Follow:"تابِع","Follow %{screen_name}":"تابِع %{screen_name}",K:"ألف",M:"مليون",Tweet:"غرِّد","Tweet %{hashtag}":"غرِّد %{hashtag}","Tweet to %{name}":"غرِّد لـ %{name}","Twitter Stream":"خطّ تويتر الزمنيّ"},da:{"%{followers_count} followers":"%{followers_count} følgere","100K+":"100K+","10k unit":"10k enhed",Follow:"Følg","Follow %{screen_name}":"Følg %{screen_name}",K:"K",M:"M",Tweet:"Tweet","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Tweet til %{name}","Twitter Stream":"Twitter-strøm"},de:{"%{followers_count} followers":"%{followers_count} Follower","100K+":"100Tsd+","10k unit":"10tsd-Einheit",Follow:"Folgen","Follow %{screen_name}":"%{screen_name} folgen",K:"Tsd",M:"M",Tweet:"Twittern","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Tweet an %{name}","Twitter Stream":"Twitter Stream"},es:{"%{followers_count} followers":"%{followers_count} seguidores","100K+":"100K+","10k unit":"10k unidad",Follow:"Seguir","Follow %{screen_name}":"Seguir a %{screen_name}",K:"K",M:"M",Tweet:"Twittear","Tweet %{hashtag}":"Twittear %{hashtag}","Tweet to %{name}":"Twittear a %{name}","Twitter Stream":"Cronología de Twitter"},fa:{"%{followers_count} followers":"%{followers_count} دنبال‌کننده","100K+":">۱۰۰هزار","10k unit":"۱۰هزار واحد",Follow:"دنبال کردن","Follow %{screen_name}":"دنبال کردن %{screen_name}",K:"هزار",M:"میلیون",Tweet:"توییت","Tweet %{hashtag}":"توییت کردن %{hashtag}","Tweet to %{name}":"به %{name} توییت کنید","Twitter Stream":"جریان توییت‌ها"},fi:{"%{followers_count} followers":"%{followers_count} seuraajaa","100K+":"100 000+","10k unit":"10 000 yksikköä",Follow:"Seuraa","Follow %{screen_name}":"Seuraa käyttäjää %{screen_name}",K:"tuhatta",M:"milj.",Tweet:"Twiittaa","Tweet %{hashtag}":"Twiittaa %{hashtag}","Tweet to %{name}":"Twiittaa käyttäjälle %{name}","Twitter Stream":"Twitter-virta"},fil:{"%{followers_count} followers":"%{followers_count} mga tagasunod","100K+":"100K+","10k unit":"10k yunit",Follow:"Sundan","Follow %{screen_name}":"Sundan si %{screen_name}",K:"K",M:"M",Tweet:"I-tweet","Tweet %{hashtag}":"I-tweet ang %{hashtag}","Tweet to %{name}":"Mag-Tweet kay %{name}","Twitter Stream":"Stream ng Twitter"},fr:{"%{followers_count} followers":"%{followers_count} abonnés","100K+":"100K+","10k unit":"unité de 10k",Follow:"Suivre","Follow %{screen_name}":"Suivre %{screen_name}",K:"K",M:"M",Tweet:"Tweeter","Tweet %{hashtag}":"Tweeter %{hashtag}","Tweet to %{name}":"Tweeter à %{name}","Twitter Stream":"Flux Twitter"},he:{"%{followers_count} followers":"%{followers_count} עוקבים","100K+":"מאות אלפים","10k unit":"עשרות אלפים",Follow:"מעקב","Follow %{screen_name}":"לעקוב אחר %{screen_name}",K:"אלף",M:"מיליון",Tweet:"ציוץ","Tweet %{hashtag}":"צייצו %{hashtag}","Tweet to %{name}":"ציוץ אל %{name}","Twitter Stream":"התזרים של טוויטר"},hi:{"%{followers_count} followers":"%{followers_count} फ़ॉलोअर्स","100K+":"1 लाख+","10k unit":"10 हजार इकाईयां",Follow:"फ़ॉलो","Follow %{screen_name}":"%{screen_name} को फ़ॉलो करें",K:"हजार",M:"मिलियन",Tweet:"ट्वीट","Tweet %{hashtag}":"ट्वीट %{hashtag}","Tweet to %{name}":"%{name} को ट्वीट करें","Twitter Stream":"ट्विटर स्ट्रीम"},hu:{"%{followers_count} followers":"%{followers_count} követő","100K+":"100E+","10k unit":"10E+",Follow:"Követés","Follow %{screen_name}":"%{screen_name} követése",K:"E",M:"M",Tweet:"Tweet","Tweet %{hashtag}":"%{hashtag} tweetelése","Tweet to %{name}":"Tweet küldése neki: %{name}","Twitter Stream":"Twitter Hírfolyam"},id:{"%{followers_count} followers":"%{followers_count} pengikut","100K+":"100 ribu+","10k unit":"10 ribu unit",Follow:"Ikuti","Follow %{screen_name}":"Ikuti %{screen_name}",K:"&nbsp;ribu",M:"&nbsp;juta",Tweet:"Tweet","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Tweet ke %{name}","Twitter Stream":"Aliran Twitter"},it:{"%{followers_count} followers":"%{followers_count} follower","100K+":"100K+","10k unit":"10k unità",Follow:"Segui","Follow %{screen_name}":"Segui %{screen_name}",K:"K",M:"M",Tweet:"Tweet","Tweet %{hashtag}":"Twitta %{hashtag}","Tweet to %{name}":"Twitta a %{name}","Twitter Stream":"Twitter Stream"},ja:{"%{followers_count} followers":"%{followers_count}人のフォロワー","100K+":"100K以上","10k unit":"万",Follow:"フォローする","Follow %{screen_name}":"%{screen_name}さんをフォロー",K:"K",M:"M",Tweet:"ツイート","Tweet %{hashtag}":"%{hashtag} をツイートする","Tweet to %{name}":"%{name}さんへツイートする","Twitter Stream":"Twitterストリーム"},ko:{"%{followers_count} followers":"%{followers_count}명의 팔로워","100K+":"100만 이상","10k unit":"만 단위",Follow:"팔로우","Follow %{screen_name}":"%{screen_name} 팔로우하기",K:"천",M:"백만",Tweet:"트윗","Tweet %{hashtag}":"%{hashtag} 관련 트윗하기","Tweet to %{name}":"%{name}님에게 트윗하기","Twitter Stream":"트위터 스트림"},msa:{"%{followers_count} followers":"%{followers_count} pengikut","100K+":"100 ribu+","10k unit":"10 ribu unit",Follow:"Ikut","Follow %{screen_name}":"Ikut %{screen_name}",K:"ribu",M:"juta",Tweet:"Tweet","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Tweet kepada %{name}","Twitter Stream":"Strim Twitter"},nl:{"%{followers_count} followers":"%{followers_count} volgers","100K+":"100k+","10k unit":"10k-eenheid",Follow:"Volgen","Follow %{screen_name}":"%{screen_name} volgen",K:"k",M:" mln.",Tweet:"Tweeten","Tweet %{hashtag}":"%{hashtag} tweeten","Tweet to %{name}":"Tweeten naar %{name}","Twitter Stream":"Twitter Stream"},no:{"%{followers_count} followers":"%{followers_count} følgere","100K+":"100K+","10k unit":"10k ",Follow:"Følg","Follow %{screen_name}":"Følg %{screen_name}",K:"K",M:"M",Tweet:"Tweet","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Send tweet til %{name}","Twitter Stream":"Twitter-strøm"},pl:{"%{followers_count} followers":"%{followers_count} obserwujących","100K+":"100 tys.+","10k unit":"10 tys.",Follow:"Obserwuj","Follow %{screen_name}":"Obserwuj %{screen_name}",K:"tys.",M:"mln",Tweet:"Tweetnij","Tweet %{hashtag}":"Tweetnij %{hashtag}","Tweet to %{name}":"Tweetnij do %{name}","Twitter Stream":"Strumień Twittera"},pt:{"%{followers_count} followers":"%{followers_count} seguidores","100K+":"+100 mil","10k unit":"10 mil unidades",Follow:"Seguir","Follow %{screen_name}":"Seguir %{screen_name}",K:"Mil",M:"M",Tweet:"Tweetar","Tweet %{hashtag}":"Tweetar %{hashtag}","Tweet to %{name}":"Tweetar para %{name}","Twitter Stream":"Transmissões do Twitter"},ru:{"%{followers_count} followers":"Читатели: %{followers_count} ","100K+":"100 тыс.+","10k unit":"блок 10k",Follow:"Читать","Follow %{screen_name}":"Читать %{screen_name}",K:"тыс.",M:"млн.",Tweet:"Твитнуть","Tweet %{hashtag}":"Твитнуть %{hashtag}","Tweet to %{name}":"Твитнуть %{name}","Twitter Stream":"Поток в Твиттере"},sv:{"%{followers_count} followers":"%{followers_count} följare","100K+":"100K+","10k unit":"10k",Follow:"Följ","Follow %{screen_name}":"Följ %{screen_name}",K:"K",M:"M",Tweet:"Tweeta","Tweet %{hashtag}":"Tweeta %{hashtag}","Tweet to %{name}":"Tweeta till %{name}","Twitter Stream":"Twitterflöde"},th:{"%{followers_count} followers":"%{followers_count} ผู้ติดตาม","100K+":"100พัน+","10k unit":"หน่วย 10พัน",Follow:"ติดตาม","Follow %{screen_name}":"ติดตาม %{screen_name}",K:"พัน",M:"ล้าน",Tweet:"ทวีต","Tweet %{hashtag}":"ทวีต %{hashtag}","Tweet to %{name}":"ทวีตถึง %{name}","Twitter Stream":"ทวิตเตอร์สตรีม"},tr:{"%{followers_count} followers":"%{followers_count} takipçi","100K+":"+100 bin","10k unit":"10 bin birim",Follow:"Takip et","Follow %{screen_name}":"Takip et: %{screen_name}",K:"bin",M:"milyon",Tweet:"Tweetle","Tweet %{hashtag}":"Tweetle: %{hashtag}","Tweet to %{name}":"Tweetle: %{name}","Twitter Stream":"Twitter Akışı"},ur:{"%{followers_count} followers":"%{followers_count} فالورز","100K+":"ایک لاکھ سے زیادہ","10k unit":"دس ہزار یونٹ",Follow:"فالو کریں","Follow %{screen_name}":"%{screen_name} کو فالو کریں",K:"ہزار",M:"ملین",Tweet:"ٹویٹ کریں","Tweet %{hashtag}":"%{hashtag} ٹویٹ کریں","Tweet to %{name}":"%{name} کو ٹویٹ کریں","Twitter Stream":"ٹوئٹر سٹریم"},"zh-cn":{"%{followers_count} followers":"%{followers_count} 关注者","100K+":"10万+","10k unit":"1万单元",Follow:"关注","Follow %{screen_name}":"关注 %{screen_name}",K:"千",M:"百万",Tweet:"发推","Tweet %{hashtag}":"以 %{hashtag} 发推","Tweet to %{name}":"发推给 %{name}","Twitter Stream":"Twitter 信息流"},"zh-tw":{"%{followers_count} followers":"%{followers_count} 位跟隨者","100K+":"超過十萬","10k unit":"1萬 單位",Follow:"跟隨","Follow %{screen_name}":"跟隨 %{screen_name}",K:"千",M:"百萬",Tweet:"推文","Tweet %{hashtag}":"推文%{hashtag}","Tweet to %{name}":"推文給%{name}"}};b.aug(m.prototype,{setLanguage:function(a){var b;a||(a=this.params().lang||this.dataAttr("lang")||p(this.srcEl)),a=a&&a.toLowerCase();if(!a)return this.lang="en";if(l[a])return this.lang=a;b=a.replace(/[\-_].*/,"");if(l[b])return this.lang=b;this.lang="en"},_:function(a,b){var c=this.lang;b=b||{};if(!c||!l.hasOwnProperty(c))c=this.lang="en";return a=l[c]&&l[c][a]||a,this.ringo(a,b,/%\{([\w_]+)\}/g)},ringo:function(a,b,c){return c=c||/\{\{([\w_]+)\}\}/g,a.replace(c,function(a,c){return b[c]!==undefined?b[c]:a})},add:function(a){j.list.push(this),j.byId[this.id]=a},create:function(a,b,c){return c["data-twttr-rendered"]=!0,f({url:a,css:b,className:this.classAttr.join(" "),id:this.id,attributes:c,replace:this.srcEl,insertTarget:this.targetEl})},params:function(){var a,b;return this.srcOb?b=this.srcOb:(a=this.srcEl&&this.srcEl.href&&this.srcEl.href.split("?")[1],b=a?e.decode(a):{}),this.params=function(){return b},b},dataAttr:function(a){return this.srcEl&&this.srcEl.getAttribute("data-"+a)},attr:function(a){return this.srcEl&&this.srcEl.getAttribute(a)},styles:{base:[["font","normal normal normal 11px/18px 'Helvetica Neue', Arial, sans-serif"],["margin","0"],["padding","0"],["whiteSpace","nowrap"]],button:[["fontWeight","bold"],["textShadow","0 1px 0 rgba(255,255,255,.5)"]],large:[["fontSize","13px"],["lineHeight","26px"]],vbubble:[["fontSize","16px"]]},width:function(){throw new Error(name+" not implemented")},height:function(){return this.size=="m"?20:28},minWidth:function(){},maxWidth:function(){},minHeight:function(){},maxHeight:function(){},dimensions:function(){function a(a){switch(typeof a){case"string":return a;case"undefined":return;default:return a+"px"}}var b,c={width:this.width(),height:this.height()};this.minWidth()&&(c["min-width"]=this.minWidth()),this.maxWidth()&&(c["max-width"]=this.maxWidth()),this.minHeight()&&(c["min-height"]=this.minHeight()),this.maxHeight()&&(c["max-height"]=this.maxHeight());for(b in c)c[b]=a(c[b]);return c},generateId:o}),m.afterLoad=function(a){k.push(a)},m.init=function(a){i=a},m.find=function(a){return a&&j.byId[a]?j.byId[a].element:null},m.embed=function(a){var b=i.widgets,c,e,f,g,h,k;a=a||document;for(f in b){f.match(/\./)?(g=f.split("."),c=d.all(g[1],a,g[0])):c=a.getElementsByTagName(f);for(h=0;k=c[h];h++){if(k.getAttribute("data-twttr-rendered"))continue;k.setAttribute("data-twttr-rendered","true"),e=new b[f](k),j.list.push(e),j.byId[e.id]=e,e.render(i)}}n()},a(m)})});
provide("tfw/widget/intent",function(a){using("tfw/widget/base","util/util","util/querystring","util/uri",function(b,c,d,e){function m(a){var b=Math.round(k/2-h/2),c=0;j>i&&(c=Math.round(j/2-i/2)),window.open(a,undefined,[g,"width="+h,"height="+i,"left="+b,"top="+c].join(","))}function n(a,b){using("tfw/hub/client",function(c){c.openIntent(a,b)})}function o(a){var b="original_referer="+location.href;return[a,b].join(a.indexOf("?")==-1?"?":"&")}function p(a){var b,d,e,g;a=a||window.event,b=a.target||a.srcElement;if(a.altKey||a.metaKey||a.shiftKey)return;while(b){if(~c.indexOf(["A","AREA"],b.nodeName))break;b=b.parentNode}b&&b.href&&(d=b.href.match(f),d&&(g=o(b.href),g=g.replace(/^http[:]/,"https:"),g=g.replace(/^\/\//,"https://"),q(g,b),a.returnValue=!1,a.preventDefault&&a.preventDefault()))}function q(a,b){if(twttr.events.hub&&b){var c=new r(l.generateId(),b);l.add(c),n(a,b),twttr.events.trigger("click",{target:b,region:"intent",type:"click",data:{}})}else m(a)}function r(a,b){this.id=a,this.element=this.srcEl=b}function s(a){this.srcEl=[],this.element=a}var f=/twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,g="scrollbars=yes,resizable=yes,toolbar=no,location=yes",h=550,i=520,j=screen.height,k=screen.width,l;s.prototype=new b,c.aug(s.prototype,{render:function(a){l=this,window.__twitterIntentHandler||(document.addEventListener?document.addEventListener("click",p,!1):document.attachEvent&&document.attachEvent("onclick",p),window.__twitterIntentHandler=!0)}}),s.open=q,a(s)})});
provide("dom/classname",function(a){function b(a,b){a.classList?a.classList.add(b):f(b).test(a.className)||(a.className+=" "+b)}function c(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(f(b)," ")}function d(a,d,g){a.classList&&e(a,d)?(c(a,d),b(a,g)):a.className=a.className.replace(f(d),g)}function e(a,b){return a.classList?a.classList.contains(b):f(b).test(a.className)}function f(a){return new RegExp("\\b"+a+"\\b","g")}a({add:b,remove:c,replace:d,present:e})});
provide("util/env",function(a){var b=window.navigator.userAgent;a({retina:function(){return(window.devicePixelRatio||1)>1},anyIE:function(){return/MSIE \d/.test(b)},ie6:function(){return/MSIE 6/.test(b)},ie7:function(){return/MSIE 7/.test(b)},cspEnabledIE:function(){return/MSIE 1\d/.test(b)},touch:function(){return"ontouchstart"in window||/Opera Mini/.test(b)||navigator.msMaxTouchPoints>0},cssTransitions:function(){var a=document.body.style;return a.transition!==undefined||a.webkitTransition!==undefined||a.mozTransition!==undefined||a.oTransition!==undefined||a.msTransition!==undefined}})});
provide("dom/delegate",function(a){using("util/env",function(b){function e(a){var b=a.getAttribute("data-twitter-event-id");return b?b:(a.setAttribute("data-twitter-event-id",++d),d)}function f(a,b,c){var d=0,e=a&&a.length||0;for(d=0;d<e;d++)a[d].call(b,c)}function g(a,b,c){var d=c||a.target||a.srcElement,e=d.className.split(" "),h=0,i,j=e.length;for(;h<j;h++)f(b["."+e[h]],d,a);f(b[d.tagName],d,a);if(a.cease)return;d!==this&&g.call(this,a,b,d.parentElement||d.parentNode)}function h(a,b,c){if(a.addEventListener){a.addEventListener(b,function(d){g.call(a,d,c[b])},!1);return}a.attachEvent&&a.attachEvent("on"+b,function(){g.call(a,a.ownerDocument.parentWindow.event,c[b])})}function i(a,b,d,f){var g=e(a);c[g]=c[g]||{},c[g][b]||(c[g][b]={},h(a,b,c[g])),c[g][b][d]=c[g][b][d]||[],c[g][b][d].push(f)}function j(a,b,d){var f=e(b),h=c[f]&&c[f];g.call(b,{target:d},h[a])}function k(a){return m(a),l(a),!1}function l(a){a&&a.preventDefault?a.preventDefault():a.returnValue=!1}function m(a){a&&(a.cease=!0)&&a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}var c={},d=-1;a({stop:k,stopPropagation:m,preventDefault:l,delegate:i,simulate:j})})});
provide("util/throttle",function(a){function b(a,b,c){function g(){var c=+(new Date);window.clearTimeout(f);if(c-e>b){e=c,a.call(d);return}f=window.setTimeout(g,b)}var d=c||this,e=0,f;return g}a(b)});
provide("util/insert",function(a){a(function(a,b){if(b){if(!b.parentNode)return b;b.parentNode.replaceChild(a,b),delete b}else document.body.insertBefore(a,document.body.firstChild);return a})});
provide("util/css",function(a){using("util/util",function(b){a({sanitize:function(a,c,d){var e=/^[\w ,%\/"'\-_#]+$/,f=a&&b.map(a.split(";"),function(a){return b.map(a.split(":").slice(0,2),function(a){return b.trim(a)})}),g=0,h,i=[],j=d?"!important":"";c=c||/^(font|text\-|letter\-|color|line\-)[\w\-]*$/;for(;f&&(h=f[g]);g++)h[0].match(c)&&h[1].match(e)&&i.push(h.join(":")+j);return i.join(";")}})})});
provide("tfw/util/params",function(a){using("util/querystring","util/twitter",function(b,c){a(function(a,d){return function(e){var f,g="data-tw-params",h,i=e.innerHTML;if(!e)return;if(!c.isTwitterURL(e.href))return;if(e.getAttribute(g))return;e.setAttribute(g,!0);if(typeof d=="function"){f=d.call(this,e);for(h in f)f.hasOwnProperty(h)&&(a[h]=f[h])}e.href=b.url(e.href,a),e.innerHTML=i}})})});
provide("$xd/json2.js", function(exports) {window.JSON||(window.JSON={}),function(){function f(a){return a<10?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";return e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g,e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));return e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g,e}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(!b||typeof b=="function"||typeof b=="object"&&typeof b.length=="number")return str("",{"":a});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();exports();loadrunner.Script.loaded.push("$xd/json2.js")});
provide("util/params",function(a){using("util/querystring",function(b){var c=function(a){var c=a.search.substr(1);return b.decode(c)},d=function(a){var c=a.href,d=c.indexOf("#"),e=d<0?"":c.substring(d+1);return b.decode(e)},e=function(a){var b={},e=c(a),f=d(a);for(var g in e)e.hasOwnProperty(g)&&(b[g]=e[g]);for(var g in f)f.hasOwnProperty(g)&&(b[g]=f[g]);return b};a({combined:e,fromQuery:c,fromFragment:d})})});
provide("tfw/util/env",function(a){using("util/params",function(b){function d(){var a=36e5,d=b.combined(document.location)._;return c!==undefined?c:(c=!1,d&&/^\d+$/.test(d)&&(c=+(new Date)-parseInt(d)<a),c)}var c;a({isDynamicWidget:d})})});
provide("util/decider",function(a){function c(a){var c=b[a]||!1;if(!c)return!1;if(c===!0||c===100)return!0;var d=Math.random()*100,e=c>=d;return b[a]=e,e}var b={force_new_cookie:100,rufous_pixel:100,decider_fixture:12.34};a({isAvailable:c})});
provide("dom/cookie",function(a){using("util/util",function(b){a(function(a,c,d){var e=b.aug({},d);if(arguments.length>1&&String(c)!=="[object Object]"){if(c===null||c===undefined)e.expires=-1;if(typeof e.expires=="number"){var f=e.expires,g=new Date((new Date).getTime()+f*60*1e3);e.expires=g}return c=String(c),document.cookie=[encodeURIComponent(a),"=",e.raw?c:encodeURIComponent(c),e.expires?"; expires="+e.expires.toUTCString():"",e.path?"; path="+e.path:"",e.domain?"; domain="+e.domain:"",e.secure?"; secure":""].join("")}e=c||{};var h,i=e.raw?function(a){return a}:decodeURIComponent;return(h=(new RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)")).exec(document.cookie))?i(h[1]):null})})});
provide("util/donottrack",function(a){using("dom/cookie",function(b){a(function(a){var c=/\.(gov|mil)(:\d+)?$/i,d=/https?:\/\/([^\/]+).*/i;return a=a||document.referrer,a=d.test(a)&&d.exec(a)[1],b("dnt")?!0:c.test(document.location.host)?!0:a&&c.test(a)?!0:document.navigator?document.navigator["doNotTrack"]==1:navigator?navigator["doNotTrack"]==1||navigator["msDoNotTrack"]==1:!1})})});
provide("tfw/util/guest_cookie",function(a){using("dom/cookie","util/donottrack","util/decider",function(b,c,d){function f(){var a=b(e)||!1;if(!a)return;a.match(/^v3\:/)||g()}function g(){b(e)&&b(e,null,{domain:".twitter.com",path:"/"})}function h(){c()&&g()}var e="pid";a({set:h,destroy:g,forceNewCookie:f,guest_id_cookie:e})})});
provide("dom/sandbox",function(a){using("util/domready","util/env",function(b,c){function e(a,b){var c,d,e;if(a.name){try{e=document.createElement('<iframe name="'+a.name+'"></iframe>')}catch(f){e=document.createElement("iframe"),e.name=a.name}delete a.name}else e=document.createElement("iframe");a.id&&(e.id=a.id,delete a.id);for(c in a)a.hasOwnProperty(c)&&e.setAttribute(c,a[c]);e.allowtransparency="true",e.scrolling="no",e.setAttribute("frameBorder",0),e.setAttribute("allowTransparency",!0);for(d in b||{})b.hasOwnProperty(d)&&(e.style[d]=b[d]);return e}function f(a,b,c,d){var f;this.attrs=b||{},this.styles=c||{},this.appender=d,this.onReady=a,this.sandbox={},f=e(this.attrs,this.styles),f.onreadystatechange=f.onload=this.getCallback(this.onLoad),this.sandbox.frame=f,d?d(f):document.body.appendChild(f)}function g(a,c,d,e){b(function(){new f(a,c,d,e)})}var d=0;window.twttr||(window.twttr={}),window.twttr.sandbox||(window.twttr.sandbox={}),f.prototype.getCallback=function(a){var b=this,c=!1;return function(){c||(c=!0,a.call(b))}},f.prototype.registerCallback=function(a){var b="cb"+d++;return window.twttr.sandbox[b]=a,b},f.prototype.onLoad=function(){try{this.sandbox.frame.contentWindow.document}catch(a){this.setDocDomain();return}this.sandbox.win=this.sandbox.frame.contentWindow,this.sandbox.doc=this.sandbox.frame.contentWindow.document,this.writeStandardsDoc(),this.sandbox.body=this.sandbox.frame.contentWindow.document.body,this.onReady(this.sandbox)},f.prototype.setDocDomain=function(){var a,b=this.registerCallback(this.getCallback(this.onLoad));a=["javascript:",'document.write("");',"try { window.parent.document; }","catch (e) {",'document.domain="'+document.domain+'";',"}",'window.parent.twttr.sandbox["'+b+'"]();'].join(""),this.sandbox.frame.parentNode.removeChild(this.sandbox.frame),this.sandbox.frame=null,this.sandbox.frame=e(this.attrs,this.styles),this.sandbox.frame.src=a,this.appender?this.appender(this.sandbox.frame):document.body.appendChild(this.sandbox.frame)},f.prototype.writeStandardsDoc=function(){if(!c.anyIE()||c.cspEnabledIE())return;var a=["<!DOCTYPE html>","<html>","<head>","<scr","ipt>","try { window.parent.document; }",'catch (e) {document.domain="'+document.domain+'";}',"</scr","ipt>","</head>","<body></body>","</html>"].join("");this.sandbox.doc.write(a),this.sandbox.doc.close()},a(g)})});
provide("tfw/util/tracking",function(a){using("dom/cookie","dom/sandbox","util/donottrack","tfw/util/guest_cookie","tfw/util/env","util/util","$xd/json2.js",function(b,c,d,e,f,g,h){function u(){function a(a){s=a.frame,r=a.doc,q=a.doc.body,m=F(),n=G();while(o[0])z.apply(this,o.shift());p&&A()}s=document.getElementById("rufous-sandbox"),s?(r=s.contentWindow.document,q=r.body):c(a,{id:"rufous-sandbox"},{display:"none"})}function v(a,b,c,d){var e=!g.isObject(a),f=b?!g.isObject(b):!1,h,i;if(e||f)return;if(/Firefox/.test(navigator.userAgent))return;h=C(a),i=D(b,!!c,!!d),y(h,i,!0)}function w(a,c,h,i){var k=j[c],l,m,n=e.guest_id_cookie;if(!k)return;a=a||{},i=!!i,h=!!h,m=a.original_redirect_referrer||document.referrer,i=i||d(m),l=g.aug({},a),h||(x(l,"referrer",m),x(l,"widget",+f.isDynamicWidget()),x(l,"hask",+!!b("k")),x(l,"li",+!!b("twid")),x(l,n,b(n)||"")),i&&(x(l,"dnt",1),I(l)),H(k+"?"+E(l))}function x(a,b,c){var d=i+b;if(!a)return;return a[d]=c,a}function y(a,b,c){var d,e,f,h,i,j="https://r.twimg.com/jot?";if(!g.isObject(a)||!g.isObject(b))return;if(Math.random()>t)return;f=g.aug({},b,{event_namespace:a}),c?(j+=E({l:J(f)}),H(j)):(d=m.firstChild,d.value=+d.value||+f.dnt,h=J(f),e=r.createElement("input"),e.type="hidden",e.name="l",e.value=h,m.appendChild(e))}function z(a,b,c,d){var e=!g.isObject(a),f=b?!g.isObject(b):!1,h,i;if(e||f)return;if(!q||!m){o.push([a,b,c,d]);return}h=C(a),i=D(b,!!c,!!d),y(h,i)}function A(){if(!m){p=!0;return}if(m.children.length<=1)return;q.appendChild(m),q.appendChild(n),m.submit(),window.setTimeout(B(m,n),6e4),m=F(),n=G()}function B(a,b){return function(){var c=a.parentNode;c.removeChild(a),c.removeChild(b)}}function C(a){var b={client:"tfw"},c,d;return c=g.aug(b,a||{}),c}function D(a,b,c){var e={_category_:"tfw_client_event"},f,h,i;return b=!!b,c=!!c,f=g.aug(e,a||{}),h=f.widget_origin||document.referrer,f.format_version=1,f.dnt=c=c||d(h),f.triggered_on=f.triggered_on||+(new Date),b||(f.widget_origin=h),c&&I(f),f}function E(a){var b=[],c,d,e;for(c in a)a.hasOwnProperty(c)&&(d=encodeURIComponent(c),e=encodeURIComponent(a[c]),e=e.replace(/'/g,"%27"),b.push(d+"="+e));return b.join("&")}function F(){var a=r.createElement("form"),b=r.createElement("input");return l++,a.action="https://r.twimg.com/jot",a.method="POST",a.target="rufous-frame-"+l,a.id="rufous-form-"+l,b.type="hidden",b.name="dnt",b.value=0,a.appendChild(b),a}function G(){var a,b="rufous-frame-"+l,c=0;try{a=r.createElement("<iframe name="+b+">")}catch(d){a=r.createElement("iframe"),a.name=b}return a.id=b,a.style.display="none",a.width=0,a.height=0,a.border=0,a}function H(a){var b=document.createElement("img");b.src=a,b.alt="",b.style.position="absolute",b.style.height="1px",b.style.width="1px",b.style.top="-9999px",b.style.left="-9999px",document.body.appendChild(b)}function I(a){var b;for(b in a)~g.indexOf(k,b)&&delete a[b]}function J(a){var b=Array.prototype.toJSON,c;return delete Array.prototype.toJSON,c=JSON.stringify(a),b&&(Array.prototype.toJSON=b),c}var i="twttr_",j={tweetbutton:"//p.twitter.com/t.gif",followbutton:"//p.twitter.com/f.gif",tweetembed:"//p.twitter.com/e.gif"},k=["hask","li","logged_in","pid","user_id",e.guest_id_cookie,i+"hask",i+"li",i+e.guest_id_cookie],l=0,m,n,o=[],p,q,r,s,t=1;e.forceNewCookie(),a({enqueue:z,flush:A,initPostLogging:u,addPixel:v,addLegacyPixel:w,addVar:x})})});
provide("util/logger",function(a){function c(a){window[b]&&window[b].log&&window[b].log(a)}function d(a){window[b]&&window[b].warn&&window[b].warn(a)}function e(a){window[b]&&window[b].error&&window[b].error(a)}var b=["con","sole"].join("");a({info:c,warn:d,error:e})});
provide("tfw/util/data",function(a){using("util/logger","util/util","util/querystring",function(b,c,d){function l(a,b){return a=={}.toString.call(b).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function m(a){return function(c){c.error?a.error&&a.error(c):c.headers&&c.headers.status!=200?(a.error&&a.error(c),b.warn(c.headers.message)):a.success&&a.success(c),a.complete&&a.complete(c),n(a)}}function n(a){var b=a.script;b&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),a.script=undefined,b=undefined),a.callbackName&&twttr.tfw.callbacks[a.callbackName]&&delete twttr.tfw.callbacks[a.callbackName]}function o(a){var b={};return a.success&&l("function",a.success)&&(b.success=a.success),a.error&&l("function",a.error)&&(b.error=a.error),a.complete&&l("function",a.complete)&&(b.complete=a.complete),b}function p(a,b,c){var d=a.length,e=[],f={},g=0;return function(e){var h,i=[],j=[],k=[],l,m;h=c(e),f[h]=e;if(++g===d){for(l=0;l<d;l++)m=f[a[l]],i.push(m),m.error?k.push(m):j.push(m);b.error&&k.length>0&&b.error(k),b.success&&j.length>0&&b.success(j),b.complete&&b.complete(i)}}}twttr=twttr||{},twttr.tfw=twttr.tfw||{},twttr.tfw.callbacks=twttr.tfw.callbacks||{};var e="twttr.tfw.callbacks",f=twttr.tfw.callbacks,g="cb",h=0,i=!1,j={},k={userLookup:"//api.twitter.com/1/users/lookup.json",userShow:"//cdn.api.twitter.com/1/users/show.json",status:"//cdn.api.twitter.com/1/statuses/show.json",tweets:"//syndication.twimg.com/tweets.json",count:"//cdn.api.twitter.com/1/urls/count.json",friendship:"//cdn.api.twitter.com/1/friendships/exists.json",timeline:"//cdn.syndication.twimg.com/widgets/timelines/",timelinePoll:"//syndication.twimg.com/widgets/timelines/paged/",timelinePreview:"//syndication.twimg.com/widgets/timelines/preview/"};twttr.widgets&&twttr.widgets.endpoints&&c.aug(k,twttr.widgets.endpoints),j.jsonp=function(a,b,c){var j=c||g+h,k=e+"."+j,l=document.createElement("script"),n={callback:k,suppress_response_codes:!0};f[j]=m(b);if(i||!/^https?\:$/.test(window.location.protocol))a=a.replace(/^\/\//,"https://");l.src=d.url(a,n),l.async="async",document.body.appendChild(l),b.script=l,b.callbackName=j,c||h++},j.config=function(a){if(a.forceSSL===!0||a.forceSSL===!1)i=a.forceSSL},j.user=function(){var a,b={},c,e,f;arguments.length===1?(a=arguments[0].screenName,b=o(arguments[0])):(a=arguments[0],b.success=arguments[1]),c=l("array",a)?k.userLookup:k.userShow,a=l("array",a)?a.join(","):a,e={screen_name:a},f=d.url(c,e),this.jsonp(f,b)},j.userById=function(a){var b,c={},e,f,g;arguments.length===1?(b=arguments[0].ids,c=o(arguments[0])):(b=arguments[0],c.success=arguments[1]),e=l("array",b)?k.userLookup:k.userShow,b=l("array",b)?b.join(","):b,f={user_id:b},g=d.url(e,f),this.jsonp(g,c)},j.status=function(){var a,b={},c,e,f,g;arguments.length===1?(a=arguments[0].id,b=o(arguments[0])):(a=arguments[0],b.success=arguments[1]);if(!l("array",a))c={id:a,include_entities:!0},e=d.url(k.status,c),this.jsonp(e,b);else{f=p(a,b,function(a){return a.error?a.request.split("id=")[1].split("&")[0]:a.id_str});for(g=0;g<a.length;g++)c={id:a[g],include_entities:!0},e=d.url(k.status,c),this.jsonp(e,{success:f,error:f})}},j.tweets=function(a){var b=arguments[0],c=o(b),e={ids:a.ids.join(","),lang:a.lang},f=d.url(k.tweets,e);this.jsonp(f,c)},j.count=function(){var a="",b,c,e={};arguments.length===1?(a=arguments[0].url,e=o(arguments[0])):arguments.length===2&&(a=arguments[0],e.success=arguments[1]),c={url:a},b=d.url(k.count,c),this.jsonp(b,e)},j.friendshipExists=function(a){var b=arguments[0],c=o(arguments[0]),e={screen_name_a:a.screenNameA,screen_name_b:a.screenNameB},f=d.url(k.friendship,e);this.jsonp(f,c)},j.timeline=function(a){var b=arguments[0],c=o(b),e,f=9e5,g=Math.floor(+(new Date)/f),h={lang:a.lang,t:g,domain:window.location.host};a.dnt&&(h.dnt=a.dnt),a.screenName&&(h.screen_name=a.screenName),a.userId&&(h.user_id=a.userId),a.withReplies&&(h.with_replies=a.withReplies),e=d.url(k.timeline+a.id,h),this.jsonp(e,c,"tl_"+a.id)},j.timelinePoll=function(a){var b=arguments[0],c=o(b),e={lang:a.lang,since_id:a.sinceId,max_id:a.maxId,domain:window.location.host},f;a.dnt&&(e.dnt=a.dnt),a.screenName&&(e.screen_name=a.screenName),a.userId&&(e.user_id=a.userId),a.withReplies&&(e.with_replies=a.withReplies),f=d.url(k.timelinePoll+a.id,e),this.jsonp(f,c,"tlPoll_"+a.id+"_"+(a.sinceId||a.maxId))},j.timelinePreview=function(a){var b=arguments[0],c=o(b),e=a.params,f=d.url(k.timelinePreview,e);this.jsonp(f,c)},a(j)})});
provide("anim/transition",function(a){function b(a,b){var c;return b=b||window,c=b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.msRequestAnimationFrame||b.oRequestAnimationFrame||function(c){b.setTimeout(function(){a(+(new Date))},1e3/60)},c(a)}function c(a,b){return Math.sin(Math.PI/2*b)*a}function d(a,c,d,e,f){function i(){var h=+(new Date),j=h-g,k=Math.min(j/d,1),l=e?e(c,k):c*k;a(l);if(k==1)return;b(i,f)}var g=+(new Date),h;b(i)}a({animate:d,requestAnimationFrame:b,easeOut:c})});
provide("util/datetime",function(a){using("util/util",function(b){function m(a){return a<10?"0"+a:a}function n(a){function e(a,c){return b&&b[a]&&(a=b[a]),a.replace(/%\{([\w_]+)\}/g,function(a,b){return c[b]!==undefined?c[b]:a})}var b=a&&a.phrases,c=a&&a.months||f,d=a&&a.formats||g;this.timeAgo=function(a){var b=n.parseDate(a),f=+(new Date),g=f-b,m;return b?isNaN(g)||g<h*2?e("now"):g<i?(m=Math.floor(g/h),e(d.abbr,{number:m,symbol:e(l,{abbr:e("s"),expanded:m>1?e("seconds"):e("second")})})):g<j?(m=Math.floor(g/i),e(d.abbr,{number:m,symbol:e(l,{abbr:e("m"),expanded:m>1?e("minutes"):e("minute")})})):g<k?(m=Math.floor(g/j),e(d.abbr,{number:m,symbol:e(l,{abbr:e("h"),expanded:m>1?e("hours"):e("hour")})})):g<k*365?e(d.shortdate,{day:b.getDate(),month:e(c[b.getMonth()])}):e(d.longdate,{day:b.getDate(),month:e(c[b.getMonth()]),year:b.getFullYear().toString().slice(2)}):""},this.localTimeStamp=function(a){var b=n.parseDate(a),f=b&&b.getHours();return b?e(d.full,{day:b.getDate(),month:e(c[b.getMonth()]),year:b.getFullYear(),hours24:m(f),hours12:f<13?f?f:"12":f-12,minutes:m(b.getMinutes()),seconds:m(b.getSeconds()),amPm:f<12?e("AM"):e("PM")}):""}}var c=/(\d{4})-?(\d{2})-?(\d{2})T(\d{2}):?(\d{2}):?(\d{2})(Z|[\+\-]\d{2}:?\d{2})/,d=/[a-z]{3,4} ([a-z]{3}) (\d{1,2}) (\d{1,2}):(\d{2}):(\d{2}) ([\+\-]\d{2}:?\d{2}) (\d{4})/i,e=/^\d+$/,f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],g={abbr:"%{number}%{symbol}",shortdate:"%{day} %{month}",longdate:"%{day} %{month} %{year}",full:"%{hours12}:%{minutes} %{amPm} - %{day} %{month} %{year}"},h=1e3,i=h*60,j=i*60,k=j*24,l='<abbr title="%{expanded}">%{abbr}</abbr>';n.parseDate=function(a){var g=a||"",h=g.toString(),i,j;return i=function(){var a;if(e.test(h))return parseInt(h,10);if(a=h.match(d))return Date.UTC(a[7],b.indexOf(f,a[1]),a[2],a[3],a[4],a[5]);if(a=h.match(c))return Date.UTC(a[1],a[2]-1,a[3],a[4],a[5],a[6])}(),i?(j=new Date(i),!isNaN(j.getTime())&&j):!1},a(n)})});
provide("tfw/util/assets",function(a){using("util/env",function(b){function d(a,d){var e=c[a],f;return b.retina()?f="2x":b.ie6()||b.ie7()?f="gif":f="default",d&&(f+=".rtl"),e[f]}var c={"embed/timeline.css":{"default":"embed/timeline.1b09d496be70f7c1dd907837cdcb3e87.default.css","2x":"embed/timeline.1b09d496be70f7c1dd907837cdcb3e87.2x.css",gif:"embed/timeline.1b09d496be70f7c1dd907837cdcb3e87.gif.css","default.rtl":"embed/timeline.1b09d496be70f7c1dd907837cdcb3e87.default.rtl.css","2x.rtl":"embed/timeline.1b09d496be70f7c1dd907837cdcb3e87.2x.rtl.css","gif.rtl":"embed/timeline.1b09d496be70f7c1dd907837cdcb3e87.gif.rtl.css"}};a(d)})});
provide("tfw/widget/syndicatedbase",function(a){using("tfw/widget/base","tfw/widget/intent","tfw/util/assets","tfw/util/globals","dom/classname","dom/delegate","dom/sandbox","util/env","util/twitter","util/util",function(b,c,d,e,f,g,h,i,j,k){function s(){p=v.VALID_COLOR.test(e.val("widgets:link-color"))&&RegExp.$1,r=v.VALID_COLOR.test(e.val("widgets:border-color"))&&RegExp.$1,q=e.val("widgets:theme")}function t(a,b,c){var d;c=c||document;if(c.getElementById(a))return;d=c.createElement("link"),d.id=a,d.rel="stylesheet",d.type="text/css",d.href=twttr.widgets.config.assetUrl()+"/"+b,c.getElementsByTagName("head")[0].appendChild(d)}function u(a){t("twitter-widget-css",d("embed/timeline.css"),a)}function v(a){if(!a)return;var c,d,e=this;this.sandboxReadyCallbacks=[],b.apply(this,[a]),c=this.params(),this.targetEl=this.srcEl&&this.srcEl.parentNode||c.targetEl||document.body,this.containerWidth=this.targetEl&&this.targetEl.offsetWidth,d=c.width||this.attr("width")||this.containerWidth||this.dimensions.DEFAULT_WIDTH,this.height=v.VALID_UNIT.test(c.height||this.attr("height"))&&RegExp.$1,this.width=Math.max(this.dimensions.MIN_WIDTH,Math.min(v.VALID_UNIT.test(d)?RegExp.$1:this.dimensions.DEFAULT_WIDTH,this.dimensions.DEFAULT_WIDTH)),this.narrow=c.narrow||this.width<=this.dimensions.NARROW_WIDTH,this.narrow&&this.classAttr.push("var-narrow"),v.VALID_COLOR.test(c.linkColor||this.dataAttr("link-color"))?this.linkColor=RegExp.$1:this.linkColor=p,v.VALID_COLOR.test(c.borderColor||this.dataAttr("border-color"))?this.borderColor=RegExp.$1:this.borderColor=r,this.theme=c.theme||this.attr("data-theme")||q,this.theme=/(dark|light)/.test(this.theme)?this.theme:"",this.classAttr.push(i.touch()?"is-touch":"not-touch"),h(function(a){e.sandboxReady=!0,e.setupSandbox.call(e,a)},{"class":this.renderedClassNames,id:this.id},{width:"1px",height:"1px",border:"none",position:"absolute"},function(a){e.srcEl?e.targetEl.insertBefore(a,e.srcEl):e.targetEl.appendChild(a)})}var l=[".customisable",".customisable:link",".customisable:visited",".customisable:hover",".customisable:active",".customisable-highlight:hover","a:hover .customisable-highlight","a:focus .customisable-highlight"],m=["a:hover .ic-mask","a:focus .ic-mask"],n=[".customisable-border"],o=[".timeline-header h1.summary",".timeline-header h1.summary a:link",".timeline-header h1.summary a:visited"],p,q,r;v.prototype=new b,k.aug(v.prototype,{setupSandbox:function(a){var b=a.doc,c=b.createElement("base"),d=b.createElement("style"),f=b.getElementsByTagName("head")[0],g="body{display:none}",h=this,i;this.sandbox=a,a.frame.title=this.a11yTitle,u(a.doc),c.target="_blank",f.appendChild(c),e.val("widgets:csp")!="on"&&(d.type="text/css",d.styleSheet?d.styleSheet.cssText=g:d.appendChild(b.createTextNode(g)),f.appendChild(d)),this.handleResize&&window.addEventListener?window.addEventListener("resize",function(){h.handleResize()},!0):document.body.attachEvent("onresize",function(){h.handleResize()}),a.win.onresize=function(a){h.handleResize&&h.handleResize()},this.frameIsReady=!0;for(;i=this.sandboxReadyCallbacks.shift();)i.fn.apply(i.context,i.args)},callsWhenSandboxReady:function(a){var b=this;return function(){var c=[],d=arguments.length,e=0;for(;e<d;e++)c.push(arguments[e]);b.callIfSandboxReady(a,b,c)}},callIfSandboxReady:function(a,b,c){c=c||[],b.frameIsReady?a.apply(b,[!1].concat(c)):b.sandboxReadyCallbacks.push({fn:a,context:b,args:[!0].concat(c)})},contentWidth:function(){var a=this.chromeless?0:this.narrow?this.dimensions.NARROW_MEDIA_PADDING:this.dimensions.WIDE_MEDIA_PADDING;return this.width-a},addSiteStyles:function(){var a=this,b=this.sandbox.doc,c=this.id+"-styles",d,f=0,g=function(b){return(a.theme=="dark"?".thm-dark ":"")+b},h="",i="",j="",p="";if(e.val("widgets:csp")=="on")return;if(b.getElementById(c))return;this.headingStyle&&(j=k.map(o,g).join(",")+"{"+this.headingStyle+"}"),this.linkColor&&(h=k.map(l,g).join(",")+"{color:"+this.linkColor+"}",i=k.map(m,g).join(",")+"{background-color:"+this.linkColor+"}"),this.borderColor&&(p=k.map(n,g).concat(this.theme=="dark"?[".thm-dark.customisable-border"]:[]).join(",")+"{border-color:"+this.borderColor+"}");if(!h&&!i&&!j)return;d=b.createElement("style"),d.id=c,d.type="text/css",d.styleSheet?d.styleSheet.cssText=h+i+j+p:(d.appendChild(b.createTextNode(h)),d.appendChild(b.createTextNode(i)),d.appendChild(b.createTextNode(j)),d.appendChild(b.createTextNode(p))),b.getElementsByTagName("head")[0].appendChild(d)},bindIntentHandlers:function(){var a=this,b=this.element;g.delegate(b,"click",".profile",function(b){var d;a.addUrlParams(this),d=j.intentForProfileURL(this.href);if(b.altKey||b.metaKey||b.shiftKey)return;d&&(c.open(d,a.sandbox.frame),g.preventDefault(b))}),g.delegate(b,"click",".web-intent",function(b){a.addUrlParams(this);if(b.altKey||b.metaKey||b.shiftKey)return;c.open(this.href,a.sandbox.frame),g.preventDefault(b)})}}),v.VALID_UNIT=/^([0-9]+)( ?px)?$/,v.VALID_COLOR=/^(#(?:[0-9a-f]{3}|[0-9a-f]{6}))$/i,v.retinize=function(a){if(!i.retina())return;var b=a.getElementsByTagName("IMG"),c,d,e=0,f=b.length;for(;e<f;e++)c=b[e],d=c.getAttribute("data-src-2x"),d&&(c.src=d)},v.scaleDimensions=function(a,b,c,d){return b>a&&b>d?(a*=d/b,b=d):a>c&&(b*=c/a,a=c,b>d&&(a*=d/b,b=d)),{width:Math.ceil(a),height:Math.ceil(b)}},v.constrainMedia=function(a,b){var c=a.getElementsByTagName("IMG"),d=a.getElementsByTagName("IFRAME"),e,f,g,h=0,i=0,j;for(;e=[c,d][i];i++)if(e.length)for(j=0;f=e[j];j++)g=v.scaleDimensions(f.getAttribute("width")||f.width,f.getAttribute("height")||f.height,b,375),g.width>0&&(f.width=g.width),g.height>0&&(f.height=g.height),h=g.height>h?g.height:h;return h},s(),a(v)})});
provide("tfw/widget/timeline",function(a){using("tfw/widget/syndicatedbase","util/datetime","anim/transition","tfw/util/data","tfw/util/tracking","tfw/util/params","util/css","util/env","util/iframe","util/insert","util/throttle","util/twitter","util/querystring","util/util","dom/delegate","dom/classname","dom/get",function(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){function K(a){if(!a)return;var c,d,e;this.a11yTitle=this._("Twitter Timeline Widget"),b.apply(this,[a]),c=this.params(),d=(c.chrome||this.dataAttr("chrome")||"").split(" "),this.preview=c.previewParams,this.widgetId=c.widgetId||this.dataAttr("widget-id"),this.widgetScreenName=c.screenName||this.dataAttr("screen-name"),this.widgetUserId=c.userId||this.dataAttr("user-id");if(c.showReplies===!0||this.dataAttr("show-replies")=="true")this.widgetShowReplies="true";d.length&&(e=~o.indexOf(d,"none"),this.chromeless=e||~o.indexOf(d,"transparent"),this.headerless=e||~o.indexOf(d,"noheader"),this.footerless=e||~o.indexOf(d,"nofooter"),this.borderless=e||~o.indexOf(d,"noborders")),this.headingStyle=h.sanitize(c.headingStyle||this.dataAttr("heading-style"),undefined,!0),this.classAttr.push("twitter-timeline-rendered"),this.ariaPolite=c.ariaPolite||this.dataAttr("aria-polite")}function L(a,c){var d=a.ownerDocument,e=r.one(C,a,"DIV"),f=e&&e.children[0],g=f&&f.getAttribute("data-expanded-media"),h,i=0,j=r.one(D,a,"A"),k=j&&j.getElementsByTagName("B")[0],l=k&&(k.innerText||k.textContent),m;if(!k)return;k.innerHTML=j.getAttribute("data-toggled-text"),j.setAttribute("data-toggled-text",l);if(q.present(a,B)){q.remove(a,B);if(!e)return;e.style.cssText="",f.innerHTML="";return}g&&(h=d.createElement("DIV"),h.innerHTML=g,b.retinize(h),i=b.constrainMedia(h,c),f.appendChild(h)),e&&(m=Math.max(f.offsetHeight,i),e.style.cssText="height:"+m+"px"),q.add(a,B)}var s="1.0",t={CLIENT_SIDE_USER:0,CLIENT_SIDE_APP:2},u="timeline",v="new-tweets-bar",w="timeline-header",x="timeline-footer",y="stream",z="h-feed",A="tweet",B="expanded",C="detail-expander",D="expand",E="permalink",F="twitter-follow-button",G="no-more-pane",H="pending-scroll-in",I="pending-new-tweet",J="show-new-tweet";K.prototype=new b,o.aug(K.prototype,{renderedClassNames:"twitter-timeline twitter-timeline-rendered",dimensions:{DEFAULT_HEIGHT:"600",DEFAULT_WIDTH:"520",NARROW_WIDTH:"320",MIN_WIDTH:"180",MIN_HEIGHT:"200",WIDE_MEDIA_PADDING:81,NARROW_MEDIA_PADDING:16},create:function(a){var c=this.sandbox.doc.createElement("div"),d,e=this,g,h,i,j=[],k,l;c.innerHTML=a.body,d=c.children[0]||!1;if(!d)return;this.reconfigure(a.config),this.augmentWidgets(d),b.retinize(d),b.constrainMedia(d,this.contentWidth()),this.searchQuery=d.getAttribute("data-search-query"),this.profileId=d.getAttribute("data-profile-id"),k=this.getTweetDetails(c);for(l in k)k.hasOwnProperty(l)&&j.push(l);return f.enqueue({page:"timeline",component:"timeline",element:"initial",action:j.length?"results":"no_results"},{widget_id:this.widgetId,widget_origin:document.location.href,item_ids:j,item_details:k,client_version:s,message:this.partner,query:this.searchQuery,profile_id:this.profileId},!0,this.dnt),f.flush(),this.ariaPolite=="assertive"&&(h=r.one(v,d,"DIV"),h.setAttribute("aria-polite","assertive")),d.id=this.id,d.className+=" "+this.classAttr.join(" "),d.lang=this.lang,twttr.widgets.load(d),i=function(){e.sandbox.body.appendChild(d),e.sandbox.win.setTimeout(function(){var a=r.one(w,d,"DIV"),b=r.one(x,d,"DIV"),c=r.one(y,d,"DIV");b?g=a.offsetHeight+b.offsetHeight:g=a.offsetHeight,c.style.cssText="height:"+(e.height-g-2)+"px"},500),e.sandbox.frame.style.cssText="",e.sandbox.frame.width=e.width,e.sandbox.frame.height=e.height,e.sandbox.frame.style.border="none",e.sandbox.frame.style.maxWidth="100%",e.sandbox.frame.style.minWidth=e.dimensions.MIN_WIDTH+"px"},this.callsWhenSandboxReady(i)(),this.srcEl&&this.srcEl.parentNode&&this.srcEl.parentNode.removeChild(this.srcEl),d},render:function(a,b){function h(){d.success=function(a){c.element=c.create(a),c.readTranslations(),c.bindInteractions(),b&&b(c.sandbox.frame);return},d.error=function(a){a&&a.headers&&b&&b(a.headers.status)},d.params=c.preview,e.timelinePreview(d);return}function i(){f.initPostLogging(),e.timeline({id:c.widgetId,screenName:c.widgetScreenName,userId:c.widgetUserId,withReplies:c.widgetShowReplies,dnt:c.dnt,lang:c.lang,success:function(a){c.element=c.create(a),c.readTranslations(),c.bindInteractions(),a.headers.xPolling&&/\d/.test(a.headers.xPolling)&&(c.pollInterval=a.headers.xPolling*1e3),c.updateTimeStamps(),c.schedulePolling(),b&&b(c.sandbox.frame);return},error:function(a){a&&a.headers&&b&&b(a.headers.status)}})}var c=this,d={},g;if(!this.preview&&!this.widgetId){b&&b(400);return}g=this.preview?h:i,this.sandboxReady?g():window.setTimeout(g,0)},reconfigure:function(a){this.lang=a.lang,this.theme||(this.theme=a.theme),this.theme=="dark"&&this.classAttr.push("thm-dark"),this.chromeless&&this.classAttr.push("var-chromeless"),this.borderless&&this.classAttr.push("var-borderless"),this.headerless&&this.classAttr.push("var-headerless"),this.footerless&&this.classAttr.push("var-footerless"),!this.linkColor&&a.linkColor&&b.VALID_COLOR.test(a.linkColor)&&(this.linkColor=RegExp.$1),this.addSiteStyles(),!this.height&&b.VALID_UNIT.test(a.height)&&(this.height=RegExp.$1),this.height=Math.max(this.dimensions.MIN_HEIGHT,this.height?this.height:this.dimensions.DEFAULT_HEIGHT),this.preview&&this.classAttr.push("var-preview"),this.narrow=this.width<=this.dimensions.NARROW_WIDTH,this.narrow&&this.classAttr.push("var-narrow")},getTweetDetails:function(a){var b=r.all(A,a,"LI"),c={},d,e,f,g,h={TWEET:0,RETWEET:10},i=0;for(;d=b[i];i++)e=r.one(E,d,"A"),f=m.status(e.href),g=d.getAttribute("data-tweet-id"),f===g?c[f]={item_type:h.TWEET}:c[f]={item_type:h.RETWEET,target_type:h.TWEET,target_id:g};return c},bindInteractions:function(){var a=this,b=this.element,c=!0;this.bindIntentHandlers(),p.delegate(b,"click","."+D,function(c){if(c.altKey||c.metaKey||c.shiftKey)return;L(r.ancestor("."+A,this,b),a.contentWidth()),p.stop(c)}),p.delegate(b,"click","A",function(a){p.stopPropagation(a)}),p.delegate(b,"click",".with-expansion",function(b){L(this,a.contentWidth()),p.stop(b)}),p.delegate(b,"click",".load-more",function(){a.loadMore()}),p.delegate(b,"click","."+v,function(){a.scrollToTop(),a.hideNewTweetNotifier(!0)}),p.delegate(b,"click",".load-tweets",function(b){c&&(c=!1,a.forceLoad(),p.stop(b))}),p.delegate(b,"click",".display-sensitive-image",function(c){a.showNSFW(r.ancestor("."+A,this,b)),p.stop(c)}),p.delegate(b,"mouseover","."+u,function(){a.mouseOver=!0}),p.delegate(b,"mouseout","."+u,function(){a.mouseOver=!1}),p.delegate(b,"mouseover","."+v,function(){a.mouseOverNotifier=!0}),p.delegate(b,"mouseout","."+v,function(){a.mouseOverNotifier=!1,window.setTimeout(function(){a.hideNewTweetNotifier()},3e3)})},scrollToTop:function(){var a=r.one(y,this.element,"DIV");a.scrollTop=0,a.focus()},update:function(){var a=this,b=r.one(A,this.element,"LI"),c=b&&b.getAttribute("data-tweet-id");this.updateTimeStamps(),this.requestTweets(c,!0,function(b){b.childNodes.length>0&&a.insertNewTweets(b)})},loadMore:function(){var a=this,b=r.all(A,this.element,"LI").pop(),c=b&&b.getAttribute("data-tweet-id");this.requestTweets(c,!1,function(b){var d=r.one(G,a.element,"P"),e=b.childNodes[0];d.style.cssText="",e&&e.getAttribute("data-tweet-id")==c&&b.removeChild(e);if(b.childNodes.length>0){a.appendTweets(b);return}q.add(a.element,"no-more"),d.focus()})},forceLoad:function(){var a=this,b=!!r.all(z,this.element,"OL").length;this.requestTweets(1,!0,function(c){c.childNodes.length&&(a[b?"insertNewTweets":"appendTweets"](c),q.add(a.element,"has-tweets"))})},schedulePolling:function(a){var b=this;if(this.pollInterval===null)return;a=twttr.widgets.poll||a||this.pollInterval||1e4,a>-1&&window.setTimeout(function(){this.isUpdating||b.update(),b.schedulePolling()},a)},requestTweets:function(a,c,d){var g=this,h={id:this.widgetId,screenName:this.widgetScreenName,userId:this.widgetUserId,withReplies:this.widgetShowReplies,dnt:this.dnt,lang:this.lang};h[c?"sinceId":"maxId"]=a,h.complete=function(){this.isUpdating=!1},h.error=function(a){if(a&&a.headers){if(a.headers.status=="404"){g.pollInterval=null;return}if(a.headers.status=="503"){g.pollInterval*=1.5;return}}},h.success=function(a){var e=g.sandbox.doc.createDocumentFragment(),h=g.sandbox.doc.createElement("div"),i=[],j,k;a&&a.headers&&a.headers.xPolling&&/\d+/.test(a.headers.xPolling)&&(g.pollInterval=a.headers.xPolling*1e3);if(a&&a.body!==undefined){h.innerHTML=a.body;if(h.children[0]&&h.children[0].tagName!="LI")return;j=g.getTweetDetails(h);for(k in j)j.hasOwnProperty(k)&&i.push(k);i.length&&(f.enqueue({page:"timeline",component:"timeline",element:c?"newer":"older",action:"results"},{widget_id:g.widgetId,widget_origin:document.location.href,item_ids:i,item_details:j,client_version:s,message:g.partner,query:g.searchQuery,profile_id:g.profileId,event_initiator:c?t.CLIENT_SIDE_APP:t.CLIENT_SIDE_USER},!0,g.dnt),f.flush()),b.retinize(h),b.constrainMedia(h,g.contentWidth());while(h.children[0])e.appendChild(h.children[0]);d(e)}},e.timelinePoll(h)},insertNewTweets:function(a){var b=this,c=r.one(y,this.element,"DIV"),e=r.one(z,c,"OL"),f=e.offsetHeight,g;this.updateTimeStamps(),e.insertBefore(a,e.firstChild),g=e.offsetHeight-f;if(c.scrollTop>40||this.mouseIsOver()){c.scrollTop=c.scrollTop+g,this.showNewTweetNotifier();return}q.remove(this.element,H),e.style.cssText="margin-top: -"+g+"px",window.setTimeout(function(){c.scrollTop=0,q.add(b.element,H),i.cssTransitions()?e.style.cssText="":d.animate(function(a){a<g?e.style.cssText="margin-top: -"+(g-a)+"px":e.style.cssText=""},g,500,d.easeOut)},500),this.gcTweets(50)},appendTweets:function(a){var b=r.one(y,this.element,"DIV"),c=r.one(z,b,"OL");this.updateTimeStamps(),c.appendChild(a)},gcTweets:function(a){var b=r.one(z,this.element,"OL"),c=b.children.length,d;a=a||50;for(;c>a&&(d=b.children[c-1]);c--)b.removeChild(d)},showNewTweetNotifier:function(){var a=this,b=r.one(v,this.element,"DIV"),c=b.children[0];b.style.cssText="",q.add(this.element,I),b.removeChild(c),b.appendChild(c),q.replace(this.element,I,J),this.newNoticeDisplayTime=+(new Date),window.setTimeout(function(){a.hideNewTweetNotifier()},5e3)},hideNewTweetNotifier:function(a){var b=this;if(!a&&this.mouseOverNotifier)return;q.replace(this.element,J,I),window.setTimeout(function(){q.remove(b.element,I)},500)},augmentWidgets:function(a){var b=r.all(F,a,"A"),c=0,d;for(;d=b[c];c++)d.setAttribute("data-related",this.related),d.setAttribute("data-partner",this.partner),d.setAttribute("data-dnt",this.dnt),d.setAttribute("data-search-query",this.searchQuery),d.setAttribute("data-profile-id",this.profileId),this.width<250&&d.setAttribute("data-show-screen-name","false")},readTranslations:function(){var a=this.element,b="data-dt-";this.datetime=new c(o.compact({phrases:{now:a.getAttribute(b+"now"),s:a.getAttribute(b+"s"),m:a.getAttribute(b+"m"),h:a.getAttribute(b+"h"),second:a.getAttribute(b+"second"),seconds:a.getAttribute(b+"seconds"),minute:a.getAttribute(b+"minute"),minutes:a.getAttribute(b+"minutes"),hour:a.getAttribute(b+"hour"),hours:a.getAttribute(b+"hours")},months:a.getAttribute(b+"months").split("|"),formats:{abbr:a.getAttribute(b+"abbr"),shortdate:a.getAttribute(b+"short"),longdate:a.getAttribute(b+"long")}}))},updateTimeStamps:function(){var a=r.all(E,this.element,"A"),b,c,d=0,e,f;for(;b=a[d];d++){e=b.getAttribute("data-datetime"),f=e&&this.datetime.timeAgo(e,this.i18n),c=b.getElementsByTagName("TIME")[0];if(!f)continue;if(c&&c.innerHTML){c.innerHTML=f;continue}b.innerHTML=f}},mouseIsOver:function(){return this.mouseOver},addUrlParams:function(a){var b=this,c={tw_w:this.widgetId,related:this.related,partner:this.partner,query:this.searchQuery,profile_id:this.profileId,tw_p:"embeddedtimeline"};return this.addUrlParams=g(c,function(a){var c=r.ancestor("."+A,a,b.element);return c&&{tw_i:c.getAttribute("data-tweet-id")}}),this.addUrlParams(a)},showNSFW:function(a){var c=r.one("nsfw",a,"DIV"),d,e,f=0,g,h,j,k;if(!c)return;e=b.scaleDimensions(c.getAttribute("data-width"),c.getAttribute("data-height"),this.contentWidth(),c.getAttribute("data-height")),d=!!(h=c.getAttribute("data-player")),d?j=this.sandbox.doc.createElement("iframe"):(j=this.sandbox.doc.createElement("img"),h=c.getAttribute(i.retina()?"data-image-2x":"data-image"),j.alt=c.getAttribute("data-alt"),k=this.sandbox.doc.createElement("a"),k.href=c.getAttribute("data-href"),k.appendChild(j)),j.title=c.getAttribute("data-title"),j.src=h,j.width=e.width,j.height=e.height,g=r.ancestor("."+C,c,a),f=e.height-c.offsetHeight,c.parentNode.replaceChild(d?j:k,c),g.style.cssText="height:"+(g.offsetHeight+f)+"px"},handleResize:function(){this.handleResize=l(function(){var a=Math.min(this.dimensions.DEFAULT_WIDTH,Math.max(this.dimensions.MIN_WIDTH,this.sandbox.frame.offsetWidth));if(!this.element)return;a<this.dimensions.NARROW_WIDTH?(this.narrow=!0,q.add(this.element,"var-narrow")):(this.narrow=!1,q.remove(this.element,"var-narrow"))},50,this),this.handleResize()}}),a(K)})});
provide("tfw/widget/embed",function(a){using("tfw/widget/base","tfw/widget/syndicatedbase","util/datetime","tfw/util/params","dom/classname","dom/get","util/env","util/util","util/throttle","util/twitter","tfw/util/data","tfw/util/tracking",function(b,c,d,e,f,g,h,i,j,k,l,m){function q(a,b,c){var d=g.one("subject",a,"BLOCKQUOTE"),e=g.one("reply",a,"BLOCKQUOTE"),f=d&&d.getAttribute("data-tweet-id"),h=e&&e.getAttribute("data-tweet-id"),i={},j={};if(!f)return;i[f]={item_type:0},m.enqueue({page:"tweet",section:"subject",component:"tweet",action:"results"},{client_version:n,widget_origin:document.location.href,message:b,item_ids:[f],item_details:i},!0,c);if(!h)return;j[h]={item_type:0},m.enqueue({page:"tweet",section:"conversation",component:"tweet",action:"results"},{client_version:n,widget_origin:document.location.href,message:b,item_ids:[h],item_details:j,associations:{4:{association_id:f,association_type:4}}},!0,c)}function r(a,b,c){var d={};if(!a)return;d[a]={item_type:0},m.enqueue({page:"tweet",section:"subject",component:"rawembedcode",action:"no_results"},{client_version:n,widget_origin:document.location.href,message:b,item_ids:[a],item_details:d},!0,c)}function s(a,b,c,d,e){p[a]=p[a]||[],p[a].push({s:c,f:d,r:e,lang:b})}function t(a){if(!a)return;var b,d,e;this.a11yTitle=this._("Embedded Tweet"),c.apply(this,[a]),b=this.params(),d=this.srcEl&&this.srcEl.getElementsByTagName("A"),e=d&&d[d.length-1],this.hideThread=(b.conversation||this.dataAttr("conversation"))=="none"||~i.indexOf(this.classAttr,"tw-hide-thread"),this.hideCard=(b.cards||this.dataAttr("cards"))=="hidden"||~i.indexOf(this.classAttr,"tw-hide-media");if((b.align||this.attr("align"))=="left"||~i.indexOf(this.classAttr,"tw-align-left"))this.align="left";else if((b.align||this.attr("align"))=="right"||~i.indexOf(this.classAttr,"tw-align-right"))this.align="right";else if((b.align||this.attr("align"))=="center"||~i.indexOf(this.classAttr,"tw-align-center"))this.align="center",this.containerWidth>this.dimensions.MIN_WIDTH*(1/.7)&&this.width>this.containerWidth*.7&&(this.width=this.containerWidth*.7);this.narrow=b.narrow||this.width<=this.dimensions.NARROW_WIDTH,this.narrow&&this.classAttr.push("var-narrow"),this.tweetId=b.tweetId||e&&k.status(e.href)}var n="2.0",o="tweetembed",p={};t.prototype=new c,i.aug(t.prototype,{renderedClassNames:"twitter-tweet twitter-tweet-rendered",dimensions:{DEFAULT_HEIGHT:"0",DEFAULT_WIDTH:"500",NARROW_WIDTH:"350",MIN_WIDTH:"220",MIN_HEIGHT:"0",WIDE_MEDIA_PADDING:32,NARROW_MEDIA_PADDING:32},create:function(a){var b=this.sandbox.doc.createElement("div"),d,e=this.sandbox.frame,f=e.style;b.innerHTML=a,d=b.children[0]||!1;if(!d)return;return this.theme=="dark"&&this.classAttr.push("thm-dark"),this.linkColor&&this.addSiteStyles(),this.augmentWidgets(d),c.retinize(d),c.constrainMedia(d,this.contentWidth()),d.id=this.id,d.className+=" "+this.classAttr.join(" "),d.lang=this.lang,twttr.widgets.load(d),this.sandbox.body.appendChild(d),f.cssText="",e.width=this.width,e.height=0,f.display="block",f.border="none",f.maxWidth="99%",f.minWidth=this.dimensions.MIN_WIDTH+"px",f.padding="0",q(d,this.partner,this.dnt),d},render:function(a,b){var c=this,d="",e=this.tweetId,f,g,i;if(!e)return;this.hideCard&&(d+="c"),this.hideThread&&(d+="t"),d&&(e+="-"+d),i=this.callsWhenSandboxReady(function(a){function d(){var a=c.sandbox.frame,b=a.style;c.srcEl&&c.srcEl.parentNode&&c.srcEl.parentNode.removeChild(c.srcEl),b.borderRadius="5px",b.margin="10px 0",b.border="#ddd 1px solid",b.borderTopColor="#eee",b.borderBottomColor="#bbb",b.boxShadow="0 1px 3px rgba(0,0,0,0.15)",c.align=="center"?(b.margin="7px auto",b.float="none"):c.align&&(c.width==c.dimensions.DEFAULT_WIDTH&&(a.width=c.dimensions.NARROW_WIDTH),b.float=c.align),c.handleResize()}var b;if((!window.getComputedStyle||c.sandbox.win.getComputedStyle(c.sandbox.body,null).display!=="none")&&(h.ie6()||c.sandbox.frame.offsetHeight)&&c.element.offsetHeight)return d();b=window.setInterval(function(){(!window.getComputedStyle||c.sandbox.win.getComputedStyle(c.sandbox.body,null).display!=="none")&&(h.ie6()||c.sandbox.frame.offsetHeight)&&c.element.offsetHeight&&(window.clearInterval(b),d())},100)}),f=this.callsWhenSandboxReady(function(a,d){c.element=c.create(d),c.readTimestampTranslations(),c.updateTimeStamps(),c.bindIntentHandlers(),b&&b(c.sandbox.frame)}),g=this.callsWhenSandboxReady(function(a){r(c.tweetId,c.partner,c.dnt)}),s(e,this.lang,f,g,i)},augmentWidgets:function(a){var b=g.all("twitter-follow-button",a,"A"),c,d=0;for(;c=b[d];d++)c.setAttribute("data-related",this.related),c.setAttribute("data-partner",this.partner),c.setAttribute("data-dnt",this.dnt),c.setAttribute("data-show-screen-name","false")},addUrlParams:function(a){var b=this,c={related:this.related,partner:this.partner,tw_p:o};return this.addUrlParams=e(c,function(a){var c=g.ancestor(".tweet",a,b.element);return{tw_i:c.getAttribute("data-tweet-id")}}),this.addUrlParams(a)},handleResize:function(){this.handleResize=j(function(){var a=this,b=Math.min(this.dimensions.DEFAULT_WIDTH,Math.max(this.dimensions.MIN_WIDTH,this.sandbox.frame.offsetWidth));if(!this.element)return;b<this.dimensions.NARROW_WIDTH?(this.narrow=!0,f.add(this.element,"var-narrow")):(this.narrow=!1,f.remove(this.element,"var-narrow")),window.setTimeout(function(){a.sandbox.frame.height=a.height=a.element.offsetHeight},0)},50,this),this.handleResize()},readTimestampTranslations:function(){var a=this.element,b="data-dt-",c=a.getAttribute(b+"months")||"";this.datetime=new d(i.compact({phrases:{AM:a.getAttribute(b+"am"),PM:a.getAttribute(b+"pm")},months:c.split("|"),formats:{full:a.getAttribute(b+"full")}}))},updateTimeStamps:function(){var a=g.one("long-permalink",this.element,"A"),b=a.getAttribute("data-datetime"),c=b&&this.datetime.localTimeStamp(b),d=a.getElementsByTagName("TIME")[0];if(!c)return;if(d&&d.innerHTML){d.innerHTML=c;return}a.innerHTML=c}}),t.fetchAndRender=function(){var a=p,b=[],c,d;p={};if(a.keys)b=a.keys();else for(c in a)a.hasOwnProperty(c)&&b.push(c);if(!b.length)return;m.initPostLogging(),d=a[b[0]][0].lang,l.tweets({ids:b.sort(),lang:d,complete:function(b){var c,d,e,f,g,h,i=[];for(c in b)if(b.hasOwnProperty(c)){g=a[c]&&a[c];for(e=0;g.length&&(f=g[e]);e++)f.s&&(f.s.call(this,b[c]),f.r&&i.push(f.r));delete a[c]}for(e=0;h=i[e];e++)h.call(this);for(d in a)if(a.hasOwnProperty(d)){g=a[d];for(e=0;g.length&&(f=g[e]);e++)f.f&&f.f.call(this,b[c])}m.flush()}})},b.afterLoad(t.fetchAndRender),a(t)})});
provide("dom/textsize",function(a){function c(a,b,c){var d=[],e=0,f;for(;f=c[e];e++)d.push(f[0]),d.push(f[1]);return a+b+d.join(":")}function d(a){var b=a||"";return b.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var b={};a(function(a,e,f){var g=document.createElement("span"),h={},i="",j,k=0,l=0,m=[];f=f||[],e=e||"",i=c(a,e,f);if(b[i])return b[i];g.className=e+" twitter-measurement";try{for(;j=f[k];k++)g.style[j[0]]=j[1]}catch(n){for(;j=f[l];l++)m.push(d(j[0])+":"+j[1]);g.setAttribute("style",m.join(";")+";")}return g.innerHTML=a,document.body.appendChild(g),h.width=g.clientWidth||g.offsetWidth,h.height=g.clientHeight||g.offsetHeight,document.body.removeChild(g),delete g,b[i]=h})});
provide("tfw/widget/tweetbase",function(a){using("util/util","tfw/widget/base","util/querystring","util/twitter","util/uri",function(b,c,d,e,f){function i(a){if(!a)return;var b;c.apply(this,[a]),b=this.params(),this.text=b.text||this.dataAttr("text"),this.text&&/\+/.test(this.text)&&!/ /.test(this.text)&&(this.text=this.text.replace(/\+/g," ")),this.align=b.align||this.dataAttr("align")||"",this.via=b.via||this.dataAttr("via"),this.placeid=b.placeid||this.dataAttr("placeid"),this.hashtags=b.hashtags||this.dataAttr("hashtags"),this.screen_name=e.screenName(b.screen_name||b.screenName||this.dataAttr("button-screen-name")),this.url=b.url||this.dataAttr("url")}var g=document.title,h=encodeURI(location.href);i.prototype=new c,b.aug(i.prototype,{parameters:function(){var a={text:this.text,url:this.url,related:this.related,lang:this.lang,placeid:this.placeid,original_referer:location.href,id:this.id,screen_name:this.screen_name,hashtags:this.hashtags,dnt:this.dnt,_:+(new Date)};return b.compact(a),d.encode(a)}}),a(i)})});
provide("tfw/widget/tweetbutton",function(a){using("tfw/widget/tweetbase","util/util","util/querystring","util/uri","util/twitter","dom/textsize",function(b,c,d,e,f,g){var h=document.title,i=encodeURI(location.href),j=["vertical","horizontal","none"],k=function(a){b.apply(this,[a]);var d=this.params(),g=d.count||this.dataAttr("count"),k=d.size||this.dataAttr("size"),l=e.getScreenNameFromPage();if(d.type=="hashtag"||~c.indexOf(this.classAttr,"twitter-hashtag-button"))this.type="hashtag";else if(d.type=="mention"||~c.indexOf(this.classAttr,"twitter-mention-button"))this.type="mention";this.counturl=d.counturl||this.dataAttr("counturl"),this.searchlink=d.searchlink||this.dataAttr("searchlink"),this.button_hashtag=f.hashTag(d.button_hashtag||d.hashtag||this.dataAttr("button-hashtag"),!1),this.size=k=="large"?"l":"m",this.type?(this.count="none",l&&(this.related=this.related?l+","+this.related:l)):(this.text=this.text||h,this.url=this.url||e.getCanonicalURL()||i,this.count=~c.indexOf(j,g)?g:"horizontal",this.count=this.count=="vertical"&&this.size=="l"?"none":this.count,this.via=this.via||l)};k.prototype=new b,c.aug(k.prototype,{parameters:function(){var a={text:this.text,url:this.url,via:this.via,related:this.related,count:this.count,lang:this.lang,counturl:this.counturl,searchlink:this.searchlink,placeid:this.placeid,original_referer:location.href,id:this.id,size:this.size,type:this.type,screen_name:this.screen_name,button_hashtag:this.button_hashtag,hashtags:this.hashtags,align:this.align,dnt:this.dnt,_:+(new Date)};return c.compact(a),d.encode(a)},height:function(){return this.count=="vertical"?62:this.size=="m"?20:28},width:function(){var a={ver:8,cnt:14,btn:24,xlcnt:18,xlbtn:38},b=this.count=="vertical",d=this.type=="hashtag"&&this.button_hashtag?"Tweet %{hashtag}":this.type=="mention"&&this.screen_name?"Tweet to %{name}":"Tweet",e=this._(d,{name:"@"+this.screen_name,hashtag:"#"+this.button_hashtag}),f=this._("K"),h=this._("100K+"),i=(b?"8888":"88888")+f,j=0,k=0,l=0,m=0,n=this.styles.base,o=n;return~c.indexOf(["ja","ko"],this.lang)?i+=this._("10k unit"):i=i.length>h.length?i:h,b?(o=n.concat(this.styles.vbubble),m=a.ver,l=a.btn):this.size=="l"?(n=o=n.concat(this.styles.large),l=a.xlbtn,m=a.xlcnt):(l=a.btn,m=a.cnt),this.count!="none"&&(k=g(i,"",o).width+m),j=g(e,"",n.concat(this.styles.button)).width+l,b?j>k?j:k:this.calculatedWidth=j+k},render:function(a,b){var c=twttr.widgets.config.assetUrl()+"/widgets/tweet_button.1366154648.html#"+this.parameters();this.count&&this.classAttr.push("twitter-count-"+this.count),this.element=this.create(c,this.dimensions(),{title:this._("Twitter Tweet Button")}),b&&b(this.element)}}),a(k)})});
provide("tfw/widget/follow",function(a){using("util/util","tfw/widget/base","util/querystring","util/uri","util/twitter","dom/textsize",function(b,c,d,e,f,g){function h(a){if(!a)return;var b,d,e,g,h;c.apply(this,[a]),b=this.params(),d=b.size||this.dataAttr("size"),e=b.showScreenName||this.dataAttr("show-screen-name"),h=b.count||this.dataAttr("count"),this.classAttr.push("twitter-follow-button"),this.showScreenName=e!="false",this.showCount=b.showCount!==!1&&this.dataAttr("show-count")!="false",h=="none"&&(this.showCount=!1),this.explicitWidth=b.width||this.dataAttr("width")||"",this.screenName=b.screen_name||b.screenName||f.screenName(this.attr("href")),this.preview=b.preview||this.dataAttr("preview")||"",this.align=b.align||this.dataAttr("align")||"",this.size=d=="large"?"l":"m"}h.prototype=new c,b.aug(h.prototype,{parameters:function(){var a={screen_name:this.screenName,lang:this.lang,show_count:this.showCount,show_screen_name:this.showScreenName,align:this.align,id:this.id,preview:this.preview,size:this.size,dnt:this.dnt,_:+(new Date)};return b.compact(a),d.encode(a)},render:function(a,b){if(!this.screenName)return;var c=twttr.widgets.config.assetUrl()+"/widgets/follow_button.1366154648.html#"+this.parameters();this.element=this.create(c,this.dimensions(),{title:this._("Twitter Follow Button")}),b&&b(this.element)},width:function(){if(this.calculatedWidth)return this.calculatedWidth;if(this.explicitWidth)return this.explicitWidth;var a={cnt:13,btn:24,xlcnt:22,xlbtn:38},c=this.showScreenName?"Follow %{screen_name}":"Follow",d=this._(c,{screen_name:"@"+this.screenName}),e=~b.indexOf(["ja","ko"],this.lang)?this._("10k unit"):this._("M"),f=this._("%{followers_count} followers",{followers_count:"88888"+e}),h=0,i=0,j,k,l=this.styles.base;return this.size=="l"?(l=l.concat(this.styles.large),j=a.xlbtn,k=a.xlcnt):(j=a.btn,k=a.cnt),this.showCount&&(i=g(f,"",l).width+k),h=g(d,"",l.concat(this.styles.button)).width+j,this.calculatedWidth=h+i}}),a(h)})});
!function(){function a(a){return(a||!/^http\:$/.test(window.location.protocol))&&!twttr.ignoreSSL?"https":"http"}window.twttr=window.twttr||{},twttr.host=twttr.host||"platform.twitter.com";if(twttr.widgets&&twttr.widgets.loaded)return twttr.widgets.load(),!1;if(twttr.init)return!1;twttr.init=!0,twttr._e=twttr._e||[],twttr.ready=twttr.ready||function(a){twttr.widgets&&twttr.widgets.loaded?a(twttr):twttr._e.push(a)},using.path.length||(using.path=a()+"://"+twttr.host+"/js"),twttr.ignoreSSL=twttr.ignoreSSL||!1;var b=[];twttr.events={bind:function(a,c){return b.push([a,c])}},using("util/domready",function(c){c(function(){using("tfw/widget/base","tfw/widget/follow","tfw/widget/tweetbutton","tfw/widget/embed","tfw/widget/timeline","tfw/widget/intent","tfw/util/globals","util/events","util/util",function(c,d,e,f,g,h,i,j,k){function q(b){var c=twttr.host;return a(b)=="https"&&twttr.secureHost&&(c=twttr.secureHost),a(b)+"://"+c}function r(){using("tfw/hub/client",function(a){twttr.events.hub=a.init(n),a.init(n,!0)})}var l,m,n={widgets:{"a.twitter-share-button":e,"a.twitter-mention-button":e,"a.twitter-hashtag-button":e,"a.twitter-follow-button":d,"blockquote.twitter-tweet":f,"a.twitter-timeline":g,body:h}},o=twttr.events&&twttr.events.hub?twttr.events:{},p;i.init(),n.assetUrl=q,twttr.widgets=twttr.widgets||{},k.aug(twttr.widgets,{config:{assetUrl:q},load:function(a){c.init(n),c.embed(a),twttr.widgets.loaded=!0},createShareButton:function(a,b,c,d){if(!a||!b)return c&&c(!1);d=k.aug({},d||{},{url:a,targetEl:b}),(new e(d)).render(n,c)},createHashtagButton:function(a,b,c,d){if(!a||!b)return d&&d(!1);c=k.aug({},c||{},{hashtag:a,targetEl:b,type:"hashtag"}),(new e(c)).render(n,d)},createMentionButton:function(a,b,c,d){if(!a||!b)return c&&c(!1);d=k.aug({},d||{},{screenName:a,targetEl:b,type:"mention"}),(new e(d)).render(n,c)},createFollowButton:function(a,b,c,e){if(!a||!b)return c&&c(!1);e=k.aug({},e||{},{screenName:a,targetEl:b}),(new d(e)).render(n,c)},createTweet:function(a,b,c,d){if(!a||!b)return c&&c(!1);d=k.aug({},d||{},{tweetId:a,targetEl:b}),(new f(d)).render(n,c),f.fetchAndRender()},createTimeline:function(a,b,c,d){if(!a||!b)return c&&c(!1);d=k.aug({},d||{},{widgetId:a,targetEl:b}),(new g(d)).render(n,c)}}),k.aug(twttr.events,o,j.Emitter),p=twttr.events.bind,twttr.events.bind=function(a,b){r(),this.bind=p,this.bind(a,b)};for(l=0;m=b[l];l++)twttr.events.bind(m[0],m[1]);for(l=0;m=twttr._e[l];l++)m(twttr);twttr.ready=function(a){a(twttr)},/twitter\.com(\:\d+)?$/.test(document.location.host)&&(twttr.widgets.createTimelinePreview=function(a,b,c){if(!n||!b)return c&&c(!1);(new g({previewParams:a,targetEl:b,linkColor:a.link_color,theme:a.theme,height:a.height})).render(n,c)}),twttr.widgets.createTweetEmbed=twttr.widgets.createTweet,twttr.widgets.load()})})})}()});;
 !function(n){var r={};function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}o.m=n,o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=1e3)}({1e3:function(t,e){var h;(h=jQuery).fn.html5_upload=function(f){function c(t,e){t=t.name||t.fileName;return e?encodeURI(t):t}function p(t){return t.size||t.fileSize}var r=["onStart","onStartOne","onProgress","onFinishOne","onFinish","onError"],f=jQuery.extend({onStart:function(t,e){return!0},onStartOne:function(t,e,n,r){return!0},onProgress:function(t,e,n,r,o){},onFinishOne:function(t,e,n,r,o){},onFinish:function(t,e){},onError:function(t,e,n){},onBrowserIncompatible:function(){alert("Sorry, but your browser is incompatible with uploading files using HTML5 (at least, with current preferences.\n Please install the latest version of Firefox, Safari or Chrome")},autostart:!0,autoclear:!0,stopOnFirstError:!1,sendBoundary:!1,fieldName:"user_file[]",extraFields:{},method:"post",encodeFilesName:!1,STATUSES:{STARTED:"Started",PROGRESS:"Progress",LOADED:"Loaded",FINISHED:"Finished"},headers:{"Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest","X-File-Name":function(t){return c(t,f.encodeFilesName)},"X-File-Size":p,"X-CSRF-Token":h('meta[name="csrf-token"]').attr("content"),"Content-Type":function(t){return!f.sendBoundary&&"multipart/form-data"}},setName:function(t){},setStatus:function(t){},setProgress:function(t){},genName:function(t,e,n){return t+"("+(e+1)+" of "+n+")"},genStatus:function(t,e){return e?f.STATUSES.FINISHED:0==t?f.STATUSES.STARTED:1==t?f.STATUSES.LOADED:f.STATUSES.PROGRESS},genProgress:function(t,e){return t/e}},f);function t(){var u=this.files,s=u.length,l=h(this);if(!l.triggerHandler("html5_upload.onStart",[s]))return!1;this.disabled=!0;var d=this.html5_upload.xhr;return this.html5_upload.continue_after_abort=!0,function e(n){return n==s?(l.triggerHandler("html5_upload.onFinish",[s]),f.setStatus(f.genStatus(1,!0)),l.attr("disabled",!1),void(f.autoclear&&l.val(""))):(r=u[n],l.triggerHandler("html5_upload.onStartOne",[c(r),n,s])?(f.setStatus(f.genStatus(0)),f.setName(f.genName(c(r),n,s)),f.setProgress(f.genProgress(0,p(r))),d.upload.onprogress=function(t){l.triggerHandler("html5_upload.onProgress",[t.loaded/t.total,c(r),n,s]),f.setStatus(f.genStatus(t.loaded/t.total)),f.setProgress(f.genProgress(t.loaded,t.total))},d.onload=function(t){200!=d.status?(l.triggerHandler("html5_upload.onError",[c(r),t]),f.stopOnFirstError||e(n+1)):(f.setStatus(f.genStatus(1,!0)),f.setProgress(f.genProgress(p(r),p(r))),l.triggerHandler("html5_upload.onFinishOne",[d.responseText,c(r),n,s]),e(n+1))},d.onabort=function(){l[0].html5_upload.continue_after_abort?e(n+1):(l.attr("disabled",!1),f.autoclear&&l.val(""))},d.onerror=function(t){l.triggerHandler("html5_upload.onError",[c(r),t]),f.stopOnFirstError||e(n+1)},d.open(f.method,"function"==typeof f.url?f.url(n):f.url,!0),h.each(f.headers,function(t,e){if(!1===(e="function"==typeof e?e(r):e))return!0;d.setRequestHeader(t,e)}),void(f.sendBoundary?window.FormData?((o=new FormData).append("function"==typeof f.fieldName?f.fieldName():f.fieldName,r),o.append("csrf_token",zomato.csrft),f.extraFields="function"==typeof f.extraFields?f.extraFields():f.extraFields,h.each(f.extraFields,function(t,e){o.append(t,e)}),d.send(o)):r.getAsBinary?(i="",i=(i=(i=(i=(i=(i=(i=(i=(i+="--")+(t="------multipartformboundary"+(new Date).getTime())+(a="\r\n"))+'Content-Disposition: form-data; name="'+("function"==typeof f.fieldName?f.fieldName():f.fieldName)+'"')+'; filename="'+(fileName=unescape(encodeURIComponent(c(r))))+'"')+a+"Content-Type: "+r.type)+a+a)+r.getAsBinary()+a)+"--"+t)+"--"+a,d.setRequestHeader("content-type","multipart/form-data; boundary="+t),d.sendAsBinary(i)):f.onBrowserIncompatible():d.send(r))):e(n+1));var r,o,t,a,i}(0),!0}try{return this.each(function(){this.html5_upload={xhr:new XMLHttpRequest,continue_after_abort:!0},f.autostart&&h(this).bind("change",t);var n=h(this);h.each(r,function(t,e){f[r[t]]&&n.bind("html5_upload."+r[t],f[r[t]])}),h(this).bind("html5_upload.start",t).bind("html5_upload.cancelOne",function(){this.html5_upload.xhr.abort()}).bind("html5_upload.cancelAll",function(){this.html5_upload.continue_after_abort=!1,this.html5_upload.xhr.abort()}).bind("html5_upload.destroy",function(){try{this.html5_upload.continue_after_abort=!1,this.xhr.abort()}catch(t){}delete this.html5_upload,h(this).unbind("html5_upload.*").unbind("change",t)})})}catch(t){return f.onBrowserIncompatible(),!1}}}});;
 !function(t){var r={};function o(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=r,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(n,e){if(1&e&&(n=o(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)o.d(t,r,function(e){return n[e]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s=620)}({620:function(e,n){$(document).on("zready",function(){window._B&&window._B.ismobile&&$(".js-swipebox").swipebox()})}});;
 !function(t){function e(e){for(var o,n,a=e[0],r=e[1],p=0,h=[];p<a.length;p++)n=a[p],i[n]&&h.push(i[n][0]),i[n]=0;for(o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);for(s&&s(e);h.length;)h.shift()()}var o={},i={76:0};function n(e){if(o[e])return o[e].exports;var i=o[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.e=function(t){var e=[],o=i[t];if(0!==o)if(o)e.push(o[2]);else{var a=new Promise(function(e,n){o=i[t]=[e,n]});e.push(o[2]=a);var r,p=document.getElementsByTagName("head")[0],s=document.createElement("script");s.charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.src=function(t){return n.p+""+{1:"d7307f58c1f6c66c01fb",2:"572270bc54e6c5a2d97e",8:"ccd6e761a2029f764182"}[t]+".js"}(t),r=function(e){s.onerror=s.onload=null,clearTimeout(h);var o=i[t];if(0!==o){if(o){var n=e&&("load"===e.type?"missing":e.type),a=e&&e.target&&e.target.src,r=new Error("Loading chunk "+t+" failed.\n("+n+": "+a+")");r.type=n,r.request=a,o[1](r)}i[t]=void 0}};var h=setTimeout(function(){r({type:"timeout",target:s})},12e4);s.onerror=s.onload=r,p.appendChild(s)}return Promise.all(e)},n.m=t,n.c=o,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n.oe=function(t){throw console.error(t),t};var a=window.webpackJsonp=window.webpackJsonp||[],r=a.push.bind(a);a.push=e,a=a.slice();for(var p=0;p<a.length;p++)e(a[p]);var s=r;n(n.s=106)}({106:function(t,e,o){zomato=window.zomato||{},o.p=window.JS_CDN_PATH;var i=function(t){null==new RegExp("^"+HOST+"photos/[^#]+(#.*)?$","g").exec(window.location.href)&&null==window.history.state&&photoViewer.close()};function n(t,e){"undefined"!=typeof profile_action&&"foodshots"==profile_action&&$(".photo-viewer-modal").parent(".modals").remove();var o="";if($(".photoviewer-loader").length||(o+='        <div class="photoviewer-loader ui page dimmer">                <div class="ui active loader"></div>        </div>'),0===$(".photo-viewer-modal").length)o+='        <div class="ui fullscreen modal photo-viewer-modal">            <div class="photo-viewer-background-cover-contents row"></div>        </div>';else{var i='<a href="#"  class="thumbs_temp_loading" style="position: absolute;"><img style="height: 5px;width: 20px;border-right: 0px;-webkit-border-radius: 0px;position: relative;top: 25px;left: 20px;" src="'+FLOADING_IMG_SRC+'"></a>';$(".thumbnails-pics").append(i)}$("body").prepend(o),$(".photoviewer-loader").addClass("active"),$(".photo-viewer-modal").length>0&&$("body").css("overflow","hidden"),void 0!==e&&(e.type=e.type||photoViewer.type),(e=e||{origin:"index",type:"res",pathname:HOST,no_redirect:0,res_id:0,user_id:0,contest:!1,onLoad:function(){}}).direction=e.direction||"forward",e.group_id=e.group_id||"";var n,a=null;if(a="res"==e.type?"foodshots"==e.contest?{photo_id:t,type:e.type,res_id:e.res_id,contest:e.contest,fs_city_country_id:e.fs_city_country_id,fs_type:e.fs_type,fs_cacheKey:e.fs_cacheKey}:{photo_id:t,type:e.type,res_id:e.res_id||photoViewer.res_id,contest:e.contest}:"liked"==e.type?{photo_id:t,type:e.type,user_id:e.user_id||photoViewer.user_id}:"newsfeed"==e.type||"journey"==e.type||"city_feed"==e.type?{photo_id:t,group_id:e.group_id||photoViewer.group_id,type:e.type}:"foodography"==e.type?{photo_id:t,type:e.type,date_range:e.date_range}:{photo_id:t,type:e.type},Object.keys(photoViewer.images).length?(a=photoViewer._temp_post_data).photo_id=t:photoViewer._temp_post_data=a,0!=(n=void 0!==photoViewer.currentIndex?photoViewer.currentIndex:0)){var r=Object.keys(photoViewer.pics_json);n="forward"==e.direction?r[r.length-1]:r[0]}a.current_index=n,a.direction=e.direction,photoViewer.ajaxRequest&&(photoViewer.ajaxRequest=!1,ajaxPhotoViewerGetData=$.ajax({url:HOST+"php/resPhotoData",type:"GET",dataType:"JSON",data:a,success:function(o){"success"==o.status?(photoViewer.ajaxRequest=!0,photoViewer.load({images:o.data.photos,user_snippets:o.data.user_snippets,restaurant_snippets:o.data.restaurant_snippets,initial_photo_id:t,origin:e.origin,onLoad:e.onLoad,type:e.type,pathname:e.pathname,res_id:e.res_id,user_id:e.user_id,group_id:e.group_id,contest:e.contest,no_redirect:e.no_redirect,total_photos_count:o.total_photos_count})):window.location.href=HOST},complete:function(){$(".thumbs_temp_loading").remove()}}))}function a(){var t=Object.keys(photoViewer.pics_json),e=$(".photo-viewer-container").data("photo_id"),o=photoViewer.chunk_count,i=parseInt(photoViewer.getIndexOfPhoto(e)),n={};$(".thumbnails-pics .thumb-pic").each(function(t,e){n[parseInt($(this).data("index"))]=$(this).find(".lazyH")}),photoViewer.images=n;var a=parseInt(t[0]);a<=i-o&&(a=i-o);var r=parseInt(t[t.length-1]),p=r;r>=i+o&&(p=i+o);for(var s=a,h=p;s<=h;s++){var c=$(n[s]);c&&c.attr("src")!=c.data("original")&&c.attr("src",c.data("original"))}}function r(t){t.length>0&&$.ajax({url:HOST+"php/photoViewerHandler?action=instagram-photo-deleted",type:"POST",data:{photo_ids:t,csrf_token:zomato.csrft},dataType:"JSON",success:function(t){t.status&&t.status}})}!function(t){for(var e,o=["Width","Height"];e=o.pop();)!function(e,o){t.fn[e]=e in new Image?function(){return this[0][e]}:function(){var t,e,i=this[0];return"img"===i.tagName.toLowerCase()&&((t=new Image).src=i.src,e=t[o]),e}}("natural"+e,e.toLowerCase())}(jQuery),window.photoViewer={user_snippets:{},restaurant_snippets:{},images:{},chunk_count:10,container:$(".photo-viewer-container"),ajaxRequest:!0,loadThumbnails:function(t,e,o){t=t||!1,e=e||{},o=o||photoViewer.currentIndex,t||$(".thumbnails-pics").hide().html(""),o=parseInt(o);var i=photoViewer.pics_json,n=Object.keys(photoViewer.pics_json),a=parseInt(n[0]),r=parseInt(n[n.length-1]),p="",s=0;for(thumb_pic in $thumbnails=$(".thumbnails-pics"),i)if(i.hasOwnProperty(thumb_pic)&&(s=parseInt(thumb_pic),!$thumbnails.find(".thumb-pic[data-index="+s+"]").length)){if("undefined"!=typeof profile_action&&"foodshots"==profile_action)var h='<a href="#" class="thumb-pic" data-index="'+s+'" data-image-id="'+i[thumb_pic].image_id+'"><img class="lazyH brstd" src="'+CDN+'images/photoback.png" data-original="'+i[thumb_pic].thumb+'" /></a>';else h='<a href="#" class="thumb-pic" data-index="'+s+'"><img class="lazyH brstd" src="'+CDN+'images/photoback.png" data-original="'+i[thumb_pic].thumb+'" /></a>';t?$thumbnails.find(".thumb-pic[data-index="+(s+1)+"]").length?$(h).insertBefore($(".thumbnails-pics").find(".thumb-pic[data-index="+(s+1)+"]")):$thumbnails.find(".thumb-pic[data-index="+(s-1)+"]").length?$(h).insertAfter($(".thumbnails-pics").find(".thumb-pic[data-index="+(s-1)+"]")):s-a<r-s?$(h).prependTo($thumbnails):$(h).appendTo($thumbnails):p+=h}$(".thumbnails-pics").css("width",87*Object.keys(photoViewer.pics_json).length),t?$(".thumbnails-pics").find(".thumb-pic[data-index="+o+"]").addClass("on-display"):$(".thumbnails-pics").html(p),$(".thumbnails-pics").fadeIn()},showImageAtIndex:function(t){if(!photoViewer.pics_json[t])return!1;if(photoViewer.pics_json[t].src.match(/cdninstagram/)){var e=photoViewer.pics_json[t].image_id,o=[],i=new Image;i.onerror=function(){o[o.length]="'".concat(e,"'"),r(o)},i.src=photoViewer.pics_json[t].src}photoViewer.currentIndex=t,pics_json_keys=Object.keys(photoViewer.pics_json);var p=parseInt(pics_json_keys[0]),s=parseInt(pics_json_keys[pics_json_keys.length-1]),h="forward";if(t-p<s-t&&(h="backward"),t>=p&&t<=s){var c=!1;"forward"==h?photoViewer.total_photos_count-t>=photoViewer.chunk_count&&s-t<photoViewer.chunk_count&&(c=!0):"backward"==h&&0!=p&&t-p<photoViewer.chunk_count&&(c=!0),c&&n(photoViewer.pics_json[t].image_id,{direction:h})}var d=$(".big-image img.current"),l=$(".big-image img").not(".current");$(".photoviewer-image-loading").show();var m=photoViewer.pics_json[t],u=Object.keys(this.pics_json).length,_=this.pics_json[pics_json_keys[u-1]].image_id;if(0!=_)photoViewer.getIndexOfPhoto(_);if(void 0!=photoViewer.next_img)if(void 0!=photoViewer.next_img.src&&photoViewer.next_index==t)var w=photoViewer.next_img.src;else w=m.src;else w=m.src;try{photoViewer.next_img=new Image,photoViewer.next_index=parseInt(t)+1,photoViewer.next_img.src=photoViewer.pics_json[photoViewer.next_index].src}catch(t){}$(".thumb-pic[data-index="+t+"]").addClass("on-display"),this.container.data("photo_id",photoViewer.pics_json[t].image_id),this.container.data("res_name",photoViewer.pics_json[t].res_name),this.container.find(".js-button-like, .js-like-count").data("photo_id",photoViewer.pics_json[t].image_id),$(".js-btn-share").data("entity-id",photoViewer.pics_json[t].image_id),$(".photo-viewer-comments-tab").trigger("click"),$(".photo-share-icons").hasClass("show")&&$(".photo-share-btn-link").trigger("click"),$(".caption-btn-cancel").trigger("click"),d.removeClass("show"),l.hide();var f=0;for(imgIndex in photoViewer.pics_json){if(parseInt(imgIndex)===parseInt(t))break;f++}var g=$(".photo-viewer-thumbnails-viewer").width()/2-87*f-50;if($(".thumbnails-pics").css({left:g}),l.attr("src")!=w?(l.attr("src",w),navigator.userAgent.indexOf("MSIE 8")>0&&setTimeout(function(){l.trigger("load")},50)):l.trigger("load"),1==m.user_id?("instagram"==m.type?($(".photo-viewer-instagram-snippet").show(),$(".photo-viewer-instagram-snippet .insta-photo-user-name").html(m.user_name),$(".photo-viewer-zomato-snippet").hide()):("res"==photoViewer.type&&1==m.owner_upload?($(".photo-viewer-zomato-snippet").hide(),$(".photo-viewer-restaurant-snippet").show()):($(".photo-viewer-zomato-snippet").show(),$(".photo-viewer-restaurant-snippet").hide()),$(".photo-viewer-instagram-snippet").hide()),$(".photo-viewer-photo-user-details").hide()):($(".photo-viewer-restaurant-snippet").hide(),$(".photo-viewer-photo-user-details").show(),$(".photo-viewer-zomato-snippet").hide(),$(".photo-viewer-instagram-snippet").hide()),$(".photo-user-details").html(photoViewer.user_snippets[m.user_id]),$(".photo-viewer-restaurant-snippet .restaurant_details_snippet").html(photoViewer.restaurant_snippets[m.res_id]),initiateLaziness(),displayZSFollowButtons(),$(".photo-added-date").html(m.friendly_time).show(),m.res_name&&m.res_name.length){var v='<a href="'+m.res_url+'" title="'+m.res_title+'"><span class="zred">'+m.res_name+"</span></a>";$(".photo-added-reference").html(zomato.language.replaceVars("v $1",v))}else $(".photo-added-reference").html("");if(photoViewer.updateCaptionControls(),photoViewer.pics_json[t].is_liked){$(".js-button-like").each(function(e,o){$(o).data("photo_id")==photoViewer.pics_json[t].image_id&&($(o).data("action","unlike").removeClass("loading"),$(o).find(".like-text").text("Lajkuješ"))})}else{$(".js-button-like").each(function(e,o){$(o).data("photo_id")==photoViewer.pics_json[t].image_id&&($(o).data("action","like").removeClass("loading"),$(o).find(".like-text").text("Lajk"))})}this.container.find(".photo-viewer-comments-container").html(""),$(".js-like-count").each(function(e,o){$(o).data("photo_id")==photoViewer.pics_json[t].image_id&&$(o).html(photoViewer.pics_json[t].like_count_number)}),photoViewer.pics_json[t].is_zomato_photo&&"instagram"!=photoViewer.pics_json[t].type||0==USER_ID||parseInt(USER_ID)===parseInt(photoViewer.pics_json[t].user_id)?$(".photo-report-btn").hide():photoViewer.pics_json[t].reported_already?$(".photo-report-btn").attr("title","Již nahlášeno").show().addClass("reported disabled").find(".photo-report-text").text("Nahlášeno"):$(".photo-report-btn").attr("title","Nahlásit tuto fotku").show().removeClass("reported disabled").find(".photo-report-text").text("Nahlásit"),photoViewer.pics_json[t].is_zomato_photo&&0!=USER_ID&&"instagram"==photoViewer.pics_json[t].type?$(".photo-admin-remove-btn").attr("title","Photo Admin: Remove this instagram photo").show().find(".photo-admin-remove-text").text("RemoveInstagramPhoto"):$(".photo-admin-remove-btn").hide(),photoViewer.pics_json[t].is_zomato_photo||0==USER_ID||parseInt(USER_ID)!==parseInt(photoViewer.pics_json[t].user_id)?$(".photo-delete-btn").hide():$(".photo-delete-btn").attr("title","Smazat tuto fotku").show().find(".photo-delete-text").text("Smazat fotku"),photoViewer.renderComments(m.image_id),photoViewer.loadLikes(m.image_id),photoViewer.bindRerenderedButtons(),photoViewer.disableNavOnLastImg(),$(".big-image").height($(".photo-viewer-modal").outerHeight()-Math.max($(".photo-viewer-thumbnails-viewer").outerHeight(),87)+1),a(),void 0!==window.history.pushState?("res"==photoViewer.type?window.history.replaceState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.res_id+"-"+photoViewer.pics_json[t].image_id):"liked"==photoViewer.type?window.history.replaceState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.user_id+"-"+photoViewer.pics_json[t].image_id):"newsfeed"==photoViewer.type||"journey"==photoViewer.type||"city_feed"==photoViewer.type?window.history.replaceState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.group_id+"-"+photoViewer.pics_json[t].image_id):window.history.replaceState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.pics_json[t].image_id),updateAppleAppUrlMeta("zomato://pv/"+photoViewer.type+"/"+photoViewer.pics_json[t].image_id)):("res"==photoViewer.type&&(window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.res_id+"-"+photoViewer.pics_json[t].image_id),"liked"==photoViewer.type&&(window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.user_id+"-"+photoViewer.pics_json[t].image_id),"newsfeed"==photoViewer.type||"journey"==photoViewer.type||"city_feed"==photoViewer.type?window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.group_id+"-"+photoViewer.pics_json[t].image_id:window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.pics_json[t].image_id)},renderComments:function(t){var e=this;$(".photo-comments-no-comments").hide();var o=$(".on-display").data("index"),i=void 0!==photoViewer.pics_json[o].comments_count?photoViewer.pics_json[o].comments_count:-1;if(-1!=i)return photoViewer.populateComments(photoViewer.pics_json[o].image_id,photoViewer.pics_json[o].comments),void e.container.find(".comment-btn").html(i);e.container.find(".photo-viewer-comments-container").show(),e.container.find(".photo-viewer-comments-container").html('<div style="min-height:200px;"><div class="ui active loader"></div></div>').show(),$.ajax({url:HOST+"php/get_photo_comments",type:"GET",dataType:"JSON",data:{photo_id:t},success:function(i){if("success"==i.status){if(photoViewer.pics_json[o].comments=i.html,photoViewer.pics_json[o].comments_count=i.comments_count,i.comments_count>0){if(1==i.comments_count)var n="Komentář";else n="Komentáře";e.container.find(".comment-btn-to").show(),e.container.find(".comment-btn-to .js-activity-comment-count").html(i.comments_count+" "+n)}else e.container.find(".comment-btn-to").hide();photoViewer.populateComments(t,i.html)}}})},loadLikes:function(t){var e=this,o=$(".on-display").data("index");if($(".photo-likes-box").html('<div class="ta-center ptop mtop pbot mbot"><img src="'+FLOADING_IMG_SRC+'" class="mr5" /></div>'),-1!==(void 0!==photoViewer.pics_json[o].likes_loaded?photoViewer.pics_json[o].like_count_number:-1))return $(".js-like-count").each(function(t,e){$(e).data("photo_id")==photoViewer.pics_json[o].image_id&&$(e).html(photoViewer.pics_json[o].like_count_number)}),0==photoViewer.pics_json[o].like_count_number?$(".js-like-count").each(function(t,e){$(e).data("photo_id")==photoViewer.pics_json[o].image_id&&$(e).addClass("zero-likes")}):$(".js-like-count").each(function(t,e){$(e).data("photo_id")==photoViewer.pics_json[o].image_id&&$(e).removeClass("zero-likes")}),void initiateLaziness();$.ajax({url:HOST+"php/photoViewerHandler?action=get-likes",type:"POST",dataType:"JSON",data:{photo_id:t},success:function(i){i.status&&"success"==i.status?(photoViewer.pics_json[o].like_count_number=i.like_count_number,photoViewer.pics_json[o].likes_loaded=!0,photoViewer.pics_json[o].likes_html=i.html,$(".js-button-like").data("likes",i.like_count_number),t==e.container.data("photo_id")&&($(".js-like-count").each(function(t,e){$(e).data("photo_id")==photoViewer.pics_json[o].image_id&&$(e).html(photoViewer.pics_json[o].like_count_number)}),$(".photo-likes-box").html(photoViewer.pics_json[o].likes_html),0==i.like_count_number?$(".js-like-count").each(function(t,e){$(e).data("photo_id")==photoViewer.pics_json[o].image_id&&$(e).addClass("zero-likes")}):$(".js-like-count").each(function(t,e){$(e).data("photo_id")==photoViewer.pics_json[o].image_id&&$(e).removeClass("zero-likes")}),initiateLaziness()),e.container.find(".tooltip").tipsy()):console.error(i.message)}})},resizeCommentsTab:function(){""!=this.container.find(".photo-viewer-comments-container").html()&&(right_column_height=$(".photo-viewer-modal").height(),tab_content_top=$(".photo-viewer-right-column-container").outerHeight()+$(".photo-social-container .actn-links").outerHeight()+$(".photo-comment-box").outerHeight(),tab_content_height=right_column_height-tab_content_top,this.container.find(".photo-viewer-comments-container").css({maxHeight:tab_content_height-60}))},populateComments:function(t,e,o){if(this.container.find(".photo-viewer-comments-container").html(""),$(".photo-comments-no-comments").hide(),t==this.container.data("photo_id")){var i=photoViewer.getIndexOfPhoto(t);""==e||0==photoViewer.pics_json[i].comments_count?($(".photo-comments-no-comments").show(),this.container.find(".photo-viewer-comments-container").hide()):(this.container.find(".photo-viewer-comments-container").html(e).fadeIn(),photoViewer.resizeCommentsTab()),this.container.find(".photo-viewer-comments-container").scrollTop(this.container.find(".photo-viewer-comments-container").get(0).scrollHeight),initiateLaziness()}},deleteComment:function(t,e){var o=this;$.ajax({url:HOST+"php/photoViewerHandler?action=delete-comment",type:"POST",dataType:"JSON",data:{photo_id:t,comment_id:e,csrf_token:zomato.csrft},success:function(i){if(i.status&&"success"==i.status){$('.photo_comment_item[data-comment_id="'+e+'"]').fadeOut();var n=photoViewer.getIndexOfPhoto(t);if(photoViewer.pics_json[n].comments_count=photoViewer.pics_json[n].comments_count-1|0,1==photoViewer.pics_json[n].comments_count)var a="Komentář";else a="Komentáře";o.container.find(".comment-btn-to").show(),o.container.find(".comment-btn-to .js-activity-comment-count").html(photoViewer.pics_json[n].comments_count+" "+a);var r=$("<div>"+photoViewer.pics_json[n].comments+"</div>");r.find('[data-comment_id="'+e+'"]').remove(),photoViewer.pics_json[n].comments=r.html(),t==o.container.data("photo_id")&&0==photoViewer.pics_json[n].comments_count&&$(".photo-comments-no-comments").show()}}})},reportPhoto:function(t){var e=this;$(".photo-report-btn").addClass("loading"),$.ajax({url:HOST+"php/photoViewerHandler?action=report-photo",type:"POST",data:{photo_id:t,csrf_token:zomato.csrft},dataType:"JSON",complete:function(){$(".photo-report-btn").removeClass("loading")},success:function(o){if(o.status&&"success"==o.status){t==e.container.data("photo_id")&&($(".photo-report-btn").removeClass("ui mini button loading"),$(".photo-report-btn").addClass("reported disabled").attr("title","Již nahlášeno").find(".photo-report-text").text("Nahlášeno"));var i=photoViewer.getIndexOfPhoto(t);photoViewer.pics_json[i].reported_already=!0}else t==e.container.data("photo_id")&&$(".photo-report-btn").removeClass("loading"),Dialog.show({head:"Chyba",html:"<div style=\"margin-left: 30px;\">Došlo k chybě</div>"})}})},adminRemovePhoto:function(t){$(".photo-admin-remove-btn").addClass("loading"),$.ajax({url:HOST+"php/photoViewerHandler?action=admin-remove-photo",type:"POST",data:{photo_id:t},dataType:"JSON",complete:function(){$(".photo-admin-remove-btn").removeClass("loading")},success:function(t){t.status&&"success"==t.status?Dialog.show({head:"Success",html:'<div style="margin-left: 30px;">Photo Admin removed instagram photo</div>'}):Dialog.show({head:"Chyba",html:"<div style=\"margin-left: 30px;\">Došlo k chybě</div>"})}})},disableNavOnLastImg:function(){var t=$(".thumb-pic.on-display").prev(".thumb-pic"),e=$(".thumb-pic.on-display").next(".thumb-pic");$(".previous-btn").fadeIn(150),$(".next-btn").fadeIn(150),0==t.length&&$(".previous-btn").fadeOut(150),0==e.length&&$(".next-btn").fadeOut(150)},previousImage:function(){if("undefined"!=typeof profile_action&&"foodshots"==profile_action){var t=$(".thumb-pic.on-display").data("image-id");(e=$('.photo-box[data-photo-id="'+t+'"]').prev(".thumb-pic")).length>0&&(photoViewer.close(),e.trigger("click"))}else{var e;(e=$(".thumb-pic.on-display").prev(".thumb-pic")).length>0&&($(".thumb-pic").removeClass("on-display"),photoViewer.showImageAtIndex(e.data("index")))}},nextImage:function(){if("undefined"!=typeof profile_action&&"foodshots"==profile_action){var t=$(".thumb-pic.on-display").data("image-id");(e=$('.photo-box[data-photo-id="'+t+'"]').next(".thumb-pic")).length>0&&(photoViewer.close(),e.trigger("click"))}else{var e;(e=$(".thumb-pic.on-display").next(".thumb-pic")).length>0&&($(".thumb-pic").removeClass("on-display"),e.addClass("on-display"),photoViewer.showImageAtIndex(e.data("index")))}},getIndexOfPhoto:function(t){for(var e in photoViewer.pics_json)if(photoViewer.pics_json[e]&&photoViewer.pics_json[e].image_id==t)return parseInt(e);return null},likePhoto:function(t){if("undefined"==typeof USER_ID||0===USER_ID||""===USER_ID)return showDialog("login"),!1;var e=this,o=e.container.find(".js-button-like"),i=e.container.find(".js-like-count"),a=o.data("likes"),r=o.data("action");if(o.hasClass("clicked"))return!1;o.addClass("clicked");var p={photo_id:t,method:o.data("action"),csrf_token:zomato.csrft};"like"==r?(o.data("action","unlike").find(".like-text").text("Lajkuješ"),a+=1):(o.data("action","like").find(".like-text").text("Lajk"),a-=1),o.data("likes",a),i.html(a);var s=photoViewer.getIndexOfPhoto(t);void 0!==photoViewer.pics_json[s].likes_loaded&&(photoViewer.pics_json[s].like_count_number=a,photoViewer.pics_json[s].is_liked="like"==r),$.ajax({url:HOST+"php/photoViewerHandler?action=like-photo",type:"POST",dataType:"JSON",data:p,success:function(p){if(o.removeClass("clicked"),p.status&&"success"==p.status){var s=photoViewer.getIndexOfPhoto(t);if("like"==r){$(".photosContainer .js-btn-like[data-photo_id="+t+"]").data("action","unlike").children().addClass("red"),o.data("photo_id")==photoViewer.pics_json[s].image_id&&"like"==o.data("action")&&o.data("action","unlike").data("likes",a).find(".like-text").text("Lajkuješ")}else{o.data("photo_id")==photoViewer.pics_json[s].image_id&&"unlike"==o.data("action")&&o.data("action","like").data("likes",a).find(".like-text").text("Lajk")}i.data("photo_id")==photoViewer.pics_json[s].image_id&&(i.html(p.like_count_number).show(),0==p.like_count_number?i.addClass("zero-likes"):i.removeClass("zero-likes")),e.container.find(".tooltip").trigger("mouseout").tipsy()}else"unlike"==r?(o.data("action","unlike").find(".like-text").text("Lajkuješ"),a+=1):(o.data("action","like").find(".like-text").text("lajk"),a-=1),o.data("likes",a),i.html(a),"login"==p.action?($(document).off("ZOMATO_LOGIN.pv FACEBOOK_LOGIN.pv").on("ZOMATO_LOGIN.pv FACEBOOK_LOGIN.pv",function(){$(document).off("ZOMATO_LOGIN.pv"),$(document).data("onLoginComplete").callback()}).off("ZOMATO_LOGIN_CANCEL").on("ZOMATO_LOGIN_CANCEL",function(){$(document).off("ZOMATO_LOGIN_CANCEL"),$(document).data("onLoginCancel").callback()}).data("onLoginComplete",{photo_id:e.container.data("photo_id"),action:"like",callback:function(){n(this.photo_id,{origin:"photo_id",type:photoViewer.type,pathname:photoViewer.pathname,no_redirect:photoViewer.no_redirect,res_id:photoViewer.res_id,user_id:photoViewer.user_id,onLoad:function(){photoViewer.likePhoto(e.container.data("photo_id"))}})}}).data("onLoginCancel",{photo_id:e.container.data("photo_id"),action:"like",callback:function(){n(this.photo_id,{origin:"photo_id",type:photoViewer.type,pathname:photoViewer.pathname,no_redirect:photoViewer.no_redirect,res_id:photoViewer.res_id,user_id:photoViewer.user_id,onload:function(){}})}}),Dialog.show({url:HOST+"php/loginDialog?type=photo",head:"Přihlásit se k Zomatu",onClose:function(){$(document).trigger("ZOMATO_LOGIN_CANCEL")}})):console.error(p.message)},error:function(){"unlike"==r?(o.data("action","unlike").find(".like-text").text("Lajkuješ"),a+=1):(o.data("action","like").find(".like-text").text("lajk"),a-=1),o.data("likes",a),i.html(a)}})},postComment:function(t,e){var i=this;o.e(1).then(function(){var t=[o(4)];(function(){i.container.find(".dimmer-comment-box").dimmer("show")}).apply(null,t)}).catch(o.oe),i.container.find(".photo-viewer-comments-container").scrollTop(i.container.find(".photo-viewer-comments-container").get(0).scrollHeight),$(".comment-box-input").attr("disabled","disabled");var n={photo_id:t,comment:e,csrf_token:zomato.csrft};$.ajax({url:HOST+"php/photoViewerHandler?action=post-comment",type:"POST",dataType:"JSON",data:n,complete:function(){$(".comment-box-input").removeAttr("disabled").html(""),o.e(1).then(function(){var t=[o(4)];(function(){i.container.find(".dimmer-comment-box").dimmer("hide")}).apply(null,t)}).catch(o.oe)},success:function(e){if("success"==e.status){var o=photoViewer.getIndexOfPhoto(t);if(photoViewer.pics_json[o].comments+=e.html,void 0===photoViewer.pics_json[o].comments_count?photoViewer.pics_json[o].comments_count=1:photoViewer.pics_json[o].comments_count+=1,1==photoViewer.pics_json[o].comments_count)var n="Komentář";else n="Komentáře";i.container.find(".comment-btn-to").show(),i.container.find(".comment-btn-to .js-activity-comment-count").html(photoViewer.pics_json[o].comments_count+" "+n),$(".photo-viewer-comments-container[data-photo_id="+t+"]").each(function(){var t=$(this).html();$(this).html(t+e.html)}),photoViewer.populateComments(t,photoViewer.pics_json[o].comments),initiateLaziness()}else console.error(e.message)}})},updateCaptionControls:function(){var t=this.getIndexOfPhoto(this.container.data("photo_id"));$(".photo-caption-textarea").val("").hide(),$(".photo-caption-text").hide(),$(".photo-caption-text-with").hide(),photoViewer.pics_json[t].impression_str.length?($(".photo-viewer-container .impression-container").show(),$(".photo-viewer-container .impression-text").text(photoViewer.pics_json[t].impression_str)):$(".photo-viewer-container .impression-container").hide(),photoViewer.pics_json[t].source_reference.length?($(".photo-viewer-container .source-reference").show(),/^(ftp|http|https):\/\/[^ "]+$/.test(photoViewer.pics_json[t].source_reference)?$(".photo-viewer-container .source-reference").html("<p><a class='at-tags' href='"+photoViewer.pics_json[t].source_reference+"'>Source</a></p>"):$(".photo-viewer-container .source-reference").hide()):$(".photo-viewer-container .source-reference").hide(),photoViewer.pics_json[t]&&photoViewer.pics_json[t].user_id&&USER_ID==photoViewer.pics_json[t].user_id?($(".photo-caption-controls").show(),$(".photo-edit-caption").show(),$("#tag-friends-button").show(),photoViewer.pics_json[t].res_name&&photoViewer.pics_json[t].res_name.length?$("#tag-restaurant-button").hide():$("#tag-restaurant-button").show(),$(".photo-caption-text").html(photoViewer.pics_json[t].caption).show(),$(".photo-added-date").show(),""!=photoViewer.pics_json[t].with_tags&&$(".photo-caption-text-with").html(photoViewer.pics_json[t].with_tags_html).show()):($(".photo-caption-controls").hide(),""!=photoViewer.pics_json[t].caption&&($(".photo-caption-text").html(photoViewer.pics_json[t].caption).show(),photoViewer.pics_json[t].user_id<=1&&$(".js-photo-caption-text-more").hide()),""!=photoViewer.pics_json[t].with_tags&&$(".photo-caption-text-with").html(photoViewer.pics_json[t].with_tags_html).show())},updateCaption:function(t,e,o){$(".caption-btn-save").addClass("loading"),$.ajax({url:HOST+"php/photoViewerHandler?action=update-caption",type:"POST",dataType:"JSON",data:{photo_id:t,caption:e,with_tags:o,csrf_token:zomato.csrft},complete:function(){$("#photo-caption-textbox").removeAttr("disabled"),$("#photo-caption-tagbox").removeAttr("disabled"),$(".caption-btn-save").removeClass("loading")},success:function(e){if("success"==e.status){$(".photo-social-container,.photo-added-date, .photo-social-buttons, .tag-restaurant-container, .photo-caption-text, .js-photo-caption-text-more").show();var o=photoViewer.getIndexOfPhoto(t);photoViewer.pics_json[o].caption=e.caption,photoViewer.pics_json[o].caption_tag_struct_array=e.caption_tag_struct_array,photoViewer.pics_json[o].with_tag_struct_array=e.with_tag_struct_array,photoViewer.pics_json[o].with_tags_html=e.with_tags_html,photoViewer.pics_json[o].with_tags=e.with_tags,photoViewer.updateCaptionControls()}else Dialog.show({head:"Failed",html:e.message})}})},deletePhoto:function(t){var e=this;window.confirm("Opravdu chceš smazat tuto fotku? Smazanou fotku již není možné obnovit.")&&(o.e(1).then(function(){var t=[o(4)];(function(){$(".photocontainer").find(".pv-loader-container").dimmer("show")}).apply(null,t)}).catch(o.oe),$.ajax({url:HOST+"php/photoViewerHandler?action=delete-photo",type:"POST",dataType:"JSON",data:{photo_id:t,csrf_token:zomato.csrft},complete:function(){o.e(1).then(function(){var t=[o(4)];(function(){$(".photocontainer").find(".pv-loader-container").dimmer("hide")}).apply(null,t)}).catch(o.oe)},success:function(t){if("success"==t.status){var i,n,a=e.container.data("photo_id"),r=photoViewer.getIndexOfPhoto(a),p=$(".thumb-pic.on-display");$("a[data-photo_id="+a+"]").parent(".user-info-thumbs-container").remove(),(i=p.next(".thumb-pic"))&&i.length>0?(p.remove(),photoViewer.showImageAtIndex(i.data("index"))):(n=p.prev(".thumb-pic"))&&n.length>0?(p.remove(),photoViewer.showImageAtIndex(n.data("index"))):(p.remove(),o.e(1).then(function(){var t=[o(4)];(function(){o.e(2).then(function(){var t=[o(5)];(function(){o.e(8).then(function(){var t=[o(9)];(function(){$(".photo-viewer-modal").modal("hide")}).apply(null,t)}).catch(o.oe)}).apply(null,t)}).catch(o.oe)}).apply(null,t)}).catch(o.oe)),photoViewer.pics_json[r]=null,$('[data-photo_id="'+a+'"]').closest(".thumbContainer").remove(),$("#photos").length>0&&$("#photos").trigger("photoDeleted"),$("#thumbsContainer").length>0&&$("#thumbsContainer").trigger("photoDeleted")}}}))},populateShareData:function(t){t=this.container.data("photo_id");var e=photoViewer.getIndexOfPhoto(t),o=$(".photo-share-icons").find(".fb"),i=$(".photo-share-icons").find(".tw"),n=photoViewer.pics_json[e];if(caption=n.caption,1==n.user_id?o.data("title","Photo for "+n.res_name):n.user_id==USER_ID?o.data("title","My photo for "+n.res_name):o.data("title",n.user_name+"'s photo for "+n.res_name),o.data("caption-snippet",caption).data("photo",n.src).data("url",window.location.href),caption){var a=caption.length>50?caption.substr(0,50)+"...":caption;tweet_text=a+" - zoma.to/pv/"+t+" (@ "+n.res_name+")"}else 1==n.user_id?tweet_text="Photo for "+n.res_name+" @zomato - zoma.to/pv/"+t:n.user_id==USER_ID?tweet_text="My photo for "+n.res_name+" @zomato - zoma.to/pv/"+t:tweet_text=n.user_name+"'s photo for "+n.res_name+" @zomato - zoma.to/pv/"+t;i.data("photo-id",t).data("url",window.location.href),i.attr("href","https://twitter.com/intent/tweet?text="+encodeURIComponent(tweet_text)),i.data("res-name",n.res_name)},bindRerenderedButtons:function(){var t=this;$("#tag-restaurant-button").off("click"),$("#tag-restaurant-button").on("click",function(e){e.preventDefault();t.container.data("photo_id");$control=$("#tag-restaurant-control").hide(),$suggestions=$("#restaurant-suggestion-list").hide(),$button=$("#tag-restaurant-button"),t.initiateEditCaption(),$control.show().find(".inline-search").focus(),$(".photo-social-container,.photo-social-buttons, .photo-added-date, .middot").hide(),$control.off("keydown","input").off("focus","input").off("blur","input"),$control.on("keydown","input",function(t){if($("#tag-restaurant-control").find("input").data("res_id",0),$control.find("input").removeClass("bold"),38==t.keyCode)return t.preventDefault(),$(".restaurant-tag-result.highlight").prev().hasClass("restaurant-tag-result")&&!$(".restaurant-tag-result.highlight").prev().hasClass("hidden")&&$(".restaurant-tag-result.highlight").removeClass("highlight").prev().addClass("highlight"),!1;if(40==t.keyCode)return t.preventDefault(),$(".restaurant-tag-result.highlight").next().hasClass("restaurant-tag-result")&&!$(".restaurant-tag-result.highlight").prev().hasClass("hidden")&&$(".restaurant-tag-result.highlight").removeClass("highlight").next().addClass("highlight"),!1;if(13==t.keyCode)return t.preventDefault(),$(".restaurant-tag-result.highlight").trigger("click"),!1;if(27==t.keyCode)return t.preventDefault(),t.stopPropagation(),$control.find("input").trigger("blur"),!1;var e=$(this).val();e.length<1?$suggestions.show().html(""):$.get(HOST+"php/liveSuggest.php",{type:"restaurant",count:6,q:e},function(t){strHTML="";var e="highlight";$(t).each(function(t,o){o.res_id&&(strHTML+='<li class="restaurant-tag-result '+e+'"><a href="#" class="suggestion" style="text-decoration: none; color:#2d2d2a" data-res-id="'+o.res_id+'">'+o.name+"</a></li>"),e=""}),$suggestions.show().html(strHTML),$(".restaurant-tag-result").last().css({"border-bottom-left-radius":"3px"}),$(".restaurant-tag-result").last().css({"border-bottom-right-radius":"3px"}),$control.find("input").css({"border-bottom-right-radius":"0px"}),$control.find("input").css({"border-bottom-left-radius":"0px"})},"json")}).on("focus","input",function(){$suggestions.show(),$control.find("input").css({"border-bottom-right-radius":"0px"}),$control.find("input").css({"border-bottom-left-radius":"0px"})}).on("blur","input",function(){setTimeout(function(){$suggestions.hide()},200),$control.find("input").css({"border-bottom-right-radius":"3px"}),$control.find("input").css({"border-bottom-left-radius":"3px"})}),$suggestions.off("hover",".restaurant-tag-result"),$suggestions.on("hover",".restaurant-tag-result",function(t){$(".restaurant-tag-result.highlight").removeClass("highlight"),$(this).addClass("highlight")}),$suggestions.off("click",".restaurant-tag-result"),$suggestions.on("click",".restaurant-tag-result",function(t){t.preventDefault();var e=$(this).find("a").attr("data-res-id");$control.find("input").val($(this).text()),$control.find("input").addClass("bold"),$control.find("input").data("res_id",e),$suggestions.hide(),$control.find("input").css({"border-bottom-right-radius":"3px"}),$control.find("input").css({"border-bottom-left-radius":"3px"})})}),$(".photo-comment-btn").on("click",function(){var e=t.container.data("photo_id");photoViewer.commentOnPhoto(e)}),$(".photo-social-container .photo-comment-box").off("click").on("click",function(t){if(t.preventDefault(),"undefined"==typeof USER_ID||0===USER_ID||""===USER_ID)return showDialog("login"),!1;$(".comment-box-input").focus()}),$(".photo-edit-caption").off("click").on("click",function(t){t.preventDefault(),$("#tag-restaurant-button").trigger("click"),$("#photo-caption-textbox").focus()}),$("#tag-friends-button").off("click").on("click",function(t){t.preventDefault(),$("#tag-restaurant-button").trigger("click"),$("#photo-caption-tagbox").focus()})},bindEvents:function(){var t=this,e=t.container;e.off("scroll"),zomato.prepareReadMoreLinks(e),FeedActivity.init(),e.off("click",".thumb-pic").on("click",".thumb-pic",function(t){t.preventDefault(),$(".thumb-pic").removeClass("on-display");var e=$(this).data("index");photoViewer.showImageAtIndex(e)}),e.off("click",".previous-btn").on("click",".previous-btn",function(t){t.preventDefault(),t.stopPropagation(),photoViewer.previousImage()}),e.off("click",".next-btn").on("click",".next-btn",function(t){t.preventDefault(),t.stopPropagation(),photoViewer.nextImage()}),$(".big-image img").off("load").on("load",function(){$(".big-image img.current");$(".big-image img").not(".current").show(),$(".photoviewer-image-loading").hide()}),e.off("keydown",".comment-box-input").on("keydown",".comment-box-input",function(t){if(!1===SearchHelperNavigate(t))return!1;if(13==t.keyCode){t.stopPropagation(),t.preventDefault();var o=ConstructDbFriendlyTextFromHtml($(this)),i=e.data("photo_id");0!=o.length&&photoViewer.postComment(i,o)}}),e.off("blur",".comment-box-input").on("blur",".comment-box-input",function(t){setTimeout(function(){$(".tag-search-helper").hide().html("")},200)}),e.off("click",".comment-box-input").on("click",".comment-box-input",function(t){setTimeout(function(){$(".tag-search-helper").hide().html("")},200)}),e.off("input",".comment-box-input").on("input",".comment-box-input",function(t){var e=$(this);InputChange(e)}),e.off("click","#photo-caption-tagbox").on("click","#photo-caption-tagbox",function(t){setTimeout(function(){$(".tag-search-helper").hide().html("")},200)}),e.off("blur","#photo-caption-tagbox").on("blur","#photo-caption-tagbox",function(t){setTimeout(function(){$(".tag-search-helper").hide().html("")},200)}),e.off("input","#photo-caption-tagbox").on("input","#photo-caption-tagbox",function(t){var e=$(this);InputChange(e)}),e.off("keydown","#photo-caption-tagbox").on("keydown","#photo-caption-tagbox",function(t){return!1!==SearchHelperNavigate(t)&&(27==t.keyCode&&$(".caption-btn-cancel").trigger("click"),13!=t.keyCode&&void t.stopPropagation())}),e.off("click","#photo-caption-textbox").on("click","#photo-caption-textbox",function(t){setTimeout(function(){$(".tag-search-helper").hide().html("")},200)}),e.off("blur","#photo-caption-textbox").on("blur","#photo-caption-textbox",function(t){setTimeout(function(){$(".tag-search-helper").hide().html("")},200)}),e.off("input","#photo-caption-textbox").on("input","#photo-caption-textbox",function(t){var e=$(this);InputChange(e)}),e.off("keydown","#photo-caption-textbox").on("keydown","#photo-caption-textbox",function(t){return!1!==SearchHelperNavigate(t)&&(27==t.keyCode&&$(".caption-btn-cancel").trigger("click"),13!=t.keyCode&&void t.stopPropagation())}),e.off("click",".caption-btn-cancel").on("click",".caption-btn-cancel",function(t){t.preventDefault();$("#photo-caption-textbox").data("caption"),$("#photo-caption-tagbox").data("caption");photoViewer.updateCaptionControls(),$(".photo-social-container,.photo-caption-text,.photo-social-buttons,.js-photo-caption-text-more,.photo-added-date").show(),$(".photo-caption-text").html()&&$(".photo-caption-text").show(),$(".photo-caption-text-with").html()&&$(".photo-caption-text-with").show(),$("#tag-restaurant-control").find("input").data("res_id",0)}),e.off("click",".caption-btn-save").on("click",".caption-btn-save",function(o){o.preventDefault();var i=ConstructDbFriendlyTextFromHtml($("#photo-caption-textbox"));cleanWithTags($("#photo-caption-tagbox"));var n="";void 0!==$("#photo-caption-tagbox").data("tag-str")&&(n=$("#photo-caption-tagbox").data("tag-str"));var a=e.data("photo_id");$("#photo-caption-textbox").attr("disabled","disabled"),$("#photo-caption-tagbox").attr("disabled","disabled"),e.find(".js-button-like, .js-like-count").data("photo_id",a),$(".js-btn-share-default").data("entity-id",a),photoViewer.updateCaption(a,i,n),res_id=$("#tag-restaurant-control").find("input").data("res_id"),void 0!=res_id&&0!=res_id&&t.changeTaggedRestaurant(a,res_id),$("#tag-restaurant-control").find("input").data("res_id",0)}),$(document.body).off("keyup.pv").on("keyup.pv",function(t){t.preventDefault(),37==t.keyCode&&$(t.target).is(":not(input, textarea, div[contenteditable])")&&photoViewer.previousImage(),39==t.keyCode&&$(t.target).is(":not(input, textarea, div[contenteditable])")&&photoViewer.nextImage(),27==t.keyCode&&$(t.target).is(":not(input, textarea, div[contenteditable])")&&photoViewer.close()}),e.off("click.photoLike",".js-button-like").on("click.photoLike",".js-button-like",function(t){t.preventDefault();var o=e.data("photo_id");photoViewer.likePhoto(o)}),$(".photo-share-icons").off("click","a.fb").on("click","a.fb",function(t){var e=$(this).data("url"),o=$(this).data("title"),i=$(this).data("caption-snippet"),n=$(this).data("photo");t.preventDefault(),FB.ui({method:"feed",name:o,link:e,picture:n,caption:HOST,description:i})}),e.off("click.comment",".comment-btn").on("click.comment",".comment-btn",function(t){t.preventDefault(),$(".photo-viewer-tabs-content").removeClass("index1").addClass("index0"),$(".photo-viewer-tab").removeClass("selected"),$(".photo-viewer-comments-tab").addClass("selected")}),e.off("click.deleteComment",".review-comment-delete-submit").on("click.deleteComment",".review-comment-delete-submit",function(t){t.preventDefault(),$(this).siblings(".confirm-delete").removeClass("hidden").show()}),e.off("click.confirmDelete",".comment-delete-option").on("click.confirmDelete",".comment-delete-option",function(t){t.preventDefault();var e=$(this).data("option"),i=$(this).parents(".photo_comment_item").data("comment_id"),n=$(this).parents(".photo_comment_item").data("photo_id");"yes"==e?(o.e(1).then(function(){var t=[o(4)];(function(){$(this).parents(".photo_comment_item").dimmer("show")}).bind(this).apply(null,t)}).catch(o.oe),photoViewer.deleteComment(n,i)):$(this).parents(".confirm-delete").addClass("hidden").hide()}),e.off("click.reportPhoto",".photo-report-btn").on("click.reportPhoto",".photo-report-btn",function(t){t.preventDefault();var o=e.data("photo_id");$(this).hasClass("reported")||photoViewer.reportPhoto(o)}),e.off("click",".photo-admin-remove-btn").on("click",".photo-admin-remove-btn",function(t){t.preventDefault();var o=e.data("photo_id");photoViewer.adminRemovePhoto(o)}),e.off("click.deletePhoto",".photo-delete-btn").on("click.deletePhoto",".photo-delete-btn",function(t){t.preventDefault();var o=e.data("photo_id");photoViewer.deletePhoto(o)}),e.off("click",".photo-comment-read-more").on("click",".photo-comment-read-more",function(t){t.preventDefault(),$(this).parent().find(".photo-comment-read-more").hide(),$(this).parent().find(".review-comment-small").hide(),$(this).parent().find(".review-comment-more").show()}),e.off("keydown",".js_photo_comment_edit_box .photo-comment-edit-textbox").on("keydown",".js_photo_comment_edit_box .photo-comment-edit-textbox",function(t){autoGrow(this)}),e.off("keydown",".photo-comment-edit-textbox").on("keydown",".photo-comment-edit-textbox",function(t){if(!1===SearchHelperNavigate(t))return!1;var e=t.keyCode?t.keyCode:t.which;if(13==e)return!t.shiftKey&&(t.preventDefault(),t.stopPropagation(),$(this).parent().find(".photo-comment-edit-submit").trigger("click"),!1);27==e&&$(this).parent().find(".photo-comment-cancel-submit").trigger("click")}),e.off("input",".photo-comment-edit-textbox").on("input",".photo-comment-edit-textbox",function(t){var e=$(this);InputChange(e)}),e.off("click",".photo-comment-edit-textbox").on("click",".photo-comment-edit-textbox",function(t){setTimeout(function(){$(".tag-search-helper").hide().html("")},200)}),e.off("blur",".photo-comment-edit-textbox").on("blur",".photo-comment-edit-textbox",function(t){setTimeout(function(){$(".tag-search-helper").hide().html("")},200)}),e.off("click",".photo-comment-cancel-submit").on("click",".photo-comment-cancel-submit",function(t){t.preventDefault(),$(this).parents(".photo_comment_item").find(".js_photo_comment_right").show(),$(this).parents(".js_photo_comment_edit_box").remove()}),e.off("click",".js_photo_comment_edit").on("click",".js_photo_comment_edit",function(e){e.preventDefault();var o=$(this).parents(".js_photo_comments_root"),i=$(this).parents(".photo_comment_item"),n=i.find(".js_photo_comment_edit_box");void 0!==n&&0!=n.length||(i.append('<div class="js_photo_comment_edit_box content pl0i mb5"><div contenteditable="true" placeholder="Edit comment..." value="" class="photo-comment-edit-textbox mb5" ></div><div class="clear"></div><img src="'+FLOADING_IMG_SRC+'" class="hidden loading-img" /><div class="mtop0"><a href="#" class="hidden ui basic compact white-background button mr10 photo-comment-edit-submit"><span class="default-text">Submit</span></a><a class="hidden ui basic compact white-background button photo-comment-cancel-submit" href="#">Cancel</a></div></div>'),n=i.find(".js_photo_comment_edit_box")),o.find(".js_photo_comment_edit_box").hide(),o.find(".photo-comment-edit-textbox").html(""),o.find(".js_photo_comment_right").show(),n.find(".photo-comment-edit-textbox").html($(this).parents(".photo_comment_item").find(".review_comment_text").data("text")),AddTagsData($(this).parents(".photo_comment_item").find(".review_comment_text").data("tags"),n.find(".photo-comment-edit-textbox")),$(this).parents(".js_photo_comment_right").hide(),n.show(),i.find(".photo-comment-edit-textbox").focus(),$(this).parents(".photo_comment_item").offset().top,t.container.find(".photo-viewer-comments-container").scrollTop()}),e.off("click",".photo-comment-edit-submit").on("click",".photo-comment-edit-submit",function(t){t.preventDefault();var e=$(this);$(this).addClass("loading");var o=ConstructDbFriendlyTextFromHtml($(this).parents(".js_photo_comment_edit_box").find(".photo-comment-edit-textbox"));return""==o?($(this).removeClass("loading"),void $(this).parents(".photo_comment_item").find(".photo-comment-cancel-submit").trigger("click")):o==$(this).parents(".photo_comment_item").find(".review_comment_text").data("text")?($(this).removeClass("loading"),void $(this).parents(".photo_comment_item").find(".photo-comment-cancel-submit").trigger("click")):void $.ajax({url:HOST+"php/photoViewerHandler?action=update-comment",type:"POST",dataType:"JSON",data:{photo_id:$(this).parents(".photo_comment_item").data("photo_id"),comment_id:$(this).parents(".photo_comment_item").data("comment_id"),comment:o,csrf_token:zomato.csrft},complete:function(t){$(e).removeClass("loading"),$(this).parent().find(".photo-comment-edit-textbox").attr("disabled",!0)},success:function(t){"success"==t.status?$(e).parents(".photo_comment_item").replaceWith(t.html):alert("Something went wrong! Please try again")}})}),void 0!==window.addEventListener&&(window.removeEventListener("popstate",i,!1),window.addEventListener("popstate",i,!1))},close:function(t){$('.tabs [data-tab-name="photos"]').length>0&&("photos"!=$(".tabs [data-tab-name].selected").data("tabName")&&t?$('.tabs [data-tab-name="photos"]').remove():0===$(".parentPhotoBox[data-res_id] img").length&&t&&$(".parentPhotoBox[data-res_id]").parent().html("<div class=\"ptop0\" > Není k dispozici žádná fotka.</div>")),0===$(".parentPhotoBox img").length&&t&&$(".parentPhotoBox").remove();try{if(REFERRER.substring(0,HOST.length)==HOST&&!REFERRER.match(/pv\-[a-zA-Z0-9\-\_]+/))return void(window.location.href=document.referrer)}catch(t){}if(photoViewer.pathname!=HOST||void 0!=photoViewer.no_redirect&&0!=photoViewer.no_redirect)void 0!==window.history.pushState&&void 0!==photoViewer.pathname?window.history.replaceState(null,null,photoViewer.pathname):"newsfeed"!=photoViewer.type&&"journey"!=photoViewer.type&&"user_res"!=photoViewer.type&&"city_feed"!=photoViewer.type?window.location.hash="":window.location=HOST;else if(""==$(document).data("onLoginComplete")&&""==$(document).data("onLoginCancel"))try{"res"==photoViewer.type?window.location.href=photoViewer.pics_json[0].res_url:"rev"==photoViewer.type?window.location.href=photoViewer.pics_json[0].rev_url:"user"==photoViewer.type?window.location.href=photoViewer.pics_json[0].user_url:"liked"==photoViewer.type?window.location.href=photoViewer.pics_json[0].liked_url:"foodography"==photoViewer.type?window.location.href=photoViewer.pics_json[0].foodography_url:"newsfeed"==photoViewer.type||"journey"==photoViewer.type||"city_feed"==photoViewer.type?window.history.replaceState({action:"photo"},null,HOST):"user_res"==photoViewer.type&&window.history.replaceState({action:"photo"},null,HOST)}catch(t){}else void 0!==window.history.pushState?window.history.replaceState(null,null,photoViewer.pathname+"photos"):window.location.hash="";$(".photoviewer-loader").remove(),$("body").css("overflow","scroll"),$(".tipsy").remove(),photoViewer.ajaxLoader.abort(),ajaxPhotoViewerGetData.abort(),photoViewer.images={},photoViewer.pics_json={},photoViewer.user_snippets={},photoViewer.restaurant_snippets={},photoViewer.ajaxRequest=!0,photoViewer.type=void 0,photoViewer.res_id=void 0,photoViewer.user_id=void 0,photoViewer.group_id=void 0,photoViewer.next_img=null,photoViewer.group_id=null,photoViewer.next_index=null,photoViewer._temp_post_data=null,$(document).off("click",".res-photo-thumbnail").on("click",".res-photo-thumbnail",function(t){$(document).off("click",".res-photo-thumbnail"),t.preventDefault();var e=$(this).data("photo_id"),o=$(this).data("type"),i=window.location.href,a=$(this).parents(".photosContainer").data("res_id"),r=$(this).parents(".photosContainer").data("user_id"),p=$(this).parents(".photosContainer").data("group_id");n(e,{origin:"photo_id",type:o,no_redirect:void 0!==$(this).parents(".photosContainer").data("no_redirect")?1:0,pathname:i,res_id:a,user_id:r,group_id:p})})},load:function(t){var e=this;t=t;if(e.container.length&&void 0!==e.pics_json&&Object.keys(e.pics_json).length)return e.pics_json=$.extend(e.pics_json,t.images),e.user_snippets=$.extend(e.user_snippets,t.user_snippets),e.restaurant_snippets=$.extend(e.restaurant_snippets,t.restaurant_snippets),e.loadThumbnails(!0),a(),void e.bindEvents();e.container.length?e.initViewer(t):(void 0===e.container||void 0!==e.container&&0==e.container.length)&&(photoViewer.ajaxLoader=$.ajax({url:HOST+"php/photoViewerHandler?action=get-viewer",type:"POST",dataType:"JSON",data:t,error:function(){$(".photo-viewer-background-cover-contents").html("<div><img src='"+CDN+"images/sad_smiley.png' class='mbot' /></div><div class='photo-viewer-bg-cover-error mbot mtop'>Něco se porouchalo. Nebylo možné otevřít Photo Viewer.</div><span class='btn btn-inline btn-red photo-viewer-bg-cover-close'>Zavřít</span>").css("margin-top","18%"),$(document).data("onLoginComplete","").data("onLoginCancel",""),$(".photo-viewer-bg-cover-close").off("click").on("click",function(t){t.preventDefault(),photoViewer.close()}),$(document).off("keyup.pvbc").on("keyup.pvbc",function(t){t.preventDefault(),t.stopPropagation(),27==t.keyCode&&photoViewer.close()})},complete:function(){},success:function(o){"success"==o.status&&($(".photo-viewer-background-cover-contents").prepend(o.html),e.container=$(".photo-viewer-container"),e.initViewer(t))}}))},initViewer:function(t){this.container.show(),o.e(1).then(function(){var t=[o(4)];(function(){o.e(2).then(function(){var t=[o(5)];(function(){o.e(8).then(function(){var t=[o(9)];(function(){$(".photo-viewer-modal").modal({onVisible:function(){$(".photoviewer-loader").remove(),$(".close-photoviewer-icon").length||$(".photo-viewer-modal").parent().append('<i class="ui remove white icon close-photoviewer-icon cursor-pointer"></i>')},onHide:function(){photoViewer.close()}}).modal("show")}).apply(null,t)}).catch(o.oe)}).apply(null,t)}).catch(o.oe)}).apply(null,t)}).catch(o.oe);var e={images:t.images||{},user_snippets:t.user_snippets,restaurant_snippets:t.restaurant_snippets,initial_index:t.initial_index||0,initial_photo_id:t.initial_photo_id||0,origin:t.origin,type:t.type,res_id:t.res_id,user_id:t.user_id,group_id:t.group_id.replace(/-/g,"."),pathname:t.pathname,no_redirect:t.no_redirect,contest:t.contest,onLoad:t.onLoad||function(){}};void 0===photoViewer.pics_json&&(photoViewer.pics_json={}),photoViewer.pics_json=$.extend(photoViewer.pics_json,e.images),photoViewer.user_snippets=e.user_snippets,photoViewer.restaurant_snippets=e.restaurant_snippets,photoViewer.pathname=e.pathname,photoViewer.no_redirect=e.no_redirect,photoViewer.res_id=e.res_id,photoViewer.type=e.type,photoViewer.user_id=e.user_id,photoViewer.group_id=e.group_id,photoViewer.contest=e.contest,photoViewer.total_photos_count=t.total_photos_count,this.container.find(".tooltip").tipsy();var i=0;if(0!=e.photo_id)i=photoViewer.getIndexOfPhoto(e.initial_photo_id)||0;"user_res"==photoViewer.type&&(i=0),photoViewer.currentIndex=i,photoViewer.loadThumbnails();var n=RegExp(/(.*?)\/(pv-(.*)-(.*))/g);if(window.location.pathname.match(n)){var r=n.exec(window.location.pathname);void 0!==r[4]&&r[4]!=e.initial_photo_id&&(void 0!==window.history.pushState?("res"==photoViewer.type?window.history.replaceState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.res_id+"-"+r[4]):"liked"==photoViewer.type?window.history.replaceState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.user_id+"-"+r[4]):"newsfeed"==photoViewer.type||"journey"==photoViewer.type||"city_feed"==photoViewer.type?window.history.replaceState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.group_id+"-"+r[4]):window.history.replaceState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+r[4]),updateAppleAppUrlMeta("zomato://pv/"+photoViewer.type+"/"+r[4])):"res"==photoViewer.type?window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.res_id+"-"+photoViewer.pics_json[i].image_id:"liked"==photoViewer.type?window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.user_id+"-"+photoViewer.pics_json[i].image_id:"newsfeed"==photoViewer.type||"journey"==photoViewer.type||"city_feed"==photoViewer.type?window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.group_id+"-"+photoViewer.pics_json[i].image_id:window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.pics_json[i].image_id)}else void 0!==window.history.pushState?("res"==photoViewer.type?window.history.pushState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.res_id+"-"+photoViewer.pics_json[i].image_id):"liked"==photoViewer.type?window.history.pushState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.user_id+"-"+photoViewer.pics_json[i].image_id):"newsfeed"==photoViewer.type||"journey"==photoViewer.type||"city_feed"==photoViewer.type?window.history.pushState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.group_id+"-"+photoViewer.pics_json[i].image_id):window.history.pushState({action:"photo"},null,HOST+"photos/pv-"+photoViewer.type+"-"+photoViewer.pics_json[i].image_id),updateAppleAppUrlMeta("zomato://pv/"+photoViewer.type+"/"+photoViewer.pics_json[i].image_id)):"res"==photoViewer.type?window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.res_id+"-"+photoViewer.pics_json[i].image_id:"liked"==photoViewer.type?window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.user_id+"-"+photoViewer.pics_json[i].image_id:"newsfeed"==photoViewer.type||"journey"==photoViewer.type||"city_feed"==photoViewer.type?window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.group_id+"-"+photoViewer.pics_json[i].image_id:window.location.hash="pv-"+photoViewer.type+"-"+photoViewer.pics_json[i].image_id;photoViewer.showImageAtIndex(i),photoViewer.bindEvents(),this.container.focus(),e.onLoad(),$(document).data("onLoginComplete","").data("onLoginCancel",""),initiateLaziness(),a()},initiateEditCaption:function(){var t=this.container.data("photo_id"),e=this.container.data("res_name"),o=$(".photo-caption-text").html();index=this.getIndexOfPhoto(t);var i=this.pics_json[index].with_tags;$(".photo-social-container,.photo-caption-text,.photo-social-buttons,.js-photo-caption-text-more").hide(),$(".photo-caption-textarea").show(),e&&e.length&&$(".tag-restaurant-container").hide(),$("#photo-caption-textbox").data("photo_id",t).data("caption",o).html(o),$("#photo-caption-tagbox").data("photo_id",t).data("with_tags",i).html(i),AddTagsData(photoViewer.pics_json[index].caption_tag_struct_array,$("#photo-caption-textbox")),AddTagsData(photoViewer.pics_json[index].with_tag_struct_array,$("#photo-caption-tagbox")),$(".photo-caption-controls").hide(),$("#tag-restaurant-control").find("input").val($(".photo-added-reference a").text()).addClass("bold")},changeTaggedRestaurant:function(t,e){var o=this;$("#tag-restaurant-button").hide(),o.container.data("res_name"," ");var i=photoViewer.getIndexOfPhoto(t);photoViewer.pics_json[i].res_name=" ",$(".caption-btn-save").addClass("loading"),$.post(HOST+"php/tag_restaurant_with_image.php",{photo_id:t,res_id:e},function(e){if($(".caption-btn-save").removeClass("loading"),"success"==e.status){var i='<a href="'+e.res_url+'" class="at-tags" title="'+e.res_name+'">'+e.res_name+"</a>";$(".photo-added-reference").html(zomato.language.replaceVars("v $1",i)),o.container.data("res_name",e.res_name);var n=photoViewer.getIndexOfPhoto(t);photoViewer.pics_json[n].res_name=e.res_name}else{o.container.data("res_name","");n=photoViewer.getIndexOfPhoto(t);photoViewer.pics_json[n].res_name=""}},"json")}},window.foodographyBindPhotoViewer=function(){$(document.body).off("click",".res-photo-thumbnail").on("click",".res-photo-thumbnail",function(t){$(document).off("click",".res-photo-thumbnail"),t.preventDefault();var e=window.location.href,o=$(this).data("photo_id"),i=$(this).data("type"),a=void 0!==$(this).parents(".photosContainer").data("range")?$(this).parents(".photosContainer").data("range"):"";"foodography"==i&&n(o,{type:i,pathname:e,photo_id:o,date_range:a})})},window.bindPhotoViewer=function(){$(document.body).off("click",".res-photo-thumbnail").on("click",".res-photo-thumbnail",function(t){if($(document).off("click",".res-photo-thumbnail"),!$(this).hasClass("see-more-res-header")){t.preventDefault();var e=window.location.href,o=$(this).data("photo_id"),i=$(this).data("type"),a=void 0!==$(this).parents(".photosContainer").data("no_redirect")?1:0;if("res"==i)n(o,{origin:"photo_id",type:i,pathname:e,res_id:$(this).parents(".photosContainer").data("res_id"),no_redirect:a});else if("newsfeed"==i||"journey"==i||"city_feed"==i){n(o,{origin:"photo_id",type:i,pathname:e,group_id:$(this).parents(".photosContainer").data("group_id"),no_redirect:a})}else if("liked"==i){n(o,{origin:"photo_id",type:i,pathname:e,user_id:$(this).parents(".photosContainer").data("user_id"),no_redirect:a})}else n(o,{origin:"photo_id",type:i,pathname:e,no_redirect:a})}})},$(document).on("zready",function(){var t=$(".res-photo-thumbnail[data-original*='cdninstagram']"),e=!0;t.length||(t=$(".res-photo-thumbnail[src*='cdninstagram']"),e=!1);var o=[],i=[],n=t.length,a=0;t.each(function(t){var p=new Image;i[i.length]=p,p.onerror=function(){if(a++,e)var t=".res-photo-thumbnail[data-original='".concat(this.src,"']");else t="img[src='".concat(this.src,"']");o[o.length]="'".concat($(t).attr("data-photo_id"),"'"),n==a&&r(o)},p.onload=function(){n==++a&&r(o)},p.src=e?$(this).attr("data-original"):this.src});window.location.pathname.split("/").length;$.urlParams=function(t){var e=new RegExp("[?&]"+t+"=([^&#]*)").exec(window.location.href);return null==e?null:e[1]||0};var p=$.urlParams("p_id");if(null!=p){var s=$('img[data-photo_id="'+p+'"]');null!=s&&0!=s.length?s.trigger("click"):window.location.href=HOST+"/photos/pv-user_res-"+p}})}});;
 !function(r){var n={};function o(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=343)}({343:function(e,t,r){var n;n=zomato,"undefined"!=typeof $&&(n._loadedScripts++,$(document).trigger("zready").off("zready"),void 0!==n._totalScripts&&n._totalScripts==n._loadedScripts&&$(document).trigger("zreadyPageScripts"))}});