lychee/dist/view.js

4 lines
109 KiB
JavaScript
Raw Normal View History

function _taggedTemplateLiteral(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gup(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t="[\\?&]"+e+"=([^&#]*)",n=new RegExp(t),r=n.exec(window.location.href);return null===r?"":r[1]}!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function r(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"!==n&&!me.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function o(e,t,n){return me.isFunction(t)?me.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?me.grep(e,function(e){return se.call(t,e)>-1!==n}):ke.test(t)?me.filter(t,e,n):(t=me.filter(t,e),me.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return me.each(e.match($e)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function u(e){throw e}function c(e,t,n,r){var i;try{e&&me.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&me.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function d(){ne.removeEventListener("DOMContentLoaded",d),e.removeEventListener("load",d),me.ready()}function f(){this.expando=me.expando+f.uid++}function p(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:He.test(e)?JSON.parse(e):e)}function h(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Me,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=p(n)}catch(e){}Pe.set(e,t,n)}else n=void 0;return n}function m(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return me.css(e,t,"")},l=s(),u=n&&n[3]||(me.cssNumber[t]?"":"px"),c=(me.cssNumber[t]||"px"!==u&&+l)&&Ie.exec(me.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do{o=o||".5",c/=o,me.style(e,t,c+u)}while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}function g(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ue[r];return i||(t=n.body.appendChild(n.createElement(r)),i=me.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ue[r]=i,i)}function v(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=qe.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&We(r)&&(i[o]=g(r))):"none"!==n&&(i[o]="none",qe.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function b(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&i(e,t)?me.merge([e],n):n}function y(e,t){for(var n=0,r=e.length;n<r;n++)qe.set(e[n],"globalEval",!t||qe.get(t[n],"globalEval"))}function x(e,t,n,r,i){for(var o,a,s,l,u,c,d=t.createDocumentFragment(),f=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===me.type(o))me.merge(f,o.nodeType?[o]:o);else if(Ge.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(Xe.exec(o)||["",""])[1].toLowerCase(),l=Ve[s]||Ve._default,a.innerHTML=l[1]+me.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;me.merge(f,a.childNodes),a=d.firstChild,a.textContent=""}else f.push(t.createTextNode(o));for(d.textContent="",p=0;o=f[p++];)if(r&&me.inArray(o,r)>-1)i&&i.push(o);else if(u=me.contains(o.ownerDocument,o),a=b(d.appendChild(o),"script"),u&&y(a),n)for(c=0;o=a[c++];)Ye.test(o.type||"")&&n.push(o);return d}function w(){return!0}function T(){return!1}function C(){try{return ne.activeElement}catch(e){}}function _(e,t,n,r,i,o){var a,s;if("object"==typeof t){
;return n&&n.slice(1)===t.id},root:function(e){return e===N},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(y in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[y]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(y);for(y in{submit:!0,reset:!0})w.pseudos[y]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(y);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,_=t.tokenize=function(e,n){var r,i,o,a,s,l,u,c=B[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=w.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in w.filter)!(i=de[a].exec(s))||u[a]&&!(i=u[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,l).slice(0)},k=t.compile=function(e,t){var n,r=[],i=[],o=U[e+" "];if(!o){for(t||(t=_(e)),n=t.length;n--;)o=v(t[n]),o[M]?r.push(o):i.push(o);o=U(e,b(i,r)),o.selector=e}return o},j=t.select=function(e,t,n,r){var i,o,a,s,l,c="function"==typeof e&&e,f=!r&&_(e=c.selector||e);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&L&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(ve,be),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=de.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(ve,be),ge.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&d(o)))return Q.apply(n,r),n;break}}return(c||k(e,f))(r,t,!L,n,!t||ge.test(e)&&u(t.parentNode)||t),n},x.sortStable=M.split("").sort(z).join("")===M,x.detectDuplicates=!!S,$(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(A.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);me.find=xe,me.expr=xe.selectors,me.expr[":"]=me.expr.pseudos,me.uniqueSort=me.unique=xe.uniqueSort,me.text=xe.getText,me.isXMLDoc=xe.isXML,me.contains=xe.contains,me.escapeSelector=xe.escape;var we=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&me(e).is(n))break;r.push(e)}return r},Te=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==
t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=me.timers,a=qe.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&vt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||me.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=qe.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=me.timers,a=r?r.length:0;for(n.finish=!0,me.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),me.each(["toggle","show","hide"],function(e,t){var n=me.fn[t];me.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(W(t,!0),e,r,i)}}),me.each({slideDown:W("show"),slideUp:W("hide"),slideToggle:W("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){me.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),me.timers=[],me.fx.tick=function(){var e,t=0,n=me.timers;for(ht=me.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||me.fx.stop(),ht=void 0},me.fx.timer=function(e){me.timers.push(e),me.fx.start()},me.fx.interval=13,me.fx.start=function(){mt||(mt=!0,I())},me.fx.stop=function(){mt=null},me.fx.speeds={slow:600,fast:200,_default:400},me.fn.delay=function(t,n){return t=me.fx?me.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=ne.createElement("input"),t=ne.createElement("select"),n=t.appendChild(ne.createElement("option"));e.type="checkbox",pe.checkOn=""!==e.value,pe.optSelected=n.selected,e=ne.createElement("input"),e.value="t",e.type="radio",pe.radioValue="t"===e.value}();var bt,yt=me.expr.attrHandle;me.fn.extend({attr:function(e,t){return Le(this,me.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){me.removeAttr(this,e)})}}),me.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?me.prop(e,t,n):(1===o&&me.isXMLDoc(e)||(i=me.attrHooks[t.toLowerCase()]||(me.expr.match.bool.test(t)?bt:void 0)),void 0!==n?null===n?void me.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=me.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&"radio"===t&&i(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match($e);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),bt={set:function(e,t,n){return!1===t?me.removeAttr(e,n):e.setAttribute(n,n),n}},me.each(me.expr.match.bool.source.match(/\w+/g),function(e,t){var n=yt[t]||me.find.attr;yt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=yt[a],yt[a]=i,i=null!=n(e,t,r)?a:null,yt[a]=o),i}});var xt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;me.fn.extend({prop:function(e,t){return Le(this,me.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[me.propFix[e]||e]})}}),me.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&me.isXMLDoc(e)||(t=me.propFix[t]||t,i=me.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=me.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),pe.optSelected||(me.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),me.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){me.pro
;var _templateObject=_taggedTemplateLiteral(["<svg class='iconic $","'><use xlink:href='#$","' /></svg>"],["<svg class='iconic $","'><use xlink:href='#$","' /></svg>"]),_templateObject2=_taggedTemplateLiteral(["<div class='divider'><h1>$","</h1></div>"],["<div class='divider'><h1>$","</h1></div>"]),_templateObject3=_taggedTemplateLiteral(["<div id='$","' class='edit'>","</div>"],["<div id='$","' class='edit'>","</div>"]),_templateObject4=_taggedTemplateLiteral(["<div id='multiselect' style='top: $","px; left: $","px;'></div>"],["<div id='multiselect' style='top: $","px; left: $","px;'></div>"]),_templateObject5=_taggedTemplateLiteral(["\n\t <div class='album' data-id='$","'>\n\t <img src='$","' width='200' height='200' alt='Photo thumbnail' data-overlay='false' draggable='false'>\n\t <img src='$","' width='200' height='200' alt='Photo thumbnail' data-overlay='false' draggable='false'>\n\t <img src='$","' srcset='$"," 1.5x' width='200' height='200' alt='Photo thumbnail' data-overlay='$","' draggable='false'>\n\t <div class='overlay'>\n\t <h1 title='$","'>$","</h1>\n\t <a>$","</a>\n\t </div>\n\t "],["\n\t <div class='album' data-id='$","'>\n\t <img src='$","' width='200' height='200' alt='Photo thumbnail' data-overlay='false' draggable='false'>\n\t <img src='$","' width='200' height='200' alt='Photo thumbnail' data-overlay='false' draggable='false'>\n\t <img src='$","' srcset='$"," 1.5x' width='200' height='200' alt='Photo thumbnail' data-overlay='$","' draggable='false'>\n\t <div class='overlay'>\n\t <h1 title='$","'>$","</h1>\n\t <a>$","</a>\n\t </div>\n\t "]),_templateObject6=_taggedTemplateLiteral(["\n\t\t <div class='badges'>\n\t\t <a class='badge $"," icn-star'>","</a>\n\t\t <a class='badge $"," icn-share'>","</a>\n\t\t <a class='badge $","'>","</a>\n\t\t <a class='badge $","'>","</a>\n\t\t <a class='badge $","'>","</a>\n\t\t </div>\n\t\t "],["\n\t\t <div class='badges'>\n\t\t <a class='badge $"," icn-star'>","</a>\n\t\t <a class='badge $"," icn-share'>","</a>\n\t\t <a class='badge $","'>","</a>\n\t\t <a class='badge $","'>","</a>\n\t\t <a class='badge $","'>","</a>\n\t\t </div>\n\t\t "]),_templateObject7=_taggedTemplateLiteral(["\n\t <div class='photo' data-album-id='$","' data-id='$","'>\n\t <img src='$","' srcset='$"," 1.5x' width='200' height='200' alt='Photo thumbnail' draggable='false'>\n\t <div class='overlay'>\n\t <h1 title='$","'>$","</h1>\n\t "],["\n\t <div class='photo' data-album-id='$","' data-id='$","'>\n\t <img src='$","' srcset='$"," 1.5x' width='200' height='200' alt='Photo thumbnail' draggable='false'>\n\t <div class='overlay'>\n\t <h1 title='$","'>$","</h1>\n\t "]),_templateObject8=_taggedTemplateLiteral(["<a><span title='Camera Date'>","</span>$","</a>"],["<a><span title='Camera Date'>","</span>$","</a>"]),_templateObject9=_taggedTemplateLiteral(["<a>$","</a>"],["<a>$","</a>"]),_templateObject10=_taggedTemplateLiteral(["\n\t\t <div class='badges'>\n\t\t <a class='badge $"," icn-star'>","</a>\n\t\t <a class='badge $"," icn-share'>","</a>\n\t\t </div>\n\t\t "],["\n\t\t <div class='badges'>\n\t\t <a class='badge $"," icn-star'>","</a>\n\t\t <a class='badge $"," icn-share'>","</a>\n\t\t </div>\n\t\t "]),_templateObject11=_taggedTemplateLiteral(["<img id='image' class='$","' src='$","' draggable='false'>"],["<img id='image' class='$","' src='$","' draggable='false'>"]),_templateObject12=_taggedTemplateLiteral(["<img id='image' class='$","' src='$","' srcset='$"," 1920w, $"," $","w' draggable='false'>"],["<img id='image' class='$","' src='$","' srcset='$"," 1920w, $"," $","w