function_taggedTemplateLiteral(e,t){returnObject.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}functiongup(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");vart="[\\?&]"+e+"=([^&#]*)",n=newRegExp(t),o=n.exec(window.location.href);returnnull===o?"":o[1]}!function(e,t){"object"==typeofmodule&&"object"==typeofmodule.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)thrownewError("jQuery requires a window with a document");returnt(e)}:t(e)}("undefined"!=typeofwindow?window:this,function(e,t){functionn(e){vart=!!e&&"length"ine&&e.length,n=ae.type(e);return"function"===n||ae.isWindow(e)?!1:"array"===n||0===t||"number"==typeoft&&t>0&&t-1ine}functiono(e,t,n){if(ae.isFunction(t))returnae.grep(e,function(e,o){return!!t.call(e,o,e)!==n});if(t.nodeType)returnae.grep(e,function(e){returne===t!==n});if("string"==typeoft){if(be.test(t))returnae.filter(t,e,n);t=ae.filter(t,e)}returnae.grep(e,function(e){returnJ.call(t,e)>-1!==n})}functioni(e,t){for(;(e=e[t])&&1!==e.nodeType;);returne}functiona(e){vart={};returnae.each(e.match(xe)||[],function(e,n){t[n]=!0}),t}functionr(){V.removeEventListener("DOMContentLoaded",r),e.removeEventListener("load",r),ae.ready()}functionl(){this.expando=ae.expando+l.uid++}functions(e,t,n){varo;if(void0===n&&1===e.nodeType)if(o="data-"+t.replace($e,"-$&").toLowerCase(),n=e.getAttribute(o),"string"==typeofn){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Ce.test(n)?ae.parseJSON(n):n}catch(i){}ke.set(e,t,n)}elsen=void0;returnn}functionc(e,t,n,o){vari,a=1,r=20,l=o?function(){returno.cur()}:function(){returnae.css(e,t,"")},s=l(),c=n&&n[3]||(ae.cssNumber[t]?"":"px"),u=(ae.cssNumber[t]||"px"!==c&&+s)&&Ae.exec(ae.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+s||1;doa=a||".5",u/=a,ae.style(e,t,u+c);while(a!==(a=l()/s)&&1!==a&&--r)}returnn&&(u=+u||+s||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],o&&(o.unit=c,o.start=u,o.end=i)),i}functionu(e,t){varn="undefined"!=typeofe.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeofe.querySelectorAll?e.querySelectorAll(t||"*"):[];returnvoid0===t||t&&ae.nodeName(e,t)?ae.merge([e],n):n}functiond(e,t){for(varn=0,o=e.length;o>n;n++)Me.set(e[n],"globalEval",!t||Me.get(t[n],"globalEval"))}functionp(e,t,n,o,i){for(vara,r,l,s,c,p,h=t.createDocumentFragment(),f=[],b=0,m=e.length;m>b;b++)if(a=e[b],a||0===a)if("object"===ae.type(a))ae.merge(f,a.nodeType?[a]:a);elseif(Ne.test(a)){for(r=r||h.appendChild(t.createElement("div")),l=(Pe.exec(a)||["",""])[1].toLowerCase(),s=Oe[l]||Oe._default,r.innerHTML=s[1]+ae.htmlPrefilter(a)+s[2],p=s[0];p--;)r=r.lastChild;ae.merge(f,r.childNodes),r=h.firstChild,r.textContent=""}elsef.push(t.createTextNode(a));for(h.textContent="",b=0;a=f[b++];)if(o&&ae.inArray(a,o)>-1)i&&i.push(a);elseif(c=ae.contains(a.ownerDocument,a),r=u(h.appendChild(a),"script"),c&&d(r),n)for(p=0;a=r[p++];)Ie.test(a.type||"")&&n.push(a);returnh}functionh(){return!0}functionf(){return!1}functionb(){try{returnV.activeElement}catch(e){}}functionm(e,t,n,o,i,a){varr,l;if("object"==typeoft){"string"!=typeofn&&(o=o||n,n=void0);for(lint)m(e,l,n,o,t[l],a);returne}if(null==o&&null==i?(i=n,o=n=void0):null==i&&("string"==typeofn?(i=o,o=void0):(i=o,o=n,n=void0)),i===!1)i=f;elseif(!i)returne;return1===a&&(r=i,i=function(e){returnae().off(e),r.apply(this,arguments)},i.guid=r.guid||(r.guid=ae.guid++)),e.each(function(){ae.event.add(this,t,i,o,n)})}functiong(e,t){returnae.nodeName(e,"table")&&ae.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}functionv(e){returne.type=(null!==e.getAttribute("type"))+"/"+e.type,e}functiony(e){vart=We.exec(e.type);returnt?e.type=t[1]:e.removeAttribute("type"),e}functionw(e,t){varn,o,i,a,r,l,s,c;if(1===t.nodeType){if(Me.hasData(e)&&(a=Me.access(e),r=Me.set(t,a),c=a.events)){deleter.handle,r.events={};for(iinc)for(n=0,o=c[i].length;o>n;n++)ae.event.add(t,i,c[i][n])}ke.hasData(e)&&(l=ke.access(e),s=ae.extend({},l),ke.set(t,s))}}functi
albums.refresh(),visible.photo()&&null!=n&&n!==photo.getID()?lychee["goto"](album.getID()+"/"+n):visible.albums()||lychee["goto"](album.getID());vari={photoIDs:e.join(),albumID:t};api.post("Photo::setAlbum",i,function(e){e!==!0&&lychee.error(null,i,e)})},photo.setStar=function(e){if(!e)return!1;visible.photo()&&(photo.json.star="0"===photo.json.star?"1":"0",view.photo.star()),e.forEach(function(e,t,n){album.json.content[e].star="0"===album.json.content[e].star?"1":"0",view.album.content.star(e)}),albums.refresh();vart={photoIDs:e.join()};api.post("Photo::setStar",t,function(e){e!==!0&&lychee.error(null,t,e)})},photo.setPublic=function(e,t){if("2"===photo.json["public"]){varn=function(){basicModal.close(),lychee["goto"](photo.json.original_album)};returnbasicModal.show({body:"<p>This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.</p>",buttons:{action:{title:"Show Album",fn:n},cancel:{title:"Cancel",fn:basicModal.close}}}),!1}visible.photo()&&(photo.json["public"]="0"===photo.json["public"]?"1":"0",view.photo["public"](),"1"===photo.json["public"]&&contextMenu.sharePhoto(e,t)),album.json.content[e]["public"]="0"===album.json.content[e]["public"]?"1":"0",view.album.content["public"](e),albums.refresh(),api.post("Photo::setPublic",{photoID:e},function(e){e!==!0&&lychee.error(null,params,e)})},photo.setDescription=function(e){vart=photo.json.description,n=function(t){basicModal.close();varn=t.description;visible.photo()&&(photo.json.description=n,view.photo.description());varo={photoID:e,description:n};api.post("Photo::setDescription",o,function(e){e!==!0&&lychee.error(null,o,e)})};basicModal.show({body:lychee.html(_templateObject31,t),buttons:{action:{title:"Set Description",fn:n},cancel:{title:"Cancel",fn:basicModal.close}}})},photo.editTags=function(e){vart="",n="";if(!e)return!1;einstanceofArray==!1&&(e=[e]),visible.photo()?t=photo.json.tags:visible.album()&&1===e.length?t=album.json.content[e].tags:visible.search()&&1===e.length?t=album.json.content[e].tags:visible.album()&&e.length>1&&!function(){varn=!0;e.forEach(function(t,o,i){n=album.json.content[t].tags===album.json.content[e[0]].tags&&n===!0}),n===!0&&(t=album.json.content[e[0]].tags)}(),t=t.replace(/,/g,", ");varo=function(t){basicModal.close(),photo.setTags(e,t.tags)},i=lychee.html(_templateObject32,t);n=1===e.length?lychee.html(_templateObject33,i):lychee.html(_templateObject34,e.length,i),basicModal.show({body:n,buttons:{action:{title:"Set Tags",fn:o},cancel:{title:"Cancel",fn:basicModal.close}}})},photo.setTags=function(e,t){if(!e)return!1;einstanceofArray==!1&&(e=[e]),t=t.replace(/(\ ,\ )|(\ ,)|(,\ )|(,{1,}\ {0,})|(,$|^,)/g,","),t=t.replace(/,$|^,|(\ ){0,}$/g,""),visible.photo()&&(photo.json.tags=t,view.photo.tags()),e.forEach(function(e,n,o){album.json.content[e].tags=t});varn={photoIDs:e.join(),tags:t};api.post("Photo::setTags",n,function(e){e!==!0&&lychee.error(null,n,e)})},photo.deleteTag=function(e,t){varn=void0;n=photo.json.tags.split(","),n.splice(t,1),photo.json.tags=n.toString(),photo.setTags([e],photo.json.tags)},photo.share=function(e,t){varn=photo.getViewLink(e);switch(t){case"twitter":window.open("https://twitter.com/share?url="+encodeURI(n));break;case"facebook":window.open("http://www.facebook.com/sharer.php?u="+encodeURI(n)+"&t="+encodeURI(photo.json.title));break;case"mail":location.href="mailto:?subject="+encodeURI(photo.json.title)+"&body="+encodeURI(n);break;case"dropbox":lychee.loadDropbox(function(){vare=photo.json.title+"."+photo.getDirectLink().split(".").pop();Dropbox.save(photo.getDirectLink(),e)})}},photo.getArchive=function(e){vart=void0,n=api.path+"?function=Photo::getArchive&photoID="+e;t=location.href.indexOf("index.html")>0?location.href.replace(location.hash,"").replace("index.html",n):location.href.replace(location.hash,"")+n,lychee.publicMode===!0&&(t+="&password="+encodeURIComponent(password.value)),location.href=t},photo.getDirectLink=function(){vare="";returnphoto.json&&photo.json.url&&""!==photo.json.url&&(e=photo.json.url),e