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
t+="<p>Photo not found</p>"}returnt+="</div>"},build.uploadModal=function(e,t){varn="";n+=lychee.html(_templateObject21,e);for(varo=0;o<t.length;){vari=t[o];i.name.length>40&&(i.name=i.name.substr(0,17)+"..."+i.name.substr(i.name.length-20,20)),n+=lychee.html(_templateObject22,i.name),o++}returnn+="</div>"},build.tags=function(e){vart="";return""!==e?(e=e.split(","),e.forEach(function(e,n,o){t+=lychee.html(_templateObject23,e,n,build.iconic("x"))})):t="<div class='empty'>No Tags</div>",t},contextMenu={},contextMenu.add=function(e){vart=[{title:build.iconic("image")+"Upload Photo",fn:function(){return$("#upload_files").click()}},{},{title:build.iconic("link-intact")+"Import from Link",fn:upload.start.url},{title:build.iconic("dropbox","ionicons")+"Import from Dropbox",fn:upload.start.dropbox},{title:build.iconic("terminal")+"Import from Server",fn:upload.start.server},{},{title:build.iconic("folder")+"New Album",fn:album.add}];basicContext.show(t,e.originalEvent),upload.notify()},contextMenu.settings=function(e){vart=[{title:build.iconic("person")+"Change Login",fn:settings.setLogin},{title:build.iconic("sort-ascending")+"Change Sorting",fn:settings.setSorting},{title:build.iconic("dropbox","ionicons")+"Set Dropbox",fn:settings.setDropboxKey},{},{title:build.iconic("info")+"About Lychee",fn:function(){returnwindow.open(lychee.website)}},{title:build.iconic("wrench")+"Diagnostics",fn:function(){returnwindow.open("plugins/Diagnostics/")}},{title:build.iconic("align-left")+"Show Log",fn:function(){returnwindow.open("plugins/Log/")}},{},{title:build.iconic("account-logout")+"Sign Out",fn:lychee.logout}];basicContext.show(t,e.originalEvent)},contextMenu.album=function(e,t){if("0"===e||"f"===e||"s"===e||"r"===e)return!1;varn=albums.json&&albums.json.albums&&Object.keys(albums.json.albums).length>1,o=[{title:build.iconic("pencil")+"Rename",fn:function(){returnalbum.setTitle([e])}},{title:build.iconic("collapse-left")+"Merge",visible:n,fn:function(){basicContext.close(),contextMenu.mergeAlbum(e,t)}},{title:build.iconic("trash")+"Delete",fn:function(){returnalbum["delete"]([e])}}];$('.album[data-id="'+e+'"]').addClass("active"),basicContext.show(o,t.originalEvent,contextMenu.close)},contextMenu.albumMulti=function(e,t){multiselect.stopResize();varn=e.length>1,o=albums.json&&albums.json.albums&&Object.keys(albums.json.albums).length>1,i=[{title:build.iconic("pencil")+"Rename All",fn:function(){returnalbum.setTitle(e)}},{title:build.iconic("collapse-left")+"Merge All",visible:o&&n,fn:function(){returnalbum.merge(e)}},{title:build.iconic("collapse-left")+"Merge",visible:o&&!n,fn:function(){basicContext.close(),contextMenu.mergeAlbum(e[0],t)}},{title:build.iconic("trash")+"Delete All",fn:function(){returnalbum["delete"](e)}}];i.push(),basicContext.show(i,t.originalEvent,contextMenu.close)},contextMenu.albumTitle=function(e,t){api.post("Albums::get",{},function(n){varo=[];n.albums&&n.num>1&&($.each(n.albums,function(){vart=this;this.thumbs[0]||(this.thumbs[0]="src/images/no_cover.svg"),""===this.title&&(this.title="Untitled");varn=lychee.html(_templateObject24,this.thumbs[0],this.title);this.id!=e&&o.push({title:n,fn:function(){returnlychee["goto"](t.id)}})}),o.unshift({})),o.unshift({title:build.iconic("pencil")+"Rename",fn:function(){returnalbum.setTitle([e])}}),basicContext.show(o,t.originalEvent,contextMenu.close)})},contextMenu.mergeAlbum=function(e,t){api.post("Albums::get",{},function(n){varo=[];returnn.albums&&n.num>1&&$.each(n.albums,function(){vart=this;this.thumbs[0]||(this.thumbs[0]="src/images/no_cover.svg"),""===this.title&&(this.title="Untitled");varn=lychee.html(_templateObject24,this.thumbs[0],this.title);this.id!=e&&o.push({title:n,fn:function(){returnalbum.merge([e,t.id])}})}),0===o.length?!1:voidbasicContext.show(o,t.originalEvent,contextMenu.close)})},contextMenu.photo=function(e,t){varn=[{title:build.iconic("star")+"Star",fn:function(){returnphoto.setStar([e])}},{title:build.iconic("tag")+"Tags",fn:function(){returnphoto.editTags([e])}},{},{title:build.iconic("pencil")+"Rename",fn
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="",o=photo.getViewLink(e);switch(t){case"twitter":n="https://twitter.com/share?url="+encodeURI(o);break;case"facebook":n="http://www.facebook.com/sharer.php?u="+encodeURI(o)+"&t="+encodeURI(photo.json.title);break;case"mail":n="mailto:?subject="+encodeURI(photo.json.title)+"&body="+encodeURI(o);break;case"dropbox":lychee.loadDropbox(function(){vare=photo.json.title+"."+photo.getDirectLink().split(".").pop();Dropbox.save(photo.getDirectLink(),e)});break;default:n=""}""!==n&&(location.href=n)},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},photo.getViewLink=function(e){vart="view.php?p="+e;returnlocation.href.indexOf("index.html")>0?location.href.replace("index.html"+location.hash,t):location.href.replace(location.hash,t)},search={hash:null},search.find=function(e){clearTimeout($(window).data("timeout")),$(window).data("timeout",setTimeout(function(){0!==header.dom(".header__