/* jQuery v3.6.1 | https://jquery.com/ */ /*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !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(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 01,i=c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(u.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),u.a=function(t){t=c(t),i.push.apply(i,t)},u.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},u.f=function(t){for(var e=0;ee.top&&-ne.left&&-n=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;at||!a.enableThrottle||u?l():n=setTimeout(l,t-f)}}function p(){--z,i.length||z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"===a.bind||o?f():n(t).on(D+"."+l,f)}function a(a,o){var u=this,l=n.extend({},u.config,o),f={},c=l.name+"-"+ ++i;return u.config=function(t,r){return r===e?l[t]:(l[t]=r,u)},u.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),u},u.getItems=function(){return f.g?f.g():{}},u.update=function(t){return f.e&&f.e({},!t),u},u.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),u},u.loadAll=function(){return f.e&&f.e({all:!0},!0),u},u.destroy=function(){return n(l.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(u,l,a,f,c),l.chainable?a:u}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=a.prototype.config,u=o._f||(o._f={}),l=0,f=t.length;l li[data-cod="'+navigator_language+'"]').length){cod_lang=navigator_language;$('._select3_b > ._select3_b_active').removeClass('_select3_b_active');$('._select3_b > li[data-cod="'+cod_lang+'"]').addClass('_select3_b_active');}}} var hash=window.location.hash.substr(1);if(hash){var pairs=hash.split('&');for(var i=0;i ._select3_b_active').removeClass('_select3_b_active');$('._select3_b > li[data-cod="'+cod_lang+'"]').addClass('_select3_b_active');}else if(key==='id_menu'&&parseInt(value)){id_menu=parseInt(value);}else if(key==='timestamp'){if(Date.now()-parseInt(value)<1000*60*60*24){mostrar_menus_ocultos=true;}}}} if(window.location.href.indexOf('devel.html')!==-1){mostrar_menus_ocultos=true;} if(cod_lang=='ar'){$('.global','.container_menu').addClass('global--rtl');} var pixel=$('.global').data('pixel');if(iframed){window.history.replaceState(null,document.title,window.location.pathname);}else{if(window.external_domain){window.history.replaceState({id_menu:null},document.title,'/'+(window.location.href.indexOf('devel.html')!==-1?'devel.html':''));}else{window.history.replaceState({id_menu:null},document.title,'/'+$('.global').data('cod_restaurant')+'/'+(window.location.href.indexOf('devel.html')!==-1?'devel.html':''));} if(id_menu){window.history.pushState({id_menu:id_menu},document.title);}} $('.sprite_copy').click(function(){navigator.clipboard.writeText($(this).data('text'));$('.wifi_password').addClass('hint--left').addClass('hint--always');setTimeout(function(){$('.wifi_password').removeClass('hint--left').removeClass('hint--always');},3000);});var url_media=$('.global').data('url_media');function get_day_number(){var local_date=new Date(new Date().toLocaleString('en-US',{timeZone:$('.global').data('time_zone')}));var day_number=local_date.getDay();if(day_number===0){day_number=7;} return day_number;} var num_decimals=$('.global').data('num_decimals');var currency_decimal='.';var currency_millards='';if($('.global').data('currency_millards')||$('.global').data('currency_decimal')){currency_millards=$('.global').data('currency_millards');currency_decimal=$('.global').data('currency_decimal');} function price(price){var temp=price.toFixed(2).replace('.',currency_decimal).replace(/\B(?=(\d{3})+(?!\d))/g,currency_millards);return $('#currency_sample').text().replace('0.00',temp);} function get_reason_menu_is_hidden(menu){var local_date=new Date(new Date().toLocaleString('en-US',{timeZone:$('.global').data('time_zone')}));var local_minutes=local_date.getHours()*60+local_date.getMinutes();var buena_hora=!menu.time_period_n;if(menu.time_period_n){var time_period_n=menu.time_period_n.split(';');for(var i=0;i=time_period[0]&&local_minutes<=time_period[1]){buena_hora=true;break;}}} if(menu.visible!=1){return'hidden';}else if(menu.day_n.charAt(get_day_number()-1)!=1){return'no_this_day';}else if(!buena_hora){return'no_this_time';} return null;} function create_menu(menu){var i18n=menu.i18n[cod_lang];var li=$('#property_menu_li').clone();$('.property_menu_title',li)[0].innerHTML=htmlspecialchars(i18n.title);$('.menu_icon',li).html($('.masterianos #menu_icon_n [data-id_menu_icon="'+menu.id_menu_icon+'"]').html());var menu_is_hidden=get_reason_menu_is_hidden(menu);if(menu_is_hidden){if(!mostrar_menus_ocultos){return false;} $('.property_menu_hidden',li).html(i18n_json['menu_status_'+menu_is_hidden][$('.global').data('main_cod_lang')]);}else{$('.property_menu_hidden',li).remove();} var html='
  • '+li.html()+'
  • ';$('.property_menu_n').append(html);} function htmlspecialchars(str){if(typeof(str)!='string'){return'';} var map={'&':'&','<':'<','>':'>','"':'"',"'":'''};str=str.replace(/[&<>"']/g,function(m){return map[m];});str=str.replace(/\n+$/,'');str=str.replace(/\n/g,'
    ');return str;} function create_menu_section(menu_section){var i18n;if(typeof(menu_section.i18n[cod_lang])=='undefined'){i18n=menu_section.i18n[Object.keys(menu_section.i18n)[0]];}else{i18n=menu_section.i18n[cod_lang];} var li=$('#selector_menu_section_n').clone();$('.selector_menu_section_title',li)[0].innerHTML=htmlspecialchars(i18n.title);var html='
  • '+li.html()+'
  • ';$('.caballo .selector_menu_section_n').append(html);li=$('#menu_section_n').clone();$('.menu_section_title',li)[0].innerHTML=htmlspecialchars(i18n.title);$('.menu_section_text',li)[0].innerHTML=htmlspecialchars(i18n.text);html='
  • '+li.html()+'
  • ';$('.caballo .menu_section_n').append(html);} var i18n_json=document.getElementById('i18n_json').innerText.trim();if(i18n_json){i18n_json=JSON.parse(i18n_json);} var restaurant_property_i18n={};if($('#restaurant_property_i18n').length){restaurant_property_i18n=$('#restaurant_property_i18n')[0].innerText.trim();restaurant_property_i18n=JSON.parse(restaurant_property_i18n);} function create_menu_section_dish(menu_section_dish){var i18n;if(typeof(menu_section_dish.i18n[cod_lang])=='undefined'){i18n=menu_section_dish.i18n[Object.keys(menu_section_dish.i18n)[0]];}else{i18n=menu_section_dish.i18n[cod_lang];} var li=$('#sucumbe').clone();$('.menu_section_dish_title_value',li)[0].innerHTML=htmlspecialchars(i18n.title);if(i18n.text){$('.menu_section_dish_text',li)[0].innerHTML=htmlspecialchars(i18n.text);}else{$('.menu_section_dish_text',li).remove();} var num_precios=0;for(var i=1;i<=4;i++){if(menu_section_dish['price_'+i]){num_precios++;}} for(i=1;i<=4;i++){if(menu_section_dish['price_'+i]){$('[data-price_variant="'+i+'"]',li).data('price_raw',menu_section_dish['price_'+i]);$('[data-price_variant="'+i+'"] .nowrap',li).html(price(menu_section_dish['price_'+i]));if(!i18n['price_'+i]&&num_precios>1){i18n['price_'+i]=i18n_json['price_'+i+'_title'][cod_lang];} if(i18n['price_'+i]){$('[data-price_variant="'+i+'"] .price_text',li)[0].innerHTML=htmlspecialchars(i18n['price_'+i]+':');}else{$('[data-price_variant="'+i+'"] .price_text',li).remove();}}else{$('[data-price_variant="'+i+'"]',li).remove();}} if(!$('.menu_section_dish_price',li).length){$('.menu_section_dish_price',li).remove();} if(menu_section_dish.image){var url=url_media+menu_section_dish.image+'6x.'+extension;var img=''+i18n.title+'';$('.menu_section_dish_right',li).html(img);url=url_media+menu_section_dish.image+'2c.'+extension;$('.menu_section_dish_right',li).attr('data-img_big',url);}else{$('.menu_section_dish_right',li).remove();} if(menu_section_dish.label_n){menu_section_dish.label_n.forEach(function(value,key){var img=$('.masterianos #dish_label_n [data-id_dish_label="'+value+'"] .image');var title=i18n_json['label_'+(value.toString().padStart(3,'0'))][cod_lang];$('img',img).attr('alt',title);$('.labels',li).append(img.html());});}else{$('.labels',li).remove();} if(menu_section_dish.property_n){menu_section_dish.property_n.forEach(function(value,key){var title=i18n_json['allergen_'+(value.toString().padStart(3,'0'))][cod_lang];$('.alergenos_ul',li).append('
  • '+title+'
  • ');});} if(menu_section_dish.restaurant_property_n&&typeof(restaurant_property_i18n)=='object'){menu_section_dish.restaurant_property_n.forEach(function(value,key){if(typeof(restaurant_property_i18n[value])!='undefined'){var title=null;if(typeof(restaurant_property_i18n[value][cod_lang])=='undefined'){if(typeof(restaurant_property_i18n[value].en)!='undefined'){title=restaurant_property_i18n[value].en;}else{title=Object.values(restaurant_property_i18n[value])[0];}}else{title=restaurant_property_i18n[value][cod_lang];} $('.alergenos_ul',li).append('
  • '+title+'
  • ');}});} if(!$('.alergenos_ul > li',li).length){$('.alergenos',li).remove();} return'
  • '+li.html()+'
  • ';} var paco='';var home_iniciada=false;function show_or_hide_the_search_button(){var show_it=false;for(var key_menu=0;key_menu [data-id_menu="'+id_menu+'"]').data('hash')){$('.property_menu_n > [data-id_menu="'+id_menu+'"]').data('hash',found);if(!home_iniciada){init_home();} init_menu();if($('.popup_bigger:visible').length){if($('[data-id_menu_section_dish="'+id_menu_section_dish+'"]').length){$('[data-id_menu_section_dish="'+id_menu_section_dish+'"]').click();}else{popup_close($('.popup_bigger'));}}}}else{id_menu=null;id_menu_section_dish=null;} $('.global').scrollTop(scrolled);} if(!id_menu){scrolled=$('.global').scrollTop();home_iniciada=true;init_home();$('.global').scrollTop(scrolled);} rebuild_home();if($('.global--one').length){if($('.property_menu_n > li').length==1){if(id_menu!=$('.property_menu_n > li:first-child').data('id_menu')){id_menu=null;init_home();}}else{id_menu=null;init_home();}}}});} if(window.innerWidth>=768){$('.qr img').attr('src',$('.qr img').data('src'));} if($('.go_to_ratings').length){$.ajax({type:'GET',dataType:'json',url:$('.global').data('url_reviews_json'),cache:false,timeout:15000,success:function(data,textStatus,jqXHR){init_valorations(data);if(typeof(data.review_n)=='undefined'){$('.go_to_ratings').remove();}else{data=data.review_n;if(data.length>=5){$('.view_google_reviews','.container_menu').show();} var template=$('.valorations > ul > li:last').clone();for(var i=0;i ul').append('
  • '+template.html()+'
  • ');}}}}).fail(function(jqXHR,textStatus,errorThrown){$('.go_to_ratings').remove();});} function init_valorations(data){if(data.num_valorations){if(data.stars>=4.5){rating=1;}else if(data.stars>=4){rating=2;}else if(data.stars>=3.5){rating=3;}else{rating=null;} if(rating){$('.go_to_ratings .qq_title').html(data.stars+' ยท '+i18n_json['rating_'+rating][cod_lang]+'');}else{$('.go_to_ratings .qq_title').html(data.stars);} if(data.num_valorations==1){$('.go_to_ratings .num_valorations_number').remove();$('.go_to_ratings .num_valorations_text').attr('data-i18n_json','num_valoraciones_1').html(i18n_json.num_valoraciones_1[cod_lang]);}else{$('.go_to_ratings .num_valorations_number').html(data.num_valorations);$('.go_to_ratings .num_valorations_text').attr('data-i18n_json','num_valoraciones_n').html(i18n_json.num_valoraciones_n[cod_lang]);} $('.stats_summary .stars_on').data('percent',data.stars / 5*100);$('.stats_summary .stats_summary_title').html(data.stars);$('.stats_summary .stats_summary_subtitle').html('('+data.num_valorations+')');$('.stats_summary .num_google_reviews').data('i18n_replace',data.num_valorations);$('.stats_summary .num_google_reviews').html(i18n_json.x_reviews[cod_lang].replace('[var]',data.num_valorations));if(typeof(data.service_n)!='undefined'){for(var i=0;i li:eq('+i+')').data('percent',data.service_n[i]/ 5*100);$('.stats_summary .servicio_n > li:eq('+i+') .servicio_value').html(data.service_n[i]);}}}else{$('.go_to_ratings, .popup_stats').remove();}} document.addEventListener('visibilitychange',function(){if(document.visibilityState==='visible'){garrofa();}});function iniciar_intervalo_garrofa(seconds){el_id_del_intervalo=setInterval(function(){if(document.visibilityState=='hidden'){return false;} num_peticiones++;if(num_peticiones==100){clearInterval(el_id_del_intervalo);iniciar_intervalo_garrofa(60);}else if(num_peticiones==200){clearInterval(el_id_del_intervalo);iniciar_intervalo_garrofa(600);} garrofa();},seconds*1000);} if(!$('.popup_too_many_visits').length){var num_peticiones=0;var el_id_del_intervalo=null;iniciar_intervalo_garrofa(mostrar_menus_ocultos?5:60);} window.addEventListener('beforeinstallprompt',function(event){event.preventDefault();});var sticky_top=0;var last_scroll=0;var last_sticky_top=0;function init_menu_section_dish(el){id_menu_section_dish=parseInt($(el).data('id_menu_section_dish'));if($('.bigger_image img').attr('src')!=$('.bigger_image').data('no_image')){$('.bigger_image img').attr('src',pixel);} if($('.menu_section_dish_right',el).length){$('.bigger_image img').attr('src',$('.menu_section_dish_right',el).data('img_big'));$('.bigger_image').show();}else{$('.bigger_image').hide();} $('.bigger_image img').css('aspect-ratio','414 / 276');var html=window.htmlspecialchars($('.menu_section_dish_title',el).text());var num_prices=$('.menu_section_dish_price > li',el).length;$('.bigger_price').hide().html('').removeClass('bigger_price--one_line').removeClass('bigger_price--multi_line');if(!num_prices){}else if(num_prices==1&&!$('.price_text',el).length){$('.bigger_price').addClass('bigger_price--one_line');} $('.bigger_price').removeClass('bigger_price--multi_line');$('.bigger_price').html($('.menu_section_dish_price',el).html()).show();$('.bigger_title').html(html);if($('.menu_section_dish_text',el).length){$('.bigger_text').html($('.menu_section_dish_text',el).html()).show();}else{$('.bigger_text').html('').hide();} if($('.alergenos',el).length){$('.bigger_allergens').html($('.alergenos',el)[0].outerHTML).show();}else{$('.bigger_allergens').html('').hide();} if($('.labels img',el).length){html='';$('.labels img',el).each(function(){html+='
  • '+$(this).prop('outerHTML')+$(this).attr('alt')+'
  • ';});$('.bigger_labels').html(html).show();}else{$('.bigger_labels').html('').hide();} $('.bigger_image .lazy').lazy({effect:'fadeIn',effectTime:250,visibleOnly:true,});if(!$('.bigger_price').hasClass('bigger_price--one_line')){$('.bigger_price').addClass('bigger_price--multi_line');} if(!$('.popup_bigger:visible').length){popup_open($('.popup_bigger'));} if(!$('.bigger_price').hasClass('bigger_price--one_line')){$('.bigger_price').removeClass('bigger_price--multi_line');if($('.bigger_price')[0].scrollHeight>parseFloat(window.getComputedStyle($('.bigger_price')[0]).lineHeight)){$('.bigger_price').addClass('bigger_price--multi_line');}}} var posiciones=[];function set_posiciones(){posiciones=[];$('.menu_section_n > li','.caballo').each(function(){posiciones.push(Math.floor($('.global').scrollTop()+$(this).offset().top));});} setInterval(function(){set_posiciones();},1000);function init_menu(){for(var key_menu=0;key_menu';$('.image_n',div).append('
  • '+img+'
  • ');} $('.selector_menu_section',div).remove();}else{$('.image_n',div).remove();} var html='
    '+div.html()+'';$('.popup_bigger').after(html);if(typeof(menu.section_n)!='undefined'){for(key_menu_section=0;key_menu_section li:eq('+key_menu_section+') .menu_section_dish_n').append(html);}} $('.menu_title .sprite_back').click(function(){id_menu=null;id_menu_section_dish=null;if(!iframed){window.history.back();} $('.caballo').remove();$('.paloma').show();});$('.menu_title .sprite_search').click(function(){$('.search_trigger').click();});var menu_is_hidden=get_reason_menu_is_hidden(menu);if(menu_is_hidden){$('.caballo .menu_title_aux').append('');} calcula_altura_precios('.caballo');read_more_magic('.caballo');if($('.selector_menu_section_n > li').length<=1){$('.selector_menu_section').hide();}else{$('.selector_menu_section').show();} set_posiciones();$('.lazy','.caballo').lazy({effect:'fadeIn',effectTime:250,visibleOnly:true,appendScroll:$('.global'),});$('.selector_menu_section_n, nav','.caballo').each(function(){if(!$(this).hasClass('draggable_setup')){$(this).addClass('draggable_setup');var slider=this;var mouse_down=false;var start_x,scrollLeft;var start_dragging=function(e){mouse_down=true;start_x=e.pageX-slider.offsetLeft;scrollLeft=slider.scrollLeft;};var stop_dragging=function(){mouse_down=false;};slider.addEventListener('mousemove',function(e){e.preventDefault();if(!mouse_down){return;} var x=e.pageX-slider.offsetLeft;var scroll=x-start_x;slider.scrollLeft=scrollLeft-scroll;});slider.addEventListener('mousedown',start_dragging,false);slider.addEventListener('mouseup',stop_dragging,false);slider.addEventListener('mouseleave',stop_dragging,false);}});$('.selector_menu_section_n > li','.caballo').click(function(){var restar=$('.global').offset().top+$('.caballo .sticky').height();var index_visible=$(this).prevAll().length;if(!$('.global--one').length){if(index_visible>$('.caballo .selector_menu_section_n > li.active').prevAll().length){restar-=$('.caballo .menu_title').outerHeight();}} $('.global').stop().animate({scrollTop:posiciones[index_visible]-restar},250);});$('.menu_section_dish_n > li','.caballo').click(function(){init_menu_section_dish(this);});var menu_section_n_padding_bottom=0;menu_section_n_padding_bottom+=$('.global').offset().top*2;if($('.global--one').length){menu_section_n_padding_bottom+=$('.sticky','.caballo').outerHeight();}else{menu_section_n_padding_bottom+=$('.selector_menu_section','.caballo').outerHeight();} menu_section_n_padding_bottom+=$('.menu_section_n > li:last-child','.caballo').outerHeight();$('.menu_section_n','.caballo').css('padding-bottom','calc(100dvh - '+menu_section_n_padding_bottom+'px)');if($('.selector_menu_section_n','.caballo').length){$('.global').scroll();}} $('.global').scroll(function(){if(!id_menu||!$('.caballo:visible').length){return false;} var scroll=$('.global').scrollTop()+$('.global').offset().top;if($('.global--one').length){if($('.caballo').position().top-$('header','.caballo').outerHeight()<1){$('header','.caballo').fadeIn('fast');}else{$('header','.caballo').fadeOut('fast');} sticky_top=last_sticky_top=0;}else{if(last_scroll>scroll){sticky_top-=last_scroll-scroll;}else{sticky_top+=scroll-last_scroll;} if(sticky_top<0){sticky_top=0;}else if(sticky_top>$('.menu_title','.caballo').outerHeight()){sticky_top=$('.menu_title','.caballo').outerHeight();} if(last_sticky_top!=sticky_top){$('.sticky','.caballo').css('top',sticky_top*-1);last_sticky_top=sticky_top;}} last_scroll=scroll;var $el=null;for(var i=posiciones.length-1;i>=0;i--){if(posiciones[i] li','.caballo').eq(i);break;}} if($el===null&&$('.selector_menu_section_n > li','.caballo').length){$el=$('.selector_menu_section_n > li','.caballo').eq(0);} if($el!==null&&!$el.hasClass('active')){$('.selector_menu_section_n > li.active','.caballo').removeClass('active');$el.addClass('active');if($el.position().left+$el.width()+$('.sticky','.caballo').height()>$('.caballo').width()){var scroll_left=$('.selector_menu_section_n','.caballo').scrollLeft()+$el.position().left-$('.caballo').width()+$el.width()+$('.sticky','.caballo').height();$('.selector_menu_section_n','.caballo').stop().animate({scrollLeft:scroll_left},250);}else if($el.position().left<50){$('.selector_menu_section_n','.caballo').stop().animate({scrollLeft:$('.selector_menu_section_n','.caballo').scrollLeft()+$el.position().left-50},250);}}});function set_global_one(){if($('.property_menu_n > li').length==1&&$('.global').data('activar_menu_unico')){$('.property_menu_n').hide();$('.global').addClass('global--one');$('.property_menu_n > li:first-child').click();}else{if($('.property_menu_n > li').length){$('.global').removeData('activar_menu_unico');} $('.property_menu_n').show();$('.global').removeClass('global--one');}} function rebuild_home(){$('.property_menu_n').html('');for(var key_menu=0;key_menu li').click(function(e){e.preventDefault();id_menu=$(this).data('id_menu');if(!iframed){window.history.pushState({id_menu:id_menu},document.title);} init_menu();});} function init_home(){document.title=$('.property_name').text().replace(/(\r\n|\n|\r)/gm,'');$('.caballo').remove();$('.paloma').show();read_more_magic($('.paloma'));$('.paloma').data('iniciado',true);rebuild_home();set_global_one();} $('.valorations_list_stars .xprite').mouseenter(function(){var container=$(this).parents('.valorations_list_stars');$('.xprite',container).removeClass('active');var num_star=$(this).index();for(i=0;i<=num_star;i++){$('.xprite:eq('+i+')',container).addClass('active');}}).mouseleave(function(){var container=$(this).parents('.valorations_list_stars');$('.xprite',container).removeClass('active');if($(container).data('num_star')){for(i=0;i<$(container).data('num_star');i++){$('.xprite:eq('+i+')',container).addClass('active');}}}).click(function(){var pending_to_star=$('.valorations_list > li').length;$('.valorations_list > li').each(function(){if($('.active',this).length){pending_to_star--;}});var container=$(this).parents('.valorations_list_stars');var num_star=$(this).index();$(container).data('num_star',num_star+1);if(pending_to_star==0){$('.valoration_step_2').show();auto_resize_popup($('.popup_valoration')[0]);}});function auto_resize_popup(popup){var height=$('.popup_content',popup).height();$('.popup_content',popup).css('height','auto');var new_height=$('.popup_content',popup).height();$('.popup_content',popup).css('height',height);$('.popup_content',popup).stop().animate({height:new_height,},250);} $('.valora').click(function(e){if($(this).data('google_place_id')){window.open('https://search.google.com/local/writereview?placeid='+$(this).data('google_place_id'),'_blank');}else{e.stopPropagation();$('.valorations_list_stars').data('num_star','');$('.valorations_list_stars .active').removeClass('active');$('.valoration_step_2').hide();$('.popup_valoration .popup_header').show();$('textarea').val('');$('.a').show();$('.b').hide();popup_open($('.popup_valoration'));}});$('.valoration_button').click(function(){var aspecto_n='';$('.valorations_list > li').each(function(){var num_star=$('.valorations_list_stars',this).data('num_star');if(num_star){aspecto_n+=$(this).data('name')+':'+num_star+';';}});if(aspecto_n){$.ajax({type:'POST',url:'https://app.nordqr.com/en/set_valorations/ajax',data:{cod_qr:$('.global').data('cod_qr'),aspecto_n:aspecto_n,comment:$('#comment').val(),timestamp:timestamp,},success:function(){},dataType:'json'});} if($('.valoration_step_2').is(':visible')){$('.a').hide();$('.b').show();$('.popup_valoration .popup_header').hide();auto_resize_popup($('.popup_valoration')[0]);}else{$('.valoration_step_2').fadeIn();$('.popup_valoration .popup_header').hide();auto_resize_popup($('.popup_valoration')[0]);}});$('.valoration_ok_button').click(function(){popup_close($('.popup_valoration'));});if($('._select3').length){$('._select3_a').click(function(e){$('._select3').toggleClass('_select3--active');e.stopPropagation();});$('body').click(function(){$('._select3').removeClass('_select3--active');});$('._select3_b > li').click(function(){$('._select3_a > span').html($(this)[0].innerText);$(this).parents('._select3:first').removeClass('_select3--active');$('._select3_b > ._select3_b_active').removeClass('_select3_b_active');$(this).addClass('_select3_b_active');cod_lang=$(this).data('cod');if(cod_lang!='zh-TW'){cod_lang=cod_lang.substring(0,2);} if(cod_lang=='ar'){$('.global').addClass('global--rtl');}else{$('.global--rtl').removeClass('global--rtl');} init_home();$('[data-i18n_json]').each(function(){if($(this).prop('placeholder')){$(this).prop('placeholder',i18n_json[$(this).data('i18n_json')][cod_lang]);}else{var text=i18n_json[$(this).data('i18n_json')][cod_lang];if($(this).data('i18n_replace')){text=text.replace('[var]',$(this).data('i18n_replace'));} $(this)[0].innerHTML=htmlspecialchars(text);}});if($('.message_i18n').length){$('.message_text').html($('.message_i18n [data-cod_lang="'+cod_lang+'"]').html());} if($('.popup_i18n').length){$('.open_popup_message > span').html($('.popup_i18n [data-cod_lang="'+cod_lang+'"] .popup_i18n_title').html());$('.popup_message .popup_header > span').html($('.popup_i18n [data-cod_lang="'+cod_lang+'"] .popup_i18n_title').html());$('.popup_message .popup_text').html($('.popup_i18n [data-cod_lang="'+cod_lang+'"] .popup_i18n_text').html());} if($('.wifi_password').length){$('.wifi_password').attr('data-hint',i18n_json.coppied[cod_lang]);} if($('.qr > span').length){$('.qr > span').attr('data-hint',i18n_json.scan_qr[cod_lang]);}});$('._select3_b > ._select3_b_active').click();} $('.go_to_ratings').click(function(){popup_open($('.popup_stats'));$('.popup_stats .popup_content .lazy').lazy({effect:'fadeIn',effectTime:250,visibleOnly:true,appendScroll:$('.popup_stats .popup_content'),});$('.popup_stats .servicio_n > li').each(function(){$('.servicio_bar_on',this).css('width',$(this).data('percent')+'%');});$('.popup_stats .stars').each(function(){$('.stars_on',this).css('width',$('.stars_on',this).data('percent')+'%');});read_more_magic($('.popup_stats'));});$('.stats .close').click(function(){popup_close($('.popup_stats'));});function is_overflown(el){var style=window.getComputedStyle(el);var marginTop=parseInt(style.marginTop,10);var marginBottom=parseInt(style.marginBottom,10);var totalHeightWithMargins=el.scrollHeight+marginTop+marginBottom;return totalHeightWithMargins>el.clientHeight+3;} function read_more_magic(container){$('.text',container).each(function(){var multiplier=3;if($(this).hasClass('message')){multiplier=4;} var max_height=$(this).css('line-height').replace('px','')*multiplier;$('.text_max_height',this).css('max-height',max_height);if(is_overflown($('.text_max_height',this)[0])){max_height=$(this).css('line-height').replace('px','')*(multiplier-1);$('.text_max_height--enabled',this).addClass('text_max_height--enabled'+(multiplier-1));$('.text_max_height',this).css('max-height',max_height);$('.read_more',this).show();$('.text_max_height--enabled',this).addClass('__remove_br_n').addClass('text_max_height--disabled');}else{$('.read_more',this).hide();$('.text_max_height--enabled',this).removeClass('text_max_height--enabled').addClass('text_max_height--disabled');}});$('.read_more',container).click(function(){var container_2=$(this).parents('.text:first');$('.text_max_height--enabled',container_2).css('max-height','100%');$('.text_max_height--enabled',container_2).removeClass('text_max_height--enabled').removeClass('__remove_br_n').addClass('text_max_height--disabled');$(this).remove();});} function calcula_altura_precios(container){$('.menu_section_dish_price',container).addClass('menu_section_dish_price--one_line').removeClass('menu_section_dish_price--multi_line').each(function(){if(this.scrollHeight>parseFloat(window.getComputedStyle(this).lineHeight)){$(this).removeClass('menu_section_dish_price--one_line').addClass('menu_section_dish_price--multi_line');}});} $('.secondary_info_list > li').click(function(e){var a=$('a',this);if(a.length){e.preventDefault();window.open(a.attr('href'),'_blank');}});$('.secondary_info').click(function(e){e.stopPropagation();});$('.link_to_secondary_info').click(function(){popup_open($('.popup_secondary_info'));});function popup_open(e,mercadona){if($(e).data('popup_status')=='open'){return false;} $(e).data('popup_status','open');$('.popup_content').removeClass('popup_content--top');if(!iframed&&typeof(mercadona)=='undefined'){var temp={};if($(e).hasClass('popup_stats')){temp.popup='popup_stats';}else if($(e).hasClass('popup_secondary_info')){temp.popup='popup_secondary_info';}else if($(e).hasClass('popup_valoration')){temp.popup='popup_valoration';}else if($(e).hasClass('popup_message')){temp.popup='popup_message';}else if($(e).hasClass('popup_bigger')){temp.popup='popup_bigger';} window.history.pushState(temp,document.title);} $('.popup_header--scrolled',e).removeClass('popup_header--scrolled');$('body, html').css('overscroll-behavior','none');if(!$('.__modal_background').length){$('.global').append('
    ');$('.__modal_background').fadeIn('fast');} $(e).show();$('.popup_content',e).stop();$('.popup_content',e).css('height','auto');var future_height=default_popup_height;if($(e).hasClass('popup_valoration')){future_height=$('.popup_content',e).height();if(future_height<320){future_height=320;}else if(future_height>600){future_height=600;}} $('.popup_content',e).css('height',0);$('.popup_content',e).data('touch_start_y',0).scrollTop(0);$('.popup_content',e).stop().animate({height:future_height,},250);periquito(e,future_height);setTimeout(function(){$('.lazy',e).lazy({effect:'fadeIn',effectTime:250,visibleOnly:true,});},250);} function popup_close(e,mercadona){if($(e).data('popup_status')!='open'){return false;}else if($(e).data('popup_status')=='close'){return false;} $(e).data('popup_status','close');if(!iframed&&typeof(mercadona)=='undefined'){window.history.back();} if($('.popup_container:visible').length==1){$('.__modal_background').fadeOut('fast',function(){$(this).remove();});$('body, html').css('overscroll-behavior','auto');} $('.popup_content',e).stop().animate({height:0,},250);$(e).fadeOut();} $('.popup_content').click(function(e){e.stopPropagation();});$('.popup_container').click(function(){if(!iframed){window.history.back();}else{popup_close(this);}});$('.open_popup_message > span').click(function(){popup_open($('.popup_message'));});if(!iframed){window.addEventListener('popstate',function(){if(window.history.state&&'popup'in window.history.state){var ok=false;if(window.history.state.popup=='popup_stats'){ok=true;}else if(window.history.state.popup=='popup_secondary_info'){ok=true;}else if(window.history.state.popup=='popup_valoration'){ok=true;}else if(window.history.state.popup=='popup_message'){ok=true;}else if(window.history.state.popup=='popup_bigger'){ok=true;} if(ok){popup_open($('.'+window.history.state.popup),true);}}else if($('.search:visible').length){if($('.popup_bigger:visible').length&&$('.popup_bigger:visible').data('popup_status')=='open'){popup_close($('.popup_bigger:visible'),true);}else{$('.search').hide();}}else if(window.history.state&&'special'in window.history.state){$('.search').show();}else if(window.history.state&&'id_menu'in window.history.state){if($('.popup_container:visible').length&&$('.popup_container:visible').data('popup_status')=='open'){popup_close($('.popup_container:visible'),true);} if(window.history.state.id_menu){id_menu=window.history.state.id_menu;if($('.caballo').data('id_menu')!=id_menu){init_menu();}}else{id_menu=null;id_menu_section_dish=null;init_home();}}else{window.history.back();}});} garrofa();window.addEventListener('touchmove',function(e){if(!$('.popup_container:visible').length){return false;} var target=e.target;var isScrollable=target.scrollHeight>target.clientHeight;if(e.scale!==1){e.preventDefault();}else if(!isScrollable){e.preventDefault();}},{passive:false});function periquito(popup,alturaInicialDeVerdad){if(!$('.popup_content',popup).length){return false;} var control=$('.popup_content',popup)[0];if($(control).data('has_event_listeners')){return false;} $(control).data('has_event_listeners',true);var estaArrastrando=false;var alturaInicial=0;var posXInicial=0;var posYInicial=0;var posXFinal=0;var posYFinal=0;var arrastra_horizontal=false;var arrastra_vertical=false;var new_height=0;var polar=0;var topado=false;var divPadre=control;$(divPadre).removeClass('popup_content--top');$(divPadre).scroll(function(event){if($(this).scrollTop()>2){$('.popup_header',popup).addClass('popup_header--scrolled');}else{$('.popup_header',popup).removeClass('popup_header--scrolled');}});var iniciarArrastre=function(e){if(e.target.tagName.toLowerCase()==='textarea'||e.target.classList.contains('__button2')){return false;} posYFinal=0;$('body').css('user-select','none');estaArrastrando=true;alturaInicial=divPadre.offsetHeight;posXInicial=e.type.indexOf('mouse')!==-1?e.clientX:e.touches[0].clientX;posYInicial=e.type.indexOf('mouse')!==-1?e.clientY:e.touches[0].clientY;polar=posYInicial;new_height=alturaInicial;arrastra_horizontal=arrastra_vertical=false;};var arrastrar=function(e){if(!estaArrastrando)return;posXFinal=e.type.indexOf('mouse')!==-1?e.clientX:e.touches[0].clientX;posYFinal=e.type.indexOf('mouse')!==-1?e.clientY:e.touches[0].clientY;if(!arrastra_horizontal&&!arrastra_vertical){if(Math.abs(posXFinal-posXInicial)>12||Math.abs(posYFinal-posYInicial)>12){if(Math.abs(posXFinal-posXInicial)>Math.abs(posYFinal-posYInicial)){arrastra_horizontal=true;}else{arrastra_vertical=true;}}else{return;}} if(arrastra_vertical){if($(control).height()>=$('.global').height()-1){if(!topado){$(divPadre).addClass('popup_content--top');alturaInicial=$('.global').height();polar=posYFinal;topado=true;}}else{if(topado){$(divPadre).removeClass('popup_content--top');polar=posYFinal;topado=false;}} if(e.target.closest('.popup_scroll')){if(posYFinal$('.global').height()){new_height=$('.global').height();} divPadre.style.height=new_height+'px';}};var finalizarArrastre=function(e){if(!estaArrastrando)return;if(arrastra_vertical){$('body').css('user-select','auto');estaArrastrando=false;if(new_height<320||alturaInicialDeVerdad-new_height>120){if(!iframed){window.history.back();}else{popup_close(popup);}}else if(new_height>alturaInicialDeVerdad){if(new_height>default_popup_height){$(divPadre).addClass('popup_content--top');new_height=$('.global').height();$(divPadre).stop().animate({height:new_height,},100);}else{new_height=alturaInicialDeVerdad;$(divPadre).stop().animate({height:new_height,},100);}}else{new_height=alturaInicialDeVerdad;$(divPadre).stop().animate({height:new_height,},100);}}else if(arrastra_horizontal){if(e.target.closest('.popup_bigger')){var container='.caballo';if($('.search:visible').length){container='.search';} var all_dishes=$('[data-id_menu_section_dish]',container);var current_dish=$('[data-id_menu_section_dish="'+id_menu_section_dish+'"]',container);var current_index=all_dishes.index(current_dish);if(posXFinal-posXInicial<-80){if(current_index80){if(current_index>0){all_dishes.eq(current_index-1).click();}}}}};control.addEventListener('mousedown',iniciarArrastre);document.addEventListener('mousemove',arrastrar,{passive:true});document.addEventListener('mouseup',finalizarArrastre,{passive:true});control.addEventListener('touchstart',iniciarArrastre);control.addEventListener('touchmove',arrastrar,{passive:true});control.addEventListener('touchend',finalizarArrastre,{passive:true});} window.htmlspecialchars=function(str){var map={'&':'&','<':'<','>':'>','"':'"',"'":'''};return String(str).replace(/[&<>"']/g,function(m){return map[m];});};$('.search_trigger').click(function(){if(!iframed){window.history.pushState({special:'search'},document.title);} $('.search').show();$('.search textarea').focus();$('.search .search_header textarea').trigger('input');});$('.search .sprite_back').click(function(){document.title=$('.property_name').text().replace(/(\r\n|\n|\r)/gm,'');$('.search').hide();if(!iframed){window.history.back();}});$('.sprite_close').click(function(){clear_search_results();if(time_out_search!==null){clearTimeout(time_out_search);} $('.search textarea').val('').focus();});var time_out_search=null;$('.search .search_header textarea').on('input propertychange paste',function(){var res=[];var q=$(this).val().trim();if(time_out_search!==null){clearTimeout(time_out_search);} clear_search_results();if(q.length>0){$('.search .sprite_close').css('display','flex');} time_out_search=setTimeout(function(){if(q.length>0){for(var i=0;i li[data-id_menu="'+los_datos[i].id+'"]').length){if(typeof(los_datos[i].section_n)=='object'){for(var j=0;j li').click(function(){init_menu_section_dish(this);});$('.lazy','.search .menu_section_dish_n').lazy({effect:'fadeIn',effectTime:250,visibleOnly:true,appendScroll:$('.search ul'),});calcula_altura_precios($('.search .menu_section_dish_n'));}} function soundex(word){word=word.toUpperCase();var firstLetter=word[0];var mappings={B:'1',F:'1',P:'1',V:'1',C:'2',G:'2',J:'2',K:'2',Q:'2',S:'2',X:'2',Z:'2',D:'3',T:'3',L:'4',M:'5',N:'5',R:'6'};var chars=[];for(var i=1;i